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