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";
|
2023-07-15 17:15:38 +00:00
|
|
|
version = "6.2.2";
|
2021-02-05 17:12:51 +00:00
|
|
|
|
|
|
|
src = fetchFromGitLab {
|
|
|
|
owner = "libxc";
|
|
|
|
repo = "libxc";
|
|
|
|
rev = version;
|
2023-07-15 17:15:38 +00:00
|
|
|
hash = "sha256-JYhuyW95I7Q0edLIe7H//+ej5vh6MdAGxXjmNxDMuhQ=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2023-08-22 20:05:09 +00:00
|
|
|
# Timeout increase has already been included upstream in master.
|
|
|
|
# Check upon updates if this can be removed.
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace testsuite/CMakeLists.txt \
|
|
|
|
--replace "PROPERTIES TIMEOUT 1" "PROPERTIES TIMEOUT 30"
|
|
|
|
'';
|
|
|
|
|
2023-10-09 19:29:22 +00:00
|
|
|
outputs = [ "out" "dev" ];
|
|
|
|
|
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"
|
2023-07-15 17:15:38 +00:00
|
|
|
"-DENABLE_XHOST=OFF"
|
2021-12-06 16:07:01 +00:00
|
|
|
# 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 ];
|
|
|
|
};
|
|
|
|
}
|