2010-12-24 05:47:55 +00:00
|
|
|
{builderDefsPackage, flex} @ x:
|
|
|
|
builderDefsPackage
|
|
|
|
(a :
|
2009-01-31 20:09:54 +00:00
|
|
|
let
|
|
|
|
fetchurl = a.fetchurl;
|
|
|
|
|
2009-05-24 11:57:41 +01:00
|
|
|
version = a.lib.attrByPath ["version"] "5.07" a;
|
2009-01-31 20:09:54 +00:00
|
|
|
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"];
|
|
|
|
|
2009-05-20 00:25:58 +01:00
|
|
|
preBuild = a.fullDepEntry (''
|
2009-01-31 20:09:54 +00:00
|
|
|
sed -i src/input.c -e 's/static pthread_t/pthread_t/'
|
|
|
|
sed -i "s@gnuchess@$out/bin/gnuchess@" -i src/gnuchessx
|
2010-02-21 08:15:14 +00:00
|
|
|
|
|
|
|
|
|
|
|
sed -e s/getline/gnuchess_local_getline/g -i $(grep getline -rl .)
|
2009-01-31 20:09:54 +00:00
|
|
|
'') ["minInit" "doUnpack"];
|
|
|
|
|
|
|
|
name = "gnuchess-" + version;
|
|
|
|
meta = {
|
|
|
|
description = "GNU Chess playing program";
|
|
|
|
};
|
2010-12-24 05:47:55 +00:00
|
|
|
}) x
|