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