mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-02-16 17:14:00 +00:00
python312Packages.explorerscript: modernize
This commit is contained in:
parent
3605e392d9
commit
af5d97a930
@ -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"
|
||||
|
||||
# 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;
|
||||
@ -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 ];
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user