mirror of
https://github.com/NixOS/nix.git
synced 2025-11-10 20:46:01 +01:00
Add an external-builders experimental feature
This commit is contained in:
parent
d1f57c5dae
commit
efa239875b
4 changed files with 29 additions and 1 deletions
|
|
@ -1309,7 +1309,25 @@ public:
|
||||||
"tmpDirInSandbox": "/build",
|
"tmpDirInSandbox": "/build",
|
||||||
"topTmpDir": "/private/tmp/nix-build-hello-2.12.2.drv-0"
|
"topTmpDir": "/private/tmp/nix-build-hello-2.12.2.drv-0"
|
||||||
}
|
}
|
||||||
)"
|
)",
|
||||||
|
{}, // aliases
|
||||||
|
true, // document default
|
||||||
|
// NOTE(cole-h): even though we can make the experimental feature required here, the errors
|
||||||
|
// are not as good (it just becomes a warning if you try to use this setting without the
|
||||||
|
// experimental feature)
|
||||||
|
//
|
||||||
|
// With this commented out:
|
||||||
|
//
|
||||||
|
// error: experimental Nix feature 'external-builders' is disabled; add '--extra-experimental-features external-builders' to enable it
|
||||||
|
//
|
||||||
|
// With this uncommented:
|
||||||
|
//
|
||||||
|
// warning: Ignoring setting 'external-builders' because experimental feature 'external-builders' is not enabled
|
||||||
|
// error: Cannot build '/nix/store/vwsp4qd8a62jqa36p26d15hin4xnj949-opentofu-1.10.2.drv'.
|
||||||
|
// Reason: required system or feature not available
|
||||||
|
// Required system: 'aarch64-linux' with features {}
|
||||||
|
// Current system: 'aarch64-darwin' with features {apple-virt, benchmark, big-parallel, nixos-test}
|
||||||
|
// Xp::ExternalBuilders
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -17,6 +17,7 @@ struct ExternalDerivationBuilder : DerivationBuilderImpl
|
||||||
: DerivationBuilderImpl(store, std::move(miscMethods), std::move(params))
|
: DerivationBuilderImpl(store, std::move(miscMethods), std::move(params))
|
||||||
, externalBuilder(std::move(externalBuilder))
|
, externalBuilder(std::move(externalBuilder))
|
||||||
{
|
{
|
||||||
|
experimentalFeatureSettings.require(Xp::ExternalBuilders);
|
||||||
}
|
}
|
||||||
|
|
||||||
static std::unique_ptr<ExternalDerivationBuilder> newIfSupported(
|
static std::unique_ptr<ExternalDerivationBuilder> newIfSupported(
|
||||||
|
|
|
||||||
|
|
@ -288,6 +288,14 @@ constexpr std::array<ExperimentalFeatureDetails, numXpFeatures> xpFeatureDetails
|
||||||
)",
|
)",
|
||||||
.trackingUrl = "https://github.com/NixOS/nix/milestone/55",
|
.trackingUrl = "https://github.com/NixOS/nix/milestone/55",
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
.tag = Xp::ExternalBuilders,
|
||||||
|
.name = "external-builders",
|
||||||
|
.description = R"(
|
||||||
|
Enables support for external builders / sandbox providers.
|
||||||
|
)",
|
||||||
|
.trackingUrl = "",
|
||||||
|
},
|
||||||
{
|
{
|
||||||
.tag = Xp::BLAKE3Hashes,
|
.tag = Xp::BLAKE3Hashes,
|
||||||
.name = "blake3-hashes",
|
.name = "blake3-hashes",
|
||||||
|
|
|
||||||
|
|
@ -35,6 +35,7 @@ enum struct ExperimentalFeature
|
||||||
MountedSSHStore,
|
MountedSSHStore,
|
||||||
VerifiedFetches,
|
VerifiedFetches,
|
||||||
PipeOperators,
|
PipeOperators,
|
||||||
|
ExternalBuilders,
|
||||||
BLAKE3Hashes,
|
BLAKE3Hashes,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue