File tree Expand file tree Collapse file tree 1 file changed +20
-4
lines changed Expand file tree Collapse file tree 1 file changed +20
-4
lines changed Original file line number Diff line number Diff line change 22 lib ,
33 rustPlatform ,
44 fetchFromGitHub ,
5+ stdenv ,
6+ installShellFiles ,
57 nix-update-script ,
68 usage ,
79 testers ,
810} :
911
1012rustPlatform . buildRustPackage rec {
11- pname = "jdx " ;
12- version = "0.3.1 " ;
13+ pname = "usage " ;
14+ version = "1.7.4 " ;
1315
1416 src = fetchFromGitHub {
1517 owner = "jdx" ;
1618 repo = "usage" ;
1719 rev = "v${ version } " ;
18- hash = "sha256-9zQ+gkBVhzjqSIieGjxoD9vc7999lfRQ7awkvlEkseE =" ;
20+ hash = "sha256-+Wt/ZOwj9LHgt0EOFF554TGf2tZyuRoXAPpCebPZfNY =" ;
1921 } ;
2022
21- cargoHash = "sha256-4ebjD1Tf7F2YyNrF7eEi2yKonctprnyu4nMf+vE2whY=" ;
23+ cargoHash = "sha256-w8GWvMjC6Plho+zw542Q00hU/KZMdyyoP/rGAg72h1s=" ;
24+
25+ postPatch = ''
26+ substituteInPlace ./examples/mounted.sh \
27+ --replace-fail '/usr/bin/env -S usage' "$(pwd)/target/${ stdenv . targetPlatform . rust . rustcTargetSpec } /release/usage"
28+ '' ;
29+
30+ nativeBuildInputs = [ installShellFiles ] ;
31+
32+ postInstall = ''
33+ installShellCompletion --cmd usage \
34+ --bash <($out/bin/usage --completions bash) \
35+ --fish <($out/bin/usage --completions fish) \
36+ --zsh <($out/bin/usage --completions zsh)
37+ '' ;
2238
2339 passthru = {
2440 updateScript = nix-update-script { } ;
You can’t perform that action at this time.
0 commit comments