2015-09-11 07:30:11 +01:00
|
|
|
{ stdenv, fetchFromGitHub, ncurses }:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "2048-in-terminal-${version}";
|
2018-01-14 00:55:01 +00:00
|
|
|
version = "2017-11-29";
|
2015-09-11 07:30:11 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2018-01-14 00:55:01 +00:00
|
|
|
sha256 = "1cqv5z1i5zcrvj0w6pdfnnff8m6kjndqxwkwsw5ma9jz503bmyc6";
|
|
|
|
rev = "4e525066b0ef3442e92d2ba8dd373bdc205ece28";
|
2015-09-11 07:30:11 +01:00
|
|
|
repo = "2048-in-terminal";
|
|
|
|
owner = "alewmoose";
|
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [ ncurses ];
|
|
|
|
|
2017-08-14 03:29:17 +01:00
|
|
|
prePatch = ''
|
|
|
|
sed -i '1i#include <fcntl.h>\n' save.c
|
|
|
|
'';
|
|
|
|
|
2015-09-11 07:30:11 +01:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
|
|
|
preInstall = ''
|
|
|
|
mkdir -p $out/bin
|
|
|
|
'';
|
2018-01-14 00:55:01 +00:00
|
|
|
installFlags = [ "DESTDIR=$(out)/bin" ];
|
2015-09-11 07:30:11 +01:00
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
inherit (src.meta) homepage;
|
|
|
|
description = "Animated console version of the 2048 game";
|
|
|
|
license = licenses.mit;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|