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