2021-07-12 12:15:05 +00:00
|
|
|
{ lib, stdenv, fetchFromGitLab, gfortran, perl, procps
|
2020-03-31 14:47:18 +00:00
|
|
|
, libyaml, libxc, fftw, blas, lapack, gsl, netcdf, arpack, autoreconfHook
|
2021-01-09 15:29:58 +00:00
|
|
|
, python3
|
2021-09-16 10:53:47 +00:00
|
|
|
, enableFma ? stdenv.hostPlatform.fmaSupport
|
|
|
|
, enableFma4 ? stdenv.hostPlatform.fma4Support
|
|
|
|
, enableAvx ? stdenv.hostPlatform.avx2Support
|
|
|
|
, enableAvx512 ? stdenv.hostPlatform.avx512Support
|
2018-01-21 01:24:24 +00:00
|
|
|
}:
|
|
|
|
|
2020-04-20 20:50:55 +00:00
|
|
|
assert (!blas.isILP64) && (!lapack.isILP64);
|
2020-03-31 14:47:18 +00:00
|
|
|
|
2019-08-19 08:24:44 +00:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "octopus";
|
2021-11-27 23:04:47 +00:00
|
|
|
version = "11.3";
|
2018-01-21 01:24:24 +00:00
|
|
|
|
2019-08-19 08:24:44 +00:00
|
|
|
src = fetchFromGitLab {
|
|
|
|
owner = "octopus-code";
|
|
|
|
repo = "octopus";
|
|
|
|
rev = version;
|
2021-11-27 23:04:47 +00:00
|
|
|
sha256 = "0n04yvnc0rg3lvnkkdpbwkfl6zg544260p3s65vwkc5dflrhk34r";
|
2018-01-21 01:24:24 +00:00
|
|
|
};
|
|
|
|
|
2021-07-12 12:15:05 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
perl
|
|
|
|
procps
|
|
|
|
autoreconfHook
|
|
|
|
gfortran
|
|
|
|
];
|
|
|
|
|
2021-01-09 15:29:58 +00:00
|
|
|
buildInputs = [
|
|
|
|
libyaml
|
|
|
|
libxc
|
|
|
|
blas
|
|
|
|
lapack
|
|
|
|
gsl
|
|
|
|
fftw
|
|
|
|
netcdf
|
|
|
|
arpack
|
|
|
|
(python3.withPackages (ps: [ ps.pyyaml ]))
|
|
|
|
];
|
2018-01-21 01:24:24 +00:00
|
|
|
|
2021-09-16 10:53:47 +00:00
|
|
|
configureFlags = with lib; [
|
2018-07-25 21:44:21 +00:00
|
|
|
"--with-yaml-prefix=${libyaml}"
|
2020-03-31 14:47:18 +00:00
|
|
|
"--with-blas=-lblas"
|
|
|
|
"--with-lapack=-llapack"
|
2019-08-19 08:24:44 +00:00
|
|
|
"--with-fftw-prefix=${fftw.dev}"
|
2018-07-25 21:44:21 +00:00
|
|
|
"--with-gsl-prefix=${gsl}"
|
|
|
|
"--with-libxc-prefix=${libxc}"
|
2021-09-16 10:53:47 +00:00
|
|
|
"--enable-openmp"
|
|
|
|
] ++ optional enableFma "--enable-fma3"
|
|
|
|
++ optional enableFma4 "--enable-fma4"
|
|
|
|
++ optional enableAvx "--enable-avx"
|
|
|
|
++ optional enableAvx512 "--enable-avx512";
|
2018-01-21 01:24:24 +00:00
|
|
|
|
|
|
|
doCheck = false;
|
|
|
|
checkTarget = "check-short";
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
patchShebangs ./
|
|
|
|
'';
|
|
|
|
|
|
|
|
postConfigure = ''
|
|
|
|
patchShebangs testsuite/oct-run_testsuite.sh
|
|
|
|
'';
|
|
|
|
|
2018-07-13 22:37:30 +00:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2018-01-21 01:24:24 +00:00
|
|
|
description = "Real-space time dependent density-functional theory code";
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://octopus-code.org";
|
2018-01-21 01:24:24 +00:00
|
|
|
maintainers = with maintainers; [ markuskowa ];
|
2021-01-09 15:30:12 +00:00
|
|
|
license = with licenses; [ gpl2Only asl20 lgpl3Plus bsd3 ];
|
2018-01-21 01:24:24 +00:00
|
|
|
platforms = [ "x86_64-linux" ];
|
|
|
|
};
|
|
|
|
}
|