anchor.diff:      ${glib.dev}/bin/glib-compile-schemas "$out/share/glib-2.0/schemas"
     '';
   
  -  enableParallelBuilding = true;
  -
     passthru = {
       updateScript = gnome3.updateScript {
  -      packageName = "mutter";
  -      attrPath = "gnome3.mutter";
  +      packageName = pname;
  +      attrPath = "gnome3.${pname}";
       };
     };
   
     meta = with stdenv.lib; {
  +    description = "A window manager for GNOME";
  +    homepage = "https://gitlab.gnome.org/GNOME/mutter";
  +    license = licenses.gpl2;
  +    maintainers = gnome3.maintainers;
       platforms = platforms.linux;
  -    maintainers = gnome3.maintainers;
  -    license = licenses.gpl2;
     };
   }
  
positive.code:   };
  
    mesonFlags = [
      "-Dxwayland-path=${xwayland}/bin/Xwayland"
      "-Dinstalled_tests=false" # TODO: enable these
      "-Dwayland_eglstream=true"
      "-Degl_device=true"
    ];
  
    propagatedBuildInputs = [
      # required for pkgconfig to detect mutter-clutter
      libXtst
      json-glib
      libcap_ng
    ];
  
    nativeBuildInputs = [
      meson
      pkgconfig
      gettext
      ninja
      python3
      # for cvt command
      xorgserver
      wrapGAppsHook
      desktop-file-utils
    ];
  
    buildInputs = [
      glib gobject-introspection gtk3 gsettings-desktop-schemas upower
      gnome-desktop cairo pango cogl zenity libstartup_notification
      geocode-glib libinput libgudev libwacom
      libcanberra-gtk3 zenity xkeyboard_config libxkbfile
      libxkbcommon pipewire xwayland egl-wayland
      gnome-settings-daemon sysprof
    ];
  
    patches = [
      # Drop inheritable cap_sys_nice, to prevent the ambient set from leaking
      # from mutter/gnome-shell, see https://github.com/NixOS/nixpkgs/issues/71381
      ./drop-inheritable.patch
     # TODO: submit upstream
     ./0001-build-use-get_pkgconfig_variable-for-sysprof-dbusdir.patch
      (substituteAll {
        src = ./fix-paths.patch;
        inherit zenity;
  
negative.code: { fetchurl
  , fetchpatch
  , substituteAll
  , stdenv
  , pkgconfig
  , gnome3
  , gettext
  , gobject-introspection
  , upower
  , cairo
  , pango
  , cogl
  , json-glib
  , libstartup_notification
  , zenity
  , libcanberra-gtk3
  , ninja
  , xkeyboard_config
  , libxkbfile
  , libxkbcommon
  , libXtst
  , libinput
  , gsettings-desktop-schemas
  , glib
  , gtk3
  , gnome-desktop
  , geocode-glib
  , pipewire
  , libgudev
  , libwacom
  , xwayland
  , meson
  , gnome-settings-daemon
  , xorgserver
  , python3
  