2021-01-26 20:57:03 +00:00
|
|
|
{ lib, stdenv, fetchFromGitLab, cmake, gfortran, perl }:
|
2017-12-31 05:11:12 +00:00
|
|
|
|
2021-07-17 17:56:23 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2019-08-13 21:52:01 +00:00
|
|
|
pname = "libxc";
|
2022-02-03 14:23:02 +00:00
|
|
|
version = "5.2.2";
|
2021-01-26 20:57:03 +00:00
|
|
|
|
|
|
|
src = fetchFromGitLab {
|
|
|
|
owner = "libxc";
|
|
|
|
repo = "libxc";
|
|
|
|
rev = version;
|
2022-02-03 14:23:02 +00:00
|
|
|
sha256 = "113sk7hxjpfbz3nrgjsc7bi6zrlwb3qq5s6h0zh37hz9bd1brq54";
|
2017-12-31 05:11:12 +00:00
|
|
|
};
|
|
|
|
|
2021-09-03 11:33:32 +00:00
|
|
|
nativeBuildInputs = [ perl cmake gfortran ];
|
2017-12-31 05:11:12 +00:00
|
|
|
|
|
|
|
preConfigure = ''
|
|
|
|
patchShebangs ./
|
|
|
|
'';
|
|
|
|
|
2021-11-10 11:29:53 +00:00
|
|
|
cmakeFlags = [
|
|
|
|
"-DENABLE_FORTRAN=ON"
|
|
|
|
"-DBUILD_SHARED_LIBS=ON"
|
2021-11-30 21:20:59 +00:00
|
|
|
# needed for tests to link
|
|
|
|
"-DCMAKE_SKIP_BUILD_RPATH=OFF"
|
2021-11-10 11:29:53 +00:00
|
|
|
# Force compilation of higher derivatives
|
|
|
|
"-DDISABLE_VXC=0"
|
|
|
|
"-DDISABLE_FXC=0"
|
|
|
|
"-DDISABLE_KXC=0"
|
|
|
|
"-DDISABLE_LXC=0"
|
|
|
|
];
|
2021-01-26 20:57:03 +00:00
|
|
|
|
2017-12-31 05:11:12 +00:00
|
|
|
doCheck = true;
|
|
|
|
|
2021-01-21 17:00:13 +00:00
|
|
|
meta = with lib; {
|
2017-12-31 05:11:12 +00:00
|
|
|
description = "Library of exchange-correlation functionals for density-functional theory";
|
2021-01-26 20:57:03 +00:00
|
|
|
homepage = "https://www.tddft.org/programs/Libxc/";
|
|
|
|
license = licenses.mpl20;
|
2021-11-10 11:29:53 +00:00
|
|
|
platforms = platforms.unix;
|
2017-12-31 06:52:39 +00:00
|
|
|
maintainers = with maintainers; [ markuskowa ];
|
2017-12-31 05:11:12 +00:00
|
|
|
};
|
|
|
|
}
|