ZFMPQAFVZP6NC6VZK3YAKIMSS5NYOV47HITL5TQ2YCD3KRCZWREQC SNMYL7H646AWZ7INUIWNLJFQ2DAHPHHHD5WA23ZCG6FQXUOSX7HAC WK2OO4YYGVZKCIVSA43GW3WDUQ4UEUHF2GGY4WNWOZYISPFYWMDAC W2MX3YW4OTK4DNSA4BUULWA3DFWE5E77EFCEPQQFHP7AKZZMZYQAC 7AUC4NKIYIKUZMHNOVCCVGPDO3BO3D56XULZXTXRFBTPDG27J7DQC 52F4Q6CJCVIEVT576TSP2YUN54ZCEFXHYZWNV4BGHWDASTURAXFQC EGQ4SEV5BPG6C6TMBWGYH3OE7O3XSKNGBBVO23BBVIX6GFUUZLHAC 5LP7FPFXPCIAD4JVGJQS64BVPBD47VIY3G3SJJQG7DKOLLGSNHPQC * [04-cmake-and-cross](04-cmake-and-cross/demo.sh): Building packages that use CMake, and cross-compile them for different architectures.
* [04-cmake-and-cross](04-cmake-and-cross/demo.sh): Building packages that use CMake, and cross-compile them for different architectures and static executables. Doing the same with emulation.
packages.default = pkgs.wttr-delft;# But the package set also has a pkgsCross set, and we can select our package from one of its contentspackages.cross-riscv64 = pkgs.pkgsCross.riscv64.wttr-delft;
packages = {default = pkgs.wttr-delft;# But the package set also has a pkgsCross set, and we can select our package from one of its contentscross-riscv64 = pkgs.pkgsCross.riscv64.wttr-delft;static = pkgs.pkgsCross.musl64.pkgsStatic.wttr-delft;cross-aarch64-static = pkgs.pkgsCross.aarch64-multiplatform.pkgsStatic.wttr-delft;};
h Static executables, We can also cross compile a static build:x nix build "${dir}#static" -L, And this is indeed a static binary:x "${file_cmd}" ./result/bin/wttr-delftx ls -lh ./result/bin/wttr-delfth Everything together, Static cross compiled for aarch64-linux - you can copy this executable and run it on a Raspberry Pi!x nix build "${dir}#cross-aarch64-static" -Lx "${file_cmd}" ./result/bin/wttr-delftx ls -lh ./result/bin/wttr-delft