diff options
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/libxc')
-rw-r--r-- | nixpkgs/pkgs/development/libraries/libxc/default.nix | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/libraries/libxc/default.nix b/nixpkgs/pkgs/development/libraries/libxc/default.nix new file mode 100644 index 000000000000..95ce2406223c --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/libxc/default.nix @@ -0,0 +1,39 @@ +{ lib, stdenv, fetchFromGitLab, cmake, gfortran, perl }: + +let + version = "5.1.5"; + +in stdenv.mkDerivation { + pname = "libxc"; + inherit version; + + src = fetchFromGitLab { + owner = "libxc"; + repo = "libxc"; + rev = version; + sha256 = "0cy3x2zn1bldc5i0rzislfbc8h4nqgds445jkfqjv0d1shvdy0zn"; + }; + + buildInputs = [ gfortran ]; + nativeBuildInputs = [ perl cmake ]; + + preConfigure = '' + patchShebangs ./ + ''; + + cmakeFlags = [ "-DENABLE_FORTRAN=ON" "-DBUILD_SHARED_LIBS=ON" ]; + + preCheck = '' + export LD_LIBRARY_PATH=$(pwd) + ''; + + 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 = [ "x86_64-linux" ]; + maintainers = with maintainers; [ markuskowa ]; + }; +} |