Unverified Commit 49dd5837 authored by éclairevoyant's avatar éclairevoyant Committed by GitHub
Browse files

Merge pull request #284378 from lucasnethaj/raylib-update

raylib: 4.5.0 -> 5.0
parents 07262b18 5d803d5b
Loading
Loading
Loading
Loading
+9 −12
Original line number Diff line number Diff line
@@ -25,13 +25,13 @@ let
in
stdenv.mkDerivation (finalAttrs: {
  pname = "raylib";
  version = "4.5.0";
  version = "5.0";

  src = fetchFromGitHub {
    owner = "raysan5";
    repo = "raylib";
    rev = finalAttrs.version;
    hash = "sha256-Uqqzq5shDp0AgSBT5waHBNUkEu0LRj70SNOlR5R2yAM=";
    hash = "sha256-gEstNs3huQ1uikVXOW4uoYnIDr5l8O9jgZRTX1mkRww=";
  };

  nativeBuildInputs = [ cmake ];
@@ -56,20 +56,17 @@ stdenv.mkDerivation (finalAttrs: {
  passthru.tests = [ raylib-games ];

  patches = [
    # Patch version in CMakeList to 4.5.0
    # Remove this when updating to a new revision
    # Patch version in CMakeLists.txt to 5.0.0
    # The library author doesn't use cmake, so when updating this package please
    # check that the resulting library extension matches the version
    # and remove/update this patch (resulting library name should match
    # libraylib.so.${finalAttrs.version}
    (fetchpatch {
      url = "https://github.com/raysan5/raylib/commit/0d4db7ad7f6fd442ed165ebf8ab8b3f4033b04e7.patch";
      hash = "sha256-RGokbQAwJAZm2FU2VNwraE3xko8E+RLLFjUfDRXeKhA=";
      url = "https://github.com/raysan5/raylib/commit/032cc497ca5aaca862dc926a93c2a45ed8017737.patch";
      hash = "sha256-qsX5AwyQaGoRsbdszOO7tUF9dR+AkEFi4ebNkBVHNEY=";
    })
  ];

  # fix libasound.so/libpulse.so not being found
  preFixup = ''
    ${lib.optionalString alsaSupport "patchelf --add-needed ${alsa-lib}/lib/libasound.so $out/lib/libraylib.so.${finalAttrs.version}"}
    ${lib.optionalString pulseSupport "patchelf --add-needed ${libpulseaudio}/lib/libpulse.so $out/lib/libraylib.so.${finalAttrs.version}"}
  '';

  meta = with lib; {
    description = "A simple and easy-to-use library to enjoy videogames programming";
    homepage = "https://www.raylib.com/";