2021-12-06 16:07:01 +00:00
|
|
|
{ lib, fetchFromGitHub, gobject-introspection, imagemagick,
|
|
|
|
wrapGAppsHook, python3Packages, gtk3, networkmanager, webkitgtk }:
|
2020-08-20 17:08:02 +00:00
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
python3Packages.buildPythonApplication rec {
|
2020-08-20 17:08:02 +00:00
|
|
|
pname = "protonvpn-linux-gui";
|
2022-01-22 01:22:15 +00:00
|
|
|
version = "1.7.0";
|
2020-08-20 17:08:02 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2021-12-06 16:07:01 +00:00
|
|
|
owner = "ProtonVPN";
|
|
|
|
repo = "linux-app";
|
|
|
|
rev = version;
|
2022-01-22 01:22:15 +00:00
|
|
|
sha256 = "sha256-uzooFQBq2mhqTBr/cgea5cVQ889P70sgSk2vjXBQEfw=";
|
2020-08-20 17:08:02 +00:00
|
|
|
};
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
strictDeps = false;
|
2020-08-20 17:08:02 +00:00
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
gobject-introspection imagemagick wrapGAppsHook
|
|
|
|
];
|
2020-08-20 17:08:02 +00:00
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
propagatedBuildInputs = with python3Packages; [
|
|
|
|
protonvpn-nm-lib
|
|
|
|
psutil
|
|
|
|
];
|
2020-08-20 17:08:02 +00:00
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
buildInputs = [
|
|
|
|
gtk3 networkmanager webkitgtk
|
|
|
|
];
|
2020-08-20 17:08:02 +00:00
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
postFixup = ''
|
|
|
|
# Setting icons
|
2020-08-20 17:08:02 +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
|
2021-12-06 16:07:01 +00:00
|
|
|
convert -resize $size'x'$size \
|
|
|
|
protonvpn_gui/assets/icons/protonvpn-logo.png \
|
|
|
|
$out/share/icons/hicolor/$size'x'$size/apps/protonvpn.png
|
2020-08-20 17:08:02 +00:00
|
|
|
done
|
2021-12-06 16:07:01 +00:00
|
|
|
|
|
|
|
install -Dm644 protonvpn.desktop -t $out/share/applications/
|
|
|
|
substituteInPlace $out/share/applications/protonvpn.desktop \
|
|
|
|
--replace 'protonvpn-logo' protonvpn
|
2020-08-20 17:08:02 +00:00
|
|
|
'';
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
# Project has a dummy test
|
2021-02-13 14:23:35 +00:00
|
|
|
doCheck = false;
|
|
|
|
|
2020-08-20 17:08:02 +00:00
|
|
|
meta = with lib; {
|
2020-10-19 00:13:06 +00:00
|
|
|
description = "Linux GUI for ProtonVPN, written in Python";
|
2021-12-06 16:07:01 +00:00
|
|
|
homepage = "https://github.com/ProtonVPN/linux-app";
|
|
|
|
maintainers = with maintainers; [ offline wolfangaukang ];
|
2021-10-09 14:59:57 +00:00
|
|
|
license = licenses.gpl3Plus;
|
2020-08-20 17:08:02 +00:00
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|