about summary refs log tree commit diff
path: root/src/nix-build (follow)
AgeCommit message (Collapse)AuthorFilesLines
2018-05-07 nix-shell: Only download requested outputsEelco Dolstra1-1/+1
Fixes #2116.
2018-04-07 nix-shell: Fixes use with ruby shebangs.Samuel Dionne-Riel1-1/+1
The ported code in 80ebc553eca19dafc64c47420cd49ddd506bc9b7 was incorrectly ported. ``` - $envCommand = "exec $execArgs $interpreter -e 'load(\"$script\")' -- ${\(join ' ', (map shellEscape, @savedArgs))}"; ... + envCommand = (format("exec %1% %2% -e 'load(\"%3%\") -- %4%") % execArgs % interpreter % script % joined.str()).str(); ``` The single-quote finishing the small ruby snippet was lost in translation.
2018-03-16 nix-shell: allow symlinks to .drvsLinus Heckemann1-2/+6
This makes persistent shell environments easier to use.
2018-02-08 Add plugins to make Nix more extensible.Shea Levy1-0/+2
All plugins in plugin-files will be dlopened, allowing them to statically construct instances of the various Register* types Nix supports.
2018-02-03 Remove nix-build --hashEelco Dolstra1-3/+0
Instead, if a fixed-output derivation produces has an incorrect output hash, we now unconditionally move the outputs to the path corresponding with the actual hash and register it as valid. Thus, after correcting the hash in the Nix expression (e.g. in a fetchurl call), the fixed-output derivation doesn't have to be built again. It would still be good to have a command for reporting the actual hash of a fixed-output derivation (instead of throwing an error), but "nix-build --hash" didn't do that.
2018-02-01 nix-build: Ignore --indirectEelco Dolstra1-1/+1
Note that nix-build always creates indirect roots. Fixes #1830.
2018-01-16 Add pure evaluation modeEelco Dolstra1-2/+2
In this mode, the following restrictions apply: * The builtins currentTime, currentSystem and storePath throw an error. * $NIX_PATH and -I are ignored. * fetchGit and fetchMercurial require a revision hash. * fetchurl and fetchTarball require a sha256 attribute. * No file system access is allowed outside of the paths returned by fetch{Git,Mercurial,url,Tarball}. Thus 'nix build -f ./foo.nix' is not allowed. Thus, the evaluation result is completely reproducible from the command line arguments. E.g. nix build --pure-eval '( let nix = fetchGit { url = https://github.com/NixOS/nixpkgs.git; rev = "9c927de4b179a6dd210dd88d34bda8af4b575680"; }; nixpkgs = fetchGit { url = https://github.com/NixOS/nixpkgs.git; ref = "release-17.09"; rev = "66b4de79e3841530e6d9c6baf98702aa1f7124e4"; }; in (import (nix + "/release.nix") { inherit nix nixpkgs; }).build.x86_64-linux )' The goal is to enable completely reproducible and traceable evaluation. For example, a NixOS configuration could be fully described by a single Git commit hash. 'nixos-rebuild' would do something like nix build --pure-eval '( (import (fetchGit { url = file:///my-nixos-config; rev = "..."; })).system ') where the Git repository /my-nixos-config would use further fetchGit calls or Git externals to fetch Nixpkgs and whatever other dependencies it has. Either way, the commit hash would uniquely identify the NixOS configuration and allow it to reproduced.
2017-11-24 nix-shell/nix-build: Support .drv files againEelco Dolstra1-2/+4
Fixes #1663. Also handle '!<output-name>' (#1694).
2017-10-30 nix-build: Fix --hashEelco Dolstra1-0/+3
2017-10-25 Pass lists/attrsets to bash as (associative) arraysEelco Dolstra1-4/+0
2017-10-24 nix: Respect -I, --arg, --argstrEelco Dolstra1-12/+11
Also, random cleanup to argument handling.
2017-10-19 nix-shell: Fix file name resolution in shebangsShea Levy1-1/+1
2017-09-18 nix-shell: Ignore readFile() errorsEelco Dolstra1-5/+5
Fixes #1563.
2017-07-30 Replace Unicode quotes in user-facing strings by ASCIIJörg Thalheim1-4/+4
Relevant RFC: NixOS/rfcs#4 $ ag -l | xargs sed -i -e "/\"/s/’/'/g;/\"/s/‘/'/g"
2017-07-28 nix-build: Fix regression causing all outputs to be builtEelco Dolstra1-4/+4
2017-07-26 nix-build/nix-shell: Eliminate call to nix-instantiate / nix-storeEelco Dolstra1-452/+378
Note that this removes the need for a derivation symlink, so the --drv-path and --add-drv-link flags now do nothing.
2017-07-20 nix-shell: Use bashInteractive from <nixpkgs>Eelco Dolstra2-2/+44
This adds about 0.1s to nix-shell runtime in the case where bashInteractive already exists. See discussion at https://github.com/NixOS/nixpkgs/issues/27493.
2017-07-03 nix-shell: Respect --dry-runEelco Dolstra1-0/+2
Fixes #824.
2017-05-24 Fix #1314Eelco Dolstra1-1/+2
Also, make nix-shell respect --option. (Previously it only passed it along to nix-instantiate and nix-build.)
2017-05-24 Merge branch 'topic/cores-master' of https://github.com/neilmayhew/nixEelco Dolstra1-0/+1
2017-05-24 Fix #1380Eelco Dolstra1-1/+1
It lacked a backslash. Use a raw string and single quotes around PS1 to simplify this.
2017-05-10 nix-shell: use appropriate prompt terminatorLinus Heckemann1-1/+1
If running nix-shell as root, the terminator should be # and not $.
2017-05-03 nix-shell: Implement passAsFileEelco Dolstra1-2/+15
2017-04-24 nix-shell -p: Use runCommandCCEelco Dolstra1-1/+1
This restores pre-17.03 behaviour by making gcc available.
2017-04-09 Propagate NIX_BUILD_CORES to nix-shell environmentsNeil Mayhew1-0/+1
2017-03-12 nix-shell/pure: keep environment variable SHLVLStefan Junker1-1/+1
2017-02-24 nix-shell: Better error message when the shell can't be startedEelco Dolstra1-2/+4
2017-02-24 nix-shell: Overwrite environment variablesEelco Dolstra1-1/+1
Need to remember that std::map::insert() and emplace() don't overwrite existing entries... This fixes a regression relative to 1.11 that in particular triggers in nested nix-shells. Before: $ nativeBuildInputs=/foo nix-shell -p hello --run 'hello' build input /foo does not exist After: $ nativeBuildInputs=/foo nix-shell -p hello --run 'hello' Hello, world!
2017-02-01 Restore default signal handling in child processesEelco Dolstra1-0/+2
In particular, this fixes Ctrl-C in nix-shell sessions.
2017-01-16 assign environ to a temp variable to ensure livenessJude Taylor1-3/+6
2017-01-16 nix-build: Use showManPage() and printVersion()Eelco Dolstra1-7/+3
2017-01-07 nix-shell: Fix 'nix-shell --command' doing nothing without TTYTuomas Tynkkynen1-1/+2
Regression from a5f2750e ("Fix early removal of rc-file for nix-shell"). The removal of BASH_ENV causes nothing to be executed by bash if it detects itself in a non-interactive context. Instead, just use the same condition used by bash to launch bash differently. According to bash sources, the condition (stdin and stder both must be TTYs) is specified by POSIX so this should be pretty safe to rely on. Fixes #1171 on master, needs a backport to the Perl code in 1.11.
2017-01-03 nix-shell: In #! mode, pass the last argumentEelco Dolstra1-13/+11
"i < argc - 1" should be "i < argc".
2017-01-03 nix-shell: Don't act interactive in shebangsTuomas Tynkkynen1-0/+1
I had observed that 'bash --rcfile' would do nothing in a non-interactive context and cause nothing to be executed if a script using nix-shell shebangs were run in a non-interactive context.
2017-01-03 nix-shell: Fix 'nix-shell -i'Tuomas Tynkkynen1-1/+1
The 'args' variable here is shadowing one in the outer scope and its contents end up unused. This causes any '#! nix-shell' lines to effectively be ignored. The intention here was to clear the args vector, as far as I can tell (and it seems to work).
2016-11-26 Revert "Get rid of unicode quotes (#1140)"Eelco Dolstra1-1/+1
This reverts commit f78126bfd6b6c8477fcdbc09b2f98772dbe9a1e7. There really is no need for such a massive change...
2016-11-25 Get rid of unicode quotes (#1140)Guillaume Maudoux1-1/+1
2016-10-19 Fix Darwin buildEelco Dolstra1-4/+6
Done slightly differently from https://github.com/NixOS/nix/pull/1093.
2016-09-21 nix-build, nix-shell: Don't print error message if nix-store/nix-instantiate ↵Eelco Dolstra1-4/+28
fails
2016-09-20 nix-shell: Fix $PATH handling in the impure caseEelco Dolstra1-29/+35
We were passing "p=$PATH" rather than "p=$PATH;", resulting in some invalid shell code. Also, construct a separate environment for the child rather than overwriting the parent's.
2016-09-20 nix-shell: Restore CPU affinityEelco Dolstra1-6/+10
Otherwise the shell and its children will be bound to one CPU core...
2016-09-12 Fix build on GCC 4.9Eelco Dolstra1-11/+8
GCC 4.9 doesn't like reassigning a std::stringstream. http://hydra.nixos.org/build/40371644
2016-09-12 Write "T x" instead of "auto x = T"Eelco Dolstra1-35/+32
That's just silly. Hopefully this also fixes the Debian build failure: http://hydra.nixos.org/build/40371644
2016-09-08 Fix early removal of rc-file for nix-shellShea Levy1-2/+0
BASH_ENV causes all non-interactive shells called via eg. /etc/bashrc to remove the rc-file before the main shell gets to run it. Completion scripts will often do this. Fixes #976. Adapted from and fixes #1034.
2016-08-31 nix-build: Clean up a bitShea Levy1-6/+8
2016-08-11 nix-build: extend the meaning of $IN_NIX_SHELLVladimír Čunát1-1/+1
An equivalent was originally filed against the perl version: https://github.com/NixOS/nix/pull/933
2016-08-09 nix-build: Port to c++Shea Levy2-0/+491
This was a dumb line-for-line rewrite, because nix build/nix run/etc. will replace it.