From d65cab385254fd80eb4d97e8097bc26193ebee95 Mon Sep 17 00:00:00 2001 From: Michael Raskin <7c6f434c@mail.ru> Date: Sun, 25 Sep 2011 21:07:48 +0000 Subject: [PATCH] Adding Allegro 5 svn path=/nixpkgs/trunk/; revision=29482 --- pkgs/development/libraries/allegro/5.nix | 61 ++++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 1 + 2 files changed, 62 insertions(+) create mode 100644 pkgs/development/libraries/allegro/5.nix diff --git a/pkgs/development/libraries/allegro/5.nix b/pkgs/development/libraries/allegro/5.nix new file mode 100644 index 000000000000..2bfc57011fdf --- /dev/null +++ b/pkgs/development/libraries/allegro/5.nix @@ -0,0 +1,61 @@ + +x@{builderDefsPackage + , texinfo, libXext, xextproto, libX11, xproto, libXpm, libXt, libXcursor + , alsaLib, cmake, zlib, libpng, libvorbis, libXxf86dga, libXxf86misc + , xf86dgaproto, xf86miscproto, xf86vidmodeproto, libXxf86vm, openal, mesa + , kbproto + , ...}: +builderDefsPackage +(a : +let + helperArgNames = ["stdenv" "fetchurl" "builderDefsPackage"] ++ + []; + + buildInputs = map (n: builtins.getAttr n x) + (builtins.attrNames (builtins.removeAttrs x helperArgNames)); + sourceInfo = rec { + baseName="allegro"; + version="5.0.4"; + name="${baseName}-${version}"; + project="alleg"; + url="mirror://sourceforge/project/${project}/${baseName}/${version}/${name}.tar.gz"; + hash="0vm93kqvvw4rw2zx4l64c2i86xl5giwbqbyki4b2b83z0acpmc1n"; + }; +in +rec { + src = a.fetchurl { + url = sourceInfo.url; + sha256 = sourceInfo.hash; + }; + + inherit (sourceInfo) name version; + inherit buildInputs; + + /* doConfigure should be removed if not needed */ + phaseNames = ["doCmake" "doMakeInstall"]; + + doCmake = a.fullDepEntry ('' + export NIX_LDFLAGS="$NIX_LDFLAGS -lXext -lX11 -lXpm -lXcursor -lXxf86vm" + cmake -D CMAKE_INSTALL_PREFIX=$out -D CMAKE_SKIP_RPATH=ON . + '') ["minInit" "doUnpack" "addInputs"]; + + makeFlags = [ + ]; + + meta = { + description = "A game programming library"; + license = "free-noncopyleft"; # giftware + maintainers = with a.lib.maintainers; + [ + raskin + ]; + platforms = with a.lib.platforms; + linux; + }; + passthru = { + updateInfo = { + downloadPage = "http://sourceforge.net/projects/alleg/files/"; + }; + }; +}) x + diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index b95878f3e297..36b4af0e2ad1 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -3027,6 +3027,7 @@ let agg = callPackage ../development/libraries/agg { }; allegro = callPackage ../development/libraries/allegro {}; + allegro5 = callPackage ../development/libraries/allegro/5.nix {}; amrnb = callPackage ../development/libraries/amrnb { };