1
0
mirror of https://github.com/bertptrs/aur.git synced 2025-12-26 04:50:32 +01:00

update to 1.11.16

This commit is contained in:
Felix Morgner
2018-02-14 14:19:33 +01:00
parent 03310c8419
commit 163f3e505c
4 changed files with 119 additions and 6 deletions

View File

@@ -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

View File

@@ -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"

12
fix_perllibdir.patch Normal file
View File

@@ -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@

91
nix.install Normal file
View File

@@ -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
}