Unverified Commit febb639e authored by Markus Kowalewski's avatar Markus Kowalewski Committed by GitHub
Browse files

openmolcas: 24.06 -> 24.10, make qcmaquis optional (#351201)

parents 5e10c152 9d247d73
Loading
Loading
Loading
Loading
+8 −6
Original line number Diff line number Diff line
@@ -15,6 +15,7 @@
, gsl
, boost180
, autoPatchelfHook
, enableQcmaquis ? false
  # Note that the CASPT2 module is broken with MPI
  # See https://gitlab.com/Molcas/OpenMolcas/-/issues/169
, enableMpi ? false
@@ -24,14 +25,15 @@

assert blas-ilp64.isILP64;
assert lib.elem blas-ilp64.passthru.implementation [ "openblas" "mkl" ];
assert enableQcmaquis -> lib.elem blas-ilp64.passthru.implementation "mkl";

let
  python = python3.withPackages (ps: with ps; [ six pyparsing numpy h5py ]);
  qcmaquisSrc = fetchFromGitHub {
    owner = "qcscine";
    repo = "qcmaquis";
    rev = "release-3.1.1"; # Must match tag in cmake/custom/qcmaquis.cmake
    hash = "sha256-diLDWj/Om6EHrVp+Hd24jsN6R9vV2vRl0y9gqyRWhkI=";
    rev = "release-3.1.4"; # Must match tag in cmake/custom/qcmaquis.cmake
    hash = "sha256-vhC5k+91IPFxdCi5oYt1NtF9W08RxonJjPpA0ls4I+o=";
  };
  nevtp2Src = fetchFromGitHub {
    owner = "qcscine";
@@ -43,13 +45,13 @@ let
in
stdenv.mkDerivation rec {
  pname = "openmolcas";
  version = "24.06";
  version = "24.10";

  src = fetchFromGitLab {
    owner = "Molcas";
    repo = "OpenMolcas";
    rev = "v${version}";
    hash = "sha256-/y6vEvA1Zf+p7Z0WpcN4P5voLN8MmfbKz1FuthgVQp0=";
    hash = "sha256-LXxr/xqBHG7a0rOBrb8IMZ4IjZak3NsBw40Qf+z1fic=";
  };

  patches = [
@@ -104,8 +106,8 @@ stdenv.mkDerivation rec {
    "-DHDF5=ON"
    "-DFDE=ON"
    "-DEXTERNAL_LIBXC=${lib.getDev libxc}"
    "-DDMRG=ON"
    "-DNEVPT2=ON"
    (lib.strings.cmakeBool "DMRG" enableQcmaquis)
    (lib.strings.cmakeBool "NEVPT2" enableQcmaquis)
    "-DCMAKE_SKIP_BUILD_RPATH=ON"
  ] ++ lib.optionals (blas-ilp64.passthru.implementation == "openblas") [
    "-DOPENBLASROOT=${blas-ilp64.passthru.provider.dev}"
+20 −19
Original line number Diff line number Diff line
@@ -22,10 +22,10 @@ index 789739ec8..6c86a7b8c 100644
                     INSTALL_DIR "${PROJECT_BINARY_DIR}/qcmaquis"
                    )
diff --git a/cmake/custom/qcmaquis.cmake b/cmake/custom/qcmaquis.cmake
index 176d02761..e160b7bc8 100644
index 5fd1ef207..8d2957c6e 100644
--- a/cmake/custom/qcmaquis.cmake
+++ b/cmake/custom/qcmaquis.cmake
@@ -78,6 +78,7 @@ list(APPEND QCMaquisCMakeArgs
@@ -77,6 +77,7 @@ list (APPEND QCMaquisCMakeArgs
       -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}
       -DCMAKE_CXX_FLAGS=${QCM_CMake_CXX_FLAGS}
       -DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_DIR>
@@ -33,14 +33,15 @@ index 176d02761..e160b7bc8 100644
 )
 if (HDF5_ROOT)
   list (APPEND QCMaquisCMakeArgs
@@ -278,9 +279,7 @@ set (CMAKE_DISABLE_SOURCE_CHANGES OFF)
@@ -274,10 +275,7 @@ if (NOT MAQUIS_DMRG_FOUND) # Does the opposite work?
 
   ExternalProject_Add (${EP_PROJECT}
                        PREFIX ${extprojpath}
-                       GIT_REPOSITORY ${reference_git_repo}
-                       GIT_TAG ${reference_git_commit}
-                       UPDATE_DISCONNECTED ${EP_SkipUpdate}
-
+                       URL @qcmaquis_src_url@
 
                        SOURCE_SUBDIR dmrg
                        CMAKE_ARGS ${EP_CMAKE_ARGS}
                        CMAKE_CACHE_ARGS ${EP_CMAKE_CACHE_ARGS}