Long Story: I’m pretty new to nixos and want to setup a python project. The project needs the pip package pyrosm, which depends on cykhash, which apparently needs some c compiler stuff. I already got rid of some pip install errors by adding libgcc and binutils. However still have an error /nix/store/1fn92b0783crypjcxvdv6ycmvi27by0j-binutils-2.40/bin/ld: cannot find crti.o: No such file or directory which according to this post could be solved on ubuntu by installing gcc-multilib. On nix it should be possible to solve by adding multiStdenv.mkDerivation, but how do i do so? Thanks for any help!
# shell.nix
{ pkgs ? import <nixpkgs> {} }:
(pkgs.buildFHSUserEnv {
name = "pipzone"; # choose your own name
targetPkgs = pkgs: (with pkgs; [
python39 # Preferable choose version with Full postfix, e.g. python311Full
python39Packages.pip
python39Packages.virtualen
]);
multiPkgs = pkgs: with pkgs; [ # choose your libraries
libgcc
binutils
coreutils
];
# exporting LIBRARY_PATH is essential so the libraries get found!
profile = ''
export LIBRARY_PATH=/usr/lib:/usr/lib64:$LIBRARY_PATH
# export LIBRARY_PATH=${pkgs.libgcc}/lib # somethingl like this may also be necessary for certain libraries (change to your library e.g. pkgs.coreutils
'';
runScript = "bash";
}).env