mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-21 05:00:16 +00:00
update-resolv-conf: add package
This commit is contained in:
parent
72d7324af5
commit
1f101efa88
29
pkgs/tools/networking/openvpn/update-resolv-conf.nix
Normal file
29
pkgs/tools/networking/openvpn/update-resolv-conf.nix
Normal file
|
@ -0,0 +1,29 @@
|
|||
{ stdenv, fetchgit, makeWrapper, openresolv, coreutils }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "update-resolv-conf";
|
||||
|
||||
src = fetchgit {
|
||||
url = https://github.com/masterkorp/openvpn-update-resolv-conf/;
|
||||
rev = "dd968419373bce71b22bbd26de962e89eb470670";
|
||||
sha256 = "dd0e3ea3661253d565bda876eb52a3f8461a3fc8237a81c40809c2071f83add1";
|
||||
};
|
||||
|
||||
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
|
||||
|
||||
wrapProgram $out/libexec/openvpn/update-resolv-conf \
|
||||
--prefix PATH : ${coreutils}/bin:${openresolv}/sbin
|
||||
'';
|
||||
|
||||
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/;
|
||||
maintainer = maintainers.abbradar;
|
||||
license = licenses.gpl2;
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
}
|
|
@ -1923,6 +1923,8 @@ let
|
|||
|
||||
openvpn_learnaddress = callPackage ../tools/networking/openvpn/openvpn_learnaddress.nix { };
|
||||
|
||||
update-resolv-conf = callPackage ../tools/networking/openvpn/update-resolv-conf.nix { };
|
||||
|
||||
openvswitch = callPackage ../os-specific/linux/openvswitch { };
|
||||
|
||||
optipng = callPackage ../tools/graphics/optipng {
|
||||
|
|
Loading…
Reference in a new issue