-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpacific.nix
More file actions
74 lines (66 loc) · 1.45 KB
/
pacific.nix
File metadata and controls
74 lines (66 loc) · 1.45 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
{
lib,
stdenv,
fetchFromGitHub,
cmake,
pkg-config,
gnumake,
gcc,
openmpi,
hdf5-mpi,
zlib,
xercesc,
makeWrapper,
}:
stdenv.mkDerivation {
pname = "pacific";
version = "0.0.1";
# Build the current source tree (this repo checkout)
src = fetchFromGitHub {
owner = "tortotubus";
repo = "PacIFiC";
rev = "2f26363b1f18bb4ca6bca9964b6d679b6fb0a777";
hash = "sha256-aRdoKZGOr+nhRwuUHFytxhNSJo6QTKObnVwUqReCBYo=";
fetchSubmodules = true;
};
nativeBuildInputs = [
gcc
cmake
gnumake
pkg-config
makeWrapper
];
buildInputs = [
xercesc
zlib
(hdf5-mpi.override { mpi = openmpi; })
openmpi
];
propagatedBuildInputs = [
xercesc
zlib
(hdf5-mpi.override { mpi = openmpi; })
openmpi
];
cmakeFlags = [
# "-DCMAKE_C_COMPILER=${openmpi}/bin/mpicc"
# "-DCMAKE_CXX_COMPILER=${openmpi}/bin/mpicxx"
"-DCMAKE_BUILD_TYPE=Release"
"-DUSE_SUBMODULES=ON"
"-DOCTREE_BASILISK_PROVIDER=VENDORED"
];
# Optional: ensure mpirun is available when running the installed executables
# postFixup = ''
# for p in $out/bin/*; do
# [ -x "$p" ] || continue
# wrapProgram "$p" --prefix PATH : ${lib.makeBinPath [ openmpi ]}
# done
# '';
meta = with lib; {
description = "PacIFiC multiphysics toolkit";
homepage = "https://github.com/tortotubus/PacIFiC";
platforms = platforms.linux;
license = licenses.mit;
mainProgram = "grains";
};
}