1
0
Fork 0
mirror of https://github.com/NixOS/nix-pills synced 2024-09-19 04:00:13 -04:00

Merge pull request #91 from mhwombat/master

Miscellaneous minor clarifications
This commit is contained in:
Wael Nasreddine 2018-12-10 08:40:21 -08:00 committed by GitHub
commit 500b723563
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 12 additions and 4 deletions

View file

@ -8,7 +8,7 @@
<para>
Welcome to the third Nix pill. In the <link
linkend="install-on-your-running-system">second pill</link> we
linkend="install-on-your-running-system">second pill</link> we
installed Nix on our running system. Now we can finally play with it a
little, these things also apply to NixOS users.
</para>
@ -343,6 +343,8 @@
<para>
This is quite similar to <command>apt-get update</command>.
(See <link xlink:href="https://nixos.wiki/wiki/Cheatsheet">this table</link>
for a rough mapping between Ubuntu and NixOS package management.)
</para>
</section>
@ -352,7 +354,7 @@
<para>
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
<link xlink:href="http://nixos.org/nix/manual/#idm47361539520832">the manual</link>
(<command>nix-env -u</command> will upgrade all packages in the
environment).

View file

@ -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

View file

@ -7,7 +7,7 @@
<title>The Basics of the Language</title>
<para>
Welcome to the fourth Nix pill. In the
Welcome to the fourth Nix pill. In the
<link linkend="enter-environment">previous article</link> 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 <literal>nix repl</literal>. First of all, Nix supports basic arithmetic operations:
<literal>+</literal>, <literal>-</literal>, and <literal>*</literal>. Integer division can be
done with <literal>builtins.div</literal>.
(To exit <literal>nix repl</literal>, use the command <literal>:q</literal>.
Help is available through the <literal>:?</literal> command.)
</para>
<screen><xi:include href="./04/basics.txt" parse="text" /></screen>
@ -288,7 +290,7 @@
<screen><xi:include href="./04/let-nested.txt" parse="text" /></screen>
<para>
With <literal>let</literal> you cannot assign twice to the same variable. However, you can
With <literal>let</literal> you cannot assign twice to the same variable. However, you can
shadow outer variables:
</para>

View file

@ -65,6 +65,9 @@
<programlisting><xi:include href="./07/builder.sh.txt" parse="text" /></programlisting>
The command <literal>declare -xp</literal>
lists exported variables.
(<literal>declare</literal> is a builtin bash function.)
As we covered in the previous pill, Nix computes the output path of the
derivation. The resulting <literal>.drv</literal> file contains a list of
environment variables passed to the builder. One of these is