- everything is an expression (there are no statements)
- values in Nix are immutable.
My version of nix
nix-env (Nix) 2.2.2
- basic arithmetic operations: +, -, * and /
Recall that Nix is not a general purpose language, it’s a domain-specific language for writing packages.
Integer division isn’t actually that useful when writing package expressions.
Nix parsed 6/3 as a relative path to the current directory.
To get Nix to perform division instead, leave a space after the /.
Alternatively, you can use builtins.div.
If this article appears incomplete, it may be intentional. Try prompting for a continuation.