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.24.1";
15 format = "setuptools";
16
17 disabled = pythonOlder "3.5";
18
19 # Fetching from GitHub as Pypi contains different versions
20 src = fetchFromGitHub {
21 owner = "harfbuzz";
22 repo = "uharfbuzz";
23 rev = "v${version}";
24 sha256 = "sha256-DyFXbwB28JH2lvmWDezRh49tjCvleviUNSE5LHG3kUg=";
25 fetchSubmodules = true;
26 };
27
28 SETUPTOOLS_SCM_PRETEND_VERSION = version;
29
30 nativeBuildInputs = [
31 cython
32 setuptools-scm
33 ];
34
35 buildInputs = lib.optionals stdenv.isDarwin [ ApplicationServices ];
36
37 checkInputs = [
38 pytestCheckHook
39 ];
40
41 pythonImportsCheck = [ "uharfbuzz" ];
42
43 meta = with lib; {
44 description = "Streamlined Cython bindings for the harfbuzz shaping engine";
45 homepage = "https://github.com/harfbuzz/uharfbuzz";
46 license = licenses.asl20;
47 maintainers = with maintainers; [ wolfangaukang ];
48 };
49}