Add DecompilerMC
This commit is contained in:
parent
4a76646a5b
commit
93909f7c9d
2 changed files with 46 additions and 0 deletions
|
@ -51,6 +51,7 @@ in
|
|||
wireshark
|
||||
youtube-dl
|
||||
|
||||
(pkgs.callPackage ../../packages/decompiler-mc.nix { })
|
||||
(pkgs.callPackage ../../packages/mcaselector.nix { })
|
||||
(pkgs.callPackage ../../packages/nbt-explorer.nix { })
|
||||
|
||||
|
|
45
packages/decompiler-mc.nix
Normal file
45
packages/decompiler-mc.nix
Normal file
|
@ -0,0 +1,45 @@
|
|||
{ 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";
|
||||
sha256 = "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";
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue