diff --git a/overrides/default.nix b/overrides/default.nix index 6be59f8..af0b689 100644 --- a/overrides/default.nix +++ b/overrides/default.nix @@ -650,6 +650,7 @@ lib.composeManyExtensions [ 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' diff --git a/tests/default.nix b/tests/default.nix index 62a0ae0..cb1f154 100644 --- a/tests/default.nix +++ b/tests/default.nix @@ -129,6 +129,7 @@ builtins.removeAttrs shapely = callTest ./shapely { }; setuptools = callTest ./setuptools { }; + gdal = callTest ./gdal { }; scientific = callTest ./scientific { }; scipy1_9 = callTest ./scipy1_9 { }; test-group = callTest ./test-group { }; diff --git a/tests/gdal/default.nix b/tests/gdal/default.nix new file mode 100644 index 0000000..8a264d5 --- /dev/null +++ b/tests/gdal/default.nix @@ -0,0 +1,8 @@ +{ lib, poetry2nix, python39 }: + +poetry2nix.mkPoetryApplication { + python = python39; + pyproject = ./pyproject.toml; + poetrylock = ./poetry.lock; + src = lib.cleanSource ./.; +} diff --git a/tests/gdal/gdal_test/__init__.py b/tests/gdal/gdal_test/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/tests/gdal/poetry.lock b/tests/gdal/poetry.lock new file mode 100644 index 0000000..72d1f39 --- /dev/null +++ b/tests/gdal/poetry.lock @@ -0,0 +1,20 @@ +[[package]] +name = "gdal" +version = "3.6.0.1" +description = "GDAL: Geospatial Data Abstraction Library" +category = "main" +optional = false +python-versions = ">=3.6.0" + +[package.extras] +numpy = ["numpy (>1.0.0)"] + +[metadata] +lock-version = "1.1" +python-versions = "~3.9" +content-hash = "4872acd5e5436d59381f6375093ccf94408b15d33b35de546b662ec39a9f6fd5" + +[metadata.files] +gdal = [ + {file = "GDAL-3.6.0.1.tar.gz", hash = "sha256:7ae74900cbb737fba0a49e2a035ef10b9218d576c3c761caadc25031c95df040"}, +] diff --git a/tests/gdal/pyproject.toml b/tests/gdal/pyproject.toml new file mode 100644 index 0000000..179ed86 --- /dev/null +++ b/tests/gdal/pyproject.toml @@ -0,0 +1,15 @@ +[tool.poetry] +name = "gdal-test" +version = "0.1.0" +description = "" +authors = ["Your Name "] + +[tool.poetry.dependencies] +python = "~3.9" +gdal = "*" + +[tool.poetry.dev-dependencies] + +[build-system] +requires = ["poetry-core>=1"] +build-backend = "poetry.core.masonry.api"