mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-16 23:03:40 +01:00
Add MegaCli, a command line tool to manage certain RAID cards.
This commit is contained in:
parent
9fc836e206
commit
8041a33726
2 changed files with 33 additions and 0 deletions
31
pkgs/tools/misc/megacli/default.nix
Normal file
31
pkgs/tools/misc/megacli/default.nix
Normal file
|
@ -0,0 +1,31 @@
|
|||
{ stdenv, rpm, cpio, ncurses, patchelf, makeWrapper, requireFile, unzip }:
|
||||
stdenv.mkDerivation rec {
|
||||
name = "megacli-8.07.07";
|
||||
src =
|
||||
requireFile {
|
||||
name = "8.07.07_MegaCLI.zip";
|
||||
url = http://www.lsi.com/downloads/Public/MegaRAID%20Common%20Files/8.07.07_MegaCLI.zip;
|
||||
sha256 = "11jzvh25mlygflazd37gi05xv67im4rgq7sbs5nwgw3gxdh4xfjj";
|
||||
};
|
||||
|
||||
buildInputs = [rpm cpio ncurses unzip makeWrapper];
|
||||
libPath =
|
||||
stdenv.lib.makeLibraryPath
|
||||
[ stdenv.gcc.gcc stdenv.gcc.libc ncurses ];
|
||||
|
||||
buildCommand = ''
|
||||
ensureDir $out/bin
|
||||
cd $out
|
||||
unzip ${src}
|
||||
rpm2cpio linux/MegaCli-8.07.07-1.noarch.rpm | cpio -idmv
|
||||
${patchelf}/bin/patchelf --interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" --set-rpath ${libPath}:$out/opt/lsi/3rdpartylibs/x86_64:$out/opt/lsi/3rdpartylibs:${stdenv.gcc.gcc}/lib64:${stdenv.gcc.gcc}/lib opt/MegaRAID/MegaCli/MegaCli64
|
||||
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 = {
|
||||
description = "CLI program for LSI MegaRAID cards, which also works with some Dell PERC RAID cards.";
|
||||
license = "unfree";
|
||||
};
|
||||
}
|
|
@ -1247,6 +1247,8 @@ let
|
|||
|
||||
mdbtools_git = callPackage ../tools/misc/mdbtools/git.nix { };
|
||||
|
||||
megacli = callPackage ../tools/misc/megacli { };
|
||||
|
||||
megatools = callPackage ../tools/networking/megatools { };
|
||||
|
||||
minecraft = callPackage ../games/minecraft { };
|
||||
|
|
Loading…
Reference in a new issue