Hi.

When I have a package whose only purpose in life is to be started as daemon
by e.g. Shepherd how would I satisfy its binary dependencies when defining
a service? For packages this is normally part of their (inputs ...) slot,
but IIUC this only makes it so these dependencies will be added to the same
profile used when installing said package. But when I define a service
there's no profile to speak of, so as part of the service definition I need
to make sure I satisfy its dependencies. Say, when I start a network
service that needs to run `iptables`.

The one time I ran into this, I managed by pulling `iptables` module into
derivation context and adding its /sbin to PATH in:
(make-forkexec-constructor ...
  #:environment-variables
  (let ((iptables (string-append #$iptables "/sbin")))
     ... extend PATH= here ...))

Another approach could be wrapping the daemon binary itself as part of its
package definition, so something like (wrap-program ... ) that makes sure
`iptables` is in PATH of that wrapper.

I kinda wish there was a simpler way to just declare what you need as part
of service definition.

What's the preferred approach here?

Thanks
-- 
Best regards
Vlad Kozin

Reply via email to