Cross Compiling: Difference between revisions
imported>Mic92 link to manual |
imported>Makefu add introduction to cross-compiling by mbauer |
||
| Line 4: | Line 4: | ||
Quick example to cross compile a package: [[Cheatsheet#Cross-compile_packages]]. | Quick example to cross compile a package: [[Cheatsheet#Cross-compile_packages]]. | ||
Nixpkgs manual on [https://nixos.org/nixpkgs/manual/#chap-cross cross compiling] | == 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. | |||
The basic idea is to use <code>pkgsCross.platform</code> instead of <code>pkgs</code>: | |||
<syntaxHighlight lang=bash> | |||
nix build -f channel:nixos-unstable pkgsCross.raspberryPi.emacs | |||
</syntaxHighlight> | |||
== References == | |||
* Nixpkgs manual on [https://nixos.org/nixpkgs/manual/#chap-cross cross compiling] | |||
* [https://matthewbauer.us/blog/beginners-guide-to-cross.html Introduction to Cross Compilation with nix by Matthew Bauer] | |||