about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/libraries/science/math/superlu/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/science/math/superlu/default.nix')
-rw-r--r--nixpkgs/pkgs/development/libraries/science/math/superlu/default.nix37
1 files changed, 37 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/libraries/science/math/superlu/default.nix b/nixpkgs/pkgs/development/libraries/science/math/superlu/default.nix
new file mode 100644
index 000000000000..26dd00d96069
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/science/math/superlu/default.nix
@@ -0,0 +1,37 @@
+{ lib, stdenv, fetchurl, cmake,
+  gfortran, blas, lapack}:
+
+assert (!blas.isILP64) && (!lapack.isILP64);
+
+stdenv.mkDerivation rec {
+  version = "5.2.1";
+  pname = "superlu";
+
+  src = fetchurl {
+    url = "http://crd-legacy.lbl.gov/~xiaoye/SuperLU/superlu_${version}.tar.gz";
+    sha256 = "0qzlb7cd608q62kyppd0a8c65l03vrwqql6gsm465rky23b6dyr8";
+  };
+
+  nativeBuildInputs = [ cmake gfortran ];
+
+  propagatedBuildInputs = [ blas ];
+
+  cmakeFlags = [
+    "-DBUILD_SHARED_LIBS=true"
+    "-DUSE_XSDK_DEFAULTS=true"
+  ];
+
+  patches = [
+    ./add-superlu-lib-as-dependency-for-the-unit-tests.patch
+  ];
+
+  doCheck = true;
+  checkTarget = "test";
+
+  meta = {
+    homepage = "http://crd-legacy.lbl.gov/~xiaoye/SuperLU/";
+    license = "http://crd-legacy.lbl.gov/~xiaoye/SuperLU/License.txt";
+    description = "A library for the solution of large, sparse, nonsymmetric systems of linear equations";
+    platforms = lib.platforms.unix;
+  };
+}