Firefox or Chromium on 32 bit

A couple of days ago I had to switch back to an old 32 bit laptop. There is a variety of small Linux distributions for old computers like this one, but having enjoyed the Nix experience before, it was clear that I couldn’t go back to an imperative Linux distribution and am happy to report that nixos-unstable is running just fine on this machine.

The only thing I’m wondering is whether there is any possibility of installing Firefox or Chromium. For 32 bit, they are not included in the Hydra build caches [why?]. Compiling them manually is not an option since the linking phase requires more than four gibibytes of memory, which a 32 bit system can never provide for. I do have access to 64 bit machines, alas not running NixOS.

Is there any way of setting up a crosscompiling infrastructure via ssh? Apparently handing off package building to remote machines is quite easy, with the buildMachines option in configuration.nix, but the documentation seems to be silent regarding crosscompiling from 64 bit for 32 bit.

I appreciate any pointers, thank you for your time.

If your kernel has CONFIG_IA32_EMULATION set (which most distros, including NixOS have by default), you don’t need to cross-compile anything. Compiling Firefox is just a matter of nix build nixpkgs.pkgsi686Linux.firefox.

The pkgsi686Linux attribute set is basically the same as the top-level packages attribute but with system set to i686-linux (you could also set that directly on import of nixpkgs as well).

You can use nix copy to copy the resulting closure to another machine.


Thank you, aszlig! That’s much easier than expected, and it works like a charm – for many packages. For others (for instance nixpkgs.pkgsi686Linux.libdvdread_4_9_9 required by nixpkgs.pkgsi686Linux.mplayer, or nixpkgs.pkgsi686Linux.gegl_0_4 required by nixpkgs.pkgsi686Linux.gimp), I’m running into the bug described at unexpected EOF reading a line · Issue #29257 · NixOS/nixpkgs · GitHub. Which is kind of weird, because that’s an old bug, pertaining to Nix 1.1.12, while I’m running Nix 2.0.4. I’ll try to investigate.

Edit: Opened issue in order to track progress at unexpected EOF reading a line · Issue #29257 · NixOS/nixpkgs · GitHub.