Use coreutils from nixpkgs rather than from PATH

Before this change, combinators that call `add-runtime` were assuming
coreutils were available, however `add-runtime` did not inject coreutils
as a runtime input.

This also removes forwarding $PATH in the tests which should catch any
issues like this in the future.

Thanks Epsylon for the report:
https://lists.sr.ht/~alexdavid/general/%3C331f3203-d6bf-4c53-824c-4d05088ec47e@gmail.com%3E
This commit is contained in:
Alex David 2025-10-03 10:48:23 -07:00
commit 61b0a147af
2 changed files with 7 additions and 2 deletions

View file

@ -103,7 +103,13 @@ let
if builtins.length state.cleanup > 0 then "" else "exec "
}${state.cmd} "''${RUNTIME_ARGS[@]}" -- ${state.entry} ${state.argv}
'')
(text: pkgs.writeShellApplication { inherit name text; })
(
text:
pkgs.writeShellApplication {
inherit name text;
runtimeInputs = [ pkgs.coreutils ];
}
)
# forward man pages
(jailed: if exe ? man then jailed // { inherit (exe) man; } else jailed)