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