@@ -25,16 +25,48 @@
2525#
2626# Use this package at your own risk.
2727
28−{stdenv, pkgs, config, fetchurl, ... }:
28+{stdenv, fetchurl, pythonPackages }:
2929
30−stdenv.mkDerivation rec {
30+let
31+
32+ twisted_13 = pythonPackages.buildPythonPackage rec {
33+ # NOTE: When updating please check if new versions still cause issues
34+ # to packages like carbon (http://stackoverflow.com/questions/19894708/cant-start-carbon-12-04-python-error-importerror-cannot-import-name-daem)
35+ disabled = pythonPackages.isPy3k;
36+
37+ name = "Twisted-13.2.0";
38+ src = fetchurl {
39+ url = "mirror://pypi/T/Twisted/${name}.tar.bz2";
40+ sha256 = "1wrcqv5lvgwk2aq83qb2s2ng2vx14hbjjk2gc30cg6h1iiipal89";
41+ };
42+
43+ propagatedBuildInputs = with pythonPackages; [ zope_interface ];
44+
45+ # Generate Twisted's plug-in cache. Twited users must do it as well. See
46+ # http://twistedmatrix.com/documents/current/core/howto/plugin.html#auto3
47+ # and http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=477103 for
48+ # details.
49+ postInstall = "$out/bin/twistd --help > /dev/null";
50+
51+ meta = with stdenv.lib; {
52+ homepage = http://twistedmatrix.com/;
53+ description = "Twisted, an event-driven networking engine written in Python";
54+ longDescription = ''
55+ Twisted is an event-driven networking engine written in Python
56+ and licensed under the MIT license.
57+ '';
58+ license = licenses.mit;
59+ };
60+ };
61+
62+in stdenv.mkDerivation rec {
3163 name = "kippo-${version}";
3264 version = "0.8";
3365 src = fetchurl {
3466 url = "https://kippo.googlecode.com/files/kippo-${version}.tar.gz";
3567 sha1 = "f57a5cf88171cb005afe44a4b33cb16f825c33d6";
3668 };
37− buildInputs = with pkgs.pythonPackages; [ pycrypto pyasn1 twisted_11 ];
69+ buildInputs = with pythonPackages; [ pycrypto pyasn1 twisted_13 ];
3870 installPhase = ''
3971 substituteInPlace ./kippo.tac --replace "kippo.cfg" "$out/src/kippo.cfg"
4072 substituteInPlace ./kippo.cfg --replace "log_path = log" "log_path = /var/log/kippo" \
@@ -51,6 +83,8 @@ stdenv.mkDerivation rec {
5183 mv $out/src/utils/* $out/bin
5284 '';
5385
86+ passthru.twisted = twisted_13;
87+
5488 meta = with stdenv.lib; {
5589 homepage = https://code.google.com/p/kippo;
5690 description = "SSH Honeypot";