-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathflake.nix
87 lines (74 loc) · 2.69 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
{
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;
};
toolchain = fenix.packages.${system}.toolchainOf {
channel = "1.84";
date = "2025-01-09";
sha256 = "lMLAupxng4Fd9F1oDw8gx+qA0RuF7ou7xhNU8wgs0PU=";
};
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;
nativeBuildInputs = with pkgs; [
cmake
flatbuffers
perl
tcl
pkg-config
];
buildInputs = with pkgs; [
openssl
cyrus_sasl
];
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;
};
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;}
// import ./simulator {inherit pkgs naersk' version gitRevision nativeBuildInputs buildInputs;}
// import ./trace-archiver-hdf5 {inherit pkgs naersk' version gitRevision nativeBuildInputs buildInputs;}
// 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;};
}
);
}