Skip to content

Commit

Permalink
build: fix nix-build via allowing asset files
Browse files Browse the repository at this point in the history
Adds a comprehensive allow-list of file extensions to the nix build
context. Includes zip files, which will fail a build as of #4782,
and other flat file inputs like CSV and JSON for testnet generation.
Also adds the `pindexer` binary to the nix-build outputs.
  • Loading branch information
conorsch committed Aug 7, 2024
1 parent c4db70a commit 190e867
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,13 @@
sha256 = "${penumbraRelease.sha256}";
};
filter = path: type:
# Retain proving and verification parameters, and no-lfs marker file ...
(builtins.match ".*\.(no_lfs|param|bin)$" path != null) ||
# Retain non-rust asset files as build inputs:
# * no_lfs, param, bin: proving and verification parameters
# * zip: frontend bundled assets
# * sql: database schema files for indexing
# * csv: default genesis allocations for testnet generation
# * json: default validator info for testnet generation
(builtins.match ".*\.(no_lfs|param|bin|zip|sql|csv|json)$" path != null) ||
# ... as well as all the normal cargo source files:
(craneLib.filterCargoSources path type);
};
Expand Down Expand Up @@ -130,6 +135,8 @@
pcli.program = "${penumbra}/bin/pcli";
pclientd.type = "app";
pclientd.program = "${penumbra}/bin/pclientd";
pindexer.type = "app";
pindexer.program = "${penumbra}/bin/pindexer";
cometbft.type = "app";
cometbft.program = "${cometbft}/bin/cometbft";
};
Expand Down

0 comments on commit 190e867

Please sign in to comment.