nixos-config/pkgs/yourkit.nix
2017-03-09 13:40:12 +01:00

22 lines
610 B
Nix

with import <nixpkgs> {};
stdenv.mkDerivation rec {
name = "yjp-${version}";
version = "2017.02-b53";
src = fetchurl {
url = "https://www.yourkit.com/download/${name}.zip";
sha256 = "0ms1pq5badk6wb468s6kxqb2c9ll1sbjz2p61sdbpjp59a1sv2gx";
};
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}
'';
}