2019-10-01 13:40:43 +01:00
|
|
|
{ lib, stdenv, fetchFromGitHub
|
|
|
|
, makeWrapper
|
2021-03-14 16:05:16 +00:00
|
|
|
, iproute2, systemd, coreutils, util-linux }:
|
2019-10-01 13:40:43 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "update-systemd-resolved";
|
|
|
|
version = "1.3.0";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "jonathanio";
|
|
|
|
repo = "update-systemd-resolved";
|
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "19zhbpyms57yb70hi0ws5sbkpk2yqp9nnix3f86r36h1g93m70lm";
|
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
|
|
|
|
buildFlags = [
|
|
|
|
"PREFIX=${placeholder "out"}/libexec/openvpn"
|
|
|
|
];
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
wrapProgram $out/libexec/openvpn/update-systemd-resolved \
|
2021-03-14 16:05:16 +00:00
|
|
|
--prefix PATH : ${lib.makeBinPath [ iproute2 systemd coreutils util-linux ]}
|
2019-10-01 13:40:43 +01:00
|
|
|
'';
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2019-10-01 13:40:43 +01:00
|
|
|
description = "Helper script for OpenVPN to directly update the DNS settings of a link through systemd-resolved via DBus";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://github.com/jonathanio/update-systemd-resolved";
|
2019-10-01 13:40:43 +01:00
|
|
|
maintainers = with maintainers; [ eadwu ];
|
|
|
|
license = licenses.gpl3;
|
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
|
|
|
}
|