Files
nixpkgs/pkgs/tools/networking/openvpn/update-systemd-resolved.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

52 lines
1.2 KiB
Nix

{
lib,
stdenv,
fetchFromGitHub,
iproute2,
runtimeShell,
systemd,
coreutils,
util-linux,
}:
stdenv.mkDerivation rec {
pname = "update-systemd-resolved";
# when updating this, check if additional binaries need injecting into PATH
version = "1.3.0";
src = fetchFromGitHub {
owner = "jonathanio";
repo = "update-systemd-resolved";
rev = "v${version}";
hash = "sha256-lYJTR3oBmpENcqNHa9PFXsw7ly6agwjBWf4UXf1d8Kc=";
};
# set SCRIPT_NAME in case we are wrapped and inject PATH
patches = [
./update-systemd-resolved.patch
];
PREFIX = "${placeholder "out"}/libexec/openvpn";
postInstall = ''
substituteInPlace ${PREFIX}/update-systemd-resolved \
--subst-var-by PATH ${
lib.makeBinPath [
coreutils
iproute2
runtimeShell
systemd
util-linux
]
}
'';
meta = with lib; {
description = "Helper script for OpenVPN to directly update the DNS settings of a link through systemd-resolved via DBus";
homepage = "https://github.com/jonathanio/update-systemd-resolved";
license = licenses.gpl3Only;
maintainers = with maintainers; [ eadwu ];
platforms = platforms.linux;
};
}