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
101 lines
1.7 KiB
Nix
101 lines
1.7 KiB
Nix
{
|
|
stdenv,
|
|
lib,
|
|
fetchFromGitHub,
|
|
gfortran,
|
|
buildType ? "meson",
|
|
cmake,
|
|
meson,
|
|
ninja,
|
|
pkg-config,
|
|
python3,
|
|
blas,
|
|
lapack,
|
|
mctc-lib,
|
|
mstore,
|
|
multicharge,
|
|
}:
|
|
|
|
assert !blas.isILP64 && !lapack.isILP64;
|
|
assert (
|
|
builtins.elem buildType [
|
|
"meson"
|
|
"cmake"
|
|
]
|
|
);
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "dftd4";
|
|
version = "3.7.0";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "dftd4";
|
|
repo = "dftd4";
|
|
rev = "v${version}";
|
|
hash = "sha256-dixPCLH5dWkE2/7ghGEXJmX2/g1DN30dB4jX2d7fmio=";
|
|
};
|
|
|
|
patches = [
|
|
# Make sure fortran headers are installed directly in /include
|
|
./fortran-module-dir.patch
|
|
|
|
# Fix wrong generation of package config include paths
|
|
./cmake.patch
|
|
];
|
|
|
|
nativeBuildInputs = [
|
|
gfortran
|
|
pkg-config
|
|
python3
|
|
]
|
|
++ lib.optionals (buildType == "meson") [
|
|
meson
|
|
ninja
|
|
]
|
|
++ lib.optional (buildType == "cmake") cmake;
|
|
|
|
buildInputs = [
|
|
blas
|
|
lapack
|
|
];
|
|
|
|
propagatedBuildInputs = [
|
|
mctc-lib
|
|
mstore
|
|
multicharge
|
|
];
|
|
|
|
cmakeFlags = [
|
|
(lib.strings.cmakeBool "BUILD_SHARED_LIBS" (!stdenv.hostPlatform.isStatic))
|
|
];
|
|
|
|
outputs = [
|
|
"out"
|
|
"dev"
|
|
];
|
|
|
|
doCheck = true;
|
|
|
|
postPatch = ''
|
|
patchShebangs --build \
|
|
config/install-mod.py \
|
|
app/tester.py
|
|
'';
|
|
|
|
preCheck = ''
|
|
export OMP_NUM_THREADS=2
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "Generally Applicable Atomic-Charge Dependent London Dispersion Correction";
|
|
mainProgram = "dftd4";
|
|
license = with licenses; [
|
|
lgpl3Plus
|
|
gpl3Plus
|
|
];
|
|
homepage = "https://github.com/grimme-lab/dftd4";
|
|
platforms = platforms.linux;
|
|
maintainers = [ maintainers.sheepforce ];
|
|
};
|
|
}
|