Unverified Commit 206fd45d authored by Grimmauld's avatar Grimmauld Committed by GitHub
Browse files

SDL_audiolib: fix build on darwin (#459827)

parents bb2e2e26 1478dc2a
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -6,6 +6,7 @@
  pkg-config,
  stdenv,
  flac,
  fmt,
}:

stdenv.mkDerivation (finalAttrs: {
@@ -29,10 +30,20 @@ stdenv.mkDerivation (finalAttrs: {
  buildInputs = [
    SDL2
    flac
    fmt
  ];

  strictDeps = true;

  postPatch = ''
    # Remove the bundled fmt directory
    rm -rf 3rdparty/fmt

    # Patch CMakeLists.txt to replace bundled fmt with provided library
    substituteInPlace CMakeLists.txt \
      --replace-fail 'add_bundled_fmtlib()' 'find_package(fmt REQUIRED)'
  '';

  cmakeFlags = [
    (lib.cmakeBool "USE_DEC_ADLMIDI" false)
    (lib.cmakeBool "USE_DEC_BASSMIDI" false)