-
-
Save hewhocannotbetamed/dfcd62a853a677ae57769798624e82f4 to your computer and use it in GitHub Desktop.
yocto.nix
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { pkgs ? import <nixpkgs> {}, ...}: | |
| with pkgs; | |
| (pkgs.buildFHSUserEnv { | |
| name = "yocto-env"; | |
| # Packages Yocto is expecting on the host system by default | |
| targetPkgs = pkgs: (with pkgs; [ | |
| bash | |
| bashInteractive | |
| glibcLocales | |
| glibc_multi | |
| binutils | |
| ccache | |
| chrpath | |
| cmake | |
| cpio | |
| diffstat | |
| diffutils | |
| file | |
| findutils | |
| gawk | |
| gcc8 | |
| gitFull | |
| gnumake | |
| gnutar | |
| gzip | |
| iproute | |
| netbsd.rpcgen | |
| nettools | |
| openssh | |
| patch | |
| perl | |
| procps | |
| python27 | |
| python37 | |
| SDL | |
| shadow | |
| socat | |
| texinfo | |
| unzip | |
| utillinux | |
| vim | |
| wget | |
| which | |
| xterm | |
| ]); | |
| # Headers are required to build | |
| extraOutputsToInstall = [ "dev" ]; | |
| # Force install locale from "glibcLocales" since there are collisions | |
| extraBuildCommands = '' | |
| ln -sf ${glibcLocales}/lib/locale/locale-archive $out/usr/lib/locale | |
| ''; | |
| profile = '' | |
| export hardeningDisable=all | |
| export MAKE=make | |
| export CC=gcc | |
| export LD=ld | |
| export EDITOR=vim | |
| export STRIP=strip | |
| export OBJCOPY=objcopy | |
| export RANLIB=ranlib | |
| export OBJDUMP=objdump | |
| export AS=as | |
| export AR=ar | |
| export NM=nm | |
| export CXX=g++ | |
| export SIZE=size | |
| # Yocto is using the $LOCALEARCHIVE variable | |
| # instead of NixOS's $LOCALE_ARCHIVE | |
| export LOCALEARCHIVE=$LOCALE_ARCHIVE | |
| export BB_ENV_EXTRAWHITE="LOCALE_ARCHIVE LOCALEARCHIVE" | |
| ''; | |
| multiPkgs = pkgs: (with pkgs; []); | |
| runScript = "bash"; | |
| }).env |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment