anchor.diff:      "--localstatedir=/var"
       "--sysconfdir=/etc"
       "--disable-maintainer-mode"
  -    "--${boolEn (gobject-introspection != null)}-introspection"
  +    "--enable-introspection"
       "--enable-deprecated"
       "--enable-manpages"
  -    "--disable-gtk-doc"
  -    "--disable-gtk-doc-html"
  -    "--disable-gtk-doc-pdf"
  -    "--disable-tests"
  -    "--enable-nls"
       "--with-backend=linux"
  -    "--${boolWt (libimobiledevice != null)}-idevice"
  +    "--enable-idevice"
     ];
   
     preInstall = ''
  
positive.code:       "sysconfdir=$out/etc"
      )
    '';
  
    meta = with lib; {
      description = "A D-Bus service for power management";
  
negative.code: }:
  
  let
    version = "0.99.10";
    # Upstream only publishes tarballs on gitlab in the release notes and does
    # not use the links api.
    id = "c438511024b9bc5a904f8775cfc8e4c4";
  in
  stdenv.mkDerivation rec {
    name = "upower-${version}";
  
    src = fetchurl {
      url = "https://gitlab.freedesktop.org/upower/upower/uploads/${id}/"
        + "${name}.tar.xz";
      multihash = "QmV3e555Mjxf6ZanYgk6qZzWhurtessjBrXvHg9vePvHH6";
      hashOutput = false;
      sha256 = "642251b97080ede8be6dbfeaf8f30ff6eadd6eb27aa137bc50f5b9b2295ba29d";
    };
  
    nativeBuildInputs = [
  