about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorFilesLines
2013-09-03 Check for name collisions in the input Nix expressionsEelco Dolstra1-3/+9
2013-09-03 Work on Values instead of ExprsEelco Dolstra4-50/+62
This prevents some duplicate evaluation in nix-env and nix-instantiate. Also, when traversing ~/.nix-defexpr, only read regular files with the extension .nix. Previously it was reading files like .../channels/binary-caches/<name>. The only reason this didn't cause problems is pure luck (namely, <name> shadows an actual Nix expression, the binary-caches files happen to be syntactically valid Nix expressions, and we iterate over the directory contents in just the right order).
2013-09-03 ReformatEelco Dolstra1-33/+35
2013-09-03 Get rid of the parse tree cacheEelco Dolstra6-34/+35
Since we already cache files in normal form (fileEvalCache), caching parse trees is redundant. Note that getting rid of this cache doesn't actually save much memory at the moment, because parse trees are currently not freed / GC'ed.
2013-09-02 Add some support code for nix-replEelco Dolstra3-12/+26
2013-09-02 Get rid of a signedness warningEelco Dolstra1-1/+1
2013-09-02 Fix whitespaceEelco Dolstra8-82/+82
2013-09-02 Lower xz compression levelEelco Dolstra1-1/+1
Fixes #84.
2013-09-02 Manual: Make '' a bit clearerEelco Dolstra1-6/+6
Issue #162.
2013-09-02 Fix manual errorEelco Dolstra1-1/+1
Reported by Matija Šuklje. Fixes #163.
2013-09-02 Update the release notesEelco Dolstra1-0/+52
2013-09-02 Adda test for build-max-log-sizeEelco Dolstra2-14/+11
2013-09-02 Only show trace messages when tracing is enabledEelco Dolstra1-4/+3
2013-09-02 Add an option to limit the log output of buildersEelco Dolstra4-0/+34
This is mostly useful for Hydra to deal with builders that get stuck in an infinite loop writing data to stdout/stderr.
2013-08-26 Simplify inherited attribute handlingShea Levy7-38/+46
This reduces the difference between inherited and non-inherited attribute handling to the choice of which env to use (in recs and lets) by setting the AttrDef::e to a new ExprVar in the parser rather than carrying a separate AttrDef::v VarRef member. As an added bonus, this allows inherited attributes that inherit from a with to delay forcing evaluation of the with's attributes. Signed-off-by: Shea Levy <shea@shealevy.com>
2013-08-26 Fix nix-shell commandIvan Kozik1-1/+1
2013-08-26 Fix typos, especially those that end up in the Nix manualIvan Kozik18-34/+34
2013-08-26 Fix personality switching from x86_64 to i686Gergely Risko1-1/+6
On Linux, Nix can build i686 packages even on x86_64 systems. It's not enough to recognize this situation by settings.thisSystem, we also have to consult uname(). E.g. we can be running on a i686 Debian with an amd64 kernel. In that situation settings.thisSystem is i686-linux, but we still need to change personality to i686 to make builds consistent.
2013-08-23 Manual: Don't use actual hashes of Nix dependenciesEelco Dolstra1-2/+2
These cause an unnecessary runtime dependency :-)
2013-08-21 Fix corrupt PNGEelco Dolstra1-0/+0
Libpng used to accept this, but no longer does.
2013-08-21 Hack to clean up tests/test-tmpEelco Dolstra1-0/+5
2013-08-19 Store Nix integers as longsEelco Dolstra9-23/+25
So on 64-bit systems, integers are now 64-bit. Fixes #158.
2013-08-19 Turn on -WallEelco Dolstra1-2/+2
2013-08-14 TypoEelco Dolstra1-1/+1
2013-08-14 corepkgs/nar.nix: Prefer local buildsShea Levy1-0/+3
nar.nix's builder depends on coreutils and nix itself being in $PATH. Unfortunately, there's no good way to ensure that these packages exist in the same place on the remote machine: The local machine may have nix installed in /usr, and the remote machine in /usr/local, but the generated nar.sh builder will refer to /usr and thus fail on the remote machine. This ensures that nar.sh is run on the same machine that instantiates it. Signed-off-by: Shea Levy <shea@shealevy.com>
2013-08-07 Respect MINSIGSTKSZ when allocating an alternative stackEelco Dolstra1-1/+1
http://hydra.nixos.org/build/5663577
2013-08-07 Fix build on non-LinuxEelco Dolstra1-0/+2
http://hydra.nixos.org/build/5662914
2013-08-07 Run the daemon worker on the same CPU as the clientEelco Dolstra9-4/+92
On a system with multiple CPUs, running Nix operations through the daemon is significantly slower than "direct" mode: $ NIX_REMOTE= nix-instantiate '<nixos>' -A system real 0m0.974s user 0m0.875s sys 0m0.088s $ NIX_REMOTE=daemon nix-instantiate '<nixos>' -A system real 0m2.118s user 0m1.463s sys 0m0.218s The main reason seems to be that the client and the worker get moved to a different CPU after every call to the worker. This patch adds a hack to lock them to the same CPU. With this, the overhead of going through the daemon is very small: $ NIX_REMOTE=daemon nix-instantiate '<nixos>' -A system real 0m1.074s user 0m0.809s sys 0m0.098s
2013-08-06 Set the default GCC optimisation level to -O3Eelco Dolstra1-0/+2
2013-08-06 Remove obsolete reference to ATermsEelco Dolstra1-3/+3
2013-08-02 In the profiler output, show function names (if available)Eelco Dolstra2-8/+8
2013-08-02 Let the ordering operators also work on stringsEelco Dolstra3-4/+12
E.g. ‘"foo" < "bar"’ now works.
2013-08-02 Add comparison operators ‘<’, ‘<=’, ‘>’ and ‘>=’Eelco Dolstra4-1/+31
2013-08-02 Add integer ‘-’, ‘*’ and ‘/’ operatorsEelco Dolstra4-2/+16
2013-08-02 Add a unary integer negation operatorEelco Dolstra3-4/+11
This allows saying "-1" instead of "builtins.sub 0 1".
2013-08-02 Overload the ‘+’ operator to support integer additionEelco Dolstra3-15/+23
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-31 Test the delayed with a bit moreEelco Dolstra3-5/+8
2013-07-31 Make Env smallerEelco Dolstra2-21/+23
Commit 20866a7031ca823055a221653b77986faa167329 added a ‘withAttrs’ field to Env, which is annoying because it makes every Env structure bigger and we allocate millions of them. E.g. NixOS evaluation took 18 MiB more. So this commit squeezes ‘withAttrs’ into values[0]. Probably should use a union...
2013-07-31 Don't use NULLEelco Dolstra1-4/+2
2013-07-31 Avoid thunks when a fromWith var can be looked up without evaluationShea Levy2-8/+8
Signed-off-by: Shea Levy <shea@shealevy.com>
2013-07-31 Delay evaulation of `with` attrs until a variable lookup needs themShea Levy4-7/+40
Evaluation of attribute sets is strict in the attribute names, which means immediate evaluation of `with` attribute sets rules out some potentially interesting use cases (e.g. where the attribute names of one set depend in some way on another but we want to bring those names into scope for some values in the second set). The major example of this is overridable self-referential package sets (e.g. all-packages.nix). With immediate `with` evaluation, the only options for such sets are to either make them non-recursive and explicitly use the name of the overridden set in non-overridden one every time you want to reference another package, or make the set recursive and use the `__overrides` hack. As shown in the test case that comes with this commit, though, delayed `with` evaluation allows a nicer third alternative. Signed-off-by: Shea Levy <shea@shealevy.com>
2013-07-30 Detect stack overflowsEelco Dolstra3-1/+80
Previously, if the Nix evaluator gets a stack overflow due to a deep or infinite recursion in the Nix expression, the user gets an unhelpful message ("Segmentation fault") that doesn't indicate that the problem is in the user's code rather than Nix itself. Now it prints: error: stack overflow (possible infinite recursion) This only works on x86_64-linux and i686-linux. Fixes #35.
2013-07-30 killUser: Don't let the child kill itself on AppleShea Levy1-0/+13
The kill(2) in Apple's libc follows POSIX semantics, which means that kill(-1, SIGKILL) will kill the calling process too. Since nix has no way to distinguish between the process successfully killing everything and the process being killed by a rogue builder in that case, it can't safely conclude that killUser was successful. Luckily, the actual kill syscall takes a parameter that determines whether POSIX semantics are followed, so we can call that syscall directly and avoid the issue on Apple. Signed-off-by: Shea Levy <shea@shealevy.com>
2013-07-23 buildenv: remove special treatment of python filesFlorian Friesdorf1-3/+0
buildPythonPackage does not leave easy_install.pth and site.py anymore. A python package that leaves these files is broken. An exception to this is setuptoolsSite which packages setuptools' site.py. To include it into a buildenv, this patch is even needed, not just cosmetic.
2013-07-19 Add hacking notes plus a script for running nix-shellEelco Dolstra3-0/+54
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 Dolstra7-92/+201
2013-07-19 nix-build --run-env: Add a ‘--pure’ flagEelco Dolstra2-3/+43
This causes the environment to be (almost) cleared, thus giving a shell that more closely resembled the actual Nix derivation.