1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 pythonOlder,
6 irctokens,
7 pendulum,
8 freezegun,
9 python,
10}:
11
12buildPythonPackage rec {
13 pname = "ircstates";
14 version = "0.12.1";
15 format = "setuptools";
16 disabled = pythonOlder "3.6"; # f-strings
17
18 src = fetchFromGitHub {
19 owner = "jesopo";
20 repo = pname;
21 rev = "v${version}";
22 hash = "sha256-F9yOY3YBacyoUzNTvPs7pxp6yNx08tiq1jWQKhGiagc=";
23 };
24
25 propagatedBuildInputs = [
26 irctokens
27 pendulum
28 ];
29
30 nativeCheckInputs = [ freezegun ];
31
32 checkPhase = ''
33 ${python.interpreter} -m unittest test
34 '';
35
36 pythonImportsCheck = [ "ircstates" ];
37
38 meta = with lib; {
39 description = "sans-I/O IRC session state parsing library";
40 license = licenses.mit;
41 homepage = "https://github.com/jesopo/ircstates";
42 maintainers = with maintainers; [ hexa ];
43 };
44}