From 85e2231832a1cc10bebeb1ebae0b4d5541397738 Mon Sep 17 00:00:00 2001 From: Weijia Wang <9713184+wegank@users.noreply.github.com> Date: Tue, 4 Apr 2023 09:18:44 +0300 Subject: [PATCH] tandoor-recipes: fix build --- pkgs/applications/misc/tandoor-recipes/default.nix | 13 +++++++++++++ .../python-modules/django-crispy-forms/default.nix | 3 +++ 2 files changed, 16 insertions(+) diff --git a/pkgs/applications/misc/tandoor-recipes/default.nix b/pkgs/applications/misc/tandoor-recipes/default.nix index a15b0a4ab7cb..89d1740a802c 100644 --- a/pkgs/applications/misc/tandoor-recipes/default.nix +++ b/pkgs/applications/misc/tandoor-recipes/default.nix @@ -1,12 +1,25 @@ { callPackage , nixosTests , python3 +, fetchFromGitHub }: let python = python3.override { packageOverrides = self: super: { django = super.django_4; + django-crispy-forms = super.django-crispy-forms.overridePythonAttrs (_: rec { + version = "1.14.0"; + format = "setuptools"; + + src = fetchFromGitHub { + owner = "django-crispy-forms"; + repo = "django-crispy-forms"; + rev = "refs/tags/${version}"; + hash = "sha256-NZ2lWxsQHc7Qc4HDoWgjJTZ/bJHmjpBf3q1LVLtzA+8="; + }; + }); + # Tests are incompatible with Django 4 django-js-reverse = super.django-js-reverse.overridePythonAttrs (_: { doCheck = false; diff --git a/pkgs/development/python-modules/django-crispy-forms/default.nix b/pkgs/development/python-modules/django-crispy-forms/default.nix index 53357b9d7ef8..c1cc31e8acfb 100644 --- a/pkgs/development/python-modules/django-crispy-forms/default.nix +++ b/pkgs/development/python-modules/django-crispy-forms/default.nix @@ -2,6 +2,7 @@ , buildPythonPackage , fetchFromGitHub , django +, setuptools , pytestCheckHook , pytest-django }: @@ -9,6 +10,7 @@ buildPythonPackage rec { pname = "django-crispy-forms"; version = "2.0"; + format = "pyproject"; src = fetchFromGitHub { owner = "django-crispy-forms"; @@ -19,6 +21,7 @@ buildPythonPackage rec { propagatedBuildInputs = [ django + setuptools ]; # FIXME: RuntimeError: Model class source.crispy_forms.tests.forms.CrispyTestModel doesn't declare an explicit app_label and isn't in an application in INSTALLED_APPS.