mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-10 11:45:45 +03:00
solarus{,-quest-editor}: update, modernize and adopt; solarus-launcher: init at 2.0.0 (#411457)
This commit is contained in:
commit
97376a8512
8 changed files with 336 additions and 148 deletions
34
pkgs/by-name/so/solarus-launcher/github-fetches.patch
Normal file
34
pkgs/by-name/so/solarus-launcher/github-fetches.patch
Normal file
|
@ -0,0 +1,34 @@
|
||||||
|
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||||
|
index 80b9aab..e56ca84 100644
|
||||||
|
--- a/CMakeLists.txt
|
||||||
|
+++ b/CMakeLists.txt
|
||||||
|
@@ -88,8 +88,7 @@ include(FetchContent)
|
||||||
|
|
||||||
|
# Qlementine Icons: an SVG icon library made for Qt.
|
||||||
|
FetchContent_Declare(qlementine-icons
|
||||||
|
- GIT_REPOSITORY "https://github.com/oclero/qlementine-icons.git"
|
||||||
|
- GIT_TAG v1.8.0
|
||||||
|
+ SOURCE_DIR "@qlementine-icons-src@"
|
||||||
|
)
|
||||||
|
FetchContent_MakeAvailable(qlementine-icons)
|
||||||
|
set_target_properties(qlementine-icons
|
||||||
|
@@ -99,8 +98,7 @@ set_target_properties(qlementine-icons
|
||||||
|
|
||||||
|
# Qlementine: the QStyle library to have a modern look n' feel.
|
||||||
|
FetchContent_Declare(qlementine
|
||||||
|
- GIT_REPOSITORY "https://github.com/oclero/qlementine.git"
|
||||||
|
- GIT_TAG v1.2.0
|
||||||
|
+ SOURCE_DIR "@qlementine-src@"
|
||||||
|
)
|
||||||
|
FetchContent_MakeAvailable(qlementine)
|
||||||
|
set_target_properties(qlementine
|
||||||
|
@@ -109,8 +107,7 @@ set_target_properties(qlementine
|
||||||
|
)
|
||||||
|
|
||||||
|
FetchContent_Declare(QtAppInstanceManager
|
||||||
|
- GIT_REPOSITORY "https://github.com/oclero/qtappinstancemanager.git"
|
||||||
|
- GIT_TAG v1.3.0
|
||||||
|
+ SOURCE_DIR "@qtappinstancemanager-src@"
|
||||||
|
)
|
||||||
|
FetchContent_MakeAvailable(QtAppInstanceManager)
|
||||||
|
set_target_properties(QtAppInstanceManager
|
109
pkgs/by-name/so/solarus-launcher/package.nix
Normal file
109
pkgs/by-name/so/solarus-launcher/package.nix
Normal file
|
@ -0,0 +1,109 @@
|
||||||
|
{
|
||||||
|
lib,
|
||||||
|
stdenv,
|
||||||
|
fetchFromGitLab,
|
||||||
|
fetchFromGitHub,
|
||||||
|
replaceVars,
|
||||||
|
cmake,
|
||||||
|
ninja,
|
||||||
|
luajit,
|
||||||
|
SDL2,
|
||||||
|
SDL2_image,
|
||||||
|
SDL2_ttf,
|
||||||
|
physfs,
|
||||||
|
openal,
|
||||||
|
libmodplug,
|
||||||
|
libvorbis,
|
||||||
|
solarus,
|
||||||
|
glm,
|
||||||
|
qt6Packages,
|
||||||
|
kdePackages,
|
||||||
|
}:
|
||||||
|
|
||||||
|
let
|
||||||
|
qlementine-icons-src = fetchFromGitHub {
|
||||||
|
owner = "oclero";
|
||||||
|
repo = "qlementine-icons";
|
||||||
|
tag = "v1.8.0";
|
||||||
|
hash = "sha256-FPndzMEOQvYNYUbT2V6iDlwoYqOww38GW/T3zUID3g0=";
|
||||||
|
};
|
||||||
|
|
||||||
|
qlementine-src = fetchFromGitHub {
|
||||||
|
owner = "oclero";
|
||||||
|
repo = "qlementine";
|
||||||
|
tag = "v1.2.1";
|
||||||
|
hash = "sha256-CPQMmTXyUW+CyLjHYx+IdXY4I2mVPudOmAksjd+izPA=";
|
||||||
|
};
|
||||||
|
|
||||||
|
qtappinstancemanager-src = fetchFromGitHub {
|
||||||
|
owner = "oclero";
|
||||||
|
repo = "qtappinstancemanager";
|
||||||
|
tag = "v1.3.0";
|
||||||
|
hash = "sha256-/zvNR/RHNV19ZI8d+58sotWxY16q2a7wWIBuKO52H5M=";
|
||||||
|
};
|
||||||
|
|
||||||
|
inherit (qt6Packages)
|
||||||
|
qtbase
|
||||||
|
qttools
|
||||||
|
wrapQtAppsHook
|
||||||
|
;
|
||||||
|
in
|
||||||
|
stdenv.mkDerivation (finalAttrs: {
|
||||||
|
pname = "solarus-launcher";
|
||||||
|
version = "2.0.0";
|
||||||
|
|
||||||
|
src = fetchFromGitLab {
|
||||||
|
owner = "solarus-games";
|
||||||
|
repo = "solarus-launcher";
|
||||||
|
tag = "v${finalAttrs.version}";
|
||||||
|
hash = "sha256-zBJnHzYJyhfzP1m6TgMkDLRA3EXC1oG8PC0Jq/fC2+Q=";
|
||||||
|
};
|
||||||
|
|
||||||
|
patches = [
|
||||||
|
(replaceVars ./github-fetches.patch {
|
||||||
|
inherit qlementine-src qlementine-icons-src qtappinstancemanager-src;
|
||||||
|
})
|
||||||
|
];
|
||||||
|
|
||||||
|
strictDeps = true;
|
||||||
|
nativeBuildInputs = [
|
||||||
|
cmake
|
||||||
|
ninja
|
||||||
|
qttools
|
||||||
|
wrapQtAppsHook
|
||||||
|
];
|
||||||
|
|
||||||
|
buildInputs = [
|
||||||
|
luajit
|
||||||
|
SDL2
|
||||||
|
SDL2_image
|
||||||
|
SDL2_ttf
|
||||||
|
physfs
|
||||||
|
openal
|
||||||
|
libmodplug
|
||||||
|
libvorbis
|
||||||
|
solarus
|
||||||
|
qtbase
|
||||||
|
kdePackages.qtsvg
|
||||||
|
glm
|
||||||
|
];
|
||||||
|
|
||||||
|
meta = {
|
||||||
|
description = "Launcher for the Zelda-like ARPG game engine, Solarus";
|
||||||
|
longDescription = ''
|
||||||
|
Solarus is a game engine for Zelda-like ARPG games written in lua.
|
||||||
|
Many full-fledged games have been writen for the engine.
|
||||||
|
Games can be created easily using the editor.
|
||||||
|
'';
|
||||||
|
homepage = "https://www.solarus-games.org";
|
||||||
|
mainProgram = "solarus-launcher";
|
||||||
|
license = with lib.licenses; [
|
||||||
|
# code
|
||||||
|
gpl3Plus
|
||||||
|
# assets
|
||||||
|
cc-by-sa-40
|
||||||
|
];
|
||||||
|
maintainers = with lib.maintainers; [ marcin-serwin ];
|
||||||
|
platforms = lib.platforms.linux;
|
||||||
|
};
|
||||||
|
})
|
88
pkgs/by-name/so/solarus-quest-editor/package.nix
Normal file
88
pkgs/by-name/so/solarus-quest-editor/package.nix
Normal file
|
@ -0,0 +1,88 @@
|
||||||
|
{
|
||||||
|
lib,
|
||||||
|
stdenv,
|
||||||
|
fetchFromGitLab,
|
||||||
|
fetchFromGitHub,
|
||||||
|
replaceVars,
|
||||||
|
cmake,
|
||||||
|
ninja,
|
||||||
|
luajit,
|
||||||
|
SDL2,
|
||||||
|
SDL2_image,
|
||||||
|
SDL2_ttf,
|
||||||
|
physfs,
|
||||||
|
openal,
|
||||||
|
libmodplug,
|
||||||
|
libvorbis,
|
||||||
|
solarus,
|
||||||
|
glm,
|
||||||
|
qt6Packages,
|
||||||
|
kdePackages,
|
||||||
|
}:
|
||||||
|
|
||||||
|
let
|
||||||
|
qlementine-src = fetchFromGitHub {
|
||||||
|
owner = "oclero";
|
||||||
|
repo = "qlementine";
|
||||||
|
tag = "v1.2.0";
|
||||||
|
hash = "sha256-25PKOpQl3IkBXX14gt8KKYXXJKeutQ75O7BftEqCAxk=";
|
||||||
|
};
|
||||||
|
|
||||||
|
inherit (qt6Packages)
|
||||||
|
qtbase
|
||||||
|
qttools
|
||||||
|
wrapQtAppsHook
|
||||||
|
;
|
||||||
|
in
|
||||||
|
stdenv.mkDerivation (finalAttrs: {
|
||||||
|
pname = "solarus-quest-editor";
|
||||||
|
version = "2.0.0";
|
||||||
|
|
||||||
|
src = fetchFromGitLab {
|
||||||
|
owner = "solarus-games";
|
||||||
|
repo = "solarus-quest-editor";
|
||||||
|
tag = "v${finalAttrs.version}";
|
||||||
|
hash = "sha256-GTslxValldReWGb3x67zRPrvQUuCO/HQSXOEQlJfAmw=";
|
||||||
|
};
|
||||||
|
|
||||||
|
patches = [
|
||||||
|
(replaceVars ./qlementine-src.patch { inherit qlementine-src; })
|
||||||
|
];
|
||||||
|
|
||||||
|
strictDeps = true;
|
||||||
|
nativeBuildInputs = [
|
||||||
|
cmake
|
||||||
|
ninja
|
||||||
|
qttools
|
||||||
|
wrapQtAppsHook
|
||||||
|
];
|
||||||
|
|
||||||
|
buildInputs = [
|
||||||
|
luajit
|
||||||
|
SDL2
|
||||||
|
SDL2_image
|
||||||
|
SDL2_ttf
|
||||||
|
physfs
|
||||||
|
openal
|
||||||
|
libmodplug
|
||||||
|
libvorbis
|
||||||
|
solarus
|
||||||
|
qtbase
|
||||||
|
kdePackages.qtsvg
|
||||||
|
glm
|
||||||
|
];
|
||||||
|
|
||||||
|
meta = {
|
||||||
|
description = "Editor for the Zelda-like ARPG game engine, Solarus";
|
||||||
|
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.
|
||||||
|
Games can be created easily using the editor.
|
||||||
|
'';
|
||||||
|
homepage = "https://www.solarus-games.org";
|
||||||
|
license = lib.licenses.gpl3;
|
||||||
|
maintainers = with lib.maintainers; [ marcin-serwin ];
|
||||||
|
platforms = lib.platforms.linux;
|
||||||
|
};
|
||||||
|
})
|
13
pkgs/by-name/so/solarus-quest-editor/qlementine-src.patch
Normal file
13
pkgs/by-name/so/solarus-quest-editor/qlementine-src.patch
Normal file
|
@ -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)
|
92
pkgs/by-name/so/solarus/package.nix
Normal file
92
pkgs/by-name/so/solarus/package.nix
Normal file
|
@ -0,0 +1,92 @@
|
||||||
|
{
|
||||||
|
lib,
|
||||||
|
stdenv,
|
||||||
|
fetchFromGitLab,
|
||||||
|
fetchpatch,
|
||||||
|
cmake,
|
||||||
|
ninja,
|
||||||
|
luajit,
|
||||||
|
SDL2,
|
||||||
|
SDL2_image,
|
||||||
|
SDL2_ttf,
|
||||||
|
physfs,
|
||||||
|
glm,
|
||||||
|
openal,
|
||||||
|
libmodplug,
|
||||||
|
libvorbis,
|
||||||
|
|
||||||
|
# tests
|
||||||
|
solarus-quest-editor,
|
||||||
|
solarus-launcher,
|
||||||
|
}:
|
||||||
|
|
||||||
|
stdenv.mkDerivation (finalAttrs: {
|
||||||
|
pname = "solarus";
|
||||||
|
version = "2.0.0";
|
||||||
|
|
||||||
|
src = fetchFromGitLab {
|
||||||
|
owner = "solarus-games";
|
||||||
|
repo = "solarus";
|
||||||
|
tag = "v${finalAttrs.version}";
|
||||||
|
hash = "sha256-Kfg4pFZrEhsIU4RQlOox3hMpk2PXbOzrkwDElPGnDjA=";
|
||||||
|
};
|
||||||
|
|
||||||
|
patches = [
|
||||||
|
# https://gitlab.com/solarus-games/solarus/-/merge_requests/1570
|
||||||
|
(fetchpatch {
|
||||||
|
url = "https://gitlab.com/solarus-games/solarus/-/commit/8e1eee51cbfa5acf2511b059739153065b0ba21d.patch";
|
||||||
|
hash = "sha256-KevGavtUhpHRt85WLh9ApmZ8a+NeWB1zDDHKGT08yhQ=";
|
||||||
|
})
|
||||||
|
];
|
||||||
|
|
||||||
|
outputs = [
|
||||||
|
"out"
|
||||||
|
"lib"
|
||||||
|
"dev"
|
||||||
|
];
|
||||||
|
|
||||||
|
strictDeps = true;
|
||||||
|
nativeBuildInputs = [
|
||||||
|
cmake
|
||||||
|
ninja
|
||||||
|
];
|
||||||
|
buildInputs = [
|
||||||
|
luajit
|
||||||
|
SDL2
|
||||||
|
SDL2_image
|
||||||
|
SDL2_ttf
|
||||||
|
physfs
|
||||||
|
openal
|
||||||
|
libmodplug
|
||||||
|
libvorbis
|
||||||
|
glm
|
||||||
|
];
|
||||||
|
|
||||||
|
cmakeFlags = [
|
||||||
|
(lib.cmakeFeature "CMAKE_CXX_FLAGS" "-DGLM_ENABLE_EXPERIMENTAL")
|
||||||
|
(lib.cmakeFeature "CMAKE_INSTALL_DATADIR" "${placeholder "lib"}/share")
|
||||||
|
];
|
||||||
|
|
||||||
|
passthru.tests = {
|
||||||
|
inherit solarus-quest-editor solarus-launcher;
|
||||||
|
};
|
||||||
|
|
||||||
|
meta = {
|
||||||
|
description = "Zelda-like ARPG game engine";
|
||||||
|
longDescription = ''
|
||||||
|
Solarus is a game engine for Zelda-like ARPG games written in lua.
|
||||||
|
Many full-fledged games have been writen for the engine.
|
||||||
|
'';
|
||||||
|
homepage = "https://www.solarus-games.org";
|
||||||
|
mainProgram = "solarus-run";
|
||||||
|
license = with lib.licenses; [
|
||||||
|
# code
|
||||||
|
gpl3Plus
|
||||||
|
# assets
|
||||||
|
cc-by-sa-30
|
||||||
|
cc-by-sa-40
|
||||||
|
];
|
||||||
|
maintainers = with lib.maintainers; [ marcin-serwin ];
|
||||||
|
platforms = lib.platforms.linux;
|
||||||
|
};
|
||||||
|
})
|
|
@ -1,70 +0,0 @@
|
||||||
{
|
|
||||||
lib,
|
|
||||||
mkDerivation,
|
|
||||||
fetchFromGitLab,
|
|
||||||
cmake,
|
|
||||||
luajit,
|
|
||||||
SDL2,
|
|
||||||
SDL2_image,
|
|
||||||
SDL2_ttf,
|
|
||||||
physfs,
|
|
||||||
fetchpatch,
|
|
||||||
openal,
|
|
||||||
libmodplug,
|
|
||||||
libvorbis,
|
|
||||||
solarus,
|
|
||||||
qtbase,
|
|
||||||
qttools,
|
|
||||||
glm,
|
|
||||||
}:
|
|
||||||
|
|
||||||
mkDerivation rec {
|
|
||||||
pname = "solarus-quest-editor";
|
|
||||||
version = "1.6.4";
|
|
||||||
|
|
||||||
src = fetchFromGitLab {
|
|
||||||
owner = "solarus-games";
|
|
||||||
repo = pname;
|
|
||||||
rev = "v${version}";
|
|
||||||
sha256 = "1qbc2j9kalk7xqk9j27s7wnm5zawiyjs47xqkqphw683idmzmjzn";
|
|
||||||
};
|
|
||||||
|
|
||||||
patches = [
|
|
||||||
(fetchpatch {
|
|
||||||
url = "https://gitlab.com/solarus-games/solarus-quest-editor/-/commit/81d5c7f1602cf355684d70a5e3449fefccfc44b8.patch";
|
|
||||||
sha256 = "tVUxkkDp2PcOHGy4dGvUcYj9gF7k4LN21VuxohCw9NE=";
|
|
||||||
})
|
|
||||||
];
|
|
||||||
|
|
||||||
nativeBuildInputs = [ cmake ];
|
|
||||||
|
|
||||||
buildInputs = [
|
|
||||||
luajit
|
|
||||||
SDL2
|
|
||||||
SDL2_image
|
|
||||||
SDL2_ttf
|
|
||||||
physfs
|
|
||||||
openal
|
|
||||||
libmodplug
|
|
||||||
libvorbis
|
|
||||||
solarus
|
|
||||||
qtbase
|
|
||||||
qttools
|
|
||||||
glm
|
|
||||||
];
|
|
||||||
|
|
||||||
meta = with lib; {
|
|
||||||
description = "Editor for the Zelda-like ARPG game engine, Solarus";
|
|
||||||
mainProgram = "solarus-quest-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.
|
|
||||||
Games can be created easily using the editor.
|
|
||||||
'';
|
|
||||||
homepage = "https://www.solarus-games.org";
|
|
||||||
license = licenses.gpl3;
|
|
||||||
maintainers = [ ];
|
|
||||||
platforms = platforms.linux;
|
|
||||||
};
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,74 +0,0 @@
|
||||||
{
|
|
||||||
lib,
|
|
||||||
mkDerivation,
|
|
||||||
fetchFromGitLab,
|
|
||||||
cmake,
|
|
||||||
luajit,
|
|
||||||
SDL2,
|
|
||||||
SDL2_image,
|
|
||||||
SDL2_ttf,
|
|
||||||
physfs,
|
|
||||||
glm,
|
|
||||||
openal,
|
|
||||||
libmodplug,
|
|
||||||
libvorbis,
|
|
||||||
qtbase,
|
|
||||||
qttools,
|
|
||||||
}:
|
|
||||||
|
|
||||||
mkDerivation rec {
|
|
||||||
pname = "solarus";
|
|
||||||
version = "1.6.4";
|
|
||||||
|
|
||||||
src = fetchFromGitLab {
|
|
||||||
owner = "solarus-games";
|
|
||||||
repo = pname;
|
|
||||||
rev = "v${version}";
|
|
||||||
sha256 = "sbdlf+R9OskDQ5U5rqUX2gF8l/fj0sDJv6BL7H1I1Ng=";
|
|
||||||
};
|
|
||||||
|
|
||||||
outputs = [
|
|
||||||
"out"
|
|
||||||
"lib"
|
|
||||||
"dev"
|
|
||||||
];
|
|
||||||
|
|
||||||
nativeBuildInputs = [
|
|
||||||
cmake
|
|
||||||
qttools
|
|
||||||
];
|
|
||||||
buildInputs = [
|
|
||||||
luajit
|
|
||||||
SDL2
|
|
||||||
SDL2_image
|
|
||||||
SDL2_ttf
|
|
||||||
physfs
|
|
||||||
openal
|
|
||||||
libmodplug
|
|
||||||
libvorbis
|
|
||||||
qtbase
|
|
||||||
glm
|
|
||||||
];
|
|
||||||
|
|
||||||
cmakeFlags = [
|
|
||||||
(lib.cmakeFeature "CMAKE_CXX_FLAGS" "-DGLM_ENABLE_EXPERIMENTAL")
|
|
||||||
];
|
|
||||||
|
|
||||||
preFixup = ''
|
|
||||||
mkdir $lib/
|
|
||||||
mv $out/lib $lib
|
|
||||||
'';
|
|
||||||
|
|
||||||
meta = with lib; {
|
|
||||||
description = "Zelda-like ARPG game engine";
|
|
||||||
longDescription = ''
|
|
||||||
Solarus is a game engine for Zelda-like ARPG games written in lua.
|
|
||||||
Many full-fledged games have been writen for the engine.
|
|
||||||
'';
|
|
||||||
homepage = "https://www.solarus-games.org";
|
|
||||||
license = licenses.gpl3;
|
|
||||||
maintainers = [ ];
|
|
||||||
platforms = platforms.linux;
|
|
||||||
};
|
|
||||||
|
|
||||||
}
|
|
|
@ -15235,10 +15235,6 @@ with pkgs;
|
||||||
lua = lua5_1;
|
lua = lua5_1;
|
||||||
};
|
};
|
||||||
|
|
||||||
# solarus and solarus-quest-editor must use the same version of Qt.
|
|
||||||
solarus = libsForQt5.callPackage ../games/solarus { };
|
|
||||||
solarus-quest-editor = libsForQt5.callPackage ../development/tools/solarus-quest-editor { };
|
|
||||||
|
|
||||||
# You still can override by passing more arguments.
|
# You still can override by passing more arguments.
|
||||||
spring = callPackage ../games/spring { asciidoc = asciidoc-full; };
|
spring = callPackage ../games/spring { asciidoc = asciidoc-full; };
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue