update-resolv-conf: 20141003 -> 2016-04-24

This commit is contained in:
Nikolay Amiantov 2016-08-13 03:21:08 +03:00
parent bdc700c23a
commit 49fe339b09

View File

@ -1,27 +1,32 @@
{ stdenv, fetchgit, makeWrapper, openresolv, coreutils }: { stdenv, lib, fetchFromGitHub, makeWrapper, openresolv, coreutils, which, systemd }:
stdenv.mkDerivation rec { let
name = "update-resolv-conf-20141003"; binPath = lib.makeBinPath [ coreutils openresolv which systemd ];
src = fetchgit { in stdenv.mkDerivation rec {
url = https://github.com/masterkorp/openvpn-update-resolv-conf/; name = "update-resolv-conf-2016-04-24";
rev = "dd968419373bce71b22bbd26de962e89eb470670";
sha256 = "0j7mg66lqhgvhybgbn98y7i5skj1ify41hmb0yhkx2xrli8027b9"; src = fetchFromGitHub {
owner = "masterkorp";
repo = "openvpn-update-resolv-conf";
rev = "994574f36b9147cc78674a5f13874d503a625c98";
sha256 = "1rvzlaj53k8s09phg4clsyzlmf44dmwwyvg0nbg966sxp3xsqlxc";
}; };
nativeBuildInputs = [ makeWrapper ]; nativeBuildInputs = [ makeWrapper ];
installPhase = '' installPhase = ''
install -Dm555 update-resolv-conf.sh $out/libexec/openvpn/update-resolv-conf 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 \ for i in $out/libexec/openvpn/*; do
--prefix PATH : ${coreutils}/bin:${openresolv}/sbin wrapProgram $i --prefix PATH : ${binPath}
done
''; '';
meta = with stdenv.lib; { meta = with stdenv.lib; {
description = "Script to update your /etc/resolv.conf with DNS settings that come from the received push dhcp-options"; 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 ]; maintainers = with maintainers; [ abbradar ];
license = licenses.gpl2; license = licenses.gpl2;
platforms = platforms.unix; platforms = platforms.unix;