1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 pytestCheckHook,
6 pythonOlder,
7 setuptools,
8 text-unidecode,
9 unidecode,
10}:
11
12buildPythonPackage rec {
13 pname = "python-slugify";
14 version = "8.0.4";
15 pyproject = true;
16
17 disabled = pythonOlder "3.7";
18
19 src = fetchFromGitHub {
20 owner = "un33k";
21 repo = "python-slugify";
22 tag = "v${version}";
23 hash = "sha256-zReUMIkItnDot3XyYCoPUNHrrAllbClWFYcxdTy3A30=";
24 };
25
26 nativeBuildInputs = [ setuptools ];
27
28 propagatedBuildInputs = [ text-unidecode ];
29
30 optional-dependencies = {
31 unidecode = [ unidecode ];
32 };
33
34 nativeCheckInputs = [ pytestCheckHook ];
35
36 enabledTestPaths = [ "test.py" ];
37
38 pythonImportsCheck = [ "slugify" ];
39
40 meta = with lib; {
41 description = "Python Slugify application that handles Unicode";
42 mainProgram = "slugify";
43 homepage = "https://github.com/un33k/python-slugify";
44 changelog = "https://github.com/un33k/python-slugify/blob/v${version}/CHANGELOG.md";
45 license = licenses.mit;
46 maintainers = [ ];
47 };
48}