mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-05 05:13:04 +00:00
d672ba8385
protonmail-bridge: 3.6.1 -> 3.7.1
60 lines
2.0 KiB
Nix
60 lines
2.0 KiB
Nix
{ lib, buildGoModule, fetchFromGitHub, pkg-config, libsecret }:
|
|
|
|
buildGoModule rec {
|
|
pname = "protonmail-bridge";
|
|
version = "3.7.1";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "ProtonMail";
|
|
repo = "proton-bridge";
|
|
rev = "v${version}";
|
|
hash = "sha256-KuXXXvuQhRQ0xKaw7tNO6HgQP7PsdxylDouwDQDDSJU=";
|
|
};
|
|
|
|
vendorHash = "sha256-QUJD7ICxaUClK82mKumyQVoINfWXSD64UfhZ4pu5dGU=";
|
|
|
|
nativeBuildInputs = [ pkg-config ];
|
|
|
|
buildInputs = [ libsecret ];
|
|
|
|
preBuild = ''
|
|
patchShebangs ./utils/
|
|
(cd ./utils/ && ./credits.sh bridge)
|
|
'';
|
|
|
|
ldflags =
|
|
let constants = "github.com/ProtonMail/proton-bridge/v3/internal/constants"; in
|
|
[
|
|
"-X ${constants}.Version=${version}"
|
|
"-X ${constants}.Revision=${src.rev}"
|
|
"-X ${constants}.buildTime=unknown"
|
|
"-X ${constants}.FullAppName=ProtonMailBridge" # Should be "Proton Mail Bridge", but quoting doesn't seems to work in nix's ldflags
|
|
];
|
|
|
|
subPackages = [
|
|
"cmd/Desktop-Bridge"
|
|
];
|
|
|
|
postInstall = ''
|
|
mv $out/bin/Desktop-Bridge $out/bin/protonmail-bridge # The cli is named like that in other distro packages
|
|
install -Dm444 dist/proton-bridge.desktop -t $out/share/applications
|
|
install -Dm444 dist/bridge.svg $out/share/icons/hicolor/scalable/apps/protonmail-bridge.svg
|
|
'';
|
|
|
|
meta = with lib; {
|
|
homepage = "https://github.com/ProtonMail/proton-bridge";
|
|
changelog = "https://github.com/ProtonMail/proton-bridge/blob/${src.rev}/Changelog.md";
|
|
downloadPage = "https://github.com/ProtonMail/proton-bridge/releases";
|
|
license = licenses.gpl3Plus;
|
|
maintainers = with maintainers; [ mrfreezeex ];
|
|
description = "Use your ProtonMail account with your local e-mail client";
|
|
longDescription = ''
|
|
An application that runs on your computer in the background and seamlessly encrypts
|
|
and decrypts your mail as it enters and leaves your computer.
|
|
|
|
To work, use secret-service freedesktop.org API (e.g. Gnome keyring) or pass.
|
|
'';
|
|
mainProgram = "protonmail-bridge";
|
|
};
|
|
}
|