lix/perl/lib/Nix
Eelco Dolstra 7f38087f35 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
2012-03-19 04:14:21 +01:00
..
Config.pm.in * Add a test for nix-channel. 2012-01-03 01:51:38 +00:00
CopyClosure.pm nix-copy-closure: don't print copied path on stdout 2012-03-05 20:52:24 +01:00
GeneratePatches.pm * Install NixManifest.pm, NixConfig.pm and GeneratePatches.pm under 2011-10-10 21:11:08 +00:00
Manifest.pm * Ignore missing manifest symlinks. 2012-01-03 12:59:00 +00:00
SSH.pm * Move SSH.pm. 2011-10-11 11:45:36 +00:00
Store.pm Add a command "nix-build --run-env" to reproduce the environment of a derivation 2012-03-19 04:14:21 +01:00
Store.xs Add a command "nix-build --run-env" to reproduce the environment of a derivation 2012-03-19 04:14:21 +01:00