What is the 100MiB text file "tmp" in recent channels nixexprs.tar.xz?

The current nixos-unstable channel nixexprs.tar.xz has a new 103MiB text file in it called “tmp”:

$ curl https://releases.nixos.org/nixpkgs/nixpkgs-20.09pre234801.1facbd61b17/nixexprs.tar.xz | tar xJf - --wildcards --to-stdout '*/tmp' | head
{"version":2,"packages":{
  "_0x0": {
    "name": "0x0-2018-06-24",
    "pname": "0x0",
    "version": "2018-06-24",
    "system": "x86_64-linux",
    "meta": {
      "available": true,
      "description": "A client for 0x0.st",
      "homepage": "https://gitlab.com/somasis/scripts/",

To check the latest channel update:

curl -L https://channels.nixos.org/nixpkgs-unstable/nixexprs.tar.xz | tar xJf - --wildcards --to-stdout '*/tmp'

This file was not present when last I fetched this channel a few days ago.

This file is not present in the nixpkgs-20.03 channel:

curl -L https://channels.nixos.org/nixpkgs-20.03/nixexprs.tar.xz | tar xJf - --wildcards --to-stdout '*/tmp'

What is this file?

This file makes me sad. I fetch channel updates via a script that audits the contents of the channel tarball, comparing it to the git checkout it is supposed to represent. I can’t review a 100MiB text file.

If this is going to be a new permanent part of the nix channel tarballs, can we document what it’s for, how it’s generated, how to re-generate it, and find a better name for it than tmp?

Disconcertingly, I don’t see a change in nixos-channel-scripts that creates this file.

1 Like

that’s pretty significant, seeing as a top-level nix repo is ~185MB

[18:23:35] jon@jon-desktop /home/jon/projects/nixpkgs
$ du --exclude './.git*' -hd0 .
185M	

This looks related: Add packages.json to the tarball job · NixOS/nixpkgs@d6ec410 · GitHub

1 Like

The following PR should address this:

https://github.com/NixOS/nixpkgs/pull/93161

Thanks for bringing this to our attention – in my testing, this reduced the tarball’s size from 17M to 14M (only including x86_64-linux packages).

1 Like

Thanks for fixing this.

I was mistaken about this being a change in the last few days. I got the nixpkgs-unstable and nixos-unstable channels mixed up. This tmp file appears in the nixpkgs-unstable channel but does not appear in the nixos-unstable channel.