diff --git a/pills/03-enter-environment.xml b/pills/03-enter-environment.xml index c9516f6..2aac0c2 100644 --- a/pills/03-enter-environment.xml +++ b/pills/03-enter-environment.xml @@ -8,7 +8,7 @@ Welcome to the third Nix pill. In the second pill we + linkend="install-on-your-running-system">second pill we installed Nix on our running system. Now we can finally play with it a little, these things also apply to NixOS users. @@ -343,6 +343,8 @@ This is quite similar to apt-get update. + (See this table + for a rough mapping between Ubuntu and NixOS package management.) @@ -352,7 +354,7 @@ We learned how to query the user environment and to manipulate it by installing and uninstalling software. Upgrading software is also straightforward, - as you can read in + as you can read in the manual (nix-env -u will upgrade all packages in the environment). diff --git a/pills/03/install-hello.txt b/pills/03/install-hello.txt index f4558de..7d707f2 100644 --- a/pills/03/install-hello.txt +++ b/pills/03/install-hello.txt @@ -1,4 +1,5 @@ $ nix-env -i hello installing 'hello-2.10' +[...] building '/nix/store/0vqw0ssmh6y5zj48yg34gc6macr883xk-user-environment.drv'... created 36 symlinks in user environment diff --git a/pills/04-basics-of-language.xml b/pills/04-basics-of-language.xml index 205bde8..96a2544 100644 --- a/pills/04-basics-of-language.xml +++ b/pills/04-basics-of-language.xml @@ -7,7 +7,7 @@ The Basics of the Language - Welcome to the fourth Nix pill. In the + Welcome to the fourth Nix pill. In the previous article we learned about Nix environments. We installed software as a user, managed their profile, switched between generations, and queried the Nix store. Those are the very basics of @@ -62,6 +62,8 @@ Launch nix repl. First of all, Nix supports basic arithmetic operations: +, -, and *. Integer division can be done with builtins.div. + (To exit nix repl, use the command :q. + Help is available through the :? command.) @@ -288,7 +290,7 @@ - With let you cannot assign twice to the same variable. However, you can + With let you cannot assign twice to the same variable. However, you can shadow outer variables: diff --git a/pills/07-working-derivation.xml b/pills/07-working-derivation.xml index 4e69877..e40284b 100644 --- a/pills/07-working-derivation.xml +++ b/pills/07-working-derivation.xml @@ -65,6 +65,9 @@ + The command declare -xp + lists exported variables. + (declare is a builtin bash function.) As we covered in the previous pill, Nix computes the output path of the derivation. The resulting .drv file contains a list of environment variables passed to the builder. One of these is