-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathshank.nix
More file actions
31 lines (29 loc) · 774 Bytes
/
shank.nix
File metadata and controls
31 lines (29 loc) · 774 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
{
stdenv,
lib,
fetchFromGitHub,
rustPlatform,
}:
let
version = "0.4.2";
srcHash = "sha256-jw6hZjDWPUBFkmHkX9ucChmrveaUQ2xYoKsmyBoxmWw=";
# absent Cargo.lock requires using cargoPatches. don't forget
# to set `cargoHash = lib.fakeHash` when updating. steps:
#
# $ mkdir b/
# $ cp Cargo.lock b/
# $ diff -Nu a/Cargo.lock b/Cargo.lock > shank.Cargo.lock.patch
cargoPatches = [ ./shank.Cargo.lock.patch ];
cargoHash = "sha256-JhkEntDGddVXvY8eJ6xipbOsJ4JP3NeOkbTtN0maf7A=";
in
rustPlatform.buildRustPackage {
src = fetchFromGitHub {
owner = "metaplex-foundation";
repo = "shank";
rev = "shank-cli@v${version}";
hash = srcHash;
};
inherit version cargoPatches cargoHash;
pname = "shank";
buildAndTestSubdir = "shank-cli";
}