Reduce the size of the vendor directory by removing some winapi cruft

This commit is contained in:
Eelco Dolstra 2019-07-05 01:19:30 +02:00
parent d722e2175e
commit afb021893b

View file

@ -42,8 +42,15 @@ let
# Add just enough metadata to keep Cargo happy. # Add just enough metadata to keep Cargo happy.
printf '{"files":{},"package":"${file.outputHash}"}' > "$dir/.cargo-checksum.json" printf '{"files":{},"package":"${file.outputHash}"}' > "$dir/.cargo-checksum.json"
# Clean up some cruft from the winapi crates. FIXME: find
# a way to remove winapi* from our dependencies.
if [[ $dir =~ /winapi ]]; then
find $dir -name "*.a" -print0 | xargs -0 rm -f --
fi
mv "$dir" $out/vendor/ mv "$dir" $out/vendor/
rmdir $out/vendor/tmp
rm -rf $out/vendor/tmp
'') files)} '') files)}
''; '';