diff options
Diffstat (limited to 'pkgs/servers/kippo/default.nix')
-rw-r--r-- | pkgs/servers/kippo/default.nix | 50 |
1 files changed, 42 insertions, 8 deletions
diff --git a/pkgs/servers/kippo/default.nix b/pkgs/servers/kippo/default.nix index 30d3fc3ab180..554401438705 100644 --- a/pkgs/servers/kippo/default.nix +++ b/pkgs/servers/kippo/default.nix @@ -25,16 +25,48 @@ # # Use this package at your own risk. -{stdenv, pkgs, config, fetchurl, ... }: +{stdenv, fetchurl, pythonPackages }: -stdenv.mkDerivation rec { +let + + twisted_13 = pythonPackages.buildPythonPackage rec { + # NOTE: When updating please check if new versions still cause issues + # to packages like carbon (http://stackoverflow.com/questions/19894708/cant-start-carbon-12-04-python-error-importerror-cannot-import-name-daem) + disabled = pythonPackages.isPy3k; + + name = "Twisted-13.2.0"; + src = fetchurl { + url = "mirror://pypi/T/Twisted/${name}.tar.bz2"; + sha256 = "1wrcqv5lvgwk2aq83qb2s2ng2vx14hbjjk2gc30cg6h1iiipal89"; + }; + + propagatedBuildInputs = with pythonPackages; [ zope_interface ]; + + # Generate Twisted's plug-in cache. Twited users must do it as well. See + # http://twistedmatrix.com/documents/current/core/howto/plugin.html#auto3 + # and http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=477103 for + # details. + postInstall = "$out/bin/twistd --help > /dev/null"; + + meta = with stdenv.lib; { + homepage = http://twistedmatrix.com/; + description = "Twisted, an event-driven networking engine written in Python"; + longDescription = '' + Twisted is an event-driven networking engine written in Python + and licensed under the MIT license. + ''; + license = licenses.mit; + }; + }; + +in stdenv.mkDerivation rec { name = "kippo-${version}"; version = "0.8"; src = fetchurl { - url = "https://kippo.googlecode.com/files/kippo-${version}.tar.gz"; - sha1 = "f57a5cf88171cb005afe44a4b33cb16f825c33d6"; + url = "https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/kippo/${name}.tar.gz"; + sha256 = "0rd2mk36d02qd24z8s4xyy64fy54rzpar4379iq4dcjwg7l7f63d"; }; - buildInputs = with pkgs.pythonPackages; [ pycrypto pyasn1 twisted ]; + buildInputs = with pythonPackages; [ pycrypto pyasn1 twisted_13 ]; installPhase = '' substituteInPlace ./kippo.tac --replace "kippo.cfg" "$out/src/kippo.cfg" substituteInPlace ./kippo.cfg --replace "log_path = log" "log_path = /var/log/kippo" \ @@ -44,15 +76,17 @@ stdenv.mkDerivation rec { --replace "data_path = data" "data_path = /var/lib/kippo/data" \ --replace "txtcmds_path = txtcmds" "txtcmds_path = /var/lib/kippo/txtcmds" \ --replace "public_key = public.key" "public_key = /var/lib/kippo/keys/public.key" \ - --replace "private_key = private.key" "private_key = /var/lib/kippo/keys/private.key" + --replace "private_key = private.key" "private_key = /var/lib/kippo/keys/private.key" mkdir -p $out/bin mkdir -p $out/src - mv ./* $out/src + mv ./* $out/src mv $out/src/utils/* $out/bin ''; + passthru.twisted = twisted_13; + meta = with stdenv.lib; { - homepage = https://code.google.com/p/kippo; + homepage = https://github.com/desaster/kippo; description = "SSH Honeypot"; longDescription = '' Default port is 2222. Recommend using something like this for port redirection to default SSH port: |