sudo: add updateScript

This commit is contained in:
Ryan Hendrickson
2025-07-29 18:59:21 -04:00
parent 0d0cf8944c
commit b8ee90d1c7
+11 -1
View File
@@ -8,6 +8,9 @@
groff,
sssd,
nixosTests,
genericUpdater,
writeShellScript,
curl,
sendmailPath ? "/run/wrappers/bin/sendmail",
withInsults ? false,
withSssd ? false,
@@ -72,7 +75,14 @@ stdenv.mkDerivation (finalAttrs: {
rm $out/share/doc/sudo/ChangeLog
'';
passthru.tests = { inherit (nixosTests) sudo; };
passthru = {
tests = { inherit (nixosTests) sudo; };
updateScript = genericUpdater {
versionLister = writeShellScript "sudo-versionLister" ''
${lib.getExe curl} -sL https://www.sudo.ws/dist | grep -Po 'href="sudo-\K[\w.]*(?=\.tar\.gz")'
'';
};
};
meta = with lib; {
description = "Command to run commands as root";