Merge pull request #58258 from teozkr/buildRustCrate-fix-include

buildRustCrate: Fix `include` filter
This commit is contained in:
Vladyslav M 2019-03-25 22:32:47 +02:00 committed by GitHub
commit 7be93a4ca7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -14,9 +14,8 @@
include = includedFiles: src: builtins.filterSource (path: type:
lib.lists.any (f:
let p = toString (src + ("/" + f));
suff = lib.strings.removePrefix p path;
in
suff == "" || (lib.strings.hasPrefix "/" suff)
p == path || (lib.strings.hasPrefix (p + "/") path)
) includedFiles
) src;
exclude = excludedFiles: src: builtins.filterSource (path: type: