Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at fix-function-merge 47 lines 1.1 kB view raw
1{ lib 2, stdenv 3, fetchurl 4, kmod 5, coreutils 6}: 7 8stdenv.mkDerivation rec { 9 pname = "lsiutil"; 10 version = "1.72"; 11 12 src = fetchurl { 13 url = "https://github.com/exactassembly/meta-xa-stm/raw/f96cf6e13f3c9c980f5651510dd96279b9b2af4f/recipes-support/lsiutil/files/lsiutil-${version}.tar.gz"; 14 sha256 = "sha256-aTi+EogY1aDWYq3anjRkjz1mzINVfUPQbOPHthxrvS4="; 15 }; 16 17 postPatch = '' 18 substituteInPlace lsiutil.c \ 19 --replace /sbin/modprobe "${kmod}/bin/modprobe" \ 20 --replace /bin/mknod "${coreutils}/bin/mknod" 21 ''; 22 23 buildPhase = '' 24 runHook preBuild 25 26 gcc -Wall -O lsiutil.c -o lsiutil 27 28 runHook postBuild 29 ''; 30 31 installPhase = '' 32 runHook preInstall 33 34 mkdir -p "$out/bin" 35 install -Dm755 lsiutil "$out/bin/lsiutil" 36 37 runHook postInstall 38 ''; 39 40 meta = with lib; { 41 homepage = "https://github.com/exactassembly/meta-xa-stm/tree/master/recipes-support/lsiutil/files"; 42 description = "Configuration utility for MPT adapters (FC, SCSI, and SAS/SATA)"; 43 license = licenses.unfree; 44 platforms = platforms.linux; 45 maintainers = with maintainers; [ Luflosi ]; 46 }; 47}