Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / python-modules / python-slugify / default.nix
blobcb525a5922beaadf57deaf7cd5581bfb16277daa
1 { lib
2 , buildPythonPackage
3 , fetchFromGitHub
4 , pytestCheckHook
5 , pythonOlder
6 , text-unidecode
7 , unidecode
8 }:
10 buildPythonPackage rec {
11   pname = "python-slugify";
12   version = "8.0.1";
13   format = "setuptools";
15   disabled = pythonOlder "3.7";
17   src = fetchFromGitHub {
18     owner = "un33k";
19     repo = pname;
20     rev = "refs/tags/v${version}";
21     hash = "sha256-MJac63XjgWdUQdyyEm8O7gAGVszmHxZzRF4frJtR0BU=";
22   };
24   propagatedBuildInputs = [
25     text-unidecode
26   ];
28   passthru.optional-dependencies = {
29     unidecode = [
30       unidecode
31     ];
32   };
34   nativeCheckInputs = [
35     pytestCheckHook
36   ];
38   pytestFlagsArray = [
39     "test.py"
40   ];
42   pythonImportsCheck = [
43     "slugify"
44   ];
46   meta = with lib; {
47     description = "Python Slugify application that handles Unicode";
48     homepage = "https://github.com/un33k/python-slugify";
49     changelog = "https://github.com/un33k/python-slugify/blob/v${version}/CHANGELOG.md";
50     license = licenses.mit;
51     maintainers = with maintainers; [ vrthra ];
52   };