2014-10-20 03:16:59 +04:00
|
|
|
{ stdenv, rpmextract, ncurses, patchelf, makeWrapper, requireFile, unzip }:
|
2013-09-17 13:03:51 +04:00
|
|
|
|
|
|
|
assert stdenv.system == "x86_64-linux";
|
|
|
|
|
2013-09-16 17:56:55 +04:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "megacli-8.07.07";
|
2013-09-17 13:03:51 +04:00
|
|
|
|
|
|
|
src =
|
2013-09-16 17:56:55 +04:00
|
|
|
requireFile {
|
|
|
|
name = "8.07.07_MegaCLI.zip";
|
|
|
|
url = http://www.lsi.com/downloads/Public/MegaRAID%20Common%20Files/8.07.07_MegaCLI.zip;
|
|
|
|
sha256 = "11jzvh25mlygflazd37gi05xv67im4rgq7sbs5nwgw3gxdh4xfjj";
|
|
|
|
};
|
|
|
|
|
2014-10-20 03:16:59 +04:00
|
|
|
buildInputs = [rpmextract ncurses unzip makeWrapper];
|
2013-09-16 17:56:55 +04:00
|
|
|
libPath =
|
|
|
|
stdenv.lib.makeLibraryPath
|
2014-12-17 21:11:30 +03:00
|
|
|
[ stdenv.cc.gcc stdenv.cc.libc ncurses ];
|
2013-09-16 17:56:55 +04:00
|
|
|
|
|
|
|
buildCommand = ''
|
2014-06-30 16:56:10 +04:00
|
|
|
mkdir -p $out/bin
|
2013-09-16 17:56:55 +04:00
|
|
|
cd $out
|
|
|
|
unzip ${src}
|
2014-10-20 03:16:59 +04:00
|
|
|
rpmextract linux/MegaCli-8.07.07-1.noarch.rpm
|
2014-12-17 21:11:30 +03:00
|
|
|
${patchelf}/bin/patchelf --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" --set-rpath ${libPath}:$out/opt/lsi/3rdpartylibs/x86_64:$out/opt/lsi/3rdpartylibs:${stdenv.cc.gcc}/lib64:${stdenv.cc.gcc}/lib opt/MegaRAID/MegaCli/MegaCli64
|
2013-09-16 17:56:55 +04:00
|
|
|
wrapProgram $out/opt/MegaRAID/MegaCli/MegaCli64 --set LD_LIBRARY_PATH $out/opt/lsi/3rdpartylibs/x86_64
|
|
|
|
ln -s $out/opt/MegaRAID/MegaCli/MegaCli64 $out/bin/MegaCli64
|
|
|
|
eval fixupPhase
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
2013-09-17 13:03:51 +04:00
|
|
|
description = "CLI program for LSI MegaRAID cards, which also works with some Dell PERC RAID cards";
|
2014-06-19 08:19:00 +04:00
|
|
|
license = stdenv.lib.licenses.unfree;
|
2013-09-16 17:56:55 +04:00
|
|
|
};
|
|
|
|
}
|