Merge pull request #211107 from helsinki-systems/upd/win-virtio

win-virtio: 0.1.196-1 -> 0.1.229-1
This commit is contained in:
Nick Cao 2023-05-17 00:46:20 -06:00 committed by GitHub
commit e6e389917a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,40 +1,31 @@
{ lib, stdenv, fetchurl, p7zip }: { lib, stdenv, fetchurl, libarchive }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "win-virtio"; pname = "win-virtio";
version = "0.1.196-1"; version = "0.1.229-1";
dontUnpack = true;
src = fetchurl { src = fetchurl {
url = "https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/archive-virtio/virtio-win-${version}/virtio-win.iso"; url = "https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/archive-virtio/virtio-win-${version}/virtio-win.iso";
sha256 = "1zj53xybygps66m3v5kzi61vqy987zp6bfgk0qin9pja68qq75vx"; hash = "sha256-yIoN3jRgXq7mz4ifPioMKvPK65G130WhJcpPcBrLu+A=";
}; };
buildPhase = '' nativeBuildInputs = [
runHook preBuild libarchive
${p7zip}/bin/7z x $src
runHook postBuild
'';
installPhase =
let
copy = arch: version: {input, output}: "mkdir -p $out/${arch}/${output}; cp ${input}/${version}/${arch}/* $out/${arch}/${output}/.";
virtio = [{input="Balloon"; output="vioballoon";}
{input="NetKVM"; output="vionet";}
{input="vioscsi"; output="vioscsi";}
{input="vioserial"; output="vioserial";}
{input="viostor"; output="viostor";}
{input="viorng"; output="viorng";}
]; ];
in ''
unpackCmd = "mkdir source; bsdtar -xf $curSrc -C source";
installPhase = ''
runHook preInstall runHook preInstall
${lib.concatStringsSep "\n" ((map (copy "amd64" "w10") virtio) ++ (map (copy "x86" "w10") virtio))}
mkdir -p $out
cp -R ./. $out/
runHook postInstall runHook postInstall
''; '';
meta = with lib; { meta = with lib; {
description = "Windows VirtIO Drivers"; description = "Windows VirtIO Drivers";
homepage = "https://fedoraproject.org/wiki/Windows_Virtio_Drivers"; homepage = "https://docs.fedoraproject.org/en-US/quick-docs/creating-windows-virtual-machines-using-virtio-drivers/index.html";
license = [ licenses.bsd3 ]; license = [ licenses.bsd3 ];
maintainers = [ ]; maintainers = [ ];
platforms = platforms.linux; platforms = platforms.linux;