diff options
author | Alyssa Ross <hi@alyssa.is> | 2021-01-10 07:13:44 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2021-01-12 14:07:16 +0000 |
commit | e2698550456abba83c6dcd5d5e5a9990a0b96f8a (patch) | |
tree | 79a56f0df3fa55e470d84b4dff6059fbf487ec18 /nixpkgs/pkgs/applications/gis | |
parent | 1cdc42df888dc98c347e03bd942ed9825a55bcb3 (diff) | |
parent | 84d74ae9c9cbed73274b8e4e00be14688ffc93fe (diff) | |
download | nixlib-e2698550456abba83c6dcd5d5e5a9990a0b96f8a.tar nixlib-e2698550456abba83c6dcd5d5e5a9990a0b96f8a.tar.gz nixlib-e2698550456abba83c6dcd5d5e5a9990a0b96f8a.tar.bz2 nixlib-e2698550456abba83c6dcd5d5e5a9990a0b96f8a.tar.lz nixlib-e2698550456abba83c6dcd5d5e5a9990a0b96f8a.tar.xz nixlib-e2698550456abba83c6dcd5d5e5a9990a0b96f8a.tar.zst nixlib-e2698550456abba83c6dcd5d5e5a9990a0b96f8a.zip |
Merge commit '84d74ae9c9cbed73274b8e4e00be14688ffc93fe'
Diffstat (limited to 'nixpkgs/pkgs/applications/gis')
-rw-r--r-- | nixpkgs/pkgs/applications/gis/gmt/dcw.nix | 32 | ||||
-rw-r--r-- | nixpkgs/pkgs/applications/gis/gmt/default.nix | 73 | ||||
-rw-r--r-- | nixpkgs/pkgs/applications/gis/gmt/gshhg.nix | 31 | ||||
-rw-r--r-- | nixpkgs/pkgs/applications/gis/openorienteering-mapper/default.nix | 2 | ||||
-rw-r--r-- | nixpkgs/pkgs/applications/gis/qgis/unwrapped.nix | 4 | ||||
-rw-r--r-- | nixpkgs/pkgs/applications/gis/saga/default.nix | 91 | ||||
-rw-r--r-- | nixpkgs/pkgs/applications/gis/saga/opencv4.patch | 14 | ||||
-rw-r--r-- | nixpkgs/pkgs/applications/gis/whitebox-tools/default.nix | 12 |
8 files changed, 233 insertions, 26 deletions
diff --git a/nixpkgs/pkgs/applications/gis/gmt/dcw.nix b/nixpkgs/pkgs/applications/gis/gmt/dcw.nix new file mode 100644 index 000000000000..58390e892903 --- /dev/null +++ b/nixpkgs/pkgs/applications/gis/gmt/dcw.nix @@ -0,0 +1,32 @@ +{ stdenv, fetchurl }: + +stdenv.mkDerivation rec { + pname = "dcw-gmt"; + version = "1.1.4"; + src = fetchurl { + url = "ftp://ftp.soest.hawaii.edu/gmt/dcw-gmt-${version}.tar.gz"; + sha256 = "8d47402abcd7f54a0f711365cd022e4eaea7da324edac83611ca035ea443aad3"; + }; + + installPhase = '' + mkdir -p $out/share/dcw-gmt + cp -rv ./* $out/share/dcw-gmt + ''; + + meta = with stdenv.lib; { + homepage = "https://www.soest.hawaii.edu/pwessel/dcw/"; + description = "Vector basemap of the world, for use with GMT"; + longDescription = '' + DCW-GMT is an enhancement to the original 1:1,000,000 scale vector basemap + of the world, available from the Princeton University Digital Map and + Geospatial Information Center. It contains more state boundaries (the + largest 8 countries are now represented) than the original data + source. Information about DCW can be found on Wikipedia + (https://en.wikipedia.org/wiki/Digital_Chart_of_the_World). This data is + for use by GMT, the Generic Mapping Tools. + ''; + license = licenses.lgpl3Plus; + maintainers = with maintainers; [ tviti ]; + }; + +} diff --git a/nixpkgs/pkgs/applications/gis/gmt/default.nix b/nixpkgs/pkgs/applications/gis/gmt/default.nix new file mode 100644 index 000000000000..f045ec067fee --- /dev/null +++ b/nixpkgs/pkgs/applications/gis/gmt/default.nix @@ -0,0 +1,73 @@ +{ stdenv, fetchurl, cmake, curl, Accelerate, CoreGraphics, CoreVideo +, fftwSinglePrec, netcdf, pcre, gdal, blas, lapack, glibc, ghostscript, dcw-gmt +, gshhg-gmt }: + +/* The onus is on the user to also install: + - ffmpeg for webm or mp4 output + - graphicsmagick for gif output +*/ + +stdenv.mkDerivation rec { + pname = "gmt"; + version = "6.1.1"; + src = fetchurl { + url = "https://github.com/GenericMappingTools/gmt/releases/download/${version}/gmt-${version}-src.tar.gz"; + sha256 = "04mdxxcild56jhg9ax522xh78v1wl1x8iqv2f6wv32x9b2lgy1lp"; + }; + + nativeBuildInputs = [ cmake ]; + + buildInputs = [ curl gdal netcdf pcre dcw-gmt gshhg-gmt ] + ++ (if stdenv.isDarwin then [ + Accelerate + CoreGraphics + CoreVideo + ] else [ + glibc + fftwSinglePrec + blas + lapack + ]); + + propagatedBuildInputs = [ ghostscript ]; + + cmakeFlags = [ + "-DGMT_DOCDIR=share/doc/gmt" + "-DGMT_MANDIR=share/man" + "-DGMT_LIBDIR=lib" + "-DCOPY_GSHHG:BOOL=FALSE" + "-DGSHHG_ROOT=${gshhg-gmt.out}/share/gshhg-gmt" + "-DCOPY_DCW:BOOL=FALSE" + "-DDCW_ROOT=${dcw-gmt.out}/share/dcw-gmt" + "-DGDAL_ROOT=${gdal.out}" + "-DNETCDF_ROOT=${netcdf.out}" + "-DPCRE_ROOT=${pcre.out}" + "-DGMT_INSTALL_TRADITIONAL_FOLDERNAMES:BOOL=FALSE" + "-DGMT_ENABLE_OPENMP:BOOL=TRUE" + "-DGMT_INSTALL_MODULE_LINKS:BOOL=FALSE" + "-DLICENSE_RESTRICTED=LGPL" # "GPL" and "no" also valid + ] ++ (with stdenv; + lib.optional (!isDarwin) [ + "-DFFTW3_ROOT=${fftwSinglePrec.dev}" + "-DLAPACK_LIBRARY=${lapack}/lib/liblapack.so" + "-DBLAS_LIBRARY=${blas}/lib/libblas.so" + ]); + + meta = with stdenv.lib; { + homepage = "https://www.generic-mapping-tools.org"; + description = "Tools for manipulating geographic and cartesian data sets"; + longDescription = '' + GMT is an open-source collection of command-line tools for manipulating + geographic and Cartesian data sets (including filtering, trend fitting, + gridding, projecting, etc.) and producing high-quality illustrations + ranging from simple x–y plots via contour maps to artificially illuminated + surfaces and 3D perspective views. It supports many map projections and + transformations and includes supporting data such as coastlines, rivers, + and political boundaries and optionally country polygons. + ''; + platforms = [ "x86_64-linux" "x86_64-darwin" ]; + license = licenses.lgpl3Plus; + maintainers = with maintainers; [ tviti ]; + }; + +} diff --git a/nixpkgs/pkgs/applications/gis/gmt/gshhg.nix b/nixpkgs/pkgs/applications/gis/gmt/gshhg.nix new file mode 100644 index 000000000000..0f22f87c89b5 --- /dev/null +++ b/nixpkgs/pkgs/applications/gis/gmt/gshhg.nix @@ -0,0 +1,31 @@ +{ stdenv, fetchurl }: + +stdenv.mkDerivation rec { + pname = "gshhg-gmt"; + version = "2.3.7"; + src = fetchurl { + url = "ftp://ftp.soest.hawaii.edu/gmt/gshhg-gmt-${version}.tar.gz"; + sha256 = "9bb1a956fca0718c083bef842e625797535a00ce81f175df08b042c2a92cfe7f"; + }; + + installPhase = '' + mkdir -p $out/share/gshhg-gmt + cp -rv ./* $out/share/gshhg-gmt + ''; + + meta = with stdenv.lib; { + homepage = "https://www.soest.hawaii.edu/pwessel/gshhg/"; + description = "High-resolution shoreline data set, for use with GMT"; + longDescription = '' + GSHHG is a high-resolution shoreline data set amalgamated from two + databases: Global Self-consistent Hierarchical High-resolution Shorelines + (GSHHS) and CIA World Data Bank II (WDBII). GSHHG contains vector + descriptions at five different resolutions of land outlines, lakes, + rivers, and political boundaries. This data is for use by GMT, the Generic + Mapping Tools. + ''; + license = licenses.lgpl3Plus; + maintainers = with maintainers; [ tviti ]; + }; + +} diff --git a/nixpkgs/pkgs/applications/gis/openorienteering-mapper/default.nix b/nixpkgs/pkgs/applications/gis/openorienteering-mapper/default.nix index 39f8694dd177..540fa2718975 100644 --- a/nixpkgs/pkgs/applications/gis/openorienteering-mapper/default.nix +++ b/nixpkgs/pkgs/applications/gis/openorienteering-mapper/default.nix @@ -56,8 +56,6 @@ mkDerivation rec { "-DLICENSING_PROVIDER:BOOL=OFF" "-DMapper_MANUAL_QTHELP:BOOL=OFF" ] ++ stdenv.lib.optionals stdenv.isDarwin [ - # Usually enabled on Darwin - "-DCMAKE_FIND_FRAMEWORK=never" # FindGDAL is broken and always finds /Library/Framework unless this is # specified "-DGDAL_INCLUDE_DIR=${gdal}/include" diff --git a/nixpkgs/pkgs/applications/gis/qgis/unwrapped.nix b/nixpkgs/pkgs/applications/gis/qgis/unwrapped.nix index 2e11f22f517b..130c0af6ee20 100644 --- a/nixpkgs/pkgs/applications/gis/qgis/unwrapped.nix +++ b/nixpkgs/pkgs/applications/gis/qgis/unwrapped.nix @@ -10,7 +10,7 @@ let [ qscintilla-qt5 gdal jinja2 numpy psycopg2 chardet dateutil pyyaml pytz requests urllib3 pygments pyqt5 sip owslib six ]; in mkDerivation rec { - version = "3.10.4"; + version = "3.10.9"; pname = "qgis"; name = "${pname}-unwrapped-${version}"; @@ -18,7 +18,7 @@ in mkDerivation rec { owner = "qgis"; repo = "QGIS"; rev = "final-${lib.replaceStrings ["."] ["_"] version}"; - sha256 = "0d1rsgjgnnq6jgms5bgppz8lkh4518nf90fk0qvxajdfi9j4jn12"; + sha256 = "0d646hvrhhgsw789qc2g3iblmsvr64qh15jck1jkaljzrj3qbml6"; }; passthru = { diff --git a/nixpkgs/pkgs/applications/gis/saga/default.nix b/nixpkgs/pkgs/applications/gis/saga/default.nix index 053272b1efa7..aa418148209e 100644 --- a/nixpkgs/pkgs/applications/gis/saga/default.nix +++ b/nixpkgs/pkgs/applications/gis/saga/default.nix @@ -1,27 +1,90 @@ -{ stdenv, fetchurl, gdal, wxGTK30, proj, libiodbc, lzma, - libharu, opencv2, vigra, postgresql, Cocoa, - unixODBC , poppler, hdf4, hdf5, netcdf, sqlite, qhull, giflib }: +{ stdenv +, fetchurl +# native +, autoreconfHook +, pkg-config +# not native +, gdal +, wxGTK31-gtk3 +, proj +, dxflib +, curl +, libiodbc +, lzma +, libharu +, opencv +, vigra +, postgresql +, Cocoa +, unixODBC +, poppler +, hdf4 +, hdf5 +, netcdf +, sqlite +, qhull +, giflib +, libsvm +, fftw +}: -stdenv.mkDerivation { +stdenv.mkDerivation rec { pname = "saga"; - version = "7.6.3"; + version = "7.7.0"; + 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 + libharu + opencv + vigra + postgresql + libiodbc + lzma + qhull + giflib + ] # See https://groups.google.com/forum/#!topic/nix-devel/h_vSzEJAPXs # for why the have additional buildInputs on darwin - buildInputs = [ gdal wxGTK30 proj libharu opencv2 vigra postgresql libiodbc lzma - qhull giflib ] - ++ stdenv.lib.optionals stdenv.isDarwin - [ Cocoa unixODBC poppler hdf4.out hdf5 netcdf sqlite ]; + ++ stdenv.lib.optionals stdenv.isDarwin [ + Cocoa + unixODBC + poppler + netcdf + sqlite + ]; + + patches = [ + # See https://sourceforge.net/p/saga-gis/bugs/280/ + ./opencv4.patch + ]; enableParallelBuilding = true; CXXFLAGS = stdenv.lib.optionalString stdenv.cc.isClang "-std=c++11 -Wno-narrowing"; - src = fetchurl { - url = "https://sourceforge.net/projects/saga-gis/files/SAGA%20-%207/SAGA%20-%207.6.3/saga-7.6.3.tar.gz"; - sha256 = "0f1qy2y929gd9y7h45bkv9x71xapbzyn06v6wqivjaiydsi1qycb"; - }; - meta = with stdenv.lib; { description = "System for Automated Geoscientific Analyses"; homepage = "http://www.saga-gis.org"; diff --git a/nixpkgs/pkgs/applications/gis/saga/opencv4.patch b/nixpkgs/pkgs/applications/gis/saga/opencv4.patch new file mode 100644 index 000000000000..0b26192bf09b --- /dev/null +++ b/nixpkgs/pkgs/applications/gis/saga/opencv4.patch @@ -0,0 +1,14 @@ +--- a/src/tools/imagery/imagery_opencv/Makefile.am ++++ b/src/tools/imagery/imagery_opencv/Makefile.am +@@ -7,9 +7,9 @@ + + if HAVE_CV + DEF_SAGA = -D_SAGA_LINUX -D_TYPEDEF_BYTE -D_TYPEDEF_WORD +-CXX_INCS = -I$(top_srcdir)/src/saga_core -I/usr/include/opencv ++CXX_INCS = -I$(top_srcdir)/src/saga_core `pkg-config opencv4 --cflags` + AM_CXXFLAGS = -fPIC $(CXX_INCS) $(DEF_SAGA) $(DBGFLAGS) $(GOMPFLAGS) +-AM_LDFLAGS = -fPIC -shared -avoid-version `pkg-config opencv --libs` ++AM_LDFLAGS = -fPIC -shared -avoid-version `pkg-config opencv4 --libs` + pkglib_LTLIBRARIES = libimagery_opencv.la + libimagery_opencv_la_SOURCES =\ + MLB_Interface.cpp\ diff --git a/nixpkgs/pkgs/applications/gis/whitebox-tools/default.nix b/nixpkgs/pkgs/applications/gis/whitebox-tools/default.nix index d81a08e29008..0ac19c0d1336 100644 --- a/nixpkgs/pkgs/applications/gis/whitebox-tools/default.nix +++ b/nixpkgs/pkgs/applications/gis/whitebox-tools/default.nix @@ -1,27 +1,23 @@ { stdenv, rustPlatform , fetchFromGitHub, Security }: rustPlatform.buildRustPackage rec { pname = "whitebox_tools"; - version = "1.2.0"; + version = "1.3.0"; src = fetchFromGitHub { owner = "jblindsay"; repo = "whitebox-tools"; rev = "v${version}"; - sha256 = "0zi32d0wrbl2763dcllv2g0liwacsfiza5lkx52620prjjbhby8i"; + sha256 = "0c9jmfjz6ys65y65zlllv9xvaaavr9jpqc1dc217iywhj07j8k2v"; }; buildInputs = stdenv.lib.optional stdenv.isDarwin Security; - cargoSha256 = "13k21akyfqgamywj39bw73sldby1s02vyvxfglxbaqq1x96xcy4i"; - - # failures: structures::polyline::test::test_polyline_split - doCheck = false; + cargoSha256 = "05w2jimmygg7dc93i8bpjpjc5yj5xfpfkjnbbgw2sq4kh06r5ii4"; meta = with stdenv.lib; { description = "An advanced geospatial data analysis platform"; - homepage = "http://www.uoguelph.ca/~hydrogeo/WhiteboxTools/index.html"; + homepage = "https://jblindsay.github.io/ghrg/WhiteboxTools/index.html"; license = licenses.mit; maintainers = [ maintainers.mpickering ]; - platforms = platforms.all; }; } |