Caring for old bootstrap tarballs

Every now and then, I like to try and build old software, to see how reliable old Nix expressions are over time. I’m trying to build python from nixpkgs commit bede9c4d50ed8d079dc386ff1c5964f3f1816e8b and while I’ve been able to get many source tarballs from project websites or public mirrors, I can’t get my hands on a copy of /nix/store/gi4wxrj3ccaidnqafldfn5b0ih13dc9i-glibc-2.9-20081208.tar.bz2. The derivation wants to fetch http://nixos.org/tarballs/glibc-2.9-20081208.tar.bz2, but that link now 404s. A Google search for glibc-2.9-20081208.tar.bz2 turns up a mere four results for that file name, all PDF files from various Nix presentations/publications.

I know there was some discussion in the past about culling old files in S3 to save costs, but it’s not great to have the bootstrap depend on a bespoke tarball, and remove the only copy of that tarball from the WWW.

1 Like

It’s still in the cache.

$ nix repl
Welcome to Nix 2.18.1. Type :? for help.

nix-repl> :l <nixpkgs>
Added 20414 variables.

nix-repl> src = fetchurl {
                        url = http://nixos.org/tarballs/glibc-2.9-20081208.tar.bz2;
                        sha256 = "0zhxbgcsl97pf349m0lz8d5ljvvzrcqc23yf08d888xlk4ms8m3h";
                      }

nix-repl> :b src

This derivation produced the following outputs:
  out -> /nix/store/gi4wxrj3ccaidnqafldfn5b0ih13dc9i-glibc-2.9-20081208.tar.bz2

nix-repl>

I don’t understand what I’m seeing:

$ curl -L http://nixos.org/tarballs/glibc-2.9-20081208.tar.bz2
404

But it works from nix?

$ nix repl
Welcome to Nix 2.18.1. Type :? for help.

nix-repl> :l <nixpkgs>
Added 19230 variables.

nix-repl> src = fetchurl {
  url = http://nixos.org/tarballs/glibc-2.9-20081208.tar.bz2;
  sha256 = "0zhxbgcsl97pf349m0lz8d5ljvvzrcqc23yf08d888xlk4ms8m3h";
}

nix-repl> :b src

This derivation produced the following outputs:
  out -> /nix/store/gi4wxrj3ccaidnqafldfn5b0ih13dc9i-glibc-2.9-20081208.tar.bz2

Bootstrap tarballs are stored in content-addressed form on tarballs.nixos.org. When you show the build logs for the derivation you mentioned, you will find out that it actually downloaded https://tarballs.nixos.org/sha256/0zhxbgcsl97pf349m0lz8d5ljvvzrcqc23yf08d888xlk4ms8m3h.

1 Like