From 81f2324f495b4c255a1a1f848fc1fb5638d695dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Amy=20de=20Buitl=C3=A9ir?= Date: Mon, 10 Dec 2018 00:24:00 +0000 Subject: [PATCH 1/5] Update 03-enter-environment.xml Added reference to cheatsheet. --- pills/03-enter-environment.xml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pills/03-enter-environment.xml b/pills/03-enter-environment.xml index c9516f6..fea67f9 100644 --- a/pills/03-enter-environment.xml +++ b/pills/03-enter-environment.xml @@ -343,6 +343,8 @@ This is quite similar to apt-get update. + (See this page + for a rough mapping between Ubuntu and NixOS package management.) From 3401e116b26558e24c302faa3e3850c51d766ed3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Amy=20de=20Buitl=C3=A9ir?= Date: Mon, 10 Dec 2018 00:45:28 +0000 Subject: [PATCH 2/5] Added link to cheatsheet --- pills/03-enter-environment.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pills/03-enter-environment.xml b/pills/03-enter-environment.xml index fea67f9..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,7 +343,7 @@ This is quite similar to apt-get update. - (See this page + (See this table for a rough mapping between Ubuntu and NixOS package management.) @@ -354,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). From dac4f174682f9044d81f5a26731dfd8948ffe3f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Amy=20de=20Buitl=C3=A9ir?= Date: Mon, 10 Dec 2018 00:46:39 +0000 Subject: [PATCH 3/5] Indicate that there is additional output not shown --- pills/03/install-hello.txt | 1 + 1 file changed, 1 insertion(+) 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 From f0cf557c58409303650b148d5893de8c298bc960 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Amy=20de=20Buitl=C3=A9ir?= Date: Mon, 10 Dec 2018 00:47:42 +0000 Subject: [PATCH 4/5] Explain how to exit the Nix repl --- pills/04-basics-of-language.xml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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: From c3ef7065b9f019d1a791f32cf27b631950ccf8c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Amy=20de=20Buitl=C3=A9ir?= Date: Mon, 10 Dec 2018 01:03:20 +0000 Subject: [PATCH 5/5] Explained the declare command, as it may be unfamiliar. --- pills/07-working-derivation.xml | 3 +++ 1 file changed, 3 insertions(+) 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