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.

74 lines
1.6 KiB
Nix
Raw Normal View History

2022-02-25 21:55:29 +00:00
{ lib
, buildPythonApplication
, fetchFromGitHub
, wrapGAppsHook
, gdk-pixbuf
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-05-27 16:32:15 +00:00
version = "1.9.0";
2020-07-14 20:44:55 +00:00
src = fetchFromGitHub {
owner = "ProtonVPN";
repo = "linux-app";
2022-05-27 16:32:15 +00:00
rev = version;
sha256 = "sha256-+YLrIhe7kzQHPRk/3D1r56ESS1BdDxP1PFeNIg/kGLw=";
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 = [
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;
2020-07-14 20:44:55 +00:00
platforms = platforms.linux;
};
}