Kippo: move pythonPackages.twisted_11 to kippo expression

+40 -37
+3 -3
nixos/modules/services/networking/kippo.nix
··· 54 54 }; 55 55 config = mkIf cfg.enable { 56 56 environment.systemPackages = with pkgs.pythonPackages; [ 57 - python twisted_11 pycrypto pyasn1 ]; 57 + python pkgs.kippo.twisted pycrypto pyasn1 ]; 58 58 59 59 environment.etc."kippo.cfg".text = '' 60 60 # Automatically generated by NixOS. ··· 84 84 description = "Kippo Web Server"; 85 85 after = [ "network.target" ]; 86 86 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/:."; 88 88 preStart = '' 89 89 if [ ! -d ${cfg.varPath}/ ] ; then 90 90 mkdir -p ${cfg.logPath}/tty ··· 107 107 fi 108 108 ''; 109 109 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"; 111 111 serviceConfig.PermissionsStartOnly = true; 112 112 serviceConfig.User = "kippo"; 113 113 serviceConfig.Group = "kippo";
+37 -3
pkgs/servers/kippo/default.nix
··· 25 25 # 26 26 # Use this package at your own risk. 27 27 28 - {stdenv, pkgs, config, fetchurl, ... }: 28 + {stdenv, fetchurl, pythonPackages }: 29 + 30 + let 29 31 30 - stdenv.mkDerivation rec { 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 { 31 63 name = "kippo-${version}"; 32 64 version = "0.8"; 33 65 src = fetchurl { 34 66 url = "https://kippo.googlecode.com/files/kippo-${version}.tar.gz"; 35 67 sha1 = "f57a5cf88171cb005afe44a4b33cb16f825c33d6"; 36 68 }; 37 - buildInputs = with pkgs.pythonPackages; [ pycrypto pyasn1 twisted_11 ]; 69 + buildInputs = with pythonPackages; [ pycrypto pyasn1 twisted_13 ]; 38 70 installPhase = '' 39 71 substituteInPlace ./kippo.tac --replace "kippo.cfg" "$out/src/kippo.cfg" 40 72 substituteInPlace ./kippo.cfg --replace "log_path = log" "log_path = /var/log/kippo" \ ··· 50 82 mv ./* $out/src 51 83 mv $out/src/utils/* $out/bin 52 84 ''; 85 + 86 + passthru.twisted = twisted_13; 53 87 54 88 meta = with stdenv.lib; { 55 89 homepage = https://code.google.com/p/kippo;
-31
pkgs/top-level/python-packages.nix
··· 24975 24975 }; 24976 24976 }; 24977 24977 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 - 25009 24978 twisted = buildPythonPackage rec { 25010 24979 25011 24980 name = "Twisted-${version}";