recurseIntoAttrsWith
pkgs.recurseIntoAttrsWith
Docs pulled from | This Revision | 31 minutes ago
Nixpkgs manual
Recurse into an attribute set depending on which config.recursionMode is set.
This function only affects a single attribute set; it does not apply itself recursively for nested attribute sets.
Inputs
modes- An attribute set containg keys from
config.recursionModedefaulting to true.attrs - An attribute set to scan for derivations.
Type
recurseIntoAttrsWith :: AttrSet -> AttrSet -> AttrSet
Examples
pkgs.recurseIntoAttrsWith usage example
{ pkgs ? import <nixpkgs> {} }:
{
myTools = pkgs.recurseIntoAttrsWith { } {
inherit (pkgs) hello figlet;
};
}
Noogle detected
Implementation
The following is the current implementation of this function.
recurseIntoAttrsWith =
{
hydra ? true,
eval ? true,
search ? true,
}:
attrs:
attrs
// {
recurseForDerivations =
let
modes = {
inherit hydra eval search;
};
in
modes.${config.recursionMode};
};