mirror of
https://gitlab.com/TECHNOFAB/nixtest.git
synced 2025-12-12 02:00:18 +01:00
fix(package): use filesets so nixtest doesnt get rebuilt all the time
This commit is contained in:
parent
0b783157bb
commit
25de5061ad
1 changed files with 14 additions and 8 deletions
22
package.nix
22
package.nix
|
|
@ -1,15 +1,21 @@
|
|||
{buildGoModule, ...}:
|
||||
{
|
||||
lib,
|
||||
buildGoModule,
|
||||
...
|
||||
}:
|
||||
buildGoModule {
|
||||
name = "nixtest";
|
||||
src =
|
||||
# filter everything except for cmd/ and go.mod, go.sum
|
||||
builtins.filterSource (
|
||||
path: type:
|
||||
builtins.match ".*(/cmd/?.*|/go\.(mod|sum))$"
|
||||
path
|
||||
!= null
|
||||
)
|
||||
./.;
|
||||
with lib.fileset;
|
||||
toSource {
|
||||
root = ./.;
|
||||
fileset = unions [
|
||||
./cmd
|
||||
./go.mod
|
||||
./go.sum
|
||||
];
|
||||
};
|
||||
subPackages = ["cmd/nixtest"];
|
||||
vendorHash = "sha256-Hmdtkp3UK/lveE2/U6FmKno38DxY+MMQlQuZFf1UBME=";
|
||||
meta.mainProgram = "nixtest";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue