@@ -0,0 +1,30 @@
1+{ stdenv, lib, fetchFromGitHub, cmake, gfortran, python3 } :
2+
3+stdenv.mkDerivation rec {
4+ pname = "xcfun";
5+ version = "2.1.1";
6+
7+ src = fetchFromGitHub {
8+ owner = "dftlibs";
9+ repo = pname;
10+ rev = "v${version}";
11+ sha256= "1bj70cnhbh6ziy02x988wwl7cbwaq17ld7qwhswqkgnnx8rpgxid";
12+ };
13+
14+ nativeBuildInputs = [
15+ cmake
16+ gfortran
17+ ];
18+
19+ propagatedBuildInputs = [ (python3.withPackages (p: with p; [ pybind11 ])) ];
20+
21+ cmakeFlags = [ "-DXCFUN_MAX_ORDER=3" ];
22+
23+ meta = with lib; {
24+ description = "A library of exchange-correlation functionals with arbitrary-order derivatives";
25+ homepage = "https://github.com/dftlibs/xcfun";
26+ license = licenses.mpl20;
27+ platforms = platforms.linux;
28+ maintainers = [ maintainers.sheepforce ];
29+ };
30+}