0079153414
Darwin spits the following error: Location of "tk.h": not found Location of Tcl 8.6 library: /nix/store/zr4n0fdb3nsdp80vff9mihks22w1g8jm-tcl-8.6.6/lib Location of Tk 8.6 library: /nix/store/bwlx46zncj2c6bv2sn75ai0wgzc89d93-tk-8.6.6/lib Location of X11 library: /nix/store/093lzjvm2r27rprpqxvyrgqvfp1k0dlf-libX11-1.6.5/lib/ Checking if your system already has zlib installed: no. Error: compiler g++ does not support C++0x (C++11).
71 lines
1.8 KiB
Nix
71 lines
1.8 KiB
Nix
{ stdenv, fetchurl, tcl, tk, libX11, zlib, makeWrapper }:
|
|
|
|
stdenv.mkDerivation rec {
|
|
name = "scid-vs-pc-${version}";
|
|
version = "4.18.1";
|
|
|
|
src = fetchurl {
|
|
url = "mirror://sourceforge/scidvspc/scid_vs_pc-4.18.1.tgz";
|
|
sha256 = "01nd88g3wh3avz1yk9fka9zf20ij8dlnpwzz8gnx78i5b06cp459";
|
|
};
|
|
|
|
buildInputs = [ tcl tk libX11 zlib makeWrapper ];
|
|
|
|
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"
|
|
# "FONTDIR=$(out)/fonts"
|
|
# ];
|
|
|
|
preConfigure = ''configureFlags="
|
|
BINDIR=$out/bin
|
|
SHAREDIR=$out/share
|
|
FONTDIR=$out/fonts"
|
|
'';
|
|
|
|
patches = [
|
|
./0001-put-fonts-in-out.patch
|
|
];
|
|
|
|
hardeningDisable = [ "format" ];
|
|
|
|
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#!${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 = with stdenv.lib; {
|
|
description = "Chess database with play and training functionality";
|
|
homepage = http://scidvspc.sourceforge.net/;
|
|
license = stdenv.lib.licenses.gpl2;
|
|
maintainers = [ maintainers.paraseba ];
|
|
platforms = stdenv.lib.platforms.linux;
|
|
};
|
|
}
|
|
|