summary refs log tree commit diff
path: root/pkgs/tools/networking/openvpn
diff options
context:
space:
mode:
authorNikolay Amiantov <ab@fmap.me>2016-08-13 03:21:08 +0300
committerNikolay Amiantov <ab@fmap.me>2016-08-14 22:37:11 +0300
commit49fe339b09bd4a3cdbcaa7590db94abce73db9be (patch)
treefb2f34e042fa48a8d8dcb1ec21d4597917c98890 /pkgs/tools/networking/openvpn
parentbdc700c23adfa460e773a4b471e946eccd72672c (diff)
downloadnixpkgs-49fe339b09bd4a3cdbcaa7590db94abce73db9be.tar
nixpkgs-49fe339b09bd4a3cdbcaa7590db94abce73db9be.tar.gz
nixpkgs-49fe339b09bd4a3cdbcaa7590db94abce73db9be.tar.bz2
nixpkgs-49fe339b09bd4a3cdbcaa7590db94abce73db9be.tar.lz
nixpkgs-49fe339b09bd4a3cdbcaa7590db94abce73db9be.tar.xz
nixpkgs-49fe339b09bd4a3cdbcaa7590db94abce73db9be.tar.zst
nixpkgs-49fe339b09bd4a3cdbcaa7590db94abce73db9be.zip
update-resolv-conf: 20141003 -> 2016-04-24
Diffstat (limited to 'pkgs/tools/networking/openvpn')
-rw-r--r--pkgs/tools/networking/openvpn/update-resolv-conf.nix27
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 80f7d149b7f..f59e70ed318 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;