diff options
author | Andreas Rammhold <andreas@rammhold.de> | 2020-01-07 00:39:46 +0100 |
---|---|---|
committer | Andreas Rammhold <andreas@rammhold.de> | 2020-01-07 00:49:48 +0100 |
commit | 6383b42dae73de3d26e60252b6109054c71157f7 (patch) | |
tree | b5bfee714d63af691231a4b163d65ab706abe984 /pkgs/build-support/rust/build-rust-crate | |
parent | cca0c894a13ec398de8b046174239513197f5c74 (diff) |
buildRustCrate: fixup usage of `builtins.filterSource`
While unifying most of the lib function calls I accidentially changed the filterSource functions as well. Since there were no tests I ended up forgetting about this case (even thought I ran into it…).
Diffstat (limited to 'pkgs/build-support/rust/build-rust-crate')
-rw-r--r-- | pkgs/build-support/rust/build-rust-crate/helpers.nix | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pkgs/build-support/rust/build-rust-crate/helpers.nix b/pkgs/build-support/rust/build-rust-crate/helpers.nix index 8c5e9dfef2f9b..386d0ce7084f0 100644 --- a/pkgs/build-support/rust/build-rust-crate/helpers.nix +++ b/pkgs/build-support/rust/build-rust-crate/helpers.nix @@ -11,14 +11,14 @@ else features ) [] (lib.attrNames feat); - include = includedFiles: src: lib.filterSource (path: type: + include = includedFiles: src: builtins.filterSource (path: type: lib.any (f: let p = toString (src + ("/" + f)); in p == path || (lib.strings.hasPrefix (p + "/") path) ) includedFiles ) src; - exclude = excludedFiles: src: lib.filterSource (path: type: + exclude = excludedFiles: src: builtins.filterSource (path: type: lib.all (f: !lib.strings.hasPrefix (toString (src + ("/" + f))) path ) excludedFiles |