Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / python-modules / pyuv / default.nix
blobf3209e3bdf218ff03017923756224d2508695ee3
1 { lib
2 , buildPythonPackage
3 , pythonAtLeast
4 , fetchFromGitHub
5 , fetchpatch
6 , libuv
7 }:
9 buildPythonPackage rec {
10   pname = "pyuv";
11   version = "1.4.0";
12   disabled = pythonAtLeast "3.12";
14   src = fetchFromGitHub {
15     owner = "saghul";
16     repo = "pyuv";
17     rev = "pyuv-${version}";
18     sha256 = "1wiwwdylz66lfsjh6p4iv7pfhzvnhwjk332625njizfhz3gq9fwr";
19   };
21   patches = [
22     (fetchpatch {
23       name = "fix-build-with-python3.10.patch";
24       url = "https://github.com/saghul/pyuv/commit/8bddcc27052017b5b9cb89c24dbfdf06737b0dd3.patch";
25       hash = "sha256-J/3ky64Ff+gYpN3ksFLNuZ5xgPbBkyOl4LTY6fiHAgk=";
26     })
27     (fetchpatch {
28       name = "fix-build-with-python3.11.patch";
29       url = "https://github.com/saghul/pyuv/commit/2a3d42d44c6315ebd73899a35118380d2d5979b5.patch";
30       hash = "sha256-CQZexd6EjadCB7KyxeZKM24zrD9rXuNv4oA+Tb2nsdw=";
31     })
32   ];
34   setupPyBuildFlags = [ "--use-system-libuv" ];
36   buildInputs = [ libuv ];
38   doCheck = false; # doesn't work in sandbox
40   pythonImportsCheck = [ "pyuv" ];
42   meta = with lib; {
43     description = "Python interface for libuv";
44     homepage = "https://github.com/saghul/pyuv";
45     license = licenses.mit;
46     maintainers = with maintainers; [ dotlambda ];
47   };