anchor.diff:        ];
         # fix_segfault: https://bugs.freedesktop.org/show_bug.cgi?id=91316
         commonPatches = [ ./xorgserver-xkbcomp-path.patch ];
  -      # XQuartz requires two compilations: the first to get X / XQuartz,
  -      # and the second to get Xvfb, Xnest, etc.
  -      darwinOtherX = overrideDerivation xorgserver (oldAttrs: {
  -        configureFlags = oldAttrs.configureFlags ++ [
  -          "--disable-xquartz"
  -          "--enable-xorg"
  -          "--enable-xvfb"
  -          "--enable-xnest"
  -          "--enable-kdrive"
  -        ];
  -        postInstall = ":"; # prevent infinite recursion
  -      });
       in
  -      if (!isDarwin)
  -      then {
  +      {
           buildInputs = [ makeWrapper ] ++ commonBuildInputs;
           propagatedBuildInputs = [ libpciaccess pixman ] ++ commonPropagatedBuildInputs ++ lib.optionals stdenv.isLinux [
             args.udev
  
positive.code:   };
  
    xinit = attrs: attrs // {
      stdenv = if isDarwin then args.clangStdenv else stdenv;
      buildInputs = attrs.buildInputs ++ lib.optional isDarwin args.bootstrap_cmds;
      configureFlags = [
        "--with-xserver=${xorg.xorgserver}/bin/X"
      ] ++ lib.optionals isDarwin [
        "--with-bundle-id-prefix=org.nixos.xquartz"
        "--with-launchdaemons-dir=\${out}/LaunchDaemons"
        "--with-launchagents-dir=\${out}/LaunchAgents"
      ];
      propagatedBuildInputs = [ xorg.xauth ]
                           ++ lib.optionals isDarwin [ xorg.libX11 xorg.xproto ];
      prePatch = ''
        sed -i 's|^defaultserverargs="|&-logfile \"$HOME/.xorg.log\"|p' startx.cpp
      '';
  
negative.code:       sed 's,^as_dummy.*,as_dummy="\$PATH",' -i configure
      '';
      propagatedBuildInputs = [ xorg.libSM ];
      CPP = stdenv.lib.optionalString stdenv.cc.isClang "clang -E -";
      outputs = [ "out" "doc" "man" ];
    };
  
  