Skip to content

Latest commit

 

History

History
29 lines (18 loc) · 737 Bytes

40-aarch64-example.org

File metadata and controls

29 lines (18 loc) · 737 Bytes

aarch64 Example

Initialise nixpkgs


  • Initialise nixpkgs with the correct crossSystem
  • Pick this from lib.systems.examples
  • Remember: You need to import <nixpkgs/lib> since, when initialising nixpkgs, you don’t have access to lib yet.

Two ways to do cross compilation

Option 1: callPackage


  • 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

Option 2: manually


  • Select packages from pkgsBuildHost and pkgsHostTarget
  • Put them into buildInputs and nativeBuildInputs as appropriate