summaryrefslogtreecommitdiff
path: root/pkgs
diff options
context:
space:
mode:
authorstuebinm2024-02-15 19:43:42 +0100
committerstuebinm2024-02-15 19:43:42 +0100
commit5788f8499e5e7089e1c64e397c2308f26874c3a5 (patch)
tree32bf556051725f31ed08a9e10dbef2fba0b4f556 /pkgs
parented53fa3cf4b9c00064c89e75df68a2fe1e965275 (diff)
modules/bookwyrm: manage.py wrapper needs env file
otherwise it just fails to start with an error
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/bookwyrm.nix6
1 files changed, 5 insertions, 1 deletions
diff --git a/pkgs/bookwyrm.nix b/pkgs/bookwyrm.nix
index 0c9cb70..7a5daec 100644
--- a/pkgs/bookwyrm.nix
+++ b/pkgs/bookwyrm.nix
@@ -119,7 +119,11 @@ let
pythonPath = python.pkgs.makePythonPath propagatedBuildInputs;
gunicorn = python.pkgs.gunicorn;
celery = python.pkgs.celery;
- manage = writeShellScriptBin "bookwyrm-manage.py" ''
+ manage = environmentFile: writeShellScriptBin "bookwyrm-manage.py" ''
+ set -a
+ ${if environmentFile != null
+ then "source ${environmentFile}"
+ else ""}
export PYTHONPATH=${passthru.pythonPath}
cd ${bookwyrm.outPath}
exec ${bookwyrm.outPath}/manage.py "$@"