2021-01-26 20:57:03 +00:00
|
|
|
{ lib, stdenv, fetchFromGitLab, cmake, gfortran, perl }:
|
2017-12-31 05:11:12 +00:00
|
|
|
|
|
|
|
let
|
2021-01-26 20:57:03 +00:00
|
|
|
version = "5.1.0";
|
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;
|
|
|
|
sha256 = "0qbxh0lfx4cab1fk1qfnx72g4yvs376zqrq74jn224vy32nam2x7";
|
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;
|
|
|
|
|
2021-01-21 17:00:13 +00:00
|
|
|
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;
|
2018-01-26 21:40:06 +00:00
|
|
|
platforms = [ "x86_64-linux" ];
|
2017-12-31 06:52:39 +00:00
|
|
|
maintainers = with maintainers; [ markuskowa ];
|
2017-12-31 05:11:12 +00:00
|
|
|
};
|
|
|
|
}
|