please: init at 0.5.3

This commit is contained in:
Azat Bahawi 2022-09-30 00:12:13 +03:00 committed by Cole Helbling
parent a36ceb869d
commit be795c6a84
3 changed files with 63 additions and 0 deletions

View file

@ -0,0 +1,48 @@
{ lib
, rustPlatform
, fetchFromGitLab
, installShellFiles
, pam
, nixosTests
}:
rustPlatform.buildRustPackage rec {
pname = "please";
version = "0.5.3";
src = fetchFromGitLab {
owner = "edneville";
repo = "please";
rev = "v${version}";
hash = "sha256-YL0yKIDoFD6Q5gVXOjHiqH2ub7jlhlE/uDKLK1FlE74=";
};
cargoHash = "sha256-noZsnFL6G1KcxGY0sn0PvY5nIdx5aOAMErMViIY/7bE=";
nativeBuildInputs = [ installShellFiles ];
buildInputs = [ pam ];
patches = [ ./nixos-specific.patch ];
postInstall = ''
installManPage man/*
'';
meta = with lib; {
description = "A polite regex-first sudo alternative";
longDescription = ''
Delegate accurate least privilege access with ease. Express easily with a
regex and expose only what is needed and nothing more. Or validate file
edits with pleaseedit.
Please is written with memory safe rust. Traditional C memory unsafety is
avoided, logic problems may exist but this codebase is relatively small.
'';
homepage = "https://www.usenix.org.uk/content/please.html";
changelog = "https://github.com/edneville/please/blob/${src.rev}/CHANGELOG.md";
license = licenses.gpl3Only;
maintainers = with maintainers; [ azahi ];
platforms = platforms.linux;
};
}

View file

@ -0,0 +1,13 @@
diff --git i/src/lib.rs w/src/lib.rs
index fdd69f2..07c794e 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);

View file

@ -10248,6 +10248,8 @@ with pkgs;
playbar2 = libsForQt5.callPackage ../applications/audio/playbar2 { }; playbar2 = libsForQt5.callPackage ../applications/audio/playbar2 { };
please = callPackage ../tools/security/please { };
plecost = callPackage ../tools/security/plecost { }; plecost = callPackage ../tools/security/plecost { };
plujain-ramp = callPackage ../applications/audio/plujain-ramp { }; plujain-ramp = callPackage ../applications/audio/plujain-ramp { };