add sysroot lockfile update script then run it
This commit is contained in:
parent
7ebcb6ee48
commit
512458c68a
|
@ -1,14 +1,21 @@
|
|||
# This file is automatically @generated by Cargo.
|
||||
# It is not intended for manual editing.
|
||||
[[package]]
|
||||
name = "alloc"
|
||||
version = "0.0.0"
|
||||
dependencies = ["compiler_builtins", "core"]
|
||||
dependencies = [
|
||||
"compiler_builtins",
|
||||
"core",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "compiler_builtins"
|
||||
version = "0.1.32"
|
||||
version = "0.1.36"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "7bc4ac2c824d2bfc612cba57708198547e9a26943af0632aff033e0693074d5c"
|
||||
dependencies = ["rustc-std-workspace-core"]
|
||||
checksum = "7cd0782e0a7da7598164153173e5a5d4d9b1da094473c98dce0ff91406112369"
|
||||
dependencies = [
|
||||
"rustc-std-workspace-core",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "core"
|
||||
|
@ -17,4 +24,6 @@ version = "0.0.0"
|
|||
[[package]]
|
||||
name = "rustc-std-workspace-core"
|
||||
version = "1.99.0"
|
||||
dependencies = ["core"]
|
||||
dependencies = [
|
||||
"core",
|
||||
]
|
||||
|
|
|
@ -2,7 +2,7 @@ import os
|
|||
import toml
|
||||
|
||||
rust_src = os.environ['RUSTC_SRC']
|
||||
orig_cargo = os.environ['ORIG_CARGO']
|
||||
orig_cargo = os.environ['ORIG_CARGO'] if 'ORIG_CARGO' in os.environ else None
|
||||
|
||||
base = {
|
||||
'package': {
|
||||
|
@ -33,6 +33,7 @@ base = {
|
|||
},
|
||||
}
|
||||
|
||||
if orig_cargo is not None:
|
||||
with open(orig_cargo, 'r') as f:
|
||||
src = toml.loads(f.read())
|
||||
if 'profile' in src:
|
||||
|
|
|
@ -23,7 +23,7 @@ in rustPlatform.buildRustPackage {
|
|||
|
||||
RUSTC_BOOTSTRAP = 1;
|
||||
__internal_dontAddSysroot = true;
|
||||
cargoSha256 = "1l5z44dw5h7lbwmpjqax2g40cf4h27yai3wlj0p5di5v1xf25rng";
|
||||
cargoSha256 = "0y6dqfhsgk00y3fv5bnjzk0s7i30nwqc1rp0xlrk83hkh80x81mw";
|
||||
|
||||
doCheck = false;
|
||||
|
||||
|
|
|
@ -0,0 +1,21 @@
|
|||
#!/usr/bin/env nix-shell
|
||||
#!nix-shell -i bash -p python3 python3.pkgs.toml cargo
|
||||
|
||||
set -e
|
||||
|
||||
HERE=$(dirname "${BASH_SOURCE[0]}")
|
||||
NIXPKGS_ROOT="$HERE/../../../.."
|
||||
|
||||
# https://unix.stackexchange.com/a/84980/390173
|
||||
tempdir=$(mktemp -d 2>/dev/null || mktemp -d -t 'update-lockfile')
|
||||
|
||||
cd "$tempdir"
|
||||
nix-build -E "with import (/. + \"${NIXPKGS_ROOT}\") {}; pkgs.rustPlatform.rustcSrc.override { minimalContent = false; }"
|
||||
RUSTC_SRC="$(pwd)/result" python3 "$HERE/cargo.py"
|
||||
RUSTC_BOOTSTRAP=1 cargo build || echo "Build failure is expected. All that's needed is the lockfile."
|
||||
|
||||
cp Cargo.lock "$HERE"
|
||||
|
||||
rm -rf "$tempdir"
|
||||
|
||||
|
Loading…
Reference in New Issue