Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / python-modules / django-js-asset / default.nix
blobf579a31dc3e7c64762e9cff83bd67293b50ca82e
1 { lib
2 , buildPythonPackage
3 , fetchFromGitHub
4 , hatchling
5 , django
6 , python
7 }:
9 buildPythonPackage rec {
10   pname = "django-js-asset";
11   version = "2.1";
12   format = "pyproject";
14   src = fetchFromGitHub {
15     owner = "matthiask";
16     repo = pname;
17     rev = "refs/tags/${version}";
18     hash = "sha256-rxJ9TgVBiJByiFSLTg/dtAR31Fs14D4sh2axyBcKGTU=";
19   };
21   nativeBuildInputs = [
22     hatchling
23   ];
25   propagatedBuildInputs = [
26     django
27   ];
29   pythonImportsCheck = [
30     "js_asset"
31   ];
33   checkPhase = ''
34     runHook preCheck
35     ${python.interpreter} tests/manage.py test testapp
36     runHook postCheck
37   '';
39   meta = with lib; {
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   };