mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-10-17 10:40:33 +03:00
raylib: 4.2.0 -> 4.5.0
This commit is contained in:
parent
04dc69b62e
commit
c033b637a3
@ -8,15 +8,15 @@
|
||||
, raylib-games
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "raylib";
|
||||
version = "4.2.0";
|
||||
version = "4.5.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "raysan5";
|
||||
repo = pname;
|
||||
rev = version;
|
||||
sha256 = "sha256-aMIjywcQxki0cKlNznPAMfvrtGj3qcR95D4/BDuPZZM=";
|
||||
repo = "raylib";
|
||||
rev = finalAttrs.version;
|
||||
hash = "sha256-Uqqzq5shDp0AgSBT5waHBNUkEu0LRj70SNOlR5R2yAM=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ cmake ];
|
||||
@ -27,16 +27,6 @@ stdenv.mkDerivation rec {
|
||||
++ lib.optional pulseSupport libpulseaudio;
|
||||
propagatedBuildInputs = [ libGLU libX11 ];
|
||||
|
||||
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"
|
||||
@ -45,12 +35,6 @@ stdenv.mkDerivation rec {
|
||||
] ++ lib.optional includeEverything "-DINCLUDE_EVERYTHING=ON"
|
||||
++ lib.optional sharedLib "-DBUILD_SHARED_LIBS=ON";
|
||||
|
||||
# fix libasound.so/libpulse.so not being found
|
||||
preFixup = ''
|
||||
${lib.optionalString alsaSupport "patchelf --add-needed ${alsa-lib}/lib/libasound.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; {
|
||||
@ -59,6 +43,6 @@ stdenv.mkDerivation rec {
|
||||
license = licenses.zlib;
|
||||
maintainers = with maintainers; [ adamlwgriffiths ];
|
||||
platforms = platforms.linux;
|
||||
changelog = "https://github.com/raysan5/raylib/blob/${version}/CHANGELOG";
|
||||
changelog = "https://github.com/raysan5/raylib/blob/${finalAttrs.version}/CHANGELOG";
|
||||
};
|
||||
}
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user