mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-04 20:13:21 +00:00
571c71e6f7
We are migrating packages that meet below requirements: 1. using `callPackage` 2. called path is a directory 3. overriding set is empty (`{ }`) 4. not containing path expressions other than relative path (to makenixpkgs-vet happy) 5. not referenced by nix files outside of the directory, other than`pkgs/top-level/all-packages.nix` 6. not referencing nix files outside of the directory 7. not referencing `default.nix` (since it's changed to `package.nix`) 8. `outPath` doesn't change after migration The tool is here: https://github.com/Aleksanaa/by-name-migrate.
61 lines
1.2 KiB
Nix
61 lines
1.2 KiB
Nix
{ stdenv
|
|
, lib
|
|
, fetchFromGitHub
|
|
, gfortran
|
|
, meson
|
|
, ninja
|
|
, pkg-config
|
|
, python3
|
|
, blas
|
|
, lapack
|
|
, mctc-lib
|
|
, mstore
|
|
, multicharge
|
|
}:
|
|
|
|
assert !blas.isILP64 && !lapack.isILP64;
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "dftd4";
|
|
version = "3.6.0";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "dftd4";
|
|
repo = pname;
|
|
rev = "v${version}";
|
|
hash = "sha256-VIV9953hx0MZupOARdH+P1h7JtZeJmTlqtO8si+lwdU=";
|
|
};
|
|
|
|
patches = [
|
|
# Make sure fortran headers are installed directly in /include
|
|
./fortran-module-dir.patch
|
|
];
|
|
|
|
nativeBuildInputs = [ gfortran meson ninja pkg-config python3 ];
|
|
|
|
buildInputs = [ blas lapack mctc-lib mstore multicharge ];
|
|
|
|
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 ];
|
|
};
|
|
}
|