nix: added a runit service.

This commit is contained in:
Juan RP 2014-10-02 10:01:26 +02:00
parent 083aa0f53a
commit 0a99017db6
2 changed files with 9 additions and 6 deletions

View File

@ -0,0 +1,2 @@
#!/bin/sh
exec nix-daemon nix-daemon

View File

@ -1,16 +1,16 @@
# Template file for 'nix'
pkgname=nix
version=1.7
revision=2
revision=3
build_style=gnu-configure
# Use /nix/var as suggested by the official Manual.
configure_args="--localstatedir=/nix/var"
hostmakedepends="pkg-config flex"
makedepends="bzip2-devel libressl-devel sqlite-devel gc-devel curl perl-WWW-Curl perl-DBD-SQLite"
# Default configuration file.
conf_files="/etc/nix/nix.conf"
# Extra run-time dependencies.
depends="curl perl-WWW-Curl perl-DBD-SQLite"
makedepends="bzip2-devel libressl-devel sqlite-devel gc-devel ${depends}"
# Default configuration file.
conf_files="/etc/nix/nix.conf"
# Create required build users/groups.
system_groups="nixbld"
for f in $(seq 10); do
@ -18,8 +18,6 @@ for f in $(seq 10); do
eval export nixbld\${f}_homedir="/var/empty"
eval export nixbld\${f}_groups="nixbld"
done
# Register systemd service by default.
systemd_services="nix-daemon.service on"
# Create required run-time directories.
make_dirs="
/nix/var/log/nix/drvs 0755 root root
@ -50,4 +48,7 @@ post_install() {
echo 'build-users-group = nixbld' > ${DESTDIR}/etc/nix/nix.conf
# Install our profile.d/nix for multi-user by default.
vinstall ${FILESDIR}/nix.sh 644 etc/profile.d
# runit service
vinstall ${FILESDIR}/nix-daemon.run 755 etc/sv/nix-daemon run
ln -s /run/runit/supervise.nix-daemon ${DESTDIR}/etc/sv/nix-daemon/supervise
}