2016-01-23 22:14:41 +01:00
|
|
|
{ stdenv, fetchurl, patchelf, makeWrapper, xorg, gcc }:
|
|
|
|
|
|
|
|
assert stdenv.isLinux;
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "IPMIView-${version}";
|
|
|
|
version = "20151223";
|
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "ftp://ftp.supermicro.com/utility/IPMIView/Linux/IPMIView_V2.11.0_bundleJRE_Linux_x64_${version}.tar.gz";
|
|
|
|
sha256 = "1rv9j0id7i2ipm25n60bpfdm1gj44xg2aj8rnx4s6id3ln90q121";
|
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [ 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
|
2016-01-23 22:14:41 +01:00
|
|
|
patchelf --set-rpath "${gcc.cc}/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
|
2016-01-23 22:14:41 +01: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/
|
|
|
|
echo "$out/jre/bin/java -jar $out/IPMIView20.jar" > $out/bin/IPMIView
|
|
|
|
chmod +x $out/bin/IPMIView
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
license = licenses.unfree;
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|