diff options
author | xeji <36407913+xeji@users.noreply.github.com> | 2018-08-03 16:42:54 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-08-03 16:42:54 +0200 |
commit | 725f253190e154fee5ecd739b478e7672800f180 (patch) | |
tree | a3fe839c6b963c3503d832cc1d348f0019ba94eb | |
parent | d31f89df44666fcd0c854a1cc8da434929e73832 (diff) | |
parent | b4a826404767d17ecf62e83f43a7af8ed666e68b (diff) | |
download | nixlib-725f253190e154fee5ecd739b478e7672800f180.tar nixlib-725f253190e154fee5ecd739b478e7672800f180.tar.gz nixlib-725f253190e154fee5ecd739b478e7672800f180.tar.bz2 nixlib-725f253190e154fee5ecd739b478e7672800f180.tar.lz nixlib-725f253190e154fee5ecd739b478e7672800f180.tar.xz nixlib-725f253190e154fee5ecd739b478e7672800f180.tar.zst nixlib-725f253190e154fee5ecd739b478e7672800f180.zip |
Merge pull request #44346 from Fork-Native-Light-Foundation/package/protonmail-bridge
protonmail-bridge: init at 1.0.5-1
-rw-r--r-- | maintainers/maintainer-list.nix | 5 | ||||
-rw-r--r-- | pkgs/applications/networking/protonmail-bridge/default.nix | 83 | ||||
-rw-r--r-- | pkgs/top-level/all-packages.nix | 2 |
3 files changed, 90 insertions, 0 deletions
diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index ec601841abb8..b807b87aa441 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -2174,6 +2174,11 @@ github = "nathanielbaxter"; name = "Nathaniel Baxter"; }; + lightdiscord = { + email = "arnaud@lightdiscord.me"; + github = "lightdiscord"; + name = "Arnaud Pascal"; + }; lihop = { email = "nixos@leroy.geek.nz"; github = "lihop"; diff --git a/pkgs/applications/networking/protonmail-bridge/default.nix b/pkgs/applications/networking/protonmail-bridge/default.nix new file mode 100644 index 000000000000..7c5014018242 --- /dev/null +++ b/pkgs/applications/networking/protonmail-bridge/default.nix @@ -0,0 +1,83 @@ +{ stdenv, fetchurl, lib, qtbase, qtmultimedia, qtsvg, qtdeclarative, qttools, full, + libsecret, libGL, libpulseaudio, glib, makeWrapper, makeDesktopItem }: + +let + version = "1.0.5-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 + ''; + + desktopItem = makeDesktopItem { + name = "Desktop-Bridge"; + exec = "Desktop-Bridge"; + icon = "desktop-bridge"; + comment = stdenv.lib.replaceStrings ["\n"] [" "] description; + desktopName = "ProtonMail Bridge"; + genericName = "ProtonMail Bridge for Linux"; + categories = "Utility;Security;Network;Email"; + }; +in stdenv.mkDerivation rec { + name = "protonmail-bridge-${version}"; + + src = fetchurl { + url = "https://protonmail.com/download/protonmail-bridge_${version}_amd64.deb"; + sha256 = "1fsf4l5c9ii370fgy721a71h34g7vjfddscal3jblb4mm3ywzxfl"; + }; + + nativeBuildInputs = [ makeWrapper ]; + + sourceRoot = "."; + + unpackCmd = '' + ar p "$src" data.tar.xz | tar xJ + ''; + + installPhase = '' + mkdir -p $out/{bin,lib,share} + mkdir -p $out/share/{applications,icons/hicolor/scalable/apps} + + cp -r usr/lib/protonmail/bridge/Desktop-Bridge{,.sh} $out/lib + cp usr/share/icons/protonmail/Desktop-Bridge.svg $out/share/icons/hicolor/scalable/apps/desktop-bridge.svg + cp ${desktopItem}/share/applications/* $out/share/applications + + ln -s $out/lib/Desktop-Bridge $out/bin/Desktop-Bridge + ''; + + postFixup = let + rpath = lib.makeLibraryPath [ + stdenv.cc.cc.lib + qtbase + qtmultimedia + qtsvg + qtdeclarative + qttools + libGL + libsecret + libpulseaudio + glib + ]; + + qtPath = prefix: "${full}/${prefix}"; + in '' + patchelf \ + --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ + --set-rpath "${rpath}" \ + $out/lib/Desktop-Bridge + + wrapProgram $out/lib/Desktop-Bridge \ + --set QT_PLUGIN_PATH "${qtPath qtbase.qtPluginPrefix}" \ + --set QML_IMPORT_PATH "${qtPath qtbase.qtQmlPrefix}" \ + --set QML2_IMPORT_PATH "${qtPath qtbase.qtQmlPrefix}" \ + ''; + + meta = with stdenv.lib; { + homepage = https://www.protonmail.com/bridge; + license = licenses.mit; + platforms = [ "x86_64-linux" ]; + maintainers = with maintainers; [ lightdiscord ]; + + inherit description; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 8d151eadf4e3..b022e02eb873 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -17922,6 +17922,8 @@ with pkgs; python = python3; }; + protonmail-bridge = libsForQt5.callPackage ../applications/networking/protonmail-bridge { }; + psi = callPackage ../applications/networking/instant-messengers/psi { }; psi-plus = callPackage ../applications/networking/instant-messengers/psi-plus { }; |