2013-07-19 16:51:31 +02:00
|
|
|
<appendix xmlns="http://docbook.org/ns/docbook"
|
|
|
|
xmlns:xlink="http://www.w3.org/1999/xlink"
|
|
|
|
xml:id="chap-hacking">
|
|
|
|
|
|
|
|
<title>Hacking</title>
|
|
|
|
|
|
|
|
<para>This section provides some notes on how to hack on Nix. To get
|
|
|
|
the latest version of Nix from GitHub:
|
|
|
|
<screen>
|
|
|
|
$ git clone git://github.com/NixOS/nix.git
|
2014-02-28 14:01:26 +01:00
|
|
|
$ cd nix
|
2013-07-19 16:51:31 +02:00
|
|
|
</screen>
|
|
|
|
</para>
|
|
|
|
|
|
|
|
<para>To build it and its dependencies:
|
|
|
|
<screen>
|
|
|
|
$ nix-build release.nix -A build.x86_64-linux
|
|
|
|
</screen>
|
|
|
|
</para>
|
|
|
|
|
|
|
|
<para>To build all dependencies and start a shell in which all
|
|
|
|
environment variables are set up so that those dependencies can be
|
|
|
|
found:
|
|
|
|
<screen>
|
2016-11-28 16:13:23 +01:00
|
|
|
$ nix-shell
|
2013-07-19 16:51:31 +02:00
|
|
|
</screen>
|
|
|
|
To build Nix itself in this shell:
|
|
|
|
<screen>
|
2014-07-16 11:09:01 +02:00
|
|
|
[nix-shell]$ ./bootstrap.sh
|
2013-07-19 16:51:31 +02:00
|
|
|
[nix-shell]$ configurePhase
|
|
|
|
[nix-shell]$ make
|
|
|
|
</screen>
|
2016-11-28 16:13:23 +01:00
|
|
|
To install it in <literal>$(pwd)/nix</literal> and test it:
|
2013-07-19 16:51:31 +02:00
|
|
|
<screen>
|
|
|
|
[nix-shell]$ make install
|
|
|
|
[nix-shell]$ make installcheck
|
|
|
|
</screen>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
</appendix>
|