Require (new) computed-derivations experimental feature for ! installable
This commit is contained in:
parent
9c6be01d5f
commit
6951b26ed0
|
@ -740,6 +740,7 @@ std::vector<std::shared_ptr<Installable>> SourceExprCommand::parseInstallables(
|
||||||
result.push_back(std::make_shared<InstallableIndexedStorePath>(
|
result.push_back(std::make_shared<InstallableIndexedStorePath>(
|
||||||
store,
|
store,
|
||||||
DerivedPath::Built::parse(*store, s)));
|
DerivedPath::Built::parse(*store, s)));
|
||||||
|
settings.requireExperimentalFeature(Xp::ComputedDerivations);
|
||||||
continue;
|
continue;
|
||||||
} catch (BadStorePath &) {
|
} catch (BadStorePath &) {
|
||||||
} catch (...) {
|
} catch (...) {
|
||||||
|
|
|
@ -13,6 +13,7 @@ std::map<ExperimentalFeature, std::string> stringifiedXpFeatures = {
|
||||||
{ Xp::RecursiveNix, "recursive-nix" },
|
{ Xp::RecursiveNix, "recursive-nix" },
|
||||||
{ Xp::NoUrlLiterals, "no-url-literals" },
|
{ Xp::NoUrlLiterals, "no-url-literals" },
|
||||||
{ Xp::FetchClosure, "fetch-closure" },
|
{ Xp::FetchClosure, "fetch-closure" },
|
||||||
|
{ Xp::ComputedDerivations, "computed-derivations" },
|
||||||
};
|
};
|
||||||
|
|
||||||
const std::optional<ExperimentalFeature> parseExperimentalFeature(const std::string_view & name)
|
const std::optional<ExperimentalFeature> parseExperimentalFeature(const std::string_view & name)
|
||||||
|
|
|
@ -22,6 +22,7 @@ enum struct ExperimentalFeature
|
||||||
RecursiveNix,
|
RecursiveNix,
|
||||||
NoUrlLiterals,
|
NoUrlLiterals,
|
||||||
FetchClosure,
|
FetchClosure,
|
||||||
|
ComputedDerivations, // RFC 92
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -1,5 +1,8 @@
|
||||||
source common.sh
|
source common.sh
|
||||||
|
|
||||||
|
enableFeatures "computed-derivations"
|
||||||
|
restartDaemon
|
||||||
|
|
||||||
drv=$(nix eval -f multiple-outputs.nix --raw a.drvPath)
|
drv=$(nix eval -f multiple-outputs.nix --raw a.drvPath)
|
||||||
if nix build "$drv!not-an-output" --json; then
|
if nix build "$drv!not-an-output" --json; then
|
||||||
fail "'not-an-output' should fail to build"
|
fail "'not-an-output' should fail to build"
|
||||||
|
|
Loading…
Reference in a new issue