non-Nix Python Packages with Binaries on NixOS

This commit is contained in:
Sam 2024-10-10 01:36:50 +01:00
parent 00d5c7db47
commit 92fb9f5519
1 changed files with 17 additions and 0 deletions

View File

@ -55,6 +55,7 @@ in {
../common/optional/nixos-containers/nix-bitcoin.nix ../common/optional/nixos-containers/nix-bitcoin.nix
../common/optional/nixos-containers/postgres.nix ../common/optional/nixos-containers/postgres.nix
../common/optional/nixos-containers/jellyfin.nix ../common/optional/nixos-containers/jellyfin.nix
../common/optional/nixos-containers/worker.nix
]; ];
fileSystems."/media/main-ssd" = { fileSystems."/media/main-ssd" = {
@ -130,5 +131,21 @@ in {
}; };
}; };
# Using non-Nix Python Packages with Binaries on NixOS https://github.com/mcdonc/.nixconfig/blob/e7885ad18b7980f221e59a21c91b8eb02795b541/videos/pydev/script.rst
programs.nix-ld.enable = true;
programs.nix-ld.libraries = with pkgs; [
zlib # numpy
libgcc # sqlalchemy
# that's where the shared libs go, you can find which one you need using
# nix-locate --top-level libstdc++.so.6 (replace this with your lib)
# ^ this requires `nix-index` pkg
];
environment.variables = {
NIX_LD_LIBRARY_PATH="/run/current-system/sw/share/nix-ld/lib";
NIX_LD="/run/current-system/sw/share/nix-ld/lib/ld.so";
LD_LIBRARY_PATH=lib.mkForce "$NIX_LD_LIBRARY_PATH";
};
services.libinput.enable = true; services.libinput.enable = true;
} }