2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
pythonOlder,
|
|
|
|
pyyaml,
|
|
|
|
python,
|
2020-11-03 02:18:15 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "irctokens";
|
2023-10-09 19:29:22 +00:00
|
|
|
version = "2.0.2";
|
2024-01-02 11:29:13 +00:00
|
|
|
format = "setuptools";
|
2024-06-05 15:53:02 +00:00
|
|
|
disabled = pythonOlder "3.6"; # f-strings
|
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-Y9NBqxGUkt48hnXxsmfydHkJmWWb+sRrElV8C7l9bpw=";
|
2020-11-03 02:18:15 +00:00
|
|
|
};
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [ pyyaml ];
|
2020-11-03 02:18:15 +00:00
|
|
|
checkPhase = ''
|
|
|
|
${python.interpreter} -m unittest test
|
|
|
|
'';
|
|
|
|
|
|
|
|
pythonImportsCheck = [ "irctokens" ];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "RFC1459 and IRCv3 protocol tokeniser library for python3";
|
|
|
|
license = licenses.mit;
|
|
|
|
homepage = "https://github.com/jesopo/irctokens";
|
|
|
|
maintainers = with maintainers; [ hexa ];
|
|
|
|
};
|
|
|
|
}
|