msp430: include vendor headers with stdenv

This commit is contained in:
Aaron Lindsay
2019-03-25 20:39:51 -07:00
parent 02a1d3b24a
commit 1c7bb464d9
3 changed files with 26 additions and 0 deletions
+18
View File
@@ -0,0 +1,18 @@
{ runCommand, lndir, newlib, msp430GccSupport }:
runCommand "msp430-${newlib.name}" {
inherit newlib;
inherit msp430GccSupport;
preferLocalBuild = true;
allowSubstitutes = false;
passthru = {
inherit (newlib) incdir libdir;
};
} ''
mkdir $out
${lndir}/bin/lndir -silent $newlib $out
${lndir}/bin/lndir -silent $msp430GccSupport/include $out/${newlib.incdir}
${lndir}/bin/lndir -silent $msp430GccSupport/lib $out/${newlib.libdir}
''