summary refs log tree commit diff
path: root/pkgs/os-specific/linux/lsiutil/default.nix
blob: 1b1acdb535f5f0814c92713eb803853b0ba5f6e3 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
{ lib, stdenv, fetchurl, unzip }:

let

  version = "1.60";

  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";
  };

in

stdenv.mkDerivation {
  pname = "lsiutils";
  inherit version;

  srcs = [ src "Source/lsiutil.tar.gz" ];

  nativeBuildInputs = [ unzip ];

  sourceRoot = "lsiutil";

  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)
    '';

  installPhase = "true";

  meta = {
    homepage = "http://www.lsi.com/";
    description = "LSI Logic Fusion MPT command line management tool";
    license = lib.licenses.unfree;
  };
}