mirror of
https://github.com/void-linux/void-packages.git
synced 2025-09-04 19:12:57 +02:00
nix: update to 2.30.2.
This commit is contained in:
parent
e6e8ee3115
commit
1373552dc0
5 changed files with 26 additions and 201 deletions
|
@ -1,91 +0,0 @@
|
||||||
From 68959b8b92b4bb6fd47cd80aafd9a76c1a50cf37 Mon Sep 17 00:00:00 2001
|
|
||||||
Message-Id: <68959b8b92b4bb6fd47cd80aafd9a76c1a50cf37.1662107347.git.congdanhqx@gmail.com>
|
|
||||||
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
|
|
||||||
<congdanhqx@gmail.com>
|
|
||||||
Date: Fri, 2 Sep 2022 10:33:10 +0700
|
|
||||||
Subject: [PATCH 1/2] manual: build without nix installation
|
|
||||||
|
|
||||||
Current manual needs nix installed into $(bindir) which could be
|
|
||||||
non-writable if $(prefix) set to root-owned directory like /usr or
|
|
||||||
/usr/local. In addition, half-baked nix could override the good nix
|
|
||||||
that installed in $(prefix).
|
|
||||||
|
|
||||||
Let's run $(nix_DIR)/nix instead of $(bindir)/nix.
|
|
||||||
---
|
|
||||||
doc/manual/local.mk | 24 ++++++++++++------------
|
|
||||||
1 file changed, 12 insertions(+), 12 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/doc/manual/local.mk b/doc/manual/local.mk
|
|
||||||
index 66a8cb7de..6fad1c594 100644
|
|
||||||
--- a/doc/manual/local.mk
|
|
||||||
+++ b/doc/manual/local.mk
|
|
||||||
@@ -24,7 +24,7 @@ dummy-env = env -i \
|
|
||||||
NIX_STATE_DIR=/dummy \
|
|
||||||
NIX_CONFIG='cores = 0'
|
|
||||||
|
|
||||||
-nix-eval = $(dummy-env) $(bindir)/nix eval --experimental-features nix-command -I nix/corepkgs=corepkgs --store dummy:// --impure --raw
|
|
||||||
+nix-eval = $(dummy-env) $(nix_DIR)/nix eval --experimental-features nix-command -I nix/corepkgs=corepkgs --store dummy:// --impure --raw
|
|
||||||
|
|
||||||
$(d)/%.1: $(d)/src/command-ref/%.md
|
|
||||||
@printf "Title: %s\n\n" "$$(basename $@ .1)" > $^.tmp
|
|
||||||
@@ -48,31 +48,31 @@ $(d)/src/SUMMARY.md: $(d)/src/SUMMARY.md.in $(d)/src/command-ref/new-cli
|
|
||||||
$(trace-gen) cat doc/manual/src/SUMMARY.md.in | while IFS= read line; do if [[ $$line = @manpages@ ]]; then cat doc/manual/src/command-ref/new-cli/SUMMARY.md; else echo "$$line"; fi; done > $@.tmp
|
|
||||||
@mv $@.tmp $@
|
|
||||||
|
|
||||||
-$(d)/src/command-ref/new-cli: $(d)/nix.json $(d)/generate-manpage.nix $(bindir)/nix
|
|
||||||
+$(d)/src/command-ref/new-cli: $(d)/nix.json $(d)/generate-manpage.nix $(nix_DIR)/nix
|
|
||||||
@rm -rf $@
|
|
||||||
$(trace-gen) $(nix-eval) --write-to $@ --expr 'import doc/manual/generate-manpage.nix { command = builtins.readFile $<; renderLinks = true; }'
|
|
||||||
|
|
||||||
-$(d)/src/command-ref/conf-file.md: $(d)/conf-file.json $(d)/generate-options.nix $(d)/src/command-ref/conf-file-prefix.md $(bindir)/nix
|
|
||||||
+$(d)/src/command-ref/conf-file.md: $(d)/conf-file.json $(d)/generate-options.nix $(d)/src/command-ref/conf-file-prefix.md $(nix_DIR)/nix
|
|
||||||
@cat doc/manual/src/command-ref/conf-file-prefix.md > $@.tmp
|
|
||||||
$(trace-gen) $(nix-eval) --expr 'import doc/manual/generate-options.nix (builtins.fromJSON (builtins.readFile $<))' >> $@.tmp
|
|
||||||
@mv $@.tmp $@
|
|
||||||
|
|
||||||
-$(d)/nix.json: $(bindir)/nix
|
|
||||||
- $(trace-gen) $(dummy-env) $(bindir)/nix __dump-args > $@.tmp
|
|
||||||
+$(d)/nix.json: $(nix_DIR)/nix
|
|
||||||
+ $(trace-gen) $(dummy-env) $(nix_DIR)/nix __dump-args > $@.tmp
|
|
||||||
@mv $@.tmp $@
|
|
||||||
|
|
||||||
-$(d)/conf-file.json: $(bindir)/nix
|
|
||||||
- $(trace-gen) $(dummy-env) $(bindir)/nix show-config --json --experimental-features nix-command > $@.tmp
|
|
||||||
+$(d)/conf-file.json: $(nix_DIR)/nix
|
|
||||||
+ $(trace-gen) $(dummy-env) $(nix_DIR)/nix show-config --json --experimental-features nix-command > $@.tmp
|
|
||||||
@mv $@.tmp $@
|
|
||||||
|
|
||||||
-$(d)/src/language/builtins.md: $(d)/builtins.json $(d)/generate-builtins.nix $(d)/src/language/builtins-prefix.md $(bindir)/nix
|
|
||||||
+$(d)/src/language/builtins.md: $(d)/builtins.json $(d)/generate-builtins.nix $(d)/src/language/builtins-prefix.md $(nix_DIR)/nix
|
|
||||||
@cat doc/manual/src/language/builtins-prefix.md > $@.tmp
|
|
||||||
$(trace-gen) $(nix-eval) --expr 'import doc/manual/generate-builtins.nix (builtins.fromJSON (builtins.readFile $<))' >> $@.tmp
|
|
||||||
@cat doc/manual/src/language/builtins-suffix.md >> $@.tmp
|
|
||||||
@mv $@.tmp $@
|
|
||||||
|
|
||||||
-$(d)/builtins.json: $(bindir)/nix
|
|
||||||
- $(trace-gen) $(dummy-env) NIX_PATH=nix/corepkgs=corepkgs $(bindir)/nix __dump-builtins > $@.tmp
|
|
||||||
+$(d)/builtins.json: $(nix_DIR)/nix
|
|
||||||
+ $(trace-gen) $(dummy-env) NIX_PATH=nix/corepkgs=corepkgs $(nix_DIR)/nix __dump-builtins > $@.tmp
|
|
||||||
@mv $@.tmp $@
|
|
||||||
|
|
||||||
# Generate the HTML manual.
|
|
||||||
@@ -89,14 +89,14 @@ $(mandir)/man1/nix3-manpages: doc/manual/generated/man1/nix3-manpages
|
|
||||||
$(trace-install) install -m 0644 $$(dirname $<)/* $(DESTDIR)$$(dirname $@)
|
|
||||||
|
|
||||||
doc/manual/generated/man1/nix3-manpages: $(d)/src/command-ref/new-cli
|
|
||||||
- @mkdir -p $(DESTDIR)$$(dirname $@)
|
|
||||||
+ @mkdir -p $$(dirname $@)
|
|
||||||
$(trace-gen) for i in doc/manual/src/command-ref/new-cli/*.md; do \
|
|
||||||
name=$$(basename $$i .md); \
|
|
||||||
tmpFile=$$(mktemp); \
|
|
||||||
if [[ $$name = SUMMARY ]]; then continue; fi; \
|
|
||||||
printf "Title: %s\n\n" "$$name" > $$tmpFile; \
|
|
||||||
cat $$i >> $$tmpFile; \
|
|
||||||
- lowdown -sT man -M section=1 $$tmpFile -o $(DESTDIR)$$(dirname $@)/$$name.1; \
|
|
||||||
+ lowdown -sT man -M section=1 $$tmpFile -o $$(dirname $@)/$$name.1; \
|
|
||||||
rm $$tmpFile; \
|
|
||||||
done
|
|
||||||
@touch $@
|
|
||||||
--
|
|
||||||
2.37.2.587.g219fe53025.dirty
|
|
||||||
|
|
|
@ -1,58 +0,0 @@
|
||||||
From 1908b63a6296d24d9b97c6d615b81759812f572e Mon Sep 17 00:00:00 2001
|
|
||||||
Message-Id: <1908b63a6296d24d9b97c6d615b81759812f572e.1662107347.git.congdanhqx@gmail.com>
|
|
||||||
In-Reply-To: <68959b8b92b4bb6fd47cd80aafd9a76c1a50cf37.1662107347.git.congdanhqx@gmail.com>
|
|
||||||
References: <68959b8b92b4bb6fd47cd80aafd9a76c1a50cf37.1662107347.git.congdanhqx@gmail.com>
|
|
||||||
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
|
|
||||||
<congdanhqx@gmail.com>
|
|
||||||
Date: Fri, 2 Sep 2022 12:05:18 +0700
|
|
||||||
Subject: [PATCH 2/2] manual: support cross-compilation with qemu
|
|
||||||
|
|
||||||
---
|
|
||||||
doc/manual/local.mk | 14 ++++++++++----
|
|
||||||
1 file changed, 10 insertions(+), 4 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/doc/manual/local.mk b/doc/manual/local.mk
|
|
||||||
index 6fad1c594..1e8bd8e47 100644
|
|
||||||
--- a/doc/manual/local.mk
|
|
||||||
+++ b/doc/manual/local.mk
|
|
||||||
@@ -24,7 +24,13 @@ dummy-env = env -i \
|
|
||||||
NIX_STATE_DIR=/dummy \
|
|
||||||
NIX_CONFIG='cores = 0'
|
|
||||||
|
|
||||||
-nix-eval = $(dummy-env) $(nix_DIR)/nix eval --experimental-features nix-command -I nix/corepkgs=corepkgs --store dummy:// --impure --raw
|
|
||||||
+ifneq (,$(findstring qemu,$(CROSS_EMULATOR)))
|
|
||||||
+ _nix-emu := QEMU_LD_PREFIX=${QEMU_LD_PREFIX} $(CROSS_EMULATOR)
|
|
||||||
+else
|
|
||||||
+ _nix-emu := $(CROSS_EMULATOR)
|
|
||||||
+endif
|
|
||||||
+
|
|
||||||
+nix-eval = $(dummy-env) $(_nix-emu) $(nix_DIR)/nix eval --experimental-features nix-command -I nix/corepkgs=corepkgs --store dummy:// --impure --raw
|
|
||||||
|
|
||||||
$(d)/%.1: $(d)/src/command-ref/%.md
|
|
||||||
@printf "Title: %s\n\n" "$$(basename $@ .1)" > $^.tmp
|
|
||||||
@@ -58,11 +64,11 @@ $(d)/src/command-ref/conf-file.md: $(d)/conf-file.json $(d)/generate-options.nix
|
|
||||||
@mv $@.tmp $@
|
|
||||||
|
|
||||||
$(d)/nix.json: $(nix_DIR)/nix
|
|
||||||
- $(trace-gen) $(dummy-env) $(nix_DIR)/nix __dump-args > $@.tmp
|
|
||||||
+ $(trace-gen) $(dummy-env) $(_nix-emu) $(nix_DIR)/nix __dump-args > $@.tmp
|
|
||||||
@mv $@.tmp $@
|
|
||||||
|
|
||||||
$(d)/conf-file.json: $(nix_DIR)/nix
|
|
||||||
- $(trace-gen) $(dummy-env) $(nix_DIR)/nix show-config --json --experimental-features nix-command > $@.tmp
|
|
||||||
+ $(trace-gen) $(dummy-env) $(_nix-emu) $(nix_DIR)/nix show-config --json --experimental-features nix-command > $@.tmp
|
|
||||||
@mv $@.tmp $@
|
|
||||||
|
|
||||||
$(d)/src/language/builtins.md: $(d)/builtins.json $(d)/generate-builtins.nix $(d)/src/language/builtins-prefix.md $(nix_DIR)/nix
|
|
||||||
@@ -72,7 +78,7 @@ $(d)/src/language/builtins.md: $(d)/builtins.json $(d)/generate-builtins.nix $(d
|
|
||||||
@mv $@.tmp $@
|
|
||||||
|
|
||||||
$(d)/builtins.json: $(nix_DIR)/nix
|
|
||||||
- $(trace-gen) $(dummy-env) NIX_PATH=nix/corepkgs=corepkgs $(nix_DIR)/nix __dump-builtins > $@.tmp
|
|
||||||
+ $(trace-gen) $(dummy-env) NIX_PATH=nix/corepkgs=corepkgs $(_nix-emu) $(nix_DIR)/nix __dump-builtins > $@.tmp
|
|
||||||
@mv $@.tmp $@
|
|
||||||
|
|
||||||
# Generate the HTML manual.
|
|
||||||
--
|
|
||||||
2.37.2.587.g219fe53025.dirty
|
|
||||||
|
|
10
srcpkgs/nix/patches/pkgconfig-toml11.patch
Normal file
10
srcpkgs/nix/patches/pkgconfig-toml11.patch
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
--- a/src/libexpr/meson.build
|
||||||
|
+++ b/src/libexpr/meson.build
|
||||||
|
@@ -69,7 +69,6 @@ configdata_pub.set('NIX_USE_BOEHMGC', bd
|
||||||
|
toml11 = dependency(
|
||||||
|
'toml11',
|
||||||
|
version : '>=3.7.0',
|
||||||
|
- method : 'cmake',
|
||||||
|
include_type: 'system',
|
||||||
|
)
|
||||||
|
deps_other += toml11
|
|
@ -1,25 +0,0 @@
|
||||||
--- a/Makefile
|
|
||||||
+++ b/Makefile
|
|
||||||
@@ -28,10 +28,8 @@ makefiles = \
|
|
||||||
OPTIMIZE = 1
|
|
||||||
|
|
||||||
ifeq ($(OPTIMIZE), 1)
|
|
||||||
- GLOBAL_CXXFLAGS += -O3 $(CXXLTO)
|
|
||||||
+ GLOBAL_CXXFLAGS += $(CXXLTO)
|
|
||||||
GLOBAL_LDFLAGS += $(CXXLTO)
|
|
||||||
-else
|
|
||||||
- GLOBAL_CXXFLAGS += -O0 -U_FORTIFY_SOURCE
|
|
||||||
endif
|
|
||||||
|
|
||||||
include mk/lib.mk
|
|
||||||
--- a/configure.ac
|
|
||||||
+++ b/configure.ac
|
|
||||||
@@ -41,8 +41,6 @@ AC_DEFINE_UNQUOTED(SYSTEM, ["$system"],
|
|
||||||
test "$localstatedir" = '${prefix}/var' && localstatedir=/nix/var
|
|
||||||
|
|
||||||
|
|
||||||
-CFLAGS=
|
|
||||||
-CXXFLAGS=
|
|
||||||
AC_PROG_CC
|
|
||||||
AC_PROG_CXX
|
|
||||||
AC_PROG_CPP
|
|
|
@ -1,29 +1,31 @@
|
||||||
# Template file for 'nix'
|
# Template file for 'nix'
|
||||||
pkgname=nix
|
pkgname=nix
|
||||||
version=2.11.0
|
version=2.30.2
|
||||||
revision=11
|
revision=1
|
||||||
build_style=gnu-configure
|
build_style=meson
|
||||||
build_helper=qemu
|
build_helper=qemu
|
||||||
# Use /nix/var as suggested by the official Manual.
|
# Use /nix/var as suggested by the official Manual.
|
||||||
configure_args="--localstatedir=/nix/var
|
# configure_args="--localstatedir=/nix/var --with-sandbox-shell=/usr/bin/busybox.static"
|
||||||
--with-sandbox-shell=/usr/bin/busybox.static"
|
# requires rapidcheck
|
||||||
make_build_args="V=1 SET_RPATH_TO_LIBS=0"
|
configure_args="-Dunit-tests=false -Dlibstore:sandbox-shell=/usr/bin/busybox.static"
|
||||||
make_install_args="V=1 SET_RPATH_TO_LIBS=0"
|
hostmakedepends="curl pkg-config flex tar xz mdBook jq busybox-static lowdown
|
||||||
hostmakedepends="curl pkg-config flex tar xz automake autoconf-archive mdBook jq
|
perl-DBD-SQLite xz lsof"
|
||||||
busybox-static lowdown"
|
makedepends="boost-devel
|
||||||
makedepends="boost-devel brotli-devel bzip2-devel gc-devel libcurl-devel
|
brotli-devel bzip2-devel gc-devel libcurl-devel
|
||||||
|
libblake3-devel libgit2-1.9-devel toml11
|
||||||
liblzma-devel openssl-devel libsodium-devel sqlite-devel
|
liblzma-devel openssl-devel libsodium-devel sqlite-devel
|
||||||
libseccomp-devel editline-devel jq-devel libarchive-devel
|
libseccomp-devel editline-devel jq-devel libarchive-devel
|
||||||
gtest-devel lowdown-devel json-c++"
|
gtest-devel lowdown-devel json-c++"
|
||||||
depends="curl tar xz busybox-static"
|
depends="curl tar xz busybox-static lsof"
|
||||||
short_desc="Purely functional package manager"
|
short_desc="Purely functional package manager"
|
||||||
maintainer="Orphaned <orphan@voidlinux.org>"
|
maintainer="Orphaned <orphan@voidlinux.org>"
|
||||||
license="LGPL-2.1-or-later"
|
license="LGPL-2.1-or-later"
|
||||||
homepage="https://nixos.org/nix/"
|
homepage="https://nixos.org/nix/"
|
||||||
changelog="https://nixos.org/releases/${pkgname}/${pkgname}-${version}/manual/#sec-relnotes"
|
changelog="https://nixos.org/releases/${pkgname}/${pkgname}-${version}/manual/#sec-relnotes"
|
||||||
distfiles="https://github.com/NixOS/nix/archive/refs/tags/${version}.tar.gz"
|
distfiles="https://github.com/NixOS/nix/archive/refs/tags/${version}.tar.gz"
|
||||||
checksum=6a90e144352eaccfab7ef7ed470bad382c4f92d62336b327df99627adba67a7c
|
checksum=1e1490774d9f869d21747e48f3550c997c8c207dc5aa64888d2a18a3d478675e
|
||||||
# disable_parallel_build="build is fine, only linking test"
|
# disable_parallel_build="build is fine, only linking test"
|
||||||
|
make_check=no # requires repidcheck
|
||||||
|
|
||||||
if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
|
if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
|
||||||
makedepends+=" musl-legacy-compat"
|
makedepends+=" musl-legacy-compat"
|
||||||
|
@ -33,17 +35,7 @@ case "$XBPS_TARGET_MACHINE" in
|
||||||
x86_64*|i686*) makedepends+=" libcpuid-devel";;
|
x86_64*|i686*) makedepends+=" libcpuid-devel";;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
CXXFLAGS="-Wno-deprecated-declarations"
|
CXXFLAGS="-Wno-deprecated-declarations -UNDEBUG"
|
||||||
|
|
||||||
if [ "$CROSS_BUILD" ]; then
|
|
||||||
make_build_args+=" CROSS_EMULATOR=/usr/bin/qemu-${XBPS_TARGET_QEMU_MACHINE}-static"
|
|
||||||
make_install_args+=" CROSS_EMULATOR=/usr/bin/qemu-${XBPS_TARGET_QEMU_MACHINE}-static"
|
|
||||||
# XXX: documentation generation hangs in cross on arm32 musl
|
|
||||||
# see https://gitlab.com/qemu-project/qemu/-/issues/1729
|
|
||||||
case "$XBPS_TARGET_MACHINE" in
|
|
||||||
arm*musl) configure_args+=" --disable-doc-gen" ;;
|
|
||||||
esac
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Default configuration file.
|
# Default configuration file.
|
||||||
conf_files="/etc/nix/nix.conf"
|
conf_files="/etc/nix/nix.conf"
|
||||||
|
@ -67,11 +59,8 @@ make_dirs="
|
||||||
/nix/var/nix/db 0755 root root
|
/nix/var/nix/db 0755 root root
|
||||||
/nix/store 1775 root nixbld"
|
/nix/store 1775 root nixbld"
|
||||||
|
|
||||||
pre_configure() {
|
|
||||||
./bootstrap.sh
|
|
||||||
}
|
|
||||||
|
|
||||||
post_install() {
|
post_install() {
|
||||||
|
mv "${DESTDIR}/usr/etc" "${DESTDIR}/"
|
||||||
vmkdir etc/nix
|
vmkdir etc/nix
|
||||||
# Remove unused stuff.
|
# Remove unused stuff.
|
||||||
rm -rf ${DESTDIR}/usr/include ${DESTDIR}/nix ${DESTDIR}/etc/init
|
rm -rf ${DESTDIR}/usr/include ${DESTDIR}/nix ${DESTDIR}/etc/init
|
||||||
|
|
Loading…
Add table
Reference in a new issue