2021-01-11 07:54:33 +00:00
|
|
|
{ lib, stdenv, fetchurl, p7zip }:
|
2018-09-17 14:04:51 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 12:41:18 +00:00
|
|
|
pname = "win-virtio";
|
2021-07-28 10:34:19 +00:00
|
|
|
version = "0.1.196-1";
|
2015-07-02 14:38:17 +00:00
|
|
|
|
2021-08-02 21:59:29 +00:00
|
|
|
dontUnpack = true;
|
2015-07-02 14:38:17 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2018-09-17 14:04:51 +00:00
|
|
|
url = "https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/archive-virtio/virtio-win-${version}/virtio-win.iso";
|
2021-07-28 10:34:19 +00:00
|
|
|
sha256 = "1zj53xybygps66m3v5kzi61vqy987zp6bfgk0qin9pja68qq75vx";
|
2015-07-02 14:38:17 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
buildPhase = ''
|
2021-07-28 10:34:19 +00:00
|
|
|
runHook preBuild
|
2015-07-02 14:38:17 +00:00
|
|
|
${p7zip}/bin/7z x $src
|
2021-07-28 10:34:19 +00:00
|
|
|
runHook postBuild
|
|
|
|
'';
|
2015-07-02 14:38:17 +00:00
|
|
|
|
|
|
|
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";}
|
|
|
|
];
|
2021-07-28 10:34:19 +00:00
|
|
|
in ''
|
|
|
|
runHook preInstall
|
|
|
|
${lib.concatStringsSep "\n" ((map (copy "amd64" "w10") virtio) ++ (map (copy "x86" "w10") virtio))}
|
|
|
|
runHook postInstall
|
|
|
|
'';
|
2015-07-02 14:38:17 +00:00
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2015-07-02 14:38:17 +00:00
|
|
|
description = "Windows VirtIO Drivers";
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://fedoraproject.org/wiki/Windows_Virtio_Drivers";
|
2021-07-28 10:34:19 +00:00
|
|
|
license = [ licenses.bsd3 ];
|
2015-07-02 14:38:17 +00:00
|
|
|
maintainers = [ maintainers.tstrobel ];
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|