1{ stdenv, buildPythonPackage, fetchPypi, unidecode, regex, python }: 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 checkPhase = '' 24 ${python.interpreter} -m unittest discover 25 ''; 26 27 meta = with stdenv.lib; { 28 homepage = "https://github.com/dimka665/awesome-slugify"; 29 description = "Python flexible slugify function"; 30 license = licenses.gpl3; 31 platforms = platforms.all; 32 maintainers = with maintainers; [ abbradar ]; 33 }; 34}