summary refs log tree commit diff
path: root/pkgs/os-specific
diff options
context:
space:
mode:
authorgithub-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>2021-07-22 06:01:44 +0000
committerGitHub <noreply@github.com>2021-07-22 06:01:44 +0000
commit2e00ed442014f6e095fb20cc1daec82c2a19b03e (patch)
treeadfdbfcd5efa1d42cc1f544b4dbb015d2e096c51 /pkgs/os-specific
parent5870dfba88f173dc1e5487483ba0477dedc0ca45 (diff)
parent5990961c7295ac966899882990325abb8fa555fd (diff)
downloadnixpkgs-2e00ed442014f6e095fb20cc1daec82c2a19b03e.tar
nixpkgs-2e00ed442014f6e095fb20cc1daec82c2a19b03e.tar.gz
nixpkgs-2e00ed442014f6e095fb20cc1daec82c2a19b03e.tar.bz2
nixpkgs-2e00ed442014f6e095fb20cc1daec82c2a19b03e.tar.lz
nixpkgs-2e00ed442014f6e095fb20cc1daec82c2a19b03e.tar.xz
nixpkgs-2e00ed442014f6e095fb20cc1daec82c2a19b03e.tar.zst
nixpkgs-2e00ed442014f6e095fb20cc1daec82c2a19b03e.zip
Merge staging-next into staging
Diffstat (limited to 'pkgs/os-specific')
-rw-r--r--pkgs/os-specific/linux/lsiutil/default.nix59
1 files changed, 31 insertions, 28 deletions
diff --git a/pkgs/os-specific/linux/lsiutil/default.nix b/pkgs/os-specific/linux/lsiutil/default.nix
index 1b1acdb535f..f88cdcda523 100644
--- a/pkgs/os-specific/linux/lsiutil/default.nix
+++ b/pkgs/os-specific/linux/lsiutil/default.nix
@@ -1,41 +1,44 @@
-{ lib, stdenv, fetchurl, unzip }:
+{ lib
+, stdenv
+, fetchurl
+, kmod
+, coreutils
+}:
 
-let
-
-  version = "1.60";
+stdenv.mkDerivation rec {
+  pname = "lsiutil";
+  version = "1.72";
 
   src = fetchurl {
-    name = "lsiutil-${version}.zip";
-    url = "http://www.lsi.com/DistributionSystem/AssetDocument/support/downloads/hbas/fibre_channel/hardware_drivers/LSIUtil%20Kit_${version}.zip";
-    sha256 = "1d4337faa56e24f7d98db87b9de94d6e2c17ab671f4e301b93833eea08b9e426";
+    url = "https://github.com/exactassembly/meta-xa-stm/raw/f96cf6e13f3c9c980f5651510dd96279b9b2af4f/recipes-support/lsiutil/files/lsiutil-${version}.tar.gz";
+    sha256 = "sha256-aTi+EogY1aDWYq3anjRkjz1mzINVfUPQbOPHthxrvS4=";
   };
 
-in
-
-stdenv.mkDerivation {
-  pname = "lsiutils";
-  inherit version;
+  buildPhase = ''
+    runHook preBuild
 
-  srcs = [ src "Source/lsiutil.tar.gz" ];
+    substituteInPlace lsiutil.c \
+      --replace /sbin/modprobe "${kmod}/bin/modprobe" \
+      --replace /bin/mknod "${coreutils}/bin/mknod"
+    gcc -Wall -O lsiutil.c -o lsiutil
 
-  nativeBuildInputs = [ unzip ];
+    runHook postBuild
+  '';
 
-  sourceRoot = "lsiutil";
+  installPhase = ''
+    runHook preInstall
 
-  preBuild =
-    ''
-      mkdir -p $out/bin
-      substituteInPlace Makefile --replace /usr/bin $out/bin
-      substituteInPlace lsiutil.c \
-        --replace /sbin/modprobe modprobe \
-        --replace /bin/mknod $(type -P mknod)
-    '';
+    mkdir -p "$out/bin"
+    install -Dm755 lsiutil "$out/bin/lsiutil"
 
-  installPhase = "true";
+    runHook postInstall
+  '';
 
-  meta = {
-    homepage = "http://www.lsi.com/";
-    description = "LSI Logic Fusion MPT command line management tool";
-    license = lib.licenses.unfree;
+  meta = with lib; {
+    homepage = "https://github.com/exactassembly/meta-xa-stm/tree/master/recipes-support/lsiutil/files";
+    description = "Configuration utility for MPT adapters (FC, SCSI, and SAS/SATA)";
+    license = licenses.unfree;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ Luflosi ];
   };
 }