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