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