2022-06-10 02:08:53 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchurl
|
|
|
|
}:
|
|
|
|
|
2014-11-05 08:51:19 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 12:41:18 +00:00
|
|
|
pname = "fairymax";
|
2014-11-05 08:51:19 +00:00
|
|
|
version = "4.8";
|
2022-06-10 02:08:53 +00:00
|
|
|
|
2014-11-05 08:51:19 +00:00
|
|
|
src = fetchurl {
|
|
|
|
url = "http://home.hccnet.nl/h.g.muller/fmax4_8w.c";
|
2022-06-10 02:08:53 +00:00
|
|
|
hash = "sha256-ikn+CA5lxtDYSDT+Nsv1tfORhKW6/vlmHcGAT9SFfQc=";
|
2014-11-05 08:51:19 +00:00
|
|
|
};
|
2022-06-10 02:08:53 +00:00
|
|
|
|
2014-11-05 08:51:19 +00:00
|
|
|
ini = fetchurl {
|
|
|
|
url = "http://home.hccnet.nl/h.g.muller/fmax.ini";
|
2022-06-10 02:08:53 +00:00
|
|
|
hash = "sha256-lh2ivXx4jNdWn3pT1WKKNEvkVQ31JfdDx+vqNx44nf8=";
|
2014-11-05 08:51:19 +00:00
|
|
|
};
|
2022-06-10 02:08:53 +00:00
|
|
|
|
2014-11-05 08:51:19 +00:00
|
|
|
unpackPhase = ''
|
|
|
|
cp ${src} fairymax.c
|
|
|
|
cp ${ini} fmax.ini
|
|
|
|
'';
|
2022-06-10 02:08:53 +00:00
|
|
|
|
2014-11-05 08:51:19 +00:00
|
|
|
buildPhase = ''
|
2022-06-10 02:08:53 +00:00
|
|
|
cc *.c -Wno-return-type \
|
|
|
|
-o fairymax \
|
|
|
|
-DINI_FILE='"'"$out/share/fairymax/fmax.ini"'"'
|
2014-11-05 08:51:19 +00:00
|
|
|
'';
|
2022-06-10 02:08:53 +00:00
|
|
|
|
2014-11-05 08:51:19 +00:00
|
|
|
installPhase = ''
|
|
|
|
mkdir -p "$out"/{bin,share/fairymax}
|
|
|
|
cp fairymax "$out/bin"
|
|
|
|
cp fmax.ini "$out/share/fairymax"
|
|
|
|
'';
|
2022-06-10 02:08:53 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
homepage = "http://home.hccnet.nl/h.g.muller/dwnldpage.html";
|
2021-01-24 09:19:10 +00:00
|
|
|
description = "Small chess engine supporting fairy pieces";
|
2024-03-19 02:14:51 +00:00
|
|
|
mainProgram = "fairymax";
|
2014-11-05 08:51:19 +00:00
|
|
|
longDescription = ''
|
2022-06-10 02:08:53 +00:00
|
|
|
A version of micro-Max that reads the piece description from a file
|
|
|
|
fmax.ini, so that arbitrary fairy pieces can be implemented. This version
|
|
|
|
(4.8J) supports up to 15 piece types, and board sizes up to 12x8.
|
2014-11-05 08:51:19 +00:00
|
|
|
'';
|
2022-06-10 02:08:53 +00:00
|
|
|
license = licenses.free;
|
|
|
|
maintainers = [ maintainers.raskin ];
|
|
|
|
platforms = platforms.all;
|
2014-11-05 08:51:19 +00:00
|
|
|
};
|
|
|
|
}
|