[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
03/04: Merge branch 'master' into core-updates-frozen
From: |
guix-commits |
Subject: |
03/04: Merge branch 'master' into core-updates-frozen |
Date: |
Thu, 16 Sep 2021 19:28:30 -0400 (EDT) |
mbakke pushed a commit to branch core-updates-frozen
in repository guix.
commit 5c3cb22c9b2810669999e044b2de5e9331011a83
Merge: c896287 2a054d2
Author: Marius Bakke <marius@gnu.org>
AuthorDate: Fri Sep 17 01:25:52 2021 +0200
Merge branch 'master' into core-updates-frozen
Conflicts:
gnu/packages/bioinformatics.scm
gnu/packages/chez.scm
gnu/packages/docbook.scm
gnu/packages/ebook.scm
gnu/packages/gnome.scm
gnu/packages/linux.scm
gnu/packages/networking.scm
gnu/packages/python-web.scm
gnu/packages/python-xyz.scm
gnu/packages/tex.scm
gnu/packages/version-control.scm
gnu/packages/xml.scm
guix/build-system/dune.scm
guix/build-system/go.scm
guix/build-system/linux-module.scm
guix/packages.scm
Makefile.am | 6 +
THANKS | 2 +-
doc/guix-cookbook.texi | 37 +-
doc/guix.texi | 28 +-
etc/disarchive-manifest.scm | 112 +
etc/source-manifest.scm | 66 +
gnu/build/linux-boot.scm | 4 -
gnu/local.mk | 4 +-
gnu/packages/admin.scm | 4 +-
gnu/packages/algebra.scm | 8 +-
gnu/packages/autotools.scm | 13 +-
gnu/packages/aux-files/linux-libre/5.14-arm.conf | 10075 +++++++++++++++++
gnu/packages/aux-files/linux-libre/5.14-arm64.conf | 10448 ++++++++++++++++++
gnu/packages/aux-files/linux-libre/5.14-i686.conf | 10949 ++++++++++++++++++
.../aux-files/linux-libre/5.14-x86_64.conf | 11023 +++++++++++++++++++
gnu/packages/bioconductor.scm | 920 ++
gnu/packages/ci.scm | 6 +-
gnu/packages/cran.scm | 413 +
gnu/packages/crates-io.scm | 585 +-
gnu/packages/crypto.scm | 77 +
gnu/packages/databases.scm | 35 +-
gnu/packages/django.scm | 37 +
gnu/packages/docbook.scm | 110 +-
gnu/packages/ebook.scm | 14 +-
gnu/packages/education.scm | 60 +
gnu/packages/emacs-xyz.scm | 182 +-
gnu/packages/engineering.scm | 2 +-
gnu/packages/games.scm | 49 +-
gnu/packages/geo.scm | 4 +-
gnu/packages/gnome.scm | 97 +-
gnu/packages/gnuzilla.scm | 6 +-
gnu/packages/golang.scm | 266 +-
gnu/packages/haskell-xyz.scm | 3 +-
gnu/packages/haskell.scm | 62 +-
gnu/packages/kde-pim.scm | 21 +-
gnu/packages/linux.scm | 248 +-
gnu/packages/llvm.scm | 38 +
gnu/packages/mail.scm | 113 +-
gnu/packages/man.scm | 4 +
gnu/packages/maths.scm | 4 +-
gnu/packages/minetest.scm | 125 +-
gnu/packages/music.scm | 6 +-
gnu/packages/networking.scm | 60 +-
.../go-github-com-urfave-cli-fix-tests.patch | 28 +
.../go-github-com-urfave-cli-v2-fix-tests.patch | 37 +
.../mailutils-fix-uninitialized-variable.patch | 26 -
.../patches/racket-minimal-backport-1629887.patch | 28 +
gnu/packages/patchutils.scm | 7 +
gnu/packages/perl.scm | 2 +-
gnu/packages/python-web.scm | 73 +-
gnu/packages/python-xyz.scm | 57 +-
gnu/packages/racket.scm | 24 +-
gnu/packages/rocm.scm | 37 +-
gnu/packages/rust-apps.scm | 56 +
gnu/packages/ssh.scm | 4 +-
gnu/packages/task-management.scm | 4 +-
gnu/packages/tex.scm | 4 +-
gnu/packages/tryton.scm | 564 +-
gnu/packages/version-control.scm | 4 +-
gnu/packages/video.scm | 15 +-
gnu/packages/vim.scm | 60 +
gnu/packages/virtualization.scm | 13 +-
gnu/packages/web-browsers.scm | 29 +
gnu/packages/web.scm | 55 +-
gnu/packages/wireservice.scm | 4 +-
gnu/packages/wm.scm | 43 +-
gnu/packages/xdisorg.scm | 28 +
gnu/packages/xfce.scm | 4 +-
gnu/packages/xml.scm | 75 -
gnu/system.scm | 7 +-
guix.scm | 5 +-
guix/base16.scm | 44 +-
guix/base32.scm | 15 +-
guix/build-system/dune.scm | 19 +-
guix/build-system/go.scm | 163 +-
guix/build-system/linux-module.scm | 2 +
guix/build/download.scm | 23 +-
guix/build/dune-build-system.scm | 15 +-
guix/build/go-build-system.scm | 20 +-
guix/build/linux-module-build-system.scm | 9 +-
guix/download.scm | 10 +-
guix/git.scm | 33 +-
guix/import/cabal.scm | 13 +-
guix/import/elpa.scm | 4 +-
guix/import/go.scm | 9 +-
guix/lint.scm | 6 +-
guix/packages.scm | 85 +-
guix/scripts/import.scm | 12 +-
guix/scripts/system.scm | 31 +-
guix/store.scm | 41 +-
guix/swh.scm | 87 +-
guix/transformations.scm | 30 +-
tests/hackage.scm | 2 -
tests/packages.scm | 11 +
tests/store.scm | 36 +
tests/transformations.scm | 21 +
96 files changed, 47256 insertions(+), 1104 deletions(-)
diff --cc gnu/packages/docbook.scm
index 464f75c,ba90376..ee12f7e
--- a/gnu/packages/docbook.scm
+++ b/gnu/packages/docbook.scm
@@@ -6,7 -6,7 +6,8 @@@
;;; Copyright © 2020 Marius Bakke <marius@gnu.org>
;;; Copyright © 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;; Copyright © 2021 Mark H Weaver <mhw@netris.org>
+;;; Copyright © 2021 Efraim Flashner <efraim@flashner.co.il>
+ ;;; Copyright © 2021 Andrew Whatson <whatson@gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@@ -32,9 -34,8 +35,9 @@@
#:use-module (gnu packages perl)
#:use-module (gnu packages python)
#:use-module (gnu packages base)
+ #:use-module (gnu packages web-browsers)
#:use-module (gnu packages xml)
- #:use-module (guix licenses)
+ #:use-module ((guix licenses) #:prefix license:)
#:use-module (guix packages)
#:use-module (guix download)
#:use-module ((guix build utils) #:select (alist-replace))
@@@ -479,87 -479,91 +482,176 @@@ DB2LaTeX."
(inputs (alist-replace "imagemagick" `(,imagemagick/stable)
(package-inputs dblatex))))))
+(define-public docbook-utils
+ (package
+ (name "docbook-utils")
+ (version "0.6.14")
+ (source (origin
+ (method url-fetch)
+ ;; The original sources are not accessible anymore.
+ (uri (string-append "http://deb.debian.org/debian/pool/main/"
+ "d/docbook-utils/docbook-utils_"
+ version ".orig.tar.gz"))
+ (sha256
+ (base32
+ "1scj5vgw1xz872pq54a89blcxqqm11p90yzv8a9mqq57x27apyj8"))))
+ (build-system gnu-build-system)
+ (arguments
+ `(#:phases (modify-phases %standard-phases
+ (add-after 'unpack 'patch-build-system
+ (lambda _
+ (substitute* (find-files "." "\\.in$")
+ ;; Do not hard-code SGML_CATALOG_FILES.
+ ((".*SGML_CATALOG_FILES=/etc/sgml/catalog.*") "")
+ ;; Use OpenSP and OpenJade.
+ (("\\bjade\\b")
+ "openjade")
+ (("\\bnsgmls\\b")
+ "onsgmls"))
+ #t))
+ (add-after 'unpack 'patch-jw.in
+ ;; Do not override the SGML_CATALOG_FILES environment
+ ;; variable.
+ (lambda _
+ (substitute* "bin/jw.in"
+ ((".*SGML_CATALOG_FILES=`find.*")
+ "")
+ (("SGML_CATALOG_FILES=`echo.*")
+ ":\n")
+ (("SGML_CATALOG_FILES=\"\"")
+ ":")
+ (("\\bwhich\\b")
+ "command -v"))
+ #t))
+ (add-after 'unpack 'patch-txt-backend
+ (lambda _
+ ;; Locate lynx, links or w3m from the PATH, not from
+ ;; /usr/bin.
+ (substitute* "backends/txt"
+ (("CONVERT=/usr/bin/")
+ "CONVERT=")
+ (("\\[ -x /usr/bin/([^ ]+) \\]" dummy command)
+ (string-append "command -v " command " >
/dev/null")))
+ #t)))))
+ ;; Propagated for convenience. All these tools are used at run time to
+ ;; provide the complete functionality of the docbook-utils commands.
+ (propagated-inputs
+ `(("texlive-jadetex" ,texlive-jadetex)
+ ("docbook-sgml" ,docbook-sgml-3.1)
+ ("docbook-dsssl" ,docbook-dsssl)
+ ("openjade" ,openjade)
+ ("opensp" ,opensp)
+ ("lynx" ,lynx)
+ ("perl-sgmls" ,perl-sgmls)))
+ (home-page "https://packages.debian.org/sid/docbook-utils")
+ (synopsis "DocBook converter to other formats")
+ (description "The docbook-utils package is a collection of utilities
+intended to ease the use of SGML and XML.
+@table @command
+@item jw
+Convert a SGML DocBook file to other formats such as Hyper Text Markup
+Language (HTML), Rich Text Format (RTF), PostScript (PS), man, Portable
+Document Format (PDF), TeX, Texinfo or plain text (txt). It can be used
+more conveniently via the following wrappers:
+@itemx docbook2dvi Convert a SGML DocBook file to the DVI format.
+@itemx docbook2html Convert a SGML DocBook file to an HTML document.
+@itemx docbook2man Convert a SGML DocBook file a man page.
+@itemx docbook2pdf Convert a SGML DocBook file to a PDF document.
+@itemx docbook2ps Convert a SGML DocBook file to a PS document.
+@itemx docbook2rtf Convert a SGML DocBook file to a RTF document.
+@itemx docbook2tex Convert a SGML DocBook file to a TeX document.
+@itemx docbook2texi Convert a SGML DocBook file to a Texinfo document.
+@itemx docbook2txt Convert a SGML DocBook file to a plain text document.
+@item sgmldiff
+Detect the differences in markup between two SGML files.
+@end table")
- (license gpl2+)))
++ (license license:gpl2+)))
++
+ (define-public docbook2x
+ (package
+ (name "docbook2x")
+ (version "0.8.8")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "mirror://sourceforge/docbook2x/docbook2x/"
+ version "/docbook2X-" version ".tar.gz"))
+ (sha256
+ (base32
+ "0ifwzk99rzjws0ixzimbvs83x6cxqk1xzmg84wa1p7bs6rypaxs0"))))
+ (build-system gnu-build-system)
+ (inputs
+ `(("bash-minimal" ,bash-minimal)
+ ("docbook-xml" ,docbook-xml)
+ ("perl" ,perl)
+ ("perl-xml-namespacesupport" ,perl-xml-namespacesupport)
+ ("perl-xml-parser" ,perl-xml-parser)
+ ("perl-xml-sax" ,perl-xml-sax)
+ ("perl-xml-sax-base" ,perl-xml-sax-base)
+ ("texinfo" ,texinfo)
+ ("xsltproc" ,libxslt)))
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (add-after 'configure 'patch-sources
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ ;; Fix failed substitution in config.pl
+ (substitute* "perl/config.pl"
+ (("\\$\\{prefix\\}")
+ (assoc-ref outputs "out")))
+ ;; Fix a failing test (maybe it worked with old texinfo?)
+ (substitute* "test/complete-manuals/at1.xml"
+ (("<bridgehead>")
+ "<bridgehead renderas=\"sect2\">"))
+ ;; Patch all the tests use DocBook 4.5
+ (substitute* (find-files "test" "\\.xml$")
+ (("\"-//OASIS//DTD DocBook XML V4\\..+//EN\"")
+ "\"-//OASIS//DTD DocBook XML V4.5//EN\"")
+
(("\"http://www\\.oasis-open\\.org/docbook/xml/4\\..+/docbookx.dtd\"")
+ "\"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd\""))
+ ;; Set XML catalogs for tests to pass
+ (setenv "XML_CATALOG_FILES"
+ (string-append (assoc-ref inputs "docbook-xml")
+ "/xml/dtd/docbook/catalog.xml"))))
+ (add-after 'install 'wrap-programs
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (programs
+ (map (lambda (p)
+ (string-append out "/bin/" p))
+ '("db2x_manxml" "db2x_texixml" "db2x_xsltproc"
+ "docbook2man" "docbook2texi")))
+ (perl5lib
+ (map (lambda (i)
+ (string-append (assoc-ref inputs i)
+ "/lib/perl5/site_perl"))
+ '("perl-xml-namespacesupport"
+ "perl-xml-parser"
+ "perl-xml-sax"
+ "perl-xml-sax-base")))
+ (xml-catalog-files
+ (list (string-append (assoc-ref inputs "docbook-xml")
+ "/xml/dtd/docbook/catalog.xml"))))
+ (map (lambda (program)
+ (wrap-program program
+ `("PERL5LIB" ":" prefix
+ ,perl5lib)
+ `("XML_CATALOG_FILES" " " prefix
+ ,xml-catalog-files)))
+ programs))))
+ (add-after 'install 'create-symlinks
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let ((out (assoc-ref outputs "out")))
+ ;; Create db2x_* symlinks to satisfy some configure scripts
+ ;; which use these names to differentiate from an older
+ ;; docbook2man script provided by docbook-utils.
+ (map (lambda (prog)
+ (symlink prog (string-append out "/bin/db2x_" prog)))
+ '("docbook2man" "docbook2texi"))))))))
+ (home-page "http://docbook2x.sourceforge.net")
+ (synopsis "Convert DocBook to man page and Texinfo format")
+ (description
+ "docbook2X is a software package that converts DocBook documents into the
+ traditional Unix man page format and the GNU Texinfo format. Notable features
+ include table support for man pages, internationalization support, and easy
+ customization of the output using XSLT.")
+ (license license:expat)))
diff --cc gnu/packages/ebook.scm
index 9ed234f,abb04b6..61017ec
--- a/gnu/packages/ebook.scm
+++ b/gnu/packages/ebook.scm
@@@ -521,8 -519,7 +519,7 @@@ following formats
`("LD_LIBRARY_PATH" ":" prefix (,libmagic-path))
`("GI_TYPELIB_PATH" ":" prefix (,gi-typelib-path))
`("GST_PLUGIN_SYSTEM_PATH" ":" prefix (,gst-plugin-path))
- `("GUIX_PYTHONPATH" ":" prefix (,python-path ,pylib))))
- #t)))))
- `("PYTHONPATH" ":" prefix (,python-path ,pylib)))))))))
++ `("GUIX_PYTHONPATH" ":" prefix (,python-path ,pylib)))))))))
(native-inputs
`(("desktop-file-utils" ,desktop-file-utils)
("gettext" ,gettext-minimal)
diff --cc gnu/packages/emacs-xyz.scm
index 0033605,9797503..5154a7f
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@@ -26674,27 -26744,12 +26737,11 @@@ service, and connect it with Emacs via
(lambda* (#:key inputs outputs #:allow-other-keys)
(substitute* "telega-server.el"
(("@TELEGA_SERVER_BIN@")
- (string-append (assoc-ref inputs "emacs-telega-server")
- "/bin/telega-server")))
+ (search-input-file inputs "/bin/telega-server")))
(substitute* "telega-util.el"
(("@TELEGA_SHARE@")
- (string-append (assoc-ref outputs "out")
- "/share/emacs-telega")))))
- (add-after 'install 'install-share-files
- (lambda* (#:key outputs #:allow-other-keys)
- (define install-plan
- '("langs" "sounds" "emojis.alist"
- "verified.svg" "telega-logo.svg"))
-
- (define prefix (string-append (assoc-ref outputs "out")
- "/share/emacs-telega"))
- (with-directory-excursion "etc"
- (for-each (lambda (file)
- (if (file-is-directory? file)
- (let ((dest (string-append prefix "/" file)))
- (copy-recursively file dest))
- (install-file file prefix)))
- install-plan))
- #t)))))
+ (string-append (elpa-directory (assoc-ref outputs "out"))
+ "/etc"))))))))
(inputs
`(("emacs-telega-server" ,emacs-telega-server)
("ffmpeg" ,ffmpeg)))
diff --cc gnu/packages/gnome.scm
index fef3656,7362bf6..2550e4f
--- a/gnu/packages/gnome.scm
+++ b/gnu/packages/gnome.scm
@@@ -4202,9 -4224,8 +4202,8 @@@ engineering."
(package-version python))
"/site-packages")))
(wrap-program prog
- `("PYTHONPATH" = (,(getenv "PYTHONPATH") ,pylib))
+ `("PYTHONPATH" = (,(getenv "GUIX_PYTHONPATH") ,pylib))
- `("GI_TYPELIB_PATH" = (,(getenv "GI_TYPELIB_PATH"))))
- #t))))))
+ `("GI_TYPELIB_PATH" = (,(getenv "GI_TYPELIB_PATH"))))))))))
(native-inputs
`(("desktop-file-utils" ,desktop-file-utils)
("gettext" ,gettext-minimal)
diff --cc gnu/packages/linux.scm
index 122c277,285eb13..ec079e8
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@@ -19,10 -19,10 +19,10 @@@
;;; Copyright © 2016, 2018 Rene Saavedra <pacoon@protonmail.com>
;;; Copyright © 2016 Carlos Sánchez de La Lama <csanchezdll@gmail.com>
;;; Copyright © 2016, 2017 Nikita <nikita@n0.is>
- ;;; Copyright © 2017, 2018, 2020 Leo Famulari <leo@famulari.name>
+ ;;; Copyright © 2017, 2018, 2020, 2021 Leo Famulari <leo@famulari.name>
;;; Copyright © 2017 José Miguel Sánchez García <jmi2k@openmailbox.com>
;;; Copyright © 2017 Gábor Boskovits <boskovits@gmail.com>
-;;; Copyright © 2017, 2019 Mathieu Othacehe <m.othacehe@gmail.com>
+;;; Copyright © 2017, 2019, 2021 Mathieu Othacehe <othacehe@gnu.org>
;;; Copyright © 2017 Clément Lassieur <clement@lassieur.org>
;;; Copyright © 2017, 2018, 2019 Rutger Helling <rhelling@mykolab.com>
;;; Copyright © 2017 nee <nee-git@hidamari.blue>
@@@ -631,11 -673,11 +680,11 @@@ corresponding UPSTREAM-SOURCE (an origi
;; The following package is used in the early bootstrap, and thus must be kept
;; stable and with minimal build requirements.
-(define-public linux-libre-headers-5.4.20
- (make-linux-libre-headers "5.4.20" "gnu"
-
"1qxhf6dmcwjblzx8fgn6vr10p38xw10iwh6d1y1v1mxb25y30b47"))
+(define-public linux-libre-headers-5.10.35
- (make-linux-libre-headers "5.10.35"
++ (make-linux-libre-headers "5.10.35" "gnu"
+
"0q2rnchad55d49f3rajrkazz0fcjv1irwrdb1hwjnl01fzm2gjk3"))
-(define-public linux-libre-headers linux-libre-headers-5.4.20)
+(define-public linux-libre-headers linux-libre-headers-5.10.35)
;;;
diff --cc gnu/packages/networking.scm
index f367528,3657d69..869ad4b
--- a/gnu/packages/networking.scm
+++ b/gnu/packages/networking.scm
@@@ -44,7 -44,7 +44,8 @@@
;;; Copyright © 2021 Hartmut Goebel <h.goebel@crazy-compilers.com>
;;; Copyright © 2021 Justin Veilleux <terramorpha@cock.li>
;;; Copyright © 2021 Vinicius Monego <monego@posteo.net>
+;;; Copyright © 2021 Felix Gruber <felgru@posteo.net>
+ ;;; Copyright © 2021 Milkey Mouse <milkeymouse@meme.institute>
;;;
;;; This file is part of GNU Guix.
;;;
diff --cc gnu/packages/python-web.scm
index d30ac90,302e5d6..9c8e328
--- a/gnu/packages/python-web.scm
+++ b/gnu/packages/python-web.scm
@@@ -493,7 -502,12 +494,7 @@@ emit information from within their appl
"test/unit/module/maintenance/test_update_documentation.py")
(delete-file
"test/unit/module/maintenance/test_update_resource_specs.py")
- (invoke "python" "-m" "unittest" "discover"
- (setenv "PYTHONPATH"
- (string-append "./build/lib:"
- (getenv "PYTHONPATH")))
- (setenv "PATH" (string-append out "/bin:"
- (getenv "PATH")))
+ (invoke "python" "-m" "unittest" "discover" "-v"
"-s" "test")))))))
(native-inputs
`(("python-pydot" ,python-pydot)
diff --cc gnu/packages/python-xyz.scm
index 506df43,4e2e719..e9c0f65
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@@ -15967,17 -16006,27 +15969,14 @@@ Python to manipulate OpenDocument 1.2 f
(uri (pypi-uri "natsort" version))
(sha256
(base32
- "1ksqfai72dbcfbwx43pxl658j59mx2rvqypjy1fk0ax2qd6lccx6"))))
+ "00y49bfsi7rrsd1s42gc2w95a6arl9ipdsx2493hr0v54fj07ih0"))))
(build-system python-build-system)
(arguments
- `(#:modules ((guix build utils)
- (guix build python-build-system)
- (srfi srfi-1)
- (srfi srfi-26)
- (ice-9 ftw))
- #:phases
+ `(#:phases
(modify-phases %standard-phases
- (add-before 'check 'set-cachedir
- ;; Tests require write access to $HOME by default
- (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t))
(replace 'check
(lambda _
- (let ((cwd (getcwd)))
- (setenv "PYTHONPATH"
- (string-append
- cwd "/build/"
- (find (cut string-prefix? "lib" <>)
- (scandir (string-append cwd "/build")))
- ":"
- (getenv "PYTHONPATH")))
- (invoke "pytest" "-v")))))))
+ (invoke "pytest" "-v"))))))
(native-inputs
`(("python-hypothesis" ,python-hypothesis)
("python-pytest-cov" ,python-pytest-cov)
diff --cc gnu/packages/tex.scm
index 92df68c,c15203c..5da6d8d
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@@ -8080,7 -7332,7 +8083,6 @@@ Support for use with LaTeX is availabl
"/doc/man/man1/mtx-watch.1"
"/doc/man/man1/mtx-youless.1"
-
-
"/bibtex/bst/context/"
"/context/"
diff --cc guix/build-system/dune.scm
index 303b5f7,5b33ef6..12100fd
--- a/guix/build-system/dune.scm
+++ b/guix/build-system/dune.scm
@@@ -61,8 -60,19 +61,19 @@@
#:allow-other-keys
#:rest arguments)
"Return a bag for NAME."
+
+ ;; Flags that put dune into reproducible build mode.
+ (define dune-release-flags
+ (if (version>=? (package-version dune) "2.5.0")
+ ;; For dune >= 2.5.0 this is just --release.
+ ''("--release")
+ ;; --release does not exist before 2.5.0. Replace with flags
compatible
+ ;; with our old ocaml4.07-dune (1.11.3)
+ ''("--root" "." "--ignore-promoted-rules" "--no-config"
+ "--profile" "release")))
+
(define private-keywords
- '(#:source #:target #:dune #:findlib #:ocaml #:inputs #:native-inputs))
+ '(#:target #:dune #:findlib #:ocaml #:inputs #:native-inputs))
(and (not target) ;XXX: no cross-compilation
(let ((base (ocaml:lower name
@@@ -80,11 -90,12 +91,13 @@@
(build-inputs `(("dune" ,dune)
,@(bag-build-inputs base)))
(build dune-build)
- (arguments (strip-keyword-arguments private-keywords
arguments))))))
+ (arguments (append
+ `(#:dune-release-flags ,dune-release-flags)
+ (strip-keyword-arguments private-keywords
arguments)))))))
-(define* (dune-build store name inputs
- #:key (guile #f)
+(define* (dune-build name inputs
+ #:key
+ guile source
(outputs '("out"))
(search-paths '())
(build-flags ''())
@@@ -111,40 -122,51 +124,40 @@@
"Build SOURCE using OCAML, and with INPUTS. This assumes that SOURCE
provides a 'setup.ml' file as its build system."
(define builder
- `(begin
- (use-modules ,@modules)
- (dune-build #:source ,(match (assoc-ref inputs "source")
- (((? derivation? source))
- (derivation->output-path source))
- ((source)
- source)
- (source
- source))
- #:system ,system
- #:outputs %outputs
- #:inputs %build-inputs
- #:search-paths ',(map search-path-specification->sexp
- search-paths)
- #:phases ,phases
- #:test-flags ,test-flags
- #:build-flags ,build-flags
- #:out-of-source? ,out-of-source?
- #:jbuild? ,jbuild?
- #:package ,package
- #:dune-release-flags ,dune-release-flags
- #:tests? ,tests?
- #:test-target ,test-target
- #:install-target ,install-target
- #:validate-runpath? ,validate-runpath?
- #:patch-shebangs? ,patch-shebangs?
- #:strip-binaries? ,strip-binaries?
- #:strip-flags ,strip-flags
- #:strip-directories ,strip-directories)))
+ (with-imported-modules imported-modules
+ #~(begin
+ (use-modules #$@modules)
+ (dune-build #:source #$source
+ #:system #$system
+ #:outputs (list #$@(map (lambda (name)
+ #~(cons #$name
+ (ungexp output name)))
+ outputs))
+ #:inputs (map (lambda (tuple)
+ (apply cons tuple))
+ '#$inputs)
+ #:search-paths '#$(map search-path-specification->sexp
+ search-paths)
+ #:phases #$phases
+ #:test-flags #$test-flags
+ #:build-flags #$build-flags
+ #:out-of-source? #$out-of-source?
+ #:jbuild? #$jbuild?
+ #:package #$package
- #:profile #$profile
++ #:dune-release-flags #$dune-release-flags
+ #:tests? #$tests?
+ #:test-target #$test-target
+ #:install-target #$install-target
+ #:validate-runpath? #$validate-runpath?
+ #:patch-shebangs? #$patch-shebangs?
+ #:strip-binaries? #$strip-binaries?
+ #:strip-flags #$strip-flags
+ #:strip-directories #$strip-directories))))
- (define guile-for-build
- (match guile
- ((? package?)
- (package-derivation store guile system #:graft? #f))
- (#f ; the default
- (let* ((distro (resolve-interface '(gnu packages commencement)))
- (guile (module-ref distro 'guile-final)))
- (package-derivation store guile system #:graft? #f)))))
-
- (build-expression->derivation store name builder
- #:system system
- #:inputs inputs
- #:modules imported-modules
- #:outputs outputs
- #:guile-for-build guile-for-build))
+ (gexp->derivation name builder
+ #:system system
+ #:target #f
+ #:guile-for-build guile))
(define dune-build-system
(build-system
diff --cc guix/build-system/go.scm
index 100d1db,4c1a732..b62f2a8
--- a/guix/build-system/go.scm
+++ b/guix/build-system/go.scm
@@@ -2,7 -2,7 +2,8 @@@
;;; Copyright © 2016 Petter <petter@mykolab.ch>
;;; Copyright © 2017 Leo Famulari <leo@famulari.name>
;;; Copyright © 2020 Jakub Kądziołka <kuba@kadziolka.net>
+;;; Copyright © 2021 Ludovic Courtès <ludo@gnu.org>
+ ;;; Copyright © 2021 Efraim Flashner <efraim@flashner.co.il>
;;;
;;; This file is part of GNU Guix.
;;;
@@@ -99,29 -116,44 +119,44 @@@ commit hash and its date rather than a
#:rest arguments)
"Return a bag for NAME."
(define private-keywords
- '(#:source #:target #:go #:inputs #:native-inputs))
+ '(#:target #:go #:inputs #:native-inputs))
- (and (not target) ;XXX: no cross-compilation
- (bag
- (name name)
- (system system)
- (host-inputs `(,@(if source
- `(("source" ,source))
- '())
- ,@inputs
-
- ;; Keep the standard inputs of 'gnu-build-system'.
- ,@(standard-packages)))
- (build-inputs `(("go" ,go)
- ,@native-inputs))
- (outputs outputs)
- (build go-build)
- (arguments (strip-keyword-arguments private-keywords arguments)))))
+ (bag
+ (name name)
+ (system system)
+ (target target)
+ (build-inputs `(,@(if source
+ `(("source" ,source))
+ '())
+ ,@`(("go" ,go))
+ ,@native-inputs
+ ,@(if target '() inputs)
+ ,@(if target
+ ;; Use the standard cross inputs of
+ ;; 'gnu-build-system'.
+ (standard-cross-packages target 'host)
+ '())
+ ;; Keep the standard inputs of 'gnu-build-system'.
+ ,@(standard-packages)))
+ (host-inputs (if target inputs '()))
+
+ ;; The cross-libc is really a target package, but for bootstrapping
+ ;; reasons, we can't put it in 'host-inputs'. Namely, 'cross-gcc' is a
+ ;; native package, so it would end up using a "native" variant of
+ ;; 'cross-libc' (built with 'gnu-build'), whereas all the other packages
+ ;; would use a target variant (built with 'gnu-cross-build'.)
+ (target-inputs (if target
+ (standard-cross-packages target 'target)
+ '()))
+
+ (outputs outputs)
+ (build (if target go-cross-build go-build))
+ (arguments (strip-keyword-arguments private-keywords arguments))))
-(define* (go-build store name inputs
+(define* (go-build name inputs
#:key
- (phases '(@ (guix build go-build-system)
- %standard-phases))
+ source
+ (phases '%standard-phases)
(outputs '("out"))
(search-paths '())
(install-source? #t)
@@@ -137,31 -171,140 +174,125 @@@
(guix build union)
(guix build utils))))
(define builder
- `(begin
- (use-modules ,@modules)
- (go-build #:name ,name
- #:source ,(match (assoc-ref inputs "source")
- (((? derivation? source))
- (derivation->output-path source))
- ((source)
- source)
- (source
- source))
- #:system ,system
- #:phases ,phases
- #:outputs %outputs
- #:goarch ,goarch
- #:goos ,goos
- #:search-paths ',(map search-path-specification->sexp
- search-paths)
- #:install-source? ,install-source?
- #:import-path ,import-path
- #:unpack-path ,unpack-path
- #:build-flags ,build-flags
- #:tests? ,tests?
- #:allow-go-reference? ,allow-go-reference?
- #:inputs %build-inputs)))
-
- (define guile-for-build
- (match guile
- ((? package?)
- (package-derivation store guile system #:graft? #f))
- (#f ; the default
- (let* ((distro (resolve-interface '(gnu packages commencement)))
- (guile (module-ref distro 'guile-final)))
- (package-derivation store guile system
- #:graft? #f)))))
-
- (build-expression->derivation store name builder
- #:inputs inputs
- #:system system
- #:modules imported-modules
- #:outputs outputs
- #:guile-for-build guile-for-build))
+ (with-imported-modules imported-modules
+ #~(begin
+ (use-modules #$@modules)
+ (go-build #:name #$name
+ #:source #+source
+ #:system #$system
+ #:phases #$phases
+ #:outputs #$(outputs->gexp outputs)
++ #:goarch #$goarch
++ #:goos #$goos
+ #:search-paths '#$(sexp->gexp
+ (map search-path-specification->sexp
+ search-paths))
+ #:install-source? #$install-source?
+ #:import-path #$import-path
+ #:unpack-path #$unpack-path
+ #:build-flags #$build-flags
+ #:tests? #$tests?
+ #:allow-go-reference? #$allow-go-reference?
+ #:inputs #$(input-tuples->gexp inputs)))))
+
+ (mlet %store-monad ((guile (package->derivation (or guile (default-guile))
+ system #:graft? #f)))
+ (gexp->derivation name builder
+ #:system system
+ #:guile-for-build guile)))
+ (define* (go-cross-build store name
+ #:key
+ target native-drvs target-drvs
+ (phases '(@ (guix build go-build-system)
+ %standard-phases))
+ (outputs '("out"))
+ (search-paths '())
+ (native-search-paths '())
+ (install-source? #t)
+ (import-path "")
+ (unpack-path "")
+ (build-flags ''())
+ (tests? #f) ; nothing can be done
+ (allow-go-reference? #f)
+ (system (%current-system))
+ (goarch (first (go-target target)))
+ (goos (last (go-target target)))
+ (guile #f)
+ (imported-modules %go-build-system-modules)
+ (modules '((guix build go-build-system)
+ (guix build union)
+ (guix build utils))))
+ "Cross-build NAME using GO, where TARGET is a GNU triplet and with INPUTS."
+ (define builder
+ `(begin
+ (use-modules ,@modules)
+ (let ()
+ (define %build-host-inputs
+ ',(map (match-lambda
+ ((name (? derivation? drv) sub ...)
+ `(,name . ,(apply derivation->output-path drv sub)))
+ ((name path)
+ `(,name . ,path)))
+ native-drvs))
+
+ (define %build-target-inputs
+ ',(map (match-lambda
+ ((name (? derivation? drv) sub ...)
+ `(,name . ,(apply derivation->output-path drv sub)))
+ ((name (? package? pkg) sub ...)
+ (let ((drv (package-cross-derivation store pkg
+ target system)))
+ `(,name . ,(apply derivation->output-path drv sub))))
+ ((name path)
+ `(,name . ,path)))
+ target-drvs))
+
+ (go-build #:name ,name
+ #:source ,(match (assoc-ref native-drvs "source")
+ (((? derivation? source))
+ (derivation->output-path source))
+ ((source)
+ source)
+ (source
+ source))
+ #:system ,system
+ #:phases ,phases
+ #:outputs %outputs
+ #:target ,target
+ #:goarch ,goarch
+ #:goos ,goos
+ #:inputs %build-target-inputs
+ #:native-inputs %build-host-inputs
+ #:search-paths ',(map search-path-specification->sexp
+ search-paths)
+ #:native-search-paths ',(map
+ search-path-specification->sexp
+ native-search-paths)
+ #:install-source? ,install-source?
+ #:import-path ,import-path
+ #:unpack-path ,unpack-path
+ #:build-flags ,build-flags
+ #:tests? ,tests?
+ #:allow-go-reference? ,allow-go-reference?
+ #:inputs %build-inputs))))
+
+ (define guile-for-build
+ (match guile
+ ((? package?)
+ (package-derivation store guile system #:graft? #f))
+ (#f ; the default
+ (let* ((distro (resolve-interface '(gnu packages commencement)))
+ (guile (module-ref distro 'guile-final)))
+ (package-derivation store guile system #:graft? #f)))))
+
+ (build-expression->derivation store name builder
+ #:system system
+ #:inputs (append native-drvs target-drvs)
+ #:outputs outputs
+ #:modules imported-modules
+ #:guile-for-build guile-for-build))
+
(define go-build-system
(build-system
(name 'go)
diff --cc guix/build-system/linux-module.scm
index 84570b9,33bc8c9..7bafee5
--- a/guix/build-system/linux-module.scm
+++ b/guix/build-system/linux-module.scm
@@@ -167,35 -167,49 +168,36 @@@
(guix build utils))))
"Build SOURCE using LINUX, and with INPUTS."
(define builder
- `(begin
- (use-modules ,@modules)
- (linux-module-build #:name ,name
- #:source ,(match (assoc-ref inputs "source")
- (((? derivation? source))
- (derivation->output-path source))
- ((source)
- source)
- (source
- source))
- #:source-directory ,source-directory
- #:search-paths ',(map search-path-specification->sexp
- search-paths)
- #:phases ,phases
- #:system ,system
- #:target ,target
- #:arch ,(system->arch (or target system))
- #:tests? ,tests?
- #:outputs %outputs
- #:make-flags ,make-flags
- #:inputs %build-inputs)))
+ (with-imported-modules imported-modules
+ #~(begin
+ (use-modules #$@(sexp->gexp modules))
+ (linux-module-build #:name #$name
+ #:source #+source
++ #:source-directory #$source-directory
+ #:search-paths '#$(sexp->gexp
+ (map
search-path-specification->sexp
+ search-paths))
+ #:phases #$phases
+ #:system #$system
+ #:target #$target
+ #:arch #$(system->arch (or target system))
+ #:tests? #$tests?
+ #:outputs #$(outputs->gexp outputs)
+ #:make-flags #$make-flags
+ #:inputs #$(input-tuples->gexp inputs)))))
- (define guile-for-build
- (match guile
- ((? package?)
- (package-derivation store guile system #:graft? #f))
- (#f ; the default
- (let* ((distro (resolve-interface '(gnu packages commencement)))
- (guile (module-ref distro 'guile-final)))
- (package-derivation store guile system #:graft? #f)))))
-
- (build-expression->derivation store name builder
- #:system system
- #:inputs inputs
- #:modules imported-modules
- #:outputs outputs
- #:guile-for-build guile-for-build
- #:substitutable? substitutable?))
+ (mlet %store-monad ((guile (package->derivation (or guile (default-guile))
+ system #:graft? #f)))
+ (gexp->derivation name builder
+ #:system system
+ #:guile-for-build guile
+ #:substitutable? substitutable?)))
(define* (linux-module-build-cross
- store name
+ name
#:key
- target native-drvs target-drvs
+ source target
+ build-inputs target-inputs host-inputs
(guile #f)
(outputs '("out"))
(make-flags ''())
diff --cc guix/packages.scm
index 2349bb4,ad7937b..863c12d
--- a/guix/packages.scm
+++ b/guix/packages.scm
@@@ -55,7 -52,7 +55,8 @@@
#:re-export (%current-system
%current-target-system
search-path-specification) ;for convenience
+ #:re-export-and-replace (delete) ;used as syntactic keyword
+ #:replace ((define-public* . define-public))
#:export (content-hash
content-hash?
content-hash-algorithm
@@@ -377,17 -360,62 +379,71 @@@ name of its URI.
;;
;; XXX: MIPS is unavailable in CI:
;; <https://lists.gnu.org/archive/html/guix-devel/2017-03/msg00790.html>.
- (fold delete %supported-systems '("mips64el-linux")))
+ (fold delete %supported-systems '("mips64el-linux" "powerpc-linux")))
+
+(define-inlinable (sanitize-inputs inputs)
+ "Sanitize INPUTS by turning it into a list of name/package tuples if it's
+not already the case."
+ (cond ((null? inputs) inputs)
+ ((and (pair? (car inputs))
+ (string? (caar inputs)))
+ inputs)
+ (else (map add-input-label inputs))))
+ (define-syntax current-location-vector
+ (lambda (s)
+ "Like 'current-source-location' but expand to a literal vector with
+ one-indexed line numbers."
+ ;; Storing a literal vector in .go files is more efficient than storing an
+ ;; alist: less initialization code, fewer relocations, etc.
+ (syntax-case s ()
+ ((_)
+ (match (syntax-source s)
+ (#f #f)
+ (properties
+ (let ((file (assq-ref properties 'filename))
+ (line (assq-ref properties 'line))
+ (column (assq-ref properties 'column)))
+ (and file line column
+ #`#(#,file #,(+ 1 line) #,column)))))))))
+
+ (define-inlinable (sanitize-location loc)
+ ;; Convert LOC to a vector or to #f.
+ (cond ((vector? loc) loc)
+ ((not loc) loc)
+ (else (vector (location-file loc)
+ (location-line loc)
+ (location-column loc)))))
+
+ (define-syntax-parameter current-definition-location
+ ;; Location of the encompassing 'define-public'.
+ (const #f))
+
+ (define-syntax define-public*
+ (lambda (s)
+ "Like 'define-public' but set 'current-definition-location' for the
+ lexical scope of its body."
+ (define location
+ (match (syntax-source s)
+ (#f #f)
+ (properties
+ (let ((line (assq-ref properties 'line))
+ (column (assq-ref properties 'column)))
+ ;; Don't repeat the file name since it's redundant with 'location'.
+ ;; Encode the whole thing so that it fits in a fixnum on 32-bit
+ ;; platforms, which leaves us 29 bits: 7 bits for COLUMN (which is
+ ;; almost always zero), and 22 bits for LINE.
+ (and line column
+ (logior (ash (logand #x7f column) 22)
+ (logand (- (expt 2 22) 1) (+ 1 line))))))))
+
+ (syntax-case s ()
+ ((_ prototype body ...)
+ #`(define-public prototype
+ (syntax-parameterize ((current-definition-location
+ (lambda (s) #,location)))
+ body ...))))))
+
;; A package.
(define-record-type* <package>
package make-package
@@@ -434,29 -459,13 +490,31 @@@
(properties package-properties (default '())) ; alist for anything else
- (location package-location
- (default (and=> (current-source-location)
- source-properties->location))
- (innate)))
+ (location package-location-vector
+ (default (current-location-vector))
+ (innate) (sanitize sanitize-location))
+ (definition-location package-definition-location-code
+ (default (current-definition-location))
+ (innate)))
+(define (add-input-label input)
+ "Add an input label to INPUT."
+ (match input
+ ((? package? package)
+ (list (package-name package) package))
+ (((? package? package) output) ;XXX: ugly?
+ (list (package-name package) package output))
+ ((? gexp-input?) ;XXX: misplaced because 'native?' field is ignored?
+ (let ((obj (gexp-input-thing input))
+ (output (gexp-input-output input)))
+ `(,(if (package? obj)
+ (package-name obj)
+ "_")
+ ,obj
+ ,@(if (string=? output "out") '() (list output)))))
+ (x
+ `("_" ,x))))
+
(set-record-type-printer! <package>
(lambda (package port)
(let ((loc (package-location package))