Skip to content

Commit

Permalink
nix: include js files for launcher build
Browse files Browse the repository at this point in the history
  • Loading branch information
jost-s committed May 22, 2024
1 parent 7b294ae commit 833e403
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,8 @@
craneLib.buildPackage {
pname = "lair-keystore";
version = "workspace";
# only build lair-keystore binary
cargoExtraArgs = "--bin lair-keystore";
# Use Lair keystore sources as defined in input dependencies and include only those files defined in the
# filter previously.
src = pkgs.lib.cleanSourceWith {
Expand All @@ -126,12 +128,14 @@
launcher =
let
# Crane filters out all non-cargo related files. Define include filter with files needed for build.
includeFilesFilter = path: type: (craneLib.filterCargoSources path type);
nonCargoBuildFiles = path: _type: builtins.match ".*(js)$" path != null;
includeFilesFilter = path: type:
(craneLib.filterCargoSources path type) || (nonCargoBuildFiles path type);
in
craneLib.buildPackage {
pname = "hc-launch";
version = "workspace";
# only build hc-launch command
# only build hc-launch binary
cargoExtraArgs = "--bin hc-launch";
# Use Launcher sources as defined in input dependencies and include only those files defined in the
# filter previously.
Expand Down

0 comments on commit 833e403

Please sign in to comment.