2021-01-15 04:31:39 +00:00
|
|
|
{ lib, stdenv, fetchurl, tcl, tk, libX11, zlib, makeWrapper }:
|
2012-12-12 09:39:35 +00:00
|
|
|
|
2019-08-13 21:52:01 +00:00
|
|
|
stdenv.mkDerivation {
|
2019-08-15 12:41:18 +00:00
|
|
|
pname = "scid";
|
2012-12-12 09:39:35 +00:00
|
|
|
version = "4.3";
|
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "mirror://sourceforge/scid/scid-4.3.tar.bz2";
|
|
|
|
sha256 = "0zb5qp04x8w4gn2kvfdfq2p44kmzfcqn7v167dixz6nlyxg41hrw";
|
|
|
|
};
|
|
|
|
|
2021-02-07 09:17:39 +00:00
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
buildInputs = [ tcl tk libX11 zlib ];
|
2012-12-12 09:39:35 +00:00
|
|
|
|
|
|
|
prePatch = ''
|
|
|
|
sed -i -e '/^ *set headerPath *{/a ${tcl}/include ${tk}/include' \
|
|
|
|
-e '/^ *set libraryPath *{/a ${tcl}/lib ${tk}/lib' \
|
|
|
|
-e '/^ *set x11Path *{/a ${libX11}/lib/' \
|
|
|
|
configure
|
|
|
|
|
|
|
|
sed -i -e '/^ *set scidShareDir/s|\[file.*|"'"$out/share"'"|' \
|
|
|
|
tcl/config.tcl
|
|
|
|
'';
|
|
|
|
|
|
|
|
configureFlags = [
|
|
|
|
"BINDIR=$(out)/bin"
|
|
|
|
"SHAREDIR=$(out)/share"
|
|
|
|
];
|
|
|
|
|
2017-03-03 14:16:57 +00:00
|
|
|
hardeningDisable = [ "format" ];
|
|
|
|
|
2012-12-12 09:39:35 +00:00
|
|
|
dontPatchShebangs = true;
|
|
|
|
|
|
|
|
postFixup = ''
|
|
|
|
for cmd in sc_addmove sc_eco sc_epgn scidpgn \
|
|
|
|
sc_import sc_spell sc_tree spliteco
|
|
|
|
do
|
|
|
|
sed -i -e '1c#!'"$out"'/bin/tcscid' "$out/bin/$cmd"
|
|
|
|
done
|
|
|
|
|
|
|
|
sed -i -e '1c#!${tcl}/bin/tcslsh' "$out/bin/spf2spi"
|
|
|
|
sed -i -e '1c#!${tk}/bin/wish' "$out/bin/sc_remote"
|
|
|
|
sed -i -e '1c#!'"$out"'/bin/tkscid' "$out/bin/scid"
|
|
|
|
|
|
|
|
for cmd in $out/bin/*
|
|
|
|
do
|
|
|
|
wrapProgram "$cmd" \
|
|
|
|
--set TCLLIBPATH "${tcl}/${tcl.libdir}" \
|
|
|
|
--set TK_LIBRARY "${tk}/lib/${tk.libPrefix}"
|
|
|
|
done
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "Chess database with play and training functionality";
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "http://scid.sourceforge.net/";
|
2021-01-15 04:31:39 +00:00
|
|
|
license = lib.licenses.gpl2;
|
2012-12-12 09:39:35 +00:00
|
|
|
};
|
|
|
|
}
|