@@ -0,0 +1,33 @@
1+{ stdenv, fetchzip }:
2+
3+stdenv.mkDerivation rec {
4+ name = "ipmicfg-${version}";
5+ version = "1.27.0";
6+ buildVersion = "170620";
7+
8+ src = fetchzip {
9+ url = "ftp://ftp.supermicro.com/utility/IPMICFG/IPMICFG_${version}_build.${buildVersion}.zip";
10+ sha256 = "0jr2vih4hzymb62mbqyykwcrjhbhazf6wr1g0cq8ji586i3z3vw5";
11+ };
12+
13+ installPhase = ''
14+ mkdir -p "$out/bin" "$out/opt/ipmicfg"
15+ cp Linux/64bit/* "$out/opt/ipmicfg"
16+
17+ patchelf "$out/opt/ipmicfg/IPMICFG-Linux.x86_64" \
18+ --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
19+ --set-rpath "${stdenv.lib.makeLibraryPath [ stdenv.cc.cc ]}"
20+
21+ ln -s "$out/opt/ipmicfg/IPMICFG-Linux.x86_64" "$out/bin/ipmicfg"
22+ '';
23+
24+ dontPatchShebangs = true; # There are no scripts and it complains about null bytes.
25+
26+ meta = with stdenv.lib; {
27+ description = "Supermicro IPMI configuration tool";
28+ homepage = "http://www.supermicro.com/products/nfo/ipmi.cfm";
29+ license = licenses.unfree;
30+ platforms = [ "x86_64-linux" ];
31+ maintainers = with maintainers; [ sorki ];
32+ };
33+}