diff --git a/pkgs/tools/security/sudo-rs/default.nix b/pkgs/tools/security/sudo-rs/default.nix index 2e8a8fa23498..6730cdf1869f 100644 --- a/pkgs/tools/security/sudo-rs/default.nix +++ b/pkgs/tools/security/sudo-rs/default.nix @@ -1,6 +1,7 @@ { lib , bash , fetchFromGitHub +, fetchpatch , installShellFiles , pam , pandoc @@ -23,6 +24,15 @@ rustPlatform.buildRustPackage rec { buildInputs = [ pam ]; + patches = [ + (fetchpatch { + # @R-VdP's patch to work with NixOS' suid wrappers + name = "Skip self_check when executed as root.patch"; + url = "https://github.com/R-VdP/sudo-rs/commit/a44541dcb36b94f938daaed66b3ff06cfc1c2b40.patch"; + hash = "sha256-PdmOqp/NDjFy8ve4jEOi58e0N9xUnaVKioQwdC5Jf1U="; + }) + ]; + # Don't attempt to generate the docs in a (pan)Docker container postPatch = '' substituteInPlace util/generate-docs.sh \