2021-02-27 14:15:20 +01:00
|
|
|
{ lib
|
|
|
|
, rustPlatform
|
|
|
|
, fetchFromGitLab
|
|
|
|
, pkg-config
|
|
|
|
, python3
|
|
|
|
, dbus
|
|
|
|
, glib
|
|
|
|
, gpgme
|
|
|
|
, gtk3
|
|
|
|
, libxcb
|
|
|
|
}:
|
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "prs";
|
2021-03-31 13:16:29 +02:00
|
|
|
version = "0.2.7";
|
2021-02-27 14:15:20 +01:00
|
|
|
|
|
|
|
src = fetchFromGitLab {
|
|
|
|
owner = "timvisee";
|
|
|
|
repo = "prs";
|
|
|
|
rev = "v${version}";
|
2021-03-31 13:16:29 +02:00
|
|
|
sha256 = "sha256-1Jrgf5UW6k0x3q6kQIB6Q7moOhConEnUU9r+21W5Uu8=";
|
2021-02-27 14:15:20 +01:00
|
|
|
};
|
|
|
|
|
2021-03-31 13:16:29 +02:00
|
|
|
cargoSha256 = "sha256-N3pLW/OGeurrl+AlwdfbZ3T7WzEOAuyUMdIR164Xp7k=";
|
2021-02-27 14:15:20 +01: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
|
|
|
|
'';
|
|
|
|
|
|
|
|
nativeBuildInputs = [ gpgme pkg-config python3 ];
|
|
|
|
|
|
|
|
buildInputs = [ dbus glib gpgme gtk3 libxcb ];
|
|
|
|
|
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|