anchor.diff: -{ lib, stdenv, fetchurl, pkg-config, glib, expat, pam, perl, fetchpatch
  -, intltool, spidermonkey_78, gobject-introspection, libxslt, docbook_xsl, dbus
  -, docbook_xml_dtd_412, gtk-doc, coreutils
  -, useSystemd ? stdenv.isLinux, systemd, elogind
  +{ lib
  +, stdenv
  +, fetchurl
  +, pkg-config
  +, glib
  +, expat
  +, pam
  +, perl
  +, fetchpatch
  +, intltool
  +, spidermonkey_78
  +, gobject-introspection
  +, libxslt
  +, docbook-xsl-nons
  +, dbus
  +, docbook_xml_dtd_412
  +, gtk-doc
  +, coreutils
  +, useSystemd ? stdenv.isLinux
  +, systemd
  +, elogind
   # needed until gobject-introspection does cross-compile (https://github.com/NixOS/nixpkgs/pull/88222)
   , withIntrospection ? (stdenv.buildPlatform == stdenv.hostPlatform)
   # A few tests currently fail on musl (polkitunixusertest, polkitunixgrouptest, polkitidentitytest segfault).
  
positive.code:     })
    ];
  
    postPatch = lib.optionalString stdenv.isDarwin ''
      sed -i -e "s/-Wl,--as-needed//" configure.ac
    '';
  
    outputs = [ "bin" "dev" "out" ]; # small man pages in $bin
  
    nativeBuildInputs =
      [ glib gtk-doc pkg-config intltool perl ]
      ++ [ libxslt docbook_xsl docbook_xml_dtd_412 ]; # man pages
    buildInputs =
      [ expat pam spidermonkey_78 ]
      # On Linux, fall back to elogind when systemd support is off.
      ++ lib.optional stdenv.isLinux (if useSystemd then systemd else elogind)
      ++ lib.optional withIntrospection gobject-introspection;
  
    propagatedBuildInputs = [
      glib # in .pc Requires
    ];
  
    preConfigure = ''
      chmod +x test/mocklibc/bin/mocklibc{,-test}.in
  
negative.code:     sed '/libsystemd autoconfigured/s/.*/:/' -i configure
    '';
  
    checkPhase = ''
      runHook preCheck
  
  