- Oct 26, 2004
-
-
Eelco Dolstra authored
-
Eelco Dolstra authored
Instead we generate data bindings (build and match functions) for the constructors specified in `constructors.def'. In particular this removes the conversions between AFuns and strings, and Nix expression evaluation now seems 3 to 4 times faster.
-
Eelco Dolstra authored
-
Eelco Dolstra authored
-
Eelco Dolstra authored
-
- Oct 25, 2004
-
-
Eelco Dolstra authored
The expression `with E1; E2' evaluates to E2 with all bindings in the attribute set E1 substituted. E.g., with {x = 123;}; x evaluates to 123. That is, the attribute set E1 is in scope in E2. This is particularly useful when importing files containing lots definitions. E.g., instead of let { inherit (import ./foo.nix) a b c d e f; body = ... a ... f ...; } we can now say with import ./foo.nix; ... a ... f ... I.e., we don't have to say what variables should be brought into scope.
-
Eelco Dolstra authored
permission to the Nix store or database. E.g., `nix-env -qa' will work, but `nix-env -qas' won't (the latter needs DB access). The option `--readonly-mode' forces this mode; otherwise, it's only activated when the database cannot be opened.
-
- Sep 09, 2004
-
-
Eelco Dolstra authored
Previously there was the problem that all files read by nix-env etc. should be reachable and readable by the Nix user. So for instance building a Nix expression in your home directory meant that the home directory should have at least g+x or o+x permission so that the Nix user could reach the Nix expression. Now we just switch back to the original user just prior to reading sources and the like. The places where this happens are somewhat arbitrary, however. Any scope that has a live SwitchToOriginalUser object in it is executed as the original user. * Back out r1385. setreuid() sets the saved uid to the new real/effective uid, which prevents us from switching back to the original uid. setresuid() doesn't have this problem (although the manpage has a bug: specifying -1 for the saved uid doesn't leave it unchanged; an explicit value must be specified).
-
- Aug 24, 2004
-
-
Eelco Dolstra authored
* Drop support for the outPath attribute in derivations.
-
- Aug 04, 2004
-
-
Eelco Dolstra authored
-
Eelco Dolstra authored
-
- Apr 05, 2004
-
-
Eelco Dolstra authored
print a nice backtrace of the stack, rather than vomiting a gigantic (and useless) aterm on the screen. Example: error: while evaluating file `.../pkgs/system/test.nix': while evaluating attribute `subversion' at `.../pkgs/system/all-packages-generic.nix', line 533: while evaluating function at `.../pkgs/applications/version-management/subversion/default.nix', line 1: assertion failed at `.../pkgs/applications/version-management/subversion/default.nix', line 13 Since the Nix expression language is lazy, the trace may be misleading. The purpose is to provide a hint as to the location of the problem.
-
- Apr 02, 2004
-
-
Eelco Dolstra authored
binding.
-
- Mar 30, 2004
-
-
Eelco Dolstra authored
instead of `derivation' triggered a huge slowdown in the Nix expression evaluator. Total execution time of `nix-env -qa' went up by a factor of 60 or so. This scalability problem was caused by expressions such as (x: y: ... x ...) a b where `a' is a large term (say, the one in `all-packages-generic.nix'). Then the first beta-reduction would produce (y: ... a ...) b by substituting `a' for `x'. The second beta-reduction would then substitute `b' for `y' into the body `... a ...', which is a large term due to `a', and thus causes a large traversal to be performed by substitute() in the second reduction. This is however entirely redundant, since `a' cannot contain free variables (since we never substitute below a weak head normal form). The solution is to wrap substituted terms into a `Closed' constructor, i.e., subst(subs, Var(x)) = Closed(e) iff subs[x] = e have substitution not descent into closed terms, subst(subs, Closed(x)) = Closed(x) and otherwise ignore them for evaluation, eval(Closed(x)) = eval(x). * Fix a typo that caused incorrect substitutions to be performed in simple lambdas, e.g., `(x: x: x) a' would reduce to `(x: a)'.
-
- Mar 28, 2004
-
-
Eelco Dolstra authored
`attrs ? x' yields true iff `attrs' has an attribute named `x'.
-
Eelco Dolstra authored
{stdenv, bash}: derivation { builder = bash ~ /bin/sh; args = ["-e" "-x" ./builder.sh]; ... } Here the attribute `builder' will evaluate to, e.g., `/nix/store/1234abcd...-bash-2.0.1/bin/sh'.
-
Eelco Dolstra authored
`bla:' is now no longer parsed as a URL. * Re-enabled support for the `args' attribute in derivations to specify command line arguments to the builder, e.g., ... builder = /usr/bin/python; args = ["-c" ./builder.py]; ...
-
- Mar 19, 2004
-
-
Eelco Dolstra authored
-
- Feb 19, 2004
-
-
Eelco Dolstra authored
b then x else y.z'.
-
- Feb 16, 2004
-
-
Eelco Dolstra authored
-
Eelco Dolstra authored
non-inherited attributes.
-
- Feb 04, 2004
-
-
Eelco Dolstra authored
other attribute sets, rather than the current scope. E.g., {inherit (pkgs) gcc binutils;} is equivalent to {gcc = pkgs.gcc; binutils = pkgs.binutils;} I am not so happy about the syntax.
-
Eelco Dolstra authored
{x=1; y=2; z=3;} // {y=4;} => {x=1; y=4; z=3;}
-
Eelco Dolstra authored
* Various performance improvements in the evaluator. * Do not link against unused (and missing!) libraries (-lsglr, etc.).
-
- Feb 03, 2004
-
-
Eelco Dolstra authored
-
- Feb 02, 2004
-
-
Eelco Dolstra authored
`inherit' variables from the surrounding lexical scope. E.g., {stdenv, libfoo}: derivation { builder = ./bla; inherit stdenv libfoo; xyzzy = 1; } is equivalent to {stdenv, libfoo}: derivation { builder = ./bla; stdenv = stdenv; libfoo = libfoo; xyzzy = 1; } Note that for mutually recursive attribute set definitions (`rec {...}'), this also works, that is, `rec {inherit x;}' is equivalent to `let {fresh = x; body = rec {x = fresh;};}', *not* `rec {x = x}'.
-
- Jan 30, 2004
-
-
Eelco Dolstra authored
-
Eelco Dolstra authored
* Include missing files in distributions.
-
Eelco Dolstra authored
-
Eelco Dolstra authored
parser (roughly 80x faster). The absolutely latest version of Bison (1.875c) is required for reentrant GLR support, as well as a recent version of Flex (say, 2.5.31). Note that most Unix distributions ship with the prehistoric Flex 2.5.4, which doesn't support reentrancy.
-
- Jan 29, 2004
-
-
Eelco Dolstra authored
-
- Jan 21, 2004
-
-
Eelco Dolstra authored
ATermMaps. Found thanks to Valgrind!
-
- Jan 15, 2004
-
-
Eelco Dolstra authored
Nix. This is to prevent Berkeley DB from becoming wedged. Unfortunately it is not possible to throw C++ exceptions from a signal handler. In fact, you can't do much of anything except change variables of type `volatile sig_atomic_t'. So we set an interrupt flag in the signal handler and check it at various strategic locations in the code (by calling checkInterrupt()). Since this is unlikely to cover all cases (e.g., (semi-)infinite loops), sometimes SIGTERM may now be required to kill Nix.
-
Eelco Dolstra authored
-
- Jan 05, 2004
-
-
Eelco Dolstra authored
path of the Nix expression to be used with the import, upgrade, and query commands. For instance, $ nix-env -I ~/nixpkgs/pkgs/system/i686-linux.nix $ nix-env --query --available [aka -qa] sylpheed-0.9.7 bison-1.875 pango-1.2.5 subversion-0.35.1 ... $ nix-env -i sylpheed $ nix-env -u subversion There can be only one default at a time. * If the path to a Nix expression is a symlink, follow the symlink prior to resolving relative path references in the expression.
-
- Nov 25, 2003
-
-
Eelco Dolstra authored
-
Eelco Dolstra authored
-
- Nov 22, 2003
-
-
Eelco Dolstra authored
deleting a path in the store. * Allow absolute paths in Nix expressions. * Get nix-prefetch-url to work again. * Various other fixes.
-
- Nov 21, 2003
-
-
Eelco Dolstra authored
-
- Nov 19, 2003
-
-
Eelco Dolstra authored
* Replace all directory reading code by a generic readDirectory() function.
-