raylib-games: init at 2022-10-14
Now we have something to test our Raylib package against.
This commit is contained in:
parent
7aa48a0dd3
commit
19d9ac28cc
3 changed files with 62 additions and 0 deletions
|
@ -5,6 +5,7 @@
|
||||||
, pulseSupport ? stdenv.hostPlatform.isLinux, libpulseaudio
|
, pulseSupport ? stdenv.hostPlatform.isLinux, libpulseaudio
|
||||||
, sharedLib ? true
|
, sharedLib ? true
|
||||||
, includeEverything ? true
|
, includeEverything ? true
|
||||||
|
, raylib-games
|
||||||
}:
|
}:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
|
@ -50,6 +51,8 @@ stdenv.mkDerivation rec {
|
||||||
${lib.optionalString pulseSupport "patchelf --add-needed ${libpulseaudio}/lib/libpulse.so $out/lib/libraylib.so.${version}"}
|
${lib.optionalString pulseSupport "patchelf --add-needed ${libpulseaudio}/lib/libpulse.so $out/lib/libraylib.so.${version}"}
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
passthru.tests = [ raylib-games ];
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "A simple and easy-to-use library to enjoy videogames programming";
|
description = "A simple and easy-to-use library to enjoy videogames programming";
|
||||||
homepage = "https://www.raylib.com/";
|
homepage = "https://www.raylib.com/";
|
||||||
|
|
57
pkgs/games/raylib-games/default.nix
Normal file
57
pkgs/games/raylib-games/default.nix
Normal file
|
@ -0,0 +1,57 @@
|
||||||
|
{ lib, stdenv, fetchFromGitHub, raylib }:
|
||||||
|
|
||||||
|
stdenv.mkDerivation rec {
|
||||||
|
pname = "raylib-games";
|
||||||
|
version = "2022-10-24";
|
||||||
|
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "raysan5";
|
||||||
|
repo = pname;
|
||||||
|
rev = "e00d77cf96ba63472e8316ae95a23c624045dcbe";
|
||||||
|
hash = "sha256-N9ip8yFUqXmNMKcvQuOyxDI4yF/w1YaoIh0prvS4Xr4=";
|
||||||
|
};
|
||||||
|
|
||||||
|
buildInputs = [ raylib ];
|
||||||
|
|
||||||
|
configurePhase = ''
|
||||||
|
runHook preConfigure
|
||||||
|
for d in *; do
|
||||||
|
if [ -d $d/src/resources ]; then
|
||||||
|
for f in $d/src/*.c $d/src/*.h; do
|
||||||
|
sed "s|\"resources/|\"$out/resources/$d/|g" -i $f
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
runHook postConfigure
|
||||||
|
'';
|
||||||
|
|
||||||
|
buildPhase = ''
|
||||||
|
runHook preBuild
|
||||||
|
for d in *; do
|
||||||
|
if [ -f $d/src/Makefile ]; then
|
||||||
|
make -C $d/src
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
runHook postBuild
|
||||||
|
'';
|
||||||
|
|
||||||
|
installPhase = ''
|
||||||
|
runHook preBuild
|
||||||
|
mkdir -p $out/bin $out/resources
|
||||||
|
find . -type f -executable -exec cp {} $out/bin \;
|
||||||
|
for d in *; do
|
||||||
|
if [ -d "$d/src/resources" ]; then
|
||||||
|
cp -ar "$d/src/resources" "$out/resources/$d"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
runHook postBuild
|
||||||
|
'';
|
||||||
|
|
||||||
|
meta = with lib; {
|
||||||
|
description = "A collection of games made with raylib ";
|
||||||
|
homepage = "https://www.raylib.com/games.html";
|
||||||
|
license = licenses.zlib;
|
||||||
|
maintainers = with maintainers; [ ehmry ];
|
||||||
|
inherit (raylib.meta) platforms;
|
||||||
|
};
|
||||||
|
}
|
|
@ -34434,6 +34434,8 @@ with pkgs;
|
||||||
|
|
||||||
randtype = callPackage ../games/randtype { };
|
randtype = callPackage ../games/randtype { };
|
||||||
|
|
||||||
|
raylib-games = callPackage ../games/raylib-games { };
|
||||||
|
|
||||||
redeclipse = callPackage ../games/redeclipse { };
|
redeclipse = callPackage ../games/redeclipse { };
|
||||||
|
|
||||||
rftg = callPackage ../games/rftg { };
|
rftg = callPackage ../games/rftg { };
|
||||||
|
|
Loading…
Reference in a new issue