about summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorAleksana <me@aleksana.moe>2024-04-18 01:48:26 +0800
committerGitHub <noreply@github.com>2024-04-18 01:48:26 +0800
commitd3bf7abb557ea89bf9a5ba3c700fc020ee4f73f7 (patch)
tree9947934e9c4a724991c3d907d6e37795799520fb /pkgs
parent5784e9decf4105efb4d2a72150c441b356848b5b (diff)
parenta0d914263c75f3d614a3e472bc13da3829aceca5 (diff)
Merge pull request #303694 from panicgh/storcli
storcli: 7.2309.00 -> 7.2904.00, move to by-name
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/by-name/st/storcli/package.nix (renamed from pkgs/tools/misc/storcli/default.nix)23
-rw-r--r--pkgs/top-level/all-packages.nix2
2 files changed, 16 insertions, 9 deletions
diff --git a/pkgs/tools/misc/storcli/default.nix b/pkgs/by-name/st/storcli/package.nix
index e5f01b6926c26..bb1e92247663c 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 d5fde0d2239cd..68255c9fa2314 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -13288,8 +13288,6 @@ with pkgs;
 
   stm32loader = with python3Packages; toPythonApplication stm32loader;
 
-  storcli = callPackage ../tools/misc/storcli { };
-
   stremio = qt5.callPackage ../applications/video/stremio { };
 
   sunwait = callPackage ../applications/misc/sunwait { };