summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--pkgs/applications/gis/saga/default.nix28
-rw-r--r--pkgs/development/libraries/dxflib/default.nix9
2 files changed, 17 insertions, 20 deletions
diff --git a/pkgs/applications/gis/saga/default.nix b/pkgs/applications/gis/saga/default.nix
index 3fd7a488e40..fc940cfce30 100644
--- a/pkgs/applications/gis/saga/default.nix
+++ b/pkgs/applications/gis/saga/default.nix
@@ -3,11 +3,11 @@
 , lib
 , fetchurl
 # native
-, autoreconfHook
+, cmake
 , pkg-config
 # not native
 , gdal
-, wxGTK31
+, wxGTK32
 , proj
 , dxflib
 , curl
@@ -31,24 +31,20 @@
 
 mkDerivation rec {
   pname = "saga";
-  version = "7.9.1";
+  version = "8.4.0";
 
   src = fetchurl {
     url = "mirror://sourceforge/saga-gis/SAGA%20-%20${lib.versions.major version}/SAGA%20-%20${version}/saga-${version}.tar.gz";
-    sha256 = "sha256-Jq1LhBSeJuq9SlNl/ko5I8+jnjZnLMfGYNNUnzVWo7w=";
+    sha256 = "sha256-v6DPwV20fcsznrEaFJk0/ewU4z3cTjzYYuLkyMwSLV0=";
   };
 
+  sourceRoot = "saga-${version}/saga-gis";
+
   nativeBuildInputs = [
-    # Upstream's gnerated ./configure is not reliable
-    autoreconfHook
+    cmake
     pkg-config
   ];
-  configureFlags = [
-    "--with-system-svm"
-    # hdf is no detected otherwise
-    "HDF5_LIBS=-l${hdf5}/lib"
-    "HDF5_CFLAGS=-I${hdf5.dev}/include"
-  ];
+
   buildInputs = [
     curl
     dxflib
@@ -56,7 +52,7 @@ mkDerivation rec {
     libsvm
     hdf5
     gdal
-    wxGTK31
+    wxGTK32
     proj
     libharu
     opencv
@@ -77,9 +73,9 @@ mkDerivation rec {
     sqlite
   ];
 
-  enableParallelBuilding = true;
-
-  CXXFLAGS = lib.optionalString stdenv.cc.isClang "-std=c++11 -Wno-narrowing";
+  cmakeFlags = [
+    "-DOpenMP_SUPPORT=${if stdenv.isDarwin then "OFF" else "ON"}"
+  ];
 
   meta = with lib; {
     description = "System for Automated Geoscientific Analyses";
diff --git a/pkgs/development/libraries/dxflib/default.nix b/pkgs/development/libraries/dxflib/default.nix
index b1af825cccd..a90820c02cb 100644
--- a/pkgs/development/libraries/dxflib/default.nix
+++ b/pkgs/development/libraries/dxflib/default.nix
@@ -1,4 +1,5 @@
-{ lib, stdenv
+{ lib
+, stdenv
 , fetchurl
 , qmake
 }:
@@ -19,7 +20,7 @@ stdenv.mkDerivation rec {
   '';
   installPhase = ''
     install -d -m 0755 $out/lib
-    cp -pr *.so* $out/lib
+    cp -pr *${stdenv.hostPlatform.extensions.sharedLibrary}* $out/lib
     install -d -m 0755 $out/include/dxflib
     cp -pr src/*.h $out/include/dxflib
     # Generate pkg-config file
@@ -39,8 +40,8 @@ stdenv.mkDerivation rec {
 
   meta = {
     homepage = "https://qcad.org/en/90-dxflib";
-    maintainers = with lib.maintainers; [raskin];
-    platforms = lib.platforms.linux;
+    maintainers = with lib.maintainers; [ raskin ];
+    platforms = lib.platforms.unix;
     description = "DXF file format library";
   };
 }