nixpkgs/pkgs/applications/networking/protonvpn-gui/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

77 lines
1.7 KiB
Nix
Raw Normal View History

2022-02-25 21:55:29 +00:00
{ lib
, buildPythonApplication
, fetchFromGitHub
, wrapGAppsHook
, gdk-pixbuf
, glib-networking
2022-02-25 21:55:29 +00:00
, gobject-introspection
, imagemagick
, librsvg
2022-02-25 21:55:29 +00:00
, pango
, webkitgtk
# Python libs
, protonvpn-nm-lib
, psutil
# Optionals
, withIndicator ? true
, libappindicator-gtk3 }:
2020-07-14 20:44:55 +00:00
2022-02-25 21:55:29 +00:00
buildPythonApplication rec {
pname = "protonvpn-gui";
2022-11-02 21:53:32 +00:00
version = "1.12.0";
2020-07-14 20:44:55 +00:00
src = fetchFromGitHub {
owner = "ProtonVPN";
repo = "linux-app";
2022-06-07 19:03:11 +00:00
rev = "refs/tags/${version}";
2022-11-02 21:53:32 +00:00
sha256 = "sha256-MPS4d/yNkccsc/j85h7/4k4xL8uSCvhj/9JWPa7ezLY=";
2020-07-14 20:44:55 +00:00
};
nativeBuildInputs = [
gdk-pixbuf
2022-02-25 21:55:29 +00:00
gobject-introspection
imagemagick
wrapGAppsHook
];
2020-07-14 20:44:55 +00:00
2022-02-25 21:55:29 +00:00
propagatedBuildInputs = [
glib-networking # needed for the login captcha
protonvpn-nm-lib
psutil
];
2020-07-14 20:44:55 +00:00
buildInputs = [
2022-02-25 21:55:29 +00:00
# To avoid enabling strictDeps = false (#56943)
gobject-introspection
librsvg
2022-02-25 21:55:29 +00:00
pango
webkitgtk
] ++ lib.optionals withIndicator [ libappindicator-gtk3 ];
2020-07-14 20:44:55 +00:00
2022-02-25 21:55:29 +00:00
postInstall = ''
# Setting icons
2020-07-14 20:44:55 +00:00
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
2020-07-14 20:44:55 +00:00
done
install -Dm644 protonvpn.desktop -t $out/share/applications/
substituteInPlace $out/share/applications/protonvpn.desktop \
--replace 'protonvpn-logo' protonvpn
2020-07-14 20:44:55 +00:00
'';
# Project has a dummy test
2021-02-05 08:38:20 +00:00
doCheck = false;
2020-07-14 20:44:55 +00:00
meta = with lib; {
2022-02-25 21:55:29 +00:00
description = "Official ProtonVPN Linux app";
homepage = "https://github.com/ProtonVPN/linux-app";
2022-02-25 21:55:29 +00:00
maintainers = with maintainers; [ wolfangaukang ];
license = licenses.gpl3Plus;
2022-11-15 16:02:50 +00:00
mainProgram = "protonvpn";
2020-07-14 20:44:55 +00:00
platforms = platforms.linux;
};
}