Skip to content

Commit

Permalink
flake: filter src
Browse files Browse the repository at this point in the history
Signed-off-by: Paul Meyer <katexochen0@gmail.com>
  • Loading branch information
katexochen committed Dec 16, 2024
1 parent ca9f408 commit 7a7769e
Showing 1 changed file with 17 additions and 11 deletions.
28 changes: 17 additions & 11 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,23 @@
uplosi = pkgs.buildGoModule {
pname = "uplosi";
version = "devel";
src = ./.;

src =
let
inherit (pkgs.lib) fileset path hasSuffix;
root = ./.;
in
fileset.toSource {
inherit root;
fileset = fileset.unions [
(fileset.fileFilter (file: hasSuffix ".go" file.name) root)
(path.append root "go.mod")
(path.append root "go.sum")
(path.append root "config/validation.rego")
(path.append root "measured-boot/internal/testdata/uki.efi")
];
};

# this needs to be updated together with go.mod / go.sum
vendorHash = "sha256-2lJmPNLpI1ksFb0EtcjPjyTy7eX1DKeX0F80k9FtGno=";

Expand All @@ -45,16 +61,6 @@
--fish <($out/bin/uplosi completion fish) \
--zsh <($out/bin/uplosi completion zsh)
'';

meta = with pkgs.lib; {
description = "Upload OS images to cloud provider";
homepage = "https://github.com/edgelesssys/uplosi";
maintainers = with maintainers; [
katexochen
malt3
];
license = licenses.asl20;
};
};

treefmtEval = treefmt-nix.lib.evalModule pkgs ./treefmt.nix;
Expand Down

0 comments on commit 7a7769e

Please sign in to comment.