2020-02-24 22:08:00 +00:00
|
|
|
{ stdenv, lib, fetchurl, openssl, fetchpatch, 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
|
|
|
};
|
|
|
|
|
2020-02-24 22:08:00 +00:00
|
|
|
patches = [
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://sources.debian.org/data/main/i/ipmitool/1.8.18-6/debian/patches/0120-openssl1.1.patch";
|
|
|
|
sha256 = "1xvsjxb782lzy72bnqqnsk3r5h4zl3na95s4pqn2qg7cic2mnbfk";
|
|
|
|
})
|
2020-03-01 13:18:36 +00:00
|
|
|
# Fix build on non-linux systems
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://github.com/ipmitool/ipmitool/commit/5db314f694f75c575cd7c9ffe9ee57aaf3a88866.patch";
|
|
|
|
sha256 = "01niwrgajhrdhl441gzmw6v1r1yc3i8kn98db4b6smfn5fwdp1pa";
|
|
|
|
})
|
2020-02-24 22:08:00 +00:00
|
|
|
];
|
|
|
|
|
2010-01-19 16:21:40 +00:00
|
|
|
buildInputs = [ openssl ];
|
2010-12-06 18:01:57 +00:00
|
|
|
|
2020-02-28 20:09:54 +00:00
|
|
|
configureFlags = [
|
|
|
|
"--infodir=${placeholder "out"}/share/info"
|
|
|
|
"--mandir=${placeholder "out"}/share/man"
|
|
|
|
] ++ stdenv.lib.optionals static [
|
|
|
|
"LDFLAGS=-static"
|
|
|
|
"--enable-static"
|
|
|
|
"--disable-shared"
|
|
|
|
] ++ stdenv.lib.optionals (!static) [
|
|
|
|
"--enable-shared"
|
|
|
|
];
|
|
|
|
|
2019-10-28 09:17:49 +00:00
|
|
|
makeFlags = stdenv.lib.optional static "AM_LDFLAGS=-all-static";
|
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/;
|
2020-03-01 13:18:36 +00:00
|
|
|
platforms = platforms.unix;
|
2017-06-20 01:43:36 +01:00
|
|
|
maintainers = with maintainers; [ fpletz ];
|
2010-01-19 15:58:19 +00:00
|
|
|
};
|
|
|
|
}
|