pkgbase = nix
pkgdesc = A purely functional package manager
- pkgver = 1.11.16
+ pkgver = 2.0
pkgrel = 1
url = https://nixos.org/nix
install = nix.install
makedepends = bzip2
makedepends = gc
makedepends = openssl
- depends = perl-www-curl
- depends = perl-dbd-sqlite
depends = gc
depends = libsodium
- source = https://nixos.org/releases/nix/nix-1.11.16/nix-1.11.16.tar.xz
- source = fix_perllibdir.patch
- sha256sums = 0ca5782fc37d62238d13a620a7b4bff6a200bab1bd63003709249a776162357c
- sha256sums = 6d5a79602944b560f9b571c8db4efa1b26d4495e6160c5e18c2efbdd2e611c80
+ source = https://nixos.org/releases/nix/nix-2.0/nix-2.0.tar.xz
+ sha256sums = 7024d327314bf92c1d3e6cccd944929828a44b24093954036bfb0115a92f5a14
pkgname = nix
-# Maintainer: Vlad M. <vlad@archlinux.net>
+# Maintainer: Felix Morgner <felix.morgner@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
-pkgver=1.11.16
+pkgver=2.0
pkgrel=1
pkgdesc="A purely functional package manager"
arch=('i686' 'x86_64')
url="https://nixos.org/nix"
license=('LGPL')
-depends=('perl-www-curl' 'perl-dbd-sqlite' 'gc' 'libsodium')
+depends=('gc' 'libsodium')
makedepends=('bzip2' 'gc' 'openssl')
install=nix.install
-source=("https://nixos.org/releases/nix/nix-$pkgver/nix-$pkgver.tar.xz" "fix_perllibdir.patch")
-sha256sums=('0ca5782fc37d62238d13a620a7b4bff6a200bab1bd63003709249a776162357c'
- '6d5a79602944b560f9b571c8db4efa1b26d4495e6160c5e18c2efbdd2e611c80')
+source=("https://nixos.org/releases/nix/nix-$pkgver/nix-$pkgver.tar.xz")
+sha256sums=('7024d327314bf92c1d3e6cccd944929828a44b24093954036bfb0115a92f5a14')
+
prepare() {
cd "$pkgname-$pkgver"
- patch -Np1 -i "${srcdir}/fix_perllibdir.patch"
}
build () {
+++ /dev/null
-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@
chown root.root /nix/store
}
+init_channels() {
+ # Initialize default nix channel
+ echo "Initializing default nix channel"
+ source /etc/profile.d/nix.sh
+ nix-channel --update
+}
+
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
+ 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"
}
post_install() {
create_users
create_store
+ init_channels
daemon_info
}