diff options
author | Michel Alexandre Salim <michel@sylvestre.me> | 2012-05-27T10·34+0700 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2012-05-31T12·59-0400 |
commit | a7ed1f67ee5dbbdbe45e15e6461b5f7c886747d8 (patch) | |
tree | 7f2f5dd30374f3f66b3738f1585404941567f73b /nix.spec.in | |
parent | 892234630594ea87a1b9bc945077c82c419af6d3 (diff) |
On systems with SystemD, install the service descriptor for nix-worker, and enable and start it
Diffstat (limited to 'nix.spec.in')
-rw-r--r-- | nix.spec.in | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/nix.spec.in b/nix.spec.in index cbbd65e917eb..44ea8d7c9476 100644 --- a/nix.spec.in +++ b/nix.spec.in @@ -137,6 +137,14 @@ done # (until this is fixed in the relevant Makefile) chmod -x $RPM_BUILD_ROOT%{_sysconfdir}/profile.d/nix.sh +# systemd not available on RHEL yet +%if ! 0%{?rhel} +# install systemd service descriptor +mkdir -p $RPM_BUILD_ROOT%{_prefix}/lib/systemd/system +cp -p misc/systemd/nix-worker.service \ + $RPM_BUILD_ROOT%{_prefix}/lib/systemd/system/ +%endif + # Copy the byte-compiled mode file by hand cp -p misc/emacs/nix-mode.elc $RPM_BUILD_ROOT%{_emacs_sitelispdir}/ @@ -165,6 +173,11 @@ done %post chgrp %{nixbld_group} /nix/store chmod 1775 /nix/store +%if ! 0%{?rhel} +# Enable and start Nix worker +systemctl enable nix-worker.service +systemctl start nix-worker.service +%endif %files %doc COPYING AUTHORS README @@ -174,6 +187,9 @@ chmod 1775 /nix/store %{perl_vendorarch}/* %exclude %dir %{perl_vendorarch}/auto/ %{_prefix}/libexec/* +%if ! 0%{?rhel} +%{_prefix}/lib/systemd/system/nix-worker.service +%endif %{_datadir}/emacs/site-lisp/nix-mode.el %{_datadir}/nix %{_mandir}/man1/nix-*.1* |