crosvm.updateScript: don't vendor Cargo.lock

This is no longer required as crosvm now includes a Cargo.lock in-tree
again.
This commit is contained in:
Alyssa Ross 2022-09-30 21:09:01 +00:00 committed by Alyssa Ross
parent fb60a5c947
commit 4c80e3665c
2 changed files with 0 additions and 20 deletions

View File

@ -1,7 +0,0 @@
dir="$(mktemp -d)" &&
cd "$dir" &&
unpackPhase &&
cd "${sourceRoot:-}" &&
cargo generate-lockfile &&
mv Cargo.lock "$1"
rm -rf "$dir"

View File

@ -50,16 +50,3 @@ with urlopen(f'https://chromium.googlesource.com/chromiumos/platform/crosvm/+log
# Update the version, git revision, and hash in crosvm's default.nix.
subprocess.run(['update-source-version', 'crosvm', f'--rev={rev}', version])
# Find the path to crosvm's default.nix, so Cargo.lock can be written
# into the same directory.
argv = ['nix-instantiate', '--eval', '--json', '-A', 'crosvm.meta.position']
position = json.loads(subprocess.check_output(argv).decode('utf-8'))
filename = re.match(r'[^:]*', position)[0]
# Generate a Cargo.lock
run = ['.',
dirname(abspath(__file__)) + '/generate-cargo.sh',
dirname(filename) + '/Cargo.lock']
expr = '(import ./. {}).crosvm.overrideAttrs (_: { dontCargoSetupPostUnpack = true; })'
subprocess.run(['nix-shell', '-E', expr, '--run', shlex.join(run)])