Add C/C++ libraries for Python venv with compiled packages support
This commit is contained in:
@@ -24,6 +24,14 @@
|
|||||||
selectedPackages =
|
selectedPackages =
|
||||||
lib.concatMap (lang: languagePackages.${lang} or []) cfg.languages;
|
lib.concatMap (lang: languagePackages.${lang} or []) cfg.languages;
|
||||||
|
|
||||||
|
# C/C++ libraries needed for compiled Python packages (numpy, etc.)
|
||||||
|
pythonDevLibraries = with pkgs;
|
||||||
|
lib.optionals (lib.elem "python" cfg.languages) [
|
||||||
|
glibc
|
||||||
|
stdenv.cc.cc.lib
|
||||||
|
libxcrypt
|
||||||
|
];
|
||||||
|
|
||||||
in lib.mkIf cfg.enable {
|
in lib.mkIf cfg.enable {
|
||||||
|
|
||||||
# Core development tools
|
# Core development tools
|
||||||
@@ -37,7 +45,16 @@
|
|||||||
cmake
|
cmake
|
||||||
ripgrep
|
ripgrep
|
||||||
jq
|
jq
|
||||||
] ++ selectedPackages;
|
] ++ selectedPackages ++ pythonDevLibraries;
|
||||||
|
|
||||||
|
# Set library paths for venv compatibility with compiled packages
|
||||||
|
environment.variables = lib.mkIf (lib.elem "python" cfg.languages) {
|
||||||
|
LD_LIBRARY_PATH = lib.makeLibraryPath (with pkgs; [
|
||||||
|
glibc
|
||||||
|
stdenv.cc.cc.lib
|
||||||
|
libxcrypt
|
||||||
|
]);
|
||||||
|
};
|
||||||
|
|
||||||
# Enable container support (optional)
|
# Enable container support (optional)
|
||||||
#virtualisation.docker.enable = true;
|
#virtualisation.docker.enable = true;
|
||||||
|
|||||||
Reference in New Issue
Block a user