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.

72 lines
1.6 KiB
Nix
Raw Normal View History

2022-02-25 21:55:29 +00:00
{ lib
, buildPythonApplication
, fetchFromGitHub
, wrapGAppsHook
, gobject-introspection
, imagemagick
, networkmanager
, 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-01-20 15:33:15 +00:00
version = "1.7.0";
2020-07-14 20:44:55 +00:00
src = fetchFromGitHub {
owner = "ProtonVPN";
repo = "linux-app";
rev = version;
2022-01-20 15:33:15 +00:00
sha256 = "sha256-uzooFQBq2mhqTBr/cgea5cVQ889P70sgSk2vjXBQEfw=";
2020-07-14 20:44:55 +00:00
};
nativeBuildInputs = [
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
networkmanager
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;
};
}