31 lines
891 B
Nix
31 lines
891 B
Nix
{ stdenv, fetchurl, gfortran, perl }:
|
|
|
|
let
|
|
common = scripts: version: sha256: stdenv.mkDerivation rec {
|
|
inherit version;
|
|
name = "libxc-${version}";
|
|
|
|
src = fetchurl {
|
|
url = "http://www.tddft.org/programs/octopus/down.php?file=libxc/${version}/libxc-${version}.tar.gz";
|
|
inherit sha256;
|
|
};
|
|
|
|
buildInputs = [ gfortran perl ];
|
|
|
|
postPatch = ''
|
|
patchShebangs ${scripts}
|
|
'';
|
|
|
|
meta = with stdenv.lib; {
|
|
homepage = http://octopus-code.org/wiki/Libxc;
|
|
description = "Libxc is a library of exchange-correlation functionals for density-functional theory.";
|
|
platforms = platforms.all;
|
|
license = licenses.gpl3;
|
|
};
|
|
};
|
|
|
|
in {
|
|
libxc404 = common "scripts" "4.0.4" "0j4ics5hkwjs1grivy8762b05fr8in7wswncm8ym65fy7v27kvxj";
|
|
libxc301 = common "src testsuite" "3.0.1" "1xyac89yx03vm86rvk07ps1d39xss3amw46a1k53mv30mgr94rl3";
|
|
}
|