mirror of
https://github.com/NixOS/nix.git
synced 2025-11-21 01:39:36 +01:00
it is out of date, all over the place in level of detail, is really about `nixpkgs`, and in general instructions should not be part of a reference manual. also: - update redirects and internal links - use "Nix language" consistently
764 B
764 B
Built-in Constants
Here are the constants built into the Nix expression evaluator:
-
builtins
The setbuiltinscontains all the built-in functions and values. You can usebuiltinsto test for the availability of features in the Nix installation, e.g.,if builtins ? getEnv then builtins.getEnv "PATH" else ""This allows a Nix expression to fall back gracefully on older Nix installations that don’t have the desired built-in function.
-
[
builtins.currentSystem]{#builtins-currentSystem}
The built-in valuecurrentSystemevaluates to the Nix platform identifier for the Nix installation on which the expression is being evaluated, such as"i686-linux"or"x86_64-darwin".