{ stdenv, fetchurl
# Build depends
, docutils, meson, ninja, pkgconfig, python3
# Runtime depends
, glfw, SDL2, SDL2_mixer
, freetype, libpng, libwebp, libzip, zlib
}:

stdenv.mkDerivation rec {
  pname = "taisei";
  version = "1.3";

  src = fetchurl {
    url = "https://github.com/taisei-project/${pname}/releases/download/v${version}/${pname}-v${version}.tar.xz";
    sha256 = "0fl41cbjr8h6gmhc27l44cfkcnhg5c10b4fcfvnfsbjii8gdwvjd";
  };

  nativeBuildInputs = [
    docutils meson ninja pkgconfig python3
  ];

  buildInputs = [
    glfw SDL2 SDL2_mixer
    freetype libpng libwebp libzip zlib
  ];

  meta = with stdenv.lib; {
    description = "A free and open-source Touhou Project clone and fangame";
    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;
  };
}

# these derivations will be built:
#   /nix/store/rwra8cdyz2bk6gjnwqz13qw0z0fa1q2q-taisei-1.3.drv
# building '/nix/store/rwra8cdyz2bk6gjnwqz13qw0z0fa1q2q-taisei-1.3.drv'...
# unpacking sources
# unpacking source archive /nix/store/xwhkrg6x1xdpc213frkv0bnjj677a181-taisei-v1.3.tar.xz
# source root is taisei-v1.3
# setting SOURCE_DATE_EPOCH to timestamp 1556352097 of file taisei-v1.3/external/gamecontrollerdb/older_releases/gamecontrollerdb_205.txt
# patching sources
# configuring
# meson flags: --buildtype=plain         --libdir=/nix/store/j6sqs1857zl0iyjw4j90qybm35xawl9y-taisei-1.3/lib --libexecdir=/nix/store/j6sqs1857zl0iyjw4j90qybm35xawl9y-taisei-1.3/libexec         --bindir=/nix/store/j6sqs1857zl0iyjw4j90qybm35xawl9y-taisei-1.3/bin --sbindir=/nix/store/j6sqs1857zl0iyjw4j90qybm35xawl9y-taisei-1.3/sbin         --includedir=/nix/store/j6sqs1857zl0iyjw4j90qybm35xawl9y-taisei-1.3/include         --mandir=/nix/store/j6sqs1857zl0iyjw4j90qybm35xawl9y-taisei-1.3/share/man --infodir=/nix/store/j6sqs1857zl0iyjw4j90qybm35xawl9y-taisei-1.3/share/info         --localedir=/nix/store/j6sqs1857zl0iyjw4j90qybm35xawl9y-taisei-1.3/share/locale         -Dauto_features=enabled         -Dwrap_mode=nodownload         --prefix=/nix/store/j6sqs1857zl0iyjw4j90qybm35xawl9y-taisei-1.3
# The Meson build system
# Version: 0.50.1
# Source dir: /build/taisei-v1.3
# Build dir: /build/taisei-v1.3/build
# Build type: native build
# Project name: taisei
# Project version: v1.3
# Native C compiler: /nix/store/hpzj855nkgjvg58nrhq4910sb9q3kss1-gcc-wrapper-7.4.0/bin/cc (gcc 7.4.0 "gcc (GCC) 7.4.0")
# Build machine cpu family: x86_64
# Build machine cpu: x86_64
# DEPRECATION: Project targetting '>=0.45.0' but tried to use feature deprecated since '0.48.0': python3 module
# Program thunk.py found: YES (/build/taisei-v1.3/scripts/thunk.py)
# 
# scripts/meson.build:22:0: ERROR: Could not execute command "/build/taisei-v1.3/scripts/thunk.py /build/taisei-v1.3/scripts/version.py --rootdir /build/taisei-v1.3 --fallback-version v1.3 {string}".
# 
# A full log can be found at /build/taisei-v1.3/build/meson-logs/meson-log.txt
# builder for '/nix/store/rwra8cdyz2bk6gjnwqz13qw0z0fa1q2q-taisei-1.3.drv' failed with exit code 1
# error: build of '/nix/store/rwra8cdyz2bk6gjnwqz13qw0z0fa1q2q-taisei-1.3.drv' failed

Add a code snippet to your website: www.paste.org