mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-10 06:55:10 +00:00
571c71e6f7
We are migrating packages that meet below requirements: 1. using `callPackage` 2. called path is a directory 3. overriding set is empty (`{ }`) 4. not containing path expressions other than relative path (to makenixpkgs-vet happy) 5. not referenced by nix files outside of the directory, other than`pkgs/top-level/all-packages.nix` 6. not referencing nix files outside of the directory 7. not referencing `default.nix` (since it's changed to `package.nix`) 8. `outPath` doesn't change after migration The tool is here: https://github.com/Aleksanaa/by-name-migrate.
58 lines
1.8 KiB
Nix
58 lines
1.8 KiB
Nix
{ lib, buildGoModule, fetchFromGitHub, pkg-config, libsecret }:
|
|
|
|
buildGoModule rec {
|
|
pname = "protonmail-bridge";
|
|
version = "3.14.0";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "ProtonMail";
|
|
repo = "proton-bridge";
|
|
rev = "v${version}";
|
|
hash = "sha256-Pup+A637FvsX4dV0G7K/LMB4HCruh5BT1iu4tIXRI7I=";
|
|
};
|
|
|
|
vendorHash = "sha256-I/OFpEa3aB+qDBS/sbX5WOgrlSyR7aZaQYrsaSVNAAk=";
|
|
|
|
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
|
|
'';
|
|
|
|
meta = {
|
|
changelog = "https://github.com/ProtonMail/proton-bridge/blob/${src.rev}/Changelog.md";
|
|
description = "Use your ProtonMail account with your local e-mail client";
|
|
downloadPage = "https://github.com/ProtonMail/proton-bridge/releases";
|
|
homepage = "https://github.com/ProtonMail/proton-bridge";
|
|
license = lib.licenses.gpl3Plus;
|
|
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";
|
|
maintainers = with lib.maintainers; [ mrfreezeex daniel-fahey ];
|
|
};
|
|
}
|