libexpr: remove dynamic derivation eval support

Change-Id: I8bbdaa280f634bafd5abd7034a605564f45978c0
This commit is contained in:
eldritch horrors
2025-05-12 13:37:54 +02:00
parent 540071dd77
commit b8b05d4da4
4 changed files with 1 additions and 41 deletions
-23
View File
@@ -1,23 +0,0 @@
---
name: outputOf
args: [derivation-reference, output-name]
experimentalFeature: dynamic-derivations
---
Return the output path of a derivation, literally or using a placeholder if needed.
If the derivation has a statically-known output path (i.e. the derivation output is input-addressed, or fixed content-addressed), the output path will just be returned.
But if the derivation is content-addressed or if the derivation is itself not-statically produced (i.e. is the output of another derivation), a placeholder will be returned instead.
*`derivation reference`* must be a string that may contain a regular store path to a derivation, or may be a placeholder reference. If the derivation is produced by a derivation, you must explicitly select `drv.outPath`.
This primop can be chained arbitrarily deeply.
For instance,
```nix
builtins.outputOf
(builtins.outputOf myDrv "out)
"out"
```
will return a placeholder for the output of the output of `myDrv`.
This primop corresponds to the `^` sigil for derivable paths, e.g. as part of installable syntax on the command line.
-1
View File
@@ -115,7 +115,6 @@ builtin_definitions = files(
'builtins/mapAttrs.md',
'builtins/match.md',
'builtins/mul.md',
'builtins/outputOf.md',
'builtins/parseDrvName.md',
'builtins/parseFlakeRef.md',
'builtins/partition.md',
-15
View File
@@ -1390,21 +1390,6 @@ static void prim_readDir(EvalState & state, Value * * args, Value & v)
v.mkAttrs(attrs);
}
/* Extend single element string context with another output. */
static void prim_outputOf(EvalState & state, Value * * args, Value & v)
{
SingleDerivedPath drvPath = state.coerceToSingleDerivedPath(noPos, *args[0], "while evaluating the first argument to builtins.outputOf");
OutputNameView outputName = state.forceStringNoCtx(*args[1], noPos, "while evaluating the second argument to builtins.outputOf");
state.mkSingleDerivedPathString(
SingleDerivedPath::Built {
.drvPath = make_ref<SingleDerivedPath>(drvPath),
.output = std::string { outputName },
},
v);
}
/*************************************************************
* Creating files
*************************************************************/
+1 -2
View File
@@ -516,8 +516,7 @@ void mainWrapped(AsyncIoRoot & aio, int argc, char * * argv)
if (argc == 2 && std::string(argv[1]) == "__dump-language") {
experimentalFeatureSettings.experimentalFeatures.override(ExperimentalFeatures{}
| Xp::Flakes
| Xp::FetchClosure
| Xp::DynamicDerivations);
| Xp::FetchClosure);
evalSettings.pureEval.override(false);
Evaluator state(aio, {}, aio.blockOn(openStore("dummy://")));
auto res = JSON::object();