1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-28 08:31:59 +00:00

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: