1 |
commit: 008dca20d413d75867ec3959cbc6525926c7b9b3 |
2 |
Author: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Aug 31 20:22:15 2017 +0000 |
4 |
Commit: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Aug 31 20:23:01 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=008dca20 |
7 |
|
8 |
sys-apps/nix: bump up to 1.11.14 |
9 |
|
10 |
Package-Manager: Portage-2.3.8, Repoman-2.3.3 |
11 |
|
12 |
sys-apps/nix/Manifest | 1 + |
13 |
sys-apps/nix/files/nix-1.11.14-etc-fixes.patch | 8 ++ |
14 |
sys-apps/nix/files/nix-1.11.14-glibc-2.26.patch | 16 +++ |
15 |
sys-apps/nix/nix-1.11.14.ebuild | 135 ++++++++++++++++++++++++ |
16 |
4 files changed, 160 insertions(+) |
17 |
|
18 |
diff --git a/sys-apps/nix/Manifest b/sys-apps/nix/Manifest |
19 |
index 7e6ea0a73e8..3f4fb2cbe9d 100644 |
20 |
--- a/sys-apps/nix/Manifest |
21 |
+++ b/sys-apps/nix/Manifest |
22 |
@@ -1,3 +1,4 @@ |
23 |
DIST nix-1.11.11.tar.xz 625248 SHA256 f5b9da21fb412e4c35b6e2bc771cfbf4ca44746be5d99868ff29d6e7604760e5 SHA512 b4652755860637dae0eacab3c536c43bb835614a802fd0bcc606f6140ae3f5c4db312d30ecb20dad62732d47cafb8101a8760b321be5ec4b331f298c59a79e4e WHIRLPOOL d4d8fc1d868832a9a0ca131bf26cfdd566279be00b56cd40d6e3035935dbdb55d5a77e460e96e77636b60542cd085ccd4e97e15f3c219ddf794b67eb3f3fd2d5 |
24 |
DIST nix-1.11.12.tar.xz 631940 SHA256 02e8d85cfc02494fb04c90d8443dfea433639b9f787989b18f54567fd9769dd2 SHA512 fc2a06841cfa70c2d0b69315b0b8e30530e1b982e8a6b72e8f41c84db4efe7fc89738dce97f356f47d28518860990870fd54eb688704c531ba08231d2a3dd012 WHIRLPOOL b99e213e68cd479f9b6f8104e5f328c9bc409883aa1a88c155acf3f0a49ee95981f1774eff0d803b21182c0a087434a2910a9631dcaa97aae1847697473b27ea |
25 |
DIST nix-1.11.13.tar.xz 632224 SHA256 0913975e262f8069fde6e71a5fae757bb3aef558c51d1711034c525146ea5913 SHA512 7244b49a7c7416e6ecc7754abcf48028d650510ac27f26701ccc3954660e26ad8b083fdc4ae07de718d3df49ca2a6af3bf3261d537e962a90233f87b13cd1606 WHIRLPOOL a4af739a21e6080fccdfc885c24833e08765fae450fc7833484843f97fee7a4087619f67328075026b55efeda01a9cbf6bf80eb9918bdbbcee96414ee28d363c |
26 |
+DIST nix-1.11.14.tar.xz 632260 SHA256 26593c831addf1d40f6b7d131f394cb0f9fbec9e46471369faed16eaa2c4b7e4 SHA512 48ed17a090a161ad35c8e84652566e527f31586184b8722a5536a6d83eee1e81911b6c4d5f0661f57054db6c47b5d8211f2acf47899fbec72f2c4bf8a5262af5 WHIRLPOOL d6db1f452dd5bb430a0e02644af89a3e648f3f0f898b81b60ef4d7b8c8d7c9498c0992c3c33637eafd3ff1d23f55df3b76e1a1da957a0b7066a88e3eff1c35ef |
27 |
|
28 |
diff --git a/sys-apps/nix/files/nix-1.11.14-etc-fixes.patch b/sys-apps/nix/files/nix-1.11.14-etc-fixes.patch |
29 |
new file mode 100644 |
30 |
index 00000000000..07962838a22 |
31 |
--- /dev/null |
32 |
+++ b/sys-apps/nix/files/nix-1.11.14-etc-fixes.patch |
33 |
@@ -0,0 +1,8 @@ |
34 |
+diff --git a/scripts/nix-profile.sh.in b/scripts/nix-profile.sh.in |
35 |
+index 4f09b55..e93ef42 100644 |
36 |
+--- a/scripts/nix-profile.sh.in |
37 |
++++ b/scripts/nix-profile.sh.in |
38 |
+@@ -5,3 +5,2 @@ if [ -n "$HOME" ]; then |
39 |
+ if ! [ -L "$NIX_LINK" ]; then |
40 |
+- echo "creating $NIX_LINK" >&2 |
41 |
+ _NIX_DEF_LINK=@localstatedir@/nix/profiles/per-user/$USER/profile |
42 |
|
43 |
diff --git a/sys-apps/nix/files/nix-1.11.14-glibc-2.26.patch b/sys-apps/nix/files/nix-1.11.14-glibc-2.26.patch |
44 |
new file mode 100644 |
45 |
index 00000000000..44c995e3239 |
46 |
--- /dev/null |
47 |
+++ b/sys-apps/nix/files/nix-1.11.14-glibc-2.26.patch |
48 |
@@ -0,0 +1,16 @@ |
49 |
+'context' is no more after: |
50 |
+https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=251287734e89a52da3db682a8241eb6bccc050c9 |
51 |
+ |
52 |
+'ucontext_t' is the new name. |
53 |
+diff --git a/src/libmain/stack.cc b/src/libmain/stack.cc |
54 |
+index 41b617d..695aaad 100644 |
55 |
+--- a/src/libmain/stack.cc |
56 |
++++ b/src/libmain/stack.cc |
57 |
+@@ -22,5 +22,5 @@ static void sigsegvHandler(int signo, siginfo_t * info, void * ctx) |
58 |
+ #if defined(__x86_64__) && defined(REG_RSP) |
59 |
+- sp = (char *) ((ucontext *) ctx)->uc_mcontext.gregs[REG_RSP]; |
60 |
++ sp = (char *) ((ucontext_t *) ctx)->uc_mcontext.gregs[REG_RSP]; |
61 |
+ #elif defined(REG_ESP) |
62 |
+- sp = (char *) ((ucontext *) ctx)->uc_mcontext.gregs[REG_ESP]; |
63 |
++ sp = (char *) ((ucontext_t *) ctx)->uc_mcontext.gregs[REG_ESP]; |
64 |
+ #else |
65 |
|
66 |
diff --git a/sys-apps/nix/nix-1.11.14.ebuild b/sys-apps/nix/nix-1.11.14.ebuild |
67 |
new file mode 100644 |
68 |
index 00000000000..55f0dba8e52 |
69 |
--- /dev/null |
70 |
+++ b/sys-apps/nix/nix-1.11.14.ebuild |
71 |
@@ -0,0 +1,135 @@ |
72 |
+# Copyright 1999-2017 Gentoo Foundation |
73 |
+# Distributed under the terms of the GNU General Public License v2 |
74 |
+ |
75 |
+EAPI=6 |
76 |
+ |
77 |
+inherit autotools flag-o-matic readme.gentoo-r1 user |
78 |
+ |
79 |
+DESCRIPTION="A purely functional package manager" |
80 |
+HOMEPAGE="https://nixos.org/nix" |
81 |
+ |
82 |
+SRC_URI="http://nixos.org/releases/${PN}/${P}/${P}.tar.xz" |
83 |
+LICENSE="LGPL-2.1" |
84 |
+SLOT="0" |
85 |
+KEYWORDS="~amd64 ~x86" |
86 |
+IUSE="+etc_profile +gc doc sodium" |
87 |
+ |
88 |
+RDEPEND=" |
89 |
+ app-arch/bzip2 |
90 |
+ app-arch/xz-utils |
91 |
+ dev-db/sqlite |
92 |
+ dev-libs/openssl:0= |
93 |
+ net-misc/curl |
94 |
+ sys-libs/libseccomp |
95 |
+ sys-libs/zlib |
96 |
+ gc? ( dev-libs/boehm-gc[cxx] ) |
97 |
+ doc? ( dev-libs/libxml2 |
98 |
+ dev-libs/libxslt |
99 |
+ app-text/docbook-xsl-stylesheets |
100 |
+ ) |
101 |
+ sodium? ( dev-libs/libsodium ) |
102 |
+ dev-lang/perl:= |
103 |
+ dev-perl/DBD-SQLite |
104 |
+ dev-perl/WWW-Curl |
105 |
+ dev-perl/DBI |
106 |
+" |
107 |
+DEPEND="${RDEPEND} |
108 |
+ >=sys-devel/bison-2.6 |
109 |
+ >=sys-devel/flex-2.5.35 |
110 |
+ virtual/perl-ExtUtils-ParseXS |
111 |
+" |
112 |
+ |
113 |
+PATCHES=( |
114 |
+ "${FILESDIR}"/${PN}-1.11.6-systemd.patch |
115 |
+ "${FILESDIR}"/${PN}-1.11.6-per-user.patch |
116 |
+ "${FILESDIR}"/${PN}-1.11.6-respect-CXXFLAGS.patch |
117 |
+ "${FILESDIR}"/${PN}-1.11.6-respect-LDFLAGS.patch |
118 |
+ "${FILESDIR}"/${PN}-1.11.14-glibc-2.26.patch |
119 |
+) |
120 |
+ |
121 |
+DISABLE_AUTOFORMATTING=yes |
122 |
+DOC_CONTENTS=" Quick start user guide on Gentoo: |
123 |
+ |
124 |
+[as root] enable nix-daemon service: |
125 |
+ [systemd] # systemctl enable nix-daemon |
126 |
+ [openrc] # rc-update add nix-daemon |
127 |
+[as a user] relogin to get environment and profile update |
128 |
+[as a user] fetch nixpkgs update: |
129 |
+ \$ nix-channel --update |
130 |
+[as a user] install nix packages: |
131 |
+ \$ nix-env -i mc |
132 |
+[as a user] configure environment: |
133 |
+ Somewhere in .bash_profile you might want to set |
134 |
+ LOCALE_ARCHIVE=\$HOME/.nix-profile/lib/locale/locale-archive |
135 |
+ but please read https://github.com/NixOS/nixpkgs/issues/21820 |
136 |
+ |
137 |
+Next steps: |
138 |
+ nix package manager user manual: http://nixos.org/nix/manual/ |
139 |
+" |
140 |
+ |
141 |
+pkg_setup() { |
142 |
+ enewgroup nixbld |
143 |
+ for i in {1..10}; do |
144 |
+ # we list 'nixbld' twice to |
145 |
+ # both assign a primary group for user |
146 |
+ # and add a user to /etc/group |
147 |
+ enewuser nixbld${i} -1 -1 /var/empty nixbld,nixbld |
148 |
+ done |
149 |
+} |
150 |
+ |
151 |
+src_prepare() { |
152 |
+ default |
153 |
+ |
154 |
+ eautoreconf |
155 |
+} |
156 |
+ |
157 |
+src_configure() { |
158 |
+ econf \ |
159 |
+ --localstatedir="${EPREFIX}"/nix/var \ |
160 |
+ $(use_enable gc) |
161 |
+} |
162 |
+ |
163 |
+src_compile() { |
164 |
+ local make_vars=( |
165 |
+ OPTIMIZE=0 # disable hardcoded -O3 |
166 |
+ V=1 # verbose build |
167 |
+ ) |
168 |
+ emake "${make_vars[@]}" |
169 |
+} |
170 |
+ |
171 |
+src_install() { |
172 |
+ # TODO: emacs highlighter |
173 |
+ default |
174 |
+ |
175 |
+ readme.gentoo_create_doc |
176 |
+ |
177 |
+ # here we use an eager variant of something that |
178 |
+ # is lazily done by nix-daemon and root nix-env |
179 |
+ |
180 |
+ # TODO: will need a tweak for prefix |
181 |
+ keepdir /nix/store |
182 |
+ fowners root:nixbld /nix/store |
183 |
+ fperms 1775 /nix/store |
184 |
+ |
185 |
+ keepdir /nix/var/nix/profiles/per-user |
186 |
+ fperms 1777 /nix/var/nix/profiles/per-user |
187 |
+ |
188 |
+ # setup directories nix-daemon: /etc/profile.d/nix-daemon.sh |
189 |
+ keepdir /nix/var/nix/gcroots/per-user |
190 |
+ fperms 1777 /nix/var/nix/gcroots/per-user |
191 |
+ |
192 |
+ newinitd "${FILESDIR}"/nix-daemon.initd nix-daemon |
193 |
+ |
194 |
+ if ! use etc_profile; then |
195 |
+ rm "${ED}"/etc/profile.d/nix.sh || die |
196 |
+ rm "${ED}"/etc/profile.d/nix-daemon.sh || die |
197 |
+ fi |
198 |
+} |
199 |
+ |
200 |
+pkg_postinst() { |
201 |
+ if ! use etc_profile; then |
202 |
+ ewarn "${EROOT}etc/profile.d/nix.sh was removed (due to USE=-etc_profile)." |
203 |
+ fi |
204 |
+ |
205 |
+ readme.gentoo_print_elog |
206 |
+} |