diff --git a/misc/systemd/local.mk b/misc/systemd/local.mk index 5555818c52..004549fd27 100644 --- a/misc/systemd/local.mk +++ b/misc/systemd/local.mk @@ -1 +1,5 @@ -$(foreach n, nix-daemon.socket nix-daemon.service, $(eval $(call install-file-in, $(d)/$(n), $(prefix)/lib/systemd/system, 0644))) +ifeq ($(OS), Linux) + + $(foreach n, nix-daemon.socket nix-daemon.service, $(eval $(call install-file-in, $(d)/$(n), $(prefix)/lib/systemd/system, 0644))) + +endif diff --git a/misc/upstart/local.mk b/misc/upstart/local.mk index 249262d4f7..a73dc061e4 100644 --- a/misc/upstart/local.mk +++ b/misc/upstart/local.mk @@ -1 +1,5 @@ -$(foreach n, nix-daemon.conf, $(eval $(call install-file-in, $(d)/$(n), $(sysconfdir)/init, 0644))) +ifeq ($(OS), Linux) + + $(foreach n, nix-daemon.conf, $(eval $(call install-file-in, $(d)/$(n), $(sysconfdir)/init, 0644))) + +endif