mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-28 09:53:10 +00:00
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>
This commit is contained in:
parent
e286f0cf3b
commit
472b6f4f33
@ -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";
|
||||
buildGoModule rec {
|
||||
pname = "protonmail-bridge";
|
||||
version = "1.5.0";
|
||||
|
||||
description = ''
|
||||
src = fetchFromGitHub {
|
||||
owner = "ProtonMail";
|
||||
repo = "proton-bridge";
|
||||
rev = "br-${version}";
|
||||
sha256 = "lHqwKlFwz9iO7LJMGFTGCauw12z/BKnQte2sVoVkOaY=";
|
||||
};
|
||||
|
||||
vendorSha256 = "eP+7fqBctX9XLCoHVJDI/qaa5tocgg3F5nfUM6dzNRg=";
|
||||
|
||||
nativeBuildInputs = [ pkg-config ];
|
||||
|
||||
buildInputs = [ libsecret ];
|
||||
|
||||
buildPhase = ''
|
||||
make BUILD_TIME= build-nogui
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
install -Dm555 Desktop-Bridge $out/bin/protonmail-bridge
|
||||
'';
|
||||
|
||||
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.
|
||||
|
||||
To work, gnome-keyring service must be enabled.
|
||||
'';
|
||||
in mkDerivation {
|
||||
pname = "protonmail-bridge";
|
||||
inherit version;
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://protonmail.com/download/protonmail-bridge_${version}_amd64.deb";
|
||||
sha256 = "032ggk9fvd19fbsqkzwzwh0hpyg8gpkrin71di7zsx6ias5innw1";
|
||||
};
|
||||
|
||||
sourceRoot = ".";
|
||||
|
||||
unpackCmd = ''
|
||||
ar p "$src" data.tar.xz | tar xJ
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/{bin,lib,share}
|
||||
|
||||
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
|
||||
'';
|
||||
|
||||
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"
|
||||
'';
|
||||
|
||||
buildInputs = [ qtbase qtquickcontrols2 qtmultimedia qtgraphicaleffects qtdeclarative ];
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
homepage = "https://www.protonmail.com/bridge";
|
||||
license = licenses.mit;
|
||||
platforms = [ "x86_64-linux" ];
|
||||
maintainers = with maintainers; [ lightdiscord ];
|
||||
|
||||
inherit description;
|
||||
};
|
||||
}
|
||||
|
@ -23185,7 +23185,7 @@ in
|
||||
|
||||
properties-cpp = callPackage ../development/libraries/properties-cpp { };
|
||||
|
||||
protonmail-bridge = libsForQt5.callPackage ../applications/networking/protonmail-bridge { };
|
||||
protonmail-bridge = callPackage ../applications/networking/protonmail-bridge { };
|
||||
|
||||
protonvpn-cli = callPackage ../applications/networking/protonvpn-cli { };
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user