nixpkgs/pkgs/development/libraries/libxc/default.nix

41 lines
900 B
Nix
Raw Normal View History

2021-01-26 20:57:03 +00:00
{ lib, stdenv, fetchFromGitLab, cmake, gfortran, perl }:
2017-12-31 05:11:12 +00:00
let
2021-02-14 16:57:07 +00:00
version = "5.1.2";
2018-01-26 04:36:48 +00:00
2017-12-31 05:11:12 +00:00
in stdenv.mkDerivation {
2019-08-13 22:52:01 +01:00
pname = "libxc";
inherit version;
2021-01-26 20:57:03 +00:00
src = fetchFromGitLab {
owner = "libxc";
repo = "libxc";
rev = version;
2021-02-14 16:57:07 +00:00
sha256 = "1bcj7x0kaal62m41v9hxb4h1d2cxs2ynvsfqqg7c5yi7829nvapb";
2017-12-31 05:11:12 +00:00
};
buildInputs = [ gfortran ];
2021-01-26 20:57:03 +00:00
nativeBuildInputs = [ perl cmake ];
2017-12-31 05:11:12 +00:00
preConfigure = ''
patchShebangs ./
'';
2021-01-26 20:57:03 +00:00
cmakeFlags = [ "-DENABLE_FORTRAN=ON" "-DBUILD_SHARED_LIBS=ON" ];
preCheck = ''
export LD_LIBRARY_PATH=$(pwd)
'';
2017-12-31 05:11:12 +00:00
doCheck = true;
enableParallelBuilding = true;
meta = with lib; {
2017-12-31 05:11:12 +00:00
description = "Library of exchange-correlation functionals for density-functional theory";
2021-01-26 20:57:03 +00:00
homepage = "https://www.tddft.org/programs/Libxc/";
license = licenses.mpl20;
platforms = [ "x86_64-linux" ];
2017-12-31 06:52:39 +00:00
maintainers = with maintainers; [ markuskowa ];
2017-12-31 05:11:12 +00:00
};
}