mirror of
https://github.com/NixOS/nix.git
synced 2025-12-07 17:41:00 +01: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
21
src/libexpr/imported-drv-to-derivation.nix
Normal file
21
src/libexpr/imported-drv-to-derivation.nix
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
attrs @ { drvPath, outputs, name, ... }:
|
||||
|
||||
let
|
||||
|
||||
commonAttrs = (builtins.listToAttrs outputsList) //
|
||||
{ all = map (x: x.value) outputsList;
|
||||
inherit drvPath name;
|
||||
type = "derivation";
|
||||
};
|
||||
|
||||
outputToAttrListElement = outputName:
|
||||
{ name = outputName;
|
||||
value = commonAttrs // {
|
||||
outPath = builtins.getAttr outputName attrs;
|
||||
inherit outputName;
|
||||
};
|
||||
};
|
||||
|
||||
outputsList = map outputToAttrListElement outputs;
|
||||
|
||||
in (builtins.head outputsList).value
|
||||
Loading…
Add table
Add a link
Reference in a new issue