1{
2 lib,
3 buildPythonPackage,
4 django,
5 fetchFromGitHub,
6 hatch-fancy-pypi-readme,
7 hatchling,
8 hatch-vcs,
9 python,
10 pythonOlder,
11}:
12
13buildPythonPackage rec {
14 pname = "django-simple-history";
15 version = "3.7.0";
16 format = "setuptools";
17
18 disabled = pythonOlder "3.8";
19
20 src = fetchFromGitHub {
21 owner = "jazzband";
22 repo = "django-simple-history";
23 rev = "refs/tags/${version}";
24 hash = "sha256-bPdMdtiEDRvRD00ZBwUQkeCDKCx2SW65+FsbuMwVdK0=";
25 };
26
27 nativeBuildInputs = [
28 hatch-fancy-pypi-readme
29 hatchling
30 hatch-vcs
31 ];
32
33 propagatedBuildInputs = [ django ];
34
35 checkPhase = ''
36 runHook preCheck
37 ${python.interpreter} runtests.py
38 runHook postCheck
39 '';
40
41 pythonImportsCheck = [ "simple_history" ];
42
43 meta = with lib; {
44 description = "django-simple-history stores Django model state on every create/update/delete";
45 homepage = "https://github.com/jazzband/django-simple-history/";
46 changelog = "https://github.com/jazzband/django-simple-history/releases/tag/${version}";
47 license = licenses.bsd3;
48 maintainers = with maintainers; [ derdennisop ];
49 };
50}