2016-11-23 15:08:12 +00:00
|
|
|
{ stdenv, lib, fetchFromGitHub, makeWrapper, openresolv, coreutils, systemd }:
|
2014-10-27 17:36:53 +00:00
|
|
|
|
2016-08-13 01:21:08 +01:00
|
|
|
let
|
2016-11-23 15:08:12 +00:00
|
|
|
binPath = lib.makeBinPath [ coreutils openresolv systemd ];
|
2014-10-27 17:36:53 +00:00
|
|
|
|
2019-08-13 22:52:01 +01:00
|
|
|
in stdenv.mkDerivation {
|
2017-07-27 13:56:48 +01:00
|
|
|
name = "update-resolv-conf-2017-06-21";
|
2016-08-13 01:21:08 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "masterkorp";
|
|
|
|
repo = "openvpn-update-resolv-conf";
|
2017-07-27 13:56:48 +01:00
|
|
|
rev = "43093c2f970bf84cd374e18ec05ac6d9cae444b8";
|
|
|
|
sha256 = "1lf66bsgv2w6nzg1iqf25zpjf4ckcr45adkpgdq9gvhkfnvlp8av";
|
2014-10-27 17:36:53 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
install -Dm555 update-resolv-conf.sh $out/libexec/openvpn/update-resolv-conf
|
2016-08-13 01:21:08 +01:00
|
|
|
install -Dm555 update-systemd-network.sh $out/libexec/openvpn/update-systemd-network
|
2014-10-27 17:36:53 +00:00
|
|
|
|
2016-08-13 01:21:08 +01:00
|
|
|
for i in $out/libexec/openvpn/*; do
|
|
|
|
wrapProgram $i --prefix PATH : ${binPath}
|
|
|
|
done
|
2014-10-27 17:36:53 +00:00
|
|
|
'';
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2014-10-27 17:36:53 +00:00
|
|
|
description = "Script to update your /etc/resolv.conf with DNS settings that come from the received push dhcp-options";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://github.com/masterkorp/openvpn-update-resolv-conf/";
|
2015-05-14 18:09:10 +01:00
|
|
|
maintainers = with maintainers; [ abbradar ];
|
2014-10-27 17:36:53 +00:00
|
|
|
license = licenses.gpl2;
|
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
|
|
|
}
|