[arch-commits] Commit in (10 files)

George Rawlinson grawlinson at archlinux.org
Wed Jun 30 23:51:11 UTC 2021


    Date: Wednesday, June 30, 2021 @ 23:51:10
  Author: grawlinson
Revision: 968057

addpkg: nix 2.3.13-2

Added:
  nix/
  nix/repos/
  nix/trunk/
  nix/trunk/PKGBUILD
  nix/trunk/nix.conf
  nix/trunk/nix.install
  nix/trunk/sysusers.conf
  nix/trunk/tmpfiles.conf
  nix/trunk/user.environment.conf
  nix/trunk/user.tmpfiles.conf

-----------------------+
 PKGBUILD              |   76 ++++++++++++++++++++++++++++++++++++++++++++++++
 nix.conf              |    6 +++
 nix.install           |   11 ++++++
 sysusers.conf         |   25 +++++++++++++++
 tmpfiles.conf         |    4 ++
 user.environment.conf |    3 +
 user.tmpfiles.conf    |    5 +++
 7 files changed, 130 insertions(+)

Added: nix/trunk/PKGBUILD
===================================================================
--- nix/trunk/PKGBUILD	                        (rev 0)
+++ nix/trunk/PKGBUILD	2021-06-30 23:51:10 UTC (rev 968057)
@@ -0,0 +1,76 @@
+# Maintainer: George Rawlinson <grawlinson at archlinux.org>
+
+pkgname=nix
+pkgver=2.3.13
+pkgrel=2
+pkgdesc="A purely functional package manager"
+arch=('x86_64')
+url="https://nixos.org/nix"
+license=('LGPL')
+depends=(
+  'boost'
+  'brotli'
+  'bzip2'
+  'curl'
+  'editline'
+  'gc'
+  'libseccomp'
+  'libsodium'
+  'openssl'
+  'sqlite'
+)
+provides=(
+  'libnixutil.so'
+  'libnixstore.so'
+  'libnixmain.so'
+  'libnixexpr.so'
+)
+backup=("etc/$pkgname/$pkgname.conf")
+install="$pkgname.install"
+source=(
+  "https://nixos.org/releases/nix/nix-$pkgver/nix-$pkgver.tar.xz"
+  'nix.conf'
+  'sysusers.conf'
+  'tmpfiles.conf'
+  'user.environment.conf'
+  'user.tmpfiles.conf'
+)
+sha256sums=('7034647cb4fcfeff54134d22a0443ec4eccba8f1bc902f9ef1e6b447c5c46118'
+            '78373deff2519a3acf288a9438b42277e7bc9b2ae5fcaa8ff1070bc08a2dbded'
+            'addabf0f652556aa010a122c225de8daceef0cb4f8d6714064ea6bd754b88534'
+            'f078cb60bdd549e9cb3b9af3dfacd33e1b7f16a7e7c02904f50f08bfc8c0d952'
+            'e45e45394a119a4ef2046a4a39403dda2df2af820c2d116763031c4689fc5717'
+            'c353524861487ef7f7e862bdaaa70e2a3a29e08d2ee31947ebf9e01237c5c50d')
+
+build () {
+  cd "$pkgname-$pkgver"
+  CXXFLAGS='-D_GLIBCXX_USE_CXX11_ABI=0' \
+    ./configure \
+    --prefix=/usr \
+    --libexecdir="/usr/lib/$pkgname" \
+    --sysconfdir=/etc \
+    --localstatedir=/nix/var \
+    --enable-gc
+  make
+}
+
+package() {
+  # systemd integration
+  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"
+
+  # configuration
+  install -vDm644 nix.conf -t "$pkgdir/etc/$pkgname"
+
+  # package
+  cd "$pkgname-$pkgver"
+  make DESTDIR="$pkgdir" install
+
+  # remove unused files
+  rm -rf "$pkgdir/etc/init"
+
+  # license
+  install -Dm644 COPYING "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+}

Added: nix/trunk/nix.conf
===================================================================
--- nix/trunk/nix.conf	                        (rev 0)
+++ nix/trunk/nix.conf	2021-06-30 23:51:10 UTC (rev 968057)
@@ -0,0 +1,6 @@
+#
+# https://nixos.org/manual/nix/stable/#sec-conf-file
+#
+
+# Unix group containing the Nix build user accounts
+build-users-group = nixbld

Added: nix/trunk/nix.install
===================================================================
--- nix/trunk/nix.install	                        (rev 0)
+++ nix/trunk/nix.install	2021-06-30 23:51:10 UTC (rev 968057)
@@ -0,0 +1,11 @@
+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`.
+
+# usermod -aG nix-users $USER
+
+EOF
+}

Added: nix/trunk/sysusers.conf
===================================================================
--- nix/trunk/sysusers.conf	                        (rev 0)
+++ nix/trunk/sysusers.conf	2021-06-30 23:51:10 UTC (rev 968057)
@@ -0,0 +1,25 @@
+# Group for Nix users
+g nix-users
+
+# Users & Group for Nix package builder
+g nixbld -
+u nixbld01 - "Nix build user 01"
+u nixbld02 - "Nix build user 02"
+u nixbld03 - "Nix build user 03"
+u nixbld04 - "Nix build user 04"
+u nixbld05 - "Nix build user 05"
+u nixbld06 - "Nix build user 06"
+u nixbld07 - "Nix build user 07"
+u nixbld08 - "Nix build user 08"
+u nixbld09 - "Nix build user 09"
+u nixbld10 - "Nix build user 10"
+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

Added: nix/trunk/tmpfiles.conf
===================================================================
--- nix/trunk/tmpfiles.conf	                        (rev 0)
+++ nix/trunk/tmpfiles.conf	2021-06-30 23:51:10 UTC (rev 968057)
@@ -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

Added: nix/trunk/user.environment.conf
===================================================================
--- nix/trunk/user.environment.conf	                        (rev 0)
+++ nix/trunk/user.environment.conf	2021-06-30 23:51:10 UTC (rev 968057)
@@ -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"

Added: nix/trunk/user.tmpfiles.conf
===================================================================
--- nix/trunk/user.tmpfiles.conf	                        (rev 0)
+++ nix/trunk/user.tmpfiles.conf	2021-06-30 23:51:10 UTC (rev 968057)
@@ -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




More information about the arch-commits mailing list