biome: 1.9.2 -> 1.9.3
[NixPkgs.git] / pkgs / tools / networking / openvpn / update-resolv-conf.nix
blob53d2b272c4499c2f4a970dea40593565e4273c73
1 { stdenv, lib, fetchFromGitHub, makeWrapper, openresolv, coreutils, systemd }:
3 let
4   binPath = lib.makeBinPath [ coreutils openresolv systemd ];
6 in
7 stdenv.mkDerivation {
8   pname = "update-resolv-conf";
9   version = "unstable-2017-06-21";
11   src = fetchFromGitHub {
12     owner = "masterkorp";
13     repo = "openvpn-update-resolv-conf";
14     rev = "43093c2f970bf84cd374e18ec05ac6d9cae444b8";
15     sha256 = "1lf66bsgv2w6nzg1iqf25zpjf4ckcr45adkpgdq9gvhkfnvlp8av";
16   };
18   nativeBuildInputs = [ makeWrapper ];
20   installPhase = ''
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}
26     done
27   '';
29   meta = with lib; {
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;
35   };