anchor.diff:  { lib
  -, stdenv
  +, autoreconfHook
  +, bash-completion
  +, bridge-utils
  +, cmake
  +, coreutils
  +, curl
  +, darwin
  +, dbus
  +, dnsmasq
  +, docutils
  +, fetchFromGitLab
   , fetchurl
  -, fetchFromGitLab
  -, makeWrapper
  -, autoreconfHook
  -, fetchpatch
  -, coreutils
  -, libxml2
  +, gettext
  +, glib
   , gnutls
  -, perl
  -, python3
  -, attr
  -, glib
  -, docutils
   , iproute2
  -, readline
  -, lvm2
  -, util-linux
  -, systemd
  -, libpciaccess
  -, gettext
  -, libtasn1
   , iptables
   , libgcrypt
  -, yajl
  -, pmutils
  -, libcap_ng
  -, libapparmor
  -, dnsmasq
  -, libnl
   , libpcap
  +, libtasn1
  +, libxml2
   , libxslt
  -, xhtml1
  -, numad
  -, numactl
  -, perlPackages
  -, curl
  -, parted
  -, bridge-utils
  -, dmidecode
  -, dbus
  -, libtirpc
  -, rpcsvc-proto
  -, darwin
  +, makeWrapper
   , meson
   , ninja
  -, audit
  -, cmake
  -, bash-completion
  +, perl
  +, perlPackages
   , pkg-config
  -, enableCeph ? false, ceph ? null
  -, enableGlusterfs ? false, glusterfs ? null
  -, enableIscsi ? false, openiscsi ? null
  -, enableXen ? false, xen ? null
  -, enableZfs ? true, zfs ? null
  -# Darwin
  -, gmp
  -, libiconv
  +, pmutils
  +, python3
  +, readline
  +, rpcsvc-proto
  +, stdenv
  +, xhtml1
  +, yajl
  +
  +  # Linux
  +, acl ? null
  +, attr ? null
  +, audit ? null
  +, dmidecode ? null
  +, fuse ? null
  +, kmod ? null
  +, libapparmor ? null
  +, libcap_ng ? null
  +, libnl ? null
  +, libpciaccess ? null
  +, libtirpc ? null
  +, lvm2 ? null
  +, numactl ? null
  +, numad ? null
  +, parted ? null
  +, systemd ? null
  +, util-linux ? null
  +
  +  # Darwin
  +, gmp ? null
  +, libiconv ? null
   , Carbon ? null
   , AppKit ? null
  +
  +  # Options
  +, enableCeph ? false
  +, ceph ? null
  +, enableGlusterfs ? false
  +, glusterfs ? null
  +, enableIscsi ? false
  +, openiscsi ? null
  +, libiscsi ? null
  +, enableXen ? false
  +, xen ? null
  +, enableZfs ? stdenv.isLinux
  +, zfs ? null
   }:
   
   with lib;
   
  -assert enableXen -> stdenv.isLinux && stdenv.isx86_64;
  -assert enableCeph -> stdenv.isLinux;
  -assert enableGlusterfs -> stdenv.isLinux;
  -assert enableZfs -> stdenv.isLinux;
  +let
  +  inherit (stdenv) isDarwin isLinux isx86_64;
  +  binPath = makeBinPath ([
  +    dnsmasq
  +  ] ++ optionals isLinux [
  +    bridge-utils
  +    dmidecode
  +    dnsmasq
  +    iproute2
  +    iptables
  +    kmod
  +    lvm2
  +    numactl
  +    numad
  +    pmutils
  +    systemd
  +  ] ++ optionals enableIscsi [
  +    libiscsi
  +    openiscsi
  +  ]);
  +in
  +
  +assert enableXen -> isLinux && isx86_64;
  +assert enableCeph -> isLinux;
  +assert enableGlusterfs -> isLinux;
  +assert enableZfs -> isLinux;
   
   # if you update, also bump <nixpkgs/pkgs/development/python-modules/libvirt/default.nix> and SysVirt in <nixpkgs/pkgs/top-level/perl-packages.nix>
  -let
  -  buildFromTarball = stdenv.isDarwin;
  -in
   stdenv.mkDerivation rec {
     pname = "libvirt";
     version = "8.1.0";
   
     src =
  -    if buildFromTarball then
  +    if isDarwin then
         fetchurl
           {
             url = "https://libvirt.org/sources/${pname}-${version}.tar.xz";
  
positive.code:     '';
      license = licenses.lgpl2Plus;
      platforms = platforms.unix;
      maintainers = with maintainers; [ fpletz globin ];
    };
  }
  
negative.code:   ];
  
    nativeBuildInputs = [
      meson
  
      cmake
      docutils
      makeWrapper
      ninja
      pkg-config
    ]
    ++ optional (!isDarwin) rpcsvc-proto
    # NOTE: needed for rpcgen
    ++ optional isDarwin darwin.developer_cmds;
  
    buildInputs = [
      bash-completion
      curl
      dbus
      gettext
      glib
      gnutls
      libgcrypt
      libpcap
      libtasn1
      libxml2
      libxslt
      perl
      perlPackages.XMLXPath
      pkg-config
      python3
      readline
      xhtml1
      yajl
    ] ++ optionals isLinux [
      acl
      attr
      audit
      fuse
      libapparmor
      libcap_ng
      libnl
      libpciaccess
      libtirpc
      lvm2
      numactl
      numad
      parted
      systemd
      util-linux
    ] ++ optionals isDarwin [
      AppKit
      Carbon
      gmp
      libiconv
    ]
    ++ optionals enableCeph [ ceph ]
    ++ optionals enableGlusterfs [ glusterfs ]
    ++ optionals enableIscsi [ libiscsi openiscsi ]
    ++ optionals enableXen [ xen ]
    ++ optionals enableZfs [ zfs ];
  
    preConfigure =
      let
  