summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergei Trofimovich <slyfox@gentoo.org>2017-01-17 11:37:12 +0000
committerSergei Trofimovich <slyfox@gentoo.org>2017-01-17 11:37:30 +0000
commited44e589ea8f02bfaec53fa41c61c60e2e3785a9 (patch)
tree409c9bf10f7bb5c80873e1a2821653363f60f8d6 /sys-apps/nix/files
parentx11-plugins/wmtimer: amd64 stable wrt bug #605862 (diff)
downloadgentoo-ed44e589ea8f02bfaec53fa41c61c60e2e3785a9.tar.gz
gentoo-ed44e589ea8f02bfaec53fa41c61c60e2e3785a9.tar.bz2
gentoo-ed44e589ea8f02bfaec53fa41c61c60e2e3785a9.zip
sys-apps/nix: new package, The Purely Functional Package Manager
Nix is a source-based package manager with strong support for binary packages. It uses multiple tricks to make package source dependencies robust: - nix installs every package into it's own --prefix=. Example: /nix/store/xsqz79bzclgrgnnlffp3qa0g4wnbcrp1-firefox-50.1.0 - nix builds packages with PATH (and similar) only including explicitly listed depends. This eliminates automagic dependency. - nix tracks full environment where package was built. Once environment changes new package needs to be built. That's how you install firefox just for your current user: $ nix-env -iA nixpkgs.firefox Package-Manager: Portage-2.3.3, Repoman-2.3.1
Diffstat (limited to 'sys-apps/nix/files')
-rw-r--r--sys-apps/nix/files/60nix-remote-daemon1
-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-systemd.patch10
-rw-r--r--sys-apps/nix/files/nix-daemon.initd16
4 files changed, 38 insertions, 0 deletions
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.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-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..1a384bd08fda
--- /dev/null
+++ b/sys-apps/nix/files/nix-daemon.initd
@@ -0,0 +1,16 @@
+#!/sbin/openrc-run
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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 ${?}
+}