smb3-foundry: 1.2 -> 1.3.1

This commit is contained in:
TomaSajt 2023-09-03 01:03:37 +02:00
parent e569908808
commit 42cd017335
No known key found for this signature in database
GPG key ID: F011163C050122A1
3 changed files with 9 additions and 42 deletions

View file

@ -14,17 +14,15 @@ let
in in
stdenv.mkDerivation (finalAttrs: { stdenv.mkDerivation (finalAttrs: {
pname = "smb3-foundry"; pname = "smb3-foundry";
version = "1.2"; version = "1.3.1";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "mchlnix"; owner = "mchlnix";
repo = "SMB3-Foundry"; repo = "SMB3-Foundry";
rev = "refs/tags/${finalAttrs.version}"; rev = "refs/tags/${finalAttrs.version}";
hash = "sha256-iqqIyGp/sqWgShxk52omVcn7Q3WL2hK8sTLH4dashLE="; hash = "sha256-8cf7VhvC372Cqi94n2FSHcoCGblpZoZvBXcXq5jU6CY=";
}; };
patches = [ ./fix-relative-dirs.patch ];
nativeBuildInputs = [ makeWrapper ]; nativeBuildInputs = [ makeWrapper ];
installPhase = '' installPhase = ''
@ -42,11 +40,12 @@ stdenv.mkDerivation (finalAttrs: {
''; '';
meta = { 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}"; 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; license = lib.licenses.gpl3Only;
platforms = lib.platforms.unix; mainProgram = "smb3-foundry";
maintainers = with lib.maintainers; [ tomasajt ]; maintainers = with lib.maintainers; [ tomasajt ];
platforms = lib.platforms.unix;
}; };
}) })

View file

@ -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)

View file

@ -1969,7 +1969,9 @@ with pkgs;
sorted-grep = callPackage ../tools/text/sorted-grep { }; 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 { }; smbmap = callPackage ../tools/security/smbmap { };