anchor.diff: -{ stdenv, fetchurl, fetchpatch, bc, dtc, openssl, python2
  -, hostPlatform
  +{ stdenv, fetchurl, fetchpatch, bc, dtc, openssl, python2, swig
  +, hostPlatform, buildPackages
   }:
   
   let
  -  buildUBoot = { targetPlatforms
  -            , filesToInstall
  +  buildUBoot = { filesToInstall
               , installDir ? "$out"
               , defconfig
               , extraMakeFlags ? []
  
positive.code:     defconfig = "allnoconfig";
      installDir = "$out/bin";
      buildFlags = "tools NO_SDL=1";
      dontStrip = false;
      targetPlatforms = stdenv.lib.platforms.linux;
      # build tools/kwboot
      extraMakeFlags = [ "CONFIG_KIRKWOOD=y" ];
      filesToInstall = [
        "tools/dumpimage"
        "tools/fdtgrep"
  
negative.code: 
      enableParallelBuilding = true;
      dontStrip = true;
  
      meta = with stdenv.lib; {
        homepage = http://www.denx.de/wiki/U-Boot/;
        description = "Boot loader for embedded systems";
        license = licenses.gpl2;
        maintainers = [ maintainers.dezgeg ];
      } // extraMeta;
    } // removeAttrs args [ "extraMeta" ]);
  
  in rec {
    inherit buildUBoot;
  