1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2024-09-20 23:28:26 -04:00
Commit graph

68 commits

Author SHA1 Message Date
Eelco Dolstra 4a013962bd * Started using Berkeley DB environments. This is necessary for
transaction support (but we don't actually use transactions yet).
2003-07-31 13:47:13 +00:00
Eelco Dolstra 8846465934 * Get garbage collection and cache population to work *properly*.
Renamed `fstateRefs' to `fstateRequisites'.  The semantics of this
  function is that it returns a list of all paths necessary to realise
  a given expression.  For a derive expression, this is the union of
  requisites of the inputs; for a slice expression, it is the path of
  each element in the slice.  Also included are the paths of the
  expressions themselves.  Optionally, one can also include the
  requisites of successor expressions (to recycle intermediate
  results).

* `nix-switch' now distinguishes between an expression and its normal
  form.  Usually, only the normal form is registered as a root of the
  garbage collector.  With the `--source-root' flag, it will also
  register the original expression as a root.

* `nix-collect-garbage' now has a flag `--keep-successors' which
  causes successors not to be included in the list of garbage paths.

* `nix-collect-garbage' now has a flag `--invert' which will print all
  paths that should *not* be garbage collected.
2003-07-29 14:28:17 +00:00
Eelco Dolstra dc14a3de46 * Nicer dot graphs. 2003-07-29 10:53:27 +00:00
Eelco Dolstra 79ba0431db * `fstateRefs' now works on derive expressions as well. TODO: make
this more efficient.
* A flag `-n' in 'nix --query' to normalise the argument.  Default is
  not to normalise.
2003-07-29 10:43:12 +00:00
Eelco Dolstra 5acb45446e * Let `nix --install' print out the id of the normal form.
* Some minor refactoring.
2003-07-29 09:45:03 +00:00
Eelco Dolstra 949c4fa1a8 * `nix --help'.
* `nix --query --graph' to print a dot dependency graph of derive
  expressions.
2003-07-28 12:19:23 +00:00
Eelco Dolstra 0a0c1fcb4d * The `-v' flag no longer takes an argument; it should be repeated
instead (e.g., `-vvvv' for lots of output).  Default is to only
  print error messages.
2003-07-24 13:43:16 +00:00
Eelco Dolstra 1a7468a57a * Debug levels. Use `--verbose / -v LEVEL' to display only messages
up to the given verbosity levels.  These currently are:

    lvlError = 0, 
    lvlNormal = 5,
    lvlDebug = 10,
    lvlDebugMore = 15

  although only lvlError and lvlDebug are actually used right now.
2003-07-24 08:53:43 +00:00
Eelco Dolstra df648c4967 * nix --query --expansion' (-qe') to get any path with content
corresponding to the given id.
2003-07-22 10:24:22 +00:00
Eelco Dolstra d5ee6f8700 * In `--query --generators', print out paths, not ids.
(There should really be a switch for this).
2003-07-21 21:31:03 +00:00
Eelco Dolstra 49231fbe41 * Changes to the command line syntax of Nix.
* A function to find all Nix expressions whose output ids are
  completely contained in some set.  Useful for uploading relevant Nix
  expressions to a shared cache.
2003-07-21 14:46:01 +00:00
Eelco Dolstra 7984cfc7c1 * Argh, another short-write problem. Added wrappers around
read()/write() to fix this once and for all.
2003-07-20 21:11:43 +00:00
Eelco Dolstra 6f1a0f948d * Refactorings. 2003-07-20 19:29:38 +00:00
Eelco Dolstra b3fc38bf6a * For debugging: `nix --verify' to check the consistency of the
database and store.
2003-07-17 12:27:55 +00:00
Eelco Dolstra 54664b6fb7 * The write() system call can write less than the requested
number of bytes, e.g., in case of a signal like SIGSTOP.  
  This caused `nix --dump' to fail sometimes.

  Note that this bug went unnoticed because the call to `nix 
  --dump' is in a pipeline, and the shell ignores non-zero 
  exit codes from all but the last element in the pipeline.  
  Is there any way to check the result of the initial elements
  in the pipeline?  (In other words, is it at all possible to 
  write reliable shell scripts?)
2003-07-16 21:24:02 +00:00
Eelco Dolstra b9ecadee6e * Fix the -qr query. 2003-07-16 11:05:59 +00:00
Eelco Dolstra c11bbcfd26 * Fix self-referential outputs.
* Fix -qp query.
2003-07-16 08:30:26 +00:00
Eelco Dolstra d41d085b77 * Get Fix and Nix to work again. 2003-07-15 22:28:27 +00:00
Eelco Dolstra c834a5c597 * Fix handling of pipes (read(2) may not return the required
number of bytes in one call).
2003-07-11 08:16:15 +00:00
Eelco Dolstra e5fbf58041 * A command to register successor fstate expressions.
Unifying substitutes and successors isn't very feasible for now,
  since substitutes are only used when no path with a certain is
  known.  Therefore, a normal form of some expression stored as a
  substitute would not be used unless the expression itself was
  missing.
2003-07-10 18:48:11 +00:00
Eelco Dolstra 1d1c3691d2 * The policy-free derivate sharing now *almost* works. :-) For any
hash for which no local expansion is available, Nix can execute a
  `substitute' which should produce a path with such a hash.

  This is policy-free since Nix does not in any way specify how the
  substitute should work, i.e., it's an arbitrary (unnormalised)
  fstate expression.  For example, `nix-pull' registers substitutes
  that fetch Nix archives from the network (through `wget') and unpack
  them, but any other method is possible as well.  This is an
  improvement over the old Nix sharing scheme, which had a policy
  (fetching through `wget') built in.

  The sharing scheme doesn't work completely yet because successors
  from fstate rewriting have to be registered on the receiving side.
  Probably the whole successor stuff can be folded up into the
  substitute mechanism; this would be a nice simplification.
2003-07-10 15:11:48 +00:00
Eelco Dolstra d072485d28 * Get `nix-push' working again. It now uses Nix/Fix to create Nix
archives (using the package in corepkgs/nar).
* queryPathByHash -> expandHash, and it takes an argument specifying
  the target path (which may be empty).
* Install the core Fix packages in $prefix/share/fix.  TODO: bootstrap
  Nix and install Nix as a Fix package.
2003-07-10 13:41:28 +00:00
Eelco Dolstra 2b95a9dc05 * When computing the set of paths referenced by an expression, also
include the paths of the subterms.
2003-07-09 15:02:03 +00:00
Eelco Dolstra 333f4963de * The output of a Derive() node is not a referenced path. 2003-07-08 15:33:06 +00:00
Eelco Dolstra 40274c1f4f * A command to query the paths referenced by an fstate expression.
* Use a temporary directory for build actions.
2003-07-08 13:22:08 +00:00
Eelco Dolstra a279137327 * Get --dump' and --delete' to work again. 2003-07-08 10:00:46 +00:00
Eelco Dolstra be96c2189c * --realise' -> --install'. 2003-07-07 09:29:40 +00:00
Eelco Dolstra 224c585aba * Refactoring on the file names. 2003-07-07 07:43:58 +00:00
Eelco Dolstra f826e432aa * Refactoring: move initialisation and argument parsing into a shared
file.
2003-07-04 15:42:03 +00:00
Eelco Dolstra 207ff2caf0 * Caching of expression successors. 2003-07-04 12:18:06 +00:00
Eelco Dolstra 2b07b0e7eb * Minor cleanups. 2003-06-25 14:58:56 +00:00
Eelco Dolstra 692b562342 * `nix --delete' command. 2003-06-23 14:40:49 +00:00
Eelco Dolstra c0cbaef4be * `nix --restore' command. 2003-06-23 14:08:34 +00:00
Eelco Dolstra 5f5cab0ac7 * A function to restore from a Nix archive.
* addValue() can now import any dumpable FS object.
2003-06-23 13:27:59 +00:00
Eelco Dolstra 85effedca3 * Flags to indicate how values are specified on the command line
(--hash, --file, --name).
2003-06-20 14:11:31 +00:00
Eelco Dolstra 1849aa2a72 * Refactoring: move dump function into archive.cc. 2003-06-20 10:40:25 +00:00
Eelco Dolstra 38e12df631 * `nix --dump' command. 2003-06-18 14:34:43 +00:00
Eelco Dolstra 34fcf5fa0c * Started integrating the new evaluation model into Nix.
* Cleaned up command-line syntax.
2003-06-17 21:12:58 +00:00
Eelco Dolstra 822794001c * Started implementing the new evaluation model.
* Lots of refactorings.
* Unit tests.
2003-06-16 13:33:38 +00:00
Eelco Dolstra b9f09b3268 * AST for Nix expressions. 2003-06-16 07:03:40 +00:00
Eelco Dolstra 21fe717ce2 * Refactoring: hash class. 2003-06-15 13:41:32 +00:00
Eelco Dolstra 5908663f42 * Send log output to stderr. 2003-05-30 17:01:21 +00:00
Eelco Dolstra d1f5fd7216 * Log the output of builders to $prefix/var/log/nix. 2003-05-30 15:21:52 +00:00
Eelco Dolstra 9efad76595 * FreeBSD / ISO C++ compatibility fixes. 2003-05-26 15:09:10 +00:00
Eelco Dolstra d8bdf5b06e * Removed some debug code that prevented packages from building. 2003-05-26 14:19:25 +00:00
Eelco Dolstra 8b930a0c94 * Some refactoring. 2003-05-26 13:45:00 +00:00
Eelco Dolstra f8d91f20e6 * Nix can now fetch prebuilts (and other files) from the network, iff
a mapping from the hash to a url has been registered through `nix
  regurl'.

* Bug fix in nix: don't pollute stdout when running tar, it made
  nix-switch barf.

* Bug fix in nix-push-prebuilts: don't create a subdirectory on the
  target when rsync'ing.
2003-05-26 09:44:18 +00:00
Eelco Dolstra 7dd91d3779 * Prebuilt package sharing. We allow transparent binary deployment by
sharing package directories (i.e., the result of building a Nix
  descriptor).

  `nix-pull-prebuilts' obtains a list of all known prebuilts by
  consulting the paths and URLs specified in
  $prefix/etc/nix/prebuilts.conf.  The mappings ($pkghash,
  $prebuilthash) and ($prebuilthash, $location) are registered with
  Nix so that it can use the prebuilt with hash $prebuilthash when
  installing a package with hash $pkghash by downloading and unpacking
  $location.

  `nix-push-prebuilts' creates prebuilts for all packages for which no
  prebuilt is known to exist.  It can then optionally upload these
  to the network through rsync.

  `nix-[pull|push]-prebuilts' just provide a policy.  Nix provides the
  mechanism through the `nix [export|regprebuilt|regurl]' commands.
2003-05-25 22:42:19 +00:00
Eelco Dolstra fcc5ae151b * Remove build directory from a package directory after building it. 2003-04-25 15:01:15 +00:00
Eelco Dolstra 9713e8577f * getpkg, delpkg, and so on now accept multiple arguments. 2003-04-24 11:41:24 +00:00