Change:
<ins> { 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 </ins>

Discussion:
Project description Teapot is an interesting project that implements a compact spreadsheet in roughly 140k, with the following features: UI: Ncurses terminal UI, FLTK windowed GUI, and a batch processing mode all available. Cell Syntax: Cell locations represented as lists of coordinates. Eg, instead of "B1" or "R1C2", cells are referenced as " Three Dimensions: This 3-coordinate style adds a third dimension to the spreadsheet, reducing the need for hiding columns or rows of intermediate results as is sometimes the case in traditional spreadsheets, among other things. Relative References: This also enables both relative cell and relative formula references that make refactoring the spreadsheet easier. Type-Safety: All values have a type, and all operations and formulas check types. No more adding a float to a string and getting a (probably undesirable) result. Iterative Expressions: Modeled on clocked expressions, these solve problems with circular dependencies in traditional spreadsheets and effectively make teapot Turing-complete. Platform-Independent File format: Defined by XDR and portable across machines, especially floating point representation that may differ across platforms Legacy File format support: Portable ASCII file format, standard CSV, SpreadsheetCalculator SC and Lotus 1-2-3 WK1 format. Extensibility: Easily extended by new functions in C. Internationalization: Can be internationalized and comes with English, Dutch, German and Polish message catalogs. Interoperability: Interfaces to troff/tbl, LATEX, HTML and CSV which are well-suited for further processing, be it graphing, typesetting, accounting or anything else. Metadata homepage URL: source URL: (bottom of page) license: GPL3 platforms: unix, linux, darwin
I tried to build this from source, but I'm getting an issue with it. Here is what I did so far, in case someone wants to try it: I am going to try with the deb and see if it works.
I got the deb working successfully (even created a desktop entry for the GUI client, although no icon). I'm going to keep trying with the source today (it is an issue regarding mbslen not being recognized), but if I can't get that, then I will post the working one.
is just a warning, it can be fixed with a simple patch.

The more serious problems are compiling with FLTK support and build the docs. Maybe more patches are needed. (On the other hand, it can be useful to package the already-given binary targz.)