2021-05-18 19:40:21 +02:00
|
|
|
{ lib, stdenv, imagemagick, ffmpeg, rustPlatform, fetchFromGitHub, makeWrapper
|
|
|
|
, libiconv, Foundation }:
|
2021-05-04 16:15:54 +02:00
|
|
|
|
|
|
|
let
|
|
|
|
binPath = lib.makeBinPath [
|
|
|
|
imagemagick
|
|
|
|
ffmpeg
|
|
|
|
];
|
|
|
|
in
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "t-rec";
|
2022-07-31 04:58:42 +02:00
|
|
|
version = "0.7.4";
|
2021-05-04 16:15:54 +02:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "sassman";
|
|
|
|
repo = "t-rec-rs";
|
|
|
|
rev = "v${version}";
|
2022-07-31 04:58:42 +02:00
|
|
|
sha256 = "sha256-PvC1UaHt0ppGqVgouud/WKsP2CIGg+mbFN9VTiVy1RU=";
|
2021-05-04 16:15:54 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
2021-05-18 19:40:21 +02:00
|
|
|
buildInputs = [ imagemagick ]
|
|
|
|
++ lib.optionals stdenv.isDarwin [ libiconv Foundation ];
|
|
|
|
|
2021-05-04 16:15:54 +02:00
|
|
|
postInstall = ''
|
|
|
|
wrapProgram "$out/bin/t-rec" --prefix PATH : "${binPath}"
|
|
|
|
'';
|
|
|
|
|
2022-07-31 04:58:42 +02:00
|
|
|
cargoSha256 = "sha256-2EMxa39mIRN37U/v9+MMIGFRLOdkFeD+pVqoXU4f0kU=";
|
2021-05-04 16:15:54 +02: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 ];
|
|
|
|
maintainers = [ maintainers.hoverbear ];
|
|
|
|
};
|
|
|
|
}
|