From cb82eaffb8c218e13d2b9fb7ab31bf78c1ca63e5 Mon Sep 17 00:00:00 2001 From: Michael Raskin <7c6f434c@mail.ru> Date: Sun, 20 Oct 2013 18:42:53 +0400 Subject: [PATCH] Adding ttysnoop pty redirector --- pkgs/os-specific/linux/ttysnoop/default.nix | 38 +++++++++++++++++++ .../linux/ttysnoop/default.upstream | 3 ++ pkgs/top-level/all-packages.nix | 4 ++ 3 files changed, 45 insertions(+) create mode 100644 pkgs/os-specific/linux/ttysnoop/default.nix create mode 100644 pkgs/os-specific/linux/ttysnoop/default.upstream diff --git a/pkgs/os-specific/linux/ttysnoop/default.nix b/pkgs/os-specific/linux/ttysnoop/default.nix new file mode 100644 index 00000000000..f2bf2bdd31b --- /dev/null +++ b/pkgs/os-specific/linux/ttysnoop/default.nix @@ -0,0 +1,38 @@ +{stdenv, fetchurl}: +let + s = # Generated upstream information + rec { + baseName="ttysnoop"; + version="0.12d.k26"; + name="${baseName}-${version}"; + hash="0jb2zchaiqmmickj0la7wjw3sf9vy65qfhhs11yrzx4mmwkp0395"; + url="http://sysd.org/stas/files/active/0/ttysnoop-0.12d.k26.tar.gz"; + sha256="0jb2zchaiqmmickj0la7wjw3sf9vy65qfhhs11yrzx4mmwkp0395"; + }; + buildInputs = [ + ]; +in +stdenv.mkDerivation { + inherit (s) name version; + inherit buildInputs; + src = fetchurl { + inherit (s) url sha256; + }; + preBuild = '' + sed -e "s@/sbin@$out/sbin@g" -i Makefile + sed -e "s@/usr/man@$out/share/man@g" -i Makefile + mkdir -p "$out/share/man/man8" + mkdir -p "$out/sbin" + ''; + postInstall = '' + mkdir -p "$out/etc" + cp snooptab.dist "$out/etc/snooptab" + ''; + meta = { + inherit (s) version; + description = "A tool to clone input and output of another tty/pty to the current one"; + license = stdenv.lib.licenses.gpl ; + maintainers = [stdenv.lib.maintainers.raskin]; + platforms = stdenv.lib.platforms.linux; + }; +} diff --git a/pkgs/os-specific/linux/ttysnoop/default.upstream b/pkgs/os-specific/linux/ttysnoop/default.upstream new file mode 100644 index 00000000000..905a639c31e --- /dev/null +++ b/pkgs/os-specific/linux/ttysnoop/default.upstream @@ -0,0 +1,3 @@ +url http://sysd.org/stas/node/35 +ensure_choice +version '.*-([0-9a-z.]+)[.]tar[.].*' '\1' diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 5deb63fc8f9..a27dcb9bbee 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -661,6 +661,8 @@ let connect = callPackage ../tools/networking/connect { }; + conspy = callPackage ../os-specific/linux/conspy {}; + convertlit = callPackage ../tools/text/convertlit { }; collectd = callPackage ../tools/system/collectd { }; @@ -1885,6 +1887,8 @@ let ttf2pt1 = callPackage ../tools/misc/ttf2pt1 { }; + ttysnoop = callPackage ../os-specific/linux/ttysnoop {}; + twitterBootstrap = callPackage ../development/web/twitter-bootstrap {}; txt2man = callPackage ../tools/misc/txt2man { };