win-spice: 0.11 -> 0.21

This includes updates for three components; usbdk, qxlwddm, and vdagent.

The result is updated support from Windows 8.1 to Windows 10.
This commit is contained in:
Elias N Vasylenko 2021-07-28 11:28:08 +01:00
parent bef9615b61
commit 4e992dcdfc

View file

@ -1,51 +1,56 @@
{ lib, stdenv, fetchurl, p7zip, win-virtio }:
let
version_usbdk = "1.0.22";
src_usbdk_x86 = fetchurl {
url = "https://www.spice-space.org/download/windows/usbdk/UsbDk_1.0.4_x86.msi";
sha256 = "17hv8034wk1xqnanm5jxs4741nl7asps1fdz6lhnrpp6gvj6yg9y";
url = "https://www.spice-space.org/download/windows/UsbDk/UsbDk_${version_usbdk}_x86.msi";
sha256 = "1vr8kv37wz6p3xhawyhwxv0g7y89igkvx30zwmyvlgnkv3h5i317";
};
src_usbdk_amd64 = fetchurl {
url = "https://www.spice-space.org/download/windows/usbdk/UsbDk_1.0.4_x64.msi";
sha256 = "0alcqsivp33pm8sy0lmkvq7m5yh6mmcmxdl39zjxjra67kw8r2sd";
url = "https://www.spice-space.org/download/windows/UsbDk/UsbDk_${version_usbdk}_x64.msi";
sha256 = "19b64jv6pfimd54y0pphbs1xh25z41bbblz64ih6ag71w6azdxli";
};
version_qxlwddm = "0.21";
src_qxlwddm = fetchurl {
url = "https://people.redhat.com/~vrozenfe/qxlwddm/qxlwddm-0.11.zip";
sha256 = "082zdpbh9i3bq2ds8g33rcbcw390jsm7cqf46rrlx02x8r03dm98";
url = "https://www.spice-space.org/download/windows/qxl-wddm-dod/qxl-wddm-dod-${version_qxlwddm}/spice-qxl-wddm-dod-${version_qxlwddm}.zip";
sha256 = "0yjq54gxw3lcfghsfs4fzwipa9sgx5b1sn3fss6r5dm7pdvjp20q";
};
version_vdagent = "0.10.0";
src_vdagent_x86 = fetchurl {
url = "https://www.spice-space.org/download/windows/vdagent/vdagent-win-0.7.3/vdagent_0_7_3_x86.zip";
sha256 = "0d928g49rf4dl79jmvnqh6g864hp1flw1f0384sfp82himm3bxjs";
url = "https://www.spice-space.org/download/windows/vdagent/vdagent-win-${version_vdagent}/vdagent-win-${version_vdagent}-x86.zip";
sha256 = "142c0lqsqry9dclji2225ppclkn13gbjl1j0pzx8fp6hgy4i02c1";
};
src_vdagent_amd64 = fetchurl {
url = "https://www.spice-space.org/download/windows/vdagent/vdagent-win-0.7.3/vdagent_0_7_3_x64.zip";
sha256 = "0djmvm66jcmcyhhbjppccbai45nqpva7vyvry6w8nyc0fwi1vm9l";
url = "https://www.spice-space.org/download/windows/vdagent/vdagent-win-${version_vdagent}/vdagent-win-${version_vdagent}-x64.zip";
sha256 = "1x2wcvld531kv17a4ks7sh67nhzxzv7nkhpx391n5vj6d12i8g3i";
};
in
stdenv.mkDerivation {
# use version number of qxlwddm as qxlwddm is the most important component
name = "win-spice-0.11";
version = "0.11";
pname = "win-spice";
version = version_qxlwddm;
phases = [ "buildPhase" "installPhase" ];
dontUnpack = true;
buildPhase = ''
runHook preBuild
mkdir -p usbdk/x86 usbdk/amd64
(cd usbdk/x86; ${p7zip}/bin/7z x -y ${src_usbdk_x86})
(cd usbdk/amd64; ${p7zip}/bin/7z x -y ${src_usbdk_amd64})
mkdir -p vdagent/x86 vdagent/amd64
(cd vdagent/x86; ${p7zip}/bin/7z x -y ${src_vdagent_x86}; mv vdagent_0_7_3_x86/* .; rm -r vdagent_0_7_3_x86)
(cd vdagent/amd64; ${p7zip}/bin/7z x -y ${src_vdagent_amd64}; mv vdagent_0_7_3_x64/* .; rm -r vdagent_0_7_3_x64)
(cd vdagent/x86; ${p7zip}/bin/7z x -y ${src_vdagent_x86}; mv vdagent-win-${version_vdagent}-x86/* .; rm -r vdagent-win-${version_vdagent}-x86)
(cd vdagent/amd64; ${p7zip}/bin/7z x -y ${src_vdagent_amd64}; mv vdagent-win-${version_vdagent}-x64/* .; rm -r vdagent-win-${version_vdagent}-x64)
mkdir -p qxlwddm
(cd qxlwddm; ${p7zip}/bin/7z x -y ${src_qxlwddm}; mv Win8 w8.1; cd w8.1; mv x64 amd64)
'';
(cd qxlwddm; ${p7zip}/bin/7z x -y ${src_qxlwddm}; cd w10)
runHook postBuild
'';
installPhase =
let
@ -57,8 +62,11 @@ stdenv.mkDerivation {
# That way it would never matter whether vioserial is installed from win-virtio or win-spice.
copy_vioserial = arch: "mkdir -p $out/${arch}/vioserial; cp ${win-virtio}/${arch}/vioserial/* $out/${arch}/vioserial/. \n";
copy = arch: version: (copy_qxl arch version) + (copy_usbdk arch) + (copy_vdagent arch) + (copy_vioserial arch);
in
(copy "amd64" "w8.1") + (copy "x86" "w8.1");
in ''
runHook preInstall
${(copy "amd64" "w10") + (copy "x86" "w10")}
runHook postInstall
'';
meta = with lib; {
description = "Windows SPICE Drivers";