about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/aiohttp-fast-url-dispatcher/default.nix
blob: 905705c992dd1710a5edc7ddb10254a1769f7daa (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
{ lib
, aiohttp
, buildPythonPackage
, fetchFromGitHub
, poetry-core
, pytest-asyncio
, pytestCheckHook
, pythonOlder
}:

buildPythonPackage rec {
  pname = "aiohttp-fast-url-dispatcher";
  version = "0.3.0";
  pyproject = true;

  disabled = pythonOlder "3.8";

  src = fetchFromGitHub {
    owner = "bdraco";
    repo = "aiohttp-fast-url-dispatcher";
    rev = "refs/tags/v${version}";
    hash = "sha256-DZTW9CazcUY3hyxr0MbVfM/yJzUzwN43c2n07Sloxa8=";
  };

  postPatch = ''
    substituteInPlace pyproject.toml \
      --replace " --cov=aiohttp_fast_url_dispatcher --cov-report=term-missing:skip-covered" ""
  '';

  nativeBuildInputs = [
    poetry-core
  ];

  propagatedBuildInputs = [
    aiohttp
  ];

  nativeCheckInputs = [
    pytest-asyncio
    pytestCheckHook
  ];

  pythonImportsCheck = [
    "aiohttp_fast_url_dispatcher"
  ];

  meta = with lib; {
    description = "A faster URL dispatcher for aiohttp";
    homepage = "https://github.com/bdraco/aiohttp-fast-url-dispatcher";
    changelog = "https://github.com/bdraco/aiohttp-fast-url-dispatcher/blob/${version}/CHANGELOG.md";
    license = licenses.asl20;
    maintainers = with maintainers; [ fab ];
  };
}