nixpkgs/pkgs/by-name/oc/octopus/package.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

100 lines
1.7 KiB
Nix
Raw Normal View History

2024-01-30 09:55:16 +00:00
{ lib
, stdenv
, fetchFromGitLab
2024-03-29 12:39:18 +00:00
, cmake
, pkg-config
, ninja
2024-01-30 09:55:16 +00:00
, gfortran
, which
, perl
, procps
, libvdwxc
, libyaml
, libxc
, fftw
, blas
, lapack
, gsl
, netcdf
, arpack
2024-03-29 12:39:18 +00:00
, spglib
, metis
2024-01-30 09:55:16 +00:00
, scalapack
, mpi
, enableMpi ? true
2021-01-09 15:29:58 +00:00
, python3
2018-01-21 01:24:24 +00:00
}:
assert (!blas.isILP64) && (!lapack.isILP64);
2022-11-03 11:50:08 +00:00
assert (blas.isILP64 == arpack.isILP64);
stdenv.mkDerivation rec {
pname = "octopus";
2024-05-10 13:16:47 +00:00
version = "14.1";
2018-01-21 01:24:24 +00:00
src = fetchFromGitLab {
owner = "octopus-code";
repo = "octopus";
rev = version;
hash = "sha256-8wZR+bYdxJFsUPMWbIGYxRdNzjLgHm+KFLjY7fSN7io=";
2018-01-21 01:24:24 +00:00
};
2021-07-12 12:15:05 +00:00
nativeBuildInputs = [
which
2021-07-12 12:15:05 +00:00
perl
procps
2024-03-29 12:39:18 +00:00
cmake
2021-07-12 12:15:05 +00:00
gfortran
2024-03-29 12:39:18 +00:00
pkg-config
ninja
2021-07-12 12:15:05 +00:00
];
2021-01-09 15:29:58 +00:00
buildInputs = [
libyaml
libxc
blas
lapack
gsl
fftw
netcdf
arpack
2024-01-30 09:55:16 +00:00
libvdwxc
2024-03-29 12:39:18 +00:00
spglib
metis
2021-01-09 15:29:58 +00:00
(python3.withPackages (ps: [ ps.pyyaml ]))
2024-01-30 09:55:16 +00:00
] ++ lib.optional enableMpi scalapack;
propagatedBuildInputs = lib.optional enableMpi mpi;
propagatedUserEnvPkgs = lib.optional enableMpi mpi;
2018-01-21 01:24:24 +00:00
2024-03-29 12:39:18 +00:00
cmakeFlags = [
(lib.cmakeBool "OCTOPUS_MPI" enableMpi)
(lib.cmakeBool "OCTOPUS_ScaLAPACK" enableMpi)
(lib.cmakeBool "OCTOPUS_OpenMP" true)
2024-01-30 09:55:16 +00:00
];
2018-01-21 01:24:24 +00:00
2024-01-30 09:55:16 +00:00
nativeCheckInputs = lib.optional.enableMpi mpi;
2018-01-21 01:24:24 +00:00
doCheck = false;
checkTarget = "check-short";
postPatch = ''
patchShebangs ./
'';
postConfigure = ''
patchShebangs testsuite/oct-run_testsuite.sh
'';
enableParallelBuilding = true;
2024-01-30 09:55:16 +00:00
passthru = lib.attrsets.optionalAttrs enableMpi { inherit mpi; };
meta = with lib; {
2018-01-21 01:24:24 +00:00
description = "Real-space time dependent density-functional theory code";
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" ];
};
}