unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* proper way to satisfy service dependencies
@ 2023-03-23 14:00 Vladilen Kozin
  0 siblings, 0 replies; only message in thread
From: Vladilen Kozin @ 2023-03-23 14:00 UTC (permalink / raw)
  To: guix-devel

[-- Attachment #1: Type: text/plain, Size: 1193 bytes --]

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

[-- Attachment #2: Type: text/html, Size: 2563 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-03-23 14:01 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-23 14:00 proper way to satisfy service dependencies Vladilen Kozin

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).