2021-02-05 17:12:51 +00:00
|
|
|
{ lib, stdenv, fetchFromGitLab, cmake, gfortran, perl }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-07-18 21:22:44 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "libxc";
|
2021-12-06 16:07:01 +00:00
|
|
|
version = "5.1.7";
|
2021-02-05 17:12:51 +00:00
|
|
|
|
|
|
|
src = fetchFromGitLab {
|
|
|
|
owner = "libxc";
|
|
|
|
repo = "libxc";
|
|
|
|
rev = version;
|
2021-12-06 16:07:01 +00:00
|
|
|
sha256 = "0s01q5sh50544s7q2q7kahcqydlyzk1lx3kg1zwl76y90942bjd1";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-09-26 12:46:18 +00:00
|
|
|
nativeBuildInputs = [ perl cmake gfortran ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
preConfigure = ''
|
|
|
|
patchShebangs ./
|
|
|
|
'';
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
cmakeFlags = [
|
|
|
|
"-DENABLE_FORTRAN=ON"
|
|
|
|
"-DBUILD_SHARED_LIBS=ON"
|
|
|
|
# needed for tests to link
|
|
|
|
"-DCMAKE_SKIP_BUILD_RPATH=OFF"
|
|
|
|
# Force compilation of higher derivatives
|
|
|
|
"-DDISABLE_VXC=0"
|
|
|
|
"-DDISABLE_FXC=0"
|
|
|
|
"-DDISABLE_KXC=0"
|
|
|
|
"-DDISABLE_LXC=0"
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
doCheck = true;
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Library of exchange-correlation functionals for density-functional theory";
|
2021-02-05 17:12:51 +00:00
|
|
|
homepage = "https://www.tddft.org/programs/Libxc/";
|
|
|
|
license = licenses.mpl20;
|
2021-12-06 16:07:01 +00:00
|
|
|
platforms = platforms.unix;
|
2020-04-24 23:36:52 +00:00
|
|
|
maintainers = with maintainers; [ markuskowa ];
|
|
|
|
};
|
|
|
|
}
|