1 { lib, fetchurl, tcl, tk, libX11, zlib, makeWrapper }:
8 url = "mirror://sourceforge/scid/scid-4.3.tar.bz2";
9 sha256 = "0zb5qp04x8w4gn2kvfdfq2p44kmzfcqn7v167dixz6nlyxg41hrw";
12 nativeBuildInputs = [ makeWrapper ];
13 buildInputs = [ tk libX11 zlib ];
16 sed -i -e '/^ *set headerPath *{/a ${tcl}/include ${tk}/include' \
17 -e '/^ *set libraryPath *{/a ${tcl}/lib ${tk}/lib' \
18 -e '/^ *set x11Path *{/a ${libX11}/lib/' \
21 sed -i -e '/^ *set scidShareDir/s|\[file.*|"'"$out/share"'"|' \
27 "SHAREDIR=$(out)/share"
30 hardeningDisable = [ "format" ];
32 dontPatchShebangs = true;
34 # TODO: can this use tclWrapperArgs?
36 for cmd in sc_addmove sc_eco sc_epgn scidpgn \
37 sc_import sc_spell sc_tree spliteco
39 sed -i -e '1c#!'"$out"'/bin/tcscid' "$out/bin/$cmd"
42 sed -i -e '1c#!${tcl}/bin/tcslsh' "$out/bin/spf2spi"
43 sed -i -e '1c#!${tk}/bin/wish' "$out/bin/sc_remote"
44 sed -i -e '1c#!'"$out"'/bin/tkscid' "$out/bin/scid"
49 --set TK_LIBRARY "${tk}/lib/${tk.libPrefix}"
54 description = "Chess database with play and training functionality";
55 maintainers = with lib.maintainers; [ agbrooks ];
56 homepage = "http://scid.sourceforge.net/";
57 license = lib.licenses.gpl2;