about summary refs log tree commit diff
path: root/nixpkgs/pkgs/tools/text/hottext/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/tools/text/hottext/default.nix')
-rw-r--r--nixpkgs/pkgs/tools/text/hottext/default.nix46
1 files changed, 46 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/tools/text/hottext/default.nix b/nixpkgs/pkgs/tools/text/hottext/default.nix
new file mode 100644
index 000000000000..6fe7a686c100
--- /dev/null
+++ b/nixpkgs/pkgs/tools/text/hottext/default.nix
@@ -0,0 +1,46 @@
+{ lib, nimPackages, fetchurl, gentium, makeDesktopItem }:
+
+nimPackages.buildNimPackage rec {
+  pname = "hottext";
+  version = "1.4";
+
+  nimBinOnly = true;
+
+  src = fetchurl {
+    url = "https://git.sr.ht/~ehmry/hottext/archive/v${version}.tar.gz";
+    sha256 = "sha256-hIUofi81zowSMbt1lUsxCnVzfJGN3FEiTtN8CEFpwzY=";
+  };
+
+  buildInputs = with nimPackages; [
+    bumpy
+    chroma
+    flatty
+    nimsimd
+    pixie
+    sdl2
+    typography
+    vmath
+    zippy
+  ];
+
+  HOTTEXT_FONT_PATH = "${gentium}/share/fonts/truetype/GentiumPlus-Regular.ttf";
+
+  desktopItem = makeDesktopItem {
+    categories = "Utility;";
+    comment = meta.description;
+    desktopName = pname;
+    exec = pname;
+    name = pname;
+  };
+
+  postInstall = ''
+    cp -r $desktopItem/* $out
+  '';
+
+  meta = with lib; {
+    description = "Simple RSVP speed-reading utility";
+    license = licenses.unlicense;
+    homepage = "https://git.sr.ht/~ehmry/hottext";
+    maintainers = with maintainers; [ ehmry ];
+  };
+}