From d18d7c6bf8aea63ab66b0d5c67be168fe847b84a Mon Sep 17 00:00:00 2001 From: Marcin Serwin Date: Mon, 26 May 2025 22:58:11 +0200 Subject: [PATCH] solarus-quest-editor: 1.6.4 -> 2.0.0 Signed-off-by: Marcin Serwin --- .../tools/solarus-quest-editor/default.nix | 44 +++++++++++++------ .../solarus-quest-editor/qlementine-src.patch | 13 ++++++ pkgs/top-level/all-packages.nix | 2 +- 3 files changed, 44 insertions(+), 15 deletions(-) create mode 100644 pkgs/development/tools/solarus-quest-editor/qlementine-src.patch diff --git a/pkgs/development/tools/solarus-quest-editor/default.nix b/pkgs/development/tools/solarus-quest-editor/default.nix index 873314138265..315aedd47954 100644 --- a/pkgs/development/tools/solarus-quest-editor/default.nix +++ b/pkgs/development/tools/solarus-quest-editor/default.nix @@ -1,42 +1,59 @@ { lib, - mkDerivation, + stdenv, fetchFromGitLab, + fetchFromGitHub, + replaceVars, cmake, + ninja, luajit, SDL2, SDL2_image, SDL2_ttf, physfs, - fetchpatch, openal, libmodplug, libvorbis, solarus, - qtbase, - qttools, glm, + qt6Packages, }: -mkDerivation rec { +let + qlementine-src = fetchFromGitHub { + owner = "oclero"; + repo = "qlementine"; + tag = "v1.2.0"; + hash = "sha256-25PKOpQl3IkBXX14gt8KKYXXJKeutQ75O7BftEqCAxk="; + }; + + inherit (qt6Packages) + qtbase + qttools + wrapQtAppsHook + ; +in +stdenv.mkDerivation rec { pname = "solarus-quest-editor"; - version = "1.6.4"; + version = "2.0.0"; src = fetchFromGitLab { owner = "solarus-games"; repo = pname; rev = "v${version}"; - sha256 = "1qbc2j9kalk7xqk9j27s7wnm5zawiyjs47xqkqphw683idmzmjzn"; + hash = "sha256-GTslxValldReWGb3x67zRPrvQUuCO/HQSXOEQlJfAmw="; }; patches = [ - (fetchpatch { - url = "https://gitlab.com/solarus-games/solarus-quest-editor/-/commit/81d5c7f1602cf355684d70a5e3449fefccfc44b8.patch"; - sha256 = "tVUxkkDp2PcOHGy4dGvUcYj9gF7k4LN21VuxohCw9NE="; - }) + (replaceVars ./qlementine-src.patch { inherit qlementine-src; }) ]; - nativeBuildInputs = [ cmake ]; + nativeBuildInputs = [ + cmake + ninja + qttools + wrapQtAppsHook + ]; buildInputs = [ luajit @@ -49,13 +66,12 @@ mkDerivation rec { libvorbis solarus qtbase - qttools glm ]; meta = with lib; { description = "Editor for the Zelda-like ARPG game engine, Solarus"; - mainProgram = "solarus-quest-editor"; + mainProgram = "solarus-editor"; longDescription = '' Solarus is a game engine for Zelda-like ARPG games written in lua. Many full-fledged games have been writen for the engine. diff --git a/pkgs/development/tools/solarus-quest-editor/qlementine-src.patch b/pkgs/development/tools/solarus-quest-editor/qlementine-src.patch new file mode 100644 index 000000000000..a19cc2538f9d --- /dev/null +++ b/pkgs/development/tools/solarus-quest-editor/qlementine-src.patch @@ -0,0 +1,13 @@ +diff --git a/cmake/AddDependencies.cmake b/cmake/AddDependencies.cmake +index 8272d14..054c079 100644 +--- a/cmake/AddDependencies.cmake ++++ b/cmake/AddDependencies.cmake +@@ -51,7 +51,6 @@ endif() + include(FetchContent) + FetchContent_Declare( + qlementine +- GIT_REPOSITORY https://github.com/oclero/qlementine.git +- GIT_TAG v1.2.0 ++ SOURCE_DIR "@qlementine-src@" + ) + FetchContent_MakeAvailable(qlementine) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 5e3e59e68269..b945cd5a5a19 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -15291,7 +15291,7 @@ with pkgs; # solarus and solarus-quest-editor must use the same version of Qt. solarus = callPackage ../games/solarus { }; - solarus-quest-editor = libsForQt5.callPackage ../development/tools/solarus-quest-editor { }; + solarus-quest-editor = callPackage ../development/tools/solarus-quest-editor { }; # You still can override by passing more arguments. spring = callPackage ../games/spring { asciidoc = asciidoc-full; };