aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2013-10-08printStats(): Print the size of the symbol table in bytesEelco Dolstra
2013-10-08Deduplicate filenames in PosEelco Dolstra
This saves ~4 MiB of RAM for NixOS system instantiation, and ~18 MiB for "nix-env -qa".
2013-10-08Treat undefined variable errors consistentlyEelco Dolstra
Previously, a undefined variable inside a "with" caused an EvalError (which can be caught), while outside, it caused a ParseError (which cannot be caught). Now both cause an UndefinedVarError (which cannot be caught).
2013-10-08Show the exact position of undefined variablesEelco Dolstra
In particular, undefined variable errors in a "with" previously didn't show *any* position information, so this should help a lot in those cases.
2013-10-08Remove some unused functionsEelco Dolstra
2013-10-08Merge VarRef into ExprVarEelco Dolstra
2013-10-07Don't show calls to primops in stack tracesEelco Dolstra
Since they don't have location information, they just give you crap like: while evaluating the builtin function `getAttr': while evaluating the builtin function `derivationStrict': ...
2013-10-02Fix segfault in nix-repl / hydra-eval-jobsEelco Dolstra
If a "with" attribute set fails to evaluate, we have to make sure its Env record remains unchanged. Otherwise, repeated evaluation gives a segfault: nix-repl> :a with 0; { a = x; b = x; } Added 2 variables. nix-repl> a error: value is an integer while an attribute set was expected nix-repl> b Segmentation fault
2013-10-02Report OOM errors betterEelco Dolstra
2013-10-02Fix typoEelco Dolstra
2013-09-18build-remote.pl: Don't use substituters on the remoteEelco Dolstra
It's kinda pointless to check substituters on the remote side, since we just checked them locally.
2013-09-17RestoreSink: Slightly reduce the number of concurrent FDsEelco Dolstra
2013-09-10Version was called 1.6, not 1.6.0Eelco Dolstra
2013-09-10Bump version numberEelco Dolstra
2013-09-10Update release notesEelco Dolstra
2013-09-06Remove stray debug lineEelco Dolstra
2013-09-06Don't apply the CPU affinity hack to nix-shell (and other Perl programs)Eelco Dolstra
As discovered by Todd Veldhuizen, the shell started by nix-shell has its affinity set to a single CPU. This is because nix-shell connects to the Nix daemon, which causes the affinity hack to be applied. So we turn this off for Perl programs.
2013-09-06typoDomen Kožar
2013-09-06nix-shell: Support a .drv as argumentEelco Dolstra
Fixes #161.
2013-09-03nix-env -i: Add a flag ‘--remove-all’ / ‘-r’Eelco Dolstra
This is equivalent to running ‘nix-env -e '*'’ first, except that it happens in a single transaction. Thus, ‘nix-env -i pkgs...’ replaces the profile with the specified set of packages. The main motivation is to support declarative package management (similar to environment.systemPackages in NixOS). That is, if you have a specification ‘profile.nix’ like this: with import <nixpkgs> {}; [ thunderbird geeqie ... ] then after any change to ‘profile.nix’, you can run: $ nix-env -f profile.nix -ir to update the profile to match the specification. (Without the ‘-r’ flag, if you remove a package from ‘profile.nix’, it won't be removed from the actual profile.) Suggested by @zefhemel.
2013-09-03nix-env: Use wildcard match by defaultEelco Dolstra
That is, you don't need to pass '*' anymore, so nix-env -qa is equivalent to nix-env -qa '*'
2013-09-03nix-env: Load files in ~/.nix-defexpr on demandEelco Dolstra
So if you do "nix-env -qa -A nixos", then other channels won't be parsed/evaluated at all.
2013-09-03Check for name collisions in the input Nix expressionsEelco Dolstra
2013-09-03Work on Values instead of ExprsEelco Dolstra
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-03ReformatEelco Dolstra
2013-09-03Get rid of the parse tree cacheEelco Dolstra
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-02Add some support code for nix-replEelco Dolstra
2013-09-02Get rid of a signedness warningEelco Dolstra
2013-09-02Fix whitespaceEelco Dolstra
2013-09-02Lower xz compression levelEelco Dolstra
Fixes #84.
2013-09-02Manual: Make '' a bit clearerEelco Dolstra
Issue #162.
2013-09-02Fix manual errorEelco Dolstra
Reported by Matija Šuklje. Fixes #163.
2013-09-02Update the release notesEelco Dolstra
2013-09-02Adda test for build-max-log-sizeEelco Dolstra
2013-09-02Only show trace messages when tracing is enabledEelco Dolstra
2013-09-02Add an option to limit the log output of buildersEelco Dolstra
This is mostly useful for Hydra to deal with builders that get stuck in an infinite loop writing data to stdout/stderr.
2013-08-26Simplify inherited attribute handlingShea Levy
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-26Fix nix-shell commandIvan Kozik
2013-08-26Fix typos, especially those that end up in the Nix manualIvan Kozik
2013-08-26Fix personality switching from x86_64 to i686Gergely Risko
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-23Manual: Don't use actual hashes of Nix dependenciesEelco Dolstra
These cause an unnecessary runtime dependency :-)
2013-08-21Fix corrupt PNGEelco Dolstra
Libpng used to accept this, but no longer does.
2013-08-21Hack to clean up tests/test-tmpEelco Dolstra
2013-08-19Store Nix integers as longsEelco Dolstra
So on 64-bit systems, integers are now 64-bit. Fixes #158.
2013-08-19Turn on -WallEelco Dolstra
2013-08-14TypoEelco Dolstra
2013-08-14corepkgs/nar.nix: Prefer local buildsShea Levy
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-07Respect MINSIGSTKSZ when allocating an alternative stackEelco Dolstra
http://hydra.nixos.org/build/5663577
2013-08-07Fix build on non-LinuxEelco Dolstra
http://hydra.nixos.org/build/5662914
2013-08-07Run the daemon worker on the same CPU as the clientEelco Dolstra
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