16 stdenv.mkDerivation (finalAttrs: {
20 src = fetchFromGitHub {
23 tag = "v${finalAttrs.version}";
24 hash = "sha256-GFfBiGMOyBwMKjpD1kj3vRpvjR0ydji3QNDyoOQoQsw=";
27 kernelSrc = fetchurl {
28 url = "mirror://kernel/linux/kernel/v6.x/linux-6.6.59.tar.xz";
29 hash = "sha256-I2FoCNjAjxKBX/iY9O20wROXorKEPQKe5iRS0hgzp20=";
33 substituteInPlace Makefile \
34 --replace 'curl $(KERNEL_REMOTE) -o $(KERNEL_TARBALL)' 'ln -s $(kernelSrc) $(KERNEL_TARBALL)'
44 python3.pkgs.pyelftools
53 "PREFIX=${placeholder "out"}"
55 ++ lib.optionals sevVariant [
59 # Fixes https://github.com/containers/libkrunfw/issues/55
60 NIX_CFLAGS_COMPILE = lib.optionalString stdenv.targetPlatform.isAarch64 "-march=armv8-a+crypto";
62 enableParallelBuilding = true;
65 description = "Dynamic library bundling the guest payload consumed by libkrun";
66 homepage = "https://github.com/containers/libkrunfw";
67 license = with licenses; [
71 maintainers = with maintainers; [
75 platforms = [ "x86_64-linux" ] ++ lib.optionals (!sevVariant) [ "aarch64-linux" ];