2023-06-09 07:58:21 +02:00
|
|
|
{ lib, fetchurl, tcl, tk, libX11, zlib, makeWrapper, which, makeDesktopItem }:
|
2018-01-12 17:41:20 +01:00
|
|
|
|
2021-05-01 01:50:04 +02:00
|
|
|
tcl.mkTclDerivation rec {
|
2019-08-15 14:41:18 +02:00
|
|
|
pname = "scid-vs-pc";
|
2023-06-09 07:58:21 +02:00
|
|
|
version = "4.24";
|
2018-01-12 17:41:20 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
2019-01-11 11:48:41 +01:00
|
|
|
url = "mirror://sourceforge/scidvspc/scid_vs_pc-${version}.tgz";
|
2023-06-09 07:58:21 +02:00
|
|
|
hash = "sha256-x4Ljn1vaXrue16kUofWAH2sDNYC8h3NvzFjffRo0EhA=";
|
2018-01-12 17:41:20 +01:00
|
|
|
};
|
|
|
|
|
2023-06-09 07:58:21 +02:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace configure Makefile.conf \
|
|
|
|
--replace "~/.fonts" "$out/share/fonts/truetype/Scid" \
|
|
|
|
--replace "which fc-cache" "false"
|
2018-01-12 17:41:20 +01:00
|
|
|
'';
|
|
|
|
|
2023-06-09 07:58:21 +02:00
|
|
|
nativeBuildInputs = [ makeWrapper which ];
|
|
|
|
buildInputs = [ tk libX11 zlib ];
|
2018-01-12 17:41:20 +01:00
|
|
|
|
2023-06-09 07:58:21 +02:00
|
|
|
configureFlags = [
|
|
|
|
"BINDIR=${placeholder "out"}/bin"
|
|
|
|
"SHAREDIR=${placeholder "out"}/share"
|
2018-01-12 17:41:20 +01:00
|
|
|
];
|
|
|
|
|
2019-01-11 11:48:41 +01:00
|
|
|
postInstall = ''
|
|
|
|
mkdir -p $out/share/applications
|
|
|
|
cp $desktopItem/share/applications/* $out/share/applications/
|
|
|
|
|
|
|
|
install -D icons/scid.png "$out"/share/icons/hicolor/128x128/apps/scid.png
|
|
|
|
'';
|
|
|
|
|
|
|
|
desktopItem = makeDesktopItem {
|
|
|
|
name = "scid-vs-pc";
|
|
|
|
desktopName = "Scid vs. PC";
|
|
|
|
genericName = "Chess Database";
|
|
|
|
comment = meta.description;
|
|
|
|
icon = "scid";
|
|
|
|
exec = "scid";
|
2022-02-22 15:56:15 +01:00
|
|
|
categories = [ "Game" "BoardGame" ];
|
2019-01-11 11:48:41 +01:00
|
|
|
};
|
2018-01-12 17:41:20 +01:00
|
|
|
|
2021-01-11 08:54:33 +01:00
|
|
|
meta = with lib; {
|
2018-01-12 17:41:20 +01:00
|
|
|
description = "Chess database with play and training functionality";
|
2023-01-21 22:41:12 +01:00
|
|
|
homepage = "https://scidvspc.sourceforge.net/";
|
2021-01-15 05:31:39 +01:00
|
|
|
license = lib.licenses.gpl2;
|
2018-01-12 17:41:20 +01:00
|
|
|
maintainers = [ maintainers.paraseba ];
|
2021-01-15 05:31:39 +01:00
|
|
|
platforms = lib.platforms.linux;
|
2018-01-12 17:41:20 +01:00
|
|
|
};
|
|
|
|
}
|