Skip to content

Commit

Permalink
synapse: Set LD_LIBRARY_PATH when running Synapse
Browse files Browse the repository at this point in the history
Set LD_LIBRARY_PATH but only when running Synapse via `devenv up`.

This allows Synapse to run and find the libs it needs, while also
preventing breakages in the shell due to including `gcc` as a
dependency.
  • Loading branch information
anoadragon453 committed Jun 25, 2024
1 parent 00e239f commit 3d1e3ee
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion project-flakes/synapse/module.nix
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,9 @@
EOF
'';
# Start synapse when `devenv up` is run.
processes.synapse.exec = "poetry run python -m synapse.app.homeserver -c homeserver.yaml -c homeserver-config-overrides.d";
# We set LD_LIBRARY_PATH to counteract the unsetting below,
# so that Synapse has the libs that it needs.
processes.synapse.exec = "LD_LIBRARY_PATH=$DEVENV_ROOT/.devenv/profile/lib poetry run python -m synapse.app.homeserver -c homeserver.yaml -c homeserver-config-overrides.d";

# Clear the LD_LIBRARY_PATH environment variable on shell init.
#
Expand Down

0 comments on commit 3d1e3ee

Please sign in to comment.