2010-02-03 13:47:31 +01:00
|
|
|
{ fetchurl, stdenv, openssl, static ? false }:
|
2010-01-19 16:58:19 +01:00
|
|
|
|
|
|
|
let
|
|
|
|
pkgname = "ipmitool";
|
2015-01-27 13:35:09 +01:00
|
|
|
version = "1.8.15";
|
2010-01-19 16:58:19 +01:00
|
|
|
in
|
|
|
|
stdenv.mkDerivation {
|
|
|
|
name = "${pkgname}-${version}";
|
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "mirror://sourceforge/${pkgname}/${pkgname}-${version}.tar.gz";
|
2015-01-27 13:35:09 +01:00
|
|
|
sha256 = "0y6g8xg9p854n7xm3kds8m3d53jrsllnknp8lcr3jscf99j4x5ph";
|
2010-01-19 16:58:19 +01:00
|
|
|
};
|
|
|
|
|
2015-11-18 19:31:14 +01:00
|
|
|
patchPhase = stdenv.lib.optionalString stdenv.isDarwin ''
|
|
|
|
substituteInPlace src/plugins/ipmi_intf.c --replace "s6_addr16" "s6_addr"
|
|
|
|
'';
|
|
|
|
|
2010-01-19 17:21:40 +01:00
|
|
|
buildInputs = [ openssl ];
|
2010-12-06 19:01:57 +01:00
|
|
|
|
|
|
|
preConfigure = ''
|
|
|
|
configureFlagsArray=(
|
|
|
|
--infodir=$out/share/info
|
|
|
|
--mandir=$out/share/man
|
|
|
|
${if static then "LDFLAGS=-static --enable-static --disable-shared" else "--enable-shared"}
|
|
|
|
)
|
|
|
|
'';
|
2010-02-03 13:47:31 +01:00
|
|
|
makeFlags = if static then "AM_LDFLAGS=-all-static" else "";
|
2010-12-06 19:01:57 +01:00
|
|
|
dontDisableStatic = static;
|
2010-01-19 16:58:19 +01:00
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = ''Command-line interface to IPMI-enabled devices'';
|
2014-12-21 00:00:35 +01:00
|
|
|
license = stdenv.lib.licenses.bsd3;
|
|
|
|
homepage = http://ipmitool.sourceforge.net;
|
2010-12-06 19:01:57 +01:00
|
|
|
|
|
|
|
platforms = stdenv.lib.platforms.unix;
|
|
|
|
maintainers = [ stdenv.lib.maintainers.simons ];
|
2010-01-19 16:58:19 +01:00
|
|
|
};
|
|
|
|
}
|