Otherwise, users will be stuck running an old copy of guix and the guix-daemon
if they copy the service files instead of symlinking them.
* etc/guix-daemon.conf.in, etc/guix-daemon.service.in, etc/guix-publish.conf.in,
etc/guix-publish.service.in: Expand @localstatedir@ instead of @bindir@.
* nix/local.mk (etc/guix-%.service, etc/guix-%.conf): Use @localstatedir@
instead of @bindir@.
task
-exec @bindir@/guix-daemon --build-users-group=guixbuild
+exec @localstatedir@/guix/profiles/per-user/root/guix-profile/bin/guix-daemon --build-users-group=guixbuild
Description=Build daemon for GNU Guix
[Service]
-ExecStart=@bindir@/guix-daemon --build-users-group=guixbuild
+ExecStart=@localstatedir@/guix/profiles/per-user/root/guix-profile/bin/guix-daemon --build-users-group=guixbuild
Environment=GUIX_LOCPATH=/root/.guix-profile/lib/locale
RemainAfterExit=yes
StandardOutput=syslog
task
-exec @bindir@/guix publish --user=nobody --port=8181
+exec @localstatedir@/guix/profiles/per-user/root/guix-profile/bin/guix publish --user=nobody --port=8181
Description=Publish the GNU Guix store
[Service]
-ExecStart=@bindir@/guix publish --user=nobody --port=8181
+ExecStart=@localstatedir@/guix/profiles/per-user/root/guix-profile/bin/guix publish --user=nobody --port=8181
Environment=GUIX_LOCPATH=/root/.guix-profile/lib/locale
RemainAfterExit=yes
StandardOutput=syslog
etc/guix-%.service: etc/guix-%.service.in \
$(top_builddir)/config.status
$(AM_V_GEN)$(MKDIR_P) "`dirname $@`"; \
- $(SED) -e 's|@''bindir''@|$(bindir)|' < \
+ $(SED) -e 's|@''localstatedir''@|$(localstatedir)|' < \
"$<" > "$@.tmp"; \
mv "$@.tmp" "$@"
etc/guix-%.conf: etc/guix-%.conf.in \
$(top_builddir)/config.status
$(AM_V_GEN)$(MKDIR_P) "`dirname $@`"; \
- $(SED) -e 's|@''bindir''@|$(bindir)|' < \
+ $(SED) -e 's|@''localstatedir''@|$(localstatedir)|' < \
"$<" > "$@.tmp"; \
mv "$@.tmp" "$@"