2021-05-18 17:40:21 +00:00
|
|
|
{ lib, stdenv, imagemagick, ffmpeg, rustPlatform, fetchFromGitHub, makeWrapper
|
|
|
|
, libiconv, Foundation }:
|
2021-05-04 14:15:54 +00:00
|
|
|
|
|
|
|
let
|
|
|
|
binPath = lib.makeBinPath [
|
|
|
|
imagemagick
|
|
|
|
ffmpeg
|
|
|
|
];
|
|
|
|
in
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "t-rec";
|
2023-01-31 11:19:04 +00:00
|
|
|
version = "0.7.6";
|
2021-05-04 14:15:54 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "sassman";
|
|
|
|
repo = "t-rec-rs";
|
|
|
|
rev = "v${version}";
|
2023-01-31 11:19:04 +00:00
|
|
|
sha256 = "sha256-o1fO0N65L6Z6W6aBNhS5JqDHIc1MRQx0yECGzVSCsbo=";
|
2021-05-04 14:15:54 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
2021-05-18 17:40:21 +00:00
|
|
|
buildInputs = [ imagemagick ]
|
|
|
|
++ lib.optionals stdenv.hostPlatform.isDarwin [ libiconv Foundation ];
|
|
|
|
|
2021-05-04 14:15:54 +00:00
|
|
|
postInstall = ''
|
|
|
|
wrapProgram "$out/bin/t-rec" --prefix PATH : "${binPath}"
|
|
|
|
'';
|
|
|
|
|
2023-01-31 11:19:04 +00:00
|
|
|
cargoHash = "sha256-3NExPlHNcoYVkpOzWCyd66chJpeDzQLRJUruSLAwGNw=";
|
2021-05-04 14:15:54 +00:00
|
|
|
|
|
|
|
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 ];
|
2023-08-11 22:41:21 +00:00
|
|
|
maintainers = with maintainers; [ hoverbear matthiasbeyer ];
|
2023-11-23 21:09:35 +00:00
|
|
|
mainProgram = "t-rec";
|
2021-05-04 14:15:54 +00:00
|
|
|
};
|
|
|
|
}
|