2021-07-24 12:14:16 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchurl
|
|
|
|
, kmod
|
|
|
|
, coreutils
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-07-24 12:14:16 +00:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "lsiutil";
|
|
|
|
version = "1.72";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2021-07-24 12:14:16 +00:00
|
|
|
url = "https://github.com/exactassembly/meta-xa-stm/raw/f96cf6e13f3c9c980f5651510dd96279b9b2af4f/recipes-support/lsiutil/files/lsiutil-${version}.tar.gz";
|
|
|
|
sha256 = "sha256-aTi+EogY1aDWYq3anjRkjz1mzINVfUPQbOPHthxrvS4=";
|
2021-02-05 17:12:51 +00:00
|
|
|
};
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-07-24 12:14:16 +00:00
|
|
|
buildPhase = ''
|
|
|
|
runHook preBuild
|
2021-02-05 17:12:51 +00:00
|
|
|
|
2021-07-24 12:14:16 +00:00
|
|
|
substituteInPlace lsiutil.c \
|
|
|
|
--replace /sbin/modprobe "${kmod}/bin/modprobe" \
|
|
|
|
--replace /bin/mknod "${coreutils}/bin/mknod"
|
|
|
|
gcc -Wall -O lsiutil.c -o lsiutil
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-07-24 12:14:16 +00:00
|
|
|
runHook postBuild
|
|
|
|
'';
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-07-24 12:14:16 +00:00
|
|
|
installPhase = ''
|
|
|
|
runHook preInstall
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-07-24 12:14:16 +00:00
|
|
|
mkdir -p "$out/bin"
|
|
|
|
install -Dm755 lsiutil "$out/bin/lsiutil"
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-07-24 12:14:16 +00:00
|
|
|
runHook postInstall
|
|
|
|
'';
|
2021-02-05 17:12:51 +00:00
|
|
|
|
2021-07-24 12:14:16 +00:00
|
|
|
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 ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|