nixpkgs/pkgs/applications/misc/tty-solitaire/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

41 lines
1.1 KiB
Nix
Raw Normal View History

{ lib, stdenv, fetchFromGitHub, fetchpatch, ncurses }:
2020-08-25 19:39:45 +02:00
stdenv.mkDerivation rec {
pname = "tty-solitaire";
2021-09-14 00:30:26 +02:00
version = "1.3.1";
2020-08-25 19:39:45 +02:00
src = fetchFromGitHub {
owner = "mpereira";
repo = pname;
rev = "v${version}";
2021-09-14 00:30:26 +02:00
sha256 = "sha256-zMLNWJieHxHALFQoSkdAxGbUBGuZnznLX86lI3P21F0=";
2020-08-25 19:39:45 +02:00
};
patches = [
# Patch pending upstream inclusion to support ncurses-6.3:
# https://github.com/mpereira/tty-solitaire/pull/61
(fetchpatch {
name = "ncurses-6.3.patch";
url = "https://github.com/mpereira/tty-solitaire/commit/4d066c564d086ce272b78cb8f80717a7fb83c261.patch";
sha256 = "sha256-E1XVG0be6JH3K1y7UPap93s8xk8Nk0dKLdKHcJ7mA8E=";
})
];
postPatch = ''
sed -i -e '/^CFLAGS *?= *-g *$/d' Makefile
'';
2020-08-25 19:39:45 +02:00
buildInputs = [ ncurses ];
2020-08-25 19:39:45 +02:00
makeFlags = [ "CC=${stdenv.cc.targetPrefix}cc" "PREFIX=${placeholder "out"}" ];
2020-08-25 19:39:45 +02:00
meta = with lib; {
2020-08-25 19:39:45 +02:00
description = "Klondike Solitaire in your ncurses terminal";
license = licenses.mit;
homepage = "https://github.com/mpereira/tty-solitaire";
platforms = ncurses.meta.platforms;
maintainers = [ maintainers.AndersonTorres ];
mainProgram = "ttysolitaire";
2020-08-25 19:39:45 +02:00
};
}