anchor.diff:  # Ideally, this should be source based,
   # but I can't get it to build from GitHub
   
  -stdenv.mkDerivation rec {
  +let
  +  inherit (stdenv.cc.bintools) dynamicLinker;
  +in stdenv.mkDerivation rec {
     name = "appimagekit";
   
     src = fetchurl {
  
positive.code:   unpackPhase = ''
      cp $src appimagetool-x86_64.AppImage
      chmod u+wx appimagetool-x86_64.AppImage
      patchelf --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \
               --set-rpath ${fuse}/lib:${zlib}/lib \
               appimagetool-x86_64.AppImage
      ./appimagetool-x86_64.AppImage --appimage-extract
  
negative.code:     mkdir -p $out
      cp -r usr/* $out
  
      patchelf --set-interpreter ${dynamicLinker} \
           --set-rpath ${stdenv.glibc.out}/lib:${fuse}/lib:${zlib}/lib:${glib}/lib \
  	 $out/bin/appimagetool
      patchelf --set-interpreter ${dynamicLinker} \
           --set-rpath ${zlib}/lib \
  	 $out/bin/mksquashfs
    '';
  