mirror of
https://github.com/vale981/poetry2nix
synced 2025-03-05 09:11:39 -05:00
Add overrides to make scipy/scikit-learn build
This commit is contained in:
parent
2751a7fa0d
commit
6032bb34b2
1 changed files with 29 additions and 0 deletions
|
@ -400,9 +400,21 @@ self: super:
|
|||
}
|
||||
);
|
||||
|
||||
# Pybind11 is an undeclared dependency of scipy that we need to pick from nixpkgs
|
||||
# Make it not fail with infinite recursion
|
||||
pybind11 = super.pybind11.overridePythonAttrs (
|
||||
old: {
|
||||
cmakeFlags = (old.cmakeFlags or []) ++ [
|
||||
"-DPYBIND11_TEST=off"
|
||||
];
|
||||
doCheck = false; # Circular test dependency
|
||||
}
|
||||
);
|
||||
|
||||
scipy = super.scipy.overrideAttrs (
|
||||
old: {
|
||||
nativeBuildInputs = old.nativeBuildInputs ++ [ pkgs.gfortran ];
|
||||
propagatedBuildInputs = old.propagatedBuildInputs ++ [ self.pybind11 ];
|
||||
setupPyBuildFlags = [ "--fcompiler='gnu95'" ];
|
||||
enableParallelBuilding = true;
|
||||
buildInputs = old.buildInputs ++ [ self.numpy.blas ];
|
||||
|
@ -416,6 +428,23 @@ self: super:
|
|||
}
|
||||
);
|
||||
|
||||
scikit-learn = super.scikit-learn.overridePythonAttrs (
|
||||
old: {
|
||||
buildInputs = old.buildInputs ++ [
|
||||
pkgs.gfortran
|
||||
pkgs.glibcLocales
|
||||
] ++ lib.optionals stdenv.cc.isClang [
|
||||
pkgs.llvmPackages.openmp
|
||||
];
|
||||
|
||||
nativeBuildInputs = old.nativeBuildInputs ++ [
|
||||
self.cython
|
||||
];
|
||||
|
||||
enableParallelBuilding = true;
|
||||
}
|
||||
);
|
||||
|
||||
shapely = super.shapely.overrideAttrs (
|
||||
old: {
|
||||
buildInputs = old.buildInputs ++ [ pkgs.geos self.cython ];
|
||||
|
|
Loading…
Add table
Reference in a new issue