mirror of
https://github.com/NixOS/nix
synced 2025-07-06 21:41:48 +02:00
Move some corepkgs into the nix binary
This commit is contained in:
parent
e02481ded2
commit
9950cdec35
8 changed files with 23 additions and 7 deletions
25
src/nix-env/buildenv.nix
Normal file
25
src/nix-env/buildenv.nix
Normal file
|
@ -0,0 +1,25 @@
|
|||
{ derivations, manifest }:
|
||||
|
||||
derivation {
|
||||
name = "user-environment";
|
||||
system = "builtin";
|
||||
builder = "builtin:buildenv";
|
||||
|
||||
inherit manifest;
|
||||
|
||||
# !!! grmbl, need structured data for passing this in a clean way.
|
||||
derivations =
|
||||
map (d:
|
||||
[ (d.meta.active or "true")
|
||||
(d.meta.priority or 5)
|
||||
(builtins.length d.outputs)
|
||||
] ++ map (output: builtins.getAttr output d) d.outputs)
|
||||
derivations;
|
||||
|
||||
# Building user environments remotely just causes huge amounts of
|
||||
# network traffic, so don't do that.
|
||||
preferLocalBuild = true;
|
||||
|
||||
# Also don't bother substituting.
|
||||
allowSubstitutes = false;
|
||||
}
|
|
@ -106,7 +106,9 @@ bool createUserEnv(EvalState & state, DrvInfos & elems,
|
|||
|
||||
/* Get the environment builder expression. */
|
||||
Value envBuilder;
|
||||
state.evalFile(state.findFile("nix/buildenv.nix"), envBuilder);
|
||||
state.eval(state.parseExprFromString(
|
||||
#include "buildenv.nix.gen.hh"
|
||||
, "/"), envBuilder);
|
||||
|
||||
/* Construct a Nix expression that calls the user environment
|
||||
builder with the manifest as argument. */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue