2020-12-20 07:11:26 +01:00
|
|
|
{ stdenv, lib, fetchurl, openssl, fetchpatch, static ? stdenv.hostPlatform.isStatic }:
|
2010-01-19 16:58:19 +01:00
|
|
|
|
2021-07-29 14:42:11 +02:00
|
|
|
stdenv.mkDerivation rec {
|
2021-07-27 16:21:24 +02:00
|
|
|
pname = "ipmitool";
|
2017-06-20 02:43:36 +02:00
|
|
|
version = "1.8.18";
|
2010-01-19 16:58:19 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
2021-07-27 16:21:24 +02:00
|
|
|
url = "mirror://sourceforge/${pname}/${pname}-${version}.tar.gz";
|
2017-06-20 02:43:36 +02:00
|
|
|
sha256 = "0kfh8ny35rvwxwah4yv91a05qwpx74b5slq2lhrh71wz572va93m";
|
2010-01-19 16:58:19 +01:00
|
|
|
};
|
|
|
|
|
2020-02-24 23:08:00 +01: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 14:18:36 +01:00
|
|
|
# Fix build on non-linux systems
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://github.com/ipmitool/ipmitool/commit/5db314f694f75c575cd7c9ffe9ee57aaf3a88866.patch";
|
|
|
|
sha256 = "01niwrgajhrdhl441gzmw6v1r1yc3i8kn98db4b6smfn5fwdp1pa";
|
|
|
|
})
|
2021-03-13 23:07:52 +01:00
|
|
|
(fetchpatch {
|
|
|
|
name = "CVE-2020-5208.patch";
|
|
|
|
url = "https://github.com/ipmitool/ipmitool/commit/e824c23316ae50beb7f7488f2055ac65e8b341f2.patch";
|
|
|
|
sha256 = "sha256-X7MnoX2fzByRpRY4p33xetT+V2aehlQ/qU+aeaqtTUY=";
|
|
|
|
})
|
2020-02-24 23:08:00 +01:00
|
|
|
];
|
|
|
|
|
2010-01-19 17:21:40 +01:00
|
|
|
buildInputs = [ openssl ];
|
2010-12-06 19:01:57 +01:00
|
|
|
|
2020-02-28 21:09:54 +01:00
|
|
|
configureFlags = [
|
|
|
|
"--infodir=${placeholder "out"}/share/info"
|
|
|
|
"--mandir=${placeholder "out"}/share/man"
|
2021-01-15 10:19:50 +01:00
|
|
|
] ++ lib.optionals static [
|
2020-02-28 21:09:54 +01:00
|
|
|
"LDFLAGS=-static"
|
|
|
|
"--enable-static"
|
|
|
|
"--disable-shared"
|
2021-01-15 10:19:50 +01:00
|
|
|
] ++ lib.optionals (!static) [
|
2020-02-28 21:09:54 +01:00
|
|
|
"--enable-shared"
|
|
|
|
];
|
|
|
|
|
2021-01-15 10:19:50 +01:00
|
|
|
makeFlags = lib.optional static "AM_LDFLAGS=-all-static";
|
2010-12-06 19:01:57 +01:00
|
|
|
dontDisableStatic = static;
|
2010-01-19 16:58:19 +01:00
|
|
|
|
2017-06-20 02:43:36 +02:00
|
|
|
meta = with lib; {
|
2021-01-24 10:19:10 +01:00
|
|
|
description = "Command-line interface to IPMI-enabled devices";
|
2017-06-20 02:43:36 +02:00
|
|
|
license = licenses.bsd3;
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "https://sourceforge.net/projects/ipmitool/";
|
2020-03-01 14:18:36 +01:00
|
|
|
platforms = platforms.unix;
|
2017-06-20 02:43:36 +02:00
|
|
|
maintainers = with maintainers; [ fpletz ];
|
2010-01-19 16:58:19 +01:00
|
|
|
};
|
|
|
|
}
|