gnu: nix: Update to 2.16.0.
* gnu/packages/package-management.scm (nix): Update to 2.16.0. [inputs]: Add nlohmann-json. [native-inputs]: Add rapidcheck. [arguments]<#:phases>: In phase "check", change the value of environment variable "NIX_STORE" to "/nix/store" temporarily. * gnu/packages/patches/nix-dont-build-html-doc.diff: Update. Signed-off-by: Nicolas Goaziou <mail@nicolasgoaziou.fr>
This commit is contained in:
		
							parent
							
								
									4236e24cb9
								
							
						
					
					
						commit
						554d46882b
					
				
					 2 changed files with 45 additions and 13 deletions
				
			
		| 
						 | 
					@ -20,7 +20,7 @@
 | 
				
			||||||
;;; Copyright © 2021 Ivan Gankevich <i.gankevich@spbu.ru>
 | 
					;;; Copyright © 2021 Ivan Gankevich <i.gankevich@spbu.ru>
 | 
				
			||||||
;;; Copyright © 2021, 2022, 2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>
 | 
					;;; Copyright © 2021, 2022, 2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>
 | 
				
			||||||
;;; Copyright © 2021 John Kehayias <john.kehayias@protonmail.com>
 | 
					;;; Copyright © 2021 John Kehayias <john.kehayias@protonmail.com>
 | 
				
			||||||
;;; Copyright © 2022 Zhu Zihao <all_but_last@163.com>
 | 
					;;; Copyright © 2022, 2023 Zhu Zihao <all_but_last@163.com>
 | 
				
			||||||
;;;
 | 
					;;;
 | 
				
			||||||
;;; This file is part of GNU Guix.
 | 
					;;; This file is part of GNU Guix.
 | 
				
			||||||
;;;
 | 
					;;;
 | 
				
			||||||
| 
						 | 
					@ -56,6 +56,7 @@
 | 
				
			||||||
  #:use-module (gnu packages compression)
 | 
					  #:use-module (gnu packages compression)
 | 
				
			||||||
  #:use-module (gnu packages cmake)
 | 
					  #:use-module (gnu packages cmake)
 | 
				
			||||||
  #:use-module (gnu packages cpio)
 | 
					  #:use-module (gnu packages cpio)
 | 
				
			||||||
 | 
					  #:use-module (gnu packages cpp)
 | 
				
			||||||
  #:use-module (gnu packages crypto)
 | 
					  #:use-module (gnu packages crypto)
 | 
				
			||||||
  #:use-module (gnu packages curl)
 | 
					  #:use-module (gnu packages curl)
 | 
				
			||||||
  #:use-module (gnu packages databases)
 | 
					  #:use-module (gnu packages databases)
 | 
				
			||||||
| 
						 | 
					@ -731,7 +732,7 @@ high-performance computing} clusters.")
 | 
				
			||||||
(define-public nix
 | 
					(define-public nix
 | 
				
			||||||
  (package
 | 
					  (package
 | 
				
			||||||
    (name "nix")
 | 
					    (name "nix")
 | 
				
			||||||
    (version "2.5.1")
 | 
					    (version "2.16.0")
 | 
				
			||||||
    (source
 | 
					    (source
 | 
				
			||||||
     (origin
 | 
					     (origin
 | 
				
			||||||
       (method git-fetch)
 | 
					       (method git-fetch)
 | 
				
			||||||
| 
						 | 
					@ -740,7 +741,7 @@ high-performance computing} clusters.")
 | 
				
			||||||
             (commit version)))
 | 
					             (commit version)))
 | 
				
			||||||
       (file-name (git-file-name name version))
 | 
					       (file-name (git-file-name name version))
 | 
				
			||||||
       (sha256
 | 
					       (sha256
 | 
				
			||||||
        (base32 "1m8rmv8i6lg83pmalvjlq1fn8mcghn3ngjv3kw1kqsa45ymj5sqq"))
 | 
					        (base32 "0jizpci4zspqpqqy3n780m4wh8dzhfywaiz953xv70c7in810dra"))
 | 
				
			||||||
       (patches
 | 
					       (patches
 | 
				
			||||||
        (search-patches "nix-dont-build-html-doc.diff"))))
 | 
					        (search-patches "nix-dont-build-html-doc.diff"))))
 | 
				
			||||||
    (build-system gnu-build-system)
 | 
					    (build-system gnu-build-system)
 | 
				
			||||||
| 
						 | 
					@ -757,7 +758,19 @@ high-performance computing} clusters.")
 | 
				
			||||||
                (apply invoke "make" "install"
 | 
					                (apply invoke "make" "install"
 | 
				
			||||||
                       (string-append "sysconfdir=" etc)
 | 
					                       (string-append "sysconfdir=" etc)
 | 
				
			||||||
                       (string-append "profiledir=" etc "/profile.d")
 | 
					                       (string-append "profiledir=" etc "/profile.d")
 | 
				
			||||||
                       make-flags)))))))
 | 
					                       make-flags))))
 | 
				
			||||||
 | 
					          (replace 'check
 | 
				
			||||||
 | 
					            (lambda args
 | 
				
			||||||
 | 
					              ;; Some test expect environment variable NIX_STORE to be
 | 
				
			||||||
 | 
					              ;; "/nix/store"
 | 
				
			||||||
 | 
					              (let ((original-NIX_STORE (getenv "NIX_STORE")))
 | 
				
			||||||
 | 
					                (dynamic-wind
 | 
				
			||||||
 | 
					                  (lambda ()
 | 
				
			||||||
 | 
					                    (setenv "NIX_STORE" "/nix/store"))
 | 
				
			||||||
 | 
					                  (lambda ()
 | 
				
			||||||
 | 
					                    (apply (assoc-ref %standard-phases 'check) args))
 | 
				
			||||||
 | 
					                  (lambda ()
 | 
				
			||||||
 | 
					                    (setenv "NIX_STORE" original-NIX_STORE)))))))))
 | 
				
			||||||
    (native-inputs
 | 
					    (native-inputs
 | 
				
			||||||
     (list autoconf
 | 
					     (list autoconf
 | 
				
			||||||
           autoconf-archive
 | 
					           autoconf-archive
 | 
				
			||||||
| 
						 | 
					@ -767,7 +780,8 @@ high-performance computing} clusters.")
 | 
				
			||||||
           googletest
 | 
					           googletest
 | 
				
			||||||
           jq
 | 
					           jq
 | 
				
			||||||
           libtool
 | 
					           libtool
 | 
				
			||||||
           pkg-config))
 | 
					           pkg-config
 | 
				
			||||||
 | 
					           rapidcheck))
 | 
				
			||||||
    (inputs
 | 
					    (inputs
 | 
				
			||||||
     (append (list boost
 | 
					     (append (list boost
 | 
				
			||||||
                   brotli
 | 
					                   brotli
 | 
				
			||||||
| 
						 | 
					@ -779,6 +793,7 @@ high-performance computing} clusters.")
 | 
				
			||||||
                   libseccomp
 | 
					                   libseccomp
 | 
				
			||||||
                   libsodium
 | 
					                   libsodium
 | 
				
			||||||
                   lowdown
 | 
					                   lowdown
 | 
				
			||||||
 | 
					                   nlohmann-json
 | 
				
			||||||
                   openssl
 | 
					                   openssl
 | 
				
			||||||
                   sqlite
 | 
					                   sqlite
 | 
				
			||||||
                   xz
 | 
					                   xz
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -3,24 +3,41 @@ We can't simply disable it because we need manpages.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Author: Zhu Zihao <all_but_last@163.com>
 | 
					Author: Zhu Zihao <all_but_last@163.com>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
diff --git a/doc/manual/local.mk b/doc/manual/local.mk
 | 
					 | 
				
			||||||
index e43d9f2fb..c323d1847 100644
 | 
					 | 
				
			||||||
--- a/doc/manual/local.mk
 | 
					--- a/doc/manual/local.mk
 | 
				
			||||||
+++ b/doc/manual/local.mk
 | 
					+++ b/doc/manual/local.mk
 | 
				
			||||||
@@ -69,8 +69,6 @@ $(d)/builtins.json: $(bindir)/nix
 | 
					@@ -138,11 +138,6 @@
 | 
				
			||||||
 	$(trace-gen) $(dummy-env) NIX_PATH=nix/corepkgs=corepkgs $(bindir)/nix __dump-builtins > $@.tmp
 | 
					 	$(trace-gen) $(dummy-env) NIX_PATH=nix/corepkgs=corepkgs $(bindir)/nix __dump-builtins > $@.tmp
 | 
				
			||||||
 	@mv $@.tmp $@
 | 
					 	@mv $@.tmp $@
 | 
				
			||||||
 
 | 
					 
 | 
				
			||||||
-# Generate the HTML manual.
 | 
					-# Generate the HTML manual.
 | 
				
			||||||
 | 
					-.PHONY: manual-html
 | 
				
			||||||
 | 
					-manual-html: $(docdir)/manual/index.html
 | 
				
			||||||
-install: $(docdir)/manual/index.html
 | 
					-install: $(docdir)/manual/index.html
 | 
				
			||||||
 
 | 
					-
 | 
				
			||||||
 # Generate 'nix' manpages.
 | 
					 # Generate 'nix' manpages.
 | 
				
			||||||
 install: $(mandir)/man1/nix3-manpages
 | 
					 install: $(mandir)/man1/nix3-manpages
 | 
				
			||||||
@@ -94,7 +92,5 @@ doc/manual/generated/man1/nix3-manpages: $(d)/src/command-ref/new-cli
 | 
					 man: doc/manual/generated/man1/nix3-manpages
 | 
				
			||||||
 | 
					@@ -167,23 +162,4 @@
 | 
				
			||||||
 	done
 | 
					 	done
 | 
				
			||||||
 	@touch $@
 | 
					 	@touch $@
 | 
				
			||||||
 
 | 
					 
 | 
				
			||||||
-$(docdir)/manual/index.html: $(MANUAL_SRCS) $(d)/book.toml $(d)/custom.css $(d)/src/SUMMARY.md $(d)/src/command-ref/new-cli $(d)/src/command-ref/conf-file.md $(d)/src/expressions/builtins.md $(call rwildcard, $(d)/src, *.md)
 | 
					-$(docdir)/manual/index.html: $(MANUAL_SRCS) $(d)/book.toml $(d)/anchors.jq $(d)/custom.css $(d)/src/SUMMARY.md $(d)/src/command-ref/new-cli $(d)/src/contributing/experimental-feature-descriptions.md $(d)/src/command-ref/conf-file.md $(d)/src/language/builtins.md
 | 
				
			||||||
-	$(trace-gen) RUST_LOG=warn mdbook build doc/manual -d $(DESTDIR)$(docdir)/manual
 | 
					-	$(trace-gen) \
 | 
				
			||||||
 
 | 
					-		tmp="$$(mktemp -d)"; \
 | 
				
			||||||
 | 
					-		cp -r doc/manual "$$tmp"; \
 | 
				
			||||||
 | 
					-		find "$$tmp" -name '*.md' | while read -r file; do \
 | 
				
			||||||
 | 
					-			$(call process-includes,$$file,$$file); \
 | 
				
			||||||
 | 
					-		done; \
 | 
				
			||||||
 | 
					-		find "$$tmp" -name '*.md' | while read -r file; do \
 | 
				
			||||||
 | 
					-			docroot="$$(realpath --relative-to="$$(dirname "$$file")" $$tmp/manual/src)"; \
 | 
				
			||||||
 | 
					-			sed -i "s,@docroot@,$$docroot,g" "$$file"; \
 | 
				
			||||||
 | 
					-		done; \
 | 
				
			||||||
 | 
					-		set -euo pipefail; \
 | 
				
			||||||
 | 
					-		RUST_LOG=warn mdbook build "$$tmp/manual" -d $(DESTDIR)$(docdir)/manual.tmp 2>&1 \
 | 
				
			||||||
 | 
					-			| { grep -Fv "because fragment resolution isn't implemented" || :; }; \
 | 
				
			||||||
 | 
					-		rm -rf "$$tmp/manual"
 | 
				
			||||||
 | 
					-	@rm -rf $(DESTDIR)$(docdir)/manual
 | 
				
			||||||
 | 
					-	@mv $(DESTDIR)$(docdir)/manual.tmp/html $(DESTDIR)$(docdir)/manual
 | 
				
			||||||
 | 
					-	@rm -rf $(DESTDIR)$(docdir)/manual.tmp
 | 
				
			||||||
 | 
					-
 | 
				
			||||||
 endif
 | 
					 endif
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Reference in a new issue