libkrun: 1.11.2 -> 1.15.1

Diff: https://github.com/containers/libkrun/compare/v1.11.2...v1.15.1

Nick Cao d442cbb8 766cbeb0

+32 -18
+30 -17
pkgs/by-name/li/libkrun/package.nix
··· 14 14 libkrunfw, 15 15 rustc, 16 16 withBlk ? false, 17 + withNet ? false, 17 18 withGpu ? false, 18 19 withSound ? false, 19 - withNet ? false, 20 - sevVariant ? false, 20 + withTimesync ? false, 21 + variant ? null, 21 22 }: 22 23 24 + assert lib.elem variant [ 25 + null 26 + "sev" 27 + "tdx" 28 + ]; 29 + 30 + let 31 + libkrunfw' = (libkrunfw.override { inherit variant; }); 32 + in 23 33 stdenv.mkDerivation (finalAttrs: { 24 - pname = "libkrun"; 25 - version = "1.11.2"; 34 + pname = "libkrun" + lib.optionalString (variant != null) "-${variant}"; 35 + version = "1.15.1"; 26 36 27 37 src = fetchFromGitHub { 28 38 owner = "containers"; 29 39 repo = "libkrun"; 30 40 tag = "v${finalAttrs.version}"; 31 - hash = "sha256-B11f7uG/oODwkME2rauCFbVysxUtUrUmd6RKeuBdnUU="; 41 + hash = "sha256-VhlFyYJ/TH12I3dUq0JTus60rQEJq5H4Pm1puCnJV5A="; 32 42 }; 33 43 34 44 outputs = [ ··· 38 48 39 49 cargoDeps = rustPlatform.fetchCargoVendor { 40 50 inherit (finalAttrs) src; 41 - hash = "sha256-bcHy8AfO9nzSZKoFlEpPKvwupt3eMb+A2rHDaUzO3/U="; 51 + hash = "sha256-dK3V7HCCvTqmQhB5Op2zmBPa9FO3h9gednU9tpQk+1U="; 42 52 }; 43 53 44 54 # Make sure libkrunfw can be found by dlopen() 45 - # FIXME: This wasn't needed previously. What changed? 46 55 env.RUSTFLAGS = toString ( 47 56 map (flag: "-C link-arg=" + flag) [ 48 57 "-Wl,--push-state,--no-as-needed" 49 - (if sevVariant then "-lkrunfw-sev" else "-lkrunfw") 58 + ("-lkrunfw" + lib.optionalString (variant != null) "-${variant}") 50 59 "-Wl,--pop-state" 51 60 ] 52 61 ); ··· 57 66 cargo 58 67 rustc 59 68 ] 60 - ++ lib.optional (sevVariant || withGpu) pkg-config; 69 + ++ lib.optional (variant == "sev" || variant == "tdx" || withGpu) pkg-config; 61 70 62 71 buildInputs = [ 63 - (libkrunfw.override { variant = if sevVariant then "sev" else null; }) 72 + libkrunfw' 64 73 glibc 65 74 glibc.static 66 75 ] ··· 70 79 virglrenderer 71 80 ] 72 81 ++ lib.optional withSound pipewire 73 - ++ lib.optional sevVariant openssl; 82 + ++ lib.optional (variant == "sev" || variant == "tdx") openssl; 74 83 75 84 makeFlags = [ 76 85 "PREFIX=${placeholder "out"}" 77 86 ] 78 87 ++ lib.optional withBlk "BLK=1" 88 + ++ lib.optional withNet "NET=1" 79 89 ++ lib.optional withGpu "GPU=1" 80 90 ++ lib.optional withSound "SND=1" 81 - ++ lib.optional withNet "NET=1" 82 - ++ lib.optional sevVariant "SEV=1"; 91 + ++ lib.optional withTimesync "TIMESYNC=1" 92 + ++ lib.optional (variant == "sev") "SEV=1" 93 + ++ lib.optional (variant == "tdx") "TDX=1"; 83 94 84 95 postInstall = '' 85 96 mkdir -p $dev/lib/pkgconfig ··· 87 98 mv $out/include $dev/ 88 99 ''; 89 100 90 - meta = with lib; { 101 + env.OPENSSL_NO_VENDOR = true; 102 + 103 + meta = { 91 104 description = "Dynamic library providing Virtualization-based process isolation capabilities"; 92 105 homepage = "https://github.com/containers/libkrun"; 93 - license = licenses.asl20; 94 - maintainers = with maintainers; [ 106 + license = lib.licenses.asl20; 107 + maintainers = with lib.maintainers; [ 95 108 nickcao 96 109 RossComputerGuy 97 110 nrabulinski 98 111 ]; 99 - platforms = libkrunfw.meta.platforms; 112 + platforms = libkrunfw'.meta.platforms; 100 113 }; 101 114 })
+2 -1
pkgs/top-level/all-packages.nix
··· 10515 10515 10516 10516 jool-cli = callPackage ../os-specific/linux/jool/cli.nix { }; 10517 10517 10518 - libkrun-sev = libkrun.override { sevVariant = true; }; 10518 + libkrun-sev = libkrun.override { variant = "sev"; }; 10519 + libkrun-tdx = libkrun.override { variant = "tdx"; }; 10519 10520 10520 10521 linthesia = callPackage ../games/linthesia/default.nix { }; 10521 10522