14 stdenv.mkDerivation rec {
17 buildVersion = "221118";
20 url = "https://www.supermicro.com/wftp/utility/IPMIView/Linux/IPMIView_${version}_build.${buildVersion}_bundleJRE_Linux_x64.tar.gz";
21 hash = "sha256-ZN0vadGbjGj9U2wPqvHLjS9fsk3DNCbXoNvzUfnn8IM=";
24 nativeBuildInputs = [ patchelf makeWrapper ];
25 buildPhase = with xorg;
27 stunnelBinary = if stdenv.hostPlatform.system == "x86_64-linux" then "linux/stunnel64"
28 else if stdenv.hostPlatform.system == "i686-linux" then "linux/stunnel32"
29 else throw "IPMIView is not supported on this platform";
34 patchelf --set-rpath "${lib.makeLibraryPath [ libX11 libXext libXrender libXtst libXi ]}" ./jre/lib/libawt_xawt.so
35 patchelf --set-rpath "${lib.makeLibraryPath [ freetype ]}" ./jre/lib/libfontmanager.so
36 patchelf --set-rpath "${gcc.cc}/lib:$out/jre/lib/jli" --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" ./jre/bin/java
37 patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" ./BMCSecurity/${stunnelBinary}
42 desktopItem = makeDesktopItem rec {
46 genericName = "Supermicro BMC manager";
47 categories = [ "Network" ];
56 ln -s ${desktopItem}/share $out/share
58 # LD_LIBRARY_PATH: fontconfig is used from java code
59 # PATH: iputils is used for ping, and psmisc is for killall
60 # WORK_DIR: unfortunately the ikvm related binaries are loaded from
61 # and user configuration is written to files in the CWD
62 makeWrapper $out/jre/bin/java $out/bin/IPMIView \
63 --set LD_LIBRARY_PATH "${lib.makeLibraryPath [ fontconfig gcc-unwrapped.lib ]}" \
64 --prefix PATH : "$out/jre/bin:${iputils}/bin:${psmisc}/bin" \
65 --add-flags "-jar $out/IPMIView20.jar" \
66 --run 'WORK_DIR=''${XDG_DATA_HOME:-~/.local/share}/ipmiview
68 ln -snf '$out'/iKVM.jar '$out'/iKVM_ssl.jar '$out'/libiKVM* '$out'/libSharedLibrary* $WORK_DIR
75 sourceProvenance = with sourceTypes; [
79 license = licenses.unfree;
80 maintainers = with maintainers; [ vlaci ];
81 platforms = [ "x86_64-linux" "i686-linux" ];
82 mainProgram = "IPMIView";