3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/development/libraries/libxc/default.nix
2022-02-03 15:23:02 +01:00

42 lines
972 B
Nix

{ lib, stdenv, fetchFromGitLab, cmake, gfortran, perl }:
stdenv.mkDerivation rec {
pname = "libxc";
version = "5.2.2";
src = fetchFromGitLab {
owner = "libxc";
repo = "libxc";
rev = version;
sha256 = "113sk7hxjpfbz3nrgjsc7bi6zrlwb3qq5s6h0zh37hz9bd1brq54";
};
nativeBuildInputs = [ perl cmake gfortran ];
preConfigure = ''
patchShebangs ./
'';
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"
];
doCheck = true;
meta = with lib; {
description = "Library of exchange-correlation functionals for density-functional theory";
homepage = "https://www.tddft.org/programs/Libxc/";
license = licenses.mpl20;
platforms = platforms.unix;
maintainers = with maintainers; [ markuskowa ];
};
}