summaryrefslogtreecommitdiff
path: root/sys-apps/guix
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /sys-apps/guix
reinit the tree, so we can have metadata
Diffstat (limited to 'sys-apps/guix')
-rw-r--r--sys-apps/guix/Manifest14
-rw-r--r--sys-apps/guix/files/guix-0.12.0-AR.patch8
-rw-r--r--sys-apps/guix/files/guix-0.12.0-no-json-crate.patch38
-rw-r--r--sys-apps/guix/files/guix-0.13.0-default-daemon.patch74
-rw-r--r--sys-apps/guix/files/guix-daemon.initd15
-rw-r--r--sys-apps/guix/guix-0.12.0-r3.ebuild139
-rw-r--r--sys-apps/guix/guix-0.13.0.ebuild138
-rw-r--r--sys-apps/guix/metadata.xml8
8 files changed, 434 insertions, 0 deletions
diff --git a/sys-apps/guix/Manifest b/sys-apps/guix/Manifest
new file mode 100644
index 000000000000..f261955711cf
--- /dev/null
+++ b/sys-apps/guix/Manifest
@@ -0,0 +1,14 @@
+AUX guix-0.12.0-AR.patch 245 SHA256 8c7dbdbdb7cffb49586ce7d67f07a571ace686c252753e8e8709911e82126309 SHA512 a8249858c77f7e3485d2851bdfd914fe45d0243087558a8155e941925d5b76adb4f9f5f7b380baf865158f2bbc8f3aa8a0d8901ea86baf5c3056ee548216723d WHIRLPOOL 1270efc659d9245bb7ae589fd7963dfe4d7d4d4ea0d131113df083d124438405f2d0be3b4a69efc588175016bfd3325178a76d0a2b988532e54cd9f7d8a226fb
+AUX guix-0.12.0-no-json-crate.patch 1234 SHA256 b5eb382299c0121b540bb3c235714e40e4c102ad84fc24218bdfd7e1466626d2 SHA512 6c382181a7598ddb889be2cee712ebfe852b422c1f55c1e298658fd0a3270265dfeaff07d07eaf87c3e1fa79c35dc82d1d3e998413f0cabdfdda85ae56ff005d WHIRLPOOL 2b707e06bf1cdd266335b0a7a5412856f152e6d2f3e6944c82ed3058c198b111250e18f9b0304b6d0f08e5f17f4a942955045d586ff0fb142389331f5f483882
+AUX guix-0.13.0-default-daemon.patch 2888 SHA256 b792c0def73147d4afdbbc5f99cbf56eb97c1df76182e83bf985ee639b43763a SHA512 011e047be6634f6e8b8fce46330c42571b505e05b1c5dcae40889bace64c7211af17d48ec4b817f46d3f9bf6109cb7bfce67823fd4add93e707d1aa8fec0dfcd WHIRLPOOL 5f303ed858f4cf7613733d3a615cba4aec7402e3dcfd3758a6c6d6d6c7616bf7fb1eb81cc4f6b889cbecf2a1c98b7b955d9bbba31a9338c066fd618ea2f2a52f
+AUX guix-daemon.initd 404 SHA256 ddab99591877fe0e794766e9fd8c1f603f6b8063d1d31a875af136a42ee62179 SHA512 546e322b593cfd71d295b6f19fb336c988f05b1a459ca4b776c6aa129cfdec0004c85aee983cd7536a1bdd14e3edfcb25574b79a76a8134328c72fb1c83c8278 WHIRLPOOL 6f57606f1987cd53e246aaf72810734bd3a3fa3dbe7b501f8e71f51e04813b6b15c84389b44ffba6e9551c5c7bb8a000fdc2c1fddd240ddf42d688b0e07a7af4
+DIST guix-0.12.0.tar.gz 15823786 SHA256 6201e21186a7098af256d97562662d95353b1047799b9b216e1dd6e7692dfec9 SHA512 d61cb289d3773977400fa3c49869f30a3feb5e0364368017b9b8eaadee814c5c31897be398d6ff142349337334eb51cb6d0354bee27c0365de69ce1a09e858d3 WHIRLPOOL 9515967a05a449f24da49e95340a60fb91cc471fcc532ce6cfaaea82c9161e3a65a1adc4d95e9997f019565243ca385845edc484981adfc5956112092687a0ec
+DIST guix-0.13.0.tar.gz 18490387 SHA256 b28d52c25ba2fff53be51d7b0027f69ca52416c26b4a0100a40221b73d63a3be SHA512 39d4e627f69850da650448b72008c1b73cbda0286d6b805bb1ea14d72eb49c5f6bdf30755b791a8b9cbb94e91ce8c1f360963250587591ce1a47db457c901daf WHIRLPOOL 365b1a74fe63bbb30605b13697d13703cbc10d12af925baefedb74d0694329ca1219630b9931e07394404c41c79d48554b61af57d408d0bdfa753e4055e0093a
+DIST guix-bootstrap-aarch64-linux-20170217-guile-2.0.14.tar.xz.bootstrap 2948976 SHA256 3939909f24dcb955621aa7f81ecde6844bea8a083969c2d275c55699af123ebe SHA512 b3a5b457017357dedb71db98ef089ac90ca2b88ec5dbf0cec6c829dff7167c5478797a8d14850dd2d951713632c2859950be6c5eb029e6f6c224eecef97efd27 WHIRLPOOL 12c7a27f1fcc6491f95fb663bf630b844a33068460a71827cf67e2cfb579ba4021d7cc41b151b4d9073a9ec3b1406688426c8d8b998163b2e01ad473a0b16b96
+DIST guix-bootstrap-armhf-linux-20150101-guile-2.0.11.tar.xz.bootstrap 2717576 SHA256 e551d05d4d385d6706ab8d574856a087758294dc90ab4c06e70a157a685e23d6 SHA512 d546e2c0f676a49af482caae6f5575c7937647a81d37e49ad8be6fe12d58989cb825b5e12f2da28aff4649ee1a198ffb8f4a0beea65835a60aefaa905e87e337 WHIRLPOOL c8aa4c4743768477d3a495fbdbe9d4818e9860411f4df73843a149c8659105f921501d0a5dfc2d121fa872a23f543174c84f864dce1eff69d175c456bdb5efb9
+DIST guix-bootstrap-i686-linux-20131110-guile-2.0.9.tar.xz.bootstrap 2656076 SHA256 b757cd46bf13ecac83fb8e955fb50096ac2d17bb610ca8eb816f29302a00a846 SHA512 f2b257e5b10dcd7421273d8d04782a2bd733781094dd963bf5bd8294604dbd158ea25cbc383a227edce84de968a962ec834226ebdd137a2e1857e2191bfada8c WHIRLPOOL 270f3602e8ea10f28ab003aed28b3d19ab971c69029d1d71f7fe9601d5120222baf245e3e48910dbeedf1469227d59beb8190f23bdd2ef070390467e3f49b8c9
+DIST guix-bootstrap-mips64el-linux-20131110-guile-2.0.9.tar.xz.bootstrap 2734180 SHA256 994680f0001346864aa2c2cc5110f380ee7518dcd701c614291682b8e948f73b SHA512 8c4be098a31f63d56e7d35c174ce4095ba8317662c365d44c005980b38ba499461926754a4659e699ab271bb841c9da514f1a36b812d881c212a5f12177d73c0 WHIRLPOOL f247e65cc558057ba65aa7c554f07d9ec76de2fcc4828038b1d1d89b8c5449a803fd7942812e85fced8200f1af5d981b5cff7fa53cd026335c0ba906ced251f4
+DIST guix-bootstrap-x86_64-linux-20131110-guile-2.0.9.tar.xz.bootstrap 2885996 SHA256 037b103522a2d0d7d69c7ffd8de683dfe5bb4b59c1fafd70b4ffd397fd2f57f0 SHA512 96efc583f42f6c7647bc026e2d2a96d603e7bea12ca02f6bcc65e819b9966082ac4c9f7e42f64536ff42a988e4766e695d87a82c73dd97d80745975a05badb23 WHIRLPOOL 61b623c961dc3b9f4c59f4d208c1302ea98d640b915cc53dce90551c3f48f9844381bb674d4d835421a44a71d903dc90c38a0f7a17ccc049ec388a4e948239b6
+EBUILD guix-0.12.0-r3.ebuild 3445 SHA256 7cd6f8faa8a5640fc5f780db7a0c065030a9f8e65537861a57ce36323101de0b SHA512 a6d02045dff6a3c0b0aa5a778a70af7b14e0163b400107a88d90ab245fac26bd85e645a972e43732fb862d546ce00143af161edce297f86cb72ab147d5ffce12 WHIRLPOOL d3bd6c27fa397655980efbd639e93ced8a1d469107d282248d2d934cab23f55d2ef94459074b4405e479c00ff37caefc08744f4f77dc56813b13351736255097
+EBUILD guix-0.13.0.ebuild 3583 SHA256 66d26a746b7452cb74bcfa8ec30aade4da5eb6950b8af3b3fb7b097f15426df0 SHA512 1aa470bfb7c4403ecf21973aab4167c7dec55b33098baa9c4d7019ead3d7ca5cd5487d4b387aafc631ccfd9ebe6b839e6cb81f048aa752fdb94eebd602aca322 WHIRLPOOL 0529540f2971951b9096007e5e35362f62c26d6426739f4177151eaebfaa5c4f7fe45d9f6a25515e39001d43c6d0e93a2f047114993d6bf02d98dd80a6c9d6a7
+MISC metadata.xml 251 SHA256 90d6112ae9e256cc0e1e136cbc0f06790773deb619f29ffb87301cddd9b96750 SHA512 cc2bd3977894946ee4ea5b739cc3998bcd6017b9e7a52aa501409d0988954339a9a22fe751d0a5e967ddac9225d9b23f20b4fb1e2c62ee91d1d23c383d9776dd WHIRLPOOL 7fb42bdc9d6347bdf289087e631f6d6e7cf683679af236bf343f2d1e3213e999372123a46d339bcc559dfd0af8e41d75a56a76b60d67ef936bdc973ebfff1bf0
diff --git a/sys-apps/guix/files/guix-0.12.0-AR.patch b/sys-apps/guix/files/guix-0.12.0-AR.patch
new file mode 100644
index 000000000000..c9c91c20734c
--- /dev/null
+++ b/sys-apps/guix/files/guix-0.12.0-AR.patch
@@ -0,0 +1,8 @@
+diff --git a/config-daemon.ac b/config-daemon.ac
+index 056c939..b04deed 100644
+--- a/config-daemon.ac
++++ b/config-daemon.ac
+@@ -7,2 +7,3 @@ dnl C++ environment. This macro must be used unconditionnaly.
+ AC_PROG_CXX
++AM_PROG_AR
+ AC_LANG([C++])
diff --git a/sys-apps/guix/files/guix-0.12.0-no-json-crate.patch b/sys-apps/guix/files/guix-0.12.0-no-json-crate.patch
new file mode 100644
index 000000000000..57b4308a3a89
--- /dev/null
+++ b/sys-apps/guix/files/guix-0.12.0-no-json-crate.patch
@@ -0,0 +1,38 @@
+commit 6023041346c79f7ac4105bba2552a82019fae840
+Author: David Thompson <davet@gnu.org>
+Date: Fri Dec 30 14:15:35 2016 -0500
+
+ import: crate: Do not build when guile-json is not available.
+
+ * Makefile.am (MODULES): Add 'guix/import/crate.scm' and
+ 'guix/scripts/import/crate.scm' only when HAVE_GUILE_JSON.
+
+diff --git a/Makefile.am b/Makefile.am
+index 15939af12..97629f26e 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -122,7 +122,6 @@ MODULES = \
+ guix/import/snix.scm \
+ guix/import/cabal.scm \
+ guix/import/cran.scm \
+- guix/import/crate.scm \
+ guix/import/hackage.scm \
+ guix/import/elpa.scm \
+ guix/scripts.scm \
+@@ -142,7 +141,6 @@ MODULES = \
+ guix/scripts/lint.scm \
+ guix/scripts/challenge.scm \
+ guix/scripts/import/cran.scm \
+- guix/scripts/import/crate.scm \
+ guix/scripts/import/gnu.scm \
+ guix/scripts/import/nix.scm \
+ guix/scripts/import/hackage.scm \
+@@ -162,6 +160,8 @@ if HAVE_GUILE_JSON
+ MODULES += \
+ guix/import/github.scm \
+ guix/import/json.scm \
++ guix/import/crate.scm \
++ guix/scripts/import/crate.scm \
+ guix/import/pypi.scm \
+ guix/scripts/import/pypi.scm \
+ guix/import/cpan.scm \
diff --git a/sys-apps/guix/files/guix-0.13.0-default-daemon.patch b/sys-apps/guix/files/guix-0.13.0-default-daemon.patch
new file mode 100644
index 000000000000..7a02f7021159
--- /dev/null
+++ b/sys-apps/guix/files/guix-0.13.0-default-daemon.patch
@@ -0,0 +1,74 @@
+Don't require user to create profile manually even before guix-daemon runs.
+
+Default install should provide working basic environment.
+
+Revert "build: Don't embed absolute paths in .service and .conf service files."
+This reverts commit 613d0895b92c677e0639d5e77c55043e38e020c8.
+diff --git a/etc/guix-daemon.conf.in b/etc/guix-daemon.conf.in
+index 09c70cde3..8f833cb69 100644
+--- a/etc/guix-daemon.conf.in
++++ b/etc/guix-daemon.conf.in
+@@ -9,4 +9,4 @@ stop on runlevel [016]
+
+ task
+
+-exec @localstatedir@/guix/profiles/per-user/root/guix-profile/bin/guix-daemon --build-users-group=guixbuild
++exec @bindir@/guix-daemon --build-users-group=guixbuild
+diff --git a/etc/guix-daemon.service.in b/etc/guix-daemon.service.in
+index 988cf90c0..7a3f02b27 100644
+--- a/etc/guix-daemon.service.in
++++ b/etc/guix-daemon.service.in
+@@ -6,7 +6,7 @@
+ Description=Build daemon for GNU Guix
+
+ [Service]
+-ExecStart=@localstatedir@/guix/profiles/per-user/root/guix-profile/bin/guix-daemon --build-users-group=guixbuild
++ExecStart=@bindir@/guix-daemon --build-users-group=guixbuild
+ Environment=GUIX_LOCPATH=/root/.guix-profile/lib/locale
+ RemainAfterExit=yes
+ StandardOutput=syslog
+diff --git a/etc/guix-publish.conf.in b/etc/guix-publish.conf.in
+index 241c59455..498fa295b 100644
+--- a/etc/guix-publish.conf.in
++++ b/etc/guix-publish.conf.in
+@@ -9,4 +9,4 @@ stop on runlevel [016]
+
+ task
+
+-exec @localstatedir@/guix/profiles/per-user/root/guix-profile/bin/guix publish --user=nobody --port=8181
++exec @bindir@/guix publish --user=nobody --port=8181
+diff --git a/etc/guix-publish.service.in b/etc/guix-publish.service.in
+index 8aaf09e3c..fc4e3c21f 100644
+--- a/etc/guix-publish.service.in
++++ b/etc/guix-publish.service.in
+@@ -6,7 +6,7 @@
+ Description=Publish the GNU Guix store
+
+ [Service]
+-ExecStart=@localstatedir@/guix/profiles/per-user/root/guix-profile/bin/guix publish --user=nobody --port=8181
++ExecStart=@bindir@/guix publish --user=nobody --port=8181
+ Environment=GUIX_LOCPATH=/root/.guix-profile/lib/locale
+ RemainAfterExit=yes
+ StandardOutput=syslog
+diff --git a/nix/local.mk b/nix/local.mk
+index 9e0c457be..eb70d266f 100644
+--- a/nix/local.mk
++++ b/nix/local.mk
+@@ -190,7 +190,7 @@ nodist_systemdservice_DATA = etc/guix-daemon.service etc/guix-publish.service
+ etc/guix-%.service: etc/guix-%.service.in \
+ $(top_builddir)/config.status
+ $(AM_V_GEN)$(MKDIR_P) "`dirname $@`"; \
+- $(SED) -e 's|@''localstatedir''@|$(localstatedir)|' < \
++ $(SED) -e 's|@''bindir''@|$(bindir)|' < \
+ "$<" > "$@.tmp"; \
+ mv "$@.tmp" "$@"
+
+@@ -201,7 +201,7 @@ nodist_upstartjob_DATA = etc/guix-daemon.conf etc/guix-publish.conf
+ etc/guix-%.conf: etc/guix-%.conf.in \
+ $(top_builddir)/config.status
+ $(AM_V_GEN)$(MKDIR_P) "`dirname $@`"; \
+- $(SED) -e 's|@''localstatedir''@|$(localstatedir)|' < \
++ $(SED) -e 's|@''bindir''@|$(bindir)|' < \
+ "$<" > "$@.tmp"; \
+ mv "$@.tmp" "$@"
+
diff --git a/sys-apps/guix/files/guix-daemon.initd b/sys-apps/guix/files/guix-daemon.initd
new file mode 100644
index 000000000000..f819fb20c37e
--- /dev/null
+++ b/sys-apps/guix/files/guix-daemon.initd
@@ -0,0 +1,15 @@
+#!/sbin/openrc-run
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+start() {
+ ebegin "Starting ${SVCNAME}"
+ start-stop-daemon --start --quiet --background --exec /usr/bin/guix-daemon -- --build-users-group=guixbuild
+ eend ${?}
+}
+
+stop() {
+ ebegin "Stopping ${SVCNAME}"
+ start-stop-daemon --stop --quiet --exec /usr/bin/guix-daemon
+ eend ${?}
+}
diff --git a/sys-apps/guix/guix-0.12.0-r3.ebuild b/sys-apps/guix/guix-0.12.0-r3.ebuild
new file mode 100644
index 000000000000..3aea5c64be89
--- /dev/null
+++ b/sys-apps/guix/guix-0.12.0-r3.ebuild
@@ -0,0 +1,139 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit autotools readme.gentoo-r1 user
+
+DESCRIPTION="GNU package manager (nix sibling)"
+HOMEPAGE="https://www.gnu.org/software/guix/"
+
+# taken from gnu/local.mk
+BOOT_GUILE=(
+ "armhf-linux 20150101 guile-2.0.11.tar.xz"
+ "i686-linux 20131110 guile-2.0.9.tar.xz"
+ "mips64el-linux 20131110 guile-2.0.9.tar.xz"
+ "x86_64-linux 20131110 guile-2.0.9.tar.xz"
+)
+
+binary_src_uris() {
+ local system_date_guilep uri
+ for system_date_guilep in "${BOOT_GUILE[@]}"; do
+ # $1 $2 $3
+ # "armhf-linux 20150101 guile-2.0.11.tar.xz"
+ set -- ${system_date_guilep}
+ uri="mirror://gnu-alpha/${PN}/bootstrap/$1/$2/$3"
+ # ${uri} -> guix-bootstrap-armhf-linux-20150101-guile-2.0.11.tar.xz.bootstrap
+ echo "${uri} -> guix-bootstrap-$1-$2-$3.bootstrap"
+ done
+}
+
+# copy bootstrap binaries from DISTDIR to ${S}
+copy_boot_guile_binaries() {
+ local system_date_guilep
+ for system_date_guilep in "${BOOT_GUILE[@]}"; do
+ # $1 $2 $3
+ # "armhf-linux 20150101 guile-2.0.11.tar.xz"
+ set -- ${system_date_guilep}
+ cp "${DISTDIR}"/guix-bootstrap-$1-$2-$3.bootstrap gnu/packages/bootstrap/$1/$3 || die
+ done
+}
+
+SRC_URI="mirror://gnu-alpha/${PN}/${P}.tar.gz
+ $(binary_src_uris)"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RESTRICT=test # complains about size of config.log and refuses to start tests
+
+RDEPEND="
+ dev-libs/libgcrypt:0=
+ >=dev-scheme/guile-2[regex,networking,threads]
+ dev-scheme/guile-json
+ sys-libs/zlib
+ app-arch/bzip2
+ dev-db/sqlite
+"
+
+DEPEND="${RDEPEND}
+"
+
+QA_PREBUILT="usr/share/guile/site/2.0/gnu/packages/bootstrap/*"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-no-json-crate.patch
+ "${FILESDIR}"/${P}-AR.patch
+)
+
+DISABLE_AUTOFORMATTING=yes
+DOC_CONTENTS="Quick start user guide on Gentoo:
+
+[as root] allow binary substitution to be downloaded (optional)
+ # guix archive --authorize < /usr/share/guix/hydra.gnu.org.pub
+[as root] enable guix-daemon service:
+ [systemd] # systemctl enable guix-daemon
+ [openrc] # rc-update add guix-daemon
+[as a user] ln -sf /var/guix/profiles/per-user/\$USER/guix-profile \$HOME/.guix-profile
+[as a user] install guix packages:
+ \$ guix package -i hello
+[as a user] configure environment:
+ Somewhere in .bash_profile you might want to set
+ export GUIX_LOCPATH=\$HOME/.guix-profile/lib/locale
+
+Next steps:
+ guix package manager user manual: https://www.gnu.org/software/guix/manual/guix.html
+"
+
+pkg_setup() {
+ enewgroup guixbuild
+ for i in {1..10}; do
+ # we list 'guixbuild' twice to
+ # both assign a primary group for user
+ # and add a user to /etc/group
+ enewuser guixbuilder${i} -1 -1 /var/empty guixbuild,guixbuild
+ done
+}
+
+src_configure() {
+ # to be compatible with guix from /gnu/store
+ econf \
+ --localstatedir="${EPREFIX}"/var
+}
+
+src_prepare() {
+ copy_boot_guile_binaries
+
+ default
+
+ eautoreconf
+}
+
+src_compile() {
+ # guile occasionally fails with 'bad address'
+ emake -j1
+}
+
+src_install() {
+ # TODO: emacs highlighter
+ default
+
+ readme.gentoo_create_doc
+
+ keepdir /etc/guix
+ # TODO: will need a tweak for prefix
+ keepdir /gnu/store
+ fowners root:guixbuild /gnu/store
+ fperms 1775 /gnu/store
+
+ keepdir /var/guix/profiles/per-user
+ fperms 1777 /var/guix/profiles/per-user
+
+ newinitd "${FILESDIR}"/guix-daemon.initd guix-daemon
+}
+
+pkg_postinst() {
+ readme.gentoo_print_elog
+}
diff --git a/sys-apps/guix/guix-0.13.0.ebuild b/sys-apps/guix/guix-0.13.0.ebuild
new file mode 100644
index 000000000000..54b553a520cc
--- /dev/null
+++ b/sys-apps/guix/guix-0.13.0.ebuild
@@ -0,0 +1,138 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit autotools readme.gentoo-r1 user
+
+DESCRIPTION="GNU package manager (nix sibling)"
+HOMEPAGE="https://www.gnu.org/software/guix/"
+
+# taken from gnu/local.mk and build-aux/download.scm
+BOOT_GUILE=(
+ "aarch64-linux 20170217 guile-2.0.14.tar.xz"
+ "armhf-linux 20150101 guile-2.0.11.tar.xz"
+ "i686-linux 20131110 guile-2.0.9.tar.xz"
+ "mips64el-linux 20131110 guile-2.0.9.tar.xz"
+ "x86_64-linux 20131110 guile-2.0.9.tar.xz"
+)
+
+binary_src_uris() {
+ local system_date_guilep uri
+ for system_date_guilep in "${BOOT_GUILE[@]}"; do
+ # $1 $2 $3
+ # "armhf-linux 20150101 guile-2.0.11.tar.xz"
+ set -- ${system_date_guilep}
+ uri="mirror://gnu-alpha/${PN}/bootstrap/$1/$2/$3"
+ # ${uri} -> guix-bootstrap-armhf-linux-20150101-guile-2.0.11.tar.xz.bootstrap
+ echo "${uri} -> guix-bootstrap-$1-$2-$3.bootstrap"
+ done
+}
+
+# copy bootstrap binaries from DISTDIR to ${S}
+copy_boot_guile_binaries() {
+ local system_date_guilep
+ for system_date_guilep in "${BOOT_GUILE[@]}"; do
+ # $1 $2 $3
+ # "armhf-linux 20150101 guile-2.0.11.tar.xz"
+ set -- ${system_date_guilep}
+ cp "${DISTDIR}"/guix-bootstrap-$1-$2-$3.bootstrap gnu/packages/bootstrap/$1/$3 || die
+ done
+}
+
+SRC_URI="mirror://gnu-alpha/${PN}/${P}.tar.gz
+ $(binary_src_uris)"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RESTRICT=test # complains about size of config.log and refuses to start tests
+
+RDEPEND="
+ dev-libs/libgcrypt:0=
+ >=dev-scheme/guile-2[regex,networking,threads]
+ dev-scheme/guile-json
+ net-libs/gnutls[guile]
+ sys-libs/zlib
+ app-arch/bzip2
+ dev-db/sqlite
+"
+
+DEPEND="${RDEPEND}
+"
+
+PATCHES=("${FILESDIR}"/${PN}-0.13.0-default-daemon.patch)
+
+QA_PREBUILT="usr/share/guile/site/2.0/gnu/packages/bootstrap/*"
+
+DISABLE_AUTOFORMATTING=yes
+DOC_CONTENTS="Quick start user guide on Gentoo:
+
+[as root] allow binary substitution to be downloaded (optional)
+ # guix archive --authorize < /usr/share/guix/hydra.gnu.org.pub
+[as root] enable guix-daemon service:
+ [systemd] # systemctl enable guix-daemon
+ [openrc] # rc-update add guix-daemon
+[as a user] ln -sf /var/guix/profiles/per-user/\$USER/guix-profile \$HOME/.guix-profile
+[as a user] install guix packages:
+ \$ guix package -i hello
+[as a user] configure environment:
+ Somewhere in .bash_profile you might want to set
+ export GUIX_LOCPATH=\$HOME/.guix-profile/lib/locale
+
+Next steps:
+ guix package manager user manual: https://www.gnu.org/software/guix/manual/guix.html
+"
+
+pkg_setup() {
+ enewgroup guixbuild
+ for i in {1..10}; do
+ # we list 'guixbuild' twice to
+ # both assign a primary group for user
+ # and add a user to /etc/group
+ enewuser guixbuilder${i} -1 -1 /var/empty guixbuild,guixbuild
+ done
+}
+
+src_prepare() {
+ copy_boot_guile_binaries
+
+ default
+ # build system is very eager to run automake itself: bug #625166
+ eautomake
+}
+
+src_configure() {
+ # to be compatible with guix from /gnu/store
+ econf \
+ --localstatedir="${EPREFIX}"/var
+}
+
+src_compile() {
+ # guile occasionally fails with 'bad address'
+ emake -j1
+}
+
+src_install() {
+ # TODO: emacs highlighter
+ default
+
+ readme.gentoo_create_doc
+
+ keepdir /etc/guix
+ # TODO: will need a tweak for prefix
+ keepdir /gnu/store
+ fowners root:guixbuild /gnu/store
+ fperms 1775 /gnu/store
+
+ keepdir /var/guix/profiles/per-user
+ fperms 1777 /var/guix/profiles/per-user
+
+ newinitd "${FILESDIR}"/guix-daemon.initd guix-daemon
+}
+
+pkg_postinst() {
+ readme.gentoo_print_elog
+}
diff --git a/sys-apps/guix/metadata.xml b/sys-apps/guix/metadata.xml
new file mode 100644
index 000000000000..c5298995d2d4
--- /dev/null
+++ b/sys-apps/guix/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>slyfox@gentoo.org</email>
+ <name>Sergei Trofimovich</name>
+ </maintainer>
+</pkgmetadata>