Barf when using a diverted store on macOS

Fixes #1792.
This commit is contained in:
Eelco Dolstra 2018-01-15 12:14:43 +01:00
parent 53b520708a
commit ba75c69e00
No known key found for this signature in database
GPG key ID: 8170B4726D7198DE

View file

@ -1810,8 +1810,13 @@ void DerivationGoal::startBuilder()
useChroot = !fixedOutput && get(drv->env, "__noChroot") != "1";
}
if (worker.store.storeDir != worker.store.realStoreDir)
if (worker.store.storeDir != worker.store.realStoreDir) {
#if __linux__
useChroot = true;
#else
throw Error("building using a diverted store is not supported on this platform");
#endif
}
/* If `build-users-group' is not empty, then we have to build as
one of the members of that group. */