summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/django-pgpubsub/default.nix
blob: b9498dc5026054c9f0ea16be25d16085ad03769d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
{
  lib,
  buildPythonPackage,
  fetchFromGitHub,
  nix-update-script,
  poetry-core,
  django,
  django-pgtrigger,
}:

buildPythonPackage rec {
  pname = "django-pgpubsub";
  version = "1.3.1";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "PaulGilmartin";
    repo = "django-pgpubsub";
    tag = version;
    hash = "sha256-Gl6NfBaoj3WKLHwJElbb27CYVQ83s3f86NUOZE7lHCk=";
  };

  passthru.updateScript = nix-update-script { };

  postPatch = ''
    substituteInPlace pyproject.toml \
    --replace 'poetry.masonry.api' 'poetry.core.masonry.api' \
    --replace 'poetry>=1.1.13' 'poetry-core>=1.0.0' \
  '';

  build-system = [ poetry-core ];

  dependencies = [
    django
    django-pgtrigger
  ];

  pythonImportsCheck = [ "pgpubsub" ];

  meta = {
    description = "Lightweight background tasks using Django Channels and PostgreSQL NOTIFY/LISTEN";
    homepage = "https://github.com/PaulGilmartin/django-pgpubsub";
    changelog = "https://github.com/PaulGilmartin/django-pgpubsub/blob/${src.rev}/CHANGELOG.md";
    license = lib.licenses.bsd3;
    maintainers = with lib.maintainers; [ raitobezarius ];
  };
}