anchor.diff:      cat <<EOF >> "$out/nix-support/setup-hook"
       if [ -z "\''${JAVA_HOME-}" ]; then export JAVA_HOME=$out; fi
       EOF
  +
  +    # We cannot use -exec since wrapProgram is a function but not a command.
  +    for bin in $( find "$out" -executable -type f ); do
  +      if patchelf --print-interpreter "$bin" &> /dev/null; then
  +        wrapProgram "$bin" --prefix LD_LIBRARY_PATH : "${runtimeLibraryPath}"
  +      fi
  +    done
     '';
   
     preFixup = ''
  
positive.code: , lib
  , fetchurl
  , autoPatchelfHook
  , alsaLib
  , freetype
  , fontconfig
  , zlib
  , xorg
  , libffi
  }:
  
  let
    cpuName = stdenv.hostPlatform.parsed.cpu.name;
  in
  
  let result = stdenv.mkDerivation rec {
  
negative.code:   };
  
    buildInputs = [
      alsaLib # libasound.so wanted by lib/libjsound.so
      fontconfig
      freetype
      stdenv.cc.cc.lib # libstdc++.so.6
      xorg.libX11
      xorg.libXext
      xorg.libXi
      xorg.libXrender
      xorg.libXtst
      zlib
    ] ++ lib.optional stdenv.isAarch32 libffi;
  
    nativeBuildInputs = [ autoPatchelfHook makeWrapper ];
  
    # See: https://github.com/NixOS/patchelf/issues/10
    dontStrip = 1;
  