Unverified Commit dfb03de5 authored by Rick van Schijndel's avatar Rick van Schijndel Committed by GitHub
Browse files

Merge pull request #327948 from eclairevoyant/raylib-fix

raylib: fix missing sound
parents ff5889a8 d35d3d12
Loading
Loading
Loading
Loading
+12 −4
Original line number Diff line number Diff line
@@ -19,6 +19,7 @@
, includeEverything ? true
, raylib-games
, darwin
, autoPatchelfHook
}:
let
  inherit (darwin.apple_sdk.frameworks) Carbon Cocoa OpenGL;
@@ -34,7 +35,10 @@ stdenv.mkDerivation (finalAttrs: {
    hash = "sha256-gEstNs3huQ1uikVXOW4uoYnIDr5l8O9jgZRTX1mkRww=";
  };

  nativeBuildInputs = [ cmake ];
  nativeBuildInputs = [
    autoPatchelfHook
    cmake
  ];

  buildInputs = [ glfw ]
    ++ lib.optionals stdenv.isLinux [ mesa libXi libXcursor libXrandr libXinerama ]
@@ -58,15 +62,19 @@ stdenv.mkDerivation (finalAttrs: {
  patches = [
    # 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}
    # check that the resulting library extension matches the package version
    # and remove/update this patch
    (fetchpatch {
      url = "https://github.com/raysan5/raylib/commit/032cc497ca5aaca862dc926a93c2a45ed8017737.patch";
      hash = "sha256-qsX5AwyQaGoRsbdszOO7tUF9dR+AkEFi4ebNkBVHNEY=";
    })
  ];

  # fix libasound.so/libpulse.so not being found
  appendRunpaths = [
    (lib.makeLibraryPath (lib.optional alsaSupport alsa-lib ++ lib.optional pulseSupport libpulseaudio))
  ];

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