Coreboot: Difference between revisions
Phanirithvij (talk | contribs) m fix tutorial link |
Make the shell cross compatible |
||
Line 11: | Line 11: | ||
<syntaxhighlight lang="nix"> | <syntaxhighlight lang="nix"> | ||
{ | |||
pkgs ? import <nixpkgs> { }, | |||
}: | |||
# NOTE we need mkShellNoCC | # NOTE we need mkShellNoCC | ||
# mkShell would add the regular gcc, which has no ada (gnat) | # mkShell would add the regular gcc, which has no ada (gnat) | ||
# https://github.com/NixOS/nixpkgs/issues/142943 | # https://github.com/NixOS/nixpkgs/issues/142943 | ||
pkgs.callPackage ( | |||
{ | |||
mkShellNoCC { | mkShellNoCC, | ||
qemu, | |||
pkg-config, | |||
# | gnat11, | ||
m4, | |||
flex, | |||
# | bison, | ||
zlib | zlib, | ||
ncurses, | |||
}: | |||
mkShellNoCC { | |||
strictDeps = true; | |||
# host/target agnostic programs | |||
depsBuildBuild = [ | |||
qemu # override and change `hostCpuTargets` if cross-compiling | |||
]; | |||
} | # compilers & linkers & dependecy finding programs | ||
nativeBuildInputs = [ | |||
pkg-config | |||
gnat11 # gcc with ada | |||
m4 | |||
flex | |||
bison # Generate flashmap descriptor parser | |||
]; | |||
# libraries | |||
buildInputs = [ | |||
zlib | |||
ncurses # make menuconfig | |||
]; | |||
} | |||
) { } | |||
</syntaxhighlight> | </syntaxhighlight> | ||