Merge branch 'master' into core-updates-frozen
authorLudovic Courtès <ludo@gnu.org>
Wed, 17 Nov 2021 22:24:42 +0000 (23:24 +0100)
committerLudovic Courtès <ludo@gnu.org>
Wed, 17 Nov 2021 22:43:14 +0000 (23:43 +0100)
93 files changed:
1  2 
doc/guix.texi
gnu/local.mk
gnu/packages/admin.scm
gnu/packages/adns.scm
gnu/packages/astronomy.scm
gnu/packages/audio.scm
gnu/packages/backup.scm
gnu/packages/bioinformatics.scm
gnu/packages/boost.scm
gnu/packages/bootloaders.scm
gnu/packages/build-tools.scm
gnu/packages/ci.scm
gnu/packages/cpp.scm
gnu/packages/crates-io.scm
gnu/packages/crypto.scm
gnu/packages/cups.scm
gnu/packages/databases.scm
gnu/packages/diffoscope.scm
gnu/packages/django.scm
gnu/packages/dunst.scm
gnu/packages/emacs-xyz.scm
gnu/packages/engineering.scm
gnu/packages/enlightenment.scm
gnu/packages/finance.scm
gnu/packages/game-development.scm
gnu/packages/games.scm
gnu/packages/geo.scm
gnu/packages/gnome-xyz.scm
gnu/packages/gnupg.scm
gnu/packages/gstreamer.scm
gnu/packages/gtk.scm
gnu/packages/guile-xyz.scm
gnu/packages/guile.scm
gnu/packages/image-viewers.scm
gnu/packages/image.scm
gnu/packages/julia.scm
gnu/packages/kodi.scm
gnu/packages/libevent.scm
gnu/packages/linux.scm
gnu/packages/lisp-xyz.scm
gnu/packages/llvm.scm
gnu/packages/logging.scm
gnu/packages/lua.scm
gnu/packages/machine-learning.scm
gnu/packages/mail.scm
gnu/packages/maths.scm
gnu/packages/messaging.scm
gnu/packages/monitoring.scm
gnu/packages/mpd.scm
gnu/packages/music.scm
gnu/packages/networking.scm
gnu/packages/node.scm
gnu/packages/ocaml.scm
gnu/packages/package-management.scm
gnu/packages/pdf.scm
gnu/packages/pep.scm
gnu/packages/plotutils.scm
gnu/packages/pretty-print.scm
gnu/packages/python-build.scm
gnu/packages/python-check.scm
gnu/packages/python-science.scm
gnu/packages/python-web.scm
gnu/packages/python-xyz.scm
gnu/packages/shells.scm
gnu/packages/sqlite.scm
gnu/packages/ssh.scm
gnu/packages/task-management.scm
gnu/packages/terminals.scm
gnu/packages/tex.scm
gnu/packages/tls.scm
gnu/packages/version-control.scm
gnu/packages/video.scm
gnu/packages/virtualization.scm
gnu/packages/vpn.scm
gnu/packages/web.scm
gnu/packages/wm.scm
gnu/packages/xdisorg.scm
gnu/packages/xml.scm
gnu/packages/xorg.scm
gnu/services/cups.scm
gnu/tests/web.scm
guix/build-system/julia.scm
guix/build/qt-utils.scm
guix/import/cran.scm
guix/import/print.scm
guix/import/pypi.scm
guix/packages.scm
guix/tests.scm
tests/egg.scm
tests/gexp.scm
tests/print.scm
tests/pypi.scm
tests/store.scm

diff --cc doc/guix.texi
Simple merge
diff --cc gnu/local.mk
@@@ -1121,15 -1105,13 +1104,15 @@@ dist_patch_DATA =                                            
    %D%/packages/patches/gcc-8-strmov-store-file-names.patch    \
    %D%/packages/patches/gcc-9-asan-fix-limits-include.patch    \
    %D%/packages/patches/gcc-9-strmov-store-file-names.patch    \
 -  %D%/packages/patches/gdb-hurd.patch                         \
    %D%/packages/patches/gd-fix-tests-on-i686.patch             \
    %D%/packages/patches/gd-brect-bounds.patch                  \
 -  %D%/packages/patches/gdk-pixbuf-CVE-2020-29385.patch                \
 +  %D%/packages/patches/gd-Revert-fix-303-gdlib.pc.patch               \
    %D%/packages/patches/gdm-default-session.patch              \
 +  %D%/packages/patches/gdm-elogind-support.patch              \
 +  %D%/packages/patches/gdm-remove-hardcoded-xwayland-path.patch       \
 +  %D%/packages/patches/gdm-wayland-session-wrapper-from-env.patch     \
    %D%/packages/patches/geary-CVE-2020-24661.patch             \
-   %D%/packages/patches/genimage-signedness.patch              \
+   %D%/packages/patches/genimage-mke2fs-test.patch             \
    %D%/packages/patches/geoclue-config.patch                   \
    %D%/packages/patches/ghc-8.0-fall-back-to-madv_dontneed.patch       \
    %D%/packages/patches/ghc-testsuite-dlopen-pie.patch         \
    %D%/packages/patches/rocm-opencl-runtime-4.3-nocltrace.patch \
    %D%/packages/patches/rocm-opencl-runtime-4.3-noopencl.patch \
    %D%/packages/patches/ruby-sanitize-system-libxml.patch      \
 -  %D%/packages/patches/rust-1.19-mrustc.patch                 \
 -  %D%/packages/patches/rust-1.25-accept-more-detailed-gdb-lines.patch \
 -  %D%/packages/patches/rust-1.45-linker-locale.patch          \
 -  %D%/packages/patches/rust-1.48-linker-locale.patch          \
 +  %D%/packages/patches/rustc-1.39.0-src.patch                 \
+   %D%/packages/patches/rust-adblock-ignore-live-tests.patch           \
 -  %D%/packages/patches/rust-bootstrap-stage0-test.patch               \
    %D%/packages/patches/rust-coresimd-doctest.patch            \
    %D%/packages/patches/rust-ndarray-remove-blas-src-dep.patch \
    %D%/packages/patches/rust-ndarray-0.13-remove-blas-src.patch        \
Simple merge
Simple merge
Simple merge
Simple merge
@@@ -4,9 -4,9 +4,9 @@@
  ;;; Copyright © 2015, 2016, 2017 Leo Famulari <leo@famulari.name>
  ;;; Copyright © 2017–2021 Tobias Geerinckx-Rice <me@tobias.gr>
  ;;; Copyright © 2017 Thomas Danckaert <post@thomasdanckaert.be>
- ;;; Copyright © 2017 Arun Isaac <arunisaac@systemreboot.net>
+ ;;; Copyright © 2017, 2021 Arun Isaac <arunisaac@systemreboot.net>
  ;;; Copyright © 2017 Kei Kebreau <kkebreau@posteo.net>
 -;;; Copyright © 2017, 2020 Efraim Flashner <efraim@flashner.co.il>
 +;;; Copyright © 2017, 2020, 2021 Efraim Flashner <efraim@flashner.co.il>
  ;;; Copyright © 2017 Christine Lemmer-Webber <cwebber@dustycloud.org>
  ;;; Copyright © 2017 Rutger Helling <rhelling@mykolab.com>
  ;;; Copyright © 2018 Mark H Weaver <mhw@netris.org>
             (lambda* (#:key inputs #:allow-other-keys)
               (setenv "HOME" (getcwd))   ; gpg needs to write to $HOME
               (setenv "TZDIR"            ; some timestamp checks need TZDIR
 -                     (string-append (assoc-ref inputs "tzdata")
 -                                    "/share/zoneinfo"))
 +                     (search-input-directory inputs "share/zoneinfo"))
               ;; Some things respect TMPDIR, others hard-code /tmp, and the
               ;; defaults don't match up, breaking test_restart.  Fix it.
-              (setenv "TMPDIR" "/tmp")
-              #t)))))
+              (setenv "TMPDIR" "/tmp"))))))
      (home-page "https://duplicity.gitlab.io/duplicity-web/")
      (synopsis "Encrypted backup using rsync algorithm")
      (description
Simple merge
@@@ -277,9 -288,13 +277,16 @@@ across a broad spectrum of applications
             (lambda* (#:key make-flags #:allow-other-keys)
               (apply invoke "./b2" "install" make-flags))))))))
  
 +(define-public boost-with-python3
 +  (deprecated-package "boost-with-python3" boost))
 +
+ (define-public boost-with-python2
+   (package/inherit boost
+     (name "boost-python2")
+     (native-inputs
+      `(("python" ,python-2)
+        ,@(alist-delete "python" (package-native-inputs boost))))))
  (define-public boost-static
    (package
      (inherit boost)
Simple merge
Simple merge
Simple merge
    #:use-module (gnu packages pkg-config)
    #:use-module (gnu packages popt)
    #:use-module (gnu packages pretty-print)
 +  #:use-module (gnu packages python)
+   #:use-module (gnu packages pulseaudio)
    #:use-module (gnu packages tls)
    #:use-module (gnu packages web)
 -  #:use-module (gnu packages xml))
 +  #:use-module (gnu packages xml)
 +  #:use-module (srfi srfi-1))
  
  (define-public range-v3
    (package
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
@@@ -668,12 -585,10 +635,9 @@@ specification.  These are the main feat
                (sha256
                 (base32
                  "0nj0684qgh6ppkbdyxqfyjwsv2qbyairxpi8fzrhsi3xnc7jn4im"))))
 -    (native-inputs `(("pkg-config" ,pkg-config)
 -                     ("guile" ,guile-3.0)))
 -    (inputs `(("guile" ,guile-3.0)))))
 +    (native-inputs (list pkg-config guile-3.0))
 +    (inputs (list guile-3.0))))
  
- (define-public guile3.0-json
-   (deprecated-package "guile3.0-json" guile-json-3))
  (define-public guile-json-4
    (package
      (inherit guile-json-3)
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
@@@ -1202,17 -1193,10 +1192,10 @@@ enabled."
             (lambda* (#:key inputs #:allow-other-keys)
               (substitute* "fennel"
                 (("/usr/bin/env .*lua")
-                 (search-input-file inputs "/bin/lua")))
-              #t))
 -                (string-append (assoc-ref inputs "lua") "/bin/lua")))))
++                (search-input-file inputs "/bin/lua")))))
           (delete 'check)
           (add-after 'install 'check
-            (assoc-ref %standard-phases 'check))
-          (add-after 'install 'install-manpage
-            (lambda* (#:key outputs #:allow-other-keys)
-              (install-file "fennel.1"
-                            (string-append (assoc-ref outputs "out")
-                                           "/share/man/man1"))
-              #t)))))
+            (assoc-ref %standard-phases 'check)))))
      (inputs `(("lua" ,lua)))
      (home-page "https://fennel-lang.org/")
      (synopsis "Lisp that compiles to Lua")
Simple merge
  ;;; Copyright © 2020 Oleg Pykhalov <go.wigust@gmail.com>
  ;;; Copyright © 2020 B. Wilson <elaexuotee@wilsonb.com>
  ;;; Copyright © 2020 divoplade <d@divoplade.fr>
 +;;; Copyright © 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
  ;;; Copyright © 2021 Xinglu Chen <public@yoctocell.xyz>
  ;;; Copyright © 2021 Benoit Joly <benoit@benoitj.ca>
+ ;;; Copyright © 2021 Morgan Smith <Morgan.J.Smith@outlook.com>
  ;;;
  ;;; This file is part of GNU Guix.
  ;;;
Simple merge
Simple merge
Simple merge
@@@ -114,10 -117,11 +117,10 @@@ interfacing MPD in the C, C++ & Objecti
                                "/mpd-" version ".tar.xz"))
                (sha256
                 (base32
-                 "1850ii8vnv5l8b561fai4q2mcrnym94mvlrxiy48fvpfm8s7ygql"))))
+                 "0m67wibxc6n6438h2va59n51wwwbwhbdj9635cnpc3wqvlq9sd9g"))))
      (build-system meson-build-system)
      (arguments
 -     `(#:meson ,meson-next ; Requires Meson >= 0.56.0
 -       #:configure-flags '("-Ddocumentation=enabled")))
 +     `(#:configure-flags '("-Ddocumentation=enabled")))
      (inputs `(("ao" ,ao)
                ("alsa-lib" ,alsa-lib)
                ("avahi" ,avahi)
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
@@@ -241,10 -241,10 +241,10 @@@ ENGINE_INC_PATH=~a/includ
       `(("python-pytest" ,python-pytest)
         ("python-pytest-forked" ,python-pytest-forked)))
      (inputs
-      `(("boost-python" ,boost-with-python3)
+      `(("boost" ,boost)
         ("libpepadapter" ,libpepadapter)
         ("pep-engine" ,pep-engine)
 -       ("python-setuptools-scm" ,python-setuptools-scm/next)
 +       ("python-setuptools-scm" ,python-setuptools-scm)
         ("util-linux" ,util-linux "lib"))) ;; uuid.h
      (home-page "https://pep.foundation/")
      (synopsis "Python adapter for p≡p (pretty Easy Privacy)")
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
@@@ -18503,12 -18655,34 +18649,22 @@@ current test, while only declaring the 
  several utilities, as well as an API for building localization tools.")
      (license license:gpl2+)))
  
+ ;; Required for virtaal, newer versions do not build with python2
  (define-public python2-translate-toolkit
-   (package-with-python2 python-translate-toolkit))
+   (package-with-python2
+     (package
+       (inherit python-translate-toolkit)
+       (version "2.1.0")
+       (source
+        (origin
+          (method url-fetch)
+          (uri (pypi-uri "translate-toolkit" version ".tar.bz2"))
+          (sha256
+           (base32 "1vlkwrg83vb17jc36pmwh2b7jphwf390lz0jw8hakcg16qhwypvq")))))))
  
  (define-public python-packaging
 -  (package
 +  (package/inherit python-packaging-bootstrap
      (name "python-packaging")
 -    (version "20.0")
 -    (source
 -      (origin
 -        (method url-fetch)
 -        (uri (pypi-uri "packaging" version))
 -        ;; XXX: The URL in the patch file is wrong, it should be
 -        ;; <https://github.com/pypa/packaging/pull/256>.
 -        (patches (search-patches "python-packaging-test-arch.patch"))
 -        (sha256
 -         (base32
 -          "1y2ip3a4ykkpgnwgn85j6hkspcl0cg3mzms97f40mk57vwqq67gy"))))
 -    (build-system python-build-system)
      (arguments
       `(#:phases (modify-phases %standard-phases
                    (replace 'check
Simple merge
@@@ -109,18 -123,23 +109,13 @@@ widely deployed SQL database engine in 
  is in the public domain.")
     (license license:public-domain)))
  
 -(define-public sqlite/fixed
 +(define-public sqlite-3.33
    (package
      (inherit sqlite)
 -    (version "3.32.3")
 +    (version "3.33.0")
      (source (origin
                (method url-fetch)
 -              (uri (let ((numeric-version
 -                          (match (string-split version #\.)
 -                            ((first-digit other-digits ...)
 -                             (string-append first-digit
 -                                            (string-pad-right
 -                                             (string-concatenate
 -                                              (map (cut string-pad <> 2 #\0)
 -                                                   other-digits))
 -                                             6 #\0))))))
 -                     (string-append "https://sqlite.org/2020/sqlite-autoconf-"
 -                                    numeric-version ".tar.gz")))
 +              (uri (sqlite-uri version 2020))
                (sha256
                 (base32
-                 "05dvdfaxd552gj5p7k0i72sfam7lykaw1g2pfn52jnppqx42qshh"))))))
- ;; Column metadata support was added to the regular 'sqlite' package with
- ;; commit fad5b1a6d8d9c36bea5785ae4fbc1beb37e644d7.
- (define-public sqlite-with-column-metadata
-   (deprecated-package "sqlite-with-column-metadata" sqlite))
+                 "0rlbaq177gcgk5dswd3akbhv2nvvzljrbhgy18hklbhw7h90f5d3"))))))
Simple merge
Simple merge
Simple merge
@@@ -4508,24 -4135,34 +4508,49 @@@ mode.  The functionality is provided b
  but non-expandable ones.")
      (license license:lppl1.3+)))
  
 -(define-public texlive-latex-filemod
 -  (deprecated-package "texlive-latex-filemod" texlive-filemod))
 +(define-deprecated-package texlive-latex-filemod texlive-filemod)
 +
 +(define-public texlive-latex-hanging
 +  (package
 +    (inherit (simple-texlive-package
 +              "texlive-latex-hanging"
 +              '("/tex/latex/hanging/")
 +              (base32
 +               "0s86yaxyfv9zxf4svwg9s13by9vrw38apfg0hsfchsimsdd6gsbb")
 +              #:trivial? #t))
 +    (home-page "https://www.ctan.org/pkg/hanging")
 +    (synopsis "Typeset hanging paragraphs")
 +    (description
 +     "The @code{hanging} package facilitates the typesetting of hanging
 +paragraphs.  The package also enables typesetting with hanging punctuation,
 +by making punctuation characters active.")
 +    (license license:lppl1.3c+)))
  
+ (define-public texlive-fira
+   (package
+     (inherit (simple-texlive-package
+               "texlive-fira"
+               (list "doc/fonts/fira/"
+                     "tex/latex/fira/"
+                     "fonts/vf/public/fira/"
+                     "fonts/type1/public/fira/"
+                     "fonts/tfm/public/fira/"
+                     "fonts/opentype/public/fira/"
+                     "fonts/map/dvips/fira/"
+                     "fonts/enc/dvips/fira/")
+               (base32 "0mxrwwf8i383vrs64lsyiwnai4cy305pkv1kgd4nrhmgi7pdc3ac")
+               #:trivial? #t))
+     (build-system texlive-build-system)
+     (home-page "https://ctan.org/fonts/fira")
+     (synopsis "Fira fonts with LaTeX support")
+     (description
+      "This package provides LaTeX, pdfLaTeX, XeLaTeX and LuaLaTeX support for
+ the Fira Sans family of fonts designed by Erik Spiekermann and Ralph du
+ Carrois of Carrois Type Design.  Fira Sans is available in eleven weights with
+ corresponding italics: light, regular, medium, bold, ...")
+     (license (list license:lppl
+                    license:silofl1.1))))
  (define-public texlive-latex-ifplatform
    (package
      (name "texlive-latex-ifplatform")
@@@ -351,40 -368,148 +351,37 @@@ required structures."
                ,@(alist-delete "guile"
                                (package-inputs gnutls))))))
  
- (define-public guile3.0-gnutls
-   (deprecated-package "guile3.0-gnutls" gnutls))
 +(define (target->openssl-target target)
 +  "Return the value to set CONFIGURE_TARGET_ARCH to when cross-compiling
 +OpenSSL for TARGET."
 +  ;; Keep this code outside the build code,
 +  ;; such that new targets can be added
 +  ;; without causing rebuilds for other targets.
 +  (cond ((string-prefix? "i586" target)
 +         "hurd-x86")
 +        ((string-prefix? "i686" target)
 +         "linux-x86")
 +        ((string-prefix? "x86_64" target)
 +         "linux-x86_64")
 +        ((string-prefix? "mips64el" target)
 +         "linux-mips64")
 +        ((string-prefix? "arm" target)
 +         "linux-armv4")
 +        ((string-prefix? "aarch64" target)
 +         "linux-aarch64")
 +        ((string-prefix? "powerpc64le" target)
 +         "linux-ppc64le")
 +        ((string-prefix? "powerpc64" target)
 +         "linux-ppc64")
 +        ((string-prefix? "powerpc" target)
 +         "linux-ppc")
 +        ((string-prefix? "riscv64" target)
 +         ;; linux64-riscv64 isn't recognized until 3.0.0.
 +         "linux-generic64")))
 +
  (define-public openssl
    (package
 -   (name "openssl")
 -   (version "1.1.1j")
 -   (replacement openssl-1.1.1l)
 -   (source (origin
 -             (method url-fetch)
 -             (uri (list (string-append "https://www.openssl.org/source/openssl-"
 -                                       version ".tar.gz")
 -                        (string-append "ftp://ftp.openssl.org/source/"
 -                                       "openssl-" version ".tar.gz")
 -                        (string-append "ftp://ftp.openssl.org/source/old/"
 -                                       (string-trim-right version char-set:letter)
 -                                       "/openssl-" version ".tar.gz")))
 -             (patches (search-patches "openssl-1.1-c-rehash-in.patch"))
 -             (sha256
 -              (base32
 -               "1gw17520vh13izy1xf5q0a2fqgcayymjjj5bk0dlkxndfnszrwma"))))
 -   (build-system gnu-build-system)
 -   (outputs '("out"
 -              "doc"         ;6.8 MiB of man3 pages and full HTML documentation
 -              "static"))    ;6.4 MiB of .a files
 -   (native-inputs `(("perl" ,perl)))
 -   (arguments
 -    `(#:parallel-tests? #f
 -      #:test-target "test"
 -
 -      ;; Changes to OpenSSL sometimes cause Perl to "sneak in" to the closure,
 -      ;; so we explicitly disallow it here.
 -      #:disallowed-references ,(list (canonical-package perl))
 -      #:phases
 -      (modify-phases %standard-phases
 -       ,@(if (%current-target-system)
 -           '((add-before
 -               'configure 'set-cross-compile
 -               (lambda* (#:key target outputs #:allow-other-keys)
 -                 (setenv "CROSS_COMPILE" (string-append target "-"))
 -                 (setenv "CONFIGURE_TARGET_ARCH"
 -                         (cond
 -                           ((string-prefix? "i586" target)
 -                            "hurd-x86")
 -                           ((string-prefix? "i686" target)
 -                            "linux-x86")
 -                           ((string-prefix? "x86_64" target)
 -                            "linux-x86_64")
 -                           ((string-prefix? "mips64el" target)
 -                            "linux-mips64")
 -                           ((string-prefix? "arm" target)
 -                            "linux-armv4")
 -                           ((string-prefix? "aarch64" target)
 -                            "linux-aarch64")
 -                           ((string-prefix? "powerpc64le" target)
 -                            "linux-ppc64le")
 -                           ((string-prefix? "powerpc64" target)
 -                            "linux-ppc64")
 -                           ((string-prefix? "powerpc" target)
 -                            "linux-ppc")))
 -                 #t)))
 -           '())
 -        (replace 'configure
 -          (lambda* (#:key outputs #:allow-other-keys)
 -            (let* ((out (assoc-ref outputs "out"))
 -                   (lib (string-append out "/lib")))
 -              ;; It's not a shebang so patch-source-shebangs misses it.
 -              (substitute* "config"
 -                (("/usr/bin/env")
 -                 (string-append (assoc-ref %build-inputs "coreutils")
 -                                "/bin/env")))
 -              (invoke ,@(if (%current-target-system)
 -                          '("./Configure")
 -                          '("./config"))
 -                      "shared"       ;build shared libraries
 -                      "--libdir=lib"
 -
 -                      ;; The default for this catch-all directory is
 -                      ;; PREFIX/ssl.  Change that to something more
 -                      ;; conventional.
 -                      (string-append "--openssldir=" out
 -                                     "/share/openssl-"
 -                                     ,(package-version this-package))
 -
 -                      (string-append "--prefix=" out)
 -                      (string-append "-Wl,-rpath," lib)
 -                      ,@(if (%current-target-system)
 -                          '((getenv "CONFIGURE_TARGET_ARCH"))
 -                          '())))))
 -        (add-after 'install 'move-static-libraries
 -          (lambda* (#:key outputs #:allow-other-keys)
 -            ;; Move static libraries to the "static" output.
 -            (let* ((out    (assoc-ref outputs "out"))
 -                   (lib    (string-append out "/lib"))
 -                   (static (assoc-ref outputs "static"))
 -                   (slib   (string-append static "/lib")))
 -              (for-each (lambda (file)
 -                          (install-file file slib)
 -                          (delete-file file))
 -                        (find-files lib "\\.a$"))
 -              #t)))
 -        (add-after 'install 'move-extra-documentation
 -          (lambda* (#:key outputs #:allow-other-keys)
 -               ;; Move man3 pages and full HTML documentation to "doc".
 -               (let* ((out    (assoc-ref outputs "out"))
 -                      (man3   (string-append out "/share/man/man3"))
 -                      (html (string-append out "/share/doc/openssl"))
 -                      (doc    (assoc-ref outputs "doc"))
 -                      (man-target (string-append doc "/share/man/man3"))
 -                      (html-target (string-append doc "/share/doc/openssl")))
 -                 (copy-recursively man3 man-target)
 -                 (delete-file-recursively man3)
 -                 (copy-recursively html html-target)
 -                 (delete-file-recursively html)
 -                 #t)))
 -        (add-after
 -         'install 'remove-miscellany
 -         (lambda* (#:key outputs #:allow-other-keys)
 -           ;; The 'misc' directory contains random undocumented shell and Perl
 -           ;; scripts.  Remove them to avoid retaining a reference on Perl.
 -           (let ((out (assoc-ref outputs "out")))
 -             (delete-file-recursively (string-append out "/share/openssl-"
 -                                                     ,(package-version this-package)
 -                                                     "/misc"))
 -             #t))))))
 -   (native-search-paths
 -    (list (search-path-specification
 -           (variable "SSL_CERT_DIR")
 -           (separator #f)                        ;single entry
 -           (files '("etc/ssl/certs")))
 -          (search-path-specification
 -           (variable "SSL_CERT_FILE")
 -           (file-type 'regular)
 -           (separator #f)                        ;single entry
 -           (files '("etc/ssl/certs/ca-certificates.crt")))))
 -   (synopsis "SSL/TLS implementation")
 -   (description
 -    "OpenSSL is an implementation of SSL/TLS.")
 -   (license license:openssl)
 -   (home-page "https://www.openssl.org/")))
 -
 -;; Replacement package to fix multiple CVEs.
 -(define openssl-1.1.1l
 -  (package
 -    (inherit openssl)
 +    (name "openssl")
      (version "1.1.1l")
      (source (origin
                (method url-fetch)
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
@@@ -1,6 -1,6 +1,7 @@@
  ;;; GNU Guix --- Functional package management for GNU
  ;;; Copyright © 2019 Nicolò Balzarotti <nicolo@nixo.xyz>
 +;;; Copyright © 2021 Ludovic Courtès <ludo@gnu.org>
+ ;;; Copyright © 2021 Jean-Baptiste Volatier <jbv@pm.me>
  ;;;
  ;;; This file is part of GNU Guix.
  ;;;
                                   (guix build utils))))
    "Build SOURCE using Julia, and with INPUTS."
    (define builder
 -    `(begin
 -       (use-modules ,@modules)
 -       (julia-build #:name ,name
 -                    #:source ,(match (assoc-ref inputs "source")
 -                                (((? derivation? source))
 -                                 (derivation->output-path source))
 -                                ((source)
 -                                 source)
 -                                (source
 -                                 source))
 -                    #:system ,system
 -                    #:tests? ,tests?
 -                    #:phases ,phases
 -                    #:outputs %outputs
 -                    #:search-paths ',(map search-path-specification->sexp
 -                                          search-paths)
 -                    #:inputs %build-inputs
 -                    #:julia-package-name ,julia-package-name
 -                    #:julia-package-uuid ,julia-package-uuid)))
 +    (with-imported-modules imported-modules
 +      #~(begin
 +          (use-modules #$@(sexp->gexp modules))
 +          (julia-build #:name #$name
 +                       #:source #+source
 +                       #:system #$system
 +                       #:tests? #$tests?
 +                       #:phases #$phases
 +                       #:outputs #$(outputs->gexp outputs)
 +                       #:search-paths '#$(sexp->gexp
 +                                          (map search-path-specification->sexp
 +                                               search-paths))
 +                       #:inputs #$(input-tuples->gexp inputs)
-                        #:julia-package-name #$julia-package-name))))
++                       #:julia-package-name #$julia-package-name
++                       #:julia-package-uuid #$julia-package-uuid))))
  
 -  (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))
 +  (mlet %store-monad ((guile (package->derivation (or guile (default-guile))
 +                                                  system #:graft? #f)))
 +    (gexp->derivation name builder
 +                      #:system system
 +                      #:guile-for-build guile)))
  
  (define julia-build-system
    (build-system
Simple merge
Simple merge
    #:use-module (ice-9 match)
    #:export (package->code))
  
- ;; FIXME: the quasiquoted arguments field may contain embedded package
- ;; objects, e.g. in #:disallowed-references; they will just be printed with
- ;; their usual #<package ...> representation, not as variable names.
 +(define (redundant-input-labels? inputs)
 +  "Return #t if input labels in the INPUTS list are redundant."
 +  (every (match-lambda
 +           ((label (? package? package) . _)
 +            (string=? label (package-name package)))
 +           (_ #f))
 +         inputs))
 +
  (define (package->code package)
    "Return an S-expression representing the source code that produces PACKAGE
  when evaluated."
           ;; FIXME: in order to be able to throw away the directory prefix,
           ;; we just assume that the patch files can be found with
           ;; "search-patches".
-          ,@(if (null? patches) '()
-                `((patches (search-patches ,@(map basename patches))))))))
+          ,@(cond ((null? patches)
+                   '())
+                  ((every string? patches)
+                   `((patches (search-patches ,@(map basename patches)))))
+                  (else
+                   `((patches (list ,@(map (match-lambda
+                                             ((? string? file)
+                                              `(search-patch ,file))
+                                             ((? origin? origin)
+                                              (source->code origin #f)))
+                                           patches)))))))))
+   (define (variable-reference module name)
+     ;; FIXME: using '@ certainly isn't pretty, but it avoids having to import
+     ;; the individual package modules.
+     (list '@ module name))
+   (define (object->code obj quoted?)
+     (match obj
+       ((? package? package)
+        (let* ((module (package-module-name package))
+               (name   (variable-name package module)))
+          (if quoted?
+              (list 'unquote (variable-reference module name))
+              (variable-reference module name))))
+       ((? origin? origin)
+        (let ((code (source->code origin #f)))
+          (if quoted?
+              (list 'unquote code)
+              code)))
+       ((lst ...)
+        (let ((lst (map (cut object->code <> #t) lst)))
+          (if quoted?
+              lst
+              (list 'quasiquote lst))))
+       (obj
+        obj)))
  
 -  (define (package-lists->code lsts)
 -    (list 'quasiquote (object->code lsts #t)))
 +  (define (inputs->code inputs)
 +    (if (redundant-input-labels? inputs)
 +        `(list ,@(map (match-lambda    ;no need for input labels ("new style")
 +                        ((_ package)
-                          (let ((module (package-module-name package)))
-                            `(@ ,module ,(variable-name package module))))
++                         (let* ((module (package-module-name package))
++                                (name   (variable-name package module)))
++                           (variable-reference module name)))
 +                        ((_ package output)
-                          (let ((module (package-module-name package)))
++                         (let* ((module (package-module-name package))
++                                (name   (variable-name package module)))
 +                           (list 'quasiquote
 +                                 (list
 +                                  (list 'unquote
-                                         `(@ ,module
-                                             ,(variable-name package module)))
++                                        (variable-reference module name))
 +                                  output)))))
 +                      inputs))
 +        (list 'quasiquote                  ;preserve input labels (deprecated)
-               (map (match-lambda
-                      ((label pkg . out)
-                       (let ((mod (package-module-name pkg)))
-                         (cons* label
-                                ;; FIXME: using '@ certainly isn't pretty, but it
-                                ;; avoids having to import the individual package
-                                ;; modules.
-                                (list 'unquote
-                                      (list '@ mod (variable-name pkg mod)))
-                                out))))
-                    inputs))))
++              (object->code inputs #t))))
  
    (let ((name                (package-name package))
          (version             (package-version package))
Simple merge
Simple merge
diff --cc guix/tests.scm
Simple merge
diff --cc tests/egg.scm
Simple merge
diff --cc tests/gexp.scm
Simple merge
diff --cc tests/print.scm
Simple merge
diff --cc tests/pypi.scm
Simple merge
diff --cc tests/store.scm
Simple merge