summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorFelix Morgner2018-02-14 14:19:33 +0100
committerFelix Morgner2018-02-14 14:19:33 +0100
commit163f3e505c7d550dc91ed7807a3535b8a40c49fb (patch)
tree72ab4605d7c4591090f115d15b91cb26a3af3b4c
parent03310c8419ddb175d27e300b4312484c7f9ddbf6 (diff)
downloadaur-163f3e505c7d550dc91ed7807a3535b8a40c49fb.tar.gz
update to 1.11.16
-rw-r--r--.SRCINFO9
-rw-r--r--PKGBUILD13
-rw-r--r--fix_perllibdir.patch12
-rw-r--r--nix.install91
4 files changed, 119 insertions, 6 deletions
diff --git a/.SRCINFO b/.SRCINFO
index e47e2cb0130..13e7aedfc76 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,8 +1,9 @@
pkgbase = nix
pkgdesc = A purely functional package manager
- pkgver = 1.11.10
+ pkgver = 1.11.16
pkgrel = 1
url = https://nixos.org/nix
+ install = nix.install
arch = i686
arch = x86_64
license = LGPL
@@ -13,8 +14,10 @@ pkgbase = nix
depends = perl-dbd-sqlite
depends = gc
depends = libsodium
- source = https://nixos.org/releases/nix/nix-1.11.10/nix-1.11.10.tar.xz
- sha256sums = b29a458c2b803bcc07d8b58cd016ca6ad0788a73ca74edaeaebc588961322467
+ source = https://nixos.org/releases/nix/nix-1.11.16/nix-1.11.16.tar.xz
+ source = fix_perllibdir.patch
+ sha256sums = 0ca5782fc37d62238d13a620a7b4bff6a200bab1bd63003709249a776162357c
+ sha256sums = 6d5a79602944b560f9b571c8db4efa1b26d4495e6160c5e18c2efbdd2e611c80
pkgname = nix
diff --git a/PKGBUILD b/PKGBUILD
index 2a407549d48..3189ef8e80e 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -4,7 +4,7 @@
# Contributor: koral <koral at mailoo dot org>
pkgname=nix
-pkgver=1.11.10
+pkgver=1.11.16
pkgrel=1
pkgdesc="A purely functional package manager"
arch=('i686' 'x86_64')
@@ -12,8 +12,15 @@ url="https://nixos.org/nix"
license=('LGPL')
depends=('perl-www-curl' 'perl-dbd-sqlite' 'gc' 'libsodium')
makedepends=('bzip2' 'gc' 'openssl')
-source=("https://nixos.org/releases/nix/nix-$pkgver/nix-$pkgver.tar.xz")
-sha256sums=('b29a458c2b803bcc07d8b58cd016ca6ad0788a73ca74edaeaebc588961322467')
+install=nix.install
+source=("https://nixos.org/releases/nix/nix-$pkgver/nix-$pkgver.tar.xz" "fix_perllibdir.patch")
+sha256sums=('0ca5782fc37d62238d13a620a7b4bff6a200bab1bd63003709249a776162357c'
+ '6d5a79602944b560f9b571c8db4efa1b26d4495e6160c5e18c2efbdd2e611c80')
+
+prepare() {
+ cd "$pkgname-$pkgver"
+ patch -Np1 -i "${srcdir}/fix_perllibdir.patch"
+}
build () {
cd "$pkgname-$pkgver"
diff --git a/fix_perllibdir.patch b/fix_perllibdir.patch
new file mode 100644
index 00000000000..2cb718b5c26
--- /dev/null
+++ b/fix_perllibdir.patch
@@ -0,0 +1,12 @@
+diff -ura a/Makefile.config.in b/Makefile.config.in
+--- a/Makefile.config.in 1970-01-01 00:00:01.000000000 +0000
++++ b/Makefile.config.in 2017-09-03 17:04:53.032445157 +0000
+@@ -26,7 +26,7 @@
+ mandir = @mandir@
+ perl = @perl@
+ perlbindings = @perlbindings@
+-perllibdir = @perllibdir@
++perllibdir = $(shell perl -V:vendorarch|cut -d\' -f2)
+ pkglibdir = $(libdir)/$(PACKAGE_NAME)
+ prefix = @prefix@
+ storedir = @storedir@
diff --git a/nix.install b/nix.install
new file mode 100644
index 00000000000..e9adc0cf6e3
--- /dev/null
+++ b/nix.install
@@ -0,0 +1,91 @@
+
+pre_install () {
+ # Check that the group and users don't already exist
+ if [[ -n $(cut -d: -f1 /etc/group | grep -w nixbld) ]]; then
+ echo "The nixbld group already exists. This install cannot proceed."
+ exit 1
+ fi
+
+ for i in {1..10}; do
+ if [[ -n $(cut -d: -f1 /etc/passwd | grep -w nixbld$i) ]]; then
+ echo "The nixbld$i user already exists. This install cannot proceed."
+ exit 1
+ fi
+ done
+}
+
+create_users () {
+ # Create a nixbld group.
+ groupadd -r nixbld
+
+ # Create 10 nixbld{i} users
+ for i in {1..10}; do
+ useradd -g nixbld -G nixbld -r -N -M -d /var/empty -s /sbin/nologin nixbld$i
+ done
+}
+
+delete_users() {
+ # Remove the users
+ for i in {1..10}; do
+ userdel nixbld$i
+ done
+
+ # Remove the group
+ groupdel nixbld
+}
+
+create_store() {
+ # Create nix folders and set permissions
+ mkdir -p /nix/store
+ chown root.nixbld /nix/store
+ chmod 1775 /nix/store
+ mkdir -p -m 1777 /nix/var/nix/gcroots/per-user
+ mkdir -p -m 1777 /nix/var/nix/profiles/per-user
+}
+
+restore_store() {
+ # Restore folder permissions
+ chmod 755 /nix/store
+ chown root.root /nix/store
+}
+
+daemon_info() {
+ if [ ! -d /nix/var/nix/profiles/per-user/root ]; then
+ echo "To start the nix daemon, execute one of the following:"
+ echo
+ echo " systemctl enable nix-daemon.socket # Sets the daemon to start on next boot"
+ echo " systemctl enable --now nix-daemon.socket # Starts now and on next boot too"
+ echo
+ echo "Also, if this is a new install, you need to start a new login shell or otherwise"
+ echo
+ echo " source /etc/profile.d/nix.sh"
+ echo " source /etc/profile.d/nix-daemon.sh"
+ echo
+ echo "Once your environment is set-up, you will need to add some channels. You can see how"
+ echo "to do that here:"
+ echo " https://nixos.org/nix/manual/#sec-channels"
+ fi
+}
+
+post_install() {
+ create_users
+ create_store
+ daemon_info
+}
+
+pre_upgrade() {
+ systemctl stop nix-daemon.socket
+ systemctl stop nix-daemon
+}
+
+post_upgrade() {
+ delete_users
+ create_users
+ create_store
+ daemon_info
+}
+
+pre_remove() {
+ restore_store
+ delete_users
+}