summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorCaleb Maclennan2021-11-16 03:08:43 +0300
committerCaleb Maclennan2021-11-16 03:26:22 +0300
commitc6fbd8b4e1aef34ccce42204e691b94b69210697 (patch)
tree31013438f7d30ec7f30b14f500e2078cd0764cee
parent35ab2ba383a1f872443a8d4f244adde541e2c239 (diff)
downloadaur-c6fbd8b4e1aef34ccce42204e691b94b69210697.tar.gz
Bring closer to [community] package, update for current upstream
-rw-r--r--.SRCINFO54
-rw-r--r--PKGBUILD120
-rw-r--r--nix.conf9
-rw-r--r--nix.install9
-rw-r--r--sysusers.conf27
-rw-r--r--tmpfiles.conf4
-rw-r--r--user.environment.conf3
-rw-r--r--user.tmpfiles.conf5
8 files changed, 140 insertions, 91 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 0f257b50b558..bb9a8b45d614 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,44 +1,42 @@
-# Generated by mksrcinfo v8
-# Tue Dec 19 23:04:19 UTC 2017
pkgbase = nix-git
- pkgdesc = The Purely Functional Package Manager
- pkgver = 1.11.20160112
- pkgrel = 2
+ pkgdesc = A purely functional package manager
+ pkgver = 2.2.r4369.g9fe0343
+ pkgrel = 1
url = https://github.com/NixOS/nix
- arch = i686
+ install = nix.install
arch = x86_64
+ arch = i686
license = LGPL2
- makedepends = autoconf
- makedepends = automake
- makedepends = bison
- makedepends = flex
+ makedepends = autoconf-archive
makedepends = git
- makedepends = libtool
- makedepends = m4
- makedepends = make
- makedepends = pkg-config
+ makedepends = gtest
+ makedepends = jq
+ makedepends = libcpuid
+ makedepends = lowdown
+ depends = boost
+ depends = brotli
depends = bzip2
depends = curl
- depends = dblatex
+ depends = editline
depends = gc
- depends = graphviz
+ depends = libseccomp
depends = libsodium
- depends = libxml2
- depends = libxslt
- depends = nlohmann-json
depends = openssl
- depends = patch
- depends = perl
- depends = perl-dbi
- depends = perl-dbd-sqlite
- depends = perl-www-curl
- depends = pv
depends = sqlite
- depends = xz
provides = nix
conflicts = nix
- source = git+https://github.com/NixOS/nix
+ backup = etc/nix/nix.conf
+ source = nix-git::git+https://github.com/NixOS/nix
+ source = nix.conf
+ source = sysusers.conf
+ source = tmpfiles.conf
+ source = user.environment.conf
+ source = user.tmpfiles.conf
sha256sums = SKIP
+ sha256sums = cf3c7a3a24ac0f553b6fd8ba6adb8f1375d8675911af12c4db94918a799f688e
+ sha256sums = cf6caa02e0b5224332c5945ba6fa08b1517802898290e6c2eb96046cad9598d8
+ sha256sums = f078cb60bdd549e9cb3b9af3dfacd33e1b7f16a7e7c02904f50f08bfc8c0d952
+ sha256sums = e45e45394a119a4ef2046a4a39403dda2df2af820c2d116763031c4689fc5717
+ sha256sums = c353524861487ef7f7e862bdaaa70e2a3a29e08d2ee31947ebf9e01237c5c50d
pkgname = nix-git
-
diff --git a/PKGBUILD b/PKGBUILD
index 5e97ee768a65..8de08c8fc6cc 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,86 +1,80 @@
-# Maintainer: Andy Weidenbaum <archbaum@gmail.com>
+# Maintainer: Caleb Maclennan <caleb@alerque.com>
+# Contributor: Andy Weidenbaum <archbaum@gmail.com>
# Contributor: Vlad M. <vlad@archlinux.net>
# Contributor: Mario Rodas
# Contributor: Oozyslug <oozyslug at gmail dot com>
# Contributor: koral <koral at mailoo dot org>
pkgname=nix-git
-pkgver=1.11.20160112
-pkgrel=2
-pkgdesc="The Purely Functional Package Manager"
-arch=('i686' 'x86_64')
-depends=('bzip2'
- 'curl'
- 'dblatex'
- 'gc'
- 'graphviz'
- 'libsodium'
- 'libxml2'
- 'libxslt'
- 'nlohmann-json'
- 'openssl'
- 'patch'
- 'perl'
- 'perl-dbi'
- 'perl-dbd-sqlite'
- 'perl-www-curl'
- 'pv'
- 'sqlite'
- 'xz')
-makedepends=('autoconf'
- 'automake'
- 'bison'
- 'flex'
- 'git'
- 'libtool'
- 'm4'
- 'make'
- 'pkg-config')
-url="https://github.com/NixOS/nix"
-license=('LGPL2')
-source=(git+https://github.com/NixOS/nix)
-sha256sums=('SKIP')
-provides=('nix')
-conflicts=('nix')
-
-pkgver() {
- cd ${pkgname%-git}
- _last_commit_date=$(git log -1 --format="%cd" --date=short --no-show-signature | sed "s|-||g")
- _version=$(cat ./version)
- echo "${_version}.${_last_commit_date}"
-}
+pkgver=2.2.r4369.g9fe0343
+pkgrel=1
+pkgdesc="A purely functional package manager"
+arch=(x86_64 i686)
+url="https://github.com/NixOS/${pkgname%-git}"
+license=(LGPL2)
+depends=(boost
+ brotli
+ bzip2
+ curl
+ editline
+ gc
+ libseccomp
+ libsodium
+ openssl
+ sqlite)
+makedepends=(autoconf-archive
+ git
+ gtest
+ jq
+ libcpuid
+ lowdown)
+backup=("etc/${pkgname%-git}/${pkgname%-git}.conf")
+install="${pkgname%-git}.install"
+provides=("${pkgname%-git}")
+conflicts=("${pkgname%-git}")
+source=("$pkgname::git+$url"
+ nix.conf
+ sysusers.conf
+ tmpfiles.conf
+ user.environment.conf
+ user.tmpfiles.conf)
+sha256sums=('SKIP'
+ 'cf3c7a3a24ac0f553b6fd8ba6adb8f1375d8675911af12c4db94918a799f688e'
+ 'cf6caa02e0b5224332c5945ba6fa08b1517802898290e6c2eb96046cad9598d8'
+ 'f078cb60bdd549e9cb3b9af3dfacd33e1b7f16a7e7c02904f50f08bfc8c0d952'
+ 'e45e45394a119a4ef2046a4a39403dda2df2af820c2d116763031c4689fc5717'
+ 'c353524861487ef7f7e862bdaaa70e2a3a29e08d2ee31947ebf9e01237c5c50d')
prepare() {
- cd ${pkgname%-git}
+ cd "$pkgname"
+ ./bootstrap.sh
+}
- # https://github.com/NixOS/nix/issues/506
- msg2 'Removing xml --nonet...'
- sed -i "s/--nonet\s//g" doc/manual/local.mk
+pkgver() {
+ cd "$pkgname"
+ git describe --long --tags --abbrev=7 HEAD |
+ sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
}
build() {
- cd ${pkgname%-git}
-
- msg2 'Building...'
- ./bootstrap.sh
+ cd "$pkgname"
+ CXXFLAGS='-D_GLIBCXX_USE_CXX11_ABI=0' \
./configure \
--prefix=/usr \
- --sbindir=/usr/bin \
--libexecdir=/usr/lib/nix \
--sysconfdir=/etc \
- --sharedstatedir=/usr/share/nix \
- --localstatedir=/var/lib/nix \
- --disable-init-state \
+ --localstatedir=/nix/var \
--enable-gc
- make
+ make builddir="$srcdir/$pkgname-$pkgver"
}
package() {
- cd ${pkgname%-git}
-
- msg2 'Installing...'
+ install -vDm644 tmpfiles.conf "$pkgdir/usr/lib/tmpfiles.d/$pkgname-daemon.conf"
+ install -vDm644 sysusers.conf "$pkgdir/usr/lib/sysusers.d/$pkgname-daemon.conf"
+ install -vDm644 user.tmpfiles.conf "$pkgdir/usr/share/user-tmpfiles.d/$pkgname-daemon.conf"
+ install -vDm644 user.environment.conf "$pkgdir/usr/lib/environment.d/$pkgname-daemon.conf"
+ install -vDm644 nix.conf -t "$pkgdir/etc/$pkgname"
+ cd "$pkgname"
make DESTDIR="$pkgdir" install
- msg2 'Cleaning up pkgdir...'
- find "$pkgdir" -type d -name .git -exec rm -r '{}' +
}
diff --git a/nix.conf b/nix.conf
new file mode 100644
index 000000000000..59bd56ce4ce9
--- /dev/null
+++ b/nix.conf
@@ -0,0 +1,9 @@
+#
+# https://nixos.org/manual/nix/stable/#sec-conf-file
+#
+
+# Unix group containing the Nix build user accounts
+build-users-group = nixbld
+
+# Disable sandbox
+# sandbox = false
diff --git a/nix.install b/nix.install
new file mode 100644
index 000000000000..99f55490b9b2
--- /dev/null
+++ b/nix.install
@@ -0,0 +1,9 @@
+post_install() {
+ cat <<EOF
+
+Nix is installed but is not configured.
+
+To access Nix's daemon socket, users must be a member of the group 'nix-users'.
+
+EOF
+}
diff --git a/sysusers.conf b/sysusers.conf
new file mode 100644
index 000000000000..6c1eb8aa857f
--- /dev/null
+++ b/sysusers.conf
@@ -0,0 +1,27 @@
+# Group for Nix users
+g nix-users
+
+# Users & Group for Nix package builder
+g nixbld
+u nixbld01 -:nixbld "Nix builder 01"
+u nixbld02 -:nixbld "Nix builder 02"
+u nixbld03 -:nixbld "Nix builder 03"
+u nixbld04 -:nixbld "Nix builder 04"
+u nixbld05 -:nixbld "Nix builder 05"
+u nixbld06 -:nixbld "Nix builder 06"
+u nixbld07 -:nixbld "Nix builder 07"
+u nixbld08 -:nixbld "Nix builder 08"
+u nixbld09 -:nixbld "Nix builder 09"
+u nixbld10 -:nixbld "Nix builder 10"
+
+# Ensure users belong to group ...
+m nixbld01 nixbld
+m nixbld02 nixbld
+m nixbld03 nixbld
+m nixbld04 nixbld
+m nixbld05 nixbld
+m nixbld06 nixbld
+m nixbld07 nixbld
+m nixbld08 nixbld
+m nixbld09 nixbld
+m nixbld10 nixbld
diff --git a/tmpfiles.conf b/tmpfiles.conf
new file mode 100644
index 000000000000..b8be20e239e5
--- /dev/null
+++ b/tmpfiles.conf
@@ -0,0 +1,4 @@
+d /nix/var/nix/daemon-socket 770 root nix-users
+e! /nix/var/nix/daemon-socket - - - 0
+d /nix/var/nix/gcroots/per-user 1777
+d /nix/var/nix/profiles/per-user 1777
diff --git a/user.environment.conf b/user.environment.conf
new file mode 100644
index 000000000000..9fb8c6800966
--- /dev/null
+++ b/user.environment.conf
@@ -0,0 +1,3 @@
+NIX_REMOTE=daemon
+PATH="$HOME/.nix-profile/bin:/nix/var/nix/profiles/default/bin:$PATH"
+NIX_PATH="nixpkgs=/nix/var/nix/profiles/per-user/$USER/channels/nixpkgs:/nix/var/nix/profiles/per-user/$USER/channels"
diff --git a/user.tmpfiles.conf b/user.tmpfiles.conf
new file mode 100644
index 000000000000..1bc54f01b178
--- /dev/null
+++ b/user.tmpfiles.conf
@@ -0,0 +1,5 @@
+d %h/.nix-defexpr
+L %h/.nix-defexpr/channels_root - - - - /nix/var/nix/profiles/per-user/root/channels
+d /nix/var/nix/profiles/per-user/%u 0755
+L %h/.nix-profile - - - - /nix/var/nix/profiles/per-user/%u/profile
+d /nix/var/nix/gcroots/per-user/%u 0755