Merge #220802: please: 0.5.3 -> 0.5.4

This commit is contained in:
Vladimír Čunát 2023-04-01 18:13:55 +02:00
commit 9740870431
No known key found for this signature in database
GPG Key ID: E747DF1F9575A3AA
2 changed files with 15 additions and 12 deletions

View File

@ -8,16 +8,16 @@
rustPlatform.buildRustPackage rec {
pname = "please";
version = "0.5.3";
version = "0.5.4";
src = fetchFromGitLab {
owner = "edneville";
repo = "please";
rev = "v${version}";
hash = "sha256-YL0yKIDoFD6Q5gVXOjHiqH2ub7jlhlE/uDKLK1FlE74=";
hash = "sha256-GW2t3pTX06mqEwFTpiLe3mlzFTmb5Fep5R0yHooRmig=";
};
cargoHash = "sha256-noZsnFL6G1KcxGY0sn0PvY5nIdx5aOAMErMViIY/7bE=";
cargoHash = "sha256-bd3Pc8QPyPjE+xVcwASDILTXvMCioId/n6dXSr/KDOQ=";
nativeBuildInputs = [ installShellFiles ];
@ -29,6 +29,9 @@ rustPlatform.buildRustPackage rec {
installManPage man/*
'';
# Unit tests are broken on NixOS.
doCheck = false;
passthru.tests = { inherit (nixosTests) please; };
meta = with lib; {

View File

@ -1,13 +1,13 @@
diff --git i/src/lib.rs w/src/lib.rs
index fdd69f2..07c794e 100644
index 5e98cfa..539434f 100644
--- i/src/lib.rs
+++ w/src/lib.rs
@@ -1667,7 +1667,7 @@ pub fn search_path(binary: &str) -> Option<String> {
}
}
- for dir in "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin".split(':') {
+ for dir in "/run/wrappers/bin:/run/current-system/sw/bin:/run/current-system/sw/sbin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin".split(':') {
let path_name = format!("{}/{}", &dir, &binary);
let p = Path::new(&path_name);
@@ -1755,7 +1755,7 @@ pub fn search_path(ro: &mut RunOptions, item: &EnvOptions) -> Option<String> {
let dirs = if item.search_path.is_some() {
item.search_path.as_ref().unwrap()
} else {
- "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
+ "/run/wrappers/bin:/run/current-system/sw/sbin:/run/current-system/sw/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
};
for dir in dirs.split(':') {