3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/applications/networking/protonvpn-gui/default.nix

55 lines
1.4 KiB
Nix
Raw Normal View History

{ lib, fetchFromGitHub, gobject-introspection, imagemagick,
wrapGAppsHook, python3Packages, gtk3, networkmanager, webkitgtk }:
2020-07-14 21:44:55 +01:00
python3Packages.buildPythonApplication rec {
2020-07-14 21:44:55 +01:00
pname = "protonvpn-linux-gui";
version = "1.4.1";
2020-07-14 21:44:55 +01:00
src = fetchFromGitHub {
owner = "ProtonVPN";
repo = "linux-app";
rev = version;
sha256 = "sha256-08gXEKm8udgNltRdqvAMFL0pDCWZu/kfl1xGQtZPBCc=";
2020-07-14 21:44:55 +01:00
};
strictDeps = false;
2020-07-14 21:44:55 +01:00
nativeBuildInputs = [
gobject-introspection imagemagick wrapGAppsHook
];
2020-07-14 21:44:55 +01:00
propagatedBuildInputs = with python3Packages; [
protonvpn-nm-lib
psutil
];
2020-07-14 21:44:55 +01:00
buildInputs = [
gtk3 networkmanager webkitgtk
];
2020-07-14 21:44:55 +01:00
postFixup = ''
# Setting icons
2020-07-14 21:44:55 +01: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 21:44:55 +01:00
done
install -Dm644 protonvpn.desktop -t $out/share/applications/
substituteInPlace $out/share/applications/protonvpn.desktop \
--replace 'protonvpn-logo' protonvpn
2020-07-14 21:44:55 +01:00
'';
# Project has a dummy test
2021-02-05 08:38:20 +00:00
doCheck = false;
2020-07-14 21:44:55 +01:00
meta = with lib; {
description = "Linux GUI for ProtonVPN, written in Python";
homepage = "https://github.com/ProtonVPN/linux-app";
maintainers = with maintainers; [ offline wolfangaukang ];
license = licenses.gpl3Plus;
2020-07-14 21:44:55 +01:00
platforms = platforms.linux;
};
}