From 7b09e9f2c49aba7ced0e7fbac3994f6686b6a303 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Fri, 19 Jul 2013 16:51:31 +0200 Subject: [PATCH] Add hacking notes plus a script for running nix-shell --- dev-shell | 12 ++++++++++++ doc/manual/hacking.xml | 41 +++++++++++++++++++++++++++++++++++++++++ doc/manual/manual.xml | 1 + 3 files changed, 54 insertions(+) create mode 100755 dev-shell create mode 100644 doc/manual/hacking.xml diff --git a/dev-shell b/dev-shell new file mode 100755 index 000000000..8579939a7 --- /dev/null +++ b/dev-shell @@ -0,0 +1,12 @@ +#! /bin/sh +s=$(type -p nix-shell) +exec $s release.nix -A tarball --command " + export NIX_REMOTE=daemon + export NIX_PATH='$NIX_PATH' + export NIX_BUILD_SHELL=$(type -p bash) + export c=\$configureFlags + exec $s release.nix -A build.x86_64-linux --exclude tarball --command ' + configureFlags+=\" \$c --prefix=$(pwd)/inst --sysconfdir=$(pwd)/inst/etc\" + return + '" \ + "$@" diff --git a/doc/manual/hacking.xml b/doc/manual/hacking.xml new file mode 100644 index 000000000..f8478c909 --- /dev/null +++ b/doc/manual/hacking.xml @@ -0,0 +1,41 @@ + + +Hacking + +This section provides some notes on how to hack on Nix. To get +the latest version of Nix from GitHub: + +$ git clone git://github.com/NixOS/nix.git +$ cd hydra + + + +To build it and its dependencies: + +$ nix-build release.nix -A build.x86_64-linux + + + +To build all dependencies and start a shell in which all +environment variables are set up so that those dependencies can be +found: + +$ ./dev-shell + +To build Nix itself in this shell: + +[nix-shell]$ ./bootstrap +[nix-shell]$ configurePhase +[nix-shell]$ make + +To test it: + +[nix-shell]$ make install +[nix-shell]$ make installcheck + + + + + diff --git a/doc/manual/manual.xml b/doc/manual/manual.xml index 6abff02d9..671ca9d65 100644 --- a/doc/manual/manual.xml +++ b/doc/manual/manual.xml @@ -73,6 +73,7 @@ + Nix Release Notes