1{ lib, buildPythonPackage, isPy3k, olm
2, cffi, future, typing }:
3
4buildPythonPackage {
5 pname = "python-olm";
6 inherit (olm) src version;
7
8 sourceRoot = "source/python";
9 buildInputs = [ olm ];
10
11 preBuild = ''
12 make include/olm/olm.h
13 '';
14
15 propagatedBuildInputs = [
16 cffi
17 future
18 ] ++ lib.optionals (!isPy3k) [ typing ];
19
20 # Some required libraries for testing are not packaged yet.
21 doCheck = false;
22 pythonImportsCheck = [ "olm" ];
23
24 meta = {
25 inherit (olm.meta) license maintainers;
26 description = "Python bindings for Olm";
27 homepage = "https://gitlab.matrix.org/matrix-org/olm/tree/master/python";
28 };
29}