1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 setuptools,
6 pythonOlder,
7 pytestCheckHook,
8 ujson,
9}:
10
11buildPythonPackage rec {
12 pname = "demoji";
13 version = "1.1.0";
14 pyproject = true;
15
16 disabled = pythonOlder "3.7";
17
18 src = fetchFromGitHub {
19 owner = "bsolomon1124";
20 repo = "demoji";
21 tag = "v${version}";
22 hash = "sha256-ojy4JiM6xvP9J40Z5uFCMUZvZtLZ1le2p/2/NfAUAtk=";
23 };
24
25 postPatch = ''
26 substituteInPlace setup.cfg \
27 --replace-fail "pytest-runner" ""
28 '';
29
30 build-system = [ setuptools ];
31
32 optional-dependencies = {
33 ujson = [ ujson ];
34 };
35
36 nativeCheckInputs = [ pytestCheckHook ];
37
38 pythonImportsCheck = [ "demoji" ];
39
40 meta = with lib; {
41 description = "Module to find/replace/remove emojis in text strings";
42 homepage = "https://github.com/bsolomon1124/demoji";
43 changelog = "https://github.com/bsolomon1124/demoji/blob/${version}/CHANGELOG.md";
44 license = licenses.asl20;
45 maintainers = with maintainers; [ fab ];
46 };
47}