From b96682c40fc13c0df29c0370bdb068c96560be2e Mon Sep 17 00:00:00 2001 From: niten Date: Sat, 7 Jan 2023 15:28:54 -0800 Subject: [PATCH] Need to set the PYTHONPATH somehow --- objectifier.nix | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/objectifier.nix b/objectifier.nix index c26d8ed..0a650ed 100644 --- a/objectifier.nix +++ b/objectifier.nix @@ -24,10 +24,15 @@ let in pkgs.writeShellApplication { name = "objectifier"; runtimeInputs = [ pythonYolo ]; - text = pkgs.lib.concatStringsSep " " [ - "gunicorn" - "objectifier:app" - "-k uvicorn.workers.UvicornWorker" - ''"$@"'' - ]; + text = let + script = pkgs.lib.concatStringsSep " " [ + "gunicorn" + "objectifier:app" + "-k uvicorn.workers.UvicornWorker" + ''"$@"'' + ]; + in '' + PYTHONPATH="$PYTHONPATH:${objectifier-src}" + ${script} + ''; }