btrbk: add mainProgram
[NixPkgs.git] / pkgs / by-name / ta / taisei / package.nix
blob452fbf04d0dbacf8f1c8bfd98971ac5547e54a81
2   lib,
3   stdenv,
4   fetchFromGitHub,
5   # Build depends
6   docutils,
7   meson,
8   ninja,
9   pkg-config,
10   python3Packages,
11   opusfile,
12   openssl,
13   gamemode,
14   shaderc,
15   ensureNewerSourcesForZipFilesHook,
16   # Runtime depends
17   glfw,
18   SDL2,
19   SDL2_mixer,
20   cglm,
21   freetype,
22   libpng,
23   libwebp,
24   libzip,
25   zlib,
26   zstd,
27   spirv-cross,
29   gamemodeSupport ? stdenv.hostPlatform.isLinux,
32 stdenv.mkDerivation (finalAttrs: {
33   pname = "taisei";
34   version = "1.4.2";
36   src = fetchFromGitHub {
37     owner = "taisei-project";
38     repo = "taisei";
39     rev = "v${finalAttrs.version}";
40     hash = "sha256-rThLz8o6IYhIBUc0b1sAQi2aF28btajcM1ScTv+qn6c=";
41     fetchSubmodules = true;
42   };
44   nativeBuildInputs = [
45     docutils
46     meson
47     ninja
48     pkg-config
49     python3Packages.python
50     python3Packages.zstandard
51     ensureNewerSourcesForZipFilesHook
52     shaderc
53   ];
55   buildInputs = [
56     glfw
57     SDL2
58     SDL2_mixer
59     cglm
60     freetype
61     libpng
62     libwebp
63     libzip
64     zlib
65     zstd
66     opusfile
67     openssl
68     spirv-cross
69   ] ++ lib.optional gamemodeSupport gamemode;
71   mesonFlags = [
72     (lib.mesonBool "b_lto" false)
73     (lib.mesonEnable "install_macos_bundle" false)
74     (lib.mesonEnable "install_relocatable" false)
75     (lib.mesonEnable "shader_transpiler" false)
76     (lib.mesonEnable "gamemode" gamemodeSupport)
77   ];
79   preConfigure = ''
80     patchShebangs .
81   '';
83   strictDeps = true;
85   meta = {
86     description = "Free and open-source Touhou Project clone and fangame";
87     mainProgram = "taisei";
88     longDescription = ''
89       Taisei is an open clone of the Tōhō Project series. Tōhō is a one-man
90       project of shoot-em-up games set in an isolated world full of Japanese
91       folklore.
92     '';
93     homepage = "https://taisei-project.org/";
94     license = with lib.licenses; [
95       mit
96       cc-by-40
97     ];
98     maintainers = with lib.maintainers; [
99       lambda-11235
100       Gliczy
101     ];
102     platforms = lib.platforms.all;
103   };