From 498f2e7c20646d8f16d1d2bcf6933e4a5f1439ea Mon Sep 17 00:00:00 2001 From: Michael Raskin <7c6f434c@mail.ru> Date: Wed, 12 Dec 2012 09:36:14 +0400 Subject: [PATCH] GNU Chess: update to 6.0.2 --- pkgs/games/gnuchess/default.nix | 49 ++++++++++++---------------- pkgs/games/gnuchess/default.upstream | 1 + 2 files changed, 22 insertions(+), 28 deletions(-) create mode 100644 pkgs/games/gnuchess/default.upstream diff --git a/pkgs/games/gnuchess/default.nix b/pkgs/games/gnuchess/default.nix index 24556d83148e..8a706896ba5c 100644 --- a/pkgs/games/gnuchess/default.nix +++ b/pkgs/games/gnuchess/default.nix @@ -1,36 +1,29 @@ -{builderDefsPackage, flex} @ x: -builderDefsPackage -(a : -let - fetchurl = a.fetchurl; - - version = a.lib.attrByPath ["version"] "5.07" a; - buildInputs = with a; [ +{stdenv, fetchurl, flex}: +let + s = # Generated upstream information + rec { + baseName="gnuchess"; + version="6.0.2"; + name="${baseName}-${version}"; + hash="1xd3g28glz2xyjnca0zfw3k0jl5vhgd7wvy4n9km5wnn9z7287l2"; + url="http://ftp.gnu.org/gnu/chess/gnuchess-6.0.2.tar.gz"; + sha256="1xd3g28glz2xyjnca0zfw3k0jl5vhgd7wvy4n9km5wnn9z7287l2"; + }; + buildInputs = [ flex ]; in -rec { +stdenv.mkDerivation rec { + inherit (s) name version; src = fetchurl { - url = "mirror://gnu/chess/gnuchess-${version}.tar.gz"; - sha256 = "0zh15m35fzbsrk1aann9pwlkv54dwb00snx99pk3xbg5bwkf125k"; + inherit (s) url sha256; }; - 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 - - - sed -e s/getline/gnuchess_local_getline/g -i $(grep getline -rl .) - '') ["minInit" "doUnpack"]; - - name = "gnuchess-" + version; meta = { - description = "GNU Chess playing program"; + inherit (s) version; + description = "GNU Chess engine"; + maintainers = [stdenv.lib.maintainers.raskin]; + platforms = stdenv.lib.platforms.linux; + license = stdenv.lib.licenses.gpl3Plus; }; -}) x +} diff --git a/pkgs/games/gnuchess/default.upstream b/pkgs/games/gnuchess/default.upstream new file mode 100644 index 000000000000..e1d1d5f2eeb8 --- /dev/null +++ b/pkgs/games/gnuchess/default.upstream @@ -0,0 +1 @@ +url http://ftp.gnu.org/gnu/chess/