{ fetchFromGitHub , lib , makeWrapper , stdenv # Dependencies , jre , python3 }: stdenv.mkDerivation rec { pname = "decompiler-mc"; version = "unstable-2022-05-07"; src = fetchFromGitHub { owner = "hube12"; repo = "DecompilerMC"; rev = "ffec115d44c5ec76034b42110610ad6dbc3b75c4"; hash = "sha256-XLeupo3jzA7M6HJ8vZ1Zrt8v5m3gb516RVY0LsITeZA="; }; buildInputs = [ makeWrapper python3 ]; installPhase = '' mkdir --parents $out cp --recursive $src/lib $out/lib install -D main.py $out/bin/decompiler-mc substituteInPlace $out/bin/decompiler-mc --replace ./lib $out/lib wrapProgram $out/bin/decompiler-mc --prefix PATH : ${lib.makeBinPath [ jre ]} ''; meta = { description = "Automated decompilation of Minecraft"; homepage = "https://github.com/hube12/DecompilerMC"; license = with lib.licenses; [ asl20 # Fernflower (bundled) bsd3 # SpecialSource (bundled) mit # CFR (bundled), DecompilerMC ]; mainProgram = "decompiler-mc"; }; }