2021-02-05 17:12:51 +00:00
|
|
|
{ lib, stdenv, fetchFromGitLab, cmake, gfortran, perl }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
let
|
2021-02-16 17:04:54 +00:00
|
|
|
version = "5.1.2";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
in stdenv.mkDerivation {
|
|
|
|
pname = "libxc";
|
|
|
|
inherit version;
|
2021-02-05 17:12:51 +00:00
|
|
|
|
|
|
|
src = fetchFromGitLab {
|
|
|
|
owner = "libxc";
|
|
|
|
repo = "libxc";
|
|
|
|
rev = version;
|
2021-02-16 17:04:54 +00:00
|
|
|
sha256 = "1bcj7x0kaal62m41v9hxb4h1d2cxs2ynvsfqqg7c5yi7829nvapb";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [ gfortran ];
|
2021-02-05 17:12:51 +00:00
|
|
|
nativeBuildInputs = [ perl cmake ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
preConfigure = ''
|
|
|
|
patchShebangs ./
|
|
|
|
'';
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
cmakeFlags = [ "-DENABLE_FORTRAN=ON" "-DBUILD_SHARED_LIBS=ON" ];
|
|
|
|
|
|
|
|
preCheck = ''
|
|
|
|
export LD_LIBRARY_PATH=$(pwd)
|
|
|
|
'';
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
doCheck = true;
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Library of exchange-correlation functionals for density-functional theory";
|
2021-02-05 17:12:51 +00:00
|
|
|
homepage = "https://www.tddft.org/programs/Libxc/";
|
|
|
|
license = licenses.mpl20;
|
2020-04-24 23:36:52 +00:00
|
|
|
platforms = [ "x86_64-linux" ];
|
|
|
|
maintainers = with maintainers; [ markuskowa ];
|
|
|
|
};
|
|
|
|
}
|