anchor.diff:    # doCheck = true;
   
     preFixup = let
  -    binPath = [ efibootmgr bubblewrap tpm2-tools ] ++ stdenv.lib.optional haveFlashrom flashrom;
  -  in
  -  ''
  +    binPath = [
  +      efibootmgr
  +      bubblewrap
  +      tpm2-tools
  +    ] ++ stdenv.lib.optional haveFlashrom flashrom;
  +  in ''
       gappsWrapperArgs+=(
         --prefix XDG_DATA_DIRS : "${shared-mime-info}/share"
         # See programs reached with fu_common_find_program_in_path in source
  
positive.code:   # only redfish for x86_64
    haveRedfish = stdenv.isx86_64;
  
    # Currently broken on Aarch64
    haveFlashrom = isx86;
  
  in stdenv.mkDerivation rec {
    pname = "fwupd";
    version = "1.2.8";
  
    src = fetchurl {
      url = "https://people.freedesktop.org/~hughsient/releases/fwupd-${version}.tar.xz";
      sha256 = "0qbvq52c0scn1h99i1rf2la6rrhckin6gb02k7l0v3g07mxs20wc";
    };
  
    outputs = [ "out" "lib" "dev" "devdoc" "man" "installedTests" ];
  
    nativeBuildInputs = [
      meson ninja gtk-doc pkgconfig gobject-introspection intltool shared-mime-info
      valgrind gcab docbook_xml_dtd_43 docbook_xsl help2man libxslt python wrapGAppsHook vala
    ];
  
    buildInputs = [
      polkit libxmlb gusb sqlite libarchive libsoup elfutils gnu-efi libyaml
      libgudev colord gpgme libuuid gnutls glib-networking json-glib umockdev
      bash-completion cairo freetype fontconfig pango efivar
    ] ++ stdenv.lib.optionals haveDell [ libsmbios ];
  
    patches = [
      ./fix-paths.patch
  
negative.code:       "pki/fwupd-metadata/GPG-KEY-Linux-Vendor-Firmware-Service"
        "pki/fwupd-metadata/LVFS-CA.pem"
      ];
  
      tests = {
        installedTests = nixosTests.fwupd;
      };
    };
  
    meta = with stdenv.lib; {
      homepage = https://fwupd.org/;
      maintainers = with maintainers; [ jtojnar ];
      license = [ licenses.gpl2 ];
      platforms = platforms.linux;
    };
  