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