please: init at 0.5.3

authored by Azat Bahawi and committed by helbling.dev be795c6a a36ceb86

+63
+48
pkgs/tools/security/please/default.nix
··· 1 + { lib 2 + , rustPlatform 3 + , fetchFromGitLab 4 + , installShellFiles 5 + , pam 6 + , nixosTests 7 + }: 8 + 9 + rustPlatform.buildRustPackage rec { 10 + pname = "please"; 11 + version = "0.5.3"; 12 + 13 + src = fetchFromGitLab { 14 + owner = "edneville"; 15 + repo = "please"; 16 + rev = "v${version}"; 17 + hash = "sha256-YL0yKIDoFD6Q5gVXOjHiqH2ub7jlhlE/uDKLK1FlE74="; 18 + }; 19 + 20 + cargoHash = "sha256-noZsnFL6G1KcxGY0sn0PvY5nIdx5aOAMErMViIY/7bE="; 21 + 22 + nativeBuildInputs = [ installShellFiles ]; 23 + 24 + buildInputs = [ pam ]; 25 + 26 + patches = [ ./nixos-specific.patch ]; 27 + 28 + postInstall = '' 29 + installManPage man/* 30 + ''; 31 + 32 + meta = with lib; { 33 + description = "A polite regex-first sudo alternative"; 34 + longDescription = '' 35 + Delegate accurate least privilege access with ease. Express easily with a 36 + regex and expose only what is needed and nothing more. Or validate file 37 + edits with pleaseedit. 38 + 39 + Please is written with memory safe rust. Traditional C memory unsafety is 40 + avoided, logic problems may exist but this codebase is relatively small. 41 + ''; 42 + homepage = "https://www.usenix.org.uk/content/please.html"; 43 + changelog = "https://github.com/edneville/please/blob/${src.rev}/CHANGELOG.md"; 44 + license = licenses.gpl3Only; 45 + maintainers = with maintainers; [ azahi ]; 46 + platforms = platforms.linux; 47 + }; 48 + }
+13
pkgs/tools/security/please/nixos-specific.patch
··· 1 + diff --git i/src/lib.rs w/src/lib.rs 2 + index fdd69f2..07c794e 100644 3 + --- i/src/lib.rs 4 + +++ w/src/lib.rs 5 + @@ -1667,7 +1667,7 @@ pub fn search_path(binary: &str) -> Option<String> { 6 + } 7 + } 8 + 9 + - for dir in "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin".split(':') { 10 + + 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(':') { 11 + let path_name = format!("{}/{}", &dir, &binary); 12 + let p = Path::new(&path_name); 13 +
+2
pkgs/top-level/all-packages.nix
··· 10248 10248 10249 10249 playbar2 = libsForQt5.callPackage ../applications/audio/playbar2 { }; 10250 10250 10251 + please = callPackage ../tools/security/please { }; 10252 + 10251 10253 plecost = callPackage ../tools/security/plecost { }; 10252 10254 10253 10255 plujain-ramp = callPackage ../applications/audio/plujain-ramp { };