2017-11-03 00:06:05 +01:00
|
|
|
{ stdenv, fetchzip }:
|
2017-11-02 22:19:13 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "ipmicfg-${version}";
|
2018-07-02 20:57:42 +02:00
|
|
|
version = "1.28.0";
|
|
|
|
buildVersion = "180302";
|
2017-11-02 22:19:13 +01:00
|
|
|
|
2017-11-03 00:06:05 +01:00
|
|
|
src = fetchzip {
|
2017-11-02 22:19:13 +01:00
|
|
|
url = "ftp://ftp.supermicro.com/utility/IPMICFG/IPMICFG_${version}_build.${buildVersion}.zip";
|
2018-07-02 20:57:42 +02:00
|
|
|
sha256 = "0hw853cwaaxmxy1sa3m7l9gqalwpbbvp4ghk8inr7dzwxjljmr02";
|
2017-12-13 19:44:27 +01:00
|
|
|
extraPostFetch = "chmod u+rwX,go-rwx+X $out/";
|
2017-11-02 22:19:13 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
installPhase = ''
|
2017-11-03 00:06:05 +01:00
|
|
|
mkdir -p "$out/bin" "$out/opt/ipmicfg"
|
2017-11-02 22:19:13 +01:00
|
|
|
cp Linux/64bit/* "$out/opt/ipmicfg"
|
|
|
|
|
2018-04-25 16:07:16 +02:00
|
|
|
patchelf \
|
2017-11-03 00:06:05 +01:00
|
|
|
--set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
|
2018-04-25 16:07:16 +02:00
|
|
|
--set-rpath "${stdenv.lib.makeLibraryPath [ stdenv.cc.cc ]}" \
|
|
|
|
"$out/opt/ipmicfg/IPMICFG-Linux.x86_64"
|
2017-11-02 22:19:13 +01:00
|
|
|
|
|
|
|
ln -s "$out/opt/ipmicfg/IPMICFG-Linux.x86_64" "$out/bin/ipmicfg"
|
|
|
|
'';
|
|
|
|
|
2017-11-03 00:06:05 +01:00
|
|
|
dontPatchShebangs = true; # There are no scripts and it complains about null bytes.
|
|
|
|
|
2017-11-02 22:19:13 +01:00
|
|
|
meta = with stdenv.lib; {
|
2017-11-03 00:06:05 +01:00
|
|
|
description = "Supermicro IPMI configuration tool";
|
|
|
|
homepage = "http://www.supermicro.com/products/nfo/ipmi.cfm";
|
2017-11-02 22:19:13 +01:00
|
|
|
license = licenses.unfree;
|
2017-11-03 00:06:05 +01:00
|
|
|
platforms = [ "x86_64-linux" ];
|
2017-11-02 22:19:13 +01:00
|
|
|
maintainers = with maintainers; [ sorki ];
|
|
|
|
};
|
|
|
|
}
|