nixpkgs/pkgs/games/fairymax/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

51 lines
1.3 KiB
Nix
Raw Permalink Normal View History

2022-06-10 04:08:53 +02:00
{ lib
, stdenv
, fetchurl
}:
2014-11-05 09:51:19 +01:00
stdenv.mkDerivation rec {
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";
description = "A small chess engine supporting fairy pieces";
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
};
}