1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 setuptools,
6 wheel,
7 django,
8 django-modeltranslation,
9}:
10
11buildPythonPackage rec {
12 pname = "django-autoslug";
13 version = "1.9.9";
14 pyproject = true;
15
16 src = fetchFromGitHub {
17 owner = "justinmayer";
18 repo = "django-autoslug";
19 tag = "v${version}";
20 hash = "sha256-IRLY4VaKYXVkSgU/zdY+PSmGrcFB2FlE5L7j0FqisRM=";
21 };
22
23 build-system = [
24 setuptools
25 wheel
26 ];
27
28 dependencies = [ django ];
29
30 nativeCheckInputs = [ django-modeltranslation ];
31
32 checkPhase = ''
33 runHook preCheck
34
35 python run_tests.py
36
37 runHook postCheck
38 '';
39
40 meta = {
41 description = "AutoSlugField for Django";
42 homepage = "https://github.com/justinmayer/django-autoslug";
43 changelog = "https://github.com/justinmayer/django-autoslug/blob/v${version}/CHANGELOG.rst";
44 license = lib.licenses.lgpl3Only;
45 maintainers = with lib.maintainers; [ defelo ];
46 };
47}