1{ lib
2, stdenv
3, fetchFromGitHub
4, pkg-config
5, libtool
6, perl
7, libtermkey
8, unibilium
9}:
10let
11 version = "0.4.3";
12in
13stdenv.mkDerivation {
14 pname = "libtickit";
15 inherit version;
16
17 src = fetchFromGitHub {
18 owner = "leonerd";
19 repo = "libtickit";
20 rev = "v${version}";
21 hash = "sha256-QCrym8g5J1qwsFpU/PB8zZIWdM3YzOySknISSbQE4Sc=";
22 };
23
24 patches = [
25 # Disabled on darwin, since test assumes TERM=linux
26 ./001-skip-test-18term-builder-on-macos.patch
27 ];
28
29 nativeBuildInputs = [
30 pkg-config
31 libtool
32 ];
33
34 buildInputs = [
35 libtermkey
36 unibilium
37 ];
38
39 nativeCheckInputs = [ perl ];
40
41 makeFlags = [
42 "LIBTOOL=${lib.getExe libtool}"
43 ];
44
45 installFlags = [
46 "PREFIX=${placeholder "out"}"
47 ];
48
49 enableParallelBuilding = true;
50
51 doCheck = true;
52
53 meta = with lib; {
54 description = "A terminal interface construction kit";
55 longDescription = ''
56 This library provides an abstracted mechanism for building interactive full-screen terminal
57 programs. It provides a full set of output drawing functions, and handles keyboard and mouse
58 input events.
59 '';
60 homepage = "https://www.leonerd.org.uk/code/libtickit/";
61 license = licenses.mit;
62 maintainers = with maintainers; [ onemoresuza ];
63 platforms = platforms.unix;
64 };
65}