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:     sed '/libsystemd autoconfigured/s/.*/:/' -i configure
    '';
  
    configureFlags = [
      "--datadir=${system}/share"
      "--sysconfdir=/etc"
      "--with-systemdsystemunitdir=${placeholder "out"}/etc/systemd/system"
      "--with-polkitd-user=polkituser" #TODO? <nixos> config.ids.uids.polkituser
      "--with-os-type=NixOS" # not recognized but prevents impurities on non-NixOS
      (if withIntrospection then "--enable-introspection" else "--disable-introspection")
    ] ++ lib.optional (!doCheck) "--disable-test";
  
    makeFlags = [
      "INTROSPECTION_GIRDIR=${placeholder "out"}/share/gir-1.0"
      "INTROSPECTION_TYPELIBDIR=${placeholder "out"}/lib/girepository-1.0"
    ];
  
    installFlags = [
      "datadir=${placeholder "out"}/share"
      "sysconfdir=${placeholder "out"}/etc"
    ];
  
    inherit doCheck;
    checkInputs = [ dbus ];
    checkPhase = ''
      runHook preCheck
  
  
negative.code: }:
  
  let
    system = "/run/current-system/sw";
    setuid = "/run/wrappers/bin";
  in
  stdenv.mkDerivation rec {
    pname = "polkit";
    version = "0.119";
  
    outputs = [ "bin" "dev" "out" ]; # small man pages in $bin
  
    src = fetchurl {
      url = "https://www.freedesktop.org/software/${pname}/releases/${pname}-${version}.tar.gz";
  