File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ {
2+ lib ,
3+ stdenv ,
4+ fetchFromGitHub ,
5+ cmake ,
6+ flex ,
7+ bison ,
8+ pkg-config ,
9+ zlib ,
10+ libpng ,
11+ unstableGitUpdater ,
12+ validatePkgConfig ,
13+ testers ,
14+ } :
15+ let
16+ thtypes = fetchFromGitHub {
17+ owner = "thpatch" ;
18+ repo = "thtypes" ;
19+ rev = "29ed7d6e1db555ad15fd29edcc0763754ad5b764" ;
20+ hash = "sha256-j3lrToLuS7SbzzdL3/8uB0nL1z04GtmfmKIC/v37jwI=" ;
21+ } ;
22+ in
23+ stdenv . mkDerivation ( finalAttrs : {
24+ pname = "thtk" ;
25+ version = "12-unstable-2025-05-06" ;
26+
27+ src = fetchFromGitHub {
28+ owner = "thpatch" ;
29+ repo = "thtk" ;
30+ rev = "97dc32f48efb704a131acff4a18bc401b0662748" ;
31+ hash = "sha256-rgSl5VEMQkxMAhg1cMW/c9hH64MZJQ7WxqGsOYiANPM=" ;
32+ } ;
33+
34+ # Required header files for the build phase
35+ env. NIX_CFLAGS_COMPILE = "-I${ thtypes } " ;
36+
37+ nativeBuildInputs = [
38+ cmake
39+ pkg-config
40+ validatePkgConfig
41+ ] ;
42+
43+ buildInputs = [
44+ zlib
45+ libpng
46+ flex
47+ bison
48+ ] ;
49+
50+ passthru = {
51+ updateScript = unstableGitUpdater { } ;
52+ tests. pkg-config = testers . testMetaPkgConfig finalAttrs . finalPackage ;
53+ } ;
54+
55+ cmakeFlags = [
56+ ( lib . cmakeBool "WITH_LIBPNG_SOURCE" false )
57+ ] ;
58+
59+ postInstall = ''
60+ # Substitute includedir and libdir bad path prefix
61+ substituteInPlace "$out/lib/pkgconfig/thtk.pc" \
62+ --replace-fail "//nix" "/nix"
63+ '' ;
64+
65+ meta = {
66+ description = "Touhou Toolkit" ;
67+ homepage = "https://github.com/thpatch/thtk" ;
68+ changelog = "https://github.com/thpatch/thtk/releases" ;
69+ license = lib . licenses. bsd2 ;
70+ pkgConfigModules = [ "thtk" ] ;
71+ platforms = with lib . platforms ; linux ++ windows ;
72+ maintainers = with lib . maintainers ; [ theobori ] ;
73+ } ;
74+ } )
You can’t perform that action at this time.
0 commit comments