2010-02-03 15:47:31 +03:00
|
|
|
{ fetchurl, stdenv, openssl, static ? false }:
|
2010-01-19 18:58:19 +03:00
|
|
|
|
|
|
|
let
|
|
|
|
pkgname = "ipmitool";
|
2017-02-02 05:44:48 +03:00
|
|
|
version = "1.8.17";
|
2010-01-19 18:58:19 +03:00
|
|
|
in
|
|
|
|
stdenv.mkDerivation {
|
|
|
|
name = "${pkgname}-${version}";
|
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "mirror://sourceforge/${pkgname}/${pkgname}-${version}.tar.gz";
|
2017-02-02 05:44:48 +03:00
|
|
|
sha256 = "0qcrz1d1dbjg46n3fj6viglzcxlf2q15xa7bx9w1hm2hq1r3jzbi";
|
2010-01-19 18:58:19 +03:00
|
|
|
};
|
|
|
|
|
2015-11-18 21:31:14 +03:00
|
|
|
patchPhase = stdenv.lib.optionalString stdenv.isDarwin ''
|
|
|
|
substituteInPlace src/plugins/ipmi_intf.c --replace "s6_addr16" "s6_addr"
|
|
|
|
'';
|
|
|
|
|
2010-01-19 19:21:40 +03:00
|
|
|
buildInputs = [ openssl ];
|
2010-12-06 21:01:57 +03: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 15:47:31 +03:00
|
|
|
makeFlags = if static then "AM_LDFLAGS=-all-static" else "";
|
2010-12-06 21:01:57 +03:00
|
|
|
dontDisableStatic = static;
|
2010-01-19 18:58:19 +03:00
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = ''Command-line interface to IPMI-enabled devices'';
|
2014-12-21 02:00:35 +03:00
|
|
|
license = stdenv.lib.licenses.bsd3;
|
|
|
|
homepage = http://ipmitool.sourceforge.net;
|
2010-12-06 21:01:57 +03:00
|
|
|
platforms = stdenv.lib.platforms.unix;
|
2010-01-19 18:58:19 +03:00
|
|
|
};
|
|
|
|
}
|