forked from smutch/meraxes
-
Notifications
You must be signed in to change notification settings - Fork 5
/
flake.nix
54 lines (50 loc) · 1.31 KB
/
flake.nix
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
{
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/612f97239e2cc474c13c9dafa0df378058c5ad8d";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = nixpkgs.legacyPackages.${system};
fftw-single = pkgs.fftw.override {
enableMpi = false;
precision = "single";
};
fftw-single-mpi = pkgs.fftw.override {
enableMpi = true;
precision = "single";
};
compileInputs = with pkgs; [
openmpi
gsl
hdf5-mpi
fftw-single-mpi
criterion
];
in
with pkgs;
{
devShell = mkShell {
buildInputs = [
cmake
fftw-single # <- required?
just
] ++ compileInputs;
clangdConf = pkgs.writeText ".clangd" (
''
CompileFlags:
Add:
'' + (
builtins.concatStringsSep "\n" (
map ( x: " - \"--include-directory=" + ( lib.makeSearchPathOutput "dev" "include" [x] ) + "\"" ) compileInputs
)
)
);
shellHook = ''
cp $clangdConf .clangd
'';
};
}
);
}