Hi Gary,
On Wed Jan 21, 2026 at 4:52 PM CET, Gary Johnson wrote:
> It looks like you are on the right track, but you may just need to fix the
> PATH environment variable and add (default-environment-variables) back in to
> start function like so:
>
> ```
> #:environment-variables (append (list (string-append "PYTHONPATH="
> #$(file-append gertrude (string-append "/lib/python" (version-major+minor
> (package-version python)) "/site-packages/")))
> (string-append "DSN="
> #$data-source-name)
>
> "PATH=/run/setuid-programs:/run/current-system/profile/bin:/run/current-system/profile/sbin")
> (default-environment-variables))
> ```
>
> Note that the default PATH environment variable is pretty unusable within
> Shepherd services, so you'll need to set it explicitly as above if your
> services need to find another package in the environment.
Oh… that would be great! 🤩
… but… ran that way, it complains that it cannot find `flask` that is a
propagated dependency
of `gertrude`. 😞
```scheme
(start #~(make-forkexec-constructor
(list
(string-append #$gunicorn "/bin/gunicorn")
(string-append "--access-logfile=-")
(string-append (format #f "--workers=~a" #$workers))
(string-append (format #f "--bind=~a:~a" #$address #$port))
"gertrude.configuration:wsgi()")
#:user #$user
#:group #$group
#:log-file #$log-file
#:environment-variables (append
(list
(string-append "PYTHONPATH=" #$(file-append gertrude
(string-append "/lib/python" (version-major+minor (package-version python))
"/site-packages/")))
(string-append "DSN=" #$data-source-name)
"PATH=/run/setuid-programs:/run/current-system/profile/bin:/run/current-system/profile/sbin")
(default-environment-variables))))
```
I don’t know what the value of `default-environment-variables` is. I might be
overwritting
the value of `PYTHONPATH`? 🤔
--
Tanguy