2021-12-06 16:07:01 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
2023-08-10 07:59:29 +00:00
|
|
|
, hatchling
|
2021-12-06 16:07:01 +00:00
|
|
|
, django
|
|
|
|
, python
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "django-js-asset";
|
2023-08-10 07:59:29 +00:00
|
|
|
version = "2.1";
|
|
|
|
format = "pyproject";
|
2021-12-06 16:07:01 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "matthiask";
|
|
|
|
repo = pname;
|
2022-08-12 12:06:08 +00:00
|
|
|
rev = "refs/tags/${version}";
|
2023-08-10 07:59:29 +00:00
|
|
|
hash = "sha256-rxJ9TgVBiJByiFSLTg/dtAR31Fs14D4sh2axyBcKGTU=";
|
2021-12-06 16:07:01 +00:00
|
|
|
};
|
|
|
|
|
2023-08-10 07:59:29 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
hatchling
|
|
|
|
];
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
django
|
|
|
|
];
|
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"js_asset"
|
|
|
|
];
|
|
|
|
|
|
|
|
checkPhase = ''
|
|
|
|
runHook preCheck
|
|
|
|
${python.interpreter} tests/manage.py test testapp
|
|
|
|
runHook postCheck
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Script tag with additional attributes for django.forms.Media";
|
|
|
|
homepage = "https://github.com/matthiask/django-js-asset";
|
|
|
|
maintainers = with maintainers; [ hexa ];
|
|
|
|
license = with licenses; [ bsd3 ];
|
|
|
|
};
|
|
|
|
}
|