Skip to content

Commit

Permalink
Merge pull request #529 from imincik/weekly-update-2024.39
Browse files Browse the repository at this point in the history
pkgs: weekly update (weekly-update-2024.39)
  • Loading branch information
imincik authored Sep 29, 2024
2 parents a468642 + f7fc337 commit eb59a3a
Show file tree
Hide file tree
Showing 20 changed files with 127 additions and 92 deletions.
12 changes: 6 additions & 6 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 7 additions & 7 deletions pkgs/gdal/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
, fetchFromGitHub

, useMinimalFeatures ? false
, useTiledb ? (!useMinimalFeatures) && !(stdenv.isDarwin && stdenv.isx86_64)
, useTiledb ? (!useMinimalFeatures) && !(stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64)
, useLibHEIF ? (!useMinimalFeatures)
, useLibJXL ? (!useMinimalFeatures)
, useMysql ? (!useMinimalFeatures)
Expand Down Expand Up @@ -107,9 +107,9 @@ stdenv.mkDerivation (finalAttrs: {
"-DMYSQL_LIBRARY=${lib.getLib libmysqlclient}/lib/${lib.optionalString (libmysqlclient.pname != "mysql") "mysql/"}libmysqlclient${stdenv.hostPlatform.extensions.sharedLibrary}"
] ++ lib.optionals finalAttrs.doInstallCheck [
"-DBUILD_TESTING=ON"
] ++ lib.optionals (!stdenv.isDarwin) [
] ++ lib.optionals (!stdenv.hostPlatform.isDarwin) [
"-DCMAKE_SKIP_BUILD_RPATH=ON" # without, libgdal.so can't find libmariadb.so
] ++ lib.optionals stdenv.isDarwin [
] ++ lib.optionals stdenv.hostPlatform.isDarwin [
"-DCMAKE_BUILD_WITH_INSTALL_NAME_DIR=ON"
] ++ lib.optionals (!useTiledb) [
"-DGDAL_USE_TILEDB=OFF"
Expand Down Expand Up @@ -145,8 +145,8 @@ stdenv.mkDerivation (finalAttrs: {
netCdfDeps = lib.optionals useNetCDF [ netcdf ];
armadilloDeps = lib.optionals useArmadillo [ armadillo ];

darwinDeps = lib.optionals stdenv.isDarwin [ libiconv ];
nonDarwinDeps = lib.optionals (!stdenv.isDarwin) ([
darwinDeps = lib.optionals stdenv.hostPlatform.isDarwin [ libiconv ];
nonDarwinDeps = lib.optionals (!stdenv.hostPlatform.isDarwin) ([
# tests for formats enabled by these packages fail on macos
openexr
xercesc
Expand Down Expand Up @@ -256,10 +256,10 @@ stdenv.mkDerivation (finalAttrs: {
# failing with PROJ 9.3.1
# https://github.com/OSGeo/gdal/issues/8908
"test_osr_esri_28"
] ++ lib.optionals (!stdenv.isx86_64) [
] ++ lib.optionals (!stdenv.hostPlatform.isx86_64) [
# likely precision-related expecting x87 behaviour
"test_jp2openjpeg_22"
] ++ lib.optionals stdenv.isDarwin [
] ++ lib.optionals stdenv.hostPlatform.isDarwin [
# flaky on macos
"test_rda_download_queue"
] ++ lib.optionals (lib.versionOlder proj.version "8") [
Expand Down
4 changes: 2 additions & 2 deletions pkgs/gdal/master-rev.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
rev = "33dd00c";
hash = "sha256-HqSy7UzeYxYHjouIQ+NdwOoZk6AcAjztZ2ejuteSUaA=";
rev = "8055974";
hash = "sha256-uEU7QpCsArZVYNByIs/Stp34p9j36DJA4I2mSF+/jME=";
}
6 changes: 6 additions & 0 deletions pkgs/gdal/master.nix
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,11 @@ in
};

patches = [ ];

disabledTests = prev.disabledTests ++ [
# failing with master
# https://github.com/OSGeo/gdal/pull/10806#issuecomment-2362054085
"test_ogr_gmlas_billion_laugh"
];
});
}
35 changes: 33 additions & 2 deletions pkgs/geopandas/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,17 @@
pyproj,
rtree,
shapely,

# optional-dependencies
folium,
geoalchemy2,
geopy,
mapclassify,
matplotlib,
psycopg,
pyarrow,
sqlalchemy,
xyzservices,
}:

buildPythonPackage rec {
Expand All @@ -39,12 +50,32 @@ buildPythonPackage rec {
shapely
];

optional-dependencies = {
all = [
# prevent infinite recursion
(folium.overridePythonAttrs (prevAttrs: {
doCheck = false;
}))
geoalchemy2
geopy
# prevent infinite recursion
(mapclassify.overridePythonAttrs (prevAttrs: {
doCheck = false;
}))
matplotlib
psycopg
pyarrow
sqlalchemy
xyzservices
];
};

nativeCheckInputs = [
pytestCheckHook
rtree
];
] ++ optional-dependencies.all;

doCheck = !stdenv.isDarwin;
doCheck = !stdenv.hostPlatform.isDarwin;

preCheck = ''
export HOME=$(mktemp -d);
Expand Down
2 changes: 1 addition & 1 deletion pkgs/geos/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ stdenv.mkDerivation (finalAttrs: {
nativeBuildInputs = [ cmake ];

# https://github.com/libgeos/geos/issues/930
cmakeFlags = lib.optionals (stdenv.isDarwin && stdenv.isx86_64) [
cmakeFlags = lib.optionals (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64) [
"-DCMAKE_CTEST_ARGUMENTS=--exclude-regex;unit-geom-Envelope"
];

Expand Down
21 changes: 0 additions & 21 deletions pkgs/grass/clang-integer-conversion.patch

This file was deleted.

25 changes: 12 additions & 13 deletions pkgs/grass/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
, makeWrapper
, wrapGAppsHook3

, withOpenGL ? true
, withOpenGL ? !stdenv.hostPlatform.isDarwin

, bison
, blas
Expand All @@ -23,6 +23,7 @@
, libsvm
, libtiff
, libxml2
, llvmPackages
, netcdf
, pdal
, pkg-config
Expand Down Expand Up @@ -51,6 +52,12 @@ stdenv.mkDerivation (finalAttrs: {
hash = "sha256-NKMshd6pr2O62ZjmQ/oPttmeVBYVD0Nqhh3SwQrhZf8=";
};

patches = [
# Backport of https://github.com/OSGeo/grass/pull/3899
# by @landam . Remove for GRASS 8.5.
./grass_config_dir.patch
];

nativeBuildInputs = [
makeWrapper
wrapGAppsHook3
Expand Down Expand Up @@ -86,19 +93,11 @@ stdenv.mkDerivation (finalAttrs: {
zlib
zstd
] ++ lib.optionals withOpenGL [ libGLU ]
++ lib.optionals stdenv.isDarwin [ libiconv ];
++ lib.optionals stdenv.hostPlatform.isDarwin [ libiconv ]
++ lib.optionals stdenv.cc.isClang [ llvmPackages.openmp ];

strictDeps = true;

patches = [
# Backport of https://github.com/OSGeo/grass/pull/3899
# by @landam . Remove for GRASS 8.5.
./grass_config_dir.patch
] ++ lib.optionals stdenv.isDarwin [
# Fix conversion of const char* to unsigned int.
./clang-integer-conversion.patch
];

configureFlags = [
"--with-blas"
"--with-cairo-ldflags=-lfontconfig"
Expand All @@ -124,14 +123,14 @@ stdenv.mkDerivation (finalAttrs: {
"--without-odbc"
] ++ lib.optionals (! withOpenGL) [
"--without-opengl"
] ++ lib.optionals stdenv.isDarwin [
] ++ lib.optionals stdenv.hostPlatform.isDarwin [
"--without-cairo"
"--without-freetype"
"--without-x"
];

# Otherwise a very confusing "Can't load GDAL library" error
makeFlags = lib.optional stdenv.isDarwin "GDAL_DYNAMIC=";
makeFlags = lib.optional stdenv.hostPlatform.isDarwin "GDAL_DYNAMIC=";

/* Ensures that the python script run at build time are actually executable;
* otherwise, patchShebangs ignores them. */
Expand Down
24 changes: 12 additions & 12 deletions pkgs/grass/nixpkgs/grass-config-dir.patch
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
diff --git b/pkgs/grass/default.nix a/pkgs/grass/default.nix
index d27e21a..35b322b 100644
--- b/pkgs/grass/default.nix
+++ a/pkgs/grass/default.nix
@@ -90,7 +90,11 @@ stdenv.mkDerivation (finalAttrs: {
diff --git a/pkgs/grass/default.nix b/pkgs/grass/default.nix
index 69d6e98..31624cc 100644
--- a/pkgs/grass/default.nix
+++ b/pkgs/grass/default.nix
@@ -52,6 +52,12 @@ stdenv.mkDerivation (finalAttrs: {
hash = "sha256-NKMshd6pr2O62ZjmQ/oPttmeVBYVD0Nqhh3SwQrhZf8=";
};

strictDeps = true;

- patches = lib.optionals stdenv.isDarwin [
+ patches = [
+ # Backport of https://github.com/OSGeo/grass/pull/3899
+ # by @landam . Remove for GRASS 8.5.
+ ./grass_config_dir.patch
+ ] ++ lib.optionals stdenv.isDarwin [
# Fix conversion of const char* to unsigned int.
./clang-integer-conversion.patch
];
+ ];
+
nativeBuildInputs = [
makeWrapper
wrapGAppsHook3
10 changes: 8 additions & 2 deletions pkgs/grass/plugins-list.nix
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@

g-download-location = {
name = "g.download.location";
description = ''Download GRASS Location from the web Get GRASS Location from an URL or file path'';
description = ''Download GRASS project (location) from the web Get GRASS project from an URL or file path'';
};


Expand Down Expand Up @@ -468,6 +468,12 @@
};


r-buildvrt-gdal = {
name = "r.buildvrt.gdal";
description = ''Build GDAL Virtual Rasters (VRT) over GRASS GIS raster maps'';
};


r-catchment = {
name = "r.catchment";
description = ''Creates a raster buffer of specified area around vector points using cost distances using r.walk.'';
Expand Down Expand Up @@ -1814,7 +1820,7 @@

v-kriging = {
name = "v.kriging";
description = ''Interpolates 2D or 3D raster based on input values located on 2D or 3D point vector layer (method ordinary kriging extended to 3D).'';
description = ''None'';
};


Expand Down
4 changes: 2 additions & 2 deletions pkgs/grass/plugins-rev.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
rev = "dbc2be3";
hash = "sha256-0xM/MzuM+vj8I5hTiFgP0V5ppxYkLpPbZ2qZpcyDxQ8=";
rev = "02330fe";
hash = "sha256-8xMQ+CHSHuKNVArvNapNxSUH1CWApkKWi07WdiYxFJY=";
}
4 changes: 2 additions & 2 deletions pkgs/libspatialindex/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ stdenv.mkDerivation (finalAttrs: {
patchShebangs test/
'';

nativeBuildInputs = [ cmake ] ++ lib.optional stdenv.isDarwin fixDarwinDylibNames;
nativeBuildInputs = [ cmake ] ++ lib.optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames;

cmakeFlags = [
(lib.cmakeBool "BUILD_TESTING" finalAttrs.finalPackage.doCheck)
Expand All @@ -37,7 +37,7 @@ stdenv.mkDerivation (finalAttrs: {

doCheck = true;

postFixup = lib.optionalString stdenv.isDarwin ''
postFixup = lib.optionalString stdenv.hostPlatform.isDarwin ''
install_name_tool -change "@rpath/libspatialindex.7.dylib" "$out/lib/libspatialindex.7.dylib" $out/lib/libspatialindex_c.dylib
'';

Expand Down
4 changes: 2 additions & 2 deletions pkgs/libspatialite/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,13 @@ stdenv.mkDerivation rec {
proj
sqlite
zlib
] ++ lib.optionals stdenv.isDarwin [
] ++ lib.optionals stdenv.hostPlatform.isDarwin [
libiconv
];

enableParallelBuilding = true;

postInstall = lib.optionalString stdenv.isDarwin ''
postInstall = lib.optionalString stdenv.hostPlatform.isDarwin ''
ln -s $out/lib/mod_spatialite.{so,dylib}
'';

Expand Down
8 changes: 4 additions & 4 deletions pkgs/postgis/postgis.nix
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ let
in
stdenv.mkDerivation rec {
pname = "postgis";
version = "3.4.2";
version = "3.4.3";

outputs = [
"out"
Expand All @@ -37,7 +37,7 @@ stdenv.mkDerivation rec {

src = fetchurl {
url = "https://download.osgeo.org/postgis/source/postgis-${version}.tar.gz";
hash = "sha256-yMh0wAukqYSocDCva/lUSCFQIGCtRz1clvHU0INcWJI=";
hash = "sha256-+N7VBdrrj1dlnaK55Xf/ceGDqqCUcI0u7OLFbZM2H2I=";
};

buildInputs = [
Expand All @@ -49,7 +49,7 @@ stdenv.mkDerivation rec {
json_c
protobufc
pcre2.dev
] ++ lib.optional stdenv.isDarwin libiconv;
] ++ lib.optional stdenv.hostPlatform.isDarwin libiconv;
nativeBuildInputs = [
perl
pkg-config
Expand Down Expand Up @@ -89,7 +89,7 @@ stdenv.mkDerivation rec {
ln -s ${postgresql}/bin/postgres $out/bin/postgres
'';

doCheck = stdenv.isLinux;
doCheck = stdenv.hostPlatform.isLinux;

preCheck = ''
substituteInPlace regress/run_test.pl --replace-fail "/share/contrib/postgis" "$out/share/postgresql/contrib/postgis"
Expand Down
2 changes: 1 addition & 1 deletion pkgs/proj/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ stdenv.mkDerivation (finalAttrs: {

preCheck =
let
libPathEnvVar = if stdenv.isDarwin then "DYLD_LIBRARY_PATH" else "LD_LIBRARY_PATH";
libPathEnvVar = if stdenv.hostPlatform.isDarwin then "DYLD_LIBRARY_PATH" else "LD_LIBRARY_PATH";
in
''
export HOME=$TMPDIR
Expand Down
Loading

0 comments on commit eb59a3a

Please sign in to comment.