2013-09-30 02:36:09 +02:00
|
|
|
# Template file for 'nix'
|
|
|
|
pkgname=nix
|
2014-12-31 10:41:34 +01:00
|
|
|
version=1.8
|
2015-03-08 19:59:48 +01:00
|
|
|
revision=4
|
2013-09-30 02:36:09 +02:00
|
|
|
build_style=gnu-configure
|
|
|
|
# Use /nix/var as suggested by the official Manual.
|
2013-09-30 03:04:19 +02:00
|
|
|
configure_args="--localstatedir=/nix/var"
|
2014-01-01 16:10:11 +01:00
|
|
|
depends="curl perl-WWW-Curl perl-DBD-SQLite"
|
2015-02-24 10:09:24 +01:00
|
|
|
hostmakedepends="pkg-config flex ${depends}"
|
|
|
|
# Extra run-time dependencies.
|
2015-03-27 10:50:40 +01:00
|
|
|
makedepends="bzip2-devel libressl-devel sqlite-devel gc-devel"
|
2014-10-02 10:01:26 +02:00
|
|
|
# Default configuration file.
|
|
|
|
conf_files="/etc/nix/nix.conf"
|
2014-01-01 16:10:11 +01:00
|
|
|
# Create required build users/groups.
|
|
|
|
system_groups="nixbld"
|
|
|
|
for f in $(seq 10); do
|
|
|
|
system_accounts+=" nixbld${f}"
|
|
|
|
eval export nixbld\${f}_groups="nixbld"
|
|
|
|
done
|
|
|
|
# Create required run-time directories.
|
|
|
|
make_dirs="
|
|
|
|
/nix/var/log/nix/drvs 0755 root root
|
|
|
|
/nix/var/nix/profiles 0755 root root
|
|
|
|
/nix/var/nix/profiles/per-user 1777 root root
|
|
|
|
/nix/var/nix/gcroots/per-user 1777 root root
|
|
|
|
/nix/var/nix/temproots 0755 root root
|
|
|
|
/nix/var/nix/gcroots 0755 root root
|
|
|
|
/nix/var/nix/manifests 0755 root root
|
|
|
|
/nix/var/nix/userpool 0755 root root
|
|
|
|
/nix/var/nix/db 0755 root root
|
|
|
|
/nix/store 1775 root nixbld"
|
2013-09-30 02:36:09 +02:00
|
|
|
short_desc="A purely functional package manager"
|
|
|
|
maintainer="Juan RP <xtraeme@gmail.com>"
|
|
|
|
license="MIT"
|
|
|
|
homepage="http://nixos.org/nix/"
|
|
|
|
distfiles="http://nixos.org/releases/nix/nix-${version}/nix-${version}.tar.xz"
|
2014-12-31 10:41:34 +01:00
|
|
|
checksum=a30a5e801bc1cb1019cbc3456d961a307c45c9c588b8692cf1293ea6588ef01c
|
2013-09-30 02:36:09 +02:00
|
|
|
|
|
|
|
post_install() {
|
2015-02-24 10:09:24 +01:00
|
|
|
vlicense COPYING LICENSE
|
|
|
|
|
2014-06-03 02:33:10 +02:00
|
|
|
vmkdir etc/nix
|
2013-09-30 02:36:09 +02:00
|
|
|
# Remove unused stuff.
|
2013-09-30 03:04:19 +02:00
|
|
|
rm -rf ${DESTDIR}/usr/include ${DESTDIR}/nix
|
2013-09-30 02:36:09 +02:00
|
|
|
# Let users interact with the nix-daemon by default.
|
|
|
|
vmkdir etc/profile.d
|
|
|
|
echo 'export NIX_REMOTE=daemon' > ${DESTDIR}/etc/profile.d/nix-daemon.sh
|
2013-09-30 03:04:19 +02:00
|
|
|
# Setup build users.
|
|
|
|
echo 'build-users-group = nixbld' > ${DESTDIR}/etc/nix/nix.conf
|
2013-09-30 06:05:45 +02:00
|
|
|
# Install our profile.d/nix for multi-user by default.
|
|
|
|
vinstall ${FILESDIR}/nix.sh 644 etc/profile.d
|
2014-10-02 10:01:26 +02:00
|
|
|
# runit service
|
2015-02-24 10:09:24 +01:00
|
|
|
vsv nix-daemon
|
2013-09-30 02:36:09 +02:00
|
|
|
}
|