git.iko.soy/typeable/nixpkgs
on master help sign in
Kippo: move pythonPackages.twisted_11 to kippo expression
commit6f836eb0d4df58bf2823c969a80909ec2aef89bf authorFrederik Rietdijk <fridh@fridh.nl> dateThu 6 Oct 2016, 12:59 (10 years ago) parent2fdda9c
3 files changed+40−37
nixos/modules/services/networking/kippo.nix+3−3 pkgs/servers/kippo/default.nix+37−3 pkgs/top-level/python-packages.nix−31
nixos/modules/services/networking/kippo.nix+3−3
@@ -54,7 +54,7 @@ rec {
5454 };
5555 config = mkIf cfg.enable {
5656 environment.systemPackages = with pkgs.pythonPackages; [
57− python twisted_11 pycrypto pyasn1 ];
57+ python pkgs.kippo.twisted pycrypto pyasn1 ];
5858
5959 environment.etc."kippo.cfg".text = ''
6060 # Automatically generated by NixOS.
@@ -84,7 +84,7 @@ rec {
8484 description = "Kippo Web Server";
8585 after = [ "network.target" ];
8686 wantedBy = [ "multi-user.target" ];
87− environment.PYTHONPATH = "${pkgs.kippo}/src/:${pkgs.pythonPackages.pycrypto}/lib/python2.7/site-packages/:${pkgs.pythonPackages.pyasn1}/lib/python2.7/site-packages/:${pkgs.pythonPackages.python}/lib/python2.7/site-packages/:${pkgs.pythonPackages.twisted_11}/lib/python2.7/site-packages/:.";
87+ environment.PYTHONPATH = "${pkgs.kippo}/src/:${pkgs.pythonPackages.pycrypto}/lib/python2.7/site-packages/:${pkgs.pythonPackages.pyasn1}/lib/python2.7/site-packages/:${pkgs.pythonPackages.python}/lib/python2.7/site-packages/:${pkgs.kippo.twisted}/lib/python2.7/site-packages/:.";
8888 preStart = ''
8989 if [ ! -d ${cfg.varPath}/ ] ; then
9090 mkdir -p ${cfg.logPath}/tty
@@ -107,7 +107,7 @@ rec {
107107 fi
108108 '';
109109
110− serviceConfig.ExecStart = "${pkgs.pythonPackages.twisted_11}/bin/twistd -y ${pkgs.kippo}/src/kippo.tac --syslog --rundir=${cfg.varPath}/ --pidfile=${cfg.pidPath}/kippo.pid --prefix=kippo -n";
110+ serviceConfig.ExecStart = "${pkgs.kippo.twisted/bin/twistd -y ${pkgs.kippo}/src/kippo.tac --syslog --rundir=${cfg.varPath}/ --pidfile=${cfg.pidPath}/kippo.pid --prefix=kippo -n";
111111 serviceConfig.PermissionsStartOnly = true;
112112 serviceConfig.User = "kippo";
113113 serviceConfig.Group = "kippo";
pkgs/servers/kippo/default.nix+37−3
@@ -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";
pkgs/top-level/python-packages.nix−31
@@ -24975,37 +24975,6 @@ in modules // {
2497524975 };
2497624976 };
2497724977
24978− twisted_11 = buildPythonPackage rec {
24979− # NOTE: When updating please check if new versions still cause issues
24980− # to packages like carbon (http://stackoverflow.com/questions/19894708/cant-start-carbon-12-04-python-error-importerror-cannot-import-name-daem)
24981− disabled = isPy3k;
24982−
24983− name = "Twisted-13.2.0";
24984− src = pkgs.fetchurl {
24985− url = "mirror://pypi/T/Twisted/${name}.tar.bz2";
24986− sha256 = "1wrcqv5lvgwk2aq83qb2s2ng2vx14hbjjk2gc30cg6h1iiipal89";
24987− };
24988−
24989− propagatedBuildInputs = with self; [ zope_interface ];
24990−
24991− # Generate Twisted's plug-in cache. Twited users must do it as well. See
24992− # http://twistedmatrix.com/documents/current/core/howto/plugin.html#auto3
24993− # and http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=477103 for
24994− # details.
24995− postInstall = "$out/bin/twistd --help > /dev/null";
24996−
24997− meta = {
24998− homepage = http://twistedmatrix.com/;
24999− description = "Twisted, an event-driven networking engine written in Python";
25000− longDescription = ''
25001− Twisted is an event-driven networking engine written in Python
25002− and licensed under the MIT license.
25003− '';
25004− license = licenses.mit;
25005− maintainers = [ ];
25006− };
25007− };
25008−
2500924978 twisted = buildPythonPackage rec {
2501024979
2501124980 name = "Twisted-${version}";