2024-12-12 14:41:43 +01:00
|
|
|
# SPDX-FileCopyrightText: 2024 Ryan Lahfa <ryan.lahfa@dgnum.eu>
|
|
|
|
#
|
|
|
|
# SPDX-License-Identifier: EUPL-1.2
|
|
|
|
|
2024-09-20 20:40:08 +02:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitea,
|
|
|
|
pythonOlder,
|
|
|
|
anyio,
|
|
|
|
asyncio-rlock,
|
|
|
|
asyncio-throttle,
|
|
|
|
ircstates,
|
|
|
|
async-stagger,
|
|
|
|
async-timeout,
|
|
|
|
python,
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "ircrobots";
|
|
|
|
version = "0.7.0";
|
|
|
|
format = "setuptools";
|
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
|
|
|
|
src = fetchFromGitea {
|
|
|
|
domain = "git.dgnum.eu";
|
|
|
|
owner = "DGNum";
|
|
|
|
repo = pname;
|
|
|
|
# No tag yet :(.
|
|
|
|
rev = "63aa84b40450bd534fc232eee10e8088028c9f6d";
|
|
|
|
hash = "sha256-gXiPy6wjPEtc9v0cG0lb2QVXDlU5Q8ncxJO0lBm2RSE=";
|
|
|
|
};
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
# too specific pins https://github.com/jesopo/ircrobots/issues/3
|
|
|
|
sed -iE 's/anyio.*/anyio/' requirements.txt
|
|
|
|
'';
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
anyio
|
|
|
|
asyncio-rlock
|
|
|
|
asyncio-throttle
|
|
|
|
ircstates
|
|
|
|
async-stagger
|
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|