about summary refs log tree commit diff
path: root/scripts/nix-build.in
AgeCommit message (Collapse)AuthorFilesLines
2014-05-26 nix-build: --add-root also takes 1 parameterAristid Breitkreuz1-1/+1
2014-04-08 nix-shell --pure: Keep the user's $PAGEREelco Dolstra1-1/+1
2014-03-30 Fix nix-shell for derivation with multiple outputsMaxim Ivanov1-0/+1
If derivation declares multiple outputs and first (default) output if not "out", then "nix-instantiate" calls return path with output names appended after "!". Than suffix must be stripped before ant path checks are done.
2014-03-17 nix-build: Fix --cores flagEelco Dolstra1-1/+1
2014-02-19 nix-shell: Add --packages flagEelco Dolstra1-1/+11
This allows you to easily set up a build environment containing the specified packages from Nixpkgs. For example: $ nix-shell -p sqlite xorg.libX11 hello will start a shell in which the given packages are present.
2014-02-19 nix-instantiate: Add a flag --expr / -E to read expressions from the command ↵Eelco Dolstra1-7/+15
line This is basically a shortcut for ‘echo 'expr...' | nix-instantiate -’. Also supported by nix-build and nix-shell.
2014-02-19 nix-shell: Don't leave a temporary directory in /tmp behindEelco Dolstra1-0/+1
2014-02-18 Add a flag ‘--check’ to verify build determinismEelco Dolstra1-0/+4
The flag ‘--check’ to ‘nix-store -r’ or ‘nix-build’ will cause Nix to redo the build of a derivation whose output paths are already valid. If the new output differs from the original output, an error is printed. This makes it easier to test if a build is deterministic. (Obviously this cannot catch all sources of non-determinism, but it catches the most common one, namely the current time.) For example: $ nix-build '<nixpkgs>' -A patchelf ... $ nix-build '<nixpkgs>' -A patchelf --check error: derivation `/nix/store/1ipvxsdnbhl1rw6siz6x92s7sc8nwkkb-patchelf-0.6' may not be deterministic: hash mismatch in output `/nix/store/4pc1dmw5xkwmc6q3gdc9i5nbjl4dkjpp-patchelf-0.6.drv' The --check build fails if not all outputs are valid. Thus the first call to nix-build is necessary to ensure that all outputs are valid. The current outputs are left untouched: the new outputs are either put in a chroot or diverted to a different location in the store using hash rewriting.
2014-02-17 nix-shell: Execute shellHook if it existsEelco Dolstra1-0/+1
Since normal builds don't execute shellHook, this allows nix-shell specific customisation. Suggested by Domen.
2014-02-10 nix-shell: Use shell.nix as the default expression if it existsEelco Dolstra1-1/+2
2014-01-23 nix-shell: Add --impure flagEelco Dolstra1-3/+2
This is currently the default, but I might change that to --pure in the future.
2014-01-23 nix-shell: Preserve the TZ variable of the userEelco Dolstra1-2/+3
2014-01-23 nix-build: RefactorEelco Dolstra1-1/+1
2014-01-13 nix-shell: Don't set NIX_INDENT_MAKEEelco Dolstra1-0/+1
It generally is not useful in interactive environments (and messes up some non-ANSI-compliant terminals).
2014-01-13 nix-shell: Set $IN_NIX_SHELL before evaluatingEelco Dolstra1-2/+2
2014-01-06 Revert "nix-shell: Set $IN_NIX_SHELL before evaluation"Eelco Dolstra1-2/+2
This reverts commit 0c1198cf08576f16633b2344dc6513cefb567cfc.
2013-12-30 nix-shell --pure: Don't clear IN_NIX_SHELLShea Levy1-1/+1
Signed-off-by: Shea Levy <shea@shealevy.com>
2013-12-20 nix-shell: Don't warn about the lack of a GC rootEelco Dolstra1-1/+1
2013-12-20 nix-shell: Set $IN_NIX_SHELL before evaluationEelco Dolstra1-2/+2
This has some hacky applications.
2013-12-20 nix-shell: Handle --option correctlyEelco Dolstra1-1/+1
Fixes #181.
2013-12-17 nix-shell --pure: Keep $TERMEelco Dolstra1-1/+1
2013-10-18 Don't set $PS1 in non-interactive shellsEelco Dolstra1-1/+1
Shouldn't really matter, but you never know.
2013-10-18 nix-shell: Play nicely with non-interactive shellsShea Levy1-1/+3
nix-shell with the --command flag might be used non-interactively, but if bash starts non-interactively (i.e. with stdin or stderr not a terminal), it won't source the script given in --rcfile. However, in that case it *will* source the script found in $BASH_ENV, so we can use that instead. Also, don't source ~/.bashrc in a non-interactive shell (detectable by checking the PS1 env var) Signed-off-by: Shea Levy <shea@shealevy.com>
2013-10-14 nix-shell: Fix bash completionEelco Dolstra1-0/+1
Nixpkgs's stdenv setup script sets the "nullglob" option, but doing so breaks Bash completion on NixOS (when ‘programs.bash.enableCompletion’ is set) and on Ubuntu. So clear that flag afterwards. Of course, this may break stdenv functions in subtle ways...
2013-09-06 nix-shell: Support a .drv as argumentEelco Dolstra1-8/+13
Fixes #161.
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