Commit graph

856 commits

Author SHA1 Message Date
Eelco Dolstra 243370bc52 * nix-switch now removes the link to the previously activated system
package as a root of the garbage collector, unless `--keep' is
  specified.
2003-04-24 11:43:11 +00:00
Eelco Dolstra f7526febe4 * A garbage collector for installed packages. nix-collect-garbage
doesn't actually delete any packages, it just prints their
  descriptor hashes.  So we can do

    nix info $(nix-collect-garbage)

  to print out the ids of the packages that would be deleted, and

    nix delpkg $(nix-collect-garbage)

  to actually delete them.
2003-04-09 13:03:00 +00:00
Eelco Dolstra 30a6122f80 * When we activate a descriptor in nix-switch, remember its hash.
This allows us to find out all `live' packages on the system by
  doing

    nix closure $(cat /nix/var/nix/links/*.hash)

  which will print out the activated configurations and all packages
  referenced by them.  We could then garbage collect unused packages
  by deleting the difference between `nix listinst' and the set
  returned by `nix closure ...'.
2003-04-09 12:46:44 +00:00
Eelco Dolstra aa8fda4b54 * We no longer use nix-populate standalone, rather we use it as a
build action for `system' packages (like system.fix) that have
  dependencies on all packages we want to activate.

  So the command sequence to switch to a new activation configuration
  of the system would be:

    $ fix -i .../fixdescriptors/system.fix
    ...
    system.fix -> 89cf4713b37cc66989304abeb9ea189f

    $ nix-switch 89cf4713b37cc66989304abeb9ea189f

* A nix-profile.sh script that can be included in .bashrc.
2003-04-09 12:26:48 +00:00
Eelco Dolstra f56b7312b2 * Descriptor importing in Fix. 2003-04-08 15:36:54 +00:00
Eelco Dolstra cc6eafb3d0 * FreeBSD / gcc 2.95 compatibility fixes.
* A script to generate prebuilt registration scripts.
2003-04-08 14:05:15 +00:00