diff --git a/pkgs/applications/gis/saga/clang_patch.patch b/pkgs/applications/gis/saga/clang_patch.patch new file mode 100644 index 000000000000..e6af8d130514 --- /dev/null +++ b/pkgs/applications/gis/saga/clang_patch.patch @@ -0,0 +1,19 @@ +commit e92b250968e9656084ab5984689747ca615ff6e7 +Author: Volker Wichmann +Date: Sun Mar 5 13:49:53 2017 +0100 + + saga_api, CSG_Table::Del_Records(): bug fix, check record count correctly + +diff --git a/src/saga_core/saga_api/table.cpp b/src/saga_core/saga_api/table.cpp +index 76a1d8d..fa1a66f 100644 +--- a/src/saga_core/saga_api/table.cpp ++++ b/src/saga_core/saga_api/table.cpp +@@ -901,7 +901,7 @@ bool CSG_Table::Del_Record(int iRecord) + //--------------------------------------------------------- + bool CSG_Table::Del_Records(void) + { +- if( m_Records > 0 ) ++ if( m_nRecords > 0 ) + { + _Index_Destroy(); + diff --git a/pkgs/applications/gis/saga/lts.nix b/pkgs/applications/gis/saga/lts.nix new file mode 100644 index 000000000000..a0e9d64ac8e8 --- /dev/null +++ b/pkgs/applications/gis/saga/lts.nix @@ -0,0 +1,33 @@ +{ stdenv, fetchgit, gdal, wxGTK30, proj, libiodbc, lzma, jasper, + libharu, opencv, vigra, postgresql, autoreconfHook, Cocoa + , unixODBC , poppler, hdf4, hdf5, netcdf, sqlite }: + +stdenv.mkDerivation rec { + name = "saga-2.3.2"; + + # See https://groups.google.com/forum/#!topic/nix-devel/h_vSzEJAPXs + # for why the have additional buildInputs on darwin + buildInputs = [ autoreconfHook gdal wxGTK30 proj libharu opencv vigra + postgresql libiodbc lzma jasper + Cocoa unixODBC poppler hdf4.out hdf5 netcdf sqlite ]; + + enableParallelBuilding = true; + + sourceRoot = "code-b6f474f/saga-gis"; + + patches = [ ./clang_patch.patch ]; + + src = fetchgit { + url = "https://git.code.sf.net/p/saga-gis/code.git"; + rev = "b6f474f8af4af7f0ff82548cc6f88c53547d91f5"; + sha256 = "0iakynai8mhcwj6wxvafkqhd7b417ss7hyhbcp9wf6092l6vc2zd"; + }; + + meta = with stdenv.lib; { + description = "System for Automated Geoscientific Analyses"; + homepage = http://www.saga-gis.org; + license = licenses.gpl2Plus; + maintainers = [ maintainers.mpickering ]; + platforms = with platforms; unix; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 7e124de83a48..56088c77e847 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -19882,6 +19882,10 @@ with pkgs; inherit (darwin.apple_sdk.frameworks) Cocoa; }; + saga_2_3_2 = callPackage ../applications/gis/saga/lts.nix { + inherit (darwin.apple_sdk.frameworks) Cocoa; + }; + samplv1 = callPackage ../applications/audio/samplv1 { }; sauerbraten = callPackage ../games/sauerbraten {};