diff --git a/pkgs/by-name/op/openmolcas/package.nix b/pkgs/by-name/op/openmolcas/package.nix index ed3f74e7656a..35d244cec9a0 100644 --- a/pkgs/by-name/op/openmolcas/package.nix +++ b/pkgs/by-name/op/openmolcas/package.nix @@ -14,7 +14,7 @@ libxc, makeWrapper, gsl, - boost180, + boost, autoPatchelfHook, enableQcmaquis ? false, # Note that the CASPT2 module is broken with MPI @@ -103,7 +103,7 @@ stdenv.mkDerivation rec { armadillo libxc gsl.dev - boost180 + boost ] ++ lib.optionals enableMpi [ mpi diff --git a/pkgs/by-name/su/superlu/package.nix b/pkgs/by-name/su/superlu/package.nix index 4f52c2d6c507..9d9dfa5fe3d3 100644 --- a/pkgs/by-name/su/superlu/package.nix +++ b/pkgs/by-name/su/superlu/package.nix @@ -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: + # * + # * + # * + 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; }; -} +})