2 , buildPythonApplication
8 , gobject-introspection
18 , withIndicator ? true
19 , libappindicator-gtk3 }:
21 buildPythonApplication rec {
22 pname = "protonvpn-gui";
26 src = fetchFromGitHub {
29 rev = "refs/tags/${version}";
30 sha256 = "sha256-MPS4d/yNkccsc/j85h7/4k4xL8uSCvhj/9JWPa7ezLY=";
41 propagatedBuildInputs = [
42 glib-networking # needed for the login captcha
51 ] ++ lib.optionals withIndicator [ libappindicator-gtk3 ];
55 for size in 16 32 48 64 72 96 128 192 512 1024; do
56 mkdir -p $out/share/icons/hicolor/"$size"x"$size"/apps
57 convert -resize $size'x'$size \
58 protonvpn_gui/assets/icons/protonvpn-logo.png \
59 $out/share/icons/hicolor/$size'x'$size/apps/protonvpn.png
62 install -Dm644 protonvpn.desktop -t $out/share/applications/
63 chmod 644 $out/${python3.sitePackages}/protonvpn_gui/assets/icons/plus-server.png
64 substituteInPlace $out/share/applications/protonvpn.desktop \
65 --replace 'protonvpn-logo' protonvpn
68 # Project has a dummy test
72 description = "Official ProtonVPN Linux app";
73 homepage = "https://github.com/ProtonVPN/linux-app";
74 maintainers = with maintainers; [ wolfangaukang ];
75 license = licenses.gpl3Plus;
76 mainProgram = "protonvpn";
77 platforms = platforms.linux;