Merge pull request #222278 from NickCao/krun

libkrunfw: 3.9.0 -> 3.10.0, libkrun: 1.5.0 -> 1.5.1
This commit is contained in:
Nick Cao 2023-03-22 16:15:15 +08:00 committed by GitHub
commit fb81cc9c31
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 11 deletions

View file

@ -15,21 +15,21 @@
stdenv.mkDerivation rec {
pname = "libkrun";
version = "1.5.0";
version = "1.5.1";
src = if stdenv.isLinux then fetchFromGitHub {
owner = "containers";
repo = pname;
rev = "v${version}";
hash = "sha256-3WYxGpZ3uRbnh/VEDVSNOxp25SE7GQgC5t3ROuKNRE0=";
hash = "sha256-N9AkG+zkjQHNaaCVrEpMfWUN9bQNHjMA2xi5NUulF5A=";
} else fetchurl {
url = "https://github.com/containers/libkrun/releases/download/v${version}/v${version}-with_macos_prebuilts.tar.gz";
hash = "sha256-T1nYzrzxEJaVBnI00CQPKoT2OYJxdW7y6WNkabNsQYI=";
hash = "sha256-8hPbnZtDbiVdwBrtxt4nZ/QA2OFtui2VsQlaoOmWybo=";
};
cargoDeps = rustPlatform.fetchCargoTarball {
inherit src;
hash = "sha256-Clb6PNwLuzx42Qr1tgpjG1WHq9NcDr2bbfnyp4UVVLU=";
hash = "sha256-nbtp7FP+ObVGfDOEzTt4Z7TZwcNlREczTKIAXGSflZU=";
};
nativeBuildInputs = with rustPlatform; [

View file

@ -13,28 +13,26 @@
assert sevVariant -> stdenv.isx86_64;
stdenv.mkDerivation rec {
pname = "libkrunfw";
version = "3.9.0";
version = "3.10.0";
src = if stdenv.isLinux then fetchFromGitHub {
owner = "containers";
repo = pname;
rev = "v${version}";
hash = "sha256-hpVE7g6V3nquZ3R5fQCcfRWuFDHJ3rgisezwdsDMaGg=";
hash = "sha256-yL5D8oOGucLWi4kFPxan5Gq+jIkVSDOW/v1+zKg3G+o=";
} else fetchurl {
url = "https://github.com/containers/libkrunfw/releases/download/v${version}/v${version}-with_macos_prebuilts.tar.gz";
hash = "sha256-moZ2LYLhZDb8Y8jgWbdgK6SbJ8lY8f356d5vKHc/54Q=";
hash = "sha256-Q7n+Og+eAnHSQm7kLUN0uV+CKcdtLBYAgt7Q0+CxEfA=";
};
kernelSrc = fetchurl {
url = "https://cdn.kernel.org/pub/linux/kernel/v6.x/linux-6.1.6.tar.xz";
hash = "sha256-Pk2OVh2lcDogWujXsr7WxcZPxCme68v9IEgeY7V9XuM=";
url = "https://cdn.kernel.org/pub/linux/kernel/v6.x/linux-6.2.1.tar.xz";
hash = "sha256-L8wH4ckOpM4Uj1D5vusNygtuSzeado3oq8ekom8lJTQ=";
};
preBuild = ''
substituteInPlace Makefile \
--replace 'curl $(KERNEL_REMOTE) -o $(KERNEL_TARBALL)' 'ln -s $(kernelSrc) $(KERNEL_TARBALL)' \
--replace 'tar xf $(KERNEL_TARBALL)' \
'tar xf $(KERNEL_TARBALL); sed -i "s|/usr/bin/env bash|$(SHELL)|" $(KERNEL_SOURCES)/scripts/check-local-export' \
--replace 'gcc' '$(CC)'
'';