From ca03cf5c70797d7a4b78bd012e4e1193b85f13b8 Mon Sep 17 00:00:00 2001 From: Pascal Wittmann Date: Sat, 2 May 2015 23:13:26 +0200 Subject: [PATCH] xmoto: refactor, remove patches and add myself to maintainers --- pkgs/games/xmoto/default.nix | 44 ++++++++++------------- pkgs/games/xmoto/src-for-default.nix | 9 ----- pkgs/games/xmoto/src-info-for-default.nix | 7 ---- pkgs/top-level/all-packages.nix | 6 +--- 4 files changed, 20 insertions(+), 46 deletions(-) delete mode 100644 pkgs/games/xmoto/src-for-default.nix delete mode 100644 pkgs/games/xmoto/src-info-for-default.nix diff --git a/pkgs/games/xmoto/default.nix b/pkgs/games/xmoto/default.nix index 5695bb5b4294..7d4f2e53a941 100644 --- a/pkgs/games/xmoto/default.nix +++ b/pkgs/games/xmoto/default.nix @@ -1,32 +1,26 @@ -a : -let - s = import ./src-for-default.nix; - buildInputs = with a; [ +{ stdenv, fetchurl, chipmunk, sqlite, curl, zlib, bzip2, libjpeg +, libpng, freeglut, mesa, SDL, SDL_mixer, SDL_image, SDL_net +, SDL_ttf, lua5, ode, libxdg_basedir, libxml2 }: + +stdenv.mkDerivation rec { + name = "xmoto-${version}"; + version = "0.5.11"; + + src = fetchurl { + url = "http://download.tuxfamily.org/xmoto/xmoto/${version}/xmoto-${version}-src.tar.gz"; + sha256 = "1ci6r8zd0l7z28cy92ddf9dmqbdqwinz2y1cny34c61b57wsd155"; + }; + + buildInputs = [ chipmunk sqlite curl zlib bzip2 libjpeg libpng freeglut mesa SDL SDL_mixer SDL_image SDL_net SDL_ttf lua5 ode libxdg_basedir libxml2 ]; -in -rec { - src = a.fetchUrlFromSrcInfo s; - inherit (s) name; - inherit buildInputs; - configureFlags = []; - - /* doConfigure should be removed if not needed */ - phaseNames = [ "patchIncludes" "doConfigure" "doMakeInstall"]; - patchIncludes = a.fullDepEntry '' - sed -e '1i#include ' -i src/helpers//System.cpp - sed -e '1i#include ' -i src/helpers//System.cpp - '' ["doUnpack" "minInit"]; - - meta = { - description = "X-Moto - obstacled race game"; - maintainers = [ - a.lib.maintainers.raskin - a.lib.maintainers.viric - ]; - platforms = a.lib.platforms.linux; + meta = with stdenv.lib; { + description = "Obstacled race game"; + homepage = http://xmoto.tuxfamily.org; + maintainers = with maintainers; [ raskin viric pSub ]; + platforms = platforms.linux; }; } diff --git a/pkgs/games/xmoto/src-for-default.nix b/pkgs/games/xmoto/src-for-default.nix deleted file mode 100644 index beb3f6af1645..000000000000 --- a/pkgs/games/xmoto/src-for-default.nix +++ /dev/null @@ -1,9 +0,0 @@ -rec { - version="0.5.11"; - name="xmoto-0.5.11"; - hash="1ci6r8zd0l7z28cy92ddf9dmqbdqwinz2y1cny34c61b57wsd155"; - url="http://download.tuxfamily.org/xmoto/xmoto/${version}/xmoto-${version}-src.tar.gz"; - advertisedUrl="http://download.tuxfamily.org/xmoto/xmoto/0.5.11/xmoto-0.5.11-src.tar.gz"; - - -} diff --git a/pkgs/games/xmoto/src-info-for-default.nix b/pkgs/games/xmoto/src-info-for-default.nix deleted file mode 100644 index 8d5d3f49822c..000000000000 --- a/pkgs/games/xmoto/src-info-for-default.nix +++ /dev/null @@ -1,7 +0,0 @@ -{ - downloadPage = "http://xmoto.tuxfamily.org/"; - baseName = "xmoto"; - sourceRegexp = "xmoto-.*-src[.]tar[.].*"; - versionExtractorSedScript = ''$dashDelimitedVersion''; - versionReferenceCreator=''$(replaceAllVersionOccurences)''; -} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 96f04b611517..1afde965760c 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -9851,11 +9851,7 @@ let xf86_video_nouveau = xorg.xf86videonouveau; - xmoto = builderDefsPackage (import ../games/xmoto) { - inherit chipmunk sqlite curl zlib bzip2 libjpeg libpng - freeglut mesa SDL SDL_mixer SDL_image SDL_net SDL_ttf - lua5 ode libxdg_basedir libxml2; - }; + xmoto = callPackage ../games/xmoto { }; xorg_sys_opengl = callPackage ../os-specific/linux/opengl/xorg-sys { };