Skip to content

Commit

Permalink
flake: filter for json5, add pbf-linker and rust-bindgen inputs
Browse files Browse the repository at this point in the history
  • Loading branch information
ozwaldorf authored and kckeiks committed May 16, 2024
1 parent c65ebeb commit 83f45bf
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 8 deletions.
20 changes: 13 additions & 7 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,16 @@
);

# Allow markdown and bin files for some `include!()` uses
markdownFilter = path: _type: builtins.match ".*md$" path != null;
binFilter = path: _type: builtins.match ".*bin$" path != null;
jsFilter = path: _type: builtins.match ".*js$" path != null;
markdownFilter = path: builtins.match ".*md$" path != null;
binFilter = path: builtins.match ".*bin$" path != null;
jsFilter = path: builtins.match ".*js$" path != null;
json5Filter = path: builtins.match ".*json5$" path != null;
filter =
path: type:
(markdownFilter path type)
|| (binFilter path type)
|| (jsFilter path type)
(markdownFilter path)
|| (binFilter path)
|| (jsFilter path)
|| (json5Filter path)
|| (craneLib.filterCargoSources path type);

src = lib.cleanSourceWith {
Expand Down Expand Up @@ -120,6 +122,10 @@
bzip2
lz4
onnxruntime

# ebpf deps needed at runtime for debug builds via `admin ebpf build`
rust-bindgen
bpf-linker
]
++ lib.optionals pkgs.stdenv.isDarwin [
# MacOS specific packages
Expand Down Expand Up @@ -234,7 +240,7 @@
devShells.default = craneLib.devShell (
commonVars
// {
# Inherit inputs from checks.
# Inherit inputs from checks
checks = self.checks.${system};
packages = [ pkgs.rust-analyzer ];
}
Expand Down
2 changes: 1 addition & 1 deletion rust-toolchain
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[toolchain]
channel = "nightly-2023-12-28"
components = ["cargo", "rust-std", "rustc", "rustfmt", "clippy"]
components = ["cargo", "rust-std", "rust-src", "rustc", "rustfmt", "clippy"]

0 comments on commit 83f45bf

Please sign in to comment.