1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-22 13:41:26 +00:00
nixpkgs/pkgs/build-support/rust/fetch-builder.sh

18 lines
316 B
Bash
Raw Normal View History

source $stdenv/setup
# cargo-fetch needs to write to Cargo.lock, even to do nothing. We
# create a fake checkout with symlinks and and editable Cargo.lock.
mkdir copy
cd copy
for f in $(ls $src); do
ln -s $src/"$f" .
done
rm Cargo.lock
cp $src/Cargo.lock .
chmod +w Cargo.lock
$fetcher . $out
cd ..
rm -rf copy