diff --git a/pkgs/by-name/ta/taisei/package.nix b/pkgs/by-name/ta/taisei/package.nix new file mode 100644 index 000000000000..452fbf04d0db --- /dev/null +++ b/pkgs/by-name/ta/taisei/package.nix @@ -0,0 +1,104 @@ +{ + lib, + stdenv, + fetchFromGitHub, + # Build depends + docutils, + meson, + ninja, + pkg-config, + python3Packages, + opusfile, + openssl, + gamemode, + shaderc, + ensureNewerSourcesForZipFilesHook, + # Runtime depends + glfw, + SDL2, + SDL2_mixer, + cglm, + freetype, + libpng, + libwebp, + libzip, + zlib, + zstd, + spirv-cross, + + gamemodeSupport ? stdenv.hostPlatform.isLinux, +}: + +stdenv.mkDerivation (finalAttrs: { + pname = "taisei"; + version = "1.4.2"; + + src = fetchFromGitHub { + owner = "taisei-project"; + repo = "taisei"; + rev = "v${finalAttrs.version}"; + hash = "sha256-rThLz8o6IYhIBUc0b1sAQi2aF28btajcM1ScTv+qn6c="; + fetchSubmodules = true; + }; + + nativeBuildInputs = [ + docutils + meson + ninja + pkg-config + python3Packages.python + python3Packages.zstandard + ensureNewerSourcesForZipFilesHook + shaderc + ]; + + buildInputs = [ + glfw + SDL2 + SDL2_mixer + cglm + freetype + libpng + libwebp + libzip + zlib + zstd + opusfile + openssl + spirv-cross + ] ++ lib.optional gamemodeSupport gamemode; + + mesonFlags = [ + (lib.mesonBool "b_lto" false) + (lib.mesonEnable "install_macos_bundle" false) + (lib.mesonEnable "install_relocatable" false) + (lib.mesonEnable "shader_transpiler" false) + (lib.mesonEnable "gamemode" gamemodeSupport) + ]; + + preConfigure = '' + patchShebangs . + ''; + + strictDeps = true; + + meta = { + description = "Free and open-source Touhou Project clone and fangame"; + mainProgram = "taisei"; + longDescription = '' + Taisei is an open clone of the Tōhō Project series. Tōhō is a one-man + project of shoot-em-up games set in an isolated world full of Japanese + folklore. + ''; + homepage = "https://taisei-project.org/"; + license = with lib.licenses; [ + mit + cc-by-40 + ]; + maintainers = with lib.maintainers; [ + lambda-11235 + Gliczy + ]; + platforms = lib.platforms.all; + }; +}) diff --git a/pkgs/games/taisei/0001-lto-fix.patch b/pkgs/games/taisei/0001-lto-fix.patch deleted file mode 100644 index eed7b845f53c..000000000000 --- a/pkgs/games/taisei/0001-lto-fix.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/meson.build b/meson.build -index 80aa58d..c7e9d0a 100644 ---- a/meson.build -+++ b/meson.build -@@ -17,7 +17,7 @@ project('taisei', 'c', - # You may want to change these for a debug build dir - 'buildtype=release', - 'strip=true', -- 'b_lto=true', -+ 'b_lto=false', - 'b_ndebug=if-release', - ] - ) diff --git a/pkgs/games/taisei/default.nix b/pkgs/games/taisei/default.nix deleted file mode 100644 index ee5712f7b7f6..000000000000 --- a/pkgs/games/taisei/default.nix +++ /dev/null @@ -1,47 +0,0 @@ -{ lib, stdenv, fetchurl -# Build depends -, docutils, meson, ninja, pkg-config, python3 -# Runtime depends -, glfw, SDL2, SDL2_mixer -, cglm, freetype, libpng, libwebp, libzip, zlib -}: - -stdenv.mkDerivation rec { - pname = "taisei"; - version = "1.3.2"; - - src = fetchurl { - url = "https://github.com/taisei-project/${pname}/releases/download/v${version}/${pname}-v${version}.tar.xz"; - sha256 = "1g53fcyrlzmvlsb40pw90gaglysv6n1w42hk263iv61ibhdmzh6v"; - }; - - nativeBuildInputs = [ - docutils meson ninja pkg-config python3 - ]; - - buildInputs = [ - glfw SDL2 SDL2_mixer - cglm freetype libpng libwebp libzip zlib - ]; - - patches = [ ./0001-lto-fix.patch ]; - - preConfigure = '' - patchShebangs . - ''; - - meta = with lib; { - broken = stdenv.hostPlatform.isDarwin; - description = "Free and open-source Touhou Project clone and fangame"; - mainProgram = "taisei"; - longDescription = '' - Taisei is an open clone of the Tōhō Project series. Tōhō is a one-man - project of shoot-em-up games set in an isolated world full of Japanese - folklore. - ''; - homepage = "https://taisei-project.org/"; - license = [ licenses.mit licenses.cc-by-40 ]; - maintainers = [ maintainers.lambda-11235 ]; - platforms = platforms.all; - }; -} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 1d3c9fa021e1..7fd4ee0f3815 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -34876,8 +34876,6 @@ with pkgs; t4kcommon = callPackage ../games/t4kcommon { }; - taisei = callPackage ../games/taisei { }; - tcl2048 = callPackage ../games/tcl2048 { }; the-powder-toy = callPackage ../by-name/th/the-powder-toy/package.nix {