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 CXXFLAGS = " --std=c++11 ";
24 hardeningDisable = [ "format" ];
28 find . -name 'Makefile.in' -exec sed -re 's@^ ( *)(cd|[&][&])@ \1\2@' -i '{}' ';'
29 find . -name 'Makefile.in' -exec sed -e '/chown/d; /chgrp/d' -i '{}' ';'
30 # do not set sticky bit in nix store
31 find . -name 'Makefile.in' -exec sed -e 's/04755/755/g' -i '{}' ';'
32 sed -e '/^ * *[$][(]tcltkdir[)]\/[*][.][*]/d' -i tcltk/Makefile.in
35 sed -re 's@[(]int[)]color@(long)color@' -i tcltk/tkmap.c
36 sed -re '/unitp = view_unit[(]uview[)]/aelse *unitp = NULL\;' -i tcltk/tkmap.c
37 sed -re 's@BMAP_BYTE char@BMAP_BYTE unsigned char@' -i kernel/ui.h
40 sed -re 's@MediumBlue@LightBlue@g' -i tcltk/tkconq.tcl
44 for file in $out/bin/*; do
45 wrapProgram $file --prefix TCLLIBPATH ' ' "${tk}/lib"
50 description = "A programmable turn-based strategy game";
51 maintainers = with maintainers; [ raskin ];
52 platforms = platforms.linux;
53 license = licenses.gpl2;