at 23.11-beta 38 lines 1.2 kB view raw
1{ lib, stdenv, fetchFromGitHub, fetchpatch, ncurses, pkg-config }: 2 3stdenv.mkDerivation rec { 4 pname = "tty-clock"; 5 version = "2.3+unstable=2021-04-07"; 6 7 src = fetchFromGitHub { 8 owner = "xorg62"; 9 repo = "tty-clock"; 10 # Use unreleased version to pull in fix for ncurses-6.3 11 rev = "9e00c32098524c30dac4dab701f7e33f8bc7c880"; 12 sha256 = "14jrzz06jr29887bxgad1x6kd26c2fnqrc26864wqm3838fpcqw0"; 13 }; 14 15 patches = [ 16 # Pull upstream patch pending inclusion fir more ncurses-6.3 fixes: 17 # https://github.com/xorg62/tty-clock/pull/100 18 (fetchpatch { 19 name = "ncurses-6.2.patch"; 20 url = "https://github.com/xorg62/tty-clock/commit/4cfd73080da1964557484da620c401745d73881c.patch"; 21 sha256 = "13pj1v6yrfc4vynsa746974kixfxxsy2jzzpl73c8bp7msr9d3md"; 22 }) 23 ]; 24 25 nativeBuildInputs = [ pkg-config ]; 26 buildInputs = [ ncurses ]; 27 28 makeFlags = [ "PREFIX=$(out)" ]; 29 30 meta = with lib; { 31 broken = stdenv.isDarwin; 32 homepage = "https://github.com/xorg62/tty-clock"; 33 license = licenses.free; 34 description = "Digital clock in ncurses"; 35 platforms = platforms.all; 36 maintainers = [ maintainers.koral ]; 37 }; 38}