easyrpg-player: 0.7.0 -> 0.8, enable on Darwin

OPNA2608 076f6c09 41b8228d

+98 -18
+95 -17
pkgs/games/easyrpg-player/default.nix
··· 1 - { lib, stdenv, fetchFromGitHub, cmake, doxygen ? null, pkg-config 2 - , freetype ? null, fmt, glib, harfbuzz ? null 3 - , liblcf, libpng, libsndfile ? null, libvorbis ? null, libxmp ? null 4 - , libXcursor, libXext, libXi, libXinerama, libXrandr, libXScrnSaver, libXxf86vm 5 - , mpg123 ? null, opusfile ? null, pcre, pixman, SDL2, speexdsp ? null, wildmidi ? null, zlib 1 + { lib 2 + , stdenv 3 + , fetchFromGitHub 4 + , fetchpatch 5 + , cmake 6 + , doxygen 7 + , pkg-config 8 + , freetype 9 + , fmt 10 + , glib 11 + , harfbuzz 12 + , liblcf 13 + , libpng 14 + , libsndfile 15 + , libvorbis 16 + , libxmp 17 + , libXcursor 18 + , libXext 19 + , libXi 20 + , libXinerama 21 + , libXrandr 22 + , libXScrnSaver 23 + , libXxf86vm 24 + , mpg123 25 + , opusfile 26 + , pcre 27 + , pixman 28 + , SDL2 29 + , speexdsp 30 + , wildmidi 31 + , zlib 6 32 , libdecor 33 + , alsa-lib 34 + , asciidoctor 35 + , Foundation 36 + , AudioUnit 37 + , AudioToolbox 7 38 }: 8 39 9 40 stdenv.mkDerivation rec { 10 41 pname = "easyrpg-player"; 11 - version = "0.7.0"; 42 + version = "0.8"; 12 43 13 44 src = fetchFromGitHub { 14 45 owner = "EasyRPG"; 15 46 repo = "Player"; 16 47 rev = version; 17 - sha256 = "049bj3jg3ldi3n11nx8xvh6pll68g7dcxz51q6z1gyyfxxws1qpj"; 48 + hash = "sha256-t0sa9ONVVfsiTy+us06vU2bMa4QmmQeYxU395g0WS6w="; 18 49 }; 19 50 20 - nativeBuildInputs = [ cmake doxygen pkg-config ]; 51 + patches = [ 52 + # Fixed compatibility with fmt > 9 53 + # Remove when version > 0.8 54 + (fetchpatch { 55 + name = "0001-Fix-building-with-fmtlib-10.patch"; 56 + url = "https://github.com/EasyRPG/Player/commit/ab6286f6d01bada649ea52d1f0881dde7db7e0cf.patch"; 57 + hash = "sha256-GdSdVFEG1OJCdf2ZIzTP+hSrz+ddhTMBvOPjvYQHy54="; 58 + }) 59 + ]; 60 + 61 + strictDeps = true; 62 + 63 + nativeBuildInputs = [ 64 + asciidoctor 65 + cmake 66 + doxygen 67 + pkg-config 68 + ]; 21 69 22 70 buildInputs = [ 23 71 fmt ··· 29 77 libsndfile 30 78 libvorbis 31 79 libxmp 32 - libXcursor 33 - libXext 34 - libXi 35 - libXinerama 36 - libXrandr 37 - libXScrnSaver 38 - libXxf86vm 39 80 mpg123 40 81 opusfile 41 82 pcre 42 83 pixman 43 84 SDL2 44 85 speexdsp 45 - wildmidi 46 86 zlib 87 + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ 88 + alsa-lib 89 + libXcursor 90 + libXext 91 + libXi 92 + libXinerama 93 + libXrandr 94 + libXScrnSaver 95 + libXxf86vm 47 96 libdecor 97 + wildmidi # until packaged on Darwin 98 + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ 99 + Foundation 100 + AudioUnit 101 + AudioToolbox 48 102 ]; 49 103 104 + cmakeFlags = [ 105 + "-DPLAYER_ENABLE_TESTS=${lib.boolToString doCheck}" 106 + ]; 107 + 108 + makeFlags = [ 109 + "all" 110 + "man" 111 + ]; 112 + 113 + buildFlags = lib.optionals doCheck [ 114 + "test_runner_player" 115 + ]; 116 + 117 + postInstall = lib.optionalString stdenv.hostPlatform.isDarwin '' 118 + mkdir $out/bin 119 + mv Package $out/Applications 120 + ln -s $out/{Applications/EasyRPG\ Player.app/Contents/MacOS,bin}/EasyRPG\ Player 121 + ''; 122 + 123 + doCheck = stdenv.buildPlatform.canExecute stdenv.hostPlatform; 124 + 125 + enableParallelChecking = true; 126 + 50 127 meta = with lib; { 51 128 description = "RPG Maker 2000/2003 and EasyRPG games interpreter"; 52 129 homepage = "https://easyrpg.org/"; 53 130 license = licenses.gpl3; 54 131 maintainers = with maintainers; [ yana ]; 55 - platforms = platforms.linux; 132 + platforms = platforms.all; 133 + mainProgram = lib.optionalString stdenv.hostPlatform.isDarwin "EasyRPG Player"; 56 134 }; 57 135 }
+3 -1
pkgs/top-level/all-packages.nix
··· 36986 36986 d1x-rebirth-full 36987 36987 d2x-rebirth-full; 36988 36988 36989 - easyrpg-player = callPackage ../games/easyrpg-player { }; 36989 + easyrpg-player = callPackage ../games/easyrpg-player { 36990 + inherit (darwin.apple_sdk.frameworks) Foundation AudioUnit AudioToolbox; 36991 + }; 36990 36992 36991 36993 eboard = callPackage ../games/eboard { }; 36992 36994