diff --git a/pkgs/by-name/su/superlu/package.nix b/pkgs/by-name/su/superlu/package.nix index 6288232a8cd42..96efcd9c83a15 100644 --- a/pkgs/by-name/su/superlu/package.nix +++ b/pkgs/by-name/su/superlu/package.nix @@ -7,14 +7,11 @@ ninja, gfortran, blas, - lapack, }: -assert (!blas.isILP64) && (!lapack.isILP64); - stdenv.mkDerivation (finalAttrs: { pname = "superlu"; - version = "7.0.0"; + version = "7.0.1"; src = fetchFromGitHub { owner = "xiaoyeli"; @@ -27,7 +24,7 @@ stdenv.mkDerivation (finalAttrs: { # * # * postFetch = "rm $out/SRC/mc64ad.* $out/DOC/*.pdf"; - hash = "sha256-iJiVyY+/vr6kll8FCunvZ8rKBj+w+Rnj4F696XW9xFc="; + hash = "sha256-MiQPhYIGZbvmtpIojrNzTG4Xao7lc4Ks/FtxlfdAKmQ="; }; patches = [ @@ -37,6 +34,11 @@ stdenv.mkDerivation (finalAttrs: { }) ]; + # Prevent clang from crashing when compiling slatms.c from SuperLU’s matgen test code. + postPatch = lib.optionalString stdenv.cc.isClang '' + echo 'target_compile_options(matgen PRIVATE -fno-vectorize)' >> TESTING/MATGEN/CMakeLists.txt + ''; + nativeBuildInputs = [ cmake ninja @@ -48,11 +50,9 @@ stdenv.mkDerivation (finalAttrs: { cmakeFlags = [ (lib.cmakeBool "BUILD_SHARED_LIBS" true) (lib.cmakeBool "enable_fortran" true) - ] - ++ lib.optionals stdenv.hostPlatform.isDarwin [ # prevent cmake from using Accelerate, which causes tests to segfault # https://github.com/xiaoyeli/superlu/issues/155 - "-DBLA_VENDOR=Generic" + (lib.cmakeFeature "BLA_VENDOR" "Generic") ]; doCheck = true;