1 #!/usr/bin/env nix-shell
2 #!nix-shell -i bash -p python3 python3.pkgs.toml cargo
6 HERE
=$
(readlink
-e $
(dirname "${BASH_SOURCE[0]}"))
7 NIXPKGS_ROOT
="$HERE/../../../.."
9 # https://unix.stackexchange.com/a/84980/390173
10 tempdir
=$
(mktemp
-d 2>/dev
/null || mktemp
-d -t 'update-lockfile')
15 RUSTC_SRC
=$
(nix-build
"${NIXPKGS_ROOT}" -A pkgs.rustPlatform.rustLibSrc
--no-out-link)
17 ln -s $RUSTC_SRC/{core
,alloc
} .
/
20 python3
"$HERE/cargo.py"
22 export RUSTC_BOOTSTRAP
=1
23 cargo generate-lockfile