mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-03 20:33:21 +00:00
160997c793
Diff: https://gitlab.com/timvisee/prs/-/compare/refs/tags/v0.5.0...v0.5.1 Changelog: https://gitlab.com/timvisee/prs/-/blob/v0.5.1/CHANGELOG.md
65 lines
1.4 KiB
Nix
65 lines
1.4 KiB
Nix
{ lib
|
|
, rustPlatform
|
|
, fetchFromGitLab
|
|
, installShellFiles
|
|
, pkg-config
|
|
, python3
|
|
, dbus
|
|
, glib
|
|
, gpgme
|
|
, gtk3
|
|
, libxcb
|
|
, libxkbcommon
|
|
}:
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
pname = "prs";
|
|
version = "0.5.1";
|
|
|
|
src = fetchFromGitLab {
|
|
owner = "timvisee";
|
|
repo = "prs";
|
|
rev = "refs/tags/v${version}";
|
|
hash = "sha256-MvQ0B35NF/AuGHBMa201FkFlU/UX0WXMcBRxTJwpUFw=";
|
|
};
|
|
|
|
cargoHash = "sha256-YDcAjBIdUboOKvGSnGW6b1JVbhQaB3ccXcSmK78M7DI=";
|
|
|
|
postPatch = ''
|
|
# The GPGME backend is recommended
|
|
for f in "gtk3/Cargo.toml" "cli/Cargo.toml"; do
|
|
substituteInPlace "$f" --replace \
|
|
'default = ["backend-gnupg-bin"' 'default = ["backend-gpgme"'
|
|
done
|
|
'';
|
|
|
|
nativeBuildInputs = [ gpgme installShellFiles pkg-config python3 ];
|
|
|
|
buildInputs = [
|
|
dbus
|
|
glib
|
|
gpgme
|
|
gtk3
|
|
libxcb
|
|
libxkbcommon
|
|
];
|
|
|
|
postInstall = ''
|
|
for shell in bash fish zsh; do
|
|
installShellCompletion --cmd prs --$shell <($out/bin/prs internal completions $shell --stdout)
|
|
done
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "Secure, fast & convenient password manager CLI using GPG and git to sync";
|
|
homepage = "https://gitlab.com/timvisee/prs";
|
|
changelog = "https://gitlab.com/timvisee/prs/-/blob/v${version}/CHANGELOG.md";
|
|
license = with licenses; [
|
|
lgpl3Only # lib
|
|
gpl3Only # everything else
|
|
];
|
|
maintainers = with maintainers; [ dotlambda ];
|
|
mainProgram = "prs";
|
|
};
|
|
}
|