2021-01-15 22:18:51 +00:00
|
|
|
{ lib, stdenv, fetchFromGitLab, cmake, gfortran, perl
|
2020-12-27 14:24:52 +00:00
|
|
|
, openblas, hdf5-cpp, python3, texlive
|
2021-02-05 17:12:51 +00:00
|
|
|
, armadillo, mpi, globalarrays, openssh
|
2021-05-20 23:08:51 +00:00
|
|
|
, makeWrapper
|
2020-04-24 23:36:52 +00:00
|
|
|
} :
|
|
|
|
|
|
|
|
let
|
2021-08-05 21:33:18 +00:00
|
|
|
version = "21.06";
|
2021-05-20 23:08:51 +00:00
|
|
|
# The tag keeps moving, fix a hash instead
|
2021-08-05 21:33:18 +00:00
|
|
|
gitLabRev = "dd982ad4bc94dec8ac1e3e99cb6a7dd249ff71de";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
python = python3.withPackages (ps : with ps; [ six pyparsing ]);
|
|
|
|
|
|
|
|
in stdenv.mkDerivation {
|
|
|
|
pname = "openmolcas";
|
|
|
|
inherit version;
|
|
|
|
|
|
|
|
src = fetchFromGitLab {
|
|
|
|
owner = "Molcas";
|
|
|
|
repo = "OpenMolcas";
|
|
|
|
rev = gitLabRev;
|
2021-08-05 21:33:18 +00:00
|
|
|
sha256 = "07dm73n0s7ckif561yb3s9yqxsv39a73kb9qwny4yp39wdvv52hz";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2020-10-19 09:53:12 +00:00
|
|
|
patches = [
|
|
|
|
# Required to handle openblas multiple outputs
|
|
|
|
./openblasPath.patch
|
2021-05-20 23:08:51 +00:00
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-09-26 12:46:18 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
perl
|
2020-04-24 23:36:52 +00:00
|
|
|
gfortran
|
2021-09-26 12:46:18 +00:00
|
|
|
cmake
|
|
|
|
texlive.combined.scheme-minimal
|
|
|
|
makeWrapper
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
2020-04-24 23:36:52 +00:00
|
|
|
openblas
|
|
|
|
hdf5-cpp
|
|
|
|
python
|
|
|
|
armadillo
|
2021-02-05 17:12:51 +00:00
|
|
|
mpi
|
2020-04-24 23:36:52 +00:00
|
|
|
globalarrays
|
|
|
|
openssh
|
|
|
|
];
|
|
|
|
|
|
|
|
cmakeFlags = [
|
|
|
|
"-DOPENMP=ON"
|
|
|
|
"-DGA=ON"
|
|
|
|
"-DMPI=ON"
|
|
|
|
"-DLINALG=OpenBLAS"
|
|
|
|
"-DTOOLS=ON"
|
|
|
|
"-DHDF5=ON"
|
|
|
|
"-DFDE=ON"
|
2020-10-19 09:53:12 +00:00
|
|
|
"-DOPENBLASROOT=${openblas.dev}"
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
GAROOT=globalarrays;
|
|
|
|
|
|
|
|
postConfigure = ''
|
|
|
|
# The Makefile will install pymolcas during the build grrr.
|
|
|
|
mkdir -p $out/bin
|
|
|
|
export PATH=$PATH:$out/bin
|
|
|
|
'';
|
|
|
|
|
2021-05-20 23:08:51 +00:00
|
|
|
postInstall = ''
|
|
|
|
mv $out/pymolcas $out/bin
|
|
|
|
'';
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
postFixup = ''
|
|
|
|
# Wrong store path in shebang (no Python pkgs), force re-patching
|
|
|
|
sed -i "1s:/.*:/usr/bin/env python:" $out/bin/pymolcas
|
|
|
|
patchShebangs $out/bin
|
|
|
|
|
|
|
|
wrapProgram $out/bin/pymolcas --set MOLCAS $out
|
|
|
|
'';
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Advanced quantum chemistry software package";
|
|
|
|
homepage = "https://gitlab.com/Molcas/OpenMolcas";
|
|
|
|
maintainers = [ maintainers.markuskowa ];
|
2021-02-05 17:12:51 +00:00
|
|
|
license = licenses.lgpl21Only;
|
2020-12-27 14:24:52 +00:00
|
|
|
platforms = [ "x86_64-linux" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|