Added GNU Chess and XBoard

svn path=/nixpkgs/trunk/; revision=13923
This commit is contained in:
Michael Raskin 2009-01-31 20:09:54 +00:00
parent 6646f2e8e1
commit 1745266d32
3 changed files with 73 additions and 0 deletions

View file

@ -0,0 +1,31 @@
a :
let
fetchurl = a.fetchurl;
version = a.lib.getAttr ["version"] "5.07" a;
buildInputs = with a; [
flex
];
in
rec {
src = fetchurl {
url = "mirror://gnu/chess/gnuchess-${version}.tar.gz";
sha256 = "0zh15m35fzbsrk1aann9pwlkv54dwb00snx99pk3xbg5bwkf125k";
};
inherit buildInputs;
configureFlags = [];
/* doConfigure should be removed if not needed */
phaseNames = ["doConfigure" "preBuild" "doMakeInstall"];
preBuild = a.FullDepEntry (''
sed -i src/input.c -e 's/static pthread_t/pthread_t/'
sed -i "s@gnuchess@$out/bin/gnuchess@" -i src/gnuchessx
'') ["minInit" "doUnpack"];
name = "gnuchess-" + version;
meta = {
description = "GNU Chess playing program";
};
}

View file

@ -0,0 +1,32 @@
a :
let
fetchurl = a.fetchurl;
version = a.lib.getAttr ["version"] "4.2.7" a;
buildInputs = with a; [
libX11 xproto libXt libXaw libSM libICE libXmu
libXext gnuchess
];
in
rec {
src = fetchurl {
url = "http://ftp.gnu.org/gnu/xboard/xboard-${version}.tar.gz";
sha256 = "0fwdzcav8shvzi7djphrlav29vwxnx63spzsldlhrglr7qpg28av";
};
inherit buildInputs;
configureFlags = [];
/* doConfigure should be removed if not needed */
phaseNames = ["doConfigure" "preBuild" "doMakeInstall"];
preBuild = a.FullDepEntry(''
sed -e '/FIRST_CHESS_PROGRAM/s@gnuchessx@${a.gnuchess}/bin/gnuchessx@' -i xboard.h
sed -e '/SECOND_CHESS_PROGRAM/s@gnuchessx@${a.gnuchess}/bin/gnuchessx@' -i xboard.h
'') ["doUnpack" "minInit"];
name = "xboard-" + version;
meta = {
description = "XBoard - a chess board compatible with GNU Chess";
};
}

View file

@ -8430,6 +8430,10 @@ let
inherit fetchurl stdenv SDL openal freealut zlib libpng python;
};
gnuchess = builderDefsPackage (import ../games/gnuchess) {
flex = flex2535;
};
lincity = builderDefsPackage (import ../games/lincity) {
inherit (xlibs) libX11 libXext xextproto
libICE libSM xproto;
@ -8503,6 +8507,12 @@ let
inherit fetchurl stdenv xlibs mesa;
};
xboard = builderDefsPackage (import ../games/xboard) {
inherit (xlibs) libX11 xproto libXt libXaw libSM
libICE libXmu libXext;
inherit gnuchess;
};
xsokoban = builderDefsPackage (import ../games/xsokoban) {
inherit (xlibs) libX11 xproto libXpm libXt;
};