1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-11 07:04:28 +00:00
nixpkgs/pkgs/tools/system/ipmitool/default.nix
2018-04-05 20:05:25 +02:00

39 lines
1.1 KiB
Nix

{ stdenv, lib, fetchurl, openssl, static ? false }:
let
pkgname = "ipmitool";
version = "1.8.18";
in
stdenv.mkDerivation {
name = "${pkgname}-${version}";
src = fetchurl {
url = "mirror://sourceforge/${pkgname}/${pkgname}-${version}.tar.gz";
sha256 = "0kfh8ny35rvwxwah4yv91a05qwpx74b5slq2lhrh71wz572va93m";
};
patchPhase = stdenv.lib.optionalString stdenv.isDarwin ''
substituteInPlace src/plugins/ipmi_intf.c --replace "s6_addr16" "s6_addr"
'';
buildInputs = [ openssl ];
preConfigure = ''
configureFlagsArray=(
--infodir=$out/share/info
--mandir=$out/share/man
${if static then "LDFLAGS=-static --enable-static --disable-shared" else "--enable-shared"}
)
'';
makeFlags = if static then "AM_LDFLAGS=-all-static" else "";
dontDisableStatic = static;
meta = with lib; {
description = ''Command-line interface to IPMI-enabled devices'';
license = licenses.bsd3;
homepage = https://sourceforge.net/projects/ipmitool/;
platforms = platforms.linux;
maintainers = with maintainers; [ fpletz ];
};
}