-
Notifications
You must be signed in to change notification settings - Fork 3
/
flake.nix
98 lines (84 loc) · 3 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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/24.05";
fenix = {
url = "github:nix-community/fenix";
inputs.nixpkgs.follows = "nixpkgs";
};
naersk.url = "github:nix-community/naersk";
};
outputs = {
self,
nixpkgs,
flake-utils,
fenix,
naersk,
}:
flake-utils.lib.eachDefaultSystem (
system: let
pkgs = (import nixpkgs) {
inherit system;
overlays = [
(import ./nix/overlays/hdf5.nix)
];
};
toolchain = fenix.packages.${system}.toolchainOf {
channel = "1.75";
date = "2023-12-28";
sha256 = "SXRtAuO4IqNOQq+nLbrsDFbVk+3aVA8NNpSZsKlVH/8=";
};
naersk' = pkgs.callPackage naersk {
cargo = toolchain.rust;
rustc = toolchain.rust;
};
workspaceCargo = builtins.fromTOML (builtins.readFile ./Cargo.toml);
version = workspaceCargo.workspace.package.version;
gitRevision = self.shortRev or self.dirtyShortRev;
hdf5-joined = pkgs.symlinkJoin {
name = "hdf5";
paths = with pkgs; [hdf5 hdf5.dev];
};
nativeBuildInputs = with pkgs; [
cmake
flatbuffers
hdf5-joined
perl
tcl
pkg-config
];
buildInputs = with pkgs; [
openssl
cyrus_sasl
hdf5-joined
];
lintingRustFlags = "-D unused-crate-dependencies";
in {
devShell = pkgs.mkShell {
nativeBuildInputs = nativeBuildInputs ++ [toolchain.toolchain];
buildInputs = buildInputs;
packages = with pkgs; [
# Code formatting tools
alejandra
treefmt
mdl
# Container image management
skopeo
# Documentation tools
adrs
];
RUSTFLAGS = lintingRustFlags;
HDF5_DIR = "${hdf5-joined}";
};
packages =
import ./diagnostics {inherit pkgs naersk' version gitRevision nativeBuildInputs buildInputs;}
// import ./digitiser-aggregator {inherit pkgs naersk' version gitRevision nativeBuildInputs buildInputs;}
// import ./nexus-writer {inherit pkgs naersk' version gitRevision nativeBuildInputs buildInputs hdf5-joined;}
// import ./simulator {inherit pkgs naersk' version gitRevision nativeBuildInputs buildInputs;}
// import ./trace-archiver-hdf5 {inherit pkgs naersk' version gitRevision nativeBuildInputs buildInputs hdf5-joined;}
// import ./trace-archiver-tdengine {inherit pkgs naersk' version gitRevision nativeBuildInputs buildInputs;}
// import ./trace-reader {inherit pkgs naersk' version gitRevision nativeBuildInputs buildInputs;}
// import ./trace-telemetry-exporter {inherit pkgs naersk' version gitRevision nativeBuildInputs buildInputs;}
// import ./trace-to-events {inherit pkgs naersk' version gitRevision nativeBuildInputs buildInputs;};
}
);
}