Commit graph

506 commits

Author SHA1 Message Date
Eelco Dolstra efa5fa1a91 * A switch `-j NUMBER' to set the maximum number of parallel jobs (0 =
no limit).
* Add missing file to distribution.
2004-05-12 14:20:32 +00:00
Eelco Dolstra 1f48aa0be7 * Broken test. 2004-05-12 13:49:10 +00:00
Eelco Dolstra aa5a5084e4 * Pass to the build hook all sorts of information useful for
distributing a build action to another machine.  In particular, the
  paths in the input closures, the output paths, and successor mapping
  for sub-derivations.
2004-05-12 13:32:26 +00:00
Eelco Dolstra 8c0b42f857 * An quick and dirty hack to support distributed builds. 2004-05-12 09:35:51 +00:00
Eelco Dolstra c8d3882cdc * True parallel builds. Nix can now run as many build jobs in
parallel as possible (similar to GNU Make's `-j' switch).  This is
  useful on SMP systems, but it is especially useful for doing builds
  on multiple machines.  The idea is that a large derivation is
  initiated on one master machine, which then distributes
  sub-derivations to any number of slave machines.  This should not
  happen synchronously or in lock-step, so the master must be capable
  of dealing with multiple parallel build jobs.  We now have the
  infrastructure to support this.

  TODO: substitutes are currently broken.
2004-05-11 18:05:44 +00:00
Eelco Dolstra aea436503e * Ignore interrupt signals while handling an exception.
* Ignore EINTR in reads and writes.
2004-05-11 13:48:25 +00:00
Eelco Dolstra a9858c9f26 * A test to verify that Nix executes build jobs in parallel, if
possible.

  This test fails right now because this hasn't been implemented right
  now.  Yes, I'm doing Test-Driven Development! ;-)
2004-05-04 17:04:17 +00:00
Eelco Dolstra f044ccf702 * 1000th revision!
* A test to verify that locking of output paths (caused by concurrent
  invocations of Nix) works correctly.
2004-05-04 13:56:30 +00:00
Eelco Dolstra a7bbe73971 * Another test. 2004-05-04 13:22:33 +00:00
Eelco Dolstra ef093aac8f * Grrr. TESTS are not included in EXTRA_DIST. 2004-05-04 12:45:04 +00:00
Eelco Dolstra 256eeab711 * Allow the location of the store etc. to be specified using
environment variables.
* Started adding some automatic tests.
* Do a `make check' when building RPMs.
2004-05-04 12:15:30 +00:00
Eelco Dolstra fd927c5d25 * Bump the version number. 2004-04-26 13:44:26 +00:00
Eelco Dolstra 22371cbd3f * Fixed URL. 2004-04-26 09:54:37 +00:00
Eelco Dolstra bcce9c1ff5 * Only add `-preRELEASE' to the version if STABLE != 1.
* Documented release procedures.
2004-04-26 09:52:06 +00:00
Eelco Dolstra d4779abc04 * Pass SYSTEM through config.h, and allow spaces. 2004-04-23 15:16:08 +00:00
Eelco Dolstra 759c953196 * Look for GC roots in @localstatedir@/nix/gcroots. 2004-04-22 14:17:57 +00:00
Eelco Dolstra d7238bc84e * Don't create $(localstatedir)/nix/profiles if --disable-init-state
is specified.
2004-04-22 07:47:41 +00:00
Eelco Dolstra b6df68c942 * Dist error. 2004-04-21 14:57:46 +00:00
Eelco Dolstra 21655a70f5 * Channels. These allow you to stay current with an evolving set of
Nix expressions.

  To subscribe to a channel (needs to be done only once):

    nix-channel --add \
      http://catamaran.labs.cs.uu.nl/dist/nix/channels/nixpkgs-unstable

  This just adds the given URL to ~/.nix-channels (which can also be
  edited manually).

  To update from all channels:

    nix-channel --update

  This fetches the latest expressions and pulls cache manifests.  The
  default Nix expression (~/.nix-defexpr) is made to point to the
  conjunction of the expressions downloaded from all channels.

  So to update all installed derivations in the current user
  environment:

    nix-channel --update
    nix-env --upgrade '*'

  If you are really courageous, you can put this in a cronjob or
  something.

  You can subscribe to multiple channels.  It is not entirely clear
  what happens when there are name clashes between derivations from
  different channels.  From nix-env/main.cc it appears that the one
  with the lowest (highest?) hash will be used, which is pretty
  meaningless.
2004-04-21 14:54:05 +00:00
Eelco Dolstra f79e9c2d22 * Do initialise state (the DB etc.) when doing a `make install',
unless `--disable-init-state' is passed to configure.
2004-04-21 10:54:46 +00:00
Eelco Dolstra 8e459d919d * Recurse into attribute sets and lists when getting derivations from
an expression.
2004-04-21 09:37:37 +00:00
Eelco Dolstra 7cce0c34e1 * Allow extra parameters to be passed to Curl through the `CURL_FLAGS'
environment variable.  This is useful for passing authentication
  information (it won't show up in `ps').  Hacky - nix-push should
  abstract over the use of Curl.
2004-04-15 15:14:16 +00:00
Eelco Dolstra 2c5a8bf49f * Use @storedir@, not @prefix@/store. 2004-04-14 10:45:11 +00:00
Eelco Dolstra b275f2ed3b * `*.gcroot' files can now containing multiple roots. 2004-04-14 08:09:27 +00:00
Eelco Dolstra a4d2b22c8c * Be stricter in verifying store paths. 2004-04-14 08:08:55 +00:00
Eelco Dolstra 87bf541f23 * Documented the primops. 2004-04-08 15:51:26 +00:00
Eelco Dolstra b0c9baf1b5 * EBNF grammar for the Nix expression language. 2004-04-08 13:31:57 +00:00
Eelco Dolstra 153429520a * Distributed the wrong file. 2004-04-06 15:55:27 +00:00
Eelco Dolstra 2be8ac48bb * Make the creation of user environments much faster and more storage
efficient by creating only a single symlink to entire directory
  trees unless a collission occurs.
2004-04-06 11:42:28 +00:00
Eelco Dolstra bf3863b546 * Fail if prerequisites are missing. 2004-04-06 08:40:19 +00:00
Eelco Dolstra 03f1d1ecb5 * Switched from wget to curl.
* Made the dependencies on bzip2 and the shell explicit.
2004-04-06 08:18:51 +00:00
Eelco Dolstra 59b94ee18a * When something goes wrong in the evaluation of a Nix expression,
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.
2004-04-05 22:27:41 +00:00
Eelco Dolstra a520b1cbc3 * Print a more useful error message in case of an invalid derivation
binding.
2004-04-02 10:49:37 +00:00
Eelco Dolstra c4ac2a164a * The recent change in nixpkgs of calling `stdenv.mkDerivation'
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)'.
2004-03-30 15:05:35 +00:00
Eelco Dolstra df101d6fca * Specify Perl as a dependency for the RPM. 2004-03-29 12:10:15 +00:00
Eelco Dolstra ac4d39f9db * Added an operator `?' to test for attribute existence, e.g.,
`attrs ? x' yields true iff `attrs' has an attribute named `x'.
2004-03-28 21:15:01 +00:00
Eelco Dolstra f958bcdf1f * Added an operator `~' to select paths within a derivation. E.g.,
{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'.
2004-03-28 20:58:28 +00:00
Eelco Dolstra db3e644c1c * Added plain lambdas, e.g., `let { id = x: x; const = x: y: x; }'.
`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];
    ...
2004-03-28 20:34:22 +00:00
Eelco Dolstra f8cd904e05 * Disallow the Nix store or any of its parents from being symlinks.
This is because the contents of these symlinks are not incorporated
  into the hashes of derivations, and could therefore cause a mismatch
  between the build system and the target system.  E.g., if
  `/nix/store' is a symlink to `/data/nix/store', then a builder could
  expand this path and store the result.  If on the target system
  `/nix/store' is not a symlink, or is a symlink that points somewhere
  else, we have a dangling pointer.

  The trigger for this change is that gcc 3.3.3 does exactly that (it
  applies realpath() to some files, such as libraries, which causes
  our impurity checker to bail out.)

  An annoying side-effect of this change is that it makes it harder to
  move the Nix store to a different file system.  On Linux, bind
  mounts can be used instead of symlink for this purpose (e.g., `mount
  -o bind /data/nix/store /nix/store').
2004-03-27 17:58:04 +00:00
Eelco Dolstra f0f7a9f299 * Do not close a nesting level twice after close() has been
called explicitly on a Nest object.
2004-03-27 15:33:19 +00:00
Eelco Dolstra 7823db2137 * Some more nesting. 2004-03-22 21:42:28 +00:00
Eelco Dolstra 777e13b94b * Nix now has three different formats for the log information it
writes to stderr:
  
  - `pretty': the old nested style (default)
  - `escapes': uses escape codes to indicate nesting and message
    level; can be processed using `log2xml'
  - `flat': just plain text, no nesting

  These can be set using `--log-type TYPE' or the NIX_LOG_TYPE
  environment variable.
2004-03-22 20:53:49 +00:00
Eelco Dolstra 79bb0008ec * `null' is a normal form. 2004-03-19 14:45:45 +00:00
Eelco Dolstra e6253b58cd * Escape codes to force line breaks to be ignored. 2004-03-18 21:32:15 +00:00
Eelco Dolstra 3f3c4cce5a * Added an extra escape code to signal "unimportant" messages. If a tree only has
unimportant messages, it is collapsed by the default.
* Also added an optional integer argument to the escape code for opening a nesting 
  level to indicate lack of importance.  If set, the tree is collapsed by default.
2004-03-18 21:04:14 +00:00
Eelco Dolstra 84c617966b * Collapsable trees. 2004-03-18 18:26:22 +00:00
Eelco Dolstra c2fc2c13c9 * Use unordered lists, which is more sensible semantically for
representing tree structures.
2004-03-18 14:58:16 +00:00
Eelco Dolstra a784fd5792 * Don't use tables. Konqueror likes this much better. 2004-03-18 13:04:05 +00:00
Eelco Dolstra 8ce3dd4887 * Display the popup directly over the abbreviation. 2004-03-17 16:55:53 +00:00
Eelco Dolstra 8330c8202a * A simpler way of implementing the store reference popups, thanks to
Martin and CSS guru Martijn Vermaat.
2004-03-17 16:52:48 +00:00