From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id +A1fLPm8i2H0hwAAgWs5BA (envelope-from ) for ; Wed, 10 Nov 2021 13:37:13 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id cDsEKPm8i2FFDQAAbx9fmQ (envelope-from ) for ; Wed, 10 Nov 2021 12:37:13 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 789EF16508 for ; Wed, 10 Nov 2021 13:37:12 +0100 (CET) Received: from localhost ([::1]:36080 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mkmqk-0004mj-94 for larch@yhetil.org; Wed, 10 Nov 2021 07:37:10 -0500 Received: from eggs.gnu.org ([209.51.188.92]:43760) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mkmqc-0004mL-PV for guix-patches@gnu.org; Wed, 10 Nov 2021 07:37:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:53892) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mkmqc-0001B9-HB for guix-patches@gnu.org; Wed, 10 Nov 2021 07:37:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mkmqc-0002Rw-Ez for guix-patches@gnu.org; Wed, 10 Nov 2021 07:37:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#51747] [PATCH]: gnu: nix: Update to 2.4. Resent-From: Zhu Zihao Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 10 Nov 2021 12:37:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 51747 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 51747@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.16365478179399 (code B ref -1); Wed, 10 Nov 2021 12:37:02 +0000 Received: (at submit) by debbugs.gnu.org; 10 Nov 2021 12:36:57 +0000 Received: from localhost ([127.0.0.1]:37205 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mkmqM-0002RJ-9m for submit@debbugs.gnu.org; Wed, 10 Nov 2021 07:36:56 -0500 Received: from lists.gnu.org ([209.51.188.17]:37376) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mkmqI-0002R8-4q for submit@debbugs.gnu.org; Wed, 10 Nov 2021 07:36:44 -0500 Received: from eggs.gnu.org ([209.51.188.92]:43616) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mkmqH-0004Md-UX for guix-patches@gnu.org; Wed, 10 Nov 2021 07:36:41 -0500 Received: from mail-m972.mail.163.com ([123.126.97.2]:44938) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mkmqB-00015t-Ng for guix-patches@gnu.org; Wed, 10 Nov 2021 07:36:40 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com; s=s110527; h=From:Subject:Date:Message-ID:MIME-Version; bh=wI/xL hn+WtfZn7XA8agOK7Lvm3DC7KZUOfOjRGiz/dM=; b=FuhSneSeeJRfho4JWKT3z /dvvDVXhTgmqedyFXfWtUp+GSPcvLkLyNEWsNGUjSoyIQqYqpZB4Nt9djrCwwpa3 vxg5eAQEbTXlqahhkOsaKBFYi2b+axas87MZgvq2Jn5CjCIqqS8TX/NZKWIR3JGW cMuqA941C+kc9Xl3rm2E7M= Received: from asus-laptop (unknown [112.95.115.244]) by smtp2 (Coremail) with SMTP id GtxpCgBHfCTMvIths11iIg--.36884S2; Wed, 10 Nov 2021 20:36:29 +0800 (CST) User-agent: mu4e 1.6.9; emacs 27.2 From: Zhu Zihao Date: Wed, 10 Nov 2021 20:35:38 +0800 Message-ID: <86sfw4chme.fsf@163.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-CM-TRANSID: GtxpCgBHfCTMvIths11iIg--.36884S2 X-Coremail-Antispam: 1Uf129KBjDUn29KB7ZKAUJUUUUU529EdanIXcx71UUUUU7v73 VFW2AGmfu7bjvjm3AaLaJ3UbIYCTnIWIevJa73UjIFyTuYvjxUhUGYDUUUU X-Originating-IP: [112.95.115.244] X-CM-SenderInfo: pdoosuxxwbztlvw6il2tof0z/xtbClgZHr1zmUB3CJQAAso Received-SPF: pass client-ip=123.126.97.2; envelope-from=all_but_last@163.com; helo=mail-m972.mail.163.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1636547833; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:resent-cc:resent-from:resent-sender: resent-message-id:list-id:list-help:list-unsubscribe:list-subscribe: list-post:dkim-signature; bh=wI/xLhn+WtfZn7XA8agOK7Lvm3DC7KZUOfOjRGiz/dM=; b=E2hYTXoBOrtyPO2ClkpSLAn8B70oUtW3XdaItFWM3n+k6yRo/Q7cdBfsv8VFOwh2zeDYRu KAYhgA+DvUcq4o+7N/pjW2b4ob0UvrJyX5UTIEG5NSk+xCbjmHmJTTxLWiO1Rh6Gj69fDI StWmj9831Azm+8I6RP54wUzNJTP0PNH56Y8Q5M57gA4oHDBiiLoc0K+nuwH0lxpCKgwjdM 7+oT7EP4sLHasJwlpOWHkBXk/PI+lojorj3vMJ1kmijKX8lmLD03yyqH+qLNdO4HK6RrZK 08UkEKlgZi/1j97Dv3D8J33/ANPAgBxO/Rd+2i+O3Je3IktdJ1dUuAV8ygZ8OQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1636547833; a=rsa-sha256; cv=none; b=OY9ElEm4Bqv94sl0zTlS/yylHL+5E4RWmS+PwclxCrwDo3/88dfMuFKZnpXW8goee1Cczk 0pRh1DtuNDN0qhTt8pZkLo8wGUuVSh7hEJcjqGOvgH3iTZE8hTxBrXAiaUIUE7sjR/QhBQ a3DwNZkDtDKaqn2wo48frcg0XaLeiDvhK02CS65J5ZgfMHsvr5tkUR/MhaVffDdZVYQGte 7MxkOZuPIV4p8+fd59ADaL4JeNMqtiJE2vBnnZ9iqtok0u9KhU6jx1u6x/L7+4GYuQQvnC 6d2RY0Iw0D7WQQepW/LaCrTGEzuXTdN1RuzUoIN0wO0kZKJIWKRDPnYMU64PHQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=163.com header.s=s110527 header.b=FuhSneSe; dmarc=fail reason="SPF not aligned (relaxed)" header.from=163.com (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Spam-Score: -2.92 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=163.com header.s=s110527 header.b=FuhSneSe; dmarc=fail reason="SPF not aligned (relaxed)" header.from=163.com (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Queue-Id: 789EF16508 X-Spam-Score: -2.92 X-Migadu-Scanner: scn0.migadu.com X-TUID: AUDAy+iQlmLm --=-=-= Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" --==-=-= Content-Type: text/plain --==-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iIsEARYIADMWIQTUepyLKuOQW1Y9kTW+QrNSqfaCHwUCYYu8yRUcYWxsX2J1dF9s YXN0QDE2My5jb20ACgkQvkKzUqn2gh+VNQD+Mrga/R7+dhV1gEPnF4VhRZgqYG4S th6FkmqX+k2AqjUA/iBREkIaRWxSrDXMtsPfhMGIPSerKQmQN6J3hl6Z+z8L =F8Cz -----END PGP SIGNATURE----- --==-=-=-- --=-=-= Content-Type: text/x-patch; charset=utf-8 Content-Disposition: inline; filename=0001-gnu-Add-lowdown.patch Content-Transfer-Encoding: quoted-printable >From 935afdd36fee52fe3930991245ac67e48c0a00ff Mon Sep 17 00:00:00 2001 From: Zhu Zihao Date: Wed, 10 Nov 2021 19:21:45 +0800 Subject: [PATCH 1/3] gnu: Add lowdown. * gnu/packages/markup.scm(lowdown): New variables. --- gnu/packages/markup.scm | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/gnu/packages/markup.scm b/gnu/packages/markup.scm index 368976bfde..4ec606f892 100644 --- a/gnu/packages/markup.scm +++ b/gnu/packages/markup.scm @@ -7,6 +7,7 @@ ;;; Copyright =C2=A9 2020 Marius Bakke ;;; Copyright =C2=A9 2020 EuAndreh ;;; Copyright =C2=A9 2021 Noisytoot +;;; Copyright =C2=A9 2021 Zhu Zihao ;;; ;;; This file is part of GNU Guix. ;;; @@ -36,6 +37,7 @@ (define-module (gnu packages markup) #:use-module (guix utils) #:use-module (gnu packages compression) #:use-module (gnu packages) + #:use-module (gnu packages base) #:use-module (gnu packages perl) #:use-module (gnu packages pkg-config) #:use-module (gnu packages python) @@ -324,3 +326,35 @@ (define-public python-mistletoe swap out renderers for different output formats, without touching any of t= he core components.") (license expat))) + +(define-public lowdown + (package + (name "lowdown") + (version "0.10.0") + (source + (origin + (method url-fetch) + (uri (string-append "https://kristaps.bsd.lv/lowdown/snapshots/lowd= own-" + version ".tar.gz")) + (sha256 + (base32 "15v2kk4ffqw3n6y6n9plch4qcib3ynnhw0ih8wn2v9qgn4jssp5p")))) + (build-system gnu-build-system) + (arguments + `(#:tests? #f ;No test + #:phases + (modify-phases %standard-phases + (replace 'configure + (lambda* (#:key outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out"))) + (invoke "./configure" + (string-append "PREFIX=3D" out) + (string-append "MANDIR=3D" out "/share/man")))))) + ;; the shared library of nix is linked with lowdown. + #:make-flags '("CFLAGS=3D-fPIC"))) + (native-inputs + `(("which" ,which))) + (home-page "https://kristaps.bsd.lv/lowdown") + (synopsis "Simple Markdown translator") + (description "Lowdown is a Markdown translator producing HTML5, +roff documents in the ms and man formats, LaTeX, gemini, and terminal outp= ut.") + (license isc))) --=20 2.33.1 --=-=-= Content-Type: text/x-patch; charset=utf-8 Content-Disposition: inline; filename=0002-gnu-Add-libcpuid.patch Content-Transfer-Encoding: quoted-printable >From d38e131913a006d47d611ce6ebabfb1823d804b8 Mon Sep 17 00:00:00 2001 From: Zhu Zihao Date: Wed, 10 Nov 2021 19:31:28 +0800 Subject: [PATCH 2/3] gnu: Add libcpuid. gnu/packages/hardware.scm(libcpuid): New variable. --- gnu/packages/hardware.scm | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/gnu/packages/hardware.scm b/gnu/packages/hardware.scm index 2bf3576d5a..df7fb4b716 100644 --- a/gnu/packages/hardware.scm +++ b/gnu/packages/hardware.scm @@ -8,6 +8,7 @@ ;;; Copyright =C2=A9 2021 Petr Hodina ;;; Copyright =C2=A9 2021 Raghav Gururajan ;;; Copyright =C2=A9 2021 Vinicius Monego +;;; Copyright =C2=A9 2021 Zhu Zihao ;;; ;;; This file is part of GNU Guix. ;;; @@ -834,3 +835,22 @@ (define-public tpm2-tss libtss2-esys, libtss2-sys, libtss2-mu, libtss2-tcti-device, libtss2-tcti-s= wtpm and libtss2-tcti-mssim.") (license license:bsd-2))) + +(define-public libcpuid + (package + (name "libcpuid") + (version "0.5.1") + (source + (origin + (method url-fetch) + (uri (string-append "https://github.com/anrieff/libcpuid/releases/d= ownload/v" + version "/libcpuid-" version ".tar.gz")) + (sha256 + (base32 "1nksdqk2w1c56lkrjcvh3nss9vq454j81j3yq14lwdn4x8bvmwfr")))) + (build-system gnu-build-system) + (supported-systems '("x86_64-linux" "i686-linux")) + (home-page "https://libcpuid.sourceforge.net/") + (synopsis "A small library for x86 CPU detection and feature extractio= n") + (description "Libcpuid is a small C library to get vendor, model, bran= ding +string, code name and other information from x86 CPU.") + (license license:bsd-2))) --=20 2.33.1 --=-=-= Content-Type: text/x-patch; charset=utf-8 Content-Disposition: inline; filename=0003-gnu-nix-Update-to-2.4.patch Content-Transfer-Encoding: quoted-printable >From 51a7de78cebf893ebd15169f6af154b04b734e31 Mon Sep 17 00:00:00 2001 From: Zhu Zihao Date: Wed, 10 Nov 2021 19:36:01 +0800 Subject: [PATCH 3/3] gnu: nix: Update to 2.4. * gnu/packages/package-management.scm(nix): Update to 2.4. [source]: Switch to Github repository since upstream no longer provides tarball. [native-inputs]: Add autoconf, autoconf-archive, automake, bison, flex, gcc, googletest, jq, libtool [inputs]: Add libarchive, libcpuid, lowdown, zlib. * gnu/packages/patches/nix-dont-build-html-doc.diff: New file. * gnu/local.mk(dist_patch_DATA): Add corresponding entry. --- gnu/local.mk | 1 + gnu/packages/package-management.scm | 67 +++++++++++++------ .../patches/nix-dont-build-html-doc.diff | 26 +++++++ 3 files changed, 74 insertions(+), 20 deletions(-) create mode 100644 gnu/packages/patches/nix-dont-build-html-doc.diff diff --git a/gnu/local.mk b/gnu/local.mk index 3a849ed2b0..28c01a02ca 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1529,6 +1529,7 @@ dist_patch_DATA =3D \ %D%/packages/patches/nettle-3.5-check-_pkcs1_sec_decrypt-msg-len.patch \ %D%/packages/patches/nettle-3.5-CVE-2021-3580-pt1.patch \ %D%/packages/patches/nettle-3.5-CVE-2021-3580-pt2.patch \ + %D%/packages/patches/nix-dont-build-html-doc.diff \ %D%/packages/patches/nfs4-acl-tools-0.3.7-fixpaths.patch \ %D%/packages/patches/ngircd-handle-zombies.patch \ %D%/packages/patches/ngless-unliftio.patch \ diff --git a/gnu/packages/package-management.scm b/gnu/packages/package-man= agement.scm index 3c9d4da941..f45d09db78 100644 --- a/gnu/packages/package-management.scm +++ b/gnu/packages/package-management.scm @@ -19,6 +19,7 @@ ;;; Copyright =C2=A9 2020 Vincent Legoll ;;; Copyright =C2=A9 2021 Ivan Gankevich ;;; Copyright =C2=A9 2021 Maxim Cournoyer +;;; Copyright =C2=A9 2021 Zhu Zihao ;;; ;;; This file is part of GNU Guix. ;;; @@ -60,6 +61,8 @@ (define-module (gnu packages package-management) #:use-module (gnu packages dbm) #:use-module (gnu packages docbook) #:use-module (gnu packages file) + #:use-module (gnu packages flex) + #:use-module (gnu packages gcc) #:use-module (gnu packages gettext) #:use-module (gnu packages glib) #:use-module (gnu packages gnome) @@ -68,12 +71,14 @@ (define-module (gnu packages package-management) #:use-module (gnu packages gtk) #:use-module (gnu packages guile) #:use-module (gnu packages guile-xyz) + #:use-module (gnu packages hardware) #:use-module (gnu packages hurd) #:use-module (gnu packages less) #:use-module (gnu packages libedit) #:use-module (gnu packages linux) #:use-module (gnu packages lisp) #:use-module (gnu packages man) + #:use-module (gnu packages markup) #:use-module (gnu packages nettle) #:use-module (gnu packages networking) #:use-module (gnu packages ninja) @@ -596,14 +601,18 @@ (define-public current-guix (define-public nix (package (name "nix") - (version "2.3.16") - (source (origin - (method url-fetch) - (uri (string-append "https://releases.nixos.org/nix/nix-" - version "/nix-" version ".tar.xz")) - (sha256 - (base32 - "1g5aqavr6i3c1xln53w1pdh1kvlxrpnknb105m4jbd85kyv83rky")))) + (version "2.4") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "http://github.com/NixOS/nix") + (commit version))) + (file-name (git-file-name name version)) + (sha256 + (base32 "1abgfw5ndqklm0x533li32l4azifz3f6lhaxm6s74b704043r7m2")) + (patches + (search-patches "nix-dont-build-html-doc.diff")))) (build-system gnu-build-system) (arguments `(#:configure-flags '("--sysconfdir=3D/etc" "--enable-gc") @@ -619,18 +628,36 @@ (define-public nix (string-append "sysconfdir=3D" etc) (string-append "profiledir=3D" etc "/profile.d") make-flags))))))) - (native-inputs `(("pkg-config" ,pkg-config))) - (inputs `(("boost" ,boost) - ("brotli" ,brotli) - ("bzip2" ,bzip2) - ("curl" ,curl) - ("editline" ,editline) - ("libgc" ,libgc) - ("libseccomp" ,libseccomp) - ("libsodium" ,libsodium) - ("openssl" ,openssl) - ("sqlite" ,sqlite) - ("xz" ,xz))) + (native-inputs + `(("autoconf" ,autoconf) + ("autoconf-archive" ,autoconf-archive) + ("automake" ,automake) + ("bison" ,bison) + ("flex" ,flex) + ("gcc" ,gcc-9) ;non-trivial designated initialize= rs + ("googletest" ,googletest) + ("jq" ,jq) + ("libtool" ,libtool) + ("pkg-config" ,pkg-config))) + (inputs + `(("boost" ,boost) + ("brotli" ,brotli) + ("bzip2" ,bzip2) + ("curl" ,curl) + ("editline" ,editline) + ("libarchive" ,libarchive) + ,@(if (string-prefix? "x86_64" (or (%current-target-system) + (%current-system))) + `(("libcpuid" ,libcpuid)) + '()) + ("libgc" ,libgc) + ("libseccomp" ,libseccomp) + ("libsodium" ,libsodium) + ("lowdown" ,lowdown) + ("openssl" ,openssl) + ("sqlite" ,sqlite) + ("xz" ,xz) + ("zlib" ,zlib))) (home-page "https://nixos.org/nix/") (synopsis "The Nix package manager") (description diff --git a/gnu/packages/patches/nix-dont-build-html-doc.diff b/gnu/packag= es/patches/nix-dont-build-html-doc.diff new file mode 100644 index 0000000000..79142bc215 --- /dev/null +++ b/gnu/packages/patches/nix-dont-build-html-doc.diff @@ -0,0 +1,26 @@ +"--enable-doc-gen" configure flag will enable HTML document generation tha= t requires mdbook. +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 + $(trace-gen) $(dummy-env) NIX_PATH=3Dnix/corepkgs=3Dcorepkgs $(bindir)/n= ix __dump-builtins > $@.tmp + @mv $@.tmp $@ +=20 +-# Generate the HTML manual. +-install: $(docdir)/manual/index.html +=20 + # Generate 'nix' manpages. + install: $(mandir)/man1/nix3-manpages +@@ -94,7 +92,5 @@ doc/manual/generated/man1/nix3-manpages: $(d)/src/comman= d-ref/new-cli + done + @touch $@ +=20 +-$(docdir)/manual/index.html: $(MANUAL_SRCS) $(d)/book.toml $(d)/custom.cs= s $(d)/src/SUMMARY.md $(d)/src/command-ref/new-cli $(d)/src/command-ref/con= f-file.md $(d)/src/expressions/builtins.md $(call rwildcard, $(d)/src, *.md) +- $(trace-gen) RUST_LOG=3Dwarn mdbook build doc/manual -d $(DESTDIR)$(docd= ir)/manual +=20 + endif --=20 2.33.1 --=-=-= Content-Type: text/plain -- Retrieve my PGP public key: gpg --recv-keys D47A9C8B2AE3905B563D9135BE42B352A9F6821F Zihao --=-=-=--