1{
2 lib,
3 fetchFromGitHub,
4 buildPythonApplication,
5 cacert,
6 setuptools,
7 matrix-nio,
8 python-magic,
9 markdown,
10 pillow,
11 aiofiles,
12 notify2,
13 dbus-python,
14 pyxdg,
15 python-olm,
16 emoji,
17}:
18
19buildPythonApplication rec {
20 pname = "matrix-commander";
21 version = "8.0.4";
22
23 src = fetchFromGitHub {
24 owner = "8go";
25 repo = "matrix-commander";
26 rev = "v${version}";
27 hash = "sha256-JZcdAo6d7huwDQ9hJE8oT5FH0ZQjg0DhoglOkhOyk1o=";
28 };
29
30 format = "pyproject";
31
32 postPatch = ''
33 # Dependencies already bundled with Python
34 sed -i \
35 -e '/uuid/d' \
36 -e '/argparse/d' \
37 -e '/asyncio/d' \
38 -e '/datetime/d' \
39 setup.cfg requirements.txt
40 '';
41
42 propagatedBuildInputs = [
43 cacert
44 setuptools
45 (matrix-nio.override { withOlm = true; })
46 python-magic
47 markdown
48 pillow
49 aiofiles
50 notify2
51 dbus-python
52 pyxdg
53 python-olm
54 emoji
55 ];
56
57 meta = with lib; {
58 description = "Simple but convenient CLI-based Matrix client app for sending and receiving";
59 mainProgram = "matrix-commander";
60 homepage = "https://github.com/8go/matrix-commander";
61 license = licenses.gpl3Plus;
62 platforms = platforms.unix;
63 maintainers = [ maintainers.seb314 ];
64 };
65}