summaryrefslogtreecommitdiffstats
path: root/pkgs/games/fairymax
diff options
context:
space:
mode:
authorAndersonTorres <torres.anderson.85@protonmail.com>2022-06-09 23:08:53 -0300
committerAndersonTorres <torres.anderson.85@protonmail.com>2022-06-09 23:33:53 -0300
commit1404529e1dfc07bf4bc163fe9d131ffffa65e858 (patch)
tree2ca6457375d411ab00bb44dc0cf1eaf0be200157 /pkgs/games/fairymax
parent233e380f3b09efc4fb67d80898a59e494c1b6baa (diff)
fairymax: use SRI hash format
Diffstat (limited to 'pkgs/games/fairymax')
-rw-r--r--pkgs/games/fairymax/default.nix38
1 files changed, 24 insertions, 14 deletions
diff --git a/pkgs/games/fairymax/default.nix b/pkgs/games/fairymax/default.nix
index 49a91e7a64d4..b493f4dcfa27 100644
--- a/pkgs/games/fairymax/default.nix
+++ b/pkgs/games/fairymax/default.nix
@@ -1,39 +1,49 @@
-{lib, stdenv, fetchurl}:
+{ lib
+, stdenv
+, fetchurl
+}:
+
stdenv.mkDerivation rec {
pname = "fairymax";
version = "4.8";
+
src = fetchurl {
url = "http://home.hccnet.nl/h.g.muller/fmax4_8w.c";
- sha256 = "01vxhpa4z0613mkgkzmsln293wxmyp5kdzil93cd1ik51q4gwjca";
+ hash = "sha256-ikn+CA5lxtDYSDT+Nsv1tfORhKW6/vlmHcGAT9SFfQc=";
};
+
ini = fetchurl {
url = "http://home.hccnet.nl/h.g.muller/fmax.ini";
- sha256 = "1zwx70g3gspbqx1zf9gm1may8jrli9idalvskxbdg33qgjys47cn";
+ hash = "sha256-lh2ivXx4jNdWn3pT1WKKNEvkVQ31JfdDx+vqNx44nf8=";
};
+
unpackPhase = ''
cp ${src} fairymax.c
cp ${ini} fmax.ini
'';
+
buildPhase = ''
- $CC *.c -Wno-return-type -o fairymax -DINI_FILE='"'"$out/share/fairymax/fmax.ini"'"'
+ cc *.c -Wno-return-type \
+ -o fairymax \
+ -DINI_FILE='"'"$out/share/fairymax/fmax.ini"'"'
'';
+
installPhase = ''
mkdir -p "$out"/{bin,share/fairymax}
cp fairymax "$out/bin"
cp fmax.ini "$out/share/fairymax"
'';
- meta = {
+
+ meta = with lib; {
+ homepage = "http://home.hccnet.nl/h.g.muller/dwnldpage.html";
description = "A small chess engine supporting fairy pieces";
longDescription = ''
- 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. A Linux port exists in the
- format of a debian package.
+ 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.
'';
- license = lib.licenses.free ;
- maintainers = [lib.maintainers.raskin];
- platforms = lib.platforms.all;
- homepage = "http://home.hccnet.nl/h.g.muller/dwnldpage.html";
+ license = licenses.free;
+ maintainers = [ maintainers.raskin ];
+ platforms = platforms.all;
};
}