anchor.diff:  , gtk4
   , gsettings-desktop-schemas
   , gnome-desktop
  +, libgudev
   , libxmlb
  +, malcontent
   , json-glib
   , libsecret
   , valgrind-light
  
positive.code: 
  stdenv.mkDerivation rec {
    pname = "gnome-software";
    version = "42.4";
  
    src = fetchurl {
      url = "mirror://gnome/sources/gnome-software/${lib.versions.major version}/${pname}-${version}.tar.xz";
      sha256 = "cRgp7mf58qG2S/oXQTdzuY8NxdIZ649sohfNZXK7SnQ=";
    };
  
    patches = [
  
negative.code:     ostree
      polkit
      flatpak
      libgudev
      libxmlb
      malcontent
      libsysprof-capture
    ] ++ lib.optionals withFwupd [
      fwupd
    ];
  
    mesonFlags = [
      # Needs flatpak to upgrade
      "-Dsoup2=true"
      # Requires /etc/machine-id, D-Bus system bus, etc.
      "-Dtests=false"
    ] ++ lib.optionals (!withFwupd) [
      "-Dfwupd=false"
    ];
  