anchor.diff:    '';
   
     preBuild = ''
  -    # unpack vendor
  -    pushd go/src/github.com/lxc/lxd
  -    rm _dist/src/github.com/lxc/lxd
  -    cp -r _dist/src/* ../../..
  -    popd
  -
       # required for go-dqlite. See: https://github.com/lxc/lxd/pull/8939
       export CGO_LDFLAGS_ALLOW="(-Wl,-wrap,pthread_create)|(-Wl,-z,now)"
   
  
positive.code: in
  buildGoPackage rec {
    pname = "lxd";
    version = "4.17";
  
    goPackagePath = "github.com/lxc/lxd";
  
    src = fetchurl {
      url = "https://linuxcontainers.org/downloads/lxd/lxd-${version}.tar.gz";
      sha256 = "1kzmgyg5kw3zw9qa6jabld6rmb53b6yy69h7y9znsdlf74jllljl";
    };
  
    postPatch = ''
  
negative.code: { lib, hwdata, pkg-config, lxc, buildGoPackage, fetchurl
  , makeWrapper, acl, rsync, gnutar, xz, btrfs-progs, gzip, dnsmasq, attr
  , squashfsTools, iproute2, iptables, ebtables, iptables-nftables-compat, libcap
  , dqlite, raft-canonical, sqlite-replication, udev
  , writeShellScriptBin, apparmor-profiles, apparmor-parser
  