openblas: add local build preference to pinned versions

This commit is contained in:
Thomas Tuegel 2014-08-28 18:34:41 -05:00
parent df731f151f
commit 9ade2dfa3c
2 changed files with 12 additions and 4 deletions

View File

@ -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,7 +19,8 @@ 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
"";

View File

@ -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.2";
@ -16,7 +19,8 @@ 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
"";