diff options
author | Michael Raskin <7c6f434c@mail.ru> | 2011-05-28 15:36:56 +0000 |
---|---|---|
committer | Michael Raskin <7c6f434c@mail.ru> | 2011-05-28 15:36:56 +0000 |
commit | 9f3e6006e8a759e74f442d223dd8b13aa45c1fda (patch) | |
tree | 2016839f1391092b1f2a0f9710acd81eb5d721f5 /pkgs/games/xconq/default.nix | |
parent | e0a4f988a4d72e91cc75f38e53ff8c105a169891 (diff) |
Adding Xconq turn-based strategy
svn path=/nixpkgs/trunk/; revision=27306
Diffstat (limited to 'pkgs/games/xconq/default.nix')
-rw-r--r-- | pkgs/games/xconq/default.nix | 67 |
1 files changed, 67 insertions, 0 deletions
diff --git a/pkgs/games/xconq/default.nix b/pkgs/games/xconq/default.nix new file mode 100644 index 0000000000000..16169c767bfa1 --- /dev/null +++ b/pkgs/games/xconq/default.nix @@ -0,0 +1,67 @@ +x@{builderDefsPackage + , rpm, cpio, xproto, libX11, libXmu, libXaw, libXt, tcl, tk, libXext + , makeWrapper + , ...}: +builderDefsPackage +(a : +let + helperArgNames = ["stdenv" "fetchurl" "builderDefsPackage"] ++ + []; + + buildInputs = map (n: builtins.getAttr n x) + (builtins.attrNames (builtins.removeAttrs x helperArgNames)); + sourceInfo = rec { + baseName="xconq"; + version="7.5.0-0pre.0.20050612"; + name="${baseName}-${version}"; + extension="src.rpm"; + project="${baseName}"; + url="mirror://sourceforge/project/${project}/${baseName}/${name}/${baseName}-${version}.${extension}"; + hash="0i41dz95af2pzmmjz0sc1n0wdxy7gjqlfcl503hw1xd5zza2lw2j"; + }; +in +rec { + src = a.fetchurl { + url = sourceInfo.url; + sha256 = sourceInfo.hash; + }; + + inherit (sourceInfo) name version; + inherit buildInputs; + + /* doConfigure should be removed if not needed */ + phaseNames = ["addInputs" "doUnpack" "fixMakefiles" "fixCfiles" "doConfigure" + "doMakeInstall" "doWrap"]; + + doWrap = a.makeManyWrappers ''$out/bin/*'' ''--prefix TCLLIBPATH : "${tk}/lib"''; + + fixMakefiles = a.fullDepEntry '' + find . -name 'Makefile.in' -exec sed -re 's@^ ( *)(cd|[&][&])@ \1\2@' -i '{}' ';' + find . -name 'Makefile.in' -exec sed -e '/chown/d; /chgrp/d' -i '{}' ';' + sed -e '/^ * *[$][(]tcltkdir[)]\/[*][.][*]/d' -i tcltk/Makefile.in + '' ["minInit" "doUnpack"]; + + fixCfiles = a.fullDepEntry '' + sed -re 's@[(]int[)]color@(long)color@' -i tcltk/tkmap.c + '' ["minInit" "doUnpack"]; + + configureFlags = [ + "--enable-alternate-scoresdir=scores" + "--with-tclconfig=${tcl}/lib" + "--with-tkconfig=${tk}/lib" + ]; + + meta = { + description = "A programmable turn-based strategy game"; + maintainers = with a.lib.maintainers; + [ + raskin + ]; + platforms = with a.lib.platforms; + linux; + license = a.lib.licenses.gpl2; + }; + passthru = { + }; +}) x + |