15 pname = "vpnc-scripts";
16 version = "unstable-2023-01-03";
19 url = "https://gitlab.com/openconnect/vpnc-scripts.git";
20 rev = "22756827315bc875303190abb3756b5b1dd147ce";
21 hash = "sha256-EWrDyXg47Ur9mFutaG8+oYOCAW9AZowzwwJp3YbogIY=";
24 nativeBuildInputs = [ makeWrapper ];
28 cp vpnc-script $out/bin
32 substituteInPlace $out/bin/vpnc-script \
33 --replace "which" "type -P"
34 '' + lib.optionalString stdenv.hostPlatform.isLinux ''
35 substituteInPlace $out/bin/vpnc-script \
36 --replace "/sbin/resolvconf" "${openresolv}/bin/resolvconf" \
37 --replace "/usr/bin/resolvectl" "${systemd}/bin/resolvectl"
39 wrapProgram $out/bin/vpnc-script \
40 --prefix PATH : "${lib.makeBinPath ([ nettools gawk coreutils gnugrep ] ++ lib.optionals stdenv.hostPlatform.isLinux [ openresolv iproute2 ])}"
44 homepage = "https://www.infradead.org/openconnect/";
45 description = "Script for vpnc to configure the network routing and name service";
46 mainProgram = "vpnc-script";
47 license = licenses.gpl2Only;
48 maintainers = with maintainers; [ jerith666 ];
49 platforms = platforms.linux ++ platforms.darwin;