fix: don't filter out tags in nix build

Signed-off-by: seth <getchoo@tuta.io>
This commit is contained in:
seth 2023-12-04 08:29:45 -05:00
parent 640409f2e2
commit 4bf3136364
No known key found for this signature in database
GPG key ID: D31BD0D494BBEE86

View file

@ -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 {