nixpkgs/pkgs/applications/science/chemistry/octopus/default.nix

50 lines
1.3 KiB
Nix
Raw Normal View History

2018-01-21 01:24:24 +00:00
{ stdenv, fetchurl, symlinkJoin, gfortran, perl, procps
, libyaml, libxc, fftw, openblas, gsl, netcdf, arpack
2018-01-21 01:24:24 +00:00
}:
let
2019-03-28 17:00:41 +00:00
version = "8.4";
2018-01-21 01:24:24 +00:00
fftwAll = symlinkJoin { name ="ftw-dev-out"; paths = [ fftw.dev fftw.out ]; };
in stdenv.mkDerivation {
name = "octopus-${version}";
src = fetchurl {
url = "http://www.tddft.org/programs/octopus/down.php?file=${version}/octopus-${version}.tar.gz";
2019-03-28 17:00:41 +00:00
sha256 = "1fx5ssnf65b9ld7xs9rvvg8i80pblxpyhqkir0a7xshkk1g60z55";
2018-01-21 01:24:24 +00:00
};
nativeBuildInputs = [ perl procps fftw.dev ];
buildInputs = [ libyaml gfortran libxc openblas gsl fftw.out netcdf arpack ];
2018-01-21 01:24:24 +00:00
configureFlags = [
"--with-yaml-prefix=${libyaml}"
"--with-blas=-lopenblas"
"--with-lapack=-lopenblas"
"--with-fftw-prefix=${fftwAll}"
"--with-gsl-prefix=${gsl}"
"--with-libxc-prefix=${libxc}"
];
2018-01-21 01:24:24 +00:00
doCheck = false;
checkTarget = "check-short";
postPatch = ''
patchShebangs ./
'';
postConfigure = ''
patchShebangs testsuite/oct-run_testsuite.sh
'';
enableParallelBuilding = true;
2018-01-21 01:24:24 +00:00
meta = with stdenv.lib; {
description = "Real-space time dependent density-functional theory code";
homepage = http://octopus-code.org;
maintainers = with maintainers; [ markuskowa ];
license = licenses.gpl2;
platforms = [ "x86_64-linux" ];
};
}