1 { lib, stdenv, fetchFromGitHub, raylib, darwin }:
4 inherit (darwin.apple_sdk.frameworks) Cocoa;
6 stdenv.mkDerivation rec {
7 pname = "raylib-games";
8 version = "2022-10-24";
10 src = fetchFromGitHub {
13 rev = "e00d77cf96ba63472e8316ae95a23c624045dcbe";
14 hash = "sha256-N9ip8yFUqXmNMKcvQuOyxDI4yF/w1YaoIh0prvS4Xr4=";
17 buildInputs = [ raylib ]
18 ++ lib.optionals stdenv.isDarwin [ Cocoa ];
23 if [ -d $d/src/resources ]; then
24 for f in $d/src/*.c $d/src/*.h; do
25 sed "s|\"resources/|\"$out/resources/$d/|g" -i $f
35 if [ -f $d/src/Makefile ]; then
44 mkdir -p $out/bin $out/resources
45 find . -type f -executable -exec cp {} $out/bin \;
47 if [ -d "$d/src/resources" ]; then
48 cp -ar "$d/src/resources" "$out/resources/$d"
55 description = "A collection of games made with raylib ";
56 homepage = "https://www.raylib.com/games.html";
57 license = licenses.zlib;
58 maintainers = with maintainers; [ ehmry ];
59 inherit (raylib.meta) platforms;