Nix (language): Difference between revisions
imported>Ixxie No edit summary |
imported>Makefu No edit summary |
||
Line 40: | Line 40: | ||
=== types === | === types === | ||
The nix language provides a number of basic types: | |||
{| class="wikitable" | |||
|- | |||
! Type !! Description !! Example | |||
|- | |||
| Strings || Strings either start with <code>double quotes</code> or <code>double single quotes</code>. They also support antiquotation (templating) || <code>"Say ${pkgs.hello.name}"</code>, <code>''first line | |||
second line''</code> | |||
|- | |||
| Integers || There is no float in the nix language|| <code>5</code> | |||
|- | |||
| Path || relative paths will become to absolute when evaluated,paths must contain a slash || <code>./hello/world</code> | |||
|- | |||
| URI || || <code>http://example.org/foo.tar.bz2</code> | |||
|- | |||
| Boolean || || <code>true</code>,<code>false</code> | |||
|- | |||
| Null || || <code>null</code> | |||
|- | |||
|} | |||
A detailed description of all types can be found in [https://nixos.org/nix/manual/#ssec-values The Nix manual] | |||
=== functions === | === functions === |