anchor.diff: -{ stdenv, pkgs, gccAvrAtmel, gcc-arm-embedded, asf, teensyCores, buildName, boardName, mainText }:
  +{ stdenv, writeText, bash, gccAvrAtmel, gcc-arm-embedded, asf, teensyCores, buildName, boardName, mainText }:
   
   let
       boardDefinitions = import ./boards.nix;
  
positive.code:     
      needTeensyCores = board.platform == "teensy";
      
      targetFile = pkgs.writeText "aprinter-nixbuild.sh" ''
          ${stdenv.lib.optionalString isAvr "CUSTOM_AVR_GCC=${gccAvrAtmel}/bin/avr-"}
          ${stdenv.lib.optionalString isArm "CUSTOM_ARM_GCC=${gcc-arm-embedded}/bin/arm-none-eabi-"}
          ${stdenv.lib.optionalString needAsf "CUSTOM_ASF=${asf}"}
  
negative.code:         
          TARGETS+=( "nixbuild" )
          target_nixbuild() {
          ${targetVarsText}}
      '';
      
      mainFile = writeText "aprinter-main.cpp" mainText;
      
  in
  
  