openblas: patch to fix on non-glibc

This commit is contained in:
Will Dietz 2018-01-13 12:20:03 -06:00
parent c8081971f4
commit 8dfe068f86

View file

@ -1,4 +1,4 @@
{ stdenv, fetchurl, gfortran, perl, which, config, coreutils
{ stdenv, fetchurl, fetchpatch, gfortran, perl, which, config, coreutils
# 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).
@ -118,6 +118,13 @@ stdenv.mkDerivation {
] ++ stdenv.lib.optional (stdenv.hostPlatform.libc == "musl") "NO_AFFINITY=1"
++ mapAttrsToList (var: val: var + "=" + val) config;
patches = stdenv.lib.optional (stdenv.hostPlatform.libc != "glibc")
# https://github.com/xianyi/OpenBLAS/pull/1247
(fetchpatch {
url = "https://github.com/xianyi/OpenBLAS/commit/88a35ff457f55e527e0e8a503a0dc61976c1846d.patch";
sha256 = "1a3qrhvl5hp06c53fjqghq4zgf6ls7narm06l0shcvs57hznh09n";
});
doCheck = true;
checkTarget = "tests";