| That's awesome, darwin failures that only happened on nixpkgs-unstable no longer happen when I rebuilt lix today. Meanwhile, there's a new failure, this time libcmd. There's this small snippet:
# Use a temporary home directory for the unit tests.
# Otherwise, /homeless-shelter is created in the single-user sandbox, and functional tests will fail.
# TODO(alois31): handle TMPDIR properly (meson can't, and setting HOME in the test is too late)…
'HOME': '/tmp/nix-test/libcmd-unit-tests',
which you'd think makes everything work just fine, right? WRONG. The code does this:
auto homeDir = getEnv("HOME");
if (homeDir) {
// Only use `$HOME` if it exists and is owned by the current user.
struct stat st;
int result = stat(homeDir->c_str(), &st);
and obviously HOME does not exist so it falls back to getpwuid_r. Which just so happens to work on Linux because dynamic sandbox user gets put in the user database, but OOPS it doesn't work on darwin!
|