Hi there,

I was wondering if someone can help with a PATH issue. I have nginx running and want to use a python script for LDAP authentication.

I managed to include the required python packages (ldap3 and systemd) so that the python interpreter can find them:

> environment.systemPackages = with pkgs; [
>   (python35.withPackages(ps: with ps; [ python35Packages.ldap3 python35Packages.systemd ]))
> ];

I'm using the shebang "#!/usr/bin/env python3" and if started by myself, the script runs perfectly.

Next step was to make nginx also find the python interpreter:

> systemd.services.nginx.path = [ pkgs.python35 ];

The nginx process can now execute the python script.

BUT: it fails because it can't find the required packages ldap3 and systemd. Contrary to when started by myself.

Any ideas what's the problem? Much appreciated! :-)