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:
commit
7be93a4ca7
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue