From 42cd017335733c3e982a307c9e2b17dcbcb9bd16 Mon Sep 17 00:00:00 2001 From: TomaSajt <62384384+TomaSajt@users.noreply.github.com> Date: Sun, 3 Sep 2023 01:03:37 +0200 Subject: [PATCH] smb3-foundry: 1.2 -> 1.3.1 --- .../misc/smb3-foundry/default.nix | 13 ++++--- .../misc/smb3-foundry/fix-relative-dirs.patch | 34 ------------------- pkgs/top-level/all-packages.nix | 4 ++- 3 files changed, 9 insertions(+), 42 deletions(-) delete mode 100644 pkgs/applications/misc/smb3-foundry/fix-relative-dirs.patch diff --git a/pkgs/applications/misc/smb3-foundry/default.nix b/pkgs/applications/misc/smb3-foundry/default.nix index 81e54007b8bf..c1a896d88e4f 100644 --- a/pkgs/applications/misc/smb3-foundry/default.nix +++ b/pkgs/applications/misc/smb3-foundry/default.nix @@ -14,17 +14,15 @@ let in stdenv.mkDerivation (finalAttrs: { pname = "smb3-foundry"; - version = "1.2"; + version = "1.3.1"; src = fetchFromGitHub { owner = "mchlnix"; repo = "SMB3-Foundry"; rev = "refs/tags/${finalAttrs.version}"; - hash = "sha256-iqqIyGp/sqWgShxk52omVcn7Q3WL2hK8sTLH4dashLE="; + hash = "sha256-8cf7VhvC372Cqi94n2FSHcoCGblpZoZvBXcXq5jU6CY="; }; - patches = [ ./fix-relative-dirs.patch ]; - nativeBuildInputs = [ makeWrapper ]; installPhase = '' @@ -42,11 +40,12 @@ stdenv.mkDerivation (finalAttrs: { ''; meta = { - homepage = "https://github.com/mchlnix/SMB3-Foundry"; - description = "A modern Super Mario Bros. 3 Level Editor"; changelog = "https://github.com/mchlnix/SMB3-Foundry/releases/tag/${finalAttrs.version}"; + description = "A modern Super Mario Bros. 3 Level Editor"; + homepage = "https://github.com/mchlnix/SMB3-Foundry"; license = lib.licenses.gpl3Only; - platforms = lib.platforms.unix; + mainProgram = "smb3-foundry"; maintainers = with lib.maintainers; [ tomasajt ]; + platforms = lib.platforms.unix; }; }) diff --git a/pkgs/applications/misc/smb3-foundry/fix-relative-dirs.patch b/pkgs/applications/misc/smb3-foundry/fix-relative-dirs.patch deleted file mode 100644 index d49ddde897b4..000000000000 --- a/pkgs/applications/misc/smb3-foundry/fix-relative-dirs.patch +++ /dev/null @@ -1,34 +0,0 @@ -diff --git a/foundry/gui/WarningList.py b/foundry/gui/WarningList.py -index ace83d7..46012df 100644 ---- a/foundry/gui/WarningList.py -+++ b/foundry/gui/WarningList.py -@@ -5,6 +5,7 @@ from PySide6.QtCore import QEvent, QRect, Qt, Signal, SignalInstance - from PySide6.QtGui import QCursor, QFocusEvent - from PySide6.QtWidgets import QLabel, QVBoxLayout, QWidget - -+from foundry import root_dir - from foundry.game import GROUND - from foundry.game.ObjectDefinitions import GeneratorType - from foundry.game.gfx.objects import EnemyItem -@@ -216,7 +217,7 @@ class WarningList(QWidget): - return [enemy for enemy in self.level_ref.level.enemies if enemy.type == enemy_id] - - def _build_enemy_clan_dict(self): -- with open("data/enemy_data.json", "r") as enemy_data_file: -+ with open(root_dir.joinpath("data", "enemy_data.json"), "r") as enemy_data_file: - enemy_data = json.loads(enemy_data_file.read()) - - self._enemy_dict.clear() -diff --git a/smb3parse/util/parser/__init__.py b/smb3parse/util/parser/__init__.py -index ecef169..8bba57e 100644 ---- a/smb3parse/util/parser/__init__.py -+++ b/smb3parse/util/parser/__init__.py -@@ -302,7 +302,7 @@ def gen_levels_in_rom( - - print("---------------------", level_count, "------------------------") - -- level_data = pathlib.Path("data/levels.dat") -+ level_data = pathlib.Path(__file__).parent.parent.parent.joinpath("data", "levels.dat") - - missing = 0 - levels: dict[int, set[int]] = defaultdict(set) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 707bc0064fa3..bf6976d0e677 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -1969,7 +1969,9 @@ with pkgs; sorted-grep = callPackage ../tools/text/sorted-grep { }; - smb3-foundry = callPackage ../applications/misc/smb3-foundry { }; + smb3-foundry = callPackage ../applications/misc/smb3-foundry { + python3 = python311; + }; smbmap = callPackage ../tools/security/smbmap { };