summary refs log blame commit diff
path: root/pkgs/development/misc/msp430/newlib.nix
blob: 4ea98bfc8b2e990385eddc3b555de7b1ad8b5223 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
                                                
 

                                 





                           






                                                                              


                                   




                                  
{ stdenvNoCC, lndir, newlib, msp430GccSupport }:

stdenvNoCC.mkDerivation {
  name = "msp430-${newlib.name}";
  inherit newlib;
  inherit msp430GccSupport;

  preferLocalBuild = true;
  allowSubstitutes = false;

  buildCommand = ''
    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}
  '';

  passthru = {
    inherit (newlib) incdir libdir;
  };

  meta = {
    platforms = [ "msp430-none" ];
  };
}