Unverified Commit 55516771 authored by Bobby Rong's avatar Bobby Rong Committed by GitHub
Browse files

skytemple: 1.6.5 -> 1.8.3 (#343467)

parents 0075cbbb 5d125adb
Loading
Loading
Loading
Loading
+2 −8
Original line number Diff line number Diff line
@@ -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 ];
@@ -36,11 +36,6 @@ python3Packages.buildPythonApplication rec {
    wrapGAppsHook3
  ];

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

  dependencies = with python3Packages; [
    cairosvg
    natsort
@@ -49,7 +44,6 @@ python3Packages.buildPythonApplication rec {
    pycairo
    pygal
    psutil
    gbulb
    pypresence
    sentry-sdk
    setuptools
+24 −17
Original line number Diff line number Diff line
@@ -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 ];
+2 −2
Original line number Diff line number Diff line
@@ -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.
@@ -17,7 +17,7 @@ buildPythonPackage rec {
    owner = "SkyTemple";
    repo = pname;
    rev = version;
    sha256 = "sha256-D81vXhYGxwvy26PvicniCLiS58LmrSP9ppzXKRzQSJc=";
    sha256 = "sha256-uhLmEViiJ5+2Aw9MJP8GL7nhk8lMPcRZRB8WTDFXe+s=";
  };

  prePatch = "cd src";
+8 −14
Original line number Diff line number Diff line
@@ -3,7 +3,6 @@
  lib,
  buildPythonPackage,
  fetchFromGitHub,
  fetchpatch2,
  appdirs,
  dungeon-eos,
  explorerscript,
@@ -29,7 +28,7 @@

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

  disabled = pythonOlder "3.9";
@@ -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\""
@@ -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" ];
+8 −6
Original line number Diff line number Diff line
@@ -3,7 +3,7 @@
  stdenv,
  buildPythonPackage,
  cargo,
  fetchPypi,
  fetchFromGitHub,
  libiconv,
  Foundation,
  rustPlatform,
@@ -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 [
Loading