Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib, stdenv, fetchFromGitLab, cmake, gfortran, perl }: 2 3stdenv.mkDerivation rec { 4 pname = "libxc"; 5 version = "6.1.0"; 6 7 src = fetchFromGitLab { 8 owner = "libxc"; 9 repo = "libxc"; 10 rev = version; 11 hash = "sha256-PqKqZbL9Y7lKu7tKo+DfAhoEeFSsYWEcwiFX41VhRIs="; 12 }; 13 14 nativeBuildInputs = [ perl cmake gfortran ]; 15 16 preConfigure = '' 17 patchShebangs ./ 18 ''; 19 20 cmakeFlags = [ 21 "-DENABLE_FORTRAN=ON" 22 "-DBUILD_SHARED_LIBS=ON" 23 # Force compilation of higher derivatives 24 "-DDISABLE_VXC=0" 25 "-DDISABLE_FXC=0" 26 "-DDISABLE_KXC=0" 27 "-DDISABLE_LXC=0" 28 ]; 29 30 doCheck = true; 31 32 meta = with lib; { 33 description = "Library of exchange-correlation functionals for density-functional theory"; 34 homepage = "https://www.tddft.org/programs/Libxc/"; 35 license = licenses.mpl20; 36 platforms = platforms.unix; 37 maintainers = with maintainers; [ markuskowa ]; 38 }; 39}