nixpkgs/pkgs/development/libraries/allegro/5.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

48 lines
1.5 KiB
Nix
Raw Normal View History

{ lib, stdenv, fetchFromGitHub, fetchpatch, texinfo, libXext, xorgproto, libX11
, libXpm, libXt, libXcursor, alsa-lib, cmake, zlib, libpng, libvorbis
, libXxf86dga, libXxf86misc
2019-11-10 16:44:34 +00:00
, libXxf86vm, openal, libGLU, libGL, libjpeg, flac
, 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
}:
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";
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=";
};
nativeBuildInputs = [ cmake pkg-config ];
buildInputs = [
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
];
postPatch = ''
2016-11-26 19:18:35 +00:00
sed -e 's@/XInput2.h@/XI2.h@g' -i CMakeLists.txt "src/"*.c
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
'';
cmakeFlags = [ "-DCMAKE_SKIP_RPATH=ON" ];
meta = with lib; {
description = "A game programming library";
homepage = "https://liballeg.org/";
license = licenses.zlib;
maintainers = [ maintainers.raskin ];
platforms = platforms.linux ++ platforms.darwin;
};
}