anchor.diff:      homepage = "https://github.com/containers/libkrunfw";
       license = with licenses; [ lgpl2Only lgpl21Only ];
       maintainers = with maintainers; [ nickcao ];
  -    platforms = [ "x86_64-linux" "aarch64-linux" ];
  +    platforms = [ "x86_64-linux" "aarch64-linux" "aarch64-darwin" ];
     };
   }
  
positive.code:   pname = "libkrunfw";
    version = "3.3.0";
  
    src = fetchFromGitHub {
      owner = "containers";
      repo = pname;
      rev = "v${version}";
      hash = "sha256-ay+E5AgJeA0i3T4JDosDawwtezDGquzAvYEWHGbPidg=";
    };
  
    kernelSrc = fetchurl {
  
negative.code:   };
  
    preBuild = ''
      substituteInPlace Makefile \
        --replace 'curl $(KERNEL_REMOTE) -o $(KERNEL_TARBALL)' 'ln -s $(kernelSrc) $(KERNEL_TARBALL)' \
        --replace 'gcc' '$(CC)'
    '';
  
    nativeBuildInputs = [ flex bison bc python3 python3.pkgs.pyelftools ];
    buildInputs = lib.optionals stdenv.isLinux [ elfutils ];
  
    makeFlags = [
      "PREFIX=${placeholder "out"}"
      "SONAME_Darwin=-Wl,-install_name,${placeholder "out"}/lib/libkrunfw.dylib"
    ] ++ lib.optional sevVariant "SEV=1";
  
    enableParallelBuilding = true;
  
  