2014-10-19 23:16:59 +00:00
|
|
|
{ stdenv, rpmextract, ncurses, patchelf, makeWrapper, requireFile, unzip }:
|
2013-09-17 09:03:51 +00:00
|
|
|
|
|
|
|
assert stdenv.system == "x86_64-linux";
|
|
|
|
|
2013-09-16 13:56:55 +00:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "megacli-8.07.07";
|
2013-09-17 09:03:51 +00:00
|
|
|
|
|
|
|
src =
|
2013-09-16 13:56:55 +00: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-19 23:16:59 +00:00
|
|
|
buildInputs = [rpmextract ncurses unzip makeWrapper];
|
2013-09-16 13:56:55 +00:00
|
|
|
libPath =
|
|
|
|
stdenv.lib.makeLibraryPath
|
2015-01-15 04:25:26 +00:00
|
|
|
[ stdenv.cc.cc stdenv.cc.libc ncurses ];
|
2013-09-16 13:56:55 +00:00
|
|
|
|
|
|
|
buildCommand = ''
|
2014-06-30 12:56:10 +00:00
|
|
|
mkdir -p $out/bin
|
2013-09-16 13:56:55 +00:00
|
|
|
cd $out
|
|
|
|
unzip ${src}
|
2014-10-19 23:16:59 +00:00
|
|
|
rpmextract linux/MegaCli-8.07.07-1.noarch.rpm
|
2015-01-15 04:25:26 +00: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.cc}/lib64:${stdenv.cc.cc}/lib opt/MegaRAID/MegaCli/MegaCli64
|
2013-09-16 13:56:55 +00: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 09:03:51 +00:00
|
|
|
description = "CLI program for LSI MegaRAID cards, which also works with some Dell PERC RAID cards";
|
2014-06-19 04:19:00 +00:00
|
|
|
license = stdenv.lib.licenses.unfree;
|
2013-09-16 13:56:55 +00:00
|
|
|
};
|
|
|
|
}
|