python.pkgs.twisted: add the tls extras

With setuptools it is possible to define optional sets of packages.
Sometimes packages may require a dependency with such extras. In that
case we could now add e.g. twisted.extras.tls to the
propagatedBuildInputs.
This commit is contained in:
Frederik Rietdijk 2017-08-30 22:05:30 +02:00
parent f1796b8be0
commit 8521ea97a7

View File

@ -1,5 +1,15 @@
{ stdenv, buildPythonPackage, fetchurl, python,
zope_interface, incremental, automat, constantly, hyperlink
{ stdenv
, buildPythonPackage
, fetchurl
, python
, zope_interface
, incremental
, automat
, constantly
, hyperlink
, pyopenssl
, service-identity
, idna
}:
buildPythonPackage rec {
pname = "Twisted";
@ -13,6 +23,8 @@ buildPythonPackage rec {
propagatedBuildInputs = [ zope_interface incremental automat constantly hyperlink ];
passthru.extras.tls = [ pyopenssl service-identity idna ];
# Patch t.p._inotify to point to libc. Without this,
# twisted.python.runtime.platform.supportsINotify() == False
patchPhase = stdenv.lib.optionalString stdenv.isLinux ''