about summary refs log tree commit diff
path: root/src
AgeCommit message (Collapse)AuthorFilesLines
2014-04-04 Show position info in attribute selection errorsEelco Dolstra3-13/+14
2014-04-04 Show position info in Boolean operationsEelco Dolstra5-31/+28
2014-04-04 Show position info in string concatenation / addition errorsEelco Dolstra7-45/+63
2014-04-04 forceString: Show position infoEelco Dolstra6-30/+46
2014-04-04 forceAttrs: Show position infoEelco Dolstra5-14/+23
2014-04-04 forceList: Show position infoEelco Dolstra5-24/+35
2014-04-04 forceInt: Show position infoEelco Dolstra3-11/+11
2014-04-04 Pass position information to primop callsEelco Dolstra4-104/+104
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 Remove unnecessary quotes around file namesEelco Dolstra1-1/+1
2014-04-04 Include position info in function applicationEelco Dolstra7-22/+45
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-03 Fix compile errors on IllumosDanny Wilson3-0/+9
2014-04-03 Tweak error messageEelco Dolstra1-1/+1
2014-04-03 Make sure /dev/pts/ptmx is world-writableLudovic Courtès1-0/+4
While running Python 3’s test suite, we noticed that on some systems /dev/pts/ptmx is created with permissions 0 (that’s the case with my Nixpkgs-originating 3.0.43 kernel, but someone with a Debian-originating 3.10-3 reported not having this problem.) There’s still the problem that people without CONFIG_DEVPTS_MULTIPLE_INSTANCES=y are screwed (as noted in build.cc), but I don’t see how we could work around it.
2014-04-01 Fix potential segfaultEelco Dolstra1-2/+3
The newEnv variable was accessed (via the dynamicEnv) pointer after it had gone out of scope. Fixes #234.
2014-03-30 nix-env: Add support for --delete-generations 15dRicardo M. Correia1-2/+17
It will delete all generations older than the specified number of days.
2014-03-30 boost::shared_ptr -> std::shared_ptrEelco Dolstra12-1467/+36
2014-03-29 Drop pointless #includeEelco Dolstra1-2/+0
2014-03-29 Fix potential segfault in waitForInput()Eelco Dolstra1-3/+5
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 restoreSIGPIPE(): Fill in sa_maskEelco Dolstra2-1/+2
Issue #231.
2014-03-28 Don't interpret strings as format stringsEelco Dolstra3-23/+32
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-21 Make /dev/kvm optionalLudovic Courtès1-1/+4
The daemon now creates /dev deterministically (thanks!). However, it expects /dev/kvm to be present. The patch below restricts that requirement (1) to Linux-based systems, and (2) to systems where /dev/kvm already exists. I’m not sure about the way to handle (2). We could special-case /dev/kvm and create it (instead of bind-mounting it) in the chroot, so it’s always available; however, it wouldn’t help much since most likely, if /dev/kvm missing, then KVM support is missing.
2014-03-18 Fix tabsEelco Dolstra1-6/+6
2014-03-18 Allow recovery from isValidPath RPCs with an invalid pathLudovic Courtès1-1/+7
Currently, clients cannot recover from an isValidPath RPC with an invalid path parameter because the daemon closes the connection when that happens. More precisely: 1. in performOp, wopIsValidPath case, ‘readStorePath’ raises an ‘Error’ exception; 2. that exception is caught by the handler in ‘processConnection’; 3. the handler determines errorAllowed == false, and thus exits after sending the message. This last part is fixed by calling ‘startWork’ early on, as in the patch below. The same reasoning could be applied to all the RPCs that take one or more store paths as inputs, but isValidPath is, by definition, likely to be passed invalid paths in the first place, so it’s important for this one to allow recovery.
2014-03-17 Fix -j and other flags when using the daemonEelco Dolstra1-6/+6
2014-03-12 Remove unnecessary null pointer checksEelco Dolstra1-2/+2
Fixes #225.
2014-03-11 Fix passing meta attribute to buildenv.nixEelco Dolstra1-0/+1
Since the meta attributes were not sorted, attribute lookup could fail, leading to package priorities and active flags not working correctly. Broken since 0f24400d90daf65cf20142a662f8245008437e2c.
2014-03-10 The expr of AttrNames/DynamicAttrDefs is always an ExprConcatStringsShea Levy3-12/+10
2014-03-10 If a dynamic attribute name evaluates to null, remove it from the setShea Levy1-1/+9
2014-03-05 Revert "Make ifs and asserts tail-recursive"Eelco Dolstra2-11/+4
This reverts commit 273322c7732093a354e86df82cf75d6604b8bce8.
2014-02-27 Set up a private /dev/pts in the chrootEelco Dolstra2-2/+14
2014-02-27 Set up a minimal /dev in chrootsEelco Dolstra8-17/+40
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 Correctly detect infinite recursion in function applicationEelco Dolstra1-2/+4
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 c897bac54954373f63511702731fe2cb23c0c98e. Fixes #217.
2014-02-27 Fix deadlock in SubstitutionGoalEelco Dolstra1-0/+1
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-26 And another oneEelco Dolstra2-41/+2
2014-02-26 Remove another unused functionEelco Dolstra2-22/+0
2014-02-26 Remove unused functionEelco Dolstra2-32/+0
2014-02-26 nix-store -r: Respect --add-root for non-derivationsEelco Dolstra1-1/+9
Fixes #68. Fixes #117.
2014-02-26 Warn about missing -I pathsEelco Dolstra3-5/+6
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 Simplify getting use-ssh-substituter from untrusted usersEelco Dolstra2-14/+3
2014-02-26 Only start download-via-ssh if it's enabledEelco Dolstra1-12/+14
2014-02-26 Add use-ssh-substituter setting.Shea Levy3-0/+17
It defaults to false and can be overridden by RemoteStore. Untested currently, just quickly put this together
2014-02-19 nix-instantiate: Allow --dry-run as a synonym for --readonly-modeEelco Dolstra1-0/+2
--dry-run is more consistent with nix-env and nix-store.
2014-02-19 nix-instantiate: Rename --eval-only to --eval, --parse-only to --parseEelco Dolstra1-2/+2
2014-02-19 nix-instantiate: Add a flag --expr / -E to read expressions from the command ↵Eelco Dolstra1-2/+7
line This is basically a shortcut for ‘echo 'expr...' | nix-instantiate -’. Also supported by nix-build and nix-shell.
2014-02-18 lexer-tab.o and parser-tab.o require each other's headersShea Levy1-0/+4
2014-02-18 Slight simplificationEelco Dolstra1-17/+10
2014-02-18 Add a flag ‘--check’ to verify build determinismEelco Dolstra8-55/+93
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 Make --repair work on DarwinEelco Dolstra1-3/+3
Mac OS X doesn't allow renaming a read-only directory. http://hydra.nixos.org/build/9113895
2014-02-17 RefactoringEelco Dolstra1-29/+36
2014-02-17 When using a build hook, only copy missing pathsEelco Dolstra1-9/+6