2024-09-19 14:19:46 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonApplication,
|
|
|
|
fetchFromGitHub,
|
|
|
|
gobject-introspection,
|
|
|
|
setuptools,
|
|
|
|
wrapGAppsHook3,
|
|
|
|
dbus-python,
|
|
|
|
packaging,
|
|
|
|
proton-core,
|
|
|
|
proton-keyring-linux,
|
|
|
|
proton-keyring-linux-secretservice,
|
|
|
|
proton-vpn-api-core,
|
|
|
|
proton-vpn-connection,
|
|
|
|
proton-vpn-killswitch,
|
|
|
|
proton-vpn-killswitch-network-manager,
|
|
|
|
proton-vpn-logger,
|
|
|
|
proton-vpn-network-manager,
|
|
|
|
proton-vpn-session,
|
|
|
|
pycairo,
|
|
|
|
pygobject3,
|
|
|
|
withIndicator ? true,
|
|
|
|
libappindicator-gtk3,
|
|
|
|
libayatana-appindicator,
|
2024-01-02 11:29:13 +00:00
|
|
|
}:
|
2020-08-20 17:08:02 +00:00
|
|
|
|
2022-03-30 09:31:56 +00:00
|
|
|
buildPythonApplication rec {
|
|
|
|
pname = "protonvpn-gui";
|
2024-09-19 14:19:46 +00:00
|
|
|
version = "4.4.4";
|
2024-01-02 11:29:13 +00:00
|
|
|
pyproject = true;
|
2020-08-20 17:08:02 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2021-12-06 16:07:01 +00:00
|
|
|
owner = "ProtonVPN";
|
2024-01-02 11:29:13 +00:00
|
|
|
repo = "proton-vpn-gtk-app";
|
2024-02-29 20:09:43 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2024-09-19 14:19:46 +00:00
|
|
|
hash = "sha256-e581FgXrk1cfjsl/UaG9M+3VBYXcV0mggeLeEW9s9KM=";
|
2020-08-20 17:08:02 +00:00
|
|
|
};
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
nativeBuildInputs = [
|
2024-01-02 11:29:13 +00:00
|
|
|
# Needed for the NM namespace
|
2022-03-30 09:31:56 +00:00
|
|
|
gobject-introspection
|
2024-05-15 15:35:15 +00:00
|
|
|
wrapGAppsHook3
|
2021-12-06 16:07:01 +00:00
|
|
|
];
|
2020-08-20 17:08:02 +00:00
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
buildInputs = lib.optionals withIndicator [
|
|
|
|
# Adds AppIndicator3 namespace
|
|
|
|
libappindicator-gtk3
|
|
|
|
# Adds AyatanaAppIndicator3 namespace
|
|
|
|
libayatana-appindicator
|
|
|
|
];
|
|
|
|
|
2024-09-19 14:19:46 +00:00
|
|
|
build-system = [
|
|
|
|
setuptools
|
|
|
|
];
|
|
|
|
|
|
|
|
dependencies = [
|
2024-01-02 11:29:13 +00:00
|
|
|
dbus-python
|
|
|
|
packaging
|
|
|
|
proton-core
|
|
|
|
proton-keyring-linux
|
|
|
|
proton-keyring-linux-secretservice
|
|
|
|
proton-vpn-api-core
|
|
|
|
proton-vpn-connection
|
|
|
|
proton-vpn-killswitch
|
|
|
|
proton-vpn-killswitch-network-manager
|
|
|
|
proton-vpn-logger
|
|
|
|
proton-vpn-network-manager
|
|
|
|
proton-vpn-session
|
|
|
|
pycairo
|
|
|
|
pygobject3
|
2021-12-06 16:07:01 +00:00
|
|
|
];
|
2020-08-20 17:08:02 +00:00
|
|
|
|
2022-03-30 09:31:56 +00:00
|
|
|
postInstall = ''
|
2024-01-02 11:29:13 +00:00
|
|
|
mkdir -p $out/share/{applications,pixmaps}
|
|
|
|
install -Dm 644 ${src}/rpmbuild/SOURCES/protonvpn-app.desktop $out/share/applications
|
|
|
|
install -Dm 644 ${src}/rpmbuild/SOURCES/proton-vpn-logo.svg $out/share/pixmaps
|
|
|
|
'';
|
|
|
|
|
|
|
|
preCheck = ''
|
|
|
|
# Needed for Permission denied: '/homeless-shelter'
|
|
|
|
export HOME=$(mktemp -d)
|
2020-08-20 17:08:02 +00:00
|
|
|
'';
|
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
# Gets a segmentation fault after the widgets test
|
2021-02-13 14:23:35 +00:00
|
|
|
doCheck = false;
|
|
|
|
|
2024-09-19 14:19:46 +00:00
|
|
|
meta = {
|
2024-01-02 11:29:13 +00:00
|
|
|
description = "Proton VPN GTK app for Linux";
|
|
|
|
homepage = "https://github.com/ProtonVPN/proton-vpn-gtk-app";
|
2024-09-19 14:19:46 +00:00
|
|
|
license = lib.licenses.gpl3Plus;
|
|
|
|
platforms = lib.platforms.linux;
|
2024-01-02 11:29:13 +00:00
|
|
|
mainProgram = "protonvpn-app";
|
2024-09-19 14:19:46 +00:00
|
|
|
maintainers = with lib.maintainers; [ sebtm ];
|
2020-08-20 17:08:02 +00:00
|
|
|
};
|
|
|
|
}
|