mirror of
https://gitlab.com/TECHNOFAB/nixtest.git
synced 2025-12-12 10:10:09 +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 {
|
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";
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue