1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-02 18:42:15 +00:00
nixpkgs/pkgs/misc/t-rec/default.nix
Ana Hobden c8d9af9f4a 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>
2021-05-07 16:10:23 -07:00

35 lines
897 B
Nix

{ 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 ];
};
}