@@ -1,31 +1,33 @@
1−{ stdenv, lib, fetchurl, patchelf, unzip }:
2−
3−assert stdenv.isLinux;
1+{ stdenv, fetchzip }:
42
53stdenv.mkDerivation rec {
64 name = "ipmicfg-${version}";
75 version = "1.27.0";
86 buildVersion = "170620";
97
10− src = fetchurl {
8+ src = fetchzip {
119 url = "ftp://ftp.supermicro.com/utility/IPMICFG/IPMICFG_${version}_build.${buildVersion}.zip";
12− sha256 = "0mlhrxnkwazq5456csfds6w2z5pv2ksnqnxlv4prp07bwi2bccid";
10+ sha256 = "0jr2vih4hzymb62mbqyykwcrjhbhazf6wr1g0cq8ji586i3z3vw5";
1311 };
1412
15− buildInputs = [ unzip ];
1613 installPhase = ''
17− mkdir -p "$out/opt/ipmicfg"
14+ mkdir -p "$out/bin" "$out/opt/ipmicfg"
1815 cp Linux/64bit/* "$out/opt/ipmicfg"
1916
20− patchelf --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) "$out/opt/ipmicfg/IPMICFG-Linux.x86_64"
21− patchelf --set-rpath "${lib.makeLibraryPath [ stdenv.cc.cc ]}:${stdenv.cc.cc.lib}/lib64" "$out/opt/ipmicfg/IPMICFG-Linux.x86_64"
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 ]}"
2220
23− mkdir "$out/bin"
2421 ln -s "$out/opt/ipmicfg/IPMICFG-Linux.x86_64" "$out/bin/ipmicfg"
2522 '';
2623
24+ dontPatchShebangs = true; # There are no scripts and it complains about null bytes.
25+
2726 meta = with stdenv.lib; {
27+ description = "Supermicro IPMI configuration tool";
28+ homepage = "http://www.supermicro.com/products/nfo/ipmi.cfm";
2829 license = licenses.unfree;
30+ platforms = [ "x86_64-linux" ];
2931 maintainers = with maintainers; [ sorki ];
3032 };
3133}