2019-07-23 22:11:28 +02:00
|
|
|
{ stdenv, fetchurl, lib, qtbase, qtmultimedia, qtsvg, qtdeclarative, qttools, qtgraphicaleffects, qtquickcontrols2, full
|
|
|
|
, libsecret, libGL, libpulseaudio, glib, wrapQtAppsHook, makeDesktopItem, mkDerivation }:
|
2018-08-02 11:47:09 +02:00
|
|
|
|
|
|
|
let
|
2019-07-23 22:11:28 +02:00
|
|
|
version = "1.1.6-1";
|
2018-08-02 11:47:09 +02:00
|
|
|
|
|
|
|
description = ''
|
|
|
|
An application that runs on your computer in the background and seamlessly encrypts
|
2018-08-16 13:23:19 +02:00
|
|
|
and decrypts your mail as it enters and leaves your computer.
|
|
|
|
|
|
|
|
To work, gnome-keyring service must be enabled.
|
2018-08-02 11:47:09 +02:00
|
|
|
'';
|
|
|
|
|
|
|
|
desktopItem = makeDesktopItem {
|
2019-02-28 22:34:15 +01:00
|
|
|
name = "protonmail-bridge";
|
|
|
|
exec = "protonmail-bridge";
|
|
|
|
icon = "protonmail-bridge";
|
2018-08-02 11:47:09 +02:00
|
|
|
comment = stdenv.lib.replaceStrings ["\n"] [" "] description;
|
|
|
|
desktopName = "ProtonMail Bridge";
|
|
|
|
genericName = "ProtonMail Bridge for Linux";
|
|
|
|
categories = "Utility;Security;Network;Email";
|
|
|
|
};
|
2019-07-23 22:11:28 +02:00
|
|
|
|
|
|
|
in mkDerivation rec {
|
2018-08-02 11:47:09 +02:00
|
|
|
name = "protonmail-bridge-${version}";
|
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://protonmail.com/download/protonmail-bridge_${version}_amd64.deb";
|
2019-07-23 22:11:28 +02:00
|
|
|
sha256 = "108dql9q5znsqjkrs41pc6psjbg5bz09rdmjl036xxbvsdvq4a8r";
|
2018-08-02 11:47:09 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
sourceRoot = ".";
|
|
|
|
|
|
|
|
unpackCmd = ''
|
|
|
|
ar p "$src" data.tar.xz | tar xJ
|
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
2018-08-13 14:13:13 +02:00
|
|
|
mkdir -p $out/{bin,lib,share/applications}
|
2018-10-31 20:24:58 +01:00
|
|
|
mkdir -p $out/share/{applications,icons/hicolor/scalable/apps}
|
2018-08-02 11:47:09 +02:00
|
|
|
|
2019-03-06 00:42:16 +01:00
|
|
|
cp -r usr/lib/protonmail/bridge/protonmail-bridge $out/lib
|
2019-02-28 22:34:15 +01:00
|
|
|
cp usr/share/icons/protonmail/ProtonMail_Bridge.svg $out/share/icons/hicolor/scalable/apps/protonmail-bridge.svg
|
2018-08-02 11:47:09 +02:00
|
|
|
cp ${desktopItem}/share/applications/* $out/share/applications
|
|
|
|
|
2019-02-28 22:34:15 +01:00
|
|
|
ln -s $out/lib/protonmail-bridge $out/bin/protonmail-bridge
|
2018-08-02 11:47:09 +02:00
|
|
|
'';
|
|
|
|
|
|
|
|
postFixup = let
|
|
|
|
rpath = lib.makeLibraryPath [
|
|
|
|
stdenv.cc.cc.lib
|
|
|
|
qtbase
|
2019-07-23 22:11:28 +02:00
|
|
|
qtquickcontrols2
|
|
|
|
qtgraphicaleffects
|
2018-08-02 11:47:09 +02:00
|
|
|
qtmultimedia
|
|
|
|
qtsvg
|
|
|
|
qtdeclarative
|
|
|
|
qttools
|
|
|
|
libGL
|
|
|
|
libsecret
|
|
|
|
libpulseaudio
|
|
|
|
glib
|
|
|
|
];
|
|
|
|
in ''
|
|
|
|
patchelf \
|
|
|
|
--set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
|
|
|
|
--set-rpath "${rpath}" \
|
2019-02-28 22:34:15 +01:00
|
|
|
$out/lib/protonmail-bridge
|
2018-08-02 11:47:09 +02:00
|
|
|
'';
|
|
|
|
|
2019-07-23 22:11:28 +02:00
|
|
|
buildInputs = [ qtbase qtquickcontrols2 qtmultimedia qtgraphicaleffects qtdeclarative ];
|
|
|
|
|
2018-08-02 11:47:09 +02:00
|
|
|
meta = with stdenv.lib; {
|
2019-05-28 12:19:11 +02:00
|
|
|
homepage = "https://www.protonmail.com/bridge";
|
2018-08-02 11:47:09 +02:00
|
|
|
license = licenses.mit;
|
|
|
|
platforms = [ "x86_64-linux" ];
|
|
|
|
maintainers = with maintainers; [ lightdiscord ];
|
|
|
|
|
|
|
|
inherit description;
|
|
|
|
};
|
|
|
|
}
|