2019-09-01 17:11:16 +01:00
|
|
|
{ lib, buildPythonPackage, fetchPypi, pytest, fetchpatch }:
|
2018-03-05 16:17:29 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "h11";
|
2019-06-02 19:00:32 +01:00
|
|
|
version = "0.9.0";
|
2018-03-05 16:17:29 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2019-06-02 19:00:32 +01:00
|
|
|
sha256 = "1qfad70h59hya21vrzz8dqyyaiqhac0anl2dx3s3k80gpskvrm1k";
|
2018-03-05 16:17:29 +00:00
|
|
|
};
|
|
|
|
|
2019-09-01 17:11:16 +01:00
|
|
|
patches = [
|
|
|
|
# pytest5 compatability
|
|
|
|
(fetchpatch {
|
|
|
|
url = https://github.com/python-hyper/h11/commit/241e220493a511a5f5a5d472cb88d72661a92ab1.patch;
|
|
|
|
sha256 = "1s3ipf9s41m1lksws3xv3j133q7jnjdqvmgk4sfnm8q7li2dww39";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2018-12-02 21:17:23 +00:00
|
|
|
checkInputs = [ pytest ];
|
|
|
|
|
|
|
|
checkPhase = ''
|
|
|
|
py.test
|
|
|
|
'';
|
2018-03-05 16:17:29 +00:00
|
|
|
|
2019-09-13 16:43:21 +01:00
|
|
|
# Some of the tests use localhost networking.
|
|
|
|
__darwinAllowLocalNetworking = true;
|
|
|
|
|
2018-03-05 16:17:29 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Pure-Python, bring-your-own-I/O implementation of HTTP/1.1";
|
|
|
|
license = licenses.mit;
|
|
|
|
};
|
|
|
|
}
|