mirror of
https://github.com/ipetkov/crane.git
synced 2024-11-22 23:17:15 +03:00
a3f0c63eed
We don't need to nest `cleanCargoSource` and `path` just to populate a default value for `name`. As they both ultimately delegate to `builtins.path`, the nesting can lead to IFD in situations which are otherwise avoidable
15 lines
288 B
Nix
15 lines
288 B
Nix
{ filterCargoSources
|
|
, internalCrateNameForCleanSource
|
|
, lib
|
|
}:
|
|
|
|
src: lib.cleanSourceWith {
|
|
# Apply the default source cleaning from nixpkgs
|
|
src = lib.cleanSource src;
|
|
|
|
# Then add our own filter on top
|
|
filter = filterCargoSources;
|
|
|
|
name = internalCrateNameForCleanSource src;
|
|
}
|