mirror of
https://github.com/vale981/poetry2nix
synced 2025-03-06 09:41:39 -05:00
overrides.gdal: disable python bindings in gdal from nixpkgs
This collides with the version built from pypi, and if the version mismatches the build process attempts an uninstall of the nixpkgs gdal package. We can avoid this by only building the native library and ignore the Python bindings.
This commit is contained in:
parent
9ce2252803
commit
0f962934ed
1 changed files with 22 additions and 9 deletions
|
@ -670,15 +670,28 @@ lib.composeManyExtensions [
|
|||
VERSION = old.version;
|
||||
});
|
||||
|
||||
gdal = super.gdal.overridePythonAttrs (
|
||||
old: {
|
||||
nativeBuildInputs = (old.nativeBuildInputs or [ ]) ++ [ pkgs.gdal ];
|
||||
preBuild = (old.preBuild or "") + ''
|
||||
substituteInPlace setup.cfg \
|
||||
--replace "../../apps/gdal-config" '${pkgs.gdal}/bin/gdal-config'
|
||||
'';
|
||||
}
|
||||
);
|
||||
gdal =
|
||||
let
|
||||
# Build gdal without python bindings to prevent version mixing
|
||||
# We're only interested in the native libraries, not the python ones
|
||||
# as we build that separately.
|
||||
gdal = pkgs.gdal.overrideAttrs (old: {
|
||||
doInstallCheck = false;
|
||||
doCheck = false;
|
||||
cmakeFlags = (old.cmakeFlags or [ ]) ++ [
|
||||
"-DBUILD_PYTHON_BINDINGS=OFF"
|
||||
];
|
||||
});
|
||||
in
|
||||
super.gdal.overridePythonAttrs (
|
||||
old: {
|
||||
nativeBuildInputs = (old.nativeBuildInputs or [ ]) ++ [ gdal ];
|
||||
preBuild = (old.preBuild or "") + ''
|
||||
substituteInPlace setup.cfg \
|
||||
--replace "../../apps/gdal-config" '${gdal}/bin/gdal-config'
|
||||
'';
|
||||
}
|
||||
);
|
||||
|
||||
grandalf = super.grandalf.overridePythonAttrs (
|
||||
old: {
|
||||
|
|
Loading…
Add table
Reference in a new issue