superlu: 5.2.1 -> 7.0.0
Includes fixes for GCC 14. Also addresses non‐free code already removed by Debian. If there’s demand for this functionality it could be re‐added under a flag.
This commit is contained in:
@@ -1,44 +1,59 @@
|
||||
{ lib, stdenv, fetchurl, cmake,
|
||||
{ lib, stdenv, fetchFromGitHub, fetchurl, cmake, ninja,
|
||||
gfortran, blas, lapack}:
|
||||
|
||||
assert (!blas.isILP64) && (!lapack.isILP64);
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
version = "5.2.1";
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "superlu";
|
||||
version = "7.0.0";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://crd-legacy.lbl.gov/~xiaoye/SuperLU/superlu_${version}.tar.gz";
|
||||
sha256 = "0qzlb7cd608q62kyppd0a8c65l03vrwqql6gsm465rky23b6dyr8";
|
||||
src = fetchFromGitHub {
|
||||
owner = "xiaoyeli";
|
||||
repo = "superlu";
|
||||
rev = "refs/tags/v${finalAttrs.version}";
|
||||
# Remove non‐free files.
|
||||
#
|
||||
# See:
|
||||
# * <https://github.com/xiaoyeli/superlu/issues/9>
|
||||
# * <https://github.com/xiaoyeli/superlu/blob/0bbd6571bd839d866bff6a8ff1eaa812a8c31463/License.txt#L32-L65>
|
||||
# * <https://salsa.debian.org/science-team/superlu/-/blob/0acab1b41f332f2f2e3b0b5d28ba7fc9f7539533/debian/copyright>
|
||||
postFetch = "rm $out/SRC/mc64ad.* $out/DOC/*.pdf";
|
||||
hash = "sha256-iJiVyY+/vr6kll8FCunvZ8rKBj+w+Rnj4F696XW9xFc=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ cmake gfortran ];
|
||||
patches = [
|
||||
(fetchurl {
|
||||
url = "https://salsa.debian.org/science-team/superlu/-/raw/fae141179928d1cc5a8e381503e8b1264d297c3d/debian/patches/mc64ad-stub.patch";
|
||||
hash = "sha256-QUaNUDaRghTqr6jk1TE6a7CdXABqu7xAkYZDhL/lZBQ=";
|
||||
})
|
||||
];
|
||||
|
||||
nativeBuildInputs = [ cmake ninja gfortran ];
|
||||
|
||||
propagatedBuildInputs = [ blas ];
|
||||
|
||||
cmakeFlags = [
|
||||
"-DBUILD_SHARED_LIBS=true"
|
||||
"-DUSE_XSDK_DEFAULTS=true"
|
||||
];
|
||||
|
||||
env = lib.optionalAttrs stdenv.cc.isClang {
|
||||
NIX_CFLAGS_COMPILE = toString [
|
||||
"-Wno-error=implicit-function-declaration"
|
||||
"-Wno-error=implicit-int"
|
||||
];
|
||||
};
|
||||
|
||||
patches = [
|
||||
./add-superlu-lib-as-dependency-for-the-unit-tests.patch
|
||||
(lib.cmakeBool "BUILD_SHARED_LIBS" true)
|
||||
(lib.cmakeBool "enable_fortran" true)
|
||||
];
|
||||
|
||||
doCheck = true;
|
||||
checkTarget = "test";
|
||||
|
||||
meta = {
|
||||
homepage = "http://crd-legacy.lbl.gov/~xiaoye/SuperLU/";
|
||||
license = "http://crd-legacy.lbl.gov/~xiaoye/SuperLU/License.txt";
|
||||
homepage = "https://portal.nersc.gov/project/sparse/superlu/";
|
||||
license = [
|
||||
lib.licenses.bsd3Lbnl
|
||||
|
||||
# Xerox code; actually `Boehm-GC` variant.
|
||||
lib.licenses.mit
|
||||
|
||||
# University of Minnesota example files.
|
||||
lib.licenses.gpl2Plus
|
||||
|
||||
# University of Florida code; permissive COLAMD licence.
|
||||
lib.licenses.free
|
||||
];
|
||||
description = "Library for the solution of large, sparse, nonsymmetric systems of linear equations";
|
||||
platforms = lib.platforms.unix;
|
||||
};
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user