1 { lib, fetchurl, tcl, tk, libX11, zlib, makeWrapper, makeDesktopItem }:
3 tcl.mkTclDerivation rec {
8 url = "mirror://sourceforge/scidvspc/scid_vs_pc-${version}.tgz";
9 sha256 = "sha256-PSHDPrfhJI/DyEVQLo8Ckargqf/iUG5PgvUbO/4WNJM=";
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"
28 # "FONTDIR=$(out)/fonts"
31 preConfigure = ''configureFlags="
38 ./0001-put-fonts-in-out.patch
41 hardeningDisable = [ "format" ];
43 dontPatchShebangs = true;
45 # TODO: can this use tclWrapperArgs?
47 sed -i -e '1c#!'"$out"'/bin/tcscid' "$out/bin/scidpgn"
48 sed -i -e '1c#!${tk}/bin/wish' "$out/bin/sc_remote"
49 sed -i -e '1c#!'"$out"'/bin/tkscid' "$out/bin/scid"
51 for cmd in $out/bin/* ; do
53 --set TK_LIBRARY "${tk}/lib/${tk.libPrefix}"
58 mkdir -p $out/share/applications
59 cp $desktopItem/share/applications/* $out/share/applications/
61 install -D icons/scid.png "$out"/share/icons/hicolor/128x128/apps/scid.png
64 desktopItem = makeDesktopItem {
66 desktopName = "Scid vs. PC";
67 genericName = "Chess Database";
68 comment = meta.description;
71 categories = [ "Game" "BoardGame" ];
75 description = "Chess database with play and training functionality";
76 homepage = "http://scidvspc.sourceforge.net/";
77 license = lib.licenses.gpl2;
78 maintainers = [ maintainers.paraseba ];
79 platforms = lib.platforms.linux;