mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-30 19:02:57 +00:00
1ac28e704f
Fixes #67797.
20 lines
463 B
Bash
Executable File
20 lines
463 B
Bash
Executable File
#!/bin/sh
|
|
|
|
# This updates cargo-lock.patch for the diesel version listed in default.nix.
|
|
|
|
set -eu -o verbose
|
|
|
|
here=$PWD
|
|
version=$(cat default.nix | grep '^ version = "' | cut -d '"' -f 2)
|
|
checkout=$(mktemp -d)
|
|
git clone -b "v$version" --depth=1 https://github.com/diesel-rs/diesel "$checkout"
|
|
cd "$checkout"
|
|
|
|
rm -f rust-toolchain
|
|
cargo generate-lockfile
|
|
git add -f Cargo.lock
|
|
git diff HEAD -- Cargo.lock > "$here"/cargo-lock.patch
|
|
|
|
cd "$here"
|
|
rm -rf "$checkout"
|