about summary refs log tree commit diff
path: root/pkgs/development/libraries/science/math/openblas/0.2.10.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/libraries/science/math/openblas/0.2.10.nix')
-rw-r--r--pkgs/development/libraries/science/math/openblas/0.2.10.nix13
1 files changed, 9 insertions, 4 deletions
diff --git a/pkgs/development/libraries/science/math/openblas/0.2.10.nix b/pkgs/development/libraries/science/math/openblas/0.2.10.nix
index a8db063191115..ec4422ce8951c 100644
--- a/pkgs/development/libraries/science/math/openblas/0.2.10.nix
+++ b/pkgs/development/libraries/science/math/openblas/0.2.10.nix
@@ -1,5 +1,8 @@
-{ stdenv, fetchurl, gfortran, perl, liblapack }:
+{ stdenv, fetchurl, gfortran, perl, liblapack, config }:
 
+let local = config.openblas.preferLocalBuild or false;
+    localTarget = config.openblas.target or "";
+in
 stdenv.mkDerivation rec {
   version = "0.2.10";
 
@@ -16,17 +19,19 @@ stdenv.mkDerivation rec {
 
   cpu = builtins.head (stdenv.lib.splitString "-" stdenv.system);
 
-  target = if cpu == "i686" then "P2" else 
+  target = if local then localTarget else
+    if cpu == "i686" then "P2" else
     if cpu == "x86_64" then "CORE2" else
      # allow autodetect
       "";
 
   makeFlags = "${if target != "" then "TARGET=" else ""}${target} FC=gfortran CC=cc PREFIX=\"\$(out)\" INTERFACE64=1";
 
-  meta = {
+  meta = with stdenv.lib; {
     description = "Basic Linear Algebra Subprograms";
-    license = stdenv.lib.licenses.bsd3;
+    license = licenses.bsd3;
     homepage = "https://github.com/xianyi/OpenBLAS";
     platforms = [ "x86_64-linux" ];
+    maintainers = with maintainers; [ ttuegel ];
   };
 }