Compare commits

...
Author SHA1 Message Date
Sergei Zimmerman 546127f4ff Add missing shebangs to exorcise Darwin sandbox heisenbug
Adds missing shebangs that lead to unsafe forks that present themselves
as SIGSEGV.

See 7b3d7eb634 and https://github.com/NixOS/nixpkgs/issues/476794
Lix patch: https://gerrit.lix.systems/c/lix/+/4891
2026-01-10 21:34:52 +03:00
2 changed files with 3 additions and 2 deletions

No files matched your search

+2 -2
View File
@@ -616,7 +616,7 @@ static void main_nix_build(int argc, char ** argv)
auto tz = getEnv("TZ");
auto tzExport = tz ? "export TZ=" + escapeShellArgAlways(*tz) + "; " : "";
std::string rc = fmt(
(R"(_nix_shell_clean_tmpdir() { command rm -rf %1%; };)"s
("#!%8%\n" + R"(_nix_shell_clean_tmpdir() { command rm -rf %1%; };)"s
"trap _nix_shell_clean_tmpdir EXIT; "
"exitHooks+=(_nix_shell_clean_tmpdir); "
"failureHooks+=(_nix_shell_clean_tmpdir); ") +
@@ -649,7 +649,7 @@ static void main_nix_build(int argc, char ** argv)
escapeShellArgAlways(dirOf(*shell)),
escapeShellArgAlways(*shell),
tzExport,
envCommand);
envCommand, *shell);
vomit("Sourcing nix-shell with file %s and contents:\n%s", rcfile, rc);
writeFile(rcfile, rc);
+1
View File
@@ -1,3 +1,4 @@
#!/usr/bin/env bash
# shellcheck shell=bash
# shellcheck disable=SC2154
mkdir "$out"