Commit 43f2c108 authored by jopejoe1's avatar jopejoe1
Browse files

python3Packages.django-tenants: move out of authentik

parent 02f6fcb0
Loading
Loading
Loading
Loading
+9 −20
Original line number Diff line number Diff line
@@ -110,25 +110,6 @@ let
  python = python312.override {
    self = python;
    packageOverrides = final: prev: {
      django-tenants = prev.buildPythonPackage rec {
        pname = "django-tenants";
        version = "unstable-2024-01-11";
        src = fetchFromGitHub {
          owner = "rissson";
          repo = pname;
          rev = "a7f37c53f62f355a00142473ff1e3451bb794eca";
          hash = "sha256-YBT0kcCfETXZe0j7/f1YipNIuRrcppRVh1ecFS3cvNo=";
        };
        format = "setuptools";
        doCheck = false; # Tests require postgres

        propagatedBuildInputs = with final; [
          django
          psycopg
          gunicorn
        ];
      };

      django-cte = prev.buildPythonPackage rec {
        pname = "django-cte";
        version = "1.3.3";
@@ -178,7 +159,15 @@ let
        ];
        pyproject = true;
      };

      django-tenants = prev.django-tenants.overrideAttrs {
        version = "3.6.1-unstable-2024-01-11";
        src = fetchFromGitHub {
          owner = "rissson";
          repo = "django-tenants";
          rev = "a7f37c53f62f355a00142473ff1e3451bb794eca";
          hash = "sha256-YBT0kcCfETXZe0j7/f1YipNIuRrcppRVh1ecFS3cvNo=";
        };
      };
      # Use 3.14.0 until https://github.com/encode/django-rest-framework/issues/9358 is fixed.
      # Otherwise applying blueprints/default/default-brand.yaml fails with:
      #   authentik.flows.models.RelatedObjectDoesNotExist: FlowStageBinding has no target.
+38 −0
Original line number Diff line number Diff line
{
  lib,
  buildPythonPackage,
  fetchFromGitHub,
  setuptools,
  django,
  psycopg,
}:

buildPythonPackage rec {
  pname = "django-tenants";
  version = "3.7.0";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "django-tenants";
    repo = "django-tenants";
    rev = "refs/tags/v${version}";
    hash = "sha256-QdEONKVFW/DWBjXWRTG+ahvirw9BP8M6PztUMZGZ33Q=";
  };

  build-system = [ setuptools ];

  dependencies = [
    django
    psycopg
  ];

  pythonImportsCheck = [ "django_tenants" ];

  meta = {
    description = "Django tenants using PostgreSQL Schemas";
    homepage = "https://github.com/django-tenants/django-tenants";
    changelog = "https://github.com/django-tenants/django-tenants/releases/tag/v${version}";
    license = lib.licenses.mit;
    maintainers = with lib.maintainers; [ jopejoe1 ];
  };
}
+2 −0
Original line number Diff line number Diff line
@@ -3503,6 +3503,8 @@ self: super: with self; {
  django-tastypie = callPackage ../development/python-modules/django-tastypie { };
  django-tenants = callPackage ../development/python-modules/django-tenants { };
  django-timezone-field = callPackage ../development/python-modules/django-timezone-field { };
  django-treebeard = callPackage ../development/python-modules/django-treebeard { };