2020-11-03 02:18:15 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, pythonOlder
|
|
|
|
, 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
|
|
|
|
, python
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "ircrobots";
|
2021-12-19 01:06:50 +00:00
|
|
|
version = "0.4.6";
|
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-03-15 16:39:30 +00:00
|
|
|
hash = "sha256-+BrS1+ZkgwT/qvqD0PwRZi2LF+31biS738SzKH1dy7w=";
|
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
|
2021-12-19 01:06:50 +00:00
|
|
|
sed -iE 's/ircstates.*/ircstates/' requirements.txt
|
|
|
|
sed -iE 's/async_timeout.*/async_timeout/' 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 ];
|
|
|
|
};
|
|
|
|
}
|