anchor.diff:  { lib
   , stdenv
   , fetchFromGitLab
  +, fetchpatch
   , pkg-config
   , rsync
   , libxslt
   , meson
   , ninja
   , python3
  +, dbus
  +, umockdev
  +, libeatmydata
   , gtk-doc
   , docbook-xsl-nons
   , udev
  
positive.code:     sha256 = "gpLsBh4jgiDO8bxic2BTFhjIwc2q/tuAIxykTHqK6UM=";
    };
  
    strictDeps = true;
  
    depsBuildBuild = [
  
negative.code:     "-Dgtk-doc=${lib.boolToString withDocs}"
    ];
  
    doCheck = true;
  
    postPatch = ''
      patchShebangs src/linux/integration-test.py
      patchShebangs src/linux/unittest_inspector.py
    '';
  
    preCheck = ''
      # Our gobject-introspection patches make the shared library paths absolute
      # in the GIR files. When running tests, the library is not yet installed,
      # though, so we need to replace the absolute path with a local one during build.
      # We are using a symlink that will be overwitten during installation.
      mkdir -p "$out/lib"
      ln -s "$PWD/libupower-glib/libupower-glib.so" "$out/lib/libupower-glib.so.3"
    '';
  
    checkPhase = ''
      runHook preCheck
  
      # Slow fsync calls can make self-test fail:
      # https://gitlab.freedesktop.org/upower/upower/-/issues/195
      eatmydata meson test --print-errorlogs
  
      runHook postCheck
    '';
  
    postInstall = ''
  