From 72eae722235bfba72f2d4bc29094209c9882fc5d Mon Sep 17 00:00:00 2001 From: Bas van Dijk Date: Thu, 20 Dec 2018 13:25:44 +0100 Subject: [PATCH] openblas: fix build on x86_64-darwin See: https://github.com/xianyi/OpenBLAS/issues/1926 --- .../libraries/science/math/openblas/default.nix | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/science/math/openblas/default.nix b/pkgs/development/libraries/science/math/openblas/default.nix index 532a26481afc..120fa25090a4 100644 --- a/pkgs/development/libraries/science/math/openblas/default.nix +++ b/pkgs/development/libraries/science/math/openblas/default.nix @@ -89,6 +89,15 @@ stdenv.mkDerivation rec { inherit blas64; + patches = [ + # Fixes build on x86_64-darwin. See: + # https://github.com/xianyi/OpenBLAS/issues/1926 + (fetchpatch { + url = https://github.com/xianyi/OpenBLAS/commit/701ea88347461e4c5d896765438dc870281b3834.patch; + sha256 = "18rcfgkjsijl9d2510jn961wqvz7zdlz2fgy1yjmax29kvv8fqd9"; + }) + ]; + # Some hardening features are disabled due to sporadic failures in # OpenBLAS-based programs. The problem may not be with OpenBLAS itself, but # with how these flags interact with hardening measures used downstream. @@ -118,8 +127,6 @@ stdenv.mkDerivation rec { ] ++ stdenv.lib.optional (stdenv.hostPlatform.libc == "musl") "NO_AFFINITY=1" ++ mapAttrsToList (var: val: var + "=" + val) config; - patches = []; - doCheck = true; checkTarget = "tests";