1{ lib, stdenv, fetchFromGitHub, ncurses }:
2
3stdenv.mkDerivation rec {
4 pname = "ttyplot";
5 version = "1.4";
6
7 src = fetchFromGitHub {
8 owner = "tenox7";
9 repo = "ttyplot";
10 rev = version;
11 sha256 = "19qm0hx9ljdw9qg78lydn3c627xy7xnx3knq5f7caw9lf0cdp7kf";
12 };
13
14 buildInputs = [ ncurses ];
15
16 buildPhase = ''
17 ${stdenv.cc}/bin/cc ./ttyplot.c -lncurses -o ttyplot
18 '';
19
20 installPhase = ''
21 mkdir -p $out/bin
22 cp ttyplot $out/bin/
23 '';
24
25 meta = with lib; {
26 description = "A simple general purpose plotting utility for tty with data input from stdin";
27 homepage = "https://github.com/tenox7/ttyplot";
28 license = licenses.unlicense;
29 maintainers = with maintainers; [ lassulus ];
30 };
31}