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