Skip to content

Commit

Permalink
macs: test chroot disable patch from nixpkgs#353709
Browse files Browse the repository at this point in the history
  • Loading branch information
mweinelt committed Nov 6, 2024
1 parent edff9f5 commit dfd77d6
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 1 deletion.
20 changes: 20 additions & 0 deletions macs/disable-chroot.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
diff --git a/src/libstore/unix/build/local-derivation-goal.cc b/src/libstore/unix/build/local-derivation-goal.cc
index 2a09e3dd4..baeae54f8 100644
--- a/src/libstore/unix/build/local-derivation-goal.cc
+++ b/src/libstore/unix/build/local-derivation-goal.cc
@@ -509,11 +509,11 @@ void LocalDerivationGoal::startBuilder()
/* Create a temporary directory where the build will take
place. */
topTmpDir = createTempDir(settings.buildDir.get().value_or(""), "nix-build-" + std::string(drvPath.name()), false, false, 0700);
-#if __APPLE__
+//#if __APPLE__
if (false) {
-#else
- if (useChroot) {
-#endif
+//#else
+// if (useChroot) {
+//#endif
/* If sandboxing is enabled, put the actual TMPDIR underneath
an inaccessible root-owned directory, to prevent outside
access.
6 changes: 5 additions & 1 deletion macs/nix-darwin.nix
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,11 @@ in
cores = 2;
};

nix.package = pkgs.nixVersions.nix_2_24;
nix.package = pkgs.nixVersions.nix_2_24.overrideAttrs (oldAttrs: {
patches = oldAttrs.patches or [ ] ++ [
./disable-chroot.patch
];
});
nix.gc.automatic = true;
nix.gc.user = "";
nix.gc.interval = {
Expand Down

0 comments on commit dfd77d6

Please sign in to comment.