Cross Compiling: Difference between revisions
imported>Symphorien add an example shell file |
imported>Samueldr m fixes escaping issue →How to obtain a shell with a cross compiler |
||
| Line 13: | Line 13: | ||
== How to obtain a shell with a cross compiler == | == How to obtain a shell with a cross compiler == | ||
Create a file as follows: | Create a file as follows: | ||
<syntaxhighlight lang="nix"> | |||
with import <nixpkgs> { | with import <nixpkgs> { | ||
crossSystem = { | crossSystem = { | ||
| Line 23: | Line 23: | ||
buildInputs = [ zlib ]; # your dependencies here | buildInputs = [ zlib ]; # your dependencies here | ||
} | } | ||
</ | </syntaxhighlight> | ||
and then use it to obtain a shell: | and then use it to obtain a shell: | ||
{{commands|nix-shell crossShell.nix}} | {{commands|nix-shell crossShell.nix}} | ||