msp430: include vendor headers with stdenv

+26
+1
lib/systems/default.nix
··· 34 34 else if final.isUClibc then "uclibc" 35 35 else if final.isAndroid then "bionic" 36 36 else if final.isLinux /* default */ then "glibc" 37 + else if final.isMsp430 then "newlib" 37 38 else if final.isAvr then "avrlibc" 38 39 # TODO(@Ericson2314) think more about other operating systems 39 40 else "native/impure";
+18
pkgs/development/misc/msp430/newlib.nix
··· 1 + { runCommand, lndir, newlib, msp430GccSupport }: 2 + 3 + runCommand "msp430-${newlib.name}" { 4 + inherit newlib; 5 + inherit msp430GccSupport; 6 + 7 + preferLocalBuild = true; 8 + allowSubstitutes = false; 9 + 10 + passthru = { 11 + inherit (newlib) incdir libdir; 12 + }; 13 + } '' 14 + mkdir $out 15 + ${lndir}/bin/lndir -silent $newlib $out 16 + ${lndir}/bin/lndir -silent $msp430GccSupport/include $out/${newlib.incdir} 17 + ${lndir}/bin/lndir -silent $msp430GccSupport/lib $out/${newlib.libdir} 18 + ''
+7
pkgs/top-level/all-packages.nix
··· 8374 8374 8375 8375 msp430GccSupport = callPackage ../development/misc/msp430/gcc-support.nix { }; 8376 8376 8377 + msp430Newlib = callPackage ../development/misc/msp430/newlib.nix { }; 8378 + msp430NewlibCross = callPackage ../development/misc/msp430/newlib.nix { 8379 + inherit (pkgs.buildPackages.xorg) lndir; 8380 + newlib = pkgs.newlibCross; 8381 + }; 8382 + 8377 8383 pharo-vms = callPackage ../development/pharo/vm { }; 8378 8384 pharo = pharo-vms.multi-vm-wrapper; 8379 8385 pharo-cog32 = pharo-vms.cog32; ··· 10146 10152 else if name == "bionic" then targetPackages.bionic or bionic 10147 10153 else if name == "uclibc" then targetPackages.uclibcCross or uclibcCross 10148 10154 else if name == "avrlibc" then targetPackages.avrlibcCross or avrlibcCross 10155 + else if name == "newlib" && stdenv.targetPlatform.isMsp430 then targetPackages.msp430NewlibCross or msp430NewlibCross 10149 10156 else if name == "newlib" then targetPackages.newlibCross or newlibCross 10150 10157 else if name == "musl" then targetPackages.muslCross or muslCross 10151 10158 else if name == "msvcrt" then targetPackages.windows.mingw_w64 or windows.mingw_w64