nixpkgs/pkgs/tools/security/prs/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

64 lines
1.4 KiB
Nix
Raw Normal View History

2021-02-27 13:15:20 +00:00
{ lib
, rustPlatform
, fetchFromGitLab
2021-04-23 06:51:57 +00:00
, installShellFiles
2021-02-27 13:15:20 +00:00
, pkg-config
, python3
, dbus
, glib
, gpgme
, gtk3
, libxcb
, libxkbcommon
2021-02-27 13:15:20 +00:00
}:
rustPlatform.buildRustPackage rec {
pname = "prs";
version = "0.5.0";
2021-02-27 13:15:20 +00:00
src = fetchFromGitLab {
owner = "timvisee";
repo = "prs";
2022-12-31 21:23:23 +00:00
rev = "refs/tags/v${version}";
hash = "sha256-9/XKz+yOCFEB1VI2EK0xF5ecyBPeGztpGPo/aXQ6v5E=";
2021-02-27 13:15:20 +00:00
};
cargoHash = "sha256-kxIgToqhJhUgJcxnGRGG6I+YqM2diFgQDyn1jBxWAw8=";
2021-02-27 13:15:20 +00:00
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
'';
2021-04-23 06:51:57 +00:00
nativeBuildInputs = [ gpgme installShellFiles pkg-config python3 ];
2021-02-27 13:15:20 +00:00
buildInputs = [
dbus
glib
gpgme
gtk3
libxcb
libxkbcommon
];
2021-02-27 13:15:20 +00:00
2021-04-23 06:51:57 +00:00
postInstall = ''
for shell in bash fish zsh; do
installShellCompletion --cmd prs --$shell <($out/bin/prs internal completions $shell --stdout)
done
'';
2021-02-27 13:15:20 +00:00
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 ];
};
}