1 |
commit: c8201ea8137e8eaf93f6819bf1f627c94492c9df |
2 |
Author: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Oct 2 21:28:49 2018 +0000 |
4 |
Commit: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Oct 2 21:29:17 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c8201ea8 |
7 |
|
8 |
sys-apps/nix: bump up to 2.1.3 |
9 |
|
10 |
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org> |
11 |
Package-Manager: Portage-2.3.50, Repoman-2.3.11 |
12 |
|
13 |
sys-apps/nix/Manifest | 1 + |
14 |
sys-apps/nix/nix-2.1.3.ebuild | 135 ++++++++++++++++++++++++++++++++++++++++++ |
15 |
2 files changed, 136 insertions(+) |
16 |
|
17 |
diff --git a/sys-apps/nix/Manifest b/sys-apps/nix/Manifest |
18 |
index 10ba24314e9..11bfeca86d5 100644 |
19 |
--- a/sys-apps/nix/Manifest |
20 |
+++ b/sys-apps/nix/Manifest |
21 |
@@ -1,3 +1,4 @@ |
22 |
DIST nix-2.0.2.tar.xz 796404 BLAKE2B 0906488bf2c800544c0747a6860ef51f667467f50039f725cf6ec05b8389462fe073bddceba106922a7611fd784b58ed5ca321efba0065b0f424aa53d7620990 SHA512 605e2c6dbc814470c25aa4f0aca77bfd11fd6d5c263ef38915cb9b852e77bcff08d515e76de8d929c9eacd02ffeaa5dd5f6b337461d54a1b2648b1fc505c98fa |
23 |
DIST nix-2.0.4.tar.xz 798352 BLAKE2B 0eaf7e507c87e5398ab5967e1f2064a5827038bb84208768aa1c1deadc95e44aab922846b728467e3355d1f25e740590c3d1748ec05dfeae6a171952fd941b77 SHA512 bce3b3a14269d42648a4935770260c36dab25fde3ebcfed730063d1d139603468e1c30acf15eb0cffff617fa36a6b39d4ae31ccfd9cba762f631ecac213fd09a |
24 |
DIST nix-2.1.2.tar.xz 816492 BLAKE2B 21365f2f7a88456aa566882780a65cabc190789e8e0f0aa62838bd7c9e2326c59776d78c6eaa4a2836039d02d6899114d5bc236bfadff5a2ef329531873e9e85 SHA512 6d54612f911438d5094c9d41fbf43ba4d8cada1da2b3eddbf7a3309262f9a9e94a2a826bb45247d5766bd6a419456ecdca5a8bebccff12607ebe004328bbc76a |
25 |
+DIST nix-2.1.3.tar.xz 816396 BLAKE2B 9627626075841e7f389f5010418fe17569ae69ea07de5ff9a0557df864052cc8b48f2a4dbfe16dffc5dca3fb180f527199f367810899ae9474d00e8fcc00b760 SHA512 d22718d23d8960dac7d07739835caa8183f573b303d77613e77314d873c1fe6da1cb0ed78337fe3219a94675307b23132a62ae7d9aa5354707e58400f403524b |
26 |
|
27 |
diff --git a/sys-apps/nix/nix-2.1.3.ebuild b/sys-apps/nix/nix-2.1.3.ebuild |
28 |
new file mode 100644 |
29 |
index 00000000000..a104f3b883a |
30 |
--- /dev/null |
31 |
+++ b/sys-apps/nix/nix-2.1.3.ebuild |
32 |
@@ -0,0 +1,135 @@ |
33 |
+# Copyright 1999-2018 Gentoo Authors |
34 |
+# Distributed under the terms of the GNU General Public License v2 |
35 |
+ |
36 |
+EAPI=7 |
37 |
+ |
38 |
+inherit autotools flag-o-matic readme.gentoo-r1 user |
39 |
+ |
40 |
+DESCRIPTION="A purely functional package manager" |
41 |
+HOMEPAGE="https://nixos.org/nix" |
42 |
+ |
43 |
+SRC_URI="http://nixos.org/releases/${PN}/${P}/${P}.tar.xz" |
44 |
+LICENSE="LGPL-2.1" |
45 |
+SLOT="0" |
46 |
+#keywords are blocked by boost-1.66 |
47 |
+#KEYWORDS="~amd64 ~x86" |
48 |
+IUSE="+etc_profile +gc doc sodium" |
49 |
+ |
50 |
+RDEPEND=" |
51 |
+ app-arch/brotli |
52 |
+ app-arch/bzip2 |
53 |
+ app-arch/xz-utils |
54 |
+ dev-db/sqlite |
55 |
+ dev-libs/openssl:0= |
56 |
+ >=dev-libs/boost-1.66:0=[context] |
57 |
+ net-misc/curl |
58 |
+ sys-libs/libseccomp |
59 |
+ sys-libs/zlib |
60 |
+ gc? ( dev-libs/boehm-gc[cxx] ) |
61 |
+ doc? ( dev-libs/libxml2 |
62 |
+ dev-libs/libxslt |
63 |
+ app-text/docbook-xsl-stylesheets |
64 |
+ ) |
65 |
+ sodium? ( dev-libs/libsodium:0= ) |
66 |
+" |
67 |
+DEPEND="${RDEPEND} |
68 |
+ >=sys-devel/bison-2.6 |
69 |
+ >=sys-devel/flex-2.5.35 |
70 |
+" |
71 |
+ |
72 |
+PATCHES=( |
73 |
+ "${FILESDIR}"/${PN}-1.11.6-systemd.patch |
74 |
+ "${FILESDIR}"/${PN}-1.11.6-respect-CXXFLAGS.patch |
75 |
+ "${FILESDIR}"/${PN}-1.11.6-respect-LDFLAGS.patch |
76 |
+ "${FILESDIR}"/${PN}-2.0-user-path.patch |
77 |
+) |
78 |
+ |
79 |
+DISABLE_AUTOFORMATTING=yes |
80 |
+DOC_CONTENTS=" Quick start user guide on Gentoo: |
81 |
+ |
82 |
+[as root] enable nix-daemon service: |
83 |
+ [systemd] # systemctl enable nix-daemon |
84 |
+ [openrc] # rc-update add nix-daemon |
85 |
+[as a user] relogin to get environment and profile update |
86 |
+[as a user] fetch nixpkgs update: |
87 |
+ \$ nix-channel --update |
88 |
+[as a user] install nix packages: |
89 |
+ \$ nix-env -i mc |
90 |
+[as a user] configure environment: |
91 |
+ Somewhere in .bash_profile you might want to set |
92 |
+ LOCALE_ARCHIVE=\$HOME/.nix-profile/lib/locale/locale-archive |
93 |
+ but please read https://github.com/NixOS/nixpkgs/issues/21820 |
94 |
+ |
95 |
+Next steps: |
96 |
+ nix package manager user manual: http://nixos.org/nix/manual/ |
97 |
+" |
98 |
+ |
99 |
+pkg_setup() { |
100 |
+ enewgroup nixbld |
101 |
+ for i in {1..10}; do |
102 |
+ # we list 'nixbld' twice to |
103 |
+ # both assign a primary group for user |
104 |
+ # and add a user to /etc/group |
105 |
+ enewuser nixbld${i} -1 -1 /var/empty nixbld,nixbld |
106 |
+ done |
107 |
+} |
108 |
+ |
109 |
+src_prepare() { |
110 |
+ default |
111 |
+ |
112 |
+ eautoreconf |
113 |
+} |
114 |
+ |
115 |
+src_configure() { |
116 |
+ econf \ |
117 |
+ --localstatedir="${EPREFIX}"/nix/var \ |
118 |
+ $(use_enable gc) |
119 |
+} |
120 |
+ |
121 |
+src_compile() { |
122 |
+ local make_vars=( |
123 |
+ OPTIMIZE=0 # disable hardcoded -O3 |
124 |
+ V=1 # verbose build |
125 |
+ ) |
126 |
+ emake "${make_vars[@]}" |
127 |
+} |
128 |
+ |
129 |
+src_install() { |
130 |
+ # TODO: emacs highlighter |
131 |
+ default |
132 |
+ |
133 |
+ readme.gentoo_create_doc |
134 |
+ |
135 |
+ # here we use an eager variant of something that |
136 |
+ # is lazily done by nix-daemon and root nix-env |
137 |
+ |
138 |
+ # TODO: will need a tweak for prefix |
139 |
+ keepdir /nix/store |
140 |
+ fowners root:nixbld /nix/store |
141 |
+ fperms 1775 /nix/store |
142 |
+ |
143 |
+ keepdir /nix/var/nix/channel-cache |
144 |
+ fperms 0777 /nix/var/nix/channel-cache |
145 |
+ |
146 |
+ keepdir /nix/var/nix/profiles/per-user |
147 |
+ fperms 1777 /nix/var/nix/profiles/per-user |
148 |
+ |
149 |
+ # setup directories nix-daemon: /etc/profile.d/nix-daemon.sh |
150 |
+ keepdir /nix/var/nix/gcroots/per-user |
151 |
+ fperms 1777 /nix/var/nix/gcroots/per-user |
152 |
+ |
153 |
+ newinitd "${FILESDIR}"/nix-daemon.initd nix-daemon |
154 |
+ |
155 |
+ if ! use etc_profile; then |
156 |
+ rm "${ED}"/etc/profile.d/nix.sh || die |
157 |
+ rm "${ED}"/etc/profile.d/nix-daemon.sh || die |
158 |
+ fi |
159 |
+} |
160 |
+ |
161 |
+pkg_postinst() { |
162 |
+ if ! use etc_profile; then |
163 |
+ ewarn "${EROOT}etc/profile.d/nix.sh was removed (due to USE=-etc_profile)." |
164 |
+ fi |
165 |
+ |
166 |
+ readme.gentoo_print_elog |
167 |
+} |