summary refs log tree commit diff
path: root/pkgs/applications/office/teapot/default.nix
blob: 62a48cebf19b271cff2b29ace1fd09315a33bd72 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
{ lib
, stdenv
, fetchzip
, cmake
, libtirpc
, ncurses
}:

stdenv.mkDerivation rec {
  pname = "teapot";
  version = "2.3.0";

  src = fetchzip {
    name = "${pname}-${version}";
    url = "https://www.syntax-k.de/projekte/teapot/${pname}-${version}.tar.gz";
    sha256 = "sha256-wzAwZwOMeTsuR5LhfjspGdejT6X1V8YJ8B7v9pcbxaY=";
  };

  patches = [
    # include a local file in order to make cc happy
    ./001-fix-warning.patch
    # remove the ENABLE_HELP target entirely - lyx and latex are huge!
    ./002-remove-help.patch
  ];

  nativeBuildInputs = [
    cmake
  ];

  buildInputs = [
    libtirpc
    ncurses
  ];

  # By no known reason libtirpc is not detected
  NIX_CFLAGS_COMPILE = [ "-I${libtirpc.dev}/include/tirpc" ];
  NIX_LDFLAGS = [ "-ltirpc" ];

  cmakeConfigureFlags = [
    "-DENABLE_HELP=OFF"
  ];

  meta = with lib; {
    homepage = "https://www.syntax-k.de/projekte/teapot/";
    description = "Table Editor And Planner, Or: Teapot!";
    longDescription = ''
      Teapot is a compact spreadsheet software originally written by Michael
      Haardt. It features a (n)curses-based text terminal interface, and
      recently also a FLTK-based GUI.

      These days, it may seem pointless having yet another spreadsheet program
      (and one that doesn't even know how to load Microsoft Excel files). Its
      compact size (130k for the ncurses executable, 140k for the GUI
      executable, 300k for the self-contained Windows EXE) and the fact that it
      can run across serial lines and SSH sessions make it an interesting choice
      for embedded applications and as system administration utility, even more
      so since it has a batch processing mode and comes with example code for
      creating graphs from data sets.

      Another interesting feature is its modern approach to spread sheet theory:
      It sports true three-dimensional tables and iterative expressions. And
      since it breaks compatibility with the usual notions of big spreadsheet
      packages, it can also throw old syntactic cruft over board which many
      spreadsheets still inherit from the days of VisiCalc on ancient CP/M
      systems.
    '';
    license = licenses.gpl3Plus;
    maintainers = with maintainers; [ AndersonTorres ];
    platforms = platforms.unix;
  };
}
# TODO: patch/fix FLTK building
# TODO: add documentation from