2021-10-23 05:40:39 +01:00
|
|
|
{ lib, fetchFromGitHub, gobject-introspection, imagemagick,
|
|
|
|
wrapGAppsHook, python3Packages, gtk3, networkmanager, webkitgtk }:
|
2020-07-14 21:44:55 +01:00
|
|
|
|
2021-10-23 05:40:39 +01:00
|
|
|
python3Packages.buildPythonApplication rec {
|
2020-07-14 21:44:55 +01:00
|
|
|
pname = "protonvpn-linux-gui";
|
2021-10-23 05:40:39 +01:00
|
|
|
version = "1.4.1";
|
2020-07-14 21:44:55 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2021-10-23 05:40:39 +01:00
|
|
|
owner = "ProtonVPN";
|
|
|
|
repo = "linux-app";
|
|
|
|
rev = version;
|
|
|
|
sha256 = "sha256-08gXEKm8udgNltRdqvAMFL0pDCWZu/kfl1xGQtZPBCc=";
|
2020-07-14 21:44:55 +01:00
|
|
|
};
|
|
|
|
|
2021-10-23 05:40:39 +01:00
|
|
|
strictDeps = false;
|
2020-07-14 21:44:55 +01:00
|
|
|
|
2021-10-23 05:40:39 +01:00
|
|
|
nativeBuildInputs = [
|
|
|
|
gobject-introspection imagemagick wrapGAppsHook
|
|
|
|
];
|
2020-07-14 21:44:55 +01:00
|
|
|
|
2021-10-23 05:40:39 +01:00
|
|
|
propagatedBuildInputs = with python3Packages; [
|
|
|
|
protonvpn-nm-lib
|
|
|
|
psutil
|
|
|
|
];
|
2020-07-14 21:44:55 +01:00
|
|
|
|
2021-10-23 05:40:39 +01:00
|
|
|
buildInputs = [
|
|
|
|
gtk3 networkmanager webkitgtk
|
|
|
|
];
|
2020-07-14 21:44:55 +01:00
|
|
|
|
2021-10-23 05:40:39 +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
|
2021-10-23 05:40:39 +01:00
|
|
|
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
|
2021-10-23 05:40:39 +01:00
|
|
|
|
|
|
|
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
|
|
|
'';
|
|
|
|
|
2021-10-23 05:40:39 +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; {
|
2020-10-11 06:55:05 +01:00
|
|
|
description = "Linux GUI for ProtonVPN, written in Python";
|
2021-10-23 05:40:39 +01:00
|
|
|
homepage = "https://github.com/ProtonVPN/linux-app";
|
|
|
|
maintainers = with maintainers; [ offline wolfangaukang ];
|
2021-10-08 17:23:34 +01:00
|
|
|
license = licenses.gpl3Plus;
|
2020-07-14 21:44:55 +01:00
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|