2023-11-16 04:20:00 +00:00
|
|
|
{ lib
|
|
|
|
, alsa-lib
|
|
|
|
, cmake
|
|
|
|
, enet
|
|
|
|
, fetchFromGitHub
|
|
|
|
, flac
|
|
|
|
, freetype
|
|
|
|
, gtk3
|
|
|
|
, libGL
|
|
|
|
, libGLU
|
|
|
|
, libjpeg
|
|
|
|
, libopus
|
|
|
|
, libpng
|
|
|
|
, libpthreadstubs
|
|
|
|
, libpulseaudio
|
|
|
|
, libtheora
|
|
|
|
, libvorbis
|
|
|
|
, libwebp
|
|
|
|
, libX11
|
|
|
|
, libXcursor
|
2020-04-24 23:36:52 +00:00
|
|
|
, libXdmcp
|
2023-11-16 04:20:00 +00:00
|
|
|
, libXext
|
|
|
|
, libXfixes
|
|
|
|
, libXi
|
|
|
|
, libXpm
|
|
|
|
, libXt
|
|
|
|
, libXxf86dga
|
|
|
|
, libXxf86misc
|
|
|
|
, libXxf86vm
|
|
|
|
, openal
|
|
|
|
, pcre
|
|
|
|
, physfs
|
|
|
|
, pkg-config
|
|
|
|
, stdenv
|
|
|
|
, texinfo
|
|
|
|
, xorgproto
|
|
|
|
, zlib
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "allegro";
|
2024-01-25 14:12:00 +00:00
|
|
|
version = "5.2.9.1";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "liballeg";
|
|
|
|
repo = "allegro5";
|
|
|
|
rev = version;
|
2024-01-25 14:12:00 +00:00
|
|
|
sha256 = "sha256-n2OCmZmAqeXjtnCTqJgQ5q4j8/lnPfH+5tpWKIFKle0=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2023-11-16 04:20:00 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
cmake
|
|
|
|
pkg-config
|
|
|
|
];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
buildInputs = [
|
2023-11-16 04:20:00 +00:00
|
|
|
enet
|
|
|
|
flac
|
|
|
|
freetype
|
|
|
|
gtk3
|
|
|
|
libGL
|
|
|
|
libGLU
|
|
|
|
libjpeg
|
|
|
|
libopus
|
|
|
|
libpng
|
|
|
|
libtheora
|
|
|
|
libvorbis
|
|
|
|
libwebp
|
|
|
|
openal
|
|
|
|
pcre
|
|
|
|
physfs
|
|
|
|
texinfo
|
|
|
|
zlib
|
2023-03-15 16:39:30 +00:00
|
|
|
] ++ lib.optionals stdenv.isLinux [
|
2023-11-16 04:20:00 +00:00
|
|
|
alsa-lib
|
|
|
|
libpthreadstubs
|
|
|
|
libpulseaudio
|
|
|
|
libX11
|
|
|
|
libXcursor
|
|
|
|
libXdmcp
|
|
|
|
libXext
|
|
|
|
libXfixes
|
|
|
|
libXi
|
|
|
|
libXpm
|
|
|
|
libXt
|
|
|
|
libXxf86dga
|
|
|
|
libXxf86misc
|
|
|
|
libXxf86vm
|
|
|
|
xorgproto
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
sed -e 's@/XInput2.h@/XI2.h@g' -i CMakeLists.txt "src/"*.c
|
2023-03-15 16:39:30 +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
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
cmakeFlags = [ "-DCMAKE_SKIP_RPATH=ON" ];
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
meta = with lib; {
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "Game programming library";
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://liballeg.org/";
|
|
|
|
license = licenses.zlib;
|
|
|
|
maintainers = [ maintainers.raskin ];
|
2023-03-15 16:39:30 +00:00
|
|
|
platforms = platforms.linux ++ platforms.darwin;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|