at 23.05-pre 50 lines 1.3 kB view raw
1{ lib 2, rustPlatform 3, fetchFromGitLab 4, installShellFiles 5, pam 6, nixosTests 7}: 8 9rustPlatform.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 passthru.tests = { inherit (nixosTests) please; }; 33 34 meta = with lib; { 35 description = "A polite regex-first sudo alternative"; 36 longDescription = '' 37 Delegate accurate least privilege access with ease. Express easily with a 38 regex and expose only what is needed and nothing more. Or validate file 39 edits with pleaseedit. 40 41 Please is written with memory safe rust. Traditional C memory unsafety is 42 avoided, logic problems may exist but this codebase is relatively small. 43 ''; 44 homepage = "https://www.usenix.org.uk/content/please.html"; 45 changelog = "https://github.com/edneville/please/blob/${src.rev}/CHANGELOG.md"; 46 license = licenses.gpl3Only; 47 maintainers = with maintainers; [ azahi ]; 48 platforms = platforms.linux; 49 }; 50}