2013-09-30 00:36:09 +00:00
|
|
|
# Template file for 'nix'
|
|
|
|
pkgname=nix
|
|
|
|
version=1.6
|
2013-09-30 04:05:45 +00:00
|
|
|
revision=2
|
2013-09-30 00:36:09 +00:00
|
|
|
build_style=gnu-configure
|
|
|
|
# Use /nix/var as suggested by the official Manual.
|
2013-09-30 01:04:19 +00:00
|
|
|
configure_args="--localstatedir=/nix/var"
|
2013-09-30 00:36:09 +00:00
|
|
|
hostmakedepends="pkg-config flex"
|
2013-09-30 01:04:19 +00:00
|
|
|
makedepends="bzip2-devel openssl-devel sqlite-devel gc-devel curl perl-WWW-Curl perl-DBD-SQLite"
|
2014-01-01 15:10:11 +00:00
|
|
|
# Default configuration file.
|
|
|
|
conf_files="/etc/nix/nix.conf"
|
|
|
|
# Extra run-time dependencies.
|
|
|
|
depends="curl perl-WWW-Curl perl-DBD-SQLite"
|
|
|
|
# Create required build users/groups.
|
|
|
|
system_groups="nixbld"
|
|
|
|
for f in $(seq 10); do
|
|
|
|
system_accounts+=" nixbld${f}"
|
|
|
|
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
|
|
|
|
/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 00:36:09 +00: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"
|
|
|
|
checksum=2e451a6ad0b43997d8df71d29a7d20ef42f7715fe16efbf4b53bdcdd1d5227fe
|
|
|
|
|
|
|
|
post_install() {
|
|
|
|
# Remove unused stuff.
|
2013-09-30 01:04:19 +00:00
|
|
|
rm -rf ${DESTDIR}/usr/include ${DESTDIR}/nix
|
2013-09-30 00:36:09 +00: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
|
|
|
|
# Install nix-daemon systemd service.
|
|
|
|
vinstall ${FILESDIR}/nix-daemon.service 644 usr/lib/systemd/system
|
2013-09-30 01:04:19 +00:00
|
|
|
# Setup build users.
|
|
|
|
echo 'build-users-group = nixbld' > ${DESTDIR}/etc/nix/nix.conf
|
2013-09-30 04:05:45 +00:00
|
|
|
# Install our profile.d/nix for multi-user by default.
|
|
|
|
vinstall ${FILESDIR}/nix.sh 644 etc/profile.d
|
2013-09-30 00:36:09 +00:00
|
|
|
}
|