anchor.diff:          fi
       done
   
  +    for i in $out/libexec/emulator/*
  +    do
  +        if [ ! -d $i ] && [ -x $i ]
  +        then
  +            ln -sf $i $out/bin/$(basename $i)
  +        fi
  +    done
  +
       wrapProgram $out/bin/sdkmanager \
         --set JAVA_HOME ${jdk}
   
  
positive.code:     }
      else throw "platform not ${stdenv.hostPlatform.system} supported!";
  
    buildCommand = ''
      mkdir -p $out/libexec
      cd $out/libexec
      unpackFile $src
      cd tools
  
      for f in monitor bin/monkeyrunner bin/uiautomatorviewer
  
negative.code:       # The emulators need additional libraries, which are dynamically loaded => let's wrap them
  
        ${stdenv.lib.optionalString (stdenv.hostPlatform.system == "x86_64-linux") ''
          cd ..
          for i in emulator/emulator* emulator/qemu/linux-x86_64/qemu-system-*
          do
              patchelf --set-interpreter ${stdenv.cc.libc.out}/lib/ld-linux-x86-64.so.2 $i
              wrapProgram `pwd`/$i \
                --prefix PATH : ${stdenv.lib.makeBinPath [ file glxinfo ]} \
                --suffix LD_LIBRARY_PATH : `pwd`/lib:${makeLibraryPath [ stdenv.cc.cc libX11 libxcb libXau libXdmcp libXext libGLU_combined alsaLib zlib libpulseaudio dbus.lib ]} \
                --suffix QT_XKB_CONFIG_ROOT : ${xkeyboardconfig}/share/X11/xkb
          done
          cd tools
        ''}
      ''}
  
  