diff --git a/flake.lock b/flake.lock index e604671f..fa5219d4 100644 --- a/flake.lock +++ b/flake.lock @@ -72,11 +72,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1722651103, - "narHash": "sha256-IRiJA0NVAoyaZeKZluwfb2DoTpBAj+FLI0KfybBeDU0=", + "lastModified": 1723282977, + "narHash": "sha256-oTK91aOlA/4IsjNAZGMEBz7Sq1zBS0Ltu4/nIQdYDOg=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "a633d89c6dc9a2a8aae11813a62d7c58b2c0cc51", + "rev": "a781ff33ae258bbcfd4ed6e673860c3e923bf2cc", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 19ac0f8a..494ccd3d 100644 --- a/flake.nix +++ b/flake.nix @@ -236,6 +236,7 @@ plugin = value; inherit grass; + python3-gdal = python-packages.python3.gdal; }; } ) diff --git a/pkgs/gdal/master-rev.nix b/pkgs/gdal/master-rev.nix index 85c7fab7..5f64c07c 100644 --- a/pkgs/gdal/master-rev.nix +++ b/pkgs/gdal/master-rev.nix @@ -1,4 +1,4 @@ { - rev = "5bfc8cc"; - hash = "sha256-5Y0lAVatPKH28Crye+KFV10c88xT5ml3XlrIcNpqENM="; + rev = "3527c3f"; + hash = "sha256-nMh3KSaGKRzWQL39/Ab4Ohu5HPwSObxX3cr7K+8nDNU="; } diff --git a/pkgs/grass/plugins-list.nix b/pkgs/grass/plugins-list.nix index 2611977e..edf6005d 100644 --- a/pkgs/grass/plugins-list.nix +++ b/pkgs/grass/plugins-list.nix @@ -798,6 +798,12 @@ }; + r-in-vect = { + name = "r.in.vect"; + description = ''Converts an external vector layer to a raster layer using gdal.Rasterize (the vector layer will be reprojected first if its CRS is different from the current mapset), and imports this raster layer.''; + }; + + r-in-wcs = { name = "r.in.wcs"; description = ''Downloads and imports coverage from WCS server.''; diff --git a/pkgs/grass/plugins-rev.nix b/pkgs/grass/plugins-rev.nix index 5fcb8120..8c04b627 100644 --- a/pkgs/grass/plugins-rev.nix +++ b/pkgs/grass/plugins-rev.nix @@ -1,4 +1,4 @@ { - rev = "3bc30b3"; - hash = "sha256-xCFgmn0RbLgg0+HFd0CnSWWLiKDFSOJjcvD/lqVKRf4="; + rev = "d6fc6d5"; + hash = "sha256-FkXgVuDZywY9IXYkjCg2A/WHfqVfnZrJ5HFiH47SUSY="; } diff --git a/pkgs/grass/plugins.nix b/pkgs/grass/plugins.nix index 8a2e7c7f..b98fe82d 100644 --- a/pkgs/grass/plugins.nix +++ b/pkgs/grass/plugins.nix @@ -15,6 +15,7 @@ , pkg-config , postgresql , python3 +, python3-gdal }: let @@ -53,6 +54,7 @@ stdenv.mkDerivation { # python matplotlib numpy + python3-gdal six ]; @@ -64,6 +66,7 @@ stdenv.mkDerivation { ++ lib.optionals (name == "r-edm-eval") [ pandas ] ++ lib.optionals (name == "i-eodag") [ pytz ] ++ lib.optionals (name == "wx-metadata") [ wxpython ] + ++ lib.optionals (name == "r-in-vect") [ python3-gdal ] # non python ++ lib.optionals (name == "r-out-tiff") [ libtiff ] diff --git a/pkgs/postgis/postgis.nix b/pkgs/postgis/postgis.nix index ee1669e5..251d79ff 100644 --- a/pkgs/postgis/postgis.nix +++ b/pkgs/postgis/postgis.nix @@ -1,20 +1,26 @@ -{ fetchurl -, lib, stdenv -, perl -, libxml2 -, postgresql -, geos -, proj -, gdalMinimal -, json_c -, pkg-config -, file -, protobufc -, libiconv -, pcre2 -, nixosTests -, jitSupport -, llvm +{ + fetchurl, + lib, + stdenv, + perl, + libxml2, + postgresql, + postgresqlTestHook, + geos, + proj, + gdalMinimal, + json_c, + pkg-config, + file, + protobufc, + libiconv, + libxslt, + docbook_xml_dtd_45, + cunit, + pcre2, + nixosTests, + jitSupport, + llvm, }: let @@ -24,22 +30,44 @@ stdenv.mkDerivation rec { pname = "postgis"; version = "3.4.2"; - outputs = [ "out" "doc" ]; + outputs = [ + "out" + "doc" + ]; src = fetchurl { url = "https://download.osgeo.org/postgis/source/postgis-${version}.tar.gz"; - sha256 = "sha256-yMh0wAukqYSocDCva/lUSCFQIGCtRz1clvHU0INcWJI="; + hash = "sha256-yMh0wAukqYSocDCva/lUSCFQIGCtRz1clvHU0INcWJI="; }; - buildInputs = [ libxml2 postgresql geos proj gdal json_c protobufc pcre2.dev ] - ++ lib.optional stdenv.isDarwin libiconv; - nativeBuildInputs = [ perl pkg-config ] ++ lib.optional jitSupport llvm; + buildInputs = [ + libxml2 + postgresql + geos + proj + gdal + json_c + protobufc + pcre2.dev + ] ++ lib.optional stdenv.isDarwin libiconv; + nativeBuildInputs = [ + perl + pkg-config + ] ++ lib.optional jitSupport llvm; dontDisableStatic = true; + nativeCheckInputs = [ + postgresqlTestHook + cunit + libxslt + ]; + + postgresqlTestUserOptions = "LOGIN SUPERUSER"; + failureHook = "postgresqlStop"; + # postgis config directory assumes /include /lib from the same root for json-c library env.NIX_LDFLAGS = "-L${lib.getLib json_c}/lib"; - preConfigure = '' sed -i 's@/usr/bin/file@${file}/bin/file@' configure configureFlags="--datadir=$out/share/postgresql --datarootdir=$out/share/postgresql --bindir=$out/bin --docdir=$doc/share/doc/${pname} --with-gdalconfig=${gdal}/bin/gdal-config --with-jsondir=${json_c.dev} --disable-extension-upgrades-install" @@ -61,6 +89,15 @@ stdenv.mkDerivation rec { ln -s ${postgresql}/bin/postgres $out/bin/postgres ''; + doCheck = stdenv.isLinux; + + preCheck = '' + substituteInPlace regress/run_test.pl --replace-fail "/share/contrib/postgis" "$out/share/postgresql/contrib/postgis" + substituteInPlace regress/Makefile --replace-fail 's,\$$libdir,$(REGRESS_INSTALLDIR)/lib,g' "s,\\$\$libdir,$PWD/regress/00-regress-install$out/lib,g" \ + --replace-fail '$(REGRESS_INSTALLDIR)/share/contrib/postgis/*.sql' "$PWD/regress/00-regress-install$out/share/postgresql/contrib/postgis/*.sql" + substituteInPlace doc/postgis-out.xml --replace-fail "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" "${docbook_xml_dtd_45}/xml/dtd/docbook/docbookx.dtd" + ''; + # create aliases for all commands adding version information postInstall = '' # Teardown the illusory postgres used for building; see postConfigure. @@ -81,7 +118,13 @@ stdenv.mkDerivation rec { homepage = "https://postgis.net/"; changelog = "https://git.osgeo.org/gitea/postgis/postgis/raw/tag/${version}/NEWS"; license = licenses.gpl2Plus; - maintainers = with maintainers; teams.geospatial.members ++ [ marcweber wolfgangwalther ]; + maintainers = + with maintainers; + teams.geospatial.members + ++ [ + marcweber + wolfgangwalther + ]; inherit (postgresql.meta) platforms; }; } diff --git a/pkgs/qgis/nixpkgs/unify-unwrapped.patch b/pkgs/qgis/nixpkgs/unify-unwrapped.patch new file mode 100644 index 00000000..9d1ac204 --- /dev/null +++ b/pkgs/qgis/nixpkgs/unify-unwrapped.patch @@ -0,0 +1,47 @@ +diff --git b/pkgs/qgis/ltr.nix a/pkgs/qgis/ltr.nix +index cc5f99d..67c1901 100644 +--- b/pkgs/qgis/ltr.nix ++++ a/pkgs/qgis/ltr.nix +@@ -3,25 +3,25 @@ + , symlinkJoin + + , extraPythonPackages ? (ps: [ ]) +-, qgis-ltr-unwrapped ++, qgis-unwrapped + + , libsForQt5 + }: + + symlinkJoin rec { + +- inherit (qgis-ltr-unwrapped) version src; ++ inherit (qgis-unwrapped) version src; + name = "qgis-${version}"; + +- paths = [ qgis-ltr-unwrapped ]; ++ paths = [ qgis-unwrapped ]; + + nativeBuildInputs = [ + makeWrapper +- qgis-ltr-unwrapped.py.pkgs.wrapPython ++ qgis-unwrapped.py.pkgs.wrapPython + ]; + + # extend to add to the python environment of QGIS without rebuilding QGIS application. +- pythonInputs = qgis-ltr-unwrapped.pythonBuildInputs ++ (extraPythonPackages qgis-ltr-unwrapped.py.pkgs); ++ pythonInputs = qgis-unwrapped.pythonBuildInputs ++ (extraPythonPackages qgis-unwrapped.py.pkgs); + + postBuild = '' + # unpackPhase +@@ -34,9 +34,9 @@ symlinkJoin rec { + ''; + + passthru = { +- unwrapped = qgis-ltr-unwrapped; ++ unwrapped = qgis-unwrapped; + tests.qgis-ltr = nixosTests.qgis-ltr; + }; + +- inherit (qgis-ltr-unwrapped) meta; ++ inherit (qgis-unwrapped) meta; + } diff --git a/pkgs/qgis/qgis-ltr-plugins-list.nix b/pkgs/qgis/qgis-ltr-plugins-list.nix index d219461f..7176316c 100644 --- a/pkgs/qgis/qgis-ltr-plugins-list.nix +++ b/pkgs/qgis/qgis-ltr-plugins-list.nix @@ -127,9 +127,9 @@ NumericalDigitize = { - version = "0.4.7"; - url = "https://plugins.qgis.org/plugins/numericalDigitize/version/0.4.7/download/"; - hash = "sha256-3RUn+KDDbW3UeAqopLScGjRymkmAcJ0DTI6l8Rt0iEQ="; + version = "0.4.8"; + url = "https://plugins.qgis.org/plugins/numericalDigitize/version/0.4.8/download/"; + hash = "sha256-kfkgKuKKlKERN+4FUb9JRq+6h7KJT+EYBfcsOf5GDGQ="; }; @@ -428,9 +428,9 @@ TUFLOW = { - version = "3.11.1"; - url = "https://plugins.qgis.org/plugins/tuflow/version/3.11.1/download/"; - hash = "sha256-MQP8sO4GxV7qB21TXWWagKTSEzoUFHcvEwqL72rSAII="; + version = "3.12"; + url = "https://plugins.qgis.org/plugins/tuflow/version/3.12/download/"; + hash = "sha256-ZHSGCYLJQCgokgYG6HB3zULYJmOZZKBgMkTS58wFiXE="; }; @@ -477,9 +477,9 @@ QField-Sync = { - version = "v4.9.1"; - url = "https://plugins.qgis.org/plugins/qfieldsync/version/v4.9.1/download/"; - hash = "sha256-VrQD9IUA5xz6Q7kByAd9DN2Y2Y532OW9xMs2j+TW824="; + version = "v4.10.1"; + url = "https://plugins.qgis.org/plugins/qfieldsync/version/v4.10.1/download/"; + hash = "sha256-tZajHa14QBW51Rkm2nr9fJPDoaQ40LAC/iEhv9x/hgs="; }; diff --git a/pkgs/qgis/qgis-plugins-list.nix b/pkgs/qgis/qgis-plugins-list.nix index 95ced42e..f2031557 100644 --- a/pkgs/qgis/qgis-plugins-list.nix +++ b/pkgs/qgis/qgis-plugins-list.nix @@ -127,9 +127,9 @@ NumericalDigitize = { - version = "0.4.7"; - url = "https://plugins.qgis.org/plugins/numericalDigitize/version/0.4.7/download/"; - hash = "sha256-3RUn+KDDbW3UeAqopLScGjRymkmAcJ0DTI6l8Rt0iEQ="; + version = "0.4.8"; + url = "https://plugins.qgis.org/plugins/numericalDigitize/version/0.4.8/download/"; + hash = "sha256-kfkgKuKKlKERN+4FUb9JRq+6h7KJT+EYBfcsOf5GDGQ="; }; @@ -428,9 +428,9 @@ TUFLOW = { - version = "3.11.1"; - url = "https://plugins.qgis.org/plugins/tuflow/version/3.11.1/download/"; - hash = "sha256-MQP8sO4GxV7qB21TXWWagKTSEzoUFHcvEwqL72rSAII="; + version = "3.12"; + url = "https://plugins.qgis.org/plugins/tuflow/version/3.12/download/"; + hash = "sha256-ZHSGCYLJQCgokgYG6HB3zULYJmOZZKBgMkTS58wFiXE="; }; @@ -477,9 +477,9 @@ QField-Sync = { - version = "v4.9.1"; - url = "https://plugins.qgis.org/plugins/qfieldsync/version/v4.9.1/download/"; - hash = "sha256-VrQD9IUA5xz6Q7kByAd9DN2Y2Y532OW9xMs2j+TW824="; + version = "v4.10.1"; + url = "https://plugins.qgis.org/plugins/qfieldsync/version/v4.10.1/download/"; + hash = "sha256-tZajHa14QBW51Rkm2nr9fJPDoaQ40LAC/iEhv9x/hgs="; };