lix/scripts
Eelco Dolstra 49cd7387ad nix-push: create a manifest-less binary cache
Manifests are a huge pain, since users need to run nix-pull directly
or indirectly to obtain them.  They tend to be large and lag behind
the available binaries; also, the downloaded manifests in
/nix/var/nix/manifest need to be in sync with the Nixpkgs sources.  So
we want to get rid of them.

The idea of manifest-free operation works as follows.  Nix is
configured with a set of URIs of binary caches, e.g.

  http://nixos.org/binary-cache

Whenever Nix needs a store path X, it checks each binary cache for the
existence of a file <CACHE-URI>/<SHA-256 hash of X>.narinfo, e.g.

  http://nixos.org/binary-cache/bi1gh9...ia17.narinfo

The .narinfo file contains the necessary information about the store
path that was formerly kept in the manifest, i.e., (relative) URI of
the compressed NAR, references, size, hash, etc.  For example:

  StorePath: /nix/store/xqp4l88cr9bxv01jinkz861mnc9p7qfi-neon-0.29.6
  URL: 1bjxbg52l32wj8ww47sw9f4qz0r8n5vs71l93lcbgk2506v3cpfd.nar.bz2
  CompressedHash: sha256:1bjxbg52l32wj8ww47sw9f4qz0r8n5vs71l93lcbgk2506v3cpfd
  CompressedSize: 202542
  NarHash: sha256:1af26536781e6134ab84201b33408759fc59b36cc5530f57c0663f67b588e15f
  NarSize: 700440
  References: 043zrsanirjh8nbc5vqpjn93hhrf107f-bash-4.2-p24 cj7a81wsm1ijwwpkks3725661h3263p5-glibc-2.13 ...
  Deriver: 4idz1bgi58h3pazxr3akrw4fsr6zrf3r-neon-0.29.6.drv
  System: x86_64-linux

Nix then knows that it needs to download

  http://nixos.org/binary-cache/1bjxbg52l32wj8ww47sw9f4qz0r8n5vs71l93lcbgk2506v3cpfd.nar.bz2

to substitute the store path.

Note that the store directory is omitted from the References and
Deriver fields to save space, and that the URL can be relative to the
binary cache prefix.

This patch just makes nix-push create binary caches in this format.
The next step is to make a substituter that supports them.
2012-06-28 17:19:32 -04:00
..
build-remote.pl.in Support mandatory system features in the build hook 2012-04-30 17:22:45 -04:00
copy-from-other-stores.pl.in * Add a -I flag to the Perl bindings to nix-build and some other 2012-01-05 20:33:46 +00:00
copying-collector.pl * I said it couldn't be done. I was wrong. 2005-04-04 15:18:19 +00:00
download-using-manifests.pl.in * download-using-manifests: use the Perl bindings. 2011-11-29 13:01:24 +00:00
find-runtime-roots.pl.in * Set the executable bit on scripts. 2011-10-10 22:40:17 +00:00
install-nix-from-closure.sh Generate binary tarballs for installing Nix 2012-05-22 18:36:54 -04:00
Makefile.am Update nix profile: - incorporate NixOS's configuration so that nix is usable by normal users - install as a data file, not a program file 2012-05-31 08:59:36 -04:00
nix-build.in Handle the case where $SHELL is not set 2012-04-10 13:52:37 +02:00
nix-channel.in nix-channel --update: allow updating only the specified channels 2012-05-07 17:55:56 -04:00
nix-collect-garbage.in * Add a -I flag to the Perl bindings to nix-build and some other 2012-01-05 20:33:46 +00:00
nix-copy-closure.in If "pv" is available at compile time, hard-code its path 2012-04-13 14:41:33 +02:00
nix-generate-patches.in nix-generate-patches: Optionally write new patches to $NIX_ALL_PATCHES 2012-04-04 20:46:18 +00:00
nix-http-export.cgi.in Replace wrong (w.r.t. PATH) sed call with in-shell substitution 2009-02-19 20:46:45 +00:00
nix-install-package.in * Add a -I flag to the Perl bindings to nix-build and some other 2012-01-05 20:33:46 +00:00
nix-prefetch-url.in * nix-prefetch-url: rewritten in Perl. 2011-12-02 12:09:50 +00:00
nix-profile.sh.in Update nix profile: - incorporate NixOS's configuration so that nix is usable by normal users - install as a data file, not a program file 2012-05-31 08:59:36 -04:00
nix-pull.in Now *really* prevent accumulation of old manifests 2012-05-07 17:23:26 -04:00
nix-push.in nix-push: create a manifest-less binary cache 2012-06-28 17:19:32 -04:00
nix-reduce-build.in * Set the executable bit on scripts. 2011-10-10 22:40:17 +00:00
remove-patches.pl * Remove the localPaths feature in manifests since it's no longer used 2011-04-06 09:16:22 +00:00
show-duplication.pl * `show-duplication.pl', a small utility that shows the amount of 2006-09-19 13:53:35 +00:00