1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 hatchling, 6 django, 7 sqlparse, 8 pytestCheckHook, 9 pytest-django, 10}: 11 12buildPythonPackage rec { 13 pname = "django-sql-utils"; 14 version = "0.7.0"; 15 pyproject = true; 16 17 src = fetchFromGitHub { 18 owner = "martsberger"; 19 repo = "django-sql-utils"; 20 tag = version; 21 hash = "sha256-OjKPxoWYheu8UQ14KvyiQyHISAQjJep+N4HRc4Msa1w="; 22 }; 23 24 postPatch = '' 25 echo -e "\n[tool.hatch.build.targets.wheel]\npackages = [ \"sql_util\" ]" >> pyproject.toml 26 ''; 27 28 build-system = [ hatchling ]; 29 30 dependencies = [ 31 django 32 sqlparse 33 ]; 34 35 env = { 36 DJANGO_SETTINGS_MODULE = "sql_util.tests.test_sqlite_settings"; 37 }; 38 39 nativeCheckInputs = [ 40 pytestCheckHook 41 pytest-django 42 ]; 43 44 pythonImportsCheck = [ "sql_util" ]; 45 46 meta = { 47 description = "SQL utilities for Django"; 48 homepage = "https://github.com/martsberger/django-sql-utils"; 49 changelog = "https://github.com/martsberger/django-sql-utils/releases/tag/${version}"; 50 license = lib.licenses.mit; 51 maintainers = with lib.maintainers; [ defelo ]; 52 }; 53}