summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/demoji/default.nix
blob: ff0aa154bca906f96b8582e8ac55de5b18b15425 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
{
  lib,
  buildPythonPackage,
  fetchFromGitHub,
  setuptools,
  pytestCheckHook,
  ujson,
}:

buildPythonPackage rec {
  pname = "demoji";
  version = "1.1.0";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "bsolomon1124";
    repo = "demoji";
    tag = "v${version}";
    hash = "sha256-ojy4JiM6xvP9J40Z5uFCMUZvZtLZ1le2p/2/NfAUAtk=";
  };

  postPatch = ''
    substituteInPlace setup.cfg \
      --replace-fail "pytest-runner" ""
  '';

  build-system = [ setuptools ];

  optional-dependencies = {
    ujson = [ ujson ];
  };

  nativeCheckInputs = [ pytestCheckHook ];

  pythonImportsCheck = [ "demoji" ];

  meta = {
    description = "Module to find/replace/remove emojis in text strings";
    homepage = "https://github.com/bsolomon1124/demoji";
    changelog = "https://github.com/bsolomon1124/demoji/blob/${version}/CHANGELOG.md";
    license = lib.licenses.asl20;
    maintainers = with lib.maintainers; [ fab ];
  };
}