# Nix-compiled binaries for xrsh.iso

Crosscompiling used to be tricky, due to dependencies.
With Nix this belongs to the past.

# building hello.c

```bash
$ nix-shell --run '$CC hello.c -o hello' hello.nix
$ file hello 
hello: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), statically linked, not stripped
```

# building a nixos pkg

```bash
$ nix-build '<nixpkgs>' --pure -I nixpkgs=channel:nixos-24.05 -A pkgsCross.$ARCH.pkgsStatic.hello
$ file hello
hello: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), statically linked, not stripped
```

use the build-shellscripts in this directory as a startingpoint for your xrsh binaries.