From 5a938581cb6c15abcc9a149d69358af00a7d4328 Mon Sep 17 00:00:00 2001 From: Jonathan del Strother Date: Sun, 7 Jun 2026 12:37:33 +0100 Subject: [PATCH] redo-apenwarr: fix tests in sandboxed darwin From https://github.com/apenwarr/redo/blob/7f00abc36be15f398fa3ecf9f4e5283509c34a00/t/105-sympath/all.do#L16-L17 - redo's testsuite uses /etc/passwd as a sample absolute-path dependency that won't change. Under darwin, this gets caught by sandboxing: > do t/105-sympath/all > do ../../../../../../private/etc/passwd > do: ../../../../../../private/etc/passwd: no .do file (/nix/var/nix/builds/nix-15278-2435295101/source) Fix tests by replacing /etc/passwd with another arbitrarily-chosen absolute path which we know we can read --- pkgs/by-name/re/redo-apenwarr/package.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkgs/by-name/re/redo-apenwarr/package.nix b/pkgs/by-name/re/redo-apenwarr/package.nix index 38aae496b40d..71b0967cd2df 100644 --- a/pkgs/by-name/re/redo-apenwarr/package.nix +++ b/pkgs/by-name/re/redo-apenwarr/package.nix @@ -48,6 +48,11 @@ stdenv.mkDerivation (finalAttrs: { # See https://github.com/apenwarr/redo/pull/47 substituteInPlace minimal/do \ --replace-fail 'cd "$dodir"' 'cd "''${dodir:-.}"' + + # the tests refer to /etc/passwd (as an arbitrarily-chosen absolute-path file that won't change), + # but that fails under sandboxing. Replace it with another arbrarily-chosen file that won't change: + substituteInPlace t/105-sympath/all.do \ + --replace-fail "/etc/passwd" "${coreutils}/bin/pwd" ''; inherit doCheck;