1 { lib, stdenv, fetchFromGitHub, fetchpatch, ncurses, pkg-config }:
3 stdenv.mkDerivation rec {
5 version = "2.3+unstable=2021-04-07";
7 src = fetchFromGitHub {
10 # Use unreleased version to pull in fix for ncurses-6.3
11 rev = "9e00c32098524c30dac4dab701f7e33f8bc7c880";
12 sha256 = "14jrzz06jr29887bxgad1x6kd26c2fnqrc26864wqm3838fpcqw0";
16 # Pull upstream patch pending inclusion fir more ncurses-6.3 fixes:
17 # https://github.com/xorg62/tty-clock/pull/100
19 name = "ncurses-6.2.patch";
20 url = "https://github.com/xorg62/tty-clock/commit/4cfd73080da1964557484da620c401745d73881c.patch";
21 sha256 = "13pj1v6yrfc4vynsa746974kixfxxsy2jzzpl73c8bp7msr9d3md";
25 nativeBuildInputs = [ pkg-config ];
26 buildInputs = [ ncurses ];
28 makeFlags = [ "PREFIX=$(out)" ];
31 broken = stdenv.hostPlatform.isDarwin;
32 homepage = "https://github.com/xorg62/tty-clock";
33 license = licenses.bsd3;
34 description = "Digital clock in ncurses";
35 platforms = platforms.all;
36 maintainers = [ maintainers.koral ];
37 mainProgram = "tty-clock";