anchor.diff:    };
   
     preBuild = ''
  -    substituteInPlace Makefile --replace 'curl $(KERNEL_REMOTE) -o $(KERNEL_TARBALL)' 'ln -s $(kernelSrc) $(KERNEL_TARBALL)'
  +    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 = [ elfutils ];
  +  buildInputs = lib.optionals stdenv.isLinux [ elfutils ];
   
  -  makeFlags = [ "PREFIX=${placeholder "out"}" ]
  -    ++ lib.optional sevVariant "SEV=1";
  +  makeFlags = [
  +    "PREFIX=${placeholder "out"}"
  +    "SONAME_Darwin=-Wl,-install_name,${placeholder "out"}/lib/libkrunfw.dylib"
  +  ] ++ lib.optional sevVariant "SEV=1";
   
     enableParallelBuilding = true;
   
  
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:     homepage = "https://github.com/containers/libkrunfw";
      license = with licenses; [ lgpl2Only lgpl21Only ];
      maintainers = with maintainers; [ nickcao ];
      platforms = [ "x86_64-linux" "aarch64-linux" "aarch64-darwin" ];
    };
  }
  