From patchwork Sun Jun 11 14:11:11 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: jgart X-Patchwork-Id: 50838 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 5B01027BBE9; Sun, 11 Jun 2023 15:12:30 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 2B44C27BBE2 for ; Sun, 11 Jun 2023 15:12:28 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q8LnZ-00072U-2Q; Sun, 11 Jun 2023 10:12:05 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q8LnX-00071z-Ec for guix-patches@gnu.org; Sun, 11 Jun 2023 10:12:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1q8LnX-0006ii-60 for guix-patches@gnu.org; Sun, 11 Jun 2023 10:12:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1q8LnW-0004Vr-OP for guix-patches@gnu.org; Sun, 11 Jun 2023 10:12:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#63893] [PATCH v2 2/2] gnu: nix: Update to 2.16.1. Resent-From: jgart Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 11 Jun 2023 14:12:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 63893 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 63893@debbugs.gnu.org Cc: jgart , Zhu Zihao Received: via spool by 63893-submit@debbugs.gnu.org id=B63893.168649271117317 (code B ref 63893); Sun, 11 Jun 2023 14:12:02 +0000 Received: (at 63893) by debbugs.gnu.org; 11 Jun 2023 14:11:51 +0000 Received: from localhost ([127.0.0.1]:37553 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q8LnK-0004VE-Br for submit@debbugs.gnu.org; Sun, 11 Jun 2023 10:11:50 -0400 Received: from mx2.dismail.de ([159.69.191.136]:23095) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q8LnH-0004Ug-Jc for 63893@debbugs.gnu.org; Sun, 11 Jun 2023 10:11:48 -0400 Received: from mx2.dismail.de (localhost [127.0.0.1]) by mx2.dismail.de (OpenSMTPD) with ESMTP id 2b18ea39; Sun, 11 Jun 2023 16:11:40 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=dismail.de; h=from:to:cc :subject:date:message-id:in-reply-to:references:mime-version :content-type:content-transfer-encoding; s=20190914; bh=ThEvcO3D WoYlrB3rQVlh4S+I2ZDHM6QbBbPw7b+LcmM=; b=WHFksfnJh8sRJNj9dIARQjUo Orluwv9tFZMZ/XSxzdAHwSs2y7bOVK7436r+4bQZ34J1S/4NmtGeDRrcioDw62I/ Wufuvw/BXyax0PDeEynOUuFCKy48bGNvK+9nJXSanKLzuHcW2PuOUxIIsHPMmHUf L5G6Z9s1FjOKMC5kgiaNnWeU9qRgQiTFi3PJNs3a+jNMvEqn30bsKWPosT//5WEI 0gOJbmsv8p7eZ/uKxaVo9dTDJAgdsdDBJvANlwz75FGJoFE1I27BVCxZXkq6/vbz oslHgakHhXTThYIlQ2Pi1FdYDhFUwzvo4rxlv9f18BFVt5oU6iH5bzC1AwpO7Q== Received: from smtp2.dismail.de ( [10.240.26.12]) by mx2.dismail.de (OpenSMTPD) with ESMTP id cdbc4f5e; Sun, 11 Jun 2023 16:11:40 +0200 (CEST) Received: from smtp2.dismail.de (localhost [127.0.0.1]) by smtp2.dismail.de (OpenSMTPD) with ESMTP id 9e5b87da; Sun, 11 Jun 2023 16:11:39 +0200 (CEST) Received: by dismail.de (OpenSMTPD) with ESMTPSA id b05b3717 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Sun, 11 Jun 2023 16:11:38 +0200 (CEST) Date: Sun, 11 Jun 2023 09:11:11 -0500 Message-Id: <3400f62ade7fcb01c0e119b62198d1baff42138d.1686492434.git.jgart@dismail.de> X-Mailer: git-send-email 2.40.1 In-Reply-To: References: MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-to: jgart X-ACL-Warn: , jgart via Guix-patches X-Patchwork-Original-From: jgart via Guix-patches via From: jgart Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * gnu/packages/package-management.scm (nix): Update to 2.16.1. [source]: Use HTTPS for package source. [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. Co-authored-by: jgart --- Hi Zhu, Here's a v2 updating your patchset to use nix at 2.16.1. I also squashed the commit that uses HTTPS in the source field. all best, jgart gnu/packages/package-management.scm | 27 +++++++++++---- .../patches/nix-dont-build-html-doc.diff | 33 ++++++++++++++----- 2 files changed, 46 insertions(+), 14 deletions(-) diff --git a/gnu/packages/package-management.scm b/gnu/packages/package-management.scm index 4791880375..1dedfe5600 100644 --- a/gnu/packages/package-management.scm +++ b/gnu/packages/package-management.scm @@ -20,7 +20,7 @@ ;;; Copyright © 2021 Ivan Gankevich ;;; Copyright © 2021, 2022, 2023 Maxim Cournoyer ;;; Copyright © 2021 John Kehayias -;;; Copyright © 2022 Zhu Zihao +;;; Copyright © 2022, 2023 Zhu Zihao ;;; ;;; This file is part of GNU Guix. ;;; @@ -56,6 +56,7 @@ (define-module (gnu packages package-management) #:use-module (gnu packages compression) #:use-module (gnu packages cmake) #:use-module (gnu packages cpio) + #:use-module (gnu packages cpp) #:use-module (gnu packages crypto) #:use-module (gnu packages curl) #:use-module (gnu packages databases) @@ -731,16 +732,16 @@ (define-public guix-modules (define-public nix (package (name "nix") - (version "2.5.1") + (version "2.16.0") (source (origin (method git-fetch) (uri (git-reference - (url "http://github.com/NixOS/nix") + (url "https://github.com/NixOS/nix") (commit version))) (file-name (git-file-name name version)) (sha256 - (base32 "1m8rmv8i6lg83pmalvjlq1fn8mcghn3ngjv3kw1kqsa45ymj5sqq")) + (base32 "0jizpci4zspqpqqy3n780m4wh8dzhfywaiz953xv70c7in810dra")) (patches (search-patches "nix-dont-build-html-doc.diff")))) (build-system gnu-build-system) @@ -757,7 +758,19 @@ (define-public nix (apply invoke "make" "install" (string-append "sysconfdir=" etc) (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 (list autoconf autoconf-archive @@ -767,7 +780,8 @@ (define-public nix googletest jq libtool - pkg-config)) + pkg-config + rapidcheck)) (inputs (append (list boost brotli @@ -779,6 +793,7 @@ (define-public nix libseccomp libsodium lowdown + nlohmann-json openssl sqlite xz diff --git a/gnu/packages/patches/nix-dont-build-html-doc.diff b/gnu/packages/patches/nix-dont-build-html-doc.diff index 79142bc215..2eb45117b0 100644 --- a/gnu/packages/patches/nix-dont-build-html-doc.diff +++ b/gnu/packages/patches/nix-dont-build-html-doc.diff @@ -3,24 +3,41 @@ We can't simply disable it because we need manpages. Author: Zhu Zihao -diff --git a/doc/manual/local.mk b/doc/manual/local.mk -index e43d9f2fb..c323d1847 100644 --- a/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 @mv $@.tmp $@ -# Generate the HTML manual. +-.PHONY: manual-html +-manual-html: $(docdir)/manual/index.html -install: $(docdir)/manual/index.html - +- # Generate 'nix' 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 @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) -- $(trace-gen) RUST_LOG=warn mdbook build doc/manual -d $(DESTDIR)$(docdir)/manual - +-$(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) \ +- 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