1 { stdenv, lib, fetchFromGitHub, makeWrapper, openresolv, coreutils, systemd }:
4 binPath = lib.makeBinPath [ coreutils openresolv systemd ];
8 pname = "update-resolv-conf";
9 version = "unstable-2017-06-21";
11 src = fetchFromGitHub {
13 repo = "openvpn-update-resolv-conf";
14 rev = "43093c2f970bf84cd374e18ec05ac6d9cae444b8";
15 sha256 = "1lf66bsgv2w6nzg1iqf25zpjf4ckcr45adkpgdq9gvhkfnvlp8av";
18 nativeBuildInputs = [ makeWrapper ];
21 install -Dm555 update-resolv-conf.sh $out/libexec/openvpn/update-resolv-conf
22 install -Dm555 update-systemd-network.sh $out/libexec/openvpn/update-systemd-network
24 for i in $out/libexec/openvpn/*; do
25 wrapProgram $i --prefix PATH : ${binPath}
30 description = "Script to update your /etc/resolv.conf with DNS settings that come from the received push dhcp-options";
31 homepage = "https://github.com/masterkorp/openvpn-update-resolv-conf/";
32 maintainers = with maintainers; [ abbradar ];
33 license = licenses.gpl2Only;
34 platforms = platforms.unix;