2022-06-16 17:23:12 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchurl
|
|
|
|
}:
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "fairymax";
|
|
|
|
version = "4.8";
|
2022-06-16 17:23:12 +00:00
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
src = fetchurl {
|
|
|
|
url = "http://home.hccnet.nl/h.g.muller/fmax4_8w.c";
|
2022-06-16 17:23:12 +00:00
|
|
|
hash = "sha256-ikn+CA5lxtDYSDT+Nsv1tfORhKW6/vlmHcGAT9SFfQc=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
2022-06-16 17:23:12 +00:00
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
ini = fetchurl {
|
|
|
|
url = "http://home.hccnet.nl/h.g.muller/fmax.ini";
|
2022-06-16 17:23:12 +00:00
|
|
|
hash = "sha256-lh2ivXx4jNdWn3pT1WKKNEvkVQ31JfdDx+vqNx44nf8=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
2022-06-16 17:23:12 +00:00
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
unpackPhase = ''
|
|
|
|
cp ${src} fairymax.c
|
|
|
|
cp ${ini} fmax.ini
|
|
|
|
'';
|
2022-06-16 17:23:12 +00:00
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
buildPhase = ''
|
2022-06-16 17:23:12 +00:00
|
|
|
cc *.c -Wno-return-type \
|
|
|
|
-o fairymax \
|
|
|
|
-DINI_FILE='"'"$out/share/fairymax/fmax.ini"'"'
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
2022-06-16 17:23:12 +00:00
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
installPhase = ''
|
|
|
|
mkdir -p "$out"/{bin,share/fairymax}
|
|
|
|
cp fairymax "$out/bin"
|
|
|
|
cp fmax.ini "$out/share/fairymax"
|
|
|
|
'';
|
2022-06-16 17:23:12 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
homepage = "http://home.hccnet.nl/h.g.muller/dwnldpage.html";
|
2021-02-05 17:12:51 +00:00
|
|
|
description = "A small chess engine supporting fairy pieces";
|
2020-04-24 23:36:52 +00:00
|
|
|
longDescription = ''
|
2022-06-16 17:23:12 +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.
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
2022-06-16 17:23:12 +00:00
|
|
|
license = licenses.free;
|
|
|
|
maintainers = [ maintainers.raskin ];
|
|
|
|
platforms = platforms.all;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|