mirror of
https://github.com/NixOS/nix.git
synced 2025-12-16 05:51:05 +01:00
This does not include any automation for the release branch, but is based on the configuration of https://github.com/NixOS/nix/pull/12349 pre-commit run -a nixfmt-rfc-style
27 lines
481 B
Nix
27 lines
481 B
Nix
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
|