2021-11-21 15:38:47 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, fetchpatch, ncurses, pkg-config }:
|
2015-09-11 06:30:11 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 12:41:18 +00:00
|
|
|
pname = "2048-in-terminal";
|
2021-11-21 15:38:47 +00:00
|
|
|
version = "2021-09-12";
|
2015-09-11 06:30:11 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2021-11-21 15:38:47 +00:00
|
|
|
sha256 = "1jgacyimn59kxqhrk8jp13qayc2mncxhx393spqcxbz0sj6lxq9p";
|
|
|
|
rev = "466abe827638598e40cb627d2b017fe8f76b3a14";
|
2015-09-11 06:30:11 +00:00
|
|
|
repo = "2048-in-terminal";
|
|
|
|
owner = "alewmoose";
|
|
|
|
};
|
|
|
|
|
2021-11-21 15:38:47 +00:00
|
|
|
# Fix pending upstream inclusion for ncurses-6.3 support:
|
|
|
|
# https://github.com/alewmoose/2048-in-terminal/pull/6
|
|
|
|
patches = [
|
|
|
|
(fetchpatch {
|
|
|
|
name = "ncurses-6.3.patch";
|
|
|
|
url = "https://github.com/alewmoose/2048-in-terminal/commit/b1c78dc4b3cca3a193b1afea1ab85a75966823cf.patch";
|
|
|
|
sha256 = "05ibpgr83r7zxsak2l0gaf33858bp0sp0mjfdpmcmw745z3jw7q1";
|
|
|
|
})
|
|
|
|
];
|
2015-09-11 06:30:11 +00:00
|
|
|
|
2021-11-21 15:38:47 +00:00
|
|
|
buildInputs = [ ncurses ];
|
|
|
|
nativeBuildInputs = [ pkg-config ];
|
2017-08-14 02:29:17 +00:00
|
|
|
|
2015-09-11 06:30:11 +00:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
|
|
|
preInstall = ''
|
|
|
|
mkdir -p $out/bin
|
|
|
|
'';
|
2021-11-21 15:38:47 +00:00
|
|
|
installFlags = [ "PREFIX=$(out)" ];
|
2015-09-11 06:30:11 +00:00
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2015-09-11 06:30:11 +00:00
|
|
|
inherit (src.meta) homepage;
|
|
|
|
description = "Animated console version of the 2048 game";
|
|
|
|
license = licenses.mit;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|