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