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…).
wip/yesman
Andreas Rammhold 4 years ago
parent cca0c894a1
commit 6383b42dae
No known key found for this signature in database
GPG Key ID: E432E410B5E48C86
  1. 4
      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

Loading…
Cancel
Save