about summary refs log tree commit diff
path: root/scripts/nix-build.in
AgeCommit message (Collapse)AuthorFilesLines
2013-07-31 nix-shell: Don't disable Automake dependency trackingEelco Dolstra1-1/+2
Nixpkgs' stdenv disables dependency tracking by default. That makes sense for one-time builds, but in an interactive environment we expect repeated "make" invocations to do the right thing.
2013-07-19 nix-shell: Set $IN_NIX_SHELLEelco Dolstra1-0/+2
This allows scripts to distinguish between a real build and a Nix shell.
2013-07-19 nix-shell: Set some environment variables also set by build.ccEelco Dolstra1-1/+3
Setting $NIX_STORE causes the purity checks in gcc/ld-wrapper to kick in, so that's why we unset $NIX_ENFORCE_PURITY.
2013-07-19 Rename ‘nix-build --run-env’ to ‘nix-shell’Eelco Dolstra1-7/+9
2013-07-19 nix-build --run-env: Add a ‘--pure’ flagEelco Dolstra1-2/+15
This causes the environment to be (almost) cleared, thus giving a shell that more closely resembled the actual Nix derivation.
2013-07-11 nix-build --run-env: Always use BashEelco Dolstra1-1/+1
Fixes #113. Fixes #131.
2013-07-11 nix-build --run-env: Source $stdenv/setup in the interactive shellEelco Dolstra1-8/+17
This ensures that not just environment variables are set, but also shell functions such as unpackPhase, configurePhase and so on.
2013-04-23 nix-build: Respect --timeoutEelco Dolstra1-1/+1
2012-11-26 Undo accidental debug changeEelco Dolstra1-1/+1
2012-11-26 Make "nix-build -A <derivation>.<output>" do the right thingEelco Dolstra1-3/+21
For example, given a derivation with outputs "out", "man" and "bin": $ nix-build -A pkg produces ./result pointing to the "out" output; $ nix-build -A pkg.man produces ./result-man pointing to the "man" output; $ nix-build -A pkg.all produces ./result, ./result-man and ./result-bin; $ nix-build -A pkg.all -A pkg2 produces ./result, ./result-man, ./result-bin and ./result-2.
2012-10-03 When ‘--help’ is given, just run ‘man’ to show the manual pageEelco Dolstra1-24/+2
I.e. do what git does. I'm too lazy to keep the builtin help text up to date :-) Also add ‘--help’ to various commands that lacked it (e.g. nix-collect-garbage).
2012-10-03 nix-build: Support ‘--repair’ flagEelco Dolstra1-1/+1
2012-08-27 Merge branch 'master' into no-manifestsEelco Dolstra1-6/+6
2012-08-24 Include the output name in the GC root linkEelco Dolstra1-6/+6
Output names are now appended to resulting GC symlinks, e.g. by nix-build. For backwards compatibility, if the output is named "out", nothing is appended. E.g. doing "nix-build -A foo" on a derivation that produces outputs "out", "bin" and "dev" will produce symlinks "./result", "./result-bin" and "./result-dev", respectively.
2012-07-26 Merge branch 'master' into no-manifestsEelco Dolstra1-0/+4
2012-07-23 nix-build: Support the ‘-’ argument to build an expression from stdinEelco Dolstra1-0/+4
2012-07-11 Add some missing --version switchesEelco Dolstra1-0/+5
2012-04-10 Handle the case where $SHELL is not setEelco Dolstra1-1/+2
2012-03-27 Update "nix-build --help"Eelco Dolstra1-1/+6
2012-03-27 Add an option "--exclude" to filter dependencies in "nix-build --run-env"Eelco Dolstra1-1/+9
Sometimes when doing "nix-build --run-env" you don't want all dependencies to be built. For instance, if we want to do "--run-env" on the "build" attribute in Hydra's release.nix (to get Hydra's build environment), we don't want its "tarball" dependency to be built. So we can do: $ nix-build --run-env release.nix -A build --exclude 'hydra-tarball' This will skip the dependency whose name matches the "hydra-tarball" regular expression. The "--exclude" option can be repeated any number of times.
2012-03-27 Allow the command executed by "nix-build --run-env" to be overriden with ↵Eelco Dolstra1-1/+9
--command
2012-03-19 Add a command "nix-build --run-env" to reproduce the environment of a derivationEelco Dolstra1-0/+29
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-01-13 * nix-build: put the temporary derivation symlink in a temporaryEelco Dolstra1-28/+9
directory rather than the current directory. * nix-build: --drv-link now implies --add-drv-link.
2012-01-05 * Add a -I flag to the Perl bindings to nix-build and some otherEelco Dolstra1-1/+1
scripts. * Include the version and architecture in the -I flag so that there is at least a chance that a Nix binary built for one Perl version will run on another version.
2012-01-03 * Use Nix::Config.Eelco Dolstra1-4/+3
2011-10-10 * Set the executable bit on scripts.Eelco Dolstra1-0/+0
2011-08-06 * Add a Nix expression search path feature. Paths between angleEelco Dolstra1-2/+2
brackets, e.g. import <nixpkgs/pkgs/lib> are resolved by looking them up relative to the elements listed in the search path. This allows us to get rid of hacks like import "${builtins.getEnv "NIXPKGS_ALL"}/pkgs/lib" The search path can be specified through the ‘-I’ command-line flag and through the colon-separated ‘NIX_PATH’ environment variable, e.g., $ nix-build -I /etc/nixos ... If a file is not found in the search path, an error message is lazily thrown.
2010-08-30 * When using the build hook, distinguish between the stderr of theEelco Dolstra1-1/+6
hook script proper, and the stdout/stderr of the builder. Only the latter should be saved in /nix/var/log/nix/drvs. * Allow the verbosity to be set through an option. * Added a flag --quiet to lower the verbosity level.
2010-08-11 * nix-build: recognise --cores.Eelco Dolstra1-1/+1
2009-12-09 * nix-build: be less verbose.Eelco Dolstra1-1/+8
2009-07-15 * nix-build: pass the --show-trace flag.Eelco Dolstra1-0/+4
2009-06-10 * nix-build: if nix-instantiate or nix-store fails due to a signalEelco Dolstra1-2/+8
(e.g. out of memory or a segfault), print an error message. Otherwise the user doesn't see anything.
2009-03-18 * Clean up some tests (use nix-build where appropriate).Eelco Dolstra1-1/+8
2009-02-27 * nix-build: support --option.Eelco Dolstra1-0/+7
2009-01-13 (no commit message)Eelco Dolstra1-1/+1
2008-11-20 * Urgh.Eelco Dolstra1-2/+4
2008-08-04 * nix-build: `--dry-run' flag.Eelco Dolstra1-0/+9
2007-11-15 * nix-build: pass --argstr to nix-instantiate.Eelco Dolstra1-3/+3
2007-06-11 * Check against creation of GC roots in the store. Those roots don'tEelco Dolstra1-2/+2
work, because findRoots() stops when it encounters a symlink to the store. And of course the store is supposed to be read-only.
2006-12-08 * Kill a build if it has gone for more than a certain number ofEelco Dolstra1-0/+6
seconds without producing output on stdout or stderr (NIX-65). This timeout can be specified using the `--max-silent-time' option or the `build-max-silent-time' configuration setting. The default is infinity (0). * Fix a tricky race condition: if we kill the build user before the child has done its setuid() to the build user uid, then it won't be killed, and we'll potentially lock up in pid.wait(). So also send a conventional kill to the child.
2006-10-31 * Oops, `nix-build --no-out-link' was broken.Eelco Dolstra1-1/+1
2006-10-19 * nix-build: check the exit status of `nix-store -r'.Eelco Dolstra1-4/+6
2006-08-04 * Use old-school pipe opens; the new style is Perl >= 5.8.0.Eelco Dolstra1-2/+3
2006-08-01 * Better error checking.Eelco Dolstra1-2/+2
2006-07-28 * `nix-instantiate ... --arg NAME VALUE': allow arguments to be passedEelco Dolstra1-2/+10
to functions from the command line. * nix-build: started removing backticks.
2006-03-14 * Allow the resulting symlink of nix-build to be named, e.g.,Eelco Dolstra1-9/+31
$ nix-build .../i686-linux.nix -A apacheHttpd -o apache
2006-03-03 * More online help.Eelco Dolstra1-1/+15
2006-03-03 * Rewrote nix-build in Perl, since sh is just too limited (turns outEelco Dolstra1-78/+87
that arrays are a bash extension, so it didn't work on FreeBSD). Also fixes NIX-8 (readlink(1) dependency).
2006-02-10 * Enable the --attr in nix-build as well (and add -A as an alias).Eelco Dolstra1-6/+15
Example: $ nix-build ./all-packages.nix -A xlibs.libX11 So finally it's easy to perform a test build of a Nix expression!
2005-07-13 * nix-build: default to `./default.nix' if no paths are specified.Eelco Dolstra1-28/+38
So when using Nix as a build tool, you can just say `nix-build' and it will build the top-level derivation defined in `default.nix'.