diff options
-rw-r--r-- | .SRCINFO | 13 | ||||
-rw-r--r-- | PKGBUILD | 17 | ||||
-rw-r--r-- | ldflags.patch | 24 | ||||
-rw-r--r-- | nix.install | 27 |
4 files changed, 47 insertions, 34 deletions
@@ -1,7 +1,7 @@ pkgbase = nix pkgdesc = A purely functional package manager - pkgver = 2.2.2 - pkgrel = 3 + pkgver = 2.3.13 + pkgrel = 1 url = https://nixos.org/nix install = nix.install arch = i686 @@ -15,9 +15,10 @@ pkgbase = nix depends = boost depends = brotli depends = editline - depends = archlinux-nix - source = https://nixos.org/releases/nix/nix-2.2.2/nix-2.2.2.tar.xz - sha256sums = f80a1b4f9837a8d33209f0b7769d5038335459ff4303eccf3e9217a9eca8594c + optdepends = archlinux-nix: tools to help with setup of Nix + source = https://nixos.org/releases/nix/nix-2.3.13/nix-2.3.13.tar.xz + source = ldflags.patch + sha256sums = 7034647cb4fcfeff54134d22a0443ec4eccba8f1bc902f9ef1e6b447c5c46118 + sha256sums = 42350237d98785b30b0ee099405f2f1f7412f8a816162c22bd232ed3dbbe0305 pkgname = nix - @@ -1,4 +1,5 @@ # Maintainer: Alastair Pharo <asppsa at gmail dot com> +# Co-Maintainer: Bert Peters <bert@bertptrs.nl> # Contributor: Felix Morgner <felix.morgner@gmail.com> # Contributor: Vlad M. <vlad@archlinux.net> # Contributor: Mario Rodas @@ -7,25 +8,29 @@ # Contributor: Anders Bennehag pkgname=nix -pkgver=2.2.2 -pkgrel=3 +pkgver=2.3.13 +pkgrel=1 pkgdesc="A purely functional package manager" arch=('i686' 'x86_64' 'armv7h') url="https://nixos.org/nix" license=('LGPL') -depends=('gc' 'libsodium' 'boost' 'brotli' 'editline' 'archlinux-nix') +depends=('gc' 'libsodium' 'boost' 'brotli' 'editline') +optdepends=('archlinux-nix: tools to help with setup of Nix') makedepends=('bzip2' 'openssl') install=nix.install -source=("https://nixos.org/releases/nix/nix-$pkgver/nix-$pkgver.tar.xz") -sha256sums=('f80a1b4f9837a8d33209f0b7769d5038335459ff4303eccf3e9217a9eca8594c') +source=("https://nixos.org/releases/nix/nix-$pkgver/nix-$pkgver.tar.xz" + 'ldflags.patch') +sha256sums=('7034647cb4fcfeff54134d22a0443ec4eccba8f1bc902f9ef1e6b447c5c46118' + '42350237d98785b30b0ee099405f2f1f7412f8a816162c22bd232ed3dbbe0305') prepare() { cd "$pkgname-$pkgver" + patch --forward --strip=1 --input="${srcdir}/ldflags.patch" } build () { cd "$pkgname-$pkgver" - ./configure --prefix=/usr \ + CXXFLAGS='-D_GLIBCXX_USE_CXX11_ABI=0' ./configure --prefix=/usr \ --libexecdir="/usr/lib/$pkgname" \ --sysconfdir=/etc \ --enable-gc diff --git a/ldflags.patch b/ldflags.patch new file mode 100644 index 000000000000..1a2c4e16703b --- /dev/null +++ b/ldflags.patch @@ -0,0 +1,24 @@ +diff --git a/mk/libraries.mk b/mk/libraries.mk +index 307e29b9d05..25cb1b81da6 100644 +--- a/mk/libraries.mk ++++ b/mk/libraries.mk +@@ -96,7 +96,9 @@ define build-library + ifneq ($(OS), Darwin) + $(1)_LDFLAGS_USE += -Wl,-rpath,$$(abspath $$(_d)) + endif +- $(1)_LDFLAGS_USE += -L$$(_d) -l$$(patsubst lib%,%,$$(strip $$($(1)_NAME))) ++ # -L and -l might conflict with previously-installed libraries. Instead ++ # pass the file directly to the linker. ++ $(1)_LDFLAGS_USE += -Wl,$$(_d)/$$($(1)_NAME).$(SO_EXT) + + $(1)_INSTALL_PATH := $(DESTDIR)$$($(1)_INSTALL_DIR)/$$($(1)_NAME).$(SO_EXT) + +@@ -107,7 +109,7 @@ define build-library + $$($(1)_INSTALL_PATH): $$($(1)_OBJS) $$(_libs_final) | $(DESTDIR)$$($(1)_INSTALL_DIR)/ + $$(trace-ld) $(CXX) -o $$@ -shared $$(LDFLAGS) $$(GLOBAL_LDFLAGS) $$($(1)_OBJS) $$($(1)_LDFLAGS) $$($(1)_LDFLAGS_PROPAGATED) $$(foreach lib, $$($(1)_LIBS), $$($$(lib)_LDFLAGS_USE_INSTALLED)) + +- $(1)_LDFLAGS_USE_INSTALLED += -L$$(DESTDIR)$$($(1)_INSTALL_DIR) -l$$(patsubst lib%,%,$$(strip $$($(1)_NAME))) ++ $(1)_LDFLAGS_USE_INSTALLED += -Wl,$$(DESTDIR)$$($(1)_INSTALL_DIR)/$$($(1)_NAME).$(SO_EXT) + ifneq ($(OS), Darwin) + ifeq ($(SET_RPATH_TO_LIBS), 1) + $(1)_LDFLAGS_USE_INSTALLED += -Wl,-rpath,$$($(1)_INSTALL_DIR) diff --git a/nix.install b/nix.install index 551b35f1f7c9..e07213e24a29 100644 --- a/nix.install +++ b/nix.install @@ -1,13 +1,7 @@ install_info() { - echo "Nix is installed and configured, and the nix-daemon should be running. To check," - echo "you can run:" - echo - echo " archlinux-nix status" - echo - echo "Each user's environment is setup on login. Alternatively, you can execute the" - echo "following to avoid having to log back in:" - echo - echo " source /etc/profile.d/nix{,-daemon}.sh" + echo "Nix is installed but no configuration has been done to make it work." + echo "You may wish to install the archlinux-nix package from AUR to help set" + echo "things up." echo echo "For more information on how to use nix, check out Part III of the Nix Manual:" echo @@ -21,29 +15,18 @@ remove_info() { echo "1. delete /nix folder" echo " # rm -r /nix" echo - echo "2. delete the build users (if any)" - echo " # archlinux-nix delete-build-group" - echo - echo "3. delete the config dir" + echo "2. delete the config dir" echo " # rm -r /etc/nix" echo - echo "4. uninstall the archlinux-nix tool" - echo " pacman -R archlinux-nix" - echo - echo "5. you may also want to delete nix-related files from users' home dirs" + echo "3. you may also want to delete nix-related files from users' home dirs" echo " # rm -r /root/.nix-* /home/*/.nix-*" echo } post_install() { - archlinux-nix bootstrap install_info } -post_upgrade() { - archlinux-nix bootstrap -} - post_remove() { remove_info } |