Skip to content

Commit

Permalink
Filter uniond src and remove coreutils-full from uniond-image (c…
Browse files Browse the repository at this point in the history
…loses unionlabs#637 (unionlabs#638)

- refactor(uniond): filter `src`
- fix(uniond-image): remove coreutils
  • Loading branch information
cor authored Sep 6, 2023
2 parents 4ca58b7 + be71d0a commit 32db8b0
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions uniond/uniond.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{ ... }: {
perSystem = { pkgs, self', crane, system, ensureAtRepositoryRoot, ... }:
perSystem = { pkgs, self', crane, system, ensureAtRepositoryRoot, nix-filter, ... }:
let
CGO_CFLAGS = "-I${pkgs.libblst}/include -I${pkgs.libblst.src}/src -I${pkgs.libblst.src}/build -I${self'.packages.bls-eth.src}/bls/include -O -D__BLST_PORTABLE__";
CGO_LDFLAGS = "-z noexecstack -static -L${pkgs.musl}/lib -L${self'.packages.libwasmvm}/lib -L${self'.packages.bls-eth}/lib";
Expand Down Expand Up @@ -36,7 +36,15 @@
else
pkgs.buildGoModule) ({
name = "uniond";
src = ./.;
src = nix-filter
{
name = "uniond-source";
root = ./.;
exclude = [
(nix-filter.matchExt "nix")
(nix-filter.matchExt "md")
];
};
vendorSha256 = null;
doCheck = true;
meta.mainProgram = "uniond";
Expand Down Expand Up @@ -66,7 +74,7 @@

copyToRoot = pkgs.buildEnv {
name = "image-root";
paths = [ pkgs.coreutils-full pkgs.cacert ];
paths = [ pkgs.cacert ];
pathsToLink = [ "/bin" ];
};
config = {
Expand Down

0 comments on commit 32db8b0

Please sign in to comment.