1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-07-06 21:41:48 +02:00

Move primop docs inline

This makes them available to 'nix repl'.
This commit is contained in:
Eelco Dolstra 2020-08-24 14:31:10 +02:00
parent 33b1679d75
commit a990f063ff
No known key found for this signature in database
GPG key ID: 8170B4726D7198DE
5 changed files with 1274 additions and 978 deletions

View file

@ -0,0 +1,20 @@
# Built-in Constants
Here are the constants built into the Nix expression evaluator:
- `builtins`
The set `builtins` contains all the built-in functions and values.
You can use `builtins` to test for the availability of features in
the Nix installation, e.g.,
```nix
if builtins ? getEnv then builtins.getEnv "PATH" else ""
```
This allows a Nix expression to fall back gracefully on older Nix
installations that dont have the desired built-in function.
- `builtins.currentSystem`
The built-in value `currentSystem` evaluates to the Nix platform
identifier for the Nix installation on which the expression is being
evaluated, such as `"i686-linux"` or `"x86_64-darwin"`.