From fd8e069585ee554501c843bbdb15795a7aba3ff6 Mon Sep 17 00:00:00 2001 From: nicoo Date: Thu, 31 Aug 2023 10:16:25 +0000 Subject: [PATCH] sudo-rs: Patch to work with NixOS' suid wrappers --- pkgs/tools/security/sudo-rs/default.nix | 10 ++++++++++ 1 file changed, 10 insertions(+) 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 \