nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 stdenv,
3 lib,
4 fetchFromGitHub,
5 gfortran,
6 meson,
7 ninja,
8 pkg-config,
9 mctc-lib,
10 mstore,
11 toml-f,
12 blas,
13}:
14
15assert !blas.isILP64;
16
17stdenv.mkDerivation rec {
18 pname = "simple-dftd3";
19 version = "1.2.1";
20
21 src = fetchFromGitHub {
22 owner = "dftd3";
23 repo = pname;
24 tag = "v${version}";
25 hash = "sha256-c4xctcMcPQ70ippqbwtinygmnZ5en6ZGF5/v0ZWtzys=";
26 };
27
28 nativeBuildInputs = [
29 gfortran
30 meson
31 ninja
32 pkg-config
33 ];
34
35 buildInputs = [
36 mctc-lib
37 mstore
38 toml-f
39 blas
40 ];
41
42 outputs = [
43 "out"
44 "dev"
45 ];
46
47 doCheck = true;
48 preCheck = ''
49 export OMP_NUM_THREADS=2
50 '';
51
52 meta = with lib; {
53 description = "Reimplementation of the DFT-D3 program";
54 mainProgram = "s-dftd3";
55 license = with licenses; [
56 lgpl3Only
57 gpl3Only
58 ];
59 homepage = "https://github.com/dftd3/simple-dftd3";
60 platforms = platforms.linux;
61 maintainers = [ maintainers.sheepforce ];
62 };
63}