mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-12 15:47:28 +00:00
e3c554ffca
Co-authored-by: Sandro <sandro.jaeckel@gmail.com>
21 lines
520 B
Bash
21 lines
520 B
Bash
#!nix-shell
|
|
#!nix-shell -i bash -p coreutils gnugrep git cargo
|
|
|
|
# This updates cargo-lock.patch for the netease-music-tui 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 "$version" --depth=1 https://github.com/betta-cyber/netease-music-tui "$checkout"
|
|
cd "$checkout"
|
|
|
|
cargo generate-lockfile
|
|
git add -f Cargo.lock
|
|
git diff HEAD -- Cargo.lock > "$here"/cargo-lock.patch
|
|
|
|
cd "$here"
|
|
rm -rf "$checkout"
|