about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/libraries/sundials
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2021-01-10 07:13:44 +0000
committerAlyssa Ross <hi@alyssa.is>2021-01-12 14:07:16 +0000
commite2698550456abba83c6dcd5d5e5a9990a0b96f8a (patch)
tree79a56f0df3fa55e470d84b4dff6059fbf487ec18 /nixpkgs/pkgs/development/libraries/sundials
parent1cdc42df888dc98c347e03bd942ed9825a55bcb3 (diff)
parent84d74ae9c9cbed73274b8e4e00be14688ffc93fe (diff)
downloadnixlib-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/development/libraries/sundials')
-rw-r--r--nixpkgs/pkgs/development/libraries/sundials/2.x.nix2
-rw-r--r--nixpkgs/pkgs/development/libraries/sundials/default.nix29
2 files changed, 25 insertions, 6 deletions
diff --git a/nixpkgs/pkgs/development/libraries/sundials/2.x.nix b/nixpkgs/pkgs/development/libraries/sundials/2.x.nix
index b54e537fb823..ae22f0be1797 100644
--- a/nixpkgs/pkgs/development/libraries/sundials/2.x.nix
+++ b/nixpkgs/pkgs/development/libraries/sundials/2.x.nix
@@ -53,7 +53,7 @@ stdenv.mkDerivation rec {
     description = "Suite of nonlinear differential/algebraic equation solvers";
     homepage    = "https://computation.llnl.gov/projects/sundials";
     platforms   = platforms.all;
-    maintainers = with maintainers; [ flokli idontgetoutmuch ];
+    maintainers = with maintainers; [ idontgetoutmuch ];
     license     = licenses.bsd3;
   };
 }
diff --git a/nixpkgs/pkgs/development/libraries/sundials/default.nix b/nixpkgs/pkgs/development/libraries/sundials/default.nix
index 46cf437d72ca..e1b4d375282e 100644
--- a/nixpkgs/pkgs/development/libraries/sundials/default.nix
+++ b/nixpkgs/pkgs/development/libraries/sundials/default.nix
@@ -5,20 +5,35 @@
 , blas
 , lapack
 , gfortran
-, lapackSupport ? true }:
+, suitesparse
+, lapackSupport ? true
+, kluSupport ? true }:
 
 assert (!blas.isILP64) && (!lapack.isILP64);
 
 stdenv.mkDerivation rec {
   pname = "sundials";
-  version = "5.1.0";
+  version = "5.3.0";
+
+  buildInputs = [
+    python
+  ] ++ stdenv.lib.optionals (lapackSupport) [
+    gfortran
+    blas
+    lapack
+  ]
+  # KLU support is based on Suitesparse.
+  # It is tested upstream according to the section 1.1.4 of
+  # [INSTALL_GUIDE.pdf](https://raw.githubusercontent.com/LLNL/sundials/master/INSTALL_GUIDE.pdf)
+  ++ stdenv.lib.optionals (kluSupport) [
+    suitesparse
+  ];
 
-  buildInputs = [ python ] ++ stdenv.lib.optionals (lapackSupport) [ gfortran blas lapack ];
   nativeBuildInputs = [ cmake ];
 
   src = fetchurl {
     url = "https://computation.llnl.gov/projects/${pname}/download/${pname}-${version}.tar.gz";
-    sha256 = "08cvzmbr2qc09ayq4f5j07lw97hl06q4dl26vh4kh822mm7x28pv";
+    sha256 = "19xwi7pz35s2nqgldm6r0jl2k0bs36zhbpnmmzc56s1n3bhzgpw8";
   };
 
   patches = [
@@ -35,6 +50,10 @@ stdenv.mkDerivation rec {
     "-DSUNDIALS_INDEX_TYPE=int32_t"
     "-DLAPACK_ENABLE=ON"
     "-DLAPACK_LIBRARIES=${lapack}/lib/liblapack${stdenv.hostPlatform.extensions.sharedLibrary}"
+  ] ++ stdenv.lib.optionals (kluSupport) [
+    "-DKLU_ENABLE=ON"
+    "-DKLU_INCLUDE_DIR=${suitesparse.dev}/include"
+    "-DKLU_LIBRARY_DIR=${suitesparse}/lib"
   ];
 
   doCheck = true;
@@ -44,7 +63,7 @@ stdenv.mkDerivation rec {
     description = "Suite of nonlinear differential/algebraic equation solvers";
     homepage    = "https://computation.llnl.gov/projects/sundials";
     platforms   = platforms.all;
-    maintainers = with maintainers; [ flokli idontgetoutmuch ];
+    maintainers = with maintainers; [ idontgetoutmuch ];
     license     = licenses.bsd3;
   };
 }