summary refs log tree commit diff
path: root/pkgs/tools/misc/ttyrec/default.nix
blob: c7cd71ffb6d79c1dd641952b682a32e8e4626211 (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
30
{ stdenv, fetchurl, buildPlatform }:

stdenv.mkDerivation rec {
  name = "ttyrec-${version}";
  version = "1.0.8";

  src = fetchurl {
    url = "http://0xcc.net/ttyrec/${name}.tar.gz";
    sha256 = "ef5e9bf276b65bb831f9c2554cd8784bd5b4ee65353808f82b7e2aef851587ec";
  };

  patches = [ ./clang-fixes.patch ];

  makeFlags = stdenv.lib.optional buildPlatform.isLinux "CFLAGS=-DSVR4"
    ++ stdenv.lib.optional stdenv.cc.isClang "CC=clang";

  installPhase = ''
    mkdir -p $out/{bin,man}
    cp ttytime ttyplay ttyrec $out/bin
    cp *.1 $out/man
  '';

  meta = with stdenv.lib; {
    homepage = http://0xcc.net/ttyrec/;
    description = "Terminal interaction recorder and player";
    license = licenses.bsd3;
    platforms = platforms.all;
    maintainers = with maintainers; [ zimbatm ];
  };
}