diff --git a/pkgs/applications/networking/protonvpn-cli-ng/default.nix b/pkgs/applications/networking/protonvpn-cli-ng/default.nix deleted file mode 100644 index e2870c58e971..000000000000 --- a/pkgs/applications/networking/protonvpn-cli-ng/default.nix +++ /dev/null @@ -1,36 +0,0 @@ -{ lib, fetchFromGitHub, python3Packages, openvpn, dialog, iptables }: - -python3Packages.buildPythonApplication rec { - pname = "protonvpn-cli-ng"; - version = "2.2.4"; - - src = fetchFromGitHub { - owner = "protonvpn"; - repo = "${pname}"; - rev = "v${version}"; - sha256 = "08yca0a0prrnrc7ir7ajd56yxvxpcs4m1k8f5kf273f5whgr7wzw"; - }; - - propagatedBuildInputs = (with python3Packages; [ - requests - docopt - setuptools - jinja2 - pythondialog - ]) ++ [ - dialog - openvpn - iptables - ]; - - # No tests - doCheck = false; - - meta = with lib; { - description = "Linux command-line client for ProtonVPN"; - homepage = "https://github.com/protonvpn/protonvpn-cli-ng"; - maintainers = with maintainers; [ jtcoolen jefflabonte ]; - license = licenses.gpl3; - platforms = platforms.unix; - }; -} diff --git a/pkgs/applications/networking/protonvpn-cli/default.nix b/pkgs/applications/networking/protonvpn-cli/default.nix index c48f6c820269..1c72d4ef88c0 100644 --- a/pkgs/applications/networking/protonvpn-cli/default.nix +++ b/pkgs/applications/networking/protonvpn-cli/default.nix @@ -1,43 +1,36 @@ -{ stdenv, lib, fetchFromGitHub, makeWrapper, coreutils -, openvpn, python, dialog, wget, update-resolv-conf }: +{ lib, fetchFromGitHub, python3Packages, openvpn, dialog, iptables }: -let - expectedUpdateResolvPath = "/etc/openvpn/update-resolv-conf"; - actualUpdateResolvePath = "${update-resolv-conf}/libexec/openvpn/update-resolv-conf"; - -in stdenv.mkDerivation rec { - name = "protonvpn-cli"; - version = "1.1.2"; +python3Packages.buildPythonApplication rec { + pname = "protonvpn-linux-cli"; + version = "2.2.4"; src = fetchFromGitHub { - owner = "ProtonVPN"; - repo = "protonvpn-cli"; + owner = "protonvpn"; + repo = "linux-cli"; rev = "v${version}"; - sha256 = "0xvflr8zf267n3dv63nkk4wjxhbckw56sqmyca3krf410vrd7zlv"; + sha256 = "08yca0a0prrnrc7ir7ajd56yxvxpcs4m1k8f5kf273f5whgr7wzw"; }; - nativeBuildInputs = [ makeWrapper ]; + propagatedBuildInputs = (with python3Packages; [ + requests + docopt + setuptools + jinja2 + pythondialog + ]) ++ [ + dialog + openvpn + iptables + ]; - installPhase = '' - mkdir -p "$out/bin" - substituteInPlace protonvpn-cli.sh \ - --replace ${expectedUpdateResolvPath} ${actualUpdateResolvePath} \ - --replace \$UID 0 \ - --replace /etc/resolv.conf /dev/null \ - --replace \ - " echo \"Connecting...\"" \ - " sed -ri 's@${expectedUpdateResolvPath}@${actualUpdateResolvePath}@g' \"\$openvpn_config\"; echo \"Connecting...\"" - cp protonvpn-cli.sh "$out/bin/protonvpn-cli" - wrapProgram $out/bin/protonvpn-cli \ - --prefix PATH : ${lib.makeBinPath [ coreutils openvpn python dialog wget update-resolv-conf ]} - ln -s "$out/bin/protonvpn-cli" "$out/bin/pvpn" - ''; + # No tests + doCheck = false; - meta = with stdenv.lib; { - description = "ProtonVPN Command-Line Tool"; - homepage = "https://github.com/ProtonVPN/protonvpn-cli"; - maintainers = with maintainers; [ caugner ]; - license = licenses.mit; + meta = with lib; { + description = "Linux command-line client for ProtonVPN"; + homepage = "https://github.com/protonvpn/linux-cli"; + maintainers = with maintainers; [ jtcoolen jefflabonte ]; + license = licenses.gpl3; platforms = platforms.unix; }; } diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 5e397bf15562..b45e3d85ccc1 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -21948,8 +21948,6 @@ in protonvpn-cli = callPackage ../applications/networking/protonvpn-cli { }; - protonvpn-cli-ng = callPackage ../applications/networking/protonvpn-cli-ng { }; - ps2client = callPackage ../applications/networking/ps2client { }; psi = libsForQt5.callPackage ../applications/networking/instant-messengers/psi { };