python312Packages.explorerscript: modernize

This commit is contained in:
Robert Schütz 2024-11-08 22:31:52 -08:00
parent 3605e392d9
commit af5d97a930

View File

@ -7,7 +7,6 @@
scikit-build-core,
pybind11,
ninja,
ruff,
cmake,
pytestCheckHook,
setuptools,
@ -20,31 +19,27 @@ buildPythonPackage rec {
src = fetchFromGitHub {
owner = "SkyTemple";
repo = pname;
rev = version;
repo = "explorerscript";
rev = "refs/tags/${version}";
hash = "sha256-cKEceWr7XmZbuomPOmjQ32ptAjz3LZDQBWAgZEFadDY=";
# Include a pinned antlr4 fork used as a C++ library
fetchSubmodules = true;
};
nativeBuildInputs = [
build-system = [
setuptools
scikit-build-core
ninja
cmake
ruff
pybind11
];
# The source include some auto-generated ANTLR code that could be recompiled, but trying that resulted in a crash while decompiling unionall.ssb.
# We thus do not rebuild them.
postPatch = ''
substituteInPlace Makefile \
--replace-fail ./generate_parser_bindings.py "python3 ./generate_parser_bindings.py"
# Doesnt detect that package for some reason
substituteInPlace pyproject.toml \
--replace-fail "\"scikit-build-core<=0.9.8\"," ""
--replace-fail "scikit-build-core<=0.9.8" scikit-build-core
'';
dontUseCmakeConfigure = true;
@ -53,9 +48,8 @@ buildPythonPackage rec {
"igraph"
];
propagatedBuildInputs = [
dependencies = [
igraph
pybind11
];
optional-dependencies.pygments = [ pygments ];
@ -64,10 +58,10 @@ buildPythonPackage rec {
pythonImportsCheck = [ "explorerscript" ];
meta = with lib; {
meta = {
homepage = "https://github.com/SkyTemple/explorerscript";
description = "Programming language + compiler/decompiler for creating scripts for Pokémon Mystery Dungeon Explorers of Sky";
license = licenses.mit;
maintainers = with maintainers; [ marius851000 ];
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ marius851000 ];
};
}