Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
118 lines
2.0 KiB
Nix
118 lines
2.0 KiB
Nix
{
|
|
lib,
|
|
stdenv,
|
|
fetchFromGitLab,
|
|
cmake,
|
|
pkg-config,
|
|
ninja,
|
|
gfortran,
|
|
which,
|
|
perl,
|
|
procps,
|
|
libvdwxc,
|
|
libyaml,
|
|
libxc,
|
|
fftw,
|
|
blas,
|
|
lapack,
|
|
gsl,
|
|
netcdf,
|
|
arpack,
|
|
spglib,
|
|
metis,
|
|
scalapack,
|
|
mpi,
|
|
enableMpi ? true,
|
|
python3,
|
|
}:
|
|
|
|
assert (!blas.isILP64) && (!lapack.isILP64);
|
|
assert (blas.isILP64 == arpack.isILP64);
|
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
|
pname = "octopus";
|
|
version = "16.2";
|
|
|
|
src = fetchFromGitLab {
|
|
owner = "octopus-code";
|
|
repo = "octopus";
|
|
tag = finalAttrs.version;
|
|
hash = "sha256-L97igB+bdZ19zpbffHi8DVSJXKtUyDqauUB+l5zzFwQ=";
|
|
};
|
|
|
|
outputs = [
|
|
"out"
|
|
"dev"
|
|
"testsuite"
|
|
];
|
|
|
|
nativeBuildInputs = [
|
|
which
|
|
perl
|
|
procps
|
|
cmake
|
|
gfortran
|
|
pkg-config
|
|
ninja
|
|
];
|
|
|
|
buildInputs = [
|
|
libyaml
|
|
libxc
|
|
blas
|
|
lapack
|
|
gsl
|
|
fftw
|
|
netcdf
|
|
arpack
|
|
libvdwxc
|
|
spglib
|
|
metis
|
|
(python3.withPackages (ps: [ ps.pyyaml ]))
|
|
]
|
|
++ lib.optional enableMpi scalapack;
|
|
|
|
propagatedBuildInputs = lib.optional enableMpi mpi;
|
|
propagatedUserEnvPkgs = lib.optional enableMpi mpi;
|
|
|
|
cmakeFlags = [
|
|
(lib.cmakeBool "OCTOPUS_MPI" enableMpi)
|
|
(lib.cmakeBool "OCTOPUS_ScaLAPACK" enableMpi)
|
|
(lib.cmakeBool "OCTOPUS_OpenMP" true)
|
|
(lib.cmakeBool "OCTOPUS_SHARED_LIBS" (!stdenv.hostPlatform.isStatic))
|
|
];
|
|
|
|
nativeCheckInputs = lib.optional enableMpi mpi;
|
|
doCheck = false; # requires installed data
|
|
|
|
postPatch = ''
|
|
patchShebangs ./
|
|
'';
|
|
|
|
postConfigure = ''
|
|
patchShebangs testsuite/oct-run_testsuite.sh
|
|
'';
|
|
|
|
postInstall = ''
|
|
mkdir -p $testsuite
|
|
moveToOutput share/octopus/testsuite $testsuite
|
|
'';
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
passthru = lib.attrsets.optionalAttrs enableMpi { inherit mpi; };
|
|
|
|
meta = {
|
|
description = "Real-space time dependent density-functional theory code";
|
|
homepage = "https://octopus-code.org";
|
|
maintainers = with lib.maintainers; [ markuskowa ];
|
|
license = with lib.licenses; [
|
|
gpl2Only
|
|
asl20
|
|
lgpl3Plus
|
|
bsd3
|
|
];
|
|
platforms = [ "x86_64-linux" ];
|
|
};
|
|
})
|