usage: 3.0.0 -> 3.2.0 (#504792)
This commit is contained in:
@@ -12,16 +12,20 @@
|
||||
|
||||
rustPlatform.buildRustPackage (finalAttrs: {
|
||||
pname = "usage";
|
||||
version = "3.0.0";
|
||||
version = "3.2.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "jdx";
|
||||
repo = "usage";
|
||||
tag = "v${finalAttrs.version}";
|
||||
hash = "sha256-KC3fIfFnXn5K1E1CyHLADaEesXFilCrIe9MYOH/fkrI=";
|
||||
hash = "sha256-0yonwl/2BIkGUs0uOBP+Pjo93NvLVK4QQQj/K4C4NNY=";
|
||||
};
|
||||
|
||||
cargoHash = "sha256-RNeHa3V4oCvtiR6/ntTegKl62ByWZbFeliFJVgsHYrQ=";
|
||||
cargoHash = "sha256-jxTN+La7Ye2okRZGAY6niIvvRf2E4vFFHd1nny7JJDo=";
|
||||
|
||||
patches = [
|
||||
./use-bin-exe-env.patch
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace ./examples/*.sh \
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
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();
|
||||
Reference in New Issue
Block a user