summaryrefslogtreecommitdiff
path: root/sys-apps/nix
diff options
context:
space:
mode:
Diffstat (limited to 'sys-apps/nix')
-rw-r--r--sys-apps/nix/Manifest14
-rw-r--r--sys-apps/nix/files/60nix-remote-daemon1
-rw-r--r--sys-apps/nix/files/nix-1.11.12-etc-fixes.patch24
-rw-r--r--sys-apps/nix/files/nix-1.11.14-etc-fixes.patch8
-rw-r--r--sys-apps/nix/files/nix-1.11.14-glibc-2.26.patch16
-rw-r--r--sys-apps/nix/files/nix-1.11.6-per-user.patch11
-rw-r--r--sys-apps/nix/files/nix-1.11.6-respect-CXXFLAGS.patch9
-rw-r--r--sys-apps/nix/files/nix-1.11.6-respect-LDFLAGS.patch36
-rw-r--r--sys-apps/nix/files/nix-1.11.6-systemd.patch10
-rw-r--r--sys-apps/nix/files/nix-daemon.initd15
-rw-r--r--sys-apps/nix/metadata.xml13
-rw-r--r--sys-apps/nix/nix-1.11.14.ebuild135
-rw-r--r--sys-apps/nix/nix-1.11.15.ebuild134
13 files changed, 426 insertions, 0 deletions
diff --git a/sys-apps/nix/Manifest b/sys-apps/nix/Manifest
new file mode 100644
index 000000000000..3aba3714d34b
--- /dev/null
+++ b/sys-apps/nix/Manifest
@@ -0,0 +1,14 @@
+AUX 60nix-remote-daemon 20 SHA256 0afe41dcbcc67939de658dedac9c305fe4e74978fc804c9ef9dd299d72e6861a SHA512 af3e8a4c0171fb52572d73b7111a07255c7768c765878cfc20e80a481a5a6f5d6c58643b3fdf8d9582bb0b903dee0e228b8e18f3e73d9479879f8f6862142363 WHIRLPOOL 406752b5c25e28c38a32ca5edcb99c8a1f2e3b16ccba2ad4121eb9b1af6844ac186cb0df52b6ffce69c379c6cf53e4680c06bef309d6fca66fe73707f0052c7e
+AUX nix-1.11.12-etc-fixes.patch 1275 SHA256 ecc10dd1291712224560f2424b70120e08d8314541dcbd713b128512a49aa185 SHA512 f449877a92473a0b07f20131195d7cab23341068c370e18b618d7870223bf65d47bf9f96cfdfdb41fe0be2e4390a341bebb2bf5a565ba589d6ba6babbf076a2c WHIRLPOOL d2319df6c0540bb3a2ee060d68c4c022ec417b829c00ec88f1162fba9c3b26e465f1b0d9284819eff59958142589b27706c065694c3b2d5452dbb0a59fc97a30
+AUX nix-1.11.14-etc-fixes.patch 350 SHA256 c2a510768ba263abf2b6a1e48ba1d402d967a5fbb5227906ee4deaeb7995e8e3 SHA512 ec742ca9fedbdbbfbac152303e62ef34457c7e70dcc69954a38d63581c6513670eb66cd4f01048fa848469aa2d6c55dc2109e59fafecae85269a2f13ee2970e1 WHIRLPOOL bf182c28194ac7014bb2bea9523657a1a27097d5e20e28c624a863619060558b524a14b7258ae845598e918ef0d5d83db5753b3a150fd9b117e9aef4980612a2
+AUX nix-1.11.14-glibc-2.26.patch 730 SHA256 464d76a9f76beef25bd972e53a5cb14a2e0f4d86be2cd9bb3ea4b289312a64a5 SHA512 2caae0b32f4be3a8b535e784628d4fc878645198adaa0d5440d768dc01cd3a7e43b11323eb75244d719b2eba0256c80415dcf081cbb05dcbb8250021106e95db WHIRLPOOL 443ae1942ec4f4f24dc53e016a6e0c5c90d78ecb301ae11b1bc6908a194fd9dd51d229e642d02102bafcbb92a76f84eafb1421c7dd3596986e50f4c0c74c36bb
+AUX nix-1.11.6-per-user.patch 554 SHA256 607d846262466e2f1ec4167e1396eab39309bf2c13dea0caeb9b7715d8778722 SHA512 ffc6b03ba9fa8a56cdb40caa271582b8648f9539d8abc69251d16356efa64c93902648bae29d06af938383dbf3be110fdaebbbd4af4635c112bb34d1077cb56a WHIRLPOOL 56540c433cdb420f6f366eb1151f1847593e99aa5771e976695e9f27a530350ac3db8b97176bef62af31505f8c21497cc6e29af34d2b324251230cd79b5d0f61
+AUX nix-1.11.6-respect-CXXFLAGS.patch 164 SHA256 3723f9749504ad5eca69fc7f4864a89c4f0766d20cd13b89a38f638bcc5c8e87 SHA512 2508d26888050bb4099f1654cee91d44405b00ca4dfdd6c1b1cf0f24e004333b106cc461b306404b1d56f41bb928ed1069536c09f9390b5ba287ca70b9bcb0c6 WHIRLPOOL cb03fe5dd3e5b4f5e512652254f4d981f8be4b7c395a1081f26618be02be805cbb331deebd36f88b8c52cfcec48774013120e12fd4021c19e6af67c329fd75ba
+AUX nix-1.11.6-respect-LDFLAGS.patch 2332 SHA256 55c3c294b35361f7f9edcd4eaaa69303f0065973c49c493e9876eb8187bfeea5 SHA512 aefc9b045794038b6513211ecaf18c469b7aa52110fcaa5168a1ca9f9af9b663aa6e90fe27c3c500bf9adc2714a8f73fc5243f3096fabe6bbb7e855e0ae7aa87 WHIRLPOOL 100f870808055e73fb8fd127a875b8332d8fc930a0a9f45dec74ad53f60894420efc001e6bc222d59e240f1b885e3a731d58fedac4dd698ee4a559cab4721e6d
+AUX nix-1.11.6-systemd.patch 394 SHA256 d763ab5f3e9de67b9265d1df77b0cb4eea0784a281035e5f7fdbeabdf572e1f9 SHA512 a5f39652c7fd829f11e75b1e3640a218129cac8a47c15a34b0390f51234fda45b7841e43ec6ed441803405483750ee6b82e7c3f918d22222d1e08a79e359c5dd WHIRLPOOL 571ea677e7265ac6eaca80ab921c0d96900683b5ba2cac11d5defc95508fb308d8e9bc02252850f91510fff2f2f6c10c23f5bf872f42bf4e745cc95645295738
+AUX nix-daemon.initd 369 SHA256 a7eae5bde2fbb0e503948477daa79d7efe3fc1dd3e4ceee2e7f8196536052c4a SHA512 e5a05a9f5efb179ebf3a98e58435a571e87716166a351045be4cbd19423e426cf11ed9b2eb2df6222d00e43e5d38fbed5da579820f776031e3c70de0206f980d WHIRLPOOL 30ca58cf8dfcaae4f68bc4ad75185fc16870a886368203e5ec387d72ee48af7b161cb18f056042dfd5b63d156e8cac4a34f55d937db33e4f83f7256ab9eab6d8
+DIST nix-1.11.14.tar.xz 632260 SHA256 26593c831addf1d40f6b7d131f394cb0f9fbec9e46471369faed16eaa2c4b7e4 SHA512 48ed17a090a161ad35c8e84652566e527f31586184b8722a5536a6d83eee1e81911b6c4d5f0661f57054db6c47b5d8211f2acf47899fbec72f2c4bf8a5262af5 WHIRLPOOL d6db1f452dd5bb430a0e02644af89a3e648f3f0f898b81b60ef4d7b8c8d7c9498c0992c3c33637eafd3ff1d23f55df3b76e1a1da957a0b7066a88e3eff1c35ef
+DIST nix-1.11.15.tar.xz 632544 SHA256 d20f20e45d519f54fae5c61d55eadcf53e6d7cdbde9870eeec80d499f9805165 SHA512 449b3c78b74c776215dfbe9d6d09b96d8c6abf996c69c525073df12d0cffb1a2868890d356fbb52c794e2c6f485018756395625e7b170166f7c6f9e2bdd364d9 WHIRLPOOL 740cdd89aa4d10af8e80329a52299c7333a5820ca4b943c4527b8342c60edf07e9bfaad3378546903e052a66155f974df36ee74f6119926714c5b12d9455f2f4
+EBUILD nix-1.11.14.ebuild 3143 SHA256 8b248ef08db138d0911a01862d76ce25d845a2f22fb6440076b972d0535521b7 SHA512 f7921c26693cacc9c049013592f048fe4d48f2b728b5cee4db91344e4d7057dc5e66194570059ac5cfc7610678b1012bde9eb82ac18d26e78a8189cb22421dee WHIRLPOOL c9244caf0e3ccd9ed3b528a26c90ad3b9fef0a28f4f57ee4d753af67c82126a8044183c3baffb1482710709b9c7040d0b899262ff3ba4dc53356dc41e51dc2f9
+EBUILD nix-1.11.15.ebuild 3097 SHA256 ff7426f036391af3dd7c3822252c04bf7eb3588ed1ed009b0bba95cda7850c7b SHA512 e7f826e5b8fec2d6ce824981e422a2828a08cb8c4d1ccacfc0d1807e72e3ec7ec6a0b7f2d4b2dba8aa7aaf5c0856261899e52ecce1769d62732bc28be0791498 WHIRLPOOL b7cad020f6caab66919e1fa188eeeea67e6bfdd6ea523a1097708cd0883f1c57d81ce8aa1d160b18496fa57c1dc0d614ec636216d7d5bebd178606dd04cdacf3
+MISC metadata.xml 566 SHA256 1e350b6aa72e84abc5d4a32308d6988d059b80a3dfbc555850fc269acc23337d SHA512 93d33392316264e30403abbf79a0bf836ed35f2eaf802f930743cb9f31955f939ac263946b93ee32bba34d2534329d95476e96816d1893747b077b0d9690281c WHIRLPOOL 3b1403c054d6ef3e107f478d2f99c80ee1fc3532489cb5b76479e80eec9e0a8cb73958c8c0f2bde838511b37e99a9adca7d36c6edc2e5093fafde8794039b00c
diff --git a/sys-apps/nix/files/60nix-remote-daemon b/sys-apps/nix/files/60nix-remote-daemon
new file mode 100644
index 000000000000..626058a94d15
--- /dev/null
+++ b/sys-apps/nix/files/60nix-remote-daemon
@@ -0,0 +1 @@
+NIX_REMOTE="daemon"
diff --git a/sys-apps/nix/files/nix-1.11.12-etc-fixes.patch b/sys-apps/nix/files/nix-1.11.12-etc-fixes.patch
new file mode 100644
index 000000000000..1973133e22bd
--- /dev/null
+++ b/sys-apps/nix/files/nix-1.11.12-etc-fixes.patch
@@ -0,0 +1,24 @@
+GNU coreutils has '-c' option for formatted output, not -f.
+Don't spam stderr when directory gets created.
+diff --git a/scripts/nix-profile-daemon.sh.in b/scripts/nix-profile-daemon.sh.in
+index 7f46cc6..386f607 100644
+--- a/scripts/nix-profile-daemon.sh.in
++++ b/scripts/nix-profile-daemon.sh.in
+@@ -15,3 +15,3 @@ export NIX_PROFILES="@localstatedir@/nix/profiles/default $HOME/.nix-profile"
+ mkdir -m 0755 -p $NIX_USER_PROFILE_DIR
+-if test "$(stat -f '%u' $NIX_USER_PROFILE_DIR)" != "$(id -u)"; then
++if test "$(stat -c '%u' $NIX_USER_PROFILE_DIR)" != "$(id -u)"; then
+ echo "WARNING: bad ownership on $NIX_USER_PROFILE_DIR" >&2
+@@ -37,3 +37,3 @@ if test -w $HOME; then
+ mkdir -m 0755 -p $NIX_USER_GCROOTS_DIR
+- if test "$(stat -f '%u' $NIX_USER_GCROOTS_DIR)" != "$(id -u)"; then
++ if test "$(stat -c '%u' $NIX_USER_GCROOTS_DIR)" != "$(id -u)"; then
+ echo "WARNING: bad ownership on $NIX_USER_GCROOTS_DIR" >&2
+diff --git a/scripts/nix-profile.sh.in b/scripts/nix-profile.sh.in
+index 4f09b55..e93ef42 100644
+--- a/scripts/nix-profile.sh.in
++++ b/scripts/nix-profile.sh.in
+@@ -5,3 +5,2 @@ if [ -n "$HOME" ]; then
+ if ! [ -L "$NIX_LINK" ]; then
+- echo "creating $NIX_LINK" >&2
+ _NIX_DEF_LINK=@localstatedir@/nix/profiles/per-user/$USER/profile
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
new file mode 100644
index 000000000000..07962838a224
--- /dev/null
+++ b/sys-apps/nix/files/nix-1.11.14-etc-fixes.patch
@@ -0,0 +1,8 @@
+diff --git a/scripts/nix-profile.sh.in b/scripts/nix-profile.sh.in
+index 4f09b55..e93ef42 100644
+--- a/scripts/nix-profile.sh.in
++++ b/scripts/nix-profile.sh.in
+@@ -5,3 +5,2 @@ if [ -n "$HOME" ]; then
+ if ! [ -L "$NIX_LINK" ]; then
+- echo "creating $NIX_LINK" >&2
+ _NIX_DEF_LINK=@localstatedir@/nix/profiles/per-user/$USER/profile
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
new file mode 100644
index 000000000000..44c995e3239e
--- /dev/null
+++ b/sys-apps/nix/files/nix-1.11.14-glibc-2.26.patch
@@ -0,0 +1,16 @@
+'context' is no more after:
+https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=251287734e89a52da3db682a8241eb6bccc050c9
+
+'ucontext_t' is the new name.
+diff --git a/src/libmain/stack.cc b/src/libmain/stack.cc
+index 41b617d..695aaad 100644
+--- a/src/libmain/stack.cc
++++ b/src/libmain/stack.cc
+@@ -22,5 +22,5 @@ static void sigsegvHandler(int signo, siginfo_t * info, void * ctx)
+ #if defined(__x86_64__) && defined(REG_RSP)
+- sp = (char *) ((ucontext *) ctx)->uc_mcontext.gregs[REG_RSP];
++ sp = (char *) ((ucontext_t *) ctx)->uc_mcontext.gregs[REG_RSP];
+ #elif defined(REG_ESP)
+- sp = (char *) ((ucontext *) ctx)->uc_mcontext.gregs[REG_ESP];
++ sp = (char *) ((ucontext_t *) ctx)->uc_mcontext.gregs[REG_ESP];
+ #else
diff --git a/sys-apps/nix/files/nix-1.11.6-per-user.patch b/sys-apps/nix/files/nix-1.11.6-per-user.patch
new file mode 100644
index 000000000000..9cea685c59a4
--- /dev/null
+++ b/sys-apps/nix/files/nix-1.11.6-per-user.patch
@@ -0,0 +1,11 @@
+By default created symlink poins to a directory not accessible by user.
+Make a symlink the same way NixOS does symlinking.
+diff --git a/scripts/nix-profile.sh.in b/scripts/nix-profile.sh.in
+index 672d1f0..e3b0978 100644
+--- a/scripts/nix-profile.sh.in
++++ b/scripts/nix-profile.sh.in
+@@ -6,3 +6,3 @@ if [ -n "$HOME" ]; then
+ echo "creating $NIX_LINK" >&2
+- _NIX_DEF_LINK=@localstatedir@/nix/profiles/default
++ _NIX_DEF_LINK=@localstatedir@/nix/profiles/per-user/$USER/profile
+ @coreutils@/ln -s "$_NIX_DEF_LINK" "$NIX_LINK"
diff --git a/sys-apps/nix/files/nix-1.11.6-respect-CXXFLAGS.patch b/sys-apps/nix/files/nix-1.11.6-respect-CXXFLAGS.patch
new file mode 100644
index 000000000000..091fdcacba76
--- /dev/null
+++ b/sys-apps/nix/files/nix-1.11.6-respect-CXXFLAGS.patch
@@ -0,0 +1,9 @@
+diff --git a/configure.ac b/configure.ac
+index 3a24053..1b99702 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -57,4 +57,2 @@ fi
+
+-CFLAGS=
+-CXXFLAGS=
+ AC_PROG_CC
diff --git a/sys-apps/nix/files/nix-1.11.6-respect-LDFLAGS.patch b/sys-apps/nix/files/nix-1.11.6-respect-LDFLAGS.patch
new file mode 100644
index 000000000000..12c094eb6180
--- /dev/null
+++ b/sys-apps/nix/files/nix-1.11.6-respect-LDFLAGS.patch
@@ -0,0 +1,36 @@
+diff --git a/Makefile.config.in b/Makefile.config.in
+index f0de4da..c82fbfd 100644
+--- a/Makefile.config.in
++++ b/Makefile.config.in
+@@ -5,2 +5,3 @@ CXX = @CXX@
+ CXXFLAGS = @CXXFLAGS@
++LDFLAGS = @LDFLAGS@
+ HAVE_SODIUM = @HAVE_SODIUM@
+diff --git a/mk/libraries.mk b/mk/libraries.mk
+index 3cd7a53..f7bd015 100644
+--- a/mk/libraries.mk
++++ b/mk/libraries.mk
+@@ -88,3 +88,3 @@ define build-library
+ $$($(1)_PATH): $$($(1)_OBJS) $$(_libs) | $$(_d)/
+- $$(trace-ld) $(CXX) -o $$(abspath $$@) -shared $$(GLOBAL_LDFLAGS) $$($(1)_OBJS) $$($(1)_LDFLAGS) $$($(1)_LDFLAGS_PROPAGATED) $$(foreach lib, $$($(1)_LIBS), $$($$(lib)_LDFLAGS_USE)) $$($(1)_LDFLAGS_UNINSTALLED)
++ $$(trace-ld) $(CXX) -o $$(abspath $$@) -shared $$(LDFLAGS) $$(GLOBAL_LDFLAGS) $$($(1)_OBJS) $$($(1)_LDFLAGS) $$($(1)_LDFLAGS_PROPAGATED) $$(foreach lib, $$($(1)_LIBS), $$($$(lib)_LDFLAGS_USE)) $$($(1)_LDFLAGS_UNINSTALLED)
+
+@@ -102,3 +102,3 @@ define build-library
+ $$($(1)_INSTALL_PATH): $$($(1)_OBJS) $$(_libs_final) | $(DESTDIR)$$($(1)_INSTALL_DIR)/
+- $$(trace-ld) $(CXX) -o $$@ -shared $$(GLOBAL_LDFLAGS) $$($(1)_OBJS) $$($(1)_LDFLAGS) $$($(1)_LDFLAGS_PROPAGATED) $$(foreach lib, $$($(1)_LIBS), $$($$(lib)_LDFLAGS_USE_INSTALLED))
++ $$(trace-ld) $(CXX) -o $$@ -shared $$(LDFLAGS) $$(GLOBAL_LDFLAGS) $$($(1)_OBJS) $$($(1)_LDFLAGS) $$($(1)_LDFLAGS_PROPAGATED) $$(foreach lib, $$($(1)_LIBS), $$($$(lib)_LDFLAGS_USE_INSTALLED))
+
+diff --git a/mk/programs.mk b/mk/programs.mk
+index 3ac6449..f553ce2 100644
+--- a/mk/programs.mk
++++ b/mk/programs.mk
+@@ -34,3 +34,3 @@ define build-program
+ $$($(1)_PATH): $$($(1)_OBJS) $$(_libs) | $$(_d)/
+- $$(trace-ld) $(CXX) -o $$@ $$(GLOBAL_LDFLAGS) $$($(1)_OBJS) $$($(1)_LDFLAGS) $$(foreach lib, $$($(1)_LIBS), $$($$(lib)_LDFLAGS_USE))
++ $$(trace-ld) $(CXX) -o $$@ $$(LDFLAGS) $$(GLOBAL_LDFLAGS) $$($(1)_OBJS) $$($(1)_LDFLAGS) $$(foreach lib, $$($(1)_LIBS), $$($$(lib)_LDFLAGS_USE))
+
+@@ -48,3 +48,3 @@ define build-program
+ $(DESTDIR)$$($(1)_INSTALL_PATH): $$($(1)_OBJS) $$(_libs_final) | $(DESTDIR)$$($(1)_INSTALL_DIR)/
+- $$(trace-ld) $(CXX) -o $$@ $$(GLOBAL_LDFLAGS) $$($(1)_OBJS) $$($(1)_LDFLAGS) $$(foreach lib, $$($(1)_LIBS), $$($$(lib)_LDFLAGS_USE_INSTALLED))
++ $$(trace-ld) $(CXX) -o $$@ $$(LDFLAGS) $$(GLOBAL_LDFLAGS) $$($(1)_OBJS) $$($(1)_LDFLAGS) $$(foreach lib, $$($(1)_LIBS), $$($$(lib)_LDFLAGS_USE_INSTALLED))
+
diff --git a/sys-apps/nix/files/nix-1.11.6-systemd.patch b/sys-apps/nix/files/nix-1.11.6-systemd.patch
new file mode 100644
index 000000000000..f890ee6f0470
--- /dev/null
+++ b/sys-apps/nix/files/nix-1.11.6-systemd.patch
@@ -0,0 +1,10 @@
+Make 'nix-daemon' a goof unit for 'systemctl enable nix-daemon.service'.
+diff --git a/misc/systemd/nix-daemon.service.in b/misc/systemd/nix-daemon.service.in
+index 5fc04a3..2565520 100644
+--- a/misc/systemd/nix-daemon.service.in
++++ b/misc/systemd/nix-daemon.service.in
+@@ -9 +9,4 @@ ExecStart=@@bindir@/nix-daemon nix-daemon --daemon
+ KillMode=process
++
++[Install]
++WantedBy=multi-user.target
diff --git a/sys-apps/nix/files/nix-daemon.initd b/sys-apps/nix/files/nix-daemon.initd
new file mode 100644
index 000000000000..1fd42734c0a8
--- /dev/null
+++ b/sys-apps/nix/files/nix-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/nix-daemon
+ eend ${?}
+}
+
+stop() {
+ ebegin "Stopping ${SVCNAME}"
+ start-stop-daemon --stop --quiet --exec /usr/bin/nix-daemon
+ eend ${?}
+}
diff --git a/sys-apps/nix/metadata.xml b/sys-apps/nix/metadata.xml
new file mode 100644
index 000000000000..ad64c7e5102b
--- /dev/null
+++ b/sys-apps/nix/metadata.xml
@@ -0,0 +1,13 @@
+<?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>
+ <use>
+ <flag name="etc_profile">Install /etc/profile.d/ entry to inject nix support for all users.</flag>
+ <flag name="gc">Enable garbage collection in the Nix expression evaluator (use <pkg>dev-libs/boehm-gc</pkg>).</flag>
+ <flag name="sodium">Use <pkg>dev-libs/libsodium</pkg> for cryptography</flag>
+ </use>
+</pkgmetadata>
diff --git a/sys-apps/nix/nix-1.11.14.ebuild b/sys-apps/nix/nix-1.11.14.ebuild
new file mode 100644
index 000000000000..55f0dba8e525
--- /dev/null
+++ b/sys-apps/nix/nix-1.11.14.ebuild
@@ -0,0 +1,135 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit autotools flag-o-matic readme.gentoo-r1 user
+
+DESCRIPTION="A purely functional package manager"
+HOMEPAGE="https://nixos.org/nix"
+
+SRC_URI="http://nixos.org/releases/${PN}/${P}/${P}.tar.xz"
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="+etc_profile +gc doc sodium"
+
+RDEPEND="
+ app-arch/bzip2
+ app-arch/xz-utils
+ dev-db/sqlite
+ dev-libs/openssl:0=
+ net-misc/curl
+ sys-libs/libseccomp
+ sys-libs/zlib
+ gc? ( dev-libs/boehm-gc[cxx] )
+ doc? ( dev-libs/libxml2
+ dev-libs/libxslt
+ app-text/docbook-xsl-stylesheets
+ )
+ sodium? ( dev-libs/libsodium )
+ dev-lang/perl:=
+ dev-perl/DBD-SQLite
+ dev-perl/WWW-Curl
+ dev-perl/DBI
+"
+DEPEND="${RDEPEND}
+ >=sys-devel/bison-2.6
+ >=sys-devel/flex-2.5.35
+ virtual/perl-ExtUtils-ParseXS
+"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-1.11.6-systemd.patch
+ "${FILESDIR}"/${PN}-1.11.6-per-user.patch
+ "${FILESDIR}"/${PN}-1.11.6-respect-CXXFLAGS.patch
+ "${FILESDIR}"/${PN}-1.11.6-respect-LDFLAGS.patch
+ "${FILESDIR}"/${PN}-1.11.14-glibc-2.26.patch
+)
+
+DISABLE_AUTOFORMATTING=yes
+DOC_CONTENTS=" Quick start user guide on Gentoo:
+
+[as root] enable nix-daemon service:
+ [systemd] # systemctl enable nix-daemon
+ [openrc] # rc-update add nix-daemon
+[as a user] relogin to get environment and profile update
+[as a user] fetch nixpkgs update:
+ \$ nix-channel --update
+[as a user] install nix packages:
+ \$ nix-env -i mc
+[as a user] configure environment:
+ Somewhere in .bash_profile you might want to set
+ LOCALE_ARCHIVE=\$HOME/.nix-profile/lib/locale/locale-archive
+ but please read https://github.com/NixOS/nixpkgs/issues/21820
+
+Next steps:
+ nix package manager user manual: http://nixos.org/nix/manual/
+"
+
+pkg_setup() {
+ enewgroup nixbld
+ for i in {1..10}; do
+ # we list 'nixbld' twice to
+ # both assign a primary group for user
+ # and add a user to /etc/group
+ enewuser nixbld${i} -1 -1 /var/empty nixbld,nixbld
+ done
+}
+
+src_prepare() {
+ default
+
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ --localstatedir="${EPREFIX}"/nix/var \
+ $(use_enable gc)
+}
+
+src_compile() {
+ local make_vars=(
+ OPTIMIZE=0 # disable hardcoded -O3
+ V=1 # verbose build
+ )
+ emake "${make_vars[@]}"
+}
+
+src_install() {
+ # TODO: emacs highlighter
+ default
+
+ readme.gentoo_create_doc
+
+ # here we use an eager variant of something that
+ # is lazily done by nix-daemon and root nix-env
+
+ # TODO: will need a tweak for prefix
+ keepdir /nix/store
+ fowners root:nixbld /nix/store
+ fperms 1775 /nix/store
+
+ keepdir /nix/var/nix/profiles/per-user
+ fperms 1777 /nix/var/nix/profiles/per-user
+
+ # setup directories nix-daemon: /etc/profile.d/nix-daemon.sh
+ keepdir /nix/var/nix/gcroots/per-user
+ fperms 1777 /nix/var/nix/gcroots/per-user
+
+ newinitd "${FILESDIR}"/nix-daemon.initd nix-daemon
+
+ if ! use etc_profile; then
+ rm "${ED}"/etc/profile.d/nix.sh || die
+ rm "${ED}"/etc/profile.d/nix-daemon.sh || die
+ fi
+}
+
+pkg_postinst() {
+ if ! use etc_profile; then
+ ewarn "${EROOT}etc/profile.d/nix.sh was removed (due to USE=-etc_profile)."
+ fi
+
+ readme.gentoo_print_elog
+}
diff --git a/sys-apps/nix/nix-1.11.15.ebuild b/sys-apps/nix/nix-1.11.15.ebuild
new file mode 100644
index 000000000000..d4e616516f72
--- /dev/null
+++ b/sys-apps/nix/nix-1.11.15.ebuild
@@ -0,0 +1,134 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit autotools flag-o-matic readme.gentoo-r1 user
+
+DESCRIPTION="A purely functional package manager"
+HOMEPAGE="https://nixos.org/nix"
+
+SRC_URI="http://nixos.org/releases/${PN}/${P}/${P}.tar.xz"
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="+etc_profile +gc doc sodium"
+
+RDEPEND="
+ app-arch/bzip2
+ app-arch/xz-utils
+ dev-db/sqlite
+ dev-libs/openssl:0=
+ net-misc/curl
+ sys-libs/libseccomp
+ sys-libs/zlib
+ gc? ( dev-libs/boehm-gc[cxx] )
+ doc? ( dev-libs/libxml2
+ dev-libs/libxslt
+ app-text/docbook-xsl-stylesheets
+ )
+ sodium? ( dev-libs/libsodium )
+ dev-lang/perl:=
+ dev-perl/DBD-SQLite
+ dev-perl/WWW-Curl
+ dev-perl/DBI
+"
+DEPEND="${RDEPEND}
+ >=sys-devel/bison-2.6
+ >=sys-devel/flex-2.5.35
+ virtual/perl-ExtUtils-ParseXS
+"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-1.11.6-systemd.patch
+ "${FILESDIR}"/${PN}-1.11.6-per-user.patch
+ "${FILESDIR}"/${PN}-1.11.6-respect-CXXFLAGS.patch
+ "${FILESDIR}"/${PN}-1.11.6-respect-LDFLAGS.patch
+)
+
+DISABLE_AUTOFORMATTING=yes
+DOC_CONTENTS=" Quick start user guide on Gentoo:
+
+[as root] enable nix-daemon service:
+ [systemd] # systemctl enable nix-daemon
+ [openrc] # rc-update add nix-daemon
+[as a user] relogin to get environment and profile update
+[as a user] fetch nixpkgs update:
+ \$ nix-channel --update
+[as a user] install nix packages:
+ \$ nix-env -i mc
+[as a user] configure environment:
+ Somewhere in .bash_profile you might want to set
+ LOCALE_ARCHIVE=\$HOME/.nix-profile/lib/locale/locale-archive
+ but please read https://github.com/NixOS/nixpkgs/issues/21820
+
+Next steps:
+ nix package manager user manual: http://nixos.org/nix/manual/
+"
+
+pkg_setup() {
+ enewgroup nixbld
+ for i in {1..10}; do
+ # we list 'nixbld' twice to
+ # both assign a primary group for user
+ # and add a user to /etc/group
+ enewuser nixbld${i} -1 -1 /var/empty nixbld,nixbld
+ done
+}
+
+src_prepare() {
+ default
+
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ --localstatedir="${EPREFIX}"/nix/var \
+ $(use_enable gc)
+}
+
+src_compile() {
+ local make_vars=(
+ OPTIMIZE=0 # disable hardcoded -O3
+ V=1 # verbose build
+ )
+ emake "${make_vars[@]}"
+}
+
+src_install() {
+ # TODO: emacs highlighter
+ default
+
+ readme.gentoo_create_doc
+
+ # here we use an eager variant of something that
+ # is lazily done by nix-daemon and root nix-env
+
+ # TODO: will need a tweak for prefix
+ keepdir /nix/store
+ fowners root:nixbld /nix/store
+ fperms 1775 /nix/store
+
+ keepdir /nix/var/nix/profiles/per-user
+ fperms 1777 /nix/var/nix/profiles/per-user
+
+ # setup directories nix-daemon: /etc/profile.d/nix-daemon.sh
+ keepdir /nix/var/nix/gcroots/per-user
+ fperms 1777 /nix/var/nix/gcroots/per-user
+
+ newinitd "${FILESDIR}"/nix-daemon.initd nix-daemon
+
+ if ! use etc_profile; then
+ rm "${ED}"/etc/profile.d/nix.sh || die
+ rm "${ED}"/etc/profile.d/nix-daemon.sh || die
+ fi
+}
+
+pkg_postinst() {
+ if ! use etc_profile; then
+ ewarn "${EROOT}etc/profile.d/nix.sh was removed (due to USE=-etc_profile)."
+ fi
+
+ readme.gentoo_print_elog
+}