mirror of
https://github.com/NixOS/nix.git
synced 2025-11-22 18:29:36 +01:00
Add sandboxed building for FreeBSD using jails
Co-Authored-By: Artemis Tosini <me@artem.ist> Co-Authored-By: John Ericson <John.Ericson@Obsidian.Systems>
This commit is contained in:
parent
8f91140253
commit
1ff041082c
5 changed files with 237 additions and 1 deletions
|
|
@ -2159,6 +2159,7 @@ StorePath DerivationBuilderImpl::makeFallbackPath(const StorePath & path)
|
|||
// FIXME: do this properly
|
||||
#include "chroot-derivation-builder.cc"
|
||||
#include "linux-derivation-builder.cc"
|
||||
#include "freebsd-derivation-builder.cc"
|
||||
#include "darwin-derivation-builder.cc"
|
||||
|
||||
namespace nix {
|
||||
|
|
@ -2221,6 +2222,11 @@ std::unique_ptr<DerivationBuilder> makeDerivationBuilder(
|
|||
return std::make_unique<ChrootLinuxDerivationBuilder>(store, std::move(miscMethods), std::move(params));
|
||||
|
||||
return std::make_unique<LinuxDerivationBuilder>(store, std::move(miscMethods), std::move(params));
|
||||
#elif defined(__FreeBSD__)
|
||||
if (useSandbox)
|
||||
return std::make_unique<ChrootFreeBSDDerivationBuilder>(store, std::move(miscMethods), std::move(params));
|
||||
|
||||
return std::make_unique<FreeBSDDerivationBuilder>(store, std::move(miscMethods), std::move(params));
|
||||
#else
|
||||
if (useSandbox)
|
||||
throw Error("sandboxing builds is not supported on this platform");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue