From d06770b9a03b6fe1e2fe34c2026337c58c326af5 Mon Sep 17 00:00:00 2001 From: Herwig Hochleitner Date: Thu, 20 Dec 2018 20:03:26 +0100 Subject: [PATCH] allegro5: fix build for mesa 18.2.5 mesa 18.2.5, introduced in 6b490ee2964662d69f0d38e71f0dc3565ad49515 changed some private headers, that allegro is relying on. This fix backports the relevant commit from allegro upstream cc @7c6f434c --- pkgs/development/libraries/allegro/5.nix | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/allegro/5.nix b/pkgs/development/libraries/allegro/5.nix index 5e82a1a3c6b..269a139a3d6 100644 --- a/pkgs/development/libraries/allegro/5.nix +++ b/pkgs/development/libraries/allegro/5.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchFromGitHub, texinfo, libXext, xextproto, libX11, xproto +{ stdenv, fetchFromGitHub, fetchpatch, texinfo, libXext, xextproto, libX11, xproto , libXpm, libXt, libXcursor, alsaLib, cmake, zlib, libpng, libvorbis , libXxf86dga, libXxf86misc, xf86dgaproto, xf86miscproto , xf86vidmodeproto, libXxf86vm, openal, libGLU_combined, kbproto, libjpeg, flac @@ -28,7 +28,15 @@ stdenv.mkDerivation rec { libpulseaudio libpthreadstubs ]; - patchPhase = '' + patches = [ + # fix compilation with mesa 18.2.5 + (fetchpatch { + url = "https://github.com/liballeg/allegro5/commit/a40d30e21802ecf5c9382cf34af9b01bd3781e47.patch"; + sha256 = "1f1xlj5y2vr6wzmcz04s8kxn8cfdwrg9kjlnvpz9dix1z3qjnd4m"; + }) + ]; + + postPatch = '' sed -e 's@/XInput2.h@/XI2.h@g' -i CMakeLists.txt "src/"*.c '';