1{
2 lib,
3 buildPythonPackage,
4 fetchPypi,
5 unidecode,
6 regex,
7 unittestCheckHook,
8}:
9
10buildPythonPackage rec {
11 pname = "awesome-slugify";
12 version = "1.6.5";
13 format = "setuptools";
14
15 src = fetchPypi {
16 inherit pname version;
17 sha256 = "0wgxrhr8s5vk2xmcz9s1z1aml4ppawmhkbggl9rp94c747xc7pmv";
18 };
19
20 prePatch = ''
21 substituteInPlace setup.py \
22 --replace 'Unidecode>=0.04.14,<0.05' 'Unidecode>=0.04.14'
23 '';
24
25 patches = [
26 ./slugify_filename_test.patch # fixes broken test by new unidecode
27 ];
28
29 propagatedBuildInputs = [
30 unidecode
31 regex
32 ];
33
34 nativeCheckInputs = [ unittestCheckHook ];
35
36 meta = with lib; {
37 homepage = "https://github.com/dimka665/awesome-slugify";
38 description = "Python flexible slugify function";
39 license = licenses.gpl3;
40 platforms = platforms.all;
41 maintainers = [ ];
42 };
43}