Skip to content

Commit

Permalink
skytemple: 1.6.5 -> 1.8.3 (#343467)
Browse files Browse the repository at this point in the history
  • Loading branch information
bobby285271 authored Oct 14, 2024
2 parents 0075cbb + 5d125ad commit 5551677
Show file tree
Hide file tree
Showing 8 changed files with 187 additions and 306 deletions.
10 changes: 2 additions & 8 deletions pkgs/applications/misc/skytemple/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@

python3Packages.buildPythonApplication rec {
pname = "skytemple";
version = "1.6.5";
version = "1.8.3";
pyproject = true;

src = fetchFromGitHub {
owner = "SkyTemple";
repo = "skytemple";
rev = "refs/tags/${version}";
hash = "sha256-yfXu1sboKi8STPiX5FUD9q+1U9GfhOyEKDRvU9rgdfI=";
hash = "sha256-RFLxDV/L6Qbz14KqIEcMX/EnirNUrHL0MW8v5Z8ByK0=";
};

build-system = with python3Packages; [ setuptools ];
Expand All @@ -36,11 +36,6 @@ python3Packages.buildPythonApplication rec {
wrapGAppsHook3
];

pythonRelaxDeps = [
"skytemple-files"
"skytemple-ssb-debugger"
];

dependencies = with python3Packages; [
cairosvg
natsort
Expand All @@ -49,7 +44,6 @@ python3Packages.buildPythonApplication rec {
pycairo
pygal
psutil
gbulb
pypresence
sentry-sdk
setuptools
Expand Down
41 changes: 24 additions & 17 deletions pkgs/development/python-modules/explorerscript/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,49 +2,56 @@
lib,
buildPythonPackage,
fetchFromGitHub,
antlr4,
antlr4-python3-runtime,
igraph,
pygments,
scikit-build-core,
pybind11,
ninja,
ruff,
cmake,
pytestCheckHook,
setuptools,
}:

buildPythonPackage rec {
pname = "explorerscript";
version = "0.1.5";
version = "0.2.1.post2";
pyproject = true;

src = fetchFromGitHub {
owner = "SkyTemple";
repo = pname;
rev = version;
hash = "sha256-dGbzZYEFEWE5bUz+647pPzP4Z/XmrJU82jNT4ZBRNHk=";
hash = "sha256-cKEceWr7XmZbuomPOmjQ32ptAjz3LZDQBWAgZEFadDY=";
# Include a pinned antlr4 fork used as a C++ library
fetchSubmodules = true;
};

nativeBuildInputs = [
antlr4
setuptools
scikit-build-core
ninja
cmake
ruff
];

pythonRelaxDeps = [
# antlr output is rebuilt in postPatch step.
"antlr4-python3-runtime"
# igraph > 0.10.4 was marked as incompatible by upstream
# due to a breaking change introduced in 0.10.5. Later versions reverted
# this change, and introduced a deprecation warning instead.
#
# https://github.com/igraph/python-igraph/issues/693
"igraph"
];
# 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 = ''
antlr -Dlanguage=Python3 -visitor explorerscript/antlr/{ExplorerScript,SsbScript}.g4
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\"," ""
'';

dontUseCmakeConfigure = true;

propagatedBuildInputs = [
antlr4-python3-runtime
igraph
pybind11
];

optional-dependencies.pygments = [ pygments ];
Expand Down
4 changes: 2 additions & 2 deletions pkgs/development/python-modules/pmdsky-debug-py/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#This package is auto-generated. It could totally be possible to generate it from upstream, but seems unecessary
buildPythonPackage rec {
pname = "pmdsky-debug-py";
version = "8.0.4";
version = "10.0.21";
pyproject = true;
# SkyTemple specifically require this version. This is used when patching the binary,
# and risk to be a bit problematic if using the latest version, given it doesn’t follow semver.
Expand All @@ -17,7 +17,7 @@ buildPythonPackage rec {
owner = "SkyTemple";
repo = pname;
rev = version;
sha256 = "sha256-D81vXhYGxwvy26PvicniCLiS58LmrSP9ppzXKRzQSJc=";
sha256 = "sha256-uhLmEViiJ5+2Aw9MJP8GL7nhk8lMPcRZRB8WTDFXe+s=";
};

prePatch = "cd src";
Expand Down
22 changes: 8 additions & 14 deletions pkgs/development/python-modules/skytemple-files/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
lib,
buildPythonPackage,
fetchFromGitHub,
fetchpatch2,
appdirs,
dungeon-eos,
explorerscript,
Expand All @@ -29,7 +28,7 @@

buildPythonPackage rec {
pname = "skytemple-files";
version = "1.7.0";
version = "1.8.3";
pyproject = true;

disabled = pythonOlder "3.9";
Expand All @@ -38,19 +37,11 @@ buildPythonPackage rec {
owner = "SkyTemple";
repo = "skytemple-files";
rev = version;
hash = "sha256-G2AAQ+eRnsMTWrAF0SNmxUmOoHTSMCuSy1kUZbFy8y0=";
hash = "sha256-4ENuYq074j/VdzLyrGVCGaZhoStwlgJWTqGbrt20A3Q=";
# Most patches are in submodules
fetchSubmodules = true;
};

patches = [
(fetchpatch2 {
name = "fix-tests.patch";
url = "https://github.com/SkyTemple/skytemple-files/commit/854e5514e6c63ba082618d14643e3a4b30a6c2b2.patch";
hash = "sha256-oTV2EQQ2OPgu2pYB2fLd4jODfybnV29YNLxzDs2v6Cg=";
})
];

postPatch = ''
substituteInPlace skytemple_files/patch/arm_patcher.py skytemple_files/data/data_cd/armips_importer.py \
--replace-fail "exec_name = os.getenv(\"SKYTEMPLE_ARMIPS_EXEC\", f\"{prefix}armips\")" "exec_name = \"${armips}/bin/armips\""
Expand Down Expand Up @@ -86,10 +77,13 @@ buildPythonPackage rec {
parameterized
xmldiff
] ++ optional-dependencies.spritecollab;
pytestFlagsArray = [ "test/" ];

preCheck = "pushd test";
postCheck = "popd";

disabledTestPaths = [
"test/skytemple_files_test/common/spritecollab/sc_online_test.py"
"test/skytemple_files_test/compression_container/atupx/atupx_test.py" # Particularly long test
"skytemple_files_test/common/spritecollab/sc_online_test.py"
"skytemple_files_test/compression_container/atupx/atupx_test.py" # Particularly long test
];

pythonImportsCheck = [ "skytemple_files" ];
Expand Down
14 changes: 8 additions & 6 deletions pkgs/development/python-modules/skytemple-rust/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
stdenv,
buildPythonPackage,
cargo,
fetchPypi,
fetchFromGitHub,
libiconv,
Foundation,
rustPlatform,
Expand All @@ -14,18 +14,20 @@

buildPythonPackage rec {
pname = "skytemple-rust";
version = "1.6.5";
version = "1.8.2";
pyproject = true;

src = fetchPypi {
inherit pname version;
hash = "sha256-bf+umrb5EIoCD2kheVpf9IwsW4Sf2hR7XOEzscYtLA8=";
src = fetchFromGitHub {
owner = "SkyTemple";
repo = "skytemple-rust";
rev = version;
hash = "sha256-0hIwFJn/cwtKHKoD+upeorC52YnDlej3TrWf3PmAQAQ=";
};

cargoDeps = rustPlatform.fetchCargoTarball {
inherit src;
name = "${pname}-${version}";
hash = "sha256-0a57RmZPztcIeRs7GNYe18JO+LlWoeNWG3nD9cG0XIU=";
hash = "sha256-Gdypi9DJAXQgNaRCLEt4LTqUhBJC8plH0YhgNOIOGvA=";
};

buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@

buildPythonPackage rec {
pname = "skytemple-ssb-debugger";
version = "1.7.0";
version = "1.8.2";
pyproject = true;

src = fetchFromGitHub {
owner = "SkyTemple";
repo = "skytemple-ssb-debugger";
rev = version;
hash = "sha256-S38Nw7FntacEdwdGu2d/zUKOsGostVy9+U2KPxlvI5Q=";
hash = "sha256-HmJOjHX2/P284DSIdKuSz3++Qr1fKVGRQmA/+cMrcYw=";
};

build-system = [ setuptools ];
Expand Down
Loading

0 comments on commit 5551677

Please sign in to comment.