shticker-book-unwritten: switch to fetchCrate, remove patch
This commit is contained in:
parent
1eae448e42
commit
82b780a5b6
File diff suppressed because it is too large
Load diff
|
@ -1,18 +1,16 @@
|
||||||
{ fetchFromGitHub, lib, openssl, pkg-config, rustPlatform }:
|
{ lib, rustPlatform, fetchCrate, pkg-config, openssl }:
|
||||||
|
|
||||||
rustPlatform.buildRustPackage rec {
|
rustPlatform.buildRustPackage rec {
|
||||||
pname = "shticker-book-unwritten";
|
pname = "shticker-book-unwritten";
|
||||||
version = "1.0.3";
|
version = "1.0.3";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchCrate {
|
||||||
owner = "JonathanHelianthicusDoe";
|
inherit version;
|
||||||
repo = "shticker_book_unwritten";
|
crateName = "shticker_book_unwritten";
|
||||||
rev = "v${version}";
|
sha256 = "sha256-NQEXLTtotrZQmoYQnhCHIEwSe+fqlcHq5/I6zTHwLvc=";
|
||||||
sha256 = "08lyxica0b0vvivybsvzigy2j7saar78mbz723y3g5hqrilfb5np";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
cargoPatches = [ ./cargo-lock.patch ];
|
cargoSha256 = "sha256-SniyLp/4R0MkJYQmW3RFvOFeBKTvRlSzEI5Y+ELHfy8=";
|
||||||
cargoSha256 = "1d4mnfzkdbqnjmqk7fl4bsy27lr7wnq997nz0hflaybnx2d3nisn";
|
|
||||||
|
|
||||||
nativeBuildInputs = [ pkg-config ];
|
nativeBuildInputs = [ pkg-config ];
|
||||||
|
|
||||||
|
|
|
@ -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"
|
|
Loading…
Reference in a new issue