Skip to content

Commit

Permalink
Merge pull request #509 from imincik/weekly-update-2024.31
Browse files Browse the repository at this point in the history
pkgs: weekly update (weekly-update-2024.31)
  • Loading branch information
imincik committed Aug 2, 2024
2 parents 8a88450 + 0e4666d commit 995a814
Show file tree
Hide file tree
Showing 25 changed files with 278 additions and 219 deletions.
6 changes: 3 additions & 3 deletions flake.lock

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

19 changes: 6 additions & 13 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@
gdal = py.pkgs.toPythonModule (_gdal);

geopandas = py.pkgs.callPackage ./pkgs/geopandas {
inherit fiona pyproj shapely;
inherit pyogrio pyproj shapely;
};

owslib = py.pkgs.callPackage ./pkgs/owslib {
Expand All @@ -138,6 +138,10 @@
inherit shapely;
};

pyogrio = py.pkgs.callPackage ./pkgs/pyogrio {
inherit gdal;
};

pyproj = py.pkgs.callPackage ./pkgs/pyproj {
inherit proj shapely;
};
Expand All @@ -164,6 +168,7 @@
geopandas
owslib
psycopg
pyogrio
pyproj
pyqt5
rasterio
Expand Down Expand Up @@ -249,16 +254,6 @@

qgis-ltr = pkgs.callPackage ./pkgs/qgis/ltr.nix { qgis-ltr-unwrapped = qgis-ltr-unwrapped; };

# QGIS-NEXT
qgis-next-unwrapped = pkgs.libsForQt5.callPackage ./pkgs/qgis/unwrapped-3_38.nix {
inherit geos gdal libspatialindex libspatialite pdal proj;

python3 = qgis-python;
withGrass = false;
};

qgis-next = pkgs.callPackage ./pkgs/qgis/3_38.nix { qgis-unwrapped = qgis-next-unwrapped; };

# QGIS plugins
qgis-plugins =
let
Expand Down Expand Up @@ -323,8 +318,6 @@
qgis-unwrapped
qgis-ltr
qgis-ltr-unwrapped
qgis-next
qgis-next-unwrapped

# Meta packages
all-packages
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 = "dd3396b";
hash = "sha256-V0lUwPnZ5wZqdFGjYaOnfmMcDeEfMPkGLWE6BuGiNH4=";
rev = "c95081c";
hash = "sha256-6zYx0trjq0CRePXvZ7sSYF384/06JQPs7dQIYSrdId4=";
}
13 changes: 13 additions & 0 deletions pkgs/gdal/nixpkgs/libxml2-enable-http.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git b/pkgs/gdal/default.nix a/pkgs/gdal/default.nix
index 812eb86..611b547 100644
--- b/pkgs/gdal/default.nix
+++ a/pkgs/gdal/default.nix
@@ -168,7 +168,7 @@ stdenv.mkDerivation (finalAttrs: {
json_c
lerc
xz
- (libxml2.override { enableHttp = true; })
+ libxml2
lz4
openjpeg
openssl
23 changes: 4 additions & 19 deletions pkgs/geopandas/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,21 @@
stdenv,
buildPythonPackage,
fetchFromGitHub,
fetchpatch,
pytestCheckHook,
pythonOlder,
setuptools,

fiona,
packaging,
pandas,
pyogrio,
pyproj,
rtree,
shapely,
}:

buildPythonPackage rec {
pname = "geopandas";
version = "0.14.4";
version = "1.0.1";
pyproject = true;

disabled = pythonOlder "3.9";
Expand All @@ -27,29 +26,15 @@ buildPythonPackage rec {
owner = "geopandas";
repo = "geopandas";
rev = "refs/tags/v${version}";
hash = "sha256-FBhPcae8bnNnsfr14I1p22VhoOf9USF9DAcrAqx+zso=";
hash = "sha256-SZizjwkx8dsnaobDYpeQm9jeXZ4PlzYyjIScnQrH63Q=";
};

patches = [
# GDAL 3.9 compat for boolean array in shp
(fetchpatch {
url = "https://github.com/geopandas/geopandas/commit/f1be60532bed31cb410ce4db2da6b733bc8713c9.patch";
sha256 = "sha256-DZhC7sSOki0XTcojSRvVVSlsnYnxCw/Ee7vHBmDCsbA=";
})

# GDAL 3.9 compat for boolean array in shp for fiona
(fetchpatch {
url = "https://github.com/geopandas/geopandas/commit/1e08422d8aee4877752047a8a08f41e3a67188f2.patch";
sha256 = "sha256-SpNqe7jL1rA79YhhSUfEzt30plt56Tux5v1h7IHp31I=";
})
];

build-system = [ setuptools ];

propagatedBuildInputs = [
fiona
packaging
pandas
pyogrio
pyproj
shapely
];
Expand Down
48 changes: 30 additions & 18 deletions pkgs/grass/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,22 @@
, makeWrapper
, wrapGAppsHook3

, withOpenGL ? true

, bison
, blas
, cairo
, ffmpeg
, fftw
, flex
, freetype
, gdal
, geos
, lapack
, libGLU
, libiconv
, libmysqlclient
, libpng
, libsvm
, libtiff
, libxml2
, netcdf
Expand All @@ -33,16 +38,17 @@

let
pyPackages = python311Packages;

in
stdenv.mkDerivation (finalAttrs: {
pname = "grass";
version = "8.3.2";
version = "8.4.0";

src = fetchFromGitHub {
owner = "OSGeo";
repo = "grass";
rev = finalAttrs.version;
hash = "sha256-loeg+7h676d2WdYOMcJFyzeEZcxjBynir6Hz0J/GBns=";
hash = "sha256-NKMshd6pr2O62ZjmQ/oPttmeVBYVD0Nqhh3SwQrhZf8=";
};

nativeBuildInputs = [
Expand All @@ -53,7 +59,6 @@ stdenv.mkDerivation (finalAttrs: {
flex
gdal # for `gdal-config`
geos # for `geos-config`
libmysqlclient # for `mysql_config`
netcdf # for `nc-config`
pkg-config
] ++ (with pyPackages; [ python-dateutil numpy wxpython ]);
Expand All @@ -63,10 +68,12 @@ stdenv.mkDerivation (finalAttrs: {
cairo
ffmpeg
fftw
freetype
gdal
geos
libmysqlclient
lapack
libpng
libsvm
libtiff
libxml2
netcdf
Expand All @@ -78,7 +85,8 @@ stdenv.mkDerivation (finalAttrs: {
wxGTK32
zlib
zstd
] ++ lib.optionals stdenv.isDarwin [ libiconv ];
] ++ lib.optionals withOpenGL [ libGLU ]
++ lib.optionals stdenv.isDarwin [ libiconv ];

strictDeps = true;

Expand All @@ -87,26 +95,30 @@ stdenv.mkDerivation (finalAttrs: {
./clang-integer-conversion.patch
];

# Correct mysql_config query
postPatch = ''
substituteInPlace configure --replace "--libmysqld-libs" "--libs"
'';

configureFlags = [
"--with-blas"
"--with-cairo-ldflags=-lfontconfig"
"--with-cxx"
"--with-fftw"
"--with-freetype"
"--with-geos"
# It complains about missing libmysqld but doesn't really seem to need it
"--with-mysql"
"--with-mysql-includes=${lib.getDev libmysqlclient}/include/mysql"
"--with-mysql-libs=${libmysqlclient}/lib/mysql"
"--with-netcdf"
"--with-gdal"
"--with-lapack"
"--with-libsvm"
"--with-nls"
"--with-openmp"
"--with-pdal"
"--with-postgres"
"--with-postgres-libs=${postgresql.lib}/lib/"
"--with-proj-includes=${proj.dev}/include"
"--with-proj-libs=${proj}/lib"
"--with-proj-share=${proj}/share/proj"
"--with-pthread"
"--with-readline"
"--with-sqlite"
"--with-zstd"
"--without-bzlib"
"--without-mysql"
"--without-odbc"
] ++ lib.optionals (! withOpenGL) [
"--without-opengl"
] ++ lib.optionals stdenv.isDarwin [
"--without-cairo"
Expand Down
13 changes: 13 additions & 0 deletions pkgs/grass/nixpkgs/libxml2-enable-http.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git b/pkgs/grass/default.nix a/pkgs/grass/default.nix
index fd26e49..d27e21a 100644
--- b/pkgs/grass/default.nix
+++ a/pkgs/grass/default.nix
@@ -75,7 +75,7 @@ stdenv.mkDerivation (finalAttrs: {
libpng
libsvm
libtiff
- (libxml2.override { enableHttp = true; })
+ libxml2
netcdf
pdal
postgresql
2 changes: 2 additions & 0 deletions pkgs/libspatialite/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
, proj
, sqlite
, libiconv
, zlib
}:

stdenv.mkDerivation rec {
Expand Down Expand Up @@ -38,6 +39,7 @@ stdenv.mkDerivation rec {
minizip
proj
sqlite
zlib
] ++ lib.optionals stdenv.isDarwin [
libiconv
];
Expand Down
13 changes: 13 additions & 0 deletions pkgs/libspatialite/nixpkgs/libxml2-enable-http.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git b/pkgs/libspatialite/default.nix a/pkgs/libspatialite/default.nix
index 98d184a..afa9c65 100644
--- b/pkgs/libspatialite/default.nix
+++ a/pkgs/libspatialite/default.nix
@@ -35,7 +35,7 @@ stdenv.mkDerivation rec {
freexl
geos
librttopo
- (libxml2.override { enableHttp = true; })
+ libxml2
minizip
proj
sqlite
8 changes: 7 additions & 1 deletion pkgs/pdal/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ stdenv.mkDerivation (finalAttrs: {
sha256 = "sha256-ukBZLr/iyYQ68sv9JWrR4YP0ahHfGhytgcWKPzrF3Ps=";
};

patches = [
./pdal.pc.in.patch
];

nativeBuildInputs = [
cmake
pkg-config
Expand Down Expand Up @@ -124,7 +128,9 @@ stdenv.mkDerivation (finalAttrs: {
version = "pdal ${finalAttrs.finalPackage.version}";
};
pdal = callPackage ./tests.nix { pdal = finalAttrs.finalPackage; };
pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
pkg-config = testers.hasPkgConfigModules {
package = finalAttrs.finalPackage;
};
};

meta = with lib; {
Expand Down
13 changes: 13 additions & 0 deletions pkgs/pdal/nixpkgs/libxml2-enable-http.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git b/pkgs/pdal/default.nix a/pkgs/pdal/default.nix
index 61531be..f1e7009 100644
--- b/pkgs/pdal/default.nix
+++ a/pkgs/pdal/default.nix
@@ -53,7 +53,7 @@ stdenv.mkDerivation (finalAttrs: {
LASzip
libgeotiff
libtiff
- (libxml2.override { enableHttp = true; })
+ libxml2
openscenegraph
postgresql
proj
12 changes: 12 additions & 0 deletions pkgs/pdal/pdal.pc.in.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
diff --git a/apps/pdal.pc.in b/apps/pdal.pc.in
index 6885221cacc8..a07ee82cea68 100644
--- a/apps/pdal.pc.in
+++ b/apps/pdal.pc.in
@@ -1,6 +1,6 @@
prefix=@CMAKE_INSTALL_PREFIX@
exec_prefix=@CMAKE_INSTALL_PREFIX@/bin
-libdir=@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_LIBDIR@
+libdir=@CMAKE_INSTALL_FULL_LIBDIR@
includedir=@CMAKE_INSTALL_PREFIX@/include

Name: PDAL
Loading

0 comments on commit 995a814

Please sign in to comment.