nixpkgs/pkgs/servers/jetbrains/youtrack.nix
Zhenya Vinogradov 76e5589812 youtrack: use jdk11 instead of jdk16
Youtrack supports jdk11 officially, with jdk16 it will initialize but
then fail with the error:

Unable to make protected final java.lang.Class java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain) throws java.lang.ClassFormatError accessible: module java.base does not "opens java.lang" to unnamed module @26d27c7d
2021-09-16 13:57:46 +03:00

32 lines
866 B
Nix

{ lib, stdenv, fetchurl, makeWrapper, jdk11, gawk }:
stdenv.mkDerivation rec {
pname = "youtrack";
version = "2021.1.13597";
jar = fetchurl {
url = "https://download.jetbrains.com/charisma/${pname}-${version}.jar";
sha256 = "0lc0ra95ix5bs1spfjnx5akh8jm754v8lc3yja8dc438zi221qhh";
};
nativeBuildInputs = [ makeWrapper ];
dontUnpack = true;
installPhase = ''
runHook preInstall
makeWrapper ${jdk11}/bin/java $out/bin/youtrack \
--add-flags "\$YOUTRACK_JVM_OPTS -jar $jar" \
--prefix PATH : "${lib.makeBinPath [ gawk ]}" \
--set JRE_HOME ${jdk11}
runHook postInstall
'';
meta = with lib; {
description = "Issue tracking and project management tool for developers";
maintainers = teams.serokell.members;
# https://www.jetbrains.com/youtrack/buy/license.html
license = licenses.unfree;
};
}