at 24.11-pre 64 lines 1.5 kB view raw
1{ lib 2, rustPlatform 3, fetchFromGitLab 4, installShellFiles 5, pkg-config 6, python3 7, dbus 8, glib 9, gpgme 10, gtk3 11, libxcb 12, libxkbcommon 13}: 14 15rustPlatform.buildRustPackage rec { 16 pname = "prs"; 17 version = "0.5.1"; 18 19 src = fetchFromGitLab { 20 owner = "timvisee"; 21 repo = "prs"; 22 rev = "refs/tags/v${version}"; 23 hash = "sha256-MvQ0B35NF/AuGHBMa201FkFlU/UX0WXMcBRxTJwpUFw="; 24 }; 25 26 cargoHash = "sha256-YDcAjBIdUboOKvGSnGW6b1JVbhQaB3ccXcSmK78M7DI="; 27 28 postPatch = '' 29 # The GPGME backend is recommended 30 for f in "gtk3/Cargo.toml" "cli/Cargo.toml"; do 31 substituteInPlace "$f" --replace \ 32 'default = ["backend-gnupg-bin"' 'default = ["backend-gpgme"' 33 done 34 ''; 35 36 nativeBuildInputs = [ gpgme installShellFiles pkg-config python3 ]; 37 38 buildInputs = [ 39 dbus 40 glib 41 gpgme 42 gtk3 43 libxcb 44 libxkbcommon 45 ]; 46 47 postInstall = '' 48 for shell in bash fish zsh; do 49 installShellCompletion --cmd prs --$shell <($out/bin/prs internal completions $shell --stdout) 50 done 51 ''; 52 53 meta = with lib; { 54 description = "Secure, fast & convenient password manager CLI using GPG and git to sync"; 55 homepage = "https://gitlab.com/timvisee/prs"; 56 changelog = "https://gitlab.com/timvisee/prs/-/blob/v${version}/CHANGELOG.md"; 57 license = with licenses; [ 58 lgpl3Only # lib 59 gpl3Only # everything else 60 ]; 61 maintainers = with maintainers; [ dotlambda ]; 62 mainProgram = "prs"; 63 }; 64}