win-pvdrivers: unstable-2015-07-01 -> unstable-2023-08-17

+62 -19
+62 -19
pkgs/applications/virtualization/driver/win-pvdrivers/default.nix
··· 1 - { lib, stdenv, fetchFromGitHub }: 1 + { lib, stdenv, fetchurl }: 2 + 3 + let 4 + # Upstream versioned download links are broken 5 + # NOTE: the archive.org timestamp must be updated if the version changes. 6 + # See https://xenproject.org/downloads/ 7 + files = [ 8 + { 9 + url = "https://web.archive.org/web/20230817070451if_/https://xenbits.xenproject.org/pvdrivers/win/xenbus.tar"; 10 + hash = "sha256-sInkbVL/xkoUeZxgknLM3e2AXBVSqItF2Vpkon53Xec="; 11 + } 12 + { 13 + url = "https://web.archive.org/web/20230817070811if_/https://xenbits.xenproject.org/pvdrivers/win/xencons.tar"; 14 + hash = "sha256-r8bxH5B4y0V9qgALi42KtpZW05UOevv29AqqXaIXMBo="; 15 + } 16 + { 17 + url = "https://web.archive.org/web/20230817070811if_/https://xenbits.xenproject.org/pvdrivers/win/xenhid.tar"; 18 + hash = "sha256-e7ztzaXi/6irMus9IH0cfbW5HiKSaybXV1C/rd5mEfA="; 19 + } 20 + { 21 + url = "https://web.archive.org/web/20230817071133if_/https://xenbits.xenproject.org/pvdrivers/win/xeniface.tar"; 22 + hash = "sha256-qPM0TjcGR2luPtOSAfXJ22k6yhwJOmOP3ot6kopEFsI="; 23 + } 24 + { 25 + url = "https://web.archive.org/web/20230817071134if_/https://xenbits.xenproject.org/pvdrivers/win/xennet.tar"; 26 + hash = "sha256-Vg1wSfXjIVRd2iXCa19W4Jdaf2LTVin0yac/D70UjPM="; 27 + } 28 + { 29 + url = "https://web.archive.org/web/20230817070811if_/https://xenbits.xenproject.org/pvdrivers/win/xenvbd.tar"; 30 + hash = "sha256-nLNM0TWqsEWiQBCYxARMldvRecRUcY5DBF5DNAG4490="; 31 + } 32 + { 33 + url = "https://web.archive.org/web/20230817071225if_/https://xenbits.xenproject.org/pvdrivers/win/xenvif.tar"; 34 + hash = "sha256-R8G5vG6Q4g0/UkA2oxcc9/jaHZQYb+u64NShCNt7s7U="; 35 + } 36 + { 37 + url = "https://web.archive.org/web/20230817071153if_/https://xenbits.xenproject.org/pvdrivers/win/xenvkbd.tar"; 38 + hash = "sha256-CaSxCKnT/KaZw8Ma60g2z+4lOOWIRisGRtzMveQqQmM="; 39 + } 40 + ]; 2 41 42 + in 3 43 stdenv.mkDerivation { 4 44 pname = "win-pvdrivers"; 5 - version = "unstable-2015-07-01"; 45 + version = "unstable-2023-08-17"; 6 46 7 - src = fetchFromGitHub { 8 - owner = "ts468"; 9 - repo = "win-pvdrivers"; 10 - rev = "3054d645fc3ee182bea3e97ff01869f01cc3637a"; 11 - sha256 = "6232ca2b7c9af874abbcb9262faf2c74c819727ed2eb64599c790879df535106"; 12 - }; 47 + srcs = map ({hash, url}: fetchurl { 48 + inherit hash url; 49 + # Wait & retry up to 3 times as archive.org can closes connection 50 + # when an HTTP client makes too many requests 51 + curlOpts = "--retry 3 --retry-delay 5"; 52 + }) files; 13 53 14 - buildPhase = 15 - let unpack = x: "tar xf $src/${x}.tar; mkdir -p x86/${x} amd64/${x}; cp ${x}/x86/* x86/${x}/.; cp ${x}/x64/* amd64/${x}/."; 16 - in lib.concatStringsSep "\n" (map unpack [ "xenbus" "xeniface" "xenvif" "xennet" "xenvbd" ]); 17 54 18 - installPhase = '' 19 - mkdir -p $out 20 - cp -r x86 $out/. 21 - cp -r amd64 $out/. 55 + unpackPhase = '' 56 + runHook preUnpack 57 + 58 + for _src in $srcs; do 59 + mkdir -p $out 60 + tar xfv $_src -C $out 61 + done 62 + 63 + runHook postUnpack 22 64 ''; 23 65 24 66 meta = with lib; { 25 - description = "Xen Subproject: Windows PV Driver"; 26 - homepage = "http://xenproject.org/downloads/windows-pv-drivers.html"; 27 - maintainers = with maintainers; [ ]; 67 + description = "Xen Subproject: Windows PV Drivers"; 68 + homepage = "https://xenproject.org/developers/teams/windows-pv-drivers/"; 69 + license = licenses.bsd2; 70 + maintainers = with maintainers; [ anthonyroussel ]; 28 71 platforms = platforms.linux; 29 - license = licenses.bsd3; 72 + sourceProvenance = with sourceTypes; [ binaryNativeCode ]; 30 73 }; 31 74 }