git.iko.soy/typeable/nixpkgs
on master help sign in
protonvpn-cli: replace old protonvpn-cli with protonvpn-cli-ng
commit38db4a92e5297c0cf44f5e68a8a92ee089a72f8a authorJaka Hudoklin <jaka@x-truder.net> dateTue 14 Jul 2020, 22:40 (6 years ago) parent27f514a
3 files changed+25−70
pkgs/applications/networking/protonvpn-cli-ng/default.nix−36 pkgs/applications/networking/protonvpn-cli/default.nix+25−32 pkgs/top-level/all-packages.nix−2
pkgs/applications/networking/protonvpn-cli-ng/default.nixdeleted−36
@@ -1,36 +0,0 @@
1−{ lib, fetchFromGitHub, python3Packages, openvpn, dialog, iptables }:
2−
3−python3Packages.buildPythonApplication rec {
4− pname = "protonvpn-cli-ng";
5− version = "2.2.4";
6−
7− src = fetchFromGitHub {
8− owner = "protonvpn";
9− repo = "${pname}";
10− rev = "v${version}";
11− sha256 = "08yca0a0prrnrc7ir7ajd56yxvxpcs4m1k8f5kf273f5whgr7wzw";
12− };
13−
14− propagatedBuildInputs = (with python3Packages; [
15− requests
16− docopt
17− setuptools
18− jinja2
19− pythondialog
20− ]) ++ [
21− dialog
22− openvpn
23− iptables
24− ];
25−
26− # No tests
27− doCheck = false;
28−
29− meta = with lib; {
30− description = "Linux command-line client for ProtonVPN";
31− homepage = "https://github.com/protonvpn/protonvpn-cli-ng";
32− maintainers = with maintainers; [ jtcoolen jefflabonte ];
33− license = licenses.gpl3;
34− platforms = platforms.unix;
35− };
36−}
pkgs/applications/networking/protonvpn-cli/default.nix+25−32
@@ -1,43 +1,36 @@
1−{ stdenv, lib, fetchFromGitHub, makeWrapper, coreutils
2−, openvpn, python, dialog, wget, update-resolv-conf }:
1+{ lib, fetchFromGitHub, python3Packages, openvpn, dialog, iptables }:
32
4−let
5− expectedUpdateResolvPath = "/etc/openvpn/update-resolv-conf";
6− actualUpdateResolvePath = "${update-resolv-conf}/libexec/openvpn/update-resolv-conf";
7−
8−in stdenv.mkDerivation rec {
9− name = "protonvpn-cli";
10− version = "1.1.2";
3+python3Packages.buildPythonApplication rec {
4+ pname = "protonvpn-linux-cli";
5+ version = "2.2.4";
116
127 src = fetchFromGitHub {
13− owner = "ProtonVPN";
14− repo = "protonvpn-cli";
8+ owner = "protonvpn";
9+ repo = "linux-cli";
1510 rev = "v${version}";
16− sha256 = "0xvflr8zf267n3dv63nkk4wjxhbckw56sqmyca3krf410vrd7zlv";
11+ sha256 = "08yca0a0prrnrc7ir7ajd56yxvxpcs4m1k8f5kf273f5whgr7wzw";
1712 };
1813
19− nativeBuildInputs = [ makeWrapper ];
14+ propagatedBuildInputs = (with python3Packages; [
15+ requests
16+ docopt
17+ setuptools
18+ jinja2
19+ pythondialog
20+ ]) ++ [
21+ dialog
22+ openvpn
23+ iptables
24+ ];
2025
21− installPhase = ''
22− mkdir -p "$out/bin"
23− substituteInPlace protonvpn-cli.sh \
24− --replace ${expectedUpdateResolvPath} ${actualUpdateResolvePath} \
25− --replace \$UID 0 \
26− --replace /etc/resolv.conf /dev/null \
27− --replace \
28− " echo \"Connecting...\"" \
29− " sed -ri 's@${expectedUpdateResolvPath}@${actualUpdateResolvePath}@g' \"\$openvpn_config\"; echo \"Connecting...\""
30− cp protonvpn-cli.sh "$out/bin/protonvpn-cli"
31− wrapProgram $out/bin/protonvpn-cli \
32− --prefix PATH : ${lib.makeBinPath [ coreutils openvpn python dialog wget update-resolv-conf ]}
33− ln -s "$out/bin/protonvpn-cli" "$out/bin/pvpn"
34− '';
26+ # No tests
27+ doCheck = false;
3528
36− meta = with stdenv.lib; {
37− description = "ProtonVPN Command-Line Tool";
38− homepage = "https://github.com/ProtonVPN/protonvpn-cli";
39− maintainers = with maintainers; [ caugner ];
40− license = licenses.mit;
29+ meta = with lib; {
30+ description = "Linux command-line client for ProtonVPN";
31+ homepage = "https://github.com/protonvpn/linux-cli";
32+ maintainers = with maintainers; [ jtcoolen jefflabonte ];
33+ license = licenses.gpl3;
4134 platforms = platforms.unix;
4235 };
4336}
pkgs/top-level/all-packages.nix−2
@@ -21948,8 +21948,6 @@ in
2194821948
2194921949 protonvpn-cli = callPackage ../applications/networking/protonvpn-cli { };
2195021950
21951− protonvpn-cli-ng = callPackage ../applications/networking/protonvpn-cli-ng { };
21952−
2195321951 ps2client = callPackage ../applications/networking/ps2client { };
2195421952
2195521953 psi = libsForQt5.callPackage ../applications/networking/instant-messengers/psi { };