From 9a47354a964fd0b746dd753f0dd1ebf24ff9ce69 Mon Sep 17 00:00:00 2001 From: Robert Helgesson Date: Tue, 29 Dec 2015 23:34:36 +0100 Subject: [PATCH] allegro5unstable: use stdenv This replaces use of `builderDefsPackage`. Also change to download tarball from GNA as it is the new upstream home. Minor other fixes. --- .../libraries/allegro/5-unstable.nix | 79 +++++++------------ .../libraries/allegro/5-unstable.upstream | 7 -- 2 files changed, 27 insertions(+), 59 deletions(-) delete mode 100644 pkgs/development/libraries/allegro/5-unstable.upstream diff --git a/pkgs/development/libraries/allegro/5-unstable.nix b/pkgs/development/libraries/allegro/5-unstable.nix index dd0df768a689..e5a2c38ddab7 100644 --- a/pkgs/development/libraries/allegro/5-unstable.nix +++ b/pkgs/development/libraries/allegro/5-unstable.nix @@ -1,61 +1,36 @@ +{ stdenv, fetchurl, texinfo, libXext, xextproto, libX11, xproto +, libXpm, libXt, libXcursor, alsaLib, cmake, zlib, libpng, libvorbis +, libXxf86dga, libXxf86misc, xf86dgaproto, xf86miscproto +, xf86vidmodeproto, libXxf86vm, openal, mesa, kbproto, libjpeg, flac +, inputproto, libXi, fixesproto, libXfixes }: -x@{builderDefsPackage - , texinfo, libXext, xextproto, libX11, xproto, libXpm, libXt, libXcursor - , alsaLib, cmake, zlib, libpng, libvorbis, libXxf86dga, libXxf86misc - , xf86dgaproto, xf86miscproto, xf86vidmodeproto, libXxf86vm, openal, mesa - , kbproto, libjpeg, flac, inputproto, libXi, fixesproto, libXfixes - , ...}: -builderDefsPackage -(a : -let - helperArgNames = ["stdenv" "fetchurl" "builderDefsPackage"] ++ - []; +stdenv.mkDerivation rec { + name = "allegro-${version}"; + version = "5.1.11"; - buildInputs = map (n: builtins.getAttr n x) - (builtins.attrNames (builtins.removeAttrs x helperArgNames)); - sourceInfo = rec { - baseName="allegro"; - folderSuffix = "-unstable"; - version = "5.1.11"; - name="${baseName}-${version}"; - project="alleg"; - url="mirror://sourceforge/project/${project}/${baseName}${folderSuffix}/${version}/${name}.tar.gz"; - hash="18fdppaqaf3g3rcqwhyvsmkzk3y14clz4l8cvmg4hvjgyf011f3i"; - }; -in -rec { - src = a.fetchurl { - url = sourceInfo.url; + src = fetchurl { + url = "http://download.gna.org/allegro/allegro-unstable/${version}/${name}.tar.gz"; sha256 = "0zz07gdyc6xflpvkknwgzsyyyh9qiwd69j42rm9cw1ciwcsic1vs"; }; - inherit (sourceInfo) name version; - inherit buildInputs; - - /* doConfigure should be removed if not needed */ - phaseNames = ["patchIncludes" "doCmake" "doMakeInstall"]; - - patchIncludes = a.fullDepEntry '' - sed -e 's@/XInput2.h@/XI2.h@g' -i CMakeLists.txt src/*.c - '' ["minInit" "doUnpack"]; - - doCmake = a.fullDepEntry ('' - export NIX_LDFLAGS="$NIX_LDFLAGS -lXext -lX11 -lXpm -lXcursor -lXxf86vm -lXi -lXfixes" - cmake -D CMAKE_INSTALL_PREFIX=$out -D CMAKE_SKIP_RPATH=ON . - '') ["minInit" "doUnpack" "addInputs"]; - - makeFlags = [ + buildInputs = [ + texinfo libXext xextproto libX11 xproto libXpm libXt libXcursor + alsaLib cmake zlib libpng libvorbis libXxf86dga libXxf86misc + xf86dgaproto xf86miscproto xf86vidmodeproto libXxf86vm openal mesa + kbproto libjpeg flac inputproto libXi fixesproto libXfixes ]; - meta = { + patchPhase = '' + sed -e 's@/XInput2.h@/XI2.h@g' -i CMakeLists.txt "src/"*.c + ''; + + cmakeFlags = [ "-DCMAKE_SKIP_RPATH=ON" ]; + + meta = with stdenv.lib; { description = "A game programming library"; - license = a.lib.licenses.free; # giftware - maintainers = with a.lib.maintainers; - [ - raskin - ]; - platforms = with a.lib.platforms; - linux; - inherit version; + homepage = http://liballeg.org/; + license = licenses.zlib; + maintainers = [ maintainers.raskin ]; + platforms = platforms.linux; }; -}) x +} diff --git a/pkgs/development/libraries/allegro/5-unstable.upstream b/pkgs/development/libraries/allegro/5-unstable.upstream deleted file mode 100644 index e07829c08cc4..000000000000 --- a/pkgs/development/libraries/allegro/5-unstable.upstream +++ /dev/null @@ -1,7 +0,0 @@ -attribute_name allegro5 -url http://alleg.sourceforge.net/download.html -version_link '/allegro-unstable/.*[.]tar[.].*/download$' -SF_redirect -do_overwrite () { - do_overwrite_just_version -}