about summary refs log tree commit diff
path: root/pkgs/applications/version-management/sourcehut
diff options
context:
space:
mode:
authorChristoph Heiss <christoph@c8h4.io>2023-11-11 13:35:12 +0100
committerChristoph Heiss <christoph@c8h4.io>2023-11-11 14:14:59 +0100
commit79dc7c3c101f9b18c8ff3da4f5c5ecba05092528 (patch)
tree8872470f5680f5f7fb4d0d7a8511a9c40ab04797 /pkgs/applications/version-management/sourcehut
parent641e54bb289d708f45f11e156bf4ffa251a2b4b2 (diff)
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 <christoph@c8h4.io>
Diffstat (limited to 'pkgs/applications/version-management/sourcehut')
-rw-r--r--pkgs/applications/version-management/sourcehut/default.nix34
1 files changed, 34 insertions, 0 deletions
diff --git a/pkgs/applications/version-management/sourcehut/default.nix b/pkgs/applications/version-management/sourcehut/default.nix
index b2005f5643be6..37840f486dc5d 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