2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
pythonOlder,
|
|
|
|
anyio,
|
|
|
|
asyncio-rlock,
|
|
|
|
asyncio-throttle,
|
|
|
|
ircstates,
|
|
|
|
async-stagger,
|
|
|
|
async-timeout,
|
|
|
|
python,
|
2020-11-03 02:18:15 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "ircrobots";
|
2023-10-09 19:29:22 +00:00
|
|
|
version = "0.6.6";
|
2024-01-02 11:29:13 +00:00
|
|
|
format = "setuptools";
|
2022-12-17 10:02:37 +00:00
|
|
|
disabled = pythonOlder "3.7";
|
2020-11-03 02:18:15 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "jesopo";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2023-10-09 19:29:22 +00:00
|
|
|
hash = "sha256-mIh3tERwHtGH9eA0AT8Lcnwp1Wn9lQhKkUjuZcOXO/c=";
|
2020-11-03 02:18:15 +00:00
|
|
|
};
|
|
|
|
|
2020-11-19 00:13:47 +00:00
|
|
|
postPatch = ''
|
|
|
|
# too specific pins https://github.com/jesopo/ircrobots/issues/3
|
2020-12-03 08:41:04 +00:00
|
|
|
sed -iE 's/anyio.*/anyio/' requirements.txt
|
2020-11-19 00:13:47 +00:00
|
|
|
'';
|
2020-11-03 02:18:15 +00:00
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
anyio
|
2021-12-19 01:06:50 +00:00
|
|
|
asyncio-rlock
|
2020-11-03 02:18:15 +00:00
|
|
|
asyncio-throttle
|
|
|
|
ircstates
|
2023-08-10 07:59:29 +00:00
|
|
|
async-stagger
|
2020-11-03 02:18:15 +00:00
|
|
|
async-timeout
|
|
|
|
];
|
|
|
|
|
|
|
|
checkPhase = ''
|
|
|
|
${python.interpreter} -m unittest test
|
|
|
|
'';
|
|
|
|
|
|
|
|
pythonImportsCheck = [ "ircrobots" ];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Asynchronous bare-bones IRC bot framework for python3";
|
|
|
|
license = licenses.mit;
|
|
|
|
homepage = "https://github.com/jesopo/ircrobots";
|
|
|
|
maintainers = with maintainers; [ hexa ];
|
|
|
|
};
|
|
|
|
}
|