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