proton-vpn-cli: init at 0.1.2 (#473395)

This commit is contained in:
Anthony
2025-12-27 17:48:11 +00:00
committed by GitHub
8 changed files with 210 additions and 121 deletions
@@ -0,0 +1,71 @@
{
lib,
fetchFromGitHub,
python3Packages,
gobject-introspection,
libnotify,
wrapGAppsNoGuiHook,
}:
python3Packages.buildPythonApplication rec {
pname = "proton-vpn-cli";
version = "0.1.3";
pyproject = true;
src = fetchFromGitHub {
owner = "ProtonVPN";
repo = "proton-vpn-cli";
tag = "v${version}";
hash = "sha256-Hn7xLb7VWa2dlsrQnjnRgv+8UntOwDak9+rV1HF7k80=";
};
nativeBuildInputs = [
# Needed for the NM namespace
gobject-introspection
wrapGAppsNoGuiHook
];
buildInputs = [
libnotify # gir typelib is used
];
build-system = with python3Packages; [
setuptools
];
dependencies = with python3Packages; [
click
dbus-fast
packaging
proton-core
proton-keyring-linux
proton-vpn-api-core
proton-vpn-local-agent
];
dontWrapGApps = true;
preFixup = ''
makeWrapperArgs+=("''${gappsWrapperArgs[@]}")
'';
preCheck = ''
# Needed for Permission denied: '/homeless-shelter'
export HOME=$(mktemp -d)
export XDG_RUNTIME_DIR=$(mktemp -d)
'';
nativeCheckInputs = with python3Packages; [
pytestCheckHook
pytest-asyncio
pytest-cov-stub
];
meta = {
description = "Official ProtonVPN CLI Linux app";
homepage = "https://github.com/ProtonVPN/proton-vpn-cli";
license = lib.licenses.gpl3Plus;
mainProgram = "protonvpn";
maintainers = with lib.maintainers; [ anthonyroussel ];
};
}
+16 -8
View File
@@ -3,23 +3,23 @@
python3Packages,
fetchFromGitHub,
gobject-introspection,
wrapGAppsHook3,
libnotify,
withIndicator ? true,
libappindicator-gtk3,
libayatana-appindicator,
libnotify,
wrapGAppsHook3,
withIndicator ? true,
}:
python3Packages.buildPythonApplication rec {
pname = "protonvpn-gui";
version = "4.13.0";
version = "4.13.1";
pyproject = true;
src = fetchFromGitHub {
owner = "ProtonVPN";
repo = "proton-vpn-gtk-app";
tag = "v${version}";
hash = "sha256-1T8gh0aKYiVnkr4SLg2a5Hcc8FQn8llofCXxeZGwd8I=";
hash = "sha256-pfk7ttQp7nWpGWqBWny9VdSktpB7RoBJIcF/pF6gAfA=";
};
nativeBuildInputs = [
@@ -49,7 +49,6 @@ python3Packages.buildPythonApplication rec {
proton-keyring-linux
proton-vpn-api-core
proton-vpn-local-agent
proton-vpn-network-manager
pycairo
pygobject3
];
@@ -72,10 +71,18 @@ python3Packages.buildPythonApplication rec {
preCheck = ''
# Needed for Permission denied: '/homeless-shelter'
export HOME=$(mktemp -d)
export XDG_RUNTIME_DIR=$(mktemp -d)
'';
# Gets a segmentation fault after the widgets test
doCheck = false;
nativeCheckInputs = with python3Packages; [
pytestCheckHook
pytest-cov-stub
];
disabledTestPaths = [
# Segmentation fault during widgets tests
"tests/unit/widgets"
];
meta = {
description = "Proton VPN GTK app for Linux";
@@ -84,6 +91,7 @@ python3Packages.buildPythonApplication rec {
platforms = lib.platforms.linux;
mainProgram = "protonvpn-app";
maintainers = with lib.maintainers; [
anthonyroussel
sebtm
rapiteanu
];
@@ -2,35 +2,56 @@
lib,
buildPythonPackage,
fetchFromGitHub,
cryptography,
fido2,
setuptools,
jinja2,
proton-core,
pynacl,
aiohttp,
cryptography,
distro,
fido2,
gobject-introspection,
iproute2,
jinja2,
networkmanager,
proton-core,
proton-vpn-local-agent,
pycairo,
pygobject3,
pynacl,
pyopenssl,
pytest-asyncio,
pytest-cov-stub,
pytestCheckHook,
pyxdg,
requests,
sentry-sdk,
pyxdg,
distro,
pytestCheckHook,
pytest-cov-stub,
setuptools,
}:
buildPythonPackage rec {
pname = "proton-vpn-api-core";
version = "4.13.2";
version = "4.14.1";
pyproject = true;
src = fetchFromGitHub {
owner = "ProtonVPN";
repo = "python-proton-vpn-api-core";
rev = "v${version}";
hash = "sha256-oFTlN/mi4TACmqbebKirYdqDEYzUejK4SKbKgFWONDo=";
hash = "sha256-xyCjzcSasLGm2DMMViI1wpzcLd0mmaBvIyI1HrtW+Gg=";
};
postPatch = ''
substituteInPlace proton/vpn/backend/networkmanager/killswitch/wireguard/killswitch_connection_handler.py \
--replace-fail '["/usr/sbin/ip", "route"]' '["${iproute2}/bin/ip", "route"]'
'';
nativeBuildInputs = [
# Needed to recognize the NM namespace
gobject-introspection
];
propagatedBuildInputs = [
# Needed here for the NM namespace
networkmanager
];
build-system = [
setuptools
];
@@ -40,18 +61,27 @@ buildPythonPackage rec {
distro
fido2
jinja2
pynacl
proton-core
sentry-sdk
proton-vpn-local-agent
pycairo
pygobject3
pynacl
pyxdg
sentry-sdk
];
pythonImportsCheck = [
"proton.vpn.core"
"proton.vpn.backend.networkmanager.core"
"proton.vpn.backend.networkmanager.killswitch.default"
"proton.vpn.backend.networkmanager.killswitch.wireguard"
"proton.vpn.backend.networkmanager.protocol.openvpn"
"proton.vpn.backend.networkmanager.protocol.wireguard"
"proton.vpn.connection"
"proton.vpn.core"
"proton.vpn.killswitch.interface"
"proton.vpn.logging"
"proton.vpn.session"
"proton.vpn.split_tunneling"
];
nativeCheckInputs = [
@@ -63,7 +93,7 @@ buildPythonPackage rec {
pytest-cov-stub
];
# Needed for `pythonImportsCheck`, `preCheck` happens between `pythonImportsCheckPhase` and `pytestCheckPhase`.
# Needed for `pythonImportsCheck`, `postInstall` happens between `pythonImportsCheckPhase` and `pytestCheckPhase`.
postInstall = ''
# Needed for Permission denied: '/homeless-shelter'
export HOME=$(mktemp -d)
@@ -88,6 +118,7 @@ buildPythonPackage rec {
license = lib.licenses.gpl3Only;
platforms = lib.platforms.linux;
maintainers = with lib.maintainers; [
anthonyroussel
sebtm
rapiteanu
];
@@ -0,0 +1,69 @@
{
lib,
buildPythonPackage,
fetchFromGitHub,
bcc,
dbus-fast,
packaging,
proton-core,
proton-vpn-api-core,
psutil,
pytest-asyncio,
pytest-cov-stub,
pytestCheckHook,
setuptools,
systemd-python,
}:
buildPythonPackage rec {
pname = "proton-vpn-daemon";
version = "0.13.4";
pyproject = true;
src = fetchFromGitHub {
owner = "ProtonVPN";
repo = "proton-vpn-daemon";
tag = "v${version}";
hash = "sha256-0CqMGyaHjMktM3N1MfrELprZQZqJD1w/mFaOJvJApZQ=";
};
build-system = [
setuptools
];
dependencies = [
bcc
dbus-fast
packaging
proton-core
proton-vpn-api-core
psutil
systemd-python
];
# Needed for `pythonImportsCheck`, `postBuild` happens between `pythonImportsCheckPhase` and `pytestCheckPhase`.
postBuild = ''
# Needed for Permission denied: '/homeless-shelter'
export HOME=$(mktemp -d)
export XDG_RUNTIME_DIR=$(mktemp -d)
'';
nativeCheckInputs = [
pytestCheckHook
pytest-asyncio
pytest-cov-stub
];
pythonImportsCheck = [
"proton.vpn.daemon"
"proton.vpn.daemon.split_tunneling"
];
meta = {
description = "Daemons for Proton VPN Linux client";
homepage = "https://github.com/ProtonVPN/proton-vpn-daemon";
license = lib.licenses.gpl3Only;
platforms = lib.platforms.linux;
maintainers = with lib.maintainers; [ anthonyroussel ];
};
}
@@ -17,7 +17,7 @@ buildPythonPackage rec {
src = fetchFromGitHub {
owner = "ProtonVPN";
repo = "python-proton-vpn-local-agent";
repo = "local-agent-rs";
rev = version;
hash = "sha256-rk3wi6q0UDuwh5yhLBqdLYsJxVqhlI+Yc7HZsiAU1Y8=";
};
@@ -65,10 +65,11 @@ buildPythonPackage rec {
meta = {
description = "Proton VPN local agent written in Rust with Python bindings";
homepage = "https://github.com/ProtonVPN/python-proton-vpn-local-agent";
homepage = "https://github.com/ProtonVPN/local-agent-rs";
license = lib.licenses.gpl3Only;
platforms = lib.platforms.linux;
maintainers = with lib.maintainers; [
anthonyroussel
sebtm
rapiteanu
];
@@ -1,89 +0,0 @@
{
lib,
buildPythonPackage,
fetchFromGitHub,
gobject-introspection,
apt,
iproute2,
setuptools,
networkmanager,
proton-core,
proton-vpn-api-core,
proton-vpn-local-agent,
pycairo,
pygobject3,
pyxdg,
pytest-asyncio,
pytestCheckHook,
pytest-cov-stub,
}:
buildPythonPackage rec {
pname = "proton-vpn-network-manager";
version = "0.13.4";
pyproject = true;
src = fetchFromGitHub {
owner = "ProtonVPN";
repo = "python-proton-vpn-network-manager";
tag = "v${version}";
hash = "sha256-VMaj85oFxLkloR6hdeRHwVTBl44Mx5WEjOl9FnLf8+w=";
};
nativeBuildInputs = [
# Needed to recognize the NM namespace
gobject-introspection
];
build-system = [
setuptools
];
dependencies = [
# Needed here for the NM namespace
networkmanager
proton-core
proton-vpn-api-core
proton-vpn-local-agent
pycairo
pygobject3
pyxdg
];
postPatch = ''
substituteInPlace proton/vpn/backend/linux/networkmanager/killswitch/wireguard/killswitch_connection_handler.py \
--replace '/usr/sbin/ip' '${iproute2}/bin/ip'
substituteInPlace proton/vpn/backend/linux/networkmanager/killswitch/wireguard/wgkillswitch.py \
--replace '/usr/bin/apt' '${apt}/bin/apt'
'';
pythonImportsCheck = [
"proton.vpn.backend.linux.networkmanager"
"proton.vpn.backend.linux.networkmanager.killswitch.default"
"proton.vpn.backend.linux.networkmanager.killswitch.wireguard"
];
nativeCheckInputs = [
pytestCheckHook
pytest-cov-stub
pytest-asyncio
];
# Needed for `pythonImportsCheck`, `preCheck` happens between `pythonImportsCheckPhase` and `pytestCheckPhase`.
preCheck = ''
# Needed for Permission denied: '/homeless-shelter'
export HOME=$(mktemp -d)
export XDG_RUNTIME_DIR=$(mktemp -d)
'';
meta = {
description = "Provides the necessary functionality for other ProtonVPN components to interact with NetworkManager";
homepage = "https://github.com/ProtonVPN/python-proton-vpn-network-manager";
license = lib.licenses.gpl3Only;
platforms = lib.platforms.linux;
maintainers = with lib.maintainers; [
sebtm
rapiteanu
];
};
}
+2 -2
View File
@@ -1362,8 +1362,8 @@ mapAliases {
proton-caller = throw "'proton-caller' has been removed from nixpkgs due to being unmaintained and lack of upstream maintenance."; # Added 2025-09-25
proton-vpn-local-agent = throw "'proton-vpn-local-agent' has been renamed to 'python3Packages.proton-vpn-local-agent'"; # Converted to throw 2025-10-26
protonup = throw "'protonup' has been renamed to/replaced by 'protonup-ng'"; # Converted to throw 2025-10-27
protonvpn-cli = throw "protonvpn-cli source code was removed from upstream. Use protonvpn-gui instead."; # Added 2025-10-16
protonvpn-cli_2 = throw "protonvpn-cli_2 has been removed due to being deprecated. Use protonvpn-gui instead."; # Added 2025-10-16
protonvpn-cli = throw "protonvpn-cli source code was removed from upstream. Use proton-vpn-cli instead."; # Added 2025-10-16
protonvpn-cli_2 = throw "protonvpn-cli_2 has been removed due to being deprecated. Use proton-vpn-cli instead."; # Added 2025-10-16
proxmark3-rrg = throw "'proxmark3-rrg' has been renamed to/replaced by 'proxmark3'"; # Converted to throw 2025-10-27
pscid = throw "'pscid' has been removed because it was unmaintained upstream"; # Added 2025-12-12
pulp = throw "'pulp' has been removed because it was unmaintained upstream"; # Added 2025-12-12
+2 -4
View File
@@ -12597,11 +12597,9 @@ self: super: with self; {
proton-vpn-api-core = callPackage ../development/python-modules/proton-vpn-api-core { };
proton-vpn-local-agent = callPackage ../development/python-modules/proton-vpn-local-agent { };
proton-vpn-daemon = callPackage ../development/python-modules/proton-vpn-daemon { };
proton-vpn-network-manager =
callPackage ../development/python-modules/proton-vpn-network-manager
{ };
proton-vpn-local-agent = callPackage ../development/python-modules/proton-vpn-local-agent { };
protonup-ng = callPackage ../development/python-modules/protonup-ng { };