nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 buildPythonPackage,
4 fetchpatch,
5 fetchPypi,
6 async-timeout,
7 typing-extensions,
8 hiredis,
9 isPyPy,
10}:
11
12buildPythonPackage rec {
13 pname = "aioredis";
14 version = "2.0.1";
15 format = "setuptools";
16
17 src = fetchPypi {
18 inherit pname version;
19 hash = "sha256-6qUar5k/LXH1S3BSfEQEN7plNAWIr+t4bNh8Vcic2Y4=";
20 };
21
22 patches = [
23 # https://github.com/aio-libs-abandoned/aioredis-py/pull/1490
24 (fetchpatch {
25 name = "python-3.11-compatibility.patch";
26 url = "https://github.com/aio-libs-abandoned/aioredis-py/commit/1b951502dc8f149fa66beafeea40c782f1c5c1d3.patch";
27 hash = "sha256-EqkiYktxISg0Rv4ShXOksGvuUyljPxjJsfNOVaaax2o=";
28 includes = [ "aioredis/exceptions.py" ];
29 })
30 ];
31
32 propagatedBuildInputs = [
33 async-timeout
34 typing-extensions
35 ]
36 ++ lib.optional (!isPyPy) hiredis;
37
38 # Wants to run redis-server, hardcoded FHS paths, too much trouble.
39 doCheck = false;
40
41 meta = {
42 description = "Asyncio (PEP 3156) Redis client library";
43 homepage = "https://github.com/aio-libs-abandoned/aioredis-py";
44 license = lib.licenses.mit;
45 maintainers = with lib.maintainers; [ mmai ];
46 };
47}