From 6383b42dae73de3d26e60252b6109054c71157f7 Mon Sep 17 00:00:00 2001 From: Andreas Rammhold Date: Tue, 7 Jan 2020 00:39:46 +0100 Subject: [PATCH] buildRustCrate: fixup usage of `builtins.filterSource` MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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…). --- pkgs/build-support/rust/build-rust-crate/helpers.nix | 4 ++-- 1 file 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 8c5e9dfef2f..386d0ce7084 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