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/guix/
Date: Fri, 06 Jul 2018 22:33:22
Message-Id: 1530916388.8a8acff70a555851946a478742ca154372a8e041.slyfox@gentoo
1 commit: 8a8acff70a555851946a478742ca154372a8e041
2 Author: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
3 AuthorDate: Fri Jul 6 21:20:59 2018 +0000
4 Commit: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
5 CommitDate: Fri Jul 6 22:33:08 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8a8acff7
7
8 sys-apps/guix: bump up to 0.15.0
9
10 Package-Manager: Portage-2.3.41, Repoman-2.3.9
11
12 sys-apps/guix/Manifest | 1 +
13 sys-apps/guix/guix-0.15.0.ebuild | 151 +++++++++++++++++++++++++++++++++++++++
14 2 files changed, 152 insertions(+)
15
16 diff --git a/sys-apps/guix/Manifest b/sys-apps/guix/Manifest
17 index 72cad7890cc..df9a23319f5 100644
18 --- a/sys-apps/guix/Manifest
19 +++ b/sys-apps/guix/Manifest
20 @@ -1,5 +1,6 @@
21 DIST guix-0.13.0.tar.gz 18490387 BLAKE2B e146f7a414f91076eafebe122c0abd772c1c2a562da015e952f978e97528c099905c1e7157e659633e644cbbd7066feac021550d52cb76d5999ff464fb685f2f SHA512 39d4e627f69850da650448b72008c1b73cbda0286d6b805bb1ea14d72eb49c5f6bdf30755b791a8b9cbb94e91ce8c1f360963250587591ce1a47db457c901daf
22 DIST guix-0.14.0.tar.gz 19852695 BLAKE2B 257050ebebc35e7d6c82a30c3bb974da3d3eae9ca7c95dd8d98da6c60a68585330e5665b5343738188a058d84217d3c85731492e16afbd80c23771d40725b31c SHA512 635f6131c3ffa1ea5d18500fabc1d9d86d604a5cd3c8134d0f99dc44e171eef5d15f7ffa008c0e0726cf93fd0886afff0e9a5949014545d6919f8e8dba80eb69
23 +DIST guix-0.15.0.tar.gz 22704560 BLAKE2B 6abd50c0436abedaa3a20ba9649ccf8af0efeeac8d975171befb4e9a231be99bfcebed34f08d66b4ddaedfd64a9916f176e96bf810dba3bbc13cc6856828b5be SHA512 5e85ed03cde979d625df11d02d4f2ac7128bd944d11a763754e10a8e980f1eaeb721053fa12547bbc4289b33b3c7818bf992c7bfe79233f3a9555c96b8d52d7f
24 DIST guix-bootstrap-aarch64-linux-20170217-guile-2.0.14.tar.xz.bootstrap 2948976 BLAKE2B 3337e52c2db259af98a6ed0eb418a6cd388e11e09c277c460e14edb7065d0170fd544415ccb72db1b1b2559fe700ce313698aed11846271052460f9af51f499a SHA512 b3a5b457017357dedb71db98ef089ac90ca2b88ec5dbf0cec6c829dff7167c5478797a8d14850dd2d951713632c2859950be6c5eb029e6f6c224eecef97efd27
25 DIST guix-bootstrap-armhf-linux-20150101-guile-2.0.11.tar.xz.bootstrap 2717576 BLAKE2B b7461803f0b3943ef1c855b02f4eef55ef96479cd453fb7ee11518159deca65f741d9c3384598a2fdb0b05b7a9023fb6983a5a3a6ccc204b0c6ac1328f3203cc SHA512 d546e2c0f676a49af482caae6f5575c7937647a81d37e49ad8be6fe12d58989cb825b5e12f2da28aff4649ee1a198ffb8f4a0beea65835a60aefaa905e87e337
26 DIST guix-bootstrap-i686-linux-20131110-guile-2.0.9.tar.xz.bootstrap 2656076 BLAKE2B a2c0c82ac3ba4ff5265a506bbe644dc6a61a38cec243e34e8d3bde2d543a4d7221aa921f57f057eb5379aea4e9fd462f0bee7df7e61e4e6381c93401948a9b11 SHA512 f2b257e5b10dcd7421273d8d04782a2bd733781094dd963bf5bd8294604dbd158ea25cbc383a227edce84de968a962ec834226ebdd137a2e1857e2191bfada8c
27
28 diff --git a/sys-apps/guix/guix-0.15.0.ebuild b/sys-apps/guix/guix-0.15.0.ebuild
29 new file mode 100644
30 index 00000000000..45aca6b4d2c
31 --- /dev/null
32 +++ b/sys-apps/guix/guix-0.15.0.ebuild
33 @@ -0,0 +1,151 @@
34 +# Copyright 1999-2018 Gentoo Foundation
35 +# Distributed under the terms of the GNU General Public License v2
36 +
37 +EAPI=6
38 +
39 +inherit autotools readme.gentoo-r1 user
40 +
41 +DESCRIPTION="GNU package manager (nix sibling)"
42 +HOMEPAGE="https://www.gnu.org/software/guix/"
43 +
44 +# taken from gnu/local.mk and gnu/packages/bootstrap.scm
45 +BOOT_GUILE=(
46 + "aarch64-linux 20170217 guile-2.0.14.tar.xz"
47 + "armhf-linux 20150101 guile-2.0.11.tar.xz"
48 + "i686-linux 20131110 guile-2.0.9.tar.xz"
49 + "mips64el-linux 20131110 guile-2.0.9.tar.xz"
50 + "x86_64-linux 20131110 guile-2.0.9.tar.xz"
51 +)
52 +
53 +binary_src_uris() {
54 + local system_date_guilep uri
55 + for system_date_guilep in "${BOOT_GUILE[@]}"; do
56 + # $1 $2 $3
57 + # "armhf-linux 20150101 guile-2.0.11.tar.xz"
58 + set -- ${system_date_guilep}
59 + uri="mirror://gnu-alpha/${PN}/bootstrap/$1/$2/$3"
60 + # ${uri} -> guix-bootstrap-armhf-linux-20150101-guile-2.0.11.tar.xz.bootstrap
61 + echo "${uri} -> guix-bootstrap-$1-$2-$3.bootstrap"
62 + done
63 +}
64 +
65 +# copy bootstrap binaries from DISTDIR to ${S}
66 +copy_boot_guile_binaries() {
67 + local system_date_guilep
68 + for system_date_guilep in "${BOOT_GUILE[@]}"; do
69 + # $1 $2 $3
70 + # "armhf-linux 20150101 guile-2.0.11.tar.xz"
71 + set -- ${system_date_guilep}
72 + cp "${DISTDIR}"/guix-bootstrap-$1-$2-$3.bootstrap gnu/packages/bootstrap/$1/$3 || die
73 + done
74 +}
75 +
76 +SRC_URI="mirror://gnu-alpha/${PN}/${P}.tar.gz
77 + $(binary_src_uris)"
78 +
79 +LICENSE="GPL-3"
80 +SLOT="0"
81 +KEYWORDS="~amd64 ~x86"
82 +IUSE=""
83 +
84 +RESTRICT=test # complains about size of config.log and refuses to start tests
85 +
86 +RDEPEND="
87 + dev-libs/libgcrypt:0=
88 + >=dev-scheme/guile-2:=[regex,networking,threads]
89 + dev-scheme/bytestructures
90 + dev-scheme/guile-git
91 + dev-scheme/guile-json
92 + dev-scheme/guile-sqlite3
93 + net-libs/gnutls[guile]
94 + sys-libs/zlib
95 + app-arch/bzip2
96 + dev-db/sqlite
97 +"
98 +
99 +DEPEND="${RDEPEND}
100 +"
101 +
102 +PATCHES=("${FILESDIR}"/${PN}-0.13.0-default-daemon.patch)
103 +
104 +QA_PREBUILT="usr/share/guile/site/*/gnu/packages/bootstrap/*"
105 +
106 +DISABLE_AUTOFORMATTING=yes
107 +DOC_CONTENTS="Quick start user guide on Gentoo:
108 +
109 +[as root] allow binary substitution to be downloaded (optional)
110 + # guix archive --authorize < /usr/share/guix/hydra.gnu.org.pub
111 +[as root] enable guix-daemon service:
112 + [systemd] # systemctl enable guix-daemon
113 + [openrc] # rc-update add guix-daemon
114 +[as a user] ln -sf /var/guix/profiles/per-user/\$USER/guix-profile \$HOME/.guix-profile
115 +[as a user] install guix packages:
116 + \$ guix package -i hello
117 +[as a user] configure environment:
118 + Somewhere in .bash_profile you might want to set
119 + export GUIX_LOCPATH=\$HOME/.guix-profile/lib/locale
120 +
121 +Next steps:
122 + guix package manager user manual: https://www.gnu.org/software/guix/manual/guix.html
123 +"
124 +
125 +pkg_setup() {
126 + enewgroup guixbuild
127 + for i in {1..10}; do
128 + # we list 'guixbuild' twice to
129 + # both assign a primary group for user
130 + # and add a user to /etc/group
131 + enewuser guixbuilder${i} -1 -1 /var/empty guixbuild,guixbuild
132 + done
133 +}
134 +
135 +src_prepare() {
136 + copy_boot_guile_binaries
137 +
138 + default
139 + # build system is very eager to run automake itself: bug #625166
140 + eautoreconf
141 +
142 + # guile is trying to avoid recompilation by checking if file
143 + # /usr/lib64/guile/2.2/site-ccache/guix/modules.go
144 + # is newer than
145 + # guix/modules.scm
146 + # In case it is instead of using 'guix/modules.scm' guile
147 + # loads system one (from potentially older version of guix).
148 + # To work it around we bump last modification timestamp of
149 + # '*.scm' files.
150 + find "${S}" -name "*.scm" -exec touch {} + || die
151 +}
152 +
153 +src_configure() {
154 + # to be compatible with guix from /gnu/store
155 + econf \
156 + --localstatedir="${EPREFIX}"/var
157 +}
158 +
159 +src_compile() {
160 + # guile occasionally fails with 'bad address'
161 + emake -j1
162 +}
163 +
164 +src_install() {
165 + # TODO: emacs highlighter
166 + default
167 +
168 + readme.gentoo_create_doc
169 +
170 + keepdir /etc/guix
171 + # TODO: will need a tweak for prefix
172 + keepdir /gnu/store
173 + fowners root:guixbuild /gnu/store
174 + fperms 1775 /gnu/store
175 +
176 + keepdir /var/guix/profiles/per-user
177 + fperms 1777 /var/guix/profiles/per-user
178 +
179 + newinitd "${FILESDIR}"/guix-daemon.initd guix-daemon
180 +}
181 +
182 +pkg_postinst() {
183 + readme.gentoo_print_elog
184 +}