2022-06-08 16:32:55 +00:00
|
|
|
{ fetchFromGitHub
|
|
|
|
, lib
|
|
|
|
, makeWrapper
|
|
|
|
, stdenv
|
2023-02-07 02:41:49 +00:00
|
|
|
, unstableGitUpdater
|
2022-06-08 16:32:55 +00:00
|
|
|
|
|
|
|
# Dependencies
|
|
|
|
, jre
|
|
|
|
, python3
|
|
|
|
}:
|
|
|
|
|
2022-12-15 18:28:21 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2022-06-08 16:32:55 +00:00
|
|
|
pname = "decompiler-mc";
|
2022-12-15 01:17:12 +00:00
|
|
|
version = "unstable-2022-06-21";
|
2022-06-08 16:32:55 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "hube12";
|
|
|
|
repo = "DecompilerMC";
|
2022-12-15 01:17:12 +00:00
|
|
|
rev = "a905ea1fa818df1ebfd6a1e0d7c61658737ed1bc";
|
|
|
|
hash = "sha256-0ZOgXG/ShACJz5NznMD4jxt8nb5XVyJBfcUZoSFsKAI=";
|
2022-06-08 16:32:55 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [ makeWrapper python3 ];
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir --parents $out
|
|
|
|
cp --recursive $src/lib $out/lib
|
|
|
|
|
2022-12-15 18:28:21 +00:00
|
|
|
install -D main.py $out/bin/${pname}
|
|
|
|
substituteInPlace $out/bin/${pname} --replace ./lib $out/lib
|
|
|
|
wrapProgram $out/bin/${pname} --prefix PATH : ${lib.makeBinPath [ jre ]}
|
2022-06-08 16:32:55 +00:00
|
|
|
'';
|
|
|
|
|
2023-02-07 02:41:49 +00:00
|
|
|
passthru.updateScript = unstableGitUpdater { };
|
|
|
|
|
2022-06-08 16:32:55 +00:00
|
|
|
meta = {
|
|
|
|
description = "Automated decompilation of Minecraft";
|
|
|
|
homepage = "https://github.com/hube12/DecompilerMC";
|
|
|
|
license = with lib.licenses; [
|
2022-08-10 19:46:29 +00:00
|
|
|
asl20 # Fernflower (vendored)
|
|
|
|
bsd3 # SpecialSource (vendored)
|
2022-12-15 18:28:21 +00:00
|
|
|
mit # DecompilerMC, CFR (vendored)
|
2022-06-08 16:32:55 +00:00
|
|
|
];
|
2022-12-15 18:28:21 +00:00
|
|
|
mainProgram = pname;
|
2022-06-08 16:32:55 +00:00
|
|
|
};
|
|
|
|
}
|