Something went wrong. Try again.
Nix Packages collection & NixOS github.com/NixOS/nixpkgs
Something went wrong. Try again.
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576{ lib, buildPythonPackage, django, fetchFromGitHub, libcst, poetry-core, postgresql, postgresqlTestHook, psycopg, psycopg-pool,}:
buildPythonPackage rec { pname = "django-async-backend"; version = "6.1.2"; pyproject = true;
src = fetchFromGitHub { owner = "Arfey"; repo = "django-async-backend"; tag = "v${version}"; hash = "sha256-pfcqTtyV37bZFSZaRcFIt9cgR8XZ7PDijVC18lMziRU="; };
postPatch = '' substituteInPlace tests/settings.py \ --replace-fail '"HOST": "localhost"' '"HOST": "/build/run/postgresql"'
substituteInPlace tests/db/backends/postgresql/test_async_backend.py \ --replace-fail "new_connection.get_database_version())[0], 15" "new_connection.get_database_version())[0], ${lib.versions.major postgresql.version}" '';
build-system = [ poetry-core ];
dependencies = [ django psycopg ];
pythonImportsCheck = [ "django_async_backend" ];
env = { DJANGO_SETTINGS_MODULE = "settings"; PGDATABASE = "postgres"; PGUSER = "postgres"; };
checkPhase = '' runHook preCheck
cd tests/ python manage.py test
runHook postCheck '';
nativeCheckInputs = [ django # must come first as vtasks only works with django 6
libcst postgresql postgresqlTestHook psycopg-pool ];
meta = { description = "True async Django ORM and PostgreSQL backend with connection pooling and async transactions"; homepage = "https://github.com/Arfey/django-async-backend"; changelog = "https://github.com/Arfey/django-async-backend/releases/tag/${src.tag}"; license = lib.licenses.asl20; maintainers = with lib.maintainers; [ SuperSandro2000 ]; broken = lib.versionOlder (lib.versions.major django.version) "6"; };}