diff --git a/pkgs/applications/virtualization/driver/win-pvdrivers/default.nix b/pkgs/applications/virtualization/driver/win-pvdrivers/default.nix index 903eb132738a..f2ab0d8f4e78 100644 --- a/pkgs/applications/virtualization/driver/win-pvdrivers/default.nix +++ b/pkgs/applications/virtualization/driver/win-pvdrivers/default.nix @@ -1,31 +1,74 @@ -{ lib, stdenv, fetchFromGitHub }: +{ lib, stdenv, fetchurl }: +let + # Upstream versioned download links are broken + # NOTE: the archive.org timestamp must be updated if the version changes. + # See https://xenproject.org/downloads/ + files = [ + { + url = "https://web.archive.org/web/20230817070451if_/https://xenbits.xenproject.org/pvdrivers/win/xenbus.tar"; + hash = "sha256-sInkbVL/xkoUeZxgknLM3e2AXBVSqItF2Vpkon53Xec="; + } + { + url = "https://web.archive.org/web/20230817070811if_/https://xenbits.xenproject.org/pvdrivers/win/xencons.tar"; + hash = "sha256-r8bxH5B4y0V9qgALi42KtpZW05UOevv29AqqXaIXMBo="; + } + { + url = "https://web.archive.org/web/20230817070811if_/https://xenbits.xenproject.org/pvdrivers/win/xenhid.tar"; + hash = "sha256-e7ztzaXi/6irMus9IH0cfbW5HiKSaybXV1C/rd5mEfA="; + } + { + url = "https://web.archive.org/web/20230817071133if_/https://xenbits.xenproject.org/pvdrivers/win/xeniface.tar"; + hash = "sha256-qPM0TjcGR2luPtOSAfXJ22k6yhwJOmOP3ot6kopEFsI="; + } + { + url = "https://web.archive.org/web/20230817071134if_/https://xenbits.xenproject.org/pvdrivers/win/xennet.tar"; + hash = "sha256-Vg1wSfXjIVRd2iXCa19W4Jdaf2LTVin0yac/D70UjPM="; + } + { + url = "https://web.archive.org/web/20230817070811if_/https://xenbits.xenproject.org/pvdrivers/win/xenvbd.tar"; + hash = "sha256-nLNM0TWqsEWiQBCYxARMldvRecRUcY5DBF5DNAG4490="; + } + { + url = "https://web.archive.org/web/20230817071225if_/https://xenbits.xenproject.org/pvdrivers/win/xenvif.tar"; + hash = "sha256-R8G5vG6Q4g0/UkA2oxcc9/jaHZQYb+u64NShCNt7s7U="; + } + { + url = "https://web.archive.org/web/20230817071153if_/https://xenbits.xenproject.org/pvdrivers/win/xenvkbd.tar"; + hash = "sha256-CaSxCKnT/KaZw8Ma60g2z+4lOOWIRisGRtzMveQqQmM="; + } + ]; + +in stdenv.mkDerivation { pname = "win-pvdrivers"; - version = "unstable-2015-07-01"; + version = "unstable-2023-08-17"; - src = fetchFromGitHub { - owner = "ts468"; - repo = "win-pvdrivers"; - rev = "3054d645fc3ee182bea3e97ff01869f01cc3637a"; - sha256 = "6232ca2b7c9af874abbcb9262faf2c74c819727ed2eb64599c790879df535106"; - }; + srcs = map ({hash, url}: fetchurl { + inherit hash url; + # Wait & retry up to 3 times as archive.org can closes connection + # when an HTTP client makes too many requests + curlOpts = "--retry 3 --retry-delay 5"; + }) files; - buildPhase = - let unpack = x: "tar xf $src/${x}.tar; mkdir -p x86/${x} amd64/${x}; cp ${x}/x86/* x86/${x}/.; cp ${x}/x64/* amd64/${x}/."; - in lib.concatStringsSep "\n" (map unpack [ "xenbus" "xeniface" "xenvif" "xennet" "xenvbd" ]); - installPhase = '' - mkdir -p $out - cp -r x86 $out/. - cp -r amd64 $out/. + unpackPhase = '' + runHook preUnpack + + for _src in $srcs; do + mkdir -p $out + tar xfv $_src -C $out + done + + runHook postUnpack ''; meta = with lib; { - description = "Xen Subproject: Windows PV Driver"; - homepage = "http://xenproject.org/downloads/windows-pv-drivers.html"; - maintainers = with maintainers; [ ]; + description = "Xen Subproject: Windows PV Drivers"; + homepage = "https://xenproject.org/developers/teams/windows-pv-drivers/"; + license = licenses.bsd2; + maintainers = with maintainers; [ anthonyroussel ]; platforms = platforms.linux; - license = licenses.bsd3; + sourceProvenance = with sourceTypes; [ binaryNativeCode ]; }; } diff --git a/pkgs/applications/virtualization/driver/win-signed-gplpv-drivers/default.nix b/pkgs/applications/virtualization/driver/win-signed-gplpv-drivers/default.nix deleted file mode 100644 index 7a5cd39a1840..000000000000 --- a/pkgs/applications/virtualization/driver/win-signed-gplpv-drivers/default.nix +++ /dev/null @@ -1,47 +0,0 @@ -{ lib, stdenv, fetchurl, p7zip }: - -let - src_x86 = fetchurl { - url = "http://apt.univention.de/download/addons/gplpv-drivers/gplpv_Vista2008x32_signed_0.11.0.373.msi"; - sha256 = "04r11xw8ikjmcdhrsk878c86g0d0pvras5arsas3zs6dhgjykqap"; - }; - - src_amd64 = fetchurl { - url = "http://apt.univention.de/download/addons/gplpv-drivers/gplpv_Vista2008x64_signed_0.11.0.373.msi"; - sha256 = "00k628mg9b039p8lmg2l9n81dr15svy70p3m6xmq6f0frmci38ph"; - }; -in - -stdenv.mkDerivation { - pname = "gplpv"; - version = "0.11.0.373"; - - dontUnpack = true; - - buildPhase = '' - mkdir -p x86 - (cd x86; ${p7zip}/bin/7z e ${src_x86}) - mkdir -p amd64 - (cd amd64; ${p7zip}/bin/7z e ${src_amd64}) - ''; - - installPhase = '' - mkdir -p $out/x86 $out/amd64 - cp x86/* $out/x86/. - cp amd64/* $out/amd64/. - ''; - - meta = with lib; { - description = '' - A collection of open source Window PV drivers that allow - Windows to be para-virtualized. - The drivers are signed by Univention with a Software Publishers - Certificate obtained from the VeriSign CA. - ''; - homepage = "http://wiki.univention.de/index.php?title=Installing-signed-GPLPV-drivers"; - maintainers = [ ]; - sourceProvenance = with sourceTypes; [ binaryNativeCode ]; - platforms = platforms.linux; - license = licenses.gpl2; - }; - } diff --git a/pkgs/top-level/aliases.nix b/pkgs/top-level/aliases.nix index c6c74168ac27..26d04f3f3d98 100644 --- a/pkgs/top-level/aliases.nix +++ b/pkgs/top-level/aliases.nix @@ -1836,6 +1836,7 @@ mapAliases ({ wineUnstable = throw "'wineUnstable' has been renamed to/replaced by 'winePackages.unstable'"; # Converted to throw 2022-02-22 wineWayland = wine-wayland; win-qemu = throw "'win-qemu' has been replaced by 'win-virtio'"; # Added 2023-08-16 + win-signed-gplpv-drivers = throw "win-signed-gplpv-drivers has been removed from nixpkgs, as it's unmaintained: https://help.univention.com/t/installing-signed-gplpv-drivers/21828"; # Added 2023-08-17 winpdb = throw "winpdb has been removed: abandoned by upstream"; # Added 2022-04-22 winusb = throw "'winusb' has been renamed to/replaced by 'woeusb'"; # Converted to throw 2022-02-22 wireguard = throw "'wireguard' has been renamed to/replaced by 'wireguard-tools'"; # Converted to throw 2022-02-22 diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 83f300da7fe3..3fa2eaa7fb32 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -36511,7 +36511,6 @@ with pkgs; win-spice = callPackage ../applications/virtualization/driver/win-spice { }; win-virtio = callPackage ../applications/virtualization/driver/win-virtio { }; win-pvdrivers = callPackage ../applications/virtualization/driver/win-pvdrivers { }; - win-signed-gplpv-drivers = callPackage ../applications/virtualization/driver/win-signed-gplpv-drivers { }; xfig = callPackage ../applications/graphics/xfig { };