Gentoo Archives: gentoo-commits

From: Sergei Trofimovich <slyfox@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-apps/nix/
Date: Wed, 01 Feb 2017 22:18:33
Message-Id: 1485987496.5050debfedd9ef939113ab1c2e3f0de3be6e15c0.slyfox@gentoo
1 commit: 5050debfedd9ef939113ab1c2e3f0de3be6e15c0
2 Author: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
3 AuthorDate: Wed Feb 1 22:10:46 2017 +0000
4 Commit: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
5 CommitDate: Wed Feb 1 22:18:16 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5050debf
7
8 sys-apps/nix: don't hardcode UID/GID for nix internal groups
9
10 Package-Manager: Portage-2.3.3, Repoman-2.3.1
11
12 sys-apps/nix/nix-1.11.6-r1.ebuild | 114 ---------------------
13 .../{nix-1.11.6-r2.ebuild => nix-1.11.6-r3.ebuild} | 4 +-
14 2 files changed, 2 insertions(+), 116 deletions(-)
15
16 diff --git a/sys-apps/nix/nix-1.11.6-r1.ebuild b/sys-apps/nix/nix-1.11.6-r1.ebuild
17 deleted file mode 100644
18 index 4553ec6..00000000
19 --- a/sys-apps/nix/nix-1.11.6-r1.ebuild
20 +++ /dev/null
21 @@ -1,114 +0,0 @@
22 -# Copyright 1999-2017 Gentoo Foundation
23 -# Distributed under the terms of the GNU General Public License v2
24 -# $Id$
25 -
26 -EAPI=6
27 -
28 -inherit readme.gentoo-r1 user
29 -
30 -DESCRIPTION="A purely functional package manager"
31 -HOMEPAGE="https://nixos.org/nix"
32 -
33 -SRC_URI="http://nixos.org/releases/${PN}/${P}/${P}.tar.xz"
34 -LICENSE="LGPL-2.1"
35 -SLOT="0"
36 -KEYWORDS="~amd64 ~x86"
37 -IUSE="+etc_profile +gc doc sodium"
38 -
39 -RDEPEND="
40 - app-arch/bzip2
41 - app-arch/xz-utils
42 - dev-db/sqlite
43 - dev-libs/openssl:0=
44 - net-misc/curl
45 - sys-libs/zlib
46 - gc? ( dev-libs/boehm-gc )
47 - doc? ( dev-libs/libxml2
48 - dev-libs/libxslt
49 - app-text/docbook-xsl-stylesheets
50 - )
51 - sodium? ( dev-libs/libsodium )
52 - dev-lang/perl:=
53 - dev-perl/DBD-SQLite
54 - dev-perl/WWW-Curl
55 - dev-perl/DBI
56 -"
57 -DEPEND="${RDEPEND}
58 - >=sys-devel/bison-2.6
59 - >=sys-devel/flex-2.5.35
60 - virtual/perl-ExtUtils-ParseXS
61 -"
62 -
63 -PATCHES=(
64 - "${FILESDIR}"/${P}-systemd.patch
65 - "${FILESDIR}"/${P}-per-user.patch
66 -)
67 -
68 -DISABLE_AUTOFORMATTING=yes
69 -DOC_CONTENTS=" Quick start user guide on Gentoo:
70 -
71 -[as root] enable nix-daemon service:
72 - [systemd] # systemctl enable nix-daemon
73 - [openrc] # rc-update add nix-daemon
74 -[as an user] relogin to get environment and profile update
75 -[as an user] fetch nixpkgs update:
76 - \$ nix-channel --update
77 -[as an user] install nix packages:
78 - \$ nix-env -i mc
79 -[as an user] configure environment:
80 - Somewhere in .bash_profile you might want to set
81 - LOCALE_ARCHIVE=\$HOME/.nix-profile/lib/locale/locale-archive
82 - but please read https://github.com/NixOS/nixpkgs/issues/21820
83 -
84 -Next steps:
85 - nix package manager user manual: http://nixos.org/nix/manual/
86 -"
87 -
88 -pkg_setup() {
89 - enewgroup nixbld 30000
90 - for i in {1..10}; do
91 - # we list 'nixbld' twice to
92 - # both assign a primary group for user
93 - # and add an user to /etc/group
94 - enewuser nixbld${i} $((30000 +$i)) -1 /var/empty nixbld,nixbld
95 - done
96 -}
97 -
98 -src_configure() {
99 - econf \
100 - --localstatedir="${EPREFIX}"/nix/var \
101 - $(use_enable gc)
102 -}
103 -
104 -src_install() {
105 - # TODO: emacs highlighter
106 - default
107 -
108 - readme.gentoo_create_doc
109 -
110 - # here we an eager variant of something that
111 - # is lazily done by nix-daemo and root nix-env
112 -
113 - # TODO: will need a tweak for prefix
114 - keepdir /nix/store
115 - fowners root:nixbld /nix/store
116 - fperms 1775 /nix/store
117 -
118 - keepdir /nix/var/nix/profiles/per-user
119 - fperms 1777 /nix/var/nix/profiles/per-user
120 -
121 - doenvd "${FILESDIR}"/60nix-remote-daemon
122 - newinitd "${FILESDIR}"/nix-daemon.initd nix-daemon
123 -
124 - if ! use etc_profile; then
125 - rm "${ED}"/etc/profile.d/nix.sh || die
126 - fi
127 -}
128 -
129 -pkg_postinst() {
130 - if ! use etc_profile; then
131 - ewarn "${EROOT}etc/profile.d/nix.sh was removed (due to USE=-etc_profile)."
132 - fi
133 -
134 - readme.gentoo_print_elog
135 -}
136
137 diff --git a/sys-apps/nix/nix-1.11.6-r2.ebuild b/sys-apps/nix/nix-1.11.6-r3.ebuild
138 similarity index 96%
139 rename from sys-apps/nix/nix-1.11.6-r2.ebuild
140 rename to sys-apps/nix/nix-1.11.6-r3.ebuild
141 index c9c976b..d7eec9b 100644
142 --- a/sys-apps/nix/nix-1.11.6-r2.ebuild
143 +++ b/sys-apps/nix/nix-1.11.6-r3.ebuild
144 @@ -67,12 +67,12 @@ Next steps:
145 "
146
147 pkg_setup() {
148 - enewgroup nixbld 30000
149 + enewgroup nixbld
150 for i in {1..10}; do
151 # we list 'nixbld' twice to
152 # both assign a primary group for user
153 # and add an user to /etc/group
154 - enewuser nixbld${i} $((30000 +$i)) -1 /var/empty nixbld,nixbld
155 + enewuser nixbld${i} -1 -1 /var/empty nixbld,nixbld
156 done
157 }