summary refs log tree commit diff
path: root/pkgs/development/python-modules/pyuv/default.nix
blob: f3209e3bdf218ff03017923756224d2508695ee3 (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
{ lib
, buildPythonPackage
, pythonAtLeast
, fetchFromGitHub
, fetchpatch
, libuv
}:

buildPythonPackage rec {
  pname = "pyuv";
  version = "1.4.0";
  disabled = pythonAtLeast "3.12";

  src = fetchFromGitHub {
    owner = "saghul";
    repo = "pyuv";
    rev = "pyuv-${version}";
    sha256 = "1wiwwdylz66lfsjh6p4iv7pfhzvnhwjk332625njizfhz3gq9fwr";
  };

  patches = [
    (fetchpatch {
      name = "fix-build-with-python3.10.patch";
      url = "https://github.com/saghul/pyuv/commit/8bddcc27052017b5b9cb89c24dbfdf06737b0dd3.patch";
      hash = "sha256-J/3ky64Ff+gYpN3ksFLNuZ5xgPbBkyOl4LTY6fiHAgk=";
    })
    (fetchpatch {
      name = "fix-build-with-python3.11.patch";
      url = "https://github.com/saghul/pyuv/commit/2a3d42d44c6315ebd73899a35118380d2d5979b5.patch";
      hash = "sha256-CQZexd6EjadCB7KyxeZKM24zrD9rXuNv4oA+Tb2nsdw=";
    })
  ];

  setupPyBuildFlags = [ "--use-system-libuv" ];

  buildInputs = [ libuv ];

  doCheck = false; # doesn't work in sandbox

  pythonImportsCheck = [ "pyuv" ];

  meta = with lib; {
    description = "Python interface for libuv";
    homepage = "https://github.com/saghul/pyuv";
    license = licenses.mit;
    maintainers = with maintainers; [ dotlambda ];
  };
}