3
0
Fork 0
forked from mirrors/nixpkgs

fairymax: use SRI hash format

This commit is contained in:
AndersonTorres 2022-06-09 23:08:53 -03:00
parent 233e380f3b
commit 1404529e1d

View file

@ -1,39 +1,49 @@
{lib, stdenv, fetchurl}: { lib
, stdenv
, fetchurl
}:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "fairymax"; pname = "fairymax";
version = "4.8"; version = "4.8";
src = fetchurl { src = fetchurl {
url = "http://home.hccnet.nl/h.g.muller/fmax4_8w.c"; url = "http://home.hccnet.nl/h.g.muller/fmax4_8w.c";
sha256 = "01vxhpa4z0613mkgkzmsln293wxmyp5kdzil93cd1ik51q4gwjca"; hash = "sha256-ikn+CA5lxtDYSDT+Nsv1tfORhKW6/vlmHcGAT9SFfQc=";
}; };
ini = fetchurl { ini = fetchurl {
url = "http://home.hccnet.nl/h.g.muller/fmax.ini"; url = "http://home.hccnet.nl/h.g.muller/fmax.ini";
sha256 = "1zwx70g3gspbqx1zf9gm1may8jrli9idalvskxbdg33qgjys47cn"; hash = "sha256-lh2ivXx4jNdWn3pT1WKKNEvkVQ31JfdDx+vqNx44nf8=";
}; };
unpackPhase = '' unpackPhase = ''
cp ${src} fairymax.c cp ${src} fairymax.c
cp ${ini} fmax.ini cp ${ini} fmax.ini
''; '';
buildPhase = '' 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 = '' installPhase = ''
mkdir -p "$out"/{bin,share/fairymax} mkdir -p "$out"/{bin,share/fairymax}
cp fairymax "$out/bin" cp fairymax "$out/bin"
cp fmax.ini "$out/share/fairymax" 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"; description = "A small chess engine supporting fairy pieces";
longDescription = '' longDescription = ''
A version of micro-Max that reads the piece description A version of micro-Max that reads the piece description from a file
from a file fmax.ini, so that arbitrary fairy pieces can be fmax.ini, so that arbitrary fairy pieces can be implemented. This version
implemented. This version (4.8J) supports up to 15 piece types, (4.8J) supports up to 15 piece types, and board sizes up to 12x8.
and board sizes up to 12x8. A Linux port exists in the
format of a debian package.
''; '';
license = lib.licenses.free ; license = licenses.free;
maintainers = [lib.maintainers.raskin]; maintainers = [ maintainers.raskin ];
platforms = lib.platforms.all; platforms = platforms.all;
homepage = "http://home.hccnet.nl/h.g.muller/dwnldpage.html";
}; };
} }