1{ lib
2, stdenv
3, buildPythonPackage
4, fetchFromGitHub
5, pythonOlder
6, cython
7, setuptools-scm
8, pytestCheckHook
9, ApplicationServices
10}:
11
12buildPythonPackage rec {
13 pname = "uharfbuzz";
14 version = "0.37.3";
15 format = "setuptools";
16
17 disabled = pythonOlder "3.5";
18
19 src = fetchFromGitHub {
20 owner = "harfbuzz";
21 repo = "uharfbuzz";
22 rev = "refs/tags/v${version}";
23 fetchSubmodules = true;
24 hash = "sha256-876gFYyMqeGYoXMdBguV6bi7DJKHJs9HNLw9xRu+Mxk=";
25 };
26
27 SETUPTOOLS_SCM_PRETEND_VERSION = version;
28
29 nativeBuildInputs = [
30 cython
31 setuptools-scm
32 ];
33
34 buildInputs = lib.optionals stdenv.isDarwin [ ApplicationServices ];
35
36 nativeCheckInputs = [
37 pytestCheckHook
38 ];
39
40 pythonImportsCheck = [ "uharfbuzz" ];
41
42 meta = with lib; {
43 description = "Streamlined Cython bindings for the harfbuzz shaping engine";
44 homepage = "https://github.com/harfbuzz/uharfbuzz";
45 license = licenses.asl20;
46 maintainers = with maintainers; [ ];
47 };
48}