2021-01-15 22:18:51 +00:00
|
|
|
{ lib, stdenv, fetchFromGitLab, symlinkJoin, gfortran, perl, procps
|
2020-04-24 23:36:52 +00:00
|
|
|
, libyaml, libxc, fftw, blas, lapack, gsl, netcdf, arpack, autoreconfHook
|
2021-01-15 22:18:51 +00:00
|
|
|
, python3
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
assert (!blas.isILP64) && (!lapack.isILP64);
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "octopus";
|
2021-01-15 22:18:51 +00:00
|
|
|
version = "10.3";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitLab {
|
|
|
|
owner = "octopus-code";
|
|
|
|
repo = "octopus";
|
|
|
|
rev = version;
|
2021-01-15 22:18:51 +00:00
|
|
|
sha256 = "1axr3j53mi30gm3f645ga5jkhxbc7rbx432w2k2lgg6g9dv3fcs4";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ perl procps autoreconfHook ];
|
2021-01-15 22:18:51 +00:00
|
|
|
buildInputs = [
|
|
|
|
libyaml
|
|
|
|
gfortran
|
|
|
|
libxc
|
|
|
|
blas
|
|
|
|
lapack
|
|
|
|
gsl
|
|
|
|
fftw
|
|
|
|
netcdf
|
|
|
|
arpack
|
|
|
|
(python3.withPackages (ps: [ ps.pyyaml ]))
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
configureFlags = [
|
|
|
|
"--with-yaml-prefix=${libyaml}"
|
|
|
|
"--with-blas=-lblas"
|
|
|
|
"--with-lapack=-llapack"
|
|
|
|
"--with-fftw-prefix=${fftw.dev}"
|
|
|
|
"--with-gsl-prefix=${gsl}"
|
|
|
|
"--with-libxc-prefix=${libxc}"
|
|
|
|
];
|
|
|
|
|
|
|
|
doCheck = false;
|
|
|
|
checkTarget = "check-short";
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
patchShebangs ./
|
|
|
|
'';
|
|
|
|
|
|
|
|
postConfigure = ''
|
|
|
|
patchShebangs testsuite/oct-run_testsuite.sh
|
|
|
|
'';
|
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Real-space time dependent density-functional theory code";
|
|
|
|
homepage = "https://octopus-code.org";
|
|
|
|
maintainers = with maintainers; [ markuskowa ];
|
2021-01-15 22:18:51 +00:00
|
|
|
license = with licenses; [ gpl2Only asl20 lgpl3Plus bsd3 ];
|
2020-04-24 23:36:52 +00:00
|
|
|
platforms = [ "x86_64-linux" ];
|
|
|
|
};
|
|
|
|
}
|