summary refs log tree commit diff
path: root/pkgs/games/shticker-book-unwritten/update-cargo-lock.sh
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/games/shticker-book-unwritten/update-cargo-lock.sh')
-rwxr-xr-xpkgs/games/shticker-book-unwritten/update-cargo-lock.sh18
1 files changed, 18 insertions, 0 deletions
diff --git a/pkgs/games/shticker-book-unwritten/update-cargo-lock.sh b/pkgs/games/shticker-book-unwritten/update-cargo-lock.sh
new file mode 100755
index 00000000000..ab84bd0abe4
--- /dev/null
+++ b/pkgs/games/shticker-book-unwritten/update-cargo-lock.sh
@@ -0,0 +1,18 @@
+#! /usr/bin/env nix-shell
+#! nix-shell -i bash -p cargo coreutils git gnugrep jq
+
+set -eu -o verbose
+
+here=$PWD
+version=$(cat unwrapped.nix | grep '^  version = "' | cut -d '"' -f 2)
+checkout=$(mktemp -d)
+git clone -b "v$version" --depth=1 https://github.com/JonathanHelianthicusDoe/shticker_book_unwritten "$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"