anchor.diff:  , alsaLib, cairo, acl, gpm, AppKit, GSS, ImageIO, m17n_lib, libotf
   , systemd ? null
   , withX ? !stdenv.isDarwin
  -, withGTK2 ? false, gtk2 ? null
  -, withGTK3 ? true, gtk3 ? null, gsettings-desktop-schemas ? null
  +, withNS ? stdenv.isDarwin
  +, withGTK2 ? false, gtk2-x11 ? null
  +, withGTK3 ? true, gtk3-x11 ? null, gsettings-desktop-schemas ? null
   , withXwidgets ? false, webkitgtk ? null, wrapGAppsHook ? null, glib-networking ? null
   , withCsrc ? true
   , srcRepo ? false, autoconf ? null, automake ? null, texinfo ? null
  
positive.code: 
  assert (libXft != null) -> libpng != null;      # probably a bug
  assert stdenv.isDarwin -> libXaw != null;       # fails to link otherwise
  assert withGTK2 -> withX || stdenv.isDarwin;
  assert withGTK3 -> withX || stdenv.isDarwin;
  assert withGTK2 -> !withGTK3 && gtk2 != null;
  assert withGTK3 -> !withGTK2 && gtk3 != null;
  assert withXwidgets -> withGTK3 && webkitgtk != null;
  
  let
  
negative.code:       cp $srcdir/TAGS $dstdir
        echo '((nil . ((tags-file-name . "TAGS"))))' > $dstdir/.dir-locals.el
      done
    '' + lib.optionalString withNS ''
      mkdir -p $out/Applications
      mv nextstep/Emacs.app $out/Applications
    '';
  