shticker-book-unwritten: switch to fetchCrate, remove patch

This commit is contained in:
figsoda 2021-10-07 18:40:18 -04:00
parent 1eae448e42
commit 82b780a5b6
3 changed files with 6 additions and 1274 deletions

File diff suppressed because it is too large Load diff

View file

@ -1,18 +1,16 @@
{ fetchFromGitHub, lib, openssl, pkg-config, rustPlatform }:
{ lib, rustPlatform, fetchCrate, pkg-config, openssl }:
rustPlatform.buildRustPackage rec {
pname = "shticker-book-unwritten";
version = "1.0.3";
src = fetchFromGitHub {
owner = "JonathanHelianthicusDoe";
repo = "shticker_book_unwritten";
rev = "v${version}";
sha256 = "08lyxica0b0vvivybsvzigy2j7saar78mbz723y3g5hqrilfb5np";
src = fetchCrate {
inherit version;
crateName = "shticker_book_unwritten";
sha256 = "sha256-NQEXLTtotrZQmoYQnhCHIEwSe+fqlcHq5/I6zTHwLvc=";
};
cargoPatches = [ ./cargo-lock.patch ];
cargoSha256 = "1d4mnfzkdbqnjmqk7fl4bsy27lr7wnq997nz0hflaybnx2d3nisn";
cargoSha256 = "sha256-SniyLp/4R0MkJYQmW3RFvOFeBKTvRlSzEI5Y+ELHfy8=";
nativeBuildInputs = [ pkg-config ];

View file

@ -1,18 +0,0 @@
#! /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"