1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 hatchling,
6 django,
7 pytest-django,
8 pytestCheckHook,
9}:
10
11buildPythonPackage rec {
12 pname = "django-js-asset";
13 version = "3.1.2";
14 pyproject = true;
15
16 src = fetchFromGitHub {
17 owner = "matthiask";
18 repo = "django-js-asset";
19 tag = version;
20 hash = "sha256-OG31i8r6rwR2aDzraAorHdYrJrWt/e7SY9+iV7SJGJ8=";
21 };
22
23 build-system = [ hatchling ];
24
25 dependencies = [ django ];
26
27 pythonImportsCheck = [ "js_asset" ];
28
29 nativeCheckInputs = [
30 pytest-django
31 pytestCheckHook
32 ];
33
34 preCheck = ''
35 export DJANGO_SETTINGS_MODULE=tests.testapp.settings
36 '';
37
38 meta = with lib; {
39 changelog = "https://github.com/matthiask/django-js-asset/blob/${version}/CHANGELOG.rst";
40 description = "Script tag with additional attributes for django.forms.Media";
41 homepage = "https://github.com/matthiask/django-js-asset";
42 maintainers = with maintainers; [ hexa ];
43 license = with licenses; [ bsd3 ];
44 };
45}