Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at 16.09 37 lines 1.0 kB view raw
1{ fetchurl, stdenv, openssl, static ? false }: 2 3let 4 pkgname = "ipmitool"; 5 version = "1.8.15"; 6in 7stdenv.mkDerivation { 8 name = "${pkgname}-${version}"; 9 10 src = fetchurl { 11 url = "mirror://sourceforge/${pkgname}/${pkgname}-${version}.tar.gz"; 12 sha256 = "0y6g8xg9p854n7xm3kds8m3d53jrsllnknp8lcr3jscf99j4x5ph"; 13 }; 14 15 patchPhase = stdenv.lib.optionalString stdenv.isDarwin '' 16 substituteInPlace src/plugins/ipmi_intf.c --replace "s6_addr16" "s6_addr" 17 ''; 18 19 buildInputs = [ openssl ]; 20 21 preConfigure = '' 22 configureFlagsArray=( 23 --infodir=$out/share/info 24 --mandir=$out/share/man 25 ${if static then "LDFLAGS=-static --enable-static --disable-shared" else "--enable-shared"} 26 ) 27 ''; 28 makeFlags = if static then "AM_LDFLAGS=-all-static" else ""; 29 dontDisableStatic = static; 30 31 meta = { 32 description = ''Command-line interface to IPMI-enabled devices''; 33 license = stdenv.lib.licenses.bsd3; 34 homepage = http://ipmitool.sourceforge.net; 35 platforms = stdenv.lib.platforms.unix; 36 }; 37}