protonvpn-cli: replace old protonvpn-cli with protonvpn-cli-ng
parent
27f514ac0d
commit
38db4a92e5
|
@ -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;
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,43 +1,36 @@
|
||||||
{ stdenv, lib, fetchFromGitHub, makeWrapper, coreutils
|
{ lib, fetchFromGitHub, python3Packages, openvpn, dialog, iptables }:
|
||||||
, openvpn, python, dialog, wget, update-resolv-conf }:
|
|
||||||
|
|
||||||
let
|
python3Packages.buildPythonApplication rec {
|
||||||
expectedUpdateResolvPath = "/etc/openvpn/update-resolv-conf";
|
pname = "protonvpn-linux-cli";
|
||||||
actualUpdateResolvePath = "${update-resolv-conf}/libexec/openvpn/update-resolv-conf";
|
version = "2.2.4";
|
||||||
|
|
||||||
in stdenv.mkDerivation rec {
|
|
||||||
name = "protonvpn-cli";
|
|
||||||
version = "1.1.2";
|
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "ProtonVPN";
|
owner = "protonvpn";
|
||||||
repo = "protonvpn-cli";
|
repo = "linux-cli";
|
||||||
rev = "v${version}";
|
rev = "v${version}";
|
||||||
sha256 = "0xvflr8zf267n3dv63nkk4wjxhbckw56sqmyca3krf410vrd7zlv";
|
sha256 = "08yca0a0prrnrc7ir7ajd56yxvxpcs4m1k8f5kf273f5whgr7wzw";
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [ makeWrapper ];
|
propagatedBuildInputs = (with python3Packages; [
|
||||||
|
requests
|
||||||
|
docopt
|
||||||
|
setuptools
|
||||||
|
jinja2
|
||||||
|
pythondialog
|
||||||
|
]) ++ [
|
||||||
|
dialog
|
||||||
|
openvpn
|
||||||
|
iptables
|
||||||
|
];
|
||||||
|
|
||||||
installPhase = ''
|
# No tests
|
||||||
mkdir -p "$out/bin"
|
doCheck = false;
|
||||||
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"
|
|
||||||
'';
|
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with lib; {
|
||||||
description = "ProtonVPN Command-Line Tool";
|
description = "Linux command-line client for ProtonVPN";
|
||||||
homepage = "https://github.com/ProtonVPN/protonvpn-cli";
|
homepage = "https://github.com/protonvpn/linux-cli";
|
||||||
maintainers = with maintainers; [ caugner ];
|
maintainers = with maintainers; [ jtcoolen jefflabonte ];
|
||||||
license = licenses.mit;
|
license = licenses.gpl3;
|
||||||
platforms = platforms.unix;
|
platforms = platforms.unix;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -21948,8 +21948,6 @@ in
|
||||||
|
|
||||||
protonvpn-cli = callPackage ../applications/networking/protonvpn-cli { };
|
protonvpn-cli = callPackage ../applications/networking/protonvpn-cli { };
|
||||||
|
|
||||||
protonvpn-cli-ng = callPackage ../applications/networking/protonvpn-cli-ng { };
|
|
||||||
|
|
||||||
ps2client = callPackage ../applications/networking/ps2client { };
|
ps2client = callPackage ../applications/networking/ps2client { };
|
||||||
|
|
||||||
psi = libsForQt5.callPackage ../applications/networking/instant-messengers/psi { };
|
psi = libsForQt5.callPackage ../applications/networking/instant-messengers/psi { };
|
||||||
|
|
Loading…
Reference in New Issue