nixpkgs/pkgs/by-name/ls/lsiutil/package.nix
aleksana 571c71e6f7 treewide: migrate packages to pkgs/by-name, take 1
We are migrating packages that meet below requirements:

1. using `callPackage`
2. called path is a directory
3. overriding set is empty (`{ }`)
4. not containing path expressions other than relative path (to
makenixpkgs-vet happy)
5. not referenced by nix files outside of the directory, other
than`pkgs/top-level/all-packages.nix`
6. not referencing nix files outside of the directory
7. not referencing `default.nix` (since it's changed to `package.nix`)
8. `outPath` doesn't change after migration

The tool is here: https://github.com/Aleksanaa/by-name-migrate.
2024-11-09 20:04:51 +08:00

48 lines
1.1 KiB
Nix

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