2021-01-11 07:54:33 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, ncurses }:
|
2015-09-11 07:30:11 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "2048-in-terminal";
|
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
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2015-09-11 07:30:11 +01:00
|
|
|
inherit (src.meta) homepage;
|
|
|
|
description = "Animated console version of the 2048 game";
|
|
|
|
license = licenses.mit;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|