summaryrefslogtreecommitdiff
path: root/pkgs/tools/misc/fltrdr/default.nix
blob: 1f5884f4fed82ccabd430cf675ebca5b4c3302b9 (plain)
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
{
  lib,
  stdenv,
  fetchFromGitHub,
  cmake,
  icu,
  openssl,
}:

stdenv.mkDerivation rec {
  pname = "fltrdr";
  version = "0.3.1";

  src = fetchFromGitHub {
    repo = "fltrdr";
    owner = "octobanana";
    rev = version;
    sha256 = "1vpci7vqzcpdd21zgigyz38k77r9fc81dmiwsvfr8w7gad5sg6sj";
  };

  nativeBuildInputs = [ cmake ];

  buildInputs = [
    icu
    openssl
  ];

  postPatch = lib.optionalString stdenv.hostPlatform.isDarwin ''
    sed -i '/stdc++fs/d' CMakeLists.txt
  '';

  meta = {
    homepage = "https://octobanana.com/software/fltrdr";
    description = "TUI text reader for the terminal";

    longDescription = ''
      Fltrdr, or flat-reader, is an interactive text reader for the terminal. It
      is flat in the sense that the reader is word-based. It creates a
      horizontal stream of words, ignoring all newline characters and reducing
      extra whitespace. Its purpose is to facilitate reading, scanning, and
      searching text. The program has a play mode that moves the reader forward
      one word at a time, along with a configurable words per minute (WPM),
      setting.
    '';

    platforms = lib.platforms.linux ++ lib.platforms.darwin;
    license = lib.licenses.mit;
    maintainers = [ lib.maintainers.matthiasbeyer ];
    mainProgram = "fltrdr";
  };
}