Cross Compiling: Difference between revisions

From NixOS Wiki
imported>Samueldr
What a fine way to put the triple in perspective.
imported>Srhb
m typo
Line 5: Line 5:


== Cross-Compiling in nixpkgs unstable (pre-18.09) ==
== Cross-Compiling in nixpkgs unstable (pre-18.09) ==
A lot has happened in 2018 and now cross-compilation is well supported within the ubstable branch of nixpkgs.
A lot has happened in 2018 and now cross-compilation is well supported within the unstable branch of nixpkgs.
The basic idea is to use <code>pkgsCross.platform</code> instead of <code>pkgs</code>:
The basic idea is to use <code>pkgsCross.platform</code> instead of <code>pkgs</code>:
<syntaxHighlight lang=bash>
<syntaxHighlight lang=bash>

Revision as of 12:06, 7 August 2018

For building arm software check out the Article NixOS on ARM
If you are looking for building 32bit software, check out Packaging/32bit Applications
Quick example to cross compile a package: Cheatsheet#Cross-compile_packages.

Cross-Compiling in nixpkgs unstable (pre-18.09)

A lot has happened in 2018 and now cross-compilation is well supported within the unstable branch of nixpkgs. The basic idea is to use pkgsCross.platform instead of pkgs:

nix build -f channel:nixos-unstable pkgsCross.raspberryPi.emacs

References

Additional resources