Eelco Dolstra
6dd1087396
Fix Debian tests
...
These actually run as root in a VM, so they get confused.
http://hydra.nixos.org/build/10775854
2014-05-02 19:02:10 +02:00
Eelco Dolstra
a8c31d5011
Simplify multi-user installation instructions
2014-05-02 14:44:44 +02:00
Eelco Dolstra
696f960dee
Set up directories and permissions for multi-user install automatically
...
This automatically creates /nix/var/nix/profiles/per-user and sets the
permissions/ownership on /nix/store to 1775 and root:nixbld.
2014-05-02 14:31:15 +02:00
Eelco Dolstra
20668b1363
Install an Upstart service
2014-05-02 13:14:10 +02:00
Eelco Dolstra
de4cdd0d47
Set build-max-jobs to the number of available cores by default
...
More zero configuration.
2014-05-02 12:51:43 +02:00
Eelco Dolstra
ada3e3fa15
When running as root, use build users by default
...
This removes the need to have a nix.conf, and prevents people from
accidentally running Nix builds as root.
2014-05-02 12:46:03 +02:00
Eelco Dolstra
31fe55bb8e
trunk -> master
2014-04-25 14:55:13 +02:00
Eelco Dolstra
fb5d76b89e
Fix test evaluation
2014-04-15 15:32:27 +02:00
Eelco Dolstra
a1917208c0
Bump date
2014-04-11 15:11:28 +02:00
Eelco Dolstra
742933116f
Bump version to 1.8
2014-04-11 11:15:24 +02:00
Eelco Dolstra
924e19341a
Don't barf when installing as root
2014-04-10 23:42:48 +02:00
Eelco Dolstra
b0a09a6f32
Add docbook icons to the distribution
...
Grmbl...
2014-04-09 14:52:43 +02:00
Eelco Dolstra
dfa2f77d2e
If a .drv cannot be parsed, show its path
...
Otherwise you just get ‘expected string `Derive(['’ which isn't very helpful.
2014-04-08 19:24:29 +02:00
Eelco Dolstra
e0a947cde6
Simplify quick start section
2014-04-08 16:28:39 +02:00
Eelco Dolstra
d23931f3a4
Remove redundant stuff
2014-04-08 16:10:25 +02:00
Eelco Dolstra
4846005741
Update installation instructions
2014-04-08 16:09:56 +02:00
Eelco Dolstra
2b6c8ef401
nix-shell --pure: Keep the user's $PAGER
2014-04-08 14:08:57 +02:00
Eelco Dolstra
76cbf55a6d
Ensure that systemd units to into lib, not lib64
...
http://hydra.nixos.org/build/10170940
2014-04-08 13:51:34 +02:00
Eelco Dolstra
89f9232813
Update release notes
2014-04-07 12:00:23 +02:00
Eelco Dolstra
84d6936371
Install systemd units
2014-04-07 11:50:55 +02:00
Eelco Dolstra
8e5fbf4d73
Show position info in attribute selection errors
2014-04-04 22:52:14 +02:00
Eelco Dolstra
4c5faad994
Show position info in Boolean operations
2014-04-04 22:43:52 +02:00
Eelco Dolstra
bd9b1d97b4
Show position info in string concatenation / addition errors
2014-04-04 22:19:33 +02:00
Eelco Dolstra
8160f794e7
derivation: Don't require certain function arguments
...
Turns out that in Nixpkgs, derivation is actually called without a
‘name’ argument in some places :-(
2014-04-04 21:53:47 +02:00
Eelco Dolstra
a5fe730940
forceString: Show position info
2014-04-04 21:14:11 +02:00
Eelco Dolstra
27b44b8cf7
forceAttrs: Show position info
2014-04-04 19:11:40 +02:00
Eelco Dolstra
96b695ccab
forceList: Show position info
2014-04-04 19:05:36 +02:00
Eelco Dolstra
b62d36963c
forceInt: Show position info
2014-04-04 18:59:29 +02:00
Eelco Dolstra
c28de6d96e
Pass position information to primop calls
...
For example:
error: `tail' called on an empty list, at
/home/eelco/Dev/nixpkgs/pkgs/applications/misc/hello/ex-2/default.nix:13:7
2014-04-04 18:59:29 +02:00
Eelco Dolstra
8b31ffd10d
Remove unnecessary quotes around file names
2014-04-04 18:59:29 +02:00
Eelco Dolstra
b72c8d2e5b
Include position info in function application
...
This allows error messages like:
error: the anonymous function at `/etc/nixos/configuration.nix:1:1'
called without required argument `foo', at
`/nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs/lib/modules.nix:77:59'
2014-04-04 18:59:29 +02:00
Eelco Dolstra
3f8e1f5682
Update release notes
2014-04-04 14:51:07 +02:00
Eelco Dolstra
1f19fdbd45
Document that we require a C++11 compiler
2014-04-04 13:49:53 +02:00
Eelco Dolstra
daa16cca11
Sync with make-rules repo
2014-04-03 17:37:14 +02:00
Eelco Dolstra
7191a7394a
Support Illumos
...
From https://github.com/NixOS/nix/pull/236
2014-04-03 17:35:16 +02:00
Eelco Dolstra
f0de86357c
Tweak error message
2014-04-03 15:24:02 +02:00
Eelco Dolstra
ac6ceea764
Fix potential segfault
...
The newEnv variable was accessed (via the dynamicEnv) pointer after it
had gone out of scope.
Fixes #234 .
2014-04-01 17:04:38 +02:00
Eelco Dolstra
1c2550a2ae
boost::shared_ptr -> std::shared_ptr
2014-03-30 00:49:23 +01:00
Eelco Dolstra
9becaa041f
Drop pointless #include
2014-03-29 22:20:33 +01:00
Eelco Dolstra
acb8facbbc
Fix potential segfault in waitForInput()
...
Since the addition of build-max-log-size, a call to
handleChildOutput() can result in cancellation of a goal. This
invalidated the "j" iterator in the waitForInput() loop, even though
it was still used afterwards. Likewise for the maxSilentTime
handling.
Probably fixes #231 . At least it gets rid of the valgrind warnings.
2014-03-29 22:14:11 +01:00
Eelco Dolstra
90dc50b07c
restoreSIGPIPE(): Fill in sa_mask
...
Issue #231 .
2014-03-29 20:20:14 +01:00
Eelco Dolstra
49009573bc
Don't interpret strings as format strings
...
Ludo reported this error:
unexpected Nix daemon error: boost::too_few_args: format-string refered to more arguments than were passed
coming from this line:
printMsg(lvlError, run.program + ": " + string(err, 0, p));
The problem here is that the string ends up implicitly converted to a
Boost format() object, so % characters are treated specially. I
always assumed (wrongly) that strings are converted to a format object
that outputs the string as-is.
Since this assumption appears in several places that may be hard to
grep for, I've added some C++ type hackery to ensures that the right
thing happens. So you don't have to worry about % in statements like
printMsg(lvlError, "foo: " + s);
or
throw Error("foo: " + s);
2014-03-28 16:59:26 +01:00
Eelco Dolstra
3fc056927c
Fix tabs
2014-03-18 23:23:55 +01:00
Eelco Dolstra
f93e97517e
Fix -j and other flags when using the daemon
2014-03-17 17:35:11 +01:00
Eelco Dolstra
77e2cc6c8e
nix-build: Fix --cores flag
2014-03-17 17:33:13 +01:00
Eelco Dolstra
fb8d8f5428
Remove unnecessary null pointer checks
...
Fixes #225 .
2014-03-12 14:42:25 +01:00
Eelco Dolstra
006f24c7fa
Document nix-env -q --json
2014-03-12 14:25:48 +01:00
Eelco Dolstra
d435e46daa
Generate release notes again
2014-03-12 14:24:29 +01:00
Eelco Dolstra
e9934bb5ad
Update release notes for 1.7
2014-03-12 13:58:06 +01:00
Eelco Dolstra
25386e5edc
Fix passing meta attribute to buildenv.nix
...
Since the meta attributes were not sorted, attribute lookup could
fail, leading to package priorities and active flags not working
correctly.
Broken since 0f24400d90 .
2014-03-11 17:34:02 +01:00
Eelco Dolstra
92a848f674
Fix typos
2014-03-11 13:16:21 +01:00
Eelco Dolstra
2caab81660
Revert "Make ifs and asserts tail-recursive"
...
This reverts commit 273322c773 .
2014-03-05 16:18:13 +01:00
Eelco Dolstra
f7e077ad27
Install missing Boost headers
...
http://hydra.nixos.org/build/9328376
2014-03-05 11:11:24 +01:00
Eelco Dolstra
d6a45f6bdb
Don't set an absolute soname
2014-03-03 15:29:58 +01:00
Eelco Dolstra
a376762848
Add support for making relocatable packages using $ORIGIN
2014-03-03 15:19:04 +01:00
Eelco Dolstra
3a86888fd7
Typo
2014-02-28 14:01:31 +01:00
Eelco Dolstra
4eac3b2471
Add a variable GLOBAL_CXXFLAGS_PCH for use by precompiled headers
...
You don't want to use GLOBAL_CXXFLAGS for passing flags like
"-include-pch" (clang), because that means you cannot use
GLOBAL_CXXFLAGS when generating the PCH.
2014-02-28 12:13:20 +01:00
Eelco Dolstra
4e7e498ff9
Add variable GLOBAL_COMMON_DEPS
...
This is a list of dependencies on which all C/C++ object files depend.
Primarily useful for global precompiled headers.
2014-02-28 12:01:42 +01:00
Eelco Dolstra
1017bd68ea
Set up a private /dev/pts in the chroot
2014-02-27 23:35:23 +01:00
Eelco Dolstra
3fd01b171a
Set up a minimal /dev in chroots
...
Not bind-mounting the /dev from the host also solves the problem with
/dev/shm being a symlink to something not in the chroot.
2014-02-27 23:17:53 +01:00
Eelco Dolstra
c9f6232304
Correctly detect infinite recursion in function application
...
If we're evaluating some application ‘v = f x’, we can't store ‘f’
temporarily in ‘v’, because if ‘f x’ refers to ‘v’, it will get ‘f’
rather than an infinite recursion error.
Unfortunately, this breaks the tail call optimisation introduced in
c897bac549 .
Fixes #217 .
2014-02-27 21:47:59 +01:00
Eelco Dolstra
29cde917fe
Fix deadlock in SubstitutionGoal
...
We were relying on SubstitutionGoal's destructor releasing the lock,
but if a goal is a top-level goal, the destructor won't run in a
timely manner since its reference count won't drop to zero. So
release it explicitly.
Fixes #178 .
2014-02-27 13:34:13 +01:00
Eelco Dolstra
7c7707638a
Doh
2014-02-26 22:41:29 +01:00
Eelco Dolstra
7880973827
Test trace and addErrorContext
2014-02-26 19:12:31 +01:00
Eelco Dolstra
5ad263c26b
Test some more primops
2014-02-26 19:08:44 +01:00
Eelco Dolstra
3d0a9ec825
Test executables in NARs
2014-02-26 18:59:01 +01:00
Eelco Dolstra
91f25f0510
And another one
2014-02-26 18:55:18 +01:00
Eelco Dolstra
432328cc55
Remove another unused function
2014-02-26 18:49:36 +01:00
Eelco Dolstra
509993e598
Remove unused function
2014-02-26 18:48:32 +01:00
Eelco Dolstra
d58ceae022
Test nix-env --switch-generation
2014-02-26 18:45:26 +01:00
Eelco Dolstra
7bbc68fdff
Test nix-env --set
2014-02-26 18:42:19 +01:00
Eelco Dolstra
a0806389e9
Test the -b and -s flags of nix-store -q
2014-02-26 18:40:08 +01:00
Eelco Dolstra
a9c4a98770
Test ~/.nix-defexpr
2014-02-26 18:33:13 +01:00
Eelco Dolstra
045d3b2ed7
Test nix-store --switch-profile and more daemon actions
2014-02-26 18:28:55 +01:00
Eelco Dolstra
fac6f8aac0
Test nix-store -q --roots
2014-02-26 18:00:46 +01:00
Eelco Dolstra
84143c4bd8
Test nix-store -l
2014-02-26 17:58:53 +01:00
Eelco Dolstra
19437785eb
Test nix-store --optimise
2014-02-26 17:53:51 +01:00
Eelco Dolstra
fdff3a7eae
Add a test for nix-store --dump-db / --load-db
2014-02-26 17:47:54 +01:00
Eelco Dolstra
506d86394d
Installer: Handle Darwin
...
"cp -r" doesn't copy symlinks properly on Darwin, but "cp -R" does.
Fixes #215 .
2014-02-26 17:23:55 +01:00
Eelco Dolstra
6b9cd59a41
nix-store -r: Respect --add-root for non-derivations
...
Fixes #68 .
Fixes #117 .
2014-02-26 16:32:46 +01:00
Eelco Dolstra
7f74513b4e
Also provide an option for setting the curl connection timeout
2014-02-26 16:07:43 +01:00
Eelco Dolstra
00d761016a
Respect $NIX_CONNECT_TIMEOUT properly
...
We were 1) using CURLOPT_TIMEOUT instead of CURLOPT_CONNECTTIMEOUT; 2)
not passing it to the curl child process.
Issue #93 .
2014-02-26 15:58:37 +01:00
Eelco Dolstra
d761009e3c
Add ~/.nix-profile/sbin to $PATH
...
Fixes #112 .
2014-02-26 15:24:48 +01:00
Eelco Dolstra
f14ef84a51
Warn about missing -I paths
...
Fixes #121 . Note that we don't warn about missing $NIX_PATH entries
because it's intended that some may be missing (cf. the default
$NIX_PATH on NixOS, which includes paths like /etc/nixos/nixpkgs for
backward compatibility).
2014-02-26 15:21:56 +01:00
Eelco Dolstra
42eb4afd7a
Simplify getting use-ssh-substituter from untrusted users
2014-02-26 13:58:46 +01:00
Eelco Dolstra
bf4a577a58
Fix broken patch
2014-02-26 13:48:23 +01:00
Eelco Dolstra
dcaea042fc
Only start download-via-ssh if it's enabled
2014-02-26 13:41:03 +01:00
Eelco Dolstra
36b90e72d7
nix-shell: Add --packages flag
...
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 17:08:01 +01:00
Eelco Dolstra
a897b58373
nix-instantiate: Allow --dry-run as a synonym for --readonly-mode
...
--dry-run is more consistent with nix-env and nix-store.
2014-02-19 16:46:33 +01:00
Eelco Dolstra
e1cf40fa95
nix-instantiate: Rename --eval-only to --eval, --parse-only to --parse
2014-02-19 16:34:24 +01:00
Eelco Dolstra
c31836008e
nix-instantiate: Add a flag --expr / -E to read expressions from the command line
...
This is basically a shortcut for ‘echo 'expr...' | nix-instantiate -’.
Also supported by nix-build and nix-shell.
2014-02-19 16:30:19 +01:00
Eelco Dolstra
e707a8a526
Move manpages around
2014-02-19 15:32:19 +01:00
Eelco Dolstra
73f74ebba0
nix-shell: Don't leave a temporary directory in /tmp behind
2014-02-19 15:01:04 +01:00
Eelco Dolstra
7bef965d6f
Make it work on GNU Make > 3.81 again
2014-02-18 13:35:35 +01:00
Eelco Dolstra
79f699edca
More GNU Make 3.81 compatibility
2014-02-18 12:57:32 +01:00
Eelco Dolstra
8129cf33d9
Slight simplification
2014-02-18 10:46:30 +01:00
Eelco Dolstra
1aa19b24b2
Add a flag ‘--check’ to verify build determinism
...
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-18 01:01:14 +01:00
Eelco Dolstra
4ec626a286
Test nix-store --verify-path and --repair-path
2014-02-17 23:24:12 +01:00
Eelco Dolstra
99f14c2584
Don't build on Debian 6.0
...
Its linker is too old to understand --no-copy-dt-needed-entries.
http://hydra.nixos.org/build/9113883
2014-02-17 23:10:40 +01:00
Eelco Dolstra
b6def5b542
Make --repair work on Darwin
...
Mac OS X doesn't allow renaming a read-only directory.
http://hydra.nixos.org/build/9113895
2014-02-17 23:09:48 +01:00