1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, pythonOlder
5, irctokens
6, pendulum
7, freezegun
8, python
9}:
10
11buildPythonPackage rec {
12 pname = "ircstates";
13 version = "0.12.1";
14 disabled = pythonOlder "3.6"; # f-strings
15
16 src = fetchFromGitHub {
17 owner = "jesopo";
18 repo = pname;
19 rev = "v${version}";
20 hash = "sha256-F9yOY3YBacyoUzNTvPs7pxp6yNx08tiq1jWQKhGiagc=";
21 };
22
23 propagatedBuildInputs = [
24 irctokens
25 pendulum
26 ];
27
28 nativeCheckInputs = [
29 freezegun
30 ];
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}