2021-02-05 17:12:51 +00:00
|
|
|
{ lib
|
2020-04-24 23:36:52 +00:00
|
|
|
, buildPythonPackage
|
2022-04-15 01:41:22 +00:00
|
|
|
, pythonAtLeast
|
2021-03-09 03:18:52 +00:00
|
|
|
, fetchFromGitHub
|
2022-07-14 12:49:19 +00:00
|
|
|
, fetchpatch
|
2021-03-09 03:18:52 +00:00
|
|
|
, libuv
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pyuv";
|
2021-03-09 03:18:52 +00:00
|
|
|
version = "1.4.0";
|
2023-10-19 13:55:26 +00:00
|
|
|
disabled = pythonAtLeast "3.12";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-03-09 03:18:52 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "saghul";
|
|
|
|
repo = "pyuv";
|
|
|
|
rev = "pyuv-${version}";
|
|
|
|
sha256 = "1wiwwdylz66lfsjh6p4iv7pfhzvnhwjk332625njizfhz3gq9fwr";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-07-14 12:49:19 +00:00
|
|
|
patches = [
|
|
|
|
(fetchpatch {
|
|
|
|
name = "fix-build-with-python3.10.patch";
|
|
|
|
url = "https://github.com/saghul/pyuv/commit/8bddcc27052017b5b9cb89c24dbfdf06737b0dd3.patch";
|
2023-03-15 16:39:30 +00:00
|
|
|
hash = "sha256-J/3ky64Ff+gYpN3ksFLNuZ5xgPbBkyOl4LTY6fiHAgk=";
|
2022-07-14 12:49:19 +00:00
|
|
|
})
|
2023-10-19 13:55:26 +00:00
|
|
|
(fetchpatch {
|
|
|
|
name = "fix-build-with-python3.11.patch";
|
|
|
|
url = "https://github.com/saghul/pyuv/commit/2a3d42d44c6315ebd73899a35118380d2d5979b5.patch";
|
|
|
|
hash = "sha256-CQZexd6EjadCB7KyxeZKM24zrD9rXuNv4oA+Tb2nsdw=";
|
|
|
|
})
|
2022-07-14 12:49:19 +00:00
|
|
|
];
|
|
|
|
|
2021-03-09 03:18:52 +00:00
|
|
|
setupPyBuildFlags = [ "--use-system-libuv" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-03-09 03:18:52 +00:00
|
|
|
buildInputs = [ libuv ];
|
|
|
|
|
|
|
|
doCheck = false; # doesn't work in sandbox
|
|
|
|
|
|
|
|
pythonImportsCheck = [ "pyuv" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Python interface for libuv";
|
|
|
|
homepage = "https://github.com/saghul/pyuv";
|
|
|
|
license = licenses.mit;
|
2021-03-09 03:18:52 +00:00
|
|
|
maintainers = with maintainers; [ dotlambda ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|