Created
January 22, 2016 20:23
-
-
Save domenkozar/7162a13179debaa4e41e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| let | |
| pkgs = import <nixpkgs> {}; | |
| in | |
| pkgs.stdenv.mkDerivation rec { | |
| name = "IPMIView-${version}"; | |
| version = "20150909"; | |
| src = pkgs.fetchurl { | |
| url = "ftp://ftp.supermicro.com/utility/IPMIView/Linux/IPMIView_V2.10.2_bundleJRE_Linux_x64_${version}.tar.gz"; | |
| sha256 = "1zqg0rhi74gb8vkhfndp2h39dfih5d6y6lm8qlgg9pcnyfm5mk1v"; | |
| }; | |
| buildInputs = [ pkgs.patchelf pkgs.makeWrapper ]; | |
| buildPhase = with pkgs.xorg; '' | |
| patchelf --set-rpath "${libX11}/lib:${libXext}/lib:${libXrender}/lib:${libXtst}/lib:${libXi}/lib" ./jre/lib/amd64/xawt/libmawt.so | |
| patchelf --set-rpath "${pkgs.gcc}/lib" ./libiKVM64.so | |
| patchelf --set-rpath "${pkgs.gcc}" --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" ./jre/bin/javaws | |
| patchelf --set-rpath "${pkgs.gcc}" --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" ./jre/bin/java | |
| ''; | |
| installPhase = '' | |
| mkdir -p $out/bin | |
| cp -R . $out/ | |
| makeWrapper $out/IPMIView20 $out/bin/IPMIView20 --run "cd $out" --prefix PATH ":" "${pkgs.jre}/bin" | |
| ''; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment