diff options
author | Matthew Bauer <mjbauer95@gmail.com> | 2019-02-10 18:49:04 -0500 |
---|---|---|
committer | Matthew Bauer <mjbauer95@gmail.com> | 2019-02-10 18:49:04 -0500 |
commit | cfc43138cb2d906b9b24563a4487949efb106532 (patch) | |
tree | 7dd4276c709b6712505ad84db9427d179a9e626c /pkgs/development/libraries/science | |
parent | 2926b6e11f55dd7fcb9d45cb952be73d7750569f (diff) | |
download | nixlib-cfc43138cb2d906b9b24563a4487949efb106532.tar nixlib-cfc43138cb2d906b9b24563a4487949efb106532.tar.gz nixlib-cfc43138cb2d906b9b24563a4487949efb106532.tar.bz2 nixlib-cfc43138cb2d906b9b24563a4487949efb106532.tar.lz nixlib-cfc43138cb2d906b9b24563a4487949efb106532.tar.xz nixlib-cfc43138cb2d906b9b24563a4487949efb106532.tar.zst nixlib-cfc43138cb2d906b9b24563a4487949efb106532.zip |
openblas: fix on darwin
The openblas script relies on CC=clang for succesfully compiling on Darwin systems. This seems like bad behavior, but we get things like https://hydra.nixos.org/build/87657058 otherwise. Fixes #55536.
Diffstat (limited to 'pkgs/development/libraries/science')
-rw-r--r-- | pkgs/development/libraries/science/math/openblas/default.nix | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/pkgs/development/libraries/science/math/openblas/default.nix b/pkgs/development/libraries/science/math/openblas/default.nix index 55fc3f750df3..598976688237 100644 --- a/pkgs/development/libraries/science/math/openblas/default.nix +++ b/pkgs/development/libraries/science/math/openblas/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchFromGitHub, fetchpatch, gfortran, perl, which, config, coreutils +{ stdenv, fetchFromGitHub, fetchpatch, gfortran, perl, which, config # Most packages depending on openblas expect integer width to match # pointer width, but some expect to use 32-bit integers always # (for compatibility with reference BLAS). @@ -102,24 +102,18 @@ stdenv.mkDerivation rec { "relro" "bindnow" ]; - nativeBuildInputs = [ - perl - which - buildPackages.gfortran - buildPackages.stdenv.cc - ] ++ optionals stdenv.isDarwin [ - coreutils - ]; + depsBuildBuild = [ buildPackages.stdenv.cc ]; + nativeBuildInputs = [ perl which gfortran ]; makeFlags = mapAttrsToList (var: val: "${var}=${toString val}") (config // { FC = "${stdenv.cc.targetPrefix}gfortran"; - CC = "${stdenv.cc.targetPrefix}cc"; + CC = "${stdenv.cc.targetPrefix}${if stdenv.cc.isClang then "clang" else "cc"}"; PREFIX = placeholder "out"; NUM_THREADS = 64; INTERFACE64 = blas64; NO_STATIC = true; CROSS = stdenv.hostPlatform != stdenv.buildPlatform; - HOSTCC = "${buildPackages.stdenv.cc.targetPrefix}cc"; + HOSTCC = "cc"; NO_BINARY_MODE = stdenv.hostPlatform != stdenv.buildPlatform; }); |