2020-08-03 19:23:25 +00:00
|
|
|
{ stdenv
|
|
|
|
, fetchurl
|
|
|
|
# native
|
|
|
|
, autoreconfHook
|
|
|
|
, pkg-config
|
|
|
|
# not native
|
|
|
|
, gdal
|
|
|
|
, wxGTK31-gtk3
|
|
|
|
, proj_5
|
|
|
|
, dxflib
|
|
|
|
, curl
|
|
|
|
, libiodbc
|
|
|
|
, lzma
|
|
|
|
, libharu
|
|
|
|
, opencv
|
|
|
|
, vigra
|
|
|
|
, postgresql
|
|
|
|
, Cocoa
|
|
|
|
, unixODBC
|
|
|
|
, poppler
|
|
|
|
, hdf4
|
|
|
|
, hdf5
|
|
|
|
, netcdf
|
|
|
|
, sqlite
|
|
|
|
, qhull
|
|
|
|
, giflib
|
|
|
|
, libsvm
|
|
|
|
, fftw
|
|
|
|
}:
|
2014-09-17 05:48:34 +00:00
|
|
|
|
2020-08-03 19:23:25 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2019-07-13 12:01:57 +00:00
|
|
|
pname = "saga";
|
2020-08-03 19:23:25 +00:00
|
|
|
version = "7.7.0";
|
2014-09-17 05:48:34 +00:00
|
|
|
|
2020-08-03 19:23:25 +00:00
|
|
|
src = fetchurl {
|
|
|
|
url = "https://sourceforge.net/projects/saga-gis/files/SAGA%20-%20${stdenv.lib.versions.major version}/SAGA%20-%20${version}/saga-${version}.tar.gz";
|
|
|
|
sha256 = "1nmvrlcpcm2pas9pnav13iydnym9d8yqqnwq47lm0j6b0a2wy9zk";
|
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
# Upstream's gnerated ./configure is not reliable
|
|
|
|
autoreconfHook
|
|
|
|
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
|
|
|
|
fftw
|
|
|
|
libsvm
|
|
|
|
hdf5
|
|
|
|
gdal
|
|
|
|
wxGTK31-gtk3
|
|
|
|
proj_5
|
|
|
|
libharu
|
|
|
|
opencv
|
|
|
|
vigra
|
|
|
|
postgresql
|
|
|
|
libiodbc
|
|
|
|
lzma
|
|
|
|
qhull
|
|
|
|
giflib
|
|
|
|
]
|
2018-04-17 19:36:47 +00:00
|
|
|
# See https://groups.google.com/forum/#!topic/nix-devel/h_vSzEJAPXs
|
|
|
|
# for why the have additional buildInputs on darwin
|
2020-08-03 19:23:25 +00:00
|
|
|
++ stdenv.lib.optionals stdenv.isDarwin [
|
|
|
|
Cocoa
|
|
|
|
unixODBC
|
|
|
|
poppler
|
|
|
|
netcdf
|
|
|
|
sqlite
|
|
|
|
];
|
|
|
|
|
|
|
|
patches = [
|
|
|
|
# See https://sourceforge.net/p/saga-gis/bugs/280/
|
|
|
|
./opencv4.patch
|
|
|
|
];
|
2014-09-17 05:48:34 +00:00
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2018-08-15 08:10:28 +00:00
|
|
|
CXXFLAGS = stdenv.lib.optionalString stdenv.cc.isClang "-std=c++11 -Wno-narrowing";
|
|
|
|
|
2018-04-17 19:36:47 +00:00
|
|
|
meta = with stdenv.lib; {
|
2014-11-03 10:24:47 +00:00
|
|
|
description = "System for Automated Geoscientific Analyses";
|
2020-03-16 09:54:28 +00:00
|
|
|
homepage = "http://www.saga-gis.org";
|
2018-04-17 19:36:47 +00:00
|
|
|
license = licenses.gpl2Plus;
|
2018-10-15 10:28:24 +00:00
|
|
|
maintainers = with maintainers; [ michelk mpickering ];
|
2018-04-17 19:36:47 +00:00
|
|
|
platforms = with platforms; unix;
|
2014-09-17 05:48:34 +00:00
|
|
|
};
|
|
|
|
}
|