1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 hatchling,
6 django,
7 python,
8}:
9
10buildPythonPackage rec {
11 pname = "django-js-asset";
12 version = "2.2";
13 format = "pyproject";
14
15 src = fetchFromGitHub {
16 owner = "matthiask";
17 repo = pname;
18 rev = "refs/tags/${version}";
19 hash = "sha256-qAkE5ubzfTNO1LuMQXMW2Sot1cn/bhuXlWa/J/wD5SI=";
20 };
21
22 nativeBuildInputs = [ hatchling ];
23
24 propagatedBuildInputs = [ django ];
25
26 pythonImportsCheck = [ "js_asset" ];
27
28 checkPhase = ''
29 runHook preCheck
30 ${python.interpreter} tests/manage.py test testapp
31 runHook postCheck
32 '';
33
34 meta = with lib; {
35 description = "Script tag with additional attributes for django.forms.Media";
36 homepage = "https://github.com/matthiask/django-js-asset";
37 maintainers = with maintainers; [ hexa ];
38 license = with licenses; [ bsd3 ];
39 };
40}