2022-03-30 09:31:56 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonApplication
|
|
|
|
, fetchFromGitHub
|
|
|
|
, gobject-introspection
|
2024-01-02 11:29:13 +00:00
|
|
|
, setuptools
|
|
|
|
, wrapGAppsHook
|
|
|
|
, 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-network-manager-openvpn
|
|
|
|
, proton-vpn-session
|
|
|
|
, pycairo
|
|
|
|
, pygobject3
|
|
|
|
, pytestCheckHook
|
2022-03-30 09:31:56 +00:00
|
|
|
, withIndicator ? true
|
2024-01-02 11:29:13 +00:00
|
|
|
, libappindicator-gtk3
|
|
|
|
, libayatana-appindicator
|
|
|
|
}:
|
2020-08-20 17:08:02 +00:00
|
|
|
|
2022-03-30 09:31:56 +00:00
|
|
|
buildPythonApplication rec {
|
|
|
|
pname = "protonvpn-gui";
|
2024-01-02 11:29:13 +00:00
|
|
|
version = "4.1.0-unstable-2023-10-25";
|
|
|
|
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";
|
|
|
|
rev = "713324e9e4ee9f030c8115072cae379eb3340c42";
|
|
|
|
hash = "sha256-DfuM4b2cSIA8j9Ux3TzInRCvzQGb9LvJDSwRhfadBPY=";
|
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-01-02 11:29:13 +00:00
|
|
|
setuptools
|
2022-03-30 09:31:56 +00:00
|
|
|
wrapGAppsHook
|
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
|
|
|
|
];
|
|
|
|
|
2022-03-30 09:31:56 +00:00
|
|
|
propagatedBuildInputs = [
|
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-network-manager-openvpn
|
|
|
|
proton-vpn-session
|
|
|
|
pycairo
|
|
|
|
pygobject3
|
2021-12-06 16:07:01 +00:00
|
|
|
];
|
2020-08-20 17:08:02 +00:00
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace setup.cfg \
|
|
|
|
--replace "--cov=proton --cov-report=html --cov-report=term" ""
|
|
|
|
'';
|
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
|
|
|
|
'';
|
|
|
|
|
|
|
|
nativeCheckInputs = [
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
2021-12-06 16:07:01 +00:00
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
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;
|
|
|
|
|
2020-08-20 17:08:02 +00:00
|
|
|
meta = with lib; {
|
2024-01-02 11:29:13 +00:00
|
|
|
description = "Proton VPN GTK app for Linux";
|
|
|
|
homepage = "https://github.com/ProtonVPN/proton-vpn-gtk-app";
|
2021-10-09 14:59:57 +00:00
|
|
|
license = licenses.gpl3Plus;
|
2020-08-20 17:08:02 +00:00
|
|
|
platforms = platforms.linux;
|
2024-01-02 11:29:13 +00:00
|
|
|
mainProgram = "protonvpn-app";
|
|
|
|
maintainers = with maintainers; [ wolfangaukang ];
|
2020-08-20 17:08:02 +00:00
|
|
|
};
|
|
|
|
}
|