about summary refs log tree commit diff
path: root/pkgs/development/python-modules/python-olm/default.nix
blob: 642af55ed78626e04e97f52a5cb9dc051c73d28f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
{
  buildPythonPackage,
  isPy3k,
  olm,
  cffi,
  future,
  aspectlib,
  pytest-benchmark,
  pytestCheckHook,
}:

buildPythonPackage {
  pname = "python-olm";
  format = "setuptools";
  inherit (olm) src version;

  disabled = !isPy3k;

  sourceRoot = "${olm.src.name}/python";
  buildInputs = [ olm ];

  preBuild = ''
    make include/olm/olm.h
  '';

  propagatedBuildInputs = [
    cffi
    future
  ];

  propagatedNativeBuildInputs = [ cffi ];

  pythonImportsCheck = [ "olm" ];

  nativeCheckInputs = [
    aspectlib
    pytest-benchmark
    pytestCheckHook
  ];

  meta = {
    inherit (olm.meta) license maintainers;
    description = "Python bindings for Olm";
    homepage = "https://gitlab.matrix.org/matrix-org/olm/tree/master/python";
  };
}