about summary refs log tree commit diff
diff options
context:
space:
mode:
authoruser@node5.net <user@node5.net>2026-05-29 19:03:44 +0200
committeruser@node5.net <user@node5.net>2026-05-29 19:03:44 +0200
commit1dc2c3b9d679ca25067fe70e3fda59b3246af8aa (patch)
treec3f8a07cb19bbc11d4c039315d3c5e97c9fd3826
parent596b55c0b486830c500ecd5beac3cbb9c1f93769 (diff)
flake - add blog python package to python path to run with uwsgi
-rw-r--r--flake.nix18
1 files changed, 10 insertions, 8 deletions
diff --git a/flake.nix b/flake.nix
index 0c58cda..51ffc0f 100644
--- a/flake.nix
+++ b/flake.nix
@@ -25,13 +25,8 @@
 
       # Returns an attribute set that can be passed to `buildPythonPackage`.
       attrs = project.renderers.buildPythonPackage { inherit python; };
-    in
-    {
-      # Build our package using `buildPythonPackage
-      packages.x86_64-linux.default =
-        # Pass attributes to buildPythonPackage.
-        # Here is a good spot to add on any missing or custom attributes.
-        python.pkgs.buildPythonPackage (attrs // {
+
+      pkg = python.pkgs.buildPythonPackage (attrs // {
           meta = {
             description = "Blog backend for blog.node5.net";
             homepage = "https://blog.node5.net/Blog%20meta/";
@@ -39,7 +34,14 @@
             mainProgram = "blog-node5";
           };
         });
+    in
+    {
+      # Build our package using `buildPythonPackage
+      packages.x86_64-linux.default =
+        # Pass attributes to buildPythonPackage.
+        # Here is a good spot to add on any missing or custom attributes.
+        pkg;
     } //  {
-    pythonPath = "${python.pkgs.makePythonPath attrs.dependencies}";
+    pythonPath = "${python.pkgs.makePythonPath attrs.dependencies}:${pkg}/${python.sitePackages}";
   };
 }