Unverified Commit 4258fc8c authored by Anthony's avatar Anthony Committed by GitHub
Browse files

protonvpn-cli,protonvpn-cli_2,python3Packages.protonvpn-nm-lib: remove (#452524)

parents 06d6609f f5bcdb19
Loading
Loading
Loading
Loading
+0 −57
Original line number Diff line number Diff line
{
  lib,
  buildPythonApplication,
  fetchFromGitHub,
  pythonOlder,
  requests,
  docopt,
  pythondialog,
  jinja2,
  distro,
  dialog,
  iptables,
  openvpn,
}:

buildPythonApplication rec {
  pname = "protonvpn-cli_2";
  version = "2.2.12";
  format = "setuptools";

  disabled = pythonOlder "3.5";

  src = fetchFromGitHub {
    owner = "Rafficer";
    repo = "linux-cli-community";
    # There is a tag and branch with the same name
    rev = "refs/tags/v${version}";
    sha256 = "sha256-vNbqjdkIRK+MkYRKUUe7W5Ytc1PU1t5ZLr9fPDOZXUs=";
  };

  propagatedBuildInputs = [
    requests
    docopt
    pythondialog
    jinja2
    distro
    dialog
    openvpn
    iptables
  ];

  # No tests
  doCheck = false;

  meta = with lib; {
    description = "Linux command-line client for ProtonVPN using Openvpn";
    homepage = "https://github.com/Rafficer/linux-cli-community";
    maintainers = with maintainers; [
      jtcoolen
      jefflabonte
      shamilton
    ];
    license = licenses.gpl3Plus;
    platforms = platforms.linux;
    mainProgram = "protonvpn";
  };
}
+0 −60
Original line number Diff line number Diff line
{
  lib,
  buildPythonApplication,
  pythonOlder,
  fetchFromGitHub,
  protonvpn-nm-lib,
  pythondialog,
  dialog,
  wrapGAppsNoGuiHook,
  gobject-introspection,
  glib,
}:

buildPythonApplication rec {
  pname = "protonvpn-cli";
  version = "3.13.0";
  format = "setuptools";

  disabled = pythonOlder "3.5";

  src = fetchFromGitHub {
    owner = "protonvpn";
    repo = "linux-cli";
    tag = version;
    sha256 = "sha256-KhfogC23i7THe6YZJ6Sy1+q83vZupHsS69NurHCeo8I=";
  };

  nativeBuildInputs = [
    wrapGAppsNoGuiHook
    gobject-introspection
  ];

  buildInputs = [
    glib
  ];

  propagatedBuildInputs = [
    protonvpn-nm-lib
    pythondialog
    dialog
  ];

  dontWrapGApps = true;

  makeWrapperArgs = [
    "\${gappsWrapperArgs[@]}"
  ];

  # Project has a dummy test
  doCheck = false;

  meta = with lib; {
    description = "Linux command-line client for ProtonVPN";
    homepage = "https://github.com/protonvpn/linux-cli";
    maintainers = [ ];
    license = licenses.gpl3Plus;
    platforms = platforms.linux;
    mainProgram = "protonvpn-cli";
  };
}
+0 −22
Original line number Diff line number Diff line
From 2867f022aad754fe54d95222b3ae52f6e7f14c2f Mon Sep 17 00:00:00 2001
From: "P. R. d. O" <d.ol.rod@tutanota.com>
Date: Wed, 27 Apr 2022 21:49:12 -0600
Subject: [PATCH] Patching GIRepository

---
 protonvpn_nm_lib/__init__.py | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/protonvpn_nm_lib/__init__.py b/protonvpn_nm_lib/__init__.py
index e69de29..00b95f4 100644
--- a/protonvpn_nm_lib/__init__.py
+++ b/protonvpn_nm_lib/__init__.py
@@ -0,0 +1,5 @@
+import gi
+gi.require_version('GIRepository', '2.0')
+from gi.repository import GIRepository
+repo = GIRepository.Repository.get_default()
+repo.prepend_search_path('@networkmanager_path@')
-- 
2.35.1
+0 −81
Original line number Diff line number Diff line
{
  lib,
  buildPythonPackage,
  fetchFromGitHub,
  pythonOlder,
  replaceVars,
  dbus-python,
  distro,
  jinja2,
  keyring,
  proton-client,
  pygobject3,
  pyxdg,
  systemd,
  ncurses,
  networkmanager,
  pkgs-systemd,
  python,
  xdg-utils,
}:

buildPythonPackage rec {
  pname = "protonvpn-nm-lib";
  version = "3.16.0";
  format = "setuptools";
  disabled = pythonOlder "3.7";

  src = fetchFromGitHub {
    owner = "ProtonVPN";
    repo = "protonvpn-nm-lib";
    tag = version;
    hash = "sha256-n3jfBHMYqyQZgvFFJcylNbTWZ3teuqhdelTfpNrwWuA=";
  };

  propagatedBuildInputs = [
    dbus-python
    distro
    jinja2
    keyring
    proton-client
    pygobject3
    pyxdg
    systemd
    ncurses
    networkmanager
    pkgs-systemd
    xdg-utils
  ];

  patches = [
    (replaceVars ./0001-Patching-GIRepository.patch {
      networkmanager_path = "${networkmanager}/lib/girepository-1.0";
    })
  ];

  postPatch = ''
    substituteInPlace protonvpn_nm_lib/core/dbus/dbus_reconnect.py \
      --replace "exec_start = python_interpreter_path + \" \" + python_service_path" "exec_start = \"$out/bin/protonvpn_reconnector.py\""
  '';

  postInstall = ''
    makeWrapper ${python.interpreter} $out/bin/protonvpn_reconnector.py \
      --add-flags $out/${python.sitePackages}/protonvpn_nm_lib/daemon/dbus_daemon_reconnector.py \
      --prefix PYTHONPATH : "$PYTHONPATH"
  '';

  # Checks cannot be run in the sandbox
  # "Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory"
  doCheck = false;

  pythonImportsCheck = [ "protonvpn_nm_lib" ];

  meta = with lib; {
    description = "ProtonVPN NetworkManager Library intended for every ProtonVPN service user";
    mainProgram = "protonvpn_reconnector.py";
    homepage = "https://github.com/ProtonVPN/protonvpn-nm-lib";
    license = licenses.gpl3Only;
    maintainers = [ ];
    platforms = platforms.linux;
  };
}
+2 −0
Original line number Diff line number Diff line
@@ -2241,6 +2241,8 @@ mapAliases {
  protobuf3_21 = protobuf_21; # Added 2023-10-05
  protoc-gen-connect-es = throw "'protoc-gen-connect-es' has been removed because it is deprecated upstream. Functionality has been integrated into 'protoc-gen-es' v2."; # Added 2025-02-18
  protonup = protonup-ng; # Added 2022-11-06
  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-gui_legacy = throw "protonvpn-gui_legacy source code was removed from upstream. Use protonvpn-gui instead."; # Added 2024-10-12
  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 = lib.warnOnInstantiate "'proton-vpn-local-agent' has been renamed to 'python3Packages.proton-vpn-local-agent'" (
Loading