Commit graph

4520 commits

Author SHA1 Message Date
Scott R. Parish 0c67498be9
fix "nix-build" examples
The existing "nix-build" examples were failing:

  error: cannot auto-call a function that has an argument without a default value (‘system’)

Thanks to @groxxda on irc for pointing out the fix!

Updated to completely remove unneeded path argument, suggested by @joachifm

Updated to remove other occurences of `all-packages.nix` from files as
suggested by @domenkozar

(cherry picked from commit 96d3534a9e)
2017-01-03 16:38:48 +01:00
Eelco Dolstra d39f51fa34
Bump version number 2017-01-02 15:18:50 +01:00
Dmitry Kalinkin 5bf9689e0c
override rx directory permissions in deletePath()
This fixes instantiation of pythonPackages.pytest that produces a
directory with less permissions during one of it's tests that leads to
a nix error like:

error: opening directory ‘/tmp/nix-build-python2.7-pytest-2.9.2.drv-0/pytest-of-user/pytest-0/testdir/test_cache_failure_warns0/.cache’: Permission denied
(cherry picked from commit f91748ba73)
2016-12-19 14:28:57 +01:00
Shea Levy 612c77a399
Update darwin build for optional sandbox paths
Fixes #1132

(cherry picked from commit 8bf378e999)
2016-11-22 10:46:26 +01:00
Eelco Dolstra 2eb840eefa
Support optional sandbox paths
For example, you can now set

  build-sandbox-paths = /dev/nvidiactl?

to specify that /dev/nvidiactl should only be mounted in the sandbox
if it exists in the host filesystem. This is useful e.g. for EC2
images that should support both CUDA and non-CUDA instances.

(cherry picked from commit 18b7363a69)
2016-11-22 10:46:26 +01:00
Shea Levy fd9fc15c0c Add nix.conf options for -k and -K
Fixes #1084
2016-10-27 12:51:27 -04:00
Shea Levy 8bddc3d406 Fix early removal of rc-file for nix-shell
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-09-08 09:10:50 -04:00
Eelco Dolstra fb577a431f Fix Debian 8 build
http://hydra.nixos.org/build/36462150
(cherry picked from commit 88b79cd55c)
2016-09-06 13:12:53 +02:00
Eelco Dolstra 8c353ea698 Fix incomplete cherry-pick in 0eb8bbb31e 2016-09-06 13:12:04 +02:00
Eelco Dolstra a566927003 Fix OOM in the installer test
http://hydra.nixos.org/build/36462209
(cherry picked from commit 1b5b654fe2)
2016-09-06 13:07:54 +02:00
Dan Peebles f2495212b1 Kill the temporary darwin-specific channel
The issues have been resolved upstream in the main nixpkgs channel now
(cherry picked from commit c89783b6a7)
2016-09-06 13:06:51 +02:00
Eelco Dolstra 7ead75ca85 Drop all distros that are not down with C++11
(cherry picked from commit 7251a81bde)
2016-09-06 13:06:40 +02:00
Eelco Dolstra f668fdb026 Fix nix-copy-closure test on 16.03
(cherry picked from commit b86555aa2b)
2016-09-06 12:59:48 +02:00
aszlig 16e88f0b5a Don't hardcode docbook XSL namespace URL
Docbook XSL got updated to version 1.79.1 in NixOS/nixpkgs@fb893a8 and
we're still referring to the hardcoded previous version.

So instead of just updating this to 1.79.1 we're going to use "current"
in the hope that this won't happen again.

I have tested this by building the manual under Nix(OS) but I haven't
tested this in a non-Nix environment, so I'm not sure whether this could
have implications.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
Cc: @edolstra
(cherry picked from commit 72fb2ccfa1)
2016-09-06 12:52:49 +02:00
Eelco Dolstra 2179dd3e5b Bump version 2016-09-02 14:58:47 +02:00
Eelco Dolstra efa2e451fb Make the search path lazier with non-fatal errors
Thus, -I / $NIX_PATH entries are now downloaded only when they are
needed for evaluation. An error to download an entry is a non-fatal
warning (just like non-existant paths).

This does change the semantics of builtins.nixPath, which now returns
the original, rather than resulting path. E.g., before we had

  [ { path = "/nix/store/hgm3yxf1lrrwa3z14zpqaj5p9vs0qklk-nixexprs.tar.xz"; prefix = "nixpkgs"; } ... ]

but now

  [ { path = "https://nixos.org/channels/nixos-16.03/nixexprs.tar.xz"; prefix = "nixpkgs"; } ... ]

Fixes #792.

(cherry picked from commit 363f37d084)
2016-09-02 11:55:14 +02:00
Shea Levy dea9de79b7 callFunction: Copy functors to the heap
Normally it's impossible to take a reference to the function passed to
callFunction, so some callers (e.g. ExprApp::eval) allocate that value
on the stack. For functors, a reference to the functor itself may be
kept, so we need to have it on the heap.

Fixes #1045

(cherry picked from commit 9fa21765e7)
2016-08-29 07:40:03 -04:00
Shea Levy 2ac966a464 Bump version to 1.11.3 2016-08-22 10:20:41 -04:00
Eelco Dolstra 6a493a7c44 launchd: Set $SSL_CERT_FILE
Otherwise in particular https://cache.nixos.org won't work in the
daemon.

(cherry picked from commit eff80419c7)
2016-08-19 13:11:03 +02:00
Shea Levy 7bb4d028a8 builtins.fetch{url,tarball}: Allow name attribute
(cherry picked from commit d52d391164)
2016-08-15 07:42:51 -04:00
Shea Levy 66151dc154 Respect --keep-going when a substituter fails.
Fixes #977

(cherry picked from commit 18b0808475)
2016-07-23 13:22:52 -04:00
Domen Kožar 0eb8bbb31e add Ubuntu 16.03 .deb builds
(cherry picked from commit bf386de9f2)
Signed-off-by: Domen Kožar <domen@dev.si>
2016-05-26 15:55:51 +01:00
Eelco Dolstra 437d3cdc7a Bump version to 1.11.2 2016-02-10 12:10:03 +01:00
Alex Cruice 0322c92560 Check shell profile is writeable before modifying
The `set -e` at the top of the script causes the installation to fail to
complete if the shell profile is not writeable. Checking file existence
only is not enough.

(cherry picked from commit ad0dc41899)
2016-02-10 12:04:47 +01:00
Brian McKenna 1852f7dbf3 Fix broken call to shellwords
nix-shell shebangs were broken by 9018deab

(cherry picked from commit 3baf8be1d1)
2016-02-10 12:04:18 +01:00
Eelco Dolstra 08500066ea Revert "Revert "next try for "don't abort when given unmatched '}' with 'start-condition stack underflow'. This fixes #751"""
This reverts commit b669d3d2e8.

(cherry picked from commit 5d8b7eb3e1)
2016-02-10 12:04:08 +01:00
Eelco Dolstra da4495eb17 Fix eval 2016-01-20 00:26:51 +01:00
Eelco Dolstra b669d3d2e8 Revert "next try for "don't abort when given unmatched '}' with 'start-condition stack underflow'. This fixes #751""
This reverts commit ed23c8568e. Let's
merge this *after* the 1.11.1 release.
2016-01-20 00:05:28 +01:00
Shea Levy 7db05781a6 Merge branch 'lexer-regression-fix' of git://github.com/fkz/nix 2016-01-19 16:24:16 -05:00
Fabian Schmitthenner ed23c8568e next try for "don't abort when given unmatched '}' with 'start-condition stack underflow'. This fixes #751"
This reverts commit 8120b6fb8a and fixes the regression introduced in
8d22b26448.
2016-01-19 20:35:35 +00:00
Eelco Dolstra 9fff492561 Add tests for Nixpkgs/NixOS evaluation 2016-01-19 21:10:32 +01:00
Eelco Dolstra ef53735f28 Do a 1.11.1 brown paper bag release 2016-01-19 20:35:51 +01:00
Eelco Dolstra 8120b6fb8a Revert "don't abort when given unmatched '}' with 'start-condition stack underflow'. This fixes #751"
This reverts commit 8d22b26448. It
breaks Nixpkgs:

$ nix-env -qa
error: syntax error, unexpected IND_STR, expecting '}', at /home/eelco/Dev/nixpkgs-stable/pkgs/top-level/python-packages.nix:7605:8
2016-01-19 20:33:32 +01:00
Eelco Dolstra 4c8098f30c Bump version 2016-01-19 14:15:48 +01:00
Eelco Dolstra 8b4577ac9d Grmbl 2016-01-19 12:35:17 +01:00
Eelco Dolstra d704abc0f3 Update release notes 2016-01-18 15:59:28 +01:00
Eelco Dolstra 71e5b937fb Document --check 2016-01-18 15:54:14 +01:00
Eelco Dolstra 0824f40760 <nix/buildenv.nix>: Don't substitute
This should get rid of a certificate warning from "nix-env -i" early
in the install script.
2016-01-18 15:06:36 +01:00
Peter Simons a1bf934044 doc/manual/command-ref/nix-collect-garbage.xml: document --max-freed option
Mention the --max-freed option in the nix-collect-garbage man page.
Related to https://github.com/NixOS/nix/issues/609.
2016-01-18 13:25:36 +01:00
Shea Levy a6d52fcd95 Merge branch 'lexer' of git://github.com/fkz/nix 2016-01-17 10:08:03 -05:00
Fabian Schmitthenner 8d22b26448 don't abort when given unmatched '}' with 'start-condition stack underflow'. This fixes #751 2016-01-12 20:40:41 +00:00
Eelco Dolstra 786046cf13 --option build-repeat: Keep the differing output if -K is given
Similar to 00903fa799. Regardless of -K,
we now also print which output differs.
2016-01-12 18:26:24 +01:00
Eelco Dolstra 8906eda2f9 Canonicalize gids to 0
Previously files in the Nix store were owned by root or by nixbld,
depending on whether they were created by a substituter or by a
builder. This doesn't matter much, but causes spurious diffoscope
differences. So use root everywhere.
2016-01-12 17:27:40 +01:00
Eelco Dolstra 00903fa799 --check: Keep the differing output if -K is given
This makes it easier to investigate the non-determinism, e.g.

  $ nix-build pkgs/stdenv/linux -A stage1.pkgs.zlib --check -K
  error: derivation ‘/nix/store/l54i8wlw22656i4pk05c52ngv9rpl39q-zlib-1.2.8.drv’ may not be deterministic: output ‘/nix/store/11a27shh6n2ivi4a7s964i65ql80cf27-zlib-1.2.8’ differs from ‘/nix/store/11a27shh6n2ivi4a7s964i65ql80cf27-zlib-1.2.8-check’

  $ diffoscope /nix/store/11a27shh6n2ivi4a7s964i65ql80cf27-zlib-1.2.8 /nix/store/11a27shh6n2ivi4a7s964i65ql80cf27-zlib-1.2.8-check
  ...
  ├── lib/libz.a
  │   ├── metadata
  │   │ @@ -1,15 +1,15 @@
  │   │ -rw-r--r-- 30001/30000   3096 Jan 12 15:20 2016 adler32.o
  ...
  │   │ +rw-r--r-- 30001/30000   3096 Jan 12 15:28 2016 adler32.o
  ...
2016-01-12 16:44:26 +01:00
Eelco Dolstra 0cad1f8049 --check: Fix "failed to produce output path"
This occured when sandbox building is disabled, at least one output
exists, and at least one other output does not.
2016-01-12 15:13:47 +01:00
Eelco Dolstra 1c57ab8b31 --check: Fix assertion failure when some outputs are missing
E.g.

  $ nix-build pkgs/stdenv/linux/ -A stage1.pkgs.perl --check
  nix-store: src/libstore/build.cc:1323: void nix::DerivationGoal::tryToBuild(): Assertion `buildMode != bmCheck || validPaths.size() == drv->outputs.size()' failed.

when perl.out exists but perl.man doesn't. The fix is to only check
the outputs that exist. Note that "nix-build -A stage1.pkgs.all
--check" will still give a (proper) error in this case.
2016-01-12 14:54:39 +01:00
Eelco Dolstra ef7c2d8b3e Revert "Do not override environment CFLAGS and CXXFLAGS"
This reverts commit 80ebd60e7c. The
reason why we cleared CFLAGS/CXXFLAGS was because otherwise we get a
default value of -O2, which interferes with the defaults set in the
Makefile. (E.g. "make OPTIMIZE=0" should not pass -O2.)
2016-01-12 13:51:38 +01:00
Eelco Dolstra 4202b17666 Temporarily do Darwin builds from a different Nixpkgs branch 2016-01-08 10:48:48 +01:00
Eelco Dolstra 10a6aa3ad4 Revert accidental disable of doInstallCheck 2016-01-07 16:05:02 +01:00
Eelco Dolstra 458711e4ee Fix "Bad address" executing build hook
This was observed in the deb_debian7x86_64 build:
http://hydra.nixos.org/build/29973215

Calling c_str() on a temporary should be fine because the temporary
shouldn't be destroyed until after the execl() call, but who knows...
2016-01-07 15:10:14 +01:00