diff --git a/pkgs/tools/misc/ttyrec/clang-fixes.patch b/pkgs/tools/misc/ttyrec/clang-fixes.patch new file mode 100644 index 000000000000..126ab44090eb --- /dev/null +++ b/pkgs/tools/misc/ttyrec/clang-fixes.patch @@ -0,0 +1,21 @@ +diff -ru ttyrec-1.0.8.orig/io.h ttyrec-1.0.8/io.h +--- ttyrec-1.0.8.orig/io.h 2006-06-11 17:52:50.000000000 +0200 ++++ ttyrec-1.0.8/io.h 2015-11-15 09:59:54.000000000 +0100 +@@ -9,5 +9,6 @@ + int edup (int oldfd); + int edup2 (int oldfd, int newfd); + FILE* efdopen (int fd, const char *mode); ++void set_progname (const char *name); + + #endif +diff -ru ttyrec-1.0.8.orig/ttyrec.c ttyrec-1.0.8/ttyrec.c +--- ttyrec-1.0.8.orig/ttyrec.c 2006-06-11 17:52:50.000000000 +0200 ++++ ttyrec-1.0.8/ttyrec.c 2015-11-15 09:59:41.000000000 +0100 +@@ -54,6 +54,7 @@ + #include + #include + #include ++#include + + #if defined(SVR4) + #include diff --git a/pkgs/tools/misc/ttyrec/default.nix b/pkgs/tools/misc/ttyrec/default.nix new file mode 100644 index 000000000000..63b91adb4936 --- /dev/null +++ b/pkgs/tools/misc/ttyrec/default.nix @@ -0,0 +1,30 @@ +{ stdenv, fetchurl }: + +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 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 ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index dc912375cbc8..274541b717bd 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -3248,6 +3248,8 @@ let tty-clock = callPackage ../tools/misc/tty-clock { }; + ttyrec = callPackage ../tools/misc/ttyrec { }; + ttysnoop = callPackage ../os-specific/linux/ttysnoop {}; ttylog = callPackage ../tools/misc/ttylog { };