- Initialise
nixpkgs
with the correctcrossSystem
- Pick this from
lib.systems.examples
- Remember: You need to import
<nixpkgs/lib>
since, when initialising nixpkgs, you don’t have access tolib
yet.
- Use one of the packages you built yesterday (not NCDU - Zig doesn’t support cross compilation in nixpkgs for some reason)
- See if anything else is needed to make cross-compilation work
- Select packages from pkgsBuildHost and pkgsHostTarget
- Put them into buildInputs and nativeBuildInputs as appropriate