2021-01-11 07:54:33 +00:00
|
|
|
{ lib, stdenv, fetchFromGitLab, cmake, gfortran, perl
|
2020-12-26 00:51:08 +00:00
|
|
|
, openblas, hdf5-cpp, python3, texlive
|
2018-08-01 23:24:55 +01:00
|
|
|
, armadillo, openmpi, globalarrays, openssh
|
2020-01-07 14:36:59 +00:00
|
|
|
, makeWrapper, fetchpatch
|
2018-08-01 23:24:55 +01:00
|
|
|
} :
|
|
|
|
|
|
|
|
let
|
2020-10-19 13:11:19 +01:00
|
|
|
version = "20.10";
|
2018-09-27 09:47:02 +01:00
|
|
|
gitLabRev = "v${version}";
|
2018-08-01 23:24:55 +01:00
|
|
|
|
|
|
|
python = python3.withPackages (ps : with ps; [ six pyparsing ]);
|
|
|
|
|
|
|
|
in stdenv.mkDerivation {
|
2019-08-13 22:52:01 +01:00
|
|
|
pname = "openmolcas";
|
|
|
|
inherit version;
|
2018-08-01 23:24:55 +01:00
|
|
|
|
|
|
|
src = fetchFromGitLab {
|
|
|
|
owner = "Molcas";
|
|
|
|
repo = "OpenMolcas";
|
|
|
|
rev = gitLabRev;
|
2020-11-30 22:05:14 +00:00
|
|
|
sha256 = "0xr9plgb0cfmxxqmd3wrhvl0hv2jqqfqzxwzs1jysq2m9cxl314v";
|
2018-08-01 23:24:55 +01:00
|
|
|
};
|
|
|
|
|
2020-10-19 13:00:48 +01:00
|
|
|
patches = [
|
|
|
|
# Required to handle openblas multiple outputs
|
|
|
|
./openblasPath.patch
|
2020-10-19 13:11:19 +01:00
|
|
|
];
|
2020-01-07 14:36:59 +00:00
|
|
|
|
2018-08-01 23:24:55 +01:00
|
|
|
nativeBuildInputs = [ perl cmake texlive.combined.scheme-minimal makeWrapper ];
|
|
|
|
buildInputs = [
|
|
|
|
gfortran
|
|
|
|
openblas
|
|
|
|
hdf5-cpp
|
|
|
|
python
|
|
|
|
armadillo
|
|
|
|
openmpi
|
|
|
|
globalarrays
|
|
|
|
openssh
|
|
|
|
];
|
|
|
|
|
|
|
|
cmakeFlags = [
|
|
|
|
"-DOPENMP=ON"
|
|
|
|
"-DGA=ON"
|
|
|
|
"-DMPI=ON"
|
|
|
|
"-DLINALG=OpenBLAS"
|
|
|
|
"-DTOOLS=ON"
|
|
|
|
"-DHDF5=ON"
|
|
|
|
"-DFDE=ON"
|
2020-10-19 13:00:48 +01:00
|
|
|
"-DOPENBLASROOT=${openblas.dev}"
|
2018-08-01 23:24:55 +01:00
|
|
|
];
|
|
|
|
|
|
|
|
GAROOT=globalarrays;
|
|
|
|
|
|
|
|
postConfigure = ''
|
|
|
|
# The Makefile will install pymolcas during the build grrr.
|
|
|
|
mkdir -p $out/bin
|
|
|
|
export PATH=$PATH:$out/bin
|
|
|
|
'';
|
|
|
|
|
|
|
|
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-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2018-08-01 23:24:55 +01:00
|
|
|
description = "Advanced quantum chemistry software package";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://gitlab.com/Molcas/OpenMolcas";
|
2018-08-01 23:24:55 +01:00
|
|
|
maintainers = [ maintainers.markuskowa ];
|
|
|
|
license = licenses.lgpl21;
|
2020-12-26 15:58:58 +00:00
|
|
|
platforms = [ "x86_64-linux" ];
|
2018-08-01 23:24:55 +01:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|