|
||
---|---|---|
.. | ||
README.md | ||
build_hello_c.sh | ||
build_nixpkg.sh | ||
hello | ||
hello.c | ||
hello.nix |
README.md
Nix-compiled binaries for xrsh.iso
Crosscompiling used to be tricky, due to dependencies. With Nix this belongs to the past.
building hello.c
$ 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
$ nix-build '<nixpkgs>' --pure -I nixpkgs=channel:nixos-24.05 -A pkgsCross.musl32.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.