usage: 2.2.2 -> 2.8.0 (#451692)
This commit is contained in:
@@ -11,24 +11,29 @@
|
||||
|
||||
rustPlatform.buildRustPackage (finalAttrs: {
|
||||
pname = "usage";
|
||||
version = "2.2.2";
|
||||
version = "2.8.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "jdx";
|
||||
repo = "usage";
|
||||
tag = "v${finalAttrs.version}";
|
||||
hash = "sha256-Hnq3ViMrNIo9m/1mePjEzMv87U24wY50UiYxnpJqHR8=";
|
||||
hash = "sha256-/yDypNQdw6YS1M8YtwjdFyG8Lfh3wKkvVWyH2b/G65o=";
|
||||
};
|
||||
|
||||
cargoHash = "sha256-Zj8Z88gYx+i0VN14HbO1LSlWjZX1EvrtyKvAwpnFMgs=";
|
||||
cargoHash = "sha256-3tSMgTVmoiME/wWE8uHZEjnfeS8Hqbm0DeUaWNgN944=";
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace ./examples/mounted.sh \
|
||||
substituteInPlace ./examples/*.sh \
|
||||
--replace-fail '/usr/bin/env -S usage' "$(pwd)/target/${stdenv.targetPlatform.rust.rustcTargetSpec}/release/usage"
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [ installShellFiles ];
|
||||
|
||||
checkFlags = [
|
||||
# tries to build usage-cli itself
|
||||
"--skip=test_bash_completion_integration"
|
||||
];
|
||||
|
||||
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
|
||||
installShellCompletion --cmd usage \
|
||||
--bash <($out/bin/usage --completions bash) \
|
||||
|
||||
Reference in New Issue
Block a user