summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/awesome-slugify/default.nix
blob: 30d1ebca1044265097157db5e1c4fc83a7429d39 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
{
  lib,
  buildPythonPackage,
  fetchPypi,
  unidecode,
  regex,
  unittestCheckHook,
}:

buildPythonPackage rec {
  pname = "awesome-slugify";
  version = "1.6.5";
  format = "setuptools";

  src = fetchPypi {
    inherit pname version;
    sha256 = "0wgxrhr8s5vk2xmcz9s1z1aml4ppawmhkbggl9rp94c747xc7pmv";
  };

  prePatch = ''
    substituteInPlace setup.py \
        --replace 'Unidecode>=0.04.14,<0.05' 'Unidecode>=0.04.14'
  '';

  patches = [
    ./slugify_filename_test.patch # fixes broken test by new unidecode
  ];

  propagatedBuildInputs = [
    unidecode
    regex
  ];

  nativeCheckInputs = [ unittestCheckHook ];

  meta = {
    homepage = "https://github.com/dimka665/awesome-slugify";
    description = "Python flexible slugify function";
    license = lib.licenses.gpl3;
    platforms = lib.platforms.all;
    maintainers = [ ];
  };
}