Skip to content

Commit

Permalink
Switch to hdf5-metno (#300)
Browse files Browse the repository at this point in the history
## Summary of changes

- Switches to `hdf5-metno` from `hdf5` which is now unmaintained (see
aldanor/hdf5-rust#295)
- Install libhdf5 via build and static link rather than via Nix

## Instruction for review/testing

- Code review
- See that `nexus-writer` still writes valid NeXus files
  • Loading branch information
DanNixon authored Jan 17, 2025
1 parent aebd1df commit 30e9dd1
Show file tree
Hide file tree
Showing 6 changed files with 69 additions and 104 deletions.
141 changes: 66 additions & 75 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ clap = { version = "4.5", features = ["derive", "env"] }
crossterm = "0.26.1"
flatbuffers = "22.12.6"
glob = "0.3.2"
hdf5 = "0.8.1"
hdf5 = { package = "hdf5-metno", version = "0.9.4", features = ["static"] }
itertools = "0.13.0"
lazy_static = "1.5.0"
metrics = "0.22.3"
Expand Down
15 changes: 2 additions & 13 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,6 @@
system: let
pkgs = (import nixpkgs) {
inherit system;
overlays = [
(import ./nix/overlays/hdf5.nix)
];
};

toolchain = fenix.packages.${system}.toolchainOf {
Expand All @@ -41,23 +38,16 @@
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";
Expand All @@ -80,15 +70,14 @@
];

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 ./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 hdf5-joined;}
// 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;}
Expand Down
3 changes: 0 additions & 3 deletions nexus-writer/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
gitRevision,
nativeBuildInputs,
buildInputs,
hdf5-joined,
}: rec {
nexus-writer = naersk'.buildPackage {
name = "nexus-writer";
Expand All @@ -20,8 +19,6 @@
overrideMain = p: {
GIT_REVISION = gitRevision;
};

HDF5_DIR = "${hdf5-joined}";
};

nexus-writer-container-image = pkgs.dockerTools.buildImage {
Expand Down
9 changes: 0 additions & 9 deletions nix/overlays/hdf5.nix

This file was deleted.

3 changes: 0 additions & 3 deletions trace-archiver-hdf5/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
gitRevision,
nativeBuildInputs,
buildInputs,
hdf5-joined,
}: rec {
trace-archiver-hdf5 = naersk'.buildPackage {
name = "trace-archiver-hdf5";
Expand All @@ -20,8 +19,6 @@
overrideMain = p: {
GIT_REVISION = gitRevision;
};

HDF5_DIR = "${hdf5-joined}";
};

trace-archiver-hdf5-container-image = pkgs.dockerTools.buildImage {
Expand Down

0 comments on commit 30e9dd1

Please sign in to comment.