From 53be8bbdc8d8804570cc47cfec7d2b92256bff2c Mon Sep 17 00:00:00 2001 From: Jaka Hudoklin Date: Mon, 21 Oct 2013 21:47:14 +0200 Subject: [PATCH] openvpn: add openvpn_learnaddress script --- .../openvpn/openvpn_learnaddress.nix | 27 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 29 insertions(+) create mode 100644 pkgs/tools/networking/openvpn/openvpn_learnaddress.nix diff --git a/pkgs/tools/networking/openvpn/openvpn_learnaddress.nix b/pkgs/tools/networking/openvpn/openvpn_learnaddress.nix new file mode 100644 index 000000000000..748f41c90538 --- /dev/null +++ b/pkgs/tools/networking/openvpn/openvpn_learnaddress.nix @@ -0,0 +1,27 @@ +{ stdenv, fetchgit, makeWrapper, coreutils, gawk, utillinux }: + +stdenv.mkDerivation rec { + name = "openvpn-learnaddress-19b03c3"; + + src = fetchgit { + url = https://gist.github.com/4058733.git; + rev = "19b03c3beb0190df46ea07bf4b68244acb8eae80"; + sha256 = "16pcyvyhwsx34i0cjkkx906lmrwdd9gvznvqdwlad4ha8l8f8z42"; + }; + + buildInputs = [ makeWrapper coreutils gawk utillinux ]; + + installPhase = '' + install -Dm555 ovpn-learnaddress $out/libexec/openvpn/openvpn-learnaddress + + wrapProgram $out/libexec/openvpn/openvpn-learnaddress \ + --prefix PATH : ${coreutils}/bin:${gawk}/bin:${utillinux}/bin + ''; + + meta = { + description = "Openvpn learn-address script to manage a hosts-like file"; + homepage = https://gist.github.com/offlinehacker/4058733/; + maintainers = [ stdenv.lib.maintainers.offline ]; + platforms = stdenv.lib.platforms.unix; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index a5c1fd11016b..1434935f1a85 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -1491,6 +1491,8 @@ let openvpn = callPackage ../tools/networking/openvpn { }; + openvpn_learnaddress = callPackage ../tools/networking/openvpn/openvpn_learnaddress.nix { }; + optipng = callPackage ../tools/graphics/optipng { }; oslrd = callPackage ../tools/networking/oslrd { };