about summary refs log tree commit diff
path: root/release.nix
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2012-03-19T03·14+0100
committerEelco Dolstra <eelco.dolstra@logicblox.com>2012-03-19T03·14+0100
commit7f38087f35e6f74a73bfdb28da8acd8930565d51 (patch)
tree56bb5dbde3da7ca5e423a24ae1bb69a998c751f5 /release.nix
parentea402a255f9c03a644d256b0d1443a986a2bbebb (diff)
Add a command "nix-build --run-env" to reproduce the environment of a derivation
This command builds or fetches all dependencies of the given
derivation, then starts a shell with the environment variables from
the derivation.  This shell also sources $stdenv/setup to initialise
the environment further.

The current directory is not changed.  Thus this is a convenient way
to reproduce a build environment in an existing working tree.

Existing environment variables are left untouched (unless the
derivation overrides them).  As a special hack, the original value of
$PATH is appended to the $PATH produced by $stdenv/setup.

Example session:

$ nix-build --run-env '<nixpkgs>' -A xterm
(the dependencies of xterm are built/fetched...)
$ tar xf $src
$ ./configure
$ make
$ emacs
(... hack source ...)
$ make
$ ./xterm
Diffstat (limited to 'release.nix')
0 files changed, 0 insertions, 0 deletions