1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 pytest,
6 pythonOlder,
7}:
8
9buildPythonPackage rec {
10 pname = "mutf8";
11 version = "1.0.6";
12 format = "setuptools";
13
14 disabled = pythonOlder "3.6";
15
16 src = fetchFromGitHub {
17 owner = "TkTech";
18 repo = "mutf8";
19 rev = "v${version}";
20 hash = "sha256-4Ojn3t0EbOVdrYEiY8JegJuvW9sz8jt9tKFwOluiGQo=";
21 };
22
23 nativeCheckInputs = [ pytest ];
24
25 checkPhase = ''
26 # Using pytestCheckHook results in test failures
27 pytest
28 '';
29
30 pythonImportsCheck = [ "mutf8" ];
31
32 meta = with lib; {
33 description = "Fast MUTF-8 encoder & decoder";
34 homepage = "https://github.com/TkTech/mutf8";
35 license = licenses.mit;
36 maintainers = with maintainers; [ fab ];
37 };
38}