Merge pull request #103037 from lightdiscord/package-update/protonmail-bridge
This commit is contained in:
commit
9c6a75e379
|
@ -1,73 +1,42 @@
|
||||||
{ stdenv, fetchurl, lib, qtbase, qtmultimedia, qtsvg, qtdeclarative, qttools, qtgraphicaleffects, qtquickcontrols2, full
|
{ lib, buildGoModule, fetchFromGitHub, pkg-config, libsecret }:
|
||||||
, libsecret, libGL, libpulseaudio, glib, wrapQtAppsHook, mkDerivation }:
|
|
||||||
|
|
||||||
let
|
buildGoModule rec {
|
||||||
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 {
|
|
||||||
pname = "protonmail-bridge";
|
pname = "protonmail-bridge";
|
||||||
inherit version;
|
version = "1.5.0";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchFromGitHub {
|
||||||
url = "https://protonmail.com/download/protonmail-bridge_${version}_amd64.deb";
|
owner = "ProtonMail";
|
||||||
sha256 = "032ggk9fvd19fbsqkzwzwh0hpyg8gpkrin71di7zsx6ias5innw1";
|
repo = "proton-bridge";
|
||||||
|
rev = "br-${version}";
|
||||||
|
sha256 = "lHqwKlFwz9iO7LJMGFTGCauw12z/BKnQte2sVoVkOaY=";
|
||||||
};
|
};
|
||||||
|
|
||||||
sourceRoot = ".";
|
vendorSha256 = "eP+7fqBctX9XLCoHVJDI/qaa5tocgg3F5nfUM6dzNRg=";
|
||||||
|
|
||||||
unpackCmd = ''
|
nativeBuildInputs = [ pkg-config ];
|
||||||
ar p "$src" data.tar.xz | tar xJ
|
|
||||||
|
buildInputs = [ libsecret ];
|
||||||
|
|
||||||
|
buildPhase = ''
|
||||||
|
make BUILD_TIME= build-nogui
|
||||||
'';
|
'';
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
mkdir -p $out/{bin,lib,share}
|
install -Dm555 Desktop-Bridge $out/bin/protonmail-bridge
|
||||||
|
|
||||||
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
|
meta = with lib; {
|
||||||
rpath = lib.makeLibraryPath [
|
homepage = "https://github.com/ProtonMail/proton-bridge";
|
||||||
stdenv.cc.cc.lib
|
changelog = "https://github.com/ProtonMail/proton-bridge/blob/master/Changelog.md";
|
||||||
qtbase
|
downloadPage = "https://github.com/ProtonMail/proton-bridge/releases";
|
||||||
qtquickcontrols2
|
license = licenses.gpl3;
|
||||||
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 ];
|
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.
|
||||||
|
'';
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -23266,7 +23266,7 @@ in
|
||||||
|
|
||||||
properties-cpp = callPackage ../development/libraries/properties-cpp { };
|
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 { };
|
protonvpn-cli = callPackage ../applications/networking/protonvpn-cli { };
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue