Merge pull request #99521 from mweinelt/irc-stuff
python3Packages.{irctokens,ircstates,ircrobots}: init
This commit is contained in:
commit
5a22c6f167
58
pkgs/development/python-modules/anyio/default.nix
Normal file
58
pkgs/development/python-modules/anyio/default.nix
Normal file
@ -0,0 +1,58 @@
|
|||||||
|
{ lib
|
||||||
|
, buildPythonPackage
|
||||||
|
, fetchFromGitHub
|
||||||
|
, pythonOlder
|
||||||
|
, idna
|
||||||
|
, sniffio
|
||||||
|
, typing-extensions
|
||||||
|
, curio
|
||||||
|
, hypothesis
|
||||||
|
, pytestCheckHook
|
||||||
|
, trio
|
||||||
|
, trustme
|
||||||
|
, uvloop
|
||||||
|
}:
|
||||||
|
|
||||||
|
buildPythonPackage rec {
|
||||||
|
pname = "anyio";
|
||||||
|
version = "2.0.2";
|
||||||
|
format = "pyproject";
|
||||||
|
disabled = pythonOlder "3.7";
|
||||||
|
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "agronholm";
|
||||||
|
repo = pname;
|
||||||
|
rev = version;
|
||||||
|
sha256 = "06nazfrm2sclp3lpgsn9wl8vmqxvx36s3gr2gnqz3zhjpf3glkxv";
|
||||||
|
};
|
||||||
|
|
||||||
|
propagatedBuildInputs = [
|
||||||
|
idna
|
||||||
|
sniffio
|
||||||
|
] ++ lib.optionals (pythonOlder "3.8") [
|
||||||
|
typing-extensions
|
||||||
|
];
|
||||||
|
|
||||||
|
checkInputs = [
|
||||||
|
curio
|
||||||
|
hypothesis
|
||||||
|
pytestCheckHook
|
||||||
|
trio
|
||||||
|
trustme
|
||||||
|
uvloop
|
||||||
|
];
|
||||||
|
|
||||||
|
pytestFlagsArray = [
|
||||||
|
# lots of DNS lookups
|
||||||
|
"--ignore=tests/test_sockets.py"
|
||||||
|
];
|
||||||
|
|
||||||
|
pythonImportsCheck = [ "anyio" ];
|
||||||
|
|
||||||
|
meta = with lib; {
|
||||||
|
description = "High level compatibility layer for multiple asynchronous event loop implementations on Python";
|
||||||
|
homepage = "https://github.com/agronholm/anyio";
|
||||||
|
license = licenses.mit;
|
||||||
|
maintainers = with maintainers; [ hexa ];
|
||||||
|
};
|
||||||
|
}
|
44
pkgs/development/python-modules/async_stagger/default.nix
Normal file
44
pkgs/development/python-modules/async_stagger/default.nix
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
{ lib
|
||||||
|
, buildPythonPackage
|
||||||
|
, fetchPypi
|
||||||
|
, fetchpatch
|
||||||
|
, pythonOlder
|
||||||
|
, pytestCheckHook
|
||||||
|
, pytest-asyncio
|
||||||
|
, pytest-mock
|
||||||
|
}:
|
||||||
|
|
||||||
|
buildPythonPackage rec {
|
||||||
|
pname = "async_stagger";
|
||||||
|
version = "0.3.0";
|
||||||
|
disabled = pythonOlder "3.6";
|
||||||
|
|
||||||
|
src = fetchPypi {
|
||||||
|
inherit pname version;
|
||||||
|
sha256 = "007l54fbk2dfzv3vmqz98m1i37mzxkkva5r4fiwq2pg8nb61fy0w";
|
||||||
|
};
|
||||||
|
|
||||||
|
patches = [
|
||||||
|
(fetchpatch {
|
||||||
|
# Fix test failures on Python 3.8
|
||||||
|
# https://github.com/twisteroidambassador/async_stagger/issues/4
|
||||||
|
url = "https://github.com/twisteroidambassador/async_stagger/commit/736ab20ff9c172628d911f1e6f72420399ec9631.patch";
|
||||||
|
sha256 = "1ygqd9n56sj83lvgmv6nrx3m0sp3646s5k7z697qx43xslixj731";
|
||||||
|
})
|
||||||
|
];
|
||||||
|
|
||||||
|
checkInputs = [
|
||||||
|
pytestCheckHook
|
||||||
|
pytest-asyncio
|
||||||
|
pytest-mock
|
||||||
|
];
|
||||||
|
|
||||||
|
pythonImportsCheck = [ "async_stagger" ];
|
||||||
|
|
||||||
|
meta = with lib; {
|
||||||
|
description = "Happy Eyeballs connection algorithm and underlying scheduling logic in asyncio";
|
||||||
|
homepage = "https://github.com/twisteroidambassador/async_stagger";
|
||||||
|
license = licenses.mit;
|
||||||
|
maintainers = with maintainers; [ hexa ];
|
||||||
|
};
|
||||||
|
}
|
34
pkgs/development/python-modules/asyncio-throttle/default.nix
Normal file
34
pkgs/development/python-modules/asyncio-throttle/default.nix
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
{ lib
|
||||||
|
, buildPythonPackage
|
||||||
|
, fetchFromGitHub
|
||||||
|
, pythonOlder
|
||||||
|
, pytestCheckHook
|
||||||
|
, pytest-asyncio
|
||||||
|
}:
|
||||||
|
|
||||||
|
buildPythonPackage rec {
|
||||||
|
pname = "asyncio-throttle";
|
||||||
|
version = "1.0.1";
|
||||||
|
disabled = pythonOlder "3.6";
|
||||||
|
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "hallazzang";
|
||||||
|
repo = pname;
|
||||||
|
rev = "v${version}";
|
||||||
|
sha256 = "0raqnrnp42cn1c7whbm7ajbgaczx33k6hbxsj30nh998pqxhh4sj";
|
||||||
|
};
|
||||||
|
|
||||||
|
checkInputs = [
|
||||||
|
pytest-asyncio
|
||||||
|
pytestCheckHook
|
||||||
|
];
|
||||||
|
|
||||||
|
pythonImportsCheck = [ "asyncio_throttle" ];
|
||||||
|
|
||||||
|
meta = with lib; {
|
||||||
|
description = "Simple, easy-to-use throttler for asyncio";
|
||||||
|
homepage = "https://github.com/hallazzang/asyncio-throttle";
|
||||||
|
license = licenses.mit;
|
||||||
|
maintainers = with maintainers; [ hexa ];
|
||||||
|
};
|
||||||
|
}
|
52
pkgs/development/python-modules/ircrobots/default.nix
Normal file
52
pkgs/development/python-modules/ircrobots/default.nix
Normal file
@ -0,0 +1,52 @@
|
|||||||
|
{ lib
|
||||||
|
, buildPythonPackage
|
||||||
|
, fetchFromGitHub
|
||||||
|
, pythonOlder
|
||||||
|
, anyio
|
||||||
|
, asyncio-throttle
|
||||||
|
, dataclasses
|
||||||
|
, ircstates
|
||||||
|
, async_stagger
|
||||||
|
, async-timeout
|
||||||
|
, python
|
||||||
|
}:
|
||||||
|
|
||||||
|
buildPythonPackage rec {
|
||||||
|
pname = "ircrobots";
|
||||||
|
version = "0.3.3";
|
||||||
|
disabled = pythonOlder "3.6";
|
||||||
|
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "jesopo";
|
||||||
|
repo = pname;
|
||||||
|
rev = "v${version}";
|
||||||
|
sha256 = "0ykn6ch7aazv2cx13q2gr94arh6f96d8hwjwnrcjai3i3x4q2pkq";
|
||||||
|
};
|
||||||
|
|
||||||
|
patches = [
|
||||||
|
./relax-dependencies.patch
|
||||||
|
];
|
||||||
|
|
||||||
|
propagatedBuildInputs = [
|
||||||
|
anyio
|
||||||
|
asyncio-throttle
|
||||||
|
ircstates
|
||||||
|
async_stagger
|
||||||
|
async-timeout
|
||||||
|
] ++ lib.optionals (pythonOlder "3.7") [
|
||||||
|
dataclasses
|
||||||
|
];
|
||||||
|
|
||||||
|
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 ];
|
||||||
|
};
|
||||||
|
}
|
@ -0,0 +1,14 @@
|
|||||||
|
diff --git a/requirements.txt b/requirements.txt
|
||||||
|
index 87a2d31..4e0efb1 100644
|
||||||
|
--- a/requirements.txt
|
||||||
|
+++ b/requirements.txt
|
||||||
|
@@ -1,6 +1,6 @@
|
||||||
|
-anyio ==1.3.0
|
||||||
|
+anyio
|
||||||
|
asyncio-throttle ==1.0.1
|
||||||
|
-dataclasses ==0.6
|
||||||
|
-ircstates ==0.11.2
|
||||||
|
+dataclasses; python_version < "3.7"
|
||||||
|
+ircstates >=0.11.2
|
||||||
|
async_stagger ==0.3.0
|
||||||
|
async_timeout ==3.0.1
|
48
pkgs/development/python-modules/ircstates/default.nix
Normal file
48
pkgs/development/python-modules/ircstates/default.nix
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
{ lib
|
||||||
|
, buildPythonPackage
|
||||||
|
, fetchFromGitHub
|
||||||
|
, fetchpatch
|
||||||
|
, pythonOlder
|
||||||
|
, irctokens
|
||||||
|
, pendulum
|
||||||
|
, python
|
||||||
|
}:
|
||||||
|
|
||||||
|
buildPythonPackage rec {
|
||||||
|
pname = "ircstates";
|
||||||
|
version = "0.11.3";
|
||||||
|
disabled = pythonOlder "3.6"; # f-strings
|
||||||
|
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "jesopo";
|
||||||
|
repo = pname;
|
||||||
|
rev = "v${version}";
|
||||||
|
sha256 = "1v8r6ma8gzvn5ym3xx9qlb0rc4l67pxr3z8njzk1ffxn1x3mxd3i";
|
||||||
|
};
|
||||||
|
|
||||||
|
patches = [
|
||||||
|
(fetchpatch {
|
||||||
|
name = "relax-pendulum-version.patch";
|
||||||
|
url = "https://github.com/jesopo/ircstates/commit/f51f1b689e592020d1c91ccab6c03927aadb9f94.patch";
|
||||||
|
sha256 = "0qbp3b9hlqbbx7b474q1mcgnzzzwcm4g89x26iqgmlgxzmv3y5xp";
|
||||||
|
})
|
||||||
|
];
|
||||||
|
|
||||||
|
propagatedBuildInputs = [
|
||||||
|
irctokens
|
||||||
|
pendulum
|
||||||
|
];
|
||||||
|
|
||||||
|
checkPhase = ''
|
||||||
|
${python.interpreter} -m unittest test
|
||||||
|
'';
|
||||||
|
|
||||||
|
pythonImportsCheck = [ "ircstates" ];
|
||||||
|
|
||||||
|
meta = with lib; {
|
||||||
|
description = "sans-I/O IRC session state parsing library";
|
||||||
|
license = licenses.mit;
|
||||||
|
homepage = "https://github.com/jesopo/ircstates";
|
||||||
|
maintainers = with maintainers; [ hexa ];
|
||||||
|
};
|
||||||
|
}
|
34
pkgs/development/python-modules/irctokens/default.nix
Normal file
34
pkgs/development/python-modules/irctokens/default.nix
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
{ lib
|
||||||
|
, buildPythonPackage
|
||||||
|
, fetchFromGitHub
|
||||||
|
, pythonOlder
|
||||||
|
, pyyaml
|
||||||
|
, python
|
||||||
|
}:
|
||||||
|
|
||||||
|
buildPythonPackage rec {
|
||||||
|
pname = "irctokens";
|
||||||
|
version = "2.0.0";
|
||||||
|
disabled = pythonOlder "3.6"; # f-strings
|
||||||
|
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "jesopo";
|
||||||
|
repo = pname;
|
||||||
|
rev = "v${version}";
|
||||||
|
sha256 = "0kpxn5paailm4xpdlnzxrhjrfgvvg5pp327wd8kl41a0wbqkj4zb";
|
||||||
|
};
|
||||||
|
|
||||||
|
checkInputs = [ pyyaml ];
|
||||||
|
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 ];
|
||||||
|
};
|
||||||
|
}
|
@ -322,6 +322,8 @@ in {
|
|||||||
|
|
||||||
antlr4-python3-runtime = callPackage ../development/python-modules/antlr4-python3-runtime { antlr4 = pkgs.antlr4; };
|
antlr4-python3-runtime = callPackage ../development/python-modules/antlr4-python3-runtime { antlr4 = pkgs.antlr4; };
|
||||||
|
|
||||||
|
anyio = callPackage ../development/python-modules/anyio { };
|
||||||
|
|
||||||
anyjson = callPackage ../development/python-modules/anyjson { };
|
anyjson = callPackage ../development/python-modules/anyjson { };
|
||||||
|
|
||||||
anytree = callPackage ../development/python-modules/anytree { inherit (pkgs) graphviz; };
|
anytree = callPackage ../development/python-modules/anytree { inherit (pkgs) graphviz; };
|
||||||
@ -426,10 +428,14 @@ in {
|
|||||||
|
|
||||||
async_generator = callPackage ../development/python-modules/async_generator { };
|
async_generator = callPackage ../development/python-modules/async_generator { };
|
||||||
|
|
||||||
|
asyncio-throttle = callPackage ../development/python-modules/asyncio-throttle { };
|
||||||
|
|
||||||
asyncpg = callPackage ../development/python-modules/asyncpg { };
|
asyncpg = callPackage ../development/python-modules/asyncpg { };
|
||||||
|
|
||||||
asyncssh = callPackage ../development/python-modules/asyncssh { };
|
asyncssh = callPackage ../development/python-modules/asyncssh { };
|
||||||
|
|
||||||
|
async_stagger = callPackage ../development/python-modules/async_stagger { };
|
||||||
|
|
||||||
asynctest = callPackage ../development/python-modules/asynctest { };
|
asynctest = callPackage ../development/python-modules/asynctest { };
|
||||||
|
|
||||||
async-timeout = callPackage ../development/python-modules/async_timeout { };
|
async-timeout = callPackage ../development/python-modules/async_timeout { };
|
||||||
@ -2985,6 +2991,12 @@ in {
|
|||||||
|
|
||||||
irc = callPackage ../development/python-modules/irc { };
|
irc = callPackage ../development/python-modules/irc { };
|
||||||
|
|
||||||
|
ircrobots = callPackage ../development/python-modules/ircrobots { };
|
||||||
|
|
||||||
|
ircstates = callPackage ../development/python-modules/ircstates { };
|
||||||
|
|
||||||
|
irctokens = callPackage ../development/python-modules/irctokens { };
|
||||||
|
|
||||||
isbnlib = callPackage ../development/python-modules/isbnlib { };
|
isbnlib = callPackage ../development/python-modules/isbnlib { };
|
||||||
|
|
||||||
islpy = callPackage ../development/python-modules/islpy { };
|
islpy = callPackage ../development/python-modules/islpy { };
|
||||||
|
Loading…
Reference in New Issue
Block a user