diff options
author | Matt McHenry <github@matt.mchenryfamily.org> | 2020-12-02 14:24:12 -0500 |
---|---|---|
committer | Matt McHenry <github@matt.mchenryfamily.org> | 2021-06-02 18:41:33 -0400 |
commit | 6160d7374f87af59555dc9f507075c471edf0c73 (patch) | |
tree | 64e1ae3583ba7c69aa39b4264b528f9eb300e58b /pkgs/tools/networking/vpnc-scripts | |
parent | c2e076a76710e9c22efc4f37560787bcac93f62b (diff) | |
download | nixlib-6160d7374f87af59555dc9f507075c471edf0c73.tar nixlib-6160d7374f87af59555dc9f507075c471edf0c73.tar.gz nixlib-6160d7374f87af59555dc9f507075c471edf0c73.tar.bz2 nixlib-6160d7374f87af59555dc9f507075c471edf0c73.tar.lz nixlib-6160d7374f87af59555dc9f507075c471edf0c73.tar.xz nixlib-6160d7374f87af59555dc9f507075c471edf0c73.tar.zst nixlib-6160d7374f87af59555dc9f507075c471edf0c73.zip |
openconnect: adapt vpnc-script for use in nix
Co-authored-by: Sandro <sandro.jaeckel@gmail.com>
Diffstat (limited to 'pkgs/tools/networking/vpnc-scripts')
-rw-r--r-- | pkgs/tools/networking/vpnc-scripts/default.nix | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/pkgs/tools/networking/vpnc-scripts/default.nix b/pkgs/tools/networking/vpnc-scripts/default.nix new file mode 100644 index 000000000000..03abd48ad9d1 --- /dev/null +++ b/pkgs/tools/networking/vpnc-scripts/default.nix @@ -0,0 +1,40 @@ +{ lib, stdenv, fetchgit +, makeWrapper +, nettools, gawk, openresolv, coreutils, gnugrep +}: + +stdenv.mkDerivation { + pname = "vpnc-scripts"; + version = "unstable-2020-02-21"; + src = fetchgit { + url = "git://git.infradead.org/users/dwmw2/vpnc-scripts.git"; + rev = "c0122e891f7e033f35f047dad963702199d5cb9e"; + sha256 = "11b1ls012mb704jphqxjmqrfbbhkdjb64j2q4k8wb5jmja8jnd14"; + }; + + nativeBuildInputs = [ makeWrapper ]; + + installPhase = '' + mkdir -p $out/bin + cp vpnc-script $out/bin + ''; + + preFixup = '' + substituteInPlace $out/bin/vpnc-script \ + --replace "which" "type -P" + '' + lib.optionalString stdenv.isLinux '' + substituteInPlace $out/bin/vpnc-script \ + --replace "/sbin/resolvconf" "${openresolv}/bin/resolvconf" + '' + '' + wrapProgram $out/bin/vpnc-script \ + --prefix PATH : "${lib.makeBinPath ([ nettools gawk coreutils gnugrep ] ++ lib.optionals stdenv.isLinux [ openresolv ])}" + ''; + + meta = with lib; { + description = "script for vpnc to configure the network routing and name service"; + homepage = "https://www.infradead.org/openconnect/"; + license = licenses.gpl2Only; + maintainers = with maintainers; [ jerith666 ]; + platforms = platforms.linux ++ platforms.darwin; + }; +} |