diff options
author | Matthew Bauer <mjbauer95@gmail.com> | 2020-03-31 10:47:18 -0400 |
---|---|---|
committer | Matthew Bauer <mjbauer95@gmail.com> | 2020-04-17 16:24:09 -0500 |
commit | 1c8aba83340be3713f68410d1d273a8b15e7e007 (patch) | |
tree | fdc752744f384be57b6ff3c65495018432bff0ab /pkgs/development/libraries/sundials | |
parent | 43873351ffed36b52170571839e26b57c9f15920 (diff) |
treewide: use blas and lapack
This makes packages use lapack and blas, which can wrap different
BLAS/LAPACK implementations.
treewide: cleanup from blas/lapack changes
A few issues in the original treewide:
- can’t assume blas64 is a bool
- unused commented code
Diffstat (limited to 'pkgs/development/libraries/sundials')
-rw-r--r-- | pkgs/development/libraries/sundials/2.x.nix | 10 | ||||
-rw-r--r-- | pkgs/development/libraries/sundials/default.nix | 11 |
2 files changed, 10 insertions, 11 deletions
diff --git a/pkgs/development/libraries/sundials/2.x.nix b/pkgs/development/libraries/sundials/2.x.nix index 2d8a8f55c672..08cbd52ba394 100644 --- a/pkgs/development/libraries/sundials/2.x.nix +++ b/pkgs/development/libraries/sundials/2.x.nix @@ -4,15 +4,13 @@ , python # GNU Octave needs KLU for ODE solvers , suitesparse -, liblapack +, blas, lapack , gfortran , lapackSupport ? true }: -let liblapackShared = liblapack.override { - shared = true; -}; +assert (!blas.is64bit) && (!lapack.is64bit); -in stdenv.mkDerivation rec { +stdenv.mkDerivation rec { pname = "sundials"; version = "2.7.0"; @@ -44,7 +42,7 @@ in stdenv.mkDerivation rec { "-DKLU_INCLUDE_DIR=${suitesparse}/include" "-DKLU_LIBRARY_DIR=${suitesparse}/lib" "-DLAPACK_ENABLE=ON" - "-DLAPACK_LIBRARIES=${liblapackShared}/lib/liblapack${stdenv.hostPlatform.extensions.sharedLibrary};${liblapackShared}/lib/libblas${stdenv.hostPlatform.extensions.sharedLibrary}" + "-DLAPACK_LIBRARIES=${lapack}/lib/lapack${stdenv.hostPlatform.extensions.sharedLibrary};${blas}/lib/blas${stdenv.hostPlatform.extensions.sharedLibrary}" ]; # flaky tests, and patch in https://github.com/LLNL/sundials/pull/21 doesn't apply cleanly for sundials_3 diff --git a/pkgs/development/libraries/sundials/default.nix b/pkgs/development/libraries/sundials/default.nix index 2405b1b6fdcc..8ed8d6cfcb55 100644 --- a/pkgs/development/libraries/sundials/default.nix +++ b/pkgs/development/libraries/sundials/default.nix @@ -2,17 +2,18 @@ , cmake , fetchurl , python -, openblas +, blas +, lapack , gfortran , lapackSupport ? true }: -let openblas32 = openblas.override { blas64 = false; }; +assert (!blas.is64bit) && (!lapack.is64bit); -in stdenv.mkDerivation rec { +stdenv.mkDerivation rec { pname = "sundials"; version = "5.1.0"; - buildInputs = [ python ] ++ stdenv.lib.optionals (lapackSupport) [ gfortran openblas32 ]; + buildInputs = [ python ] ++ stdenv.lib.optionals (lapackSupport) [ gfortran blas lapack ]; nativeBuildInputs = [ cmake ]; src = fetchurl { @@ -33,7 +34,7 @@ in stdenv.mkDerivation rec { ] ++ stdenv.lib.optionals (lapackSupport) [ "-DSUNDIALS_INDEX_TYPE=int32_t" "-DLAPACK_ENABLE=ON" - "-DLAPACK_LIBRARIES=${openblas32}/lib/libopenblas${stdenv.hostPlatform.extensions.sharedLibrary}" + "-DLAPACK_LIBRARIES=${lapack}/lib/liblapack${stdenv.hostPlatform.extensions.sharedLibrary}" ]; doCheck = true; |