[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
01/03: Merge branch 'master' into core-updates-frozen
From: |
guix-commits |
Subject: |
01/03: Merge branch 'master' into core-updates-frozen |
Date: |
Tue, 7 Sep 2021 08:54:54 -0400 (EDT) |
civodul pushed a commit to branch core-updates-frozen
in repository guix.
commit d9dfbf886ddbb92dfdaa118bb9765e78aad5c53a
Merge: b949f34 49922ef
Author: Ludovic Courtès <ludo@gnu.org>
AuthorDate: Tue Sep 7 11:04:44 2021 +0200
Merge branch 'master' into core-updates-frozen
.guix-authorizations | 2 +-
.mailmap | 7 +-
Makefile.am | 7 +
doc/guix-cookbook.texi | 6 +-
doc/guix.texi | 329 +-
etc/completion/zsh/_guix | 410 +-
gnu/bootloader.scm | 37 +-
gnu/bootloader/grub.scm | 5 +-
gnu/build/image.scm | 2 +-
gnu/build/vm.scm | 2 +-
gnu/installer/parted.scm | 4 +-
gnu/local.mk | 15 +-
gnu/machine/digital-ocean.scm | 2 +-
gnu/packages/admin.scm | 287 +-
gnu/packages/algebra.scm | 4 +-
gnu/packages/android.scm | 3 +-
gnu/packages/assembly.scm | 2 +-
gnu/packages/audio.scm | 16 +-
gnu/packages/aux-files/linux-libre/5.10-i686.conf | 2 +-
.../aux-files/linux-libre/5.10-x86_64.conf | 2 +-
gnu/packages/aux-files/linux-libre/5.13-i686.conf | 2 +-
.../aux-files/linux-libre/5.13-x86_64.conf | 2 +-
gnu/packages/aux-files/linux-libre/5.4-i686.conf | 2 +-
gnu/packages/aux-files/linux-libre/5.4-x86_64.conf | 2 +-
gnu/packages/backup.scm | 2 +-
gnu/packages/benchmark.scm | 36 +-
gnu/packages/bioconductor.scm | 155 +-
gnu/packages/bioinformatics.scm | 430 +-
gnu/packages/bootloaders.scm | 29 +-
gnu/packages/calendar.scm | 4 +-
gnu/packages/ccache.scm | 13 +-
gnu/packages/check.scm | 125 +-
gnu/packages/chromium.scm | 8 +-
gnu/packages/ci.scm | 6 +-
gnu/packages/code.scm | 34 +-
gnu/packages/compression.scm | 36 +
gnu/packages/cpp.scm | 104 +-
gnu/packages/cran.scm | 1499 +-
gnu/packages/crates-io.scm | 583 +-
gnu/packages/crypto.scm | 57 -
gnu/packages/cups.scm | 14 +-
gnu/packages/curl.scm | 29 +
gnu/packages/databases.scm | 24 +-
gnu/packages/disk.scm | 8 +-
gnu/packages/django.scm | 16 +-
gnu/packages/dns.scm | 12 +-
gnu/packages/drones.scm | 199 -
gnu/packages/emacs-xyz.scm | 693 +-
gnu/packages/emulators.scm | 4 +-
gnu/packages/file-systems.scm | 12 +-
gnu/packages/finance.scm | 61 +-
gnu/packages/flashing-tools.scm | 16 +-
gnu/packages/fpga.scm | 7 +-
gnu/packages/freedesktop.scm | 36 +
gnu/packages/ftp.scm | 12 +-
gnu/packages/game-development.scm | 51 +
gnu/packages/games.scm | 252 +-
gnu/packages/geo.scm | 13 +-
gnu/packages/gl.scm | 7 +-
gnu/packages/gnome-xyz.scm | 16 +-
gnu/packages/gnome.scm | 36 +-
gnu/packages/gnupg.scm | 2 +-
gnu/packages/gnuzilla.scm | 23 +-
gnu/packages/golang.scm | 102 +-
gnu/packages/gpodder.scm | 4 +-
gnu/packages/guile-xyz.scm | 108 +-
gnu/packages/guile.scm | 2 +-
gnu/packages/hardware.scm | 46 +
gnu/packages/haskell-apps.scm | 4 +-
gnu/packages/haskell-xyz.scm | 2 +-
gnu/packages/image-viewers.scm | 4 +-
gnu/packages/image.scm | 37 +-
gnu/packages/javascript.scm | 4 +-
gnu/packages/jupyter.scm | 104 +
gnu/packages/kde-frameworks.scm | 10 +-
gnu/packages/linux.scm | 137 +-
gnu/packages/lisp-xyz.scm | 80 +-
gnu/packages/lisp.scm | 4 +-
gnu/packages/machine-learning.scm | 45 +-
gnu/packages/mail.scm | 129 +-
gnu/packages/man.scm | 4 +-
gnu/packages/maths.scm | 8 +-
gnu/packages/mc.scm | 8 +-
gnu/packages/messaging.scm | 164 +-
gnu/packages/minetest.scm | 626 +
gnu/packages/monitoring.scm | 33 +
gnu/packages/mp3.scm | 22 +-
gnu/packages/mpd.scm | 4 +-
gnu/packages/mtools.scm | 4 +-
gnu/packages/music.scm | 234 +-
gnu/packages/ncdu.scm | 6 +-
gnu/packages/networking.scm | 44 +-
gnu/packages/node.scm | 187 +-
gnu/packages/ntp.scm | 51 -
gnu/packages/ocaml.scm | 250 +-
gnu/packages/opencl.scm | 150 +-
gnu/packages/package-management.scm | 4 +-
gnu/packages/parallel.scm | 4 +-
gnu/packages/password-utils.scm | 2 +-
.../patches/adb-libssl_11-compatibility.patch | 35 +
gnu/packages/patches/beets-werkzeug-compat.patch | 18 -
.../patches/mailutils-variable-lookup.patch | 26 +
.../patches/minetest-add-MINETEST_MOD_PATH.patch | 156 +
.../ocaml-ppx-variants-ppxlib-api-change.patch | 42 +
.../patches/python-execnet-read-only-fix.patch | 77 +
.../patches/python-mediafile-wavpack.patch | 57 -
.../python-pyan3-fix-absolute-path-bug.patch | 160 +
.../python-pyan3-fix-positional-arguments.patch | 22 +
.../patches/python-pytest-asyncio-python-3.8.patch | 238 +
.../patches/u-boot-nintendo-nes-serial.patch | 14 +
gnu/packages/patchutils.scm | 4 +-
gnu/packages/perl.scm | 2 +-
gnu/packages/photo.scm | 5 +-
gnu/packages/python-check.scm | 65 +
gnu/packages/python-crypto.scm | 29 +-
gnu/packages/python-web.scm | 2 +-
gnu/packages/python-xyz.scm | 541 +-
gnu/packages/python.scm | 2 +-
gnu/packages/qt.scm | 56 +
gnu/packages/radio.scm | 75 +-
gnu/packages/re2c.scm | 8 +-
gnu/packages/rocm.scm | 2 +-
gnu/packages/rust-apps.scm | 5 +-
gnu/packages/shells.scm | 707 +-
gnu/packages/simulation.scm | 31 +-
gnu/packages/sphinx.scm | 2 +-
gnu/packages/ssh.scm | 20 +-
gnu/packages/statistics.scm | 28 +-
gnu/packages/syncthing.scm | 32 +-
gnu/packages/terminals.scm | 64 +-
gnu/packages/text-editors.scm | 21 +-
gnu/packages/tls.scm | 189 +-
gnu/packages/tor.scm | 8 +-
gnu/packages/version-control.scm | 87 +-
gnu/packages/video.scm | 4 +-
gnu/packages/virtualization.scm | 8 +-
gnu/packages/vnc.scm | 4 +-
gnu/packages/web-browsers.scm | 38 +-
gnu/packages/web.scm | 52 +-
gnu/packages/wine.scm | 24 +-
gnu/packages/xdisorg.scm | 42 +-
gnu/packages/xorg.scm | 57 +-
gnu/services.scm | 15 +-
gnu/services/base.scm | 53 +-
gnu/services/cuirass.scm | 19 +-
gnu/services/networking.scm | 2 +-
gnu/services/version-control.scm | 136 +-
gnu/services/virtualization.scm | 19 +-
gnu/services/xorg.scm | 8 +-
gnu/system.scm | 36 +-
gnu/system/examples/asus-c201.tmpl | 2 +-
gnu/system/examples/bare-bones.tmpl | 2 +-
gnu/system/examples/bare-hurd.tmpl | 2 +-
gnu/system/examples/beaglebone-black.tmpl | 2 +-
gnu/system/examples/desktop.tmpl | 2 +-
gnu/system/examples/docker-image.tmpl | 2 +-
gnu/system/examples/lightweight-desktop.tmpl | 2 +-
gnu/system/examples/vm-image.tmpl | 2 +-
gnu/system/examples/yggdrasil.tmpl | 2 +-
gnu/system/hurd.scm | 22 +-
gnu/system/images/hurd.scm | 2 +-
gnu/system/images/novena.scm | 2 +-
gnu/system/images/pine64.scm | 2 +-
gnu/system/images/pinebook-pro.scm | 4 +-
gnu/system/images/rock64.scm | 2 +-
gnu/system/install.scm | 10 +-
gnu/system/pam.scm | 21 +-
gnu/system/vm.scm | 4 +-
gnu/tests.scm | 2 +-
gnu/tests/ganeti.scm | 2 +-
gnu/tests/install.scm | 30 +-
gnu/tests/nfs.scm | 2 +-
gnu/tests/reconfigure.scm | 2 +-
gnu/tests/telephony.scm | 2 +-
gnu/tests/version-control.scm | 138 +-
guix/build-system/chicken.scm | 10 +-
guix/build-system/dune.scm | 3 +
guix/build-system/minetest.scm | 99 +
guix/build/dune-build-system.scm | 8 +-
guix/build/minetest-build-system.scm | 229 +
guix/ci.scm | 34 +-
guix/import/egg.scm | 5 +-
guix/import/go.scm | 50 +-
guix/import/minetest.scm | 456 +
guix/import/opam.scm | 142 +-
guix/import/utils.scm | 44 +-
guix/scripts/import.scm | 3 +-
guix/scripts/import/gem.scm | 3 +-
guix/scripts/import/go.scm | 6 +-
guix/scripts/import/{opam.scm => minetest.scm} | 74 +-
guix/scripts/import/opam.scm | 8 +-
guix/scripts/publish.scm | 21 +-
guix/scripts/system.scm | 20 +-
guix/scripts/system/reconfigure.scm | 22 +-
guix/scripts/weather.scm | 22 +-
guix/swh.scm | 43 +-
po/doc/guix-cookbook.de.po | 53 +-
po/doc/guix-cookbook.fa.po | 6 +-
po/doc/guix-cookbook.fr.po | 14 +-
po/doc/guix-cookbook.ko.po | 6 +-
po/doc/guix-cookbook.ru.po | 6 +-
po/doc/guix-cookbook.sk.po | 10 +-
po/doc/guix-cookbook.zh_Hans.po | 6 +-
po/doc/guix-manual.de.po | 23079 ++++++++++---------
po/doc/guix-manual.es.po | 22655 +++++++++---------
po/doc/guix-manual.fa.po | 22508 +++++++++---------
po/doc/guix-manual.fr.po | 22631 +++++++++---------
po/doc/guix-manual.it.po | 22533 +++++++++---------
po/doc/guix-manual.ko.po | 22529 +++++++++---------
po/doc/guix-manual.pt_BR.po | 22537 +++++++++---------
po/doc/guix-manual.ru.po | 22593 +++++++++---------
po/doc/guix-manual.sk.po | 22527 +++++++++---------
po/doc/guix-manual.zh_CN.po | 22550 +++++++++---------
po/guix/POTFILES.in | 1 +
po/guix/cs.po | 761 +-
po/guix/da.po | 782 +-
po/guix/de.po | 941 +-
po/guix/eo.po | 1073 +-
po/guix/es.po | 790 +-
po/guix/fr.po | 784 +-
po/guix/hu.po | 764 +-
po/guix/it.po | 750 +-
po/guix/ko.po | 747 +-
po/guix/nl.po | 786 +-
po/guix/oc.po | 744 +-
po/guix/pl.po | 754 +-
po/guix/pt_BR.po | 801 +-
po/guix/ru.po | 750 +-
po/guix/si.po | 743 +-
po/guix/sk.po | 791 +-
po/guix/sr.po | 764 +-
po/guix/sv.po | 769 +-
po/guix/ta.po | 786 +-
po/guix/vi.po | 764 +-
po/guix/zh_CN.po | 779 +-
po/packages/LINGUAS | 1 +
po/packages/da.po | 2880 +--
po/packages/de.po | 2899 +--
po/packages/eo.po | 2892 +--
po/packages/es.po | 2898 +--
po/packages/fr.po | 2901 +--
po/packages/hu.po | 2880 +--
po/packages/{nl.po => it.po} | 2937 +--
po/packages/ko.po | 2880 +--
po/packages/nl.po | 2923 +--
po/packages/oc.po | 2880 +--
po/packages/pl.po | 2880 +--
po/packages/pt_BR.po | 2880 +--
po/packages/sk.po | 2880 +--
po/packages/sr.po | 2880 +--
po/packages/zh_CN.po | 2925 +--
tests/boot-parameters.scm | 2 +-
tests/go.scm | 2 +-
tests/guix-system.sh | 6 +-
tests/import-utils.scm | 28 +
tests/minetest.scm | 355 +
tests/opam.scm | 58 +-
tests/system.scm | 4 +-
258 files changed, 158033 insertions(+), 142062 deletions(-)
diff --cc gnu/local.mk
index eab4077,2a56c4a..7e5d648
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@@ -880,9 -879,10 +883,8 @@@ dist_patch_DATA =
%D%/packages/patches/bsd-games-prevent-name-collisions.patch \
%D%/packages/patches/bsd-games-stdio.h.patch \
%D%/packages/patches/beancount-disable-googleapis-fonts.patch \
- %D%/packages/patches/beets-werkzeug-compat.patch \
%D%/packages/patches/behave-skip-a-couple-of-tests.patch \
%D%/packages/patches/beignet-correct-file-names.patch \
- %D%/packages/patches/biber-fix-encoding-write.patch \
- %D%/packages/patches/biber-sortinithash.patch \
%D%/packages/patches/bidiv-update-fribidi.patch \
%D%/packages/patches/binutils-boot-2.20.1a.patch \
%D%/packages/patches/binutils-loongson-workaround.patch \
@@@ -1431,11 -1450,12 +1434,12 @@@
%D%/packages/patches/libmemcached-build-with-gcc7.patch \
%D%/packages/patches/libmhash-hmac-fix-uaf.patch \
%D%/packages/patches/mercurial-hg-extension-path.patch \
+ %D%/packages/patches/mesa-opencl-all-targets.patch \
%D%/packages/patches/mesa-skip-tests.patch \
%D%/packages/patches/mescc-tools-boot.patch \
- %D%/packages/patches/meson-for-build-rpath.patch \
%D%/packages/patches/metabat-fix-compilation.patch \
%D%/packages/patches/mhash-keygen-test-segfault.patch \
+ %D%/packages/patches/minetest-add-MINETEST_MOD_PATH.patch \
%D%/packages/patches/mingw-w64-6.0.0-gcc.patch \
%D%/packages/patches/mingw-w64-dlltool-temp-prefix.patch \
%D%/packages/patches/mingw-w64-reproducible-gendef.patch \
@@@ -1502,8 -1522,7 +1506,9 @@@
%D%/packages/patches/ocaml-dose3-Fix-for-ocaml-4.06.patch \
%D%/packages/patches/ocaml-dose3-dont-make-printconf.patch \
%D%/packages/patches/ocaml-dose3-Install-mli-cmx-etc.patch \
+ %D%/packages/patches/ocaml-multiple-definitions.patch \
+ %D%/packages/patches/ocaml-4.09-multiple-definitions.patch \
+ %D%/packages/patches/ocaml-ppx-variants-ppxlib-api-change.patch \
%D%/packages/patches/omake-fix-non-determinism.patch \
%D%/packages/patches/oneko-remove-nonfree-characters.patch \
%D%/packages/patches/onnx-optimizer-system-library.patch \
@@@ -1618,8 -1638,7 +1623,9 @@@
%D%/packages/patches/python-cross-compile.patch \
%D%/packages/patches/python2-larch-coverage-4.0a6-compatibility.patch \
%D%/packages/patches/python-configobj-setuptools.patch \
+ %D%/packages/patches/python-docopt-pytest6-compat.patch \
+ %D%/packages/patches/python-execnet-read-only-fix.patch \
+ %D%/packages/patches/python-fixtures-remove-monkeypatch-test.patch \
%D%/packages/patches/python-flask-restful-werkzeug-compat.patch \
%D%/packages/patches/python-keras-integration-test.patch \
%D%/packages/patches/python-pep8-stdlib-tokenize-compat.patch \
@@@ -1627,10 -1646,9 +1633,9 @@@
%D%/packages/patches/python-flint-includes.patch \
%D%/packages/patches/python-libxml2-utf8.patch \
%D%/packages/patches/python-matplotlib-run-under-wayland-gtk3.patch \
- %D%/packages/patches/python-mediafile-wavpack.patch \
%D%/packages/patches/python-memcached-syntax-warnings.patch \
%D%/packages/patches/python-mox3-python3.6-compat.patch \
- %D%/packages/patches/python-testtools.patch \
+ %D%/packages/patches/python-typing-inspect-fix.patch \
%D%/packages/patches/python-packaging-test-arch.patch \
%D%/packages/patches/python2-parameterized-docstring-test.patch \
%D%/packages/patches/python-paste-remove-timing-test.patch \
diff --cc gnu/packages/assembly.scm
index 177ea0b,c857693..2167eb2
--- a/gnu/packages/assembly.scm
+++ b/gnu/packages/assembly.scm
@@@ -7,9 -7,8 +7,9 @@@
;;; Copyright © 2019 Guy Fleury Iteriteka <hoonandon@gmail.com>
;;; Copyright © 2019 Andy Tai <atai@atai.org>
;;; Copyright © 2020 Jakub Kądziołka <kuba@kadziolka.net>
- ;;; Copyright © 2020 Christopher Lemmer Webber <cwebber@dustycloud.org>
+ ;;; Copyright © 2020 Christine Lemmer-Webber <cwebber@dustycloud.org>
;;; Copyright © 2020 B. Wilson <elaexuotee@wilsonb.com>
+;;; Copyright © 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
diff --cc gnu/packages/backup.scm
index de85c36,74e3f2c..e5237b3
--- a/gnu/packages/backup.scm
+++ b/gnu/packages/backup.scm
@@@ -6,8 -6,8 +6,8 @@@
;;; Copyright © 2017 Thomas Danckaert <post@thomasdanckaert.be>
;;; Copyright © 2017 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 Christopher Allan Webber <cwebber@dustycloud.org>
+ ;;; Copyright © 2017 Christine Lemmer-Webber <cwebber@dustycloud.org>
;;; Copyright © 2017 Rutger Helling <rhelling@mykolab.com>
;;; Copyright © 2018 Mark H Weaver <mhw@netris.org>
;;; Copyright © 2018 Oleg Pykhalov <go.wigust@gmail.com>
diff --cc gnu/packages/check.scm
index 7054db5,b49f9de..7b08f55
--- a/gnu/packages/check.scm
+++ b/gnu/packages/check.scm
@@@ -1022,6 -1000,45 +1023,8 @@@ and many external plugins."
(license license:expat)
(properties `((python2-variant . ,(delay python2-pytest))))))
-(define-public python-pytest-6
- (package
- (inherit (strip-python2-variant python-pytest))
- (version "6.2.4")
- (source
- (origin
- (method url-fetch)
- (uri (pypi-uri "pytest" version))
- (sha256
- (base32
- "0jy5f83la1864ss42dhsi1mcm5nl79d8bjg7wk474nlw1c5avg2h"))))
- (arguments
- `(#:phases
- (modify-phases %standard-phases
- (replace 'check
- (lambda* (#:key (tests? #t) #:allow-other-keys)
- (setenv "TERM" "dumb") ;attempt disabling markup tests
- (if tests?
- (invoke "pytest" "-vv" "-k"
- (string-append
- ;; This test involves the /usr directory, and fails.
- " not test_argcomplete"
- ;; These test do not honor the isatty detection and
- ;; fail.
- " and not test_code_highlight"
- " and not test_color_yes"))
- (format #t "test suite not run~%")))))))
- (propagated-inputs
- (append (alist-delete "python-py"
- (package-propagated-inputs python-pytest))
- `(("python-iniconfig" ,python-iniconfig)
- ("python-py" ,python-py-next))))
- (native-inputs
- (append (fold alist-delete (package-native-inputs python-pytest)
- '("python-mock"
- "python-pytest"))
- `(("python-pytest" ,python-pytest-6-bootstrap)
- ("python-toml" ,python-toml))))))
++(define-public python-pytest-6 python-pytest)
+
;; Pytest 4.x are the last versions that support Python 2.
(define-public python2-pytest
(package
@@@ -1279,29 -1319,17 +1296,31 @@@ same arguments."
(uri (pypi-uri "pytest-xdist" version))
(sha256
(base32
- "1vh4ps32lp5ignch5adbl3pgchvigdfmrl6qpmhxih54wa1qw3il"))))
+ "0wh6pn66nncfs6ay0n863bgyriwsgppn8flx5l7551j1lbqkinc2"))
+ (modules '((guix build utils)))
+ (snippet
+ '(begin
+ ;; Remove pre-compiled .pyc files from source.
+ (for-each delete-file-recursively
+ (find-files "." "__pycache__" #:directories? #t))
+ (for-each delete-file (find-files "." "\\.pyc$"))
+ #t))))
(build-system python-build-system)
(arguments
- `(#:phases
+ '(#:tests? #f ; Lots of tests fail.
+ #:phases
(modify-phases %standard-phases
+ (add-after 'unpack 'patch-setup-py
+ (lambda _
+ ;; Relax pytest requirement.
+ (substitute* "setup.py"
+ (("pytest>=6\\.0\\.0") "pytest"))))
(replace 'check
- (lambda* (#:key tests? #:allow-other-keys)
- (when tests?
- (invoke "py.test" "-v")))))))
+ (lambda* (#:key inputs outputs tests? #:allow-other-keys)
+ (when tests?
+ (add-installed-pythonpath inputs outputs)
+ (invoke "pytest" "-vv"
+ "-n" (number->string (parallel-job-count)))))))))
(native-inputs
`(("python-setuptools-scm" ,python-setuptools-scm)))
(propagated-inputs
@@@ -1691,14 -1754,29 +1747,17 @@@ executed."
(define-public python-pytest-asyncio
(package
(name "python-pytest-asyncio")
- ;; Version 0.10.0 is the last version which is compatible with Pytest <=
- ;; 5.4.0.
- (version "0.10.0")
+ (version "0.15.1")
(source
(origin
- (method url-fetch)
- (uri (pypi-uri "pytest-asyncio" version))
+ (method git-fetch) ;for tests
+ (uri (git-reference
+ (url "https://github.com/pytest-dev/pytest-asyncio")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
(sha256
- (base32 "0vrzsrg3j1cfd57m0b3r5xf87rslgcs42jya346mdg9bc6wwwr15"))))
- (base32
- "1m63b7nbph5z20mn8jgh6j9ac873i1k4in29x44vrkw3qwfwg13y"))
- (patches (search-patches "python-pytest-asyncio-python-3.8.patch"))))
++ (base32 "03drs4myv1ik79148xyhli37q6mp931jb14cz65n8qvls2zvvwgx"))))
(build-system python-build-system)
- (arguments
- `(#:phases
- (modify-phases %standard-phases
- (replace 'check
- (lambda* (#:key inputs outputs tests? #:allow-other-keys)
- (when tests?
- (add-installed-pythonpath inputs outputs)
- (invoke "pytest" "-vv")))))))
(native-inputs
`(("python-coverage" ,python-coverage)
("python-async-generator" ,python-async-generator)
@@@ -1897,11 -1975,12 +1956,11 @@@ framework which enables you to test ser
(base32
"0rm2rchrr63imn44xk5slwydxf8gvy579524qcxq7dc42pnk17zx"))))
(build-system python-build-system)
+ (native-inputs
+ `(("python-setuptools-scm" ,python-setuptools-scm)))
(propagated-inputs
`(("python-pytest" ,python-pytest)
- ("python-pytest-cache" ,python-pytest-cache)
("python-psutil" ,python-psutil)))
- (native-inputs
- `(("python-setuptools-scm" ,python-setuptools-scm)))
(synopsis "Pytest plugin to manage external processes across test runs")
(description "Pytest-xprocess is an experimental py.test plugin for
managing
processes across test runs.")
diff --cc gnu/packages/cpp.scm
index af10d11,f4708ed..45a02b5
--- a/gnu/packages/cpp.scm
+++ b/gnu/packages/cpp.scm
@@@ -18,8 -18,7 +18,8 @@@
;;; Copyright © 2020 Brett Gilio <brettg@gnu.org>
;;; Copyright © 2020 Milkey Mouse <milkeymouse@meme.institute>
;;; Copyright © 2021 Raghav Gururajan <rg@raghavgururajan.name>
+;;; Copyright © 2021 Felix Gruber <felgru@posteo.net>
-
+ ;;; Copyright © 2021 Nicolò Balzarotti <nicolo@nixo.xyz>
;;;
;;; This file is part of GNU Guix.
;;;
diff --cc gnu/packages/curl.scm
index 39344b1,c61a562..063a919
--- a/gnu/packages/curl.scm
+++ b/gnu/packages/curl.scm
@@@ -11,8 -11,8 +11,9 @@@
;;; Copyright © 2019, 2021 Ricardo Wurmus <rekado@elephly.net>
;;; Copyright © 2020 Jakub Kądziołka <kuba@kadziolka.net>
;;; Copyright © 2020 Dale Mellor <guix-devel-0brg6b@rdmp.org>
+;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
;;; Copyright © 2021 Jean-Baptiste Volatier <jbv@pm.me>
+ ;;; Copyright © 2021 Felix Gruber <felgru@posteo.net>
;;;
;;; This file is part of GNU Guix.
;;;
diff --cc gnu/packages/django.scm
index 3c4ea5e,dd48e05..aa1fbdd
--- a/gnu/packages/django.scm
+++ b/gnu/packages/django.scm
@@@ -336,12 -355,11 +339,11 @@@ size and quality."
(native-inputs
`(("python-django" ,python-django)
("python-setuptools-scm" ,python-setuptools-scm)
-
;; For tests.
- ("python-pytest-xdist" ,python-pytest-xdist)))
+ ("python-pytest-xdist" ,python-pytest-xdist-next)))
(propagated-inputs
- `(("python-pytest" ,python-pytest-6)))
- (home-page "https://pytest-django.readthedocs.io/")
+ `(("python-pytest" ,python-pytest)))
+ (home-page "https://pytest-django.readthedocs.org/")
(synopsis "Django plugin for py.test")
(description "Pytest-django is a plugin for py.test that provides a set of
useful tools for testing Django applications and projects.")
diff --cc gnu/packages/finance.scm
index c351948,4aaab58..768cace
--- a/gnu/packages/finance.scm
+++ b/gnu/packages/finance.scm
@@@ -658,14 -660,9 +661,14 @@@ other machines/servers. Electroncash d
delete-file-recursively
'("external/miniupnp" "external/rapidjson"
"external/unbound"))
+ ;; TODO: Remove the following when upgrading to a newer tagged
+ ;; version as it will already contain the fix for Boost 1.76.
+ (substitute* "contrib/epee/include/storages/portable_storage.h"
+ (("#include \"int-util.h\"" all)
+ (string-append all "\n#include <boost/mpl/contains.hpp>")))
#t))
(sha256
- (base32 "0jwlmrpzisvw1c06cvd5b3s3hd4w0pa1qmrypfwah67qj3x6hnb6"))))
+ (base32 "0nax991fshfh51grhh2ryfrwwws35k16gzl1l3niva28zff2xmq6"))))
(build-system cmake-build-system)
(native-inputs
`(("doxygen" ,doxygen)
diff --cc gnu/packages/freedesktop.scm
index f797269,086707d..85d9697
--- a/gnu/packages/freedesktop.scm
+++ b/gnu/packages/freedesktop.scm
@@@ -24,7 -24,7 +24,8 @@@
;;; Copyright © 2020 Raghav Gururajan <raghavgururajan@disroot.org>
;;; Copyright © 2021 Brendan Tildesley <mail@brendan.scot>
;;; Copyright © 2021 pineapples <guixuser6392@protonmail.com>
+;;; Copyright © 2021 Sarah Morgensen <iskarian@mgsn.dev>
+ ;;; Copyright © 2021 Robby Zambito <contact@robbyzambito.me>
;;;
;;; This file is part of GNU Guix.
;;;
diff --cc gnu/packages/node.scm
index 6285138,f8ac958..d5a5be2
--- a/gnu/packages/node.scm
+++ b/gnu/packages/node.scm
@@@ -169,9 -211,15 +211,14 @@@
(format #t "configure flags: ~s~%" flags)
;; Node's configure script expects the CC environment variable
to
;; be set.
- (setenv "CC" (search-input-file inputs "/bin/gcc"))
+ (setenv "CC_host" "gcc")
+ (setenv "CXX_host" "g++")
+ (setenv "CC" ,(cc-for-target))
+ (setenv "CXX" ,(cxx-for-target))
+ (setenv "PKG_CONFIG" ,(pkg-config-for-target))
(apply invoke
- (search-input-file inputs "/bin/python")
- (string-append (assoc-ref (or native-inputs inputs)
- "python")
- "/bin/python")
++ (search-input-file (or native-inputs inputs)
++ "/bin/python")
"configure" flags))))
(add-after 'patch-shebangs 'patch-npm-shebang
(lambda* (#:key outputs #:allow-other-keys)
@@@ -547,8 -606,10 +602,9 @@@ parser definition into a C output."
#:phases
(modify-phases %standard-phases
(replace 'configure
- (lambda* (#:key native-inputs inputs #:allow-other-keys)
- (let ((esbuild (string-append
- (assoc-ref (or native-inputs inputs) "esbuild")
- "/bin/esbuild")))
+ (lambda* (#:key inputs #:allow-other-keys)
- (let ((esbuild (search-input-file inputs "/bin/esbuild")))
++ (let ((esbuild (search-input-file (or native-inputs inputs)
++ "/bin/esbuild")))
(invoke esbuild
"--platform=node"
"--outfile=bin/generate.js"
@@@ -632,9 -741,15 +736,14 @@@ source files."
(format #t "configure flags: ~s~%" flags)
;; Node's configure script expects the CC environment
variable to
;; be set.
+ (setenv "CC_host" "gcc")
+ (setenv "CXX_host" "g++")
(setenv "CC" ,(cc-for-target))
+ (setenv "CXX" ,(cxx-for-target))
+ (setenv "PKG_CONFIG" ,(pkg-config-for-target))
(apply invoke
- (search-input-file inputs "/bin/python3")
- (string-append (assoc-ref (or native-inputs inputs)
- "python")
- "/bin/python3")
++ (search-input-file (or native-inputs inputs)
++ "/bin/python3")
"configure" flags))))
(replace 'patch-files
(lambda* (#:key inputs #:allow-other-keys)
diff --cc gnu/packages/ocaml.scm
index 9a36185,db1d973..ccbc6dd
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@@ -786,77 -785,99 +787,99 @@@ the opam file format."
(file-name (git-file-name name version))
(sha256
(base32
- "1z0ls6xxa4ws5xw0am5gxmh5apnmyhgkcphrncp53w34j8sfydsj"))))
- (build-system ocaml-build-system)
+ "12l7l4pbzy71k1yc7ym5aczajszvc9bqkdnfg8xhqc8ch8j1h1lj"))))
+ (build-system dune-build-system)
(arguments
- `(#:configure-flags
- (list (string-append "SHELL="
- (assoc-ref %build-inputs "bash")
- "/bin/sh"))
-
- ;; For some reason, 'ocp-build' needs $TERM to be set.
- #:make-flags
- (list "TERM=screen"
- (string-append "SHELL="
- (assoc-ref %build-inputs "bash")
- "/bin/sh"))
-
- #:test-target "tests"
-
- #:phases (modify-phases %standard-phases
- (add-before 'build 'pre-build
- (lambda* (#:key inputs make-flags #:allow-other-keys)
- (let ((bash (assoc-ref inputs "bash"))
- (bwrap (search-input-file inputs "/bin/bwrap")))
- (substitute* "src/core/opamSystem.ml"
- (("\"/bin/sh\"")
- (string-append "\"" bash "/bin/sh\""))
- (("getconf")
- (which "getconf")))
- ;; Use bwrap from the store directly.
- (substitute* "src/state/shellscripts/bwrap.sh"
- (("-v bwrap") (string-append "-v " bwrap))
- (("exec bwrap") (string-append "exec " bwrap))
- ;; Mount /gnu and /run/current-system in the
- ;; isolated environment when building with opam.
- ;; This is necessary for packages to find external
- ;; dependencies, such as a C compiler, make, etc...
- (("^add_sys_mounts /usr")
- "add_sys_mounts /gnu /run/current-system /usr"))
- (substitute* "src/client/opamInitDefaults.ml"
- (("\"bwrap\"") (string-append "\"" bwrap "\"")))
- ;; Generating the documentation needs write access
- (for-each
- (lambda (f) (chmod f #o644))
- (find-files "doc" "."))
- #t)))
- (add-before 'check 'pre-check
- (lambda _
- ;; The "repo" test attempts to open some of these files
O_WRONLY
- ;; and fails with a bogus "OpamSystem.File_not_found"
otherwise.
- (for-each
- (lambda (f) (chmod f #o644))
- (find-files "tests/packages" "\\.opam$"))
-
- (substitute* "tests/Makefile"
- (("/usr/bin/printf")
- (which "printf"))
- ;; By default tests run twice: once with a "local"
repository
- ;; and once with a git repository: disable the git
tests to
- ;; avoid the dependency.
- (("all: local git")
- "all: local"))
- #t)))))
+ `(#:test-target "."
+ #:phases
+ (modify-phases %standard-phases
+ (add-before 'build 'pre-build
+ (lambda* (#:key inputs make-flags #:allow-other-keys)
+ (let ((bash (assoc-ref inputs "bash"))
- (bwrap (string-append (assoc-ref inputs "bubblewrap")
- "/bin/bwrap")))
++ (bwrap (search-input-file inputs "/bin/bwrap")))
+ (substitute* "src/core/opamSystem.ml"
+ (("\"/bin/sh\"")
+ (string-append "\"" bash "/bin/sh\""))
+ (("getconf")
+ (which "getconf")))
+ ;; Use bwrap from the store directly.
+ (substitute* "src/state/shellscripts/bwrap.sh"
+ (("-v bwrap") (string-append "-v " bwrap))
+ (("exec bwrap") (string-append "exec " bwrap))
+ ;; Mount /gnu and /run/current-system in the
+ ;; isolated environment when building with opam.
+ ;; This is necessary for packages to find external
+ ;; dependencies, such as a C compiler, make, etc...
+ (("^add_sys_mounts /usr")
+ (string-append "add_sys_mounts "
+ (%store-directory)
+ " /run/current-system /usr")))
+ (substitute* "src/client/opamInitDefaults.ml"
+ (("\"bwrap\"") (string-append "\"" bwrap "\""))))))
+ (add-before 'check 'prepare-checks
+ (lambda* (#:key inputs #:allow-other-keys)
+ ;; Opam tests need to run an isolated environment from a writable
+ ;; home directory.
+ (mkdir-p "test-home")
+ (setenv "HOME" (string-append (getcwd) "/test-home"))
+
+ ;; Opam tests require data from opam-repository. Instead of
+ ;; downloading them with wget from the guix environment, copy the
+ ;; content to the expected directory.
+ (substitute* "tests/reftests/dune.inc"
+ (("tar -C.*opam-archive-([0-9a-f]*)[^)]*" _ commit)
+ (string-append "rmdir %{targets}) (run cp -r "
+ (assoc-ref inputs (string-append "opam-repo-"
commit))
+ "/ %{targets}) (run chmod +w -R %{targets}"))
+ (("wget[^)]*") "touch %{targets}")
+ ;; Disable a failing test because of different line wrapping
+ (("diff cli-versioning.test cli-versioning.out") "run true")
+ ;; Disable a failing test because it tries to clone a git
+ ;; repository from inside bwrap
+ (("diff upgrade-format.test upgrade-format.out") "run true"))
+ (substitute* "tests/reftests/dune"
+ ;; Because of our changes to the previous file, we cannot check
+ ;; it can be regenerated
+ (("diff dune.inc dune.inc.gen") "run true"))
+ ;; Ensure we can run the generated build.sh (no /bin/sh)
+ (substitute* '("tests/reftests/legacy-local.test"
+ "tests/reftests/legacy-git.test")
- (("#! ?/bin/sh") (string-append "#!" (assoc-ref inputs "bash")
- "/bin/sh")))
++ (("#! ?/bin/sh")
++ (string-append "#!"
++ (search-input-file inputs "/bin/sh"))))
+ (substitute* "tests/reftests/testing-env"
+ (("OPAMSTRICT=1")
+ (string-append "OPAMSTRICT=1\nLIBRARY_PATH="
+ (assoc-ref inputs "libc") "/lib"))))))))
(native-inputs
- `(("dune" ,dune)
- ("ocaml-cppo" ,ocaml-cppo)
-
- ;; For tests.
- ("openssl" ,openssl)
- ("python" ,python-wrapper)
- ("rsync" ,rsync)
- ("unzip" ,unzip)
- ("which" ,which)))
+ (let ((opam-repo (lambda (commit hash)
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url
"https://github.com/ocaml/opam-repository")
+ (commit commit)))
+ (file-name (git-file-name "opam-repo" commit))
+ (sha256 (base32 hash))))))
+ `(("dune" ,dune)
+ ("ocaml-cppo" ,ocaml-cppo)
+
+ ;; For tests.
+ ("git" ,git-minimal)
+ ("openssl" ,openssl)
+ ("python" ,python-wrapper)
+ ("rsync" ,rsync)
+ ("unzip" ,unzip)
+ ("which" ,which)
+
+ ;; Data for tests
+ ("opam-repo-009e00fa" ,(opam-repo
"009e00fa86300d11c311309a2544e5c6c3eb8de2"
+
"1wwy0rwrsjf4q10j1rh1dazk32fbzhzy6f7zl6qmndidx9b1bq7w"))
+ ("opam-repo-ad4dd344" ,(opam-repo
"ad4dd344fe5cd1cab49ced49d6758a9844549fb4"
+
"1a1qj47kj8xjdnc4zc50ijrix1kym1n7k20n3viki80a7518baw8"))
+ ("opam-repo-c1d23f0e" ,(opam-repo
"c1d23f0e17ec83a036ebfbad1c78311b898a2ca0"
+
"0j9abisx3ifzm66ci3p45mngmz4f0fx7yd9jjxrz3f8w5jffc9ii"))
+ ("opam-repo-f372039d" ,(opam-repo
"f372039db86a970ef3e662adbfe0d4f5cd980701"
+
"0ld7fcry6ss6fmrpswvr6bikgx299w97h0gwrjjh7kd7rydsjdws")))))
(inputs
`(("ocaml" ,ocaml)
("ncurses" ,ncurses)
diff --cc gnu/packages/python-xyz.scm
index 9801a3c,7c70829..f888821
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@@ -11960,19 -12195,23 +12135,28 @@@ pure Python module that works on virtua
(define-public python-execnet
(package
(name "python-execnet")
- (version "1.4.1")
+ (version "1.9.0")
(source (origin
- (method url-fetch)
- (uri (pypi-uri "execnet" version))
- (sha256
- (base32
- "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
+ (method url-fetch)
+ (uri (pypi-uri "execnet" version))
+ (sha256
+ (base32
+ "1ia7dvrh0gvzzpi758mx55f9flr16bzdqlmi12swm4ncm4xlyscg"))
+ (patches (search-patches
"python-execnet-read-only-fix.patch"))))
(build-system python-build-system)
(arguments
- `(;; 2 failed, 275 passed, 670 skipped, 4 xfailed
- ;; The two test failures are caused by the lack of an `ssh` executable.
- ;; The test suite can be run with pytest after the 'install' phase.
- #:tests? #f))
+ `(#:phases
+ (modify-phases %standard-phases
+ (replace 'check
+ (lambda* (#:key inputs outputs tests? #:allow-other-keys)
+ (when tests?
++ ;; Unset PYTHONDONTWRITEBYTECODE to match the
++ ;; expectations of a test in
++ ;; 'testing/test_gateway.py'.
++ (unsetenv "PYTHONDONTWRITEBYTECODE")
++
+ (add-installed-pythonpath inputs outputs)
+ (invoke "pytest" "-vv")))))))
(native-inputs
`(("python-pytest" ,python-pytest)
("python-setuptools-scm" ,python-setuptools-scm)))
@@@ -26145,51 -26479,80 +26396,129 @@@ application binary interfaces (ABIs); i
supports x86_64 instructions up to AVX-512 and SHA.")
(license license:bsd-2))))
+(define-public python-sgmllib3k
+ (let ((commit "799964676f35349ca2dd04503e34c2b3ad522c0d")
+ (revision "1"))
+ (package
+ (name "python-sgmllib3k")
+ (version
+ (git-version "1.0.0" revision commit))
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/hsoft/sgmllib")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0bzf6pv85dzfxfysm6zbj8m40hp0xzr9h8qlk4hp3nmy88rznqvr"))))
+ (build-system python-build-system)
+ (home-page "https://github.com/hsoft/sgmllib")
+ (synopsis "Python 3 port of sgmllib")
+ (description "This package is a port of sgmllib that is no longer part
+of Python 3.")
+ (license license:bsd-3))))
+
+(define-public python-cwcwidth
+ (package
+ (name "python-cwcwidth")
+ (version "0.1.4")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "cwcwidth" version))
+ (sha256
+ (base32
+ "1azrphpkcyggg38xvkfb9dpc4xmmm90p02kf8dkqd4d6j5w96aj8"))))
+ (build-system python-build-system)
+ (native-inputs
+ `(("python-cython" ,python-cython)
+ ("python-pytest" ,python-pytest)
+ ("python-setuptools-scm" ,python-setuptools-scm)
+ ("python-toml" ,python-toml)
+ ("python-wheel" ,python-wheel)))
+ (home-page
+ "https://github.com/sebastinas/cwcwidth")
+ (synopsis "Python bindings for wc(s)width")
+ (description "This package provides bindings for wcwidth and wcswidth
+functions defined in POSIX.1-2001 and POSIX.1-2008.")
+ (license license:expat)))
++
+ (define-public python-pyan3
+ (package
+ (name "python-pyan3")
+ (version "1.2.0")
+ (source
+ (origin
+ ;; Source tarball on PyPI lacks tests.
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/Technologicat/pyan")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1367x25rcy2y8f0x9c2dbxl2qgdln3arr7ddyzybz2c28g6jrv5z"))
+ (patches (search-patches "python-pyan3-fix-positional-arguments.patch"
+ "python-pyan3-fix-absolute-path-bug.patch"))))
+ (build-system python-build-system)
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (replace 'check
+ (lambda* (#:key tests? #:allow-other-keys)
+ (when tests?
+ ;; Extend PYTHONPATH so the built package will be found.
- (setenv "PYTHONPATH"
- (string-append (getcwd) ":" (getenv "PYTHONPATH")))
++ (setenv "GUIX_PYTHONPATH"
++ (string-append (getcwd) ":" (getenv
"GUIX_PYTHONPATH")))
+ (invoke "pytest")))))))
+ (native-inputs
+ `(("python-pytest" ,python-pytest)
+ ("python-pytest-cov" ,python-pytest-cov)
+ ("python-wheel" ,python-wheel)))
+ (propagated-inputs
+ `(("python-jinja2" ,python-jinja2)))
+ (home-page "https://github.com/Technologicat/pyan")
+ (synopsis "Offline call graph generator for Python 3")
+ (description "Pyan takes one or more Python source files, performs
+ a (rather superficial) static analysis, and constructs a directed graph of the
+ objects in the combined source, and how they define or use each other. The
+ graph can be output for rendering by GraphViz or yEd.")
+ (license license:gpl2)))
+
+ (define-public date2name
+ (let ((commit "6c8f37277e8ec82aa50f90b8921422be30c4e798")
+ (revision "1"))
+ (package
+ (name "date2name")
+ (version (git-version "0.0" revision commit))
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/novoid/date2name")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1vq96b7n16d932nyfhnzwdwxff0zrqanidmwr4cxj2p67ad9y3w7"))))
+ (build-system python-build-system)
+ (arguments
+ `(#:tests? #f ; no tests
+ #:phases
+ (modify-phases %standard-phases
+ (delete 'build)
+ (replace 'install
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((bindir (string-append (assoc-ref outputs "out")
"/bin"))
+ (binary (string-append bindir "/date2name")))
+ (mkdir-p bindir)
+ (copy-file "date2name/__init__.py" binary)
+ (chmod binary #o555)))))))
+ (synopsis "Handling time-stamps and date-stamps in file names")
+ (description "By default, date2name gets the modification time of
matching
+ files and directories and adds a datestamp in standard ISO 8601+ format
+ YYYY-MM-DD at the beginning of the file or directory name.")
+ (home-page "https://github.com/novoid/date2name")
+ (license license:gpl3+))))
diff --cc gnu/packages/ssh.scm
index 7723390,0e55c23..8ac1072
--- a/gnu/packages/ssh.scm
+++ b/gnu/packages/ssh.scm
@@@ -15,7 -15,8 +15,8 @@@
;;; Copyright © 2019, 2020 Mathieu Othacehe <m.othacehe@gmail.com>
;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
;;; Copyright © 2020 Oleg Pykhalov <go.wigust@gmail.com>
-;;; Copyright © 2020 Maxim Cournoyer <maxim.cournoyer@gmail.com>
+;;; Copyright © 2020, 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
+ ;;; Copyright © 2021 Brice Waegeneire <brice@waegenei.re>
;;;
;;; This file is part of GNU Guix.
;;;
diff --cc gnu/packages/tls.scm
index 277d79e,d52a88f..c73559c
--- a/gnu/packages/tls.scm
+++ b/gnu/packages/tls.scm
@@@ -314,164 -352,149 +314,165 @@@ required structures."
(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")))
+
(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/")))
+ (name "openssl")
+ (version "1.1.1k")
++ (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
+ "1rdfzcrxy9y38wqdw5942vmdax9hjhgrprzxm42csal7p5shhal9"))))
+ (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 #:allow-other-keys)
+ (setenv "CROSS_COMPILE" (string-append target "-"))
+ (setenv "CONFIGURE_TARGET_ARCH"
+ #$(target->openssl-target
+ (%current-target-system))))))
+ #~())
+ ;; This test seems to be dependant on kernel features.
+ ;; https://github.com/openssl/openssl/issues/12242
+ #$@(if (target-arm?)
+ #~((replace 'check
+ (lambda* (#:key tests? test-target #:allow-other-keys)
+ (when tests?
+ (invoke "make" "TESTS=-test_afalg" test-target)))))
+ #~())
+ (replace 'configure
+ (lambda* (#:key configure-flags #:allow-other-keys)
+ (let* ((out #$output)
+ (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")))
+ (apply
+ 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"))
+ #~())
+ configure-flags)
+ ;; Output the configure variables.
+ (invoke "perl" "configdata.pm" "--dump"))))
+ (add-after 'install 'move-static-libraries
+ (lambda _
+ ;; Move static libraries to the "static" output.
+ (let* ((out #$output)
+ (lib (string-append out "/lib"))
+ (static #$output:static)
+ (slib (string-append static "/lib")))
+ (for-each (lambda (file)
+ (install-file file slib)
+ (delete-file file))
+ (find-files lib "\\.a$")))))
+ (add-after 'install 'move-extra-documentation
+ (lambda _
+ ;; Move man pages and full HTML documentation to "doc".
+ (let* ((out #$output)
+ (man (string-append out "/share/man"))
+ (html (string-append out "/share/doc/openssl"))
+ (doc #$output:doc)
+ (man-target (string-append doc "/share/man"))
+ (html-target (string-append doc "/share/doc/openssl")))
+ (mkdir-p (dirname man-target))
+ (mkdir-p (dirname html-target))
+ (rename-file man man-target)
+ (rename-file html html-target))))
+ (add-after
+ 'install 'remove-miscellany
+ (lambda _
+ ;; The 'misc' directory contains random undocumented shell and
Perl
+ ;; scripts. Remove them to avoid retaining a reference on Perl.
+ (delete-file-recursively (string-append #$output
"/share/openssl-"
+ #$(package-version
this-package)
+ "/misc")))))))
+ (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/")))
- (define-public openssl-1.0
+ ;; Replacement package to fix multiple CVEs.
+ (define openssl-1.1.1l
(package
(inherit openssl)
- (name "openssl")
- (version "1.0.2u")
+ (version "1.1.1l")
(source (origin
(method url-fetch)
(uri (list (string-append
"https://www.openssl.org/source/openssl-"
@@@ -481,84 -504,118 +482,118 @@@
(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
- "05lxcs4hzyfqd5jn0d9p0fvqna62v2s4pc9qgmq0dpcknkzwdl7c"))
- (patches (search-patches "openssl-runpath.patch"
- "openssl-c-rehash-in.patch"))))
- (outputs '("out"
- "doc" ;1.5MiB of man3 pages
- "static")) ;6MiB of .a files
- (arguments
- (substitute-keyword-arguments (package-arguments openssl)
- ;; Parallel build is not supported in 1.0.x.
- ((#:parallel-build? _ #f) #f)
- ((#:phases phases)
- #~(modify-phases #$phases
- (add-before 'patch-source-shebangs 'patch-tests
- (lambda* (#:key inputs native-inputs #:allow-other-keys)
- (let ((bash (assoc-ref (or native-inputs inputs) "bash")))
- (substitute* (find-files "test" ".*")
- (("/bin/sh")
- (string-append bash "/bin/sh"))
- (("/bin/rm")
- "rm"))
- #t)))
- (add-before 'configure 'patch-Makefile.org
- (lambda* (#:key outputs #:allow-other-keys)
- ;; The default MANDIR is some unusual place. Fix that.
- (let ((out (assoc-ref outputs "out")))
- (patch-makefile-SHELL "Makefile.org")
- (substitute* "Makefile.org"
- (("^MANDIR[[:blank:]]*=.*$")
- (string-append "MANDIR = " out "/share/man\n")))
- #t)))
- (replace 'configure
- ;; Override this phase because OpenSSL 1.0 does not understand
-rpath.
- (lambda* (#:key outputs #:allow-other-keys)
- (let ((out (assoc-ref outputs "out")))
- (invoke #$@(if (%current-target-system)
- #~("./Configure")
- #~("./config"))
- "shared" ;build shared libraries
- "--libdir=lib"
+ "1lbblxps2fhmz7bqh058iywh5wxfignbfx1s1kz2fj63b5g3wyhb"))))))
+
+ ;; We will not add any new uses of this package. If you add new code that uses
+ ;; this package, your change will be reverted!
+ ;;
+ ;; The only acceptable use for this package is to bootstrap Rust, in
+ ;; ((gnu packages rust) rust-1.19).
+ ;;
+ ;; OpenSSL 1.0 is no longer suppported upstream [0] and has several security
+ ;; vulnerabilities that will not be fixed [1].
+ ;;
+ ;; For more information from the Guix point of view, see
+ ;; <https://bugs.gnu.org/46602>.
+ ;;
+ ;; [0] https://www.openssl.org/policies/releasestrat.html
+ ;; [1] https://www.openssl.org/news/vulnerabilities.html
+ (define-public openssl-1.0
+ (hidden-package
+ (package
+ (inherit openssl)
+ (name "openssl")
+ (version "1.0.2u")
+ (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")))
+ (sha256
+ (base32
+ "05lxcs4hzyfqd5jn0d9p0fvqna62v2s4pc9qgmq0dpcknkzwdl7c"))
+ (patches (search-patches "openssl-runpath.patch"
+ "openssl-c-rehash-in.patch"))))
+ (outputs '("out"
+ "doc" ;1.5MiB of man3 pages
+ "static")) ;6MiB of .a files
+ (arguments
+ (substitute-keyword-arguments (package-arguments openssl)
+ ;; Parallel build is not supported in 1.0.x.
+ ((#:parallel-build? _ #f) #f)
+ ((#:phases phases)
- `(modify-phases ,phases
++ #~(modify-phases #$phases
+ (add-before 'patch-source-shebangs 'patch-tests
+ (lambda* (#:key inputs native-inputs #:allow-other-keys)
+ (let ((bash (assoc-ref (or native-inputs inputs) "bash")))
+ (substitute* (find-files "test" ".*")
+ (("/bin/sh")
+ (string-append bash "/bin/sh"))
+ (("/bin/rm")
+ "rm"))
+ #t)))
+ (add-before 'configure 'patch-Makefile.org
+ (lambda* (#:key outputs #:allow-other-keys)
+ ;; The default MANDIR is some unusual place. Fix that.
+ (let ((out (assoc-ref outputs "out")))
+ (patch-makefile-SHELL "Makefile.org")
+ (substitute* "Makefile.org"
+ (("^MANDIR[[:blank:]]*=.*$")
+ (string-append "MANDIR = " out "/share/man\n")))
+ #t)))
+ (replace 'configure
+ ;; Override this phase because OpenSSL 1.0 does not understand
-rpath.
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let ((out (assoc-ref outputs "out")))
- (invoke ,@(if (%current-target-system)
- '("./Configure")
- '("./config"))
++ (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-" #$version)
+ ;; The default for this catch-all directory is
+ ;; PREFIX/ssl. Change that to something more
+ ;; conventional.
+ (string-append "--openssldir=" out
- "/share/openssl-" ,version)
++ "/share/openssl-" #$version)
- (string-append "--prefix=" out)
- #$@(if (%current-target-system)
- '((getenv "CONFIGURE_TARGET_ARCH"))
- '())))))
- (delete 'move-extra-documentation)
- (add-after 'install 'move-man3-pages
- (lambda* (#:key outputs #:allow-other-keys)
- ;; Move section 3 man pages to "doc".
- (let* ((out (assoc-ref outputs "out"))
- (man3 (string-append out "/share/man/man3"))
- (doc (assoc-ref outputs "doc"))
- (target (string-append doc "/share/man/man3")))
- (mkdir-p target)
- (for-each (lambda (file)
- (rename-file file
- (string-append target "/"
- (basename file))))
- (find-files man3))
- (delete-file-recursively man3)
- #t)))
- ;; XXX: Duplicate this phase to make sure 'version' evaluates
- ;; in the current scope and not the inherited one.
- (replace '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-"
- #$version "/misc"))
- #t)))))))))
+ (string-append "--prefix=" out)
- ,@(if (%current-target-system)
- '((getenv "CONFIGURE_TARGET_ARCH"))
- '())))))
++ #$@(if (%current-target-system)
++ '((getenv "CONFIGURE_TARGET_ARCH"))
++ '())))))
+ (delete 'move-extra-documentation)
+ (add-after 'install 'move-man3-pages
+ (lambda* (#:key outputs #:allow-other-keys)
+ ;; Move section 3 man pages to "doc".
+ (let* ((out (assoc-ref outputs "out"))
+ (man3 (string-append out "/share/man/man3"))
+ (doc (assoc-ref outputs "doc"))
+ (target (string-append doc "/share/man/man3")))
+ (mkdir-p target)
+ (for-each (lambda (file)
+ (rename-file file
+ (string-append target "/"
+ (basename file))))
+ (find-files man3))
+ (delete-file-recursively man3)
+ #t)))
+ ;; XXX: Duplicate this phase to make sure 'version' evaluates
+ ;; in the current scope and not the inherited one.
+ (replace '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-"
- ,version "/misc"))
++ #$version "/misc"))
+ #t))))))))))
(define-public libressl
(package
diff --cc guix/build-system/chicken.scm
index c697826,10f1469..07666d1
--- a/guix/build-system/chicken.scm
+++ b/guix/build-system/chicken.scm
@@@ -1,6 -1,6 +1,7 @@@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2020 raingloom <raingloom@riseup.net>
+;;; Copyright © 2021 Ludovic Courtès <ludo@gnu.org>
+ ;;; Copyright © 2021 Xinglu Chen <public@yoctocell.xyz>
;;;
;;; This file is part of GNU Guix.
;;;
diff --cc guix/build-system/dune.scm
index 8c33e09,1a64cf9..303b5f7
--- a/guix/build-system/dune.scm
+++ b/guix/build-system/dune.scm
@@@ -1,7 -1,7 +1,8 @@@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2016, 2017, 2018 Julien Lepiller <julien@lepiller.eu>
;;; Copyright © 2017 Ben Woodcroft <donttrustben@gmail.com>
+;;; Copyright © 2021 Ludovic Courtès <ludo@gnu.org>
+ ;;; Copyright © 2021 pukkamustard <pukkamustard@posteo.net>
;;;
;;; This file is part of GNU Guix.
;;;
@@@ -109,39 -109,51 +111,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
- #:profile ,profile
- #: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
+ #: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/import/opam.scm
index c42b608,fe13d29..f8402ff
--- a/guix/import/opam.scm
+++ b/guix/import/opam.scm
@@@ -2,7 -2,7 +2,8 @@@
;;; Copyright © 2018 Julien Lepiller <julien@lepiller.eu>
;;; Copyright © 2020 Martin Becze <mjbecze@riseup.net>
;;; Copyright © 2021 Xinglu Chen <public@yoctocell.xyz>
+;;; Copyright © 2021 Sarah Morgensen <iskarian@mgsn.dev>
+ ;;; Copyright © 2021 Alice Brenon <alice.brenon@ens-lyon.fr>
;;;
;;; This file is part of GNU Guix.
;;;
@@@ -267,26 -302,30 +303,28 @@@ path to the repository.
(define (depends->native-inputs depends)
(filter (lambda (name) (not (equal? "" name)))
- (map dependency->native-input depends)))
+ (map dependency->native-input depends)))
(define (dependency-list->inputs lst)
- (map
- (lambda (dependency)
- (list dependency (list 'unquote (string->symbol dependency))))
- (ocaml-names->guix-names lst)))
+ (map string->symbol
+ (ocaml-names->guix-names lst)))
- (define* (opam-fetch name #:optional (repository (get-opam-repository)))
- (and-let* ((repository repository)
- (version (find-latest-version name repository))
- (file (string-append repository "/packages/" name "/" name "."
version "/opam")))
- `(("metadata" ,@(get-metadata file))
- ("version" . ,(if (string-prefix? "v" version)
- (substring version 1)
- version)))))
+ (define* (opam-fetch name #:optional (repositories-specs '("opam")))
+ (or (fold (lambda (repository others)
+ (match (find-latest-version name repository)
+ ((_ version file) `(("metadata" ,@(get-metadata file))
+ ("version" . ,version)))
+ (_ others)))
+ #f
+ (filter-map get-opam-repository repositories-specs))
+ (leave (G_ "package '~a' not found~%") name)))
-(define* (opam->guix-package name #:key (repo '()) version)
- "Import OPAM package NAME from REPOSITORIES (a list of names, URLs or local
-paths, always including OPAM's official repository). Return a 'package' sexp
+(define* (opam->guix-package name #:key (repo 'opam) version)
+ "Import OPAM package NAME from REPOSITORY (a directory name) or, if
+REPOSITORY is #f, from the official OPAM repository. Return a 'package' sexp
or #f on failure."
- (and-let* ((opam-file (opam-fetch name (get-opam-repository repo)))
+ (and-let* ((with-opam (if (member "opam" repo) repo (cons "opam" repo)))
+ (opam-file (opam-fetch name with-opam))
(version (assoc-ref opam-file "version"))
(opam-content (assoc-ref opam-file "metadata"))
(url-dict (metadata-ref opam-content "url"))
diff --cc tests/opam.scm
index e7f1ff9,1536b74..f2e9a71
--- a/tests/opam.scm
+++ b/tests/opam.scm
@@@ -83,36 -82,39 +83,34 @@@ url
(set! test-source-hash
(call-with-input-file file-name port-sha256))))
(_ (error "Unexpected URL: " url)))))
- (mock ((guix import opam) get-opam-repository
- (const test-repo))
- (let ((my-package (string-append test-repo
- "/packages/foo/foo.1.0.0")))
- (mkdir-p my-package)
- (with-output-to-file (string-append my-package "/opam")
- (lambda _
- (format #t "~a" test-opam-file))))
- (match (opam->guix-package "foo" #:repo test-repo)
- (('package
- ('name "ocaml-foo")
- ('version "1.0.0")
- ('source ('origin
- ('method 'url-fetch)
- ('uri "https://example.org/foo-1.0.0.tar.gz")
- ('sha256
- ('base32
- (? string? hash)))))
- ('build-system 'ocaml-build-system)
- ('propagated-inputs ('list 'ocaml-zarith))
- ('native-inputs ('list 'ocaml-alcotest 'ocamlbuild))
- ('home-page "https://example.org/")
- ('synopsis "Some example package")
- ('description "This package is just an example.")
- ('license 'license:bsd-3))
- (string=? (bytevector->nix-base32-string
- test-source-hash)
- hash))
- (x
- (pk 'fail x #f))))))
+ (let ((my-package (string-append test-repo
+ "/packages/foo/foo.1.0.0")))
+ (mkdir-p my-package)
+ (with-output-to-file (string-append my-package "/opam")
+ (lambda _
+ (format #t "~a" test-opam-file))))
+ (match (opam->guix-package "foo" #:repo (list test-repo))
+ (('package
+ ('name "ocaml-foo")
+ ('version "1.0.0")
+ ('source ('origin
+ ('method 'url-fetch)
+ ('uri "https://example.org/foo-1.0.0.tar.gz")
+ ('sha256
+ ('base32
+ (? string? hash)))))
+ ('build-system 'ocaml-build-system)
- ('propagated-inputs
- ('quasiquote
- (("ocaml-zarith" ('unquote 'ocaml-zarith)))))
- ('native-inputs
- ('quasiquote
- (("ocaml-alcotest" ('unquote 'ocaml-alcotest))
- ("ocamlbuild" ('unquote 'ocamlbuild)))))
++ ('propagated-inputs ('list 'ocaml-zarith))
++ ('native-inputs ('list 'ocaml-alcotest 'ocamlbuild))
+ ('home-page "https://example.org/")
+ ('synopsis "Some example package")
+ ('description "This package is just an example.")
+ ('license 'license:bsd-3))
+ (string=? (bytevector->nix-base32-string
+ test-source-hash)
+ hash))
+ (x
+ (pk 'fail x #f)))))
;; Test the opam file parser
;; We fold over some test cases. Each case is a pair of the string to parse
and the