Skip to content

Commit

Permalink
python312Packages.explorerscript: modernize
Browse files Browse the repository at this point in the history
  • Loading branch information
dotlambda committed Nov 9, 2024
1 parent 3605e39 commit af5d97a
Showing 1 changed file with 9 additions and 15 deletions.
24 changes: 9 additions & 15 deletions pkgs/development/python-modules/explorerscript/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
scikit-build-core,
pybind11,
ninja,
ruff,
cmake,
pytestCheckHook,
setuptools,
Expand All @@ -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"
# Doesn’t 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;
Expand All @@ -53,9 +48,8 @@ buildPythonPackage rec {
"igraph"
];

propagatedBuildInputs = [
dependencies = [
igraph
pybind11
];

optional-dependencies.pygments = [ pygments ];
Expand All @@ -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 ];
};
}

0 comments on commit af5d97a

Please sign in to comment.