protonvpn-cli: replace old protonvpn-cli with protonvpn-cli-ng
This commit is contained in:
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
|
||||
, 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;
|
||||
};
|
||||
}
|
||||
|
|
|
@ -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 { };
|
||||
|
|
Loading…
Reference in a new issue