raylib: 4.0.0 -> 4.2.0

This also enables `-DCUSTOMIZE_BUILD` in order for the
`-DINCLUDE_EVERYTHING` to have an effect.
This commit is contained in:
Daniel Nagy 2022-08-22 23:21:25 +02:00
parent 0973090c9b
commit ba76dba801
No known key found for this signature in database
GPG key ID: 1B8E8DCB576FB671

View file

@ -1,21 +1,21 @@
{ stdenv, lib, fetchFromGitHub, cmake,
mesa, libGLU, glfw,
libX11, libXi, libXcursor, libXrandr, libXinerama,
alsaSupport ? stdenv.hostPlatform.isLinux, alsa-lib,
pulseSupport ? stdenv.hostPlatform.isLinux, libpulseaudio,
sharedLib ? true,
includeEverything ? true
{ stdenv, lib, fetchFromGitHub, cmake, fetchpatch
, mesa, libGLU, glfw
, libX11, libXi, libXcursor, libXrandr, libXinerama
, alsaSupport ? stdenv.hostPlatform.isLinux, alsa-lib
, pulseSupport ? stdenv.hostPlatform.isLinux, libpulseaudio
, sharedLib ? true
, includeEverything ? true
}:
stdenv.mkDerivation rec {
pname = "raylib";
version = "4.0.0";
version = "4.2.0";
src = fetchFromGitHub {
owner = "raysan5";
repo = pname;
rev = version;
sha256 = "1mszf5v7qy38cv1fisq6xd9smb765hylhkv1ms9y7shmdl2ni6b7";
sha256 = "sha256-aMIjywcQxki0cKlNznPAMfvrtGj3qcR95D4/BDuPZZM=";
};
nativeBuildInputs = [ cmake ];
@ -24,10 +24,21 @@ stdenv.mkDerivation rec {
] ++ lib.optional alsaSupport alsa-lib
++ lib.optional pulseSupport libpulseaudio;
patches = [
# fixes glfw compile error;
# remove with next raylib version > 4.2.0 or when glfw 3.4.0 is released.
(fetchpatch {
url = "https://github.com/raysan5/raylib/commit/2ad7967db80644a25ca123536cf2f6efcb869684.patch";
sha256 = "sha256-/xgzox1ITeoZ91QWdwnJJ+jJ5nJsMHcEgbIEdNYh4NY=";
name = "raylib-glfw-fix.patch";
})
];
# https://github.com/raysan5/raylib/wiki/CMake-Build-Options
cmakeFlags = [
"-DUSE_EXTERNAL_GLFW=ON"
"-DBUILD_EXAMPLES=OFF"
"-DCUSTOMIZE_BUILD=1"
] ++ lib.optional includeEverything "-DINCLUDE_EVERYTHING=ON"
++ lib.optional sharedLib "-DBUILD_SHARED_LIBS=ON";