fix: don't filter out tags in nix build
Signed-off-by: seth <getchoo@tuta.io>
This commit is contained in:
parent
640409f2e2
commit
4bf3136364
1 changed files with 3 additions and 1 deletions
|
@ -11,14 +11,16 @@
|
||||||
filter = path: type: let
|
filter = path: type: let
|
||||||
path' = toString path;
|
path' = toString path;
|
||||||
base = baseNameOf path';
|
base = baseNameOf path';
|
||||||
|
parent = baseNameOf (dirOf path');
|
||||||
|
|
||||||
dirBlocklist = ["nix"];
|
dirBlocklist = ["nix"];
|
||||||
|
|
||||||
matches = lib.any (suffix: lib.hasSuffix suffix base) [".rs"];
|
matches = lib.any (suffix: lib.hasSuffix suffix base) [".rs"];
|
||||||
isCargo = base == "Cargo.lock" || base == "Cargo.toml";
|
isCargo = base == "Cargo.lock" || base == "Cargo.toml";
|
||||||
|
isTag = parent == "tags";
|
||||||
isAllowedDir = !(builtins.elem base dirBlocklist);
|
isAllowedDir = !(builtins.elem base dirBlocklist);
|
||||||
in
|
in
|
||||||
(type == "directory" && isAllowedDir) || matches || isCargo;
|
(type == "directory" && isAllowedDir) || matches || isCargo || isTag;
|
||||||
|
|
||||||
filterSource = src:
|
filterSource = src:
|
||||||
lib.cleanSourceWith {
|
lib.cleanSourceWith {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue