2kybe3
2026-04-22 06:48:32 +02:00
parent c14757a4ce
commit 347c91efe7
2 changed files with 3 additions and 24 deletions
+3 -7
View File
@@ -12,20 +12,16 @@
rustPlatform.buildRustPackage (finalAttrs: {
pname = "usage";
version = "3.2.0";
version = "3.2.1";
src = fetchFromGitHub {
owner = "jdx";
repo = "usage";
tag = "v${finalAttrs.version}";
hash = "sha256-0yonwl/2BIkGUs0uOBP+Pjo93NvLVK4QQQj/K4C4NNY=";
hash = "sha256-L8OQ6GdHoxJROA/lczichG4nNx5UGKxInihel5AaFIc=";
};
cargoHash = "sha256-jxTN+La7Ye2okRZGAY6niIvvRf2E4vFFHd1nny7JJDo=";
patches = [
./use-bin-exe-env.patch
];
cargoHash = "sha256-JauKSCp5Fk1shzXE2dy/joYamv7XW2rnIsu4hjIkBUA=";
postPatch = ''
substituteInPlace ./examples/*.sh \
@@ -1,17 +0,0 @@
diff --git a/cli/tests/shell_completions_integration.rs b/cli/tests/shell_completions_integration.rs
index 815c44c..51b5dd9 100644
--- a/cli/tests/shell_completions_integration.rs
+++ b/cli/tests/shell_completions_integration.rs
@@ -25,6 +25,13 @@ fn run_complete_word(usage_bin: &Path, shell: &str, spec_file: &Path, words: &[&
/// Build the usage binary and return its path
fn build_usage_binary() -> PathBuf {
+ if let Some(usage_path) = std::env::var("CARGO_BIN_EXE_usage")
+ .ok()
+ .filter(|s| !s.is_empty())
+ {
+ return PathBuf::from(usage_path);
+ }
+
let manifest_dir = PathBuf::from(env!("CARGO_MANIFEST_DIR"));
let workspace_root = manifest_dir.parent().unwrap();