Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 buildPythonPackage, 4 fetchPypi, 5 fetchpatch, 6 pbr, 7 requests, 8 pytestCheckHook, 9 waitress, 10}: 11 12buildPythonPackage rec { 13 pname = "requests-unixsocket"; 14 version = "0.3.0"; 15 format = "setuptools"; 16 17 src = fetchPypi { 18 inherit pname version; 19 hash = "sha256-KDBCg+qTV9Rf/1itWxHkdwjPv1gGgXqlmyo2Mijulx4="; 20 }; 21 22 patches = [ 23 # https://github.com/msabramo/requests-unixsocket/pull/69 24 (fetchpatch { 25 name = "urllib3-2-compatibility.patch"; 26 url = "https://github.com/msabramo/requests-unixsocket/commit/39b9c64847a52ddc8c6d14ff414a6a7a3f6358d9.patch"; 27 hash = "sha256-DFtjhk33JLCu7FW6XI7uf2klNmwzvh2QNwxUb4W223Q="; 28 }) 29 # https://github.com/msabramo/requests-unixsocket/pull/72 30 (fetchpatch { 31 name = "requests-2.32-compatibility.patch"; 32 url = "https://github.com/msabramo/requests-unixsocket/commit/8b02ed531d8def03b4cf767e8a925be09db43dff.patch"; 33 hash = "sha256-rCmdCPGB2gf+aY/AikSCPuzGCYf1GFWcUKraqgS26vc="; 34 }) 35 ]; 36 37 nativeBuildInputs = [ pbr ]; 38 39 propagatedBuildInputs = [ requests ]; 40 41 nativeCheckInputs = [ 42 pytestCheckHook 43 waitress 44 ]; 45 46 pythonImportsCheck = [ "requests_unixsocket" ]; 47 48 meta = with lib; { 49 description = "Use requests to talk HTTP via a UNIX domain socket"; 50 homepage = "https://github.com/msabramo/requests-unixsocket"; 51 license = licenses.asl20; 52 maintainers = with maintainers; [ catern ]; 53 }; 54}