nixpkgs/pkgs/applications/misc/ipmiview/default.nix

34 lines
1.3 KiB
Nix
Raw Normal View History

{ stdenv, fetchurl, patchelf, makeWrapper, xorg, gcc, gcc-unwrapped }:
stdenv.mkDerivation rec {
name = "IPMIView-${version}";
2018-07-11 19:11:12 +02:00
version = "2.14.0";
buildVersion = "180213";
2017-06-03 13:00:12 +02:00
src = fetchurl {
2017-06-03 02:03:52 +02:00
url = "ftp://ftp.supermicro.com/utility/IPMIView/Linux/IPMIView_${version}_build.${buildVersion}_bundleJRE_Linux_x64.tar.gz";
2018-07-11 19:11:12 +02:00
sha256 = "1wp22wm7smlsb25x0cck4p660cycfczxj381930crd1qrf68mw4h";
};
nativeBuildInputs = [ patchelf makeWrapper ];
buildPhase = with xorg; ''
2016-06-07 20:17:30 +02:00
patchelf --set-rpath "${stdenv.lib.makeLibraryPath [ libX11 libXext libXrender libXtst libXi ]}" ./jre/lib/amd64/xawt/libmawt.so
patchelf --set-rpath "${gcc-unwrapped.lib}/lib" ./libiKVM64.so
2016-06-07 20:17:30 +02: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
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 13:00:12 +02:00
makeWrapper $out/jre/bin/java $out/bin/IPMIView \
--prefix PATH : "$out/jre/bin" \
--add-flags "-jar $out/IPMIView20.jar"
'';
meta = with stdenv.lib; {
license = licenses.unfree;
};
}