Commit graph

7157 commits

Author SHA1 Message Date
Eelco Dolstra 07cec27848 * Cleanups. 2006-09-19 14:27:28 +00:00
Eelco Dolstra 9488ae7357 * `show-duplication.pl', a small utility that shows the amount of
package duplication present in (e.g.) a profile.  It shows the
  number of instances of each package in a closure, along with the
  size in bytes of each instance as well as the "waste" (the
  difference between the sum of the sizes of all instances and the
  average size).

  $ ./show-duplication.pl /nix/var/nix/profiles/default
  gcc 11
    3.3.6 19293318
    3.4.4 21425257
    ...
    average 14942970, waste 149429707
  coreutils 6
  ...
  average package duplication 1.87628865979381, total size 3486330471, total waste 1335324237, 38.3017114443825% wasted

  This utility is useful for measuring the cost in terms of disk space
  of the Nix approach.
2006-09-19 13:53:35 +00:00
Eelco Dolstra e0afaf1857 * Wow, that bug has been there since r764. 2006-09-14 22:48:59 +00:00
Eelco Dolstra 86cbd93ec1 * nix-env --switch-generation / --list-generations /
--delete-generations: lock the profile to prevent (extremely
  unlikely) race conditions.
2006-09-14 22:33:53 +00:00
Eelco Dolstra 5c38c863bd * Fix a huge gaping hole in nix-env w.r.t. the garbage collector.
Nix-env failed to call addPermRoot(), which is necessary to safely
  add a new root.  So if nix-env started after and finished before the
  garbage collector, the user environment (plus all other new stuff)
  it built might be garbage collected, leading to a dangling symlink
  chain in ~/.nix-profile...

* Be more explicit if we block on the GC lock ("waiting for the big
  garbage collector lock...").

* Don't loop trying to create a new generation.  It's not necessary
  anymore since profiles are locked nowadays.
2006-09-14 22:30:33 +00:00
Eelco Dolstra f00bc4c94c * "Too many links" error. 2006-09-12 09:29:28 +00:00
Eelco Dolstra 01d169f817 * Support `++'.
* More follow restrictions on layout.
2006-09-11 13:05:15 +00:00
Eelco Dolstra feb63da431 * Remove debug message. 2006-09-08 09:31:07 +00:00
Eelco Dolstra a04a65d7a5 * Release notes. 2006-09-06 14:29:49 +00:00
Eelco Dolstra 2e210b2387 * Convenience option `nix-collect-garbage -d' (--delete-old): removes
old generations of *all* profiles in /nix/var/nix/profiles, then
  runs the garbage collector.  Quick way to get rid of all old stuff.
  Of course, one cannot roll back to earlier points in time after
  this.
2006-09-06 14:23:04 +00:00
Eelco Dolstra 89ac8db74f * Package the include directory. 2006-09-05 11:34:50 +00:00
Eelco Dolstra a89a201598 * Missing #include. 2006-09-05 10:32:47 +00:00
Eelco Dolstra fc195519b5 * Sone missing #includes. 2006-09-05 08:54:48 +00:00
Eelco Dolstra bafc1690fc * Move setuid stuff to libutil.
* Install libexpr header files.
2006-09-04 22:55:28 +00:00
Eelco Dolstra e5a6c09b12 * Install header files in /nix/include/nix. 2006-09-04 22:41:36 +00:00
Eelco Dolstra 4be5443882 * Remove unnecessary inclusions of aterm2.h. 2006-09-04 22:08:40 +00:00
Eelco Dolstra 2382a729e0 * Don't need extern "C". 2006-09-04 21:50:39 +00:00
Eelco Dolstra e3ce954582 * Compile the lexer as C++ code. Remove all the redundant C/C++
marshalling code.
2006-09-04 21:36:15 +00:00
Eelco Dolstra 75068e7d75 * Use a proper namespace.
* Optimise header file usage a bit.
* Compile the parser as C++.
2006-09-04 21:06:23 +00:00
Eelco Dolstra aab8812732 * Store the Nix libraries in ${libdir}/nix instead of ${libdir}. 2006-09-04 15:12:24 +00:00
Eelco Dolstra 7974aae81c * New primop: builtins.toFile, which writes a string into the store
and returns its path.  This can be used to (for instance) write
  builders inside a Nix expression, e.g.,

  stdenv.mkDerivation {
    builder = "
      source $stdenv/setup
      ...
    ";
    ...
  }
2006-09-01 12:07:31 +00:00
Eelco Dolstra de90fdf908 * Allow "$" in strings as long as they are not followed by "{". (Too
bad flex doesn't have lexical restrictions, the current solution
  isn't quite right...)
2006-09-01 12:04:06 +00:00
Eelco Dolstra c9586b6c3f * Fix race condition in the test. 2006-09-01 12:02:39 +00:00
Eelco Dolstra c25f688e23 * Doh! Doh! Doh! 2006-08-31 15:38:43 +00:00
Eelco Dolstra 354d58b3d7 * Better error checking. 2006-08-31 11:40:39 +00:00
Eelco Dolstra f93f7b75be * Okay, that's a bit harder than expected. 2006-08-30 13:10:04 +00:00
Eelco Dolstra dce1afdc67 * TDD: == should do a deep equality test, i.e., it should strictly
evaluate its arguments.
2006-08-30 12:25:27 +00:00
Eelco Dolstra 3151bdea55 * Uninitialised variable. 2006-08-30 12:00:27 +00:00
Eelco Dolstra 547b119f25 * Support singleton values and nested lists again in `args', but print
a warning.
2006-08-29 15:40:49 +00:00
Eelco Dolstra 2132d9ddeb * Fix the ~ operator. 2006-08-29 15:29:38 +00:00
Eelco Dolstra 1f6616dabf * Backwards compatibility test for ~. 2006-08-29 15:29:19 +00:00
Eelco Dolstra 1ec9f55741 * In toString, deal with nested lists properly (i.e., flatten them). 2006-08-28 21:47:42 +00:00
Eelco Dolstra 1fca76870b * Removed processBinding, instead we now apply toString to all
derivation attributes to flatten them into strings.  This is
  possible since string can nowadays be wrapped in contexts that
  describe the derivations/sources referenced by the evaluation of the
  string.
2006-08-28 13:31:06 +00:00
Eelco Dolstra 8a6080eb14 * Refactoring. 2006-08-26 16:48:01 +00:00
Eelco Dolstra 4b66cebe7b * Remove those storePath attribute sets, we don't need 'em. 2006-08-25 17:09:55 +00:00
Eelco Dolstra e5678b3435 * Map "ppc" to "powerpc" so that Linux on PowerPC will be reported as
"powerpc-linux".
2006-08-25 16:23:42 +00:00
Eelco Dolstra e64c4f5742 * Doh! (NIX-58) 2006-08-25 13:36:17 +00:00
Eelco Dolstra bf738f0070 * Honour DESTDIR so that bzip2/bunzip2 get installed in the right
location when building RPMs (fixes NIX-58).
2006-08-25 12:14:57 +00:00
Eelco Dolstra 3e8dccf6ab * Escape newlines in XML attributes to prevent them from being
normalised away.
2006-08-24 15:02:39 +00:00
Eelco Dolstra 215ec2ddc6 * New primop __toXML (or builtins.toXML) to convert an expression to
an XML representation stored in a string.  This should be useful to
  pass structured information to builders.
2006-08-24 14:34:29 +00:00
Eelco Dolstra f793caf936 * Refactoring. 2006-08-24 14:16:55 +00:00
Eelco Dolstra da25d80152 * Strict evaluation and XML printing of lists. 2006-08-24 14:03:39 +00:00
Eelco Dolstra 943ab38a0d * Refactoring: move strictEval to libexpr. 2006-08-24 13:39:22 +00:00
Eelco Dolstra f41297fdce * Allow --arg in nix-env as well, example:
$ nix-env -qa --system-filter \* --arg system '"powerpc-darwin"'

  to override the system from the default value (__currentSystem in
  all-packages.nix).
2006-08-23 16:33:21 +00:00
Eelco Dolstra 9638f3f393 * Pass the autoArgs to findAlongAttrPath so that "nix-instantiate
foo.nix -A attr --arg name value" will work if (name, value) is
  needed in the evaluation leading up to "attr".
2006-08-23 16:20:14 +00:00
Eelco Dolstra b19cebc513 * Quotes. 2006-08-23 15:46:27 +00:00
Eelco Dolstra 38f18aa6d4 * New primop: abort "error message". 2006-08-23 15:46:00 +00:00
Eelco Dolstra 4a053bfdfd * A new primop `builtins', which returns an attribute set containing
all the primops.  This allows Nix expressions to test for new
  primops and take appropriate action if they're not available.  For
  instance, rather than calling a primop `foo' directly, they could
  say `if builtins ? foo then builtins.foo ... else ...'.
2006-08-23 14:39:11 +00:00
Eelco Dolstra 68515b5a96 * Release notes. 2006-08-22 13:19:06 +00:00
Eelco Dolstra 561a07f51d * Revert unintentional commit. 2006-08-22 13:18:51 +00:00