anchor.diff:  { stdenv, fetchurl, pkgconfig, glib, expat, pam, perl, fetchpatch
  -, intltool, spidermonkey_60 , gobject-introspection, libxslt, docbook_xsl, dbus
  +, intltool, spidermonkey_78, gobject-introspection, libxslt, docbook_xsl, dbus
   , docbook_xml_dtd_412, gtk-doc, coreutils
   , useSystemd ? (stdenv.isLinux && !stdenv.hostPlatform.isMusl), systemd, elogind
   , withIntrospection ? true
  
positive.code: 
  stdenv.mkDerivation rec {
    pname = "polkit";
    version = "0.116";
  
    src = fetchurl {
      url = "https://www.freedesktop.org/software/${pname}/releases/${pname}-${version}.tar.gz";
      sha256 = "1c9lbpndh5zis22f154vjrhnqw65z8s85nrgl42v738yf6g0q5w8";
    };
  
    patches = [
  
negative.code:   inherit doCheck;
    checkInputs = [ dbus ];
    checkPhase = ''
      # unfortunately this test needs python-dbusmock, but python-dbusmock needs polkit,
      # leading to a circular dependency
      substituteInPlace test/Makefile --replace polkitbackend ""
  
      # tests need access to the system bus
      dbus-run-session --config-file=${./system_bus.conf} -- sh -c 'DBUS_SYSTEM_BUS_ADDRESS=$DBUS_SESSION_BUS_ADDRESS make check'
    '';
  