diff options
-rw-r--r-- | pkgs/tools/networking/openvpn/update-resolv-conf.nix | 27 |
1 files changed, 16 insertions, 11 deletions
diff --git a/pkgs/tools/networking/openvpn/update-resolv-conf.nix b/pkgs/tools/networking/openvpn/update-resolv-conf.nix index 80f7d149b7f48..f59e70ed31879 100644 --- a/pkgs/tools/networking/openvpn/update-resolv-conf.nix +++ b/pkgs/tools/networking/openvpn/update-resolv-conf.nix @@ -1,27 +1,32 @@ -{ stdenv, fetchgit, makeWrapper, openresolv, coreutils }: +{ stdenv, lib, fetchFromGitHub, makeWrapper, openresolv, coreutils, which, systemd }: -stdenv.mkDerivation rec { - name = "update-resolv-conf-20141003"; +let + binPath = lib.makeBinPath [ coreutils openresolv which systemd ]; - src = fetchgit { - url = https://github.com/masterkorp/openvpn-update-resolv-conf/; - rev = "dd968419373bce71b22bbd26de962e89eb470670"; - sha256 = "0j7mg66lqhgvhybgbn98y7i5skj1ify41hmb0yhkx2xrli8027b9"; +in stdenv.mkDerivation rec { + name = "update-resolv-conf-2016-04-24"; + + src = fetchFromGitHub { + owner = "masterkorp"; + repo = "openvpn-update-resolv-conf"; + rev = "994574f36b9147cc78674a5f13874d503a625c98"; + sha256 = "1rvzlaj53k8s09phg4clsyzlmf44dmwwyvg0nbg966sxp3xsqlxc"; }; nativeBuildInputs = [ makeWrapper ]; installPhase = '' install -Dm555 update-resolv-conf.sh $out/libexec/openvpn/update-resolv-conf - sed -i 's,^\(RESOLVCONF=\).*,\1resolvconf,' $out/libexec/openvpn/update-resolv-conf + install -Dm555 update-systemd-network.sh $out/libexec/openvpn/update-systemd-network - wrapProgram $out/libexec/openvpn/update-resolv-conf \ - --prefix PATH : ${coreutils}/bin:${openresolv}/sbin + for i in $out/libexec/openvpn/*; do + wrapProgram $i --prefix PATH : ${binPath} + done ''; meta = with stdenv.lib; { description = "Script to update your /etc/resolv.conf with DNS settings that come from the received push dhcp-options"; - homepage = https://github.com/masterkorp/openvpn-update-resolv-conf/; + homepage = "https://github.com/masterkorp/openvpn-update-resolv-conf/"; maintainers = with maintainers; [ abbradar ]; license = licenses.gpl2; platforms = platforms.unix; |