nixos-config/pkgs/yourkit.nix
2018-08-22 21:16:41 +02:00

22 lines
634 B
Nix

with import <nixpkgs> {};
stdenv.mkDerivation rec {
name = "yjp-${version}";
version = "2017.02-b75";
src = fetchurl {
url = "https://www.yourkit.com/download/YourKit-JavaProfiler-${version}.zip";
sha256 = "0m0xjyp2plwpfgy2fps86k3cqv49268s4piasyszc00gf5n5cban";
};
nativeBuildInputs = [ unzip makeWrapper patchelf ];
installPhase = ''
mkdir -p $out
cp -ra ./ $out/yjp
chmod +x $out/yjp/bin/*/yjp_dc
patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" $out/yjp/bin/linux-x86-64/yjp_dc
makeWrapper $out/yjp/bin/yjp.sh $out/bin/yjp \
--set YJP_JAVA_HOME ${jdk}
'';
}