Home Explore Blog CI



nix

1st chunk of `doc/manual/source/release-notes/rl-0.12.md`
d49ea4f3f721e327228f669b5cf9a9de04aa4547c5f4d2f20000000100000bdc
# Release 0.12 (2008-11-20)

  - Nix no longer uses Berkeley DB to store Nix store metadata. The
    principal advantages of the new storage scheme are: it works
    properly over decent implementations of NFS (allowing Nix stores to
    be shared between multiple machines); no recovery is needed when a
    Nix process crashes; no write access is needed for read-only
    operations; no more running out of Berkeley DB locks on certain
    operations.
    
    You still need to compile Nix with Berkeley DB support if you want
    Nix to automatically convert your old Nix store to the new schema.
    If you don’t need this, you can build Nix with the `configure`
    option `--disable-old-db-compat`.
    
    After the automatic conversion to the new schema, you can delete the
    old Berkeley DB files:
    
        $ cd /nix/var/nix/db
        $ rm __db* log.* derivers references referrers reserved validpaths DB_CONFIG
    
    The new metadata is stored in the directories `/nix/var/nix/db/info`
    and `/nix/var/nix/db/referrer`. Though the metadata is stored in
    human-readable plain-text files, they are not intended to be
    human-editable, as Nix is rather strict about the format.
    
    The new storage schema may or may not require less disk space than
    the Berkeley DB environment, mostly depending on the cluster size of
    your file system. With 1 KiB clusters (which seems to be the `ext3`
    default nowadays) it usually takes up much less space.

  - There is a new substituter that copies paths directly from other
    (remote) Nix stores mounted somewhere in the filesystem. For
    instance, you can speed up an installation by mounting some remote
    Nix store that already has the packages in question via NFS or
    `sshfs`. The environment variable `NIX_OTHER_STORES` specifies the
    locations of the remote Nix directories, e.g. `/mnt/remote-fs/nix`.

  - New `nix-store` operations `--dump-db` and `--load-db` to dump and
    reload the Nix database.

  - The garbage collector has a number of new options to allow only some
    of the garbage to be deleted. The option `--max-freed N` tells the
    collector to stop after at least *N* bytes have been deleted. The
    option `--max-links
            N` tells it to stop after the link count on `/nix/store` has dropped
    below *N*. This is useful for very large Nix stores on filesystems
    with a 32000 subdirectories limit (like `ext3`). The option
    `--use-atime` causes store paths to be deleted in order of ascending
    last access time. This allows non-recently used stuff to be deleted.
    The option `--max-atime time` specifies an upper limit to the last
    accessed time of paths that may be deleted. For instance,
    
    ``` 
        $ nix-store --gc -v --max-atime $(date +%s -d "2 months ago")
    ```
    
    deletes everything that hasn’t been accessed in two months.

  - `nix-env` now uses optimistic profile locking when performing an
    operation like installing or upgrading, instead of setting an

Title: Nix Release 0.12 (2008-11-20) - Key Changes and New Features
Summary
Release 0.12 of Nix includes a new storage scheme for Nix store metadata that replaces Berkeley DB, offering improved NFS compatibility, crash recovery, and read-only operation support. It also introduces a new substituter that copies paths directly from other Nix stores mounted in the filesystem, enhancing installation speed. New `nix-store` operations for database dumping and reloading are added, and the garbage collector gains options to limit the amount of garbage deleted based on freed space, link count, access time, and maximum access time. Lastly, `nix-env` now uses optimistic profile locking for operations like installing or upgrading.