Nicolas Benes 2024-04-12 21:33:07 +02:00
parent e422c24865
commit a0d914263c
2 changed files with 16 additions and 9 deletions

View File

@ -2,15 +2,17 @@
, stdenvNoCC , stdenvNoCC
, fetchzip , fetchzip
, rpmextract , rpmextract
, testers
}: }:
stdenvNoCC.mkDerivation rec { stdenvNoCC.mkDerivation (finalAttrs: {
pname = "storcli"; pname = "storcli";
version = "7.2309.00"; version = "7.2904.00";
phase = "30";
src = fetchzip { src = fetchzip {
url = "https://docs.broadcom.com/docs-and-downloads/raid-controllers/raid-controllers-common-files/Unified_storcli_all_os_${version}00.0000.zip"; 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";
sha256 = "sha256-n2MzT2LHLHWMWhshWXJ/Q28w9EnLrW6t7hLNveltxLo="; hash = "sha256-VfK71eiDonzWdR6g5zkXgRRi25vwoI4DDL6xy3zsfak=";
}; };
nativeBuildInputs = [ rpmextract ]; nativeBuildInputs = [ rpmextract ];
@ -23,7 +25,7 @@ stdenvNoCC.mkDerivation rec {
}; };
platform = platforms.${system} or (throw "unsupported system: ${system}"); platform = platforms.${system} or (throw "unsupported system: ${system}");
in '' 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; dontPatch = true;
@ -38,15 +40,22 @@ stdenvNoCC.mkDerivation rec {
# Not needed because the binary is statically linked # Not needed because the binary is statically linked
dontFixup = true; dontFixup = true;
passthru.tests = testers.testVersion {
package = finalAttrs.finalPackage;
command = "${finalAttrs.meta.mainProgram} -v";
version = "00${finalAttrs.version}00.0000";
};
meta = with lib; { meta = with lib; {
# Unfortunately there is no better page for this. # Unfortunately there is no better page for this.
# Filter for downloads, set 100 items per page. Sort by newest does not work. # Filter for downloads, set 100 items per page. Sort by newest does not work.
# Then search manually for the latest version. # 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"; description = "Storage Command Line Tool";
sourceProvenance = with sourceTypes; [ binaryNativeCode ]; sourceProvenance = with sourceTypes; [ binaryNativeCode ];
license = licenses.unfree; license = licenses.unfree;
maintainers = with maintainers; [ panicgh ]; maintainers = with maintainers; [ panicgh ];
mainProgram = "storcli";
platforms = [ "x86_64-linux" "aarch64-linux" ]; platforms = [ "x86_64-linux" "aarch64-linux" ];
}; };
} })

View File

@ -13297,8 +13297,6 @@ with pkgs;
stm32loader = with python3Packages; toPythonApplication stm32loader; stm32loader = with python3Packages; toPythonApplication stm32loader;
storcli = callPackage ../tools/misc/storcli { };
stremio = qt5.callPackage ../applications/video/stremio { }; stremio = qt5.callPackage ../applications/video/stremio { };
sunwait = callPackage ../applications/misc/sunwait { }; sunwait = callPackage ../applications/misc/sunwait { };