about summary refs log tree commit diff
path: root/pkgs/development/python-modules/python-olm/default.nix
blob: d38c33df8c81fa1394db395e4f5d6bd3a10d4adb (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
{ lib, buildPythonPackage, isPy3k, olm
, cffi, future, typing }:

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

  sourceRoot = "source/python";
  buildInputs = [ olm ];

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

  propagatedBuildInputs = [
    cffi
    future
  ] ++ lib.optionals (!isPy3k) [ typing ];

  propagatedNativeBuildInputs = [
    cffi
  ];

  # Some required libraries for testing are not packaged yet.
  doCheck = false;
  pythonImportsCheck = [ "olm" ];

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