diff options
author | P. <d.ol.rod@tutanota.com> | 2023-12-07 07:03:16 -0600 |
---|---|---|
committer | P. <d.ol.rod@tutanota.com> | 2023-12-07 07:03:16 -0600 |
commit | 9aa6e8c534a2393d726d2b5785e2864f135760a6 (patch) | |
tree | ad920b5979690092c4f5434ccac4320da4744b92 /pkgs/applications/networking/protonvpn-gui | |
parent | d392a5dab9f1d7228f0a9d2eeceedb0cb7b2838b (diff) |
protonvpn-gui_legacy: init at 1.12.0
Diffstat (limited to 'pkgs/applications/networking/protonvpn-gui')
-rw-r--r-- | pkgs/applications/networking/protonvpn-gui/legacy.nix | 79 |
1 files changed, 79 insertions, 0 deletions
diff --git a/pkgs/applications/networking/protonvpn-gui/legacy.nix b/pkgs/applications/networking/protonvpn-gui/legacy.nix new file mode 100644 index 0000000000000..7464a279cf8a9 --- /dev/null +++ b/pkgs/applications/networking/protonvpn-gui/legacy.nix @@ -0,0 +1,79 @@ +{ lib +, buildPythonApplication +, fetchFromGitHub +, setuptools +, wrapGAppsHook +, gdk-pixbuf +, glib-networking +, gobject-introspection +, imagemagick +, librsvg +, pango +, python3 +, webkitgtk +# Python libs +, protonvpn-nm-lib +, psutil +# Optionals +, withIndicator ? true +, libappindicator-gtk3 }: + +buildPythonApplication rec { + pname = "protonvpn-gui"; + version = "1.12.0"; + pyproject = true; + + src = fetchFromGitHub { + owner = "ProtonVPN"; + repo = "linux-app"; + rev = "refs/tags/${version}"; + sha256 = "sha256-MPS4d/yNkccsc/j85h7/4k4xL8uSCvhj/9JWPa7ezLY="; + }; + + nativeBuildInputs = [ + gdk-pixbuf + gobject-introspection + imagemagick + setuptools + wrapGAppsHook + ]; + + propagatedBuildInputs = [ + glib-networking # needed for the login captcha + protonvpn-nm-lib + psutil + ]; + + buildInputs = [ + librsvg + pango + webkitgtk + ] ++ lib.optionals withIndicator [ libappindicator-gtk3 ]; + + postInstall = '' + # Setting icons + for size in 16 32 48 64 72 96 128 192 512 1024; do + mkdir -p $out/share/icons/hicolor/"$size"x"$size"/apps + convert -resize $size'x'$size \ + protonvpn_gui/assets/icons/protonvpn-logo.png \ + $out/share/icons/hicolor/$size'x'$size/apps/protonvpn.png + done + + install -Dm644 protonvpn.desktop -t $out/share/applications/ + chmod 644 $out/${python3.sitePackages}/protonvpn_gui/assets/icons/plus-server.png + substituteInPlace $out/share/applications/protonvpn.desktop \ + --replace 'protonvpn-logo' protonvpn + ''; + + # Project has a dummy test + doCheck = false; + + meta = with lib; { + description = "Official ProtonVPN Linux app"; + homepage = "https://github.com/ProtonVPN/linux-app"; + maintainers = with maintainers; [ wolfangaukang ]; + license = licenses.gpl3Plus; + mainProgram = "protonvpn"; + platforms = platforms.linux; + }; +} |