From 79dc7c3c101f9b18c8ff3da4f5c5ecba05092528 Mon Sep 17 00:00:00 2001 From: Christoph Heiss Date: Sat, 11 Nov 2023 13:35:12 +0100 Subject: [PATCH] sourcehut: add overrides for `flask-sqlalchemy` and `factory-boy` These are needed, as the used sourcehut version is not compatible with the newer major-releases for both packages. Signed-off-by: Christoph Heiss --- .../version-management/sourcehut/default.nix | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/pkgs/applications/version-management/sourcehut/default.nix b/pkgs/applications/version-management/sourcehut/default.nix index b2005f5643be..37840f486dc5 100644 --- a/pkgs/applications/version-management/sourcehut/default.nix +++ b/pkgs/applications/version-management/sourcehut/default.nix @@ -37,6 +37,40 @@ let nativeCheckInputs = with super; [ pytestCheckHook mock ]; disabledTestPaths = []; }); + + flask-sqlalchemy = super.flask-sqlalchemy.overridePythonAttrs (oldAttrs: rec { + version = "2.5.1"; + format = "setuptools"; + src = fetchPypi { + pname = "Flask-SQLAlchemy"; + inherit version; + hash = "sha256-K9pEtD58rLFdTgX/PMH4vJeTbMRkYjQkECv8LDXpWRI="; + }; + propagatedBuildInputs = with self; [ + flask + sqlalchemy + ]; + }); + + # sourcehut is not (yet) compatible with factory-boy 3.x + factory-boy = super.factory-boy.overridePythonAttrs (oldAttrs: rec { + version = "2.12.0"; + src = fetchPypi { + pname = "factory_boy"; + inherit version; + hash = "sha256-+vSNYIoXNfDQo8nL9TbWT5EytUfa57pFLE2Zp56Eo3A="; + }; + nativeCheckInputs = (with super; [ + django + flask + mongoengine + pytestCheckHook + ]) ++ (with self; [ + sqlalchemy + flask-sqlalchemy + ]); + postPatch = ""; + }); }; }; in