diff options
author | LightDiscord <root@arnaud.sh> | 2020-11-06 21:58:11 +0100 |
---|---|---|
committer | LightDiscord <root@arnaud.sh> | 2020-11-22 10:26:36 +0100 |
commit | 472b6f4f33082ff21bd62a7b39b41ca1d79bb212 (patch) | |
tree | 364b10df70f36318483e48bd768205cbf083b057 /pkgs/applications/networking | |
parent | e286f0cf3bcffd5c0f006bb1831563d63b281fb2 (diff) |
protonmail-bridge: 1.2.3-1 -> 1.5.0
Provide a minimal cli only version see #97991.
Reviewed-by: SuperSandro2000 <sandro.jaeckel@posteo.de>
Reviewed-by: kalbasit <github@kalbas.it>
Diffstat (limited to 'pkgs/applications/networking')
-rw-r--r-- | pkgs/applications/networking/protonmail-bridge/default.nix | 83 |
1 files changed, 26 insertions, 57 deletions
diff --git a/pkgs/applications/networking/protonmail-bridge/default.nix b/pkgs/applications/networking/protonmail-bridge/default.nix index 7acf821dfcf4..9b86c0847e3c 100644 --- a/pkgs/applications/networking/protonmail-bridge/default.nix +++ b/pkgs/applications/networking/protonmail-bridge/default.nix @@ -1,73 +1,42 @@ -{ stdenv, fetchurl, lib, qtbase, qtmultimedia, qtsvg, qtdeclarative, qttools, qtgraphicaleffects, qtquickcontrols2, full -, libsecret, libGL, libpulseaudio, glib, wrapQtAppsHook, mkDerivation }: +{ lib, buildGoModule, fetchFromGitHub, pkg-config, libsecret }: -let - version = "1.2.3-1"; - - description = '' - 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, gnome-keyring service must be enabled. - ''; -in mkDerivation { +buildGoModule rec { pname = "protonmail-bridge"; - inherit version; + version = "1.5.0"; - src = fetchurl { - url = "https://protonmail.com/download/protonmail-bridge_${version}_amd64.deb"; - sha256 = "032ggk9fvd19fbsqkzwzwh0hpyg8gpkrin71di7zsx6ias5innw1"; + src = fetchFromGitHub { + owner = "ProtonMail"; + repo = "proton-bridge"; + rev = "br-${version}"; + sha256 = "lHqwKlFwz9iO7LJMGFTGCauw12z/BKnQte2sVoVkOaY="; }; - sourceRoot = "."; + vendorSha256 = "eP+7fqBctX9XLCoHVJDI/qaa5tocgg3F5nfUM6dzNRg="; - unpackCmd = '' - ar p "$src" data.tar.xz | tar xJ - ''; + nativeBuildInputs = [ pkg-config ]; - installPhase = '' - mkdir -p $out/{bin,lib,share} + buildInputs = [ libsecret ]; - cp -r usr/lib/protonmail/bridge/protonmail-bridge $out/lib - cp -r usr/share $out - - ln -s $out/lib/protonmail-bridge $out/bin/protonmail-bridge + buildPhase = '' + make BUILD_TIME= build-nogui ''; - postFixup = let - rpath = lib.makeLibraryPath [ - stdenv.cc.cc.lib - qtbase - qtquickcontrols2 - qtgraphicaleffects - qtmultimedia - qtsvg - qtdeclarative - qttools - libGL - libsecret - libpulseaudio - glib - ]; - in '' - patchelf \ - --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ - --set-rpath "${rpath}" \ - $out/lib/protonmail-bridge - - substituteInPlace $out/share/applications/ProtonMail_Bridge.desktop \ - --replace "/usr/" "$out/" \ - --replace "Exec=protonmail-bridge" "Exec=$out/bin/protonmail-bridge" + installPhase = '' + install -Dm555 Desktop-Bridge $out/bin/protonmail-bridge ''; - buildInputs = [ qtbase qtquickcontrols2 qtmultimedia qtgraphicaleffects qtdeclarative ]; - - meta = with stdenv.lib; { - homepage = "https://www.protonmail.com/bridge"; - license = licenses.mit; - platforms = [ "x86_64-linux" ]; + meta = with lib; { + homepage = "https://github.com/ProtonMail/proton-bridge"; + changelog = "https://github.com/ProtonMail/proton-bridge/blob/master/Changelog.md"; + downloadPage = "https://github.com/ProtonMail/proton-bridge/releases"; + license = licenses.gpl3; maintainers = with maintainers; [ lightdiscord ]; + 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. - inherit description; + To work, gnome-keyring service must be enabled. + ''; }; } |