{ lib, stdenv, autoPatchelfHook, fetchurl, ppp, iproute2, nettools, ... }: with lib; let version = "10.2.845.x86"; filename = "NetExtender.Linux-${version}"; in stdenv.mkDerivation { pname = "netextender"; inherit version; nativeBuildInputs = [ autoPatchelfHook ]; buildInputs = [ ppp iproute2 nettools ]; src = fetchurl { url = "https://software.sonicwall.com/NetExtender/${filename}.tgz"; sha256 = "sha256-5TQxAu0MP36uDaFJ1hw7euhMiq1qjyjBsym9Waoj8D8="; }; buildPhase = '' substituteInPlace netExtenderClient/install \ --replace /usr/sbin/pppd ${ppp}/bin/pppd \ --replace /sbin/ip ${iproute2}/bin/ip \ --replace /sbin/route ${nettools}/bin/route \ --replace /sbin/ifconfig ${nettools}/bin/ifconfig \ --replace /usr/share $out/share \ --replace /usr/bin $out/bin ''; meta.license = licenses.unfree; }