From 3913d03890aa56a2c16e3936ae7340aef48f7da1 Mon Sep 17 00:00:00 2001
From: "William A. Kennington III" <william@wkennington.com>
Date: Fri, 8 May 2015 16:40:45 -0700
Subject: [PATCH] ttylog: Add derivation

---
 pkgs/tools/misc/ttylog/default.nix | 20 ++++++++++++++++++++
 pkgs/top-level/all-packages.nix    |  2 ++
 2 files changed, 22 insertions(+)
 create mode 100644 pkgs/tools/misc/ttylog/default.nix

diff --git a/pkgs/tools/misc/ttylog/default.nix b/pkgs/tools/misc/ttylog/default.nix
new file mode 100644
index 00000000000..1c90bb842d6
--- /dev/null
+++ b/pkgs/tools/misc/ttylog/default.nix
@@ -0,0 +1,20 @@
+{ stdenv, fetchurl, cmake }:
+
+stdenv.mkDerivation rec {
+  name = "ttylog-0.25";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/ttylog/${name}.tar.gz";
+    sha256 = "0546mj5gcxi7idvfw82p8qw27lk7wsk6j4b6zw7nb6z2wi517l40";
+  };
+
+  nativeBuildInputs = [ cmake ];
+
+  meta = with stdenv.lib; {
+    homepage = "http://ttylog.sourceforg.net";
+    description = "a serial port logger which can be used to print everything to stdout that comes from a serial device";
+    license = licenses.gpl2;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ wkennington ];
+  };
+}
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index 907b97d8d85..24c28c46f35 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -2989,6 +2989,8 @@ let
 
   ttysnoop = callPackage ../os-specific/linux/ttysnoop {};
 
+  ttylog = callPackage ../tools/misc/ttylog { };
+
   twitterBootstrap = callPackage ../development/web/twitter-bootstrap {};
 
   txt2man = callPackage ../tools/misc/txt2man { };