2021-02-24 18:01:39 +00:00
|
|
|
{ lib, buildPythonPackage, isPy3k, olm
|
|
|
|
, cffi, future, typing }:
|
2019-11-15 14:19:31 +00:00
|
|
|
|
|
|
|
buildPythonPackage {
|
|
|
|
pname = "python-olm";
|
|
|
|
inherit (olm) src version;
|
|
|
|
|
2021-02-24 18:01:39 +00:00
|
|
|
sourceRoot = "source/python";
|
2019-11-15 14:19:31 +00:00
|
|
|
buildInputs = [ olm ];
|
|
|
|
|
|
|
|
preBuild = ''
|
|
|
|
make include/olm/olm.h
|
|
|
|
'';
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
cffi
|
|
|
|
future
|
2020-01-13 09:35:05 +00:00
|
|
|
] ++ lib.optionals (!isPy3k) [ typing ];
|
2019-11-15 14:19:31 +00:00
|
|
|
|
2021-02-24 18:01:39 +00:00
|
|
|
# Some required libraries for testing are not packaged yet.
|
2019-11-15 14:19:31 +00:00
|
|
|
doCheck = false;
|
2021-02-24 18:01:39 +00:00
|
|
|
pythonImportsCheck = [ "olm" ];
|
2019-11-15 14:19:31 +00:00
|
|
|
|
2021-02-24 18:01:39 +00:00
|
|
|
meta = {
|
|
|
|
inherit (olm.meta) license maintainers;
|
2019-11-15 14:19:31 +00:00
|
|
|
description = "Python bindings for Olm";
|
|
|
|
homepage = "https://gitlab.matrix.org/matrix-org/olm/tree/master/python";
|
|
|
|
};
|
|
|
|
}
|