mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-10 16:26:18 +02:00
Remove makeFlakeValue()
This commit is contained in:
parent
6e4a8c47f4
commit
6ae4437acb
2 changed files with 2 additions and 11 deletions
|
@ -566,18 +566,11 @@ void callFlake(EvalState & state, const ResolvedFlake & resFlake, Value & v)
|
||||||
v.attrs->sort();
|
v.attrs->sort();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Return the `provides` of the top flake, while assigning to `v` the provides
|
|
||||||
// of the dependencies as well.
|
|
||||||
void makeFlakeValue(EvalState & state, const FlakeRef & flakeRef, HandleLockFile handle, Value & v)
|
|
||||||
{
|
|
||||||
callFlake(state, resolveFlake(state, flakeRef, handle), v);
|
|
||||||
}
|
|
||||||
|
|
||||||
// This function is exposed to be used in nix files.
|
// This function is exposed to be used in nix files.
|
||||||
static void prim_getFlake(EvalState & state, const Pos & pos, Value * * args, Value & v)
|
static void prim_getFlake(EvalState & state, const Pos & pos, Value * * args, Value & v)
|
||||||
{
|
{
|
||||||
makeFlakeValue(state, state.forceStringNoCtx(*args[0], pos),
|
callFlake(state, resolveFlake(state, state.forceStringNoCtx(*args[0], pos),
|
||||||
evalSettings.pureEval ? AllPure : UseUpdatedLockFile, v);
|
evalSettings.pureEval ? AllPure : UseUpdatedLockFile), v);
|
||||||
}
|
}
|
||||||
|
|
||||||
static RegisterPrimOp r2("getFlake", 1, prim_getFlake);
|
static RegisterPrimOp r2("getFlake", 1, prim_getFlake);
|
||||||
|
|
|
@ -75,8 +75,6 @@ enum HandleLockFile : unsigned int
|
||||||
, UseNewLockFile // `RecreateLockFile` without writing to file
|
, UseNewLockFile // `RecreateLockFile` without writing to file
|
||||||
};
|
};
|
||||||
|
|
||||||
void makeFlakeValue(EvalState &, const FlakeRef &, HandleLockFile, Value &);
|
|
||||||
|
|
||||||
std::shared_ptr<FlakeRegistry> readRegistry(const Path &);
|
std::shared_ptr<FlakeRegistry> readRegistry(const Path &);
|
||||||
|
|
||||||
void writeRegistry(const FlakeRegistry &, const Path &);
|
void writeRegistry(const FlakeRegistry &, const Path &);
|
||||||
|
|
Loading…
Reference in a new issue