[Nix-dev] Mirrors

Eelco Dolstra e.dolstra at tudelft.nl
Wed Apr 9 12:00:01 CEST 2008


Pjotr Prins wrote:

> For some packages a mirror would be nice - as either they are changed
> too often, or not often enough. What is the policy here? Can we
> provide two URLs? The main one and a fallback if the main goes out of
> synch?
> 
> Does NIX have a source mirror for that purpose? It is important for a
> stable version.

Yes, there is a source mirror mechanism.  Two, actually.

First, there is the mirror://{sourceforge,gnu,kernel,...} scheme for packages 
that already have many mirrors (no use for us to mirror them again).  The 
mirrors are defined in pkgs/build-support/fetchurl/mirrors.nix.

Second, we have our own transparent hash-indexed mirroring scheme: when fetchurl 
tries to download something with MD5 hash X, it will first try to download 
http://nix.cs.uu.nl/dist/tarballs/md5/X (similar for SHA-1 and SHA-256 hashes). 
  More of those mirrors can be defined in the "hashedMirrors" attribute in 
pkgs/build-support/fetchurl/mirrors.nix.

The mirror at http://nix.cs.uu.nl/dist/tarballs isn't complete though.  I have a 
script that copies all tarballs used in Nixpkgs to that server, but I don't run 
it very frequently (usually before a Nixpkgs release).

-- 
Eelco Dolstra | http://www.st.ewi.tudelft.nl/~dolstra/



More information about the nix-dev mailing list