1 { lib, stdenv, fetchurl, cpio, xorgproto, libX11, libXmu, libXaw, libXt, tcl, tk
2 , libXext, fontconfig, makeWrapper }:
4 stdenv.mkDerivation rec {
6 version = "7.5.0-0pre.0.20050612";
9 url = "mirror://sourceforge/project/xconq/xconq/xconq-${version}/xconq-${version}.tar.gz";
10 sha256 = "1za78yx57mgwcmmi33wx3533yz1x093dnqis8q2qmqivxav51lca";
13 nativeBuildInputs = [ makeWrapper ];
14 buildInputs = [ cpio xorgproto libX11 libXmu libXaw libXt tcl tk libXext fontconfig ];
17 "--enable-alternate-scoresdir=scores"
18 "--with-tclconfig=${tcl}/lib"
19 "--with-tkconfig=${tk}/lib"
22 env.CXXFLAGS = toString [
25 "-Wno-writable-strings"
28 enableParallelBuilding = true;
30 hardeningDisable = [ "format" ];
34 find . -name 'Makefile.in' -exec sed -re 's@^ ( *)(cd|[&][&])@ \1\2@' -i '{}' ';'
35 find . -name 'Makefile.in' -exec sed -e '/chown/d; /chgrp/d' -i '{}' ';'
36 # do not set sticky bit in nix store
37 find . -name 'Makefile.in' -exec sed -e 's/04755/755/g' -i '{}' ';'
38 sed -e '/^ * *[$][(]tcltkdir[)]\/[*][.][*]/d' -i tcltk/Makefile.in
41 sed -re 's@[(]int[)]color@(long)color@' -i tcltk/tkmap.c
42 sed -re '/unitp = view_unit[(]uview[)]/aelse *unitp = NULL\;' -i tcltk/tkmap.c
43 sed -re 's@BMAP_BYTE char@BMAP_BYTE unsigned char@' -i kernel/ui.h
46 sed -re 's@MediumBlue@LightBlue@g' -i tcltk/tkconq.tcl
50 for file in $out/bin/*; do
51 wrapProgram $file --prefix TCLLIBPATH ' ' "${tk}/lib"
56 description = "Programmable turn-based strategy game";
57 maintainers = with maintainers; [ raskin ];
58 platforms = platforms.unix;
59 license = licenses.gpl2Plus;