Wed Oct 30 10:29:06 EDT 2019


Here's what buildroot says about external toolchains:


    If you want to generate a custom toolchain for your project, that
    can be used as an external toolchain in Buildroot, our
    recommendation is definitely to build it with crosstool-NG. We
    recommend to build the toolchain separately from Buildroot, and
    then import it in Buildroot using the external toolchain backend.

Maybe this is a good next step.  For now just keep it all contained.

Second: relocatable SDK: run relocate-sdk.sh after!

    Alternatively, Buildroot can also export the toolchain and the
    development files of all selected packages, as an SDK, by running
    the command make sdk. This generates a tarball of the content of
    the host directory output/host/, named
    <TARGET-TUPLE>_sdk-buildroot.tar.gz (which can be overriden by
    setting the environment variable BR2_SDK_PREFIX) and located in
    the output directory output/images/.

    This tarball can then be distributed to application developers,
    when they want to develop their applications that are not (yet)
    packaged as a Buildroot package.

    Upon extracting the SDK tarball, the user must run the script
    relocate-sdk.sh (located at the top directory of the SDK), to make
    sure all paths are updated with the new location.

So to import into nix, generate sdk, and maybe patch that
relocate-sdk.sh to point to the /nix/store location.