mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-22 05:56:15 +02:00
d5ffc94f33
this makes the files in question a bit more independent of source location. to find where the value is set and how it's wired up: rg nix=doc/manual
31 lines
730 B
Nix
31 lines
730 B
Nix
let
|
|
inherit (builtins) concatStringsSep attrValues mapAttrs;
|
|
inherit (import <nix/utils.nix>) optionalString squash;
|
|
in
|
|
|
|
builtinsInfo:
|
|
let
|
|
showBuiltin = name: { doc, type, impure-only }:
|
|
let
|
|
type' = optionalString (type != null) " (${type})";
|
|
|
|
impureNotice = optionalString impure-only ''
|
|
> **Note**
|
|
>
|
|
> Not available in [pure evaluation mode](@docroot@/command-ref/conf-file.md#conf-pure-eval).
|
|
'';
|
|
in
|
|
squash ''
|
|
<dt id="builtins-${name}">
|
|
<a href="#builtins-${name}"><code>${name}</code></a>${type'}
|
|
</dt>
|
|
<dd>
|
|
|
|
${doc}
|
|
|
|
${impureNotice}
|
|
|
|
</dd>
|
|
'';
|
|
in
|
|
concatStringsSep "\n" (attrValues (mapAttrs showBuiltin builtinsInfo))
|