openblas: add local build preference to pinned versions
This commit is contained in:
parent
df731f151f
commit
9ade2dfa3c
2 changed files with 12 additions and 4 deletions
|
@ -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 {
|
stdenv.mkDerivation rec {
|
||||||
version = "0.2.10";
|
version = "0.2.10";
|
||||||
|
|
||||||
|
@ -16,7 +19,8 @@ stdenv.mkDerivation rec {
|
||||||
|
|
||||||
cpu = builtins.head (stdenv.lib.splitString "-" stdenv.system);
|
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
|
if cpu == "x86_64" then "CORE2" else
|
||||||
# allow autodetect
|
# allow autodetect
|
||||||
"";
|
"";
|
||||||
|
|
|
@ -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 {
|
stdenv.mkDerivation rec {
|
||||||
version = "0.2.2";
|
version = "0.2.2";
|
||||||
|
|
||||||
|
@ -16,7 +19,8 @@ stdenv.mkDerivation rec {
|
||||||
|
|
||||||
cpu = builtins.head (stdenv.lib.splitString "-" stdenv.system);
|
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
|
if cpu == "x86_64" then "CORE2" else
|
||||||
# allow autodetect
|
# allow autodetect
|
||||||
"";
|
"";
|
||||||
|
|
Loading…
Reference in a new issue