summary refs log tree commit diff
path: root/pkgs/misc/t-rec
diff options
context:
space:
mode:
authorAna Hobden <operator@hoverbear.org>2021-05-04 07:15:54 -0700
committerAna Hobden <operator@hoverbear.org>2021-05-07 16:10:23 -0700
commitc8d9af9f4a5ebafcccfe67311521ee456bb87599 (patch)
treeda7b64b2a12ff5c17f91a59e0d2777734ad8ac45 /pkgs/misc/t-rec
parentbb80d578e8ad3cb5a607f468ac00cc546d0396dc (diff)
downloadnixpkgs-c8d9af9f4a5ebafcccfe67311521ee456bb87599.tar
nixpkgs-c8d9af9f4a5ebafcccfe67311521ee456bb87599.tar.gz
nixpkgs-c8d9af9f4a5ebafcccfe67311521ee456bb87599.tar.bz2
nixpkgs-c8d9af9f4a5ebafcccfe67311521ee456bb87599.tar.lz
nixpkgs-c8d9af9f4a5ebafcccfe67311521ee456bb87599.tar.xz
nixpkgs-c8d9af9f4a5ebafcccfe67311521ee456bb87599.tar.zst
nixpkgs-c8d9af9f4a5ebafcccfe67311521ee456bb87599.zip
t-rec: init at 0.6.0
Introduce [`t-rec`](https://github.com/sassman/t-rec-rs), a terminal
recorder.

Usage:

```bash
nix run .#t-rec
```

Upon exit, `t-rec` will save recordings of the session to disk in GIF
and MP4.

Signed-off-by: Ana Hobden <operator@hoverbear.org>
Diffstat (limited to 'pkgs/misc/t-rec')
-rw-r--r--pkgs/misc/t-rec/default.nix34
1 files changed, 34 insertions, 0 deletions
diff --git a/pkgs/misc/t-rec/default.nix b/pkgs/misc/t-rec/default.nix
new file mode 100644
index 00000000000..cb8ccc8c6ae
--- /dev/null
+++ b/pkgs/misc/t-rec/default.nix
@@ -0,0 +1,34 @@
+{ lib, imagemagick, ffmpeg, rustPlatform, fetchFromGitHub, makeWrapper }:
+
+let
+  binPath = lib.makeBinPath [
+    imagemagick
+    ffmpeg
+  ];
+in
+rustPlatform.buildRustPackage rec {
+  pname = "t-rec";
+  version = "0.6.0";
+
+  src = fetchFromGitHub {
+    owner = "sassman";
+    repo = "t-rec-rs";
+    rev = "v${version}";
+    sha256 = "InArrBqfhDrsonjmCIPTBVOA/s2vYml9Ay6cdrKLd7c=";
+  };
+
+  buildInputs = [ imagemagick ];
+  nativeBuildInputs = [ makeWrapper ];
+  postInstall = ''
+    wrapProgram "$out/bin/t-rec" --prefix PATH : "${binPath}"
+  '';
+
+  cargoSha256 = "4gwfrC65YlXV6Wu2ninK1TvMNUkY1GstVYPr0FK+xLU=";
+
+  meta = with lib; {
+    description = "Blazingly fast terminal recorder that generates animated gif images for the web written in rust";
+    homepage = "https://github.com/sassman/t-rec-rs";
+    license = with licenses; [ gpl3Only ];
+    maintainers = [ maintainers.hoverbear ];
+  };
+}