2020-08-20 17:08:02 +00:00
|
|
|
{ stdenv
|
2020-11-21 19:51:51 +00:00
|
|
|
, mkDerivation
|
|
|
|
, lib
|
2020-08-20 17:08:02 +00:00
|
|
|
, fetchurl
|
|
|
|
# native
|
2022-11-04 12:27:35 +00:00
|
|
|
, cmake
|
2020-08-20 17:08:02 +00:00
|
|
|
, pkg-config
|
|
|
|
# not native
|
|
|
|
, gdal
|
2022-11-04 12:27:35 +00:00
|
|
|
, wxGTK32
|
2020-09-25 04:45:31 +00:00
|
|
|
, proj
|
2020-08-20 17:08:02 +00:00
|
|
|
, dxflib
|
|
|
|
, curl
|
|
|
|
, libiodbc
|
2021-04-05 15:23:46 +00:00
|
|
|
, xz
|
2020-08-20 17:08:02 +00:00
|
|
|
, libharu
|
|
|
|
, opencv
|
|
|
|
, vigra
|
|
|
|
, postgresql
|
|
|
|
, Cocoa
|
|
|
|
, unixODBC
|
|
|
|
, poppler
|
|
|
|
, hdf5
|
|
|
|
, netcdf
|
|
|
|
, sqlite
|
|
|
|
, qhull
|
|
|
|
, giflib
|
|
|
|
, libsvm
|
|
|
|
, fftw
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-11-21 19:51:51 +00:00
|
|
|
mkDerivation rec {
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "saga";
|
2023-02-16 17:41:37 +00:00
|
|
|
version = "8.5.1";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-08-20 17:08:02 +00:00
|
|
|
src = fetchurl {
|
2020-12-25 13:55:36 +00:00
|
|
|
url = "mirror://sourceforge/saga-gis/SAGA%20-%20${lib.versions.major version}/SAGA%20-%20${version}/saga-${version}.tar.gz";
|
2023-02-16 17:41:37 +00:00
|
|
|
sha256 = "sha256-JnZ0m0GAgfz3BbiKxqLoMoa4pX//r5t+mbhMCdAo9OE=";
|
2020-08-20 17:08:02 +00:00
|
|
|
};
|
|
|
|
|
2022-11-04 12:27:35 +00:00
|
|
|
sourceRoot = "saga-${version}/saga-gis";
|
|
|
|
|
2020-08-20 17:08:02 +00:00
|
|
|
nativeBuildInputs = [
|
2022-11-04 12:27:35 +00:00
|
|
|
cmake
|
2020-08-20 17:08:02 +00:00
|
|
|
pkg-config
|
|
|
|
];
|
2022-11-04 12:27:35 +00:00
|
|
|
|
2020-08-20 17:08:02 +00:00
|
|
|
buildInputs = [
|
|
|
|
curl
|
|
|
|
dxflib
|
|
|
|
fftw
|
|
|
|
libsvm
|
|
|
|
hdf5
|
|
|
|
gdal
|
2022-11-04 12:27:35 +00:00
|
|
|
wxGTK32
|
2020-09-25 04:45:31 +00:00
|
|
|
proj
|
2020-08-20 17:08:02 +00:00
|
|
|
libharu
|
|
|
|
opencv
|
|
|
|
vigra
|
|
|
|
postgresql
|
|
|
|
libiodbc
|
2021-04-05 15:23:46 +00:00
|
|
|
xz
|
2020-08-20 17:08:02 +00:00
|
|
|
qhull
|
|
|
|
giflib
|
|
|
|
]
|
2020-04-24 23:36:52 +00:00
|
|
|
# See https://groups.google.com/forum/#!topic/nix-devel/h_vSzEJAPXs
|
|
|
|
# for why the have additional buildInputs on darwin
|
2020-11-21 19:51:51 +00:00
|
|
|
++ lib.optionals stdenv.isDarwin [
|
2020-08-20 17:08:02 +00:00
|
|
|
Cocoa
|
|
|
|
unixODBC
|
|
|
|
poppler
|
|
|
|
netcdf
|
|
|
|
sqlite
|
|
|
|
];
|
|
|
|
|
2022-11-04 12:27:35 +00:00
|
|
|
cmakeFlags = [
|
|
|
|
"-DOpenMP_SUPPORT=${if stdenv.isDarwin then "OFF" else "ON"}"
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-11-21 19:51:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "System for Automated Geoscientific Analyses";
|
|
|
|
homepage = "http://www.saga-gis.org";
|
|
|
|
license = licenses.gpl2Plus;
|
|
|
|
maintainers = with maintainers; [ michelk mpickering ];
|
|
|
|
platforms = with platforms; unix;
|
|
|
|
};
|
|
|
|
}
|