mirror of
https://github.com/NixOS/nix
synced 2025-06-25 10:41:16 +02:00
Fix macOS build
This commit is contained in:
parent
352ca238a9
commit
f9fdf94e12
2 changed files with 54 additions and 37 deletions
|
@ -308,8 +308,6 @@ protected:
|
|||
*/
|
||||
void runChild();
|
||||
|
||||
private:
|
||||
|
||||
/**
|
||||
* Move the current process into the chroot, if any. Called early
|
||||
* by runChild().
|
||||
|
@ -330,6 +328,8 @@ private:
|
|||
*/
|
||||
virtual void execBuilder(const Strings & args, const Strings & envStrs);
|
||||
|
||||
private:
|
||||
|
||||
/**
|
||||
* Check that the derivation outputs all exist and register them
|
||||
* as valid.
|
||||
|
@ -2119,7 +2119,7 @@ std::unique_ptr<DerivationBuilder> makeDerivationBuilder(
|
|||
throw Error("derivation '%s' has '__noChroot' set, "
|
||||
"but that's not allowed when 'sandbox' is 'true'", store.printStorePath(params.drvPath));
|
||||
#ifdef __APPLE__
|
||||
if (drvOptions.additionalSandboxProfile != "")
|
||||
if (params.drvOptions.additionalSandboxProfile != "")
|
||||
throw Error("derivation '%s' specifies a sandbox profile, "
|
||||
"but this is only allowed when 'sandbox' is 'relaxed'", store.printStorePath(params.drvPath));
|
||||
#endif
|
||||
|
@ -2158,16 +2158,24 @@ std::unique_ptr<DerivationBuilder> makeDerivationBuilder(
|
|||
std::move(params));
|
||||
#endif
|
||||
|
||||
if (useSandbox)
|
||||
throw Error("sandboxing builds is not supported on this platform");
|
||||
|
||||
if (params.drvOptions.useUidRange(params.drv))
|
||||
throw Error("feature 'uid-range' is only supported in sandboxed builds");
|
||||
|
||||
#ifdef __APPLE__
|
||||
return std::make_unique<DarwinDerivationBuilder>(
|
||||
store,
|
||||
std::move(miscMethods),
|
||||
std::move(params),
|
||||
useSandbox);
|
||||
#else
|
||||
if (useSandbox)
|
||||
throw Error("sandboxing builds is not supported on this platform");
|
||||
|
||||
return std::make_unique<DerivationBuilderImpl>(
|
||||
store,
|
||||
std::move(miscMethods),
|
||||
std::move(params));
|
||||
#endif
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue