about summary refs log tree commit diff
path: root/pkgs/development/python-modules/aiorun/default.nix
blob: 1d181dc7cf4fd7f9f75b38283d9d39a2a5c70daf (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
55
56
57
58
59
60
61
62
63
{ lib
, buildPythonPackage
, fetchFromGitHub
, pythonOlder
, fetchpatch
, flit-core
, pygments
, pytestCheckHook
, uvloop
}:

buildPythonPackage rec {
  pname = "aiorun";
  version = "2023.7.2";
  pyproject = true;

  disabled = pythonOlder "3.7";

  src = fetchFromGitHub {
    owner = "cjrh";
    repo = "aiorun";
    rev = "refs/tags/v${version}";
    hash = "sha256-3AGsT8IUNi5SZHBsBfd7akj8eQ+xb0mrR7ydIr3T8gs=";
  };

  patches = [
    # Raise flit-core version constrains
    (fetchpatch { # https://github.com/cjrh/aiorun/pull/85
      url = "https://github.com/cjrh/aiorun/commit/a0c027ea331167712738e35ca70fefcd794e16d5.patch";
      hash = "sha256-M1rcrkdFcoFa3IncPnJaRhnXbelyk56QnMGtmgB6bvk=";
    })
  ];

  build-system = [
    flit-core
  ];

  dependencies = [
    pygments
  ];

  nativeCheckInputs = [
    pytestCheckHook
    uvloop
  ];

  # allow for writable directory for darwin
  preBuild = ''
    export HOME=$TMPDIR
  '';

  pythonImportsCheck = [
    "aiorun"
  ];

  meta = with lib; {
    description = "Boilerplate for asyncio applications";
    homepage = "https://github.com/cjrh/aiorun";
    changelog = "https://github.com/cjrh/aiorun/blob/v${version}/CHANGES";
    license = licenses.asl20;
    maintainers = with maintainers; [ ];
  };
}