fix(package): use filesets so nixtest doesnt get rebuilt all the time

This commit is contained in:
technofab 2025-06-02 01:13:05 +02:00
parent 0b783157bb
commit 25de5061ad

View file

@ -1,15 +1,21 @@
{buildGoModule, ...}: {
lib,
buildGoModule,
...
}:
buildGoModule { buildGoModule {
name = "nixtest"; name = "nixtest";
src = src =
# filter everything except for cmd/ and go.mod, go.sum # filter everything except for cmd/ and go.mod, go.sum
builtins.filterSource ( with lib.fileset;
path: type: toSource {
builtins.match ".*(/cmd/?.*|/go\.(mod|sum))$" root = ./.;
path fileset = unions [
!= null ./cmd
) ./go.mod
./.; ./go.sum
];
};
subPackages = ["cmd/nixtest"]; subPackages = ["cmd/nixtest"];
vendorHash = "sha256-Hmdtkp3UK/lveE2/U6FmKno38DxY+MMQlQuZFf1UBME="; vendorHash = "sha256-Hmdtkp3UK/lveE2/U6FmKno38DxY+MMQlQuZFf1UBME=";
meta.mainProgram = "nixtest"; meta.mainProgram = "nixtest";