2019-09-25 08:07:49 +01:00
|
|
|
{ stdenv, fetchurl, patchelf, makeWrapper, xorg, fontconfig, freetype, gcc, gcc-unwrapped }:
|
2016-01-23 21:14:41 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-09-25 07:51:46 +01:00
|
|
|
pname = "IPMIView";
|
2019-09-25 08:07:49 +01:00
|
|
|
version = "2.16.0";
|
|
|
|
buildVersion = "190815";
|
2016-01-23 21:14:41 +00:00
|
|
|
|
2019-09-25 07:51:46 +01:00
|
|
|
src = fetchurl {
|
2019-09-25 08:07:49 +01:00
|
|
|
url = "https://www.supermicro.com/wftp/utility/IPMIView/Linux/IPMIView_${version}_build.${buildVersion}_bundleJRE_Linux_x64.tar.gz";
|
|
|
|
sha256 = "0qw9zfnj0cyvab7ndamlw2y0gpczjhh1jkz8340kl42r2xmhkvpl";
|
2017-06-03 01:00:08 +01:00
|
|
|
};
|
2016-01-23 21:14:41 +00:00
|
|
|
|
2019-09-25 07:51:46 +01:00
|
|
|
nativeBuildInputs = [ patchelf makeWrapper ];
|
2016-01-23 21:14:41 +00:00
|
|
|
|
2019-09-25 07:51:46 +01:00
|
|
|
buildPhase = with xorg; ''
|
2019-09-25 08:07:49 +01:00
|
|
|
patchelf --set-rpath "${stdenv.lib.makeLibraryPath [ libX11 libXext libXrender libXtst libXi ]}" ./jre/lib/amd64/libawt_xawt.so
|
|
|
|
patchelf --set-rpath "${stdenv.lib.makeLibraryPath [ freetype ]}" ./jre/lib/amd64/libfontmanager.so
|
2019-09-25 07:51:46 +01:00
|
|
|
patchelf --set-rpath "${gcc-unwrapped.lib}/lib" ./libiKVM64.so
|
|
|
|
patchelf --set-rpath "${gcc.cc}/lib:$out/jre/lib/amd64/jli" --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" ./jre/bin/java
|
|
|
|
'';
|
2016-01-23 21:14:41 +00:00
|
|
|
|
2019-09-25 07:51:46 +01:00
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/bin
|
|
|
|
cp -R . $out/
|
2019-09-25 08:07:49 +01:00
|
|
|
|
|
|
|
# LD_LIBRARY_PATH: fontconfig is used from java code
|
2019-09-25 07:51:46 +01:00
|
|
|
makeWrapper $out/jre/bin/java $out/bin/IPMIView \
|
2019-09-25 08:07:49 +01:00
|
|
|
--set LD_LIBRARY_PATH "${stdenv.lib.makeLibraryPath [ fontconfig ]}" \
|
2019-09-25 07:51:46 +01:00
|
|
|
--prefix PATH : "$out/jre/bin" \
|
2019-09-25 08:07:49 +01:00
|
|
|
--add-flags "-jar $out/IPMIView20.jar" \
|
2019-09-25 07:51:46 +01:00
|
|
|
'';
|
2016-01-23 21:14:41 +00:00
|
|
|
|
2019-09-25 07:51:46 +01:00
|
|
|
meta = with stdenv.lib; {
|
2016-01-23 21:14:41 +00:00
|
|
|
license = licenses.unfree;
|
2019-09-25 08:07:49 +01:00
|
|
|
maintainers = with maintainers; [ vlaci ];
|
2019-09-25 07:51:46 +01:00
|
|
|
};
|
|
|
|
}
|