1 { lib, stdenv, fetchFromGitLab, gfortran, perl, procps
2 , libyaml, libxc, fftw, blas, lapack, gsl, netcdf, arpack, autoreconfHook
4 , enableFma ? stdenv.hostPlatform.fmaSupport
5 , enableFma4 ? stdenv.hostPlatform.fma4Support
6 , enableAvx ? stdenv.hostPlatform.avx2Support
7 , enableAvx512 ? stdenv.hostPlatform.avx512Support
10 assert (!blas.isILP64) && (!lapack.isILP64);
11 assert (blas.isILP64 == arpack.isILP64);
13 stdenv.mkDerivation rec {
17 src = fetchFromGitLab {
18 owner = "octopus-code";
21 sha256 = "sha256-CZ+Qmv6aBQ6w11mLvTP6QAJzaGs+vmmXuNGnSyAqVDU=";
40 (python3.withPackages (ps: [ ps.pyyaml ]))
43 configureFlags = with lib; [
44 "--with-yaml-prefix=${lib.getDev libyaml}"
46 "--with-lapack=-llapack"
47 "--with-fftw-prefix=${lib.getDev fftw}"
48 "--with-gsl-prefix=${lib.getDev gsl}"
49 "--with-libxc-prefix=${lib.getDev libxc}"
51 ] ++ optional enableFma "--enable-fma3"
52 ++ optional enableFma4 "--enable-fma4"
53 ++ optional enableAvx "--enable-avx"
54 ++ optional enableAvx512 "--enable-avx512";
57 checkTarget = "check-short";
64 patchShebangs testsuite/oct-run_testsuite.sh
67 enableParallelBuilding = true;
70 description = "Real-space time dependent density-functional theory code";
71 homepage = "https://octopus-code.org";
72 maintainers = with maintainers; [ markuskowa ];
73 license = with licenses; [ gpl2Only asl20 lgpl3Plus bsd3 ];
74 platforms = [ "x86_64-linux" ];