[Nix-dev] (Cross-)Building a custom installation CD

Eelco Dolstra eelco.dolstra at logicblox.com
Tue Jan 21 09:08:18 CET 2014


Hi,

On 20/01/14 15:59, Sergey Mironov wrote:

> Unfortunately, there is a complication: target device and developer
> machines have different architectures (x86 via x86-64)

In this case you don't actually need a cross-compiler, since Nix on x86_64 can
do x86 builds just fine (through the personality() syscall).  So you can just do
something like:

  $ nix-build '<nixpkgs/nixos/release.nix>' -A iso_minimal.i686-linux

or more generally, to build a NixOS configuration:

  $ nix-build '<nixpkgs/nixos>' -A config.system.build.toplevel \
      --argstr system i686-linux

-- 
Eelco Dolstra | LogicBlox, Inc. | http://nixos.org/~eelco/


More information about the nix-dev mailing list