2014-07-01 09:41:07 +01:00
|
|
|
|
|
|
|
x@{builderDefsPackage
|
|
|
|
, texinfo, libXext, xextproto, libX11, xproto, libXpm, libXt, libXcursor
|
|
|
|
, alsaLib, cmake, zlib, libpng, libvorbis, libXxf86dga, libXxf86misc
|
|
|
|
, xf86dgaproto, xf86miscproto, xf86vidmodeproto, libXxf86vm, openal, mesa
|
2015-01-11 00:16:37 +00:00
|
|
|
, kbproto, libjpeg, flac, inputproto, libXi, fixesproto, libXfixes
|
2014-07-01 09:41:07 +01:00
|
|
|
, ...}:
|
|
|
|
builderDefsPackage
|
|
|
|
(a :
|
|
|
|
let
|
|
|
|
helperArgNames = ["stdenv" "fetchurl" "builderDefsPackage"] ++
|
|
|
|
[];
|
|
|
|
|
|
|
|
buildInputs = map (n: builtins.getAttr n x)
|
|
|
|
(builtins.attrNames (builtins.removeAttrs x helperArgNames));
|
|
|
|
sourceInfo = rec {
|
|
|
|
baseName="allegro";
|
2014-08-10 13:16:17 +01:00
|
|
|
folderSuffix = "-unstable";
|
2015-07-04 19:59:31 +01:00
|
|
|
version = "5.1.11";
|
2014-07-01 09:41:07 +01:00
|
|
|
name="${baseName}-${version}";
|
|
|
|
project="alleg";
|
2014-08-10 13:16:17 +01:00
|
|
|
url="mirror://sourceforge/project/${project}/${baseName}${folderSuffix}/${version}/${name}.tar.gz";
|
2014-07-01 09:41:07 +01:00
|
|
|
hash="18fdppaqaf3g3rcqwhyvsmkzk3y14clz4l8cvmg4hvjgyf011f3i";
|
|
|
|
};
|
|
|
|
in
|
|
|
|
rec {
|
|
|
|
src = a.fetchurl {
|
|
|
|
url = sourceInfo.url;
|
2015-07-04 19:59:31 +01:00
|
|
|
sha256 = "0zz07gdyc6xflpvkknwgzsyyyh9qiwd69j42rm9cw1ciwcsic1vs";
|
2014-07-01 09:41:07 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
inherit (sourceInfo) name version;
|
|
|
|
inherit buildInputs;
|
|
|
|
|
|
|
|
/* doConfigure should be removed if not needed */
|
2015-01-11 00:16:37 +00:00
|
|
|
phaseNames = ["patchIncludes" "doCmake" "doMakeInstall"];
|
|
|
|
|
|
|
|
patchIncludes = a.fullDepEntry ''
|
|
|
|
sed -e 's@/XInput2.h@/XI2.h@g' -i CMakeLists.txt src/*.c
|
|
|
|
'' ["minInit" "doUnpack"];
|
2014-07-01 09:41:07 +01:00
|
|
|
|
|
|
|
doCmake = a.fullDepEntry (''
|
2015-01-11 00:16:37 +00:00
|
|
|
export NIX_LDFLAGS="$NIX_LDFLAGS -lXext -lX11 -lXpm -lXcursor -lXxf86vm -lXi -lXfixes"
|
2014-07-01 09:41:07 +01:00
|
|
|
cmake -D CMAKE_INSTALL_PREFIX=$out -D CMAKE_SKIP_RPATH=ON .
|
|
|
|
'') ["minInit" "doUnpack" "addInputs"];
|
|
|
|
|
|
|
|
makeFlags = [
|
|
|
|
];
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "A game programming library";
|
2014-11-06 00:44:33 +00:00
|
|
|
license = a.lib.licenses.free; # giftware
|
2014-07-01 09:41:07 +01:00
|
|
|
maintainers = with a.lib.maintainers;
|
|
|
|
[
|
|
|
|
raskin
|
|
|
|
];
|
|
|
|
platforms = with a.lib.platforms;
|
|
|
|
linux;
|
|
|
|
inherit version;
|
|
|
|
};
|
|
|
|
}) x
|