diff --git a/pkgs/tools/misc/ovh-ttyrec/default.nix b/pkgs/tools/misc/ovh-ttyrec/default.nix new file mode 100644 index 000000000000..5601509726a3 --- /dev/null +++ b/pkgs/tools/misc/ovh-ttyrec/default.nix @@ -0,0 +1,29 @@ +{ stdenv, fetchFromGitHub, zstd }: + +stdenv.mkDerivation rec { + pname = "ovh-ttyrec"; + version = "1.1.6.6"; + + src = fetchFromGitHub { + owner = "ovh"; + repo = "ovh-ttyrec"; + rev = "v${version}"; + sha256 = "176g3k2pzw6zpvmcc2f8idn6vhlygf7lfzxvrhysav2izc5dd130"; + }; + + nativeBuildInputs = [ zstd ]; + + installPhase = '' + mkdir -p $out/{bin,man} + cp ttytime ttyplay ttyrec $out/bin + cp docs/*.1 $out/man + ''; + + meta = with stdenv.lib; { + homepage = "https://github.com/ovh/ovh-ttyrec/"; + description = "Terminal interaction recorder and player"; + license = licenses.bsd3; + platforms = platforms.all; + maintainers = with maintainers; [ chaduffy zimbatm ]; + }; +} diff --git a/pkgs/tools/misc/ttyrec/clang-fixes.patch b/pkgs/tools/misc/ttyrec/clang-fixes.patch deleted file mode 100644 index 126ab44090eb..000000000000 --- a/pkgs/tools/misc/ttyrec/clang-fixes.patch +++ /dev/null @@ -1,21 +0,0 @@ -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 deleted file mode 100644 index 97049276a32d..000000000000 --- a/pkgs/tools/misc/ttyrec/default.nix +++ /dev/null @@ -1,31 +0,0 @@ -{ stdenv, fetchurl }: - -stdenv.mkDerivation rec { - pname = "ttyrec"; - version = "1.0.8"; - - src = fetchurl { - url = "http://0xcc.net/ttyrec/${pname}-${version}.tar.gz"; - sha256 = "ef5e9bf276b65bb831f9c2554cd8784bd5b4ee65353808f82b7e2aef851587ec"; - }; - - patches = [ ./clang-fixes.patch ]; - - makeFlags = stdenv.lib.optional stdenv.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 ]; - broken = true; # 2020-01-28 - }; -} diff --git a/pkgs/top-level/aliases.nix b/pkgs/top-level/aliases.nix index 6e5da1bf34ec..6f95da017edd 100644 --- a/pkgs/top-level/aliases.nix +++ b/pkgs/top-level/aliases.nix @@ -798,6 +798,9 @@ mapAliases ({ ant-dracula-theme = throw "ant-dracula-theme is now dracula-theme, and theme name is Dracula instead of Ant-Dracula."; + /* Added 2021-01-02 */ + ttyrec = ovh-ttyrec; + /* If these are in the scope of all-packages.nix, they cause collisions between mixed versions of qt. See: https://github.com/NixOS/nixpkgs/pull/101369 */ diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 06c84a162217..62a7cd003fbd 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -6438,6 +6438,8 @@ in overmind = callPackage ../applications/misc/overmind { }; + ovh-ttyrec = callPackage ../tools/misc/ovh-ttyrec { }; + owncloud-client = libsForQt514.callPackage ../applications/networking/owncloud-client { }; oxidized = callPackage ../tools/admin/oxidized { }; @@ -7967,8 +7969,6 @@ in ttyplot = callPackage ../tools/misc/ttyplot { }; - ttyrec = callPackage ../tools/misc/ttyrec { }; - ttygif = callPackage ../tools/misc/ttygif { }; ttylog = callPackage ../tools/misc/ttylog { };