From 6c03d641fad40727bb93d4cb157cce346fff73c1 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Tue, 28 May 2013 14:47:23 +0200 Subject: [PATCH] openvpn: Update to 2.3.1 --- pkgs/tools/networking/openvpn/default.nix | 38 +++++++++++++---------- 1 file changed, 22 insertions(+), 16 deletions(-) diff --git a/pkgs/tools/networking/openvpn/default.nix b/pkgs/tools/networking/openvpn/default.nix index 1310fb7d0473..0db7c4b688f8 100644 --- a/pkgs/tools/networking/openvpn/default.nix +++ b/pkgs/tools/networking/openvpn/default.nix @@ -1,35 +1,41 @@ -{stdenv, fetchurl, iproute, lzo, openssl}: +{ stdenv, fetchurl, iproute, lzo, openssl, pam }: stdenv.mkDerivation rec { - name = "openvpn-2.2.2"; + name = "openvpn-2.3.1"; src = fetchurl { url = "http://swupdate.openvpn.net/community/releases/${name}.tar.gz"; - sha256 = "005cpvdvh8pvsn3bc96lrznlkcccbz5jqa62hipb58rf1qk8pjjl"; + sha256 = "0g7vf3f6z0h4kdqlqr8jd0gapi0ains6xcvlvfy8cicxnf2psbdx"; }; - buildInputs = [ iproute lzo openssl ]; + buildInputs = [ iproute lzo openssl pam ]; configureFlags = '' --enable-password-save --enable-iproute2 - --with-iproute-path=${iproute}/sbin/ip + --enable-systemd + IPROUTE=${iproute}/sbin/ip + ''; + + preConfigure = '' + substituteInPlace ./src/openvpn/console.c \ + --replace /bin/systemd-ask-password /run/current-system/sw/bin/systemd-ask-password ''; postInstall = '' mkdir -p $out/share/doc/openvpn/examples - cp -r sample-config-files/ $out/share/doc/openvpn/examples - cp -r sample-keys/ $out/share/doc/openvpn/examples - cp -r easy-rsa/ $out/share/doc/openvpn/examples - rm -r $out/share/doc/openvpn/examples/easy-rsa/Windows - cp -r sample-scripts/ $out/share/doc/openvpn/examples + cp -r sample/sample-config-files/ $out/share/doc/openvpn/examples + cp -r sample/sample-keys/ $out/share/doc/openvpn/examples + cp -r sample/sample-scripts/ $out/share/doc/openvpn/examples ''; - meta = { - description="OpenVPN is a robust and highly flexible tunneling application compatible with many OSes."; - homepage="http://openvpn.net/"; - license = "GPLv2"; - maintainers = with stdenv.lib.maintainers; [viric]; - platforms = with stdenv.lib.platforms; linux; + enableParallelBuilding = true; + + meta = { + description = "A robust and highly flexible tunneling application"; + homepage = http://openvpn.net/; + license = "GPLv2"; + maintainers = [ stdenv.lib.maintainers.viric ]; + platforms = stdenv.lib.platforms.linux; }; }