about summary refs log tree commit diff
path: root/pkgs/tools/misc/ttygif/default.nix
blob: d9a97f6c2350978793e62f71c62fc0b87365c6be (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
{ lib, stdenv, fetchFromGitHub, makeWrapper, imagemagick, xorg }:

stdenv.mkDerivation rec {
  pname = "ttygif";
  version = "1.6.0";

  src = fetchFromGitHub {
    owner = "icholy";
    repo = pname;
    rev = version;
    sha256 = "sha256-GsMeVR2wNivQguZ6B/0v39Td9VGHg+m3RtAG9DYkNmU=";
  };

  makeFlags = [ "CC:=$(CC)" "PREFIX=${placeholder "out"}" ];

  nativeBuildInputs = [ makeWrapper ];
  postInstall = ''
    wrapProgram $out/bin/ttygif \
      --prefix PATH : ${lib.makeBinPath [ imagemagick xorg.xwd ]}
  '';

  meta = with lib; {
    homepage = "https://github.com/icholy/ttygif";
    description = "Convert terminal recordings to animated gifs";
    platforms = platforms.unix;
    license = licenses.mit;
    maintainers = with maintainers; [ moaxcp ];
  };
}