2017-11-26 14:15:33 +00:00
|
|
|
{ stdenv, fetchurl, patchelf, makeWrapper, xorg, gcc, gcc-unwrapped }:
|
2016-01-23 21:14:41 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "IPMIView-${version}";
|
2017-06-10 12:34:29 +01:00
|
|
|
version = "2.13.0";
|
|
|
|
buildVersion = "170504";
|
2016-01-23 21:14:41 +00:00
|
|
|
|
2017-06-03 12:00:12 +01:00
|
|
|
src = fetchurl {
|
2017-06-03 01:03:52 +01:00
|
|
|
url = "ftp://ftp.supermicro.com/utility/IPMIView/Linux/IPMIView_${version}_build.${buildVersion}_bundleJRE_Linux_x64.tar.gz";
|
2017-06-10 12:34:29 +01:00
|
|
|
sha256 = "1hfw5g6lxg3vqg0nc3g2sv2h6bn8za35bxxms0ri0sgb9v3xg1y6";
|
2017-06-03 01:00:08 +01:00
|
|
|
};
|
2016-01-23 21:14:41 +00:00
|
|
|
|
|
|
|
buildInputs = [ patchelf makeWrapper ];
|
|
|
|
|
|
|
|
buildPhase = with xorg; ''
|
2016-06-07 19:17:30 +01:00
|
|
|
patchelf --set-rpath "${stdenv.lib.makeLibraryPath [ libX11 libXext libXrender libXtst libXi ]}" ./jre/lib/amd64/xawt/libmawt.so
|
2017-11-26 14:15:33 +00:00
|
|
|
patchelf --set-rpath "${gcc-unwrapped.lib}/lib" ./libiKVM64.so
|
2016-06-07 19:17:30 +01:00
|
|
|
patchelf --set-rpath "${stdenv.lib.makeLibraryPath [ libXcursor libX11 libXext libXrender libXtst libXi ]}" --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" ./jre/bin/javaws
|
2016-01-23 21:14:41 +00:00
|
|
|
patchelf --set-rpath "${gcc.cc}/lib:$out/jre/lib/amd64/jli" --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" ./jre/bin/java
|
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/bin
|
|
|
|
cp -R . $out/
|
2017-06-03 12:00:12 +01:00
|
|
|
makeWrapper $out/jre/bin/java $out/bin/IPMIView \
|
|
|
|
--prefix PATH : "$out/jre/bin" \
|
|
|
|
--add-flags "-jar $out/IPMIView20.jar"
|
2016-01-23 21:14:41 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
license = licenses.unfree;
|
|
|
|
};
|
|
|
|
}
|