diff --git a/flake.nix b/flake.nix index 7e2d03b..6819261 100644 --- a/flake.nix +++ b/flake.nix @@ -313,6 +313,16 @@ cp ${settingsLocal} bitpoll/settings_local.py ''; + buildPhase = '' + runHook preBuild + + # Compile localization messages during build to avoid runtime write issues + export PYTHONPATH=$PWD:$PYTHONPATH + ${pythonEnv}/bin/python manage.py compilemessages + + runHook postBuild + ''; + installPhase = '' runHook preInstall @@ -482,9 +492,6 @@ # Collect static files ${cfg.package}/bin/bitpoll-manage collectstatic --noinput --clear - - # Compile messages - ${cfg.package}/bin/bitpoll-manage compilemessages ''; serviceConfig = {