summary refs log tree commit diff
path: root/pkgs/development/python-modules/aionotify/default.nix
blob: 0483793c7bb00a261e2f6475890b43a0047648d0 (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
{ lib
, buildPythonPackage
, fetchFromGitHub
, asynctest
, pythonOlder
}:

buildPythonPackage rec {
  pname = "aionotify";
  version = "0.2.0";

  src = fetchFromGitHub {
    owner = "rbarrois";
    repo = "aionotify";
    rev = "v${version}";
    sha256 = "1sk9i8czxgsbrswsf1nlb4c82vgnlzi8zrvrxdip92w2z8hqh43y";
  };

  disabled = pythonOlder "3.5";

  preCheck = ''
    substituteInPlace tests/test_usage.py \
      --replace "asyncio.wait_for(task, timeout, loop=self.loop)" "asyncio.wait_for(task, timeout)"
  '';

  nativeCheckInputs = [
    asynctest
  ];

  meta = with lib; {
    homepage = "https://github.com/rbarrois/aionotify";
    description = "Simple, asyncio-based inotify library for Python";
    license = with lib.licenses; [ bsd2 ];
    platforms = platforms.linux;
    maintainers = with lib.maintainers; [ ];
  };
}