From a0d914263c75f3d614a3e472bc13da3829aceca5 Mon Sep 17 00:00:00 2001 From: Nicolas Benes Date: Fri, 12 Apr 2024 21:33:07 +0200 Subject: [PATCH] storcli: 7.2309.00 -> 7.2904.00 https://docs.broadcom.com/docs-and-downloads/host-bus-adapters/host-bus-adapters-common-files/sas_sata_nvme_12g_p30/README_STORCLI_SAS3.5_P30.txt --- .../st/storcli/package.nix} | 23 +++++++++++++------ pkgs/top-level/all-packages.nix | 2 -- 2 files changed, 16 insertions(+), 9 deletions(-) rename pkgs/{tools/misc/storcli/default.nix => by-name/st/storcli/package.nix} (57%) diff --git a/pkgs/tools/misc/storcli/default.nix b/pkgs/by-name/st/storcli/package.nix similarity index 57% rename from pkgs/tools/misc/storcli/default.nix rename to pkgs/by-name/st/storcli/package.nix index e5f01b6926c2..bb1e92247663 100644 --- a/pkgs/tools/misc/storcli/default.nix +++ b/pkgs/by-name/st/storcli/package.nix @@ -2,15 +2,17 @@ , stdenvNoCC , fetchzip , rpmextract +, testers }: -stdenvNoCC.mkDerivation rec { +stdenvNoCC.mkDerivation (finalAttrs: { pname = "storcli"; - version = "7.2309.00"; + version = "7.2904.00"; + phase = "30"; src = fetchzip { - url = "https://docs.broadcom.com/docs-and-downloads/raid-controllers/raid-controllers-common-files/Unified_storcli_all_os_${version}00.0000.zip"; - sha256 = "sha256-n2MzT2LHLHWMWhshWXJ/Q28w9EnLrW6t7hLNveltxLo="; + url = "https://docs.broadcom.com/docs-and-downloads/host-bus-adapters/host-bus-adapters-common-files/sas_sata_nvme_12g_p${finalAttrs.phase}/STORCLI_SAS3.5_P${finalAttrs.phase}.zip"; + hash = "sha256-VfK71eiDonzWdR6g5zkXgRRi25vwoI4DDL6xy3zsfak="; }; nativeBuildInputs = [ rpmextract ]; @@ -23,7 +25,7 @@ stdenvNoCC.mkDerivation rec { }; platform = platforms.${system} or (throw "unsupported system: ${system}"); in '' - rpmextract $src/${platform}/storcli-00${version}00.0000-1.*.rpm + rpmextract $src/univ_viva_cli_rel/Unified_storcli_all_os/${platform}/storcli-00${finalAttrs.version}00.0000-1.*.rpm ''; dontPatch = true; @@ -38,15 +40,22 @@ stdenvNoCC.mkDerivation rec { # Not needed because the binary is statically linked dontFixup = true; + passthru.tests = testers.testVersion { + package = finalAttrs.finalPackage; + command = "${finalAttrs.meta.mainProgram} -v"; + version = "00${finalAttrs.version}00.0000"; + }; + meta = with lib; { # Unfortunately there is no better page for this. # Filter for downloads, set 100 items per page. Sort by newest does not work. # Then search manually for the latest version. - homepage = "https://www.broadcom.com/site-search?q=storcli"; + homepage = "https://www.broadcom.com/support/download-search?pg=&pf=Host+Bus+Adapters&pn=&pa=&po=&dk=storcli&pl=&l=false"; description = "Storage Command Line Tool"; sourceProvenance = with sourceTypes; [ binaryNativeCode ]; license = licenses.unfree; maintainers = with maintainers; [ panicgh ]; + mainProgram = "storcli"; platforms = [ "x86_64-linux" "aarch64-linux" ]; }; -} +}) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 88470c6c005c..817dc5e941b7 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -13297,8 +13297,6 @@ with pkgs; stm32loader = with python3Packages; toPythonApplication stm32loader; - storcli = callPackage ../tools/misc/storcli { }; - stremio = qt5.callPackage ../applications/video/stremio { }; sunwait = callPackage ../applications/misc/sunwait { };