2021-01-21 17:00:13 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, fetchpatch, texinfo, libXext, xorgproto, libX11
|
2021-06-10 02:57:09 +00:00
|
|
|
, libXpm, libXt, libXcursor, alsa-lib, cmake, zlib, libpng, libvorbis
|
2018-12-31 03:40:47 +00:00
|
|
|
, libXxf86dga, libXxf86misc
|
2019-11-10 16:44:34 +00:00
|
|
|
, libXxf86vm, openal, libGLU, libGL, libjpeg, flac
|
2018-12-31 03:40:47 +00:00
|
|
|
, libXi, libXfixes, freetype, libopus, libtheora
|
2021-08-12 12:15:03 +00:00
|
|
|
, physfs, enet, pkg-config, gtk3, pcre, libpulseaudio, libpthreadstubs
|
2016-11-26 19:18:35 +00:00
|
|
|
, libXdmcp
|
|
|
|
}:
|
2011-09-25 21:07:48 +00:00
|
|
|
|
2015-12-29 22:34:19 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2019-08-26 07:53:26 +00:00
|
|
|
pname = "allegro";
|
2022-06-25 00:32:09 +00:00
|
|
|
version = "5.2.8.0";
|
2011-09-25 21:07:48 +00:00
|
|
|
|
2017-08-01 09:25:37 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "liballeg";
|
|
|
|
repo = "allegro5";
|
|
|
|
rev = version;
|
2022-06-25 00:32:09 +00:00
|
|
|
sha256 = "sha256-uNcaeTelFNfg+YjPYc7nK4TrFDxJsEuPhsF8x1cvIYQ=";
|
2011-09-25 21:07:48 +00:00
|
|
|
};
|
|
|
|
|
2022-09-25 02:49:25 +00:00
|
|
|
nativeBuildInputs = [ cmake pkg-config ];
|
2015-12-29 22:34:19 +00:00
|
|
|
buildInputs = [
|
2023-03-10 19:43:11 +00:00
|
|
|
texinfo zlib libpng libvorbis openal libGLU libGL
|
|
|
|
libjpeg flac enet libtheora freetype physfs libopus
|
|
|
|
gtk3 pcre
|
|
|
|
] ++ lib.optionals stdenv.isLinux [
|
|
|
|
libXext xorgproto libX11 libXpm libXt libXcursor alsa-lib
|
|
|
|
libXxf86dga libXxf86misc libXxf86vm libXi libXfixes
|
|
|
|
libXdmcp libpulseaudio libpthreadstubs
|
2011-09-25 21:07:48 +00:00
|
|
|
];
|
|
|
|
|
2018-12-20 19:03:26 +00:00
|
|
|
postPatch = ''
|
2016-11-26 19:18:35 +00:00
|
|
|
sed -e 's@/XInput2.h@/XI2.h@g' -i CMakeLists.txt "src/"*.c
|
2023-03-10 19:43:11 +00:00
|
|
|
sed -e 's@Kernel/IOKit/hidsystem/IOHIDUsageTables.h@IOKit/hid/IOHIDUsageTables.h@g' -i include/allegro5/platform/alosx.h
|
|
|
|
sed -e 's@OpenAL/@AL/@g' -i addons/audio/openal.c
|
2016-11-26 19:18:35 +00:00
|
|
|
'';
|
|
|
|
|
2015-12-29 22:34:19 +00:00
|
|
|
cmakeFlags = [ "-DCMAKE_SKIP_RPATH=ON" ];
|
|
|
|
|
2021-01-21 17:00:13 +00:00
|
|
|
meta = with lib; {
|
2011-09-25 21:07:48 +00:00
|
|
|
description = "A game programming library";
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://liballeg.org/";
|
2015-12-29 22:34:19 +00:00
|
|
|
license = licenses.zlib;
|
|
|
|
maintainers = [ maintainers.raskin ];
|
2023-03-10 19:43:11 +00:00
|
|
|
platforms = platforms.linux ++ platforms.darwin;
|
2011-09-25 21:07:48 +00:00
|
|
|
};
|
2015-12-29 22:34:19 +00:00
|
|
|
}
|