summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.dir-locals.el7
-rw-r--r--Makefile.am6
-rw-r--r--doc/build.scm2
-rw-r--r--doc/guix-cookbook.texi52
-rw-r--r--doc/guix.texi395
-rw-r--r--etc/news.scm48
-rw-r--r--etc/release-manifest.scm9
-rw-r--r--gnu/build/marionette.scm72
-rw-r--r--gnu/build/vm.scm4
-rw-r--r--gnu/ci.scm52
-rw-r--r--gnu/installer/keymap.scm17
-rw-r--r--gnu/installer/parted.scm8
-rw-r--r--gnu/local.mk208
-rw-r--r--gnu/packages/acl.scm4
-rw-r--r--gnu/packages/ada.scm10
-rw-r--r--gnu/packages/admin.scm77
-rw-r--r--gnu/packages/adns.scm33
-rw-r--r--gnu/packages/aidc.scm122
-rw-r--r--gnu/packages/algebra.scm10
-rw-r--r--gnu/packages/android.scm56
-rw-r--r--gnu/packages/animation.scm2
-rw-r--r--gnu/packages/apr.scm4
-rw-r--r--gnu/packages/arcan.scm13
-rw-r--r--gnu/packages/assembly.scm30
-rw-r--r--gnu/packages/astronomy.scm19
-rw-r--r--gnu/packages/attr.scm21
-rw-r--r--gnu/packages/audio.scm36
-rw-r--r--gnu/packages/autotools.scm44
-rw-r--r--gnu/packages/aux-files/guile-launcher.c7
-rw-r--r--gnu/packages/aux-files/python/sanity-check.py92
-rw-r--r--gnu/packages/aux-files/python/sitecustomize.py55
-rw-r--r--gnu/packages/avahi.scm33
-rw-r--r--gnu/packages/axoloti.scm8
-rw-r--r--gnu/packages/backup.scm36
-rw-r--r--gnu/packages/base.scm610
-rw-r--r--gnu/packages/bash.scm38
-rw-r--r--gnu/packages/bdw-gc.scm21
-rw-r--r--gnu/packages/bioinformatics.scm1959
-rw-r--r--gnu/packages/bison.scm17
-rw-r--r--gnu/packages/bittorrent.scm18
-rw-r--r--gnu/packages/boost.scm42
-rw-r--r--gnu/packages/bootloaders.scm50
-rw-r--r--gnu/packages/bootstrap.scm157
-rw-r--r--gnu/packages/build-tools.scm80
-rw-r--r--gnu/packages/calcurse.scm4
-rw-r--r--gnu/packages/calendar.scm8
-rw-r--r--gnu/packages/cdrom.scm15
-rw-r--r--gnu/packages/cedille.scm3
-rw-r--r--gnu/packages/certs.scm142
-rw-r--r--gnu/packages/check.scm370
-rw-r--r--gnu/packages/chemistry.scm3
-rw-r--r--gnu/packages/chez.scm22
-rw-r--r--gnu/packages/chromium.scm29
-rw-r--r--gnu/packages/ci.scm2
-rw-r--r--gnu/packages/cmake.scm212
-rw-r--r--gnu/packages/code.scm8
-rw-r--r--gnu/packages/commencement.scm1421
-rw-r--r--gnu/packages/compression.scm269
-rw-r--r--gnu/packages/connman.scm2
-rw-r--r--gnu/packages/cpio.scm10
-rw-r--r--gnu/packages/cpp.scm46
-rw-r--r--gnu/packages/cran.scm26
-rw-r--r--gnu/packages/crates-graphics.scm7
-rw-r--r--gnu/packages/crates-io.scm465
-rw-r--r--gnu/packages/cross-base.scm59
-rw-r--r--gnu/packages/crypto.scm67
-rw-r--r--gnu/packages/cups.scm316
-rw-r--r--gnu/packages/curl.scm60
-rw-r--r--gnu/packages/databases.scm337
-rw-r--r--gnu/packages/datastructures.scm3
-rw-r--r--gnu/packages/dbm.scm60
-rw-r--r--gnu/packages/debug.scm11
-rw-r--r--gnu/packages/dictionaries.scm5
-rw-r--r--gnu/packages/diffoscope.scm11
-rw-r--r--gnu/packages/disk.scm9
-rw-r--r--gnu/packages/display-managers.scm38
-rw-r--r--gnu/packages/django.scm246
-rw-r--r--gnu/packages/djvu.scm5
-rw-r--r--gnu/packages/dlang.scm538
-rw-r--r--gnu/packages/dns.scm16
-rw-r--r--gnu/packages/docbook.scm182
-rw-r--r--gnu/packages/docker.scm17
-rw-r--r--gnu/packages/documentation.scm14
-rw-r--r--gnu/packages/dunst.scm2
-rw-r--r--gnu/packages/ebook.scm6
-rw-r--r--gnu/packages/ed.scm4
-rw-r--r--gnu/packages/education.scm64
-rw-r--r--gnu/packages/elf.scm49
-rw-r--r--gnu/packages/emacs-xyz.scm247
-rw-r--r--gnu/packages/emacs.scm10
-rw-r--r--gnu/packages/emulators.scm53
-rw-r--r--gnu/packages/engineering.scm143
-rw-r--r--gnu/packages/enlightenment.scm40
-rw-r--r--gnu/packages/entr.scm6
-rw-r--r--gnu/packages/file-systems.scm22
-rw-r--r--gnu/packages/file.scm6
-rw-r--r--gnu/packages/finance.scm50
-rw-r--r--gnu/packages/flashing-tools.scm14
-rw-r--r--gnu/packages/fontutils.scm192
-rw-r--r--gnu/packages/freedesktop.scm338
-rw-r--r--gnu/packages/ftp.scm2
-rw-r--r--gnu/packages/game-development.scm27
-rw-r--r--gnu/packages/games.scm255
-rw-r--r--gnu/packages/gawk.scm28
-rw-r--r--gnu/packages/gcc.scm188
-rw-r--r--gnu/packages/gd.scm20
-rw-r--r--gnu/packages/gdb.scm159
-rw-r--r--gnu/packages/genimage.scm184
-rw-r--r--gnu/packages/geo.scm148
-rw-r--r--gnu/packages/gettext.scm23
-rw-r--r--gnu/packages/ghostscript.scm42
-rw-r--r--gnu/packages/gimp.scm17
-rw-r--r--gnu/packages/gl.scm137
-rw-r--r--gnu/packages/glib.scm825
-rw-r--r--gnu/packages/gnome-xyz.scm23
-rw-r--r--gnu/packages/gnome.scm3190
-rw-r--r--gnu/packages/gnucash.scm13
-rw-r--r--gnu/packages/gnunet.scm3
-rw-r--r--gnu/packages/gnupg.scm124
-rw-r--r--gnu/packages/gnuzilla.scm135
-rw-r--r--gnu/packages/gobby.scm19
-rw-r--r--gnu/packages/golang.scm23
-rw-r--r--gnu/packages/gpodder.scm3
-rw-r--r--gnu/packages/gps.scm2
-rw-r--r--gnu/packages/graphics.scm264
-rw-r--r--gnu/packages/graphviz.scm120
-rw-r--r--gnu/packages/groovy.scm2
-rw-r--r--gnu/packages/gstreamer.scm291
-rw-r--r--gnu/packages/gtk.scm1762
-rw-r--r--gnu/packages/guile-xyz.scm32
-rw-r--r--gnu/packages/guile.scm262
-rw-r--r--gnu/packages/haskell-xyz.scm5
-rw-r--r--gnu/packages/haskell.scm22
-rw-r--r--gnu/packages/hurd.scm52
-rw-r--r--gnu/packages/ibus.scm118
-rw-r--r--gnu/packages/icu4c.scm51
-rw-r--r--gnu/packages/idutils.scm12
-rw-r--r--gnu/packages/image-processing.scm113
-rw-r--r--gnu/packages/image-viewers.scm43
-rw-r--r--gnu/packages/image.scm262
-rw-r--r--gnu/packages/imagemagick.scm4
-rw-r--r--gnu/packages/inkscape.scm83
-rw-r--r--gnu/packages/irc.scm2
-rw-r--r--gnu/packages/irods.scm19
-rw-r--r--gnu/packages/iso-codes.scm15
-rw-r--r--gnu/packages/jami.scm5
-rw-r--r--gnu/packages/java-graphics.scm3
-rw-r--r--gnu/packages/java.scm340
-rw-r--r--gnu/packages/javascript.scm33
-rw-r--r--gnu/packages/jemalloc.scm42
-rw-r--r--gnu/packages/julia-xyz.scm175
-rw-r--r--gnu/packages/julia.scm239
-rw-r--r--gnu/packages/jupyter.scm4
-rw-r--r--gnu/packages/kde-frameworks.scm34
-rw-r--r--gnu/packages/kde-multimedia.scm35
-rw-r--r--gnu/packages/kde-pim.scm22
-rw-r--r--gnu/packages/kde-plasma.scm35
-rw-r--r--gnu/packages/kde-systemtools.scm2
-rw-r--r--gnu/packages/kde.scm80
-rw-r--r--gnu/packages/kerberos.scm138
-rw-r--r--gnu/packages/kodi.scm7
-rw-r--r--gnu/packages/language.scm10
-rw-r--r--gnu/packages/ld-wrapper.in3
-rw-r--r--gnu/packages/less.scm8
-rw-r--r--gnu/packages/libdaemon.scm42
-rw-r--r--gnu/packages/libevent.scm40
-rw-r--r--gnu/packages/libffi.scm62
-rw-r--r--gnu/packages/libidn.scm15
-rw-r--r--gnu/packages/libreoffice.scm36
-rw-r--r--gnu/packages/libsigsegv.scm4
-rw-r--r--gnu/packages/libusb.scm2
-rw-r--r--gnu/packages/linux.scm588
-rw-r--r--gnu/packages/lisp-xyz.scm62
-rw-r--r--gnu/packages/lisp.scm78
-rw-r--r--gnu/packages/llvm.scm495
-rw-r--r--gnu/packages/logging.scm17
-rw-r--r--gnu/packages/lsof.scm140
-rw-r--r--gnu/packages/lua.scm5
-rw-r--r--gnu/packages/lxde.scm13
-rw-r--r--gnu/packages/machine-learning.scm211
-rw-r--r--gnu/packages/mail.scm62
-rw-r--r--gnu/packages/make-bootstrap.scm515
-rw-r--r--gnu/packages/man.scm38
-rw-r--r--gnu/packages/markup.scm3
-rw-r--r--gnu/packages/mastodon.scm2
-rw-r--r--gnu/packages/mate.scm38
-rw-r--r--gnu/packages/maths.scm561
-rw-r--r--gnu/packages/maven-parent-pom.scm33
-rw-r--r--gnu/packages/mes.scm288
-rw-r--r--gnu/packages/messaging.scm39
-rw-r--r--gnu/packages/monitoring.scm6
-rw-r--r--gnu/packages/mp3.scm10
-rw-r--r--gnu/packages/mpd.scm16
-rw-r--r--gnu/packages/mpi.scm12
-rw-r--r--gnu/packages/multiprecision.scm17
-rw-r--r--gnu/packages/music.scm83
-rw-r--r--gnu/packages/ncurses.scm47
-rw-r--r--gnu/packages/netpbm.scm8
-rw-r--r--gnu/packages/nettle.scm30
-rw-r--r--gnu/packages/networking.scm208
-rw-r--r--gnu/packages/ninja.scm10
-rw-r--r--gnu/packages/node.scm29
-rw-r--r--gnu/packages/nss.scm112
-rw-r--r--gnu/packages/ocaml.scm151
-rw-r--r--gnu/packages/onc-rpc.scm20
-rw-r--r--gnu/packages/openbox.scm3
-rw-r--r--gnu/packages/openldap.scm77
-rw-r--r--gnu/packages/openstack.scm1
-rw-r--r--gnu/packages/orpheus.scm9
-rw-r--r--gnu/packages/package-management.scm87
-rw-r--r--gnu/packages/pantheon.scm14
-rw-r--r--gnu/packages/pascal.scm68
-rw-r--r--gnu/packages/password-utils.scm13
-rw-r--r--gnu/packages/patches/abseil-cpp-fix-gtest.patch16
-rw-r--r--gnu/packages/patches/agg-2.5-gcc8.patch14
-rw-r--r--gnu/packages/patches/atlas-gfortran-compat.patch37
-rw-r--r--gnu/packages/patches/awesome-4.3-fno-common.patch178
-rw-r--r--gnu/packages/patches/bdb-5.3-atomics-on-gcc-9.patch22
-rw-r--r--gnu/packages/patches/biber-fix-encoding-write.patch31
-rw-r--r--gnu/packages/patches/biber-sortinithash.patch1666
-rw-r--r--gnu/packages/patches/binutils-2.37-file-descriptor-leak.patch231
-rw-r--r--gnu/packages/patches/binutils-loongson-workaround.patch14
-rw-r--r--gnu/packages/patches/binutils-mingw-w64-timestamp.patch39
-rw-r--r--gnu/packages/patches/c++-gsl-move-array-bounds-tests.patch126
-rw-r--r--gnu/packages/patches/cdrkit-libre-cross-compile.patch32
-rw-r--r--gnu/packages/patches/ceph-boost-compat.patch18
-rw-r--r--gnu/packages/patches/ceph-fix-snappy-breaking-change.patch13
-rw-r--r--gnu/packages/patches/ceph-rocksdb-compat.patch303
-rw-r--r--gnu/packages/patches/cheese-vala-update.patch180
-rw-r--r--gnu/packages/patches/classpath-miscompilation.patch71
-rw-r--r--gnu/packages/patches/cling-use-shared-library.patch329
-rw-r--r--gnu/packages/patches/coreutils-gnulib-tests.patch45
-rw-r--r--gnu/packages/patches/cups-CVE-2020-10001.patch47
-rw-r--r--gnu/packages/patches/curl-7.76-use-ssl-cert-env.patch64
-rw-r--r--gnu/packages/patches/curl-7.77-tls-priority-string.patch98
-rw-r--r--gnu/packages/patches/curl-use-ssl-cert-env.patch4
-rw-r--r--gnu/packages/patches/dbus-CVE-2020-12049.patch58
-rw-r--r--gnu/packages/patches/diffutils-fix-signal-processing.patch58
-rw-r--r--gnu/packages/patches/diffutils-gets-undeclared.patch71
-rw-r--r--gnu/packages/patches/docbook-xsl-nonrecursive-string-subst.patch11
-rw-r--r--gnu/packages/patches/docbook-xsl-support-old-url.patch17
-rw-r--r--gnu/packages/patches/doxygen-1.8.17-runtests.patch73
-rw-r--r--gnu/packages/patches/doxygen-test.patch60
-rw-r--r--gnu/packages/patches/elogind-revert-polkit-detection.patch41
-rw-r--r--gnu/packages/patches/evolution-CVE-2020-11879.patch122
-rw-r--r--gnu/packages/patches/evolution-data-server-CVE-2020-14928.patch115
-rw-r--r--gnu/packages/patches/evolution-data-server-CVE-2020-16117.patch28
-rw-r--r--gnu/packages/patches/evolution-data-server-libical-compat.patch36
-rw-r--r--gnu/packages/patches/evolution-data-server-locales.patch33
-rw-r--r--gnu/packages/patches/farstream-gupnp.patch140
-rw-r--r--gnu/packages/patches/findutils-test-rwlock-threads.patch38
-rw-r--r--gnu/packages/patches/fontconfig-cache-ignore-mtime.patch15
-rw-r--r--gnu/packages/patches/fontconfig-hurd-path-max.patch17
-rw-r--r--gnu/packages/patches/freecad-boost-serialization.patch27
-rw-r--r--gnu/packages/patches/freecad-vtk9.patch827
-rw-r--r--gnu/packages/patches/freeglut-gcc-compat.patch53
-rw-r--r--gnu/packages/patches/ganeti-preserve-PYTHONPATH.patch21
-rw-r--r--gnu/packages/patches/gcc-10-cross-environment-variables.patch51
-rw-r--r--gnu/packages/patches/gcc-5-fix-powerpc64le-build.patch64
-rw-r--r--gnu/packages/patches/gcc-cross-gxx-include-dir.patch73
-rw-r--r--gnu/packages/patches/gd-Revert-fix-303-gdlib.pc.patch179
-rw-r--r--gnu/packages/patches/gdb-fix-gnu-nat-build.patch254
-rw-r--r--gnu/packages/patches/gdb-hurd.patch69
-rw-r--r--gnu/packages/patches/gdk-pixbuf-CVE-2020-29385.patch53
-rw-r--r--gnu/packages/patches/gdm-default-session.patch27
-rw-r--r--gnu/packages/patches/gdm-elogind-support.patch211
-rw-r--r--gnu/packages/patches/gdm-pass-gdk-pixbuf-loader-env.patch24
-rw-r--r--gnu/packages/patches/gdm-remove-hardcoded-xwayland-path.patch22
-rw-r--r--gnu/packages/patches/gdm-wayland-session-wrapper-from-env.patch35
-rw-r--r--gnu/packages/patches/geary-CVE-2020-24661.patch133
-rw-r--r--gnu/packages/patches/geeqie-clutter.patch35
-rw-r--r--gnu/packages/patches/genimage-mke2fs-test.patch10
-rw-r--r--gnu/packages/patches/ghostscript-CVE-2020-15900.patch36
-rw-r--r--gnu/packages/patches/ghostscript-freetype-compat.patch35
-rw-r--r--gnu/packages/patches/ghostscript-no-header-creationdate.patch22
-rw-r--r--gnu/packages/patches/glade-gls-set-script-name.patch32
-rw-r--r--gnu/packages/patches/glade-test-widget-null-icon.patch30
-rw-r--r--gnu/packages/patches/glib-CVE-2021-27218.patch132
-rw-r--r--gnu/packages/patches/glib-CVE-2021-27219-01.patch176
-rw-r--r--gnu/packages/patches/glib-CVE-2021-27219-02.patch264
-rw-r--r--gnu/packages/patches/glib-CVE-2021-27219-03.patch136
-rw-r--r--gnu/packages/patches/glib-CVE-2021-27219-04.patch308
-rw-r--r--gnu/packages/patches/glib-CVE-2021-27219-05.patch47
-rw-r--r--gnu/packages/patches/glib-CVE-2021-27219-06.patch94
-rw-r--r--gnu/packages/patches/glib-CVE-2021-27219-07.patch118
-rw-r--r--gnu/packages/patches/glib-CVE-2021-27219-08.patch94
-rw-r--r--gnu/packages/patches/glib-CVE-2021-27219-09.patch98
-rw-r--r--gnu/packages/patches/glib-CVE-2021-27219-10.patch52
-rw-r--r--gnu/packages/patches/glib-CVE-2021-27219-11.patch57
-rw-r--r--gnu/packages/patches/glib-CVE-2021-27219-12.patch30
-rw-r--r--gnu/packages/patches/glib-CVE-2021-27219-13.patch32
-rw-r--r--gnu/packages/patches/glib-CVE-2021-27219-14.patch32
-rw-r--r--gnu/packages/patches/glib-CVE-2021-27219-15.patch95
-rw-r--r--gnu/packages/patches/glib-CVE-2021-27219-16.patch43
-rw-r--r--gnu/packages/patches/glib-CVE-2021-27219-17.patch37
-rw-r--r--gnu/packages/patches/glib-CVE-2021-27219-18.patch232
-rw-r--r--gnu/packages/patches/glib-CVE-2021-28153.patch283
-rw-r--r--gnu/packages/patches/glib-networking-32-bit-time.patch61
-rw-r--r--gnu/packages/patches/glib-networking-gnutls-binding.patch21
-rw-r--r--gnu/packages/patches/glib-skip-failing-test.patch27
-rw-r--r--gnu/packages/patches/glib-tests-timer.patch15
-rw-r--r--gnu/packages/patches/glibc-2.27-git-fixes.patch702
-rw-r--r--gnu/packages/patches/glibc-2.27-supported-locales.patch33
-rw-r--r--gnu/packages/patches/glibc-2.28-git-fixes.patch248
-rw-r--r--gnu/packages/patches/glibc-2.28-supported-locales.patch33
-rw-r--r--gnu/packages/patches/glibc-2.31-hurd-clock_gettime_monotonic.patch84
-rw-r--r--gnu/packages/patches/glibc-bootstrap-system.patch37
-rw-r--r--gnu/packages/patches/glibc-cross-objcopy.patch159
-rw-r--r--gnu/packages/patches/glibc-cross-objdump.patch159
-rw-r--r--gnu/packages/patches/glibc-dl-cache.patch140
-rw-r--r--gnu/packages/patches/glibc-hurd-clock_gettime_monotonic.patch19
-rw-r--r--gnu/packages/patches/glibc-skip-c++.patch31
-rw-r--r--gnu/packages/patches/glibc-static-nss.patch1244
-rw-r--r--gnu/packages/patches/gnome-boxes-add-guix-logo.patch32
-rw-r--r--gnu/packages/patches/gnome-online-miners-tracker-3.patch1505
-rw-r--r--gnu/packages/patches/gnome-screenshot-meson-0.60.patch39
-rw-r--r--gnu/packages/patches/gnome-session-support-elogind.patch73
-rw-r--r--gnu/packages/patches/gnome-shell-CVE-2020-17489.patch46
-rw-r--r--gnu/packages/patches/gnome-shell-disable-test.patch25
-rw-r--r--gnu/packages/patches/gnome-shell-theme.patch51
-rw-r--r--gnu/packages/patches/gnome-todo-delete-esource-duplicate.patch10
-rw-r--r--gnu/packages/patches/gnupg-1-build-with-gcc10.patch64
-rw-r--r--gnu/packages/patches/gnutls-CVE-2021-20231.patch62
-rw-r--r--gnu/packages/patches/gnutls-CVE-2021-20232.patch60
-rw-r--r--gnu/packages/patches/gnutls-guile-eintr-eagain.patch56
-rw-r--r--gnu/packages/patches/graphviz-CVE-2020-18032.patch49
-rw-r--r--gnu/packages/patches/gst-libav-64channels-stack-corruption.patch31
-rw-r--r--gnu/packages/patches/gst-plugins-bad-fix-overflow.patch263
-rw-r--r--gnu/packages/patches/gst-plugins-base-fix-id3v2-invalid-read.patch40
-rw-r--r--gnu/packages/patches/gst-plugins-good-CVE-2021-3497.patch174
-rw-r--r--gnu/packages/patches/gst-plugins-good-CVE-2021-3498.patch22
-rw-r--r--gnu/packages/patches/gst-plugins-ugly-fix-out-of-bound-reads.patch119
-rw-r--r--gnu/packages/patches/gtk-doc-respect-xml-catalog.patch16
-rw-r--r--gnu/packages/patches/gtk2-fix-builder-test.patch94
-rw-r--r--gnu/packages/patches/gtk4-respect-GUIX_GTK4_PATH.patch51
-rw-r--r--gnu/packages/patches/guile-email-fix-tests.patch35
-rw-r--r--gnu/packages/patches/guile-git-adjust-for-libgit2-1.2.0.patch78
-rw-r--r--gnu/packages/patches/guile-ssh-fix-test-suite.patch217
-rw-r--r--gnu/packages/patches/guile-ssh-read-error.patch18
-rw-r--r--gnu/packages/patches/gvfs-add-support-for-libplist-2.2.patch34
-rw-r--r--gnu/packages/patches/helm-fix-gcc-9-build.patch140
-rw-r--r--gnu/packages/patches/icu4c-CVE-2020-10531.patch127
-rw-r--r--gnu/packages/patches/inetutils-hurd.patch583
-rw-r--r--gnu/packages/patches/json-c-CVE-2020-12762.patch193
-rw-r--r--gnu/packages/patches/jsoncpp-fix-inverted-case.patch22
-rw-r--r--gnu/packages/patches/jsoncpp-pkg-config-version.patch24
-rw-r--r--gnu/packages/patches/julia-allow-parallel-build.patch32
-rw-r--r--gnu/packages/patches/lcms-CVE-2018-16435.patch171
-rw-r--r--gnu/packages/patches/ldc-bootstrap-disable-tests.patch72
-rw-r--r--gnu/packages/patches/ldc-disable-phobos-tests.patch22
-rw-r--r--gnu/packages/patches/lib2geom-fix-tests.patch192
-rw-r--r--gnu/packages/patches/libmicrohttpd-0.9.73-test-ssl3.patch35
-rw-r--r--gnu/packages/patches/librime-fix-build-with-gcc10.patch41
-rw-r--r--gnu/packages/patches/libtirpc-hurd-client.patch50
-rw-r--r--gnu/packages/patches/libunwind-julia-fix-GCC10-fno-common.patch40
-rw-r--r--gnu/packages/patches/libxml2-parent-pointers.patch228
-rw-r--r--gnu/packages/patches/libxml2-terminating-newline.patch33
-rw-r--r--gnu/packages/patches/libxml2-xpath-recursion-limit.patch20
-rw-r--r--gnu/packages/patches/libxt-guix-search-paths.patch13
-rw-r--r--gnu/packages/patches/llvm-3.6-fix-build-with-gcc-10.patch13
-rw-r--r--gnu/packages/patches/mariadb-CVE-2021-27928.patch642
-rw-r--r--gnu/packages/patches/mesa-opencl-all-targets.patch25
-rw-r--r--gnu/packages/patches/mesa-skip-tests.patch48
-rw-r--r--gnu/packages/patches/meson-allow-dirs-outside-of-prefix.patch20
-rw-r--r--gnu/packages/patches/meson-for-build-rpath.patch24
-rw-r--r--gnu/packages/patches/metabat-fix-compilation.patch39
-rw-r--r--gnu/packages/patches/mit-krb5-hurd.patch15
-rw-r--r--gnu/packages/patches/mit-krb5-qualify-short-hostnames.patch29
-rw-r--r--gnu/packages/patches/mpg321-gcc-10.patch83
-rw-r--r--gnu/packages/patches/network-manager-meson.patch21
-rw-r--r--gnu/packages/patches/network-manager-plugin-path.patch69
-rw-r--r--gnu/packages/patches/nss-getcwd-nonnull.patch30
-rw-r--r--gnu/packages/patches/ocaml-4.09-multiple-definitions.patch41
-rw-r--r--gnu/packages/patches/ocaml-multiple-definitions.patch43
-rw-r--r--gnu/packages/patches/p11-kit-hurd.patch46
-rw-r--r--gnu/packages/patches/perl-cross.patch60
-rw-r--r--gnu/packages/patches/perl-deterministic-ordering.patch29
-rw-r--r--gnu/packages/patches/perl-io-socket-ssl-openssl-1.0.2f-fix.patch33
-rw-r--r--gnu/packages/patches/perl-no-sys-dirs.patch99
-rw-r--r--gnu/packages/patches/pipewire-0.2.7-fno-common.patch51
-rw-r--r--gnu/packages/patches/pitivi-fix-build-with-meson-0.60.patch46
-rw-r--r--gnu/packages/patches/polkit-CVE-2021-3560.patch21
-rw-r--r--gnu/packages/patches/polkit-configure-elogind.patch15
-rw-r--r--gnu/packages/patches/polkit-use-duktape.patch5030
-rw-r--r--gnu/packages/patches/python-2.7-no-static-lib.patch70
-rw-r--r--gnu/packages/patches/python-3-fix-tests.patch194
-rw-r--r--gnu/packages/patches/python-3-hurd-configure.patch27
-rw-r--r--gnu/packages/patches/python-3-no-static-lib.patch75
-rw-r--r--gnu/packages/patches/python-3.8-CVE-2021-3177.patch194
-rw-r--r--gnu/packages/patches/python-3.8-fix-tests.patch42
-rw-r--r--gnu/packages/patches/python-3.9-fix-tests.patch370
-rw-r--r--gnu/packages/patches/python-babel-fix-parse-future-test.patch68
-rw-r--r--gnu/packages/patches/python-chai-drop-python2.patch32
-rw-r--r--gnu/packages/patches/python-docopt-pytest6-compat.patch29
-rw-r--r--gnu/packages/patches/python-fixtures-remove-monkeypatch-test.patch59
-rw-r--r--gnu/packages/patches/python-poppler-qt5-fix-build.patch116
-rw-r--r--gnu/packages/patches/python-pyflakes-test-location.patch42
-rw-r--r--gnu/packages/patches/python-random2-getrandbits-test.patch23
-rw-r--r--gnu/packages/patches/python-testtools.patch57
-rw-r--r--gnu/packages/patches/python-typing-inspect-fix.patch38
-rw-r--r--gnu/packages/patches/python-werkzeug-tests.patch58
-rw-r--r--gnu/packages/patches/qtwebkit-fix-building-with-bison-3.7.patch54
-rw-r--r--gnu/packages/patches/qtwebkit-fix-building-with-glib-2.68.patch21
-rw-r--r--gnu/packages/patches/qtwebkit-fix-building-with-icu-68.patch152
-rw-r--r--gnu/packages/patches/qtwebkit-fix-building-with-python-3.9.patch35
-rw-r--r--gnu/packages/patches/range-v3-build-with-gcc10.patch122
-rw-r--r--gnu/packages/patches/rust-1.19-mrustc.patch28
-rw-r--r--gnu/packages/patches/rust-1.25-accept-more-detailed-gdb-lines.patch111
-rw-r--r--gnu/packages/patches/rust-1.30-gdb-llvm.patch89
-rw-r--r--gnu/packages/patches/rust-1.45-linker-locale.patch14
-rw-r--r--gnu/packages/patches/rust-1.48-linker-locale.patch14
-rw-r--r--gnu/packages/patches/rust-bootstrap-stage0-test.patch55
-rw-r--r--gnu/packages/patches/rust-reproducible-builds.patch25
-rw-r--r--gnu/packages/patches/rustc-1.39.0-src.patch99
-rw-r--r--gnu/packages/patches/scalapack-blacs-mpi-deprecations.patch170
-rw-r--r--gnu/packages/patches/scalapack-gcc-10-compilation.patch5684
-rw-r--r--gnu/packages/patches/strace-readlink-tests.patch46
-rw-r--r--gnu/packages/patches/syslinux-gcc10.patch87
-rw-r--r--gnu/packages/patches/syslinux-strip-gnu-property.patch31
-rw-r--r--gnu/packages/patches/tcl-fix-cross-compilation.patch39
-rw-r--r--gnu/packages/patches/tcsh-fix-autotest.patch11
-rw-r--r--gnu/packages/patches/texlive-bin-poppler-0.83.patch52
-rw-r--r--gnu/packages/patches/texlive-bin-poppler-0.86.patch17
-rw-r--r--gnu/packages/patches/tor-sandbox-i686.patch36
-rw-r--r--gnu/packages/patches/transmission-remote-gtk-fix-appstream.patch61
-rw-r--r--gnu/packages/patches/vigra-python-compat.patch18
-rw-r--r--gnu/packages/patches/xf86-video-mach64-bool-to-boolean.patch79
-rw-r--r--gnu/packages/patches/xf86-video-nouveau-fixup-ABI.patch64
-rw-r--r--gnu/packages/patches/xygrib-fix-finding-data.patch131
-rw-r--r--gnu/packages/patches/zstd-CVE-2021-24031_CVE-2021-24032.patch68
-rw-r--r--gnu/packages/patches/zziplib-CVE-2018-16548.patch49
-rw-r--r--gnu/packages/patchutils.scm10
-rw-r--r--gnu/packages/pcre.scm50
-rw-r--r--gnu/packages/pdf.scm64
-rw-r--r--gnu/packages/pep.scm2
-rw-r--r--gnu/packages/perl-check.scm4
-rw-r--r--gnu/packages/perl.scm127
-rw-r--r--gnu/packages/perl6.scm1
-rw-r--r--gnu/packages/photo.scm32
-rw-r--r--gnu/packages/php.scm18
-rw-r--r--gnu/packages/pkg-config.scm38
-rw-r--r--gnu/packages/plotutils.scm54
-rw-r--r--gnu/packages/polkit.scm126
-rw-r--r--gnu/packages/presentation.scm4
-rw-r--r--gnu/packages/pretty-print.scm5
-rw-r--r--gnu/packages/protobuf.scm15
-rw-r--r--gnu/packages/pth.scm22
-rw-r--r--gnu/packages/pulseaudio.scm47
-rw-r--r--gnu/packages/pumpio.scm6
-rw-r--r--gnu/packages/python-build.scm214
-rw-r--r--gnu/packages/python-check.scm153
-rw-r--r--gnu/packages/python-compression.scm8
-rw-r--r--gnu/packages/python-crypto.scm38
-rw-r--r--gnu/packages/python-science.scm47
-rw-r--r--gnu/packages/python-web.scm374
-rw-r--r--gnu/packages/python-xyz.scm2806
-rw-r--r--gnu/packages/python.scm604
-rw-r--r--gnu/packages/qt.scm25
-rw-r--r--gnu/packages/radio.scm98
-rw-r--r--gnu/packages/rdf.scm1
-rw-r--r--gnu/packages/readline.scm19
-rw-r--r--gnu/packages/rpc.scm10
-rw-r--r--gnu/packages/rrdtool.scm4
-rw-r--r--gnu/packages/ruby.scm581
-rw-r--r--gnu/packages/rust-apps.scm14
-rw-r--r--gnu/packages/rust.scm1852
-rw-r--r--gnu/packages/samba.scm14
-rw-r--r--gnu/packages/scheme.scm16
-rw-r--r--gnu/packages/screen.scm5
-rw-r--r--gnu/packages/sdl.scm4
-rw-r--r--gnu/packages/security-token.scm26
-rw-r--r--gnu/packages/selinux.scm76
-rw-r--r--gnu/packages/sequoia.scm2
-rw-r--r--gnu/packages/serialization.scm61
-rw-r--r--gnu/packages/shells.scm27
-rw-r--r--gnu/packages/simulation.scm36
-rw-r--r--gnu/packages/skribilo.scm9
-rw-r--r--gnu/packages/slang.scm11
-rw-r--r--gnu/packages/solidity.scm92
-rw-r--r--gnu/packages/speech.scm7
-rw-r--r--gnu/packages/sphinx.scm54
-rw-r--r--gnu/packages/spice.scm20
-rw-r--r--gnu/packages/sqlite.scm70
-rw-r--r--gnu/packages/ssh.scm13
-rw-r--r--gnu/packages/statistics.scm48
-rw-r--r--gnu/packages/storage.scm66
-rw-r--r--gnu/packages/suckless.scm6
-rw-r--r--gnu/packages/swig.scm16
-rw-r--r--gnu/packages/sync.scm6
-rw-r--r--gnu/packages/syncthing.scm1
-rw-r--r--gnu/packages/syndication.scm48
-rw-r--r--gnu/packages/task-management.scm8
-rw-r--r--gnu/packages/tbb.scm37
-rw-r--r--gnu/packages/tcl.scm59
-rw-r--r--gnu/packages/telephony.scm12
-rw-r--r--gnu/packages/terminals.scm12
-rw-r--r--gnu/packages/tex.scm3400
-rw-r--r--gnu/packages/texinfo.scm27
-rw-r--r--gnu/packages/text-editors.scm58
-rw-r--r--gnu/packages/textutils.scm3
-rw-r--r--gnu/packages/time.scm10
-rw-r--r--gnu/packages/tls.scm454
-rw-r--r--gnu/packages/tmux.scm4
-rw-r--r--gnu/packages/tor.scm82
-rw-r--r--gnu/packages/tryton.scm330
-rw-r--r--gnu/packages/uml.scm3
-rw-r--r--gnu/packages/upnp.scm2
-rw-r--r--gnu/packages/valgrind.scm4
-rw-r--r--gnu/packages/version-control.scm131
-rw-r--r--gnu/packages/video.scm154
-rw-r--r--gnu/packages/vim.scm6
-rw-r--r--gnu/packages/virtualization.scm129
-rw-r--r--gnu/packages/vnc.scm4
-rw-r--r--gnu/packages/vpn.scm18
-rw-r--r--gnu/packages/vulkan.scm14
-rw-r--r--gnu/packages/w3m.scm13
-rw-r--r--gnu/packages/web-browsers.scm14
-rw-r--r--gnu/packages/web.scm69
-rw-r--r--gnu/packages/webkit.scm50
-rw-r--r--gnu/packages/wget.scm4
-rw-r--r--gnu/packages/wicd.scm5
-rw-r--r--gnu/packages/wine.scm4
-rw-r--r--gnu/packages/wm.scm69
-rw-r--r--gnu/packages/wxwidgets.scm10
-rw-r--r--gnu/packages/xdisorg.scm106
-rw-r--r--gnu/packages/xfce.scm12
-rw-r--r--gnu/packages/xiph.scm5
-rw-r--r--gnu/packages/xml.scm110
-rw-r--r--gnu/packages/xnee.scm4
-rw-r--r--gnu/packages/xorg.scm743
-rw-r--r--gnu/services.scm8
-rw-r--r--gnu/services/cups.scm3
-rw-r--r--gnu/services/databases.scm4
-rw-r--r--gnu/services/dbus.scm13
-rw-r--r--gnu/services/desktop.scm20
-rw-r--r--gnu/services/xorg.scm42
-rw-r--r--gnu/system.scm23
-rw-r--r--gnu/system/locale.scm3
-rw-r--r--gnu/system/shadow.scm8
-rw-r--r--gnu/system/vm.scm8
-rw-r--r--gnu/tests/audio.scm7
-rw-r--r--gnu/tests/base.scm45
-rw-r--r--gnu/tests/ci.scm9
-rw-r--r--gnu/tests/cups.scm7
-rw-r--r--gnu/tests/databases.scm24
-rw-r--r--gnu/tests/desktop.scm9
-rw-r--r--gnu/tests/dict.scm9
-rw-r--r--gnu/tests/docker.scm14
-rw-r--r--gnu/tests/file-sharing.scm7
-rw-r--r--gnu/tests/ganeti.scm7
-rw-r--r--gnu/tests/guix.scm14
-rw-r--r--gnu/tests/install.scm13
-rw-r--r--gnu/tests/ldap.scm7
-rw-r--r--gnu/tests/linux-modules.scm11
-rw-r--r--gnu/tests/mail.scm30
-rw-r--r--gnu/tests/messaging.scm23
-rw-r--r--gnu/tests/monitoring.scm15
-rw-r--r--gnu/tests/networking.scm42
-rw-r--r--gnu/tests/nfs.scm23
-rw-r--r--gnu/tests/package-management.scm8
-rw-r--r--gnu/tests/reconfigure.scm21
-rw-r--r--gnu/tests/rsync.scm7
-rw-r--r--gnu/tests/security-token.scm7
-rw-r--r--gnu/tests/singularity.scm9
-rw-r--r--gnu/tests/ssh.scm9
-rw-r--r--gnu/tests/telephony.scm7
-rw-r--r--gnu/tests/version-control.scm33
-rw-r--r--gnu/tests/virtualization.scm16
-rw-r--r--gnu/tests/web.scm36
-rw-r--r--guix/build-system/android-ndk.scm99
-rw-r--r--guix/build-system/ant.scm82
-rw-r--r--guix/build-system/asdf.scm146
-rw-r--r--guix/build-system/cargo.scm81
-rw-r--r--guix/build-system/chicken.scm96
-rw-r--r--guix/build-system/clojure.scm110
-rw-r--r--guix/build-system/cmake.scm221
-rw-r--r--guix/build-system/copy.scm77
-rw-r--r--guix/build-system/dub.scm89
-rw-r--r--guix/build-system/dune.scm87
-rw-r--r--guix/build-system/emacs.scm66
-rw-r--r--guix/build-system/font.scm65
-rw-r--r--guix/build-system/glib-or-gtk.scm264
-rw-r--r--guix/build-system/gnu.scm329
-rw-r--r--guix/build-system/go.scm194
-rw-r--r--guix/build-system/guile.scm170
-rw-r--r--guix/build-system/haskell.scm90
-rw-r--r--guix/build-system/julia.scm66
-rw-r--r--guix/build-system/linux-module.scm176
-rw-r--r--guix/build-system/maven.scm114
-rw-r--r--guix/build-system/meson.scm344
-rw-r--r--guix/build-system/minify.scm60
-rw-r--r--guix/build-system/node.scm65
-rw-r--r--guix/build-system/ocaml.scm84
-rw-r--r--guix/build-system/perl.scm77
-rw-r--r--guix/build-system/python.scm87
-rw-r--r--guix/build-system/qt.scm213
-rw-r--r--guix/build-system/r.scm68
-rw-r--r--guix/build-system/rakudo.scm62
-rw-r--r--guix/build-system/renpy.scm89
-rw-r--r--guix/build-system/ruby.scm72
-rw-r--r--guix/build-system/scons.scm76
-rw-r--r--guix/build-system/texlive.scm103
-rw-r--r--guix/build-system/trivial.scm97
-rw-r--r--guix/build-system/waf.scm88
-rw-r--r--guix/build/copy-build-system.scm11
-rw-r--r--guix/build/emacs-build-system.scm16
-rw-r--r--guix/build/glib-or-gtk-build-system.scm173
-rw-r--r--guix/build/gnu-build-system.scm220
-rw-r--r--guix/build/gremlin.scm121
-rw-r--r--guix/build/julia-build-system.scm48
-rw-r--r--guix/build/lisp-utils.scm2
-rw-r--r--guix/build/maven/pom.scm2
-rw-r--r--guix/build/meson-build-system.scm20
-rw-r--r--guix/build/meson-configuration.scm56
-rw-r--r--guix/build/minify-build-system.scm11
-rw-r--r--guix/build/python-build-system.scm144
-rw-r--r--guix/build/qt-build-system.scm1
-rw-r--r--guix/build/qt-utils.scm6
-rw-r--r--guix/build/rakudo-build-system.scm12
-rw-r--r--guix/build/rpath.scm59
-rw-r--r--guix/build/ruby-build-system.scm25
-rw-r--r--guix/build/syscalls.scm7
-rw-r--r--guix/build/texlive-build-system.scm50
-rw-r--r--guix/build/union.scm7
-rw-r--r--guix/build/utils.scm251
-rw-r--r--guix/deprecation.scm22
-rw-r--r--guix/derivations.scm31
-rw-r--r--guix/gexp.scm388
-rw-r--r--guix/grafts.scm12
-rw-r--r--guix/import/cran.scm6
-rw-r--r--guix/import/egg.scm14
-rw-r--r--guix/import/elpa.scm7
-rw-r--r--guix/import/gem.scm8
-rw-r--r--guix/import/hackage.scm11
-rw-r--r--guix/import/opam.scm17
-rw-r--r--guix/import/print.scm34
-rw-r--r--guix/import/pypi.scm13
-rw-r--r--guix/lint.scm36
-rw-r--r--guix/packages.scm863
-rw-r--r--guix/profiles.scm50
-rw-r--r--guix/scripts/pack.scm29
-rw-r--r--guix/scripts/style.scm548
-rw-r--r--guix/status.scm2
-rw-r--r--guix/store.scm6
-rw-r--r--guix/store/roots.scm2
-rw-r--r--guix/svn-download.scm4
-rw-r--r--guix/tests.scm69
-rw-r--r--guix/utils.scm225
-rw-r--r--m4/guix.m44
-rw-r--r--po/guix/POTFILES.in1
-rw-r--r--tests/build-utils.scm49
-rw-r--r--tests/builders.scm132
-rw-r--r--tests/cran.scm10
-rw-r--r--tests/egg.scm27
-rw-r--r--tests/gem.scm15
-rw-r--r--tests/gexp.scm54
-rw-r--r--tests/gremlin.scm88
-rw-r--r--tests/guix-build.sh2
-rw-r--r--tests/guix-environment.sh8
-rw-r--r--tests/guix-shell.sh6
-rw-r--r--tests/hackage.scm22
-rw-r--r--tests/lint.scm16
-rw-r--r--tests/opam.scm9
-rw-r--r--tests/pack.scm4
-rw-r--r--tests/packages.scm292
-rw-r--r--tests/print.scm4
-rw-r--r--tests/pypi.scm27
-rw-r--r--tests/store.scm3
-rw-r--r--tests/style.scm366
-rw-r--r--tests/utils.scm17
670 files changed, 49477 insertions, 33196 deletions
diff --git a/.dir-locals.el b/.dir-locals.el
index aaa48ab552..12a6f08739 100644
--- a/.dir-locals.el
+++ b/.dir-locals.el
@@ -57,6 +57,12 @@
(eval . (put 'substitute* 'scheme-indent-function 1))
(eval . (put 'match-record 'scheme-indent-function 2))
+ ;; 'modify-inputs' and its keywords.
+ (eval . (put 'modify-inputs 'scheme-indent-function 1))
+ (eval . (put 'replace 'scheme-indent-function 1))
+ (eval . (put 'prepend 'scheme-indent-function 2))
+ (eval . (put 'append 'scheme-indent-function 2))
+
;; 'modify-phases' and its keywords.
(eval . (put 'modify-phases 'scheme-indent-function 1))
(eval . (put 'replace 'scheme-indent-function 1))
@@ -120,6 +126,7 @@
(eval . (put 'with-extensions 'scheme-indent-function 1))
(eval . (put 'with-parameters 'scheme-indent-function 1))
(eval . (put 'let-system 'scheme-indent-function 1))
+ (eval . (put 'with-build-variables 'scheme-indent-function 2))
(eval . (put 'with-database 'scheme-indent-function 2))
(eval . (put 'call-with-database 'scheme-indent-function 1))
diff --git a/Makefile.am b/Makefile.am
index f7e7b5184f..c4ccee65f1 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -229,7 +229,6 @@ MODULES = \
guix/build/union.scm \
guix/build/profiles.scm \
guix/build/compile.scm \
- guix/build/rpath.scm \
guix/build/cvs.scm \
guix/build/svn.scm \
guix/build/syscalls.scm \
@@ -240,6 +239,7 @@ MODULES = \
guix/build/emacs-utils.scm \
guix/build/java-utils.scm \
guix/build/lisp-utils.scm \
+ guix/build/meson-configuration.scm \
guix/build/maven/java.scm \
guix/build/maven/plugin.scm \
guix/build/maven/pom.scm \
@@ -294,6 +294,7 @@ MODULES = \
guix/scripts/refresh.scm \
guix/scripts/repl.scm \
guix/scripts/describe.scm \
+ guix/scripts/style.scm \
guix/scripts/system.scm \
guix/scripts/system/search.scm \
guix/scripts/system/reconfigure.scm \
@@ -400,6 +401,8 @@ AUX_FILES = \
gnu/packages/aux-files/linux-libre/4.4-i686.conf \
gnu/packages/aux-files/linux-libre/4.4-x86_64.conf \
gnu/packages/aux-files/pack-audit.c \
+ gnu/packages/aux-files/python/sanity-check.py \
+ gnu/packages/aux-files/python/sitecustomize.py \
gnu/packages/aux-files/run-in-namespace.c
# Templates, examples.
@@ -514,6 +517,7 @@ SCM_TESTS = \
tests/swh.scm \
tests/syscalls.scm \
tests/system.scm \
+ tests/style.scm \
tests/texlive.scm \
tests/transformations.scm \
tests/ui.scm \
diff --git a/doc/build.scm b/doc/build.scm
index e7b42be17c..eebb493a2e 100644
--- a/doc/build.scm
+++ b/doc/build.scm
@@ -725,7 +725,7 @@ makeinfo OPTIONS."
;; accented letters.
;;
;; (define texlive
- ;; (texlive-union (list texlive-tex-texinfo
+ ;; (texlive-updmap.cfg (list texlive-tex-texinfo
;; texlive-generic-epsf
;; texlive-fonts-ec)))
diff --git a/doc/guix-cookbook.texi b/doc/guix-cookbook.texi
index dc52f6d38c..88d3b98394 100644
--- a/doc/guix-cookbook.texi
+++ b/doc/guix-cookbook.texi
@@ -795,10 +795,8 @@ another, more sophisticated package (slightly modified from the source):
"17pjvprmdrx4h6bb1hhc98w9qi6ki7yl57f090n9kbhswxqfs7s3"))
(patches (search-patches "libgit2-mtime-0.patch"))
(modules '((guix build utils)))
- (snippet '(begin
- ;; Remove bundled software.
- (delete-file-recursively "deps")
- #true))))
+ ;; Remove bundled software.
+ (snippet '(delete-file-recursively "deps"))))
(build-system cmake-build-system)
(outputs '("out" "debug"))
(arguments
@@ -812,23 +810,19 @@ another, more sophisticated package (slightly modified from the source):
(("#!/bin/sh") (string-append "#!" (which "sh"))))
(substitute* "tests/clar/fs.h"
(("/bin/cp") (which "cp"))
- (("/bin/rm") (which "rm")))
- #true))
+ (("/bin/rm") (which "rm")))))
;; Run checks more verbosely.
(replace 'check
(lambda _ (invoke "./libgit2_clar" "-v" "-Q")))
(add-after 'unpack 'make-files-writable-for-tests
(lambda _ (for-each make-file-writable (find-files "." ".*")))))))
(inputs
- `(("libssh2" ,libssh2)
- ("http-parser" ,http-parser)
- ("python" ,python-wrapper)))
+ (list libssh2 http-parser python-wrapper))
(native-inputs
- `(("pkg-config" ,pkg-config)))
+ (list pkg-config))
(propagated-inputs
;; These two libraries are in 'Requires.private' in libgit2.pc.
- `(("openssl" ,openssl)
- ("zlib" ,zlib)))
+ (list openssl zlib))
(home-page "https://libgit2.github.com/")
(synopsis "Library providing Git core methods")
(description
@@ -892,22 +886,6 @@ Snippets might need additional Guile modules which can be imported from the
@subsubsection Inputs
-First, a syntactic comment: See the quasi-quote / comma syntax?
-
-@lisp
- (native-inputs
- `(("pkg-config" ,pkg-config)))
-@end lisp
-
-is equivalent to
-
-@lisp
- (native-inputs
- (list (list "pkg-config" pkg-config)))
-@end lisp
-
-You'll mostly see the former because it's shorter.
-
There are 3 different input types. In short:
@table @asis
@@ -941,6 +919,24 @@ It also matters when a substitute is available, in which case only the @emph{inp
and @emph{propagated inputs} will be fetched: the @emph{native inputs} are not required to
install a package from a substitute.
+@quotation Note
+You may see here and there snippets where package inputs are written
+quite differently, like so:
+
+@lisp
+;; The "old style" for inputs.
+(inputs
+ `(("libssh2" ,libssh2)
+ ("http-parser" ,http-parser)
+ ("python" ,python-wrapper)))
+@end lisp
+
+This is the ``old style'', where each input in the list is explicitly
+given a label (a string). It is still supported but we recommend using
+the style above instead. @xref{package Reference,,, guix, GNU Guix
+Reference Manual}, for more info.
+@end quotation
+
@subsubsection Outputs
Just like how a package can have multiple inputs, it can also produce multiple
diff --git a/doc/guix.texi b/doc/guix.texi
index 757e44398c..49dd80e9dc 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -96,6 +96,7 @@ Copyright @copyright{} 2021 Domagoj Stolfa@*
Copyright @copyright{} 2021 Hui Lu@*
Copyright @copyright{} 2021 pukkamustard@*
Copyright @copyright{} 2021 Alice Brenon@*
+Copyright @copyright{} 2021 Josselin Poiret@*
Copyright @copyright{} 2021 Andrew Tropin@*
Copyright @copyright{} 2021 Sarah Morgensen@*
Copyright @copyright{} 2021 Josselin Poiret@*
@@ -297,6 +298,7 @@ Utilities
* Invoking guix hash:: Computing the cryptographic hash of a file.
* Invoking guix import:: Importing package definitions.
* Invoking guix refresh:: Updating package definitions.
+* Invoking guix style:: Styling package definitions.
* Invoking guix lint:: Finding errors in package definitions.
* Invoking guix size:: Profiling disk usage.
* Invoking guix graph:: Visualizing the graph of packages.
@@ -1918,12 +1920,12 @@ themselves.
@subsection X11 Fonts
@cindex fonts
-The majority of graphical applications use Fontconfig to locate and
-load fonts and perform X11-client-side rendering. The @code{fontconfig}
-package in Guix looks for fonts in @file{$HOME/.guix-profile}
-by default. Thus, to allow graphical applications installed with Guix
-to display fonts, you have to install fonts with Guix as well.
-Essential font packages include @code{gs-fonts}, @code{font-dejavu}, and
+The majority of graphical applications use Fontconfig to locate and load
+fonts and perform X11-client-side rendering. The @code{fontconfig}
+package in Guix looks for fonts in @file{$HOME/.guix-profile} by
+default. Thus, to allow graphical applications installed with Guix to
+display fonts, you have to install fonts with Guix as well. Essential
+font packages include @code{font-ghostscript}, @code{font-dejavu}, and
@code{font-gnu-freefont}.
@cindex @code{fc-cache}
@@ -2822,8 +2824,8 @@ you should add them to @file{~/.bash_profile} (or equivalent file if you
do not use Bash) so that environment variables are set next time you
spawn a shell. You only need to do this once and other search paths
environment variables will be taken care of similarly---e.g., if you
-eventually install @code{python} and Python libraries, @code{PYTHONPATH}
-will be defined.
+eventually install @code{python} and Python libraries,
+@env{GUIX_PYTHONPATH} will be defined.
You can go on installing packages at your will. To list installed
packages, run:
@@ -3578,24 +3580,26 @@ Show details about @var{package}, taken from the list of available packages, in
recutils manual}).
@example
-$ guix package --show=python | recsel -p name,version
-name: python
-version: 2.7.6
+$ guix package --show=guile | recsel -p name,version
+name: guile
+version: 3.0.5
+
+name: guile
+version: 3.0.2
-name: python
-version: 3.3.5
+name: guile
+version: 2.2.7
+@dots{}
@end example
You may also specify the full name of a package to only get details about a
specific version of it (this time using the @command{guix show} alias):
@example
-$ guix show python@@3.4 | recsel -p name,version
-name: python
-version: 3.4.3
+$ guix show guile@@3.0.5 | recsel -p name,version
+name: guile
+version: 3.0.5
@end example
-
-
@item --list-installed[=@var{regexp}]
@itemx -I [@var{regexp}]
List the currently installed packages in the specified profile, with the
@@ -6033,11 +6037,11 @@ guix environment guile -- make -j4
In other situations, it is more convenient to specify the list of
packages needed in the environment. For example, the following command
-runs @command{python} from an environment containing Python@tie{}2.7 and
+runs @command{python} from an environment containing Python@tie{}3 and
NumPy:
@example
-guix environment --ad-hoc python2-numpy python-2.7 -- python
+guix environment --ad-hoc python-numpy python -- python3
@end example
Furthermore, one might want the dependencies of a package and also some
@@ -6917,7 +6921,7 @@ package looks like this:
"0ssi1wpaf7plaswqqjwigppsg5fyh99vdlb9kzl7c9lng89ndq1i"))))
(build-system gnu-build-system)
(arguments '(#:configure-flags '("--enable-silent-rules")))
- (inputs `(("gawk" ,gawk)))
+ (inputs (list gawk))
(synopsis "Hello, GNU world: An example GNU package")
(description "Guess what GNU Hello prints!")
(home-page "https://www.gnu.org/software/hello/")
@@ -7005,8 +7009,8 @@ Reference Manual}).
@item
The @code{inputs} field specifies inputs to the build process---i.e.,
-build-time or run-time dependencies of the package. Here, we define an
-input called @code{"gawk"} whose value is that of the @code{gawk}
+build-time or run-time dependencies of the package. Here, we add
+an input, a reference to the @code{gawk}
variable; @code{gawk} is itself bound to a @code{<package>} object.
@cindex backquote (quasiquote)
@@ -7131,20 +7135,42 @@ list, typically containing sequential keyword-value pairs.
@itemx @code{native-inputs} (default: @code{'()})
@itemx @code{propagated-inputs} (default: @code{'()})
@cindex inputs, of packages
-These fields list dependencies of the package. Each one is a list of
-tuples, where each tuple has a label for the input (a string) as its
+These fields list dependencies of the package. Each element of these
+lists is either a package, origin, or other ``file-like object''
+(@pxref{G-Expressions}); to specify the output of that file-like object
+that should be used, pass a two-element list where the second element is
+the output (@pxref{Packages with Multiple Outputs}, for more on package
+outputs). For example, the list below specifies three inputs:
+
+@lisp
+(list libffi libunistring
+ `(,glib "bin")) ;the "bin" output of GLib
+@end lisp
+
+In the example above, the @code{"out"} output of @code{libffi} and
+@code{libunistring} is used.
+
+@quotation Compatibility Note
+Until version 1.3.0, input lists were a list of tuples,
+where each tuple has a label for the input (a string) as its
first element, a package, origin, or derivation as its second element,
and optionally the name of the output thereof that should be used, which
-defaults to @code{"out"} (@pxref{Packages with Multiple Outputs}, for
-more on package outputs). For example, the list below specifies three
-inputs:
+defaults to @code{"out"}. For example, the list below is equivalent to
+the one above, but using the @dfn{old input style}:
@lisp
+;; Old input style (deprecated).
`(("libffi" ,libffi)
("libunistring" ,libunistring)
- ("glib:bin" ,glib "bin")) ;the "bin" output of Glib
+ ("glib:bin" ,glib "bin")) ;the "bin" output of GLib
@end lisp
+This style is now deprecated; it is still supported but support will be
+removed in a future version. It should not be used for new package
+definitions. @xref{Invoking guix style}, on how to migrate to the new
+style.
+@end quotation
+
@cindex cross compilation, package dependencies
The distinction between @code{native-inputs} and @code{inputs} is
necessary when considering cross-compilation. When cross-compiling,
@@ -7230,13 +7256,37 @@ cross-compiling:
;; When cross-compiled, Guile, for example, depends on
;; a native version of itself. Add it here.
(native-inputs (if (%current-target-system)
- `(("self" ,this-package))
+ (list this-package)
'())))
@end lisp
It is an error to refer to @code{this-package} outside a package definition.
@end deffn
+The following helper procedures are provided to help deal with package
+inputs.
+
+@deffn {Scheme Procedure} lookup-package-input @var{package} @var{name}
+@deffnx {Scheme Procedure} lookup-package-native-input @var{package} @var{name}
+@deffnx {Scheme Procedure} lookup-package-propagated-input @var{package} @var{name}
+@deffnx {Scheme Procedure} lookup-package-direct-input @var{package} @var{name}
+Look up @var{name} among @var{package}'s inputs (or native, propagated,
+or direct inputs). Return it if found, @code{#f} otherwise.
+
+@var{name} is the name of a package depended on. Here's how you might
+use it:
+
+@lisp
+(use-modules (guix packages) (gnu packages base))
+
+(lookup-package-direct-input coreutils "gmp")
+@result{} #<package gmp@@6.2.1 @dots{}>
+@end lisp
+
+In this example we obtain the @code{gmp} package that is among the
+direct inputs of @code{coreutils}.
+@end deffn
+
@cindex development inputs, of a package
@cindex implicit inputs, of a package
Sometimes you will want to obtain the list of inputs needed to
@@ -7558,20 +7608,42 @@ optional dependency, you can define a variant that removes that
dependency like so:
@lisp
-(use-modules (gnu packages gdb) ;for 'gdb'
- (srfi srfi-1)) ;for 'alist-delete'
+(use-modules (gnu packages gdb)) ;for 'gdb'
(define gdb-sans-guile
(package
(inherit gdb)
- (inputs (alist-delete "guile"
- (package-inputs gdb)))))
+ (inputs (modify-inputs (package-inputs gdb)
+ (delete "guile")))))
@end lisp
-The @code{alist-delete} call above removes the tuple from the
-@code{inputs} field that has @code{"guile"} as its first element
-(@pxref{SRFI-1 Association Lists,,, guile, GNU Guile Reference
-Manual}).
+The @code{modify-inputs} form above removes the @code{"guile"} package
+from the @code{inputs} field of @code{gdb}. The @code{modify-inputs}
+macro is a helper that can prove useful anytime you want to remove, add,
+or replace package inputs.
+
+@deffn {Scheme Syntax} modify-inputs @var{inputs} @var{clauses}
+Modify the given package inputs, as returned by @code{package-inputs} & co.,
+according to the given clauses. The example below removes the GMP and ACL
+inputs of Coreutils and adds libcap to the back of the input list:
+
+@lisp
+(modify-inputs (package-inputs coreutils)
+ (delete "gmp" "acl")
+ (append libcap))
+@end lisp
+
+The example below replaces the @code{guile} package from the inputs of
+@code{guile-redis} with @code{guile-2.2}:
+
+@lisp
+(modify-inputs (package-inputs guile-redis)
+ (replace "guile" guile-2.2))
+@end lisp
+
+The last type of clause is @code{prepend}, to add inputs to the front of
+the list.
+@end deffn
In some cases, you may find it useful to write functions
(``procedures'', in Scheme parlance) that return a package based on some
@@ -7588,8 +7660,7 @@ depends on it:
(name name)
(version "3.0")
;; several fields omitted
- (inputs
- `(("lua" ,lua)))
+ (inputs (list lua))
(synopsis "Socket library for Lua")))
(define-public lua5.1-socket
@@ -8429,8 +8500,9 @@ packages, which consists in running @code{python setup.py build} and
then @code{python setup.py install --prefix=/gnu/store/@dots{}}.
For packages that install stand-alone Python programs under @code{bin/},
-it takes care of wrapping these programs so that their @env{PYTHONPATH}
-environment variable points to all the Python libraries they depend on.
+it takes care of wrapping these programs so that their
+@env{GUIX_PYTHONPATH} environment variable points to all the Python
+libraries they depend on.
Which Python package is used to perform the build can be specified with
the @code{#:python} parameter. This is a useful way to force a package
@@ -8442,6 +8514,13 @@ By default guix calls @code{setup.py} under control of
@code{setuptools}, much like @command{pip} does. Some packages are not
compatible with setuptools (and pip), thus you can disable this by
setting the @code{#:use-setuptools?} parameter to @code{#f}.
+
+If a @code{"python"} output is available, the package is installed into it
+instead of the default @code{"out"} output. This is useful for packages that
+include a Python package as only a part of the software, and thus want to
+combine the phases of @code{python-build-system} with another build system.
+Python bindings are a common usecase.
+
@end defvr
@defvr {Scheme Variable} perl-build-system
@@ -8662,9 +8741,7 @@ implements the build procedure for packages that use
It adds both Meson and @uref{https://ninja-build.org/, Ninja} to the set
of inputs, and they can be changed with the parameters @code{#:meson}
-and @code{#:ninja} if needed. The default Meson is
-@code{meson-for-build}, which is special because it doesn't clear the
-@code{RUNPATH} of binaries and libraries when they are installed.
+and @code{#:ninja} if needed.
This build system is an extension of @code{gnu-build-system}, but with the
following phases changed to some specific for Meson:
@@ -8682,8 +8759,10 @@ The phase runs @code{ninja} to build the package in parallel by default, but
this can be changed with @code{#:parallel-build?}.
@item check
-The phase runs @code{ninja} with the target specified in @code{#:test-target},
-which is @code{"test"} by default.
+The phase runs @samp{meson test} with a base set of options that cannot
+be overridden. This base set of options can be extended via the
+@code{#:test-options} argument, for example to select or skip a specific
+test suite.
@item install
The phase runs @code{ninja install} and can not be changed.
@@ -8695,11 +8774,11 @@ Apart from that, the build system also adds the following phases:
@item fix-runpath
This phase ensures that all binaries can find the libraries they need.
-It searches for required libraries in subdirectories of the package being
-built, and adds those to @code{RUNPATH} where needed. It also removes
-references to libraries left over from the build phase by
-@code{meson-for-build}, such as test dependencies, that aren't actually
-required for the program to run.
+It searches for required libraries in subdirectories of the package
+being built, and adds those to @code{RUNPATH} where needed. It also
+removes references to libraries left over from the build phase by
+@code{meson}, such as test dependencies, that aren't actually required
+for the program to run.
@item glib-or-gtk-wrap
This phase is the phase provided by @code{glib-or-gtk-build-system}, and it
@@ -9078,12 +9157,14 @@ Make @var{file} writable for its owner.
@end deffn
@deffn {Scheme Procedure} copy-recursively @var{source} @var{destination} @
- [#:log (current-output-port)] [#:follow-symlinks? #f] [#:keep-mtime? #f]
+ [#:log (current-output-port)] [#:follow-symlinks? #f] @
+ [#:copy-file copy-file] [#:keep-mtime? #f] [#:keep-permissions? #t]
Copy @var{source} directory to @var{destination}. Follow symlinks if
-@var{follow-symlinks?} is true; otherwise, just preserve them. When
-@var{keep-mtime?} is true, keep the modification time of the files in
-@var{source} on those of @var{destination}. Write verbose output to the
-@var{log} port.
+@var{follow-symlinks?} is true; otherwise, just preserve them. Call
+@var{copy-file} to copy regular files. When @var{keep-mtime?} is true,
+keep the modification time of the files in @var{source} on those of
+@var{destination}. When @var{keep-permissions?} is true, preserve file
+permissions. Write verbose output to the @var{log} port.
@end deffn
@deffn {Scheme Procedure} delete-file-recursively @var{dir} @
@@ -9167,6 +9248,31 @@ Return the complete file name for @var{program} as found in
@code{$PATH}, or @code{#f} if @var{program} could not be found.
@end deffn
+@deffn {Scheme Procedure} search-input-file @var{inputs} @var{name}
+@deffnx {Scheme Procedure} search-input-directory @var{inputs} @var{name}
+Return the complete file name for @var{name} as found in @var{inputs};
+@code{search-input-file} searches for a regular file and
+@code{search-input-directory} searches for a directory. If @var{name}
+could not be found, an exception is raised.
+
+Here, @var{inputs} must be an association list like @code{inputs} and
+@code{native-inputs} as available to build phases (@pxref{Build
+Phases}).
+@end deffn
+
+Here is a (simplified) example of how @code{search-input-file} is used
+in a build phase of the @code{wireguard-tools} package:
+
+@lisp
+(add-after 'install 'wrap-wg-quick
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (let ((coreutils (string-append (assoc-ref inputs "coreutils")
+ "/bin")))
+ (wrap-program (search-input-file outputs "bin/wg-quick")
+ #:sh (search-input-file inputs "bin/bash")
+ `("PATH" ":" prefix ,(list coreutils))))))
+@end lisp
+
@subsection Build Phases
@cindex build phases
@@ -10664,6 +10770,7 @@ the Scheme programming interface of Guix in a convenient way.
* Invoking guix hash:: Computing the cryptographic hash of a file.
* Invoking guix import:: Importing package definitions.
* Invoking guix refresh:: Updating package definitions.
+* Invoking guix style:: Styling package definitions.
* Invoking guix lint:: Finding errors in package definitions.
* Invoking guix size:: Profiling disk usage.
* Invoking guix graph:: Visualizing the graph of packages.
@@ -12579,6 +12686,102 @@ token procured from @uref{https://github.com/settings/tokens} or
otherwise.
+@node Invoking guix style
+@section Invoking @command{guix style}
+
+The @command{guix style} command helps packagers style their package
+definitions according to the latest fashionable trends. The command
+currently focuses on one aspect: the style of package inputs. It may
+eventually be extended to handle other stylistic matters.
+
+The way package inputs are written is going through a transition
+(@pxref{package Reference}, for more on package inputs). Until version
+1.3.0, package inputs were written using the ``old style'', where each
+input was given an explicit label, most of the time the package name:
+
+@lisp
+(package
+ ;; @dots{}
+ ;; The "old style" (deprecated).
+ (inputs `(("libunistring" ,libunistring)
+ ("libffi" ,libffi))))
+@end lisp
+
+Today, the old style is deprecated and the preferred style looks like
+this:
+
+@lisp
+(package
+ ;; @dots{}
+ ;; The "new style".
+ (inputs (list libunistring libffi)))
+@end lisp
+
+Likewise, uses of @code{alist-delete} and friends to manipulate inputs
+is now deprecated in favor of @code{modify-inputs} (@pxref{Defining
+Package Variants}, for more info on @code{modify-inputs}).
+
+In the vast majority of cases, this is a purely mechanical change on the
+surface syntax that does not even incur a package rebuild. Running
+@command{guix style} can do that for you, whether you're working on
+packages in Guix proper or in an external channel.
+
+The general syntax is:
+
+@example
+guix style [@var{options}] @var{package}@dots{}
+@end example
+
+This causes @command{guix style} to analyze and rewrite the definition
+of @var{package}@dots{}. It does so in a conservative way: preserving
+comments and bailing out if it cannot make sense of the code that
+appears in an inputs field. The available options are listed below.
+
+@table @code
+@item --dry-run
+@itemx -n
+Show source file locations that would be edited but do not modify them.
+
+@item --load-path=@var{directory}
+@itemx -L @var{directory}
+Add @var{directory} to the front of the package module search path
+(@pxref{Package Modules}).
+
+@item --expression=@var{expr}
+@itemx -e @var{expr}
+Style the package @var{expr} evaluates to.
+
+For example, running:
+
+@example
+guix style -e '(@@ (gnu packages gcc) gcc-5)'
+@end example
+
+styles the @code{gcc-5} package definition.
+
+@item --input-simplification=@var{policy}
+Specify the package input simplification policy for cases where an input
+label does not match the corresponding package name. @var{policy} may
+be one of the following:
+
+@table @code
+@item silent
+Simplify inputs only when the change is ``silent'', meaning that the
+package does not need to be rebuilt (its derivation is unchanged).
+
+@item safe
+Simplify inputs only when that is ``safe'' to do: the package might need
+to be rebuilt, but the change is known to have no observable effect.
+
+@item always
+Simplify inputs even when input labels do not match package names, and
+even if that might have an observable effect.
+@end table
+
+The default is @code{silent}, meaning that input simplifications do not
+trigger any package rebuild.
+@end table
+
@node Invoking guix lint
@section Invoking @command{guix lint}
@@ -12707,6 +12910,13 @@ declare them as in this example:
@item formatting
Warn about obvious source code formatting issues: trailing white space,
use of tabulations, etc.
+
+@item input-labels
+Report old-style input labels that do not match the name of the
+corresponding package. This aims to help migrate from the ``old input
+style''. @xref{package Reference}, for more information on package
+inputs and input styles. @xref{Invoking guix style}, on how to migrate
+to the new style.
@end table
The general syntax is:
@@ -18837,19 +19047,26 @@ example the @code{windowmaker} or @code{openbox} packages---preferably
by adding it to the @code{packages} field of your operating system
definition (@pxref{operating-system Reference, system-wide packages}).
+@anchor{wayland-gdm}
+GDM also supports Wayland: it can itself use Wayland instead of X11 for
+its user interface, and it can also start Wayland sessions. The former is
+required for the latter, to enable, set @code{wayland?} to @code{#t} in
+@code{gdm-configuration}.
+
@defvr {Scheme Variable} gdm-service-type
This is the type for the @uref{https://wiki.gnome.org/Projects/GDM/, GNOME
Desktop Manager} (GDM), a program that manages graphical display servers and
handles graphical user logins. Its value must be a @code{gdm-configuration}
(see below).
-@cindex session types (X11)
-@cindex X11 session types
+@cindex session types
GDM looks for @dfn{session types} described by the @file{.desktop} files in
-@file{/run/current-system/profile/share/xsessions} and allows users to choose
-a session from the log-in screen. Packages such as @code{gnome}, @code{xfce},
-and @code{i3} provide @file{.desktop} files; adding them to the system-wide
-set of packages automatically makes them available at the log-in screen.
+@file{/run/current-system/profile/share/xsessions} (for X11 sessions) and
+@file{/run/current-system/profile/share/wayland-sessions} (for Wayland
+sessions) and allows users to choose a session from the log-in screen.
+Packages such as @code{gnome}, @code{xfce}, @code{i3} and @code{sway} provide
+@file{.desktop} files; adding them to the system-wide set of packages
+automatically makes them available at the log-in screen.
In addition, @file{~/.xsession} files are honored. When available,
@file{~/.xsession} must be an executable that starts a window manager
@@ -18882,6 +19099,13 @@ File name of the @code{dbus-daemon} executable.
@item @code{gdm} (default: @code{gdm})
The GDM package to use.
+
+@item @code{wayland?} (default: @code{#f})
+When true, enables Wayland in GDM, necessary to use Wayland sessions.
+
+@item @code{wayland-session} (default: @code{gdm-wayland-session-wrapper})
+The Wayland session wrapper to use, needed to setup the
+environment.
@end table
@end deftp
@@ -19363,6 +19587,12 @@ programs.
Defaults to @samp{"lp"}.
@end deftypevr
+@deftypevr {@code{files-configuration} parameter} string log-file-group
+Specifies the group name or ID that will be used for log files.
+
+Defaults to @samp{"lpadmin"}.
+@end deftypevr
+
@deftypevr {@code{files-configuration} parameter} string log-file-perm
Specifies the permissions for all log files that the scheduler writes.
@@ -20103,11 +20333,12 @@ expected.
The desktop environments in Guix use the Xorg display server by
default. If you'd like to use the newer display server protocol
-called Wayland, you need to use the @code{sddm-service} instead of
-GDM as the graphical login manager. You should then
-select the ``GNOME (Wayland)'' session in SDDM@. Alternatively you can
-also try starting GNOME on Wayland manually from a TTY with the
-command ``XDG_SESSION_TYPE=wayland exec dbus-run-session
+called Wayland, you need to enable Wayland support in GDM
+(@pxref{wayland-gdm}). Another solution is to use the
+@code{sddm-service} instead of GDM as the graphical login manager.
+You should then select the ``GNOME (Wayland)'' session in SDDM@.
+Alternatively you can also try starting GNOME on Wayland manually from a
+TTY with the command ``XDG_SESSION_TYPE=wayland exec dbus-run-session
gnome-session``. Currently only GNOME has support for Wayland.
@defvr {Scheme Variable} gnome-desktop-service-type
@@ -20849,7 +21080,7 @@ configuration.
@item @code{ident-file} (default: @code{%default-postgres-ident})
Filename or G-expression for the user name mapping configuration.
-@item @code{socket-directory} (default: @code{#false})
+@item @code{socket-directory} (default: @code{"/var/run/postgresql"})
Specifies the directory of the Unix-domain socket(s) on which PostgreSQL
is to listen for connections from client applications. If set to
@code{""} PostgreSQL does not listen on any Unix-domain sockets, in
@@ -33606,8 +33837,7 @@ The common way to create this file is as follows:
(let* ((out (assoc-ref %outputs "out"))
(targetdir (string-append out "/share/" ,name))
(app (string-append out "/bin/" ,name))
- (Rbin (string-append (assoc-ref %build-inputs "r-min")
- "/bin/Rscript")))
+ (Rbin (search-input-file %build-inputs "/bin/Rscript")))
;; @dots{}
(mkdir-p (string-append out "/bin"))
(call-with-output-file app
@@ -35701,6 +35931,15 @@ are created using @code{define-record-type*}, you can write a succinct
@var{body} that evaluates to the new service parameters by using the
@code{inherit} feature that @code{define-record-type*} provides.
+Clauses can also have the following form:
+
+@lisp
+(delete @var{type})
+@end lisp
+
+Such a clause removes all services of the given @var{type} from
+@var{services}.
+
@xref{Using the Configuration System}, for example usage.
@end deffn
@@ -37099,6 +37338,20 @@ GDB}):
From there on, GDB will pick up debugging information from the
@file{.debug} files under @file{~/.guix-profile/lib/debug}.
+Below is an alternative GDB script which is useful when working with
+other profiles. It takes advantage of the optional Guile integration in
+GDB. This snippet is included by default on Guix System in the
+@file{~/.gdbinit} file.
+
+@example
+guile
+(use-modules (gdb))
+(execute (string-append "set debug-file-directory "
+ (or (getenv "GDB_DEBUG_FILE_DIRECTORY")
+ "~/.guix-profile/lib/debug")))
+end
+@end example
+
In addition, you will most likely want GDB to be able to show the source
code being debugged. To do that, you will have to unpack the source
code of the package of interest (obtained with @code{guix build
diff --git a/etc/news.scm b/etc/news.scm
index 49b0664edd..46bac0b625 100644
--- a/etc/news.scm
+++ b/etc/news.scm
@@ -312,6 +312,54 @@ Ce recours à Software Heritage fonctionne aussi pour les autres clones Git que
Guix peut faire, comme lorsqu'on utilise @option{--with-commit} et les options
de transformation de paquet similaires.")))
+ (entry (commit "db4681a4c17d282a661552f2f57e5c453d02e414")
+ (title
+ (en "@code{gdm-service-type} now supports Wayland")
+ (fr "@code{gdm-service-type} prend maintenant en charge Wayland"))
+ (body
+ (en "@code{gdm-service-type} has been updated to support being launched
+as a Wayland client, and to launch Wayland sessions. The @code{wayland?} boolean
+field in @code{gdm-configuration} controls whether GDM starts in Wayland or X
+mode. See @command{info \"(guix) X Window\"} for more information.
+
+Wayland mode for GDM will soon become the default in Guix, so if your
+hardware doesn't support Wayland (Nvidia users are the most concerned here),
+please consider disabling it now.")
+ (fr "@code{gdm-service-type} a été mis à jour et peut maintenant être
+lancé comme client Wayland, ainsi que lancer des sessions Wayland. Le champ
+booléen @code{wayland?} de @code{gdm-configuration} contrôle le mode dans lequel
+GDM est lancé (Wayland ou X). Pour plus d'informations, voir
+@command{info \"(guix) X Window\"} (en anglais).
+
+GDM sera bientôt lancé en mode Wayland par défaut sur Guix, donc si votre matériel
+ne le prend pas en charge (les utilisateur·ices de cartes Nvidia sont les plus
+concerné·es), merci de le désactiver dès maintenant.")))
+
+ (entry (commit "f23803af2018a148fb088f2516d79c20d6bf95f0")
+ (title
+ (en "Input labels can now be omitted in package definitions"))
+ (body
+ (en "If you have written package definitions before, you may know
+that package inputs required a bit of boilerplate: each input needs to have an
+associated label (a string), which you can refer to in ``build-side code''.
+
+Input labels are now unnecessary, meaning that you can write code like:
+
+@lisp
+(package
+ ;; @dots{}
+ (inputs (list libunistring libffi libgc)))
+@end lisp
+
+Notice that the @code{inputs} field is simplified compared to the ``old
+style''. When needed, you can now use g-expressions (gexps) to refer to
+another package in build-side code. Additionally, the new
+@code{modify-inputs} macro facilitates common operations on inputs---deleting,
+replacing, adding inputs.
+
+To ease transition to the ``new style'', a new @command{guix style} command is
+provided. Run @command{info \"(guix) Invoking guix style\"} for more info.")))
+
(entry (commit "82daab42811a2e3c7684ebdf12af75ff0fa67b99")
(title
(en "New @samp{deb} format for the @command{guix pack} command")
diff --git a/etc/release-manifest.scm b/etc/release-manifest.scm
index 4375c9bf8b..e7e64efda4 100644
--- a/etc/release-manifest.scm
+++ b/etc/release-manifest.scm
@@ -125,8 +125,13 @@ TARGET."
(define %system-manifest
(manifest
(append-map (lambda (system)
- (map (cut package->manifest-entry* <> system)
- %system-packages))
+ ;; Some of %SYSTEM-PACKAGES are currently unsupported on some
+ ;; systems--e.g., GNOME on non-x86_64, due to Rust. Filter
+ ;; them out.
+ (filter-map (lambda (package)
+ (and (supported-package? package system)
+ (package->manifest-entry* package system)))
+ %system-packages))
'("x86_64-linux" "i686-linux")))) ;Guix System
(define %cross-manifest
diff --git a/gnu/build/marionette.scm b/gnu/build/marionette.scm
index fe754cd147..0ebe535526 100644
--- a/gnu/build/marionette.scm
+++ b/gnu/build/marionette.scm
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2016, 2017, 2018, 2019, 2020 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2016, 2017, 2018, 2019, 2020, 2021 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2018 Chris Marusich <cmmarusich@gmail.com>
;;;
;;; This file is part of GNU Guix.
@@ -20,6 +20,7 @@
(define-module (gnu build marionette)
#:use-module (srfi srfi-9)
#:use-module (srfi srfi-26)
+ #:use-module (srfi srfi-64)
#:use-module (rnrs io ports)
#:use-module (ice-9 match)
#:use-module (ice-9 popen)
@@ -33,7 +34,9 @@
marionette-screen-text
wait-for-screen-text
%qwerty-us-keystrokes
- marionette-type))
+ marionette-type
+
+ system-test-runner))
;;; Commentary:
;;;
@@ -358,4 +361,69 @@ to actual keystrokes."
(for-each (cut marionette-control <> marionette)
(string->keystroke-commands str keystrokes)))
+
+;;;
+;;; Test helper.
+;;;
+
+(define* (system-test-runner #:optional log-directory)
+ "Return a SRFI-64 test runner that calls 'exit' upon 'test-end'. When
+LOG-DIRECTORY is specified, create log file within it."
+ (let ((runner (test-runner-simple)))
+ ;; Log to a file under LOG-DIRECTORY.
+ (test-runner-on-group-begin! runner
+ (let ((on-begin (test-runner-on-group-begin runner)))
+ (lambda (runner suite-name count)
+ (when log-directory
+ (catch 'system-error
+ (lambda ()
+ (mkdir log-directory))
+ (lambda args
+ (unless (= (system-error-errno args) EEXIST)
+ (apply throw args))))
+ (set! test-log-to-file
+ (string-append log-directory "/" suite-name ".log")))
+ (on-begin runner suite-name count))))
+
+ ;; The default behavior on 'test-end' is to only write a line if the test
+ ;; failed. Arrange to also write a line on success.
+ (test-runner-on-test-end! runner
+ (let ((on-end (test-runner-on-test-end runner)))
+ (lambda (runner)
+ (let* ((kind (test-result-ref runner 'result-kind))
+ (results (test-result-alist runner))
+ (test-name (assq-ref results 'test-name)))
+ (unless (memq kind '(fail xpass))
+ (format (current-output-port) "~a: ~a~%"
+ (string-upcase (symbol->string kind))
+ test-name)))
+
+ (on-end runner))))
+
+ ;; On 'test-end', display test results and exit with zero if and only if
+ ;; there were no test failures.
+ (test-runner-on-final! runner
+ (lambda (runner)
+ (let ((success? (= (test-runner-fail-count runner) 0)))
+ (test-on-final-simple runner)
+
+ (when (not success?)
+ (let* ((log-port (test-runner-aux-value runner))
+ (log-file (port-filename log-port)))
+ (format (current-error-port)
+ "\nTests failed, dumping log file '~a'.\n\n"
+ log-file)
+
+ ;; At this point LOG-PORT is not closed yet; flush it.
+ (force-output log-port)
+
+ ;; Brute force to avoid dependency on (guix build utils) for
+ ;; 'dump-port'.
+ (let ((content (call-with-input-file log-file
+ get-bytevector-all)))
+ (put-bytevector (current-error-port) content))))
+
+ (exit success?))))
+ runner))
+
;;; marionette.scm ends here
diff --git a/gnu/build/vm.scm b/gnu/build/vm.scm
index 7b55127599..9d32824764 100644
--- a/gnu/build/vm.scm
+++ b/gnu/build/vm.scm
@@ -164,8 +164,8 @@ the #:references-graphs parameter of 'derivation'."
"-cpu" "max"
"-m" (number->string memory-size)
"-nic" "user,model=virtio-net-pci"
- "-object" "rng-random,filename=/dev/urandom,id=guixsd-vm-rng"
- "-device" "virtio-rng-pci,rng=guixsd-vm-rng"
+ "-object" "rng-random,filename=/dev/urandom,id=guix-vm-rng"
+ "-device" "virtio-rng-pci,rng=guix-vm-rng"
"-virtfs"
(string-append "local,id=store_dev,path="
(%store-directory)
diff --git a/gnu/ci.scm b/gnu/ci.scm
index 289e2a98c2..6039af8f07 100644
--- a/gnu/ci.scm
+++ b/gnu/ci.scm
@@ -69,7 +69,6 @@
#:export (derivation->job
image->job
- %bootstrap-packages
%core-packages
%cross-targets
channel-source->package
@@ -130,7 +129,7 @@ building the derivation."
(define (package-cross-job store job-name package target system)
"Return a job called TARGET.JOB-NAME that cross-builds PACKAGE for TARGET on
SYSTEM."
- (let ((name (string-append target "." job-name "." system)))
+ (let ((name (string-append target "." job-name)))
(package-job store name package system
#:cross? #t
#:target target)))
@@ -139,9 +138,9 @@ SYSTEM."
;; Note: Don't put the '-final' package variants because (1) that's
;; implicit, and (2) they cannot be cross-built (due to the explicit input
;; chain.)
- (list gcc-7 gcc-8 gcc-9 gcc-10 glibc binutils
+ (list gcc-8 gcc-9 gcc-10 gcc-11 glibc binutils
gmp mpfr mpc coreutils findutils diffutils patch sed grep
- gawk gnu-gettext hello guile-2.0 guile-2.2 zlib gzip xz guix
+ gawk gnu-gettext hello guile-2.2 guile-3.0 zlib gzip xz guix
%bootstrap-binaries-tarball
%binutils-bootstrap-tarball
(%glibc-bootstrap-tarball)
@@ -149,13 +148,18 @@ SYSTEM."
%guile-bootstrap-tarball
%bootstrap-tarballs))
-(define %bootstrap-packages
- ;; Return the list of bootstrap packages from the commencement module.
- (filter package?
- (module-map
- (lambda (sym var)
- (variable-ref var))
- (resolve-module '(gnu packages commencement)))))
+(define (commencement-packages system)
+ "Return the list of bootstrap packages from the commencement module for
+SYSTEM."
+ ;; Only include packages supported on SYSTEM. For example, the Mes
+ ;; bootstrap graph is currently not supported on ARM so it should be
+ ;; excluded.
+ (filter (lambda (obj)
+ (and (package? obj)
+ (supported-package? obj system)))
+ (module-map (lambda (sym var)
+ (variable-ref var))
+ (resolve-module '(gnu packages commencement)))))
(define (packages-to-cross-build target)
"Return the list of packages to cross-build for TARGET."
@@ -297,20 +301,16 @@ otherwise use the IMAGE name."
(define channel-build-system
;; Build system used to "convert" a channel instance to a package.
- (let* ((build (lambda* (store name inputs
- #:key source commit system
- #:allow-other-keys)
- (run-with-store store
- ;; SOURCE can be a lowerable object such as <local-file>
- ;; or a file name. Adjust accordingly.
- (mlet* %store-monad ((source (if (string? source)
- (return source)
- (lower-object source)))
- (instance
- -> (checkout->channel-instance
- source #:commit commit)))
- (channel-instances->derivation (list instance)))
- #:system system)))
+ (let* ((build (lambda* (name inputs
+ #:key source commit system
+ #:allow-other-keys)
+ (mlet* %store-monad ((source (if (string? source)
+ (return source)
+ (lower-object source)))
+ (instance
+ -> (checkout->channel-instance
+ source #:commit commit)))
+ (channel-instances->derivation (list instance)))))
(lower (lambda* (name #:key system source commit
#:allow-other-keys)
(bag
@@ -538,7 +538,7 @@ names."
(map (lambda (package)
(package-job store (job-name package)
package system))
- (append %bootstrap-packages %core-packages))
+ (append (commencement-packages system) %core-packages))
(cross-jobs store system)))
('guix
;; Build Guix modules only.
diff --git a/gnu/installer/keymap.scm b/gnu/installer/keymap.scm
index c42b308009..83b65a0427 100644
--- a/gnu/installer/keymap.scm
+++ b/gnu/installer/keymap.scm
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2018 Mathieu Othacehe <m.othacehe@gmail.com>
+;;; Copyright © 2018, 2021 Mathieu Othacehe <othacehe@gnu.org>
;;; Copyright © 2020 Florian Pelz <pelzflorian@pelzflorian.de>
;;;
;;; This file is part of GNU Guix.
@@ -79,6 +79,11 @@
"Parse FILE and return two values, the list of supported X11-KEYMAP-MODEL
and X11-KEYMAP-LAYOUT records. FILE is an XML file from the X Keyboard
Configuration Database, describing possible XKB configurations."
+ (define maybe-empty
+ (match-lambda
+ ((x) x)
+ (#f "")))
+
(define (model m)
(sxml-match m
[(model
@@ -108,7 +113,7 @@ Configuration Database, describing possible XKB configurations."
. ,rest-variant))
(x11-keymap-variant
(name name)
- (description (car
+ (description (maybe-empty
(assoc-ref rest-variant 'description))))]))
(define (layout l)
@@ -120,9 +125,9 @@ Configuration Database, describing possible XKB configurations."
(variantList ,[variant -> v] ...))
(x11-keymap-layout
(name name)
- (synopsis (car
+ (synopsis (maybe-empty
(assoc-ref rest-layout 'shortDescription)))
- (description (car
+ (description (maybe-empty
(assoc-ref rest-layout 'description)))
(variants (list v ...)))]
[(layout
@@ -131,9 +136,9 @@ Configuration Database, describing possible XKB configurations."
. ,rest-layout))
(x11-keymap-layout
(name name)
- (synopsis (car
+ (synopsis (maybe-empty
(assoc-ref rest-layout 'shortDescription)))
- (description (car
+ (description (maybe-empty
(assoc-ref rest-layout 'description)))
(variants '()))]))
diff --git a/gnu/installer/parted.scm b/gnu/installer/parted.scm
index ad7dd6bf91..289cd660fd 100644
--- a/gnu/installer/parted.scm
+++ b/gnu/installer/parted.scm
@@ -1418,9 +1418,11 @@ USER-PARTITIONS, or return nothing."
(let* ((uuids (map (lambda (file)
(uuid->string (read-partition-uuid file)))
swap-devices)))
- `((swap-devices (list ,@(map (lambda (uuid)
- `(uuid ,uuid))
- uuids))))))
+ `((swap-devices
+ (list ,@(map (lambda (uuid)
+ `(swap-space
+ (target (uuid ,uuid))))
+ uuids))))))
,@(if (null? encrypted-partitions)
'()
`((mapped-devices
diff --git a/gnu/local.mk b/gnu/local.mk
index f485e733e0..7e1cedf186 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -11,7 +11,7 @@
# Copyright © 2016 Ben Woodcroft <donttrustben@gmail.com>
# Copyright © 2016, 2017, 2018, 2019 Alex Vong <alexvong1995@gmail.com>
# Copyright © 2016, 2017, 2018, 2019, 2020, 2021 Efraim Flashner <efraim@flashner.co.il>
-# Copyright © 2016, 2017, 2018, 2019, 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
+# Copyright © 2016, 2017, 2018, 2019, 2020, 2021 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
# Copyright © 2017, 2018, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
# Copyright © 2017, 2018 Clément Lassieur <clement@lassieur.org>
# Copyright © 2017, 2020 Mathieu Othacehe <m.othacehe@gmail.com>
@@ -40,11 +40,13 @@
# Copyright © 2020 Malte Frank Gerdes <mate.f.gerdes@gmail.com>
# Copyright © 2020 Vinicius Monego <monego@posteo.net>
# Copyright © 2021 Björn Höfling <bjoern.hoefling@bjoernhoefling.de>
+# Copyright © 2021 Greg Hogan <code@greghogan.com>
# Copyright © 2021 Philip McGrath <philip@philipmcgrath.com>
# Copyright © 2021 Arun Isaac <arunisaac@systemreboot.net>
# Copyright © 2021 Sharlatan Hellseher <sharlatanus@gmail.com>
# Copyright © 2021 Dmitry Polyakov <polyakov@liltechdude.xyz>
# Copyright © 2021 Andrew Tropin <andrew@trop.in>
+# Copyright © 2021 Simon Tournier <zimon.toutoune@gmail.com>
#
# This file is part of GNU Guix.
#
@@ -539,6 +541,7 @@ GNU_SYSTEM_MODULES = \
%D%/packages/slang.scm \
%D%/packages/smalltalk.scm \
%D%/packages/sml.scm \
+ %D%/packages/solidity.scm \
%D%/packages/speech.scm \
%D%/packages/sphinx.scm \
%D%/packages/spice.scm \
@@ -821,7 +824,6 @@ dist_patch_DATA = \
%D%/packages/patches/abcl-fix-build-xml.patch \
%D%/packages/patches/ableton-link-system-libraries-debian.patch \
%D%/packages/patches/abiword-explictly-cast-bools.patch \
- %D%/packages/patches/abseil-cpp-fix-gtest.patch \
%D%/packages/patches/abseil-cpp-fix-strerror_test.patch \
%D%/packages/patches/adb-add-libraries.patch \
%D%/packages/patches/adb-libssl_11-compatibility.patch \
@@ -834,6 +836,7 @@ dist_patch_DATA = \
%D%/packages/patches/aegisub-boost68.patch \
%D%/packages/patches/aegisub-make43.patch \
%D%/packages/patches/agg-am_c_prototype.patch \
+ %D%/packages/patches/agg-2.5-gcc8.patch \
%D%/packages/patches/akonadi-paths.patch \
%D%/packages/patches/akonadi-not-relocatable.patch \
%D%/packages/patches/akonadi-timestamps.patch \
@@ -850,6 +853,7 @@ dist_patch_DATA = \
%D%/packages/patches/ath9k-htc-firmware-gcc.patch \
%D%/packages/patches/ath9k-htc-firmware-gcc-compat.patch \
%D%/packages/patches/ath9k-htc-firmware-objcopy.patch \
+ %D%/packages/patches/atlas-gfortran-compat.patch \
%D%/packages/patches/audacity-build-with-system-portaudio.patch \
%D%/packages/patches/audacity-add-include.patch \
%D%/packages/patches/audiofile-fix-datatypes-in-tests.patch \
@@ -870,6 +874,7 @@ dist_patch_DATA = \
%D%/packages/patches/avahi-localstatedir.patch \
%D%/packages/patches/avidemux-install-to-lib.patch \
%D%/packages/patches/awesome-reproducible-png.patch \
+ %D%/packages/patches/awesome-4.3-fno-common.patch \
%D%/packages/patches/aws-c-auth-install-private-headers.patch \
%D%/packages/patches/azr3.patch \
%D%/packages/patches/bash-reproducible-linux-pgrp-pipe.patch \
@@ -878,6 +883,7 @@ dist_patch_DATA = \
%D%/packages/patches/bastet-change-source-of-unordered_set.patch \
%D%/packages/patches/bazaar-CVE-2017-14176.patch \
%D%/packages/patches/bc-fix-cross-compilation.patch \
+ %D%/packages/patches/bdb-5.3-atomics-on-gcc-9.patch \
%D%/packages/patches/bear-disable-preinstall-tests.patch \
%D%/packages/patches/bind-re-add-attr-constructor-priority.patch \
%D%/packages/patches/brightnessctl-elogind-support.patch \
@@ -895,9 +901,8 @@ dist_patch_DATA = \
%D%/packages/patches/beancount-disable-googleapis-fonts.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-2.37-file-descriptor-leak.patch \
%D%/packages/patches/binutils-boot-2.20.1a.patch \
%D%/packages/patches/binutils-loongson-workaround.patch \
%D%/packages/patches/binutils-mingw-w64-timestamp.patch \
@@ -921,9 +926,12 @@ dist_patch_DATA = \
%D%/packages/patches/catdoc-CVE-2017-11110.patch \
%D%/packages/patches/circos-remove-findbin.patch \
%D%/packages/patches/cdparanoia-fpic.patch \
+ %D%/packages/patches/cdrkit-libre-cross-compile.patch \
%D%/packages/patches/cdrtools-3.01-mkisofs-isoinfo.patch \
%D%/packages/patches/ceph-disable-cpu-optimizations.patch \
- %D%/packages/patches/ceph-fix-snappy-breaking-change.patch \
+ %D%/packages/patches/ceph-boost-compat.patch \
+ %D%/packages/patches/ceph-rocksdb-compat.patch \
+ %D%/packages/patches/cheese-vala-update.patch \
%D%/packages/patches/chez-scheme-build-util-paths-backport.patch \
%D%/packages/patches/chmlib-inttypes.patch \
%D%/packages/patches/cl-asdf-config-directories.patch \
@@ -946,12 +954,15 @@ dist_patch_DATA = \
%D%/packages/patches/clang-runtime-3.9-libsanitizer-mode-field.patch \
%D%/packages/patches/clang-runtime-3.8-libsanitizer-mode-field.patch \
%D%/packages/patches/classpath-aarch64-support.patch \
+ %D%/packages/patches/classpath-miscompilation.patch \
+ %D%/packages/patches/cling-use-shared-library.patch \
%D%/packages/patches/clucene-pkgconfig.patch \
%D%/packages/patches/cmake-curl-certificates.patch \
%D%/packages/patches/coda-use-system-libs.patch \
%D%/packages/patches/collectd-5.11.0-noinstallvar.patch \
%D%/packages/patches/combinatorial-blas-awpm.patch \
%D%/packages/patches/combinatorial-blas-io-fix.patch \
+ %D%/packages/patches/coreutils-gnulib-tests.patch \
%D%/packages/patches/coq-fix-envvars.patch \
%D%/packages/patches/coreutils-ls.patch \
%D%/packages/patches/cpuinfo-system-libraries.patch \
@@ -959,20 +970,17 @@ dist_patch_DATA = \
%D%/packages/patches/crda-optional-gcrypt.patch \
%D%/packages/patches/clucene-contribs-lib.patch \
%D%/packages/patches/cube-nocheck.patch \
- %D%/packages/patches/cups-CVE-2020-10001.patch \
%D%/packages/patches/curl-use-ssl-cert-env.patch \
- %D%/packages/patches/curl-7.76-use-ssl-cert-env.patch \
- %D%/packages/patches/curl-7.77-tls-priority-string.patch \
%D%/packages/patches/cursynth-wave-rand.patch \
%D%/packages/patches/cvs-CVE-2017-12836.patch \
%D%/packages/patches/cyrus-sasl-ac-try-run-fix.patch \
%D%/packages/patches/cyrus-sasl-CVE-2019-19906.patch \
%D%/packages/patches/c++-gsl-find-system-gtest.patch \
+ %D%/packages/patches/c++-gsl-move-array-bounds-tests.patch \
%D%/packages/patches/date-output-pkg-config-files.patch \
%D%/packages/patches/datefudge-gettimeofday.patch \
%D%/packages/patches/dbacl-include-locale.h.patch \
%D%/packages/patches/dbus-helper-search-path.patch \
- %D%/packages/patches/dbus-CVE-2020-12049.patch \
%D%/packages/patches/dbus-c++-gcc-compat.patch \
%D%/packages/patches/dbus-c++-threading-mutex.patch \
%D%/packages/patches/dbxfs-remove-sentry-sdk.patch \
@@ -983,15 +991,14 @@ dist_patch_DATA = \
%D%/packages/patches/desmume-gcc7-fixes.patch \
%D%/packages/patches/dfu-programmer-fix-libusb.patch \
%D%/packages/patches/diffoscope-fix-llvm-test.patch \
- %D%/packages/patches/diffutils-gets-undeclared.patch \
+ %D%/packages/patches/diffutils-fix-signal-processing.patch \
%D%/packages/patches/dkimproxy-add-ipv6-support.patch \
%D%/packages/patches/docbook-xsl-nonrecursive-string-subst.patch \
+ %D%/packages/patches/docbook-xsl-support-old-url.patch \
%D%/packages/patches/doc++-include-directives.patch \
%D%/packages/patches/doc++-segfault-fix.patch \
%D%/packages/patches/docker-fix-tests.patch \
%D%/packages/patches/dovecot-trees-support-dovecot-2.3.patch \
- %D%/packages/patches/doxygen-test.patch \
- %D%/packages/patches/doxygen-1.8.17-runtests.patch \
%D%/packages/patches/dstat-fix-crash-when-specifying-delay.patch \
%D%/packages/patches/dstat-skip-devices-without-io.patch \
%D%/packages/patches/dune-istl-2.7-fix-non-mpi-tests.patch \
@@ -1009,6 +1016,7 @@ dist_patch_DATA = \
%D%/packages/patches/elixir-path-length.patch \
%D%/packages/patches/elm-compiler-disable-reactor.patch \
%D%/packages/patches/elm-compiler-fix-map-key.patch \
+ %D%/packages/patches/elogind-revert-polkit-detection.patch \
%D%/packages/patches/emacs-exec-path.patch \
%D%/packages/patches/emacs-fix-scheme-indent-function.patch \
%D%/packages/patches/emacs-ignore-empty-xim-styles.patch \
@@ -1026,14 +1034,10 @@ dist_patch_DATA = \
%D%/packages/patches/esmtp-add-lesmtp.patch \
%D%/packages/patches/eudev-rules-directory.patch \
%D%/packages/patches/evilwm-lost-focus-bug.patch \
- %D%/packages/patches/evolution-CVE-2020-11879.patch \
- %D%/packages/patches/evolution-data-server-CVE-2020-14928.patch \
- %D%/packages/patches/evolution-data-server-CVE-2020-16117.patch \
- %D%/packages/patches/evolution-data-server-locales.patch \
- %D%/packages/patches/evolution-data-server-libical-compat.patch \
%D%/packages/patches/exercism-disable-self-update.patch \
%D%/packages/patches/extempore-unbundle-external-dependencies.patch \
%D%/packages/patches/extundelete-e2fsprogs-1.44.patch \
+ %D%/packages/patches/farstream-gupnp.patch \
%D%/packages/patches/farstream-make.patch \
%D%/packages/patches/fastcap-mulGlobal.patch \
%D%/packages/patches/fastcap-mulSetup.patch \
@@ -1047,17 +1051,19 @@ dist_patch_DATA = \
%D%/packages/patches/fifo-map-fix-flags-for-gcc.patch \
%D%/packages/patches/fifo-map-remove-catch.hpp.patch \
%D%/packages/patches/findutils-localstatedir.patch \
- %D%/packages/patches/findutils-test-rwlock-threads.patch \
%D%/packages/patches/flann-cmake-3.11.patch \
%D%/packages/patches/flatpak-fix-path.patch \
+ %D%/packages/patches/fontconfig-cache-ignore-mtime.patch \
%D%/packages/patches/foobillard++-pkg-config.patch \
%D%/packages/patches/foomatic-filters-CVE-2015-8327.patch \
%D%/packages/patches/foomatic-filters-CVE-2015-8560.patch \
- %D%/packages/patches/fontconfig-hurd-path-max.patch \
%D%/packages/patches/fp16-system-libraries.patch \
%D%/packages/patches/fpc-reproducibility.patch \
%D%/packages/patches/fplll-std-fenv.patch \
+ %D%/packages/patches/freecad-boost-serialization.patch \
+ %D%/packages/patches/freecad-vtk9.patch \
%D%/packages/patches/freedink-engine-fix-sdl-hints.patch \
+ %D%/packages/patches/freeglut-gcc-compat.patch \
%D%/packages/patches/freeimage-unbundle.patch \
%D%/packages/patches/fuse-overlapping-headers.patch \
%D%/packages/patches/fxdiv-system-libraries.patch \
@@ -1065,7 +1071,6 @@ dist_patch_DATA = \
%D%/packages/patches/ganeti-disable-version-symlinks.patch \
%D%/packages/patches/ganeti-haskell-compat.patch \
%D%/packages/patches/ganeti-haskell-pythondir.patch \
- %D%/packages/patches/ganeti-preserve-PYTHONPATH.patch \
%D%/packages/patches/ganeti-shepherd-master-failover.patch \
%D%/packages/patches/ganeti-shepherd-support.patch \
%D%/packages/patches/ganeti-sphinx-compat.patch \
@@ -1094,6 +1099,7 @@ dist_patch_DATA = \
%D%/packages/patches/gcc-4.9.3-mingw-gthr-default.patch \
%D%/packages/patches/gcc-5-hurd.patch \
%D%/packages/patches/gcc-5.0-libvtv-runpath.patch \
+ %D%/packages/patches/gcc-5-fix-powerpc64le-build.patch \
%D%/packages/patches/gcc-5-source-date-epoch-1.patch \
%D%/packages/patches/gcc-5-source-date-epoch-2.patch \
%D%/packages/patches/gcc-6-arm-none-eabi-multilib.patch \
@@ -1108,46 +1114,32 @@ 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/gdb-fix-gnu-nat-build.patch \
%D%/packages/patches/gdm-default-session.patch \
- %D%/packages/patches/geary-CVE-2020-24661.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/gdm-pass-gdk-pixbuf-loader-env.patch \
+ %D%/packages/patches/geeqie-clutter.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/ghc-language-haskell-extract-ghc-8.10.patch \
%D%/packages/patches/ghc-monad-par-fix-tests.patch \
- %D%/packages/patches/ghostscript-CVE-2020-15900.patch \
- %D%/packages/patches/ghostscript-freetype-compat.patch \
%D%/packages/patches/ghostscript-no-header-id.patch \
%D%/packages/patches/ghostscript-no-header-uuid.patch \
%D%/packages/patches/ghostscript-no-header-creationdate.patch \
%D%/packages/patches/giara-fix-login.patch \
+ %D%/packages/patches/glade-gls-set-script-name.patch \
+ %D%/packages/patches/glade-test-widget-null-icon.patch \
%D%/packages/patches/glib-appinfo-watch.patch \
- %D%/packages/patches/glib-tests-timer.patch \
- %D%/packages/patches/glib-CVE-2021-27218.patch \
- %D%/packages/patches/glib-CVE-2021-27219-01.patch \
- %D%/packages/patches/glib-CVE-2021-27219-02.patch \
- %D%/packages/patches/glib-CVE-2021-27219-03.patch \
- %D%/packages/patches/glib-CVE-2021-27219-04.patch \
- %D%/packages/patches/glib-CVE-2021-27219-05.patch \
- %D%/packages/patches/glib-CVE-2021-27219-06.patch \
- %D%/packages/patches/glib-CVE-2021-27219-07.patch \
- %D%/packages/patches/glib-CVE-2021-27219-08.patch \
- %D%/packages/patches/glib-CVE-2021-27219-09.patch \
- %D%/packages/patches/glib-CVE-2021-27219-10.patch \
- %D%/packages/patches/glib-CVE-2021-27219-11.patch \
- %D%/packages/patches/glib-CVE-2021-27219-12.patch \
- %D%/packages/patches/glib-CVE-2021-27219-13.patch \
- %D%/packages/patches/glib-CVE-2021-27219-14.patch \
- %D%/packages/patches/glib-CVE-2021-27219-15.patch \
- %D%/packages/patches/glib-CVE-2021-27219-16.patch \
- %D%/packages/patches/glib-CVE-2021-27219-17.patch \
- %D%/packages/patches/glib-CVE-2021-27219-18.patch \
- %D%/packages/patches/glib-CVE-2021-28153.patch \
+ %D%/packages/patches/glib-networking-gnutls-binding.patch \
+ %D%/packages/patches/glib-networking-32-bit-time.patch \
+ %D%/packages/patches/glib-skip-failing-test.patch \
%D%/packages/patches/glibc-CVE-2018-11236.patch \
%D%/packages/patches/glibc-CVE-2018-11237.patch \
%D%/packages/patches/glibc-CVE-2019-7309.patch \
@@ -1159,8 +1151,12 @@ dist_patch_DATA = \
%D%/packages/patches/glibc-bootstrap-system-2.2.5.patch \
%D%/packages/patches/glibc-bootstrap-system-2.16.0.patch \
%D%/packages/patches/glibc-bootstrap-system.patch \
+ %D%/packages/patches/glibc-cross-objcopy.patch \
+ %D%/packages/patches/glibc-cross-objdump.patch \
+ %D%/packages/patches/glibc-dl-cache.patch \
%D%/packages/patches/glibc-hidden-visibility-ldconfig.patch \
%D%/packages/patches/glibc-hurd-clock_gettime_monotonic.patch \
+ %D%/packages/patches/glibc-2.31-hurd-clock_gettime_monotonic.patch \
%D%/packages/patches/glibc-hurd-clock_t_centiseconds.patch \
%D%/packages/patches/glibc-hurd-gettyent.patch \
%D%/packages/patches/glibc-hurd-mach-print.patch \
@@ -1171,28 +1167,25 @@ dist_patch_DATA = \
%D%/packages/patches/glibc-locales.patch \
%D%/packages/patches/glibc-locales-2.28.patch \
%D%/packages/patches/glibc-reinstate-prlimit64-fallback.patch \
+ %D%/packages/patches/glibc-skip-c++.patch \
%D%/packages/patches/glibc-versioned-locpath.patch \
- %D%/packages/patches/glibc-2.27-git-fixes.patch \
- %D%/packages/patches/glibc-2.28-git-fixes.patch \
%D%/packages/patches/glibc-2.29-git-updates.patch \
- %D%/packages/patches/glibc-2.27-supported-locales.patch \
- %D%/packages/patches/glibc-2.28-supported-locales.patch \
%D%/packages/patches/glibc-2.29-supported-locales.patch \
+ %D%/packages/patches/glibc-static-nss.patch \
%D%/packages/patches/glibc-supported-locales.patch \
%D%/packages/patches/gmp-arm-asm-nothumb.patch \
%D%/packages/patches/gmp-faulty-test.patch \
%D%/packages/patches/gnash-fix-giflib-version.patch \
- %D%/packages/patches/gnome-shell-theme.patch \
- %D%/packages/patches/gnome-shell-disable-test.patch \
- %D%/packages/patches/gnome-shell-CVE-2020-17489.patch \
+ %D%/packages/patches/gnome-boxes-add-guix-logo.patch \
+ %D%/packages/patches/gnome-online-miners-tracker-3.patch \
+ %D%/packages/patches/gnome-screenshot-meson-0.60.patch \
%D%/packages/patches/gnome-settings-daemon-gc.patch \
- %D%/packages/patches/gnome-todo-delete-esource-duplicate.patch \
%D%/packages/patches/gnome-tweaks-search-paths.patch \
%D%/packages/patches/gnupg-default-pinentry.patch \
+ %D%/packages/patches/gnupg-1-build-with-gcc10.patch \
%D%/packages/patches/gnutls-skip-trust-store-test.patch \
%D%/packages/patches/gnutls-cross.patch \
- %D%/packages/patches/gnutls-CVE-2021-20231.patch \
- %D%/packages/patches/gnutls-CVE-2021-20232.patch \
+ %D%/packages/patches/gnutls-guile-eintr-eagain.patch \
%D%/packages/patches/gobject-introspection-absolute-shlib-path.patch \
%D%/packages/patches/gobject-introspection-cc.patch \
%D%/packages/patches/gobject-introspection-girepository.patch \
@@ -1205,7 +1198,6 @@ dist_patch_DATA = \
%D%/packages/patches/gpodder-disable-updater.patch \
%D%/packages/patches/gpsbabel-fix-i686-test.patch \
%D%/packages/patches/grantlee-merge-theme-dirs.patch \
- %D%/packages/patches/graphviz-CVE-2020-18032.patch \
%D%/packages/patches/grep-timing-sensitive-test.patch \
%D%/packages/patches/grocsvs-dont-use-admiral.patch \
%D%/packages/patches/gromacs-tinyxml2.patch \
@@ -1213,13 +1205,7 @@ dist_patch_DATA = \
%D%/packages/patches/grub-efi-fat-serial-number.patch \
%D%/packages/patches/grub-setup-root.patch \
%D%/packages/patches/gspell-dash-test.patch \
- %D%/packages/patches/gst-libav-64channels-stack-corruption.patch \
- %D%/packages/patches/gst-plugins-bad-fix-overflow.patch \
- %D%/packages/patches/gst-plugins-base-fix-id3v2-invalid-read.patch \
%D%/packages/patches/gst-plugins-good-fix-test.patch \
- %D%/packages/patches/gst-plugins-good-CVE-2021-3497.patch \
- %D%/packages/patches/gst-plugins-good-CVE-2021-3498.patch \
- %D%/packages/patches/gst-plugins-ugly-fix-out-of-bound-reads.patch \
%D%/packages/patches/guile-1.8-cpp-4.5.patch \
%D%/packages/patches/guile-2.2-skip-oom-test.patch \
%D%/packages/patches/guile-2.2-skip-so-test.patch \
@@ -1231,17 +1217,23 @@ dist_patch_DATA = \
%D%/packages/patches/guile-3.0-linux-syscalls.patch \
%D%/packages/patches/guile-fibers-destroy-peer-schedulers.patch \
%D%/packages/patches/guile-gdbm-ffi-support-gdbm-1.14.patch \
+ %D%/packages/patches/guile-git-adjust-for-libgit2-1.2.0.patch \
%D%/packages/patches/guile-present-coding.patch \
%D%/packages/patches/guile-rsvg-pkgconfig.patch \
%D%/packages/patches/guile-emacs-fix-configure.patch \
+ %D%/packages/patches/guile-email-fix-tests.patch \
+ %D%/packages/patches/guile-ssh-fix-test-suite.patch \
+ %D%/packages/patches/guile-ssh-read-error.patch \
+ %D%/packages/patches/gtk2-fix-builder-test.patch \
%D%/packages/patches/gtk2-respect-GUIX_GTK2_PATH.patch \
%D%/packages/patches/gtk2-respect-GUIX_GTK2_IM_MODULE_FILE.patch \
%D%/packages/patches/gtk2-theme-paths.patch \
%D%/packages/patches/gtk3-respect-GUIX_GTK3_PATH.patch \
%D%/packages/patches/gtk3-respect-GUIX_GTK3_IM_MODULE_FILE.patch \
+ %D%/packages/patches/gtk-doc-respect-xml-catalog.patch \
+ %D%/packages/patches/gtk4-respect-GUIX_GTK4_PATH.patch \
%D%/packages/patches/gtkglext-disable-disable-deprecated.patch \
%D%/packages/patches/gtksourceview-2-add-default-directory.patch \
- %D%/packages/patches/gvfs-add-support-for-libplist-2.2.patch \
%D%/packages/patches/gzdoom-search-in-installed-share.patch \
%D%/packages/patches/gzdoom-find-system-libgme.patch \
%D%/packages/patches/hdf4-architectures.patch \
@@ -1257,6 +1249,7 @@ dist_patch_DATA = \
%D%/packages/patches/hdf-eos5-fix-szip.patch \
%D%/packages/patches/hdf-eos5-fortrantests.patch \
%D%/packages/patches/hedgewars-network-bsd.patch \
+ %D%/packages/patches/helm-fix-gcc-9-build.patch \
%D%/packages/patches/http-parser-CVE-2020-8287.patch \
%D%/packages/patches/hubbub-sort-entities.patch \
%D%/packages/patches/hurd-cross.patch \
@@ -1268,8 +1261,6 @@ dist_patch_DATA = \
%D%/packages/patches/icecat-use-system-graphite2+harfbuzz.patch \
%D%/packages/patches/icecat-use-system-media-libs.patch \
%D%/packages/patches/icedtea-6-extend-hotspot-aarch64-support.patch \
- %D%/packages/patches/icedtea-7-hotspot-aarch64-use-c++98.patch \
- %D%/packages/patches/icu4c-CVE-2020-10531.patch \
%D%/packages/patches/id3lib-CVE-2007-4460.patch \
%D%/packages/patches/id3lib-UTF16-writing-bug.patch \
%D%/packages/patches/idris-disable-test.patch \
@@ -1280,7 +1271,6 @@ dist_patch_DATA = \
%D%/packages/patches/imagemagick-ReadDCMImage-fix.patch \
%D%/packages/patches/imagemagick-ReadDCMPixels-fix.patch \
%D%/packages/patches/imagemagick-WriteTHUMBNAILImage-fix.patch \
- %D%/packages/patches/inetutils-hurd.patch \
%D%/packages/patches/inkscape-poppler-0.76.patch \
%D%/packages/patches/instead-use-games-path.patch \
%D%/packages/patches/intel-xed-fix-nondeterminism.patch \
@@ -1290,9 +1280,9 @@ dist_patch_DATA = \
%D%/packages/patches/irrlicht-use-system-libs.patch \
%D%/packages/patches/isc-dhcp-gcc-compat.patch \
%D%/packages/patches/isl-0.11.1-aarch64-support.patch \
- %D%/packages/patches/json-c-CVE-2020-12762.patch \
%D%/packages/patches/json-c-0.13-CVE-2020-12762.patch \
%D%/packages/patches/json-c-0.12-CVE-2020-12762.patch \
+ %D%/packages/patches/jsoncpp-pkg-config-version.patch \
%D%/packages/patches/jacal-fix-texinfo.patch \
%D%/packages/patches/jamvm-1.5.1-aarch64-support.patch \
%D%/packages/patches/jamvm-1.5.1-armv7-support.patch \
@@ -1315,12 +1305,13 @@ dist_patch_DATA = \
%D%/packages/patches/jfsutils-add-sysmacros.patch \
%D%/packages/patches/jfsutils-gcc-compat.patch \
%D%/packages/patches/jfsutils-include-systypes.patch \
- %D%/packages/patches/jsoncpp-fix-inverted-case.patch \
%D%/packages/patches/julia-SOURCE_DATE_EPOCH-mtime.patch \
%D%/packages/patches/julia-tracker-16-compat.patch \
+ %D%/packages/patches/julia-allow-parallel-build.patch \
%D%/packages/patches/kdbusaddons-kinit-file-name.patch \
%D%/packages/patches/libffi-3.3-powerpc-fixes.patch \
%D%/packages/patches/libffi-float128-powerpc64le.patch \
+ %D%/packages/patches/librime-fix-build-with-gcc10.patch \
%D%/packages/patches/libvirt-add-install-prefix.patch \
%D%/packages/patches/libziparchive-add-includes.patch \
%D%/packages/patches/localed-xorg-keyboard.patch \
@@ -1353,13 +1344,9 @@ dist_patch_DATA = \
%D%/packages/patches/lcalc-default-parameters-2.patch \
%D%/packages/patches/lcalc-lcommon-h.patch \
%D%/packages/patches/lcalc-using-namespace-std.patch \
- %D%/packages/patches/lcms-CVE-2018-16435.patch \
- %D%/packages/patches/ldc-bootstrap-disable-tests.patch \
- %D%/packages/patches/ldc-disable-phobos-tests.patch \
%D%/packages/patches/ldns-drill-examples.patch \
%D%/packages/patches/leela-zero-gtest.patch \
%D%/packages/patches/less-hurd-path-max.patch \
- %D%/packages/patches/lib2geom-fix-tests.patch \
%D%/packages/patches/liba52-enable-pic.patch \
%D%/packages/patches/liba52-link-with-libm.patch \
%D%/packages/patches/liba52-set-soname.patch \
@@ -1391,6 +1378,7 @@ dist_patch_DATA = \
%D%/packages/patches/libmad-length-check.patch \
%D%/packages/patches/libmad-md_size.patch \
%D%/packages/patches/libmad-mips-newgcc.patch \
+ %D%/packages/patches/libmicrohttpd-0.9.73-test-ssl3.patch \
%D%/packages/patches/libmp4v2-c++11.patch \
%D%/packages/patches/libmpeg2-arm-private-symbols.patch \
%D%/packages/patches/libmpeg2-global-symbol-test.patch \
@@ -1404,15 +1392,18 @@ dist_patch_DATA = \
%D%/packages/patches/libtgvoip-disable-webrtc.patch \
%D%/packages/patches/libtheora-config-guess.patch \
%D%/packages/patches/libtirpc-hurd.patch \
- %D%/packages/patches/libtirpc-hurd-client.patch \
%D%/packages/patches/libtommath-fix-linkage.patch \
%D%/packages/patches/libtool-skip-tests2.patch \
+ %D%/packages/patches/libunwind-julia-fix-GCC10-fno-common.patch \
%D%/packages/patches/libusb-0.1-disable-tests.patch \
%D%/packages/patches/libusb-for-axoloti.patch \
%D%/packages/patches/libutils-add-includes.patch \
%D%/packages/patches/libutils-remove-damaging-includes.patch \
%D%/packages/patches/libvdpau-va-gl-unbundle.patch \
%D%/packages/patches/libvpx-CVE-2016-2818.patch \
+ %D%/packages/patches/libxml2-parent-pointers.patch \
+ %D%/packages/patches/libxml2-terminating-newline.patch \
+ %D%/packages/patches/libxml2-xpath-recursion-limit.patch \
%D%/packages/patches/libxml2-xpath0-Add-option-xpath0.patch \
%D%/packages/patches/libxslt-generated-ids.patch \
%D%/packages/patches/libxt-guix-search-paths.patch \
@@ -1430,6 +1421,7 @@ dist_patch_DATA = \
%D%/packages/patches/lirc-reproducible-build.patch \
%D%/packages/patches/llhttp-bootstrap-CVE-2020-8287.patch \
%D%/packages/patches/llvm-3.5-fix-clang-build-with-gcc5.patch \
+ %D%/packages/patches/llvm-3.6-fix-build-with-gcc-10.patch \
%D%/packages/patches/llvm-9-fix-bitcast-miscompilation.patch \
%D%/packages/patches/llvm-9-fix-lpad-miscompilation.patch \
%D%/packages/patches/llvm-9-fix-scev-miscompilation.patch \
@@ -1451,7 +1443,6 @@ dist_patch_DATA = \
%D%/packages/patches/mailutils-variable-lookup.patch \
%D%/packages/patches/make-impure-dirs.patch \
%D%/packages/patches/marble-qt-add-qt-headers.patch \
- %D%/packages/patches/mariadb-CVE-2021-27928.patch \
%D%/packages/patches/mars-install.patch \
%D%/packages/patches/mars-sfml-2.3.patch \
%D%/packages/patches/maxima-defsystem-mkdir.patch \
@@ -1464,10 +1455,10 @@ dist_patch_DATA = \
%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/meson-allow-dirs-outside-of-prefix.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 \
@@ -1476,11 +1467,11 @@ dist_patch_DATA = \
%D%/packages/patches/minisat-friend-declaration.patch \
%D%/packages/patches/minisat-install.patch \
%D%/packages/patches/mit-krb5-hurd.patch \
- %D%/packages/patches/mit-krb5-qualify-short-hostnames.patch \
%D%/packages/patches/mixxx-link-qtscriptbytearray-qtscript.patch \
%D%/packages/patches/mixxx-system-googletest-benchmark.patch \
%D%/packages/patches/mpc123-initialize-ao.patch \
%D%/packages/patches/mpg321-CVE-2019-14247.patch \
+ %D%/packages/patches/mpg321-gcc-10.patch \
%D%/packages/patches/module-init-tools-moduledir.patch \
%D%/packages/patches/monero-use-system-miniupnpc.patch \
%D%/packages/patches/mono-mdoc-timestamping.patch \
@@ -1517,10 +1508,12 @@ dist_patch_DATA = \
%D%/packages/patches/ngircd-handle-zombies.patch \
%D%/packages/patches/ngless-unliftio.patch \
%D%/packages/patches/network-manager-plugin-path.patch \
+ %D%/packages/patches/network-manager-meson.patch \
%D%/packages/patches/nginx-socket-cloexec.patch \
%D%/packages/patches/nnpack-system-libraries.patch \
%D%/packages/patches/nsis-env-passthru.patch \
%D%/packages/patches/nsis-source-date-epoch.patch \
+ %D%/packages/patches/nss-getcwd-nonnull.patch \
%D%/packages/patches/nss-CVE-2021-43527.patch \
%D%/packages/patches/nss-increase-test-timeout.patch \
%D%/packages/patches/nss-3.56-pkgconfig.patch \
@@ -1537,6 +1530,8 @@ dist_patch_DATA = \
%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-qcheck-fix-test-whitespace.patch \
%D%/packages/patches/omake-fix-non-determinism.patch \
%D%/packages/patches/oneko-remove-nonfree-characters.patch \
@@ -1570,9 +1565,13 @@ dist_patch_DATA = \
%D%/packages/patches/pango-skip-libthai-test.patch \
%D%/packages/patches/pciutils-hurd-configure.patch \
%D%/packages/patches/pciutils-hurd-fix.patch \
+ %D%/packages/patches/pitivi-fix-build-with-meson-0.60.patch \
%D%/packages/patches/plasma-framework-fix-KF5PlasmaMacros.cmake.patch \
%D%/packages/patches/ppsspp-disable-upgrade-and-gold.patch \
%D%/packages/patches/pthreadpool-system-libraries.patch \
+ %D%/packages/patches/python-chai-drop-python2.patch \
+ %D%/packages/patches/python-random2-getrandbits-test.patch \
+ %D%/packages/patches/python-poppler-qt5-fix-build.patch \
%D%/packages/patches/sdcc-disable-non-free-code.patch \
%D%/packages/patches/sdl-pango-api_additions.patch \
%D%/packages/patches/sdl-pango-blit_overflow.patch \
@@ -1582,14 +1581,14 @@ dist_patch_DATA = \
%D%/packages/patches/sdl-pango-sans-serif.patch \
%D%/packages/patches/smalltalk-multiplication-overflow.patch \
%D%/packages/patches/sqlite-hurd.patch \
+ %D%/packages/patches/strace-readlink-tests.patch \
%D%/packages/patches/sunxi-tools-remove-sys-io.patch \
+ %D%/packages/patches/p11-kit-hurd.patch \
+ %D%/packages/patches/patchutils-test-perms.patch \
%D%/packages/patches/patch-hurd-path-max.patch \
%D%/packages/patches/perl-autosplit-default-time.patch \
- %D%/packages/patches/perl-cross.patch \
- %D%/packages/patches/perl-deterministic-ordering.patch \
%D%/packages/patches/perl-finance-quote-unuse-mozilla-ca.patch \
%D%/packages/patches/perl-image-exiftool-CVE-2021-22204.patch \
- %D%/packages/patches/perl-io-socket-ssl-openssl-1.0.2f-fix.patch \
%D%/packages/patches/perl-net-amazon-s3-moose-warning.patch \
%D%/packages/patches/perl-net-dns-resolver-programmable-fix.patch \
%D%/packages/patches/perl-no-sys-dirs.patch \
@@ -1610,6 +1609,7 @@ dist_patch_DATA = \
%D%/packages/patches/pinball-system-ltdl.patch \
%D%/packages/patches/pingus-boost-headers.patch \
%D%/packages/patches/pingus-sdl-libs-config.patch \
+ %D%/packages/patches/pipewire-0.2.7-fno-common.patch \
%D%/packages/patches/pixman-CVE-2016-5296.patch \
%D%/packages/patches/pjproject-correct-the-cflags-field.patch \
%D%/packages/patches/pjproject-fix-pkg-config-ldflags.patch \
@@ -1618,7 +1618,8 @@ dist_patch_DATA = \
%D%/packages/patches/plib-CVE-2011-4620.patch \
%D%/packages/patches/plib-CVE-2012-4552.patch \
%D%/packages/patches/plotutils-spline-test.patch \
- %D%/packages/patches/polkit-CVE-2021-3560.patch \
+ %D%/packages/patches/polkit-configure-elogind.patch \
+ %D%/packages/patches/polkit-use-duktape.patch \
%D%/packages/patches/portaudio-audacity-compat.patch \
%D%/packages/patches/portmidi-modular-build.patch \
%D%/packages/patches/postgresql-disable-resolve_symlinks.patch \
@@ -1642,13 +1643,13 @@ dist_patch_DATA = \
%D%/packages/patches/python-2.7-site-prefixes.patch \
%D%/packages/patches/python-2.7-source-date-epoch.patch \
%D%/packages/patches/python-2.7-CVE-2021-3177.patch \
+ %D%/packages/patches/python-2.7-no-static-lib.patch \
%D%/packages/patches/python-3-arm-alignment.patch \
%D%/packages/patches/python-3-deterministic-build-info.patch \
%D%/packages/patches/python-3-search-paths.patch \
%D%/packages/patches/python-3-fix-tests.patch \
- %D%/packages/patches/python-3.8-fix-tests.patch \
- %D%/packages/patches/python-3.8-CVE-2021-3177.patch \
- %D%/packages/patches/python-3.9-fix-tests.patch \
+ %D%/packages/patches/python-3-hurd-configure.patch \
+ %D%/packages/patches/python-3-no-static-lib.patch \
%D%/packages/patches/python-CVE-2018-14647.patch \
%D%/packages/patches/python-CVE-2020-26116.patch \
%D%/packages/patches/python-aionotify-0.2.0-py3.8.patch \
@@ -1657,18 +1658,21 @@ dist_patch_DATA = \
%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-peachpy-determinism.patch \
+ %D%/packages/patches/python-peachpy-determinism.patch \
%D%/packages/patches/python-pep8-stdlib-tokenize-compat.patch \
%D%/packages/patches/python-pyfakefs-remove-bad-test.patch \
+ %D%/packages/patches/python-pyflakes-test-location.patch \
%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-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 \
@@ -1688,6 +1692,7 @@ dist_patch_DATA = \
%D%/packages/patches/python-unittest2-python3-compat.patch \
%D%/packages/patches/python-unittest2-remove-argparse.patch \
%D%/packages/patches/python-waitress-fix-tests.patch \
+ %D%/packages/patches/python-werkzeug-tests.patch \
%D%/packages/patches/qemu-build-info-manual.patch \
%D%/packages/patches/qemu-CVE-2021-20203.patch \
%D%/packages/patches/qemu-glibc-2.27.patch \
@@ -1704,7 +1709,12 @@ dist_patch_DATA = \
%D%/packages/patches/quassel-qt-514-compat.patch \
%D%/packages/patches/quickswitch-fix-dmenu-check.patch \
%D%/packages/patches/qtwebkit-pbutils-include.patch \
+ %D%/packages/patches/qtwebkit-fix-building-with-bison-3.7.patch \
+ %D%/packages/patches/qtwebkit-fix-building-with-python-3.9.patch \
+ %D%/packages/patches/qtwebkit-fix-building-with-icu-68.patch \
+ %D%/packages/patches/qtwebkit-fix-building-with-glib-2.68.patch \
%D%/packages/patches/randomjungle-disable-static-build.patch \
+ %D%/packages/patches/range-v3-build-with-gcc10.patch \
%D%/packages/patches/rapicorn-isnan.patch \
%D%/packages/patches/rapidjson-gcc-compat.patch \
%D%/packages/patches/raptor2-heap-overflow.patch \
@@ -1734,19 +1744,14 @@ dist_patch_DATA = \
%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/i3status-rust-enable-unstable-features.patch \
%D%/packages/patches/rust-ndarray-remove-blas-src-dep.patch \
%D%/packages/patches/rust-ndarray-0.13-remove-blas-src.patch \
%D%/packages/patches/rust-nettle-disable-vendor.patch \
%D%/packages/patches/rust-nettle-sys-disable-vendor.patch \
- %D%/packages/patches/rust-reproducible-builds.patch \
%D%/packages/patches/rust-openssl-sys-no-vendor.patch \
%D%/packages/patches/rust-shell2batch-lint-fix.patch \
%D%/packages/patches/sbc-fix-build-non-x86.patch \
@@ -1755,7 +1760,7 @@ dist_patch_DATA = \
%D%/packages/patches/sbcl-burgled-batteries3-fix-signals.patch \
%D%/packages/patches/sbcl-clml-fix-types.patch \
%D%/packages/patches/sbcl-png-fix-sbcl-compatibility.patch \
- %D%/packages/patches/scalapack-blacs-mpi-deprecations.patch \
+ %D%/packages/patches/scalapack-gcc-10-compilation.patch \
%D%/packages/patches/scheme48-tests.patch \
%D%/packages/patches/scotch-build-parallelism.patch \
%D%/packages/patches/scotch-integer-declarations.patch \
@@ -1777,6 +1782,8 @@ dist_patch_DATA = \
%D%/packages/patches/slim-reset.patch \
%D%/packages/patches/slim-login.patch \
%D%/packages/patches/slim-display.patch \
+ %D%/packages/patches/syslinux-gcc10.patch \
+ %D%/packages/patches/syslinux-strip-gnu-property.patch \
%D%/packages/patches/snappy-add-O2-flag-in-CmakeLists.txt.patch \
%D%/packages/patches/snappy-add-inline-for-GCC.patch \
%D%/packages/patches/sphinxbase-fix-doxygen.patch \
@@ -1803,12 +1810,9 @@ dist_patch_DATA = \
%D%/packages/patches/tar-skip-unreliable-tests.patch \
%D%/packages/patches/tcc-boot-0.9.27.patch \
%D%/packages/patches/tclxml-3.2-install.patch \
- %D%/packages/patches/tcl-fix-cross-compilation.patch \
%D%/packages/patches/tcsh-fix-autotest.patch \
%D%/packages/patches/teensy-loader-cli-help.patch \
%D%/packages/patches/texinfo-5-perl-compat.patch \
- %D%/packages/patches/texlive-bin-poppler-0.83.patch \
- %D%/packages/patches/texlive-bin-poppler-0.86.patch \
%D%/packages/patches/telegram-purple-adjust-test.patch \
%D%/packages/patches/telepathy-glib-channel-memory-leak.patch \
%D%/packages/patches/texi2html-document-encoding.patch \
@@ -1823,9 +1827,9 @@ dist_patch_DATA = \
%D%/packages/patches/tk-find-library.patch \
%D%/packages/patches/tla2tools-build-xml.patch \
%D%/packages/patches/tlf-support-hamlib-4.2+.patch \
+ %D%/packages/patches/tor-sandbox-i686.patch \
%D%/packages/patches/transcode-ffmpeg.patch \
%D%/packages/patches/transmission-honor-localedir.patch \
- %D%/packages/patches/transmission-remote-gtk-fix-appstream.patch \
%D%/packages/patches/ttf2eot-cstddef.patch \
%D%/packages/patches/tup-unbundle-dependencies.patch \
%D%/packages/patches/tuxpaint-stamps-path.patch \
@@ -1883,7 +1887,6 @@ dist_patch_DATA = \
%D%/packages/patches/vboot-utils-fix-format-load-address.patch \
%D%/packages/patches/vboot-utils-fix-tests-show-contents.patch \
%D%/packages/patches/vboot-utils-skip-test-workbuf.patch \
- %D%/packages/patches/vigra-python-compat.patch \
%D%/packages/patches/vinagre-newer-freerdp.patch \
%D%/packages/patches/vinagre-newer-rdp-parameters.patch \
%D%/packages/patches/virglrenderer-CVE-2017-6386.patch \
@@ -1910,7 +1913,9 @@ dist_patch_DATA = \
%D%/packages/patches/wpa-supplicant-CVE-2021-30004.patch \
%D%/packages/patches/x265-arm-flags.patch \
%D%/packages/patches/xf86-video-ark-remove-mibstore.patch \
+ %D%/packages/patches/xf86-video-mach64-bool-to-boolean.patch \
%D%/packages/patches/xf86-video-mach64-glibc-2.20.patch \
+ %D%/packages/patches/xf86-video-nouveau-fixup-ABI.patch \
%D%/packages/patches/xf86-video-savage-xorg-compat.patch \
%D%/packages/patches/xf86-video-siliconmotion-fix-ftbfs.patch \
%D%/packages/patches/xf86-video-tga-remove-mibstore.patch \
@@ -1930,15 +1935,14 @@ dist_patch_DATA = \
%D%/packages/patches/xsane-fix-snprintf-buffer-length.patch \
%D%/packages/patches/xsane-support-ipv6.patch \
%D%/packages/patches/xsane-tighten-default-umask.patch \
+ %D%/packages/patches/xygrib-fix-finding-data.patch \
%D%/packages/patches/yggdrasil-extra-config.patch \
%D%/packages/patches/ytfzf-programs.patch \
%D%/packages/patches/ytfzf-updates.patch \
%D%/packages/patches/ytnef-CVE-2021-3403.patch \
%D%/packages/patches/ytnef-CVE-2021-3404.patch \
%D%/packages/patches/zig-disable-libc-note-test.patch \
- %D%/packages/patches/zig-use-system-paths.patch \
- %D%/packages/patches/zstd-CVE-2021-24031_CVE-2021-24032.patch \
- %D%/packages/patches/zziplib-CVE-2018-16548.patch
+ %D%/packages/patches/zig-use-system-paths.patch
MISC_DISTRO_FILES = \
%D%/packages/ld-wrapper.in
diff --git a/gnu/packages/acl.scm b/gnu/packages/acl.scm
index 6fb4894302..b299e7d284 100644
--- a/gnu/packages/acl.scm
+++ b/gnu/packages/acl.scm
@@ -40,7 +40,7 @@
(define-public acl
(package
(name "acl")
- (version "2.2.53")
+ (version "2.3.1")
(source
(origin
(method url-fetch)
@@ -48,7 +48,7 @@
version ".tar.gz"))
(sha256
(base32
- "1ir6my3w74s6nfbgbqgzj6w570sn0qjf3524zx8xh67lqrjrigh6"))))
+ "1bqi7hj0xkpivwg7lx5cv3yvs9ks1i6azvpgbvfpzcq1i736233n"))))
(build-system gnu-build-system)
(arguments
`(#:modules ((ice-9 ftw)
diff --git a/gnu/packages/ada.scm b/gnu/packages/ada.scm
index 240e13f3ef..8f8b68d80d 100644
--- a/gnu/packages/ada.scm
+++ b/gnu/packages/ada.scm
@@ -1,6 +1,7 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2018 Danny Milosavljevic <dannym@scratchpost.org>
;;; Copyright © 2020 Tobias Geerinckx-Rice <me@tobias.gr>
+;;; Copyright © 2021 Efraim Flashner <efraim@flashner.co.il>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -48,17 +49,20 @@
(file-name (git-file-name name version))))
(build-system gnu-build-system)
(supported-systems (list "i686-linux" "x86_64-linux"
- "armhf-linux" "aarch64-linux"))
+ "armhf-linux" "aarch64-linux"
+ "powerpc-linux"))
(outputs (list "out" "debug"))
(arguments
`(#:system
,@(match (%current-system)
;; This package predates 64-bit PCs: a ‘64-bit’ adaexec segfaults.
;; Force a 32-bit build targeting a similar architecture.
- ((or "armhf-linux" "aarch64-linux")
+ ("aarch64-linux"
`("armhf-linux"))
+ ("x86_64-linux"
+ `("i686-linux"))
(_
- `("i686-linux")))
+ (list (%current-system))))
#:make-flags
(let ((out (assoc-ref %outputs "out")))
(list (string-append
diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm
index 0e3d5944da..afb3afac75 100644
--- a/gnu/packages/admin.scm
+++ b/gnu/packages/admin.scm
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2013 Cyril Roelandt <tipecaml@gmail.com>
;;; Copyright © 2014, 2015, 2016, 2018, 2019, 2020 Mark H Weaver <mhw@netris.org>
;;; Copyright © 2014, 2015, 2016, 2017, 2018, 2020, 2021 Eric Bavier <bavier@posteo.net>
@@ -35,6 +35,7 @@
;;; Copyright © 2020, 2021 Michael Rohleder <mike@rohleder.de>
;;; Copyright © 2020 Vincent Legoll <vincent.legoll@gmail.com>
;;; Copyright © 2020 Morgan Smith <Morgan.J.Smith@outlook.com>
+;;; Copyright © 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;; Copyright © 2021 Zheng Junjie <873216071@qq.com>
;;; Copyright © 2021 Stefan Reichör <stefan@xsteve.at>
;;; Copyright © 2021 qblade <qblade@protonmail.com>
@@ -278,7 +279,14 @@ and provides a \"top-like\" mode (monitoring).")
version ".tar.gz"))
(sha256
(base32
- "0x9zr0x3xvk4qkb6jnda451d5iyrl06cz1bjzjsm0lxvjj3fabyk"))))
+ "0x9zr0x3xvk4qkb6jnda451d5iyrl06cz1bjzjsm0lxvjj3fabyk"))
+ (modules '((guix build utils)))
+ (snippet
+ '(begin
+ ;; Build with -O1 to work around <https://bugs.gnu.org/48368>.
+ (substitute* "Makefile.in"
+ (("compile --target")
+ "compile -O1 --target"))))))
(build-system gnu-build-system)
(arguments
'(#:configure-flags '("--localstatedir=/var")
@@ -651,7 +659,8 @@ console.")
`(("ncurses" ,ncurses)))
(native-inputs
`(("autoconf" ,autoconf)
- ("automake" ,automake)))
+ ("automake" ,automake)
+ ("python" ,python-minimal-wrapper))) ; for scripts/MakeHeader.py
(home-page "https://htop.dev")
(synopsis "Interactive process viewer")
(description
@@ -752,15 +761,14 @@ re-executing them as necessary.")
(define-public inetutils
(package
(name "inetutils")
- (version "1.9.4")
+ (version "2.0")
(source (origin
(method url-fetch)
(uri (string-append "mirror://gnu/inetutils/inetutils-"
version ".tar.gz"))
- (patches (search-patches "inetutils-hurd.patch"))
(sha256
(base32
- "05n65k4ixl85dc6rxc51b1b732gnmm8xnqi424dy9f1nz7ppb3xy"))))
+ "0j1nb69bhg29cm4xkqqjh2ln1zqcj2lnpm92v638lpwrs11dypxl"))))
(build-system gnu-build-system)
(arguments
`(#:configure-flags '("--localstatedir=/var"
@@ -781,10 +789,17 @@ re-executing them as necessary.")
"--disable-uucpd"
"--disable-whois")
'()))
+ ;; Make sure that canonical "coreutils" package is not referred.
+ #:make-flags
+ (list (string-append "CPPFLAGS=-DPATHDEF_CP=\\\""
+ (assoc-ref %build-inputs "coreutils*")
+ "/bin/cp\\\""))
;; On some systems, 'libls.sh' may fail with an error such as:
;; "Failed to tell switch -a apart from -A".
#:parallel-tests? #f))
- (inputs `(("ncurses" ,ncurses)
+ (inputs `(("coreutils*" ,coreutils)
+ ("shadow" ,shadow) ;for login (used in telnetd and rlogind)
+ ("ncurses" ,ncurses)
("readline" ,readline))) ;for 'ftp'
(native-inputs (if (member (%current-system)
(package-supported-systems net-tools))
@@ -819,6 +834,7 @@ hostname.")
'(,@(if (hurd-target?)
'()
'("--with-libpam"))
+ "shadow_cv_logdir=/var/log"
"ac_cv_func_setpgrp_void=yes")
#:phases
@@ -940,6 +956,11 @@ to allow automatic login and starting any app.")
(build-system trivial-build-system)
(arguments
`(#:modules ((guix build utils))
+ ;; This package consists solely of architecture-independent
+ ;; tables. Cross-compilation is pointless! Make sure we'll
+ ;; always get the same derivation.
+ #:target #f
+ #:allowed-references ()
#:builder (begin
(use-modules (guix build utils)
(srfi srfi-26))
@@ -1259,8 +1280,7 @@ connection alive.")
(sed (assoc-ref inputs "sed*")))
(substitute* "client/scripts/linux"
(("/sbin/ip")
- (string-append (assoc-ref inputs "iproute")
- "/sbin/ip")))
+ (search-input-file inputs "/sbin/ip")))
(mkdir-p libexec)
(copy-file "client/scripts/linux"
@@ -1661,8 +1681,7 @@ at once based on a Perl regular expression.")
(lambda* (#:key inputs #:allow-other-keys)
(substitute* "rc/rc"
(("/usr/sbin/sendmail")
- (string-append (assoc-ref inputs "mailutils")
- "/bin/mail")))
+ (search-input-file inputs "/bin/mail")))
#t))
(add-after 'unpack 'fix-configure
(lambda* (#:key inputs native-inputs #:allow-other-keys)
@@ -1789,10 +1808,7 @@ system administrator.")
;; the chroot's /etc/passwd doesn't have it. Turn off the tests.
#:tests? #f))
(native-inputs
- ;; XXX TODO: Remove on next rebuild cycle.
- (if (hurd-target?)
- '()
- `(("groff" ,groff))))
+ `(("groff" ,groff)))
(inputs
`(("coreutils" ,coreutils)
,@(if (hurd-target?)
@@ -2600,7 +2616,7 @@ sys.argv[0] = re.sub(r'\\.([^/]*)-real$', r'\\1', sys.argv[0])
(lambda _
(substitute* "test/lib/ansible_test/_internal/ansible_util.py"
(("PYTHONPATH=get_ansible_python_path\\(args\\)" all)
- (string-append all "+ ':' + os.environ['PYTHONPATH']")))))
+ (string-append all "+ ':' + os.environ['GUIX_PYTHONPATH']")))))
(add-after 'unpack 'patch-paths
(lambda* (#:key inputs outputs #:allow-other-keys)
(substitute* "lib/ansible/module_utils/compat/selinux.py"
@@ -2684,13 +2700,13 @@ provides the following commands:
(define-public ansible
(package
(name "ansible")
- (version "4.4.0")
+ (version "4.7.0")
(source
(origin
(method url-fetch)
(uri (pypi-uri "ansible" version))
(sha256
- (base32 "031n22j0lsmh69x6i6gkva81j68b4yzh1pbg3q2h4bknl85q46ag"))))
+ (base32 "0aab9id6dqfw2111r731c7y1p77dpzczynmgl4d989p3a7n54z0b"))))
(build-system python-build-system)
(propagated-inputs
`(("ansible-core" ,ansible-core)))
@@ -2971,6 +2987,9 @@ the command line.")
(inputs
`(("libpcap" ,libpcap)
("ncurses" ,ncurses)))
+ (arguments
+ ;; Fix build failure with GCC 10
+ '(#:configure-flags '("CFLAGS=-O2 -g -fcommon")))
(synopsis "Monitor network usage")
(description "Iftop does for network usage what @command{top} does
for CPU usage. It listens to network traffic on a named interface and
@@ -3044,13 +3063,13 @@ platform-specific methods.")
(package
(name "audit")
(home-page "https://people.redhat.com/sgrubb/audit/")
- (version "2.8.5")
+ (version "3.0.4")
(source (origin
(method url-fetch)
(uri (string-append home-page "audit-" version ".tar.gz"))
(sha256
(base32
- "1dzcwb2q78q7x41shcachn7f4aksxbxd470yk38zh03fch1l2p8f"))))
+ "1xlcvc2g7qrbnin5pw0bacalva5ldjw97yi6nr17g0yjp4jyhnlc"))))
(build-system gnu-build-system)
(arguments
`(#:configure-flags (list "--with-python=no"
@@ -3133,7 +3152,7 @@ done with the @code{auditctl} utility.")
"install-nping")
(make ndiff "install-ndiff")
(wrap-program (string-append ndiff "/bin/ndiff")
- `("PYTHONPATH" prefix
+ `("GUIX_PYTHONPATH" prefix
(,(python-path ndiff)))))))
;; These are the tests that do not require network access.
(replace 'check
@@ -3188,7 +3207,7 @@ results (ndiff), and a packet generation and response analysis tool (nping).")
(lambda* (#:key outputs #:allow-other-keys)
(let ((out (assoc-ref outputs "out")))
(wrap-program (string-append out "/bin/dstat")
- `("PYTHONPATH" ":" prefix (,(getenv "PYTHONPATH"))))
+ `("GUIX_PYTHONPATH" ":" prefix (,(getenv "GUIX_PYTHONPATH"))))
#t))))))
(inputs
`(("python" ,python-wrapper)
@@ -3671,8 +3690,7 @@ you are running, what theme or icon set you are using, etc.")
(string-append out "/share/doc/" ,name "-" ,version))
(substitute* (string-append out "/bin/screenfetch")
(("/usr/bin/env bash")
- (string-append (assoc-ref %build-inputs "bash")
- "/bin/bash")))
+ (search-input-file %build-inputs "/bin/bash")))
(wrap-program
(string-append out "/bin/screenfetch")
`("PATH" ":" prefix
@@ -3682,8 +3700,9 @@ you are running, what theme or icon set you are using, etc.")
(assoc-ref %build-inputs "xprop") "/bin"))))
(substitute* (string-append out "/bin/screenfetch")
(("#!#f")
- (string-append "#!" (assoc-ref %build-inputs "bash")
- "/bin/bash")))))))
+ (string-append "#!"
+ (search-input-file %build-inputs
+ "/bin/bash"))))))))
(inputs
`(("bash" ,bash)
("bc" ,bc)
@@ -3725,7 +3744,7 @@ everyone's screenshots nowadays.")
(output (assoc-ref %outputs "out"))
(bindir (string-append output "/bin"))
(docdir (string-append output "/share/doc/ufetch-" ,version))
- (tput (string-append (assoc-ref %build-inputs "tput") "/bin/tput")))
+ (tput (search-input-file %build-inputs "/bin/tput")))
(install-file (string-append source "/LICENSE") docdir)
(setenv "PATH" (string-append (assoc-ref %build-inputs "bash") "/bin"))
(mkdir-p bindir)
@@ -4242,7 +4261,7 @@ cache of unix and unix-like systems.")
(modify-phases %standard-phases
(add-before 'build 'setenv-PATH
(lambda _
- (setenv "PYTHONPATH" (string-append "lib:" (getenv "PYTHONPATH"))))))))
+ (setenv "PYTHONPATH" "lib"))))))
(propagated-inputs
`(("python-pygobject" ,python-pygobject)
("python-pyudev" ,python-pyudev)
@@ -4522,7 +4541,7 @@ text table representation to stdout.")
"\nPATH=" (getenv "PATH"))))
;; check phase
(setenv "TERM" "linux") ;set to tty for test
- (invoke (string-append (assoc-ref %build-inputs "bats") "/bin/bats")
+ (invoke (search-input-file %build-inputs "/bin/bats")
"test")
;; install phase
(install-file "hosts" (string-append %output "/bin"))
diff --git a/gnu/packages/adns.scm b/gnu/packages/adns.scm
index 51694d0982..ef3bf68e71 100644
--- a/gnu/packages/adns.scm
+++ b/gnu/packages/adns.scm
@@ -2,7 +2,7 @@
;;; Copyright © 2014 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2015, 2016, 2018, 2020 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2018 Ricardo Wurmus <rekado@elephly.net>
-;;; Copyright © 2019 Marius Bakke <mbakke@fastmail.com>
+;;; Copyright © 2019, 2021 Marius Bakke <marius@gnu.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -65,7 +65,7 @@ scripts.")
(define-public c-ares
(package
(name "c-ares")
- (version "1.16.0")
+ (version "1.17.2")
(source (origin
(method url-fetch)
(uri (string-append
@@ -73,9 +73,17 @@ scripts.")
".tar.gz"))
(sha256
(base32
- "129sm0wzij0mp8vdv68v18hnykcjb6ivi66wnqnnw598q7bql1fy"))))
- (replacement c-ares/fixed)
+ "0gcincjvpll2qmlc906jx6mfq97s87mgi0zby0753ki0rr2ch0s8"))))
(build-system gnu-build-system)
+ (arguments
+ '(;; FIXME: Some tests require network access
+ #:tests? #f
+ #:phases
+ (modify-phases %standard-phases
+ (add-before 'check 'filter-live-tests
+ (lambda _
+ ;; Filter tests that require internet access.
+ (setenv "GTEST_FILTER" "-*.Live*:*.FamilyV4*"))))))
(native-inputs
`(("pkg-config" ,pkg-config)))
(home-page "https://c-ares.haxx.se/")
@@ -88,23 +96,6 @@ The primary examples of such applications are servers which communicate with
multiple clients and programs with graphical user interfaces.")
(license (x11-style "https://c-ares.haxx.se/license.html"))))
-(define-public c-ares/fixed
- (package
- (inherit c-ares)
- (name "c-ares")
- (version "1.17.2")
- (source (origin
- (method url-fetch)
- (uri (string-append
- "https://c-ares.haxx.se/download/" name "-" version
- ".tar.gz"))
- (sha256
- (base32
- "0gcincjvpll2qmlc906jx6mfq97s87mgi0zby0753ki0rr2ch0s8"))))
- (arguments
- `(;; FIXME: Some tests require network access
- #:tests? #f))))
-
;; gRPC requires a c-ares built with CMake in order to get the .cmake modules.
;; We can not build c-ares itself with CMake because that would introduce a
;; circular dependency through nghttp2.
diff --git a/gnu/packages/aidc.scm b/gnu/packages/aidc.scm
index 3db631d92e..ac85dca4b0 100644
--- a/gnu/packages/aidc.scm
+++ b/gnu/packages/aidc.scm
@@ -30,60 +30,66 @@
#:use-module (gnu packages autotools)
#:use-module (gnu packages check)
#:use-module (gnu packages imagemagick)
+ #:use-module (gnu packages gettext)
#:use-module (gnu packages glib)
#:use-module (gnu packages gtk)
#:use-module (gnu packages image)
+ #:use-module (gnu packages perl)
#:use-module (gnu packages pkg-config)
#:use-module (gnu packages python)
#:use-module (gnu packages python-xyz)
+ #:use-module (gnu packages pretty-print)
#:use-module (gnu packages qt)
#:use-module (gnu packages video)
#:use-module (guix build-system cmake)
#:use-module (guix build-system gnu))
(define-public zxing-cpp
- (package
+ ;; Use the master branch as it includes unreleased build system improvements
+ ;; allowing to use system libraries (instead of attempting to fetch them
+ ;; from the Internet).
+ (let ((revision "0")
+ (commit "00783db7aa3bcf8620a301854ac71c0ceaaca0c1"))
+ (package
+ (name "zxing-cpp")
+ (version (git-version "1.2.0" revision commit))
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/nu-book/zxing-cpp")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1yl2cpaqiv1g4nq9v0xfj1vd5faz55k4541vz6hsffvcxgn9nmc5"))))
+ (build-system cmake-build-system)
+ (native-inputs
+ `(("fmt" ,fmt)
+ ("googletest" ,googletest)))
+ (synopsis "C++ port of ZXing")
+ (description "ZXing-CPP is a barcode scanning library.")
+ (home-page "https://github.com/nu-book/zxing-cpp")
+ (license license:asl2.0))))
+
+;;; This older variant is kept for gst-plugins-bad (see:
+;;; https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/issues/1684).
+(define-public zxing-cpp-1.2
+ (package/inherit zxing-cpp
(name "zxing-cpp")
- (version "1.0.8")
- (source
- (origin
- (method git-fetch)
- (uri
- (git-reference
- (url "https://github.com/nu-book/zxing-cpp")
- (commit (string-append "v" version))))
- (file-name (git-file-name name version))
- (sha256
- (base32 "011sq8wcjfxbnd8sj6bf2fgkamlp8gj6q835g61c952npvwsnl71"))))
- (native-inputs
- `(("googletest-source" ,(package-source googletest))))
- (build-system cmake-build-system)
- (arguments
- `(#:out-of-source? #f
- #:phases
- (modify-phases %standard-phases
- (add-after 'unpack 'unpack-googletest
- ;; Copy the googletest sources to where the CMake build expects them.
- (lambda* (#:key inputs #:allow-other-keys)
- (let ((source (assoc-ref inputs "googletest-source"))
- (target "test/unit/googletest-src"))
- (mkdir-p target)
- (copy-recursively source target)
- ;; Disable downloading via ExternalProject.
- (substitute* "test/unit/CMakeLists.txt.in"
- (("ExternalProject_Add\\(") "message("))
- #t)))
- (replace 'check
- (lambda _
- (with-directory-excursion "test/unit"
- (invoke "cmake" ".")
- (invoke "make")
- (invoke "./ZXingUnitTest"))
- #t)))))
- (synopsis "C++ port of ZXing")
- (description "ZXing-CPP is a barcode scanning library.")
- (home-page "https://github.com/nu-book/zxing-cpp")
- (license license:asl2.0)))
+ (version "1.2.0")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/nu-book/zxing-cpp")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1gjj9c7h634rrmmgzbc7cxjqsxdq0paj6113k02ncjm1s9abk7ik"))))
+ ;; Disable tests to avoid bundled dependencies.
+ (arguments '(#:tests? #f
+ #:configure-flags '("-DBUILD_BLACKBOX_TESTS=OFF")))
+ (native-inputs '())))
(define-public barcode
(package
@@ -169,16 +175,18 @@ C/C++ programs to use its capabilities without restrictions or overhead.")
(define-public zbar
(package
(name "zbar")
- (version "0.23")
+ (version "0.23.90")
(source
(origin
- (method url-fetch)
- (uri (string-append "https://linuxtv.org/downloads/zbar/zbar-"
- version
- ".tar.bz2"))
+ (method git-fetch)
+ (uri
+ (git-reference
+ (url "https://github.com/mchehab/zbar")
+ (commit version)))
+ (file-name (git-file-name name version))
(sha256
(base32
- "0bmd93a15qpgbsq9c9j33qms18rdrgz6gbc48zi6z9w5pvrvi7z9"))))
+ "0rf3i7lx0fqzxsngird6l4d4dnl612nr32rm8sib699qqx67px8n"))))
(build-system gnu-build-system)
(arguments
'(#:configure-flags (list "--with-gtk=auto"
@@ -187,17 +195,27 @@ C/C++ programs to use its capabilities without restrictions or overhead.")
(assoc-ref %outputs "out")
"/etc"))))
(native-inputs
- `(("glib" ,glib "bin")
- ("pkg-config" ,pkg-config)))
+ `(("autoconf" ,autoconf)
+ ("automake" ,automake)
+ ("gettext" ,gettext-minimal)
+ ("glib" ,glib "bin")
+ ("gobject-introspection" ,gobject-introspection)
+ ("libtool" ,libtool)
+ ("pkg-config" ,pkg-config)
+ ("python-wrapper" ,python-wrapper)))
(inputs
- `(("gobject-introspection" ,gobject-introspection)
- ("gtk+" ,gtk+)
+ `(("dbus" ,dbus)
("imagemagick" ,imagemagick)
("libjpeg" ,libjpeg-turbo)
+ ("perl" ,perl)
("python" ,python)
- ("qtbase" ,qtbase-5)
("qtx11extras" ,qtx11extras)
("v4l-utils" ,v4l-utils)))
+ (propagated-inputs
+ ;; These are in 'requires' field of .pc files.
+ `(("glib" ,glib)
+ ("gtk+" ,gtk+)
+ ("qtbase" ,qtbase-5)))
(synopsis "Bar code reader")
(description
"ZBar can read barcodes from various sources, such as video streams,
diff --git a/gnu/packages/algebra.scm b/gnu/packages/algebra.scm
index 985120d4e5..d30b9b7930 100644
--- a/gnu/packages/algebra.scm
+++ b/gnu/packages/algebra.scm
@@ -4,7 +4,7 @@
;;; Copyright © 2016, 2017, 2018, 2019, 2020, 2021 Nicolas Goaziou <mail@nicolasgoaziou.fr>
;;; Copyright © 2014, 2018 Mark H Weaver <mhw@netris.org>
;;; Copyright © 2016, 2018, 2019, 2021 Ricardo Wurmus <rekado@elephly.net>
-;;; Copyright © 2017, 2020 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2017, 2020, 2021 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2017–2021 Tobias Geerinckx-Rice <me@tobias.gr>
;;; Copyright © 2017 Marius Bakke <mbakke@fastmail.com>
;;; Copyright © 2017, 2019, 2021 Eric Bavier <bavier@posteo.net>
@@ -248,8 +248,8 @@ the real span of the lattice.")
"1jm1cz1687cz8pl8lgvmyk3l33cms1xbayv38ca4z1f60qb7zfnc"))))
(build-system gnu-build-system)
(native-inputs
- `(("texlive" ,(texlive-union
- (list texlive-amsfonts/patched)))))
+ `(("texlive" ,(texlive-updmap.cfg
+ (list texlive-amsfonts)))))
(inputs `(("gmp" ,gmp)
("libx11" ,libx11)
("perl" ,perl)
@@ -703,12 +703,14 @@ binary.")
("ed" ,ed)
("flex" ,flex)
("texinfo" ,texinfo)))
+ (inputs
+ `(("readline" ,readline)))
(arguments
'(#:configure-flags
(list "--with-readline")
#:phases
(modify-phases %standard-phases
- (add-after 'unpack 'autogen
+ (replace 'bootstrap
(lambda _
(invoke "autoreconf" "-vif"))))))
(home-page "https://www.gnu.org/software/bc/")
diff --git a/gnu/packages/android.scm b/gnu/packages/android.scm
index 74d97ab3b6..e390001d06 100644
--- a/gnu/packages/android.scm
+++ b/gnu/packages/android.scm
@@ -4,12 +4,13 @@
;;; Copyright © 2016, 2020 Marius Bakke <mbakke@fastmail.com>
;;; Copyright © 2017 Julien Lepiller <julien@lepiller.eu>
;;; Copyright © 2017 Hartmut Goebel <h.goebel@crazy-compilers.com>
-;;; Copyright © 2017, 2020 Maxim Cournoyer <maxim.cournoyer@gmail.com>
+;;; Copyright © 2017, 2020, 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;; Copyright © 2018–2021 Tobias Geerinckx-Rice <me@tobias.gr>
;;; Copyright © 2018 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2019, 2020 Andreas Enge <andreas@enge.fr>
;;; Copyright © 2019 Ricardo Wurmus <rekado@elephly.net>
;;; Copyright © 2020 Sergey Trofimov <sarg@sarg.org.ru>
+;;; Copyright © 2021 Guillaume Le Vaillant <glv@posteo.net>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -29,6 +30,7 @@
(define-module (gnu packages android)
#:use-module (guix packages)
#:use-module (guix download)
+ #:use-module (guix gexp)
#:use-module (guix git-download)
#:use-module (guix build-system android-ndk)
#:use-module (guix build-system gnu)
@@ -360,10 +362,12 @@ various Android core host applications.")
(arguments
`(#:tests? #f ; Test failure: sysdeps_poll.fd_count
#:make-flags
- (list "CFLAGS=-Wno-error"
- "CXXFLAGS=-fpermissive -Wno-error -std=gnu++14 -D_Nonnull= -D_Nullable= -I ."
- (string-append "LDFLAGS=-Wl,-rpath=" (assoc-ref %outputs "out") "/lib "
- "-Wl,-rpath=" (assoc-ref %build-inputs "openssl") "/lib -L ."))
+ ,#~(list
+ "CFLAGS=-Wno-error"
+ "CXXFLAGS=-fpermissive -Wno-error -std=gnu++14 -D_Nonnull= -D_Nullable= -I ."
+ (string-append
+ "LDFLAGS=-Wl,-rpath=" #$output "/lib "
+ "-Wl,-rpath=" #$(this-package-input "openssl") "/lib -L ."))
#:phases
(modify-phases %standard-phases
(add-after 'unpack 'enter-source
@@ -530,29 +534,25 @@ the core SELinux management utilities.")
(build-system android-ndk-build-system)
(arguments
`(#:make-flags
- (list (string-append "CPPFLAGS="
- ;"-Wno-error "
- "-I "
- (assoc-ref %build-inputs "android-libselinux")
- "/include "
- "-I " (assoc-ref %build-inputs "android-libsparse")
- "/include "
- "-I " (assoc-ref %build-inputs "android-libcutils")
- "/include "
- "-I " (assoc-ref %build-inputs "android-liblog") "/include "
- "-I ../core/include")
- "CFLAGS=-Wno-error"
- "install-libext4_utils_host.a"
- (string-append "prefix=" (assoc-ref %outputs "out")))
+ ,#~(list
+ (string-append
+ "CPPFLAGS="
+ ;"-Wno-error "
+ "-I " #$(this-package-input "android-libselinux") "/include "
+ "-I " #$(this-package-input "android-libsparse") "/include "
+ "-I " #$(this-package-input "android-libcutils") "/include "
+ "-I " #$(this-package-input "android-liblog") "/include "
+ "-I ../core/include")
+ "CFLAGS=-Wno-error"
+ "install-libext4_utils_host.a"
+ (string-append "prefix=" #$output))
#:phases
(modify-phases %standard-phases
(add-after 'unpack 'unpack-core
(lambda* (#:key inputs #:allow-other-keys)
(mkdir-p "core")
- (with-directory-excursion "core"
- (invoke "tar" "axf" (assoc-ref inputs "android-core")
- "--strip-components=1"))
- #t))
+ (copy-recursively (assoc-ref inputs "android-core")
+ "core")))
(add-after 'unpack-core 'enter-source
(lambda _ (chdir "ext4_utils") #t))
(replace 'install
@@ -585,6 +585,9 @@ Android core.")
(modify-phases %standard-phases
(add-after 'unpack 'enter-source
(lambda _ (chdir "f2fs_utils") #t))
+ (add-before 'build 'set-compilation-flags
+ (lambda _
+ (setenv "CFLAGS" "-fcommon")))
(add-after 'install 'install-headers
(lambda* (#:key inputs outputs #:allow-other-keys)
(copy-recursively "." (string-append (assoc-ref outputs "out")
@@ -1026,13 +1029,6 @@ connected devices via ADB.")
(arguments
`(#:phases
(modify-phases %standard-phases
- (add-after 'unpack 'enjarify-wrapper-inherit-pythonpath
- ;; enjarify sets PYTHONPATH from a shell script, overwriting
- ;; PYTHONPATH set from guix. Comment out this line.
- (lambda _
- (substitute* "enjarify.sh"
- (("export PYTHONPATH") "# export PYTHONPATH"))
- #t))
(add-before 'check 'fixup-expected-test-results
;; Upstream adjusted this test in commit:
;; 3ae884a6485af82d300515813f537685b08dd800
diff --git a/gnu/packages/animation.scm b/gnu/packages/animation.scm
index a8ead4295c..063103e433 100644
--- a/gnu/packages/animation.scm
+++ b/gnu/packages/animation.scm
@@ -225,7 +225,7 @@ for tweening, preventing the need to hand-draw each frame.")
`("XDG_DATA_DIRS" ":" prefix (,gtk-share)))
#t))))))
(inputs
- `(("gtkmm" ,gtkmm)
+ `(("gtkmm" ,gtkmm-3)
("gtk+" ,gtk+)
("libsigc++" ,libsigc++)
("synfig" ,synfig)))
diff --git a/gnu/packages/apr.scm b/gnu/packages/apr.scm
index 1a4a1c6304..5ef1488218 100644
--- a/gnu/packages/apr.scm
+++ b/gnu/packages/apr.scm
@@ -30,14 +30,14 @@
(define-public apr
(package
(name "apr")
- (version "1.6.5")
+ (version "1.7.0")
(source (origin
(method url-fetch)
(uri (string-append "mirror://apache/apr/apr-"
version ".tar.bz2"))
(sha256
(base32
- "01d1n1ql66bxsjx0wyzazmkqdqdmr0is6a7lwyy5kzy4z7yajz56"))
+ "1spp6r2a3xcl5yajm9safhzyilsdzgagc2dadif8x6z9nbq4iqg2"))
(patches
(search-patches "apr-skip-getservbyname-test.patch"))
(patch-flags '("-p0"))))
diff --git a/gnu/packages/arcan.scm b/gnu/packages/arcan.scm
index a84bf0d8dd..721cd7fd70 100644
--- a/gnu/packages/arcan.scm
+++ b/gnu/packages/arcan.scm
@@ -1,5 +1,6 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2019 L p R n d n <guix@lprndn.info>
+;;; Copyright © 2021 Guillaume Le Vaillant <glv@posteo.net>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -65,7 +66,8 @@
(base32 "1pd0avlzc2rig1hd37zbhc7r2s6fjzdhshfg9l9cfzibl7caclyw"))))
(build-system cmake-build-system)
(arguments
- `(#:configure-flags '("-DVIDEO_PLATFORM=egl-dri" "-DBUILTIN_LUA=off"
+ `(#:configure-flags '("-DCMAKE_C_FLAGS=-fcommon"
+ "-DVIDEO_PLATFORM=egl-dri" "-DBUILTIN_LUA=off"
"-DSTATIC_OPENAL=off""-DENABLE_LWA=on"
"-DSTATIC_SQLITE3=off" "-DSTATIC_FREETYPE=off"
"-DSHMIF_TUI_ACCEL=on")
@@ -75,12 +77,10 @@
(lambda* (#:key inputs #:allow-other-keys)
(substitute* "src/platform/cmake/modules/FindGBMKMS.cmake"
(("/usr/local/include/libdrm")
- (string-append (assoc-ref inputs "libdrm")
- "/include/libdrm")))
+ (search-input-directory inputs "include/libdrm")))
(substitute* "src/platform/cmake/modules/FindAPR.cmake"
(("/usr/local/apr/include/apr-1")
- (string-append (assoc-ref inputs "apr")
- "/include/apr-1")))
+ (search-input-directory inputs "include/apr-1")))
#t))
;; Normally, it tries to fetch patched openal with git
;; but copying files manually in the right place seems to work too.
@@ -178,7 +178,8 @@ engine programmable using Lua.")
`(,@(ensure-keyword-arguments
(package-arguments arcan)
'(#:configure-flags
- '("-DVIDEO_PLATFORM=sdl" "-DBUILTIN_LUA=off"
+ '("-DCMAKE_C_FLAGS=-fcommon"
+ "-DVIDEO_PLATFORM=sdl" "-DBUILTIN_LUA=off"
"-DSTATIC_OPENAL=off" "-DDISABLE_JIT=off"
"-DENABLE_LWA=on" "-DSTATIC_SQLITE3=off"
"-DSTATIC_FREETYPE=off" "-DSHMIF_TUI_ACCEL=on")))))
diff --git a/gnu/packages/assembly.scm b/gnu/packages/assembly.scm
index 6e4dede589..675663047e 100644
--- a/gnu/packages/assembly.scm
+++ b/gnu/packages/assembly.scm
@@ -9,6 +9,8 @@
;;; Copyright © 2020 Jakub Kądziołka <kuba@kadziolka.net>
;;; Copyright © 2020 Christine Lemmer-Webber <cwebber@dustycloud.org>
;;; Copyright © 2020 B. Wilson <elaexuotee@wilsonb.com>
+;;; Copyright © 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
+;;; Copyright © 2021 Guillaume Le Vaillant <glv@posteo.net>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -57,14 +59,14 @@
(define-public nasm
(package
(name "nasm")
- (version "2.14.02")
+ (version "2.15.05")
(source (origin
(method url-fetch)
(uri (string-append "http://www.nasm.us/pub/nasm/releasebuilds/"
version "/nasm-" version ".tar.xz"))
(sha256
(base32
- "1xg8dfr49py15vbwk1rzcjc3zpqydmr49ahlijm56wlgj8zdwjp2"))))
+ "0gqand86b0r86k3h46dh560lykxmxqqywz5m55kgjfq7q4lngbrw"))))
(build-system gnu-build-system)
(native-inputs `(("perl" ,perl) ;for doc and test target
("texinfo" ,texinfo)))
@@ -75,11 +77,10 @@
(add-after 'unpack 'dont-build-ps-pdf-outputs
(lambda _
(substitute* "doc/Makefile.in"
- (("html nasmdoc.txt nasmdoc.pdf")
+ (("html nasmdoc.txt nasmdoc.pdf \\$\\(XZFILES\\)")
"html nasmdoc.txt")
(("\\$\\(INSTALL_DATA\\) nasmdoc.pdf")
- "$(INSTALL_DATA)"))
- #t))
+ "$(INSTALL_DATA)"))))
(add-after 'install 'install-info
(lambda _
(invoke "make" "install_doc"))))))
@@ -140,6 +141,9 @@ debugging information in STABS, DWARF 2, and CodeView 8 formats.")
"1jgxbq2cm51dzi3zhz38mmgwdcgs328mfl8iviw8dxn6dn36p1gd"))))
(build-system gnu-build-system)
(native-inputs `(("zlib" ,zlib)))
+ (arguments
+ ;; Some tests fail when run in parallel.
+ `(#:parallel-tests? #f))
(synopsis "Library for generating assembly code at runtime")
(description
"GNU Lightning is a library that generates assembly language code at
@@ -445,19 +449,19 @@ sets, both THUMB and ARM mode.")
(define-public intel-xed
(package
(name "intel-xed")
- (version "11.2.0")
+ (version "12.0.1")
(source
(origin
(method git-fetch)
(uri (git-reference
(url "https://github.com/intelxed/xed")
(commit version)))
- (sha256 (base32 "1jffayski2gpd54vaska7fmiwnnia8v3cka4nfyzjgl8xsky9v2s"))
+ (sha256 (base32 "07zfff8zf29c2n0wal87hiqfq3cwcjn80zz78mz0nyjfj09nd39f"))
(file-name (git-file-name name version))
(patches (search-patches "intel-xed-fix-nondeterminism.patch"))))
(build-system gnu-build-system)
(native-inputs
- `(("python-wrapper" ,python-wrapper)
+ `(("python" ,python-wrapper)
("tcsh" ,tcsh)
;; As of the time of writing this comment, mbuild does not exist in the
;; Python Package Index and seems to only be used by intel-xed, so we
@@ -471,10 +475,10 @@ sets, both THUMB and ARM mode.")
(method git-fetch)
(uri (git-reference
(url "https://github.com/intelxed/mbuild")
- (commit "5304b94361fccd830c0e2417535a866b79c1c297")))
+ (commit "3de3f0d753c11dbe634bec611d4cc13f74768e4f")))
(sha256
(base32
- "0r3avc3035aklqxcnc14rlmmwpj3jp09vbcbwynhvvmcp8srl7dl"))
+ "0z8hdhpmk8y5c9429p2yns9daswnffbprni9czkq3vij8f58lkg4"))
(file-name (git-file-name name version)))))))
(outputs '("out" "lib"))
(arguments
@@ -489,8 +493,7 @@ sets, both THUMB and ARM mode.")
(replace 'build
(lambda* (#:key inputs #:allow-other-keys)
(let ((mbuild (assoc-ref inputs "mbuild")))
- (setenv "PYTHONPATH" (string-append
- (getenv "PYTHONPATH") ":" mbuild))
+ (setenv "PYTHONPATH" mbuild)
(invoke "./mfile.py"
(string-append "--build-dir=" build-dir)
(string-append "--install-dir=" kit-dir)
@@ -517,8 +520,7 @@ sets, both THUMB and ARM mode.")
(copy-recursively (string-append kit-dir "/include")
(string-append lib "/include"))
(copy-recursively (string-append kit-dir "/lib")
- (string-append lib "/lib"))
- #t)))))))
+ (string-append lib "/lib")))))))))
(home-page "https://intelxed.github.io/")
(synopsis "Encoder and decoder for x86 (IA32 and Intel64) instructions")
(description "The Intel X86 Encoder Decoder (XED) is a software library and
diff --git a/gnu/packages/astronomy.scm b/gnu/packages/astronomy.scm
index 8e3403c85c..9675d09c6e 100644
--- a/gnu/packages/astronomy.scm
+++ b/gnu/packages/astronomy.scm
@@ -456,7 +456,7 @@ astronomical fields. SkyMaker is part of the EFIGI
(native-inputs
`(("pkg-config" ,pkg-config)))
(inputs
- `(("gtkmm" ,gtkmm)
+ `(("gtkmm" ,gtkmm-3)
("libskry" ,libskry)
("ffmpeg" ,ffmpeg)))
(home-page "https://github.com/GreatAttractor/stackistry")
@@ -938,7 +938,8 @@ Mercator, Mollweide, Peters, polyconic, orthographic and rectangular.")
("goocanvas" ,goocanvas)
("gtk+" ,gtk+)))
(arguments
- `(#:phases
+ `(#:configure-flags '("CFLAGS=-O2 -g -fcommon")
+ #:phases
(modify-phases %standard-phases
(add-after 'unpack 'fix-tests
(lambda _
@@ -1176,14 +1177,12 @@ Moon position, etc.")
`(#:phases
(modify-phases %standard-phases
(replace 'check
- (lambda* (#:key outputs #:allow-other-keys)
- (let ((out (assoc-ref outputs "out")))
- (setenv "PYTHONPATH"
- (string-append "./build/lib:"
- (getenv "PYTHONPATH")))
- (setenv "PATH" (string-append out "/bin:"
- (getenv "PATH")))
- (invoke "python" "-m" "unittest" "discover" "-s" "test")))))))
+ (lambda* (#:key tests? inputs outputs #:allow-other-keys)
+ (when tests?
+ (let ((out (assoc-ref outputs "out")))
+ (add-installed-pythonpath inputs outputs)
+ (setenv "PATH" (string-append out "/bin:" (getenv "PATH")))
+ (invoke "python" "-m" "unittest" "discover" "-s" "test"))))))))
(inputs
`(("python-numpy" ,python-numpy)))
(home-page "https://github.com/brandon-rhodes/python-jplephem")
diff --git a/gnu/packages/attr.scm b/gnu/packages/attr.scm
index 3237376d40..8c1a4aca7c 100644
--- a/gnu/packages/attr.scm
+++ b/gnu/packages/attr.scm
@@ -1,6 +1,6 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2012 Nikita Karetnikov <nikita@karetnikov.org>
-;;; Copyright © 2012, 2013, 2016 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2012, 2013, 2016, 2021 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2018 Mark H Weaver <mhw@netris.org>
;;; Copyright © 2019 Marius Bakke <mbakke@fastmail.com>
;;;
@@ -23,6 +23,7 @@
#:use-module (guix licenses)
#:use-module (gnu packages perl)
#:use-module (gnu packages gettext)
+ #:use-module (gnu packages hurd)
#:use-module (guix packages)
#:use-module (guix download)
#:use-module (guix build-system gnu))
@@ -30,18 +31,29 @@
(define-public attr
(package
(name "attr")
- (version "2.4.48")
+ (version "2.5.1")
(source (origin
(method url-fetch)
(uri (string-append "mirror://savannah/attr/attr-"
version ".tar.gz"))
(sha256
(base32
- "1rr4adzwax4bzr2c00f06zcsljv5y6p9wymz1g89ww7cb2rp5bay"))))
+ "1y6sibbkrcjygv8naadnsg6xmsqwfh6cwrqk01l0v2i5kfacdqds"))))
(build-system gnu-build-system)
(arguments
`(#:phases
(modify-phases %standard-phases
+ ,@(if (hurd-target?)
+ `((add-before 'configure 'skip-linux-syscalls
+ (lambda _
+ ;; Starting from 2.5.1, libattr includes Linux-specific
+ ;; calls to syscall(2). Comment them out for GNU/Hurd
+ ;; and instead use the glibc-provided wrappers.
+ (substitute* "Makefile.in"
+ (("libattr/syscalls\\.c") "")
+ (("\tlibattr/la-syscalls\\.lo") "")
+ (("-Wl,[[:graph:]]+/libattr\\.lds") "")))))
+ '())
(replace 'check
(lambda* (#:key target #:allow-other-keys)
;; Use the right shell.
@@ -57,8 +69,7 @@
;; extended attributes, and we wish to allow Guix to be built
;; on such systems.
(unless target
- (system* "make" "tests" "-C" "test"))
- #t)))))
+ (system* "make" "tests" "-C" "test")))))))
(inputs
;; Perl is needed to run tests; remove it from cross builds.
(if (%current-target-system)
diff --git a/gnu/packages/audio.scm b/gnu/packages/audio.scm
index 7f780e13cf..43259c5989 100644
--- a/gnu/packages/audio.scm
+++ b/gnu/packages/audio.scm
@@ -433,8 +433,8 @@ by MusicIP.")
(origin
(method url-fetch)
(uri
- (string-append "https://sourceforge.net/projects/faac/files/faac-src/"
- "faac-1.30/faac-1_30.tar.gz/download"))
+ (string-append "mirror://sourceforge/faac/faac-src"
+ "/faac-" version "/faac-1_30.tar.gz"))
(sha256
(base32 "1lmj0dib3mjp84jhxc5ddvydkzzhb0gfrdh3ikcidjlcb378ghxd"))))
(build-system gnu-build-system)
@@ -1966,7 +1966,7 @@ patches that can be used with softsynths such as Timidity and WildMidi.")
("lilv" ,lilv)
("ladspa" ,ladspa)
("jack" ,jack-1)
- ("gtkmm" ,gtkmm)
+ ("gtkmm" ,gtkmm-3)
("gtk+" ,gtk+)
("fftwf" ,fftwf)
("lrdf" ,lrdf)
@@ -2188,9 +2188,9 @@ synchronous execution of all clients, and low latency operation.")
(lambda* (#:key inputs outputs #:allow-other-keys)
;; Make sure 'jack_control' runs with the correct PYTHONPATH.
(let* ((out (assoc-ref outputs "out"))
- (path (getenv "PYTHONPATH")))
+ (path (getenv "GUIX_PYTHONPATH")))
(wrap-program (string-append out "/bin/jack_control")
- `("PYTHONPATH" ":" prefix (,path))))
+ `("GUIX_PYTHONPATH" ":" prefix (,path))))
#t)))))
(inputs
`(("alsa-lib" ,alsa-lib)
@@ -3462,8 +3462,10 @@ analysis plugins or audio feature extraction plugins.")
;; Originally a symlink to '/usr/local/share/automake-1.12/ar-lib'.
(delete-file "ar-lib")
(symlink
- (string-append (assoc-ref inputs "automake") "/share/automake-"
- ,(package-version automake) "/ar-lib")
+ (search-input-file inputs
+ (string-append "/share/automake-"
+ ,(package-version automake)
+ "/ar-lib"))
"ar-lib")
#t)))))
(home-page "http://sbsms.sourceforge.net/")
@@ -4490,8 +4492,7 @@ the following features:
(base32 "189l6lz8sz5vr6bjyzgcsrvksl1w6crqsg0q65r94b5yjsmjnpr4"))))
(build-system meson-build-system)
(arguments
- `(#:meson ,meson-0.55
- ;; Using a "release" build is recommended for performance
+ `(;; Using a "release" build is recommended for performance
#:build-type "release"
#:phases
(modify-phases %standard-phases
@@ -4976,10 +4977,11 @@ as is the case with audio plugins.")
(chmod (string-append out "/share/carla/carla") #o555)
#t)))
(add-after 'install 'wrap-executables
- (lambda* (#:key outputs #:allow-other-keys)
+ (lambda* (#:key inputs outputs #:allow-other-keys)
(let ((out (assoc-ref outputs "out")))
(wrap-script (string-append out "/bin/carla")
- `("PYTHONPATH" ":" prefix (,(getenv "PYTHONPATH"))))
+ #:guile (search-input-file inputs "bin/guile")
+ `("GUIX_PYTHONPATH" ":" prefix (,(getenv "GUIX_PYTHONPATH"))))
#t))))))
(inputs
`(("alsa-lib" ,alsa-lib)
@@ -5073,8 +5075,7 @@ in the package.")
"1570m2dfia17dbkhd2qhx8jjihrpm7g8nnyg6n4wif4vv229s7dz"))))
(build-system meson-build-system)
(arguments
- `(#:meson ,meson-0.55
- #:configure-flags
+ `(#:configure-flags
;; Build the tests.
`("-Dtests=true")))
(inputs
@@ -5375,11 +5376,10 @@ Rate} 3600x2250 bit/s vocoder used in various radio systems.")
(modify-phases %standard-phases
(replace 'check
(lambda* (#:key inputs #:allow-other-keys)
- (let* ((python (string-append (assoc-ref inputs "python")
- "/bin/python3"))
- (run-tests (string-append "../ableton-link-"
- ,version
- "-checkout/ci/run-tests.py")))
+ (let* ((python (search-input-file inputs "/bin/python3"))
+ (run-tests (string-append "../ableton-link-"
+ ,version
+ "-checkout/ci/run-tests.py")))
(invoke python run-tests "--target" "LinkCoreTest")
(invoke python run-tests "--target" "LinkDiscoveryTest"))))
(add-before 'install 'patch-cmake
diff --git a/gnu/packages/autotools.scm b/gnu/packages/autotools.scm
index 238bd6bc11..57efc4c477 100644
--- a/gnu/packages/autotools.scm
+++ b/gnu/packages/autotools.scm
@@ -59,12 +59,9 @@
"113nlmidxy9kjr45kg9x3ngar4951mvag1js2a3j8nxcz34wxsv4"))))
(build-system gnu-build-system)
(inputs
- ;; TODO: remove `if' in the next rebuild cycle.
- (if (%current-target-system)
- `(("bash" ,bash-minimal)
- ("perl" ,perl)
- ("m4" ,m4))
- '()))
+ `(("bash" ,bash-minimal)
+ ("perl" ,perl)
+ ("m4" ,m4)))
(native-inputs
`(("perl" ,perl)
("m4" ,m4)))
@@ -216,9 +213,9 @@ files with a system-specific shebang."
(inputs `(("guile"
;; XXX: Kludge to hide the circular dependency.
,(module-ref (resolve-interface '(gnu packages guile))
- 'guile-2.0))
+ 'guile-3.0/fixed))
("autoconf" ,autoconf)
- ("bash" ,bash)))
+ ("bash" ,bash-minimal)))
(arguments
'(#:modules ((guix build utils))
#:builder
@@ -331,24 +328,21 @@ output is indexed in many ways to simplify browsing.")
(define-public automake
(package
(name "automake")
- (version "1.16.2")
+ (version "1.16.3")
(source (origin
(method url-fetch)
(uri (string-append "mirror://gnu/automake/automake-"
version ".tar.xz"))
(sha256
(base32
- "1l7dkqbsmbf94ax29jj1jf6a0r6ikc8jybg1p5m0c3ki7pg5ki6c"))
+ "0fmz2fhmzcpacnprl5msphvaflwiy0hvpgmqlgfny72ddijzfazz"))
(patches
(search-patches "automake-skip-amhello-tests.patch"))))
(build-system gnu-build-system)
(inputs
- ;; TODO: remove `if' in the next rebuild cycle.
- (if (%current-target-system)
- `(("autoconf" ,autoconf-wrapper)
- ("bash" ,bash-minimal)
- ("perl" ,perl))
- '()))
+ `(("autoconf" ,autoconf-wrapper)
+ ("bash" ,bash-minimal)
+ ("perl" ,perl)))
(native-inputs
`(("autoconf" ,autoconf-wrapper)
("perl" ,perl)))
@@ -507,11 +501,19 @@ Makefile, simplifying the entire process for the developer.")
(("/bin/sh")
(string-append bash "/bin/sh")))
#t)))
- (add-after 'patch-source-shebangs 'restore-ltmain-shebang
- (lambda* (#:key inputs #:allow-other-keys)
- (substitute* "build-aux/ltmain.in"
- (("^#!.*/bin/sh$") "#!/bin/sh"))
- #t)))))
+ ;; These files may be copied into source trees by libtoolize,
+ ;; therefore they must not point to store file names that would be
+ ;; leaked with tarballs generated by make dist.
+ (add-after 'install 'restore-build-aux-shebang
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (dir (string-append out "/share/libtool/build-aux")))
+ (for-each (lambda (file)
+ (format #t "restoring shebang on `~a'~%" file)
+ (substitute* file
+ (("^#!.*/bin/sh") "#!/bin/sh")))
+ (find-files dir ".*"))
+ #t))))))
(synopsis "Generic shared library support tools")
(description
diff --git a/gnu/packages/aux-files/guile-launcher.c b/gnu/packages/aux-files/guile-launcher.c
index 47ba069de1..ad0094bff5 100644
--- a/gnu/packages/aux-files/guile-launcher.c
+++ b/gnu/packages/aux-files/guile-launcher.c
@@ -82,10 +82,13 @@ main (int argc, char **argv)
unsetenv ("GUILE_LOAD_PATH");
unsetenv ("GUILE_LOAD_COMPILED_PATH");
- /* XXX: Do not let GMP allocate via libgc as this can lead to memory
- corruption in GnuTLS/Nettle since Nettle also uses GMP:
+#if !SCM_ENABLE_MINI_GMP
+ /* XXX: On Guile < 3.0.6 and Guile built without its bundled mini-GMP, do
+ not let GMP allocate via libgc as this can lead to memory corruption in
+ GnuTLS/Nettle since Nettle also uses GMP:
<https://issues.guix.gnu.org/46330>. */
scm_install_gmp_memory_functions = 0;
+#endif
scm_boot_guile (argc, argv, inner_main, 0);
return 0; /* never reached */
diff --git a/gnu/packages/aux-files/python/sanity-check.py b/gnu/packages/aux-files/python/sanity-check.py
new file mode 100644
index 0000000000..a84f8f03c0
--- /dev/null
+++ b/gnu/packages/aux-files/python/sanity-check.py
@@ -0,0 +1,92 @@
+# -*- coding: utf-8 -*-
+# GNU Guix --- Functional package management for GNU
+# Copyright © 2021 Lars-Dominik Braun <lars@6xq.net>
+#
+# This file is part of GNU Guix.
+#
+# GNU Guix is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or (at
+# your option) any later version.
+#
+# GNU Guix is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
+
+from __future__ import print_function # Python 2 support.
+import importlib
+import pkg_resources
+import sys
+import traceback
+
+try:
+ from importlib.machinery import PathFinder
+except ImportError:
+ PathFinder = None
+
+ret = 0
+
+# Only check site-packages installed by this package, but not dependencies
+# (which pkg_resources.working_set would include). Path supplied via argv.
+ws = pkg_resources.find_distributions(sys.argv[1])
+
+for dist in ws:
+ print('validating', repr(dist.project_name), dist.location)
+ try:
+ print('...checking requirements: ', end='')
+ req = str(dist.as_requirement())
+ # dist.activate() is not enough to actually check requirements, we
+ # have to .require() it.
+ pkg_resources.require(req)
+ print('OK')
+ except Exception as e:
+ print('ERROR:', req, e)
+ ret = 1
+ continue
+
+ # Try to load top level modules. This should not have any side-effects.
+ try:
+ metalines = dist.get_metadata_lines('top_level.txt')
+ except (KeyError, EnvironmentError):
+ # distutils (i.e. #:use-setuptools? #f) will not install any metadata.
+ # This file is also missing for packages built using a PEP 517 builder
+ # such as poetry.
+ print('WARNING: cannot determine top-level modules')
+ continue
+ for name in metalines:
+ # Only available on Python 3.
+ if PathFinder and PathFinder.find_spec(name) is None:
+ # Ignore unavailable modules, often C modules, which were not
+ # installed at the top-level. Cannot use ModuleNotFoundError,
+ # because it is raised by failed imports too.
+ continue
+ try:
+ print('...trying to load module', name, end=': ')
+ importlib.import_module(name)
+ print('OK')
+ except Exception:
+ print('ERROR:')
+ traceback.print_exc(file=sys.stdout)
+ ret = 1
+
+ # Try to load entry points of console scripts too, making sure they
+ # work. They should be removed if they don't. Other groups may not be
+ # safe, as they can depend on optional packages.
+ for group, v in dist.get_entry_map().items():
+ if group not in {'console_scripts', 'gui_scripts'}:
+ continue
+ for name, ep in v.items():
+ try:
+ print('...trying to load endpoint', group, name, end=': ')
+ ep.load()
+ print('OK')
+ except Exception:
+ print('ERROR:')
+ traceback.print_exc(file=sys.stdout)
+ ret = 1
+
+sys.exit(ret)
diff --git a/gnu/packages/aux-files/python/sitecustomize.py b/gnu/packages/aux-files/python/sitecustomize.py
new file mode 100644
index 0000000000..71e328b9ac
--- /dev/null
+++ b/gnu/packages/aux-files/python/sitecustomize.py
@@ -0,0 +1,55 @@
+# -*- coding: utf-8 -*-
+# GNU Guix --- Functional package management for GNU
+# Copyright © 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
+#
+# This file is part of GNU Guix.
+#
+# GNU Guix is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or (at
+# your option) any later version.
+#
+# GNU Guix is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
+
+import os
+import sys
+
+# Commentary:
+#
+# Site-specific customization for Guix.
+#
+# The program below honors the GUIX_PYTHONPATH environment variable to
+# discover Python packages. File names appearing in this variable that match
+# a predefined versioned installation prefix are added to the sys.path. To be
+# considered, a Python package must be installed under the
+# 'lib/pythonX.Y/site-packages' directory, where X and Y are the major and
+# minor version numbers of the Python interpreter.
+#
+# Code:
+
+major_minor = '{}.{}'.format(*sys.version_info)
+site_packages_prefix = os.path.join(
+ 'lib', 'python' + major_minor, 'site-packages')
+python_site = os.path.join(sys.prefix, site_packages_prefix)
+
+try:
+ all_sites_raw = os.environ['GUIX_PYTHONPATH'].split(os.path.pathsep)
+except KeyError:
+ all_sites_raw = []
+# Normalize paths, otherwise a trailing slash would cause it to not match.
+all_sites_norm = [os.path.normpath(p) for p in all_sites_raw]
+matching_sites = [p for p in all_sites_norm
+ if p.endswith(site_packages_prefix)]
+
+# Insert sites matching the current version into sys.path, right before
+# Python's own site. This way, the user can override the libraries provided
+# by Python itself.
+sys_path_absolute = [os.path.realpath(p) for p in sys.path]
+index = sys_path_absolute.index(python_site)
+sys.path[index:index] = matching_sites
diff --git a/gnu/packages/avahi.scm b/gnu/packages/avahi.scm
index b2aeeadf47..7dcaa17a76 100644
--- a/gnu/packages/avahi.scm
+++ b/gnu/packages/avahi.scm
@@ -3,6 +3,7 @@
;;; Copyright © 2014 Mark H Weaver <mhw@netris.org>
;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
;;; Copyright © 2020 Marius Bakke <mbakke@fastmail.com>
+;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -22,9 +23,11 @@
(define-module (gnu packages avahi)
#:use-module ((guix licenses) #:select (lgpl2.1+))
#:use-module (guix packages)
+ #:use-module (guix gexp)
#:use-module (guix download)
#:use-module (guix build-system gnu)
#:use-module (gnu packages)
+ #:use-module (gnu packages bash)
#:use-module (gnu packages dbm)
#:use-module (gnu packages gettext)
#:use-module (gnu packages glib)
@@ -58,7 +61,7 @@
#t))))
(build-system gnu-build-system)
(arguments
- '(#:configure-flags '("--with-distro=none"
+ `(#:configure-flags '("--with-distro=none"
"--disable-static"
"--localstatedir=/var" ; for the DBus socket
"--disable-python"
@@ -68,13 +71,35 @@
"--enable-tests"
"--disable-qt4" "--disable-qt5"
"--disable-gtk" "--disable-gtk3"
- "--enable-compat-libdns_sd")))
+ "--enable-compat-libdns_sd"
+ ,@(if (%current-target-system)
+ '("ac_cv_prog_have_pkg_config=yes")
+ '()))
+ ;; TODO(core-updates): Make this unconditional.
+ ,@(if (%current-target-system)
+ `(#:modules ((srfi srfi-26)
+ (guix build utils)
+ (guix build gnu-build-system))
+ #:phases
+ ,#~(modify-phases %standard-phases
+ (add-after 'patch-shebangs 'patch-more-shebangs
+ (lambda* (#:key inputs #:allow-other-keys)
+ (define path
+ `(,(dirname (search-input-file inputs "bin/sh"))))
+ (for-each
+ (cut patch-shebang <> path)
+ (find-files (string-append #$output "/etc/avahi")))))))
+ '())))
(inputs
- `(("dbus" ,dbus)
+ ;; TODO(core-updates): Make this input unconditional.
+ `(,@(if (%current-target-system)
+ `(("bash-minimal" ,bash-minimal))
+ '())
+ ("dbus" ,dbus)
("expat" ,expat)
("gdbm" ,gdbm)
("glib" ,glib)
- ("libcap" ,libcap-2.31) ;to enable chroot support in avahi-daemon
+ ("libcap" ,libcap) ;to enable chroot support in avahi-daemon
("libdaemon" ,libdaemon)
("libevent" ,libevent)))
(native-inputs
diff --git a/gnu/packages/axoloti.scm b/gnu/packages/axoloti.scm
index c6dd748773..411ebbc610 100644
--- a/gnu/packages/axoloti.scm
+++ b/gnu/packages/axoloti.scm
@@ -318,8 +318,8 @@ runtime.")
(lambda ()
(let* ((dir (string-append (assoc-ref outputs "out")
"/share/axoloti"))
- (runtime (string-append (assoc-ref inputs "axoloti-runtime")
- "/share/axoloti"))
+ (runtime (search-input-directory inputs
+ "share/axoloti"))
(toolchain (assoc-ref inputs "cross-toolchain"))
(includes (string-append
toolchain
@@ -530,8 +530,8 @@ patcher application.")))
;; Install old firmware
(let ((target (string-append share "/old_firmware/firmware-1.0.12"))
(old-firmware
- (string-append (assoc-ref inputs "axoloti-runtime")
- "/share/axoloti/firmware/")))
+ (search-input-directory inputs
+ "share/axoloti/firmware")))
(mkdir-p target)
(install-file (string-append old-firmware
"flasher/flasher_build/flasher.bin")
diff --git a/gnu/packages/backup.scm b/gnu/packages/backup.scm
index dcc0412d1b..5e147113b1 100644
--- a/gnu/packages/backup.scm
+++ b/gnu/packages/backup.scm
@@ -6,7 +6,7 @@
;;; Copyright © 2017 Thomas Danckaert <post@thomasdanckaert.be>
;;; 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>
@@ -144,8 +144,7 @@
(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"))))))
@@ -226,7 +225,7 @@ backups (called chunks) to allow easy burning to CD/DVD.")
(define-public libarchive
(package
(name "libarchive")
- (version "3.4.2")
+ (version "3.5.1")
(source
(origin
(method url-fetch)
@@ -237,7 +236,7 @@ backups (called chunks) to allow easy burning to CD/DVD.")
version ".tar.xz")))
(sha256
(base32
- "18dd01ahs2hv74xm7axjc3yhq839p0x0s4vssvlmm8fknja09qfq"))))
+ "16r95rlmikll1k8vbhh06vq6x3srkc10hzxjjf3021mjs2ld65qf"))))
(build-system gnu-build-system)
(inputs
`(("bzip2" ,bzip2)
@@ -557,7 +556,6 @@ rsnapshot uses hard links to deduplicate identical files.")
(sha256
(base32
"0fpdyxww41ba52d98blvnf543xvirq1v9xz1i3x1gm9lzlzpmc2g"))
- (patches (search-patches "diffutils-gets-undeclared.patch"))
(modules '((guix build utils)))
(snippet
'(begin
@@ -584,24 +582,23 @@ rsnapshot uses hard links to deduplicate identical files.")
(substitute* "configure"
(("GUILE=(.*)--variable bindir`" _ middle)
(string-append "GUILE=" middle
- "--variable bindir`/guile")))
- #t))
+ "--variable bindir`/guile")))))
(add-before 'build 'set-libtirpc-include-path
(lambda* (#:key inputs #:allow-other-keys)
;; Allow <rpc/rpc.h> & co. to be found.
- (let ((libtirpc (assoc-ref inputs "libtirpc")))
- (setenv "CPATH"
- (string-append (getenv "CPATH")
- ":" libtirpc
- "/include/tirpc"))
- #t)))
+ (let ((tirpc (string-append (assoc-ref inputs "libtirpc")
+ "/include/tirpc")))
+ (if (getenv "CPATH")
+ (setenv "CPATH"
+ (string-append (getenv "CPATH")
+ ":" tirpc))
+ (setenv "CPATH" tirpc)))))
(add-before 'check 'skip-test
(lambda _
;; XXX: This test fails (1) because current GnuTLS no
;; longer supports OpenPGP authentication, and (2) for
;; some obscure reason. Better skip it.
- (setenv "XFAIL_TESTS" "utils/block-server")
- #t)))))
+ (setenv "XFAIL_TESTS" "utils/block-server"))))))
(native-inputs
`(("guile" ,guile-2.0)
("gperf" ,gperf-3.0) ;see <https://bugs.gnu.org/32382>
@@ -837,12 +834,11 @@ NTFS volumes using @code{ntfs-3g}, preserving NTFS-specific attributes.")
(output-dir
(assoc-ref outputs "out"))
- ;; Just a default... not so useful on guixsd though
- ;; You probably want to a service with file(s) to point to.
+ ;; Just a default... not so useful on Guix Systems though.
+ ;; You probably want a service with file(s) to point to.
(confdir "/etc/dirvish")
- (perl (string-append (assoc-ref %build-inputs "perl")
- "/bin/perl"))
+ (perl (search-input-file inputs "/bin/perl"))
(loadconfig.pl (call-with-input-file "loadconfig.pl"
read-string)))
diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm
index 77731d3720..043c9ad4d8 100644
--- a/gnu/packages/base.scm
+++ b/gnu/packages/base.scm
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2014, 2019 Andreas Enge <andreas@enge.fr>
;;; Copyright © 2012 Nikita Karetnikov <nikita@karetnikov.org>
;;; Copyright © 2014, 2015, 2016, 2018 Mark H Weaver <mhw@netris.org>
@@ -17,6 +17,9 @@
;;; Copyright © 2020 Vitaliy Shatrov <D0dyBo0D0dyBo0@protonmail.com>
;;; Copyright © 2020 Chris Marusich <cmmarusich@gmail.com>
;;; Copyright © 2021 Leo Le Bouter <lle-bout@zaclys.net>
+;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be>
+;;; Copyright © 2021 Guillaume Le Vaillant <glv@posteo.net>
+;;; Copyright © 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -39,6 +42,7 @@
#:use-module (gnu packages)
#:use-module (gnu packages acl)
#:use-module (gnu packages algebra)
+ #:use-module (gnu packages attr)
#:use-module (gnu packages bash)
#:use-module (gnu packages bison)
#:use-module (gnu packages ed)
@@ -56,6 +60,7 @@
#:use-module (gnu packages gettext)
#:use-module (guix i18n)
#:use-module (guix utils)
+ #:use-module (guix gexp)
#:use-module (guix packages)
#:use-module (guix download)
#:use-module (guix git-download)
@@ -67,6 +72,7 @@
#:use-module (srfi srfi-1)
#:use-module (srfi srfi-26)
#:export (glibc
+ make-ld-wrapper
libiconv-if-needed))
;;; Commentary:
@@ -98,18 +104,18 @@ command-line arguments, multiple languages, and so on.")
(define-public grep
(package
(name "grep")
- (version "3.4")
+ (version "3.6")
(source (origin
(method url-fetch)
(uri (string-append "mirror://gnu/grep/grep-"
version ".tar.xz"))
(sha256
(base32
- "1yy33kiwrxrwj2nxa4fg15bvmwyghqbs8qwkdvy5phm784f7brjq"))
+ "0gipv6bzkm1aihj0ncqpyh164xrzgcxcv9r1kwzyk2g1mzl1azk6"))
(patches (search-patches "grep-timing-sensitive-test.patch"))))
(build-system gnu-build-system)
- (native-inputs `(("perl" ,perl))) ;some of the tests require it
- (inputs `(("pcre" ,pcre)))
+ (native-inputs (list perl)) ;some of the tests require it
+ (inputs (list pcre))
(arguments
`(#:phases
(modify-phases %standard-phases
@@ -122,8 +128,7 @@ command-line arguments, multiple languages, and so on.")
(substitute* (list (string-append bin "/egrep")
(string-append bin "/fgrep"))
(("^exec grep")
- (string-append "exec " bin "/grep")))
- #t))))))
+ (string-append "exec " bin "/grep")))))))))
(synopsis "Print lines matching a pattern")
(description
"grep is a tool for finding text inside files. Text is found by
@@ -146,27 +151,24 @@ including, for example, recursive directory searching.")
".tar.gz"))
(sha256
(base32
- "0alqagh0nliymz23kfjg6g9w3cr086k0sfni56gi8fhzqwa3xksk"))))
+ "0alqagh0nliymz23kfjg6g9w3cr086k0sfni56gi8fhzqwa3xksk"))
+ (patches (search-patches "coreutils-gnulib-tests.patch"))
+
+ ;; Remove this snippet once upstream releases a fixed version.
+ ;; This snippet changes Makefile.in, even though the upstream
+ ;; patch changes testsuite/local.mk, since we build sed from a
+ ;; release tarball. See: https://bugs.gnu.org/36150
+ (snippet
+ '(begin
+ (substitute* "Makefile.in"
+ (("^ abs_srcdir='\\$\\(abs_srcdir\\)'.*" previous-line)
+ (string-append
+ previous-line
+ " CONFIG_HEADER='$(CONFIG_HEADER)'\t\t\\\n")))))
+ (modules '((guix build utils)))))
(build-system gnu-build-system)
- (arguments
- ;; TODO: When merging this into core-updates, keep the version of
- ;; this code (with comment!) applied as a snippet.
- `(,@(if (string-prefix? "powerpc64le" (or (%current-target-system)
- (%current-system)))
- `(#:phases
- (modify-phases %standard-phases
- (add-after 'unpack 'allow-building-on-selinux-systems
- (lambda _
- (substitute* "Makefile.in"
- (("^ abs_srcdir='\\$\\(abs_srcdir\\)'.*" previous-line)
- (string-append
- previous-line
- " CONFIG_HEADER='$(CONFIG_HEADER)'\t\t\\\n")))
- #t))))
- '())))
(synopsis "Stream editor")
- (native-inputs
- `(("perl" ,perl))) ;for tests
+ (native-inputs (list perl)) ;for tests
(description
"Sed is a non-interactive, text stream editor. It receives a text
input from a file or from standard input and it then applies a series of text
@@ -179,15 +181,14 @@ implementation offers several extensions over the standard utility.")
(define-public tar
(package
(name "tar")
- (version "1.32")
- (replacement tar-1.34)
+ (version "1.34")
(source (origin
(method url-fetch)
(uri (string-append "mirror://gnu/tar/tar-"
version ".tar.xz"))
(sha256
(base32
- "1n7xy657ii0sa42zx6944v2m4v9qrh6sqgmw17l3nch3y43sxlyh"))
+ "0a0x87anh9chbi2cgcyy7pmnm5hzk4yd1w2j8gm1wplwhwkbvgk3"))
(patches (search-patches "tar-skip-unreliable-tests.patch"
"tar-remove-wholesparse-check.patch"))))
(build-system gnu-build-system)
@@ -215,13 +216,12 @@ implementation offers several extensions over the standard utility.")
(let ((bash (assoc-ref inputs "bash")))
(substitute* "src/system.c"
(("/bin/sh")
- (string-append bash "/bin/sh")))
- #t))))))
+ (string-append bash "/bin/sh")))))))))
;; When cross-compiling, the 'set-shell-file-name' phase needs to be able
;; to refer to the target Bash.
(inputs (if (%current-target-system)
- `(("bash" ,bash))
+ (list bash)
'()))
(synopsis "Managing tar archives")
@@ -235,21 +235,6 @@ standard utility.")
(license gpl3+)
(home-page "https://www.gnu.org/software/tar/")))
-(define-public tar-1.34 ; fixes CVE-2021-20193
- (package
- (inherit tar)
- (version "1.34")
- (source (origin
- (method url-fetch)
- (uri (string-append "mirror://gnu/tar/tar-"
- version ".tar.xz"))
- (sha256
- (base32
- "0a0x87anh9chbi2cgcyy7pmnm5hzk4yd1w2j8gm1wplwhwkbvgk3"))
- (patches
- (search-patches "tar-skip-unreliable-tests.patch"
- "tar-remove-wholesparse-check.patch"))))))
-
(define-public patch
(package
(name "patch")
@@ -269,7 +254,7 @@ standard utility.")
(if (%current-target-system)
`(#:configure-flags '("gl_cv_func_working_mktime=yes"))
'()))
- (native-inputs `(("ed" ,ed)))
+ (native-inputs (list ed))
(synopsis "Apply differences to originals, with optional backups")
(description
"Patch is a program that applies changes to files based on differences
@@ -283,16 +268,17 @@ differences.")
(define-public diffutils
(package
(name "diffutils")
- (version "3.7")
+ (version "3.8")
(source (origin
(method url-fetch)
(uri (string-append "mirror://gnu/diffutils/diffutils-"
version ".tar.xz"))
(sha256
(base32
- "09isrg0isjinv8c535nxsi1s86wfdfzml80dbw41dj9x3hiad9xk"))))
+ "1v4g8gi0lgakqa7iix8s4fq7lq6l92vw3rjd9wfd2rhjng8xggd6"))
+ (patches (search-patches "diffutils-fix-signal-processing.patch"))))
(build-system gnu-build-system)
- (native-inputs `(("perl" ,perl)))
+ (native-inputs (list perl))
(synopsis "Comparing and merging files")
(description
"GNU Diffutils is a package containing tools for finding the
@@ -306,16 +292,15 @@ interactive means to merge two files.")
(define-public findutils
(package
(name "findutils")
- (version "4.7.0")
+ (version "4.8.0")
(source (origin
(method url-fetch)
(uri (string-append "mirror://gnu/findutils/findutils-"
version ".tar.xz"))
(sha256
(base32
- "16kqz9yz98dasmj70jwf5py7jk558w96w0vgp3zf9xsqk3gzpzn5"))
- (patches (search-patches "findutils-localstatedir.patch"
- "findutils-test-rwlock-threads.patch"))))
+ "0r3i72hnw0a30khlczi9k2c51aamaj6kfmp5mk3844nrjxz7n4jp"))
+ (patches (search-patches "findutils-localstatedir.patch"))))
(build-system gnu-build-system)
(arguments
`(#:configure-flags (list
@@ -327,8 +312,7 @@ interactive means to merge two files.")
(substitute* '("tests/xargs/verbose-quote.sh"
"tests/find/exec-plus-last-file.sh")
(("#!/bin/sh")
- (string-append "#!" (which "sh"))))
- #t)))))
+ (string-append "#!" (which "sh")))))))))
(synopsis "Operating on files matching given criteria")
(description
"Findutils supplies the basic file directory searching utilities of the
@@ -351,18 +335,20 @@ used to apply commands with arbitrarily long arguments.")
(sha256
(base32
"1yjcrh5hw70c0yn8zw55pd6j51dj90anpq8mmg649ps9g3gdhn24"))
- (patches (search-patches "coreutils-ls.patch"))))
+ (patches (search-patches "coreutils-ls.patch"
+ "coreutils-gnulib-tests.patch"))))
(build-system gnu-build-system)
- (inputs `(("acl" ,acl) ; TODO: add SELinux
- ("gmp" ,gmp) ;bignums in 'expr', yay!
+ (inputs `(,acl ;TODO: add SELinux
+ ,attr ;for xattrs in ls, mv, etc
+ ,gmp ;bignums in 'expr', yay!
;; Do not use libcap when cross-compiling since it's not quite
;; cross-compilable; and use it only for supported systems.
,@(if (and (not (%current-target-system))
(member (%current-system)
(package-supported-systems libcap)))
- `(("libcap" ,libcap-2.31)) ;capability support in 'ls', etc.
- '())))
+ `(,libcap) ;capability support in 'ls', etc.
+ '())))
(native-inputs
;; Perl is needed to run tests in native builds, and to run the bundled
;; copy of help2man. However, don't pass it when cross-compiling since
@@ -370,7 +356,7 @@ used to apply commands with arbitrarily long arguments.")
;; for help2man.
(if (%current-target-system)
'()
- `(("perl" ,perl))))
+ (list perl)))
(outputs '("out" "debug"))
(arguments
`(#:parallel-build? #f ; help2man may be called too early
@@ -399,16 +385,18 @@ used to apply commands with arbitrarily long arguments.")
(substitute* (find-files "gnulib-tests" "\\.c$")
(("/bin/sh") (which "sh")))
(substitute* (find-files "tests" "\\.sh$")
- (("#!/bin/sh") (string-append "#!" (which "sh"))))
- #t))
- ,@(if (hurd-target?)
- `((add-after 'unpack 'remove-tests
- (lambda _
- (substitute* "Makefile.in"
+ (("#!/bin/sh") (string-append "#!" (which "sh"))))))
+ (add-after 'unpack 'remove-tests
+ (lambda _
+ ,@(if (hurd-target?)
+ '((substitute* "Makefile.in"
;; this test hangs
- (("^ *tests/misc/timeout-group.sh.*") ""))
- #t)))
- '()))))
+ (("^ *tests/misc/timeout-group.sh.*") "")))
+ '())
+ (substitute* "Makefile.in"
+ ;; fails on filesystems where inotify cannot be used,
+ ;; more info in #47935
+ (("^ *tests/tail-2/inotify-dir-recreate.sh.*") "")))))))
(synopsis "Core GNU utilities (file, text, shell)")
(description
"GNU Coreutils package includes all of the basic command-line tools that
@@ -425,6 +413,7 @@ standard.")
(inherit coreutils)
(name "coreutils-minimal")
(outputs '("out"))
+ (native-inputs '())
(inputs '())))
(define-public coreutils-8.30
@@ -452,8 +441,7 @@ standard.")
;; specific issue, but "env-S.pl" is not adjusted for build
;; environments with long prefixes (/tmp/guix-build-...).
(substitute* "Makefile"
- (("^.*tests/misc/env-S.pl.*$") ""))
- #t)))))))))
+ (("^.*tests/misc/env-S.pl.*$") "")))))))))))
(define-public gnu-make
(package
@@ -468,8 +456,8 @@ standard.")
"06cfqzpqsvdnsxbysl5p2fgdgxgl9y4p7scpnrfa8z2zgkjdspz0"))
(patches (search-patches "make-impure-dirs.patch"))))
(build-system gnu-build-system)
- (native-inputs `(("pkg-config" ,pkg-config))) ; to detect Guile
- (inputs `(("guile" ,guile-3.0)))
+ (native-inputs (list pkg-config)) ;to detect Guile
+ (inputs (list guile-3.0))
(outputs '("out" "debug"))
(arguments
`(,@(if (hurd-target?)
@@ -485,8 +473,7 @@ standard.")
(substitute* "src/job.c"
(("default_shell =.*$")
(format #f "default_shell = \"~a/bin/sh\";\n"
- bash)))
- #t))))))
+ bash)))))))))
(synopsis "Remake files automatically")
(description
"Make is a program that is used to control the production of
@@ -510,7 +497,7 @@ change. GNU make offers many powerful extensions over the standard utility.")
(base32
"12f5zzyq2w56g95nni65hc0g5p7154033y2f3qmjvd016szn5qnn"))))
(arguments
- `(#:configure-flags '("CFLAGS=-D__alloca=alloca")
+ `(#:configure-flags '("CFLAGS=-D__alloca=alloca -D__stat=stat")
#:phases
(modify-phases %standard-phases
(add-before 'build 'set-default-shell
@@ -520,24 +507,22 @@ change. GNU make offers many powerful extensions over the standard utility.")
(substitute* "job.c"
(("default_shell =.*$")
(format #f "default_shell = \"~a/bin/sh\";\n"
- bash)))
- #t))))))))
+ bash)))))))))))
(define-public binutils
(package
(name "binutils")
- (version "2.34")
- (source (origin
- (method url-fetch)
- (uri (string-append "mirror://gnu/binutils/binutils-"
- version ".tar.bz2"))
- (sha256
- (base32
- "1rin1f5c7wm4n3piky6xilcrpf2s0n3dd5vqq8irrxkcic3i1w49"))
- (patches (search-patches "binutils-loongson-workaround.patch"))))
+ (version "2.37")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "mirror://gnu/binutils/binutils-"
+ version ".tar.bz2"))
+ (sha256
+ (base32 "1m3b2rdfv1dmdpd0bzg1hy7i8a2qng53szc6livyi3nh6101mz37"))
+ (patches (search-patches "binutils-loongson-workaround.patch"
+ "binutils-2.37-file-descriptor-leak.patch"))))
(build-system gnu-build-system)
-
- ;; TODO: Add dependency on zlib + those for Gold.
(arguments
`(#:configure-flags '(;; Add `-static-libgcc' to not retain a dependency
;; on GCC when bootstrapping.
@@ -558,17 +543,7 @@ change. GNU make offers many powerful extensions over the standard utility.")
;; Make sure 'ar' and 'ranlib' produce archives in a
;; deterministic fashion.
- "--enable-deterministic-archives")
-
- ;; XXX: binutils 2.34 was mistakenly released without generated manuals:
- ;; <https://sourceware.org/bugzilla/show_bug.cgi?id=25491>. To avoid a
- ;; circular dependency on texinfo, prevent the build system from creating
- ;; the manuals by calling "true" instead of "makeinfo"...
- #:make-flags '("MAKEINFO=true")))
-
- ;; ...and "hide" this package so that users who install binutils get the
- ;; version with documentation defined below.
- (properties '((hidden? . #t)))
+ "--enable-deterministic-archives")))
(synopsis "Binary utilities: bfd gas gprof ld")
(description
@@ -581,17 +556,22 @@ included.")
(license gpl3+)
(home-page "https://www.gnu.org/software/binutils/")))
-;; Work around a problem with binutils 2.34 whereby manuals are missing from
-;; the release tarball. Remove this and the related code above when updating.
-(define-public binutils+documentation
- (package/inherit
- binutils
- (native-inputs
- `(("texinfo" ,texinfo)))
- (arguments
- (substitute-keyword-arguments (package-arguments binutils)
- ((#:make-flags _ ''()) ''())))
- (properties '())))
+;;; TODO: Merge into binutils on the next world rebuild.
+(define-public binutils-next
+ (package/inherit binutils
+ (name "binutils-next")
+ (version "2.37")
+ (arguments
+ (substitute-keyword-arguments (package-arguments binutils)
+ ((#:out-of-source? _ #f) ;recommended in the README
+ #t)
+ ((#:configure-flags flags)
+ `(cons* "--enable-64-bit-bfd"
+ "--enable-compressed-debug-sections=all"
+ "--enable-lto"
+ "--enable-separate-code"
+ "--enable-threads"
+ ,flags))))))
;; FIXME: ath9k-firmware-htc-binutils.patch do not apply on 2.34 because of a
;; big refactoring of xtensa-modules.c (commit 567607c11fbf7105 upstream).
@@ -613,34 +593,26 @@ included.")
(properties '())))
(define-public binutils-gold
- (package/inherit binutils+documentation
+ (package/inherit binutils-next
(name "binutils-gold")
(arguments
- `(#:phases
- (modify-phases %standard-phases
- (add-after 'patch-source-shebangs 'patch-more-shebangs
- (lambda _
- (substitute* "gold/Makefile.in"
- (("/bin/sh") (which "sh")))
- #t)))
- ,@(substitute-keyword-arguments (package-arguments binutils)
- ; Upstream is aware of unrelocatable test failures on arm*.
- ((#:tests? _ #f)
- (if (any (cute string-prefix? <> (or (%current-target-system)
- (%current-system)))
- '("i686" "x86_64"))
- '#t '#f))
- ((#:configure-flags flags)
- `(cons* "--enable-gold=default"
- (delete "LDFLAGS=-static-libgcc" ,flags))))))
- (native-inputs
- `(("bc" ,bc)))
- (inputs
- `(("gcc:lib" ,(canonical-package gcc) "lib")))))
+ (substitute-keyword-arguments (package-arguments binutils)
+ ((#:configure-flags flags)
+ `(cons* "--enable-gold=default"
+ (delete "LDFLAGS=-static-libgcc" ,flags)))
+ ((#:phases phases '%standard-phases)
+ `(modify-phases ,phases
+ (add-after 'patch-source-shebangs 'patch-more-shebangs
+ (lambda _
+ (substitute* "gold/Makefile.in"
+ (("/bin/sh") (which "sh")))))))))
+ (native-inputs
+ `(("bc" ,bc)))))
(define* (make-ld-wrapper name #:key
(target (const #f))
binutils
+ (linker "ld")
(guile (canonical-package guile-3.0))
(bash (canonical-package bash))
(guile-for-build guile))
@@ -650,7 +622,9 @@ wrapper uses GUILE and BASH.
TARGET must be a one-argument procedure that, given a system type, returns a
cross-compilation target triplet or #f. When the result is not #f, make a
-wrapper for the cross-linker for that target, called 'TARGET-ld'."
+wrapper for the cross-linker for that target, called 'TARGET-ld'. To use a
+different linker than the default \"ld\", such as \"ld.gold\" the linker name
+can be provided via the LINKER argument."
;; Note: #:system->target-triplet is a procedure so that the evaluation of
;; its result can be delayed until the 'arguments' field is evaluated, thus
;; in a context where '%current-system' is accurate.
@@ -675,8 +649,9 @@ wrapper for the cross-linker for that target, called 'TARGET-ld'."
(let* ((out (assoc-ref %outputs "out"))
(bin (string-append out "/bin"))
(ld ,(if target
- `(string-append bin "/" ,target "-ld")
- '(string-append bin "/ld")))
+ `(string-append bin "/" ,target "-"
+ ,linker)
+ `(string-append bin "/" ,linker)))
(go (string-append ld ".go")))
(setvbuf (current-output-port)
@@ -701,11 +676,10 @@ wrapper for the cross-linker for that target, called 'TARGET-ld'."
(string-append (assoc-ref %build-inputs "binutils")
,(if target
(string-append "/bin/"
- target "-ld")
- "/bin/ld"))))
+ target "-" linker)
+ (string-append "/bin/" linker)))))
(chmod ld #o555)
- (compile-file ld #:output-file go)
- #t)))))
+ (compile-file ld #:output-file go))))))
(synopsis "The linker wrapper")
(description
"The linker wrapper (or @code{ld-wrapper}) wraps the linker to add any
@@ -714,39 +688,31 @@ the store.")
(home-page "https://www.gnu.org/software/guix//")
(license gpl3+)))
-(export make-ld-wrapper)
-
(define-public glibc
;; This is the GNU C Library, used on GNU/Linux and GNU/Hurd. Prior to
;; version 2.28, GNU/Hurd used a different glibc branch.
(package
(name "glibc")
- (version "2.31")
+ (version "2.33")
(source (origin
(method url-fetch)
(uri (string-append "mirror://gnu/glibc/glibc-" version ".tar.xz"))
(sha256
(base32
- "05zxkyz9bv3j9h0xyid1rhvh3klhsmrpkf3bcs6frvlgyr2gwilj"))
- (snippet
- ;; Disable 'ldconfig' and /etc/ld.so.cache. The latter is
- ;; required on LFS distros to avoid loading the distro's libc.so
- ;; instead of ours.
- '(begin
- (substitute* "sysdeps/unix/sysv/linux/configure"
- (("use_ldconfig=yes")
- "use_ldconfig=no"))
- #t))
- (modules '((guix build utils)))
- (patches (search-patches "glibc-ldd-x86_64.patch"
- "glibc-hidden-visibility-ldconfig.patch"
+ "1zvp0qdfbdyqrzydz18d9zg3n5ygy8ps7cmny1bvsp8h1q05c99f"))
+ (patches (search-patches "glibc-ldd-powerpc.patch"
+ "glibc-ldd-x86_64.patch"
+ "glibc-dl-cache.patch"
"glibc-versioned-locpath.patch"
"glibc-allow-kernel-2.6.32.patch"
"glibc-reinstate-prlimit64-fallback.patch"
"glibc-supported-locales.patch"
+ "glibc-cross-objdump.patch"
+ "glibc-cross-objcopy.patch" ;must come 2nd
"glibc-hurd-clock_t_centiseconds.patch"
"glibc-hurd-clock_gettime_monotonic.patch"
- "glibc-hurd-signal-sa-siginfo.patch"))))
+ "glibc-hurd-mach-print.patch"
+ "glibc-hurd-gettyent.patch"))))
(build-system gnu-build-system)
;; Glibc's <limits.h> refers to <linux/limit.h>, for instance, so glibc
@@ -832,8 +798,7 @@ the store.")
(bash (or (assoc-ref inputs "static-bash")
(assoc-ref native-inputs "static-bash"))))
;; Install the rpc data base file under `$out/etc/rpc'.
- ;; FIXME: Use installFlags = [ "sysconfdir=$(out)/etc" ];
- (substitute* "sunrpc/Makefile"
+ (substitute* "inet/Makefile"
(("^\\$\\(inst_sysconfdir\\)/rpc(.*)$" _ suffix)
(string-append out "/etc/rpc" suffix "\n"))
(("^install-others =.*$")
@@ -846,6 +811,11 @@ the store.")
;; 4.7.1.
((" -lgcc_s") ""))
+ ;; Tell the ld.so cache code where the store is.
+ (substitute* "elf/dl-cache.c"
+ (("@STORE_DIRECTORY@")
+ (string-append "\"" (%store-directory) "\"")))
+
;; Have `system' use that Bash.
(substitute* "sysdeps/posix/system.c"
(("#define[[:blank:]]+SHELL_PATH.*$")
@@ -864,15 +834,6 @@ the store.")
(string-append "#define _PATH_BSHELL \""
bash "/bin/sh\"\n")))
- ;; Nscd uses __DATE__ and __TIME__ to create a string to
- ;; make sure the client and server come from the same
- ;; libc. Use something deterministic instead.
- (substitute* "nscd/nscd_stat.c"
- (("static const char compilation\\[21\\] =.*$")
- (string-append
- "static const char compilation[21] = \""
- (string-take (basename out) 20) "\";\n")))
-
;; Make sure we don't retain a reference to the
;; bootstrap Perl.
(substitute* "malloc/mtrace.pl"
@@ -881,9 +842,7 @@ the store.")
;; "bilingual" eval/exec magic at the top of the file.
"")
(("exec @PERL@")
- "exec perl"))
-
- #t)))
+ "exec perl")))))
(add-after 'install 'move-static-libs
(lambda* (#:key outputs #:allow-other-keys)
@@ -921,17 +880,8 @@ the store.")
((out) static)))
(filter linker-script?
(map (cut string-append slib "/" <>)
- files)))
- #t)))
-
- ,@(if (target-powerpc?)
- '((add-after 'unpack 'apply-patch
- (lambda* (#:key inputs #:allow-other-keys)
- (let ((patch (assoc-ref inputs
- "powerpc64le-patch")))
- (invoke "patch" "--force" "-p1"
- "-i" patch)))))
- '())
+ files))))))
+
,@(if (hurd-target?)
'((add-after 'install 'augment-libc.so
(lambda* (#:key outputs #:allow-other-keys)
@@ -939,8 +889,7 @@ the store.")
(substitute* (string-append out "/lib/libc.so")
(("/[^ ]+/lib/libc.so.0.3")
(string-append out "/lib/libc.so.0.3"
- " libmachuser.so libhurduser.so"))))
- #t)))
+ " libmachuser.so libhurduser.so")))))))
'()))))
(inputs `(("static-bash" ,static-bash)))
@@ -953,10 +902,6 @@ the store.")
("gettext" ,gettext-minimal)
("python" ,python-minimal)
- ,@(if (target-powerpc?)
- `(("powerpc64le-patch" ,@(search-patches
- "glibc-ldd-powerpc.patch")))
- '())
,@(if (hurd-target?)
`(("mig" ,mig)
("perl" ,perl))
@@ -985,17 +930,62 @@ with the Linux kernel.")
;; Below are old libc versions, which we use mostly to build locale data in
;; the old format (which the new libc cannot cope with.)
-(define-public glibc-2.30
+(define-public glibc-2.31
(package
(inherit glibc)
+ (version "2.31")
+ (source (origin
+ (inherit (package-source glibc))
+ (uri (string-append "mirror://gnu/glibc/glibc-" version ".tar.xz"))
+ (sha256
+ (base32
+ "05zxkyz9bv3j9h0xyid1rhvh3klhsmrpkf3bcs6frvlgyr2gwilj"))
+ (patches (search-patches
+ "glibc-skip-c++.patch"
+ "glibc-ldd-powerpc.patch"
+ "glibc-ldd-x86_64.patch"
+ "glibc-dl-cache.patch"
+ "glibc-hidden-visibility-ldconfig.patch"
+ "glibc-versioned-locpath.patch"
+ "glibc-allow-kernel-2.6.32.patch"
+ "glibc-reinstate-prlimit64-fallback.patch"
+ "glibc-supported-locales.patch"
+ "glibc-hurd-clock_t_centiseconds.patch"
+ "glibc-2.31-hurd-clock_gettime_monotonic.patch"
+ "glibc-hurd-signal-sa-siginfo.patch"
+ "glibc-hurd-mach-print.patch"
+ "glibc-hurd-gettyent.patch"))))
+ (arguments
+ (substitute-keyword-arguments (package-arguments glibc)
+ ((#:phases phases)
+ `(modify-phases ,phases
+ (add-before 'configure 'set-etc-rpc-installation-directory
+ (lambda* (#:key outputs #:allow-other-keys)
+ ;; Install the rpc data base file under `$out/etc/rpc'.
+ (let ((out (assoc-ref outputs "out")))
+ (substitute* "sunrpc/Makefile"
+ (("^\\$\\(inst_sysconfdir\\)/rpc(.*)$" _ suffix)
+ (string-append out "/etc/rpc" suffix "\n"))
+ (("^install-others =.*$")
+ (string-append "install-others = " out "/etc/rpc\n"))))))))))))
+
+(define-public glibc-2.30
+ (package
+ (inherit glibc-2.31)
(version "2.30")
+ (native-inputs
+ ;; This fails with a build error in libc-tls.c when using GCC 10. Use an
+ ;; older compiler.
+ (modify-inputs (package-native-inputs glibc)
+ (prepend gcc-8)))
(source (origin
(inherit (package-source glibc))
(uri (string-append "mirror://gnu/glibc/glibc-" version ".tar.xz"))
(sha256
(base32
"1bxqpg91d02qnaz837a5kamm0f43pr1il4r9pknygywsar713i72"))
- (patches (search-patches "glibc-ldd-x86_64.patch"
+ (patches (search-patches "glibc-skip-c++.patch"
+ "glibc-ldd-x86_64.patch"
"glibc-CVE-2019-19126.patch"
"glibc-hidden-visibility-ldconfig.patch"
"glibc-versioned-locpath.patch"
@@ -1005,7 +995,7 @@ with the Linux kernel.")
(define-public glibc-2.29
(package
- (inherit glibc)
+ (inherit glibc-2.30)
(version "2.29")
(source (origin
(inherit (package-source glibc))
@@ -1013,7 +1003,8 @@ with the Linux kernel.")
(sha256
(base32
"0jzh58728flfh939a8k9pi1zdyalfzlxmwra7k0rzji5gvavivpk"))
- (patches (search-patches "glibc-ldd-x86_64.patch"
+ (patches (search-patches "glibc-skip-c++.patch"
+ "glibc-ldd-x86_64.patch"
"glibc-CVE-2019-7309.patch"
"glibc-CVE-2019-9169.patch"
"glibc-2.29-git-updates.patch"
@@ -1023,46 +1014,6 @@ with the Linux kernel.")
"glibc-reinstate-prlimit64-fallback.patch"
"glibc-2.29-supported-locales.patch"))))))
-(define-public glibc-2.28
- (package
- (inherit glibc)
- (version "2.28")
- (source (origin
- (inherit (package-source glibc))
- (uri (string-append "mirror://gnu/glibc/glibc-" version ".tar.xz"))
- (sha256
- (base32
- "10iha5ynvdj5m62vgpgqbq4cwvc2yhyl2w9yyyjgfxmdmx8h145i"))
- (patches (search-patches "glibc-ldd-x86_64.patch"
- "glibc-2.28-git-fixes.patch"
- "glibc-hidden-visibility-ldconfig.patch"
- "glibc-versioned-locpath.patch"
- "glibc-allow-kernel-2.6.32.patch"
- "glibc-reinstate-prlimit64-fallback.patch"
- "glibc-hurd-magic-pid.patch"
- "glibc-2.28-supported-locales.patch"))))))
-
-(define-public glibc-2.27
- (package
- (inherit glibc)
- (version "2.27")
- (source (origin
- (inherit (package-source glibc))
- (uri (string-append "mirror://gnu/glibc/glibc-" version ".tar.xz"))
- (sha256
- (base32
- "0wpwq7gsm7sd6ysidv0z575ckqdg13cr2njyfgrbgh4f65adwwji"))
- (patches (search-patches "glibc-ldd-x86_64.patch"
- "glibc-2.27-git-fixes.patch"
- "glibc-hidden-visibility-ldconfig.patch"
- "glibc-versioned-locpath.patch"
- "glibc-allow-kernel-2.6.32.patch"
- "glibc-reinstate-prlimit64-fallback.patch"
- "glibc-2.27-supported-locales.patch"
- "glibc-CVE-2018-11236.patch"
- "glibc-CVE-2018-11237.patch"))))
- (properties `((lint-hidden-cve . ("CVE-2017-18269")))))) ; glibc-2.27-git-fixes
-
(define-public (make-gcc-libc base-gcc libc)
"Return a GCC that targets LIBC."
(package (inherit base-gcc)
@@ -1142,8 +1093,7 @@ to the @code{share/locale} sub-directory of this package.")
(string-append (dirname directory)
"/" name "."
normalized)))))
- locales)
- #t)))
+ locales))))
(delete 'install)
(delete 'move-static-libs)))
((#:configure-flags flags)
@@ -1200,8 +1150,7 @@ to the @code{share/locale} sub-directory of this package.")
locale ".UTF-8")))
',locales)
#t))))
- (native-inputs `(("glibc" ,glibc)
- ("gzip" ,gzip)))
+ (native-inputs (list glibc gzip))
(synopsis (if default-locales?
(P_ "Small sample of UTF-8 locales")
(P_ "Customized sample of UTF-8 locales")))
@@ -1254,17 +1203,15 @@ command.")
(package (inherit glibc)
(name "glibc-hurd-headers")
(outputs '("out"))
- (propagated-inputs `(("gnumach-headers" ,gnumach-headers)
- ("hurd-headers" ,hurd-headers)))
+ (propagated-inputs (list gnumach-headers hurd-headers))
(native-inputs
- `(("mig" ,(if (%current-target-system)
- ;; XXX: When targeting i586-pc-gnu, we need a 32-bit MiG,
- ;; hence this hack.
- (package
- (inherit mig)
- (arguments `(#:system "i686-linux")))
- mig))
- ,@(package-native-inputs glibc)))
+ (modify-inputs (package-native-inputs glibc)
+ (prepend (if (%current-target-system)
+ ;; XXX: When targeting i586-pc-gnu, we need a 32-bit MiG,
+ ;; hence this hack.
+ (package (inherit mig)
+ (arguments `(#:system "i686-linux")))
+ mig))))
(arguments
(substitute-keyword-arguments (package-arguments glibc)
;; We just pass the flags really needed to build the headers.
@@ -1283,8 +1230,7 @@ command.")
(let ((out (assoc-ref outputs "out")))
(close-port
(open-output-file
- (string-append out "/include/gnu/stubs.h"))))
- #t))
+ (string-append out "/include/gnu/stubs.h"))))))
(delete 'build))))))) ; nothing to build
(define-public tzdata
@@ -1292,7 +1238,7 @@ command.")
(name "tzdata")
;; This package should be kept in sync with python-pytz in (gnu packages
;; time).
- (version "2021a")
+ (version "2021e")
(source (origin
(method url-fetch)
(uri (string-append
@@ -1300,67 +1246,75 @@ command.")
version ".tar.gz"))
(sha256
(base32
- "022fn6gkmp7pamlgab04x0dm5hnyn2m2fcnyr3pvm36612xd5rrr"))))
+ "1cdjdcxl0s9xf0dg1z64kh7llm80byxqlzrkkjzcdlyh6yvl5v07"))))
(build-system gnu-build-system)
(arguments
- `(#:tests? #f
- #:make-flags (let ((out (assoc-ref %outputs "out"))
- (tmp (getenv "TMPDIR")))
- (list (string-append "TOPDIR=" out)
- (string-append "TZDIR=" out "/share/zoneinfo")
- (string-append "TZDEFAULT=" out
- "/share/zoneinfo/localtime")
-
- ;; Likewise for the C library routines.
- (string-append "LIBDIR=" tmp "/lib")
- (string-append "MANDIR=" tmp "/man")
-
- ;; XXX: tzdata 2020b changed the on-disk format
- ;; of the time zone files from 'fat' to 'slim'.
- ;; Many packages (particularly evolution-data-server)
- ;; can not yet handle the latter, so we stick with
- ;; 'fat' for now.
- ,@(if (version>=? (package-version this-package)
- "2020b")
- '("CPPFLAGS=-DZIC_BLOAT_DEFAULT='\"fat\"'")
- '())
-
- "AWK=awk"
- "CC=gcc"))
- #:modules ((guix build utils)
- (guix build gnu-build-system)
- (srfi srfi-1))
- #:phases
- (modify-phases %standard-phases
- (replace 'unpack
- (lambda* (#:key source inputs #:allow-other-keys)
- (invoke "tar" "xvf" source)
- (invoke "tar" "xvf" (assoc-ref inputs "tzcode"))))
- (add-after 'install 'post-install
- (lambda* (#:key outputs #:allow-other-keys)
- ;; Move data in the right place.
- (let ((out (assoc-ref outputs "out")))
- ;; Discard zic, dump, and tzselect, already
- ;; provided by glibc.
- (delete-file-recursively (string-append out "/usr"))
- (symlink (string-append out "/share/zoneinfo")
- (string-append out "/share/zoneinfo/posix"))
- (delete-file-recursively
- (string-append out "/share/zoneinfo-posix"))
- (copy-recursively (string-append out "/share/zoneinfo-leaps")
- (string-append out "/share/zoneinfo/right"))
- (delete-file-recursively
- (string-append out "/share/zoneinfo-leaps"))
- #t)))
- (delete 'configure))))
- (inputs `(("tzcode" ,(origin
- (method url-fetch)
- (uri (string-append
- "https://data.iana.org/time-zones/releases/tzcode"
- version ".tar.gz"))
- (sha256
- (base32
- "1l02b0jiwp3fl0xd6227i69d26rmx3yrnq0ssq9vvdmm4jhvyipb"))))))
+ (list #:tests? #f
+
+ ;; This consists purely of (architecture-independent) data, so
+ ;; ‘cross-compilation’ is pointless here! (The binaries zic,
+ ;; dump, and tzselect are deleted in the post-install phase.)
+ #:target #f
+
+ #:make-flags
+ #~(let ((out #$output)
+ (tmp (getenv "TMPDIR")))
+ (list (string-append "TOPDIR=" out)
+ (string-append "TZDIR=" out "/share/zoneinfo")
+ (string-append "TZDEFAULT=" out
+ "/share/zoneinfo/localtime")
+
+ ;; Likewise for the C library routines.
+ (string-append "LIBDIR=" tmp "/lib")
+ (string-append "MANDIR=" tmp "/man")
+
+ ;; XXX: tzdata 2020b changed the on-disk format
+ ;; of the time zone files from 'fat' to 'slim'.
+ ;; Many packages (particularly evolution-data-server)
+ ;; can not yet handle the latter, so we stick with
+ ;; 'fat' for now.
+ #$@(if (version>=? (package-version this-package)
+ "2020b")
+ '("CPPFLAGS=-DZIC_BLOAT_DEFAULT='\"fat\"'")
+ '())
+
+ "AWK=awk"
+ "CC=gcc"))
+ #:modules '((guix build utils)
+ (guix build gnu-build-system)
+ (srfi srfi-1))
+ #:phases
+ #~(modify-phases %standard-phases
+ (replace 'unpack
+ (lambda* (#:key source inputs #:allow-other-keys)
+ (invoke "tar" "xvf" source)
+ (invoke "tar" "xvf"
+ #$(match (package-inputs this-package)
+ (((_ tzcode)) tzcode)))))
+ (add-after 'install 'post-install
+ (lambda* (#:key outputs #:allow-other-keys)
+ ;; Move data in the right place.
+ (let ((out (assoc-ref outputs "out")))
+ ;; Discard zic, dump, and tzselect, already
+ ;; provided by glibc.
+ (delete-file-recursively (string-append out "/usr"))
+ (symlink (string-append out "/share/zoneinfo")
+ (string-append out "/share/zoneinfo/posix"))
+ (delete-file-recursively
+ (string-append out "/share/zoneinfo-posix"))
+ (copy-recursively (string-append out "/share/zoneinfo-leaps")
+ (string-append out "/share/zoneinfo/right"))
+ (delete-file-recursively
+ (string-append out "/share/zoneinfo-leaps")))))
+ (delete 'configure))))
+ (inputs (list (origin
+ (method url-fetch)
+ (uri (string-append
+ "https://data.iana.org/time-zones/releases/tzcode"
+ version ".tar.gz"))
+ (sha256
+ (base32
+ "0x8pcfmjvxk29yfh8bklchv2f0vpl4yih0gc4wyx292l78wncijq")))))
(home-page "https://www.iana.org/time-zones")
(synopsis "Database of current and historical time zones")
(description "The Time Zone Database (often called tz or zoneinfo)
@@ -1375,28 +1329,10 @@ and daylight-saving rules.")
;;; thousands of packages (for example, in a core-updates rebuild). This package
;;; will typically be obsolete and should never be referred to by a built
;;; package.
-(define-public tzdata-for-tests
- (hidden-package
- (package
- (inherit tzdata)
- (version "2019c")
- (source (origin
- (method url-fetch)
- (uri (string-append
- "https://data.iana.org/time-zones/releases/tzdata"
- version ".tar.gz"))
- (sha256
- (base32
- "0z7w1yv37cfk8yhix2cillam091vgp1j4g8fv84261q9mdnq1ivr"))))
- (inputs
- `(("tzcode" ,(origin
- (method url-fetch)
- (uri (string-append
- "https://data.iana.org/time-zones/releases/tzcode"
- version ".tar.gz"))
- (sha256
- (base32
- "1m3y2rnf1nggxxhxplab5zdd5whvar3ijyrv7lifvm82irkd7szn")))))))))
+;;;
+;;; Please make this a hidden-package if it is different from the primary tzdata
+;;; package.
+(define-public tzdata-for-tests tzdata)
(define-public libiconv
(package
@@ -1413,11 +1349,9 @@ and daylight-saving rules.")
(snippet
;; Work around "declared gets" error on glibc systems (fixed by
;; Gnulib commit 66712c23388e93e5c518ebc8515140fa0c807348.)
- '(begin
- (substitute* "srclib/stdio.in.h"
- (("^#undef gets") "")
- (("^_GL_WARN_ON_USE \\(gets.*") ""))
- #t))))
+ '(substitute* "srclib/stdio.in.h"
+ (("^#undef gets") "")
+ (("^_GL_WARN_ON_USE \\(gets.*") "")))))
(build-system gnu-build-system)
(synopsis "Character set conversion library")
(description
diff --git a/gnu/packages/bash.scm b/gnu/packages/bash.scm
index ed2931fd97..7e98367bbb 100644
--- a/gnu/packages/bash.scm
+++ b/gnu/packages/bash.scm
@@ -6,6 +6,7 @@
;;; Copyright © 2018, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
;;; Copyright © 2019 Mathieu Othacehe <m.othacehe@gmail.com>
;;; Copyright © 2020 Zhu Zihao <all_but_last@163.com>
+;;; Copyright © 2021 Marius Bakke <marius@gnu.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -57,7 +58,7 @@
(define (patch-url seqno)
"Return the URL of Bash patch number SEQNO."
- (format #f "mirror://gnu/bash/bash-5.0-patches/bash50-~3,'0d" seqno))
+ (format #f "mirror://gnu/bash/bash-5.1-patches/bash51-~3,'0d" seqno))
(define (bash-patch seqno sha256-bv)
"Return the origin of Bash patch SEQNO, with expected hash SHA256-BV."
@@ -70,26 +71,18 @@
(list (bash-patch seqno (base32 hash))
...))
-(define %patch-series-5.0
+(define %patch-series-5.1
;; This is the current patches series for 5.0, generated using
;; 'download-patches' below.
(patch-series
- (1 "12bjfdy6bg8nhyw27bdgxn7h4paylx8d927skfmi9pxd1wgrxzpj")
- (2 "01w7yrzmz10mw06ys0546vhl7isv2v402ziyvfd7k67588spvs47")
- (3 "0ny81ridp5n0j69hb8ixrc7dmxybby54jbsz5hikly8kgg1wvssf")
- (4 "021gqqvgydixkrmqss64b6srfdlkvnx88lyfzpxfrn5d6bc7li0l")
- (5 "0xl2kyzm84nlyklrqzkn73ixabhzfhn9x91lzcmis89cppclvxav")
- (6 "0844749ixk1z60437nkznzms1f0nzh9an62kj7sny6r0zyk2k1fn")
- (7 "16xg37gp1b8zlj5969w8mcrparwqlcbj9695vn3qhgb7wdz1xd0p")
- (8 "1qyp19krjh8zxvb0jgwmyjz40djslwcf4xi7kc1ab0iaca44bipf")
- (9 "00yrjjqd95s81b21qq3ba1y7h879q8jaajlkjggc6grhcwbs4g7d")
- (10 "04ca5bjv456v538mkspzvn4xb2zdphh31r4fpvfm9p5my0jw7yyn")
- (11 "1sklyixvsv8993kxzs0jigacpdchjrq7jv5xpdx7kbqyp4rf6k9c")
- (12 "0cz21qg2gbr40lfgza7g02bqi2qknwqgxnq459pjj640d0cywhr9")
- (13 "16h9nwz3yzwj7fnxvlidjymdc4yr30h818433gh9j1x3in6igmzm")
- (14 "12gm5bvv2pd3m72z2ilj26pa08c61az253dsgfl24vpf2ijywvjx")
- (15 "0pm0px758w4i23s55wajcv6lqfiym7zgxvq0pxf6vclkv8nxy5x5")
- (16 "0vdha332km2iwx8g2ld15jy7d24cbplzgr1531dpzylr9ajxglgz")))
+ (1 "1ymm8ppss6gyh9ifznjwiabrb4k91npd09c10y7mk66xp8yppc7b")
+ (2 "1gjx9zqcm407am3n2sh44b8dxm48kgm15rzfiijqxr01m0hn3shm")
+ (3 "1cdnpbfc64yhvkjj4d12s9ywp11g195vzfl1cab24sq55wkcrwi2")
+ (4 "11iwhy6v562bv0kk7lwj7f5jj65ma9bblivy0v02h3ggcibbdbls")
+ (5 "19bdyigdr81824nxvqr6a7k0cax60wq7376j6b91afbnwvlvbjyc")
+ (6 "051x8wlwrqk0yr0zg378vh824iklfl5g9pkmcdf62qp8gn9pvqbm")
+ (7 "0fir80pp1gmlpadmqcgkrv4y119pc7xllchjzg05fd7px73viz5c")
+ (8 "1lfjgshk8i9vch92p5wgc9r90j3phw79aa7gbai89w183b2z6b7j")))
(define (download-patches store count)
"Download COUNT Bash patches into store. Return a list of
@@ -125,7 +118,7 @@ number/base32-hash tuples, directly usable in the 'patch-series' form."
" -Wl,-rpath -Wl,"
(assoc-ref %build-inputs "ncurses")
"/lib")))
- (version "5.0"))
+ (version "5.1"))
(package
(name "bash")
(source (origin
@@ -134,11 +127,11 @@ number/base32-hash tuples, directly usable in the 'patch-series' form."
"mirror://gnu/bash/bash-" version ".tar.gz"))
(sha256
(base32
- "0kgvfwqdcd90waczf4gx39xnrxzijhjrzyzv7s8v4w31qqm0za5l"))
+ "1alv68wplnfdm6mh39hm57060xgssb9vqca4yr1cyva0c342n0fc"))
(patch-flags '("-p0"))
(patches (cons (search-patch "bash-linux-pgrp-pipe.patch")
- %patch-series-5.0))))
- (version (string-append version "." (number->string (length %patch-series-5.0))))
+ %patch-series-5.1))))
+ (version (string-append version "." (number->string (length %patch-series-5.1))))
(build-system gnu-build-system)
(outputs '("out"
@@ -409,6 +402,7 @@ capturing.")
;; Install phase
(invoke "./install.sh" %output)
(wrap-script (string-append %output "/bin/bats")
+ #:guile (search-input-file %build-inputs "bin/guile")
(list "PATH" 'prefix (string-split (getenv "PATH")
#\:))))))
(build-system trivial-build-system)
diff --git a/gnu/packages/bdw-gc.scm b/gnu/packages/bdw-gc.scm
index ecac5b9368..5ced11bb64 100644
--- a/gnu/packages/bdw-gc.scm
+++ b/gnu/packages/bdw-gc.scm
@@ -46,14 +46,18 @@
(list
;; Install gc_cpp.h et al.
"--enable-cplusplus"
- ;; In GNU/Hurd systems during the 'Check' phase,
+
+ ;; Work around <https://github.com/ivmai/bdwgc/issues/353>.
+ "--disable-munmap"
+
+ ;; In GNU/Hurd systems during the 'check' phase,
;; there is a deadlock caused by the 'gctest' test.
;; To disable the error set "--disable-gcj-support"
;; to configure script. See bug report and discussion:
;; <https://lists.opendylan.org/pipermail/bdwgc/2017-April/006275.html>
;; <https://lists.gnu.org/archive/html/bug-hurd/2017-01/msg00008.html>
- ,@(if (hurd-triplet? (or (%current-system)
- (%current-target-system)))
+ ,@(if (target-hurd? (or (%current-system)
+ (%current-target-system)))
'("--disable-gcj-support")
'()))))
(native-inputs `(("pkg-config" ,pkg-config)))
@@ -85,17 +89,6 @@ C or C++ programs, though that is not its primary goal.")
(license (x11-style (string-append home-page "license.txt")))))
-(define-public libgc/disable-munmap
- ;; TODO: Use '--disable-munmap' by default on next rebuild cycle.
- (package/inherit libgc
- (arguments
- ;; Work around <https://github.com/ivmai/bdwgc/issues/353>.
- (substitute-keyword-arguments (package-arguments libgc)
- ((#:configure-flags flags ''())
- `(cons "--disable-munmap" ,flags))))
- (properties `((hidden? . #t)
- ,@(package-properties libgc)))))
-
;; TODO: Add a static output in libgc in the next rebuild cycle.
(define-public libgc/static-libs
(package/inherit
diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm
index 259b72b5f4..aad13317b8 100644
--- a/gnu/packages/bioinformatics.scm
+++ b/gnu/packages/bioinformatics.scm
@@ -12,7 +12,7 @@
;;; Copyright © 2018 Joshua Sierles, Nextjournal <joshua@nextjournal.com>
;;; Copyright © 2018 Gábor Boskovits <boskovits@gmail.com>
;;; Copyright © 2018, 2019, 2020, 2021 Mădălin Ionel Patrașcu <madalinionel.patrascu@mdc-berlin.de>
-;;; Copyright © 2019, 2020 Maxim Cournoyer <maxim.cournoyer@gmail.com>
+;;; Copyright © 2019, 2020, 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;; Copyright © 2019 Brian Leung <bkleung89@gmail.com>
;;; Copyright © 2019 Brett Gilio <brettg@gnu.org>
;;; Copyright © 2020 Björn Höfling <bjoern.hoefling@bjoernhoefling.de>
@@ -42,6 +42,7 @@
(define-module (gnu packages bioinformatics)
#:use-module ((guix licenses) #:prefix license:)
#:use-module (guix packages)
+ #:use-module (guix gexp)
#:use-module (guix utils)
#:use-module (guix download)
#:use-module (guix git-download)
@@ -59,7 +60,6 @@
#:use-module (guix build-system qt)
#:use-module (guix build-system r)
#:use-module (guix build-system ruby)
- #:use-module (guix build-system scons)
#:use-module (guix build-system trivial)
#:use-module (guix deprecation)
#:use-module (gnu packages)
@@ -138,6 +138,7 @@
#:use-module (gnu packages qt)
#:use-module (gnu packages rdf)
#:use-module (gnu packages readline)
+ #:use-module (gnu packages rpc)
#:use-module (gnu packages rsync)
#:use-module (gnu packages ruby)
#:use-module (gnu packages serialization)
@@ -227,17 +228,16 @@ structure of the predicted RNA.")
(snippet
`(begin
;; Delete bundled htslib.
- (delete-file-recursively "c/htslib-1.3.1")
- #t))))
+ (delete-file-recursively "c/htslib-1.3.1")))))
(build-system python-build-system)
(arguments
`(#:python ,python-2 ; BamM is Python 2 only.
;; Do not use bundled libhts. Do use the bundled libcfu because it has
;; been modified from its original form.
#:configure-flags
- (let ((htslib (assoc-ref %build-inputs "htslib")))
- (list "--with-libhts-lib" (string-append htslib "/lib")
- "--with-libhts-inc" (string-append htslib "/include/htslib")))
+ ,#~(let ((htslib #$(this-package-input "htslib")))
+ (list "--with-libhts-lib" (string-append htslib "/lib")
+ "--with-libhts-inc" (string-append htslib "/include/htslib")))
#:phases
(modify-phases %standard-phases
(add-after 'unpack 'autogen
@@ -248,37 +248,22 @@ structure of the predicted RNA.")
;; Use autogen so that 'configure' works.
(substitute* "autogen.sh" (("/bin/sh") sh))
(setenv "CONFIG_SHELL" sh)
- (invoke "./autogen.sh")))
- #t))
- (delete 'build)
- ;; Run tests after installation so compilation only happens once.
- (delete 'check)
- (add-after 'install 'wrap-executable
- (lambda* (#:key outputs #:allow-other-keys)
- (let* ((out (assoc-ref outputs "out"))
- (path (getenv "PATH")))
- (wrap-program (string-append out "/bin/bamm")
- `("PATH" ":" prefix (,path))))
- #t))
- (add-after 'wrap-executable 'post-install-check
- (lambda* (#:key inputs outputs #:allow-other-keys)
- (setenv "PATH"
- (string-append (assoc-ref outputs "out")
- "/bin:"
- (getenv "PATH")))
- (setenv "PYTHONPATH"
- (string-append
- (assoc-ref outputs "out")
- "/lib/python"
- (string-take (string-take-right
- (assoc-ref inputs "python") 5) 3)
- "/site-packages:"
- (getenv "PYTHONPATH")))
+ (invoke "./autogen.sh")))))
+ (delete 'build) ;the build loops otherwise
+ (replace 'check
+ (lambda _
;; There are 2 errors printed, but they are safe to ignore:
;; 1) [E::hts_open_format] fail to open file ...
;; 2) samtools view: failed to open ...
- (invoke "nosetests")
- #t)))))
+ (invoke "nosetests")))
+ (add-after 'install 'wrap-executable
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (path (getenv "PATH"))
+ (pythonpath (getenv "GUIX_PYTHONPATH")))
+ (wrap-program (string-append out "/bin/bamm")
+ `("PATH" ":" prefix (,path))
+ `("GUIX_PYTHONPATH" ":" prefix (,pythonpath)))))))))
(native-inputs
`(("autoconf" ,autoconf)
("automake" ,automake)
@@ -340,27 +325,43 @@ BAM files.")
(define-public bamutils
(package
(name "bamutils")
- (version "1.0.13")
+ (version "1.0.14")
(source (origin
- (method url-fetch)
- (uri
- (string-append
- "https://genome.sph.umich.edu/w/images/7/70/"
- "BamUtilLibStatGen." version ".tgz"))
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/statgen/bamUtil")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
(sha256
(base32
- "0asr1kmjbr3cyf4hkg865y8c2s30v87xvws4q6c8pyfi6wfd1h8n"))))
+ "0i2r332k1kz0jysyg89d858wqq59n16lw6dv5qmilcwshb77r9v7"))))
(build-system gnu-build-system)
(arguments
- `(#:tests? #f ; There are no tests.
- #:make-flags `("USER_WARNINGS=-std=gnu++98"
- ,(string-append "INSTALLDIR="
- (assoc-ref %outputs "out") "/bin"))
+ `(#:tests? #f ; Unclear how to run tests
+ #:make-flags
+ ,#~(list "USER_WARNINGS=-std=gnu++98" ;
+ (string-append "INSTALLDIR=" #$output "/bin"))
#:phases
(modify-phases %standard-phases
- (delete 'configure))))
+ (replace 'configure
+ (lambda* (#:key inputs #:allow-other-keys)
+ (substitute* "src/Makefile" ;
+ (("^DATE=.*") "DATE=\"1970-01-01\"\n"))
+ (copy-recursively (assoc-ref inputs "libstatgen")
+ "../libStatGen"))))))
(inputs
`(("zlib" ,zlib)))
+ (native-inputs
+ `(("libstatgen"
+ ,(origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/statgen/libStatGen/")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name "libstatgen" version))
+ (sha256
+ (base32
+ "0q9iyk046r4m7qnav8c3f28zsar25lj9nydiklwaswmzdijhi4p1"))))))
(home-page "https://genome.sph.umich.edu/wiki/BamUtil")
(synopsis "Programs for working on SAM/BAM files")
(description "This package provides several programs that perform
@@ -508,9 +509,9 @@ computational cluster.")
"1f2hh79l7dn147c2xyfgf5wfjvlqfw32kjfnnh2n1qy6rpzx2fik"))))
(build-system gnu-build-system)
(arguments
- '(#:test-target "test"
+ `(#:test-target "test"
#:make-flags
- (list (string-append "prefix=" (assoc-ref %outputs "out")))
+ ,#~(list (string-append "prefix=" #$output))
#:phases
(modify-phases %standard-phases
(delete 'configure))))
@@ -569,43 +570,77 @@ BED, GFF/GTF, VCF.")
`(("samtools" ,samtools)
("zlib" ,zlib)))))
+(define-public pbcopper
+ ;; This is the latest commit at the time of this writing.
+ (let ((commit "ad4143afd25a0bd6adc977c544865c992a515841")
+ (revision "1"))
+ (package
+ (name "pbcopper")
+ (version (git-version "1.9.0" revision commit))
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/PacificBiosciences/pbcopper")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1qxkbpdkamfisnk36lpi1vdvf3p1lg2hdqna3xgd94pz52bwbmp7"))))
+ (build-system meson-build-system)
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'patch-meson-files
+ (lambda* (#:key inputs #:allow-other-keys)
+ (substitute* "meson.build"
+ (("-msse4.1") "")))))))
+ (inputs
+ `(("boost" ,boost)))
+ (native-inputs
+ `(("googletest" ,googletest)
+ ("pkg-config" ,pkg-config)))
+ (home-page "https://github.com/PacificBiosciences/pbcopper")
+ (synopsis "Data structures, algorithms, and utilities for PacBio C++ applications")
+ (description
+ "The pbcopper library provides a suite of data structures, algorithms,
+and utilities for PacBio C++ applications.")
+ (license license:bsd-3))))
+
(define-public pbbam
(package
(name "pbbam")
- (version "0.23.0")
+ (version "1.7.0")
(source (origin
(method git-fetch)
(uri (git-reference
(url "https://github.com/PacificBiosciences/pbbam")
- (commit version)))
+ (commit (string-append "v" version))))
(file-name (git-file-name name version))
(sha256
(base32
- "0h9gkrpf2lrxklxp72xfl5bi3h5zcm5hprrya9gf0hr3xwlbpp0x"))))
+ "1avdm5hwhr5ls79017blyalx1npzbf1aa6dgb6j6lg8sq4nk9yyg"))))
(build-system meson-build-system)
(arguments
`(#:phases
(modify-phases %standard-phases
- (add-after 'unpack 'find-googletest
+ (add-after 'unpack 'patch-tests
(lambda* (#:key inputs #:allow-other-keys)
- ;; It doesn't find gtest_main because there's no pkg-config file
- ;; for it. Find it another way.
- (substitute* "tests/meson.build"
- (("pbbam_gtest_dep = dependency\\('gtest_main'.*")
- (format #f "cpp = meson.get_compiler('cpp')
-pbbam_gtest_dep = cpp.find_library('gtest_main', dirs : '~a')\n"
- (assoc-ref inputs "googletest"))))
- #t)))
- ;; TODO: tests/pbbam_test cannot be linked
- ;; ld: tests/59830eb@@pbbam_test@exe/src_test_Accuracy.cpp.o:
- ;; undefined reference to symbol '_ZTIN7testing4TestE'
- ;; ld: /gnu/store/...-googletest-1.8.0/lib/libgtest.so:
- ;; error adding symbols: DSO missing from command line
- #:tests? #f
- #:configure-flags '("-Dtests=false")))
+ ;; Disable this test. I tried fixing it by including
+ ;; optional_io.hpp, but there's a type error.
+ (substitute* "tests/src/meson.build"
+ (("'test_ReadGroupInfo.cpp',") ""))
+ #;
+ (substitute* "include/pbbam/ReadGroupInfo.h"
+ (("#include <boost/optional.hpp>" m)
+ (string-append m "\n#include <boost/optional/optional_io.hpp>")))
+ (substitute* '("tests/scripts/cram/_test.py"
+ "tests/scripts/cram/_main.py")
+ (("'/bin/sh'")
+ (string-append "'" (which "sh") "'"))))))))
;; These libraries are listed as "Required" in the pkg-config file.
(propagated-inputs
`(("htslib" ,htslib)
+ ("pbcopper" ,pbcopper)
("zlib" ,zlib)))
(inputs
`(("boost" ,boost)
@@ -662,7 +697,7 @@ speedup comes during compression.")
(define-public blasr-libcpp
(package
(name "blasr-libcpp")
- (version "5.3.3")
+ (version "5.3.5")
(source (origin
(method git-fetch)
(uri (git-reference
@@ -671,7 +706,7 @@ speedup comes during compression.")
(file-name (git-file-name name version))
(sha256
(base32
- "0cn5l42zyq67sj0g2imqkhayz2iqvv0a1pgpbmlq0qynjmsrbfd2"))))
+ "07cdfnfl29zf2j7fpaaqaxghq3p0wnc109razs0icwm2q6l3gycb"))))
(build-system meson-build-system)
(arguments
`(#:phases
@@ -708,6 +743,7 @@ libblasr_gtest_dep = cpp.find_library('gtest_main', dirs : '~a')\n"
(inputs
`(("boost" ,boost)
("hdf5" ,hdf5)
+ ("htslib" ,htslib)
("pbbam" ,pbbam)
("zlib" ,zlib)))
(native-inputs
@@ -724,7 +760,7 @@ hdf and alignment.")
(define-public blasr
(package
(name "blasr")
- (version "5.3.3")
+ (version "5.3.5")
(source (origin
(method git-fetch)
(uri (git-reference
@@ -733,7 +769,7 @@ hdf and alignment.")
(file-name (git-file-name name version))
(sha256
(base32
- "1skgy2mvz8gsgfh1gc2nfgwvpyzb1hpmp2cf2773h5wsj8nw22kl"))))
+ "0axyd06gn2xa0p0k76fihsbxpfxvhlb18jn6bf97c0ii58r1wc0k"))))
(build-system meson-build-system)
(arguments
`(#:phases
@@ -747,8 +783,7 @@ hdf and alignment.")
m
(format #f "cpp.find_library('hdf5', dirs : '~a'), \
cpp.find_library('hdf5_cpp', dirs : '~a'), "
- hdf5 hdf5)))))
- #t)))
+ hdf5 hdf5))))))))
;; Tests require "cram" executable, which is not packaged.
#:tests? #f
#:configure-flags '("-Dtests=false")))
@@ -940,9 +975,7 @@ servers supporting the protocol.")
"0wc7z8g8prgdx7n5chjva2fdq03wiwhqisjjxzkjg1j5k5ha7151"))))
(build-system python-build-system)
(arguments
- `(#:modules ((ice-9 ftw)
- (srfi srfi-1)
- (srfi srfi-26)
+ `(#:modules ((srfi srfi-26)
(guix build utils)
(guix build python-build-system))
;; See https://github.com/daler/pybedtools/issues/192
@@ -962,8 +995,6 @@ servers supporting the protocol.")
(substitute* "pybedtools/test/test_issues.py"
(("def test_issue_303")
"def _test_issue_303"))))
- ;; TODO: Remove phase after it's part of PYTHON-BUILD-SYSTEM.
- ;; build system.
;; Force the Cythonization of C++ files to guard against compilation
;; problems.
(add-after 'unpack 'remove-cython-generated-files
@@ -975,20 +1006,12 @@ servers supporting the protocol.")
(string-take filename (string-index-right filename #\.)))
(define (cythonized? c/c++-file)
(member (strip-extension c/c++-file) cython-sources))
- (for-each delete-file (filter cythonized? c/c++-files))
- #t)))
+ (for-each delete-file (filter cythonized? c/c++-files)))))
(add-after 'remove-cython-generated-files 'generate-cython-extensions
(lambda _
(invoke "python" "setup.py" "cythonize")))
(replace 'check
(lambda _
- (let* ((build-root-directory (string-append (getcwd) "/build/"))
- (build (string-append
- build-root-directory
- (find (cut string-prefix? "lib" <>)
- (scandir build-root-directory)))))
- (setenv "PYTHONPATH"
- (string-append build ":" (getenv "PYTHONPATH"))))
;; The tests need to be run from elsewhere...
(mkdir-p "/tmp/test")
(copy-recursively "pybedtools/test" "/tmp/test")
@@ -1515,20 +1538,20 @@ long-read sequencing data.")
(arguments
`(#:tests? #f ; no tests included
#:make-flags
- (list (string-append "BOOST_INC="
- (assoc-ref %build-inputs "boost") "/include")
- (string-append "BOOST_LIB="
- (assoc-ref %build-inputs "boost") "/lib")
- (string-append "HTSLD_INC="
- (assoc-ref %build-inputs "htslib") "/include")
- (string-append "HTSLD_LIB="
- (assoc-ref %build-inputs "htslib") "/lib")
- (string-append "RMATH_INC="
- (assoc-ref %build-inputs "rmath-standalone")
- "/include")
- (string-append "RMATH_LIB="
- (assoc-ref %build-inputs "rmath-standalone")
- "/lib"))
+ ,#~(list (string-append "BOOST_INC="
+ #$(this-package-input "boost") "/include")
+ (string-append "BOOST_LIB="
+ #$(this-package-input "boost") "/lib")
+ (string-append "HTSLD_INC="
+ #$(this-package-input "htslib") "/include")
+ (string-append "HTSLD_LIB="
+ #$(this-package-input "htslib") "/lib")
+ (string-append "RMATH_INC="
+ #$(this-package-input "rmath-standalone")
+ "/include")
+ (string-append "RMATH_LIB="
+ #$(this-package-input "rmath-standalone")
+ "/lib"))
#:phases
(modify-phases %standard-phases
(add-after 'unpack 'fix-linkage
@@ -1915,28 +1938,26 @@ confidence to have in an alignment.")
(delete-file-recursively "pigz")
(delete-file-recursively "google-sparsehash")
(delete-file-recursively "zlib")
- (delete-file-recursively ".git")
- #t))))
+ (delete-file-recursively ".git")))))
(build-system gnu-build-system)
(arguments
- '(#:tests? #f ;no "check" target
+ `(#:tests? #f ;no "check" target
#:make-flags
- (list (string-append "ZLIB="
- (assoc-ref %build-inputs "zlib:static")
- "/lib/libz.a")
- (string-append "LDFLAGS="
- (string-join '("-lboost_filesystem"
- "-lboost_system"
- "-lboost_iostreams"
- "-lz"
- "-fopenmp"))))
+ ,#~(list (string-append "ZLIB="
+ #$(this-package-input "zlib")
+ "/lib/libz.so")
+ (string-append "LDFLAGS="
+ (string-join '("-lboost_filesystem"
+ "-lboost_system"
+ "-lboost_iostreams"
+ "-lz"
+ "-fopenmp"))))
#:phases
(modify-phases %standard-phases
(add-after 'unpack 'do-not-build-bundled-pigz
(lambda* (#:key inputs outputs #:allow-other-keys)
(substitute* "Makefile"
- (("cd pigz/pigz-2.3.3; make") ""))
- #t))
+ (("cd pigz/pigz-2.3.3; make") ""))))
(add-after 'unpack 'patch-paths-to-executables
(lambda* (#:key inputs outputs #:allow-other-keys)
(substitute* "parse_args.cpp"
@@ -1947,15 +1968,13 @@ confidence to have in an alignment.")
(("pigz_binary = .*")
(string-append "pigz_binary = \""
(assoc-ref inputs "pigz")
- "/bin/pigz\";")))
- #t))
+ "/bin/pigz\";")))))
(replace 'install
(lambda* (#:key outputs #:allow-other-keys)
(let ((bin (string-append (assoc-ref outputs "out") "/bin/")))
(for-each (lambda (file)
(install-file file bin))
- '("bless" "kmc/bin/kmc"))
- #t)))
+ '("bless" "kmc/bin/kmc")))))
(delete 'configure))))
(native-inputs
`(("perl" ,perl)))
@@ -1964,7 +1983,6 @@ confidence to have in an alignment.")
("boost" ,boost)
("sparsehash" ,sparsehash)
("pigz" ,pigz)
- ("zlib:static" ,zlib "static")
("zlib" ,zlib)))
(supported-systems '("x86_64-linux"))
(home-page "https://sourceforge.net/p/bless-ec/wiki/Home/")
@@ -1998,26 +2016,29 @@ errors at the end of reads.")
(substitute* "Makefile"
;; replace BUILD_HOST and BUILD_TIME for deterministic build
(("-DBUILD_HOST=.*") "-DBUILD_HOST=\"\\\"guix\\\"\"")
- (("-DBUILD_TIME=.*") "-DBUILD_TIME=\"\\\"0\\\"\""))
- #t))))
+ (("-DBUILD_TIME=.*") "-DBUILD_TIME=\"\\\"0\\\"\""))))))
(build-system gnu-build-system)
(arguments
- '(#:make-flags
- (list "allall"
- "WITH_TBB=1"
- (string-append "prefix=" (assoc-ref %outputs "out")))
+ `(#:make-flags
+ ,#~(list "allall"
+ "WITH_TBB=1"
+ (string-append "prefix=" #$output))
#:phases
(modify-phases %standard-phases
- (delete 'configure)
+ (replace 'configure
+ (lambda _
+ ;; This "extended character" is not considered valid.
+ (substitute* "processor_support.h"
+ (("“") "\"")
+ (("”") "\""))))
(replace 'check
(lambda _
(invoke "perl"
"scripts/test/simple_tests.pl"
"--bowtie2=./bowtie2"
- "--bowtie2-build=./bowtie2-build")
- #t)))))
+ "--bowtie2-build=./bowtie2-build"))))))
(inputs
- `(("tbb" ,tbb)
+ `(("tbb" ,tbb-2020)
("zlib" ,zlib)
("python" ,python-wrapper)))
(native-inputs
@@ -2057,16 +2078,16 @@ gapped, local, and paired-end alignment modes.")
(("-DBUILD_TIME=.*") "-DBUILD_TIME=\"\\\"0\\\"\"")))))
(build-system gnu-build-system)
(arguments
- '(#:tests? #f ; no "check" target
+ `(#:tests? #f ; no "check" target
#:make-flags
- (list "CC=gcc" "all"
- (string-append "prefix=" (assoc-ref %outputs "out")))
+ ,#~(list "CC=gcc" "all"
+ (string-append "prefix=" #$output))
#:phases
(modify-phases %standard-phases
(delete 'configure))))
(inputs
`(("python-wrapper" ,python-wrapper)
- ("tbb" ,tbb)
+ ("tbb" ,tbb-2020)
("zlib" ,zlib)))
(supported-systems '("x86_64-linux"))
(home-page "http://bowtie-bio.sourceforge.net/index.shtml")
@@ -2173,6 +2194,7 @@ splice junctions between exons.")
(build-system gnu-build-system)
(arguments
'(#:tests? #f ;no "check" target
+ #:make-flags '("CFLAGS=-fcommon")
#:phases
(modify-phases %standard-phases
(replace 'install
@@ -2185,8 +2207,7 @@ splice junctions between exons.")
(install-file "bwa" bin)
(install-file "libbwa.a" lib)
(install-file "README.md" doc)
- (install-file "bwa.1" man))
- #t))
+ (install-file "bwa.1" man))))
;; no "configure" script
(delete 'configure))))
(inputs `(("zlib" ,zlib)))
@@ -2221,6 +2242,14 @@ and more accurate. BWA-MEM also has better performance than BWA-backtrack for
(base32
"076c4q0cdqz8jgylb067y9zmvxglppnzi3qiscn0xiypgc6lgb5r"))))
(build-system gnu-build-system)
+ (arguments
+ (substitute-keyword-arguments (package-arguments bwa)
+ ((#:phases phases '%standard-phases)
+ `(modify-phases ,phases
+ (add-after 'unpack 'patch-C-error
+ (lambda _
+ (substitute* "pssm.c"
+ (("inline int map") "int map"))))))))
(inputs
`(("gdsl" ,gdsl)
("zlib" ,zlib)
@@ -2281,19 +2310,19 @@ off-target reads for a capture method that targets CpG-rich region.")
(define-public python-bx-python
(package
(name "python-bx-python")
- (version "0.8.2")
+ (version "0.8.12")
(source (origin
- (method url-fetch)
- (uri (pypi-uri "bx-python" version))
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/bxlab/bx-python")
+ (commit "f4e6a5c93e719db69b5798b6fdd9b167da358316")))
+ (file-name (git-file-name name version))
(sha256
(base32
- "11kksg2rbzihpmcid823xvg42xi88m7sz58rzk29abybkxy0rszs"))))
+ "0mclahslz34vq9x424jmzsxk0nmpm1j716fa8h3zwr9ssvch7skc"))))
(build-system python-build-system)
- ;; Tests fail because test data are not included
- (arguments '(#:tests? #f))
(propagated-inputs
- `(("python-numpy" ,python-numpy)
- ("python-six" ,python-six)))
+ `(("python-numpy" ,python-numpy)))
(inputs
`(("zlib" ,zlib)))
(native-inputs
@@ -2307,9 +2336,6 @@ off-target reads for a capture method that targets CpG-rich region.")
multiple sequence alignments.")
(license license:expat)))
-(define-public python2-bx-python
- (package-with-python2 python-bx-python))
-
(define-public python-pyega3
(package
(name "python-pyega3")
@@ -2367,15 +2393,10 @@ has several key features:
(snippet '(begin
;; Drop bundled htslib. TODO: Also remove samtools
;; and bcftools.
- (delete-file-recursively "htslib")
- #t))))
+ (delete-file-recursively "htslib")))))
(build-system python-build-system)
(arguments
- `(#:modules ((ice-9 ftw)
- (srfi srfi-26)
- (guix build python-build-system)
- (guix build utils))
- #:phases
+ `(#:phases
(modify-phases %standard-phases
(add-before 'build 'set-flags
(lambda* (#:key inputs #:allow-other-keys)
@@ -2385,19 +2406,12 @@ has several key features:
(setenv "HTSLIB_INCLUDE_DIR"
(string-append (assoc-ref inputs "htslib") "/include"))
(setenv "LDFLAGS" "-lncurses")
- (setenv "CFLAGS" "-D_CURSES_LIB=1")
- #t))
+ (setenv "CFLAGS" "-D_CURSES_LIB=1")))
(replace 'check
(lambda* (#:key tests? #:allow-other-keys)
- ;; Failing test removed in the next release.
+ ;; FIXME: These tests fail with "AttributeError: 'array.array'
+ ;; object has no attribute 'tostring'".
(delete-file "tests/AlignmentFile_test.py")
- ;; Add first subdirectory of "build" directory to PYTHONPATH.
- (setenv "PYTHONPATH"
- (string-append
- (getenv "PYTHONPATH")
- ":" (getcwd) "/build/"
- (car (scandir "build"
- (negate (cut string-prefix? "." <>))))))
(when tests?
;; Step out of source dir so python does not import from CWD.
(with-directory-excursion "tests"
@@ -2462,19 +2476,16 @@ also includes an interface for tabix.")
UCSC genome browser.")
(license license:artistic2.0)))
-(define-public python2-twobitreader
- (package-with-python2 python-twobitreader))
-
(define-public python-plastid
(package
(name "python-plastid")
- (version "0.4.8")
+ (version "0.5.1")
(source (origin
(method url-fetch)
(uri (pypi-uri "plastid" version))
(sha256
(base32
- "0l24dd3q66if8yj042m4s0g95n6acn7im1imqd3p6h8ns43kxhj8"))))
+ "1a7mdky2xw02y88l51f58pqk8039ahdp6sblj3zx58zarmy2pqyl"))))
(build-system python-build-system)
(arguments
;; Some test files are not included.
@@ -2498,9 +2509,6 @@ UCSC genome browser.")
high-throughput sequencing data – with an emphasis on simplicity.")
(license license:bsd-3)))
-(define-public python2-plastid
- (package-with-python2 python-plastid))
-
(define-public tetoolkit
(package
(name "tetoolkit")
@@ -2585,9 +2593,9 @@ are not included due to their size.")
`(#:tests? #f ; there are no tests
#:make-flags
;; Executables are copied directly to the PREFIX.
- (list (string-append "PREFIX=" (assoc-ref %outputs "out") "/bin")
- ;; Support longer sequences (e.g. Pacbio sequences)
- "MAX_SEQ=60000000")
+ ,#~(list (string-append "PREFIX=" #$output "/bin")
+ ;; Support longer sequences (e.g. Pacbio sequences)
+ "MAX_SEQ=60000000")
#:phases
(modify-phases %standard-phases
;; No "configure" script
@@ -2621,7 +2629,7 @@ databases.")
(define-public clipper
(package
(name "clipper")
- (version "2.0")
+ (version "2.0.1")
(source (origin
(method git-fetch)
(uri (git-reference
@@ -2630,10 +2638,16 @@ databases.")
(file-name (git-file-name name version))
(sha256
(base32
- "1bcag4lb5bkzsj2vg7lrq24aw6yfgq275ifrbhd82l7kqgbbjbkv"))))
+ "0508rgnfjk5ar5d1mjbjyrnarv4kw9ksq0m3jw2bmgabmb5v6ikk"))
+ (modules '((guix build utils)))
+ (snippet
+ '(begin
+ ;; Delete pre-compiled files.
+ (delete-file "clipper/src/peaks.so")))))
(build-system python-build-system)
(arguments
- `(#:phases
+ `(#:tests? #false
+ #:phases
(modify-phases %standard-phases
(add-before 'reset-gzip-timestamps 'make-files-writable
(lambda* (#:key outputs #:allow-other-keys)
@@ -2641,14 +2655,30 @@ databases.")
;; 'reset-gzip-timestamps' phase can do its work.
(let ((out (assoc-ref outputs "out")))
(for-each make-file-writable
- (find-files out "\\.gz$"))
- #t)))
+ (find-files out "\\.gz$")))))
+ (add-after 'unpack 'use-python3-for-cython
+ (lambda _
+ (substitute* "setup.py"
+ (("^setup")
+ "\
+peaks.cython_directives = {'language_level': '3'}
+readsToWiggle.cython_directives = {'language_level': '3'}
+setup"))))
(add-after 'unpack 'disable-nondeterministic-test
(lambda _
;; This test fails/succeeds non-deterministically.
(substitute* "clipper/test/test_call_peak.py"
- (("test_get_FDR_cutoff_mean") "_test_get_FDR_cutoff_mean"))
- #t)))))
+ (("test_get_FDR_cutoff_mean") "_test_get_FDR_cutoff_mean"))))
+ ;; This doesn't work because "usage" is executed, and that calls
+ ;; exit(8).
+ (replace 'check
+ (lambda* (#:key tests? inputs outputs #:allow-other-keys)
+ (when tests?
+ (add-installed-pythonpath inputs outputs)
+ (with-directory-excursion "clipper/test"
+ (invoke "python" "-m" "unittest")))))
+ ;; This is not a library
+ (delete 'sanity-check))))
(inputs
`(("htseq" ,htseq)
("python-pybedtools" ,python-pybedtools)
@@ -2737,13 +2767,19 @@ time.")
(define-public crossmap
(package
(name "crossmap")
- (version "0.3.8")
+ (version "0.6.1")
(source (origin
(method url-fetch)
(uri (pypi-uri "CrossMap" version))
(sha256
(base32
- "1sb2f2qbxya4fzw3yjl09vbrs8vfmw22zrygrvz004sf9gb1vkan"))))
+ "0hqminh5wn1p3x481jbyc7gmncp5xc196hpvki7k25vzbryhwcix"))
+ (modules '((guix build utils)))
+ (snippet
+ '(begin
+ ;; Delete compiled Python files.
+ (for-each delete-file (find-files "." "\\.pyc$"))
+ (delete-file-recursively ".eggs")))))
(build-system python-build-system)
(inputs
`(("python-bx-python" ,python-bx-python)
@@ -2765,14 +2801,14 @@ file formats including SAM/BAM, Wiggle/BigWig, BED, GFF/GTF, VCF.")
(define-public python-dnaio
(package
(name "python-dnaio")
- (version "0.3")
+ (version "0.6.0")
(source
(origin
(method url-fetch)
(uri (pypi-uri "dnaio" version))
(sha256
(base32
- "0f16m7hdlm0fz1n7y5asy0v9ghyrq17ni1p9iybq22ddzyd49r27"))))
+ "14v5yyasq2bz34j38wi3xfcp06jj7l35ppibjcn95l2n73hz3zwi"))))
(build-system python-build-system)
(native-inputs
`(("python-cython" ,python-cython)
@@ -2860,6 +2896,16 @@ annotations of the genome.")
(base32
"1vqmsfkm6llxzmsz9wcfcvzx9a9f8iabvwik2rbyn7nc4wm25z89"))))
(build-system python-build-system)
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'always-cythonize
+ (lambda _
+ (delete-file "src/cutadapt/_align.c")
+ ;; If PKG-INFO exists, setup.py decides not to run Cython.
+ (substitute* "setup.py"
+ (("os.path.exists\\('PKG-INFO'\\):")
+ "os.path.exists('totally-does-not-exist'):")))))))
(inputs
`(("python-dnaio" ,python-dnaio)
("python-xopen" ,python-xopen)))
@@ -2892,8 +2938,8 @@ other types of unwanted sequence from high-throughput sequencing reads.")
`(#:test-target "test"
#:tests? #f ; tests require access to the web
#:make-flags
- (list "CC=gcc"
- (string-append "prefix=" (assoc-ref %outputs "out")))
+ ,#~(list "CC=gcc"
+ (string-append "prefix=" #$output))
#:phases
(modify-phases %standard-phases
(delete 'configure))))
@@ -2955,14 +3001,14 @@ accessing bigWig files.")
(define-public python-schema-salad
(package
(name "python-schema-salad")
- (version "7.1.20210316164414")
+ (version "8.2.20211116214159")
(source
(origin
(method url-fetch)
(uri (pypi-uri "schema-salad" version))
(sha256
(base32
- "04jaykdpgfnkrghvli5swxzqp7yba842am4bz42hcfljsmkrxvrk"))))
+ "005dh2y45x92zl8sf2sqjmfvcqr4hrz8dfckgkckv87003v7lwqc"))))
(build-system python-build-system)
(arguments
`(#:phases
@@ -2974,10 +3020,9 @@ accessing bigWig files.")
(("^def test_(secondaryFiles|outputBinding)" all)
(string-append "@pytest.mark.skip(reason="
"\"test requires network access\")\n"
- all)))
- #t)))))
+ all))))))))
(propagated-inputs
- `(("python-cachecontrol" ,python-cachecontrol-0.11)
+ `(("python-cachecontrol" ,python-cachecontrol)
("python-lockfile" ,python-lockfile)
("python-mistune" ,python-mistune)
("python-rdflib" ,python-rdflib)
@@ -2986,7 +3031,8 @@ accessing bigWig files.")
("python-ruamel.yaml" ,python-ruamel.yaml)
("python-typing-extensions" ,python-typing-extensions)))
(native-inputs
- `(("python-pytest" ,python-pytest)
+ `(("python-black" ,python-black)
+ ("python-pytest" ,python-pytest)
("python-pytest-runner" ,python-pytest-runner)))
(home-page "https://github.com/common-workflow-language/schema_salad")
(synopsis "Schema Annotations for Linked Avro Data (SALAD)")
@@ -3003,7 +3049,7 @@ and record oriented data modeling and the Semantic Web.")
(define-public cwltool
(package
(name "cwltool")
- (version "3.0.20210319143721")
+ (version "3.1.20211107152837")
(source (origin
(method git-fetch)
(uri (git-reference
@@ -3012,7 +3058,7 @@ and record oriented data modeling and the Semantic Web.")
(file-name (git-file-name name version))
(sha256
(base32
- "1sgs9ckyxb9f9169mc3wm9lnjg4080ai42xqsrwpw9l8apy4c9m5"))))
+ "0i3x9wdgpzgyc1askxymlhn0ps2x9xhqaax496iwpx66ab6132c4"))))
(build-system python-build-system)
(arguments
`(#:phases
@@ -3020,17 +3066,13 @@ and record oriented data modeling and the Semantic Web.")
(add-after 'unpack 'loosen-version-restrictions
(lambda _
(substitute* "setup.py"
- (("== 1.5.1") ">=1.5.1") ; prov
- ((", < 3.5") "") ; shellescape
- ((" >= 6.0.2, < 6.2") "")) ; pytest
- #t))
+ (("== 1.5.1") ">=1.5.1")))) ; prov
(add-after 'unpack 'dont-use-git
(lambda _
(substitute* "gittaggers.py"
(("self.git_timestamp_tag\\(\\)")
(string-append "time.strftime('.%Y%m%d%H%M%S', time.gmtime(int("
- (string-drop ,version 4) ")))")))
- #t))
+ (string-drop ,version 4) ")))")))))
(add-after 'unpack 'modify-tests
(lambda _
;; Tries to connect to the internet.
@@ -3050,7 +3092,18 @@ and record oriented data modeling and the Semantic Web.")
(("def test_v1_0_arg_empty_prefix_separate_false")
(string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
"def test_v1_0_arg_empty_prefix_separate_false")))
- #t)))))
+
+ (substitute* '("cwltool/schemas/v1.1/tests/env-tool1.cwl"
+ "cwltool/schemas/v1.1/tests/env-tool2.cwl"
+ "cwltool/schemas/v1.1/tests/imported-hint.cwl"
+ "tests/subgraph/env-tool2.cwl"
+ "tests/subgraph/env-tool2_req.cwl"
+ "tests/subgraph/env-wf2_subwf-packed.cwl"
+ "tests/subgraph/env-tool2_no_env.cwl")
+ (("\"/bin/sh\"") (string-append "\"" (which "sh") "\"")))
+ ;; Pytest doesn't know what to do with "-n auto"
+ (substitute* "tox.ini"
+ (("-n auto") "")))))))
(propagated-inputs
`(("python-argcomplete" ,python-argcomplete)
("python-bagit" ,python-bagit)
@@ -3095,7 +3148,7 @@ CWL descriptions.")
(define-public python-dendropy
(package
(name "python-dendropy")
- (version "4.4.0")
+ (version "4.5.1")
(source
(origin
(method git-fetch)
@@ -3106,8 +3159,27 @@ CWL descriptions.")
(file-name (git-file-name name version))
(sha256
(base32
- "097hfyv2kaf4x92i4rjx0paw2cncxap48qivv8zxng4z7nhid0x9"))))
+ "0lrfzjqzbpk1rrra9vd7z2j7q09jy9w1ss7wn2rd85i4k5y3xz8l"))))
(build-system python-build-system)
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'skip-broken-tests
+ (lambda _
+ ;; These tests fail because we have no "paup" executable.
+ (substitute* "tests/test_datamodel_split_bitmasks.py"
+ (((format #false "(~{~a~^|~})"
+ '("test_group1"
+ "test_basic_split_counting_under_different_rootings"
+ "test_basic_split_count_with_incorrect_weight_treatment_raises_error"
+ "test_basic_split_count_with_incorrect_rootings_raises_error")) m)
+ (string-append "_skip_" m)))
+ (delete-file "tests/test_paup.py")
+ (delete-file "tests/test_dataio_nexml_reader_tree_list.py")
+ ;; Assert error for unknown reasons
+ (substitute* "tests/test_protractedspeciation.py"
+ (("test_by_num_lineages" m)
+ (string-append "_skip_" m))))))))
(home-page "https://dendropy.org/")
(synopsis "Library for phylogenetics and phylogenetic computing")
(description
@@ -3172,8 +3244,8 @@ with Python.")
(arguments
`(#:tests? #f ; There are no tests to run.
#:make-flags
- (list "PARALLEL=1" ; Allow parallel execution at run-time.
- (string-append "prefix=" (assoc-ref %outputs "out")))
+ ,#~(list "PARALLEL=1" ; Allow parallel execution at run-time.
+ (string-append "prefix=" #$output))
#:phases
(modify-phases %standard-phases
(delete 'configure) ; There is no configure phase.
@@ -3225,14 +3297,14 @@ bases are detected.")
(define-public repeat-masker
(package
(name "repeat-masker")
- (version "4.1.1")
+ (version "4.1.2-p1")
(source (origin
(method url-fetch)
(uri (string-append "http://www.repeatmasker.org/"
"RepeatMasker/RepeatMasker-"
version ".tar.gz"))
(sha256
- (base32 "03144sl9kh5ni2i33phi7x2pjndzbm5bjw3r4kqvmm6hxyb4k4x2"))))
+ (base32 "15hfdfpzmdjcx7ng7rjfid69bmvgn3z9g9r43qhjnhjhq3v4prab"))))
(build-system gnu-build-system)
(arguments
`(#:tests? #false ; there are none
@@ -3346,8 +3418,7 @@ data and settings.")
(("≤") "<="))
;; This seems to be a syntax error.
(substitute* "doc/discrover-manual.tex"
- (("theverbbox\\[t\\]") "theverbbox"))
- #t))
+ (("theverbbox\\[t\\]") "theverbbox"))))
(add-after 'unpack 'add-missing-includes
(lambda _
(substitute* "src/executioninformation.hpp"
@@ -3355,29 +3426,23 @@ data and settings.")
(string-append line "\n#include <random>")))
(substitute* "src/plasma/fasta.hpp"
(("#define FASTA_HPP" line)
- (string-append line "\n#include <random>")))
- #t))
- ;; FIXME: this is needed because we're using texlive-union, which
- ;; doesn't handle fonts correctly. It expects to be able to generate
- ;; fonts in the home directory.
- (add-before 'build 'setenv-HOME
- (lambda _ (setenv "HOME" "/tmp") #t)))))
+ (string-append line "\n#include <random>"))))))))
(inputs
`(("boost" ,boost)
("cairo" ,cairo)
("rmath-standalone" ,rmath-standalone)))
(native-inputs
- `(("texlive" ,(texlive-union (list texlive-cm
- texlive-fonts-amsfonts
-
- texlive-latex-doi
- texlive-latex-examplep
- texlive-latex-hyperref
- texlive-latex-ms
- texlive-latex-natbib
- texlive-bibtex ; style files used by natbib
- texlive-latex-pgf ; tikz
- texlive-latex-verbatimbox)))
+ `(("texlive" ,(texlive-updmap.cfg (list texlive-cm
+ texlive-amsfonts
+ texlive-doi
+ texlive-fonts-ec
+ texlive-latex-examplep
+ texlive-hyperref
+ texlive-latex-ms
+ texlive-latex-natbib
+ texlive-bibtex ; style files used by natbib
+ texlive-latex-pgf ; tikz
+ texlive-latex-verbatimbox)))
("imagemagick" ,imagemagick)))
(home-page "https://dorina.mdc-berlin.de/public/rajewsky/discrover/")
(synopsis "Discover discriminative nucleotide sequence motifs")
@@ -3832,22 +3897,19 @@ results. The FASTX-Toolkit tools perform some of these preprocessing tasks.")
(add-after 'unpack 'do-not-tune-to-CPU
(lambda _
(substitute* "src/CMakeLists.txt"
- ((" -march=native") ""))
- #t))
+ ((" -march=native") ""))))
(replace 'check
(lambda* (#:key outputs #:allow-other-keys)
(setenv "PATH" (string-append (getcwd) ":" (getenv "PATH")))
(with-directory-excursion "../source/test"
- (invoke "bash" "flexbar_test.sh"))
- #t))
+ (invoke "bash" "flexbar_test.sh"))))
(replace 'install
(lambda* (#:key outputs #:allow-other-keys)
(let* ((out (string-append (assoc-ref outputs "out")))
(bin (string-append out "/bin/")))
- (install-file "flexbar" bin))
- #t)))))
+ (install-file "flexbar" bin)))))))
(inputs
- `(("tbb" ,tbb)
+ `(("tbb" ,tbb-2020)
("zlib" ,zlib)))
(native-inputs
`(("pkg-config" ,pkg-config)
@@ -3970,9 +4032,9 @@ genes in incomplete assemblies or complete genomes.")
"0hab3gpwf4w9s87qlbswq6ws1qqybh4dcqk79q1ahyldzai5fgp5"))))
(build-system gnu-build-system)
(arguments
- `(#:make-flags (list
- (string-append "PREFIX=" (assoc-ref %outputs "out"))
- "CC=gcc")
+ `(#:make-flags ,#~(list
+ (string-append "PREFIX=" #$output)
+ "CC=gcc")
#:test-target "fxtract_test"
#:phases
(modify-phases %standard-phases
@@ -4125,7 +4187,7 @@ estimates transcript expression.")
(define-public hisat
(package
(name "hisat")
- (version "0.1.4")
+ (version "0.1.6")
(source (origin
(method url-fetch)
(uri (string-append
@@ -4133,7 +4195,7 @@ estimates transcript expression.")
version "-beta-source.zip"))
(sha256
(base32
- "1k381ydranqxp09yf2y7w1d0chz5d59vb6jchi89hbb0prq19lk5"))))
+ "177z85vqp9b30vgxl5py5hz4mm37ila37nzhfam23ci9iyfxgyv9"))))
(build-system gnu-build-system)
(arguments
`(#:tests? #f ;no check target
@@ -4158,7 +4220,10 @@ estimates transcript expression.")
(("-DBUILD_TIME=.*") "-DBUILD_TIME=\"\\\"0\\\"\""))
(substitute* '("hisat-build" "hisat-inspect")
(("/usr/bin/env") (which "env")))
- #t))
+ ;; This "extended character" is not considered valid.
+ (substitute* "processor_support.h"
+ (("“") "\"")
+ (("”") "\""))))
(replace 'install
(lambda* (#:key outputs #:allow-other-keys)
(let ((bin (string-append (assoc-ref outputs "out") "/bin/")))
@@ -4166,8 +4231,7 @@ estimates transcript expression.")
(install-file file bin))
(find-files
"."
- "hisat(-(build|align|inspect)(-(s|l)(-debug)*)*)*$")))
- #t))
+ "hisat(-(build|align|inspect)(-(s|l)(-debug)*)*)*$")))))
(delete 'configure))))
(native-inputs
`(("unzip" ,unzip)))
@@ -4282,13 +4346,13 @@ HMMs).")
(define-public htseq
(package
(name "htseq")
- (version "0.9.1")
+ (version "0.12.3")
(source (origin
(method url-fetch)
(uri (pypi-uri "HTSeq" version))
(sha256
(base32
- "11flgb1381xdhk43bzbfm3vhnszkpqg6jk76rpa5xd1zbrvvlnxg"))))
+ "0pk41vkzxsbb5nv644325mh8akmz4zdply9r2s80dgg5b21pgp0b"))))
(build-system python-build-system)
(native-inputs
`(("python-cython" ,python-cython)))
@@ -4333,8 +4397,7 @@ from high-throughput sequencing assays.")
`(#:tests? #f ; test require Internet access
#:jdk ,icedtea-8
#:make-flags
- (list (string-append "-Ddist=" (assoc-ref %outputs "out")
- "/share/java/htsjdk/"))
+ ,#~(list (string-append "-Ddist=" #$output "/share/java/htsjdk/"))
#:build-target "all"
#:phases
(modify-phases %standard-phases
@@ -4469,12 +4532,12 @@ manipulating HTS data.")
;; Tests require jacoco:coverage.
#:tests? #f
#:make-flags
- (list (string-append "-Dhtsjdk_lib_dir="
- (assoc-ref %build-inputs "java-htsjdk")
- "/share/java/htsjdk/")
- "-Dhtsjdk-classes=dist/tmp"
- (string-append "-Dhtsjdk-version="
- ,(package-version java-htsjdk)))
+ ,#~(list (string-append "-Dhtsjdk_lib_dir="
+ #$(this-package-input "java-htsjdk")
+ "/share/java/htsjdk/")
+ "-Dhtsjdk-classes=dist/tmp"
+ (string-append "-Dhtsjdk-version="
+ #$(package-version java-htsjdk)))
#:jdk ,icedtea-8
#:phases
(modify-phases %standard-phases
@@ -4484,9 +4547,8 @@ manipulating HTS data.")
(lambda* (#:key inputs #:allow-other-keys)
(substitute* "build.xml"
(("\\$\\{htsjdk\\}/lib")
- (string-append (assoc-ref inputs "java-htsjdk")
- "/share/java/htsjdk/")))
- #t))
+ (search-input-directory inputs
+ "share/java/htsjdk")))))
(add-after 'unpack 'make-test-target-independent
(lambda* (#:key inputs #:allow-other-keys)
(substitute* "build.xml"
@@ -4641,9 +4703,7 @@ VCF.")
(lambda* (#:key inputs #:allow-other-keys)
(substitute* "build.xml"
(("\\$\\{lib\\}/apache-ant-1.8.2-bzip2.jar")
- (string-append (assoc-ref inputs "ant")
- "/lib/ant.jar")))
- #t))
+ (search-input-file inputs "/lib/ant.jar")))))
(add-after 'unpack 'make-test-target-independent
(lambda* (#:key inputs #:allow-other-keys)
(substitute* "build.xml"
@@ -4740,15 +4800,13 @@ VCF.")
(lambda* (#:key inputs #:allow-other-keys)
(substitute* "build.xml"
(("jbzip2-0.9.jar")
- (string-append (assoc-ref inputs "java-jbzip2")
- "/share/java/jbzip2.jar"))
+ (search-input-file inputs "/share/java/jbzip2.jar"))
(("sam-1.103.jar")
- (string-append (assoc-ref inputs "java-picard-1.113")
- "/share/java/sam-1.112.jar"))
+ (search-input-file inputs
+ "/share/java/sam-1.112.jar"))
(("cisd-jhdf5.jar")
- (string-append (assoc-ref inputs "java-cisd-jhdf5")
- "/share/java/sis-jhdf5.jar")))
- #t))
+ (search-input-file inputs
+ "/share/java/sis-jhdf5.jar")))))
;; There is no installation target
(replace 'install
(lambda* (#:key inputs outputs #:allow-other-keys)
@@ -4814,7 +4872,7 @@ The main functions of FastQC are:
(arguments
`(#:tests? #f ; there are none
#:make-flags
- (list (string-append "PREFIX=" (assoc-ref %outputs "out")))
+ ,#~(list (string-append "PREFIX=" #$output))
#:phases
(modify-phases %standard-phases
(delete 'configure)
@@ -4909,6 +4967,30 @@ data. It also provides the @command{bgzip}, @command{htsfile}, and
(base32
"1rja282fwdc25ql6izkhdyh8ppw8x2fs0w0js78zgkmqjlikmma9"))))))
+(define htslib-for-samtools-1.2
+ (package
+ (inherit htslib)
+ (version "1.2.1")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append
+ "https://github.com/samtools/htslib/releases/download/"
+ version "/htslib-" version ".tar.bz2"))
+ (sha256
+ (base32
+ "1c32ssscbnjwfw3dra140fq7riarp2x990qxybh34nr1p5r17nxx"))))
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'patch-tests
+ (lambda _
+ (substitute* "test/test.pl"
+ (("/bin/bash") (which "bash"))))))))
+ (inputs
+ `(("zlib" ,zlib)))
+ (native-inputs
+ `(("perl" ,perl)))))
+
(define-public idr
(package
(name "idr")
@@ -4959,15 +5041,11 @@ experiments and provide highly stable thresholds based on reproducibility.")
"0npa62wzasdibas5zp3n8j3armsci4kyvh0jw7jr0am4gg7vg5g1"))))
(build-system gnu-build-system)
(outputs '("out" ;for library
- "ruby" ;for Ruby bindings
"python")) ;for Python bindings
(arguments
`(#:configure-flags
- (list "--without-sse" ; configure script probes for CPU features when SSE is enabled.
- (string-append "--enable-ruby-binding="
- (assoc-ref %outputs "ruby"))
- (string-append "--enable-python-binding="
- (assoc-ref %outputs "python")))
+ ,#~(list "--without-sse" ; configure script probes for CPU features when SSE is enabled.
+ (string-append "--enable-python-binding=" #$output:python))
#:phases
(modify-phases %standard-phases
(add-before 'check 'set-SHELL-variable
@@ -4978,7 +5056,6 @@ experiments and provide highly stable thresholds based on reproducibility.")
(native-inputs
`(("bc" ,bc)
("time" ,time)
- ("ruby" ,ruby)
("python" ,python-wrapper)
("pkg-config" ,pkg-config)))
(inputs
@@ -5029,7 +5106,9 @@ command, or queried for specific k-mers with @code{jellyfish query}.")
(("# libraries = z,bz2")
"libraries = z,bz2")
(("include:third-party/zlib:third-party/bzip2")
- "include:"))))))
+ "include:"))
+ ;; Delete generated Cython CPP files.
+ (for-each delete-file (find-files "khmer/_oxli/" "\\.cpp$"))))))
(build-system python-build-system)
(arguments
`(#:phases
@@ -5042,13 +5121,24 @@ command, or queried for specific k-mers with @code{jellyfish query}.")
(substitute* "sandbox/sweep-reads.py"
(("time\\.clock")
"time.process_time"))))
- (add-before 'reset-gzip-timestamps 'make-files-writable
- (lambda* (#:key outputs #:allow-other-keys)
- ;; Make sure .gz files are writable so that the
- ;; 'reset-gzip-timestamps' phase can do its work.
- (let ((out (assoc-ref outputs "out")))
- (for-each make-file-writable
- (find-files out "\\.gz$"))))))))
+ (add-after 'unpack 'do-use-cython
+ (lambda _
+ (substitute* "setup.py"
+ (("from setuptools import Extension as CyExtension")
+ "from Cython.Distutils import Extension as CyExtension")
+ (("from setuptools.command.build_ext import build_ext as _build_ext")
+ "from Cython.Distutils import build_ext as _build_ext")
+ (("HAS_CYTHON = False") "HAS_CYTHON = True")
+ (("cy_ext = 'cpp'") "cy_ext = 'pyx'"))))
+ (add-before 'build 'build-extensions
+ (lambda _
+ ;; Cython extensions have to be built before running the tests.
+ (invoke "python" "setup.py" "build_ext" "--inplace")))
+ (replace 'check
+ (lambda* (#:key tests? inputs outputs #:allow-other-keys)
+ (when tests?
+ (add-installed-pythonpath inputs outputs)
+ (invoke "pytest" "-v")))))))
(native-inputs
`(("python-cython" ,python-cython)
("python-pytest" ,python-pytest)
@@ -5138,6 +5228,8 @@ experiments.")
(arguments
`(#:phases
(modify-phases %standard-phases
+ (add-before 'build 'set-HOME
+ (lambda _ (setenv "HOME" "/tmp")))
(replace 'check
(lambda* (#:key tests? inputs outputs #:allow-other-keys)
(when tests?
@@ -5175,10 +5267,9 @@ sequencing tag position and orientation.")
(build-system gnu-build-system)
(arguments
`(#:tests? #f ; no automated tests, though there are tests in the read me
- #:make-flags (let ((out (assoc-ref %outputs "out")))
- (list (string-append "PREFIX=" out)
- (string-append "BINDIR="
- (string-append out "/bin"))))
+ #:make-flags ,#~(list (string-append "PREFIX=" #$output)
+ (string-append "BINDIR="
+ (string-append #$output "/bin")))
#:phases
(modify-phases %standard-phases
(add-after 'unpack 'enter-dir
@@ -5218,16 +5309,15 @@ sequencing tag position and orientation.")
#t))
(delete 'configure)
(add-after 'install 'wrap-programs
- (lambda* (#:key outputs #:allow-other-keys)
+ (lambda* (#:key inputs outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))
(bin (string-append out "/bin"))
(path (string-append
- (assoc-ref %build-inputs "coreutils") "/bin:")))
+ (assoc-ref inputs "coreutils") "/bin:")))
(for-each (lambda (file)
(wrap-program file
`("PATH" ":" prefix (,path))))
- (find-files bin)))
- #t)))))
+ (find-files bin))))))))
(inputs
`(("perl" ,perl)
("ruby" ,ruby)
@@ -5260,18 +5350,16 @@ sequences).")
"049hwcc059p2fd9vwndn63laifvvsi0wmv84i6y1fr79k15dxwy6"))
(modules '((guix build utils)))
(snippet
- '(begin
- ;; Delete bundled kseq.
- ;; TODO: Also delete bundled murmurhash and open bloom filter.
- (delete-file "src/mash/kseq.h")
- #t))))
+ ;; Delete bundled kseq.
+ ;; TODO: Also delete bundled murmurhash and open bloom filter.
+ '(delete-file "src/mash/kseq.h"))))
(build-system gnu-build-system)
(arguments
`(#:tests? #f ; No tests.
#:configure-flags
- (list
- (string-append "--with-capnp=" (assoc-ref %build-inputs "capnproto"))
- (string-append "--with-gsl=" (assoc-ref %build-inputs "gsl")))
+ ,#~(list
+ (string-append "--with-capnp=" #$(this-package-input "capnproto"))
+ (string-append "--with-gsl=" #$(this-package-input "gsl")))
#:make-flags (list "CC=gcc")
#:phases
(modify-phases %standard-phases
@@ -5292,13 +5380,13 @@ sequences).")
(("c\\+\\+11") "c++14"))
#t)))))
(native-inputs
- `(("autoconf" ,autoconf)
- ;; Capnproto and htslib are statically embedded in the final
+ `(("autoconf" ,autoconf)))
+ (inputs
+ `(;; Capnproto and htslib are statically embedded in the final
;; application. Therefore we also list their licenses, below.
("capnproto" ,capnproto)
- ("htslib" ,htslib)))
- (inputs
- `(("gsl" ,gsl)
+ ("htslib" ,htslib)
+ ("gsl" ,gsl)
("zlib" ,zlib)))
(supported-systems '("x86_64-linux"))
(home-page "https://mash.readthedocs.io")
@@ -5314,7 +5402,7 @@ form of assemblies or reads.")
(define-public metabat
(package
(name "metabat")
- (version "2.12.1")
+ (version "2.15")
(source
(origin
(method git-fetch)
@@ -5324,46 +5412,32 @@ form of assemblies or reads.")
(file-name (git-file-name name version))
(sha256
(base32
- "0hyg2smw1nz69mfvjpk45xyyychmda92c80a0cv7baji84ri4iyn"))
- (patches (search-patches "metabat-fix-compilation.patch"))))
- (build-system scons-build-system)
- (arguments
- `(#:scons ,scons-python2
- #:scons-flags
- (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
- (string-append "BOOST_ROOT=" (assoc-ref %build-inputs "boost")))
- #:tests? #f ;; Tests are run during the build phase.
+ "0v3gsps0ypani14102z2y1a2wignhpf7s1h45mxmj5f783rkhqd9"))))
+ (build-system cmake-build-system)
+ (arguments
+ `(#:configure-flags
+ ,#~(list (string-append "-Dzlib_LIB=" #$(this-package-input "zlib")
+ "/lib/libz.so")
+ (string-append "-Dhtslib_LIB=" #$(this-package-input "htslib")
+ "/lib/libhts.so")
+ (string-append "-DBOOST_ROOT=" #$(this-package-input "boost")))
#:phases
(modify-phases %standard-phases
- (add-after 'unpack 'fix-includes
+ (add-after 'unpack 'configure-version-file
(lambda _
- (substitute* "src/BamUtils.h"
- (("^#include \"bam/bam\\.h\"")
- "#include \"samtools/bam.h\"")
- (("^#include \"bam/sam\\.h\"")
- "#include \"samtools/sam.h\""))
- (substitute* "src/KseqReader.h"
- (("^#include \"bam/kseq\\.h\"")
- "#include \"htslib/kseq.h\""))
- #t))
- (add-after 'unpack 'fix-scons
- (lambda* (#:key inputs #:allow-other-keys)
- (substitute* "SConstruct"
- (("^htslib_dir += 'samtools'")
- (string-append "htslib_dir = '"
- (assoc-ref inputs "htslib")
- "'"))
- (("^samtools_dir = 'samtools'")
- (string-append "samtools_dir = '"
- (assoc-ref inputs "samtools")
- "'"))
- (("^findStaticOrShared\\('bam', hts_lib")
- (string-append "findStaticOrShared('bam', '"
- (assoc-ref inputs "samtools")
- "/lib'"))
- ;; Do not distribute README.
- (("^env\\.Install\\(idir_prefix, 'README\\.md'\\)") ""))
- #t)))))
+ (copy-file "metabat_version.h.in" "metabat_version.h")
+ (substitute* "metabat_version.h"
+ (("@_time_stamp@") "19700101")
+ (("@GIT_IS_DIRTY@") "0")
+ (("@GIT_RETRIEVED_STATE@") "0")
+ (("@GIT_HEAD_SHA1@") (string-append "v" ,version)))))
+ (add-after 'unpack 'do-not-use-bundled-libraries
+ (lambda _
+ (substitute* "CMakeLists.txt"
+ (("include\\(cmake.*") ""))
+ (substitute* "src/CMakeLists.txt"
+ (("set\\(Boost.*") "")
+ (("add_dependencies.*") "")))))))
(inputs
`(("zlib" ,zlib)
("perl" ,perl)
@@ -5442,52 +5516,55 @@ assembled metagenomic sequence.")
(license license:gpl3+)))
(define-public miso
- (package
- (name "miso")
- (version "0.5.4")
- (source (origin
- (method url-fetch)
- (uri (pypi-uri "misopy" version))
- (sha256
- (base32
- "1z3x0vd8ma7pdrnywj7i3kgwl89sdkwrrn62zl7r5calqaq2hyip"))
- (modules '((guix build utils)))
- (snippet '(begin
- (substitute* "setup.py"
- ;; Use setuptools, or else the executables are not
- ;; installed.
- (("distutils.core") "setuptools")
- ;; Use "gcc" instead of "cc" for compilation.
- (("^defines")
- "cc.set_executables(
+ (let ((commit "b71402188000465e3430736a11ea118fd5639a4a")
+ (revision "1"))
+ (package
+ (name "miso")
+ (version (git-version "0.5.4" revision commit))
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/yarden/MISO/")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0x37ipwwvpxbkrg17gmq3hp92c9cphch8acd6cj7fqgnrjwd47g5"))
+ (modules '((guix build utils)))
+ (snippet
+ '(substitute* "setup.py"
+ ;; Use "gcc" instead of "cc" for compilation.
+ (("^defines")
+ "cc.set_executables(
compiler='gcc',
compiler_so='gcc',
linker_exe='gcc',
-linker_so='gcc -shared'); defines"))
- #t))))
- (build-system python-build-system)
- (arguments
- `(#:python ,python-2 ; only Python 2 is supported
- #:tests? #f)) ; no "test" target
- (inputs
- `(("samtools" ,samtools)
- ("python-numpy" ,python2-numpy)
- ("python-pysam" ,python2-pysam)
- ("python-scipy" ,python2-scipy)
- ("python-matplotlib" ,python2-matplotlib)))
- (native-inputs
- `(("python-mock" ,python2-mock) ; for tests
- ("python-pytz" ,python2-pytz))) ; for tests
- (home-page "https://www.genes.mit.edu/burgelab/miso/index.html")
- (synopsis "Mixture of Isoforms model for RNA-Seq isoform quantitation")
- (description
- "MISO (Mixture-of-Isoforms) is a probabilistic framework that quantitates
+linker_so='gcc -shared'); defines")))))
+ (build-system python-build-system)
+ (arguments
+ `(#:python ,python-2 ; only Python 2 is supported
+ #:tests? #f)) ; no "test" target
+ (inputs
+ ;; Samtools must not be newer than 1.2. See
+ ;; https://github.com/yarden/MISO/issues/135
+ `(("samtools" ,samtools-1.2)
+ ("python-numpy" ,python2-numpy)
+ ("python-pysam" ,python2-pysam)
+ ("python-scipy" ,python2-scipy)
+ ("python-matplotlib" ,python2-matplotlib)))
+ (native-inputs
+ `(("python-mock" ,python2-mock) ; for tests
+ ("python-pytz" ,python2-pytz))) ; for tests
+ (home-page "https://miso.readthedocs.io/en/fastmiso/")
+ (synopsis "Mixture of Isoforms model for RNA-Seq isoform quantitation")
+ (description
+ "MISO (Mixture-of-Isoforms) is a probabilistic framework that quantitates
the expression level of alternatively spliced genes from RNA-Seq data, and
identifies differentially regulated isoforms or exons across samples. By
modeling the generative process by which reads are produced from isoforms in
RNA-Seq, the MISO model uses Bayesian inference to compute the probability
that a read originated from a particular isoform.")
- (license license:gpl2)))
+ (license license:gpl2))))
(define-public muscle
(package
@@ -5539,24 +5616,26 @@ program for nucleotide and protein sequences.")
(sha256
(base32
"1hkw21rq1mwf7xp0rmbb2gqc0i6p11108m69i7mr7xcjl268pxnb"))))
- (build-system gnu-build-system)
- (inputs
- ;; XXX: TODO: Enable Lua and Guile bindings.
- ;; https://github.com/tjunier/newick_utils/issues/13
- `(("libxml2" ,libxml2)
- ("flex" ,flex)
- ("bison" ,bison)))
- (native-inputs
- `(("autoconf" ,autoconf)
- ("automake" ,automake)
- ("libtool" ,libtool)))
- (synopsis "Programs for working with newick format phylogenetic trees")
- (description
- "Newick-utils is a suite of utilities for processing phylogenetic trees
+ (build-system gnu-build-system)
+ (arguments
+ '(#:make-flags (list "CFLAGS=-O2 -g -fcommon")))
+ (inputs
+ ;; XXX: TODO: Enable Lua and Guile bindings.
+ ;; https://github.com/tjunier/newick_utils/issues/13
+ `(("libxml2" ,libxml2)
+ ("flex" ,flex)
+ ("bison" ,bison)))
+ (native-inputs
+ `(("autoconf" ,autoconf)
+ ("automake" ,automake)
+ ("libtool" ,libtool)))
+ (synopsis "Programs for working with newick format phylogenetic trees")
+ (description
+ "Newick-utils is a suite of utilities for processing phylogenetic trees
in Newick format. Functions include re-rooting, extracting subtrees,
trimming, pruning, condensing, drawing (ASCII graphics or SVG).")
- (home-page "https://github.com/tjunier/newick_utils")
- (license license:bsd-3))))
+ (home-page "https://github.com/tjunier/newick_utils")
+ (license license:bsd-3))))
(define-public orfm
(package
@@ -5663,63 +5742,6 @@ which automatically learns an optimal warping function (or transformation) for
the phenotype as it models the data.")
(license license:asl2.0)))
-(define-public pbtranscript-tofu
- (let ((commit "8f5467fe6a4472bcfb4226c8720993c8507adfe4"))
- (package
- (name "pbtranscript-tofu")
- (version (string-append "2.2.3." (string-take commit 7)))
- (source (origin
- (method git-fetch)
- (uri (git-reference
- (url "https://github.com/PacificBiosciences/cDNA_primer")
- (commit commit)))
- (file-name (string-append name "-" version "-checkout"))
- (sha256
- (base32
- "1lgnpi35ihay42qx0b6yl3kkgra723i413j33kvs0kvs61h82w0f"))
- (modules '((guix build utils)))
- (snippet
- '(begin
- ;; remove bundled Cython sources
- (delete-file "pbtranscript-tofu/pbtranscript/Cython-0.20.1.tar.gz")
- #t))))
- (build-system python-build-system)
- (arguments
- `(#:python ,python-2
- ;; FIXME: Tests fail with "No such file or directory:
- ;; pbtools/pbtranscript/modified_bx_intervals/intersection_unique.so"
- #:tests? #f
- #:phases
- (modify-phases %standard-phases
- (add-after 'unpack 'enter-directory
- (lambda _
- (chdir "pbtranscript-tofu/pbtranscript/")
- #t))
- ;; With setuptools version 18.0 and later this setup.py hack causes
- ;; a build error, so we disable it.
- (add-after 'enter-directory 'patch-setuppy
- (lambda _
- (substitute* "setup.py"
- (("if 'setuptools.extension' in sys.modules:")
- "if False:"))
- #t)))))
- (inputs
- `(("python-numpy" ,python2-numpy)
- ("python-bx-python" ,python2-bx-python)
- ("python-networkx" ,python2-networkx)
- ("python-scipy" ,python2-scipy)
- ("python-pbcore" ,python2-pbcore)
- ("python-h5py" ,python2-h5py)))
- (native-inputs
- `(("python-cython" ,python2-cython)
- ("python-nose" ,python2-nose)))
- (home-page "https://github.com/PacificBiosciences/cDNA_primer")
- (synopsis "Analyze transcriptome data generated with the Iso-Seq protocol")
- (description
- "pbtranscript-tofu contains scripts to analyze transcriptome data
-generated using the PacBio Iso-Seq protocol.")
- (license license:bsd-3))))
-
(define-public prank
(package
(name "prank")
@@ -5737,30 +5759,27 @@ generated using the PacBio Iso-Seq protocol.")
`(#:phases
(modify-phases %standard-phases
(add-after 'unpack 'enter-src-dir
- (lambda _
- (chdir "src")
- #t))
+ (lambda _ (chdir "src")))
(add-after 'unpack 'remove-m64-flag
;; Prank will build with the correct 'bit-ness' without this flag
;; and this allows building on 32-bit machines.
- (lambda _ (substitute* "src/Makefile"
- (("-m64") ""))
- #t))
+ (lambda _
+ (substitute* "src/Makefile"
+ (("-m64") ""))))
(delete 'configure)
(replace 'install
- (lambda* (#:key outputs #:allow-other-keys)
+ (lambda* (#:key inputs outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))
(bin (string-append out "/bin"))
(man (string-append out "/share/man/man1"))
(path (string-append
- (assoc-ref %build-inputs "mafft") "/bin:"
- (assoc-ref %build-inputs "exonerate") "/bin:"
- (assoc-ref %build-inputs "bppsuite") "/bin")))
+ (assoc-ref inputs "mafft") "/bin:"
+ (assoc-ref inputs "exonerate") "/bin:"
+ (assoc-ref inputs "bppsuite") "/bin")))
(install-file "prank" bin)
(wrap-program (string-append bin "/prank")
`("PATH" ":" prefix (,path)))
- (install-file "prank.1" man))
- #t)))))
+ (install-file "prank.1" man)))))))
(inputs
`(("mafft" ,mafft)
("exonerate" ,exonerate)
@@ -5819,9 +5838,11 @@ predicts the locations of structural units in the sequences.")
(add-after 'install 'wrap-programs
(lambda* (#:key inputs outputs #:allow-other-keys)
(let ((path (getenv "PATH"))
- (out (assoc-ref outputs "out")))
+ (out (assoc-ref outputs "out"))
+ (guile (search-input-file inputs "bin/guile")))
(for-each (lambda (script)
- (wrap-script script `("PATH" ":" prefix (,path))))
+ (wrap-script script #:guile guile
+ `("PATH" ":" prefix (,path))))
(cons (string-append out "/bin/proteinortho")
(find-files out "\\.(pl|py)$"))))
#t)))))
@@ -5901,9 +5922,8 @@ different command-line tools:
(build-system gnu-build-system)
(arguments
`(#:tests? #f ; no check target
- #:make-flags (list (string-append "INSTALLDIR="
- (assoc-ref %outputs "out")
- "/bin"))
+ #:make-flags
+ ,#~(list (string-append "INSTALLDIR=" #$output "/bin"))
#:phases
(modify-phases %standard-phases
(delete 'configure))))
@@ -5979,7 +5999,7 @@ partial genes, and identifies translation initiation sites.")
(string-append out "/bin/roary-create_pan_genome_plots.R"))
(r-site-lib (getenv "R_LIBS_SITE"))
(coreutils-path
- (string-append (assoc-ref inputs "coreutils") "/bin")))
+ (dirname (search-input-file inputs "bin/chmod"))))
(wrap-program file
`("R_LIBS_SITE" ":" prefix
(,(string-append r-site-lib ":" out "/site-library/"))))
@@ -6077,7 +6097,7 @@ phylogenies.")
(define-public rsem
(package
(name "rsem")
- (version "1.3.1")
+ (version "1.3.3")
(source
(origin
(method git-fetch)
@@ -6085,38 +6105,46 @@ phylogenies.")
(url "https://github.com/deweylab/RSEM")
(commit (string-append "v" version))))
(sha256
- (base32 "1jlq11d1p8qp64w75yj8cnbbd1a93viq10pzsbwal7vdn8fg13j1"))
+ (base32 "1yl4i7z20n2p84j1lmk15aiak3yqc6fiw0q5a4pndw7pxfiq3rzp"))
(file-name (git-file-name name version))
(modules '((guix build utils)))
(snippet
'(begin
;; remove bundled copy of boost and samtools
(delete-file-recursively "boost")
- (delete-file-recursively "samtools-1.3")
- #t))))
+ (delete-file-recursively "samtools-1.3")))))
(build-system gnu-build-system)
(arguments
`(#:tests? #f ;no "check" target
#:make-flags
- (list (string-append "BOOST="
- (assoc-ref %build-inputs "boost")
- "/include/")
- (string-append "SAMHEADERS="
- (assoc-ref %build-inputs "htslib")
- "/include/htslib/sam.h")
- (string-append "SAMLIBS="
- (assoc-ref %build-inputs "htslib")
- "/lib/libhts.so"))
+ ,#~(list (string-append "BOOST="
+ #$(this-package-input "boost")
+ "/include/")
+ (string-append "SAMHEADERS="
+ #$(this-package-input "htslib")
+ "/include/htslib/sam.h")
+ (string-append "SAMLIBS="
+ #$(this-package-input "htslib")
+ "/lib/libhts.so"))
#:phases
(modify-phases %standard-phases
;; No "configure" script.
- ;; Do not build bundled samtools library.
(replace 'configure
(lambda _
(substitute* "Makefile"
(("^all : \\$\\(PROGRAMS\\).*") "all: $(PROGRAMS)\n")
- (("^\\$\\(SAMLIBS\\).*") ""))
- #t))
+ ;; Do not build bundled samtools library.
+ (("^\\$\\(SAMLIBS\\).*") "")
+ ;; Needed for Boost
+ (("gnu\\+\\+98") "gnu++11"))
+ ;; C++11 compatibility
+ (substitute* "buildReadIndex.cpp"
+ (("success = \\(getline")
+ "success = (bool)(getline"))
+ (substitute* '("PairedEndHit.h"
+ "SingleHit.h")
+ (("return \\(in>>sid>>pos")
+ "return (bool)(in>>sid>>pos"))))
(replace 'install
(lambda* (#:key outputs #:allow-other-keys)
(let* ((out (string-append (assoc-ref outputs "out")))
@@ -6127,8 +6155,7 @@ phylogenies.")
(for-each (lambda (file)
(install-file file bin))
(find-files "." "rsem-.*"))
- (install-file "rsem_perl_utils.pm" perl))
- #t))
+ (install-file "rsem_perl_utils.pm" perl))))
(add-after 'install 'wrap-program
(lambda* (#:key outputs #:allow-other-keys)
(let ((out (assoc-ref outputs "out")))
@@ -6143,8 +6170,7 @@ phylogenies.")
"rsem-plot-transcript-wiggles"
"rsem-prepare-reference"
"rsem-run-ebseq"
- "rsem-run-prsem-testing-procedure")))
- #t)))))
+ "rsem-run-prsem-testing-procedure"))))))))
(inputs
`(("boost" ,boost)
("r-minimal" ,r-minimal)
@@ -6197,67 +6223,55 @@ distribution, coverage uniformity, strand specificity, etc.")
(license license:gpl3+)))
(define-public seek
- ;; There are no release tarballs. According to the installation
- ;; instructions at http://seek.princeton.edu/installation.jsp, the latest
- ;; stable release is identified by this changeset ID.
- (let ((changeset "2329130")
+ ;; There are no release tarballs. And the installation instructions at
+ ;; http://seek.princeton.edu/installation.jsp only mention a mercurial
+ ;; changeset ID. This is a git repository, though. So we just take the
+ ;; most recent commit.
+ (let ((commit "196ed4c7633246e9c628e4330d77577ccfd7f1e5")
(revision "1"))
(package
(name "seek")
- (version (string-append "0-" revision "." changeset))
+ (version (git-version "1" revision commit))
(source (origin
- (method hg-fetch)
- (uri (hg-reference
- (url "https://bitbucket.org/libsleipnir/sleipnir")
- (changeset changeset)))
- (file-name (string-append name "-" version "-checkout"))
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/FunctionLab/sleipnir.git")
+ (commit commit)
+ (recursive? #true)))
+ (file-name (git-file-name name version))
(sha256
(base32
- "0qrvilwh18dpbhkf92qvxbmay0j75ra3jg2wrhz67gf538zzphsx"))))
- (build-system gnu-build-system)
+ "0c658n8nz563a96dsi4gl2685vxph0yfmmqq5yjc6i4xin1jy1ab"))))
+ (build-system cmake-build-system)
(arguments
- `(#:modules ((srfi srfi-1)
- (guix build gnu-build-system)
- (guix build utils))
+ `(#:configure-flags
+ ,#~(list (string-append "-DSVM_LIBRARY="
+ #$(this-package-input "libsvm")
+ "/lib/libsvm.so.2")
+ (string-append "-DSVM_INCLUDE="
+ #$(this-package-input "libsvm")
+ "/include"))
+ #:tests? #false ; tests only fail in the build container
#:phases
- (let ((dirs '("SeekMiner"
- "SeekEvaluator"
- "SeekPrep"
- "Distancer"
- "Data2DB"
- "PCL2Bin")))
- (modify-phases %standard-phases
- (replace 'bootstrap
- (lambda _
- (substitute* "gen_tools_am"
- (("/usr/bin/env.*") (which "perl")))
- (invoke "bash" "gen_auto")
- #t))
- (add-after 'build 'build-additional-tools
- (lambda* (#:key make-flags #:allow-other-keys)
- (for-each (lambda (dir)
- (with-directory-excursion (string-append "tools/" dir)
- (apply invoke "make" make-flags)))
- dirs)
- #t))
- (add-after 'install 'install-additional-tools
- (lambda* (#:key make-flags #:allow-other-keys)
- (for-each (lambda (dir)
- (with-directory-excursion (string-append "tools/" dir)
- (apply invoke `("make" ,@make-flags "install"))))
- dirs)
- #t))))))
+ (modify-phases %standard-phases
+ ;; The check phase expects to find the unit_tests executable in the
+ ;; "build/bin" directory, but it is actually in "build/tests".
+ (replace 'check
+ (lambda* (#:key tests? #:allow-other-keys)
+ (when tests?
+ (invoke "tests/unit_tests")))))))
(inputs
- `(("gsl" ,gsl)
+ `(("apache-thrift:include" ,apache-thrift "include")
+ ("apache-thrift:lib" ,apache-thrift "lib")
+ ("gsl" ,gsl)
("boost" ,boost)
- ("libsvm" ,libsvm)
- ("readline" ,readline)
("gengetopt" ,gengetopt)
- ("log4cpp" ,log4cpp)))
+ ("libsvm" ,libsvm)
+ ("log4cpp" ,log4cpp)
+ ("python" ,python)
+ ("readline" ,readline)))
(native-inputs
- `(("autoconf" ,autoconf)
- ("automake" ,automake)
- ("perl" ,perl)))
+ `(("pkg-config" ,pkg-config)))
(home-page "http://seek.princeton.edu")
(synopsis "Gene co-expression search engine")
(description
@@ -6356,6 +6370,69 @@ viewer.")
("python" ,python)
("zlib" ,zlib)))))
+(define-public samtools-1.2
+ (package (inherit samtools)
+ (name "samtools")
+ (version "1.2")
+ (source
+ (origin
+ (method url-fetch)
+ (uri
+ (string-append "mirror://sourceforge/samtools/samtools/"
+ version "/samtools-" version ".tar.bz2"))
+ (sha256
+ (base32
+ "1akdqb685pk9xk1nb6sa9aq8xssjjhvvc06kp4cpdqvz2157l3j2"))
+ (modules '((guix build utils)))
+ (snippet
+ ;; Delete bundled htslib and Windows binaries
+ '(for-each delete-file-recursively (list "win32" "htslib-1.2.1")))))
+ (arguments
+ `(#:make-flags
+ ,#~(list (string-append "prefix=" #$output)
+ (string-append "BGZIP="
+ #$(this-package-input "htslib")
+ "/bin/bgzip")
+ (string-append "HTSLIB="
+ #$(this-package-input "htslib")
+ "/lib/libhts.so")
+ (string-append "HTSDIR="
+ #$(this-package-input "htslib")
+ "/include"))
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'patch-makefile-curses
+ (lambda _
+ (substitute* "Makefile"
+ (("-lcurses") "-lncurses")
+ (("include \\$\\(HTSDIR.*") ""))))
+ (add-after 'unpack 'patch-tests
+ (lambda _
+ (substitute* "test/test.pl"
+ ;; The test script calls out to /bin/bash
+ (("/bin/bash") (which "bash"))
+ ;; There are two failing tests upstream relating to the "stats"
+ ;; subcommand in test_usage_subcommand ("did not have Usage"
+ ;; and "usage did not mention samtools stats"), so we disable
+ ;; them.
+ (("(test_usage_subcommand\\(.*\\);)" cmd)
+ (string-append "unless ($subcommand eq 'stats') {" cmd "};")))
+ ;; This test fails because the grep output doesn't look as
+ ;; expected; it is correct, though.
+ (substitute* "test/mpileup/mpileup.reg"
+ (("P 52.out.*") ""))))
+ (delete 'configure))))
+ (native-inputs
+ `(("grep" ,grep)
+ ("gawk" ,gawk)
+ ("pkg-config" ,pkg-config)))
+ (inputs
+ `(("htslib" ,htslib-for-samtools-1.2)
+ ("ncurses" ,ncurses)
+ ("perl" ,perl)
+ ("python" ,python)
+ ("zlib" ,zlib)))))
+
(define-public samtools-0.1
;; This is the most recent version of the 0.1 line of samtools. The input
;; and output formats differ greatly from that used and produced by samtools
@@ -6675,24 +6752,23 @@ accessed/downloaded on demand across HTTP.")
"plink-endian-detection.patch"))))
(build-system gnu-build-system)
(arguments
- '(#:tests? #f ;no "check" target
- #:make-flags (list (string-append "LIB_LAPACK="
- (assoc-ref %build-inputs "lapack")
- "/lib/liblapack.so")
- "WITH_LAPACK=1"
- "FORCE_DYNAMIC=1"
- ;; disable phoning home
- "WITH_WEBCHECK=")
+ `(#:tests? #f ;no "check" target
+ #:make-flags ,#~(list (string-append "LIB_LAPACK="
+ #$(this-package-input "lapack")
+ "/lib/liblapack.so")
+ "WITH_LAPACK=1"
+ "FORCE_DYNAMIC=1"
+ ;; disable phoning home
+ "WITH_WEBCHECK=")
#:phases
(modify-phases %standard-phases
;; no "configure" script
(delete 'configure)
(replace 'install
- (lambda* (#:key outputs #:allow-other-keys)
- (let ((bin (string-append (assoc-ref outputs "out")
- "/bin/")))
- (install-file "plink" bin)
- #t))))))
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let ((bin (string-append (assoc-ref outputs "out")
+ "/bin/")))
+ (install-file "plink" bin)))))))
(inputs
`(("zlib" ,zlib)
("lapack" ,lapack)))
@@ -6727,23 +6803,40 @@ subsequent visualization, annotation and storage of results.")
(base32 "1p88lz9agzjlspjhciz61qjc36cfniv4nkxszyy0njqyc5rzc0cd"))))
(build-system gnu-build-system)
(arguments
- `(#:tests? #f ;no "check" target
- #:make-flags (list "BLASFLAGS=-llapack -lopenblas"
- "CFLAGS=-Wall -O2 -DDYNAMIC_ZLIB=1"
- "ZLIB=-lz"
- "BIN=plink prettify"
- (string-append "CC=" ,(cc-for-target))
- (string-append "PREFIX=" (assoc-ref %outputs "out"))
- "DESTDIR=")
+ `(#:make-flags
+ ,#~(list "BLASFLAGS=-llapack -lopenblas"
+ "CFLAGS=-Wall -O2 -DDYNAMIC_ZLIB=1"
+ "ZLIB=-lz"
+ "BIN=plink prettify"
+ (string-append "CC=" #$(cc-for-target))
+ (string-append "PREFIX=" #$output)
+ "DESTDIR=")
#:phases
(modify-phases %standard-phases
(add-after 'unpack 'chdir
- (lambda _ (chdir "1.9") #t))
- (delete 'configure)))) ; no "configure" script
+ (lambda _ (chdir "1.9")))
+ (delete 'configure) ; no "configure" script
+ (replace 'check
+ (lambda* (#:key tests? inputs #:allow-other-keys)
+ (when tests?
+ (symlink "plink" "plink19")
+ (symlink (search-input-file inputs "/bin/plink") "plink107")
+ (setenv "PATH" (string-append (getcwd) ":" (getenv "PATH")))
+ (with-directory-excursion "tests"
+ ;; The model test fails because of a 0.0001 difference.
+ (substitute* "tests.py"
+ (("diff -q test1.model test2.model")
+ "echo yes"))
+ (invoke "bash" "test_setup.sh")
+ (invoke "python3" "tests.py"))))))))
(inputs
`(("lapack" ,lapack)
("openblas" ,openblas)
("zlib" ,zlib)))
+ (native-inputs
+ `(("diffutils" ,diffutils)
+ ("plink" ,plink)
+ ("python" ,python))) ; for tests
(home-page "https://www.cog-genomics.org/plink/")
(license license:gpl3+)))
@@ -6812,10 +6905,8 @@ structures, classes for genomic regions, mapped sequencing reads, etc.")
(sha256
(base32 "149x9xmk1wy1gff85325yfzqc0qk4sgp1w6gbyj9cnji4x1dszbl"))
(modules '((guix build utils)))
- (snippet '(begin
- ;; Remove bundled samtools.
- (delete-file-recursively "samtools")
- #t))))
+ ;; Remove bundled samtools.
+ (snippet '(delete-file-recursively "samtools"))))
(build-system gnu-build-system)
(arguments
`(#:tests? #f ;no "check" target
@@ -6823,16 +6914,15 @@ structures, classes for genomic regions, mapped sequencing reads, etc.")
(modify-phases %standard-phases
(delete 'configure))
#:make-flags
- (list (string-append "PREFIX="
- (assoc-ref %outputs "out"))
- (string-append "LIBBAM="
- (assoc-ref %build-inputs "samtools")
- "/lib/libbam.a")
- (string-append "SMITHLAB_CPP="
- (assoc-ref %build-inputs "smithlab-cpp")
- "/lib")
- "PROGS=preseq"
- "INCLUDEDIRS=$(SMITHLAB_CPP)/../include/smithlab-cpp $(SAMTOOLS_DIR)")))
+ ,#~(list (string-append "PREFIX=" #$output)
+ (string-append "LIBBAM="
+ #$(this-package-input "samtools")
+ "/lib/libbam.a")
+ (string-append "SMITHLAB_CPP="
+ #$(this-package-input "smithlab-cpp")
+ "/lib")
+ "PROGS=preseq"
+ "INCLUDEDIRS=$(SMITHLAB_CPP)/../include/smithlab-cpp $(SAMTOOLS_DIR)")))
(inputs
`(("gsl" ,gsl)
("samtools" ,samtools-0.1)
@@ -6862,25 +6952,6 @@ complexity samples.")
(base32
"148vcb7w2wr6a4w6vs2bsxanbqibxfk490zbcbg4m61s8669zdjx"))))
(build-system python-build-system)
- (arguments
- '(#:phases
- (modify-phases %standard-phases
- ;; Tests must be run after installation, as the "screed" command does
- ;; not exist right after building.
- (delete 'check)
- (add-after 'install 'check
- (lambda* (#:key inputs outputs #:allow-other-keys)
- (let ((out (assoc-ref outputs "out")))
- (setenv "PYTHONPATH"
- (string-append out "/lib/python"
- (string-take (string-take-right
- (assoc-ref inputs "python")
- 5) 3)
- "/site-packages:"
- (getenv "PYTHONPATH")))
- (setenv "PATH" (string-append out "/bin:" (getenv "PATH"))))
- (invoke "python" "setup.py" "test")
- #t)))))
(native-inputs
`(("python-pytest" ,python-pytest)
("python-pytest-cov" ,python-pytest-cov)
@@ -6916,19 +6987,19 @@ sequence itself can be retrieved from these databases.")
`(#:parallel-build? #f ; not supported
#:tests? #f ; no "check" target
#:make-flags
- (list (string-append "DEFAULT_CRT="
- (assoc-ref %build-inputs "ncbi-vdb")
- "/kfg/certs.kfg")
- (string-append "DEFAULT_KFG="
- (assoc-ref %build-inputs "ncbi-vdb")
- "/kfg/default.kfg")
- (string-append "VDB_LIBDIR="
- (assoc-ref %build-inputs "ncbi-vdb")
- ,(if (string-prefix? "x86_64"
- (or (%current-target-system)
- (%current-system)))
- "/lib64"
- "/lib32")))
+ ,#~(list (string-append "DEFAULT_CRT="
+ #$(this-package-input "ncbi-vdb")
+ "/kfg/certs.kfg")
+ (string-append "DEFAULT_KFG="
+ #$(this-package-input "ncbi-vdb")
+ "/kfg/default.kfg")
+ (string-append "VDB_LIBDIR="
+ #$(this-package-input "ncbi-vdb")
+ #$(if (string-prefix? "x86_64"
+ (or (%current-target-system)
+ (%current-system)))
+ "/lib64"
+ "/lib32")))
#:phases
(modify-phases %standard-phases
(add-before 'configure 'set-perl-search-path
@@ -7054,18 +7125,17 @@ bioinformatics file formats, sequence alignment, and more.")
(arguments
`(#:modules ((guix build utils))
#:builder
- (begin
- (use-modules (guix build utils))
- (let ((tar (assoc-ref %build-inputs "tar"))
- (xz (assoc-ref %build-inputs "xz"))
- (out (assoc-ref %outputs "out"))
- (doc (assoc-ref %outputs "doc")))
- (setenv "PATH" (string-append tar "/bin:" xz "/bin"))
- (invoke "tar" "xvf" (assoc-ref %build-inputs "source"))
- (chdir (string-append "seqan-library-" ,version))
- (copy-recursively "include" (string-append out "/include"))
- (copy-recursively "share" (string-append doc "/share"))
- #t))))
+ ,#~(begin
+ (use-modules (guix build utils))
+ (let ((tar #$(this-package-native-input "tar"))
+ (xz #$(this-package-native-input "xz"))
+ (out #$output)
+ (doc #$output:doc))
+ (setenv "PATH" (string-append tar "/bin:" xz "/bin"))
+ (invoke "tar" "xvf" #$(this-package-native-input "source"))
+ (chdir (string-append "seqan-library-" #$version))
+ (copy-recursively "include" (string-append out "/include"))
+ (copy-recursively "share" (string-append doc "/share"))))))
(native-inputs
`(("source" ,source)
("tar" ,tar)
@@ -7089,18 +7159,17 @@ bioinformatics file formats, sequence alignment, and more.")
(arguments
`(#:modules ((guix build utils))
#:builder
- (begin
- (use-modules (guix build utils))
- (let ((tar (assoc-ref %build-inputs "tar"))
- (bzip (assoc-ref %build-inputs "bzip2"))
- (out (assoc-ref %outputs "out"))
- (doc (assoc-ref %outputs "doc")))
- (setenv "PATH" (string-append tar "/bin:" bzip "/bin"))
- (invoke "tar" "xvf" (assoc-ref %build-inputs "source"))
- (chdir (string-append "seqan-library-" ,version))
- (copy-recursively "include" (string-append out "/include"))
- (copy-recursively "share" (string-append doc "/share"))
- #t))))
+ ,#~(begin
+ (use-modules (guix build utils))
+ (let ((tar #$(this-package-native-input "tar"))
+ (bzip #$(this-package-native-input "bzip2"))
+ (out #$output)
+ (doc #$output:doc))
+ (setenv "PATH" (string-append tar "/bin:" bzip "/bin"))
+ (invoke "tar" "xvf" #$(this-package-native-input "source"))
+ (chdir (string-append "seqan-library-" #$version))
+ (copy-recursively "include" (string-append out "/include"))
+ (copy-recursively "share" (string-append doc "/share"))))))
(native-inputs
`(("source" ,source)
("tar" ,tar)
@@ -7171,7 +7240,7 @@ optionally compressed by gzip.")
(define-public snap-aligner
(package
(name "snap-aligner")
- (version "1.0beta.18")
+ (version "2.0.0")
(source (origin
(method git-fetch)
(uri (git-reference
@@ -7180,20 +7249,21 @@ optionally compressed by gzip.")
(file-name (git-file-name name version))
(sha256
(base32
- "01w3qq4wm07z73vky0cfwlmrbf50n3w722cxrlzxfi99mnb808d8"))))
+ "0yag3jcazdqfxgmw0vbi91i98kj9sr0aqx83qqj6m5b45wxs7jms"))))
(build-system gnu-build-system)
(arguments
'(#:phases
(modify-phases %standard-phases
(delete 'configure)
- (replace 'check (lambda _ (invoke "./unit_tests") #t))
+ (replace 'check
+ (lambda* (#:key tests? #:allow-other-keys)
+ (when tests? (invoke "./unit_tests"))))
(replace 'install
(lambda* (#:key outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))
(bin (string-append out "/bin")))
(install-file "snap-aligner" bin)
- (install-file "SNAPCommand" bin)
- #t))))))
+ (install-file "SNAPCommand" bin)))))))
(native-inputs
`(("zlib" ,zlib)))
(home-page "http://snap.cs.berkeley.edu/")
@@ -7395,14 +7465,14 @@ sequences.")
(define-public subread
(package
(name "subread")
- (version "1.6.0")
+ (version "2.0.3")
(source (origin
(method url-fetch)
(uri (string-append "mirror://sourceforge/subread/subread-"
version "/subread-" version "-source.tar.gz"))
(sha256
(base32
- "0ah0n4jx6ksk2m2j7xk385x2qzmk1y4rfc6a4mfrdqrlq721w99i"))))
+ "0szmllia7jl0annk5568xjhw6cc8yj1c5mb961qk5m0lz6ig7kjn"))))
(build-system gnu-build-system)
(arguments
`(#:tests? #f ;no "check" target
@@ -7414,7 +7484,7 @@ sequences.")
(%current-system)))
(flags '("-ggdb" "-fomit-frame-pointer"
"-ffast-math" "-funroll-loops"
- "-fmessage-length=0"
+ "-fmessage-length=0" "-fcommon"
"-O9" "-Wall" "-DMAKE_FOR_EXON"
"-DMAKE_STANDALONE"
"-DSUBREAD_VERSION=\\\"${SUBREAD_VERSION}\\\""))
@@ -7427,17 +7497,16 @@ sequences.")
#:phases
(modify-phases %standard-phases
(add-after 'unpack 'enter-dir
- (lambda _ (chdir "src") #t))
+ (lambda _ (chdir "src")))
(replace 'install
(lambda* (#:key outputs #:allow-other-keys)
(let ((bin (string-append (assoc-ref outputs "out") "/bin/")))
(mkdir-p bin)
- (copy-recursively "../bin" bin))
- #t))
+ (copy-recursively "../bin" bin))))
;; no "configure" script
(delete 'configure))))
(inputs `(("zlib" ,zlib)))
- (home-page "http://bioinf.wehi.edu.au/subread-package/")
+ (home-page "http://subread.sourceforge.net/")
(synopsis "Tool kit for processing next-gen sequencing data")
(description
"The subread package contains the following tools: subread aligner, a
@@ -7512,7 +7581,7 @@ Cuffdiff or Ballgown programs.")
(define-public taxtastic
(package
(name "taxtastic")
- (version "0.8.11")
+ (version "0.9.2")
(source (origin
;; The Pypi version does not include tests.
(method git-fetch)
@@ -7522,15 +7591,13 @@ Cuffdiff or Ballgown programs.")
(file-name (git-file-name name version))
(sha256
(base32
- "1sv8mkg64jn7zdwf1jj71c16686yrwxk0apb1l8sjszy9p166g0p"))))
+ "1k6wg9ych1j3srnhdny1y4470qlhfg730rb3rm3pq7l7gw62vmgb"))))
(build-system python-build-system)
(arguments
`(#:phases
(modify-phases %standard-phases
(add-after 'unpack 'prepare-directory
(lambda _
- ;; The git checkout must be writable for tests.
- (for-each make-file-writable (find-files "."))
;; This test fails, but the error is not caught by the test
;; framework, so the tests fail...
(substitute* "tests/test_taxit.py"
@@ -7539,18 +7606,16 @@ Cuffdiff or Ballgown programs.")
;; This version file is expected to be created with git describe.
(mkdir-p "taxtastic/data")
(with-output-to-file "taxtastic/data/ver"
- (lambda () (display ,version)))
- #t))
- (add-after 'unpack 'python37-compatibility
- (lambda _
- (substitute* "taxtastic/utils.py"
- (("import csv") "import csv, errno")
- (("os.errno") "errno"))
- #t))
+ (lambda () (display ,version)))))
(replace 'check
;; Note, this fails to run with "-v" as it tries to write to a
;; closed output stream.
- (lambda _ (invoke "python" "-m" "unittest") #t)))))
+ (lambda* (#:key tests? #:allow-other-keys)
+ (when tests?
+ (invoke "python" "-m" "unittest"))))
+ ;; This fails because it cannot find psycopg2 even though it is
+ ;; available.
+ (delete 'sanity-check))))
(propagated-inputs
`(("python-sqlalchemy" ,python-sqlalchemy)
("python-decorator" ,python-decorator)
@@ -7585,11 +7650,11 @@ profiles, and associated taxonomic information.")
(build-system gnu-build-system)
(arguments
`(#:tests? #f ; no "check" target
- #:make-flags (list
- "CFLAGS=-O2" ; override "-m64" flag
- (string-append "PREFIX=" (assoc-ref %outputs "out"))
- (string-append "MANDIR=" (assoc-ref %outputs "out")
- "/share/man/man1"))))
+ #:make-flags
+ ,#~(list
+ "CFLAGS=-O2" ; override "-m64" flag
+ (string-append "PREFIX=" #$output)
+ (string-append "MANDIR=" #$output "/share/man/man1"))))
(native-inputs
`(("pkg-config" ,pkg-config)))
(inputs
@@ -8200,10 +8265,11 @@ experience substantial biological insertions and deletions.")
(delete 'configure)
(delete 'build)
(replace 'install
- (lambda* (#:key outputs #:allow-other-keys)
+ (lambda* (#:key inputs outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))
(bin (string-append out "/bin"))
- (scripts (find-files "." "prinseq.*.pl")))
+ (scripts (find-files "." "prinseq.*.pl"))
+ (guile (search-input-file inputs "bin/guile")))
(substitute* scripts
(("\"perl -pe")
(string-append "\"" (which "perl") " -pe")))
@@ -8211,6 +8277,7 @@ experience substantial biological insertions and deletions.")
(chmod file #o555)
(install-file file bin)
(wrap-script (string-append bin "/" (basename file))
+ #:guile guile
`("PERL5LIB" ":" prefix
(,(getenv "PERL5LIB")))))
scripts)))))))
@@ -8264,10 +8331,10 @@ data. It also generates basic statistics for your sequences.")
,(version-major+minor
(package-version python))
"/site-packages"))
- (pythonpath (getenv "PYTHONPATH"))
+ (pythonpath (getenv "GUIX_PYTHONPATH"))
(script (string-append out "/bin/shorah")))
(chmod script #o555)
- (wrap-program script `("PYTHONPATH" ":" prefix (,site ,pythonpath))))))
+ (wrap-program script `("GUIX_PYTHONPATH" ":" prefix (,site ,pythonpath))))))
(add-after 'wrap-programs 'check
(lambda* (#:key tests? #:allow-other-keys)
(when tests?
@@ -8639,8 +8706,8 @@ factors bound at the specific regions.")
(build-system gnu-build-system)
(arguments
`(#:configure-flags
- (list (string-append "--with-hpdf="
- (assoc-ref %build-inputs "libharu")))
+ ,#~(list (string-append "--with-hpdf="
+ #$(this-package-input "libharu")))
#:phases
(modify-phases %standard-phases
(add-after 'unpack 'fix-checks
@@ -8759,21 +8826,19 @@ intervals (e.g. genes, sequence alignments).")
(lambda* (#:key inputs #:allow-other-keys)
(for-each (lambda (file)
(install-file file "./src/smithlab_cpp/"))
- (find-files (assoc-ref inputs "smithlab-cpp")))
- #t))
+ (find-files (assoc-ref inputs "smithlab-cpp")))))
(add-after 'install 'install-to-store
(lambda* (#:key outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))
(bin (string-append out "/bin")))
(for-each (lambda (file)
(install-file file bin))
- (find-files "bin" ".*")))
- #t)))
+ (find-files "bin" ".*"))))))
#:configure-flags
- (list (string-append "--with-bam_tools_headers="
- (assoc-ref %build-inputs "bamtools") "/include/bamtools")
- (string-append "--with-bam_tools_library="
- (assoc-ref %build-inputs "bamtools") "/lib/bamtools"))))
+ ,#~(list (string-append "--with-bam_tools_headers="
+ #$(this-package-input "bamtools") "/include/bamtools")
+ (string-append "--with-bam_tools_library="
+ #$(this-package-input "bamtools") "/lib/bamtools"))))
(inputs
`(("bamtools" ,bamtools)
("samtools" ,samtools-0.1)
@@ -8885,8 +8950,12 @@ replacement for strverscmp.")
;; ModuleNotFoundError: No module named 'multiqc.modules.ccs'
(delete-file "/tmp/tests/unit_tests/test_ccs.py")
(with-directory-excursion "/tmp/tests"
- (setenv "PYTHONPATH" (string-append here ":" (getenv "PYTHONPATH")))
- (invoke "python" "-munittest" "discover")))))))))
+ (setenv "GUIX_PYTHONPATH"
+ (string-append here ":" (getenv "GUIX_PYTHONPATH")))
+ (invoke "python" "-munittest" "discover"))))))
+ ;; TODO: importing the picard and gatk modules fails for unknown
+ ;; reasons.
+ (delete 'sanity-check))))
(propagated-inputs
`(("python-click" ,python-click)
("python-coloredlogs" ,python-coloredlogs)
@@ -9116,21 +9185,18 @@ communication networks from scRNA-seq data.")
(lambda _
(substitute* "Makefile"
;; We use ldc2 instead of ldmd2 to compile sambamba.
- (("\\$\\(shell which ldmd2\\)") (which "ldc2")))
- #t))
+ (("\\$\\(shell which ldmd2\\)") (which "ldc2")))))
(add-after 'unpack 'unbundle-prerequisites
(lambda _
(substitute* "Makefile"
(("= lz4/lib/liblz4.a") "= -L-llz4")
- (("ldc_version_info lz4-static") "ldc_version_info"))
- #t))
+ (("ldc_version_info lz4-static") "ldc_version_info"))))
(replace 'install
(lambda* (#:key outputs #:allow-other-keys)
(let ((bin (string-append (assoc-ref outputs "out") "/bin")))
(mkdir-p bin)
(copy-file (string-append "bin/sambamba-" ,version)
- (string-append bin "/sambamba"))
- #t))))))
+ (string-append bin "/sambamba"))))))))
(native-inputs
`(("python" ,python)))
(inputs
@@ -9304,7 +9370,8 @@ matplotlib.use('Agg')
" line)))
;; Make sure GESS has all modules in its path
(wrap-script (string-append target "GESS.py")
- `("PYTHONPATH" ":" = (,target ,(getenv "PYTHONPATH"))))
+ #:guile (search-input-file inputs "bin/guile")
+ `("GUIX_PYTHONPATH" ":" = (,target ,(getenv "GUIX_PYTHONPATH"))))
(mkdir-p bin)
(symlink (string-append target "GESS.py")
(string-append bin "GESS.py"))
@@ -9329,7 +9396,7 @@ exon-skipping scanner detection scheme.")
(define-public phylip
(package
(name "phylip")
- (version "3.696")
+ (version "3.697")
(source
(origin
(method url-fetch)
@@ -9337,16 +9404,16 @@ exon-skipping scanner detection scheme.")
"download/phylip-" version ".tar.gz"))
(sha256
(base32
- "01jar1rayhr2gba2pgbw49m56rc5z4p5wn3ds0m188hrlln4a2nd"))))
+ "1h8h0nafnlbqryswxgplx80k2044yhfz97jh13vsgzlaifqdh9ls"))))
(build-system gnu-build-system)
(arguments
`(#:tests? #f ; no check target
- #:make-flags (list "-f" "Makefile.unx" "install")
+ #:make-flags (list "-f" "Makefile.unx" "CFLAGS=-fcommon" "install")
#:parallel-build? #f ; not supported
#:phases
(modify-phases %standard-phases
(add-after 'unpack 'enter-dir
- (lambda _ (chdir "src") #t))
+ (lambda _ (chdir "src")))
(delete 'configure)
(replace 'install
(lambda* (#:key inputs outputs #:allow-other-keys)
@@ -9355,8 +9422,7 @@ exon-skipping scanner detection scheme.")
(mkdir-p target)
(for-each (lambda (file)
(install-file file target))
- (find-files "../exe" ".*")))
- #t)))))
+ (find-files "../exe" ".*"))))))))
(home-page "http://evolution.genetics.washington.edu/phylip/")
(synopsis "Tools for inferring phylogenies")
(description "PHYLIP (the PHYLogeny Inference Package) is a package of
@@ -9377,9 +9443,7 @@ programs for inferring phylogenies (evolutionary trees).")
"05hsrnkpkajppa3f45x4qsarnkj616hlby749zxg4is3bv4i6b5y"))))
(build-system cmake-build-system)
(arguments
- `( ;; CMake 3.17 or newer is required for the CMAKE_TEST_ARGUMENTS used
- ;; below to have an effect.
- #:cmake ,cmake
+ `(#:tests? #false ; The test suite is notoriously fickle
#:configure-flags
(let ((disabled-tests
'("expensive" ;exclude expensive tests
@@ -9431,66 +9495,72 @@ applications for tackling some common problems in a user-friendly way.")
(license (list license:lgpl2.1+
license:gpl3+))))
+;; We use this seemingly arbitrary commit because of
+;; https://github.com/3DGenomes/TADbit/issues/371
(define-public tadbit
- (package
- (name "tadbit")
- (version "1.0.1")
- (source (origin
- (method git-fetch)
- (uri (git-reference
- (url "https://github.com/3DGenomes/TADbit")
- (commit (string-append "v" version))))
- (file-name (git-file-name name version))
- (sha256
- (base32
- "0hqrlymh2a2bimcfdvlssy1x5h1lp3h1c5a7jj11hmcqczzqn3ni"))))
- (build-system python-build-system)
- (arguments
- `(#:phases
- (modify-phases %standard-phases
- (add-after 'unpack 'fix-problems-with-setup.py
- (lambda* (#:key outputs #:allow-other-keys)
- ;; Don't attempt to install the bash completions to
- ;; the home directory.
- (rename-file "extras/.bash_completion"
- "extras/tadbit")
- (substitute* "setup.py"
- (("\\(path.expanduser\\('~'\\)")
- (string-append "(\""
- (assoc-ref outputs "out")
- "/etc/bash_completion.d\""))
- (("extras/\\.bash_completion")
- "extras/tadbit"))
- #t))
- (replace 'check
- (lambda* (#:key inputs outputs #:allow-other-keys)
- (add-installed-pythonpath inputs outputs)
- (invoke "python3" "test/test_all.py")
- #t)))))
- (native-inputs
- `(("glib" ,glib "bin") ;for gtester
- ("pkg-config" ,pkg-config)))
- (inputs
- ;; TODO: add Chimera for visualization
- `(("imp" ,imp)
- ("mcl" ,mcl)
- ("python-future" ,python-future)
- ("python-h5py" ,python-h5py)
- ("python-scipy" ,python-scipy)
- ("python-numpy" ,python-numpy)
- ("python-matplotlib" ,python-matplotlib)
- ("python-pysam" ,python-pysam)))
- (home-page "https://3dgenomes.github.io/TADbit/")
- (synopsis "Analyze, model, and explore 3C-based data")
- (description
- "TADbit is a complete Python library to deal with all steps to analyze,
+ (let ((commit "5c4c1ddaadfbaf7e6edc58173e46d801093bdc9b")
+ (revision "1"))
+ (package
+ (name "tadbit")
+ (version (git-version "1.0.1" revision commit))
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/3DGenomes/TADbit")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "17nwlvjgqpa7x6jgh56m3di61ynaz34kl1jamyv7r2a5rhfcbkla"))))
+ (build-system python-build-system)
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'fix-problems-with-setup.py
+ (lambda* (#:key outputs #:allow-other-keys)
+ (substitute* "src/test/Makefile"
+ (("^CFLAGS=") "CFLAGS= -fcommon"))
+
+ ;; Don't attempt to install the bash completions to
+ ;; the home directory.
+ (rename-file "extras/.bash_completion"
+ "extras/tadbit")
+ (substitute* "setup.py"
+ (("\\(path.expanduser\\('~'\\)")
+ (string-append "(\""
+ (assoc-ref outputs "out")
+ "/etc/bash_completion.d\""))
+ (("extras/\\.bash_completion")
+ "extras/tadbit"))))
+ (replace 'check
+ (lambda* (#:key tests? inputs outputs #:allow-other-keys)
+ (when tests?
+ (add-installed-pythonpath inputs outputs)
+ (invoke "python3" "test/test_all.py")))))))
+ (native-inputs
+ `(("glib" ,glib "bin") ;for gtester
+ ("pkg-config" ,pkg-config)))
+ (inputs
+ ;; TODO: add Chimera for visualization
+ `(("imp" ,imp)
+ ("mcl" ,mcl)
+ ("python-future" ,python-future)
+ ("python-h5py" ,python-h5py)
+ ("python-scipy" ,python-scipy)
+ ("python-numpy" ,python-numpy)
+ ("python-matplotlib" ,python-matplotlib)
+ ("python-pysam" ,python-pysam)))
+ (home-page "https://3dgenomes.github.io/TADbit/")
+ (synopsis "Analyze, model, and explore 3C-based data")
+ (description
+ "TADbit is a complete Python library to deal with all steps to analyze,
model, and explore 3C-based data. With TADbit the user can map FASTQ files to
obtain raw interaction binned matrices (Hi-C like matrices), normalize and
correct interaction matrices, identify and compare the so-called
@dfn{Topologically Associating Domains} (TADs), build 3D models from the
interaction matrices, and finally, extract structural properties from the
models. TADbit is complemented by TADkit for visualizing 3D models.")
- (license license:gpl3+)))
+ (license license:gpl3+))))
(define-public kentutils
(package
@@ -9628,9 +9698,7 @@ browser.")
(modules '((guix build utils)))
;; Remove bundled Java library archives.
(snippet
- '(begin
- (for-each delete-file (find-files "lib" ".*"))
- #t))))
+ '(for-each delete-file (find-files "lib" ".*")))))
(build-system ant-build-system)
(arguments
`(#:tests? #f ; no tests included
@@ -9647,15 +9715,18 @@ browser.")
(substitute* "bin/linux/fseq"
(("java") (which "java"))
(("\\$REALDIR/../lib/commons-cli-1.1.jar")
- (string-append (assoc-ref inputs "java-commons-cli")
- "/share/java/commons-cli.jar"))
+ (search-input-file inputs
+ (string-append "/lib/m2/commons-cli/commons-cli/"
+ ,(package-version java-commons-cli)
+ "/commons-cli-"
+ ,(package-version java-commons-cli)
+ ".jar")))
(("REALDIR=.*")
(string-append "REALDIR=" bin "\n")))
(install-file "README.txt" doc)
(install-file "bin/linux/fseq" bin)
(install-file "build~/fseq.jar" lib)
- (copy-recursively "lib" lib)
- #t))))))
+ (copy-recursively "lib" lib)))))))
(inputs
`(("perl" ,perl)
("java-commons-cli" ,java-commons-cli)))
@@ -9797,15 +9868,14 @@ straight away. Its main features are:
(build-system gnu-build-system)
(arguments
`(#:tests? #f ; there are no tests
- #:make-flags '("CC=gcc")
+ #:make-flags '("CC=gcc" "CFLAGS=-fcommon -O3")
#:phases
(modify-phases %standard-phases
(replace 'configure
(lambda _
(substitute* "src/BFdriver.c"
(("/bin/bash") (which "bash")))
- (chdir "src")
- #t))
+ (chdir "src")))
(replace 'install
(lambda* (#:key outputs #:allow-other-keys)
(let ((tools '("baseml" "basemlg" "codeml"
@@ -9815,8 +9885,7 @@ straight away. Its main features are:
"/share/doc/paml")))
(mkdir-p bin)
(for-each (lambda (file) (install-file file bin)) tools)
- (copy-recursively "../doc" docdir)
- #t))))))
+ (copy-recursively "../doc" docdir)))))))
(home-page "http://abacus.gene.ucl.ac.uk/software/paml.html")
(synopsis "Phylogentic analysis by maximum likelihood")
(description "PAML (for Phylogentic Analysis by Maximum Likelihood)
@@ -9962,31 +10031,29 @@ dependency like SeqAn.")
(base32
"1amcc5hqvsl42hg4x19bi9vy47cl874s0lw1fmi0hwsdk9i8c03v"))
(modules '((guix build utils)))
+ ;; Delete bundled headers for eigen3.
(snippet
- '(begin
- ;; Delete bundled headers for eigen3.
- (delete-file-recursively "include/eigen3/")
- #t))))
+ '(delete-file-recursively "include/eigen3/"))))
(build-system cmake-build-system)
(arguments
`(#:configure-flags
- (list (string-append "-DBOOST_INCLUDEDIR="
- (assoc-ref %build-inputs "boost")
- "/include/")
- (string-append "-DBOOST_LIBRARYDIR="
- (assoc-ref %build-inputs "boost")
- "/lib/")
- (string-append "-DBoost_LIBRARIES="
- "-lboost_iostreams "
- "-lboost_filesystem "
- "-lboost_system "
- "-lboost_thread "
- "-lboost_timer "
- "-lboost_chrono "
- "-lboost_program_options")
- "-DBoost_FOUND=TRUE"
- ;; Don't download RapMap---we already have it!
- "-DFETCHED_RAPMAP=1")
+ ,#~(list (string-append "-DBOOST_INCLUDEDIR="
+ #$(this-package-input "boost")
+ "/include/")
+ (string-append "-DBOOST_LIBRARYDIR="
+ #$(this-package-input "boost")
+ "/lib/")
+ (string-append "-DBoost_LIBRARIES="
+ "-lboost_iostreams "
+ "-lboost_filesystem "
+ "-lboost_system "
+ "-lboost_thread "
+ "-lboost_timer "
+ "-lboost_chrono "
+ "-lboost_program_options")
+ "-DBoost_FOUND=TRUE"
+ ;; Don't download RapMap---we already have it!
+ "-DFETCHED_RAPMAP=1")
;; Tests must be run after installation and the location of the test
;; data file must be overridden. But the tests fail. It looks like
;; they are not really meant to be run.
@@ -9997,30 +10064,22 @@ dependency like SeqAn.")
(add-after 'unpack 'do-not-look-for-boost
(lambda* (#:key inputs #:allow-other-keys)
(substitute* "CMakeLists.txt"
- (("find_package\\(Boost 1\\.53\\.0") "#"))
- #t))
+ (("find_package\\(Boost 1\\.53\\.0") "#"))))
(add-after 'unpack 'do-not-assign-to-macro
(lambda _
(substitute* "include/spdlog/details/format.cc"
- (("const unsigned CHAR_WIDTH = 1;") ""))
- #t))
+ (("const unsigned CHAR_WIDTH = 1;") ""))))
(add-after 'unpack 'prepare-rapmap
(lambda* (#:key inputs #:allow-other-keys)
(let ((src "external/install/src/rapmap/")
(include "external/install/include/rapmap/")
(rapmap (assoc-ref inputs "rapmap")))
- (mkdir-p "/tmp/rapmap")
- (invoke "tar" "xf"
- (assoc-ref inputs "rapmap")
- "-C" "/tmp/rapmap"
- "--strip-components=1")
(mkdir-p src)
(mkdir-p include)
(for-each (lambda (file)
(install-file file src))
- (find-files "/tmp/rapmap/src" "\\.(c|cpp)"))
- (copy-recursively "/tmp/rapmap/include" include))
- #t))
+ (find-files (string-append rapmap "/src") "\\.(c|cpp)"))
+ (copy-recursively (string-append rapmap "/include") include))))
(add-after 'unpack 'use-system-libraries
(lambda* (#:key inputs #:allow-other-keys)
(substitute* '("src/SailfishIndexer.cpp"
@@ -10035,17 +10094,18 @@ dependency like SeqAn.")
(("#include \"jellyfish/config.h\"") ""))
(substitute* "src/CMakeLists.txt"
(("\\$\\{GAT_SOURCE_DIR\\}/external/install/include/jellyfish-2.2..")
- (string-append (assoc-ref inputs "jellyfish")
- "/include/jellyfish-" ,(package-version jellyfish)))
+ (search-input-directory
+ inputs
+ (string-append "/include/jellyfish-" ,(package-version jellyfish))))
(("\\$\\{GAT_SOURCE_DIR\\}/external/install/lib/libjellyfish-2.0.a")
- (string-append (assoc-ref inputs "jellyfish")
- "/lib/libjellyfish-2.0.a"))
+ (search-input-file inputs
+ "/lib/libjellyfish-2.0.a"))
(("\\$\\{GAT_SOURCE_DIR\\}/external/install/lib/libdivsufsort.a")
- (string-append (assoc-ref inputs "libdivsufsort")
- "/lib/libdivsufsort.so"))
+ (search-input-file inputs
+ "/lib/libdivsufsort.so"))
(("\\$\\{GAT_SOURCE_DIR\\}/external/install/lib/libdivsufsort64.a")
- (string-append (assoc-ref inputs "libdivsufsort")
- "/lib/libdivsufsort64.so")))
+ (search-input-file inputs
+ "/lib/libdivsufsort64.so")))
(substitute* "CMakeLists.txt"
;; Don't prefer static libs
(("SET\\(CMAKE_FIND_LIBRARY_SUFFIXES.*") "")
@@ -10057,10 +10117,10 @@ dependency like SeqAn.")
;; Ensure that Eigen headers can be found
(setenv "CPLUS_INCLUDE_PATH"
- (string-append (assoc-ref inputs "eigen")
- "/include/eigen3:"
- (or (getenv "CPLUS_INCLUDE_PATH") "")))
- #t)))))
+ (string-append (search-input-directory
+ inputs "/include/eigen3")
+ ":"
+ (or (getenv "CPLUS_INCLUDE_PATH") ""))))))))
(inputs
`(("boost" ,boost)
("eigen" ,eigen)
@@ -10081,11 +10141,10 @@ dependency like SeqAn.")
(snippet
'(begin (delete-file-recursively "include/spdlog")
(for-each delete-file '("include/xxhash.h"
- "src/xxhash.c"))
- #t))))
+ "src/xxhash.c"))))))
("libdivsufsort" ,libdivsufsort)
("libgff" ,libgff)
- ("tbb" ,tbb)
+ ("tbb" ,tbb-2020)
("zlib" ,zlib)))
(native-inputs
`(("pkg-config" ,pkg-config)))
@@ -10142,7 +10201,7 @@ The following file formats are supported:
(define-public salmon
(package
(name "salmon")
- (version "1.4.0")
+ (version "1.6.0")
(source (origin
(method git-fetch)
(uri (git-reference
@@ -10151,7 +10210,7 @@ The following file formats are supported:
(file-name (git-file-name name version))
(sha256
(base32
- "1di7y2s8cjr9480lngcmaz3wcabc1lpkyanzbhir1nkhcjmj70h4"))
+ "1wb5wl0rc77svbwq6zvak5h7pf9acw3di0vz5i3gqyhg5l6qd736"))
(modules '((guix build utils)))
(snippet
;; Delete bundled headers for eigen3.
@@ -10159,14 +10218,15 @@ The following file formats are supported:
(build-system cmake-build-system)
(arguments
`(#:configure-flags
- (list (string-append "-Dlibgff_DIR="
- (assoc-ref %build-inputs "libgff") "/lib")
- "-Dlibgff_FOUND=TRUE"
- "-DTBB_FOUND=TRUE"
- "-DTBB_VERSION=2020.3"
- "-DTBB_LIBRARIES=tbb -ltbbmalloc"
- "-DFETCHED_PUFFERFISH=TRUE"
- "-DUSE_SHARED_LIBS=TRUE")
+ ,#~(list (string-append "-Dlibgff_DIR="
+ #$(this-package-input "libgff") "/lib")
+ "-DCMAKE_CXX_FLAGS=\"-DHAVE_NUMERIC_LIMITS128=1\""
+ "-Dlibgff_FOUND=TRUE"
+ "-DTBB_FOUND=TRUE"
+ #$(string-append "-DTBB_VERSION=" (package-version tbb-2020))
+ "-DTBB_LIBRARIES=tbb -ltbbmalloc"
+ "-DFETCHED_PUFFERFISH=TRUE"
+ "-DUSE_SHARED_LIBS=TRUE")
#:phases
(modify-phases %standard-phases
(add-after 'unpack 'prepare-pufferfish
@@ -10256,8 +10316,8 @@ The following file formats are supported:
(file-name (git-file-name "pufferfish" version))
(sha256
(base32
- "0qb4a2nl1d59qasr17sslgxnkjd5kbk5mns4cjshrmsvkrqp995n"))))
- ("tbb" ,tbb)
+ "0jakgpbanl6cs23x3g26iab54p7zylcf9v8vc32ps57smp8wql52"))))
+ ("tbb" ,tbb-2020)
("libstadenio-for-salmon" ,libstadenio-for-salmon)
("xz" ,xz)
("zlib" ,zlib)))
@@ -10293,11 +10353,7 @@ variational inference.")
(modify-phases %standard-phases
(replace 'check
(lambda _
- (setenv "PYTHONPATH"
- (string-append (getcwd) ":"
- (getenv "PYTHONPATH")))
- (invoke "pytest" "tests")
- #t)))))
+ (invoke "pytest" "tests"))))))
(propagated-inputs
`(("python-h5py" ,python-h5py)
("python-numpy" ,python-numpy)
@@ -10773,8 +10829,7 @@ contains
(snippet
'(begin
(for-each delete-file (find-files "jar/lib" "\\.jar$"))
- (delete-file-recursively "3rdParty")
- #t))))
+ (delete-file-recursively "3rdParty")))))
(build-system ant-build-system)
(arguments
`(#:tests? #f ; test data are not included
@@ -10783,9 +10838,9 @@ contains
#:source-dir "public/src/"
#:jdk ,icedtea-8
#:make-flags
- (list (string-append "-Dpicard.executable.dir="
- (assoc-ref %build-inputs "java-picard")
- "/share/java/"))
+ (list ,#~(string-append "-Dpicard.executable.dir="
+ #$(this-package-input "java-picard")
+ "/share/java/"))
#:modules ((ice-9 match)
(srfi srfi-1)
(guix build utils)
@@ -10811,8 +10866,7 @@ contains
(for-each (lambda (jar)
(symlink jar (string-append "jar/lib/" (basename jar))))
(append-map (lambda (dir) (find-files dir "\\.jar$"))
- dirs)))
- #t))
+ dirs)))))
;; There is no installation target
(replace 'install
(lambda* (#:key inputs outputs #:allow-other-keys)
@@ -10855,8 +10909,7 @@ contains
scripts)
(("^java") (which "java"))
(("jar_deploy_dir=.*")
- (string-append "jar_deploy_dir=" share "\n"))))
- #t))
+ (string-append "jar_deploy_dir=" share "\n"))))))
;; FIXME: We do this after stripping jars because we don't want it to
;; copy all these jars and strip them. We only want to install
;; links. Arguably, this is a problem with the ant-build-system.
@@ -10868,8 +10921,7 @@ contains
(for-each (lambda (jar)
(symlink (readlink jar)
(string-append lib (basename jar))))
- (find-files "jar/lib" "\\.jar$")))
- #t)))))
+ (find-files "jar/lib" "\\.jar$"))))))))
(inputs
`(("jdk" ,icedtea-8)
("java-picard" ,java-picard-2.10.3)
@@ -10930,8 +10982,8 @@ once. This package provides tools to perform Drop-seq analyses.")
(lambda* (#:key inputs #:allow-other-keys)
(setenv "TZ" "UTC+1")
(setenv "TZDIR"
- (string-append (assoc-ref inputs "tzdata")
- "/share/zoneinfo")))))))
+ (search-input-directory inputs
+ "share/zoneinfo")))))))
(inputs
`(("coreutils" ,coreutils)
("sed" ,sed)
@@ -11094,8 +11146,8 @@ in an easily configurable manner.")
(lambda* (#:key inputs #:allow-other-keys)
(setenv "TZ" "UTC+1")
(setenv "TZDIR"
- (string-append (assoc-ref inputs "tzdata")
- "/share/zoneinfo")))))))
+ (search-input-directory inputs
+ "share/zoneinfo")))))))
(native-inputs
`(("tzdata" ,tzdata)
("automake" ,automake)
@@ -11349,11 +11401,12 @@ enrichment.")
(license license:expat)))
(define-public mantis
- (let ((commit "4ffd171632c2cb0056a86d709dfd2bf21bc69b84")
- (revision "1"))
+ ;; This is an arbitrary commit as a year has passed since 0.1 was tagged.
+ (let ((commit "b6979a269172a45201c8366680d8b889f889432b")
+ (revision "2"))
(package
(name "mantis")
- (version (git-version "0" revision commit))
+ (version (git-version "0.1" revision commit))
(source (origin
(method git-fetch)
(uri (git-reference
@@ -11362,13 +11415,17 @@ enrichment.")
(file-name (git-file-name name version))
(sha256
(base32
- "0iqbr0dhmlc8mzpirmm2s4pkzkwdgrcx50yx6cv3wlr2qi064p55"))))
+ "0dq8a785hnaxx5kq757m5czs8xpcjpcph1inq2nm8h6zfvqyj8xs"))))
(build-system cmake-build-system)
- (arguments '(#:tests? #f)) ; there are none
+ (arguments
+ '(#:tests? #f ; there are none
+ #:configure-flags (list "-DNH=ON"))) ; do not use SSE4.2 instructions
(inputs
`(("sdsl-lite" ,sdsl-lite)
("openssl" ,openssl)
("zlib" ,zlib)))
+ (native-inputs
+ `(("gcc" ,gcc-7)))
(home-page "https://github.com/splatlab/mantis")
(synopsis "Large-scale sequence-search index data structure")
(description "Mantis is a space-efficient data structure that can be
@@ -11403,9 +11460,9 @@ analyses in addition to large-scale sequence-level searches.")
(arguments
`(#:tests? #f ; requires a 1.4G test file
#:make-flags
- (list (string-append "SAMTOOLS_DIR="
- (assoc-ref %build-inputs "samtools")
- "/lib/"))
+ ,#~(list (string-append "SAMTOOLS_DIR="
+ #$(this-package-input "samtools")
+ "/lib/"))
#:phases
(modify-phases %standard-phases
(replace 'configure
@@ -11414,16 +11471,14 @@ analyses in addition to large-scale sequence-level searches.")
(("-I \\$\\{SAMTOOLS_DIR\\}")
(string-append "-I" (assoc-ref inputs "samtools")
"/include/samtools"))
- (("-lz ") "-lz -lpthread "))
- #t))
+ (("-lz ") "-lz -lpthread "))))
(replace 'install
(lambda* (#:key outputs #:allow-other-keys)
(for-each (lambda (tool)
(install-file tool
(string-append (assoc-ref outputs "out")
"/bin")))
- '("j_count" "b_count" "sjcount"))
- #t)))))
+ '("j_count" "b_count" "sjcount")))))))
(inputs
`(("samtools" ,samtools-0.1)
("zlib" ,zlib)))
@@ -11695,8 +11750,8 @@ and many lower level support classes.
;; The test suite attempts to execute ../test-driver, which does not exist.
`(#:tests? #false
#:configure-flags
- (list (string-append "--with-libmaus2="
- (assoc-ref %build-inputs "libmaus2")))))
+ ,#~(list (string-append "--with-libmaus2="
+ #$(this-package-input "libmaus2")))))
(inputs
`(("libmaus2" ,libmaus2)
("xerces-c" ,xerces-c)))
@@ -11860,11 +11915,11 @@ conversions, region filtering, FASTA sequence extraction and more.")
(lambda* (#:key outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))
(bin (string-append out "/bin"))
- (path (getenv "PYTHONPATH")))
+ (path (getenv "GUIX_PYTHONPATH")))
(for-each (lambda (script)
(install-file script bin)
(wrap-program (string-append bin "/" script)
- `("PYTHONPATH" ":" prefix (,path))))
+ `("GUIX_PYTHONPATH" ":" prefix (,path))))
'("cmp_bed.py"
"find_circ.py"
"maxlength.py"
@@ -11948,7 +12003,7 @@ implementation differs in these ways:
(define-public python-scanpy
(package
(name "python-scanpy")
- (version "1.8.1")
+ (version "1.8.2")
(source
(origin
(method git-fetch)
@@ -11958,7 +12013,7 @@ implementation differs in these ways:
(file-name (git-file-name name version))
(sha256
(base32
- "0w1qmv3djqi8q0sn5hv34ivzs157fwjjb9nflfnagnhpxmw8vx5g"))))
+ "14zax23lqinv7xyv3491vpl3ydi38naiwaxg5mkfs5zk2406cqdr"))))
(build-system python-build-system)
(arguments
`(#:phases
@@ -12004,7 +12059,7 @@ implementation differs in these ways:
(setenv "PYTHONPATH"
(string-append (getcwd) ":"
(assoc-ref inputs "python-anndata:source") ":"
- (getenv "PYTHONPATH")))
+ (getenv "GUIX_PYTHONPATH")))
(invoke "pytest" "-vv"
"-k"
;; Plot tests that fail.
@@ -12015,6 +12070,7 @@ implementation differs in these ways:
" and not test_scatter_embedding_add_outline_vmin_vmax_norm"
" and not test_paga"
" and not test_paga_compare"
+ " and not test_clustermap"
;; These try to connect to the network
" and not test_plot_rank_genes_groups_gene_symbols"
@@ -12073,11 +12129,19 @@ million cells.")
"1jbsh01f57zj4bhvjr3jh4532zznqd6nccmgrl3qi9gnhkf7c4y0"))))
(build-system python-build-system)
(arguments
- `(#:tests? #f)) ; TODO: Enable after migration to scikit-learn.
+ `(#:tests? #f ; no tests are included
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'do-not-fail-to-find-sklearn
+ (lambda _
+ ;; XXX: I have no idea why it cannot seem to find sklearn.
+ (substitute* "setup.py"
+ (("'sklearn'") "")))))))
(propagated-inputs
`(("python-annoy" ,python-annoy)
("python-cython" ,python-cython)
("python-numpy" ,python-numpy)
+ ("python-scikit-learn" ,python-scikit-learn)
("python-scipy" ,python-scipy)
("python-umap-learn" ,python-umap-learn)))
(home-page "https://github.com/Teichlab/bbknn")
@@ -12256,9 +12320,9 @@ reference transcripts provided in a annotation file (also in GTF/GFF3 format).
(base32 "0rgv6q5fl4x5d74n6p5wvdna6zmbdbqpb4jqqh6vq3670gn08xad"))))
(build-system gnu-build-system)
(arguments
- '(#:tests? #f ; No tests.
- #:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
- "DESTDIR=\"\"")
+ `(#:tests? #f ; No tests.
+ #:make-flags
+ ,#~(list (string-append "PREFIX=" #$output) "DESTDIR=\"\"")
#:phases
(modify-phases %standard-phases
(delete 'configure)))) ; There is no configure phase.
@@ -12409,7 +12473,7 @@ fasta subsequences.")
`(("python-asciitree" ,python-asciitree)
("python-biopython" ,python-biopython)
("python-click" ,python-click)
- ("python-cytoolz" ,python-cytoolz)
+ ("python-cytoolz" ,python-cytoolz-for-cooler)
("python-dask" ,python-dask)
("python-h5py" ,python-h5py)
("python-multiprocess" ,python-multiprocess)
@@ -12964,17 +13028,13 @@ datasets.")
(add-after 'install 'link-tools
(lambda* (#:key inputs outputs #:allow-other-keys)
(let ((bin (string-append (assoc-ref outputs "out") "/bin/")))
- (symlink (string-append (assoc-ref inputs "prodigal")
- "/bin/prodigal")
+ (symlink (search-input-file inputs "/bin/prodigal")
(string-append bin "ngless-" ,version "-prodigal"))
- (symlink (string-append (assoc-ref inputs "minimap2")
- "/bin/minimap2")
+ (symlink (search-input-file inputs "/bin/minimap2")
(string-append bin "ngless-" ,version "-minimap2"))
- (symlink (string-append (assoc-ref inputs "samtools")
- "/bin/samtools")
+ (symlink (search-input-file inputs "/bin/samtools")
(string-append bin "ngless-" ,version "-samtools"))
- (symlink (string-append (assoc-ref inputs "bwa")
- "/bin/bwa")
+ (symlink (search-input-file inputs "/bin/bwa")
(string-append bin "ngless-" ,version "-bwa"))
#t))))))
(inputs
@@ -13114,10 +13174,10 @@ phase + query phase).")
(add-after 'install 'wrap-program
(lambda* (#:key inputs outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))
- (path (getenv "PYTHONPATH")))
+ (path (getenv "GUIX_PYTHONPATH")))
(wrap-program (string-append out
"/share/filtlong/scripts/histogram.py")
- `("PYTHONPATH" ":" prefix (,path))))
+ `("GUIX_PYTHONPATH" ":" prefix (,path))))
#t))
(add-before 'check 'patch-tests
(lambda _
@@ -13173,10 +13233,9 @@ choosing which reads pass the filter.")
(add-after 'unpack 'find-eigen
(lambda* (#:key inputs #:allow-other-keys)
(setenv "CPATH"
- (string-append (assoc-ref inputs "eigen")
- "/include/eigen3:"
- (or (getenv "CPATH") "")))
- #t))
+ (string-append
+ (search-input-directory inputs "/include/eigen3")
+ ":" (or (getenv "CPATH") "")))))
(delete 'configure)
(replace 'install
(lambda* (#:key outputs #:allow-other-keys)
@@ -13189,16 +13248,18 @@ choosing which reads pass the filter.")
(find-files "scripts" ".*"))
#t)))
(add-after 'install 'wrap-programs
- (lambda* (#:key outputs #:allow-other-keys)
- (let ((pythonpath (getenv "PYTHONPATH"))
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (let ((pythonpath (getenv "GUIX_PYTHONPATH"))
(perl5lib (getenv "PERL5LIB"))
(scripts (string-append (assoc-ref outputs "out")
- "/share/nanopolish/scripts")))
+ "/share/nanopolish/scripts"))
+ (guile (search-input-file inputs "bin/guile")))
(for-each (lambda (file)
- (wrap-program file `("PYTHONPATH" ":" prefix (,pythonpath))))
+ (wrap-program file `("GUIX_PYTHONPATH" ":" prefix (,pythonpath))))
(find-files scripts "\\.py"))
(for-each (lambda (file)
- (wrap-script file `("PERL5LIB" ":" prefix (,perl5lib))))
+ (wrap-script file #:guile guile
+ `("PERL5LIB" ":" prefix (,perl5lib))))
(find-files scripts "\\.pl"))))))))
(inputs
`(("guile" ,guile-3.0) ; for wrappers
@@ -13263,7 +13324,7 @@ Torrent.")
(define-public python-pyfit-sne
(package
(name "python-pyfit-sne")
- (version "1.0.1")
+ (version "1.2.1")
(source
(origin
(method git-fetch)
@@ -13272,8 +13333,9 @@ Torrent.")
(commit version)))
(file-name (git-file-name name version))
(sha256
- (base32 "13wh3qkzs56azmmgnxib6xfr29g7xh09sxylzjpni5j0pp0rc5qw"))))
+ (base32 "0f3n7wcmxbnqiisgimhpa6p5chqpb1hj69i6rpg2hv2671i8nn68"))))
(build-system python-build-system)
+ (arguments '(#:tests? #false)) ; there are none
(propagated-inputs
`(("python-numpy" ,python-numpy)))
(inputs
@@ -13306,9 +13368,9 @@ is a Cython wrapper for FIt-SNE.")
`(#:build-target "dist"
#:tests? #f ; there are none
#:make-flags
- (list (string-append "-Dmpijar="
- (assoc-ref %build-inputs "java-openmpi")
- "/lib/mpi.jar"))
+ ,#~(list (string-append "-Dmpijar="
+ #$(this-package-input "java-openmpi")
+ "/lib/mpi.jar"))
#:modules ((guix build ant-build-system)
(guix build utils)
(guix build java-utils))
@@ -13382,8 +13444,7 @@ to an artifact/contaminant file.")
(snippet
'(begin
(delete-file "Manual.pdf")
- (delete-file-recursively "third-party")
- #t))))
+ (delete-file-recursively "third-party")))))
(build-system gnu-build-system)
(arguments
`(#:make-flags '("OPENMP=t")
@@ -13394,8 +13455,7 @@ to an artifact/contaminant file.")
(add-after 'unpack 'fix-zlib-include
(lambda _
(substitute* "src/binarySequences.c"
- (("../third-party/zlib-1.2.3/zlib.h") "zlib.h"))
- #t))
+ (("../third-party/zlib-1.2.3/zlib.h") "zlib.h"))))
(replace 'install
(lambda* (#:key outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))
@@ -13406,14 +13466,14 @@ to an artifact/contaminant file.")
(install-file "velveth" bin)
(install-file "velvetg" bin)
(install-file "Manual.pdf" doc)
- (install-file "Columbus_manual.pdf" doc)
- #t))))))
+ (install-file "Columbus_manual.pdf" doc)))))))
(inputs
`(("openmpi" ,openmpi)
("zlib" ,zlib)))
(native-inputs
- `(("texlive" ,(texlive-union (list texlive-latex-graphics
- texlive-latex-hyperref)))))
+ `(("texlive" ,(texlive-updmap.cfg (list texlive-latex-graphics
+ texlive-fonts-ec
+ texlive-hyperref)))))
(home-page "https://www.ebi.ac.uk/~zerbino/velvet/")
(synopsis "Nucleic acid sequence assembler for very short reads")
(description
@@ -13434,7 +13494,11 @@ repeated areas between contigs.")
(uri (pypi-uri "velocyto" version))
(sha256
(base32
- "0fgygyzqgrq32dv6a00biq1p1cwi6kbl5iqblxq1kklj6b2mzmhs"))))
+ "0fgygyzqgrq32dv6a00biq1p1cwi6kbl5iqblxq1kklj6b2mzmhs"))
+ (modules '((guix build utils)))
+ ;; Delete generated C files.
+ (snippet
+ '(for-each delete-file (find-files "." "\\.c")))))
(build-system python-build-system)
(native-inputs
`(("python-joblib" ,python-joblib)))
@@ -13539,9 +13603,9 @@ tools which build on STAR, Arriba does not require to reduce the
"1nf3ki5pfzalhrx2fr1y6pfqfi133yj2m7q4fj9irf5fb94bapwr"))))
(build-system gnu-build-system)
(arguments
- `(#:make-flags (list "COLOR_BUILD=no"
- (string-append "PREFIX="
- (assoc-ref %outputs "out")))
+ `(#:make-flags
+ ,#~(list "COLOR_BUILD=no"
+ (string-append "PREFIX=" #$output))
#:test-target "test"
#:phases
(modify-phases %standard-phases
@@ -13651,7 +13715,7 @@ let before_space s =
#:findlib ,ocaml4.07-findlib))
(inputs
`(("zlib" ,zlib "static")
- ("gsl" ,gsl)
+ ("gsl" ,gsl-static)
("ocaml-ounit" ,(package-with-ocaml4.07 ocaml-ounit))
("ocaml-batteries" ,(package-with-ocaml4.07 ocaml-batteries))
("ocaml-camlzip" ,(package-with-ocaml4.07 camlzip))
@@ -13809,11 +13873,11 @@ on the needs of the user.")
(build-system gnu-build-system)
(arguments
`(#:make-flags
- (list (string-append "prefix=" (assoc-ref %outputs "out"))
- (string-append "BOOST_ROOT="
- (assoc-ref %build-inputs "boost"))
- (string-append "HTSLIB_ROOT="
- (assoc-ref %build-inputs "htslib")))
+ ,#~(list (string-append "prefix=" #$output)
+ (string-append "BOOST_ROOT="
+ #$(this-package-input "boost"))
+ (string-append "HTSLIB_ROOT="
+ #$(this-package-input "htslib")))
#:test-target "test"
#:phases
(modify-phases %standard-phases
@@ -13946,8 +14010,8 @@ and reflect the fast5 file schema, and tools to convert between
(license license:mpl2.0)))
(define-public tbsp
- (let ((commit "ec8fff4410cfb13a677dbbb95cbbc60217e64907")
- (revision "1"))
+ (let ((commit "dc30c03868233c5504299c9cb0d7b2064ba9cb41")
+ (revision "2"))
(package
(name "tbsp")
(version (git-version "1.0.0" revision commit))
@@ -13960,15 +14024,22 @@ and reflect the fast5 file schema, and tools to convert between
(file-name (git-file-name name version))
(sha256
(base32
- "025ym14x8gbd6hb55lsinqj6f5qzw36i10klgs7ldzxxd7s39ki1"))))
+ "1im0bik2hxkcb7jzkcxp5nqb30hd8lfraxml6i5ik52j6z3qqln1"))))
(build-system python-build-system)
- (arguments '(#:tests? #f)) ; no tests included
+ (arguments
+ '(#:tests? #f ; no tests included
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'relax-requirements
+ (lambda _
+ (substitute* "setup.py"
+ ((", <3.0") ""))))))) ; matplotlib
(inputs
`(("python-matplotlib" ,python-matplotlib)
("python-networkx" ,python-networkx)
("python-numpy" ,python-numpy)
("python-pybigwig" ,python-pybigwig)
- ("python-biopython" ,python-biopython)
+ ("python-biopython" ,python-biopython-1.73)
("python-scikit-learn" ,python-scikit-learn)
("python-scipy" ,python-scipy)))
(home-page "https://github.com/phoenixding/tbsp/")
@@ -14176,8 +14247,9 @@ combinatorial configurations.\", G. Ehrlich - Journal of the ACM (JACM),
(replace 'install
(lambda* (#:key outputs #:allow-other-keys)
(let ((bin (string-append (assoc-ref outputs "out") "/bin")))
- (install-file "fsom" bin))
- #t)))))
+ (install-file "fsom" bin)))))))
+ (native-inputs
+ `(("gcc" ,gcc-6)))
(home-page "https://github.com/ekg/fsom")
(synopsis "Manage SOM (Self-Organizing Maps) neural networks")
(description "A tiny C library for managing SOM (Self-Organizing Maps)
@@ -14545,9 +14617,9 @@ patterns.")
(arguments
`(#:test-target "test"
#:make-flags
- (list "CC=gcc"
- (string-append "prefix="
- (assoc-ref %outputs "out") "/bin/"))
+ ,#~(list "CC=gcc"
+ "CFLAGS=-fcommon"
+ (string-append "prefix=" #$output "/bin/"))
#:phases
(modify-phases %standard-phases
(replace 'configure
@@ -14555,8 +14627,7 @@ patterns.")
(substitute* "Makefile"
(("-lhts ") "-lhts -lBigWig ")
(("install MethylDackel \\$\\(prefix\\)" match)
- (string-append "install -d $(prefix); " match)))
- #t)))))
+ (string-append "install -d $(prefix); " match))))))))
(inputs
`(("curl" ,curl) ; XXX: needed by libbigwig
("htslib" ,htslib-1.9)
@@ -14593,8 +14664,8 @@ containing the reference genome as well.")
(build-system gnu-build-system)
(arguments
`(#:make-flags
- (list "CC=gcc"
- (string-append "DESTDIR=" (assoc-ref %outputs "out")))
+ ,#~(list "CC=gcc"
+ (string-append "DESTDIR=" #$output))
#:phases
(modify-phases %standard-phases
(replace 'configure
@@ -14748,13 +14819,13 @@ The output is in SAM format.")
(arguments
`(#:test-target "test"
#:configure-flags
- (list "-DWITH_CHECK=ON"
- (string-append "-DLIBXML_LIBRARY="
- (assoc-ref %build-inputs "libxml2")
- "/lib/libxml2.so")
- (string-append "-DLIBXML_INCLUDE_DIR="
- (assoc-ref %build-inputs "libxml2")
- "/include/libxml2"))))
+ ,#~(list "-DWITH_CHECK=ON"
+ (string-append "-DLIBXML_LIBRARY="
+ #$(this-package-input "libxml2")
+ "/lib/libxml2.so")
+ (string-append "-DLIBXML_INCLUDE_DIR="
+ #$(this-package-input "libxml2")
+ "/include/libxml2"))))
(propagated-inputs
`(("libxml2" ,libxml2)))
(native-inputs
@@ -14786,9 +14857,9 @@ international community.")
(build-system gnu-build-system)
(arguments
`(#:tests? #false ; there are none
- #:make-flags (list "-C" "src"
- (string-append "KRAKEN2_DIR="
- (assoc-ref %outputs "out") "/bin"))
+ #:make-flags
+ ,#~(list "-C" "src"
+ (string-append "KRAKEN2_DIR=" #$output "/bin"))
#:phases
(modify-phases %standard-phases
(delete 'configure)
@@ -15075,7 +15146,7 @@ large-scale data-analysis.")
(string-append ":" out
"/lib/perl5/site_perl"))
pl)
- (for-each (cut wrap <> "PYTHONPATH") py))))))))
+ (for-each (cut wrap <> "GUIX_PYTHONPATH") py))))))))
(inputs
`(("libgd" ,gd)
("perl-gd" ,perl-gd)
@@ -15355,13 +15426,18 @@ for the analysis and visualization of raw nanopore signal.")
(arguments
`(#:phases
(modify-phases %standard-phases
+ (add-after 'unpack 'patch-sample-script
+ (lambda _
+ ;; Add Python 3 compatibility to this sample script.
+ (substitute* "scripts/vcf_sample_filter.py"
+ (("print (.*)\n" _ arg)
+ (string-append "print(" arg ")\n")))))
(add-after 'install 'remove-installed-tests
;; Do not install test files.
(lambda* (#:key inputs outputs #:allow-other-keys)
(delete-file-recursively (string-append
(site-packages inputs outputs)
- "vcf/test"))
- #t)))))
+ "/vcf/test")))))))
(native-inputs `(("python-cython" ,python-cython)))
(propagated-inputs
`(("python-pysam" ,python-pysam)
@@ -15593,8 +15669,21 @@ sequences")
(method url-fetch)
(uri (pypi-uri "bwapy" version))
(sha256
- (base32 "090qwx3vl729zn3a7sksbviyg04kc71gpbm3nd8dalqp673x1npw"))))
+ (base32 "090qwx3vl729zn3a7sksbviyg04kc71gpbm3nd8dalqp673x1npw"))
+ (modules '((guix build utils)))
+ (snippet
+ '(for-each delete-file (find-files "." "\\.o$")))))
(build-system python-build-system)
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'relax-requirements
+ (lambda _
+ (substitute* "setup.py"
+ (("wheel>=0.34") "wheel>=0.30"))))
+ ;; TODO: it's possible that the import error points to a real
+ ;; problem with the C sources.
+ (delete 'sanity-check))))
(propagated-inputs
`(("python-cffi" ,python-cffi)
("python-setuptools" ,python-setuptools)
diff --git a/gnu/packages/bison.scm b/gnu/packages/bison.scm
index 4c6da7d9b7..252cd56c15 100644
--- a/gnu/packages/bison.scm
+++ b/gnu/packages/bison.scm
@@ -1,7 +1,7 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2012, 2013, 2015, 2019 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
-;;; Copyright © 2019 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2019, 2020, 2021 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2020 B. Wilson <elaexuotee@wilsonb.com>
;;; Copyright © 2020 Jakub Kądziołka <kuba@kadziolka.net>
;;;
@@ -33,7 +33,7 @@
(define-public bison
(package
(name "bison")
- (version "3.5.3")
+ (version "3.7.6")
(source
(origin
(method url-fetch)
@@ -41,7 +41,7 @@
version ".tar.xz"))
(sha256
(base32
- "1i57hbczvr8674z73775jxdd3y59qggs5lmfd60gmwm5i1gmpy1b"))))
+ "1kzkxrd3z4262k2sbxmyh9k5g5r2lakw0gv44l2hb4i1wbhqrmk7"))))
(build-system gnu-build-system)
(arguments
'(;; Building in parallel on many-core systems may cause an error such as
@@ -68,17 +68,6 @@ simple tools through complex programming languages.
Bison also provides an implementation of @command{yacc}, as specified by POSIX.")
(license gpl3+)))
-(define-public bison-3.6
- (package
- (inherit bison)
- (version "3.6.3")
- (source
- (origin
- (method url-fetch)
- (uri (string-append "mirror://gnu/bison/bison-" version ".tar.xz"))
- (sha256
- (base32 "0gdpnjh6ra9xa9vj6hzjdf0c04x4pjyy8vssm3qdb7fya4v7knq6"))))))
-
(define-public bison-3.0
(package
(inherit bison)
diff --git a/gnu/packages/bittorrent.scm b/gnu/packages/bittorrent.scm
index e014136c44..3f69d7e8d2 100644
--- a/gnu/packages/bittorrent.scm
+++ b/gnu/packages/bittorrent.scm
@@ -8,7 +8,7 @@
;;; Copyright © 2017 Jelle Licht <jlicht@fsfe.org>
;;; Copyright © 2018 Fis Trivial <ybbs.daans@hotmail.com>
;;; Copyright © 2018 Nam Nguyen <namn@berkeley.edu>
-;;; Copyright © 2018 Ricardo Wurmus <rekado@elephly.net>
+;;; Copyright © 2018, 2021 Ricardo Wurmus <rekado@elephly.net>
;;; Copyright © 2019, 2020 Brett Gilio <brettg@gnu.org>
;;; Copyright © 2020 Hartmut Goebel <h.goebel@crazy-compilers.com>
;;; Copyright © 2021 Justin Veilleux <terramorpha@cock.li>
@@ -93,6 +93,10 @@
(list (string-append "--localedir="
(assoc-ref %outputs "gui")
"/share/locale"))
+ ;; Some tests segfault when using libevent 2.12 without internet
+ ;; connection. This has been reported mainstream but not fixed yet:
+ ;; https://github.com/transmission/transmission/issues/1437.
+ #:tests? #f
#:glib-or-gtk-wrap-excluded-outputs '("out")
#:phases
(modify-phases %standard-phases
@@ -147,17 +151,16 @@ DHT, µTP, PEX and Magnet Links.")
(define-public transmission-remote-gtk
(package
(name "transmission-remote-gtk")
- (version "1.4.1")
+ (version "1.4.2")
(source
(origin
(method url-fetch)
(uri (string-append "https://github.com/transmission-remote-gtk/"
"transmission-remote-gtk/releases/download/"
version "/transmission-remote-gtk-" version
- ".tar.xz"))
- (patches (search-patches "transmission-remote-gtk-fix-appstream.patch"))
+ ".tar.gz"))
(sha256
- (base32 "1aqjl5rgamgcgqvcldd1gzyfh2xci0m7070924d6vz2qln0q75sr"))))
+ (base32 "0qz9wi70qc6vgnaymivc3xz6y86c9hglk6wjv3snnqxpxmp9saay"))))
(build-system gnu-build-system)
(native-inputs
`(("gettext" ,gnu-gettext)
@@ -363,6 +366,8 @@ Aria2 can be manipulated via built-in JSON-RPC and XML-RPC interfaces.")
(sha256
(base32 "0dlrjhnm1pg2vwmp7nl2xv1aia5hyirb3021rl46x859k63zap24"))))
(build-system gnu-build-system)
+ (arguments
+ `(#:configure-flags '("CFLAGS=-fcommon")))
(inputs
`(("curl" ,curl)
("gtk+" ,gtk+)
@@ -434,8 +439,7 @@ and will take advantage of multiple processor cores where possible.")
(base32 "0gwm4w7337ykh5lfnspapnnz6a35g7yay3wnj126s8s5kcsvy9wy"))))
(build-system cmake-build-system)
(arguments
- `(#:cmake ,cmake ;3.17 or later
- #:configure-flags '("-Dpython-bindings=ON"
+ `(#:configure-flags '("-Dpython-bindings=ON"
"-Dbuild_tests=ON")
#:phases
(modify-phases %standard-phases
diff --git a/gnu/packages/boost.scm b/gnu/packages/boost.scm
index 19556dfdf9..440728caea 100644
--- a/gnu/packages/boost.scm
+++ b/gnu/packages/boost.scm
@@ -3,17 +3,19 @@
;;; Copyright © 2014, 2015, 2018 Mark H Weaver <mhw@netris.org>
;;; Copyright © 2015 Andreas Enge <andreas@enge.fr>
;;; Copyright © 2016 Eric Bavier <bavier@member.fsf.org>
-;;; Copyright © 2015, 2019, 2020 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2015, 2019, 2020, 2021 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2017 Thomas Danckaert <post@thomasdanckaert.be>
;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
;;; Copyright © 2018 Arun Isaac <arunisaac@systemreboot.net>
;;; Copyright © 2018, 2019, 2021 Ricardo Wurmus <rekado@elephly.net>
-;;; Copyright © 2018 Maxim Cournoyer <maxim.cournoyer@gmail.com>
+;;; Copyright © 2018, 2020 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;; Copyright © 2018, 2020 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2019 Mathieu Othacehe <m.othacehe@gmail.com>
;;; Copyright © 2019, 2020 Giacomo Leidi <goodoldpaul@autistici.org>
;;; Copyright © 2020 Marius Bakke <mbakke@fastmail.com>
;;; Copyright © 2020 Jonathan Brielmaier <jonathan.brielmaier@web.de>
+;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
+;;; Copyright © 2021 Greg Hogan <code@greghogan.com>
;;; Copyright © 2021 Franck Pérignon <franck.perignon@univ-grenoble-alpes.fr>
;;; Copyright © 2021 Greg Hogan <code@greghogan.com>
;;;
@@ -65,21 +67,15 @@
(define-public boost
(package
(name "boost")
- (version "1.72.0")
+ (version "1.77.0")
(source (origin
(method url-fetch)
(uri (string-append "https://boostorg.jfrog.io/artifactory/main/release/"
version "/source/boost_"
(version-with-underscores version) ".tar.bz2"))
- (patches
- (list (boost-patch
- ;; 1.72.0 was released with a faulty coroutine submodule:
- ;; <https://github.com/boostorg/coroutine/issues/46>.
- "0001-revert-cease-dependence-on-range.patch" version
- "1zcqxzh56m1s635wqwk15j3zcs2gmjvjy2f0hid7i78s4pgm0yfs")))
(sha256
(base32
- "08h7cv61fd0lzb4z50xanfqn0pdgvizjrpd1kcdgj725pisb5jar"))))
+ "0m08hhk3l7zvzajyk39qlw566q3fhixayhc2j11328qf0gy8b7zw"))))
(build-system gnu-build-system)
(inputs `(("icu4c" ,icu4c)
("zlib" ,zlib)))
@@ -87,7 +83,7 @@
`(("perl" ,perl)
,@(if (%current-target-system)
'()
- `(("python" ,python-wrapper)))
+ `(("python" ,python-minimal-wrapper)))
("tcsh" ,tcsh)))
(arguments
`(#:imported-modules ((guix build python-build-system)
@@ -128,8 +124,7 @@
(out (assoc-ref outputs "out")))
(substitute* '("libs/config/configure"
"libs/spirit/classic/phoenix/test/runtest.sh"
- "tools/build/src/engine/execunix.cpp"
- "tools/build/src/engine/Jambase")
+ "tools/build/src/engine/execunix.cpp")
(("/bin/sh") (which "sh")))
(setenv "SHELL" (which "sh"))
@@ -144,13 +139,9 @@
'())
;; Change an #ifdef __MACH__ that really targets macOS.
- ;; TODO: Inline this on the next rebuild cycle.
- ,@(if (hurd-target?)
- '((substitute* "boost/test/utils/timer.hpp"
- (("defined\\(__MACH__\\)")
- "(defined __MACH__ && !defined __GNU__)"))
- #t)
- '())
+ (substitute* "boost/test/utils/timer.hpp"
+ (("defined\\(__MACH__\\)")
+ "(defined __MACH__ && !defined __GNU__)"))
(invoke "./bootstrap.sh"
(string-append "--prefix=" out)
@@ -192,8 +183,7 @@
(symlink libboost_pythonNN.so
(string-append "libboost_python"
(string-take python-version 1)
- ".so")))
- #t))))))))
+ ".so")))))))))))
(home-page "https://www.boost.org")
(synopsis "Peer-reviewed portable C++ source libraries")
@@ -247,8 +237,7 @@ across a broad spectrum of applications.")
(let ((gcc (assoc-ref (or native-inputs inputs) "gcc")))
(setenv "CPLUS_INCLUDE_PATH"
(string-join
- (cons (string-append (assoc-ref inputs "libcxx")
- "/include/c++/v1")
+ (cons (search-input-directory inputs "/include/c++/v1")
;; Hide GCC's C++ headers so that they do not interfere with
;; the Clang headers.
(delete (string-append gcc "/include/c++")
@@ -262,7 +251,7 @@ across a broad spectrum of applications.")
(lambda* (#:key inputs outputs #:allow-other-keys)
(let ((icu (assoc-ref inputs "icu4c"))
(out (assoc-ref outputs "out"))
- (sh (string-append (assoc-ref inputs "bash") "/bin/sh")))
+ (sh (search-input-file inputs "/bin/sh")))
(substitute* '("libs/config/configure"
"libs/spirit/classic/phoenix/test/runtest.sh"
"tools/build/src/engine/execunix.c"
@@ -288,6 +277,9 @@ 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")
diff --git a/gnu/packages/bootloaders.scm b/gnu/packages/bootloaders.scm
index 0232efa78c..c3c3ec14b9 100644
--- a/gnu/packages/bootloaders.scm
+++ b/gnu/packages/bootloaders.scm
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2021 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2015, 2018 Mark H Weaver <mhw@netris.org>
;;; Copyright © 2015 Leo Famulari <leo@famulari.name>
;;; Copyright © 2016, 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
@@ -114,6 +114,8 @@
;; calling the ‘true’ binary instead. Python is only needed during
;; bootstrapping (for genptl.py), not when building from a release.
(list "PYTHON=true")
+ ;; Grub fails to load modules stripped with --strip-unneeded.
+ #:strip-flags '("--strip-debug" "--enable-deterministic-archives")
#:phases (modify-phases %standard-phases
(add-after 'unpack 'patch-stuff
(lambda* (#:key native-inputs inputs #:allow-other-keys)
@@ -140,9 +142,9 @@
;; Give the absolute file name of 'ckbcomp'.
(substitute* "util/grub-kbdcomp.in"
(("^ckbcomp ")
- (string-append (assoc-ref inputs "console-setup")
- "/bin/ckbcomp ")))
- #t))
+ (string-append
+ (search-input-file inputs "/bin/ckbcomp")
+ " ")))))
(add-after 'unpack 'set-freetype-variables
;; These variables need to be set to the native versions
;; of the dependencies because they are used to build
@@ -316,9 +318,8 @@ menu to select one of the installed operating systems.")
(lambda* (#:key inputs #:allow-other-keys)
(substitute* "grub-core/osdep/unix/platform.c"
(("efibootmgr")
- (string-append (assoc-ref inputs "efibootmgr")
- "/sbin/efibootmgr")))
- #t))
+ (search-input-file inputs
+ "/sbin/efibootmgr")))))
(add-after 'patch-stuff 'use-absolute-mtools-path
(lambda* (#:key inputs #:allow-other-keys)
(let ((mtools (assoc-ref inputs "mtools")))
@@ -353,8 +354,8 @@ menu to select one of the installed operating systems.")
`(modify-phases ,phases
(add-after 'install 'install-non-efi
(lambda* (#:key inputs outputs #:allow-other-keys)
- (let ((input-dir (string-append (assoc-ref inputs "grub")
- "/lib/grub"))
+ (let ((input-dir (search-input-directory inputs
+ "/lib/grub"))
(output-dir (string-append (assoc-ref outputs "out")
"/lib/grub")))
(for-each
@@ -379,7 +380,10 @@ menu to select one of the installed operating systems.")
(file-name (git-file-name name version))
(sha256
(base32
- "0k8dvafd6410kqxf3kyr4y8jzmpmrih6wbjqg6gklak7945yflrc"))))
+ "0k8dvafd6410kqxf3kyr4y8jzmpmrih6wbjqg6gklak7945yflrc"))
+ (patches
+ (search-patches "syslinux-gcc10.patch"
+ "syslinux-strip-gnu-property.patch"))))
(build-system gnu-build-system)
(native-inputs
`(("nasm" ,nasm)
@@ -399,6 +403,7 @@ menu to select one of the installed operating systems.")
(string-append "MANDIR=" %output "/share/man")
"PERL=perl"
"bios")
+ #:strip-flags '("--strip-debug" "--enable-deterministic-archives")
#:phases
(modify-phases %standard-phases
(add-after 'unpack 'patch-files
@@ -894,9 +899,8 @@ to Novena upstream, does not load u-boot.img from the first partition.")
`(modify-phases ,phases
(add-after 'unpack 'set-environment
(lambda* (#:key inputs #:allow-other-keys)
- (setenv "BL31" (string-append (assoc-ref inputs "firmware")
- "/bl31.elf"))
- #t))
+ (setenv "BL31"
+ (search-input-file inputs "/bl31.elf"))))
;; Phases do not succeed on the bl31 ELF.
(delete 'strip)
(delete 'validate-runpath)))))
@@ -933,10 +937,8 @@ to Novena upstream, does not load u-boot.img from the first partition.")
`(modify-phases ,phases
(add-after 'unpack 'set-environment
(lambda* (#:key inputs #:allow-other-keys)
- (let ((bl31 (string-append (assoc-ref inputs "firmware")
- "/bl31.elf")))
- (setenv "BL31" bl31))
- #t))))))
+ (let ((bl31 (search-input-file inputs "/bl31.elf")))
+ (setenv "BL31" bl31))))))))
(native-inputs
`(("firmware" ,arm-trusted-firmware-rk3328)
,@(package-native-inputs base))))))
@@ -951,9 +953,7 @@ to Novena upstream, does not load u-boot.img from the first partition.")
`(modify-phases ,phases
(add-after 'unpack 'set-environment
(lambda* (#:key inputs #:allow-other-keys)
- (setenv "BL31" (string-append (assoc-ref inputs "firmware")
- "/bl31.elf"))
- #t))
+ (setenv "BL31" (search-input-file inputs "/bl31.elf"))))
;; Phases do not succeed on the bl31 ELF.
(delete 'strip)
(delete 'validate-runpath)))))
@@ -971,9 +971,8 @@ to Novena upstream, does not load u-boot.img from the first partition.")
`(modify-phases ,phases
(add-after 'unpack 'set-environment
(lambda* (#:key inputs #:allow-other-keys)
- (setenv "BL31" (string-append (assoc-ref inputs "firmware")
- "/bl31.elf"))
- #t))
+ (setenv "BL31"
+ (search-input-file inputs "/bl31.elf"))))
;; Phases do not succeed on the bl31 ELF.
(delete 'strip)
(delete 'validate-runpath)))))
@@ -991,9 +990,8 @@ to Novena upstream, does not load u-boot.img from the first partition.")
`(modify-phases ,phases
(add-after 'unpack 'set-environment
(lambda* (#:key inputs #:allow-other-keys)
- (setenv "BL31" (string-append (assoc-ref inputs "firmware")
- "/bl31.elf"))
- #t))
+ (setenv "BL31"
+ (search-input-file inputs "/bl31.elf"))))
;; Phases do not succeed on the bl31 ELF.
(delete 'strip)
(delete 'validate-runpath)))))
diff --git a/gnu/packages/bootstrap.scm b/gnu/packages/bootstrap.scm
index c598cedc0a..5a8028a465 100644
--- a/gnu/packages/bootstrap.scm
+++ b/gnu/packages/bootstrap.scm
@@ -32,11 +32,13 @@
#:use-module (guix build-system gnu)
#:use-module (guix build-system trivial)
#:use-module ((guix store)
- #:select (run-with-store add-to-store add-text-to-store))
+ #:select (%store-monad interned-file text-file store-lift))
#:use-module ((guix derivations)
- #:select (derivation derivation-input derivation->output-path))
- #:use-module ((guix utils) #:select (gnu-triplet->nix-system))
+ #:select (raw-derivation derivation-input derivation->output-path))
+ #:use-module (guix utils)
+ #:use-module ((guix build utils) #:select (elf-file?))
#:use-module ((guix gexp) #:select (lower-object))
+ #:use-module (guix monads)
#:use-module (guix memoization)
#:use-module (guix i18n)
#:use-module (srfi srfi-1)
@@ -89,6 +91,15 @@
,(base32 "1j51gv08sfg277yxj73xd564wjq3f8xwd6s9rbcg8v9gms47m4cx"))
("xz"
,(base32 "1d779rwsrasphg5g3r37qppcqy3p7ay1jb1y83w7x4i3qsc7zjy2")))
+ ("powerpc-linux"
+ ("bash"
+ ,(base32 "0hwlw5lcyjzadprf5fm0cv4zb6jw667g9amnmhq0lbixasy7j72j"))
+ ("mkdir"
+ ,(base32 "12lfwh5p8pp06250wgi9mdvjv1jdfpd5xpmvfc0616aj0xqh09hp"))
+ ("tar"
+ ,(base32 "00sbmwl8qh6alxv9mw4hvj1j4yipwmw5mrw6qad8bi2pr7ya5386"))
+ ("xz"
+ ,(base32 "0hi47y6zh5zz137i59l5ibw92x6g54zn7ris1b1ym9rvavsasg7b")))
("armhf-linux"
("bash"
,(base32 "0s6f1s26g4dsrrkl39zblvwpxmbzi6n9mgqf6vxsqz42gik6bgyn"))
@@ -139,6 +150,7 @@
;; This is where the bootstrap executables come from.
'("https://git.savannah.gnu.org/cgit/guix.git/plain/gnu/packages/bootstrap/"
"https://alpha.gnu.org/gnu/guix/bootstrap/"
+ "http://flashner.co.il/guix/bootstrap/"
"http://lilypond.org/janneke/guix/"))
(define (bootstrap-executable-file-name system program)
@@ -146,6 +158,7 @@
(match system
("powerpc64le-linux" (string-append system "/20210106/" program))
("i586-gnu" (string-append system "/20200326/" program))
+ ("powerpc-linux" (string-append system "/20200923/bin/" program))
(_ (string-append system "/" program
"?id=44f07d1dc6806e97c4e9ee3e6be883cc59dc666e"))))
@@ -341,6 +354,8 @@ or false to signal an error."
(match system
("aarch64-linux"
"/20170217/guile-2.0.14.tar.xz")
+ ("powerpc-linux"
+ "/20200923/guile-2.0.14.tar.xz")
("armhf-linux"
"/20150101/guile-2.0.11.tar.xz")
("i586-gnu"
@@ -366,7 +381,9 @@ or false to signal an error."
("aarch64-linux"
(base32 "1giy2aprjmn5fp9c4s9r125fljw4wv6ixy5739i5bffw4jgr0f9r"))
("i586-gnu"
- (base32 "0wgqpsmvg25rnqn49ap7kwd2qxccd8dr4lllzp7i3rjvgav27vac"))))
+ (base32 "0wgqpsmvg25rnqn49ap7kwd2qxccd8dr4lllzp7i3rjvgav27vac"))
+ ("powerpc-linux"
+ (base32 "1by2p7s27fbyjzfkcw8h65h4kkqh7d23kv4sgg5jppjn2qx7swq4"))))
(define (bootstrap-guile-origin system)
"Return an <origin> object for the Guile tarball of SYSTEM."
@@ -376,59 +393,58 @@ or false to signal an error."
%bootstrap-base-urls))
(sha256 (bootstrap-guile-hash system))))
-(define (download-bootstrap-guile store system)
+(define (download-bootstrap-guile system)
"Return a derivation that downloads the bootstrap Guile tarball for SYSTEM."
(let* ((path (bootstrap-guile-url-path system))
(base (basename path))
(urls (map (cut string-append <> path) %bootstrap-base-urls)))
- (run-with-store store
- (url-fetch urls 'sha256 (bootstrap-guile-hash system)
- #:system system))))
+ (url-fetch urls 'sha256 (bootstrap-guile-hash system)
+ #:system system)))
-(define* (raw-build store name inputs
+(define* (raw-build name inputs
#:key outputs system search-paths
#:allow-other-keys)
(define (->store file)
- (run-with-store store
- (lower-object (bootstrap-executable file system)
- system)))
-
- (let* ((tar (->store "tar"))
- (xz (->store "xz"))
- (mkdir (->store "mkdir"))
- (bash (->store "bash"))
- (guile (download-bootstrap-guile store system))
- ;; The following code, run by the bootstrap guile after it is
- ;; unpacked, creates a wrapper for itself to set its load path.
- ;; This replaces the previous non-portable method based on
- ;; reading the /proc/self/exe symlink.
- (make-guile-wrapper
- '(begin
- (use-modules (ice-9 match))
- (match (command-line)
- ((_ out bash)
- (let ((bin-dir (string-append out "/bin"))
- (guile (string-append out "/bin/guile"))
- (guile-real (string-append out "/bin/.guile-real"))
- ;; We must avoid using a bare dollar sign in this code,
- ;; because it would be interpreted by the shell.
- (dollar (string (integer->char 36))))
- (chmod bin-dir #o755)
- (rename-file guile guile-real)
- (call-with-output-file guile
- (lambda (p)
- (format p "\
+ (lower-object (bootstrap-executable file system)
+ system))
+
+ (define (make-guile-wrapper bash guile-real)
+ ;; The following code, run by the bootstrap guile after it is unpacked,
+ ;; creates a wrapper for itself to set its load path. This replaces the
+ ;; previous non-portable method based on reading the /proc/self/exe
+ ;; symlink.
+ '(begin
+ (use-modules (ice-9 match))
+ (match (command-line)
+ ((_ out bash)
+ (let ((bin-dir (string-append out "/bin"))
+ (guile (string-append out "/bin/guile"))
+ (guile-real (string-append out "/bin/.guile-real"))
+ ;; We must avoid using a bare dollar sign in this code,
+ ;; because it would be interpreted by the shell.
+ (dollar (string (integer->char 36))))
+ (chmod bin-dir #o755)
+ (rename-file guile guile-real)
+ (call-with-output-file guile
+ (lambda (p)
+ (format p "\
#!~a
export GUILE_SYSTEM_PATH=~a/share/guile/2.0
export GUILE_SYSTEM_COMPILED_PATH=~a/lib/guile/2.0/ccache
exec -a \"~a0\" ~a \"~a@\"\n"
- bash out out dollar guile-real dollar)))
- (chmod guile #o555)
- (chmod bin-dir #o555))))))
- (builder
- (add-text-to-store store
- "build-bootstrap-guile.sh"
- (format #f "
+ bash out out dollar guile-real dollar)))
+ (chmod guile #o555)
+ (chmod bin-dir #o555))))))
+
+ (mlet* %store-monad ((tar (->store "tar"))
+ (xz (->store "xz"))
+ (mkdir (->store "mkdir"))
+ (bash (->store "bash"))
+ (guile (download-bootstrap-guile system))
+ (wrapper -> (make-guile-wrapper bash guile))
+ (builder
+ (text-file "build-bootstrap-guile.sh"
+ (format #f "
echo \"unpacking bootstrap Guile to '$out'...\"
~a $out
cd $out
@@ -441,19 +457,19 @@ $out/bin/guile -c ~s $out ~a
# Sanity check.
$out/bin/guile --version~%"
- (derivation->output-path mkdir)
- (derivation->output-path xz)
- (derivation->output-path tar)
- (format #f "~s" make-guile-wrapper)
- (derivation->output-path bash)))))
- (derivation store name
- (derivation->output-path bash) `(,builder)
- #:system system
- #:inputs (map derivation-input
- (list bash mkdir tar xz guile))
- #:sources (list builder)
- #:env-vars `(("GUILE_TARBALL"
- . ,(derivation->output-path guile))))))
+ (derivation->output-path mkdir)
+ (derivation->output-path xz)
+ (derivation->output-path tar)
+ (object->string wrapper)
+ (derivation->output-path bash)))))
+ (raw-derivation name
+ (derivation->output-path bash) `(,builder)
+ #:system system
+ #:inputs (map derivation-input
+ (list bash mkdir tar xz guile))
+ #:sources (list builder)
+ #:env-vars `(("GUILE_TARBALL"
+ . ,(derivation->output-path guile))))))
(define* (make-raw-bag name
#:key source inputs native-inputs outputs
@@ -500,6 +516,8 @@ $out/bin/guile --version~%"
"/20210106/static-binaries-0-powerpc64le-linux-gnu.tar.xz")
("i586-gnu"
"/20200326/static-binaries-0-i586-pc-gnu.tar.xz")
+ ("powerpc-linux"
+ "/20200923/static-binaries.tar.xz")
(_
"/20131110/static-binaries.tar.xz")))
%bootstrap-base-urls))
@@ -523,6 +541,9 @@ $out/bin/guile --version~%"
("i586-gnu"
(base32
"17kllqnf3fg79gzy9ansgi801c46yh9c23h4d923plvb0nfm1cfn"))
+ ("powerpc-linux"
+ (base32
+ "0kspxy0yczan2vlih6aa9hailr2inz000fqa0gn5x9d1fxxa5y8m"))
("mips64el-linux"
(base32
"072y4wyfsj1bs80r6vbybbafy8ya4vfy7qj25dklwk97m6g71753"))))))
@@ -573,6 +594,8 @@ $out/bin/guile --version~%"
"/20210106/binutils-static-stripped-2.34-powerpc64le-linux-gnu.tar.xz")
("i586-gnu"
"/20200326/binutils-static-stripped-2.34-i586-pc-gnu.tar.xz")
+ ("powerpc-linux"
+ "/20200923/binutils-2.35.1.tar.xz")
(_
"/20131110/binutils-2.23.2.tar.xz")))
%bootstrap-base-urls))
@@ -596,6 +619,9 @@ $out/bin/guile --version~%"
("i586-gnu"
(base32
"11kykv1kmqc5wln57rs4klaqa13hm952smkc57qcsyss21kfjprs"))
+ ("powerpc-linux"
+ (base32
+ "0asbg1c4avkrvh057mx0942xwddd136jni382zqsxzn79ls42yq8"))
("mips64el-linux"
(base32
"1x8kkhcxmfyzg1ddpz2pxs6fbdl6412r7x0nzbmi5n7mj8zw2gy7"))))))
@@ -653,6 +679,8 @@ $out/bin/guile --version~%"
"/20210106/glibc-stripped-2.31-powerpc64le-linux-gnu.tar.xz")
("i586-gnu"
"/20200326/glibc-stripped-2.31-i586-pc-gnu.tar.xz")
+ ("powerpc-linux"
+ "/20200923/glibc-2.32.tar.xz")
(_
"/20131110/glibc-2.18.tar.xz")))
%bootstrap-base-urls))
@@ -676,6 +704,9 @@ $out/bin/guile --version~%"
("i586-gnu"
(base32
"14ddm10lpbas8bankmn5bcrlqvz1v5dnn1qjzxb19r57vd2w5952"))
+ ("powerpc-linux"
+ (base32
+ "0smmssyjrlk5cvx49586smmk81gkwff0i6r91n4rir4jm6ba25sb"))
("mips64el-linux"
(base32
"0k97a3whzx3apsi9n2cbsrr79ad6lh00klxph9hw4fqyp1abkdsg")))))))))
@@ -749,6 +780,8 @@ exec ~a/bin/.gcc-wrapped -B~a/lib \
"/20210106/gcc-stripped-5.5.0-powerpc64le-linux-gnu.tar.xz")
("i586-gnu"
"/20200326/gcc-stripped-5.5.0-i586-pc-gnu.tar.xz")
+ ("powerpc-linux"
+ "/20200923/gcc-5.5.0.tar.xz")
(_
"/20131110/gcc-4.8.2.tar.xz")))
%bootstrap-base-urls))
@@ -772,14 +805,20 @@ exec ~a/bin/.gcc-wrapped -B~a/lib \
("i586-gnu"
(base32
"1j2zc58wzil71a34h7c70sd68dmqvcscrw3rmn2whq79vd70zvv5"))
+ ("powerpc-linux"
+ (base32
+ "1p7df3yixhm87dw5sccc6yn1i9db1r9hnmsg87wq5xi4rfmirq7w"))
("mips64el-linux"
(base32
"1m5miqkyng45l745n0sfafdpjkqv9225xf44jqkygwsipj2cv9ks")))))))))
(native-search-paths
(list (search-path-specification
- (variable "CPATH")
+ (variable "C_INCLUDE_PATH")
(files '("include")))
(search-path-specification
+ (variable "CPLUS_INCLUDE_PATH")
+ (files '("include/c++" "include")))
+ (search-path-specification
(variable "LIBRARY_PATH")
(files '("lib" "lib64")))))
(synopsis "Bootstrap binaries of the GNU Compiler Collection")
diff --git a/gnu/packages/build-tools.scm b/gnu/packages/build-tools.scm
index f8303a331b..249d8bc45b 100644
--- a/gnu/packages/build-tools.scm
+++ b/gnu/packages/build-tools.scm
@@ -264,7 +264,7 @@ files and generates build instructions for the Ninja build system.")
(define-public meson
(package
(name "meson")
- (version "0.53.2")
+ (version "0.60.0")
(source (origin
(method url-fetch)
(uri (string-append "https://github.com/mesonbuild/meson/"
@@ -272,20 +272,27 @@ files and generates build instructions for the Ninja build system.")
version ".tar.gz"))
(sha256
(base32
- "07y2hh9dfn1m9g4bsy49nbn3vdmd0b2iwr8bxg19fhqq6c7q73ry"))))
+ "0irdn7hx5a182jbvq2kmdwd1v7mljzh5fm27pg4xk879hnv6h388"))
+ (patches (search-patches
+ "meson-allow-dirs-outside-of-prefix.patch"))))
(build-system python-build-system)
(arguments
- `(;; FIXME: Tests require many additional inputs, a fix for the RUNPATH
- ;; patch in meson-for-build, and patching many hard-coded file system
- ;; locations in "run_unittests.py".
+ `(;; FIXME: Tests require many additional inputs and patching many
+ ;; hard-coded file system locations in "run_unittests.py".
#:tests? #f
#:phases (modify-phases %standard-phases
;; Meson calls the various executables in out/bin through the
;; Python interpreter, so we cannot use the shell wrapper.
(delete 'wrap))))
(inputs `(("ninja" ,ninja)))
+
+ ;; XXX: Python is propagated just to 'GUIX_PYTHONPATH' is set (!).
+ ;; MESON-WRAPPED below fixes that by wrapping the 'meson' executable.
+ ;; TODO: Make MESON-WRAPPED the new MESON on the next core update cycle.
(propagated-inputs `(("python" ,python)))
+
(home-page "https://mesonbuild.com/")
+ (properties '((hidden? . #t)))
(synopsis "Build system designed to be fast and user-friendly")
(description
"The Meson build system is focused on user-friendliness and speed.
@@ -296,25 +303,37 @@ files}, are written in a custom domain-specific language (@dfn{DSL}) that
resembles Python.")
(license license:asl2.0)))
-;; Added temporarily for packages that need it.
-;; TODO: Remove when core-updates is merged.
-(define-public meson-0.55
- (package
- (inherit meson)
- (version "0.55.1")
- (source (origin
- (method url-fetch)
- (uri (string-append "https://github.com/mesonbuild/meson/"
- "releases/download/" version "/meson-"
- version ".tar.gz"))
- (sha256
- (base32
- "1070kjiirxxdfppmrhi3wsc6rykay1zlciqrzayjhjg0hkw42mrv"))))))
+(define-public meson-wrapped
+ (package/inherit meson
+ (propagated-inputs '()) ;don't propagate Python
+ (inputs (modify-inputs (package-inputs meson)
+ (prepend python-wrapper)))
+ (arguments
+ `(;; FIXME: Tests require many additional inputs and patching many
+ ;; hard-coded file system locations in "run_unittests.py".
+ #:tests? #f
+ #:phases (modify-phases %standard-phases
+ ;; Meson calls the various executables in out/bin through the
+ ;; Python interpreter, so we cannot use the shell wrapper.
+ (replace 'wrap
+ (lambda* (#:key outputs inputs #:allow-other-keys)
+ (let ((python-version
+ (python-version (assoc-ref inputs "python")))
+ (output (assoc-ref outputs "out")))
+ (substitute* (string-append output "/bin/meson")
+ (("# EASY-INSTALL-ENTRY-SCRIPT")
+ (format #f "\
+import sys
+sys.path.insert(0, '~a/lib/python~a/site-packages')
+# EASY-INSTALL-ENTRY-SCRIPT"
+ output python-version)))))))))
+ (properties '())))
-(define-public meson-next
- (package
- (inherit meson)
- (version "0.57.2")
+;;; This older Meson variant is kept for now for gtkmm and others that may
+;;; have problems with 0.60.
+(define-public meson-0.59
+ (package/inherit meson
+ (version "0.59.4")
(source (origin
(method url-fetch)
(uri (string-append "https://github.com/mesonbuild/meson/"
@@ -322,18 +341,9 @@ resembles Python.")
version ".tar.gz"))
(sha256
(base32
- "1iac7p99zfgkznq4qlnkk7b8xwwlilcrnkf33sczm56yqnqyg0rs"))))))
-
-(define-public meson-for-build
- (package
- (inherit meson)
- (name "meson-for-build")
- (source (origin
- (inherit (package-source meson))
- (patches (search-patches "meson-for-build-rpath.patch"))))
-
- ;; People should probably install "meson", not "meson-for-build".
- (properties `((hidden? . #t)))))
+ "117cm8794h291lca1wljz1pwnzidgbvrpg3mw3np6ksma368hyd7"))
+ (patches (search-patches
+ "meson-allow-dirs-outside-of-prefix.patch"))))))
(define-public premake4
(package
diff --git a/gnu/packages/calcurse.scm b/gnu/packages/calcurse.scm
index d807c15d68..b44f88fea9 100644
--- a/gnu/packages/calcurse.scm
+++ b/gnu/packages/calcurse.scm
@@ -64,8 +64,8 @@
(add-before 'check 'check-setup
(lambda* (#:key inputs #:allow-other-keys)
(setenv "TZDIR" ; for test/ical-007.sh
- (string-append (assoc-ref inputs "tzdata")
- "/share/zoneinfo")))))))
+ (search-input-directory inputs
+ "share/zoneinfo")))))))
(home-page "https://www.calcurse.org")
(synopsis "Text-based calendar and scheduling")
(description
diff --git a/gnu/packages/calendar.scm b/gnu/packages/calendar.scm
index 44d1331e32..6c815daf7d 100644
--- a/gnu/packages/calendar.scm
+++ b/gnu/packages/calendar.scm
@@ -98,8 +98,8 @@
(lambda* (#:key inputs #:allow-other-keys)
(substitute* "src/tz.cpp"
(("/usr/share/zoneinfo")
- (string-append (assoc-ref inputs "tzdata") "/share/zoneinfo")))
- #t))
+ (search-input-directory inputs
+ "share/zoneinfo")))))
(replace 'check
(lambda _
;; Disable test that requires checking timezone that
@@ -118,7 +118,7 @@ the <tz.h> library for handling time zones and leap seconds.")
(define-public libical
(package
(name "libical")
- (version "3.0.8")
+ (version "3.0.10")
(source (origin
(method url-fetch)
(uri (string-append
@@ -126,7 +126,7 @@ the <tz.h> library for handling time zones and leap seconds.")
version "/libical-" version ".tar.gz"))
(sha256
(base32
- "0vr8s7hn8204lyc4ys5bs3j5qss4lmc9ffly2m1a59avyz5cmzh9"))))
+ "1d1nqcfilb4k8bc5x85fhnd26l1ski58wpk2nmds6mlxrzkb6czr"))))
(build-system cmake-build-system)
(arguments
'(#:tests? #f ; test suite appears broken
diff --git a/gnu/packages/cdrom.scm b/gnu/packages/cdrom.scm
index 717d59f0e9..1ad4829dc4 100644
--- a/gnu/packages/cdrom.scm
+++ b/gnu/packages/cdrom.scm
@@ -3,7 +3,7 @@
;;; Copyright © 2013, 2014 Andreas Enge <andreas@enge.fr>
;;; Copyright © 2015 Taylan Ulrich Bayırlı/Kammer <taylanbayirli@gmail.com>
;;; Copyright © 2015 Paul van der Walt <paul@denknerd.org>
-;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020, 2021 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2016 Alex Kost <alezost@gmail.com>
;;; Copyright © 2016 Marius Bakke <mbakke@fastmail.com>
;;; Copyright © 2017 John Darrington <jmd@gnu.org>
@@ -235,6 +235,7 @@ files.")
(build-system gnu-build-system)
(arguments
`(#:tests? #f ; there is no check target
+ #:parallel-build? #f ;randomly fails to link
#:configure-flags ; Add $libdir to the RUNPATH of all the executables.
(list (string-append "LDFLAGS=-Wl,-rpath=" %output "/lib"))
;; Building in parallel is flaky: “ld: […]/cachetest.c:393: undefined
@@ -927,7 +928,15 @@ Supported extensions to ISO 9660 are Rock Ridge, Joliet, AAIP, zisofs.")
version ".tar.gz"))
(sha256
(base32
- "0g2zyzb56czh429qy87lvaddzjnlcq8c616ddxsmsshz3clhyzrh"))))
+ "0g2zyzb56czh429qy87lvaddzjnlcq8c616ddxsmsshz3clhyzrh"))
+ (patches (search-patches "cdrkit-libre-cross-compile.patch"))
+ (modules '((guix build utils)))
+ (snippet
+ #~(begin
+ ;; Fix building with gcc-10.
+ (substitute* "genisoimage/genisoimage.h"
+ (("char\t\t\\*outfile")
+ "extern char\t*outfile"))))))
(build-system cmake-build-system)
(inputs
`(("bzip2" ,bzip2)
@@ -1045,7 +1054,7 @@ drive and disc (including CD-ROMs and DVD-ROMs).")
(let ((prog (string-append (assoc-ref outputs "out")
"/bin/cdemu")))
(wrap-program prog
- `("PYTHONPATH" = (,(getenv "PYTHONPATH"))))
+ `("GUIX_PYTHONPATH" = (,(getenv "GUIX_PYTHONPATH"))))
#t))))))
(home-page "https://cdemu.sourceforge.io/")
(synopsis "Command-line client for controlling cdemu-daemon")
diff --git a/gnu/packages/cedille.scm b/gnu/packages/cedille.scm
index d3dd576323..decaf25605 100644
--- a/gnu/packages/cedille.scm
+++ b/gnu/packages/cedille.scm
@@ -89,8 +89,7 @@
(add-after 'unpack 'copy-ial
(lambda* (#:key inputs #:allow-other-keys)
(copy-recursively
- (string-append (assoc-ref inputs "agda-ial")
- "/include/agda/ial")
+ (search-input-directory inputs "/include/agda/ial")
"ial")
;; Ambiguous module if main is included from ial
(delete-file "ial/main.agda")
diff --git a/gnu/packages/certs.scm b/gnu/packages/certs.scm
index e15a9660df..d09778f6da 100644
--- a/gnu/packages/certs.scm
+++ b/gnu/packages/certs.scm
@@ -1,9 +1,11 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2015 Andreas Enge <andreas@enge.fr>
;;; Copyright © 2015 Mark H Weaver <mhw@netris.org>
-;;; Copyright © 2016, 2017 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2016, 2017, 2021 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2017 Leo Famulari <leo@famulari.name>
;;; Copyright © 2017, 2018 Tobias Geerinckx-Rice <me@tobias.gr>
+;;; Copyright © 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
+;;; Copyright © 2021 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2021 Raghav Gururajan <rg@raghavgururajan.name>
;;;
;;; This file is part of GNU Guix.
@@ -24,12 +26,14 @@
(define-module (gnu packages certs)
#:use-module ((guix licenses) #:prefix license:)
#:use-module (guix packages)
+ #:use-module (guix utils)
#:use-module (guix download)
#:use-module (guix git-download)
#:use-module (guix build-system copy)
#:use-module (guix build-system gnu)
#:use-module (guix build-system trivial)
#:use-module (gnu packages)
+ #:use-module (gnu packages nss)
#:use-module (gnu packages curl)
#:use-module (gnu packages python)
#:use-module (gnu packages perl)
@@ -82,112 +86,78 @@ port forwarding to your local machine.")
(home-page "https://desec.io")
(license license:expat))))
-(define certdata2pem
- (package
- (name "certdata2pem")
- (version "2013")
- (source
- (origin
- (method url-fetch)
- (uri
- "http://pkgs.fedoraproject.org/cgit/ca-certificates.git/plain/certdata2pem.py?id=053dde8a2f5901e97028a58bf54e7d0ef8095a54")
- (file-name "certdata2pem.py")
- (sha256
- (base32
- "0zscrm41gnsf14zvlkxhy00h3dmgidyz645ldpda3y3vabnwv8dx"))))
- (build-system trivial-build-system)
- (inputs
- `(("python" ,python-2)))
- (arguments
- `(#:modules ((guix build utils))
- #:builder
- (begin
- (use-modules (guix build utils))
- (let ((bin (string-append %output "/bin")))
- (copy-file (assoc-ref %build-inputs "source") "certdata2pem.py")
- (chmod "certdata2pem.py" #o555)
- (substitute* "certdata2pem.py"
- (("/usr/bin/python")
- (string-append (assoc-ref %build-inputs "python")
- "/bin/python"))
- ;; Use the file extension .pem instead of .crt.
- (("crt") "pem"))
- (mkdir-p bin)
- (copy-file "certdata2pem.py"
- (string-append bin "/certdata2pem.py"))
- #t))))
- (synopsis "Python script to extract .pem data from certificate collection")
- (description
- "certdata2pem.py is a Python script to transform X.509 certificate
-\"source code\" as contained, for example, in the Mozilla sources, into
-.pem formatted certificates.")
- (license license:gpl2+)
- (home-page "http://pkgs.fedoraproject.org/cgit/ca-certificates.git/")))
+(define-public certdata2pem
+ (let ((revision "1")
+ (commit "4c576f350f44186d439179f63d5be19f710a73f5"))
+ (package
+ (name "certdata2pem")
+ (version "0.0.0") ;no version
+ (source (origin
+ (method url-fetch)
+ (uri (string-append
+ "https://raw.githubusercontent.com/sabotage-linux/sabotage/"
+ commit "/KEEP/certdata2pem.c"))
+ (sha256
+ (base32
+ "1rywp29q4l1cs2baplkbcravxqs4kw2cys4yifhfznbc210pskq6"))))
+ (build-system gnu-build-system)
+ (arguments
+ `(#:phases (modify-phases %standard-phases
+ (delete 'configure)
+ (add-before 'build 'fix-extension
+ (lambda _
+ (substitute* "certdata2pem.c"
+ (("\\.crt")
+ ".pem"))))
+ (replace 'build
+ (lambda _
+ (invoke ,(cc-for-target) "certdata2pem.c"
+ "-o" "certdata2pem")))
+ (delete 'check) ;no test suite
+ (replace 'install
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let ((out (assoc-ref outputs "out")))
+ (install-file "certdata2pem"
+ (string-append out "/bin"))))))))
+ (home-page "https://github.com/sabotage-linux/")
+ (synopsis "Utility to split TLS certificates data into multiple PEM files")
+ (description "This is a C version of the certdata2pem Python utility
+that was originally contributed to Debian.")
+ (license license:isc))))
(define-public nss-certs
(package
(name "nss-certs")
- (version "3.59")
- (source (origin
- (method url-fetch)
- (uri (let ((version-with-underscores
- (string-join (string-split version #\.) "_")))
- (string-append
- "https://ftp.mozilla.org/pub/mozilla.org/security/nss/"
- "releases/NSS_" version-with-underscores "_RTM/src/"
- "nss-" version ".tar.gz")))
- (sha256
- (base32
- "096fs3z21r171q24ca3rq53p1389xmvqz1f2rpm7nlm8r9s82ag6"))))
+ (version (package-version nss))
+ (source (package-source nss))
(build-system gnu-build-system)
(outputs '("out"))
(native-inputs
`(("certdata2pem" ,certdata2pem)
- ("openssl" ,openssl)
- ("perl" ,perl))) ;for OpenSSL's 'c_rehash'
+ ("openssl" ,openssl)))
(inputs '())
(propagated-inputs '())
(arguments
`(#:modules ((guix build gnu-build-system)
(guix build utils)
(rnrs io ports)
- (srfi srfi-26)
- (ice-9 regex))
+ (srfi srfi-26))
#:phases
(modify-phases
(map (cut assq <> %standard-phases)
'(set-paths install-locale unpack))
(add-after 'unpack 'install
(lambda _
- (let ((certsdir (string-append %output "/etc/ssl/certs/"))
- (trusted-rx (make-regexp "^# openssl-trust=[a-zA-Z]"
- regexp/newline)))
-
- (define (maybe-install-cert file)
- (let ((cert (call-with-input-file file get-string-all)))
- (when (regexp-exec trusted-rx cert)
- (call-with-output-file
- (string-append certsdir file)
- (cut display cert <>)))))
-
- (mkdir-p certsdir)
+ (let ((certsdir (string-append %output "/etc/ssl/certs/")))
(with-directory-excursion "nss/lib/ckfw/builtins/"
- ;; extract single certificates from blob
- (invoke "certdata2pem.py" "certdata.txt")
- ;; copy selected .pem files into the output
- (for-each maybe-install-cert
- (find-files "." ".*\\.pem")))
-
- (with-directory-excursion certsdir
- ;; create symbolic links for and by openssl
- ;; Strangely, the call (system* "c_rehash" certsdir)
- ;; from inside the build dir fails with
- ;; "Usage error; try -help."
- ;; This looks like a bug in openssl-1.0.2, but we can also
- ;; switch into the target directory.
- (invoke "c_rehash" "."))
- #t))))))
-
+ (unless (file-exists? "blacklist.txt")
+ (call-with-output-file "blacklist.txt" (const #t)))
+ ;; Extract selected single certificates from blob.
+ (invoke "certdata2pem")
+ ;; Copy .pem files into the output.
+ (for-each (cut install-file <> certsdir)
+ (find-files "." ".*\\.pem$")))
+ (invoke "openssl" "rehash" certsdir)))))))
(synopsis "CA certificates from Mozilla")
(description
"This package provides certificates for Certification Authorities (CA)
diff --git a/gnu/packages/check.scm b/gnu/packages/check.scm
index 4928f02bfd..50a00e5a90 100644
--- a/gnu/packages/check.scm
+++ b/gnu/packages/check.scm
@@ -25,7 +25,7 @@
;;; Copyright © 2017, 2019 Kei Kebreau <kkebreau@posteo.net>
;;; Copyright © 2017 Nikita <nikita@n0.is>
;;; Copyright © 2015, 2017, 2018, 2020, 2021 Ricardo Wurmus <rekado@elephly.net>
-;;; Copyright © 2016, 2017, 2018, 2019, 2020, 2021 Marius Bakke <mbakke@fastmail.com>
+;;; Copyright © 2016, 2017, 2018, 2019, 2020, 2021 Marius Bakke <marius@gnu.org>
;;; Copyright © 2017, 2018, 2020, 2021 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2018 Fis Trivial <ybbs.daans@hotmail.com>
;;; Copyright © 2019, 2021 Pierre Langlois <pierre.langlois@gmx.com>
@@ -68,6 +68,7 @@
#:use-module (gnu packages perl)
#:use-module (gnu packages pkg-config)
#:use-module (gnu packages python)
+ #:use-module (gnu packages python-check)
#:use-module (gnu packages python-build)
#:use-module (gnu packages python-web)
#:use-module (gnu packages python-xyz)
@@ -148,7 +149,27 @@ like Jasmine or Mocha.")
version "/check-" version ".tar.gz"))
(sha256
(base32
- "02m25y9m46pb6n46s51av62kpd936lkfv3b13kfpckgvmh5lxpm8"))))
+ "02m25y9m46pb6n46s51av62kpd936lkfv3b13kfpckgvmh5lxpm8"))
+ (patches
+ (list
+ ;; This patch fixes some tests that would otherwise fail on
+ ;; powerpc64le-linux. Without this patch, the tests make certain
+ ;; assumptions about floating point number precision that are not true
+ ;; on that platform.
+ ;;
+ ;; TODO: Remove this patch when updating to the next check release,
+ ;; since it will be included there. See:
+ ;; https://debbugs.gnu.org/cgi/bugreport.cgi?bug=47698
+ (origin
+ (method url-fetch)
+ (uri
+ (string-append "https://github.com/libcheck/check/commit/"
+ "4fbe702fa4f35bee8a90512f9f59d1441c4ae82e.patch"))
+ (file-name (string-append name
+ "-fix-test-precision-for-ppc.patch"))
+ (sha256
+ (base32
+ "04qg1p9afdd6453k18qskazrvscysdcjz9j6w4i6p5x4xyma19v6")))))))
(build-system gnu-build-system)
(home-page "https://libcheck.github.io/check/")
(synopsis "Unit test framework for C")
@@ -650,7 +671,7 @@ test coverage and has a web user interface that will refresh automatically.")
(define-public googletest
(package
(name "googletest")
- (version "1.10.0")
+ (version "1.11.0")
(source
(origin
(method git-fetch)
@@ -659,7 +680,7 @@ test coverage and has a web user interface that will refresh automatically.")
(commit (string-append "release-" version))))
(file-name (git-file-name name version))
(sha256
- (base32 "1zbmab9295scgg4z2vclgfgjchfjailjnvzc6f5x9jvlsdi3dpwz"))))
+ (base32 "0pd4y1gpx1z8fiyarkvqlmk6hbv0lc8fr00ivnsvqzi1xg34jfaa"))))
(build-system cmake-build-system)
(arguments
`(#:configure-flags '("-DBUILD_SHARED_LIBS=ON")))
@@ -716,7 +737,7 @@ similar to unit tests.")
(define-public cpputest
(package
(name "cpputest")
- (version "3.8")
+ (version "4.0")
(source
(origin
(method url-fetch)
@@ -724,7 +745,7 @@ similar to unit tests.")
version "/cpputest-" version ".tar.gz"))
(sha256
(base32
- "0mk48xd3klyqi7wf3f4wn4zqxxzmvrhhl32r25jzrixzl72wq7f8"))))
+ "1xslavlb1974y5xvs8n1j9zkk05dlw8imy4saasrjlmibl895ii1"))))
(build-system gnu-build-system)
(native-inputs
`(("googletest" ,googletest)))
@@ -922,39 +943,46 @@ standard library.")
(define-public python-pytest
(package
(name "python-pytest")
- (version "5.3.5")
+ (version "6.2.5")
(source
(origin
(method url-fetch)
(uri (pypi-uri "pytest" version))
(sha256
(base32
- "139i9cjhrv5aici3skq8iihvfb3lq0d8xb5j7qycr2hlk8cfjpqd"))))
+ "12cyi0lnyaq8sdqfnqlppd76gkw6zcg10gyih5knx9v611l3c6qk"))))
(build-system python-build-system)
(arguments
`(#:phases
(modify-phases %standard-phases
+ (add-before 'build 'pretend-version
+ ;; The version string is usually derived via setuptools-scm, but
+ ;; without the git metadata available, the version string is set to
+ ;; '0.0.0'.
+ (lambda _
+ (setenv "SETUPTOOLS_SCM_PRETEND_VERSION" ,version)))
(replace 'check
(lambda* (#:key (tests? #t) #:allow-other-keys)
+ (setenv "TERM" "dumb") ;attempt disabling markup tests
(if tests?
(invoke "pytest" "-vv" "-k"
(string-append
- ;; These tests involve the /usr directory, and fails.
- "not test_remove_dir_prefix"
- " and not test_argcomplete"
- ;; This test tries to override PYTHONPATH, and
- ;; subsequently fails to locate the test libraries.
- " and not test_collection"))
- (format #t "test suite not run~%"))
- #t)))))
+ ;; 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
- `(("python-atomicwrites" ,python-atomicwrites)
- ("python-attrs" ,python-attrs-bootstrap)
+ `(("python-attrs" ,python-attrs-bootstrap)
+ ("python-iniconfig" ,python-iniconfig)
("python-more-itertools" ,python-more-itertools)
("python-packaging" ,python-packaging-bootstrap)
("python-pluggy" ,python-pluggy)
("python-py" ,python-py)
("python-six" ,python-six-bootstrap)
+ ("python-toml" ,python-toml)
("python-wcwidth" ,python-wcwidth)))
(native-inputs
`(;; Tests need the "regular" bash since 'bash-final' lacks `compgen`.
@@ -964,6 +992,7 @@ standard library.")
("python-mock" ,python-mock)
("python-pytest" ,python-pytest-bootstrap)
("python-setuptools-scm" ,python-setuptools-scm)
+ ("python-toml" ,python-toml)
("python-xmlschema" ,python-xmlschema)))
(home-page "https://docs.pytest.org/en/latest/")
(synopsis "Python testing library")
@@ -974,52 +1003,18 @@ and many external plugins.")
(license license:expat)
(properties `((python2-variant . ,(delay python2-pytest))))))
-(define-public python-pytest-6
+(define-public python-pytest-6.1
(package
- (inherit (strip-python2-variant python-pytest))
- (version "6.2.4")
+ (inherit python-pytest)
+ (version "6.1.2")
(source
- (origin
- (method url-fetch)
- (uri (pypi-uri "pytest" version))
- (sha256
- (base32
- "0jy5f83la1864ss42dhsi1mcm5nl79d8bjg7wk474nlw1c5avg2h"))))
- (arguments
- `(#:phases
- (modify-phases %standard-phases
- (add-after 'unpack 'fix-version
- ;; The version string is usually derived via setuptools-scm, but
- ;; without the git metadata available, the version string is set to
- ;; '0.0.0'.
- (lambda _
- (substitute* "setup.py"
- (("setup\\(\\)")
- (format #f "setup(version=~s)" ,version)))))
- (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))))))
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "pytest" version))
+ (sha256
+ (base32 "0gl2sdm322vzmsh5k4f8kj9raiq2y7kdinnca4m45ifvii5fk9y0"))))))
+
+(define-public python-pytest-6 python-pytest)
;; Pytest 4.x are the last versions that support Python 2.
(define-public python2-pytest
@@ -1061,19 +1056,12 @@ and many external plugins.")
(package
(inherit (strip-python2-variant python-pytest))
(name "python-pytest-bootstrap")
- (native-inputs `(("python-setuptools-scm" ,python-setuptools-scm)))
+ (native-inputs `(("python-iniconfig" ,python-iniconfig)
+ ("python-setuptools-scm" ,python-setuptools-scm)
+ ("python-toml" ,python-toml)))
(arguments `(#:tests? #f))
(properties `((python2-variant . ,(delay python2-pytest-bootstrap))))))
-(define-public python-pytest-6-bootstrap
- (package
- (inherit (strip-python2-variant python-pytest-6))
- (name "python-pytest-bootstrap")
- (arguments `(#:tests? #f))
- (native-inputs
- `(("python-setuptools-scm" ,python-setuptools-scm)
- ("python-toml" ,python-toml)))))
-
(define-public python2-pytest-bootstrap
(hidden-package
(package/inherit
@@ -1184,7 +1172,7 @@ supports coverage of subprocesses.")
(modify-phases %standard-phases
(add-before 'check 'fix-library-loading
(lambda _
- (setenv "PYTHONPATH" (string-append (getenv "PYTHONPATH") ":."))))
+ (setenv "GUIX_PYTHONPATH" (string-append (getenv "GUIX_PYTHONPATH") ":."))))
(replace 'check
(lambda _
(invoke "pytest" "tests" "-vv")
@@ -1329,10 +1317,10 @@ reported in a previous test run.")
(invoke "pytest" "--assert=plain"
"-k" "not test_standalone_mock")))))))
(native-inputs
- `(("python-setuptools-scm" ,python-setuptools-scm)))
+ `(("python-pytest-asyncio" ,python-pytest-asyncio)
+ ("python-setuptools-scm" ,python-setuptools-scm)))
(propagated-inputs
- `(("python-pytest" ,python-pytest)
- ("python-pytest-asyncio" ,python-pytest-asyncio)))
+ `(("python-pytest" ,python-pytest)))
(home-page "https://github.com/pytest-dev/pytest-mock/")
(synopsis "Thin-wrapper around the mock package for easier use with py.test")
(description
@@ -1358,6 +1346,8 @@ same arguments.")
"1i5mg3ff1qk0wqfcxfz60hwy3q5dskdp36i10ckigkzffg8hc3ad"))))
(arguments
`(#:python ,python-2))
+ (native-inputs
+ `(("python2-setuptools-scm" ,python2-setuptools-scm)))
(propagated-inputs
`(("python2-mock" ,python2-mock)
("python2-pytest" ,python2-pytest))))))
@@ -1365,20 +1355,32 @@ same arguments.")
(define-public python-pytest-xdist
(package
(name "python-pytest-xdist")
- ;; There is an issue that causes all releases after 1.34 to fail on Pytest
- ;; 5 (see: https://github.com/pytest-dev/pytest-xdist/issues/697).
- (version "1.34.0")
+ (version "2.1.0")
(source
(origin
(method url-fetch)
(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 inputs outputs tests? #:allow-other-keys)
(when tests?
@@ -1390,6 +1392,7 @@ same arguments.")
(propagated-inputs
`(("python-execnet" ,python-execnet)
("python-pytest" ,python-pytest)
+ ("python-py" ,python-py)
("python-pytest-forked" ,python-pytest-forked)))
(home-page
"https://github.com/pytest-dev/pytest-xdist")
@@ -1523,25 +1526,20 @@ subprocess and see the output as well as any file modifications.")
(define-public python-testtools-bootstrap
(package
(name "python-testtools-bootstrap")
- (version "2.3.0")
+ (version "2.5.0")
(source
(origin
(method url-fetch)
(uri (pypi-uri "testtools" version))
(sha256
(base32
- "0n8519lk8aaa91vymz842831181wf7fss98hyllhygi3z1nfq9sq"))
- (patches (search-patches "python-testtools.patch"))))
+ "0gxjbjk93jjqi491k4s9rh3ia37v21yifd35pvizv7sgv4rk9hap"))))
(build-system python-build-system)
(arguments '(#:tests? #f))
(propagated-inputs
`(("python-extras" ,python-extras)
("python-fixtures" ,python-fixtures-bootstrap)
- ("python-mimeparse" ,python-mimeparse)
- ("python-pbr" ,python-pbr-minimal)
- ("python-six" ,python-six)
- ("python-traceback2" ,python-traceback2)
- ("python-unittest2" ,python-unittest2)))
+ ("python-pbr" ,python-pbr-minimal)))
(home-page "https://github.com/testing-cabal/testtools")
(synopsis
"Extensions to the Python standard library unit testing framework")
@@ -1554,19 +1552,17 @@ subprocess and see the output as well as any file modifications.")
(inherit python-testtools-bootstrap)
(name "python-testtools")
(arguments
- `(#:phases (modify-phases %standard-phases
- (replace 'check
- (lambda _
- (invoke "python" "-m" "testtools.run"
- "testtools.tests.test_suite"))))))
+ `(#:phases
+ (modify-phases %standard-phases
+ (replace 'check
+ (lambda* (#:key tests? #:allow-other-keys)
+ (when tests?
+ (invoke "python" "-m" "testtools.run"
+ "testtools.tests.test_suite")))))))
(propagated-inputs
`(("python-extras" ,python-extras)
("python-fixtures" ,python-fixtures)
- ("python-mimeparse" ,python-mimeparse)
- ("python-pbr" ,python-pbr)
- ("python-six" ,python-six)
- ("python-traceback2" ,python-traceback2)
- ("python-unittest2" ,python-unittest2)))
+ ("python-pbr" ,python-pbr)))
(native-inputs
`(("python-testscenarios" ,python-testscenarios-bootstrap)))
(description
@@ -1697,14 +1693,21 @@ protocol.")))
(package
(name "python-fixtures-bootstrap")
(version "3.0.0")
- (source (origin
- (method url-fetch)
- (uri (pypi-uri "fixtures" version))
- (sha256
- (base32
- "1vxj29bzz3rd4pcy51d05wng9q9dh4jq6wx92yklsm7i6h1ddw7w"))))
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "fixtures" version))
+ (sha256
+ (base32
+ "1vxj29bzz3rd4pcy51d05wng9q9dh4jq6wx92yklsm7i6h1ddw7w"))
+ (patches (search-patches "python-fixtures-remove-monkeypatch-test.patch"))))
(build-system python-build-system)
- (arguments `(#:tests? #f))
+ (arguments
+ `(#:tests? #f
+ #:phases
+ (modify-phases %standard-phases
+ ;; Package is not loadable on its own at this stage.
+ (delete 'sanity-check))))
(propagated-inputs
`(("python-pbr-minimal" ,python-pbr-minimal)
("python-six" ,python-six)))
@@ -1723,9 +1726,10 @@ python-fixtures package instead.")
'(#:phases
(modify-phases %standard-phases
(replace 'check
- (lambda _
- (invoke "python" "-m" "testtools.run"
- "fixtures.test_suite"))))))
+ (lambda* (#:key tests? #:allow-other-keys)
+ (when tests?
+ (invoke "python" "-m" "testtools.run"
+ "fixtures.test_suite")))))))
(propagated-inputs
;; Fixtures uses pbr at runtime to check versions, etc.
`(("python-pbr" ,python-pbr)
@@ -1809,9 +1813,7 @@ 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 git-fetch) ;for tests
@@ -1820,18 +1822,8 @@ executed.")
(commit (string-append "v" version))))
(file-name (git-file-name name version))
(sha256
- (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)
@@ -2034,12 +2026,11 @@ framework which enables you to test server connections locally.")
`(("python-setuptools-scm" ,python-setuptools-scm)))
(propagated-inputs
`(("python-pytest" ,python-pytest)
- ("python-pytest-cache" ,python-pytest-cache)
("python-psutil" ,python-psutil)))
(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.")
- (home-page "https://github.com/pytest-dev/pytest-xprocess")
+ (home-page "https://github.com/pytest-dev/pytest-xprocess/")
(license license:expat)))
(define-public python-pytest-subtesthack
@@ -2093,13 +2084,13 @@ instantly.")
(define-public python-hypothesis
(package
(name "python-hypothesis")
- (version "5.4.1")
+ (version "6.0.2")
(source (origin
(method url-fetch)
(uri (pypi-uri "hypothesis" version))
(sha256
(base32
- "0zn09bn6hadk4vxl6jy8bkjr5fz8mrhin3z46w7pq5qgbaycr89p"))))
+ "0wj7ip779naf2n076nylf2gi0sjz68z1ir9d9r2rgs7br18naqdf"))))
(build-system python-build-system)
(arguments
;; XXX: Tests are not distributed with the PyPI archive.
@@ -2116,28 +2107,16 @@ seamlessly into your existing Python unit testing work flow.")
(license license:mpl2.0)
(properties `((python2-variant . ,(delay python2-hypothesis))))))
-(define-public python-hypothesis-5.23
- (package
- (inherit python-hypothesis)
- (version "5.23.0")
- (source (origin
- (method url-fetch)
- (uri (pypi-uri "hypothesis" version))
- (sha256
- (base32
- "0sy1v6nyxg4rjcf3rlr8nalb7wqd9nccpb2lzkchbj5an13ysf1h"))))
- (home-page "https://github.com/HypothesisWorks/hypothesis")))
-
(define-public python-hypothesis-6.23
(package
(inherit python-hypothesis)
- (version "6.23.2")
+ (version "6.23.4")
(source (origin
(method url-fetch)
(uri (pypi-uri "hypothesis" version))
(sha256
(base32
- "0lqhfrqsd81apchz93pdqfn85kx0p790w8hhd9qq85692rwja6xp"))))))
+ "0wp8i9qmd5wl1sq1l2b97fgliyk5fyphssl6j7q5qn5zjlfgi4qs"))))))
;; This is the last version of Hypothesis that supports Python 2.
(define-public python2-hypothesis
@@ -2158,19 +2137,19 @@ seamlessly into your existing Python unit testing work flow.")
(define-public python-hypothesmith
(package
(name "python-hypothesmith")
- (version "0.1.2")
+ (version "0.1.8")
(source
(origin
(method url-fetch)
(uri (pypi-uri "hypothesmith" version))
(sha256
(base32
- "09331sspknv459xcyn1k0lx5flqlc6gmnwp9370pfvg4kg1zmss6"))))
+ "02j101m5grjrbvrgjap17jsxd1hgawkylmyswcn33vf42mxh9zzr"))))
(build-system python-build-system)
(propagated-inputs
- `(("python-hypothesis" ,python-hypothesis-5.23)
+ `(("python-hypothesis" ,python-hypothesis)
("python-lark-parser" ,python-lark-parser)
- ("python-libcst" ,python-libcst)))
+ ("python-libcst" ,python-libcst-minimal)))
(home-page "https://github.com/Zac-HD/hypothesmith")
(synopsis "Strategies for generating Python programs")
(description
@@ -2181,14 +2160,14 @@ programs, something like CSmith, a random generator of C programs.")
(define-public python-lit
(package
(name "python-lit")
- (version "0.5.1")
+ (version "12.0.1")
(source
(origin
(method url-fetch)
(uri (pypi-uri "lit" version))
(sha256
(base32
- "0z651m3vkbk85y41larnsjxrszkbi58x9gzml3lb6ga7qwcrsg97"))))
+ "01yggsb73s2gbq36xwifxl6k5ll5lkss5rwz59k9h3jnbnn7m5fj"))))
(build-system python-build-system)
(arguments
`(#:phases
@@ -2205,9 +2184,6 @@ style test suites, summarizing their results, and providing indication of
failures.")
(license license:ncsa)))
-(define-public python2-lit
- (package-with-python2 python-lit))
-
(define-public python-pytest-pep8
(package
(name "python-pytest-pep8")
@@ -2220,7 +2196,18 @@ failures.")
"06032agzhw1i9d9qlhfblnl3dw5hcyxhagn7b120zhrszbjzfbh3"))))
(build-system python-build-system)
(arguments
- `(#:tests? #f)) ; Fails with recent pytest and pep8. See upstream issues #8 and #12.
+ `(#:tests? #f ; Fails with recent pytest and pep8. See upstream issues #8 and #12.
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'fix-dependencies
+ (lambda _
+ (substitute* "setup.py"
+ (("'pytest-cache', ") "")))) ; Included in recent pytest
+ (replace 'check
+ (lambda* (#:key tests? inputs outputs #:allow-other-keys)
+ (when tests?
+ (add-installed-pythonpath inputs outputs)
+ (invoke "pytest" "-v")))))))
(native-inputs
`(("python-pytest" ,python-pytest)))
(propagated-inputs
@@ -2305,29 +2292,25 @@ statements in the module it tests.")
(define-public python-pylint
(package
(name "python-pylint")
- (version "2.5.3")
+ (version "2.9.6")
(source
(origin
(method git-fetch)
(uri (git-reference
(url "https://github.com/PyCQA/pylint")
- (commit (string-append "pylint-" version))))
+ (commit (string-append "v" version))))
(file-name (git-file-name name version))
(sha256
- (base32 "04cgbh2z1mygar63plzziyz34yg6bdr4i0g63jp256fgnqwb1bi3"))))
+ (base32 "15yw69v1cj6zkndk60c2g0dgl0khh8bfm1lrwhjffpdjfc7nkc9a"))))
(build-system python-build-system)
- ;; FIXME: Tests are failing since version 2.4.3, see:
- ;; https://github.com/PyCQA/pylint/issues/3198.
- (arguments '(#:tests? #f))
(native-inputs
`(("python-pytest" ,python-pytest)
- ("python-pytest-runner" ,python-pytest-runner)
- ("python-tox" ,python-tox)))
+ ("python-pytest-benchmark" ,python-pytest-benchmark)
+ ("python-pytest-runner" ,python-pytest-runner)))
(propagated-inputs
`(("python-astroid" ,python-astroid)
("python-isort" ,python-isort)
("python-mccabe" ,python-mccabe)
- ("python-six" ,python-six)
("python-toml" ,python-toml)))
(home-page "https://github.com/PyCQA/pylint")
(synopsis "Python source code analyzer which looks for coding standard
@@ -2516,20 +2499,10 @@ backported from Python 2.7 for Python 2.4+.")
("python-pyhamcrest" ,python-pyhamcrest)
("python-pytest" ,python-pytest)))
(propagated-inputs
- `(("python-importlib-metadata" ,python-importlib-metadata)
- ("python-six" ,python-six)
- ("python-parse" ,python-parse)
+ `(("python-parse" ,python-parse)
("python-parse-type" ,python-parse-type)))
(arguments
- '(#:test-target "behave_test"
- #:phases
- (modify-phases %standard-phases
- (add-before 'check 'fix-library-loading
- (lambda _
- ;; Otherwise, tests fail with no module named 'path'
- (setenv "PYTHONPATH" (string-append (getenv "PYTHONPATH") ":"
- (getcwd) "/tasks/_vendor"))
- #t)))))
+ '(#:test-target "behave_test"))
(home-page "https://github.com/behave/behave")
(synopsis "Python behavior-driven development")
(description
@@ -2780,8 +2753,11 @@ retried.")
(sha256
(base32
"05kdzlhs2kvj82pfca13qszszcj6dyrk4b9pbr46x06sq2s4qyls"))))
- (native-inputs
- `(("python-pytest" ,python-pytest)))
+ (native-inputs ;all native inputs are for tests
+ `(("python-pytest-cov" ,python-pytest-cov)
+ ("python-mock" ,python-mock)
+ ("python-pytest" ,python-pytest)
+ ("python-hypothesis" ,python-hypothesis)))
(build-system python-build-system)
(arguments
`(#:phases (modify-phases %standard-phases
@@ -2823,7 +2799,7 @@ portable to just about any platform.")
(define-public libfaketime
(package
(name "libfaketime")
- (version "0.9.8")
+ (version "0.9.9")
(home-page "https://github.com/wolfcw/libfaketime")
(source (origin
(method git-fetch)
@@ -2832,35 +2808,41 @@ portable to just about any platform.")
(commit (string-append "v" version))))
(sha256
(base32
- "1mfdl82ppgbdvy1ny8mb7xii7p0g7awvn4bn36jb8v4r545slmjc"))
+ "1gi1xciqga5hl2xlk7rc3j8wy47ag97pi7ngmdl6ny1d11b2wn1z"))
(file-name (git-file-name name version))))
(build-system gnu-build-system)
(arguments
- '(#:phases (modify-phases %standard-phases
+ `(#:phases (modify-phases %standard-phases
+ (add-after 'unpack 'embed-date-reference
+ (lambda* (#:key inputs #:allow-other-keys)
+ (let ((coreutils (assoc-ref inputs "coreutils")))
+ (substitute* "src/faketime.c"
+ (("\"date\"")
+ (string-append "\"" coreutils "/bin/date\""))))))
(replace 'configure
(lambda* (#:key outputs #:allow-other-keys)
(let ((out (assoc-ref outputs "out")))
- (setenv "CC" "gcc")
+ (setenv "CC" ,(cc-for-target))
(setenv "PREFIX" out)
;; XXX: Without this flag, the CLOCK_REALTIME test hangs
;; indefinitely. See README.packagers for more information.
- ;; Try removing this for future versions of libfaketime.
- (setenv "FAKETIME_COMPILE_CFLAGS" "-DFORCE_MONOTONIC_FIX")
-
- #t)))
+ ;; There are specific instructions to not enable more flags
+ ;; than absolutely needed.
+ ,(if (target-ppc64le?)
+ `(setenv "FAKETIME_COMPILE_CFLAGS"
+ "-DFORCE_MONOTONIC_FIX -DFORCE_PTHREAD_NONVER")
+ `(setenv "FAKETIME_COMPILE_CFLAGS"
+ "-DFORCE_MONOTONIC_FIX")))))
(add-before 'check 'pre-check
(lambda _
(substitute* "test/functests/test_exclude_mono.sh"
- (("/bin/bash") (which "bash")))
-
- ;; Do not fail due to use of 'ftime', which was deprecated in
- ;; glibc 2.31. Remove this for later versions of libfaketime.
- (setenv "FAKETIME_COMPILE_CFLAGS" "-Wno-deprecated-declarations")
- #t)))
+ (("/bin/bash") (which "bash"))))))
#:test-target "test"))
(native-inputs
`(("perl" ,perl))) ;for tests
+ (inputs
+ `(("coreutils" ,coreutils)))
(synopsis "Fake the system time for single applications")
(description
"The libfaketime library allows users to modify the system time that an
@@ -2963,13 +2945,21 @@ grew out of the @dfn{Vc} project.")
(arguments
`(#:phases
(modify-phases %standard-phases
+ (add-after 'unpack 'patch-testsuite
+ (lambda _
+ ;; Time difference is larger than expected.
+ (substitute* "pyfakefs/tests/fake_filesystem_unittest_test.py"
+ (("(\\s+)def test_copy_real_file" all indent)
+ (string-append
+ indent
+ "@unittest.skip('disabled by guix')\n"
+ all)))))
;; The default test suite does not run these extra tests.
(add-after 'check 'check-pytest-plugin
(lambda _
(invoke
"python" "-m" "pytest"
- "pyfakefs/pytest_tests/pytest_plugin_test.py")
- #t)))))
+ "pyfakefs/pytest_tests/pytest_plugin_test.py"))))))
(native-inputs
`(("python-pytest" ,python-pytest)))
(build-system python-build-system)
diff --git a/gnu/packages/chemistry.scm b/gnu/packages/chemistry.scm
index d2ad632d2c..61b213cd1f 100644
--- a/gnu/packages/chemistry.scm
+++ b/gnu/packages/chemistry.scm
@@ -195,8 +195,7 @@ only with Python 2 and NumPy < 1.9.")
(include-dir (string-append out "/include/inchi"))
(lib (string-append out "/lib/inchi"))
(inchi-doc (assoc-ref inputs "inchi-doc"))
- (unzip (string-append (assoc-ref inputs "unzip")
- "/bin/unzip")))
+ (unzip (search-input-file inputs "/bin/unzip")))
(chdir "../../..")
;; Install binary.
(with-directory-excursion "INCHI_EXE/bin/Linux"
diff --git a/gnu/packages/chez.scm b/gnu/packages/chez.scm
index 2d31d764b0..c1591a83ce 100644
--- a/gnu/packages/chez.scm
+++ b/gnu/packages/chez.scm
@@ -114,8 +114,10 @@
;; for docs
("stex" ,stex)
("xorg-rgb" ,xorg-rgb)
- ("texlive" ,(texlive-union (list texlive-latex-oberdiek
- texlive-generic-epsf)))
+ ("texlive" ,(texlive-updmap.cfg (list texlive-dvips-l3backend
+ texlive-epsf
+ texlive-fonts-ec
+ texlive-oberdiek)))
("ghostscript" ,ghostscript)
("netpbm" ,netpbm)))
(native-search-paths
@@ -167,6 +169,7 @@
;; Some makefiles (for tests) don't seem to propagate CC
;; properly, so we take it out of their hands:
(setenv "CC" ,(cc-for-target))
+ (setenv "HOME" "/tmp")
(apply invoke
"./configure"
flags)
@@ -316,11 +319,10 @@ and 32-bit PowerPC architectures.")
(native-inputs
`(("chez-scheme" ,chez-scheme)
("ghostscript" ,ghostscript)
- ("texlive" ,(texlive-union (list texlive-charter
- texlive-latex-oberdiek
- texlive-generic-epsf
+ ("texlive" ,(texlive-updmap.cfg (list texlive-oberdiek
+ texlive-epsf
texlive-metapost
- texlive-fonts-charter
+ texlive-charter
texlive-pdftex
texlive-context
texlive-cm
@@ -334,12 +336,6 @@ and 32-bit PowerPC architectures.")
#:tests? #f ; no tests
#:phases
(modify-phases %standard-phases
- (add-before 'build 'set-HOME
- (lambda _
- ;; FIXME: texlive-union does not find the built
- ;; metafonts, so it tries to generate them in HOME.
- (setenv "HOME" "/tmp")
- #t))
;; This package has a custom "bootstrap" script that
;; is meant to be run from the Makefile.
(delete 'bootstrap)
@@ -382,7 +378,7 @@ programming in Scheme.")
(native-inputs
`(("chez-scheme" ,chez-scheme)
("chez-web" ,chez-web)
- ("texlive" ,(texlive-union (list texlive-pdftex)))))
+ ("texlive" ,(texlive-updmap.cfg (list texlive-pdftex)))))
(arguments
`(#:tests? #f ; no tests
#:phases
diff --git a/gnu/packages/chromium.scm b/gnu/packages/chromium.scm
index 8c37e7b7b1..420c53cf36 100644
--- a/gnu/packages/chromium.scm
+++ b/gnu/packages/chromium.scm
@@ -460,31 +460,6 @@
`(cons "--enable-custom-modes"
,flags))))))
-;; 'make-ld-wrapper' can only work with an 'ld' executable, so we need
-;; this trick to make it wrap 'lld'.
-(define (make-lld-wrapper lld)
- (define lld-as-ld
- (computed-file "lld-ld"
- #~(begin
- (mkdir #$output)
- (mkdir (string-append #$output "/bin"))
- (symlink #$(file-append lld "/bin/lld")
- (string-append #$output "/bin/ld")))))
-
- ;; Create a wrapper for LLD that inserts appropriate -rpath entries.
- (define lld-wrapper
- (make-ld-wrapper "lld-wrapper"
- #:binutils lld-as-ld))
-
- ;; Clang looks for an 'ld.lld' executable, so we need to symlink it back.
- (computed-file "lld-wrapped"
- #~(begin
- (mkdir #$output)
- (mkdir (string-append #$output "/bin"))
- (symlink #$(file-append lld-wrapper "/bin/ld")
- (string-append #$output "/bin/lld"))
- (symlink "lld" (string-append #$output "/bin/ld.lld")))))
-
(define-public ungoogled-chromium
(package
(name "ungoogled-chromium")
@@ -848,7 +823,7 @@
("clang" ,clang-12)
("gn" ,gn)
("gperf" ,gperf)
- ("ld-wrapper" ,(make-lld-wrapper lld))
+ ("ld-wrapper" ,lld-as-ld-wrapper)
("ninja" ,ninja)
("node" ,node-lts)
("pkg-config" ,pkg-config)
@@ -876,7 +851,7 @@
("glib" ,glib)
("gtk+" ,gtk+)
("harfbuzz" ,harfbuzz-3.0)
- ("icu4c" ,icu4c-69)
+ ("icu4c" ,icu4c)
("lcms" ,lcms)
("libevent" ,libevent)
("libffi" ,libffi)
diff --git a/gnu/packages/ci.scm b/gnu/packages/ci.scm
index 7f41512555..652722c74a 100644
--- a/gnu/packages/ci.scm
+++ b/gnu/packages/ci.scm
@@ -168,7 +168,7 @@
`("GUILE_LOAD_COMPILED_PATH" ":" prefix (,objs)))
#t))))))
(inputs
- `(("guile" ,guile-3.0/libgc-7)
+ `(("guile" ,guile-3.0-latest)
("guile-avahi" ,guile-avahi)
("guile-fibers" ,guile-fibers)
("guile-gcrypt" ,guile-gcrypt)
diff --git a/gnu/packages/cmake.scm b/gnu/packages/cmake.scm
index df8885b4dd..3adda91fd3 100644
--- a/gnu/packages/cmake.scm
+++ b/gnu/packages/cmake.scm
@@ -5,10 +5,10 @@
;;; Copyright © 2014 Ian Denhardt <ian@zenhack.net>
;;; Copyright © 2015 Sou Bunnbu <iyzsong@gmail.com>
;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
-;;; Copyright © 2017, 2018, 2020 Marius Bakke <mbakke@fastmail.com>
+;;; Copyright © 2017, 2018, 2020, 2021 Marius Bakke <marius@gnu.org>
;;; Copyright © 2018 Arun Isaac <arunisaac@systemreboot.net>
;;; Copyright © 2018, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
-;;; Copyright © 2019, 2020 Maxim Cournoyer <maxim.cournoyer@gmail.com>
+;;; Copyright © 2019, 2020, 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;; Copyright © 2019 Pierre-Moana Levesque <pierre.moana.levesque@gmail.com>
;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
;;; Copyright © 2021 Ricardo Wurmus <rekado@elephly.net>
@@ -92,7 +92,7 @@ using the CMake build system.")
;;; Build phases shared between 'cmake-bootstrap' and the later variants
;;; that use cmake-build-system.
-(define %common-build-phases
+(define (%common-build-phases)
`((add-after 'unpack 'split-package
;; Remove files that have been packaged in other package recipes.
(lambda _
@@ -100,6 +100,17 @@ using the CMake build system.")
(substitute* "Auxiliary/CMakeLists.txt"
((".*cmake-mode.el.*") ""))
#t))
+ ,@(if (target-x86-32?)
+ '((add-after 'unpack 'skip-cpack-txz-test
+ (lambda _
+ ;; In 'RunCMake.CPack_TXZ', the 'TXZ/THREADED_ALL' test
+ ;; would occasionally fail on i686 with "Internal error
+ ;; initializing compression library: Cannot allocate
+ ;; memory": <https://issues.guix.gnu.org/50617>. Skip it.
+ (substitute* "Tests/RunCMake/CPack/RunCMakeTest.cmake"
+ (("THREADED_ALL \"TXZ;DEB\"")
+ "THREADED_ALL \"DEB\"")))))
+ '())
(add-before 'configure 'patch-bin-sh
(lambda _
;; Replace "/bin/sh" by the right path in... a lot of
@@ -110,7 +121,6 @@ using the CMake build system.")
"Source/cmGlobalXCodeGenerator.cxx"
"Source/cmLocalUnixMakefileGenerator3.cxx"
"Source/cmExecProgramCommand.cxx"
- "Utilities/Release/release_cmake.cmake"
"Tests/CMakeLists.txt"
"Tests/RunCMake/File_Generate/RunCMakeTest.cmake")
(("/bin/sh") (which "sh")))
@@ -120,23 +130,27 @@ using the CMake build system.")
'(;; This test copies libgcc_s.so.1 from GCC and tries to modify its RPATH,
;; but does not cope with the file being read-only.
"BundleUtilities"
- ;; This test requires network access.
- "CTestTestUpload"
+ ;; These tests require network access.
+ "CTestTestUpload" "CMake.FileDownload"
;; This test requires 'ldconfig' which is not available in Guix.
- "RunCMake.install"))
+ "RunCMake.install"
+ ;; This test fails for unknown reason.
+ "RunCMake.file-GET_RUNTIME_DEPENDENCIES"))
(define %preserved-third-party-files
'(;; 'Source/cm_getdate.c' includes archive_getdate.c wholesale, so it must
;; be available along with the required headers.
"Utilities/cmlibarchive/libarchive/archive_getdate.c"
- "Utilities/cmlibarchive/libarchive/archive_getdate.h"))
+ "Utilities/cmlibarchive/libarchive/archive_getdate.h"
+ ;; CMake header wrappers.
+ "Utilities/cm3p"))
;;; The "bootstrap" CMake. It is used to build 'cmake-minimal' below, as well
;;; as any dependencies that need cmake-build-system.
(define-public cmake-bootstrap
(package
(name "cmake-bootstrap")
- (version "3.16.5")
+ (version "3.21.3")
(source (origin
(method url-fetch)
(uri (string-append "https://cmake.org/files/v"
@@ -144,49 +158,7 @@ using the CMake build system.")
"/cmake-" version ".tar.gz"))
(sha256
(base32
- "1z4bb8z6b4dvq5hrvajrf1hyybqay3xybyimf71w1jgcp180nxjz"))
- (modules '((guix build utils)
- (ice-9 ftw)))
- (snippet
- `(begin
- ;; CMake bundles its dependencies in the "Utilities" directory.
- ;; Delete those to ensure the system libraries are used.
- (define preserved-files
- '(,@%preserved-third-party-files
- ;; Use the bundled JsonCpp during bootstrap to work around
- ;; a circular dependency. TODO: JsonCpp can be built with
- ;; Meson instead of CMake, but meson-build-system currently
- ;; does not support cross-compilation.
- "Utilities/cmjsoncpp"
- ;; LibUV is required to bootstrap the initial build system.
- "Utilities/cmlibuv"))
-
- (file-system-fold (lambda (dir stat result) ;enter?
- (or (string=? "Utilities" dir) ;init
- ;; The bundled dependencies are
- ;; distinguished by having a "cm"
- ;; prefix to their upstream names.
- (and (string-prefix? "Utilities/cm" dir)
- (not (member dir preserved-files)))))
- (lambda (file stat result) ;leaf
- (unless (or (member file preserved-files)
- ;; Preserve top-level files.
- (string=? "Utilities"
- (dirname file)))
- (delete-file file)))
- (const #t) ;down
- (lambda (dir stat result) ;up
- (when (equal? (scandir dir) '("." ".."))
- (rmdir dir)))
- (const #t) ;skip
- (lambda (file stat errno result)
- (format (current-error-port)
- "warning: failed to delete ~a: ~a~%"
- file (strerror errno)))
- #t
- "Utilities"
- lstat)
- #t))
+ "0kvrhgbrvm0lv7jshzd4nsvp3d5q1jkgal2d5kj4w4v58bghckfi"))
(patches (search-patches "cmake-curl-certificates.patch"))))
(build-system gnu-build-system)
(arguments
@@ -227,7 +199,7 @@ using the CMake build system.")
" --exclude-regex ^\\(" (string-join skipped-tests "\\|") "\\)$")))
#:phases
(modify-phases %standard-phases
- ,@%common-build-phases
+ ,@(%common-build-phases)
(add-before 'configure 'set-paths
(lambda _
;; Help cmake's bootstrap process to find system libraries
@@ -242,14 +214,13 @@ using the CMake build system.")
(apply invoke "./configure" configure-flags))))))
(inputs
`(("bzip2" ,bzip2)
- ("curl" ,curl-minimal)
+ ("curl" ,curl)
("expat" ,expat)
("file" ,file)
("libarchive" ,libarchive)
,@(if (hurd-target?)
'()
`(("libuv" ,libuv))) ;not supported on the Hurd
- ("ncurses" ,ncurses) ;required for ccmake
("rhash" ,rhash)
("zlib" ,zlib)))
(native-search-paths
@@ -287,17 +258,41 @@ and workspaces that can be used in the compiler environment of your choice.")
(name "cmake-minimal")
(source (origin
(inherit (package-source cmake-bootstrap))
+ ;; Purge CMakes bundled dependencies as they are no longer needed.
+ (modules '((ice-9 ftw)))
(snippet
- (match (origin-snippet (package-source cmake-bootstrap))
- ((_ _ exp ...)
- ;; Now we can delete the remaining software bundles.
- (append `(begin
- (define preserved-files ',%preserved-third-party-files))
- exp))))))
+ `(begin
+ (define preserved-files ',%preserved-third-party-files)
+
+ (file-system-fold (lambda (dir stat result) ;enter?
+ (or (string=? "Utilities" dir) ;init
+ ;; The bundled dependencies are
+ ;; distinguished by having a "cm"
+ ;; prefix to their upstream names.
+ (and (string-prefix? "Utilities/cm" dir)
+ (not (member dir preserved-files)))))
+ (lambda (file stat result) ;leaf
+ (unless (or (member file preserved-files)
+ ;; Preserve top-level files.
+ (string=? "Utilities"
+ (dirname file)))
+ (delete-file file)))
+ (const #t) ;down
+ (lambda (dir stat result) ;up
+ (when (equal? (scandir dir) '("." ".."))
+ (rmdir dir)))
+ (const #t) ;skip
+ (lambda (file stat errno result)
+ (format (current-error-port)
+ "warning: failed to delete ~a: ~a~%"
+ file (strerror errno)))
+ #t
+ "Utilities"
+ lstat)
+ #t))))
(inputs
- `(("curl" ,curl)
- ("jsoncpp" ,jsoncpp)
- ,@(alist-delete "curl" (package-inputs cmake-bootstrap))))
+ `(("jsoncpp" ,jsoncpp)
+ ,@(package-inputs cmake-bootstrap)))
(build-system cmake-build-system)
(arguments
`(#:configure-flags
@@ -311,7 +306,16 @@ and workspaces that can be used in the compiler environment of your choice.")
#:build-type "Release"
#:phases
(modify-phases %standard-phases
- ,@%common-build-phases
+ ,@(%common-build-phases)
+ (add-after 'install 'delete-help-documentation
+ (lambda* (#:key outputs #:allow-other-keys)
+ (delete-file-recursively
+ (string-append (assoc-ref outputs "out")
+ "/share/cmake-"
+ ,(version-major+minor
+ (package-version cmake-bootstrap))
+ "/Help"))
+ #t))
(replace 'check
(lambda* (#:key tests? parallel-tests? #:allow-other-keys)
(let ((skipped-tests (list ,@%common-disabled-tests
@@ -335,39 +339,6 @@ and workspaces that can be used in the compiler environment of your choice.")
(package
(inherit cmake-minimal)
(name "cmake")
- (version "3.21.1")
- ;; TODO: Move the following source field to the cmake-bootstrap package in
- ;; the next rebuild cycle.
- (source (origin
- (inherit (package-source cmake-bootstrap))
- (uri (string-append "https://cmake.org/files/v"
- (version-major+minor version)
- "/cmake-" version ".tar.gz"))
- (sha256
- (base32
- "1m7y9j5lafkrfswsg2vkpx2fz6p6fqpp2pcp2dcz5pylf58r3hzs"))
- (snippet
- (match (origin-snippet (package-source cmake-bootstrap))
- ((_ _ exp ...)
- ;; Now we can delete the remaining software bundles.
- (append `(begin
- (define preserved-files
- '(,@%preserved-third-party-files
- ;; TODO: Move this file to the
- ;; %preserved-third-party-files variable in
- ;; the next rebuild cycle.
- "Utilities/cm3p" ;CMake header wrappers
- ;; Use the bundled JsonCpp during bootstrap
- ;; to work around a circular dependency.
- ;; TODO: JsonCpp can be built with Meson
- ;; instead of CMake, but meson-build-system
- ;; currently does not support
- ;; cross-compilation.
- "Utilities/cmjsoncpp"
- ;; LibUV is required to bootstrap the initial
- ;; build system.
- "Utilities/cmlibuv")))
- exp))))))
(arguments
(substitute-keyword-arguments (package-arguments cmake-minimal)
;; Use cmake-minimal this time.
@@ -389,44 +360,7 @@ and workspaces that can be used in the compiler environment of your choice.")
,flags))
((#:phases phases)
`(modify-phases ,phases
- ;; TODO: Remove this override in the next rebuild cycle and adjust
- ;; the %common-build-phases variable instead: the
- ;; Utilities/Release/release_cmake.cmake file no longer exists in
- ;; version 3.19.0.
- (replace 'patch-bin-sh
- (lambda _
- ;; Replace "/bin/sh" by the right path in... a lot of
- ;; files.
- (substitute*
- '("Modules/CompilerId/Xcode-3.pbxproj.in"
- "Modules/Internal/CPack/CPack.RuntimeScript.in"
- "Source/cmGlobalXCodeGenerator.cxx"
- "Source/cmLocalUnixMakefileGenerator3.cxx"
- "Source/cmExecProgramCommand.cxx"
- "Tests/CMakeLists.txt"
- "Tests/RunCMake/File_Generate/RunCMakeTest.cmake")
- (("/bin/sh") (which "sh")))
- #t))
- ;; TODO: Remove this override in the next rebuild cycle and adjust
- ;; the %common-disabled-tests variable instead.
- (replace 'check
- (lambda* (#:key tests? parallel-tests? #:allow-other-keys)
- (let ((skipped-tests (list ,@%common-disabled-tests
- ;; This test fails for unknown reason.
- "RunCMake.file-GET_RUNTIME_DEPENDENCIES"
- ;; This test fails for unknown reason.
- "ExportImport"
- ;; This test requires the bundled libuv.
- "BootstrapTest")))
- (if tests?
- (begin
- (invoke "ctest" "-j" (if parallel-tests?
- (number->string (parallel-job-count))
- "1")
- "--exclude-regex"
- (string-append "^(" (string-join skipped-tests "|") ")$")))
- (format #t "test suite not run~%"))
- #t)))
+ (delete 'delete-help-documentation)
(add-after 'install 'move-html-doc
(lambda* (#:key outputs #:allow-other-keys)
(let ((out (assoc-ref outputs "out"))
@@ -437,8 +371,10 @@ and workspaces that can be used in the compiler environment of your choice.")
"/html")))
(copy-recursively (string-append out html)
(string-append doc html))
- (delete-file-recursively (string-append out html))
- #t)))))))
+ (delete-file-recursively (string-append out html)))))))))
+ (inputs
+ `(("ncurses" ,ncurses) ;required for ccmake
+ ,@(package-inputs cmake-minimal)))
;; Extra inputs required to build the documentation.
(native-inputs
`(,@(package-native-inputs cmake-minimal)
diff --git a/gnu/packages/code.scm b/gnu/packages/code.scm
index 9bc9771dc1..3720383664 100644
--- a/gnu/packages/code.scm
+++ b/gnu/packages/code.scm
@@ -182,7 +182,7 @@ highlighting your own code that seemed comprehensible when you wrote it.")
(wrap-program
(string-append (assoc-ref outputs "out")
"/share/gtags/script/pygments_parser.py")
- `("PYTHONPATH" ":" prefix (,(getenv "PYTHONPATH"))))))
+ `("GUIX_PYTHONPATH" ":" prefix (,(getenv "GUIX_PYTHONPATH"))))))
(add-after 'install 'post-install
(lambda* (#:key outputs #:allow-other-keys)
;; Install the plugin files in the right place.
@@ -335,6 +335,10 @@ cloc can handle a greater variety of programming languages.")
(base32
"0w1icjqd8hd45rn1y6nbfznk1a6ip54whwbfbhxp7ws2hn3ilqnr"))))
(build-system gnu-build-system)
+ (arguments
+ ;; Required since GCC 10, see:
+ ;; https://gcc.gnu.org/gcc-10/porting_to.html.
+ `(#:configure-flags (list "CFLAGS=-fcommon")))
(native-inputs
`(("pkg-config" ,pkg-config)))
(inputs
@@ -700,7 +704,7 @@ importantly we give you proper follow-symbol and find-references support.")
(substitute* "colormake"
(("colormake\\.pl") (string-append bin "/colormake.pl"))
(("/bin/bash")
- (string-append (assoc-ref %build-inputs "bash") "/bin/sh")))
+ (search-input-file %build-inputs "/bin/sh")))
(install-file "colormake.1" (string-append doc "/man/man1"))
(install-files '("AUTHORS" "BUGS" "ChangeLog" "README") doc)
(install-files '("colormake" "colormake-short" "clmake"
diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm
index e7bd6cf002..e570a95b04 100644
--- a/gnu/packages/commencement.scm
+++ b/gnu/packages/commencement.scm
@@ -1,15 +1,17 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2014 Andreas Enge <andreas@enge.fr>
;;; Copyright © 2012 Nikita Karetnikov <nikita@karetnikov.org>
;;; Copyright © 2014, 2015, 2017 Mark H Weaver <mhw@netris.org>
-;;; Copyright © 2017, 2018, 2019 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2017, 2018, 2019, 2021 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
;;; Copyright © 2018, 2019, 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
-;;; Copyright © 2019, 2020 Marius Bakke <mbakke@fastmail.com>
+;;; Copyright © 2019, 2020, 2021 Marius Bakke <marius@gnu.org>
;;; Copyright © 2020 Timothy Sample <samplet@ngyro.com>
;;; Copyright © 2020 Guy Fleury Iteriteka <gfleury@disroot.org>
+;;; Copyright © 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;; Copyright © 2021 Chris Marusich <cmmarusich@gmail.com>
+;;; Copyright © 2021 Julien Lepiller <julien@lepiller.eu>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -49,12 +51,13 @@
#:use-module (gnu packages shells)
#:use-module (gnu packages texinfo)
#:use-module (gnu packages pkg-config)
- #:use-module (gnu packages rsync)
#:use-module (gnu packages xml)
+ #:use-module (guix gexp)
#:use-module (guix packages)
#:use-module (guix download)
#:use-module (guix build-system gnu)
#:use-module (guix build-system trivial)
+ #:use-module (guix gexp)
#:use-module ((guix licenses) #:prefix license:)
#:use-module (guix memoization)
#:use-module (guix utils)
@@ -116,8 +119,7 @@
(guile-dir (assoc-ref inputs "guile"))
(guile (string-append guile-dir "/bin/guile")))
(invoke guile "--no-auto-compile" source)
- (chdir "bootar")
- #t)))
+ (chdir "bootar"))))
(replace 'configure (bootstrap-configure ,version "." "scripts"))
(replace 'build (bootstrap-build "."))
(replace 'install (bootstrap-install "." "scripts"))))))
@@ -163,8 +165,7 @@ pure Scheme to Tar and decompression in one easy step.")
(symlink (string-append out "/bin/gash")
(string-append out "/bin/sh"))
(symlink (string-append out "/bin/gash")
- (string-append out "/bin/bash"))
- #t)))))))
+ (string-append out "/bin/bash")))))))))
(inputs `(("guile" ,%bootstrap-guile)))
(native-inputs `(("bootar" ,bootar)))))
@@ -190,8 +191,7 @@ pure Scheme to Tar and decompression in one easy step.")
(lambda* (#:key inputs #:allow-other-keys)
(let ((gash (assoc-ref inputs "gash")))
(add-to-load-path (string-append gash "/share/guile/site/"
- (effective-version))))
- #t))
+ (effective-version))))))
(add-before 'configure 'pre-configure
(lambda _
(format #t "Creating gash/commands/testb.scm~%")
@@ -217,8 +217,7 @@ pure Scheme to Tar and decompression in one easy step.")
(copy-file "scripts/template.in" "scripts/[.in")
(substitute* "scripts/[.in"
(("@UTILITY@") "testb"))
- (delete-file "scripts/template.in")
- #t))
+ (delete-file "scripts/template.in")))
(replace 'configure
(bootstrap-configure ,(package-version gash-utils)
"gash" "scripts"))
@@ -247,8 +246,7 @@ pure Scheme to Tar and decompression in one easy step.")
(copy-file (string-append gash-godir "/gash/compat.go")
(string-append godir "/gash/compat.go"))
(copy-recursively (string-append gash-godir "/gash/compat")
- (string-append godir "/gash/compat"))
- #t)))))))
+ (string-append godir "/gash/compat")))))))))
(inputs `(("gash" ,gash-boot)
("guile" ,%bootstrap-guile)))
(native-inputs `(("bootar" ,bootar)))))
@@ -438,8 +436,7 @@ $MES -e '(mescc)' module/mescc.scm -- \"$@\"
(string-suffix? ".s" name))))))
(for-each (lambda (x) (install-file x cache))
(append (objects-in-dir ".")
- (objects-in-dir "mescc-lib"))))
- #t)))))
+ (objects-in-dir "mescc-lib")))))))))
(native-search-paths
(list (search-path-specification
(variable "C_INCLUDE_PATH")
@@ -573,8 +570,7 @@ $MES -e '(mescc)' module/mescc.scm -- \"$@\"
(add-after 'unpack 'scripted-patch
(lambda _
(substitute* "util.c"
- (("^char [*]strlwr" all) (string-append all "_tcc_cannot_handle_dupe")))
- #t))
+ (("^char [*]strlwr" all) (string-append all "_tcc_cannot_handle_dupe")))))
(replace 'build
(lambda _
(let ((files '("bits" "crypt" "deflate" "getopt" "gzip"
@@ -636,13 +632,11 @@ $MES -e '(mescc)' module/mescc.scm -- \"$@\"
(lambda _
(substitute* "build.sh.in"
(("@LIBOBJS@") "getloadavg.o")
- (("@REMOTE@") "stub"))
- #t))
+ (("@REMOTE@") "stub"))))
(add-after 'configure 'configure-fixup
(lambda _
(substitute* "make.h"
- (("^extern long int lseek.*" all) (string-append "// " all)))
- #t))
+ (("^extern long int lseek.*" all) (string-append "// " all)))))
(replace 'build
(lambda _
(invoke "sh" "./build.sh")))
@@ -694,16 +688,14 @@ $MES -e '(mescc)' module/mescc.scm -- \"$@\"
(("uTimBuf[.]" all)
(string-append "// " all))
(("retVal = utime [(] dstName, &uTimBuf [)];" all)
- (string-append "retVal = 0; // " all)))
- #t))
+ (string-append "retVal = 0; // " all)))))
(replace 'configure
(lambda _
(with-output-to-file "utime.h"
(lambda _ (display "
#define fchown(filedes, owner, group) 0
#define fchmod(filedes, mode) 0
-")))
- #t))
+")))))
(replace 'check
(lambda _
(invoke "./bzip2" "--help")))
@@ -759,8 +751,7 @@ $MES -e '(mescc)' module/mescc.scm -- \"$@\"
(setenv "CC" "tcc")
(setenv "LD" "tcc")
(setenv "AR" "tcc -ar")
- (setenv "CFLAGS" "-D _POSIX_VERSION=1")
- #t)))
+ (setenv "CFLAGS" "-D _POSIX_VERSION=1"))))
(add-after 'unpack 'scripted-patch
(lambda _
(substitute* "Makefile.in"
@@ -773,8 +764,7 @@ $MES -e '(mescc)' module/mescc.scm -- \"$@\"
(substitute* "lib/sh/snprintf.c"
(("^#if (defined [(]HAVE_LOCALE_H[)])" all define) (string-append "#if 0 //" define)))
(substitute* "configure"
- ((" egrep") " grep"))
- #t))
+ ((" egrep") " grep"))))
(replace 'configure
(lambda* (#:key configure-flags #:allow-other-keys)
(let ((configure-flags (filter (lambda (x)
@@ -789,20 +779,16 @@ $MES -e '(mescc)' module/mescc.scm -- \"$@\"
(substitute* "config.h"
(("#define GETCWD_BROKEN 1") "#undef GETCWD_BROKEN"))
(let ((config.h (open-file "config.h" "a")))
- (display (string-append
- ;; XXX TODO: remove nested ,(string-append ...) and
- ;; store file name on next rebuild cycle
- ,(string-append "
+ (display "
// tcc: error: undefined symbol 'enable_hostname_completion'
#define enable_hostname_completion(on_or_off) 0
-// /gnu/store/" "cq0cmv35s9dhilx14zaghlc08gpc0hwr-tcc-boot0-0.9.26-6.c004e9a/lib/libc.a: error: 'sigprocmask' defined twice
+// /gnu/store/…-tcc-boot0-0.9.26-6.c004e9a/lib/libc.a: error: 'sigprocmask' defined twice
#define HAVE_POSIX_SIGNALS 1
#define endpwent(x) 0
-"))
+"
config.h)
- (close config.h))
- #t))
+ (close config.h))))
(replace 'check
(lambda _
(invoke "./bash" "--version")))
@@ -812,8 +798,7 @@ $MES -e '(mescc)' module/mescc.scm -- \"$@\"
(bin (string-append out "/bin")))
(mkdir-p bin)
(copy-file "bash" (string-append bin "/bash"))
- (copy-file "bash" (string-append bin "/sh"))
- #t))))))))
+ (copy-file "bash" (string-append bin "/sh"))))))))))
(define tcc-boot
;; The final tcc.
@@ -821,16 +806,11 @@ $MES -e '(mescc)' module/mescc.scm -- \"$@\"
(inherit tcc-boot0)
(name "tcc-boot")
(version "0.9.27")
- (source (origin
- (inherit (package-source tcc))
- ;; `patches' needs XZ
- ;; (patches (search-patches "tcc-boot-0.9.27.patch"))
- ))
+ (source (package-source tcc))
(build-system gnu-build-system)
(inputs '())
(propagated-inputs '())
- (native-inputs `(;;("boot-patch" ,(search-patch "tcc-boot-0.9.27.patch"))
- ("bzip2" ,bzip2-mesboot)
+ (native-inputs `(("bzip2" ,bzip2-mesboot)
,@(%boot-tcc0-inputs)))
(arguments
`(#:implicit-inputs? #f
@@ -846,20 +826,13 @@ $MES -e '(mescc)' module/mescc.scm -- \"$@\"
(copy-file source "tarball.tar.bz2")
(invoke "bzip2" "-d" "tarball.tar.bz2")
(invoke "tar" "xvf" "tarball.tar")
- (chdir (string-append "tcc-" ,version))
- #t))
- ;; no patch yet
- ;; (add-after 'unpack 'apply-boot-patch
- ;; (lambda* (#:key inputs #:allow-other-keys)
- ;; (let ((patch-file (assoc-ref inputs "boot-patch")))
- ;; (invoke "patch" "-p1" "-i" patch-file))))
+ (chdir (string-append "tcc-" ,version))))
(add-after 'unpack 'scripted-patch
(lambda* (#:key inputs #:allow-other-keys)
(substitute* "libtcc.c"
(("s->alacarte_link = 1;" all)
(string-append all "
- s->static_link = 1;")))
- #t))
+ s->static_link = 1;")))))
(replace 'configure
(lambda* (#:key outputs #:allow-other-keys)
(let* ((out (assoc-ref %outputs "out"))
@@ -919,57 +892,8 @@ $MES -e '(mescc)' module/mescc.scm -- \"$@\"
(invoke "tcc" "-ar" "rc" "libtcc1.a" "libtcc1.o")
(copy-file "libtcc1.a" (string-append out "/lib/libtcc1.a"))
(delete-file (string-append out "/lib/tcc/libtcc1.a"))
- (copy-file "libtcc1.a" (string-append out "/lib/tcc/libtcc1.a"))
- #t)))))))))
-
-(define diffutils-mesboot
- ;; The initial diffutils.
- (package
- (inherit diffutils)
- (name "diffutils-mesboot")
- (version "2.7")
- (source (origin
- (method url-fetch)
- (uri (string-append "mirror://gnu/diffutils/diffutils-"
- version ".tar.gz"))
- (sha256
- (base32
- "1mirn5i825bn5w7rh6mgn0r8aj9xqanav95dwcl1b8sn82f4iwnm"))))
- (supported-systems '("i686-linux" "x86_64-linux"))
- (inputs '())
- (propagated-inputs '())
- (native-inputs (%boot-tcc0-inputs))
- (arguments
- `(#:implicit-inputs? #f
- #:guile ,%bootstrap-guile
- #:parallel-build? #f
- #:tests? #f ; check is naive, also checks non-built PROGRAMS
- #:strip-binaries? #f ; no strip yet
- #:phases
- (modify-phases %standard-phases
- (add-before 'configure 'remove-diff3-sdiff
- (lambda* (#:key outputs #:allow-other-keys)
- (substitute* "Makefile.in"
- (("PROGRAMS = .*" all) "PROGRAMS = cmp diff"))))
- (replace 'configure ; needs classic invocation of configure
- (lambda* (#:key configure-flags #:allow-other-keys)
- (let* ((out (assoc-ref %outputs "out"))
- (bash (assoc-ref %build-inputs "bash"))
- (shell (string-append bash "/bin/bash")))
- (setenv "CONFIG_SHELL" shell)
- (setenv "CC" "tcc")
- (setenv "LD" "tcc")
- (format (current-error-port)
- "running ./configure ~a\n" (string-join configure-flags))
- (apply invoke (cons "./configure" configure-flags)))))
- (replace 'install
- (lambda _
- (let* ((out (assoc-ref %outputs "out"))
- (bin (string-append out "/bin")))
- (mkdir-p bin)
- (install-file "cmp" bin)
- (install-file "diff" bin)
- #t))))))))
+ (copy-file "libtcc1.a"
+ (string-append out "/lib/tcc/libtcc1.a")))))))))))
(define patch-mesboot
;; The initial patch.
@@ -1002,8 +926,7 @@ $MES -e '(mescc)' module/mescc.scm -- \"$@\"
;; avoid another segfault
(substitute* "pch.c"
(("while [(]p_end >= 0[)]" all)
- "p_end = -1;\nwhile (0)"))
- #t))
+ "p_end = -1;\nwhile (0)"))))
;; FIXME: no compressing gzip yet
(delete 'compress-documentation))))))
@@ -1039,8 +962,7 @@ $MES -e '(mescc)' module/mescc.scm -- \"$@\"
(bash (assoc-ref %build-inputs "bash"))
(shell (string-append bash "/bin/bash")))
(substitute* "configure"
- (("/bin/sh") shell))
- #t)))
+ (("/bin/sh") shell)))))
(replace 'check
(lambda _
(invoke "./sed" "--version")))
@@ -1048,16 +970,16 @@ $MES -e '(mescc)' module/mescc.scm -- \"$@\"
(lambda _
(let* ((out (assoc-ref %outputs "out"))
(bin (string-append out "/bin")))
- (install-file "sed" bin)
- #t))))))))
+ (install-file "sed" bin)))))))))
(define (%boot-tcc-inputs)
`(("bash" ,bash-mesboot0)
("bzip2" ,bzip2-mesboot)
- ("diffutils" ,diffutils-mesboot)
("gzip" ,gzip-mesboot)
("patch" ,patch-mesboot)
("sed" ,sed-mesboot0)
+ ;; Place lower than sed so we don't override it.
+ ("gash-utils" ,gash-utils-boot)
("tcc" ,tcc-boot)
,@(alist-delete "tcc" (%boot-tcc0-inputs))))
@@ -1105,14 +1027,12 @@ $MES -e '(mescc)' module/mescc.scm -- \"$@\"
(setenv "SHELL" shell)
(setenv "AR" "tcc -ar")
(setenv "RANLIB" "true")
- (setenv "CC" "tcc -D __GLIBC_MINOR__=6")
- #t)))
+ (setenv "CC" "tcc -D __GLIBC_MINOR__=6"))))
(add-after 'unpack 'scripted-patch
(lambda* (#:key inputs #:allow-other-keys)
(substitute* "bfd/configure"
(("^sed -e '/SRC-POTFILES.*" all)
- "echo -e 'all:\\n\\ttrue\\n\\ninstall:\\n\\ttrue\\n' > po/Makefile\n"))
- #t))
+ "echo -e 'all:\\n\\ttrue\\n\\ninstall:\\n\\ttrue\\n' > po/Makefile\n"))))
(replace 'configure ; needs classic invocation of configure
(lambda* (#:key configure-flags #:allow-other-keys)
(format (current-error-port)
@@ -1145,96 +1065,95 @@ $MES -e '(mescc)' module/mescc.scm -- \"$@\"
(supported-systems '("i686-linux" "x86_64-linux"))
(inputs '())
(propagated-inputs '())
- (native-inputs `(("boot-patch" ,(search-patch "gcc-boot-2.95.3.patch"))
- ("binutils" ,binutils-mesboot0)
+ (native-inputs `(("binutils" ,binutils-mesboot0)
,@(%boot-tcc-inputs)))
(outputs '("out"))
(arguments
- `(#:implicit-inputs? #f
- #:guile ,%bootstrap-guile
- #:tests? #f
- #:parallel-build? #f
- #:strip-binaries? #f
- #:configure-flags
- (let ((out (assoc-ref %outputs "out")))
- `("--enable-static"
- "--disable-shared"
- "--disable-werror"
- "--build=i686-unknown-linux-gnu"
- "--host=i686-unknown-linux-gnu"
- ,(string-append "--prefix=" out)))
- #:make-flags
- `("CC=tcc -static -D __GLIBC_MINOR__=6"
- "OLDCC=tcc -static -D __GLIBC_MINOR__=6"
- "CC_FOR_BUILD=tcc -static -D __GLIBC_MINOR__=6"
- "AR=ar"
- "RANLIB=ranlib"
- ,(string-append "LIBGCC2_INCLUDES=-I "
- (assoc-ref %build-inputs "tcc")
- "/include")
- "LANGUAGES=c"
- ,(string-append "BOOT_LDFLAGS="
- " -B" (assoc-ref %build-inputs "tcc")
- "/lib/"))
- #:modules ((guix build gnu-build-system)
- (guix build utils)
- (srfi srfi-1))
- #:phases
- (modify-phases %standard-phases
- (add-after 'unpack 'apply-boot-patch
- (lambda* (#:key inputs #:allow-other-keys)
- (let ((patch-file (assoc-ref inputs "boot-patch")))
- (system* "patch" "--force" "-p1" "-i" patch-file)
- #t)))
- (add-before 'configure 'setenv
- (lambda* (#:key outputs #:allow-other-keys)
- (let* ((out (assoc-ref outputs "out"))
- (bash (assoc-ref %build-inputs "bash"))
- (shell (string-append bash "/bin/bash"))
- (tcc (assoc-ref %build-inputs "tcc"))
- (cppflags " -D __GLIBC_MINOR__=6"))
- (setenv "CONFIG_SHELL" shell)
- (setenv "CPPFLAGS" cppflags)
- (setenv "CC" (string-append "tcc" cppflags))
- (setenv "CC_FOR_BUILD" (string-append "tcc" cppflags))
- (setenv "CPP" (string-append "tcc -E" cppflags))
- (with-output-to-file "config.cache"
- (lambda _
- (display "
+ (list #:implicit-inputs? #f
+ #:guile %bootstrap-guile
+ #:tests? #f
+ #:parallel-build? #f
+ #:strip-binaries? #f
+ #:configure-flags
+ #~(let ((out (assoc-ref %outputs "out")))
+ `("--enable-static"
+ "--disable-shared"
+ "--disable-werror"
+ "--build=i686-unknown-linux-gnu"
+ "--host=i686-unknown-linux-gnu"
+ ,(string-append "--prefix=" out)))
+ #:make-flags
+ #~`("CC=tcc -static -D __GLIBC_MINOR__=6"
+ "OLDCC=tcc -static -D __GLIBC_MINOR__=6"
+ "CC_FOR_BUILD=tcc -static -D __GLIBC_MINOR__=6"
+ "AR=ar"
+ "RANLIB=ranlib"
+ ,(string-append "LIBGCC2_INCLUDES=-I "
+ (assoc-ref %build-inputs "tcc")
+ "/include")
+ "LANGUAGES=c"
+ ,(string-append "BOOT_LDFLAGS="
+ " -B" (assoc-ref %build-inputs "tcc")
+ "/lib/"))
+ #:modules '((guix build gnu-build-system)
+ (guix build utils)
+ (srfi srfi-1))
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'apply-boot-patch
+ (lambda* (#:key inputs #:allow-other-keys)
+ (let ((patch-file
+ #$(local-file
+ (search-patch "gcc-boot-2.95.3.patch"))))
+ (invoke "patch" "--force" "-p1" "-i" patch-file))))
+ (add-before 'configure 'setenv
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (bash (assoc-ref %build-inputs "bash"))
+ (shell (string-append bash "/bin/bash"))
+ (tcc (assoc-ref %build-inputs "tcc"))
+ (cppflags " -D __GLIBC_MINOR__=6"))
+ (setenv "CONFIG_SHELL" shell)
+ (setenv "CPPFLAGS" cppflags)
+ (setenv "CC" (string-append "tcc" cppflags))
+ (setenv "CC_FOR_BUILD" (string-append "tcc" cppflags))
+ (setenv "CPP" (string-append "tcc -E" cppflags))
+ (with-output-to-file "config.cache"
+ (lambda _
+ (display "
ac_cv_c_float_format='IEEE (little-endian)'
"))))))
- ;; gcc-2.95.3
- (replace 'configure ; needs classic invocation of configure
- (lambda* (#:key configure-flags #:allow-other-keys)
- (format (current-error-port)
- "running ./configure ~a\n" (string-join configure-flags))
- (apply invoke "./configure" configure-flags)))
- (add-after 'configure 'remove-info
- (lambda _
- ;; no info at this stage
- (delete-file-recursively "texinfo")
- (invoke "touch" "gcc/cpp.info" "gcc/gcc.info")))
- (add-after 'install 'install2
- (lambda* (#:key outputs #:allow-other-keys)
- (let* ((tcc (assoc-ref %build-inputs "tcc"))
- (tcc-lib (string-append tcc "/lib/x86-mes-gcc"))
- (out (assoc-ref outputs "out"))
- (gcc-dir (string-append
- out "/lib/gcc-lib/i686-unknown-linux-gnu/2.95.3")))
- (mkdir-p "tmp")
- (with-directory-excursion "tmp"
- (invoke "ar" "x" (string-append "../gcc/libgcc2.a"))
- (invoke "ar" "x" (string-append tcc "/lib/libtcc1.a"))
- (apply invoke "ar" "r" (string-append gcc-dir "/libgcc.a")
- (find-files "." "\\.o")))
- (copy-file "gcc/libgcc2.a" (string-append out "/lib/libgcc2.a"))
- (copy-file (string-append tcc "/lib/libtcc1.a")
- (string-append out "/lib/libtcc1.a"))
- (invoke "ar" "x" (string-append tcc "/lib/libtcc1.a"))
- (invoke "ar" "x" (string-append tcc "/lib/libc.a"))
- (invoke "ar" "r" (string-append gcc-dir "/libc.a")
- "libc.o" "libtcc1.o")
- #t))))))
+ ;; gcc-2.95.3
+ (replace 'configure ; needs classic invocation of configure
+ (lambda* (#:key configure-flags #:allow-other-keys)
+ (format (current-error-port)
+ "running ./configure ~a\n" (string-join configure-flags))
+ (apply invoke "./configure" configure-flags)))
+ (add-after 'configure 'remove-info
+ (lambda _
+ ;; no info at this stage
+ (delete-file-recursively "texinfo")
+ (invoke "touch" "gcc/cpp.info" "gcc/gcc.info")))
+ (add-after 'install 'install2
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((tcc (assoc-ref %build-inputs "tcc"))
+ (tcc-lib (string-append tcc "/lib/x86-mes-gcc"))
+ (out (assoc-ref outputs "out"))
+ (gcc-dir (string-append
+ out "/lib/gcc-lib/i686-unknown-linux-gnu/2.95.3")))
+ (mkdir-p "tmp")
+ (with-directory-excursion "tmp"
+ (invoke "ar" "x" (string-append "../gcc/libgcc2.a"))
+ (invoke "ar" "x" (string-append tcc "/lib/libtcc1.a"))
+ (apply invoke "ar" "r" (string-append gcc-dir "/libgcc.a")
+ (find-files "." "\\.o")))
+ (copy-file "gcc/libgcc2.a" (string-append out "/lib/libgcc2.a"))
+ (copy-file (string-append tcc "/lib/libtcc1.a")
+ (string-append out "/lib/libtcc1.a"))
+ (invoke "ar" "x" (string-append tcc "/lib/libtcc1.a"))
+ (invoke "ar" "x" (string-append tcc "/lib/libc.a"))
+ (invoke "ar" "r" (string-append gcc-dir "/libc.a")
+ "libc.o" "libtcc1.o")))))))
(native-search-paths
(list (search-path-specification
(variable "C_INCLUDE_PATH")
@@ -1277,8 +1196,7 @@ ac_cv_c_float_format='IEEE (little-endian)'
(headers (assoc-ref %build-inputs "kernel-headers")))
(mkdir-p include)
(copy-recursively "include" out)
- (copy-recursively headers out)
- #t))))))))
+ (copy-recursively headers out)))))))))
(define gawk-mesboot0
;; The initial Gawk.
@@ -1329,8 +1247,7 @@ ac_cv_c_float_format='IEEE (little-endian)'
(setenv "CPP" "tcc -E")
(setenv "LD" "tcc")
(setenv "ac_cv_func_getpgrp_void" "yes")
- (setenv "ac_cv_func_tzset" "yes"))
- #t))
+ (setenv "ac_cv_func_tzset" "yes"))))
(replace 'configure ; needs classic invocation of configure
(lambda* (#:key configure-flags #:allow-other-keys)
(let* ((out (assoc-ref %outputs "out"))
@@ -1345,8 +1262,7 @@ ac_cv_c_float_format='IEEE (little-endian)'
(let* ((out (assoc-ref outputs "out"))
(bin (string-append out "/bin")))
(install-file "gawk" bin)
- (symlink "gawk" (string-append bin "/awk"))
- #t))))))))
+ (symlink "gawk" (string-append bin "/awk"))))))))))
(define glibc-mesboot0
;; GNU C Library 2.2.5 is the most recent glibc that we managed to build
@@ -1369,87 +1285,84 @@ ac_cv_c_float_format='IEEE (little-endian)'
(supported-systems '("i686-linux" "x86_64-linux"))
(inputs '())
(propagated-inputs '())
- (native-inputs `(("boot-patch" ,(search-patch "glibc-boot-2.2.5.patch"))
- ("system-patch" ,(search-patch "glibc-bootstrap-system-2.2.5.patch"))
- ("headers" ,mesboot-headers)
+ (native-inputs `(("headers" ,mesboot-headers)
,@(%boot-mesboot-core-inputs)))
(outputs '("out"))
(arguments
- `(#:implicit-inputs? #f
- #:guile ,%bootstrap-guile
- #:tests? #f
- #:strip-binaries? #f
- #:validate-runpath? #f ; no dynamic executables
- #:parallel-build? #f ; gcc-2.95.3 ICEs on massively parallel builds
- #:make-flags (list (string-append
- "SHELL="
- (assoc-ref %build-inputs "bash")
- "/bin/sh"))
- #:configure-flags
- (let ((out (assoc-ref %outputs "out"))
- (headers (assoc-ref %build-inputs "headers")))
- `("--disable-shared"
- "--enable-static"
- "--disable-sanity-checks"
- "--build=i686-unknown-linux-gnu"
- "--host=i686-unknown-linux-gnu"
- ,(string-append "--with-headers=" headers "/include")
- "--enable-static-nss"
- "--without-__thread"
- "--without-cvs"
- "--without-gd"
- "--without-tls"
- ,(string-append "--prefix=" out)))
- #:phases
- (modify-phases %standard-phases
- (add-after 'unpack 'apply-boot-patch
- (lambda* (#:key inputs #:allow-other-keys)
- (and (let ((patch (assoc-ref inputs "boot-patch")))
- (invoke "patch" "--force" "-p1" "-i" patch))
- (let ((patch (assoc-ref inputs "system-patch")))
- (invoke "patch" "--force" "-p1" "-i" patch)))))
- (add-before 'configure 'setenv
- (lambda* (#:key outputs #:allow-other-keys)
- (let* ((out (assoc-ref outputs "out"))
- (bash (assoc-ref %build-inputs "bash"))
- (shell (string-append bash "/bin/bash"))
- (gcc (assoc-ref %build-inputs "gcc"))
- (headers (assoc-ref %build-inputs "headers"))
- (cppflags (string-append
- ;;" -D __STDC__=1"
- " -D MES_BOOTSTRAP=1"
- " -D BOOTSTRAP_GLIBC=1"))
- (cflags (string-append " -L " (getcwd))))
- (setenv "CONFIG_SHELL" shell)
- (setenv "SHELL" shell)
- (setenv "CPP" (string-append gcc "/bin/gcc -E " cppflags))
- (setenv "CC" (string-append gcc "/bin/gcc " cppflags cflags))
- #t)))
- (replace 'configure ; needs classic invocation of configure
- (lambda* (#:key configure-flags #:allow-other-keys)
- (format (current-error-port)
- "running ./configure ~a\n" (string-join configure-flags))
- (apply invoke "./configure" configure-flags)))
- (add-after 'configure 'fixup-configure
- (lambda _
- (let* ((out (assoc-ref %outputs "out"))
- (bash (assoc-ref %build-inputs "bash"))
- (shell (string-append bash "/bin/bash")))
- (substitute* "config.make"
- (("INSTALL = scripts/") "INSTALL = $(..)./scripts/"))
- (substitute* "config.make"
- (("INSTALL = scripts/") "INSTALL = $(..)./scripts/")
- (("BASH = ") (string-append
- "SHELL = " shell "
- BASH = ")))
- #t))))))))
+ (list #:implicit-inputs? #f
+ #:guile %bootstrap-guile
+ #:tests? #f
+ #:strip-binaries? #f
+ #:validate-runpath? #f ; no dynamic executables
+ #:parallel-build? #f ; gcc-2.95.3 ICEs on massively parallel builds
+ #:make-flags #~(list (string-append
+ "SHELL="
+ (assoc-ref %build-inputs "bash")
+ "/bin/sh"))
+ #:configure-flags
+ #~(let ((out (assoc-ref %outputs "out"))
+ (headers (assoc-ref %build-inputs "headers")))
+ `("--disable-shared"
+ "--enable-static"
+ "--disable-sanity-checks"
+ "--build=i686-unknown-linux-gnu"
+ "--host=i686-unknown-linux-gnu"
+ ,(string-append "--with-headers=" headers "/include")
+ "--enable-static-nss"
+ "--without-__thread"
+ "--without-cvs"
+ "--without-gd"
+ "--without-tls"
+ ,(string-append "--prefix=" out)))
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'apply-boot-patch
+ (lambda* (#:key inputs #:allow-other-keys)
+ (invoke "patch" "--force" "-p1" "-i"
+ #$(local-file
+ (search-patch "glibc-boot-2.2.5.patch")))
+ (invoke "patch" "--force" "-p1" "-i"
+ #$(local-file
+ (search-patch "glibc-bootstrap-system-2.2.5.patch")))))
+ (add-before 'configure 'setenv
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (bash (assoc-ref %build-inputs "bash"))
+ (shell (string-append bash "/bin/bash"))
+ (gcc (assoc-ref %build-inputs "gcc"))
+ (headers (assoc-ref %build-inputs "headers"))
+ (cppflags (string-append
+ ;;" -D __STDC__=1"
+ " -D MES_BOOTSTRAP=1"
+ " -D BOOTSTRAP_GLIBC=1"))
+ (cflags (string-append " -L " (getcwd))))
+ (setenv "CONFIG_SHELL" shell)
+ (setenv "SHELL" shell)
+ (setenv "CPP" (string-append gcc "/bin/gcc -E " cppflags))
+ (setenv "CC" (string-append gcc "/bin/gcc " cppflags cflags)))))
+ (replace 'configure ; needs classic invocation of configure
+ (lambda* (#:key configure-flags #:allow-other-keys)
+ (format (current-error-port)
+ "running ./configure ~a\n" (string-join configure-flags))
+ (apply invoke "./configure" configure-flags)))
+ (add-after 'configure 'fixup-configure
+ (lambda _
+ (let* ((out (assoc-ref %outputs "out"))
+ (bash (assoc-ref %build-inputs "bash"))
+ (shell (string-append bash "/bin/bash")))
+ (substitute* "config.make"
+ (("INSTALL = scripts/") "INSTALL = $(..)./scripts/"))
+ (substitute* "config.make"
+ (("INSTALL = scripts/") "INSTALL = $(..)./scripts/")
+ (("BASH = ") (string-append
+ "SHELL = " shell "
+ BASH = ")))))))))))
(define gcc-mesboot0
(package
(inherit gcc-core-mesboot0)
(name "gcc-mesboot0")
- (native-inputs `(("boot-patch" ,(search-patch "gcc-boot-2.95.3.patch"))
- ;; Packages are given in an order that's relevant for
+ (native-inputs `(;; Packages are given in an order that's relevant for
;; #include_next purposes.
("libc" ,glibc-mesboot0)
("kernel-headers" ,%bootstrap-linux-libre-headers)
@@ -1457,38 +1370,37 @@ ac_cv_c_float_format='IEEE (little-endian)'
(arguments
(substitute-keyword-arguments (package-arguments gcc-core-mesboot0)
((#:phases phases)
- `(modify-phases ,phases
- (replace 'setenv
- (lambda _
- (setenv "CONFIG_SHELL" (which "sh"))
- (with-output-to-file "config.cache"
- (lambda _
- (display "
+ #~(modify-phases #$phases
+ (replace 'setenv
+ (lambda _
+ (setenv "CONFIG_SHELL" (which "sh"))
+ (with-output-to-file "config.cache"
+ (lambda _
+ (display "
ac_cv_c_float_format='IEEE (little-endian)'
-")))
- #t))
- (replace 'install2
- (lambda* (#:key outputs #:allow-other-keys)
- (let* ((out (assoc-ref outputs "out"))
- (gcc-dir (string-append
- out "/lib/gcc-lib/i686-unknown-linux-gnu/2.95.3")))
- (and
- (mkdir-p "tmp")
- (zero? (system (string-append "set -x; cd tmp && ar x ../gcc/libgcc2.a")))
- (zero? (system (string-append "set -x; cd tmp && ar r " gcc-dir "/libgcc.a *.o")))
- (copy-file "gcc/libgcc2.a" (string-append out "/lib/libgcc2.a"))))))))
+")))))
+ (replace 'install2
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (gcc-dir (string-append
+ out "/lib/gcc-lib/i686-unknown-linux-gnu/2.95.3")))
+ (and
+ (mkdir-p "tmp")
+ (zero? (system (string-append "set -x; cd tmp && ar x ../gcc/libgcc2.a")))
+ (zero? (system (string-append "set -x; cd tmp && ar r " gcc-dir "/libgcc.a *.o")))
+ (copy-file "gcc/libgcc2.a" (string-append out "/lib/libgcc2.a"))))))))
((#:configure-flags configure-flags)
- `(let ((out (assoc-ref %outputs "out")))
- `("--disable-shared"
- "--disable-werror"
- "--build=i686-unknown-linux-gnu"
- "--host=i686-unknown-linux-gnu"
- ,(string-append "--prefix=" out))))
+ #~(let ((out (assoc-ref %outputs "out")))
+ `("--disable-shared"
+ "--disable-werror"
+ "--build=i686-unknown-linux-gnu"
+ "--host=i686-unknown-linux-gnu"
+ ,(string-append "--prefix=" out))))
((#:make-flags make-flags)
- `(let ((gcc (assoc-ref %build-inputs "gcc")))
- `("RANLIB=true"
- ,(string-append "LIBGCC2_INCLUDES=-I " gcc "/include")
- "LANGUAGES=c")))))))
+ #~(let ((gcc (assoc-ref %build-inputs "gcc")))
+ `("RANLIB=true"
+ ,(string-append "LIBGCC2_INCLUDES=-I " gcc "/include")
+ "LANGUAGES=c")))))))
(define (%boot-mesboot0-inputs)
`(("gcc" ,gcc-mesboot0)
@@ -1543,14 +1455,12 @@ ac_cv_c_float_format='IEEE (little-endian)'
(substitute* "configure"
((" /bin/sh") shell)))
(substitute* "Makefile.in"
- (("^SUBDIRS = doc") "SUBDIRS ="))
- #t))
+ (("^SUBDIRS = doc") "SUBDIRS ="))))
(replace 'install
(lambda _
(let* ((out (assoc-ref %outputs "out"))
(bin (string-append out "/bin")))
- (install-file "src/tar" bin)
- #t))))))))
+ (install-file "src/tar" bin)))))))))
(define grep-mesboot
;; The initial grep.
@@ -1587,8 +1497,7 @@ ac_cv_c_float_format='IEEE (little-endian)'
(bin (string-append out "/bin")))
(install-file "grep" bin)
(symlink "grep" (string-append bin "/egrep"))
- (symlink "grep" (string-append bin "/fgrep"))
- #t))))))))
+ (symlink "grep" (string-append bin "/fgrep"))))))))))
(define binutils-mesboot1
(package
@@ -1613,8 +1522,7 @@ ac_cv_c_float_format='IEEE (little-endian)'
(let* ((out (assoc-ref %outputs "out"))
(bash (assoc-ref %build-inputs "bash"))
(shell (string-append bash "/bin/bash")))
- (setenv "CONFIG_SHELL" shell)
- #t)))))))))
+ (setenv "CONFIG_SHELL" shell))))))))))
(define coreutils-mesboot0
(package
@@ -1677,8 +1585,7 @@ ac_cv_c_float_format='IEEE (little-endian)'
(lambda* (#:key outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))
(bin (string-append out "/bin")))
- (install-file "make" bin)
- #t))))))))
+ (install-file "make" bin)))))))))
(define gawk-mesboot
(package
@@ -1713,8 +1620,7 @@ ac_cv_c_float_format='IEEE (little-endian)'
(let* ((out (assoc-ref outputs "out"))
(bin (string-append out "/bin")))
(install-file "gawk" bin)
- (symlink "gawk" (string-append bin "/awk"))
- #t))))))))
+ (symlink "gawk" (string-append bin "/awk"))))))))))
(define sed-mesboot
(package
@@ -1745,8 +1651,7 @@ ac_cv_c_float_format='IEEE (little-endian)'
(shell (string-append bash "/bin/bash")))
(substitute* "testsuite/Makefile.tests"
(("^SHELL = /bin/sh")
- (string-append "SHELL = " shell)))
- #t))))))))
+ (string-append "SHELL = " shell)))))))))))
(define bash-mesboot
(package
@@ -1789,14 +1694,12 @@ ac_cv_c_float_format='IEEE (little-endian)'
(add-after 'unpack 'scripted-patch
(lambda _
(substitute* "shell.c"
- ((";;") ";"))
- #t))
+ ((";;") ";"))))
(add-before 'configure 'setenv
(lambda _
(setenv "AWK" "gawk")
(setenv "LIBS" "-lc -lnss_files -lnss_dns -lresolv")
- (setenv "gl_cv_func_rename_dest_works" "yes")
- #t))
+ (setenv "gl_cv_func_rename_dest_works" "yes")))
(add-after 'configure 'configure-fixups
(lambda _
(let ((config.h (open-file "config.h" "a")))
@@ -1804,8 +1707,7 @@ ac_cv_c_float_format='IEEE (little-endian)'
#define enable_hostname_completion(on_or_off) 0
")
config.h)
- (close config.h))
- #t))
+ (close config.h))))
(replace 'check
(lambda _
(invoke "./bash" "--version")))
@@ -1815,8 +1717,7 @@ ac_cv_c_float_format='IEEE (little-endian)'
(bin (string-append out "/bin")))
(mkdir-p bin)
(copy-file "bash" (string-append bin "/bash"))
- (copy-file "bash" (string-append bin "/sh"))
- #t))))))))
+ (copy-file "bash" (string-append bin "/sh"))))))))))
(define (%boot-mesboot1-inputs)
`(("bash" ,bash-mesboot)
@@ -1832,38 +1733,28 @@ ac_cv_c_float_format='IEEE (little-endian)'
"gawk" "grep" "guile" "make" "sed" "tar"))))
(define gmp-boot
- (package
- (inherit gmp)
- (version "4.3.2")
- (source (origin
- (method url-fetch)
- (uri (string-append "mirror://gnu/gmp/gmp-" version
- ".tar.gz"))
- (sha256 (base32
- "15rwq54fi3s11izas6g985y9jklm3xprfsmym3v1g6xr84bavqvv"))))))
+ (let ((version "4.3.2"))
+ (origin
+ (method url-fetch)
+ (uri (string-append "mirror://gnu/gmp/gmp-" version ".tar.gz"))
+ (sha256
+ (base32 "15rwq54fi3s11izas6g985y9jklm3xprfsmym3v1g6xr84bavqvv")))))
(define mpfr-boot
- (package
- (inherit mpfr)
- (version "2.4.2")
- (source (origin
- (method url-fetch)
- (uri (string-append "mirror://gnu/mpfr/mpfr-" version
- ".tar.gz"))
- (sha256 (base32
- "0dxn4904dra50xa22hi047lj8kkpr41d6vb9sd4grca880c7wv94"))))))
+ (let ((version "2.4.2"))
+ (origin
+ (method url-fetch)
+ (uri (string-append "mirror://gnu/mpfr/mpfr-" version ".tar.gz"))
+ (sha256
+ (base32 "0dxn4904dra50xa22hi047lj8kkpr41d6vb9sd4grca880c7wv94")))))
(define mpc-boot
- (package
- (inherit mpc)
- (version "1.0.3")
- (source (origin
- (method url-fetch)
- (uri (string-append
- "mirror://gnu/mpc/mpc-" version ".tar.gz"))
- (sha256
- (base32
- "1hzci2zrrd7v3g1jk35qindq05hbl0bhjcyyisq9z209xb3fqzb1"))))))
+ (let ((version "1.0.3"))
+ (origin
+ (method url-fetch)
+ (uri (string-append "mirror://gnu/mpc/mpc-" version ".tar.gz"))
+ (sha256
+ (base32 "1hzci2zrrd7v3g1jk35qindq05hbl0bhjcyyisq9z209xb3fqzb1")))))
(define gcc-core-mesboot1
;; GCC 4.6.4 is the latest modular distribution. This package is not
@@ -1880,114 +1771,112 @@ ac_cv_c_float_format='IEEE (little-endian)'
version "/gcc-core-" version ".tar.gz"))
(sha256
(base32
- "173kdb188qg79pcz073cj9967rs2vzanyjdjyxy9v0xb0p5sad75"))
- ;; Patch needs XZ
- ;; (patches (search-patches "gcc-boot-4.6.4.patch"))
- ))
- (inputs `(("gmp-source" ,(package-source gmp-boot))
- ("mpfr-source" ,(package-source mpfr-boot))
- ("mpc-source" ,(package-source mpc-boot))))
- (native-inputs `(("boot-patch" ,(search-patch "gcc-boot-4.6.4.patch"))
- ,@(%boot-mesboot1-inputs)))
- (arguments
- `(#:implicit-inputs? #f
- #:guile ,%bootstrap-guile
- #:tests? #f
- #:modules ((guix build gnu-build-system)
- (guix build utils)
- (srfi srfi-1))
- #:parallel-build? #f ; for debugging
- #:make-flags
- (let* ((libc (assoc-ref %build-inputs "libc"))
- (ldflags (string-append
- "-B" libc "/lib "
- "-Wl,-dynamic-linker "
- "-Wl," libc
- ,(glibc-dynamic-linker "i686-linux"))))
- (list (string-append "LDFLAGS=" ldflags)
- (string-append "LDFLAGS_FOR_TARGET=" ldflags)))
- #:configure-flags
- (let ((out (assoc-ref %outputs "out"))
- (glibc (assoc-ref %build-inputs "libc")))
- (list (string-append "--prefix=" out)
- "--build=i686-unknown-linux-gnu"
- "--host=i686-unknown-linux-gnu"
- (string-append "--with-native-system-header-dir=" glibc "/include")
- (string-append "--with-build-sysroot=" glibc "/include")
- "--disable-bootstrap"
- "--disable-decimal-float"
- "--disable-libatomic"
- "--disable-libcilkrts"
- "--disable-libgomp"
- "--disable-libitm"
- "--disable-libmudflap"
- "--disable-libquadmath"
- "--disable-libsanitizer"
- "--disable-libssp"
- "--disable-libvtv"
- "--disable-lto"
- "--disable-lto-plugin"
- "--disable-multilib"
- "--disable-plugin"
- "--disable-threads"
- "--enable-languages=c"
- "--enable-static"
- "--disable-shared"
- "--enable-threads=single"
- "--disable-libstdcxx-pch"
- "--disable-build-with-cxx"))
- #:phases
- (modify-phases %standard-phases
- (add-after 'unpack 'apply-boot-patch
- (lambda* (#:key inputs #:allow-other-keys)
- (let ((patch-file (assoc-ref inputs "boot-patch")))
- (format (current-error-port) "patch file=~s\n" patch-file)
- (system* "patch" "--force" "-p1" "-i" patch-file))
- #t))
- ;; c&p from commencement.scm:gcc-boot0
- (add-after 'unpack 'unpack-gmp&co
- (lambda* (#:key inputs #:allow-other-keys)
- (let ((gmp (assoc-ref %build-inputs "gmp-source"))
- (mpfr (assoc-ref %build-inputs "mpfr-source"))
- (mpc (assoc-ref %build-inputs "mpc-source")))
-
- ;; To reduce the set of pre-built bootstrap inputs, build
- ;; GMP & co. from GCC.
- (for-each (lambda (source)
- (or (invoke "tar" "xvf" source)
- (error "failed to unpack tarball"
- source)))
- (list gmp mpfr mpc))
-
- ;; Create symlinks like `gmp' -> `gmp-x.y.z'.
- ,@(map (lambda (lib)
- ;; Drop trailing letters, as gmp-6.0.0a unpacks
- ;; into gmp-6.0.0.
- `(symlink ,(string-trim-right
- (package-full-name lib "-")
- char-set:letter)
- ,(package-name lib)))
- (list gmp-boot mpfr-boot mpc-boot))
- #t)))
- (add-before 'configure 'setenv
- (lambda* (#:key outputs #:allow-other-keys)
- (let* ((out (assoc-ref outputs "out"))
- (binutils (assoc-ref %build-inputs "binutils"))
- (bash (assoc-ref %build-inputs "bash"))
- (gcc (assoc-ref %build-inputs "gcc"))
- (glibc (assoc-ref %build-inputs "libc"))
- (kernel-headers (assoc-ref %build-inputs "kernel-headers")))
- (setenv "CONFIG_SHELL" (string-append bash "/bin/sh"))
- (setenv "C_INCLUDE_PATH" (string-append
- gcc "/lib/gcc-lib/i686-unknown-linux-gnu/2.95.3/include"
- ":" kernel-headers "/include"
- ":" glibc "/include"
- ":" (getcwd) "/mpfr/src"))
- (setenv "LIBRARY_PATH" (string-append glibc "/lib"
- ":" gcc "/lib"))
- (format (current-error-port) "C_INCLUDE_PATH=~a\n" (getenv "C_INCLUDE_PATH"))
- (format (current-error-port) "LIBRARY_PATH=~a\n" (getenv "LIBRARY_PATH"))
- #t))))))))
+ "173kdb188qg79pcz073cj9967rs2vzanyjdjyxy9v0xb0p5sad75"))))
+ (inputs `(("gmp-source" ,gmp-boot)
+ ("mpfr-source" ,mpfr-boot)
+ ("mpc-source" ,mpc-boot)))
+ (native-inputs (%boot-mesboot1-inputs))
+ (arguments
+ (list #:implicit-inputs? #f
+ #:guile %bootstrap-guile
+ #:tests? #f
+ #:modules '((guix build gnu-build-system)
+ (guix build utils)
+ (srfi srfi-1))
+ #:parallel-build? #f ; for debugging
+ #:make-flags
+ #~(let* ((libc (assoc-ref %build-inputs "libc"))
+ (ldflags (string-append
+ "-B" libc "/lib "
+ "-Wl,-dynamic-linker "
+ "-Wl," libc
+ #$(glibc-dynamic-linker "i686-linux"))))
+ (list (string-append "LDFLAGS=" ldflags)
+ (string-append "LDFLAGS_FOR_TARGET=" ldflags)))
+ #:configure-flags
+ #~(let ((out (assoc-ref %outputs "out"))
+ (glibc (assoc-ref %build-inputs "libc")))
+ (list (string-append "--prefix=" out)
+ "--build=i686-unknown-linux-gnu"
+ "--host=i686-unknown-linux-gnu"
+ (string-append "--with-native-system-header-dir=" glibc "/include")
+ (string-append "--with-build-sysroot=" glibc "/include")
+ "--disable-bootstrap"
+ "--disable-decimal-float"
+ "--disable-libatomic"
+ "--disable-libcilkrts"
+ "--disable-libgomp"
+ "--disable-libitm"
+ "--disable-libmudflap"
+ "--disable-libquadmath"
+ "--disable-libsanitizer"
+ "--disable-libssp"
+ "--disable-libvtv"
+ "--disable-lto"
+ "--disable-lto-plugin"
+ "--disable-multilib"
+ "--disable-plugin"
+ "--disable-threads"
+ "--enable-languages=c"
+ "--enable-static"
+ "--disable-shared"
+ "--enable-threads=single"
+ "--disable-libstdcxx-pch"
+ "--disable-build-with-cxx"))
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'apply-boot-patch
+ (lambda* (#:key inputs #:allow-other-keys)
+ (let ((patch-file
+ #$(local-file
+ (search-patch "gcc-boot-4.6.4.patch"))))
+ (invoke "patch" "--force" "-p1" "-i" patch-file))))
+ ;; c&p from commencement.scm:gcc-boot0
+ (add-after 'unpack 'unpack-gmp&co
+ (lambda* (#:key inputs #:allow-other-keys)
+ (let ((gmp (assoc-ref %build-inputs "gmp-source"))
+ (mpfr (assoc-ref %build-inputs "mpfr-source"))
+ (mpc (assoc-ref %build-inputs "mpc-source")))
+
+ ;; To reduce the set of pre-built bootstrap inputs, build
+ ;; GMP & co. from GCC.
+ (for-each (lambda (source)
+ (or (invoke "tar" "xvf" source)
+ (error "failed to unpack tarball"
+ source)))
+ (list gmp mpfr mpc))
+
+ ;; Create symlinks like `gmp' -> `gmp-x.y.z'.
+ #$@(map (lambda (lib package)
+ ;; Drop trailing letters, as gmp-6.0.0a unpacks
+ ;; into gmp-6.0.0.
+ #~(symlink #$(string-trim-right
+ (basename
+ (origin-actual-file-name lib)
+ ".tar.gz")
+ char-set:letter)
+ #$package))
+ (list gmp-boot mpfr-boot mpc-boot)
+ '("gmp" "mpfr" "mpc")))))
+ (add-before 'configure 'setenv
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (binutils (assoc-ref %build-inputs "binutils"))
+ (bash (assoc-ref %build-inputs "bash"))
+ (gcc (assoc-ref %build-inputs "gcc"))
+ (glibc (assoc-ref %build-inputs "libc"))
+ (kernel-headers (assoc-ref %build-inputs "kernel-headers")))
+ (setenv "CONFIG_SHELL" (string-append bash "/bin/sh"))
+ (setenv "C_INCLUDE_PATH" (string-append
+ gcc "/lib/gcc-lib/i686-unknown-linux-gnu/2.95.3/include"
+ ":" kernel-headers "/include"
+ ":" glibc "/include"
+ ":" (getcwd) "/mpfr/src"))
+ (setenv "LIBRARY_PATH" (string-append glibc "/lib"
+ ":" gcc "/lib"))
+ (format (current-error-port) "C_INCLUDE_PATH=~a\n" (getenv "C_INCLUDE_PATH"))
+ (format (current-error-port) "LIBRARY_PATH=~a\n"
+ (getenv "LIBRARY_PATH"))))))))))
(define gcc-mesboot1
(package
@@ -2007,31 +1896,29 @@ ac_cv_c_float_format='IEEE (little-endian)'
(arguments
(substitute-keyword-arguments (package-arguments gcc-core-mesboot1)
((#:configure-flags configure-flags)
- `(let ((out (assoc-ref %outputs "out")))
- `("--enable-languages=c,c++"
- ,@(filter
- (negate (lambda (x) (string-prefix? "--enable-languages=" x)))
- ,configure-flags))))
+ #~(let ((out (assoc-ref %outputs "out")))
+ `("--enable-languages=c,c++"
+ ,@(filter
+ (negate (lambda (x) (string-prefix? "--enable-languages=" x)))
+ #$configure-flags))))
((#:phases phases)
- `(modify-phases ,phases
- (add-before 'unpack 'unpack-g++
- (lambda _
- (let ((source-g++ (assoc-ref %build-inputs "gcc-g++")))
- (invoke "tar" "xvf" source-g++))
- #t))
- (replace 'setenv
- (lambda _
- (setenv "CONFIG_SHELL" (which "sh"))
-
- ;; Allow MPFR headers to be found.
- (setenv "C_INCLUDE_PATH"
- (string-append (getcwd) "/mpfr/src:"
- (getenv "C_INCLUDE_PATH")))
-
- ;; Set the C++ search path so that C headers can be found as
- ;; libstdc++ is being compiled.
- (setenv "CPLUS_INCLUDE_PATH" (getenv "C_INCLUDE_PATH"))
- #t))))))))
+ #~(modify-phases #$phases
+ (add-before 'unpack 'unpack-g++
+ (lambda _
+ (let ((source-g++ (assoc-ref %build-inputs "gcc-g++")))
+ (invoke "tar" "xvf" source-g++))))
+ (replace 'setenv
+ (lambda _
+ (setenv "CONFIG_SHELL" (which "sh"))
+
+ ;; Allow MPFR headers to be found.
+ (setenv "C_INCLUDE_PATH"
+ (string-append (getcwd) "/mpfr/src:"
+ (getenv "C_INCLUDE_PATH")))
+
+ ;; Set the C++ search path so that C headers can be found as
+ ;; libstdc++ is being compiled.
+ (setenv "CPLUS_INCLUDE_PATH" (getenv "C_INCLUDE_PATH"))))))))))
(define (%boot-mesboot2-inputs)
`(("gcc" ,gcc-mesboot1)
@@ -2172,8 +2059,7 @@ ac_cv_c_float_format='IEEE (little-endian)'
(substitute* "gprof/Makefile.in"
(("^SUBDIRS = po") "SUBDIRS ="))
(substitute* "ld/Makefile.in"
- (("^SUBDIRS = po") "SUBDIRS ="))
- #t)))))))
+ (("^SUBDIRS = po") "SUBDIRS =")))))))))
(define (%boot-mesboot3-inputs)
`(("binutils" ,binutils-mesboot)
@@ -2201,92 +2087,89 @@ ac_cv_c_float_format='IEEE (little-endian)'
(arguments
(substitute-keyword-arguments (package-arguments glibc-mesboot0)
((#:configure-flags configure-flags)
- `(let ((out (assoc-ref %outputs "out"))
- (headers (assoc-ref %build-inputs "headers")))
- (list
- (string-append "--prefix=" out)
- "--disable-obsolete-rpc"
- "--host=i686-unknown-linux-gnu"
- (string-append "--with-headers=" headers "/include")
- "--enable-static-nss"
- "--with-pthread"
- "--without-cvs"
- "--without-gd"
- "--enable-add-ons=nptl"
- ;; avoid: configure: error: confusing output from nm -u
- "libc_cv_predef_stack_protector=no")))
+ #~(let ((out (assoc-ref %outputs "out"))
+ (headers (assoc-ref %build-inputs "headers")))
+ (list
+ (string-append "--prefix=" out)
+ "--disable-obsolete-rpc"
+ "--host=i686-unknown-linux-gnu"
+ (string-append "--with-headers=" headers "/include")
+ "--enable-static-nss"
+ "--with-pthread"
+ "--without-cvs"
+ "--without-gd"
+ "--enable-add-ons=nptl"
+ ;; avoid: configure: error: confusing output from nm -u
+ "libc_cv_predef_stack_protector=no")))
((#:make-flags make-flags)
- '(list "install-bootstrap-headers=yes" "install-headers"))
+ #~(list "install-bootstrap-headers=yes" "install-headers"))
((#:phases phases)
- `(modify-phases ,phases
- (delete 'apply-boot-patch)
- (delete 'fixup-configure)
- (delete 'set-path)
- (replace 'unpack
- (lambda* (#:key source #:allow-other-keys)
- (invoke "tar" "xvf" source)
- (chdir (string-append "glibc-" ,version))
- #t))
- (replace 'setenv
- (lambda* (#:key inputs #:allow-other-keys)
- (let* ((headers (assoc-ref inputs "headers"))
- (libc (assoc-ref inputs "libc"))
- (gcc (assoc-ref inputs "gcc"))
- (cppflags (string-append
- " -I " (getcwd) "/nptl/sysdeps/pthread/bits"
- " -D BOOTSTRAP_GLIBC=1"))
- (cflags (string-append " -L " (getcwd)
- " -L " libc "/lib")))
- (setenv "libc_cv_friendly_stddef" "yes")
- (setenv "CONFIG_SHELL" (which "sh"))
- (setenv "SHELL" (which "sh"))
-
- (setenv "CPP" (string-append gcc "/bin/gcc -E " cppflags))
- (setenv "CC" (string-append gcc "/bin/gcc " cppflags cflags))
- (setenv "LD" "gcc")
-
- ;; avoid -fstack-protector
- (setenv "libc_cv_ssp" "false")
- (substitute* "configure"
- (("/bin/pwd") "pwd"))
- #t)))
- (replace 'install
- (lambda* (#:key outputs make-flags #:allow-other-keys)
- (let ((kernel-headers (assoc-ref %build-inputs "kernel-headers"))
- (out (assoc-ref outputs "out")))
- (and (apply invoke "make" make-flags)
- (copy-recursively kernel-headers out)
- #t))))
- (replace 'configure
- (lambda* (#:key configure-flags #:allow-other-keys)
- (format (current-error-port) "running ../configure ~a\n" (string-join configure-flags))
- (mkdir-p "build")
- (chdir "build")
- (apply invoke "../configure" configure-flags)))
- (add-after 'configure 'remove-sunrpc
- (lambda _
- (let* ((out (assoc-ref %outputs "out"))
- (bash (assoc-ref %build-inputs "bash"))
- (shell (string-append bash "/bin/bash")))
-
- (let ((Makefile (open-file "Makefile" "a")))
- (display (string-append "
+ #~(modify-phases #$phases
+ (delete 'apply-boot-patch)
+ (delete 'fixup-configure)
+ (delete 'set-path)
+ (replace 'unpack
+ (lambda* (#:key source #:allow-other-keys)
+ (invoke "tar" "xvf" source)
+ (chdir (string-append "glibc-" #$version))))
+ (replace 'setenv
+ (lambda* (#:key inputs #:allow-other-keys)
+ (let* ((headers (assoc-ref inputs "headers"))
+ (libc (assoc-ref inputs "libc"))
+ (gcc (assoc-ref inputs "gcc"))
+ (cppflags (string-append
+ " -I " (getcwd) "/nptl/sysdeps/pthread/bits"
+ " -D BOOTSTRAP_GLIBC=1"))
+ (cflags (string-append " -L " (getcwd)
+ " -L " libc "/lib")))
+ (setenv "libc_cv_friendly_stddef" "yes")
+ (setenv "CONFIG_SHELL" (which "sh"))
+ (setenv "SHELL" (which "sh"))
+
+ (setenv "CPP" (string-append gcc "/bin/gcc -E " cppflags))
+ (setenv "CC" (string-append gcc "/bin/gcc " cppflags cflags))
+ (setenv "LD" "gcc")
+
+ ;; avoid -fstack-protector
+ (setenv "libc_cv_ssp" "false")
+ (substitute* "configure"
+ (("/bin/pwd") "pwd")))))
+ (replace 'install
+ (lambda* (#:key outputs make-flags #:allow-other-keys)
+ (let ((kernel-headers (assoc-ref %build-inputs "kernel-headers"))
+ (out (assoc-ref outputs "out")))
+ (apply invoke "make" make-flags)
+ (copy-recursively kernel-headers out))))
+ (replace 'configure
+ (lambda* (#:key configure-flags #:allow-other-keys)
+ (format (current-error-port) "running ../configure ~a\n"
+ (string-join configure-flags))
+ (mkdir-p "build")
+ (chdir "build")
+ (apply invoke "../configure" configure-flags)))
+ (add-after 'configure 'remove-sunrpc
+ (lambda _
+ (let* ((out (assoc-ref %outputs "out"))
+ (bash (assoc-ref %build-inputs "bash"))
+ (shell (string-append bash "/bin/bash")))
+
+ (let ((Makefile (open-file "Makefile" "a")))
+ (display (string-append "
SHELL := " shell "
")
- Makefile)
- (close Makefile))
- (substitute* "../Makefile"
- (("^SHELL := /bin/sh") (string-append "SHELL := " shell)))
- (substitute* "../Makeconfig"
- (("^SHELL := /bin/sh") (string-append "SHELL := " shell)))
- (substitute* "../elf/Makefile"
- (("^SHELL := /bin/sh") (string-append "SHELL := " shell)))
- (invoke "make" (string-append (getcwd) "/sysd-sorted" ))
- (substitute* "sysd-sorted"
- ((" sunrpc") " ")
- ((" nis") " "))
- #t)))))))))
+ Makefile)
+ (close Makefile))
+ (substitute* "../Makefile"
+ (("^SHELL := /bin/sh") (string-append "SHELL := " shell)))
+ (substitute* "../Makeconfig"
+ (("^SHELL := /bin/sh") (string-append "SHELL := " shell)))
+ (substitute* "../elf/Makefile"
+ (("^SHELL := /bin/sh") (string-append "SHELL := " shell)))
+ (invoke "make" (string-append (getcwd) "/sysd-sorted" ))
+ (substitute* "sysd-sorted"
+ ((" sunrpc") " ")
+ ((" nis") " ")))))))))))
(define glibc-mesboot
(package
@@ -2298,18 +2181,17 @@ SHELL := " shell "
`(#:validate-runpath? #f ; fails when using --enable-shared
,@(substitute-keyword-arguments (package-arguments glibc-headers-mesboot)
((#:make-flags make-flags)
- `(let ((bash (assoc-ref %build-inputs "bash")))
- (list (string-append "SHELL=" bash "/bin/sh"))))
+ #~(let ((bash (assoc-ref %build-inputs "bash")))
+ (list (string-append "SHELL=" bash "/bin/sh"))))
((#:phases phases)
- `(modify-phases ,phases
- (replace 'install
- (lambda* (#:key outputs make-flags #:allow-other-keys)
- (let* ((kernel-headers (assoc-ref %build-inputs "kernel-headers"))
- (out (assoc-ref outputs "out"))
- (install-flags (cons "install" make-flags)))
- (and (apply invoke "make" install-flags)
- (copy-recursively kernel-headers out)
- #t)))))))))))
+ #~(modify-phases #$phases
+ (replace 'install
+ (lambda* (#:key outputs make-flags #:allow-other-keys)
+ (let* ((kernel-headers (assoc-ref %build-inputs "kernel-headers"))
+ (out (assoc-ref outputs "out"))
+ (install-flags (cons "install" make-flags)))
+ (apply invoke "make" install-flags)
+ (copy-recursively kernel-headers out)))))))))))
(define (%boot-mesboot4-inputs)
`(("libc" ,glibc-mesboot)
@@ -2364,8 +2246,7 @@ exec " gcc "/bin/" program
"g++"
"i686-unknown-linux-gnu-cpp"
"i686-unknown-linux-gnu-gcc"
- "i686-unknown-linux-gnu-g++"))
- #t)))
+ "i686-unknown-linux-gnu-g++")))))
(replace 'check
(lambda* (#:key outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))
@@ -2380,81 +2261,80 @@ exec " gcc "/bin/" program
(version (package-version gcc-4.9))
(source (bootstrap-origin (package-source gcc-4.9)))
(native-inputs `(("gcc-wrapper" ,gcc-mesboot1-wrapper)
- ("gcc" ,gcc-mesboot1)
("headers" ,glibc-headers-mesboot)
,@(%boot-mesboot4-inputs)))
(arguments
`(#:validate-runpath? #f
,@(substitute-keyword-arguments (package-arguments gcc-mesboot1)
((#:configure-flags configure-flags)
- `(let ((out (assoc-ref %outputs "out"))
- (glibc (assoc-ref %build-inputs "libc")))
- (list (string-append "--prefix=" out)
- "--build=i686-unknown-linux-gnu"
- "--host=i686-unknown-linux-gnu"
-
- "--with-host-libstdcxx=-lsupc++"
-
- (string-append "--with-native-system-header-dir=" glibc "/include")
- (string-append "--with-build-sysroot=" glibc "/include")
-
- "--disable-bootstrap"
- "--disable-decimal-float"
- "--disable-libatomic"
- "--disable-libcilkrts"
- "--disable-libgomp"
- "--disable-libitm"
- "--disable-libmudflap"
- "--disable-libquadmath"
- "--disable-libsanitizer"
- "--disable-libssp"
- "--disable-libvtv"
- "--disable-lto"
- "--disable-lto-plugin"
- "--disable-multilib"
- "--disable-plugin"
- "--disable-threads"
- "--enable-languages=c,c++"
-
- "--enable-static"
- "--enable-shared"
- "--enable-threads=single"
-
- ;; No pre-compiled libstdc++ headers, to save space.
- "--disable-libstdcxx-pch"
-
- ;; for libcpp ...
- "--disable-build-with-cxx")))
+ #~(let ((out (assoc-ref %outputs "out"))
+ (glibc (assoc-ref %build-inputs "libc")))
+ (list (string-append "--prefix=" out)
+ "--build=i686-unknown-linux-gnu"
+ "--host=i686-unknown-linux-gnu"
+
+ "--with-host-libstdcxx=-lsupc++"
+
+ (string-append "--with-native-system-header-dir=" glibc "/include")
+ (string-append "--with-build-sysroot=" glibc "/include")
+
+ "--disable-bootstrap"
+ "--disable-decimal-float"
+ "--disable-libatomic"
+ "--disable-libcilkrts"
+ "--disable-libgomp"
+ "--disable-libitm"
+ "--disable-libmudflap"
+ "--disable-libquadmath"
+ "--disable-libsanitizer"
+ "--disable-libssp"
+ "--disable-libvtv"
+ "--disable-lto"
+ "--disable-lto-plugin"
+ "--disable-multilib"
+ "--disable-plugin"
+ "--disable-threads"
+ "--enable-languages=c,c++"
+
+ "--enable-static"
+ "--enable-shared"
+ "--enable-threads=single"
+
+ ;; No pre-compiled libstdc++ headers, to save space.
+ "--disable-libstdcxx-pch"
+
+ ;; for libcpp ...
+ "--disable-build-with-cxx")))
((#:phases phases)
- `(modify-phases ,phases
- (delete 'apply-boot-patch)
- (delete 'unpack-g++) ; sadly, gcc-4.9.4 does not provide
- ; modular core/language downloads
- (replace 'setenv
- (lambda* (#:key outputs #:allow-other-keys)
- (let* ((out (assoc-ref outputs "out"))
- (binutils (assoc-ref %build-inputs "binutils"))
- (bash (assoc-ref %build-inputs "bash"))
- (gcc (assoc-ref %build-inputs "gcc"))
- (glibc (assoc-ref %build-inputs "libc"))
- (kernel-headers (assoc-ref %build-inputs "kernel-headers")))
- (setenv "CONFIG_SHELL" (string-append bash "/bin/sh"))
- (setenv "C_INCLUDE_PATH" (string-append
- gcc "/lib/gcc-lib/i686-unknown-linux-gnu/4.6.4/include"
- ":" kernel-headers "/include"
- ":" glibc "/include"
- ":" (getcwd) "/mpfr/src"))
- (setenv "CPLUS_INCLUDE_PATH" (string-append
- gcc "/lib/gcc-lib/i686-unknown-linux-gnu/4.6.4/include"
- ":" kernel-headers "/include"
- ":" glibc "/include"
- ":" (getcwd) "/mpfr/src"))
- (setenv "LIBRARY_PATH" (string-append glibc "/lib"
- ":" gcc "/lib"))
- (format (current-error-port) "C_INCLUDE_PATH=~a\n" (getenv "C_INCLUDE_PATH"))
- (format (current-error-port) "CPLUS_INCLUDE_PATH=~a\n" (getenv "CPLUS_INCLUDE_PATH"))
- (format (current-error-port) "LIBRARY_PATH=~a\n" (getenv "LIBRARY_PATH"))
- #t))))))))))
+ #~(modify-phases #$phases
+ (delete 'apply-boot-patch)
+ (delete 'unpack-g++) ; sadly, gcc-4.9.4 does not provide
+ ; modular core/language downloads
+ (replace 'setenv
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (binutils (assoc-ref %build-inputs "binutils"))
+ (bash (assoc-ref %build-inputs "bash"))
+ (gcc (assoc-ref %build-inputs "gcc"))
+ (glibc (assoc-ref %build-inputs "libc"))
+ (kernel-headers (assoc-ref %build-inputs "kernel-headers")))
+ (setenv "CONFIG_SHELL" (string-append bash "/bin/sh"))
+ (setenv "C_INCLUDE_PATH" (string-append
+ gcc "/lib/gcc-lib/i686-unknown-linux-gnu/4.6.4/include"
+ ":" kernel-headers "/include"
+ ":" glibc "/include"
+ ":" (getcwd) "/mpfr/src"))
+ (setenv "CPLUS_INCLUDE_PATH" (string-append
+ gcc "/lib/gcc-lib/i686-unknown-linux-gnu/4.6.4/include"
+ ":" kernel-headers "/include"
+ ":" glibc "/include"
+ ":" (getcwd) "/mpfr/src"))
+ (setenv "LIBRARY_PATH" (string-append glibc "/lib"
+ ":" gcc "/lib"))
+ (format (current-error-port) "C_INCLUDE_PATH=~a\n" (getenv "C_INCLUDE_PATH"))
+ (format (current-error-port) "CPLUS_INCLUDE_PATH=~a\n" (getenv "CPLUS_INCLUDE_PATH"))
+ (format (current-error-port) "LIBRARY_PATH=~a\n"
+ (getenv "LIBRARY_PATH"))))))))))))
(define gcc-mesboot-wrapper
;; We need this so gcc-mesboot can be used to create shared binaries that
@@ -2506,6 +2386,7 @@ exec " gcc "/bin/" program
(define gnu-make-boot0
(package
(inherit gnu-make)
+ (outputs (delete "debug" (package-outputs gnu-make)))
(source (bootstrap-origin (package-source gnu-make)))
(name "make-boot0")
(arguments
@@ -2517,7 +2398,16 @@ exec " gcc "/bin/" program
;; The generated config.status has some problems due to the
;; bootstrap environment. Disable dependency tracking to work
;; around it.
- `(cons "--disable-dependency-tracking" ,flags))
+ `(cons "--disable-dependency-tracking"
+
+ ;; 'glibc-bootstrap' on non-x86 platforms has a buggy
+ ;; 'posix_spawn'. Thus, disable it. See
+ ;; <https://bugs.gnu.org/49367>.
+ ,(match (%current-system)
+ ((or "i686-linux" "x86_64-linux")
+ flags)
+ (_
+ `(cons "--disable-posix-spawn" ,flags)))))
((#:phases phases)
`(modify-phases ,phases
(replace 'build
@@ -2527,8 +2417,7 @@ exec " gcc "/bin/" program
(lambda* (#:key outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))
(bin (string-append out "/bin")))
- (install-file "make" bin)
- #t))))))))
+ (install-file "make" bin)))))))))
(native-inputs '()) ; no need for 'pkg-config'
(inputs (%bootstrap-inputs+toolchain))))
@@ -2549,6 +2438,7 @@ exec " gcc "/bin/" program
(define coreutils-boot0
(package
(inherit coreutils)
+ (outputs (delete "debug" (package-outputs coreutils)))
(source (bootstrap-origin (package-source coreutils)))
(name "coreutils-boot0")
(native-inputs `())
@@ -2565,6 +2455,9 @@ exec " gcc "/bin/" program
(package
(inherit diffutils)
(name "diffutils-boot0")
+ (source (origin
+ (inherit (package-source diffutils))
+ (patches '()))) ;patches for tests unneeded here
(native-inputs `())
(inputs
`(("make" ,gnu-make-boot0)
@@ -2594,6 +2487,8 @@ exec " gcc "/bin/" program
,@(%bootstrap-inputs+toolchain)))
(arguments
`(#:implicit-inputs? #f
+ ;; Ignore test failure in gnulib for armhf/aarch64.
+ #:tests? ,(not (target-arm?))
#:guile ,%bootstrap-guile
;; The build system assumes we have done a mistake when time_t is 32-bit
@@ -2608,7 +2503,20 @@ exec " gcc "/bin/" program
((or "arm-linux" "aarch64-linux")
''("--disable-dependency-tracking"))
(_ ''()))
- ,flags)))))))
+ ,flags))
+ ((#:phases phases '%standard-phases)
+ `(modify-phases ,phases
+ ;; 'test-fnmatch' fails when using glibc-mesboot@2.16, due
+ ;; to incorrect handling of the [:alpha:] regexp character
+ ;; class. Ignore it.
+ ,@(if (member (%current-system)
+ '("x86_64-linux" "i686-linux"))
+ '((add-before 'check 'skip-fnmatch-test
+ (lambda _
+ (substitute* "gnulib-tests/Makefile"
+ (("^XFAIL_TESTS =")
+ "XFAIL_TESTS = test-fnmatch ")))))
+ '()))))))))
(define file
(package
@@ -2640,7 +2548,7 @@ exec " gcc "/bin/" program
(define gawk-boot0
(package
- (inherit patch)
+ (inherit gawk)
(source (bootstrap-origin (package-source gawk)))
(name "gawk-boot0")
(native-inputs '())
@@ -2753,8 +2661,7 @@ exec " gcc "/bin/" program
(with-directory-excursion (string-append out "/bin")
(for-each (lambda (name)
(symlink name (remove-triplet-prefix name)))
- (scandir "." has-triplet-prefix?)))
- #t))))
+ (scandir "." has-triplet-prefix?)))))))
,@(substitute-keyword-arguments (package-arguments binutils)
((#:configure-flags cf)
@@ -2789,8 +2696,7 @@ exec " gcc "/bin/" program
;; fail, which in turn confuses the configure script.
(lambda _
(substitute* "libstdc++-v3/configure"
- (("g\\+\\+ -v") "true"))
- #t))))))
+ (("g\\+\\+ -v") "true"))))))))
(_ (package-arguments lib)))))
(inputs (%boot0-inputs))
(native-inputs '()))))
@@ -2799,6 +2705,7 @@ exec " gcc "/bin/" program
(package
(inherit gcc)
(name "gcc-cross-boot0")
+ (outputs (delete "debug" (package-outputs gcc)))
(source (bootstrap-origin (package-source gcc)))
(arguments
`(#:guile ,%bootstrap-guile
@@ -2819,13 +2726,6 @@ exec " gcc "/bin/" program
"--disable-shared"
"--enable-languages=c,c++"
- ;; boot-triplet inserts "guix" in the triplet.
- ,@(if (equal? "powerpc64le-guix-linux-gnu" (boot-triplet))
- ;; On POWER9 (little endian) glibc needs the
- ;; 128-bit long double type.
- '("--with-long-double-128")
- '())
-
;; libstdc++ cannot be built at this stage
;; ("Link tests are not allowed after
;; GCC_NO_EXECUTABLES.").
@@ -2879,8 +2779,7 @@ exec " gcc "/bin/" program
(package-full-name lib "-")
char-set:letter)
,(package-name lib)))
- (list gmp-6.0 mpfr mpc))
- #t)))
+ (list gmp-6.0 mpfr mpc)))))
,(match (%current-system)
((or "i686-linux" "x86_64-linux")
'(add-before 'configure 'fix-libcc1
@@ -2893,8 +2792,7 @@ exec " gcc "/bin/" program
(assoc-ref inputs "gcc") "/lib")))
;; XXX: "g++ -v" is broken (see also libstdc++ above).
(substitute* "libcc1/configure"
- (("g\\+\\+ -v") "true"))
- #t)))
+ (("g\\+\\+ -v") "true")))))
(_ '(add-before 'configure 'return-true
(lambda _ #t))))
(add-after 'install 'symlink-libgcc_eh
@@ -2906,8 +2804,7 @@ exec " gcc "/bin/" program
(string-append out "/lib/gcc/"
,(boot-triplet)
"/" ,(package-version gcc))
- (symlink "libgcc.a" "libgcc_eh.a"))
- #t))))))))
+ (symlink "libgcc.a" "libgcc_eh.a"))))))))))
(inputs `(("gmp-source" ,(bootstrap-origin (package-source gmp-6.0)))
("mpfr-source" ,(bootstrap-origin (package-source mpfr)))
@@ -2948,8 +2845,7 @@ exec " gcc "/bin/" program
(lambda _
(substitute* "Configure"
(("^libswanted=(.*)pthread" _ before)
- (string-append "libswanted=" before)))
- #t))))
+ (string-append "libswanted=" before)))))))
;; Do not configure with '-Dusethreads' since pthread
;; support is missing.
((#:configure-flags configure-flags)
@@ -2992,6 +2888,15 @@ exec " gcc "/bin/" program
"RANLIB=ranlib -D"))
"V=1")
+ ;; 'glibc-bootstrap' on non-x86 platforms has a buggy 'posix_spawn'.
+ ;; Thus, use the Gnulib replacement instead. See
+ ;; <https://bugs.gnu.org/49367>.
+ ,@(match (%current-system)
+ ((or "i686-linux" "x86_64-linux")
+ '())
+ (_
+ '(#:configure-flags '("gl_cv_func_posix_spawn_works=no"))))
+
,@(package-arguments bison)))))
(define flex-boot0
@@ -3006,15 +2911,6 @@ exec " gcc "/bin/" program
#:guile ,%bootstrap-guile
#:tests? #f))))
-(define rsync-boot0
- (package
- (inherit rsync)
- (native-inputs `(("perl" ,perl-boot0)))
- (inputs (%boot0-inputs))
- (arguments
- `(#:implicit-inputs? #f
- #:guile ,%bootstrap-guile))))
-
(define-syntax define/system-dependent
(lambda (s)
"Bind IDENTIFIER to EXP, where the value of EXP is known to depend on
@@ -3050,9 +2946,6 @@ memoized as a function of '%current-system'."
;; Flex and Bison are required since version 4.16.
("flex" ,flex-boot0)
("bison" ,bison-boot0)
-
- ;; Rsync is required since version 5.3.
- ("rsync" ,rsync-boot0)
,@(%boot0-inputs)))))
(define with-boot0
@@ -3155,6 +3048,7 @@ memoized as a function of '%current-system'."
(package
(inherit expat)
(inputs (%boot0-inputs))
+ (outputs '("out"))
(arguments
;; XXX: Linking 'runtestscpp' fails with things like:
;;
@@ -3169,6 +3063,7 @@ memoized as a function of '%current-system'."
;; Since we're not passing the right -Wl,-rpath flags, build the
;; static library to avoid RUNPATH validation failure.
`(cons "--disable-shared" ,flags))
+ ((#:phases phases) '%standard-phases)
((#:tests? _ #f) #f))))))
(define python-boot0
@@ -3195,54 +3090,54 @@ memoized as a function of '%current-system'."
(substitute* "Modules/Setup.dist"
;; Link Expat instead of embedding the bundled one.
(("^#pyexpat.*") "pyexpat pyexpat.c -lexpat\n"))
- #t)))))
+ ;; Delete windows binaries
+ (for-each delete-file
+ (find-files "Lib/distutils/command" ".*.exe$"))
+ (for-each delete-file
+ (find-files "Lib/ensurepip" ".*.whl$")))))))
(inputs
`(,@(%boot0-inputs)
("expat" ,expat-sans-tests))) ;remove OpenSSL, zlib, etc.
- (native-inputs '()) ;and pkg-config
+ (native-inputs ;and pkg-config
+ `(("sitecustomize.py" ,(local-file (search-auxiliary-file
+ "python/sitecustomize.py")))))
(arguments
`(#:implicit-inputs? #f
#:guile ,%bootstrap-guile
-
- ,@(substitute-keyword-arguments (package-arguments python-minimal)
- ;; Disable features that cannot be built at this stage.
- ((#:configure-flags _ ''())
- `(list "--without-ensurepip"
- "--without-threads"))
- ;; Clear #:make-flags, such that changes to the regular
- ;; Python package won't interfere with this one.
- ((#:make-flags _ ''()) ''())
- ((#:phases phases)
- ;; Remove the 'apply-alignment-patch' phase if present to avoid
- ;; rebuilding this package. TODO: for the next rebuild cycle,
- ;; consider inlining all the arguments instead of inheriting to
- ;; make it easier to patch Python without risking a full rebuild.
- ;; Or better yet, change to 'python-on-guile'.
- `(modify-phases ,@(list (match phases
- (('modify-phases original-phases
- changes ...
- ('add-after unpack apply-alignment-patch _))
- `(modify-phases ,original-phases ,@changes))
- (_ phases)))
- (add-before 'configure 'disable-modules
- (lambda _
- (substitute* "setup.py"
- ;; Disable ctypes, since it requires libffi.
- (("extensions\\.append\\(ctypes\\)") "")
- ;; Prevent the 'ossaudiodev' extension from being
- ;; built, since it requires Linux headers.
- (("'linux', ") ""))
- #t))
- (delete 'set-TZDIR)
- ,@(if (hurd-system?)
- `((add-before 'build 'fix-regen
- (lambda* (#:key inputs #:allow-other-keys)
- (let ((libc (assoc-ref inputs "libc")))
- (substitute* "Lib/plat-generic/regen"
- (("/usr/include/") (string-append libc "/include/")))
- #t))))
- '())))
- ((#:tests? _ #f) #f))))))
+ ;; Running the tests won't work because we lack several required
+ ;; modules (OpenSSL, etc).
+ #:tests? #f
+ ;; Disable features that cannot be built at this stage.
+ #:configure-flags '("--without-ensurepip" "--without-threads")
+ #:phases
+ (modify-phases %standard-phases
+ (add-before 'configure 'patch-lib-shells
+ (lambda _
+ (substitute* '("Lib/subprocess.py"
+ "Lib/distutils/tests/test_spawn.py"
+ "Lib/test/support/__init__.py"
+ "Lib/test/test_subprocess.py")
+ (("/bin/sh") (which "sh")))))
+ (add-before 'configure 'disable-modules
+ (lambda _
+ (substitute* "setup.py"
+ ;; Disable ctypes, since it requires libffi.
+ (("extensions\\.append\\(ctypes\\)") "")
+ ;; Prevent the 'ossaudiodev' extension from being
+ ;; built, since it requires Linux headers.
+ (("'linux', ") ""))))
+ ,@(if (hurd-system?)
+ `((add-before 'build 'fix-regen
+ (lambda* (#:key inputs #:allow-other-keys)
+ (let ((libc (assoc-ref inputs "libc")))
+ (substitute* "Lib/plat-generic/regen"
+ (("/usr/include/")
+ (string-append libc "/include/")))))))
+ '())
+ (add-after 'install 'install-sitecustomize.py
+ ,(customize-site version)))))
+ (native-search-paths
+ (list (guix-pythonpath-search-path version)))))
(define/system-dependent ld-wrapper-boot0
;; The first 'ld' wrapper, defined with 'define/system-dependent' because
@@ -3272,6 +3167,7 @@ memoized as a function of '%current-system'."
(package
(inherit glibc)
(name "glibc-intermediate")
+ (outputs (delete "debug" (package-outputs glibc)))
(source (bootstrap-origin (package-source glibc)))
(arguments
`(#:guile ,%bootstrap-guile
@@ -3289,9 +3185,9 @@ memoized as a function of '%current-system'."
`(modify-phases ,phases
(add-before 'configure 'pre-configure
(lambda* (#:key inputs #:allow-other-keys)
- ;; Don't clobber CPATH with the bootstrap libc.
- (setenv "NATIVE_CPATH" (getenv "CPATH"))
- (unsetenv "CPATH")
+ ;; Don't clobber include paths with the bootstrap libc.
+ (unsetenv "C_INCLUDE_PATH")
+ (unsetenv "CPLUS_INCLUDE_PATH")
;; Tell 'libpthread' where to find 'libihash' on Hurd systems.
,@(if (hurd-system?)
@@ -3301,25 +3197,13 @@ memoized as a function of '%current-system'."
(string-append "LDLIBS-pthread.so = "
(assoc-ref %build-inputs "kernel-headers")
"/lib/libihash.a\n"))))
- '())
-
- ;; 'rpcgen' needs native libc headers to be built.
- (substitute* "sunrpc/Makefile"
- (("sunrpc-CPPFLAGS =.*" all)
- (string-append "CPATH = $(NATIVE_CPATH)\n"
- "export CPATH\n"
- all "\n")))
- #t)))))))
+ '()))))))))
(propagated-inputs `(("kernel-headers" ,(kernel-headers-boot0))))
(native-inputs
`(("bison" ,bison-boot0)
("texinfo" ,texinfo-boot0)
("perl" ,perl-boot0)
- ("python" ,python-boot0)
- ,@(if (target-powerpc?)
- `(("powerpc64le-patch" ,@(search-patches
- "glibc-ldd-powerpc.patch")))
- '())))
+ ("python" ,python-boot0)))
(inputs
`( ;; The boot inputs. That includes the bootstrap libc. We don't want
;; it in $CPATH, hence the 'pre-configure' phase above.
@@ -3330,9 +3214,6 @@ memoized as a function of '%current-system'."
`(("mig" ,mig-boot0))
'())
- ;; A native GCC is needed to build `cross-rpcgen'.
- ("native-gcc" ,@(assoc-ref (%boot0-inputs) "gcc"))
-
;; Here, we use the bootstrap Bash, which is not satisfactory
;; because we don't want to depend on bootstrap tools.
("static-bash" ,@(assoc-ref (%boot0-inputs) "bash"))))))
@@ -3380,9 +3261,7 @@ exec ~a/bin/~a-~a -B~a/lib -Wl,-dynamic-linker -Wl,~a/~a \"$@\"~%"
triplet "-" tool)
tool))
'("ar" "ranlib"))
- (for-each wrap-program '("gcc" "g++")))
-
- #t))))
+ (for-each wrap-program '("gcc" "g++")))))))
(native-inputs
`(("binutils" ,binutils)
("gcc" ,gcc)
@@ -3445,16 +3324,14 @@ exec ~a/bin/~a-~a -B~a/lib -Wl,-dynamic-linker -Wl,~a/~a \"$@\"~%"
;; Build only the tools.
(add-after 'unpack 'chdir
(lambda _
- (chdir "gettext-tools")
- #t))
+ (chdir "gettext-tools")))
;; Some test programs require pthreads, which we don't have.
(add-before 'configure 'no-test-programs
(lambda _
(substitute* "tests/Makefile.in"
(("^PROGRAMS =.*$")
- "PROGRAMS =\n"))
- #t)))))))
+ "PROGRAMS =\n")))))))))
(define glibc-final
;; The final glibc, which embeds the statically-linked Bash built above.
@@ -3470,10 +3347,6 @@ exec ~a/bin/~a-~a -B~a/lib -Wl,-dynamic-linker -Wl,~a/~a \"$@\"~%"
;; This time we need 'msgfmt' to install all the libc.mo files.
(native-inputs `(,@(package-native-inputs glibc-final-with-bootstrap-bash)
- ,@(if (target-powerpc?)
- `(("powerpc64le-patch" ,@(search-patches
- "glibc-ldd-powerpc.patch")))
- '())
("gettext" ,gettext-boot0)))
(propagated-inputs
@@ -3484,7 +3357,7 @@ exec ~a/bin/~a-~a -B~a/lib -Wl,-dynamic-linker -Wl,~a/~a \"$@\"~%"
;; if 'allowed-references' were per-output.
(arguments
`(#:allowed-references
- ((,gcc-boot0 "lib")
+ (,(gexp-input gcc-boot0 "lib")
,(kernel-headers-boot0)
,static-bash-for-glibc
,@(if (hurd-system?)
@@ -3635,8 +3508,7 @@ exec ~a/bin/~a-~a -B~a/lib -Wl,-dynamic-linker -Wl,~a/~a \"$@\"~%"
(package-full-name lib "-")
char-set:letter)
,(package-name lib)))
- (list gmp-6.0 mpfr mpc))
- #t))))))))
+ (list gmp-6.0 mpfr mpc))))))))))
;; This time we want Texinfo, so we get the manual. Add
;; STATIC-BASH-FOR-GLIBC so that it's used in the final shebangs of
@@ -3712,6 +3584,13 @@ exec ~a/bin/~a-~a -B~a/lib -Wl,-dynamic-linker -Wl,~a/~a \"$@\"~%"
#:guile guile-final
#:bash bash-final))
+(define-public ld-gold-wrapper
+ (make-ld-wrapper "ld-gold-wrapper"
+ #:binutils binutils-gold
+ #:linker "ld.gold"
+ #:guile guile-final
+ #:bash bash-final))
+
(define (%boot5-inputs)
;; Now with UTF-8 locales. Remember that the bootstrap binaries were built
;; with an older libc, which cannot load the new locale format. See
@@ -3925,7 +3804,7 @@ is the GNU Compiler Collection.")
(make-gcc-toolchain gcc-6))
(define-public gcc-toolchain-7
- gcc-toolchain)
+ (make-gcc-toolchain gcc-7))
(define-public gcc-toolchain-8
(make-gcc-toolchain gcc-8))
@@ -3934,7 +3813,7 @@ is the GNU Compiler Collection.")
(make-gcc-toolchain gcc-9))
(define-public gcc-toolchain-10
- (make-gcc-toolchain gcc-10))
+ gcc-toolchain)
(define-public gcc-toolchain-11
(make-gcc-toolchain gcc-11))
diff --git a/gnu/packages/compression.scm b/gnu/packages/compression.scm
index 787359eac5..5fe559e294 100644
--- a/gnu/packages/compression.scm
+++ b/gnu/packages/compression.scm
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2012, 2013, 2014, 2015, 2017, 2019, 2020 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2012, 2013, 2014, 2015, 2017, 2019, 2020, 2021 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2013 Andreas Enge <andreas@enge.fr>
;;; Copyright © 2014, 2015, 2018 Mark H Weaver <mhw@netris.org>
;;; Copyright © 2015 Taylan Ulrich Bayırlı/Kammer <taylanbayirli@gmail.com>
@@ -32,6 +32,7 @@
;;; Copyright © 2020 Léo Le Bouter <lle-bout@zaclys.net>
;;; Copyright © 2021 Antoine Côté <antoine.cote@posteo.net>
;;; Copyright © 2021 Vincent Legoll <vincent.legoll@gmail.com>
+;;; Copyright © 2021 Simon Tournier <zimon.toutoune@gmail.com>
;;; Copyright © 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;; Copyright © 2021 Ahmad Jarara <git@ajarara.io>
;;;
@@ -485,7 +486,7 @@ compressed with pbzip2 can be decompressed with bzip2).")
(define-public xz
(package
(name "xz")
- (version "5.2.4")
+ (version "5.2.5")
(source (origin
(method url-fetch)
(uri (list (string-append "http://tukaani.org/xz/xz-" version
@@ -494,7 +495,7 @@ compressed with pbzip2 can be decompressed with bzip2).")
version ".tar.gz")))
(sha256
(base32
- "0ibi2zsfaz6l756spjwc5rayf4ckgc9hwmy8qinppcyk4svz64mm"))))
+ "045s9agl3bpv3swlwydhgsqh7791957vmgw2plw8f1rks07r3x7n"))))
(build-system gnu-build-system)
(arguments
`(#:phases
@@ -545,9 +546,9 @@ than gzip and 15 % smaller output than bzip2.")
(modify-phases %standard-phases
(add-before 'check 'set-up-test-environment
(lambda* (#:key inputs #:allow-other-keys)
- (setenv "TZDIR" (string-append (assoc-ref inputs "tzdata")
- "/share/zoneinfo"))
- #t)))))
+ (setenv "TZDIR"
+ (search-input-directory inputs
+ "share/zoneinfo")))))))
(native-inputs
`(("tzdata" ,tzdata-for-tests)))
(home-page "https://fragglet.github.com/lhasa/")
@@ -612,14 +613,14 @@ some compression ratio).")
(define-public lzip
(package
(name "lzip")
- (version "1.21")
+ (version "1.22")
(source (origin
(method url-fetch)
(uri (string-append "mirror://savannah/lzip/lzip-"
version ".tar.gz"))
(sha256
(base32
- "12qdcw5k1cx77brv9yxi1h4dzwibhfmdpigrj43nfk8nscwm12z4"))))
+ "0j59hx72258334rmkwn57ahr6s69nlrx0a5ip1jw2fbiwr12sd63"))))
(build-system gnu-build-system)
(home-page "https://www.nongnu.org/lzip/lzip.html")
(synopsis "Lossless data compressor based on the LZMA algorithm")
@@ -1223,11 +1224,12 @@ well as bzip2.")
#:phases
(modify-phases %standard-phases
(add-after 'unpack 'unpack-third_party-subprojects
- (lambda* (#:key inputs #:allow-other-keys)
+ (lambda* (#:key native-inputs inputs #:allow-other-keys)
(with-directory-excursion "third_party"
(for-each (lambda (subproject)
(let* ((input (string-append subproject "-source"))
- (source (assoc-ref inputs input)))
+ (source (assoc-ref (or native-inputs inputs)
+ input)))
(with-directory-excursion subproject
;; Take advantage of the coincidence that both
;; use GIT-FETCH, which creates a directory.
@@ -1278,8 +1280,8 @@ for most inputs, but the resulting compressed files are anywhere from 20% to
(let ((gcc (assoc-ref (or native-inputs inputs) "gcc")))
(setenv "CPLUS_INCLUDE_PATH"
(string-join
- (cons* (string-append (assoc-ref inputs "libcxx+libcxxabi")
- "/include/c++/v1")
+ (cons* (search-input-directory inputs
+ "/include/c++/v1")
;; Hide GCC's C++ headers so that they do not interfere with
;; the Clang headers.
(delete (string-append gcc "/include/c++")
@@ -1320,7 +1322,10 @@ for most inputs, but the resulting compressed files are anywhere from 20% to
(find-files "Utils/file_Codecs_Rar_so.py")))
(delete-file-recursively "CPP/7zip/Archive/Rar")
(delete-file-recursively "CPP/7zip/Compress/Rar")
- #t))
+ ;; Fix FTBFS with gcc-10.
+ (substitute* "CPP/Windows/ErrorMsg.cpp"
+ (("switch\\(errorCode\\) \\{")
+ "switch(static_cast<HRESULT>(errorCode)) {"))))
(patches (search-patches "p7zip-CVE-2016-9296.patch"
"p7zip-CVE-2017-17969.patch"
"p7zip-remove-unused-code.patch"))))
@@ -1331,31 +1336,27 @@ for most inputs, but the resulting compressed files are anywhere from 20% to
#:phases
(modify-phases %standard-phases
(replace 'configure
- (lambda* (#:key system outputs #:allow-other-keys)
- (invoke "cp"
- (let ((system ,(or (%current-target-system)
- (%current-system))))
- (cond
- ((string-prefix? "x86_64" system)
- "makefile.linux_amd64_asm")
- ((string-prefix? "i686" system)
- "makefile.linux_x86_asm_gcc_4.X")
- (else
- "makefile.linux_any_cpu_gcc_4.X")))
- "makefile.machine")))
- (replace 'check
(lambda _
- (invoke "make" "test")
- (invoke "make" "test_7z")
- (invoke "make" "test_7zr"))))))
+ (copy-file
+ ,(cond ((target-x86-64?)
+ "makefile.linux_amd64_asm")
+ ((target-x86-32?)
+ "makefile.linux_x86_asm_gcc_4.X")
+ (else
+ "makefile.linux_any_cpu_gcc_4.X"))
+ "makefile.machine")))
+ (replace 'check
+ (lambda* (#:key tests? #:allow-other-keys)
+ (when tests?
+ (invoke "make" "test")
+ (invoke "make" "test_7z")
+ (invoke "make" "test_7zr")))))))
(native-inputs
- (let ((system (or (%current-target-system)
- (%current-system))))
- `(,@(cond ((string-prefix? "x86_64" system)
- `(("yasm" ,yasm)))
- ((string-prefix? "i686" system)
- `(("nasm" ,nasm)))
- (else '())))))
+ (cond ((target-x86-64?)
+ (list yasm))
+ ((target-x86-32?)
+ (list nasm))
+ (else '())))
(home-page "http://p7zip.sourceforge.net/")
(synopsis "Command-line file archiver with high compression ratio")
(description "p7zip is a command-line port of 7-Zip, a file archiver that
@@ -1565,15 +1566,14 @@ or junctions, and always follows hard links.")
(define-public zstd
(package
(name "zstd")
- (version "1.4.4")
+ (version "1.5.0")
(source
(origin
(method url-fetch)
(uri (string-append "https://github.com/facebook/zstd/releases/download/"
"v" version "/zstd-" version ".tar.gz"))
(sha256
- (base32 "05ckxap00qvc0j51d3ci38150cxsw82w7s9zgd5fgzspnzmp1vsr"))))
- (replacement zstd/fixed)
+ (base32 "150y541303vnvfhd8wkbih00lfvvm98rd12yijwlbkqzg3xgp52i"))))
(build-system gnu-build-system)
(outputs '("out" ;1.2MiB executables and documentation
"lib" ;1.2MiB shared library and headers
@@ -1581,6 +1581,26 @@ or junctions, and always follows hard links.")
(arguments
`(#:phases
(modify-phases %standard-phases
+ (add-after 'unpack 'remove-bogus-check
+ (lambda _
+ ;; lib/Makefile falsely claims that no .pc file can be created.
+ (substitute* "lib/Makefile"
+ (("error configured .*dir ")
+ "true "))
+ #t))
+ (add-after 'unpack 'patch-command-file-names
+ ;; Don't require hard requirements to be in $PATH.
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (our (lambda (name) (string-append out "/bin/" name))))
+ (substitute* "programs/zstdgrep"
+ (("(:-)(grep)" _ prefix command)
+ (string-append prefix (which command)))
+ (("(:-)(zstdcat)" _ prefix command)
+ (string-append prefix (our command))))
+ (substitute* "programs/zstdless"
+ (("zstdcat" command)
+ (our command))))))
(delete 'configure) ;no configure script
(add-after 'install 'adjust-library-locations
(lambda* (#:key outputs #:allow-other-keys)
@@ -1600,17 +1620,16 @@ or junctions, and always follows hard links.")
;; Make sure the pkg-config file refers to the right output.
(substitute* (string-append shared-libs "/pkgconfig/libzstd.pc")
(("^prefix=.*")
- (string-append "prefix=" lib "\n")))
-
- #t))))
+ ;; Note: The .pc file expects a trailing slash for 'prefix'.
+ (string-append "prefix=" lib "/\n")))))))
#:make-flags
- ;; TODO: Integrate in next rebuild cycle.
- (list ,(if (%current-target-system)
- (string-append "CC=" (cc-for-target))
- "CC=gcc")
- (string-append "PREFIX=" (assoc-ref %outputs "out"))
- (string-append "LIBDIR=" (assoc-ref %outputs "lib") "/lib")
- (string-append "INCLUDEDIR=" (assoc-ref %outputs "lib") "/include")
+ (list ,(string-append "CC=" (cc-for-target))
+ (string-append "prefix=" (assoc-ref %outputs "out"))
+ (string-append "libdir=" (assoc-ref %outputs "lib") "/lib")
+ (string-append "includedir=" (assoc-ref %outputs "lib") "/include")
+ ;; Auto-detection is over-engineered and buggy.
+ "PCLIBDIR=lib"
+ "PCINCDIR=include"
;; Skip auto-detection of, and creating a dependency on, the build
;; environment's ‘xz’ for what amounts to a dubious feature anyway.
"HAVE_LZMA=0"
@@ -1633,17 +1652,6 @@ speed.")
license:public-domain ; zlibWrapper/examples/fitblk*
license:zlib)))) ; zlibWrapper/{gz*.c,gzguts.h}
-(define zstd/fixed
- (package
- (inherit zstd)
- (source
- (origin
- (inherit (package-source zstd))
- (patches
- (search-patches
- ;; From Ubuntu focal-security
- "zstd-CVE-2021-24031_CVE-2021-24032.patch"))))))
-
(define-public pzstd
(package/inherit zstd
(name "pzstd")
@@ -1756,8 +1764,32 @@ Compression ratios of 2:1 to 3:1 are common for text files.")
"unzip-attribs-overflow.patch"
"unzip-overflow-on-invalid-input.patch"
"unzip-format-secure.patch"
- "unzip-overflow-long-fsize.patch"))))
- (replacement unzip/fixed)
+ "unzip-overflow-long-fsize.patch"
+
+ ;; From Fedora
+ "unzip-alt-iconv-utf8.patch"
+ "unzip-alt-iconv-utf8-print.patch"
+ "unzip-fix-recmatch.patch"
+ "unzip-case-insensitive.patch"
+ "unzip-close.patch"
+ "unzip-COVSCAN-fix-unterminated-string.patch"
+ "unzip-CVE-2016-9844.patch"
+ "unzip-CVE-2018-1000035.patch"
+ "unzip-CVE-2018-18384.patch"
+ "unzip-exec-shield.patch"
+ "unzip-manpage-fix.patch"
+ "unzip-overflow.patch"
+ "unzip-timestamp.patch"
+ "unzip-valgrind.patch"
+ "unzip-x-option.patch"
+ ;; CVE-2019-13232
+ "unzip-zipbomb-manpage.patch"
+ "unzip-zipbomb-part1.patch"
+ "unzip-zipbomb-part2.patch"
+ "unzip-zipbomb-part3.patch"
+
+ ;; https://github.com/madler/unzip/issues/2
+ "unzip-32bit-zipbomb-fix.patch"))))
(build-system gnu-build-system)
;; no inputs; bzip2 is not supported, since not compiled with BZ_NO_STDIO
(arguments
@@ -1793,57 +1825,6 @@ recreates the stored directory structure by default.")
(license (license:non-copyleft "file://LICENSE"
"See LICENSE in the distribution."))))
-(define unzip/fixed
- (package
- (inherit unzip)
- (version "6.0")
- (source
- (origin
- (method url-fetch)
- (uri (string-append "mirror://sourceforge/infozip"
- "/UnZip%206.x%20%28latest%29/UnZip%206.0/unzip60.tar.gz"))
- (sha256
- (base32
- "0dxx11knh3nk95p2gg2ak777dd11pr7jx5das2g49l262scrcv83"))
- (patches (search-patches "unzip-CVE-2014-8139.patch"
- "unzip-CVE-2014-8140.patch"
- "unzip-CVE-2014-8141.patch"
- "unzip-CVE-2014-9636.patch"
- "unzip-CVE-2015-7696.patch"
- "unzip-CVE-2015-7697.patch"
- "unzip-allow-greater-hostver-values.patch"
- "unzip-initialize-symlink-flag.patch"
- "unzip-remove-build-date.patch"
- "unzip-attribs-overflow.patch"
- "unzip-overflow-on-invalid-input.patch"
- "unzip-format-secure.patch"
- "unzip-overflow-long-fsize.patch"
-
- ;; From Fedora
- "unzip-alt-iconv-utf8.patch"
- "unzip-alt-iconv-utf8-print.patch"
- "unzip-fix-recmatch.patch"
- "unzip-case-insensitive.patch"
- "unzip-close.patch"
- "unzip-COVSCAN-fix-unterminated-string.patch"
- "unzip-CVE-2016-9844.patch"
- "unzip-CVE-2018-1000035.patch"
- "unzip-CVE-2018-18384.patch"
- "unzip-exec-shield.patch"
- "unzip-manpage-fix.patch"
- "unzip-overflow.patch"
- "unzip-timestamp.patch"
- "unzip-valgrind.patch"
- "unzip-x-option.patch"
- ;; CVE-2019-13232
- "unzip-zipbomb-manpage.patch"
- "unzip-zipbomb-part1.patch"
- "unzip-zipbomb-part2.patch"
- "unzip-zipbomb-part3.patch"
-
- ;; https://github.com/madler/unzip/issues/2
- "unzip-32bit-zipbomb-fix.patch"))))))
-
(define-public ziptime
(let ((commit "2a5bc9dfbf7c6a80e5f7cb4dd05b4036741478bc")
(revision "0"))
@@ -1896,38 +1877,22 @@ timestamps in the file header with a fixed time (1 January 2008).
(define-public zziplib
(package
(name "zziplib")
- (version "0.13.69")
+ (version "0.13.72")
(home-page "https://github.com/gdraheim/zziplib")
(source (origin
(method git-fetch)
(uri (git-reference (url home-page)
(commit (string-append "v" version))))
(file-name (git-file-name name version))
- (patches (search-patches "zziplib-CVE-2018-16548.patch"))
(sha256
(base32
- "0fbk9k7ryas2wh2ykwkvm1pbi40i88rfvc3dydh9xyd7w2jcki92"))))
- (replacement zziplib/fixed)
- (build-system gnu-build-system)
- (arguments
- `(#:phases (modify-phases %standard-phases
- (add-before 'check 'make-files-writable
- (lambda _
- (for-each make-file-writable
- (find-files "test" #:directories? #t))
- #t)))
-
- ;; XXX: The default test target attempts to download external resources and
- ;; fails without error: <https://github.com/gdraheim/zziplib/issues/53>.
- ;; To prevent confusing log messages, just run a simple zip test that works.
- #:test-target "check-readme"))
+ "0i6bpa2b13z19alm6ig80364dnin1w28cvif18k6wkkb0w3dzp8y"))))
+ (build-system cmake-build-system)
(inputs
`(("zlib" ,zlib)))
(native-inputs `(("perl" ,perl) ; for the documentation
("pkg-config" ,pkg-config)
- ;; for the documentation; Python 3 not supported,
- ;; http://forums.gentoo.org/viewtopic-t-863161-start-0.html
- ("python" ,python-2)
+ ("python" ,python)
("zip" ,zip))) ; to create test files
(synopsis "Library for accessing zip files")
(description
@@ -1936,40 +1901,6 @@ timestamps in the file header with a fixed time (1 January 2008).
;; files carry the Zlib license; see "docs/copying.html" for details.
(license (list license:lgpl2.0+ license:mpl1.1))))
-(define-public zziplib/fixed
- (package
- (inherit zziplib)
- (name "zziplib")
- (version "0.13.72")
- (home-page "https://github.com/gdraheim/zziplib")
- (source (origin
- (method git-fetch)
- (uri (git-reference (url home-page)
- (commit (string-append "v" version))))
- (file-name (git-file-name name version))
- (sha256
- (base32
- "0i6bpa2b13z19alm6ig80364dnin1w28cvif18k6wkkb0w3dzp8y"))))
- (arguments
- `(#:phases
- (modify-phases %standard-phases
- (add-after 'install 'install-compatibility-symlinks
- (lambda* (#:key outputs #:allow-other-keys)
- (with-directory-excursion
- (string-append (assoc-ref outputs "out") "/lib")
- (map (lambda (lib new-symlink)
- (symlink lib new-symlink))
- (list "libzzip.so.13" "libzzipfseeko.so.13"
- "libzzipmmapped.so.13" "libzzipwrap.so.13")
- (list "libzzip-0.so.13" "libzzipfseeko-0.so.13"
- "libzzipmmapped-0.so.13" "libzzipwrap-0.so.13")))
- #t)))))
- (native-inputs
- `(("python" ,python)
- ,@(alist-delete "python"
- (package-native-inputs zziplib))))
- (build-system cmake-build-system)))
-
(define-public libzip
(package
(name "libzip")
@@ -2499,8 +2430,8 @@ at run time, and must be installed separately.")
(bin (string-append (assoc-ref %outputs "out") "/bin"))
(target (string-append bin "/" name))
(python (string-append (assoc-ref %build-inputs "python") "/bin"))
- (7z (string-append (assoc-ref %build-inputs "p7zip") "/bin/7z"))
- (unzip (string-append (assoc-ref %build-inputs "unzip") "/bin/unzip")))
+ (7z (search-input-file %build-inputs "/bin/7z"))
+ (unzip (search-input-file %build-inputs "/bin/unzip")))
(setenv "PATH" (string-append (getenv "PATH") ":" python))
(mkdir-p bin)
(copy-file source target)
diff --git a/gnu/packages/connman.scm b/gnu/packages/connman.scm
index 7268af4c8b..85536f933b 100644
--- a/gnu/packages/connman.scm
+++ b/gnu/packages/connman.scm
@@ -123,7 +123,7 @@ sharing) to clients via USB, ethernet, WiFi, cellular and Bluetooth.")
(let* ((out (assoc-ref outputs "out"))
(bin (string-append out "/bin/econnman-bin")))
(wrap-program bin
- `("PYTHONPATH" ":" prefix (,(getenv "PYTHONPATH"))))
+ `("GUIX_PYTHONPATH" ":" prefix (,(getenv "GUIX_PYTHONPATH"))))
#t))))))
(native-inputs `(("pkg-config" ,pkg-config)))
(inputs
diff --git a/gnu/packages/cpio.scm b/gnu/packages/cpio.scm
index 58b2f45937..2f7a7b2363 100644
--- a/gnu/packages/cpio.scm
+++ b/gnu/packages/cpio.scm
@@ -1,6 +1,7 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2012 Nikita Karetnikov <nikita@karetnikov.org>
;;; Copyright © 2014 Mark H Weaver <mhw@netris.org>
+;;; Copyright © 2020 Marius Bakke <marius@gnu.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -35,7 +36,14 @@
version ".tar.bz2"))
(sha256
(base32
- "0vbgnhkawdllgnkdn6zn1f56fczwk0518krakz2qbwhxmv2vvdga"))))
+ "0vbgnhkawdllgnkdn6zn1f56fczwk0518krakz2qbwhxmv2vvdga"))
+ (modules '((guix build utils)))
+ (snippet
+ '(begin
+ ;; Remove superfluous declaration that trips GCC 10.
+ (substitute* "src/global.c"
+ (("char \\*program_name;")
+ ""))))))
(build-system gnu-build-system)
(home-page "https://www.gnu.org/software/cpio/")
(synopsis "Manage cpio and tar file archives")
diff --git a/gnu/packages/cpp.scm b/gnu/packages/cpp.scm
index 9ab6e0b835..87bf66d1d1 100644
--- a/gnu/packages/cpp.scm
+++ b/gnu/packages/cpp.scm
@@ -18,6 +18,9 @@
;;; 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>
+;;; Copyright © 2021 Guillaume Le Vaillant <glv@posteo.net>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -87,11 +90,13 @@
(commit version)))
(file-name
(git-file-name name version))
+ (patches (search-patches "range-v3-build-with-gcc10.patch"))
(sha256
(base32 "18230bg4rq9pmm5f8f65j444jpq56rld4fhmpham8q3vr1c1bdjh"))))
(build-system cmake-build-system)
(native-inputs
`(("doxygen" ,doxygen)
+ ("gcc" ,gcc-9)
("perl" ,perl)))
(inputs
`(("boost" ,boost)))
@@ -129,7 +134,8 @@ range-v3 ranges are an abstraction layer on top of iterators.")
(git-file-name name version))
(patches
(search-patches
- "c++-gsl-find-system-gtest.patch"))
+ "c++-gsl-find-system-gtest.patch"
+ "c++-gsl-move-array-bounds-tests.patch"))
(sha256
(base32 "0gbvr48f03830g3154bjhw92b8ggmg6wwh5xyb8nppk9v6w752l0"))))
(build-system cmake-build-system)
@@ -365,10 +371,8 @@ functions, class methods, and stl containers.
(lambda* (#:key outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))
(inc (string-append out "/include/fifo_map")))
- (with-directory-excursion
- (string-append "../" ,name "-" ,version "-checkout")
- (install-file "src/fifo_map.hpp" inc)
- #t)))))))
+ (with-directory-excursion "../source"
+ (install-file "src/fifo_map.hpp" inc))))))))
(synopsis "FIFO-ordered associative container for C++")
(description "Fifo_map is a C++ header only library for associative
container which uses the order in which keys were inserted to the container
@@ -703,7 +707,7 @@ code and retrieving their output.")
(define-public sobjectizer
(package
(name "sobjectizer")
- (version "5.6.1")
+ (version "5.7.2.6")
(source
(origin
(method git-fetch)
@@ -711,7 +715,7 @@ code and retrieving their output.")
(url "https://github.com/Stiffstream/sobjectizer")
(commit (string-append "v." version))))
(sha256
- (base32 "0jfai7sqxnnjkms38krm7mssj5l79nb3pllkbyj4j581a7l5j6l5"))
+ (base32 "0n6smpjkkkw0xab8wcpy3p0dpw2v9sxgwl6azl3am6abmv4mff12"))
(file-name (git-file-name name version))))
(build-system cmake-build-system)
(arguments
@@ -759,7 +763,8 @@ other values of screen objects, by setting their values as the tween starting
point and then, after each tween step, plugging back the result.")
(license license:expat)))
-(define-public abseil-cpp
+;;; This older LTS release is kept for tensorflow.
+(define-public abseil-cpp-20200923.3
(package
(name "abseil-cpp")
(version "20200923.3")
@@ -772,11 +777,8 @@ point and then, after each tween step, plugging back the result.")
(sha256
(base32
"1p4djhm1f011ficbjjxx3n8428p8481p20j4glpaawnpsi362hkl"))
- ;; Remove after next googletest release and update.
(patches
- (search-patches
- "abseil-cpp-fix-gtest.patch"
- "abseil-cpp-fix-strerror_test.patch"))))
+ (search-patches "abseil-cpp-fix-strerror_test.patch"))))
(build-system cmake-build-system)
(arguments
`(#:configure-flags (list "-DBUILD_SHARED_LIBS=ON"
@@ -809,6 +811,26 @@ augment the C++ standard library. The Abseil library code is collected from
Google's C++ code base.")
(license license:asl2.0)))
+(define-public abseil-cpp
+ (let ((base abseil-cpp-20200923.3))
+ (package/inherit base
+ (name "abseil-cpp")
+ (version "20210324.2")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/abseil/abseil-cpp")
+ (commit version)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0g9rbhk3mwjdfxk7cscd04vm8fphd5flz9yykpgvyy1nwa34zk3x"))))
+ (arguments
+ (substitute-keyword-arguments (package-arguments base)
+ ((#:configure-flags flags)
+ `(cons* "-DBUILD_TESTING=ON"
+ (delete "-DABSL_RUN_TESTS=ON" ,flags))))))))
+
(define-public pegtl
(package
(name "pegtl")
diff --git a/gnu/packages/cran.scm b/gnu/packages/cran.scm
index 8d585f0970..5efc49f079 100644
--- a/gnu/packages/cran.scm
+++ b/gnu/packages/cran.scm
@@ -34,6 +34,7 @@
;;; Copyright © 2020, 2021 Simon Tournier <zimon.toutoune@gmail.com>
;;; Copyright © 2020 Aniket Patil <aniket112.patil@gmail.com>
;;; Copyright © 2021 Marcel Schilling <marcel.schilling@uni-luebeck.de>
+;;; Copyright © 2021 Guillaume Le Vaillant <glv@posteo.net>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -2171,17 +2172,17 @@ previewing themes in real time.")
;; replace them.
(with-directory-excursion "inst/www/shared"
(replace-file "strftime/strftime-min.js"
- (string-append (assoc-ref inputs "js-strftime")
- "/share/javascript/strftime.min.js"))
+ (search-input-file inputs
+ "/share/javascript/strftime.min.js"))
(replace-file "highlight/highlight.pack.js"
- (string-append (assoc-ref inputs "js-highlight")
- "/share/javascript/highlight.min.js"))
+ (search-input-file inputs
+ "/share/javascript/highlight.min.js"))
(replace-file "datatables/js/jquery.dataTables.min.js"
- (string-append (assoc-ref inputs "js-datatables")
- "/share/javascript/jquery.dataTables.min.js"))
+ (search-input-file inputs
+ "/share/javascript/jquery.dataTables.min.js"))
(replace-file "selectize/js/selectize.min.js"
- (string-append (assoc-ref inputs "js-selectize")
- "/share/javascript/selectize.min.js"))
+ (search-input-file inputs
+ "/share/javascript/selectize.min.js"))
(for-each (match-lambda
((source . target)
(minify source #:target target)))
@@ -2285,8 +2286,8 @@ responsive, and powerful applications with minimal effort.")
(add-after 'unpack 'replace-minified-javascript
(lambda* (#:key inputs #:allow-other-keys)
(with-directory-excursion "inst/www/jsTree-3.3.7/"
- (symlink (string-append (assoc-ref inputs "js-requirejs")
- "/share/javascript/require.min.js")
+ (symlink (search-input-file inputs
+ "/share/javascript/require.min.js")
"libs/require.js")
(call-with-values
(lambda ()
@@ -24967,9 +24968,8 @@ techniques to average Bayesian predictive distributions.")
(lambda* (#:key inputs #:allow-other-keys)
(setenv "TZ" "UTC+1")
(setenv "TZDIR"
- (string-append (assoc-ref inputs "tzdata")
- "/share/zoneinfo"))
- #t)))))
+ (search-input-directory inputs
+ "share/zoneinfo")))))))
(native-inputs
`(("tzdata" ,tzdata-for-tests)
("pandoc" ,pandoc)
diff --git a/gnu/packages/crates-graphics.scm b/gnu/packages/crates-graphics.scm
index d50056e948..75479ef592 100644
--- a/gnu/packages/crates-graphics.scm
+++ b/gnu/packages/crates-graphics.scm
@@ -11,6 +11,7 @@
;;; Copyright © 2020, 2021 Nicolas Goaziou <mail@nicolasgoaziou.fr>
;;; Copyright © 2020 Antoine Côté <antoine.cote@posteo.net>
;;; Copyright © 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
+;;; Copyright © 2021 Zheng Junjie <873216071@qq.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -137,7 +138,7 @@ approximated by values supported by the terminal.")
(origin
(method url-fetch)
(uri (crate-uri "ansi_term" version))
- (file-name (string-append name "-" version ".crate"))
+ (file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
"1ljmkbilxgmhavxvxqa7qvm6f3fjggi7q2l3a72q9x0cxjvrnanm"))))
@@ -166,7 +167,7 @@ text or blue underlined text, on ANSI terminals.")
(origin
(method url-fetch)
(uri (crate-uri "ansi_term" version))
- (file-name (string-append name "-" version ".crate"))
+ (file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
"16wpvrghvd0353584i1idnsgm0r3vchg8fyrm0x8ayv1rgvbljgf"))))
@@ -2055,7 +2056,7 @@ images in AVIF format.")
(origin
(method url-fetch)
(uri (crate-uri "rgb" version))
- (file-name (string-append name "-" version ".crate"))
+ (file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
"1lrv3x5h1lvdzg1qqr8aiysz978m35zpjdkyicnvkarnh8zkqzr8"))))
diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm
index e95995a781..dd96d2be38 100644
--- a/gnu/packages/crates-io.scm
+++ b/gnu/packages/crates-io.scm
@@ -12,6 +12,7 @@
;;; Copyright © 2020 André Batista <nandre@riseup.net>
;;; Copyright © 2020 Arun Isaac <arunisaac@systemreboot.net>
;;; Copyright © 2020 Antoine Côté <antoine.cote@posteo.net>
+;;; Copyright © 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;; Copyright © 2021 aecepoglu <aecepoglu@fastmail.fm>
;;; Copyright © 2021 Zheng Junjie <873216071@qq.com>
;;; Copyright © 2021 Alexandru-Sergiu Marton <brown121407@posteo.ro>
@@ -21,6 +22,7 @@
;;; Copyright © 2021 Petr Hodina <phodina@protonmail.com>
;;; Copyright © 2021 Ricardo Wurmus <rekado@elephly.net>
;;; Copyright © 2021 Jacob Hrbek <kreyren@rixotstudio.cz>
+;;; Copyright © 2021 Zheng Junjie <873216071@qq.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -1195,7 +1197,7 @@ checksum, used in the zlib compression format.")
(method url-fetch)
(uri (crate-uri "adler32" version))
(file-name
- (string-append name "-" version ".crate"))
+ (string-append name "-" version ".tar.gz"))
(sha256
(base32
"0bgks405vz823bphgwhj4l9h6vpfh900s0phfk4qqijyh9xhfysn"))))
@@ -2026,7 +2028,7 @@ escape codes.")
(origin
(method url-fetch)
(uri (crate-uri "antidote" version))
- (file-name (string-append name "-" version ".crate"))
+ (file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
"19g2sw2qa2ibnh4x7j1snk46593jgx6y7rnvva496ynq61af5z9l"))))
@@ -4134,7 +4136,7 @@ methods.")
(origin
(method url-fetch)
(uri (crate-uri "atty" version))
- (file-name (string-append name "-" version ".crate"))
+ (file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
"1s7yslcs6a28c5vz7jwj63lkfgyx8mx99fdirlhi9lbhhzhrpcyr"))))
@@ -4201,7 +4203,7 @@ methods.")
(origin
(method url-fetch)
(uri (crate-uri "autocfg" version))
- (file-name (string-append name "-" version ".crate"))
+ (file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
"1chwgimpx5z7xbag7krr9d8asxfqbh683qhgl9kn3hxk2l0djj8x"))))
@@ -4532,7 +4534,7 @@ trace (backtrace) at runtime in a Rust program.")
(origin
(method url-fetch)
(uri (crate-uri "backtrace-sys" version))
- (file-name (string-append name "-" version ".crate"))
+ (file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
"16a3igz22q9lnnjjr77f4k8ci48v8zdwrs67khx3h7wx3jzfpyqq"))))
@@ -4753,7 +4755,7 @@ c6e7d37. However, this package works only up to 128 bytes.")
(origin
(method url-fetch)
(uri (crate-uri "base-x" version))
- (file-name (string-append name "-" version ".crate"))
+ (file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
"1hfy0wv7j5ynd73yk1vyr32pqa77rp15lkrc54f8ky9c6hcbc80v"))))
@@ -4835,7 +4837,7 @@ Cow.")
(origin
(method url-fetch)
(uri (crate-uri "bencher" version))
- (file-name (string-append name "-" version ".crate"))
+ (file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
"1x8p2xblgqssay8cdykp5pkfc0np0jk5bs5cx4f5av097aav9zbx"))))
@@ -5788,7 +5790,7 @@ types.")
(origin
(method url-fetch)
(uri (crate-uri "bitflags" version))
- (file-name (string-append name "-" version ".crate"))
+ (file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
"14qnd5nq8p2almk79m4m8ydqhd413yaxsyjp5xd19g3mikzf47fg"))))
@@ -6135,7 +6137,7 @@ BLAKE2bp hash functions.")
(origin
(method url-fetch)
(uri (crate-uri "blas-sys" version))
- (file-name (string-append name "-" version ".crate"))
+ (file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
"0h14zjycwc76v15h8qll9z1xiryvmpvsb5gam97pqpdjrrwv5c8k"))))
@@ -8239,7 +8241,6 @@ capabilities.")
`(;; The test suite is disabled as the internal 'cargo-test-macro' and
;; 'cargo-test-support' crates are not included in the release.
#:tests? #f
- #:rust ,rust-1.52 ;transitively inherited from rust-sized-chunks
#:cargo-inputs
(("rust-anyhow" ,rust-anyhow-1)
("rust-atty" ,rust-atty-0.2)
@@ -8425,7 +8426,7 @@ supported by Cargo.")
(origin
(method url-fetch)
(uri (crate-uri "cargon" version))
- (file-name (string-append name "-" version ".crate"))
+ (file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
"1cszlab7jk736p0lb50ag4l9nv72m7j41bwrmygl0lr4iz0350w2"))))
@@ -8500,7 +8501,7 @@ box''.")
(origin
(method url-fetch)
(uri (crate-uri "cblas-sys" version))
- (file-name (string-append name "-" version ".crate"))
+ (file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
"0rgsn3klhhh09d8qf3b87zl4rwk93l2g0qzh9hhb0lff5kcfrzmn"))))
@@ -8522,7 +8523,7 @@ box''.")
(origin
(method url-fetch)
(uri (crate-uri "cc" version))
- (file-name (string-append name "-" version ".crate"))
+ (file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
"0j7d7h4n81z5f22l3v8ggjvvw8m64636nlaqax4x1y44da1rc12c"))))
@@ -8684,7 +8685,7 @@ chain, the first matching branch is the item that gets emitted.")
(origin
(method url-fetch)
(uri (crate-uri "cfg-if" version))
- (file-name (string-append name "-" version ".crate"))
+ (file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
"08h80ihs74jcyp24cd75wwabygbbdgl05k6p5dmq8akbr78vv1a7"))))
@@ -9143,7 +9144,7 @@ traits.")
(origin
(method url-fetch)
(uri (crate-uri "clang-sys" version))
- (file-name (string-append name "-" version ".crate"))
+ (file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
"1r50dwy5hj5gq07dn0qf8222d07qv0970ymx0j8n9779yayc3w3f"))))
@@ -9294,7 +9295,7 @@ Command Line Argument Parser.")
(origin
(method url-fetch)
(uri (crate-uri "clap" version))
- (file-name (string-append name "-" version ".crate"))
+ (file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
"00i065a58987k1sbzqmlz721rw521zcg08jmsh40gi3khp3qmr9p"))))
@@ -9350,7 +9351,7 @@ Command Line Argument Parser.")
(origin
(method url-fetch)
(uri (crate-uri "clicolors-control" version))
- (file-name (string-append name "-" version ".crate"))
+ (file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
"07klix8nbpwk0cg1k4h0kkiijm1jxvrzndqdkr7dqr6xvkjjw24h"))))
@@ -9490,7 +9491,7 @@ or to a file as well.")
(origin
(method url-fetch)
(uri (crate-uri "cloudabi" version))
- (file-name (string-append name "-" version ".crate"))
+ (file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
"0rv4yf5jlldfkynzrw687s00f4x12ypw7axv71vawhy6h4i52i23"))))
@@ -9514,7 +9515,7 @@ contains all syscalls and related types.")
(origin
(method url-fetch)
(uri (crate-uri "cloudabi" version))
- (file-name (string-append name "-" version ".crate"))
+ (file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
"0kxcg83jlihy0phnd2g8c2c303px3l2p3pkjz357ll6llnd5pz6x"))))
@@ -9584,7 +9585,7 @@ Cipher-based Message Authentication Code (CMAC).")
(origin
(method url-fetch)
(uri (crate-uri "cmake" version))
- (file-name (string-append name "-" version ".crate"))
+ (file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
"1fv346ipxmvff6qrnh78rild0s8k72ilfjkdsrk869562y62cmhf"))))
@@ -10140,7 +10141,7 @@ idiomatic wrappers for Mac OS X's CommonCrypto library.")
(origin
(method url-fetch)
(uri (crate-uri "compiler_builtins" version))
- (file-name (string-append name "-" version ".crate"))
+ (file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
"1rhj6ccmfkh9gcxnxgjq4fg257yi4f9325nfzsphbmxwkrg06sq3"))))
@@ -10572,7 +10573,7 @@ generation.")
(origin
(method url-fetch)
(uri (crate-uri "constant_time_eq" version))
- (file-name (string-append name "-" version ".crate"))
+ (file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
"1g3vp04qzmk6cpzrd19yci6a95m7ap6wy7wkwgiy2pjklklrfl14"))))
@@ -11059,7 +11060,7 @@ intrinsics.")
(origin
(method url-fetch)
(uri (crate-uri "core-foundation-sys" version))
- (file-name (string-append name "-" version ".crate"))
+ (file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
"0fzsw1j9g1x598yhwklg59l15hwzc0pyvs01w9fg2kin4598mjp7"))))))
@@ -13094,7 +13095,6 @@ attributes.")
(build-system cargo-build-system)
(arguments
`(#:tests? #f ; Cannot compile cxx-test-suite.
- #:rust ,rust-1.48 ; or newer
#:cargo-inputs
(("rust-cc" ,rust-cc-1)
("rust-cxxbridge-flags" ,rust-cxxbridge-flags-1)
@@ -13154,8 +13154,7 @@ attributes.")
"0shmkgv3cnh06ws1p555znj1hh23phynaz73rgnz95gradsdwnwg"))))
(build-system cargo-build-system)
(arguments
- `(#:rust ,rust-1.48 ; or newer
- #:cargo-inputs
+ `(#:cargo-inputs
(("rust-cc" ,rust-cc-1)
("rust-codespan-reporting" ,rust-codespan-reporting-0.11)
("rust-lazy-static" ,rust-lazy-static-1)
@@ -13215,8 +13214,7 @@ crate into a Cargo build.")
"08v366jxd2vc8jc2cbvrga0866pwfcaq6hl8yylfx0vhs2n53j53"))))
(build-system cargo-build-system)
(arguments
- `(#:rust ,rust-1.48 ; or newer
- #:cargo-inputs
+ `(#:cargo-inputs
(("rust-cc" ,rust-cc-1)
("rust-codespan-reporting" ,rust-codespan-reporting-0.11)
("rust-proc-macro2" ,rust-proc-macro2-1)
@@ -13321,8 +13319,7 @@ crate (implementation detail).")
"0gkwvihw74dh8p3fz3552wnxanrpwmwfy38ylz2z8knjq0y8y4v3"))))
(build-system cargo-build-system)
(arguments
- `(#:rust ,rust-1.48 ; or newer
- #:cargo-inputs
+ `(#:cargo-inputs
(("rust-clang-ast" ,rust-clang-ast-0.1)
("rust-flate2" ,rust-flate2-1)
("rust-memmap" ,rust-memmap-0.7)
@@ -13667,7 +13664,7 @@ for Rust.")
(origin
(method url-fetch)
(uri (crate-uri "data-encoding" version))
- (file-name (string-append name "-" version ".crate"))
+ (file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
"027rcrwdschrkdr2n9d24gnh03vl41qmvhjqn9vn6z1njy2n0flr"))))
@@ -14020,7 +14017,7 @@ written in rust.")
(origin
(method url-fetch)
(uri (crate-uri "defmac" version))
- (file-name (string-append name "-" version ".crate"))
+ (file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
"14cqfvc0f1pkd6gdhjxa2wv3iibqprc0n203ims8lvg96752ynfm"))))
@@ -14040,7 +14037,7 @@ written in rust.")
(origin
(method url-fetch)
(uri (crate-uri "defmac" version))
- (file-name (string-append name "-" version ".crate"))
+ (file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
"17giv0n0n1r64z0dahfvkjy3ys517jxyhs8sd9lmgvcljpjyryxa"))))))
@@ -14955,8 +14952,7 @@ diff.")
(base32 "0lsn5h1mfa8x7bfg9yqgr52p7drigpwgm5q8qh4r07dmfd5g43rw"))))
(build-system cargo-build-system)
(arguments
- `(#:rust ,rust-1.52 ; fix for E0658
- #:cargo-inputs
+ `(#:cargo-inputs
(("rust-diffus-derive" ,rust-diffus-derive-0.10)
("rust-indexmap" ,rust-indexmap-1)
("rust-itertools" ,rust-itertools-0.10)
@@ -15222,7 +15218,7 @@ standard locations of directories for config, cache and other data.")
(origin
(method url-fetch)
(uri (crate-uri "dirs" version))
- (file-name (string-append name "-" version ".crate"))
+ (file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
"009rrhzj9pxyncmm2vhlj70npg0cgggv2hjbbkiwdl9vccq8kmrz"))))
@@ -15342,7 +15338,7 @@ and @code{directories} crates.")
(origin
(method url-fetch)
(uri (crate-uri "discard" version))
- (file-name (string-append name "-" version ".crate"))
+ (file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
"1h67ni5bxvg95s91wgicily4ix7lcw7cq0a5gy9njrybaibhyb91"))))
@@ -15495,7 +15491,7 @@ not support network, only raw protocol parser.")
(origin
(method url-fetch)
(uri (crate-uri "doc-comment" version))
- (file-name (string-append name "-" version ".crate"))
+ (file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
"15rsqxgarfpb1yim9sbp9yfgj7p2dq6v51c6bq1a62paii9ylgcj"))))
@@ -15824,7 +15820,7 @@ Rust.")
(origin
(method url-fetch)
(uri (crate-uri "dtoa" version))
- (file-name (string-append name "-" version ".crate"))
+ (file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
"0phbm7i0dpn44gzi07683zxaicjap5064w62pidci4fhhciv8mza"))))
@@ -15846,7 +15842,7 @@ floating-point primitives to an @code{io::Write}.")
(origin
(method url-fetch)
(uri (crate-uri "dtoa" version))
- (file-name (string-append name "-" version ".crate"))
+ (file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
"0g96cap6si1g6wi62hsdk2fnj3sf5vd4i97zj6163j8hhnsl3n0d"))))))
@@ -17724,7 +17720,7 @@ fallible format macro.")
(origin
(method url-fetch)
(uri (crate-uri "fallible-iterator" version))
- (file-name (string-append name "-" version ".crate"))
+ (file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
"1xq759lsr8gqss7hva42azn3whgrbrs2sd9xpn92c5ickxm1fhs4"))))
@@ -18299,7 +18295,7 @@ sparse files.")
(origin
(method url-fetch)
(uri (crate-uri "filetime" version))
- (file-name (string-append name "-" version ".crate"))
+ (file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
"1s71cb7hzkk4ahc5j53w8933gnxv2giyj7v0za5hbbk37ahwyd0x"))))
@@ -18332,7 +18328,7 @@ representation.")
(origin
(method url-fetch)
(uri (crate-uri "findshlibs" version))
- (file-name (string-append name "-" version ".crate"))
+ (file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
"1n2vagn0q5yim32hxkwi1cjgp3yn1dm45p7z8nw6lapywihhs9mi"))))
@@ -18390,7 +18386,7 @@ cross platform API.")
(origin
(method url-fetch)
(uri (crate-uri "fixedbitset" version))
- (file-name (string-append name "-" version ".crate"))
+ (file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
"0kg03p777wc0dajd9pvlcnsyrwa8dhqwf0sd9r4dw0p82rs39arp"))))
@@ -18410,7 +18406,7 @@ cross platform API.")
(origin
(method url-fetch)
(uri (crate-uri "fixedbitset" version))
- (file-name (string-append name "-" version ".crate"))
+ (file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
"0czam11mi80dbyhf4rd4lz0ihcf7vkfchrdcrn45wbs0h40dxm46"))))))
@@ -18790,7 +18786,7 @@ crate.")
(origin
(method url-fetch)
(uri (crate-uri "fnv" version))
- (file-name (string-append name "-" version ".crate"))
+ (file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
"1ww56bi1r5b8id3ns9j3qxbi7w5h005rzhiryy0zi9h97raqbb9g"))))
@@ -18956,7 +18952,7 @@ implementation that is more efficient for smaller hash keys.")
(origin
(method url-fetch)
(uri (crate-uri "foreign-types-shared" version))
- (file-name (string-append name "-" version ".crate"))
+ (file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
"0kanxlif1vp0ffh2r9l610jqbkmb3183yqykxq1z5w1vay2rn7y6"))))))
@@ -19186,7 +19182,7 @@ duplication.")
(origin
(method url-fetch)
(uri (crate-uri "fs_extra" version))
- (file-name (string-append name "-" version ".crate"))
+ (file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32 "151k6dr35mhq5d8pc8krhw55ajhkyiv0pm14s7zzlc5bc9fp28i0"))))
(build-system cargo-build-system)
@@ -19354,7 +19350,7 @@ strings (> 1 billion is possible).")
(origin
(method url-fetch)
(uri (crate-uri "fuchsia-cprng" version))
- (file-name (string-append name "-" version ".crate"))
+ (file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
"1fnkqrbz7ixxzsb04bsz9p0zzazanma8znfdqjvh39n14vapfvx0"))))
@@ -19375,7 +19371,7 @@ pseudorandom number generator")
(origin
(method url-fetch)
(uri (crate-uri "fuchsia-zircon" version))
- (file-name (string-append name "-" version ".crate"))
+ (file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
"10jxc5ks1x06gpd0xg51kcjrxr35nj6qhx2zlc5n7bmskv3675rf"))))
@@ -19398,7 +19394,7 @@ pseudorandom number generator")
(origin
(method url-fetch)
(uri (crate-uri "fuchsia-zircon-sys" version))
- (file-name (string-append name "-" version ".crate"))
+ (file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
"19zp2085qsyq2bh1gvcxq1lb8w6v6jj9kbdkhpdjrl95fypakjix"))))
@@ -19497,7 +19493,7 @@ zero allocations, composability, and iterator-like interfaces.")
(origin
(method url-fetch)
(uri (crate-uri "futures" version))
- (file-name (string-append name "-" version ".crate"))
+ (file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
"1vq3cw37knnd0afw3rcjzh71i2l01v5m4ysinrrqdvnn2ql0z60v"))))
@@ -19620,7 +19616,7 @@ featuring zero allocations, composability, and iterator-like interfaces.")
(origin
(method url-fetch)
(uri (crate-uri "futures-core-preview" version))
- (file-name (string-append name "-" version ".crate"))
+ (file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
"02n66jkjhpy210dv24pz0j30lvyin5kzlrb50p1j7x8yzdin4nxk"))))
@@ -19641,7 +19637,7 @@ featuring zero allocations, composability, and iterator-like interfaces.")
(origin
(method url-fetch)
(uri (crate-uri "futures-cpupool" version))
- (file-name (string-append name "-" version ".crate"))
+ (file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
"1r32456gpblzfvnkf60545v8acqk7gh5zhyhi1jn669k9gicv45b"))))
@@ -19775,7 +19771,7 @@ for the @code{futures-rs} library.")
(origin
(method url-fetch)
(uri (crate-uri "futures-io-preview" version))
- (file-name (string-append name "-" version ".crate"))
+ (file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
"1npb04xbn2gw5rjllz88cb88fql44xxfkgcidjjj26fva3j4m4gl"))))
@@ -19981,7 +19977,7 @@ the @code{futures-rs} library.")
(origin
(method url-fetch)
(uri (crate-uri "futures-sink-preview" version))
- (file-name (string-append name "-" version ".crate"))
+ (file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
"1v7y5qvgvl0d6hd9s4k7bd5qrj2gdlrs5yfl22v5pxv9dgpliwc6"))))
@@ -20720,7 +20716,7 @@ platforms.")
(origin
(method url-fetch)
(uri (crate-uri "getopts" version))
- (file-name (string-append name "-" version ".crate"))
+ (file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
"1mgb3qvivi26gs6ihqqhh8iyhp3vgxri6vwyrwg28w0xqzavznql"))))
@@ -21227,7 +21223,7 @@ dirty state into your program.")
(define-public rust-git2-0.13
(package
(name "rust-git2")
- (version "0.13.20")
+ (version "0.13.24")
(source
(origin
(method url-fetch)
@@ -21236,7 +21232,7 @@ dirty state into your program.")
(string-append name "-" version ".tar.gz"))
(sha256
(base32
- "1fkc2gzcnl4ci3rja9mc5jl2ygl3fkc1fgym3rcwby216ac1x0yr"))))
+ "07rlxwvl5iyyqwh0mci5v27lbicf9qiqm60maw1srz7i51x00pl4"))))
(build-system cargo-build-system)
(arguments
`(#:cargo-inputs
@@ -21564,7 +21560,7 @@ OpenGL's old and error-prone API.")
(origin
(method url-fetch)
(uri (crate-uri "glob" version))
- (file-name (string-append name "-" version ".crate"))
+ (file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
"0x25wfr7vg3mzxc9x05dcphvd3nwlcmbnxrvwcvrrdwplcrrk4cv"))))
@@ -21590,7 +21586,7 @@ shell style patterns.")
(origin
(method url-fetch)
(uri (crate-uri "glob" version))
- (file-name (string-append name "-" version ".crate"))
+ (file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
"1ysvi72slkw784fcsymgj4308c3y03gwjjzqxp80xdjnkbh8vqcb"))))))
@@ -22696,7 +22692,7 @@ that don't require dynamic memory allocation.")
(origin
(method url-fetch)
(uri (crate-uri "heapsize" version))
- (file-name (string-append name "-" version ".crate"))
+ (file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
"0q94q9ppqjgrw71swiyia4hgby2cz6dldp7ij57nkvhd6zmfcy8n"))))
@@ -22721,7 +22717,7 @@ heap.")
(origin
(method url-fetch)
(uri (crate-uri "heapsize" version))
- (file-name (string-append name "-" version ".crate"))
+ (file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
"0dmwc37vgsdjzk10443dj4f23439i9gch28jcwzmry3chrwx8v2m"))))
@@ -22738,7 +22734,7 @@ heap.")
(origin
(method url-fetch)
(uri (crate-uri "heapsize_plugin" version))
- (file-name (string-append name "-" version ".crate"))
+ (file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
"1i72isf699q9jl167g2kg4xd6h3cd05rc79zaph58aqjy0g0m9y9"))))
@@ -22761,7 +22757,7 @@ total runtime size of an object on the heap")
(origin
(method url-fetch)
(uri (crate-uri "heck" version))
- (file-name (string-append name "-" version ".crate"))
+ (file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
"1b56s2c1ymdd0qmy31bw0ndhm31hcdamnhg3npp7ssrmc1ag9jw7"))))
@@ -22835,7 +22831,7 @@ hexadecimal representation.")
(origin
(method url-fetch)
(uri (crate-uri "hex" version))
- (file-name (string-append name "-" version ".crate"))
+ (file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
"0xsdcjiik5j750j67zk42qdnmm4ahirk3gmkmcqgq7qls2jjcl40"))))))
@@ -22849,7 +22845,7 @@ hexadecimal representation.")
(origin
(method url-fetch)
(uri (crate-uri "hex" version))
- (file-name (string-append name "-" version ".crate"))
+ (file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32 "1ajkw40qzn2ygnqjj9w584f6l31wi318258n84pn2hax8la2i8nn"))))))
@@ -23197,7 +23193,7 @@ Hash-based Message Authentication Code algorithm} for SHA1.")
(origin
(method url-fetch)
(uri (crate-uri "hostname" version))
- (file-name (string-append name "-" version ".crate"))
+ (file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
"0kprf862qaa7lwdms6aw7f3275h0j2rwhs9nz5784pm8hdmb9ki1"))))
@@ -24942,7 +24938,7 @@ immutable interval tree.")
(origin
(method url-fetch)
(uri (crate-uri "iovec" version))
- (file-name (string-append name "-" version ".crate"))
+ (file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
"0ph73qygwx8i0mblrf110cj59l00gkmsgrpzz1rm85syz5pymcxj"))))
@@ -25393,7 +25389,7 @@ and functions.")
(origin
(method url-fetch)
(uri (crate-uri "itoa" version))
- (file-name (string-append name "-" version ".crate"))
+ (file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
"13nxqrfnh83a7x5rw4wq2ilp8nxvwy74dxzysdg59dbxqk0agdxq"))))
@@ -25429,7 +25425,7 @@ primitives to an @code{io::Write}.")
(origin
(method url-fetch)
(uri (crate-uri "itoa" version))
- (file-name (string-append name "-" version ".crate"))
+ (file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
"18g7p2hrb3dk84z3frfgmszfc9hjb4ps9vp99qlb1kmf9gm8hc5f"))))))
@@ -25583,8 +25579,7 @@ primitives to an @code{io::Write}.")
(base32 "1x4z5ixlxv1wa70d3d6ad3n8qxz6z00i13zwnv219v45qcwybbnb"))))
(build-system cargo-build-system)
(arguments
- `(#:rust ,rust-1.52 ; fix for E0658
- #:cargo-development-inputs
+ `(#:cargo-development-inputs
(("rust-lazy-static" ,rust-lazy-static-1)
("rust-memmap" ,rust-memmap-0.7)
("rust-proptest" ,rust-proptest-1)
@@ -25848,7 +25843,7 @@ wasm-bindgen crate.")
(origin
(method url-fetch)
(uri (crate-uri "json" version))
- (file-name (string-append name "-" version ".crate"))
+ (file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
"1rg9jxf6bpbwis3ixd5ak8rp37him7n4z8awz4ssrxl6hyplbhlj"))))
@@ -25984,7 +25979,7 @@ debugging.")
(origin
(method url-fetch)
(uri (crate-uri "kernel32-sys" version))
- (file-name (string-append name "-" version ".crate"))
+ (file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
"1389av0601a9yz8dvx5zha9vmkd6ik7ax0idpb032d28555n41vm"))))
@@ -26051,7 +26046,7 @@ kernel32.")
(origin
(method url-fetch)
(uri (crate-uri "language-tags" version))
- (file-name (string-append name "-" version ".crate"))
+ (file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
"16hrjdpa827carq5x4b8zhas24d8kg4s16m6nmmn1kb7cr5qh7d9"))))
@@ -26277,7 +26272,7 @@ generated by LALRPOP.")
(origin
(method url-fetch)
(uri (crate-uri "lazy_static" version))
- (file-name (string-append name "-" version ".crate"))
+ (file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
"0in6ikhw8mgl33wjv6q6xfrb5b9jr16q8ygjy803fay4zcisvaz2"))))
@@ -26805,7 +26800,7 @@ algorithm and related formats (ZLIB, GZIP).")
(define-public rust-libgit2-sys-0.12
(package
(name "rust-libgit2-sys")
- (version "0.12.21+1.1.0")
+ (version "0.12.25+1.3.0")
(source
(origin
(method url-fetch)
@@ -26814,7 +26809,7 @@ algorithm and related formats (ZLIB, GZIP).")
(string-append name "-" version ".tar.gz"))
(sha256
(base32
- "09b85x3gpvq0d7v1mhg4f3w1b3skzlpbikrx9j2rwarbsyn1n9w6"))))
+ "1axsdyb2i67pn85vh8sb2z037n88fiiwqghkzsr1jrcdy2g1cs4g"))))
(build-system cargo-build-system)
(arguments
`(#:cargo-inputs
@@ -26941,7 +26936,7 @@ loading utilities.")
(origin
(method url-fetch)
(uri (crate-uri "libloading" version))
- (file-name (string-append name "-" version ".crate"))
+ (file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
"0lyply8rcqc8agajzxs7bq6ivba9dnn1i68kgb9z2flnfjh13cgj"))))
@@ -27847,7 +27842,7 @@ by inspecting the system for user preference.")
(origin
(method url-fetch)
(uri (crate-uri "lock_api" version))
- (file-name (string-append name "-" version ".crate"))
+ (file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
"0b24q9mh258xa52ap636q1sxz0j5vrnp0hwbbh7ddjka3wwz3sv2"))))
@@ -27864,7 +27859,7 @@ by inspecting the system for user preference.")
(origin
(method url-fetch)
(uri (crate-uri "log" version))
- (file-name (string-append name "-" version ".crate"))
+ (file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32 "04175hv0v62shd82qydq58a48k3bjijmk54v38zgqlbxqkkbpfai"))))
(build-system cargo-build-system)
@@ -28139,10 +28134,10 @@ image together with its neighboring pixels.")
("rust-flate2" ,rust-flate2-1)
("rust-image" ,rust-image-0.20)
("rust-itoa" ,rust-itoa-0.4)
- ("rust-linked-hash-map" ,rust-linked-hash-map-0.4)
+ ("rust-linked-hash-map" ,rust-linked-hash-map-0.5)
("rust-log" ,rust-log-0.4)
("rust-lzw" ,rust-lzw-0.10)
- ("rust-nom" ,rust-nom-5)
+ ("rust-nom" ,rust-nom-6)
("rust-pom" ,rust-pom-3)
("rust-rayon" ,rust-rayon-1)
("rust-time" ,rust-time-0.2))))
@@ -28652,7 +28647,7 @@ platform-independently.")
(origin
(method url-fetch)
(uri (crate-uri "maplit" version))
- (file-name (string-append name "-" version ".crate"))
+ (file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
"07b5kjnhrrmfhgqm9wprjw8adx6i225lqp49gasgqg74lahnabiy"))))
@@ -28800,7 +28795,7 @@ statement, the first matching branch is the item that gets emitted.")
(origin
(method url-fetch)
(uri (crate-uri "matches" version))
- (file-name (string-append name "-" version ".crate"))
+ (file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
"020axl4q7rk9vz90phs7f8jas4imxal9y9kxl4z4v7a6719mrz3z"))))
@@ -28966,7 +28961,7 @@ parallelize and optimize.")
(origin
(method url-fetch)
(uri (crate-uri "matrixmultiply" version))
- (file-name (string-append name "-" version ".crate"))
+ (file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
"13s7nfd3dfcsrixld2lk8c563ih5xzczl2w36hprfc016rkfrxyl"))))
@@ -28986,7 +28981,7 @@ parallelize and optimize.")
(origin
(method url-fetch)
(uri (crate-uri "matrixmultiply" version))
- (file-name (string-append name "-" version ".crate"))
+ (file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
"00p0fpjhm45qdzi37mgv7ggsy8b9gqvq4999yrbgyn1dxkf6gbfw"))))
@@ -29074,7 +29069,7 @@ parallelize and optimize.")
(origin
(method url-fetch)
(uri (crate-uri "md5" version))
- (file-name (string-append name "-" version ".crate"))
+ (file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32 "0wcps37hrhz59fkhf8di1ppdnqld6l1w5sdy7jp7p51z0i4c8329"))))
(build-system cargo-build-system)
@@ -29094,7 +29089,7 @@ parallelize and optimize.")
(origin
(method url-fetch)
(uri (crate-uri "md5" version))
- (file-name (string-append name "-" version ".crate"))
+ (file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
"17b2xm4h4cvxsdjsf3kdrzqv2za60kak961xzi5kmw6g6djcssvy"))))))
@@ -29260,7 +29255,7 @@ for searching bytes.")
(origin
(method url-fetch)
(uri (crate-uri "memmap" version))
- (file-name (string-append name "-" version ".crate"))
+ (file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
"0ns7kkd1h4pijdkwfvw4qlbbmqmlmzwlq3g2676dcl5vwyazv1b5"))))
@@ -29289,7 +29284,7 @@ file IO.")
(origin
(method url-fetch)
(uri (crate-uri "memmap" version))
- (file-name (string-append name "-" version ".crate"))
+ (file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
"1zy6s0ni0lx9rjzq3gq2zz9r8zgjmbp02332g3gsj4fyhv4s5zz2"))))))
@@ -29858,7 +29853,7 @@ drop-in allocator.")
(origin
(method url-fetch)
(uri (crate-uri "mime" version))
- (file-name (string-append name "-" version ".crate"))
+ (file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
"13dcm9lh01hdwfjcg74ppljyjfj1c6w3a3cwkhxf0w8wa37cfq1a"))))
@@ -30028,7 +30023,7 @@ streaming API for miniz_oxide.")
(origin
(method url-fetch)
(uri (crate-uri "miniz_oxide" version))
- (file-name (string-append name "-" version ".crate"))
+ (file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
"198n4hfpq0qcxf275l6fpzh7b9cl7ck2xs6pjgpds74bazv9yrxa"))))
@@ -30088,7 +30083,7 @@ drop-in replacement for miniz.")
(origin
(method url-fetch)
(uri (crate-uri "miniz-sys" version))
- (file-name (string-append name "-" version ".crate"))
+ (file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
"00l2r4anm8g35x0js2zfdnwfbrih9m43vphdpb77c5ga3kjkm7hy"))))
@@ -30354,7 +30349,7 @@ possible over the OS abstractions.")
(origin
(method url-fetch)
(uri (crate-uri "miow" version))
- (file-name (string-append name "-" version ".crate"))
+ (file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32 "15sqdhh29dqgw5xh59clwv6scbsbvdkbmdc16hbfvyq7b2sw2css"))))
(build-system cargo-build-system)
@@ -30381,7 +30376,7 @@ IOCP and Async I/O abstractions.")
(origin
(method url-fetch)
(uri (crate-uri "miow" version))
- (file-name (string-append name "-" version ".crate"))
+ (file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
"06g9b8sqlh5gxakwqq4rrib07afwanfnxgxajrldwcgk3hxjy7wc"))))
@@ -30548,7 +30543,7 @@ checking.")
(origin
(method url-fetch)
(uri (crate-uri "modifier" version))
- (file-name (string-append name "-" version ".crate"))
+ (file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
"0n3fmgli1nsskl0whrfzm1gk0rmwwl6pw1q4nb9sqqmn5h8wkxa1"))))
@@ -31663,7 +31658,7 @@ in Rust that can compile to WebAssembly.")
(origin
(method url-fetch)
(uri (crate-uri "net2" version))
- (file-name (string-append name "-" version ".crate"))
+ (file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
"126g3fgfxp06zimc1l9iyxnn9cif1hjsg7sd81nlls5nnyghsma2"))))
@@ -31798,8 +31793,7 @@ release (fork of debug_unreachable)")
(base32 "0r3hz725kblxr6mhl8rkf2bffzmyya0ib3xr3jk5zm8x2jlpvlq6"))))
(build-system cargo-build-system)
(arguments
- `(#:rust ,rust-1.52 ; some inputs fail with E0658
- #:tests? #f ; FIXME: "error reading DNS system conf" from reqwest
+ `(#:tests? #f ; FIXME: "error reading DNS system conf" from reqwest
#:cargo-inputs
(("rust-article-scraper" ,rust-article-scraper-1)
("rust-async-trait" ,rust-async-trait-0.1)
@@ -32392,7 +32386,7 @@ without the @code{std}.")
(origin
(method url-fetch)
(uri (crate-uri "nodrop" version))
- (file-name (string-append name "-" version ".crate"))
+ (file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
"1fz1v9r8ijacf0hlq0pdv5l9mz8vgqg1snmhvpjmi9aci1b4mvvj"))))
@@ -32415,7 +32409,7 @@ without the @code{std}.")
(origin
(method url-fetch)
(uri (crate-uri "nodrop-union" version))
- (file-name (string-append name "-" version ".crate"))
+ (file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
"1h59pph19rxanyqcaid8pg73s7wmzdx3zhjv5snlim5qx606zxkc"))))
@@ -33647,7 +33641,7 @@ mathematics.")
(origin
(method url-fetch)
(uri (crate-uri "num-traits" version))
- (file-name (string-append name "-" version ".crate"))
+ (file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
"0c9whknf2dm74a3cqirafy6gj83a76gl56g4v3g19k6lkwz13rcj"))))
@@ -33684,7 +33678,7 @@ giga, kibi.")
(origin
(method url-fetch)
(uri (crate-uri "numtoa" version))
- (file-name (string-append name "-" version ".crate"))
+ (file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
"1vs9rhggqbql1p26x8nkha1j06wawwgb2jp5fs88b5gi7prvvy5q"))))
@@ -33708,8 +33702,6 @@ giga, kibi.")
(string-append name "-" version ".tar.gz"))
(sha256
(base32 "0y5azgk8ds43m1sd5pc4hhakxzxkfcfscl24y8gsbvwdznxjqavv"))))
- (arguments
- `(#:rust ,rust-1.52)) ; fix for E0658
(build-system cargo-build-system)
(home-page "https://github.com/CasualX/obfstr")
(synopsis "Compile time string constant obfuscation for Rust")
@@ -34400,7 +34392,7 @@ the default program configured on the system.")
(origin
(method url-fetch)
(uri (crate-uri "openssl-probe" version))
- (file-name (string-append name "-" version ".crate"))
+ (file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
"1pijrdifgsdwd45b08c2g0dsmnhz7c3kmagb70839ngrd7d29bvp"))))
@@ -34521,8 +34513,7 @@ system for OpenSSL.")
(base32 "0zr7f101inkz3rknl0r3q0qkklfxhqrji7yxmqixajfn3m5mbjfa"))))
(build-system cargo-build-system)
(arguments
- `(#:rust ,rust-1.52 ; fix for E0658
- #:cargo-inputs
+ `(#:cargo-inputs
(("rust-regex" ,rust-regex-1)
("rust-serde" ,rust-serde-1)
("rust-strong-xml" ,rust-strong-xml-0.6)
@@ -34806,7 +34797,7 @@ platform-native strings.")
(origin
(method url-fetch)
(uri (crate-uri "owning_ref" version))
- (file-name (string-append name "-" version ".crate"))
+ (file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
"1kjj9m28wjv452jw49p1mp3d8ql058x78v4bz00avr7rvsnmpxbg"))))
@@ -35150,7 +35141,7 @@ sequence alignment tools.")
(origin
(method url-fetch)
(uri (crate-uri "parity-wasm" version))
- (file-name (string-append name "-" version ".crate"))
+ (file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
"03qycy21avz4970zc7aj8rj5h4wvi4qsrc90a6hpws1a56mglf8y"))))
@@ -36096,7 +36087,7 @@ pdqsort.")
(origin
(method url-fetch)
(uri (crate-uri "peeking_take_while" version))
- (file-name (string-append name "-" version ".crate"))
+ (file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
"16bhqr6rdyrp12zv381cxaaqqd0pwysvm1q8h2ygihvypvfprc8r"))))
@@ -36212,7 +36203,7 @@ runtime support for rust-peg grammars. To use rust-peg, see the peg crate.")
(origin
(method url-fetch)
(uri (crate-uri "percent-encoding" version))
- (file-name (string-append name "-" version ".crate"))
+ (file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
"0bp3zrsk3kr47fbpipyczidbbx4g54lzxdm77ni1i3qws10mdzfl"))))
@@ -36232,7 +36223,7 @@ runtime support for rust-peg grammars. To use rust-peg, see the peg crate.")
(origin
(method url-fetch)
(uri (crate-uri "percent-encoding" version))
- (file-name (string-append name "-" version ".crate"))
+ (file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
"0cgq08v1fvr6bs5fvy390cz830lq4fak8havdasdacxcw790s09i"))))))
@@ -36318,7 +36309,7 @@ perf_event_open system call, with associated types and constants.")
(origin
(method url-fetch)
(uri (crate-uri "permutohedron" version))
- (file-name (string-append name "-" version ".crate"))
+ (file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
"0b1pzh48j86v46wxngch6k1kx9cdw3jr3lwa86gd6jd4bmxzz1xn"))))
@@ -36767,7 +36758,7 @@ function data structures.")
(origin
(method url-fetch)
(uri (crate-uri "pico-sys" version))
- (file-name (string-append name "-" version ".crate"))
+ (file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
"1q5pg0ms6szz6b5h26h4k40zb76zbwwjgyigac4wly9qngdj4yl5"))))
@@ -36955,7 +36946,7 @@ written with declarative macros.")
(origin
(method url-fetch)
(uri (crate-uri "pkg-config" version))
- (file-name (string-append name "-" version ".crate"))
+ (file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
"0k4860955riciibxr8bhnklp79jydp4xfylwdn5v9kj96hxlac9q"))))
@@ -37014,7 +37005,7 @@ network packet formats.")
(origin
(method url-fetch)
(uri (crate-uri "plain" version))
- (file-name (string-append name "-" version ".crate"))
+ (file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
"19n1xbxb4wa7w891268bzf6cbwq4qvdb86bik1z129qb0xnnnndl"))))
@@ -37120,7 +37111,7 @@ both WASM and native applications")
(origin
(method url-fetch)
(uri (crate-uri "plugin" version))
- (file-name (string-append name "-" version ".crate"))
+ (file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
"1q7nghkpvxxr168y2jnzh3w7qc9vfrby9n7ygy3xpj0bj71hsshs"))))
@@ -37192,7 +37183,7 @@ both WASM and native applications")
(origin
(method url-fetch)
(uri (crate-uri "pocket-resources" version))
- (file-name (string-append name "-" version ".crate"))
+ (file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
"1n2i5vmi8fdbw89wm5nz1ws1z9f1qax911p6ksg4scmdg23z6df1"))))
@@ -37910,8 +37901,7 @@ UDP.")
"1hnid1d78zrr8ph12lpvp5b2cpx2fsqqgqs2yn1q23c6g7jix1y7"))))
(build-system cargo-build-system)
(arguments
- `(#:rust ,rust-1.46 ; or later
- #:tests? #f ; tests require postgres server.
+ `(#:tests? #f ; tests require postgres server.
#:cargo-inputs
(("rust-bytes" ,rust-bytes-1)
("rust-fallible-iterator" ,rust-fallible-iterator-0.2)
@@ -38117,7 +38107,7 @@ and Postgres values.")
(origin
(method url-fetch)
(uri (crate-uri "ppv-lite86" version))
- (file-name (string-append name "-" version ".crate"))
+ (file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
"1shj4q7jwj0azssr8cg51dk3kh7d4lg9rmbbz1kbqk971vc5wyi3"))))
@@ -38789,7 +38779,7 @@ in your code.")
(origin
(method url-fetch)
(uri (crate-uri "proc-macro2" version))
- (file-name (string-append name "-" version ".crate"))
+ (file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
"0f3h0zl5w5090ajmmvpmhkpr4iwqnn5rip3afacabhc657vwmn7h"))))
@@ -39674,7 +39664,7 @@ implementation.")
(origin
(method url-fetch)
(uri (crate-uri "quick-error" version))
- (file-name (string-append name "-" version ".crate"))
+ (file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
"18z6r2rcjvvf8cn92xjhm2qc3jpd1ljvcbf12zv0k9p565gmb4x9"))))
@@ -39695,7 +39685,7 @@ to write.")
(origin
(method url-fetch)
(uri (crate-uri "quick-error" version))
- (file-name (string-append name "-" version ".crate"))
+ (file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
"1q6za3v78hsspisc197bg3g7rpc989qycy8ypr8ap8igv10ikl51"))))))
@@ -40037,7 +40027,7 @@ integers, floats, tuples, booleans, lists, strings, options and results.")
(origin
(method url-fetch)
(uri (crate-uri "quote" version))
- (file-name (string-append name "-" version ".crate"))
+ (file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
"19rjmfqzk26rxbgxy5j2ckqc2v12sw2xw8l4gi8bzpn2bmsbkl63"))))
@@ -40305,7 +40295,7 @@ useful types and distributions, and some randomness-related algorithms.")
(origin
(method url-fetch)
(uri (crate-uri "rand" version))
- (file-name (string-append name "-" version ".crate"))
+ (file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
"00sdaimkbz491qgi6qxkv582yivl32m2jd401kzbn94vsiwicsva"))))
@@ -40332,7 +40322,7 @@ useful types and distributions, and some randomness-related algorithms.")
(origin
(method url-fetch)
(uri (crate-uri "rand" version))
- (file-name (string-append name "-" version ".crate"))
+ (file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
"1jl4449jcl4wgmzld6ffwqj5gwxrp8zvx8w573g1z368qg6xlwbd"))))
@@ -40414,7 +40404,7 @@ useful types and distributions, and some randomness-related algorithms.")
(origin
(method url-fetch)
(uri (crate-uri "rand" version))
- (file-name (string-append name "-" version ".crate"))
+ (file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
"0v679h38pjjqj5h4md7v2slsvj6686qgcn7p9fbw3h43iwnk1b34"))))
@@ -40474,7 +40464,7 @@ useful types and distributions, and some randomness-related algorithms.")
(origin
(method url-fetch)
(uri (crate-uri "rand_chacha" version))
- (file-name (string-append name "-" version ".crate"))
+ (file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
"1vxwyzs4fy1ffjc8l00fsyygpiss135irjf7nyxgq2v0lqf3lvam"))))
@@ -40536,7 +40526,7 @@ tools for implementation.")
(origin
(method url-fetch)
(uri (crate-uri "rand_core" version))
- (file-name (string-append name "-" version ".crate"))
+ (file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
"1p09ynysrq1vcdlmcqnapq4qakl2yd1ng3kxh3qscpx09k2a6cww"))))
@@ -40554,7 +40544,7 @@ tools for implementation.")
(origin
(method url-fetch)
(uri (crate-uri "rand_core" version))
- (file-name (string-append name "-" version ".crate"))
+ (file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
"0jzdgszfa4bliigiy4hi66k7fs3gfwi2qxn8vik84ph77fwdwvvs"))))
@@ -40696,7 +40686,7 @@ generator that uses the HC-128 algorithm.")
(origin
(method url-fetch)
(uri (crate-uri "rand_hc" version))
- (file-name (string-append name "-" version ".crate"))
+ (file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
"0g31sqwpmsirdlwr0svnacr4dbqyz339im4ssl9738cjgfpjjcfa"))))
@@ -40713,7 +40703,7 @@ generator that uses the HC-128 algorithm.")
(origin
(method url-fetch)
(uri (crate-uri "rand_hc" version))
- (file-name (string-append name "-" version ".crate"))
+ (file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
"1i0vl8q5ddvvy0x8hf1zxny393miyzxkwqnw31ifg6p0gdy6fh3v"))))
@@ -40782,7 +40772,7 @@ Add, and Count\" which are the principal bitwise operations employed.")
(origin
(method url-fetch)
(uri (crate-uri "rand_isaac" version))
- (file-name (string-append name "-" version ".crate"))
+ (file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
"027flpjr4znx2csxk7gxb7vrf9c7y5mydmvg5az2afgisp4rgnfy"))))
@@ -40802,7 +40792,7 @@ Add, and Count\" which are the principal bitwise operations employed.")
(origin
(method url-fetch)
(uri (crate-uri "rand_jitter" version))
- (file-name (string-append name "-" version ".crate"))
+ (file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
"16z387y46bfz3csc42zxbjq89vcr1axqacncvv8qhyy93p4xarhi"))))
@@ -40853,7 +40843,7 @@ generator based on timing jitter.")
(origin
(method url-fetch)
(uri (crate-uri "rand_os" version))
- (file-name (string-append name "-" version ".crate"))
+ (file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
"0wahppm0s64gkr2vmhcgwc0lij37in1lgfxg5rbgqlz0l5vgcxbv"))))
@@ -40877,7 +40867,7 @@ generator based on timing jitter.")
(origin
(method url-fetch)
(uri (crate-uri "rand_pcg" version))
- (file-name (string-append name "-" version ".crate"))
+ (file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
"1w47awndfhgcc31zbji66pwndqmc6lsyairqi9b17f82f19riqbx"))))
@@ -40904,7 +40894,7 @@ generator based on timing jitter.")
(origin
(method url-fetch)
(uri (crate-uri "rand_pcg" version))
- (file-name (string-append name "-" version ".crate"))
+ (file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
"0ab4h6s6x3py833jk61lwadq83qd1c8bih2hgi6yps9rnv0x1aqn"))))
@@ -40932,7 +40922,7 @@ generator based on timing jitter.")
(origin
(method url-fetch)
(uri (crate-uri "rand_pcg" version))
- (file-name (string-append name "-" version ".crate"))
+ (file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
"0i0bdla18a8x4jn1w0fxsbs3jg7ajllz6azmch1zw33r06dv1ydb"))))
@@ -41000,7 +40990,7 @@ generator based on timing jitter.")
(origin
(method url-fetch)
(uri (crate-uri "rand_xorshift" version))
- (file-name (string-append name "-" version ".crate"))
+ (file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
"0p2x8nr00hricpi2m6ca5vysiha7ybnghz79yqhhx6sl4gkfkxyb"))))
@@ -41262,7 +41252,7 @@ libcore.")
(origin
(method url-fetch)
(uri (crate-uri "rawpointer" version))
- (file-name (string-append name "-" version ".crate"))
+ (file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
"1qy1qvj17yh957vhffnq6agq0brvylw27xgks171qrah75wmg8v0"))))
@@ -41284,7 +41274,7 @@ and @code{ptrdistance}.")
(origin
(method url-fetch)
(uri (crate-uri "rawpointer" version))
- (file-name (string-append name "-" version ".crate"))
+ (file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
"06ghpm9y7gacks78s3maakha07kbnwrxif5q37r2l7z1sali3b7b"))))))
@@ -41455,7 +41445,7 @@ reference counting.")
(origin
(method url-fetch)
(uri (crate-uri "rdrand" version))
- (file-name (string-append name "-" version ".crate"))
+ (file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
"1cjq0kwx1bk7jx3kzyciiish5gqsj7620dm43dc52sr8fzmm9037"))))
@@ -41569,7 +41559,7 @@ owned memory.")
(origin
(method url-fetch)
(uri (crate-uri "redox_syscall" version))
- (file-name (string-append name "-" version ".crate"))
+ (file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
"1kh59fpwy33w9nwd5iyc283yglq8pf2s41hnhvl48iax9mz0zk21"))))
@@ -41583,7 +41573,7 @@ owned memory.")
(origin
(method url-fetch)
(uri (crate-uri "redox-termios" version))
- (file-name (string-append name "-" version ".crate"))
+ (file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
"0xhgvdh62mymgdl3jqrngl8hr4i8xwpnbsxnldq0l47993z1r2by"))))
@@ -42328,7 +42318,7 @@ uses finite automata and guarantees linear time matching on all inputs.")
(origin
(method url-fetch)
(uri (crate-uri "resolv-conf" version))
- (file-name (string-append name "-" version ".crate"))
+ (file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
"0jlzifww1h7j23jnjj49xz8q0fpd9rqpd0ks8c4y651vgw9lx0qi"))))
@@ -43472,8 +43462,7 @@ password hashing function.")
"10k58hf367626d4akl7ifyk5qwqphfs5x6z1yay22pkyc6w7q4h1"))))
(build-system cargo-build-system)
(arguments
- `(#:rust ,rust-1.46 ; or later
- #:tests? #f ; not all test files included.
+ `(#:tests? #f ; not all test files included.
#:cargo-inputs
(("rust-arbitrary" ,rust-arbitrary-1)
("rust-arrayvec" ,rust-arrayvec-0.5)
@@ -44139,7 +44128,7 @@ It is automatically published using the compiler repository at
(origin
(method url-fetch)
(uri (crate-uri "rustc-demangle" version))
- (file-name (string-append name "-" version ".crate"))
+ (file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
"10qp42sl1wrdbgbbh8rnay2grm976z7hqgz32c4y09l1c071qsac"))))
@@ -44260,7 +44249,7 @@ forth, as well as the ability to create custom thread-pools with ThreadPool.")
(origin
(method url-fetch)
(uri (crate-uri "rustc-serialize" version))
- (file-name (string-append name "-" version ".crate"))
+ (file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
"1nkg3vasg7nk80ffkazizgiyv3hb1l9g3d8h17cajbkx538jiwfw"))))
@@ -44307,7 +44296,7 @@ decoding.")
(origin
(method url-fetch)
(uri (crate-uri "rustc-std-workspace-core" version))
- (file-name (string-append name "-" version ".crate"))
+ (file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
"1309xhwyai9xpz128xrfjqkmnkvgjwddznmj7brbd8i8f58zamhr"))))
@@ -45215,7 +45204,7 @@ deserialization framework.")
(origin
(method url-fetch)
(uri (crate-uri "ryu" version))
- (file-name (string-append name "-" version ".crate"))
+ (file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
"0xlx9ybzncrb7d6r9533g8ydlg6mr252pfzl4g9cqaqkpvk24mjk"))))
@@ -45463,7 +45452,7 @@ computation (experimental)")
(origin
(method url-fetch)
(uri (crate-uri "safemem" version))
- (file-name (string-append name "-" version ".crate"))
+ (file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
"0wp0d2b2284lw11xhybhaszsczpbq1jbdklkxgifldcknmy3nw7g"))))
@@ -45498,7 +45487,7 @@ computation (experimental)")
(origin
(method url-fetch)
(uri (crate-uri "same-file" version))
- (file-name (string-append name "-" version ".crate"))
+ (file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
"00h5j1w87dmhnvbv9l8bic3y7xxsnjmssvifw2ayvgx9mb1ivz4k"))))
@@ -45610,7 +45599,7 @@ motivation for writing this library.
(origin
(method url-fetch)
(uri (crate-uri "schannel" version))
- (file-name (string-append name "-" version ".crate"))
+ (file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
"08d0p5iy574vdrax4l3laazic0crj7rp7vp3if5rrfkcdfq51xc7"))))
@@ -45656,7 +45645,7 @@ server functionality.")
(origin
(method url-fetch)
(uri (crate-uri "scoped_threadpool" version))
- (file-name (string-append name "-" version ".crate"))
+ (file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
"1a26d3lk40s9mrf4imhbik7caahmw2jryhhb6vqv6fplbbgzal8x"))))
@@ -45685,7 +45674,7 @@ non-'static references in parallel.")
(origin
(method url-fetch)
(uri (crate-uri "scoped-tls" version))
- (file-name (string-append name "-" version ".crate"))
+ (file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
"1hj8lifzvivdb1z02lfnzkshpvk85nkgzxsy2hc0zky9wf894spa"))))
@@ -45708,7 +45697,7 @@ library's old @code{scoped_thread_local!} macro for providing scoped access to
(origin
(method url-fetch)
(uri (crate-uri "scoped-tls" version))
- (file-name (string-append name "-" version ".crate"))
+ (file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
"0a2bn9d2mb07c6l16sadijy4p540g498zddfxyiq4rsqpwrglbrk"))))))
@@ -45721,7 +45710,7 @@ library's old @code{scoped_thread_local!} macro for providing scoped access to
(origin
(method url-fetch)
(uri (crate-uri "scopeguard" version))
- (file-name (string-append name "-" version ".crate"))
+ (file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
"1kbqm85v43rq92vx7hfiay6pmcga03vrjbbfwqpyj3pwsg3b16nj"))))
@@ -45746,7 +45735,7 @@ with one of the implemented strategies.")
(method url-fetch)
(uri (crate-uri "scopeguard" version))
(file-name
- (string-append name "-" version ".crate"))
+ (string-append name "-" version ".tar.gz"))
(sha256
(base32
"09sy9wbqp409pkwmqni40qmwa99ldqpl48pp95m1xw8sc19qy9cl"))))))
@@ -46313,7 +46302,7 @@ macOS and iOS.")
(origin
(method url-fetch)
(uri (crate-uri "security-framework-sys" version))
- (file-name (string-append name "-" version ".crate"))
+ (file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
"15gqhhi206lzynd0pcbswxhvqc4p9bmpl2h9qnwfnpb16zy96573"))))
@@ -46583,7 +46572,7 @@ Semantic Versioning.")
(origin
(method url-fetch)
(uri (crate-uri "semver-parser" version))
- (file-name (string-append name "-" version ".crate"))
+ (file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
"1ahqhvgpzhcsd28id7xnrjv4419i9yyalhm7d7zi430qx0hi2vml"))))))
@@ -46597,7 +46586,7 @@ Semantic Versioning.")
(origin
(method url-fetch)
(uri (crate-uri "semver-parser" version))
- (file-name (string-append name "-" version ".crate"))
+ (file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
"18vhypw6zgccnrlm5ps1pwa0khz7ry927iznpr88b87cagr1v2iq"))))))
@@ -47193,7 +47182,7 @@ TOML/JSON/MessagePack strings and serializable values.")
(origin
(method url-fetch)
(uri (crate-uri "serde-derive" version))
- (file-name (string-append name "-" version ".crate"))
+ (file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
"0ccg4m7ww6mfs5vjdbdifri2kf1wyd4difjnqnraph2gssaw54ck"))))
@@ -48582,7 +48571,7 @@ some context).")
(origin
(method url-fetch)
(uri (crate-uri "shlex" version))
- (file-name (string-append name "-" version ".crate"))
+ (file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32 "0gf773p2snqpw69rzh8s1wdlq8dc8c1ypmiv516il1fdyb46i9a2"))))
(build-system cargo-build-system)
@@ -48601,7 +48590,7 @@ words, like Python's shlex.")
(origin
(method url-fetch)
(uri (crate-uri "shlex" version))
- (file-name (string-append name "-" version ".crate"))
+ (file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
"1lmv6san7g8dv6jdfp14m7bdczq9ss7j7bgsfqyqjc3jnjfippvz"))))
@@ -49132,8 +49121,7 @@ variants in pure Rust.")
"07ix5fsdnpf2xsb0k5rbiwlmsicm2237fcx7blirp9p7pljr5mhn"))))
(build-system cargo-build-system)
(arguments
- `(#:rust ,rust-1.52 ;requires the "if in const fn" feature
- #:cargo-inputs
+ `(#:cargo-inputs
(("rust-arbitrary" ,rust-arbitrary-1)
("rust-array-ops" ,rust-array-ops-0.1)
("rust-bitmaps" ,rust-bitmaps-2)
@@ -49205,7 +49193,7 @@ designed for @code{immutable.rs}.")
(origin
(method url-fetch)
(uri (crate-uri "slab" version))
- (file-name (string-append name "-" version ".crate"))
+ (file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
"1y59xsa27jk84sxzswjk60xcjf8b4fm5960jwpznrrcmasyva4f1"))))
@@ -49830,8 +49818,7 @@ escaped text to recover the original string.")
(base32 "1v4f132rk9wxiw8hb3kgnixirzr8kbfhg2lgsf4b85vbg02a0jfn"))))
(build-system cargo-build-system)
(arguments
- `(#:rust ,rust-1.52 ; fix for E0658
- #:cargo-inputs (("rust-serde" ,rust-serde-1))))
+ `(#:cargo-inputs (("rust-serde" ,rust-serde-1))))
(home-page "https://github.com/emilk/snake_case")
(synopsis "String-like type that only contains non-empty snake_case")
(description
@@ -49880,8 +49867,7 @@ algorithm. Includes streaming compression and decompression.")
"18ny6m1gnf6cwp5ax0b5hr36w6yg16z7faj76b31aq2jghhgqgcy"))))
(build-system cargo-build-system)
(arguments
- `(#:rust ,rust-1.46 ; or later
- #:cargo-inputs
+ `(#:cargo-inputs
(("rust-libc" ,rust-libc-0.2)
("rust-winapi" ,rust-winapi-0.3))))
(home-page "https://github.com/rust-lang/socket2")
@@ -49901,7 +49887,7 @@ maximal amount of configuration possible intended.")
(origin
(method url-fetch)
(uri (crate-uri "socket2" version))
- (file-name (string-append name "-" version ".crate"))
+ (file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32 "0vldz14mxqxnjqb6an2pj7mgclv7nrk45cpscwq7g3fj2c0mfbhj"))))
(arguments
@@ -49948,7 +49934,7 @@ maximal amount of configuration possible intended.")
(origin
(method url-fetch)
(uri (crate-uri "sourcefile" version))
- (file-name (string-append name "-" version ".crate"))
+ (file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
"1lwa6973zs4bgj29my7agfjgk4nw9hp6j7dfnr13nid85fw7rxsb"))))
@@ -50066,7 +50052,7 @@ track of where each new file and line starts.")
(origin
(method url-fetch)
(uri (crate-uri "spin" version))
- (file-name (string-append name "-" version ".crate"))
+ (file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
"0b84m6dbzrwf2kxylnw82d3dr8w06av7rfkr8s85fb5f43rwyqvf"))))
@@ -50348,7 +50334,7 @@ to the same address.")
(origin
(method url-fetch)
(uri (crate-uri "stacker" version))
- (file-name (string-append name "-" version ".crate"))
+ (file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
"12igajfgqz96c7vcwi91xdfsphawik6g36ndlglqih0a7bqw8vyr"))))
@@ -50471,7 +50457,7 @@ management.")
(origin
(method url-fetch)
(uri (crate-uri "static-assertions" version))
- (file-name (string-append name "-" version ".crate"))
+ (file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
"0gsl6xmw10gvn3zs1rv99laj5ig7ylffnh71f9l34js4nr4r7sx2"))))
@@ -50492,7 +50478,7 @@ are met.")
(origin
(method url-fetch)
(uri (crate-uri "static-assertions" version))
- (file-name (string-append name "-" version ".crate"))
+ (file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
"1lw33i89888yb3x29c6dv4mrkg3534n0rlg3r7qzh4p58xmv6gkz"))))))
@@ -50811,7 +50797,7 @@ you to define custom reference types outside of the @code{stdweb} library.")
(origin
(method url-fetch)
(uri (crate-uri "stdweb-internal-runtime" version))
- (file-name (string-append name "-" version ".crate"))
+ (file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
"1h0nkppb4r8dbrbms2hw9n5xdcs392m0r5hj3b6lsx3h6fx02dr1"))))
@@ -50831,7 +50817,7 @@ crate.")
(origin
(method url-fetch)
(uri (crate-uri "stdweb-internal-test-macro" version))
- (file-name (string-append name "-" version ".crate"))
+ (file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
"0wx3jlm98qrg1pdw149fprzs9x3x3igqkm5ll23jv2v62yddfrjf"))))
@@ -50973,7 +50959,7 @@ iterated over only by reference rather than by value.")
(origin
(method url-fetch)
(uri (crate-uri "streaming-stats" version))
- (file-name (string-append name "-" version ".crate"))
+ (file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
"0iz5dlq51w5hxjrv6a4hpf8rrj91kgvy0s9mhj0j12il9v771mmh"))))
@@ -51248,8 +51234,7 @@ file.")
(base32 "1gxy34j42x5a572cfkkhmxamrm764pswj5r3wcwi0bwfc4xgn68x"))))
(build-system cargo-build-system)
(arguments
- `(#:rust ,rust-1.52 ; fix for E0658
- #:cargo-inputs
+ `(#:cargo-inputs
(("rust-jetscii" ,rust-jetscii-0.5)
("rust-lazy-static" ,rust-lazy-static-1)
("rust-log" ,rust-log-0.4)
@@ -51319,7 +51304,7 @@ and Jaro-Winkler.")
(origin
(method url-fetch)
(uri (crate-uri "strsim" version))
- (file-name (string-append name "-" version ".crate"))
+ (file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
"0k497pv882qn3q977ckznm13vxx927g8s1swvcv68j3c1pccwik4"))))))
@@ -51333,7 +51318,7 @@ and Jaro-Winkler.")
(origin
(method url-fetch)
(uri (crate-uri "strsim" version))
- (file-name (string-append name "-" version ".crate"))
+ (file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
"0sjsm7hrvjdifz661pjxq5w4hf190hx53fra8dfvamacvff139cf"))))))
@@ -52341,7 +52326,7 @@ a syntax tree of Rust source code.")
(origin
(method url-fetch)
(uri (crate-uri "synstructure_test_traits" version))
- (file-name (string-append name "-" version ".crate"))
+ (file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
"1b3fs2b9kc1gy9dilaxqjbdl4z0mlrbbxjzkprdx953rif1c3q66"))))
@@ -52925,7 +52910,7 @@ without a mutable reference.")
(origin
(method url-fetch)
(uri (crate-uri "tar" version))
- (file-name (string-append name "-" version ".crate"))
+ (file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
"1lr6v3cpkfxd2lk5ll2jd8wr1xdskwj35smnh5sfb8xvzzxnn6dk"))))
@@ -53629,7 +53614,7 @@ a C API.")
(origin
(method url-fetch)
(uri (crate-uri "tempdir" version))
- (file-name (string-append name "-" version ".crate"))
+ (file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
"1n5n86zxpgd85y0mswrp5cfdisizq2rv3la906g6ipyc03xvbwhm"))))
@@ -53654,7 +53639,7 @@ deleting all contents when it's dropped.")
(origin
(method url-fetch)
(uri (crate-uri "tempfile" version))
- (file-name (string-append name "-" version ".crate"))
+ (file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32 "08pbf3c1i42382dc44dil5bgiawcsi0qk6zdibw10f69rxiwdhfs"))))
(build-system cargo-build-system)
@@ -53835,7 +53820,7 @@ template language.")
(origin
(method url-fetch)
(uri (crate-uri "term" version))
- (file-name (string-append name "-" version ".crate"))
+ (file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
"1wbh8ngqkqr3f6wz902yplf60bd5yapnckvrkgmzp5nffi7n8qzs"))))
@@ -53853,7 +53838,7 @@ template language.")
(origin
(method url-fetch)
(uri (crate-uri "term" version))
- (file-name (string-append name "-" version ".crate"))
+ (file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32 "109jmzddq1kz6wm2ndgddy7yrlqcw2i36ygxl0fcymc0sda7w1zj"))))
(arguments
@@ -53958,7 +53943,7 @@ library.")
(origin
(method url-fetch)
(uri (crate-uri "termcolor" version))
- (file-name (string-append name "-" version ".crate"))
+ (file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32 "1x65i1ny4m6z1by62ra6wdcrd557p2ysm866x0pg60zby2cxizid"))))
(build-system cargo-build-system)
@@ -54067,7 +54052,7 @@ writing colored text to a terminal.")
(origin
(method url-fetch)
(uri (crate-uri "termion" version))
- (file-name (string-append name "-" version ".crate"))
+ (file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
"01f9787d5nx445bqbj644v38bn0hl2swwjy9baz0dnbqi6fyqb62"))))
@@ -54093,7 +54078,7 @@ writing colored text to a terminal.")
(origin
(method url-fetch)
(uri (crate-uri "termios" version))
- (file-name (string-append name "-" version ".crate"))
+ (file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
"09any1p4jp4bphvb5ikagnvwjc3xn2djchy96nkpa782xb2j1dkj"))))
@@ -54396,7 +54381,7 @@ handle Unicode characters correctly.")
(origin
(method url-fetch)
(uri (crate-uri "thread-id" version))
- (file-name (string-append name "-" version ".crate"))
+ (file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
"1h90v19fjz3x9b25ywh68z5yf2zsmm6h5zb4rl302ckbsp4z9yy7"))))
@@ -54441,7 +54426,7 @@ different for every thread.")
(origin
(method url-fetch)
(uri (crate-uri "thread_local" version))
- (file-name (string-append name "-" version ".crate"))
+ (file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32 "1gccp3grndpi6dyhzylz4hkqnkzc1xyri98n0xwwhnn90i7d4640"))))
(build-system cargo-build-system)
@@ -54465,7 +54450,7 @@ different for every thread.")
(origin
(method url-fetch)
(uri (crate-uri "thread_local" version))
- (file-name (string-append name "-" version ".crate"))
+ (file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
"06rzik99p8c5js8238yhc8rk6np543ylb1dy9nrw5v80j0r3xdf6"))))
@@ -54543,7 +54528,7 @@ contention between workers when delivering jobs.")
(origin
(method url-fetch)
(uri (crate-uri "threadpool" version))
- (file-name (string-append name "-" version ".crate"))
+ (file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
"0rd89n1q7vy47w4c32cnynibffv9kj3jy3dwr0536n9lbw5ckw72"))))
@@ -54769,7 +54754,7 @@ interoperable with the standard library, and is mostly compatible with
(origin
(method url-fetch)
(uri (crate-uri "time" version))
- (file-name (string-append name "-" version ".crate"))
+ (file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
"0f14wrgxj7ya2v4msg5mni7046bsm2angm7cn3pd3yv04gpm12na"))))
@@ -55661,7 +55646,7 @@ futures efficiently")
(origin
(method url-fetch)
(uri (crate-uri "tokio-mock-task" version))
- (file-name (string-append name "-" version ".crate"))
+ (file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
"1y7q83qfk9ljjfvs82b453pmz9x1v3d6kr4x55j8mal01s6790dw"))))
@@ -55899,8 +55884,7 @@ OpenSSL.")
"12rb390i3af7zb0z2idhaf6l2m6snypwdiwjw84rmyz4qy1i6ard"))))
(build-system cargo-build-system)
(arguments
- `(#:rust ,rust-1.46
- #:tests? #f ;require postgresql
+ `(#:tests? #f ;require postgresql
#:cargo-inputs
(("rust-async-trait" ,rust-async-trait-0.1)
("rust-byteorder" ,rust-byteorder-1)
@@ -56890,7 +56874,7 @@ stream-based WebSocket implementation.")
(origin
(method url-fetch)
(uri (crate-uri "toml" version))
- (file-name (string-append name "-" version ".crate"))
+ (file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
"1apcmjrrjw429pjw7mqlmdwwd67g8305vwqy4kw3swr612bl44d3"))))
@@ -57133,7 +57117,7 @@ automatically instrumenting functions.")
(origin
(method url-fetch)
(uri (crate-uri "tracing-core" version))
- (file-name (string-append name "-" version ".crate"))
+ (file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32 "0pvbgv301vw6dq4krc14yqbyyixb42lcs4s57xw05llkgy9f63gm"))))
(build-system cargo-build-system)
@@ -57454,7 +57438,7 @@ be used directly. See @code{rust-trackable} for more information.")
(origin
(method url-fetch)
(uri (crate-uri "traitobject" version))
- (file-name (string-append name "-" version ".crate"))
+ (file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
"0yb0n8822mr59j200fyr2fxgzzgqljyxflx9y8bdy3rlaqngilgg"))))
@@ -58367,7 +58351,7 @@ the Trust-DNS client to use rustls for TLS.")
(origin
(method url-fetch)
(uri (crate-uri "try_from" version))
- (file-name (string-append name "-" version ".crate"))
+ (file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
"12wdd4ja7047sd3rx70hv2056hyc8gcdllcx3a41g1rnw64kng98"))))
@@ -58389,7 +58373,7 @@ the Trust-DNS client to use rustls for TLS.")
(origin
(method url-fetch)
(uri (crate-uri "try-lock" version))
- (file-name (string-append name "-" version ".crate"))
+ (file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
"10p36rx6pqi9d0zr876xa8vksx2m66ha45myakl50rn08dxyn176"))))
@@ -58691,7 +58675,7 @@ strings.")
(origin
(method url-fetch)
(uri (crate-uri "typeable" version))
- (file-name (string-append name "-" version ".crate"))
+ (file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
"11w8dywgnm32hb291izjvh4zjd037ccnkk77ahk63l913zwzc40l"))))
@@ -58776,7 +58760,7 @@ deserialization.")
(origin
(method url-fetch)
(uri (crate-uri "typemap" version))
- (file-name (string-append name "-" version ".crate"))
+ (file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
"1xm1gbvz9qisj1l6d36hrl9pw8imr8ngs6qyanjnsad3h0yfcfv5"))))
@@ -58798,7 +58782,7 @@ deserialization.")
(origin
(method url-fetch)
(uri (crate-uri "typenum" version))
- (file-name (string-append name "-" version ".crate"))
+ (file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
"0cvbksljz61ian21fnn0h51kphl0pwpzb932bv4s0rwy1wh8lg1p"))))
@@ -58846,7 +58830,7 @@ Unicode character database.")
(origin
(method url-fetch)
(uri (crate-uri "ucd-trie" version))
- (file-name (string-append name "-" version ".crate"))
+ (file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
"1hh6kyzh5xygwy96wfmsf8v8czlzhps2lgbcyhj1xzy1w1xys04g"))))
@@ -58869,7 +58853,7 @@ Unicode character database.")
(origin
(method url-fetch)
(uri (crate-uri "ucd-util" version))
- (file-name (string-append name "-" version ".crate"))
+ (file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
"13ng291mkc9b132jjf4laj76f5nqm5qd2447rm8bry3wxbdc5kaw"))))
@@ -59352,7 +59336,7 @@ boundaries according to Unicode Standard Annex #29 rules.")
(method url-fetch)
(uri (crate-uri "unicode-xid" version))
(file-name
- (string-append name "-" version ".crate"))
+ (string-append name "-" version ".tar.gz"))
(sha256
(base32
"0r6mknipyy9vpz8mwmxvkx65ff2ha1n2pxqjj6f46lcn8yrhpzpp"))))
@@ -59372,7 +59356,7 @@ or XID_Continue properties according to Unicode Standard Annex #31.")
(origin
(method url-fetch)
(uri (crate-uri "unicode-xid" version))
- (file-name (string-append name "-" version ".crate"))
+ (file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
"1z57lqh4s18rr4x0j4fw4fmp9hf9346h0kmdgqsqx0fhjr3k0wpw"))))))
@@ -59483,7 +59467,7 @@ whitespace from a string.")
(origin
(method url-fetch)
(uri (crate-uri "unreachable" version))
- (file-name (string-append name "-" version ".crate"))
+ (file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
"0mps2il4xy2mjqc3appas27hhn2xmvixc3bzzhfrjj74gy3i0a1q"))))
@@ -59506,7 +59490,7 @@ whitespace from a string.")
(origin
(method url-fetch)
(uri (crate-uri "unsafe-any" version))
- (file-name (string-append name "-" version ".crate"))
+ (file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
"0zwwphsqkw5qaiqmjwngnfpv9ym85qcsyj7adip9qplzjzbn00zk"))))
@@ -59548,7 +59532,7 @@ whitespace from a string.")
(origin
(method url-fetch)
(uri (crate-uri "untrusted" version))
- (file-name (string-append name "-" version ".crate"))
+ (file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
"0jkbqaj9d3v5a91pp3wp9mffvng1nhycx6sh4qkdd9qyr62ccmm1"))))
@@ -60103,7 +60087,7 @@ a part of rav1e.")
(origin
(method url-fetch)
(uri (crate-uri "vcpkg" version))
- (file-name (string-append name "-" version ".crate"))
+ (file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
"1yvrd2b97j4hv5bfhcj3al0dpkbzkdsr6dclxqz3zqm50rhwl2xh"))))
@@ -60147,7 +60131,7 @@ a part of rav1e.")
(origin
(method url-fetch)
(uri (crate-uri "vec_map" version))
- (file-name (string-append name "-" version ".crate"))
+ (file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
"1481w9g1dw9rxp3l6snkdqihzyrd2f8vispzqmwjwsdyhw8xzggi"))))
@@ -60220,7 +60204,7 @@ designed for reexporting.")
(origin
(method url-fetch)
(uri (crate-uri "version_check" version))
- (file-name (string-append name "-" version ".crate"))
+ (file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32 "1vbaqdf802qinsq8q20w8w0qn2pv0rkq5p73ijcblrwxcvjp5adm"))))
(build-system cargo-build-system)
@@ -60244,7 +60228,7 @@ If that fails, no determination is made, and calls return None.")
(origin
(method url-fetch)
(uri (crate-uri "version_check" version))
- (file-name (string-append name "-" version ".crate"))
+ (file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
"1pf91pvj8n6akh7w6j5ypka6aqz08b3qpzgs0ak2kjf4frkiljwi"))))))
@@ -60365,7 +60349,7 @@ version numbers.")
(origin
(method url-fetch)
(uri (crate-uri "void" version))
- (file-name (string-append name "-" version ".crate"))
+ (file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
"0zc8f0ksxvmhvgx4fdg0zyn6vdnbxd2xv9hfx4nhzg6kbs4f80ka"))))
@@ -60745,7 +60729,7 @@ result.")
(method url-fetch)
(uri (crate-uri "wasi" version))
(file-name
- (string-append name "-" version ".crate"))
+ (string-append name "-" version ".tar.gz"))
(sha256
(base32
"1ir3pd4phdfml0cbziw9bqp7mnk0vfp9biy8bh25lln6raml4m7x"))))
@@ -60969,7 +60953,7 @@ attribute that is not in the shared backend crate.")
(origin
(method url-fetch)
(uri (crate-uri "wasm-bindgen-shared" version))
- (file-name (string-append name "-" version ".crate"))
+ (file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
"0n3ir6gq27np22l6m96y342a6fphk1pkbzbfqx6g364kgzfi2y3y"))))
@@ -61115,7 +61099,7 @@ attribute that is not in the shared backend crate.")
(origin
(method url-fetch)
(uri (crate-uri "wasm-bindgen-test-macro" version))
- (file-name (string-append name "-" version ".crate"))
+ (file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
"19bvmw8mqlwh6wkbzgs3cnlkywrv8q2kkqggz6y0p158930xm287"))))
@@ -61752,7 +61736,7 @@ terms of allowing LLVM's auto-vectorizer to do its job.")
(origin
(method url-fetch)
(uri (crate-uri "widestring" version))
- (file-name (string-append name "-" version ".crate"))
+ (file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
"13565qy4jhpg4x0xw8mwxzzsh0p8c93p5208lh6kpwp0q01y6qx7"))))
@@ -61799,7 +61783,7 @@ command-line, uniformly on all platforms")
(origin
(method url-fetch)
(uri (crate-uri "winapi" version))
- (file-name (string-append name "-" version ".crate"))
+ (file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
"06gl025x418lchw1wxj64ycr7gha83m44cjr5sarhynd9xkrm0sw"))))
@@ -61828,7 +61812,7 @@ command-line, uniformly on all platforms")
(origin
(method url-fetch)
(uri (crate-uri "winapi" version))
- (file-name (string-append name "-" version ".crate"))
+ (file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
"0yh816lh6lf56dpsgxy189c2ai1z3j8mw9si6izqb6wsjkbcjz8n"))))
@@ -61842,7 +61826,7 @@ command-line, uniformly on all platforms")
(origin
(method url-fetch)
(uri (crate-uri "winapi-build" version))
- (file-name (string-append name "-" version ".crate"))
+ (file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
"1g4rqsgjky0a7530qajn2bbfcrl2v0zb39idgdws9b1l7gp5wc9d"))))
@@ -61886,7 +61870,7 @@ i686-pc-windows-gnu target. Please don't use this crate directly, depend on
(origin
(method url-fetch)
(uri (crate-uri "winapi-util" version))
- (file-name (string-append name "-" version ".crate"))
+ (file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
"0y71bp7f6d536czj40dhqk0d55wfbbwqfp2ymqf1an5ibgl6rv3h"))))
@@ -61955,7 +61939,7 @@ x86_64-pc-windows-gnu target. Please don't use this crate directly, depend on
(origin
(method url-fetch)
(uri (crate-uri "wincolor" version))
- (file-name (string-append name "-" version ".crate"))
+ (file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
"017x33ljndwc76cp5z9llgndn0nh7v8jcjaykbizkawmwy9n3pyp"))))
@@ -62153,7 +62137,7 @@ trust these primitives.")
(origin
(method url-fetch)
(uri (crate-uri "winutil" version))
- (file-name (string-append name "-" version ".crate"))
+ (file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
"0vkyl3fbbf05n5ph5yz8sfaccrk9x3qsr25560w6w68ldf5i7bvx"))))
@@ -62224,7 +62208,7 @@ serialization.")
(origin
(method url-fetch)
(uri (crate-uri "ws2_32-sys" version))
- (file-name (string-append name "-" version ".crate"))
+ (file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
"0ppscg5qfqaw0gzwv2a4nhn5bn01ff9iwn6ysqnzm4n8s3myz76m"))))
@@ -62327,7 +62311,7 @@ languages.")
(origin
(method url-fetch)
(uri (crate-uri "xattr" version))
- (file-name (string-append name "-" version ".crate"))
+ (file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
"0k556fb6f5jc907975j9c8iynl2fqz3rf0w6fiig83i4yi0kfk14"))))
@@ -62410,7 +62394,7 @@ extended attributes.")
(origin
(method url-fetch)
(uri (crate-uri "xdg" version))
- (file-name (string-append name "-" version ".crate"))
+ (file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32 "0mws8a0fr3cqk5nh7aq9lmkmhzghvasqy4mhw6nnza06l4d6i2fh"))))
(build-system cargo-build-system)
@@ -63321,8 +63305,7 @@ file into an in-memory tree structure.")
"0gsgcs1nn38r40973l6zr1v4d85f4s9qyl32n5f20jphf5z9ba1w"))))
(build-system cargo-build-system)
(arguments
- `(#:rust ,rust-1.52 ;for rust-sized-chunks
- #:cargo-inputs
+ `(#:cargo-inputs
(("rust-arbitrary" ,rust-arbitrary-0.4)
("rust-bitmaps" ,rust-bitmaps-2)
("rust-proptest" ,rust-proptest-0.9)
diff --git a/gnu/packages/cross-base.scm b/gnu/packages/cross-base.scm
index 180594509b..78cbf871ac 100644
--- a/gnu/packages/cross-base.scm
+++ b/gnu/packages/cross-base.scm
@@ -4,7 +4,7 @@
;;; Copyright © 2016, 2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
;;; Copyright © 2016 Manolis Fragkiskos Ragkousis <manolis837@gmail.com>
;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
-;;; Copyright © 2019, 2020 Marius Bakke <mbakke@fastmail.com>
+;;; Copyright © 2019, 2020, 2021 Marius Bakke <marius@gnu.org>
;;; Copyright © 2019 Carl Dong <contact@carldong.me>
;;; Copyright © 2020 Mathieu Othacehe <m.othacehe@gmail.com>
;;;
@@ -153,12 +153,6 @@ base compiler and using LIBC (which may be either a libc package or #f.)"
"--disable-decimal-float" ;would need libc
"--disable-libcilkrts"
- ,@(if (string-prefix? "powerpc64le-" target)
- ;; On POWER9 (little endian) glibc needs
- ;; the 128-bit long double type.
- '("--with-long-double-128")
- '())
-
;; When target is any OS other than 'none' these
;; libraries will fail if there is no libc
;; present. See
@@ -243,6 +237,9 @@ target that libc."
(append
(origin-patches (package-source xgcc))
(append (cond
+ ((version>=? (package-version xgcc) "10.0")
+ (search-patches "gcc-10-cross-environment-variables.patch"
+ "gcc-cross-gxx-include-dir.patch"))
((version>=? (package-version xgcc) "8.0")
(search-patches "gcc-8-cross-environment-variables.patch"))
((version>=? (package-version xgcc) "6.0")
@@ -341,15 +338,18 @@ target that libc."
`(#:implicit-cross-inputs? #f
,@(package-arguments linux-headers))
((#:phases phases)
- `(alist-replace
- 'build
- (lambda _
- (setenv "ARCH" ,(system->linux-architecture target))
- (format #t "`ARCH' set to `~a' (cross compiling)~%" (getenv "ARCH"))
-
- (invoke "make" ,(system->defconfig target))
- (invoke "make" "mrproper" "headers_check"))
- ,phases))))
+ `(modify-phases ,phases
+ (replace 'build
+ (lambda _
+ (setenv "ARCH" ,(system->linux-architecture target))
+ (format #t "`ARCH' set to `~a' (cross compiling)~%"
+ (getenv "ARCH"))
+
+ (invoke "make" ,(system->defconfig target))
+ (invoke "make" "mrproper"
+ ,@(if (version>=? (package-version linux-headers) "5.3")
+ '("headers")
+ '("headers_check")))))))))
(native-inputs `(("cross-gcc" ,xgcc)
("cross-binutils" ,xbinutils)
,@(package-native-inputs linux-headers)))))
@@ -505,7 +505,7 @@ and the cross tool chain."
,@(package-arguments libc))
((#:configure-flags flags)
`(cons ,(string-append "--host=" target)
- ,(if (hurd-triplet? target)
+ ,(if (target-hurd? target)
`(cons "--disable-werror" ,flags)
flags)))
((#:phases phases)
@@ -519,7 +519,7 @@ and the cross tool chain."
(setenv "CROSS_LIBRARY_PATH"
(string-append kernel "/lib")) ; for Hurd's libihash
#t)))
- ,@(if (hurd-triplet? target)
+ ,@(if (target-hurd? target)
'((add-after 'install 'augment-libc.so
(lambda* (#:key outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out")))
@@ -527,35 +527,16 @@ and the cross tool chain."
(("/[^ ]+/lib/libc.so.0.3")
(string-append out "/lib/libc.so.0.3"
" libmachuser.so libhurduser.so"))))
- #t))
- ;; TODO: move to glibc in the next rebuild cycle
- (add-after 'unpack 'patch-libc/hurd
- (lambda* (#:key inputs #:allow-other-keys)
- (for-each
- (lambda (name)
- (let ((patch (assoc-ref inputs name)))
- (invoke "patch" "-p1" "--force" "-i" patch)))
- '("hurd-mach-print.patch"
- "hurd-gettyent.patch")))))
+ #t)))
'())))))
;; Shadow the native "kernel-headers" because glibc's recipe expects the
;; "kernel-headers" input to point to the right thing.
(propagated-inputs `(("kernel-headers" ,xheaders)))
- ;; FIXME: 'static-bash' should really be an input, not a native input, but
- ;; to do that will require building an intermediate cross libc.
- (inputs (if (hurd-triplet? target)
- `(;; TODO: move to glibc in the next rebuild cycle
- ("hurd-mach-print.patch"
- ,(search-patch "glibc-hurd-mach-print.patch"))
- ("hurd-gettyent.patch"
- ,(search-patch "glibc-hurd-gettyent.patch")))
- '()))
-
(native-inputs `(("cross-gcc" ,xgcc)
("cross-binutils" ,xbinutils)
- ,@(if (hurd-triplet? target)
+ ,@(if (target-hurd? target)
`(("cross-mig"
,@(assoc-ref (package-native-inputs xheaders)
"cross-mig")))
diff --git a/gnu/packages/crypto.scm b/gnu/packages/crypto.scm
index b6f2010a80..1a26d7ab37 100644
--- a/gnu/packages/crypto.scm
+++ b/gnu/packages/crypto.scm
@@ -86,6 +86,7 @@
#:use-module (guix packages)
#:use-module (guix download)
#:use-module (guix git-download)
+ #:use-module (guix gexp)
#:use-module (guix build-system cargo)
#:use-module (guix build-system cmake)
#:use-module (guix build-system copy)
@@ -878,7 +879,7 @@ SHA-1, SHA-2, and SHA-3, yet is at least as secure as SHA-3.")
(define-public rhash
(package
(name "rhash")
- (version "1.3.9")
+ (version "1.4.2")
(source
(origin
(method url-fetch)
@@ -887,40 +888,40 @@ SHA-1, SHA-2, and SHA-3, yet is at least as secure as SHA-3.")
(file-name (string-append "rhash-" version ".tar.gz"))
(sha256
(base32
- "1xn9fqa6rlnhsbgami45g82dlw9i1skg2sri3ydiinwak5ph1ca2"))))
+ "0qpc1fq7gdxxl11zya1gqhl9628jjk3x60q9sna43w0yz7sh03b0"))))
(build-system gnu-build-system)
(arguments
- `(#:configure-flags
- (list (string-append "--prefix=" (assoc-ref %outputs "out"))
- ,@(let ((target (%current-target-system)))
- (if target
- `((string-append "--target=" ,target)
- (string-append "--cc="
- (assoc-ref %build-inputs "cross-gcc")
- "/bin/" ,target "-gcc"))
- '())))
- #:make-flags
- ;; The binaries in /bin need some help finding librhash.so.0.
- (list (string-append "LDFLAGS=-Wl,-rpath=" %output "/lib"))
- #:test-target "test" ; ‘make check’ just checks the sources
- #:phases
- (modify-phases %standard-phases
- (replace 'configure
- ;; ./configure is not GNU autotools' and doesn't gracefully handle
- ;; unrecognized options, so we must call it manually.
- (lambda* (#:key configure-flags #:allow-other-keys)
- (apply invoke "./configure" configure-flags)))
- (add-before 'check 'patch-/bin/sh
- (lambda _
- (substitute* "Makefile"
- (("/bin/sh") (which "sh")))
- #t))
- (add-after 'install 'install-library-extras
- (lambda* (#:key make-flags #:allow-other-keys)
- (apply invoke
- "make" "-C" "librhash"
- "install-lib-headers" "install-so-link"
- make-flags))))))
+ (list #:configure-flags
+ #~(list (string-append "--prefix=" #$output)
+ #$@(let ((target (%current-target-system)))
+ (if target
+ #~((string-append "--target=" #$target)
+ (string-append "--cc="
+ (assoc-ref %build-inputs "cross-gcc")
+ "/bin/" #$target "-gcc"))
+ #~())))
+ #:make-flags
+ ;; The binaries in /bin need some help finding librhash.so.0.
+ #~(list (string-append "LDFLAGS=-Wl,-rpath=" #$output "/lib"))
+ #:test-target "test" ; ‘make check’ just checks the sources
+ #:phases
+ #~(modify-phases %standard-phases
+ (delete 'configure)
+ (add-before 'build 'configure
+ ;; ./configure is not GNU autotools' and doesn't gracefully handle
+ ;; unrecognized options, so we must call it manually.
+ (lambda* (#:key configure-flags #:allow-other-keys)
+ (apply invoke "./configure" configure-flags)))
+ (add-before 'check 'patch-/bin/sh
+ (lambda _
+ (substitute* "Makefile"
+ (("/bin/sh") (which "sh")))))
+ (add-after 'install 'install-library-extras
+ (lambda* (#:key make-flags #:allow-other-keys)
+ (apply invoke
+ "make" "-C" "librhash"
+ "install-lib-headers" "install-so-link"
+ make-flags))))))
(home-page "https://sourceforge.net/projects/rhash/")
(synopsis "Utility for computing hash sums")
(description "RHash is a console utility for calculation and verification
diff --git a/gnu/packages/cups.scm b/gnu/packages/cups.scm
index b2fe3e05c1..193c808b1e 100644
--- a/gnu/packages/cups.scm
+++ b/gnu/packages/cups.scm
@@ -1,12 +1,13 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2015, 2019, 2021 Ricardo Wurmus <rekado@elephly.net>
-;;; Copyright © 2015, 2016, 2017, 2019 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2015, 2016, 2017, 2019, 2021 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2015, 2016, 2017, 2018 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2016 Danny Milosavljevic <dannym@scratchpost.org>
;;; Copyright © 2017 Leo Famulari <leo@famulari.name>
;;; Copyright © 2017 Mark H Weaver <mhw@netris.org>
;;; Copyright © 2017–2021 Tobias Geerinckx-Rice <me@tobias.gr>
;;; Copyright © 2020 Marius Bakke <mbakke@fastmail.com>
+;;; Copyright © 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -128,7 +129,7 @@ driver is known to work with these printers:
(define-public cups-filters
(package
(name "cups-filters")
- (version "1.27.4")
+ (version "1.28.9")
(source(origin
(method url-fetch)
(uri
@@ -136,7 +137,7 @@ driver is known to work with these printers:
"cups-filters-" version ".tar.xz"))
(sha256
(base32
- "110b1xhb5vfpcx0zq9kkas7pj281skx5dpnnr22idx509jfdzj8b"))
+ "1bk0x1rrb8wqbhh5c979ppgy6s2kqss8mjdlahgcjvd79wm3fs9g"))
(modules '((guix build utils)))
(snippet
;; install backends, banners and filters to cups-filters output
@@ -196,29 +197,31 @@ driver is known to work with these printers:
#t)))
(add-after 'install 'wrap-filters
(lambda* (#:key inputs outputs #:allow-other-keys)
- ;; Some filters expect to find 'gs' in $PATH. We cannot
- ;; just hard-code its absolute file name in the source
+ ;; Some filters expect to find things in $PATH. We cannot
+ ;; just hard-code all absolute file names in the source
;; because foomatic-rip, for example, has tests like
;; 'startswith(cmd, "gs")'.
(let ((out (assoc-ref outputs "out"))
- (ghostscript (assoc-ref inputs "ghostscript")))
+ (ghostscript (assoc-ref inputs "ghostscript"))
+ (grep (assoc-ref inputs "grep")))
(for-each (lambda (file)
(wrap-program file
`("PATH" ":" prefix
- (,(string-append ghostscript
- "/bin")))))
+ (,(string-append ghostscript "/bin:"
+ grep "/bin")))))
(find-files (string-append
out "/lib/cups/filter")))
#t))))))
(native-inputs
- `(("glib" ,glib "bin") ; for gdbus-codegen
+ `(("glib" ,glib "bin") ; for gdbus-codegen
("pkg-config" ,pkg-config)))
(inputs
`(("avahi" ,avahi)
("fontconfig" ,fontconfig)
("freetype" ,freetype)
- ("font-dejavu" ,font-dejavu) ; also needed by test suite
+ ("font-dejavu" ,font-dejavu) ; also needed by test suite
("ghostscript" ,ghostscript/cups)
+ ("grep" ,grep)
("ijs" ,ijs)
("dbus" ,dbus)
("lcms" ,lcms)
@@ -251,16 +254,20 @@ filters for the PDF-centric printing workflow introduced by OpenPrinting.")
(define-public cups-minimal
(package
(name "cups-minimal")
- (version "2.3.3")
- (replacement cups-minimal/fixed)
+ (version "2.3.3op2")
(source
(origin
- (method url-fetch)
- (uri (string-append "https://github.com/apple/cups/releases/download/v"
- version "/cups-" version "-source.tar.gz"))
+ (method git-fetch)
+ ;; Version maintained by the OpenPrinting organization, NOT a fork. The
+ ;; CUPS author tracks the current Apple CUPS sources and includes common
+ ;; changes and bug fixes for GNU/Linux. See its README and for example
+ ;; <https://github.com/apple/cups/issues/5917#issuecomment-819465891>.
+ (uri (git-reference
+ (url "https://github.com/OpenPrinting/cups")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
(sha256
- (base32
- "1vpk0b2vq830f8fvf9z8qjsm5k141i7pi8djbinpnr78pi4dj7r6"))))
+ (base32 "126d6kd3pkhmsvbcflkcpk3y30iqlkdqyvrk9aqq88vbxzjd5ia6"))))
(build-system gnu-build-system)
(arguments
`(#:configure-flags
@@ -273,6 +280,31 @@ filters for the PDF-centric printing workflow introduced by OpenPrinting.")
#:tests? #f
#:phases
(modify-phases %standard-phases
+ (add-after 'unpack 'never-cupsAdminGetServerSettings
+ ;; Instead of querying the daemon directly, this part of CUPS assumes
+ ;; that (1) it has access to a cupsd.conf under CUPS_SERVERROOT, and
+ ;; (2) the file's contents apply to the running daemon. (1) is false
+ ;; at least on Guix Systems resulting in extremely long delays when
+ ;; loading the Web interface's /admin page. (2) isn't valid anywhere
+ ;; because it ignores, e.g., -c FILE.
+ ;; Upstream considers this code on ‘life support’ so just neuter it.
+ (lambda _
+ (substitute* "cgi-bin/admin.c"
+ (("!cupsAdminGetServerSettings" match)
+ (string-append "0 && " match)))))
+ (add-after 'unpack 'remove-Web-UI-server-settings
+ ;; The /admin page's server configuration form is questionable for
+ ;; the same reason as cupsAdminGetServerSettings, and won't work at
+ ;; all on Guix Systems. Remove it entirely.
+ (lambda _
+ ;; SUBSTITUTE* and a patch both have (dis)advantages. This is
+ ;; shorter & should ensure that no translation is forgotten.
+ (substitute* (find-files "templates" "^admin\\.tmpl$")
+ ((" class=\"halves\"") "")
+ (("<FORM.* ACTION=\"/jobs.*</FORM>" match)
+ (string-append match "</P>{BROKEN? "))
+ (("</FORM>}" match)
+ (string-append match "}")))))
(add-before 'configure 'patch-makedefs
(lambda _
(substitute* "Makedefs.in"
@@ -299,7 +331,7 @@ filters for the PDF-centric printing workflow introduced by OpenPrinting.")
(inputs
`(("zlib" ,zlib)
("gnutls" ,gnutls)))
- (home-page "https://www.cups.org")
+ (home-page "https://openprinting.github.io/")
(synopsis "The Common Unix Printing System")
(description
"CUPS is a printing system that uses the Internet Printing Protocol
@@ -313,148 +345,128 @@ device-specific programs to convert and print many types of files.")
;; CUPS is Apache 2.0 with exceptions, see the NOTICE file.
(license license:asl2.0)))
-(define cups-minimal/fixed
- (package-with-extra-patches
- cups-minimal
- (search-patches "cups-CVE-2020-10001.patch")))
-
(define-public cups
(package/inherit cups-minimal
(name "cups")
(arguments
- `(;; Three tests fail:
- ;; * two tests in ipp-1.1.test related to "RFC 2911 section 3.2.6:
- ;; Get-Jobs Operation"
- ;; * test of number of error/warning messages, probably related to a
- ;; missing font.
- #:tests? #f
- #:configure-flags
- '("--disable-launchd"
- "--disable-systemd")
- #:phases
- (modify-phases %standard-phases
- (add-before 'configure 'patch-makedefs
- (lambda _
- (substitute* "Makedefs.in"
- (("INITDIR.*=.*@INITDIR@") "INITDIR = @prefix@/@INITDIR@")
- (("/bin/sh") (which "sh")))
- #t))
- (add-before 'check 'patch-tests
- (lambda _
- (let ((filters (assoc-ref %build-inputs "cups-filters"))
- (catpath (string-append
- (assoc-ref %build-inputs "coreutils") "/bin/"))
- (testdir (string-append (getcwd) "/tmp/")))
- (mkdir testdir)
- (substitute* "test/run-stp-tests.sh"
- ((" *BASE=/tmp/") (string-append "BASE=" testdir))
-
- ;; allow installation of filters from output dir and from
- ;; cups-filters
- (("for dir in /usr/libexec/cups/filter /usr/lib/cups/filter")
- (string-append
- "for dir in "
- (assoc-ref %outputs "out") "/lib/cups/filter "
- filters "/lib/cups/filter"))
+ (substitute-keyword-arguments (package-arguments cups-minimal)
+ ((#:tests? _ #t)
+ ;; Three tests fail:
+ ;; * two tests in ipp-1.1.test related to "RFC 2911 section 3.2.6:
+ ;; Get-Jobs Operation"
+ ;; * test of number of error/warning messages, probably related to a
+ ;; missing font.
+ #f)
+ ((#:configure-flags _ '())
+ `(list "--disable-launchd"
+ "--disable-systemd"))
+ ((#:phases phases '%standard-phases)
+ `(modify-phases ,phases
+ (add-before 'check 'patch-tests
+ (lambda _
+ (let ((filters (assoc-ref %build-inputs "cups-filters"))
+ (catpath (string-append
+ (assoc-ref %build-inputs "coreutils") "/bin/"))
+ (testdir (string-append (getcwd) "/tmp/")))
+ (mkdir testdir)
+ (substitute* "test/run-stp-tests.sh"
+ ((" *BASE=/tmp/") (string-append "BASE=" testdir))
- ;; check for charsets in cups-filters output
- (("/usr/share/cups/charsets")
- (string-append filters "/share/cups/charsets"))
+ ;; Allow installation of filters from the output directory
+ ;; and from cups-filters.
+ (("for dir in /usr/libexec/cups/filter /usr/lib/cups/filter")
+ (string-append
+ "for dir in "
+ (assoc-ref %outputs "out") "/lib/cups/filter "
+ filters "/lib/cups/filter"))
- ;; install additional required filters
- (("instfilter texttopdf texttopdf pdf")
- (string-append
- "instfilter texttopdf texttopdf pdf;"
- "instfilter imagetoraster imagetoraster raster;"
- "instfilter gstoraster gstoraster raster;"
- "instfilter urftopdf urftopdf pdf;"
- "instfilter rastertopdf rastertopdf pdf;"
- "instfilter pstopdf pstopdf pdf"))
+ ;; Check for charsets in the default cups-filters output.
+ (("/usr/share/cups/charsets")
+ (string-append filters "/share/cups/charsets"))
- ;; specify location of lpstat binary
- (("description=\"`lpstat -l")
- "description=\"`../systemv/lpstat -l")
+ ;; Install additional required filters.
+ (("instfilter texttopdf texttopdf pdf")
+ (string-append
+ "instfilter texttopdf texttopdf pdf;"
+ "instfilter imagetoraster imagetoraster raster;"
+ "instfilter gstoraster gstoraster raster;"
+ "instfilter urftopdf urftopdf pdf;"
+ "instfilter rastertopdf rastertopdf pdf;"
+ "instfilter pstopdf pstopdf pdf"))
- ;; patch shebangs of embedded scripts
- (("#!/bin/sh") (string-append "#!" (which "sh")))
+ ;; Specify the location of the lpstat binary.
+ (("description=\"`lpstat -l")
+ "description=\"`../systemv/lpstat -l")
- ;; also link mime definitions from cups-filters
- ;; to enable the additional filters for the test suite
- (("ln -s \\$root/conf/mime\\.types")
- (string-append
- "ln -s " filters
- "/share/cups/mime/cupsfilters.types $BASE/share/mime; "
- "ln -s $root/conf/mime.types"))
- (("ln -s \\$root/conf/mime\\.convs")
- (string-append
- "ln -s " filters
- "/share/cups/mime/cupsfilters.convs $BASE/share/mime; "
- "ln -s $root/conf/mime.convs")))
+ ;; Patch the shebangs of embedded scripts.
+ (("#!/bin/sh") (string-append "#!" (which "sh")))
- ;; fix search path for "cat"
- (substitute* "cups/testfile.c"
- (("cupsFileFind\\(\"cat\", \"/bin\"")
- (string-append "cupsFileFind(\"cat\", \"" catpath "\""))
- (("cupsFileFind\\(\"cat\", \"/bin:/usr/bin\"")
- (string-append "cupsFileFind(\"cat\", \"" catpath "\"")))
- #t)))
- ;; Make the compressed manpages writable so that the
- ;; reset-gzip-timestamps phase does not error out.
- (add-before 'reset-gzip-timestamps 'make-manpages-writable
- (lambda* (#:key outputs #:allow-other-keys)
- (let* ((out (assoc-ref outputs "out"))
- (man (string-append out "/share/man")))
- (for-each (lambda (file) (chmod file #o644))
- (find-files man "\\.gz"))
- #t)))
- (add-after 'install 'install-cups-filters-symlinks
- (lambda* (#:key inputs outputs #:allow-other-keys)
- (let ((out (assoc-ref outputs "out"))
- (cups-filters (assoc-ref inputs "cups-filters")))
- ;; charsets
- (symlink
- (string-append cups-filters "/share/cups/charsets")
- (string-append out "/share/charsets"))
+ ;; Also link MIME definitions from cups-filters
+ ;; to enable the additional filters for the test suite.
+ (("ln -s \\$root/conf/mime\\.types")
+ (string-append
+ "ln -s " filters
+ "/share/cups/mime/cupsfilters.types $BASE/share/mime; "
+ "ln -s $root/conf/mime.types"))
+ (("ln -s \\$root/conf/mime\\.convs")
+ (string-append
+ "ln -s " filters
+ "/share/cups/mime/cupsfilters.convs $BASE/share/mime; "
+ "ln -s $root/conf/mime.convs")))
- ;; mime types, driver file, ppds
- (for-each
- (lambda (f)
- (symlink (string-append cups-filters f)
- (string-append out f)))
- '("/share/cups/mime/cupsfilters.types"
- "/share/cups/mime/cupsfilters.convs"
- "/share/cups/drv/cupsfilters.drv"
- "/share/ppd"))
+ ;; Fix the search path for the "cat" command.
+ (substitute* "cups/testfile.c"
+ (("cupsFileFind\\(\"cat\", \"/bin\"")
+ (string-append "cupsFileFind(\"cat\", \"" catpath "\""))
+ (("cupsFileFind\\(\"cat\", \"/bin:/usr/bin\"")
+ (string-append "cupsFileFind(\"cat\", \"" catpath "\""))))))
+ (add-after 'install 'install-cups-filters-symlinks
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (let ((out (assoc-ref outputs "out"))
+ (cups-filters (assoc-ref inputs "cups-filters")))
+ ;; Charsets.
+ (symlink
+ (string-append cups-filters "/share/cups/charsets")
+ (string-append out "/share/charsets"))
- ;; filters
- (for-each
- (lambda (f)
- (symlink f
- (string-append out "/lib/cups/filter" (basename f))))
- (find-files (string-append cups-filters "/lib/cups/filter")))
+ ;; MIME types, driver files, and PPDs.
+ (for-each
+ (lambda (f)
+ (symlink (string-append cups-filters f)
+ (string-append out f)))
+ '("/share/cups/mime/cupsfilters.types"
+ "/share/cups/mime/cupsfilters.convs"
+ "/share/cups/drv/cupsfilters.drv"
+ "/share/ppd"))
- ;; backends
- (for-each
- (lambda (f)
- (symlink (string-append cups-filters f)
- (string-append out "/lib/cups/backend/"
- (basename f))))
- '("/lib/cups/backend/parallel"
- "/lib/cups/backend/serial"))
+ ;; Filters.
+ (for-each
+ (lambda (f)
+ (symlink f
+ (string-append out "/lib/cups/filter"
+ (basename f))))
+ (find-files (string-append cups-filters "/lib/cups/filter")))
- ;; banners
- (let ((banners "/share/cups/banners"))
- (delete-file-recursively (string-append out banners))
- (symlink (string-append cups-filters banners)
- (string-append out banners)))
+ ;; Backends.
+ (for-each
+ (lambda (f)
+ (symlink (string-append cups-filters f)
+ (string-append out "/lib/cups/backend/"
+ (basename f))))
+ '("/lib/cups/backend/parallel"
+ "/lib/cups/backend/serial"))
- ;; assorted data
- (let ((data "/share/cups/data"))
- (delete-file-recursively (string-append out data))
- (symlink (string-append cups-filters data)
- (string-append out data)))
+ ;; Banners.
+ (let ((banners "/share/cups/banners"))
+ (delete-file-recursively (string-append out banners))
+ (symlink (string-append cups-filters banners)
+ (string-append out banners)))
- #t))))))
+ ;; Assorted data.
+ (let ((data "/share/cups/data"))
+ (delete-file-recursively (string-append out data))
+ (symlink (string-append cups-filters data)
+ (string-append out data))))))))))
(inputs
`(("avahi" ,avahi)
("gnutls" ,gnutls)
@@ -592,8 +604,7 @@ should only be used as part of the Guix cups-pk-helper service.")
;; FIXME Use beginning-of-word in regexp.
(("[[:blank:]]plugin\\.py[[:blank:]]") " ")
(("/usr/include/libusb-1.0")
- (string-append (assoc-ref inputs "libusb")
- "/include/libusb-1.0"))
+ (search-input-directory inputs "/include/libusb-1.0"))
(("hplip_statedir =.*$")
;; Don't bail out while trying to create
;; /var/lib/hplip. We can safely change its value
@@ -644,7 +655,7 @@ should only be used as part of the Guix cups-pk-helper service.")
(lambda* (#:key inputs outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))
(bin (string-append out "/bin"))
- (python (assoc-ref inputs "python")))
+ (site (python:site-packages inputs outputs)))
(with-directory-excursion bin
(for-each (lambda (file)
(let ((target (readlink file)))
@@ -653,14 +664,11 @@ should only be used as part of the Guix cups-pk-helper service.")
(lambda _
(format #t
"#!~a~@
- export PYTHONPATH=\"~a:~a\"~@
+ export GUIX_PYTHONPATH=\"~a:~a\"~@
exec -a \"$0\" \"~a/~a\" \"$@\"~%"
(which "bash")
- (string-append
- out "/lib/python"
- (python:python-version python)
- "/site-packages")
- (getenv "PYTHONPATH")
+ site
+ (getenv "GUIX_PYTHONPATH")
bin target)))
(chmod file #o755)))
(find-files "." (lambda (file stat)
@@ -746,7 +754,7 @@ should only be used as part of the Guix cups-pk-helper service.")
(string-append "ac_cv_path_PPR_LIB="
(assoc-ref %outputs "out")
"/lib/ppr/lib")
-
+ "CFLAGS=-fcommon"
;; For some reason these are misdiagnosed.
"ac_cv_func_malloc_0_nonnull=yes"
"ac_cv_func_realloc_0_nonnull=yes")
diff --git a/gnu/packages/curl.scm b/gnu/packages/curl.scm
index c61a56256c..6d2f36397f 100644
--- a/gnu/packages/curl.scm
+++ b/gnu/packages/curl.scm
@@ -11,6 +11,7 @@
;;; 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>
;;;
@@ -45,7 +46,6 @@
#:use-module (gnu packages guile)
#:use-module (gnu packages kerberos)
#:use-module (gnu packages libidn)
- #:use-module (gnu packages openldap)
#:use-module (gnu packages perl)
#:use-module (gnu packages pkg-config)
#:use-module (gnu packages python)
@@ -57,29 +57,28 @@
(define-public curl
(package
(name "curl")
- (replacement curl-7.77.0)
- (version "7.74.0")
+ (version "7.79.1")
(source (origin
(method url-fetch)
(uri (string-append "https://curl.haxx.se/download/curl-"
version ".tar.xz"))
(sha256
(base32
- "12w7gskrglg6qrmp822j37fmbr0icrcxv7rib1fy5xiw80n5z7cr"))
+ "129n9hi7rbg3s112chyadhp4y27ppb5i65n12wm77aw2255zf1h6"))
(patches (search-patches "curl-use-ssl-cert-env.patch"))))
(build-system gnu-build-system)
(outputs '("out"
"doc")) ;1.2 MiB of man3 pages
(inputs `(("gnutls" ,gnutls)
("libidn" ,libidn)
- ("openldap" ,openldap)
("mit-krb5" ,mit-krb5)
("nghttp2" ,nghttp2 "lib")
("zlib" ,zlib)))
(native-inputs
- `(("perl" ,perl)
+ `(("nghttp2" ,nghttp2)
+ ("perl" ,perl)
("pkg-config" ,pkg-config)
- ("python" ,python-wrapper)))
+ ("python" ,python-minimal-wrapper)))
(native-search-paths
;; These variables are introduced by curl-use-ssl-cert-env.patch.
(list (search-path-specification
@@ -112,8 +111,7 @@
;; Do not save the configure options to avoid unnecessary references.
(substitute* "curl-config.in"
(("@CONFIGURE_OPTIONS@")
- "\"not available\""))
- #t))
+ "\"not available\""))))
(add-after
'install 'move-man3-pages
(lambda* (#:key outputs #:allow-other-keys)
@@ -122,18 +120,17 @@
(doc (assoc-ref outputs "doc")))
(mkdir-p (string-append doc "/share/man"))
(rename-file (string-append out "/share/man/man3")
- (string-append doc "/share/man/man3"))
- #t)))
- (replace
- 'check
- (lambda _
- (substitute* "tests/runtests.pl"
- (("/bin/sh") (which "sh")))
+ (string-append doc "/share/man/man3")))))
+ (replace 'check
+ (lambda* (#:key tests? #:allow-other-keys)
+ (substitute* "tests/runtests.pl"
+ (("/bin/sh") (which "sh")))
- ;; The top-level "make check" does "make -C tests quiet-test", which
- ;; is too quiet. Use the "test" target instead, which is more
- ;; verbose.
- (invoke "make" "-C" "tests" "test"))))))
+ (when tests?
+ ;; The top-level "make check" does "make -C tests quiet-test", which
+ ;; is too quiet. Use the "test" target instead, which is more
+ ;; verbose.
+ (invoke "make" "-C" "tests" "test")))))))
(synopsis "Command line tool for transferring data with URL syntax")
(description
"curl is a command line tool for transferring data with URL syntax,
@@ -147,14 +144,8 @@ tunneling, and so on.")
"See COPYING in the distribution."))
(home-page "https://curl.haxx.se/")))
-;; This package exists mainly to bootstrap CMake. It must not depend on
-;; anything that uses cmake-build-system.
(define-public curl-minimal
- (hidden-package
- (package/inherit
- curl
- (name "curl-minimal")
- (inputs (alist-delete "openldap" (package-inputs curl))))))
+ (deprecated-package "curl-minimal" curl))
(define-public curl-ssh
(package/inherit curl
@@ -167,21 +158,6 @@ tunneling, and so on.")
,@(package-inputs curl)))
(properties `((hidden? . #t)))))
-(define-public curl-7.77.0
- (package
- (inherit curl)
- (version "7.77.0")
- (source
- (origin
- (inherit (package-source curl))
- (uri (string-append "https://curl.haxx.se/download/curl-"
- version ".tar.xz"))
- (patches (search-patches "curl-7.76-use-ssl-cert-env.patch"
- "curl-7.77-tls-priority-string.patch"))
- (sha256
- (base32
- "0jsrc97vbghvljic997r9nypc9qqddcil2lzvv032br8ahn5hr0g"))))))
-
(define-public kurly
(package
(name "kurly")
diff --git a/gnu/packages/databases.scm b/gnu/packages/databases.scm
index 7cff0f99c5..6b552f688f 100644
--- a/gnu/packages/databases.scm
+++ b/gnu/packages/databases.scm
@@ -614,9 +614,6 @@ around TangentOrg’s libmemcached library, and can be used as a drop-in
replacement for the code@{python-memcached} library.")
(license license:bsd-3)))
-(define-public python2-pylibmc
- (package-with-python2 python-pylibmc))
-
(define-public litecli
(package
(name "litecli")
@@ -780,7 +777,7 @@ Language.")
(define-public mariadb
(package
(name "mariadb")
- (version "10.5.8")
+ (version "10.5.12")
(source (origin
(method url-fetch)
(uri (string-append "https://downloads.mariadb.com/MariaDB"
@@ -788,7 +785,7 @@ Language.")
version ".tar.gz"))
(sha256
(base32
- "1s3vfm73911cddjhgpcbkya6nz7ag2zygg56qqzwscn5ybv28j7b"))
+ "1gg4h9ahmk78cx01zyw0fqr6hhd78fsyhs0s34p3gi9hkak1qkxb"))
(modules '((guix build utils)))
(snippet
'(begin
@@ -807,9 +804,7 @@ Language.")
(unless (string-suffix? "CMakeLists.txt" file)
(delete-file file)))
(append (find-files "extra/wolfssl")
- (find-files "zlib")))
- #t))))
- (replacement mariadb/fixed)
+ (find-files "zlib")))))))
(build-system cmake-build-system)
(outputs '("out" "lib" "dev"))
(arguments
@@ -864,6 +859,10 @@ Language.")
"/share/mysql/support-files")
"-DINSTALL_MYSQLSHAREDIR=share/mysql"
"-DINSTALL_SHAREDIR=share")
+ ;; The test suite has spurious failures (mostly timeouts) if run in
+ ;; parallel on various machines. Only enable parallel tests on
+ ;; architectures which are likely to not have this issue.
+ #:parallel-tests? ,(target-x86-64?)
#:phases
(modify-phases %standard-phases
(add-after 'unpack 'adjust-output-references
@@ -891,37 +890,32 @@ Language.")
"${INSTALL_INCLUDEDIR}"))
(substitute* "cmake/mariadb_connector_c.cmake"
(("\\\\\\$\\{CMAKE_INSTALL_PREFIX\\}/\\$\\{INSTALL_BINDIR\\}")
- "${INSTALL_BINDIR}"))
- #t))
+ "${INSTALL_BINDIR}"))))
(add-after 'unpack 'adjust-tests
(lambda _
(let ((disabled-tests
'(;; These fail because root@hostname == root@localhost in
;; the build environment, causing a user count mismatch.
;; See <https://jira.mariadb.org/browse/MDEV-7761>.
- "funcs_1.is_columns_mysql"
- "main.join_cache"
"main.explain_non_select"
- "main.stat_tables"
- "main.stat_tables_innodb"
"main.upgrade_MDEV-19650"
"roles.acl_statistics"
+ ;; Probably same as above, test failure reported upstream:
+ ;; <https://jira.mariadb.org/browse/MDEV-26320>.
+ "main.selectivity_no_engine"
+
;; FIXME: This test checks various table encodings and
;; fails because Guix defaults to UTF8 instead of the
;; upstream default latin1_swedish_ci. It's not easily
;; substitutable because several encodings are tested.
- "main.sp2"
+ "main.system_mysql_db"
;; XXX: This test occasionally fails on i686-linux:
;; <https://jira.mariadb.org/browse/MDEV-24458>
,@(if (string-prefix? "i686" (%current-system))
'("main.myisampack")
- '())
-
- ;; This file contains a time bomb which makes it fail after
- ;; 2030-12-31. See <https://bugs.gnu.org/34351> for details.
- "main.mysqldump"))
+ '())))
;; This file contains a list of known-flaky tests for this
;; release. Append our own items.
@@ -945,8 +939,7 @@ Language.")
(substitute* "mysql-test/mysql-test-run.pl"
(("/bin/ls") (which "ls"))
- (("/bin/sh") (which "sh")))
- #t)))
+ (("/bin/sh") (which "sh"))))))
(add-before 'configure 'disable-plugins
(lambda _
(let ((disable-plugin (lambda (name)
@@ -957,24 +950,25 @@ Language.")
(format port "\n")))))
(disabled-plugins '(;; XXX: Causes a test failure.
"disks")))
- (for-each disable-plugin disabled-plugins)
- #t)))
+ (for-each disable-plugin disabled-plugins))))
(replace 'check
- (lambda* (#:key (tests? #t) #:allow-other-keys)
+ (lambda* (#:key (tests? #t) parallel-tests? #:allow-other-keys)
(if tests?
(with-directory-excursion "mysql-test"
(invoke "./mtr" "--verbose"
"--retry=3"
+ "--suite=main"
"--testcase-timeout=40"
"--suite-timeout=600"
- "--parallel" (number->string (parallel-job-count))
+ "--parallel" (number->string (if parallel-tests?
+ (parallel-job-count)
+ 1))
;; Skip the replication tests: they are very I/O
;; intensive and frequently causes indeterministic
;; failures even on powerful hardware.
"--skip-rpl"
"--skip-test-list=unstable-tests"))
- (format #t "test suite not run~%"))
- #t))
+ (format #t "test suite not run~%"))))
(add-after
'install 'post-install
(lambda* (#:key inputs outputs #:allow-other-keys)
@@ -1019,9 +1013,7 @@ Language.")
(substitute* (list (string-append dev "/bin/mysql_config")
(string-append dev "/lib/pkgconfig/mariadb.pc"))
(("-lssl -lcrypto" all)
- (string-append "-L" openssl "/lib " all)))
-
- #t))))))
+ (string-append "-L" openssl "/lib " all)))))))))
(native-inputs
`(("bison" ,bison)
("perl" ,perl)))
@@ -1045,13 +1037,6 @@ Language.")
as a drop-in replacement of MySQL.")
(license license:gpl2)))
-(define mariadb/fixed
- (package
- (inherit mariadb)
- (source (origin
- (inherit (package-source mariadb))
- (patches (search-patches "mariadb-CVE-2021-27928.patch"))))))
-
(define-public mariadb-connector-c
(package
(name "mariadb-connector-c")
@@ -1106,15 +1091,14 @@ and high-availability (HA).")
(define-public postgresql-13
(package
(name "postgresql")
- (replacement postgresql-13.3)
- (version "13.1")
+ (version "13.4")
(source (origin
(method url-fetch)
(uri (string-append "https://ftp.postgresql.org/pub/source/v"
version "/postgresql-" version ".tar.bz2"))
(sha256
(base32
- "07z6zwr58dckaa97yl9ml240z83d1lhgaxw9aq49i8lsp21mqd0j"))
+ "1kf0gcsrl5n25rjlvkh87aywmn28kbwvakm5c7j1qpr4j01y34za"))
(patches (search-patches "postgresql-disable-resolve_symlinks.patch"))))
(build-system gnu-build-system)
(arguments
@@ -1133,6 +1117,12 @@ and high-availability (HA).")
"src/bin/psql/command.c")
(("/bin/sh") (which "sh")))
#t))
+ (add-before 'configure 'set-socket-dir
+ (lambda _
+ (substitute* '("src/include/pg_config_manual.h")
+ (("DEFAULT_PGSOCKET_DIR[^\n]*")
+ "DEFAULT_PGSOCKET_DIR \"/var/run/postgresql\""))
+ #t))
(add-after 'build 'build-contrib
(lambda _
(invoke "make" "-C" "contrib")))
@@ -1155,20 +1145,6 @@ TIMESTAMP. It also supports storage of binary large objects, including
pictures, sounds, or video.")
(license (license:x11-style "file://COPYRIGHT"))))
-(define-public postgresql-13.3
- (package
- (inherit postgresql-13)
- (name "postgresql")
- (version "13.3")
- (source (origin
- (method url-fetch)
- (uri (string-append "https://ftp.postgresql.org/pub/source/v"
- version "/postgresql-" version ".tar.bz2"))
- (sha256
- (base32
- "18dliq7h2l8irffhyyhdmfwx3si515q6gds3cxdjb9n7m17lbn9w"))
- (patches (search-patches "postgresql-disable-resolve_symlinks.patch"))))))
-
(define-public postgresql-11
(package
(inherit postgresql-13)
@@ -1406,7 +1382,7 @@ including field and record folding.")))
(define-public rocksdb
(package
(name "rocksdb")
- (version "6.11.4")
+ (version "6.25.3")
(source (origin
(method git-fetch)
(uri (git-reference
@@ -1415,35 +1391,37 @@ including field and record folding.")))
(file-name (git-file-name name version))
(sha256
(base32
- "0n19p9cd13jg0lnibrzwkxs4xlrhyj3knypkd2ic41arbds0bdnl"))
+ "14150kd7hk8jjwpm28bf3a0agrhyapbq9lgnl00l385vfb73wnzl"))
(modules '((guix build utils)))
(snippet
'(begin
;; TODO: unbundle gtest.
(delete-file "build_tools/gnu_parallel")
(substitute* "Makefile"
- (("build_tools/gnu_parallel") "parallel"))
- #t))))
+ (("build_tools/gnu_parallel") "parallel"))))))
(build-system gnu-build-system)
(arguments
- `(#:make-flags (list "CC=gcc" "V=1"
+ `(#:make-flags (list (string-append "CC=" ,(cc-for-target))
+ (string-append "PREFIX=" (assoc-ref %outputs "out"))
;; Ceph requires that RTTI is enabled.
"USE_RTTI=1"
- "date=1970-01-01" ; build reproducibly
- (string-append "INSTALL_PATH="
- (assoc-ref %outputs "out"))
+ ;; Don't pass '-march=native' to the compiler.
+ "PORTABLE=1"
+ ;; Use a deterministic date stamp.
+ "build_date=1970-01-01"
;; Running the full test suite takes hours and require
;; a lot of disk space. Instead we only run a subset
- ;; (see .travis.yml and Makefile).
- "ROCKSDBTESTS_END=db_tailing_iter_test")
+ ;; that exercises platform-specific functionality.
+ "ROCKSDBTESTS_PLATFORM_DEPENDENT=only")
#:test-target "check_some"
;; Many tests fail on 32-bit platforms. There are multiple reports about
;; this upstream, but it's not going to be supported any time soon.
- #:tests? (let ((system ,(or (%current-target-system)
- (%current-system))))
- (or (string-prefix? "x86_64-linux" system)
- (string-prefix? "aarch64-linux" system)))
+ #:tests? ,(if (%current-target-system)
+ #f
+ (let ((system (%current-system)))
+ (or (string-prefix? "x86_64-linux" system)
+ (string-prefix? "aarch64-linux" system))))
#:phases
(modify-phases %standard-phases
(add-after 'unpack 'patch-Makefile
@@ -1451,9 +1429,8 @@ including field and record folding.")))
(substitute* "Makefile"
;; Don't depend on the static library when installing.
(("install: install-static")
- "install: install-shared")
- (("#!/bin/sh") (string-append "#!" (which "sh"))))
- #t))
+ "install:")
+ (("#!/bin/sh") (string-append "#!" (which "sh"))))))
(delete 'configure)
;; The default target is only needed for tests and built on demand.
(delete 'build)
@@ -1466,33 +1443,31 @@ including field and record folding.")))
(let ((test-dir (string-append (getcwd) "/../test")))
(mkdir test-dir)
(setenv "TEST_TMPDIR" (canonicalize-path test-dir)))))
- (add-before 'check 'disable-optimizations
- (lambda _
- ;; Prevent the build from passing '-march=native' to the compiler.
- (setenv "PORTABLE" "1")
- #t))
(add-before 'check 'disable-failing-tests
(lambda _
(substitute* "Makefile"
;; These tests reliably fail due to "Too many open files".
(("^[[:blank:]]+env_test[[:blank:]]+\\\\") "\\")
- (("^[[:blank:]]+persistent_cache_test[[:blank:]]+\\\\") "\\"))
- #t))
- (add-after 'check 'build
+ (("^[[:blank:]]+persistent_cache_test[[:blank:]]+\\\\") "\\"))))
+ (add-after 'check 'clean
+ (lambda _
+ ;; Otherwise stale objects from the tests would interfere.
+ (invoke "make" "clean")))
+ (add-after 'clean 'build
;; The default build target is a debug build for tests. The
;; install target depends on the "shared_lib" release target
;; so we build it here for clarity.
(lambda* (#:key (make-flags '()) parallel-build? #:allow-other-keys)
- (apply invoke "make" "shared_lib"
- `(,@(if parallel-build?
- `("-j" ,(number->string (parallel-job-count)))
- '())
- ,@make-flags)))))))
+ (apply invoke "make" "shared_lib"
+ `(,@(if parallel-build?
+ `("-j" ,(number->string (parallel-job-count)))
+ '())
+ ,@make-flags)))))))
(native-inputs
`(("parallel" ,parallel)
("perl" ,perl)
("procps" ,procps)
- ("python" ,python-2)
+ ("python" ,python)
("which" ,which)))
(inputs
`(("bzip2" ,bzip2)
@@ -2645,51 +2620,145 @@ can autogenerate peewee models using @code{pwiz}, a model generator.")
(define-public python2-peewee
(package-with-python2 python-peewee))
+(define-public python-pypika-tortoise
+ (package
+ (name "python-pypika-tortoise")
+ (version "0.1.1")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "pypika-tortoise" version))
+ (sha256
+ (base32 "0g4z0lz739nk04b405ynqpd3y1z5nfyxjz9hqgxcw3jydsjx0cb8"))))
+ (build-system python-build-system)
+ (home-page "https://github.com/tortoise/pypika-tortoise")
+ (synopsis "Pypika fork for tortoise-orm")
+ (description "Pypika-tortoise is a fork of pypika which has been
+streamlined for its use in the context of tortoise-orm. It removes support
+for many database kinds that tortoise-orm doesn't need, for example.")
+ (license license:asl2.0)))
+
+(define-public python-sphinxcontrib-asyncio
+ (package
+ (name "python-sphinxcontrib-asyncio")
+ (version "0.3.0")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "sphinxcontrib-asyncio" version))
+ (sha256
+ (base32 "0bkj010ygsr7m769llf2aq4bbjfhdwqrrabi98j8gpvyzvh2dzcr"))))
+ (build-system python-build-system)
+ (arguments '(#:tests? #f)) ;no test suite
+ (propagated-inputs (list python-sphinx))
+ (home-page "https://github.com/aio-libs/sphinxcontrib-asyncio")
+ (synopsis "Sphinx extension to support coroutines in markup")
+ (description "This package is a Sphinx extension providing additional
+coroutine-specific markup.")
+ (license license:asl2.0)))
+
+(define-public python-asyncpg
+ (package
+ (name "python-asyncpg")
+ (version "0.24.0")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "asyncpg" version))
+ (sha256
+ (base32 "1in0q6iffpl8ag6ady4bvwnn40igh10cpp4xgm426j1lqdis0byx"))))
+ (build-system python-build-system)
+ (propagated-inputs (list python-typing-extensions))
+ (native-inputs
+ (list postgresql
+ python-cython
+ python-flake8
+ python-pycodestyle
+ python-pytest
+ python-sphinx
+ python-sphinx-rtd-theme
+ python-sphinxcontrib-asyncio
+ python-uvloop))
+ (home-page "https://github.com/MagicStack/asyncpg")
+ (synopsis "Fast PostgreSQL database client library for Python")
+ (description "@code{asyncpg} is a database interface library designed
+specifically for PostgreSQL and Python/asyncio. @code{asyncpg} is an
+efficient, clean implementation of PostgreSQL server binary protocol for use
+with Python's asyncio framework.")
+ (license license:asl2.0)))
+
+(define-public python-asyncmy
+ (package
+ (name "python-asyncmy")
+ (version "0.2.3")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "asyncmy" version))
+ (sha256
+ (base32 "19p81jd4w7m7v2x1jdrwibp67wzqx1a7rdw5n4qqmch3iffp97vn"))))
+ (build-system python-build-system)
+ (native-inputs (list python-cython))
+ (home-page "https://github.com/long2ice/asyncmy")
+ (synopsis "Fast MySQL driver for Python")
+ (description "@code{asyncmy} is a fast @code{asyncio} MySQL driver, which
+reuses most of @code{pymysql} and @code{aiomysql} but rewrites the core
+protocol with Cython for performance.")
+ (license license:asl2.0)))
+
+(define-public python-aiomysql
+ (package
+ (name "python-aiomysql")
+ (version "0.0.21")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "aiomysql" version))
+ (sha256
+ (base32 "0b442d0jb82z3lk19ylmm64ix88ppz7gay08bxld538ivg06j5c1"))))
+ (build-system python-build-system)
+ (arguments '(#:tests? #f)) ;test suite requires docker
+ (propagated-inputs (list python-pymysql))
+ (home-page "https://github.com/aio-libs/aiomysql")
+ (synopsis "MySQL driver for Python")
+ (description "@code{aiomysql} is a driver for accessing a MySQL database
+from the @code{asyncio} Python framework. It depends on and reuses most parts
+of PyMySQL. @code{aiomysql} tries to preserve the same API as the
+@code{aiopg} library.")
+ (license license:expat)))
+
(define-public python-tortoise-orm
(package
(name "python-tortoise-orm")
- (version "0.16.21")
+ (version "0.17.8")
(source
(origin
(method url-fetch)
(uri (pypi-uri "tortoise-orm" version))
(sha256
- (base32
- "1dallk0q8q4v37klm0v3rppf2w8sjkqmypc1w8r9rraqxg1ylacp"))))
+ (base32 "1gzgiypln7lck3p95vk3i8rdx1bjbmmlcpb8xpba8cjdjvlj0l0z"))))
(build-system python-build-system)
- (arguments
- `(#:tests? #f ; Pypi does not have tests and Git snapshot depends on
- ; poetry.
- #:phases (modify-phases %standard-phases
- (add-after 'unpack 'relax-version-requirements
- (lambda _
- (substitute* "setup.py"
- (("pypika>=0\\.44\\.0,<0\\.45\\.0") "pypika")
- (("aiosqlite>=0.16.0,<0.17.0") "aiosqlite")
- (("pytz>=2020\\.4,<2021\\.0") "pytz")
- ;; Not required, since ciso8601 is used.
- (("'iso8601>=0\\.1\\.13,<0\\.2\\.0',") ""))
- #t)))))
- (native-inputs
- `(("python-asynctest" ,python-asynctest)
- ("python-nose2" ,python-nose2)))
+ ;; The test suite relies on asynctest, which is abandoned and doesn't
+ ;; support Python >= 3.8.
+ (arguments '(#:tests? #f))
(propagated-inputs
- `(("python-aiosqlite" ,python-aiosqlite)
- ("python-pypika" ,python-pypika)
- ("python-ciso8601" ,python-ciso8601)
- ("python-pytz" ,python-pytz)
- ("python-typing-extensions"
- ,python-typing-extensions)))
- (home-page
- "https://github.com/tortoise/tortoise-orm")
- (synopsis
- "Easy async ORM for python, built with relations in mind")
- (description
- "Tortoise ORM is an easy-to-use asyncio ORM (Object Relational Mapper)
-inspired by Django. Tortoise ORM was build with relations in mind and
-admiration for the excellent and popular Django ORM. It’s engraved in its
-design that you are working not with just tables, you work with relational
-data.")
+ (list python-aiomysql
+ python-aiosqlite
+ python-asyncmy
+ python-asyncpg
+ python-ciso8601
+ python-iso8601
+ python-pypika-tortoise
+ python-pytz
+ python-rapidjson
+ python-uvloop))
+ (home-page "https://github.com/tortoise/tortoise-orm")
+ (synopsis "Asynchronous Object Relational Mapper (ORM) for Python")
+ (description "Tortoise ORM is an easy-to-use asyncio ORM (Object
+Relational Mapper) inspired by Django. Tortoise ORM was built with relations
+in mind and admiration for the excellent and popular Django ORM. It's
+engraved in its design that you are working not with just tables, you work
+with relational data.")
(license license:asl2.0)))
(define-public sqlcipher
@@ -3168,13 +3237,13 @@ this library provides functions to facilitate such comparisons.")
(define-public python-alembic
(package
(name "python-alembic")
- (version "1.7.1")
+ (version "1.7.5")
(source
(origin
(method url-fetch)
(uri (pypi-uri "alembic" version))
(sha256
- (base32 "1ys0a44gh544xpbzz6r5xvz3msim74f9qklyfnw0bhn9vk9n9adf"))))
+ (base32 "0lxi2g2025lz5k7k5dd5fc1lfijqi2yw6qqyjzp073z6laa8cckw"))))
(build-system python-build-system)
(arguments
'(#:phases (modify-phases %standard-phases
@@ -3186,7 +3255,6 @@ this library provides functions to facilitate such comparisons.")
("python-pytest-cov" ,python-pytest-cov)))
(propagated-inputs
`(("python-dateutil" ,python-dateutil)
- ("python-importlib-resources" ,python-importlib-resources) ;Python < 3.9
("python-sqlalchemy" ,python-sqlalchemy)
("python-mako" ,python-mako)
("python-editor" ,python-editor)))
@@ -3238,7 +3306,7 @@ PickleShare.")
(define-public python-apsw
(package
(name "python-apsw")
- (version "3.31.1-r1")
+ (version "3.36.0-r1")
(source
(origin
(method url-fetch)
@@ -3246,7 +3314,7 @@ PickleShare.")
"/download/" version "/apsw-" version ".zip"))
(sha256
(base32
- "1gap5lr6c7bp134nzvfwr693i6d0fqyaysg3ms2cayjldv616yfx"))))
+ "0w8q73147hv77dlpqrx6h1gx03acc8xqhvdpfp6vkffdm0wmqd8p"))))
(build-system python-build-system)
(native-inputs
`(("unzip" ,unzip)))
@@ -3414,9 +3482,6 @@ Relationship diagrams from a SQLAlchemy model (or directly from the
database).")
(license license:bsd-3)))
-(define-public python2-sadisplay
- (package-with-python2 python-sadisplay))
-
(define-public yoyo-migrations
(package
(name "yoyo-migrations")
@@ -3500,20 +3565,22 @@ parsing code in hiredis. It primarily speeds up parsing of multi bulk replies."
(define-public python-fakeredis
(package
(name "python-fakeredis")
- (version "1.2.1")
+ (version "1.7.0")
(source
(origin
(method url-fetch)
(uri (pypi-uri "fakeredis" version))
(sha256
(base32
- "1s12mn4q4hz7402139khn9fx56kibj7nn0d6w81hn0zs07b90wpc"))))
+ "0wacd3f558vzsrpdvgvdwy9pp6crxf8hxblz30zbsv1k63j15gf9"))))
(build-system python-build-system)
(arguments
;; no tests
`(#:tests? #f))
(propagated-inputs
- `(("python-sortedcontainers" ,python-sortedcontainers)))
+ `(("python-packaging" ,python-packaging)
+ ("python-redis" ,python-redis)
+ ("python-sortedcontainers" ,python-sortedcontainers)))
(home-page "https://github.com/jamesls/fakeredis")
(synopsis "Fake implementation of redis API for testing purposes")
(description
@@ -3526,9 +3593,6 @@ talk to an external server such as redis. This module can be used as a
reasonable substitute.")
(license license:bsd-3)))
-(define-public python2-fakeredis
- (package-with-python2 python-fakeredis))
-
(define-public python-redis
(package
(name "python-redis")
@@ -3715,9 +3779,6 @@ provides support for parsing, splitting and formatting SQL statements.")
transforms idiomatic python function calls to well-formed SQL queries.")
(license license:bsd-3)))
-(define-public python2-sql
- (package-with-python2 python-sql))
-
(define-public python-pypika
(package
(name "python-pypika")
diff --git a/gnu/packages/datastructures.scm b/gnu/packages/datastructures.scm
index 577e7b1430..e79fe76954 100644
--- a/gnu/packages/datastructures.scm
+++ b/gnu/packages/datastructures.scm
@@ -25,7 +25,6 @@
#:use-module (gnu packages)
#:use-module (gnu packages autotools)
#:use-module (gnu packages boost)
- #:use-module (gnu packages build-tools) ;for meson-0.55
#:use-module (gnu packages perl)
#:use-module ((guix licenses) #:prefix license:)
#:use-module (guix packages)
@@ -296,8 +295,6 @@ equivalent succinct data structure are (most of the time) identical.")
(base32
"061mkg6hc9x89zya3bw18ymxlzd8fbhjipxpva8x01lh2vp1d4f0"))))
(build-system meson-build-system)
- (arguments
- `(#:meson ,meson-0.55))
(synopsis "Typed link list for C")
(description
"@code{tllist} is a @dfn{typed linked list} C header file only library
diff --git a/gnu/packages/dbm.scm b/gnu/packages/dbm.scm
index fcef907b27..8b6804aa92 100644
--- a/gnu/packages/dbm.scm
+++ b/gnu/packages/dbm.scm
@@ -1,10 +1,12 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2012, 2013, 2014, 2016 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2012, 2013, 2014, 2016, 2020 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2013, 2015 Andreas Enge <andreas@enge.fr>
-;;; Copyright © 2016, 2017, 2018, 2020 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2016, 2017, 2018, 2020, 2021 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2017, 2018 Marius Bakke <mbakke@fastmail.com>
;;; Copyright © 2018 Mark H Weaver <mhw@netris.org>
+;;; Copyright © 2020 Jakub Kądziołka <kuba@kadziolka.net>
;;; Copyright © 2021 Leo Le Bouter <lle-bout@zaclys.net>
+;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -23,11 +25,13 @@
(define-module (gnu packages dbm)
#:use-module (gnu packages)
+ #:use-module (gnu packages autotools)
#:use-module ((guix licenses) #:prefix license:)
#:use-module (guix packages)
#:use-module (guix download)
#:use-module (guix build-system gnu)
- #:use-module (guix utils))
+ #:use-module (guix utils)
+ #:use-module (ice-9 match))
;;; Commentary:
;;;
@@ -46,7 +50,8 @@
version ".tar.gz"))
(sha256
(base32
- "0ampbl2f0hb1nix195kz1syrqqxpmvnvnfvphambj7xjrl3iljg0"))))
+ "0ampbl2f0hb1nix195kz1syrqqxpmvnvnfvphambj7xjrl3iljg0"))
+ (patches (search-patches "bdb-5.3-atomics-on-gcc-9.patch"))))
(build-system gnu-build-system)
(outputs '("out" ; programs, libraries, headers
"doc")) ; 94 MiB of HTML docs
@@ -55,6 +60,19 @@
#:disallowed-references ("doc")
#:phases
(modify-phases %standard-phases
+ ;; The configure script is too old to recognise aarch64 and
+ ;; powerpc64le as valid architectures. The trick below works
+ ;; for "--build", but not for "--host", so update config.sub.
+ ,@(if (and (%current-target-system)
+ (or (target-ppc64le? (%current-target-system))
+ (target-aarch64? (%current-target-system))))
+ `((add-after 'unpack 'update-config.sub
+ (lambda* (#:key native-inputs #:allow-other-keys)
+ (delete-file "dist/config.sub")
+ (symlink
+ (search-input-file native-inputs "/bin/config.sub")
+ "dist/config.sub"))))
+ '())
(replace 'configure
(lambda* (#:key target outputs #:allow-other-keys)
(let ((out (assoc-ref outputs "out"))
@@ -70,15 +88,17 @@
(string-append "CONFIG_SHELL=" (which "bash"))
(string-append "SHELL=" (which "bash"))
- ;; Bdb doesn't recognize aarch64 as an architecture.
- ,@(if (string=? "aarch64-linux" (%current-system))
- '("--build=aarch64-unknown-linux-gnu")
- '())
-
- ;; Bdb doesn't recognize powerpc64le as an architecture.
- ,@(if (string=? "powerpc64le-linux" (%current-system))
- '("--build=powerpc64le-unknown-linux-gnu")
- '())
+ ;; Bdb's config script doesn't recognize very many
+ ;; architectures, and is a dependant on the 'config'
+ ;; package, so we manually define the build target.
+ ,@(match (%current-system)
+ ("aarch64-linux"
+ '("--build=aarch64-unknown-linux-gnu"))
+ ("powerpc64le-linux"
+ '("--build=powerpc64le-unknown-linux-gnu"))
+ ("riscv64-linux"
+ '("--build=riscv64-unknown-linux-gnu"))
+ (_ '()))
,@(if (%current-target-system) ; cross building
'((string-append "--host=" target))
@@ -95,6 +115,12 @@
;; of db_cxx.h into C++ files works; it leads to
;; HAVE_CXX_STDHEADERS being defined in db_cxx.h.
"--enable-cxx")))))))
+ (native-inputs
+ (if (and (%current-target-system)
+ (or (target-ppc64le? (%current-target-system))
+ (target-aarch64? (%current-target-system))))
+ `(("config" ,config)) ; for config.sub
+ '()))
(synopsis "Berkeley database")
(description
"Berkeley DB is an embeddable database allowing developers the choice of
@@ -114,7 +140,9 @@ SQL, Key/Value, XML/XQuery or Java Object storage for their data model.")
version ".tar.gz"))
(sha256
(base32
- "0a1n5hbl7027fbz5lm0vp0zzfp1hmxnz14wx3zl9563h83br5ag0"))))))
+ "0a1n5hbl7027fbz5lm0vp0zzfp1hmxnz14wx3zl9563h83br5ag0"))
+ (patch-flags '("-p0"))
+ (patches (search-patches "bdb-5.3-atomics-on-gcc-9.patch"))))))
(define-public bdb-6
(package (inherit bdb-4.8)
@@ -136,14 +164,14 @@ SQL, Key/Value, XML/XQuery or Java Object storage for their data model.")
(define-public gdbm
(package
(name "gdbm")
- (version "1.18.1")
+ (version "1.20")
(source (origin
(method url-fetch)
(uri (string-append "mirror://gnu/gdbm/gdbm-"
version ".tar.gz"))
(sha256
(base32
- "1p4ibds6z3ccy65lkmd6lm7js0kwifvl53r0fd759fjxgr917rl6"))))
+ "14m22j0zndd42yc0ps0bcnnjj2iq7agnp66sl882lj5k91bc1sis"))))
(arguments `(#:configure-flags '("--enable-libgdbm-compat"
"--disable-static")))
(build-system gnu-build-system)
diff --git a/gnu/packages/debug.scm b/gnu/packages/debug.scm
index c95cd036e8..ffcbbe9eb4 100644
--- a/gnu/packages/debug.scm
+++ b/gnu/packages/debug.scm
@@ -7,6 +7,7 @@
;;; Copyright © 2020 Vincent Legoll <vincent.legoll@gmail.com>
;;; Copyright © 2020, 2021 Morgan Smith <Morgan.J.Smith@outlook.com>
;;; Copyright © 2020 Maxim Cournoyer <maxim.cournoyer@gmail.com>
+;;; Copyright © 2021 Felix Gruber <felgru@posteo.net>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -213,7 +214,7 @@ tools that process C/C++ code.")
(add-after 'install 'wrap
(lambda* (#:key outputs #:allow-other-keys)
(let ((out (assoc-ref outputs "out"))
- (python-path (getenv "PYTHONPATH")))
+ (python-path (getenv "GUIX_PYTHONPATH")))
(wrap-program (string-append out "/bin/cvise")
`("PYTHONPATH" ":" prefix (,python-path)))
#t))))))
@@ -560,17 +561,15 @@ input. Zzuf's behaviour is deterministic, making it easy to reproduce bugs.")
(lambda* (#:key inputs outputs #:allow-other-keys)
(substitute* "gui/GameConqueror.py"
(("/usr/bin/env python")
- (string-append (assoc-ref %build-inputs
- "python-wrapper") "/bin/python")))
- #t))
+ (search-input-file inputs "/bin/python")))))
(add-after 'install 'wrap-gameconqueror
(lambda* (#:key inputs outputs #:allow-other-keys)
(let ((out (assoc-ref outputs "out"))
(gi-typelib-path (getenv "GI_TYPELIB_PATH"))
- (python-path (getenv "PYTHONPATH")))
+ (python-path (getenv "GUIX_PYTHONPATH")))
(wrap-program (string-append out "/share/gameconqueror/GameConqueror.py")
`("GI_TYPELIB_PATH" ":" prefix (,gi-typelib-path))
- `("PYTHONPATH" ":" prefix (,python-path))))
+ `("GUIX_PYTHONPATH" ":" prefix (,python-path))))
#t)))))
(native-inputs
`(("libtool" ,libtool)
diff --git a/gnu/packages/dictionaries.scm b/gnu/packages/dictionaries.scm
index b63bbf9245..75f1b1bed4 100644
--- a/gnu/packages/dictionaries.scm
+++ b/gnu/packages/dictionaries.scm
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2014, 2015, 2016 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2014, 2015, 2016, 2021 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2016, 2017, 2018, 2020, 2021 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2016 Sou Bunnbu <iyzsong@gmail.com>
;;; Copyright © 2017, 2018, 2019, 2021 Nicolas Goaziou <mail@nicolasgoaziou.fr>
@@ -178,8 +178,7 @@ work, such as sentence length and other readability measures.")
(lambda* (#:key inputs #:allow-other-keys)
(let ((bindir (string-append
(assoc-ref %outputs "out") "/bin"))
- (wish (string-append (assoc-ref inputs "tk")
- "/bin/wish8.6"))
+ (wish (search-input-file inputs "/bin/wish8.6"))
(sharedir (string-append
(assoc-ref %outputs "out")
"/share/applications"))
diff --git a/gnu/packages/diffoscope.scm b/gnu/packages/diffoscope.scm
index bd35b5aec5..f0197817a6 100644
--- a/gnu/packages/diffoscope.scm
+++ b/gnu/packages/diffoscope.scm
@@ -1,6 +1,6 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2015, 2016, 2017, 2018, 2019 Ludovic Courtès <ludo@gnu.org>
-;;; Copyright © 2017 Ricardo Wurmus <rekado@elephly.net>
+;;; Copyright © 2017, 2021 Ricardo Wurmus <rekado@elephly.net>
;;; Copyright © 2017–2021 Tobias Geerinckx-Rice <me@tobias.gr>
;;; Copyright © 2018 Julien Lepiller <julien@lepiller.eu>
;;; Copyright © 2018, 2019 Rutger Helling <rhelling@mykolab.com>
@@ -88,11 +88,12 @@
(build-system python-build-system)
(arguments
`(#:phases (modify-phases %standard-phases
- ;; This test is broken because our `file` package has a
- ;; bug in berkeley-db file type detection.
- (add-after 'unpack 'remove-berkeley-test
+ ;; These tests are broken because our `file` package has a
+ ;; bug in berkeley-db and wasm file type detection.
+ (add-after 'unpack 'remove-broken-file-type-detection-test
(lambda _
- (delete-file "tests/comparators/test_berkeley_db.py")))
+ (delete-file "tests/comparators/test_berkeley_db.py")
+ (delete-file "tests/comparators/test_wasm.py")))
(add-after 'unpack 'embed-tool-references
(lambda* (#:key inputs #:allow-other-keys)
(substitute* "diffoscope/comparators/utils/compare.py"
diff --git a/gnu/packages/disk.scm b/gnu/packages/disk.scm
index c457bfd1bf..a9880d7abb 100644
--- a/gnu/packages/disk.scm
+++ b/gnu/packages/disk.scm
@@ -448,8 +448,8 @@ to recover data more efficiently by only reading the necessary blocks.")
(build-system gnu-build-system)
(arguments
`(#:configure-flags (list "--enable-compat-symlinks")
- #:make-flags (list (string-append "PREFIX=" %output)
- "CC=gcc")))
+ #:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
+ (string-append "CC=" ,(cc-for-target)))))
(native-inputs
`(("autoconf" ,autoconf)
("automake" ,automake)
@@ -573,7 +573,7 @@ and can dramatically shorten the lifespan of the drive if left unchecked.")
`(("util-linux" ,util-linux "lib")
("parted" ,parted)
("glib" ,glib)
- ("gtkmm" ,gtkmm)
+ ("gtkmm" ,gtkmm-3)
("libxml2" ,libxml2)))
(native-inputs
`(("intltool" ,intltool)
@@ -962,8 +962,7 @@ to create devices with respective mappings for the ATARAID sets discovered.")
("nss" ,nss)
("parted" ,parted)
("volume-key" ,volume-key)
- ;; ("xfsprogs" ,xfsprogs) ; TODO: Package?
- ))
+ ("xfsprogs" ,xfsprogs)))
(home-page "https://github.com/storaged-project/libblockdev")
(synopsis "Library for manipulating block devices")
(description
diff --git a/gnu/packages/display-managers.scm b/gnu/packages/display-managers.scm
index ef5d14352e..1bfd85beae 100644
--- a/gnu/packages/display-managers.scm
+++ b/gnu/packages/display-managers.scm
@@ -10,6 +10,7 @@
;;; Copyright © 2020 Fredrik Salomonsson <plattfot@gmail.com>
;;; Copyright © 2020 Vincent Legoll <vincent.legoll@gmail.com>
;;; Copyright © 2021 Zheng Junjie <873216071@qq.com>
+;;; Copyright © 2021 Efraim Flashner <efraim@flashner.co.il>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -37,6 +38,7 @@
#:use-module (guix build-system trivial)
#:use-module (guix packages)
#:use-module (guix utils)
+ #:use-module (guix gexp)
#:use-module (gnu packages)
#:use-module (gnu packages admin)
#:use-module (gnu packages bash)
@@ -96,23 +98,23 @@
("wayland" ,wayland)))
(arguments
`(#:configure-flags
- (list
- ;; This option currently does nothing, but will presumably be enabled
- ;; if/when <https://github.com/sddm/sddm/pull/616> is merged.
- "-DENABLE_WAYLAND=ON"
- "-DENABLE_PAM=ON"
- ;; Both flags are required for elogind support.
- "-DNO_SYSTEMD=ON" "-DUSE_ELOGIND=ON"
- "-DCONFIG_FILE=/etc/sddm.conf"
- ;; Set path to /etc/login.defs.
- ;; An alternative would be to use -DUID_MIN and -DUID_MAX.
- (string-append "-DLOGIN_DEFS_PATH="
- (assoc-ref %build-inputs "shadow")
- "/etc/login.defs")
- (string-append "-DQT_IMPORTS_DIR="
- (assoc-ref %outputs "out") "/lib/qt5/qml")
- (string-append "-DCMAKE_INSTALL_SYSCONFDIR="
- (assoc-ref %outputs "out") "/etc"))
+ ,#~(list
+ ;; This option currently does nothing, but will presumably be enabled
+ ;; if/when <https://github.com/sddm/sddm/pull/616> is merged.
+ "-DENABLE_WAYLAND=ON"
+ "-DENABLE_PAM=ON"
+ ;; Both flags are required for elogind support.
+ "-DNO_SYSTEMD=ON" "-DUSE_ELOGIND=ON"
+ "-DCONFIG_FILE=/etc/sddm.conf"
+ ;; Set path to /etc/login.defs.
+ ;; An alternative would be to use -DUID_MIN and -DUID_MAX.
+ (string-append "-DLOGIN_DEFS_PATH="
+ #$(this-package-input "shadow")
+ "/etc/login.defs")
+ (string-append "-DQT_IMPORTS_DIR="
+ #$output "/lib/qt5/qml")
+ (string-append "-DCMAKE_INSTALL_SYSCONFDIR="
+ #$output "/etc"))
#:phases
(modify-phases %standard-phases
(add-after 'unpack 'embed-loginctl-reference
@@ -224,7 +226,7 @@ easy to use, login interface with a modern yet classy touch.")
;; Run test-suite under a dbus session.
(lambda* (#:key inputs #:allow-other-keys)
(wrap-program "tests/src/test-python-greeter"
- `("PYTHONPATH" ":" prefix (,(getenv "PYTHONPATH")))
+ `("GUIX_PYTHONPATH" ":" prefix (,(getenv "GUIX_PYTHONPATH")))
`("GI_TYPELIB_PATH" ":" prefix (,(getenv "GI_TYPELIB_PATH"))))
;; Avoid printing locale warnings, which trip up the text
diff --git a/gnu/packages/django.scm b/gnu/packages/django.scm
index 706debfad2..00a4e3f175 100644
--- a/gnu/packages/django.scm
+++ b/gnu/packages/django.scm
@@ -7,6 +7,7 @@
;;; Copyright © 2018 Vijayalakshmi Vedantham <vijimay12@gmail.com>
;;; Copyright © 2019 Sam <smbaines8@gmail.com>
;;; Copyright © 2020, 2021 Marius Bakke <marius@gnu.org>
+;;; Copyright © 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;; Copyright © 2021 Luis Felipe López Acevedo <luis.felipe.la@protonmail.com>
;;;
;;; This file is part of GNU Guix.
@@ -65,8 +66,7 @@
;; The test-suite tests timezone-dependent functions, thus tzdata
;; needs to be available.
(setenv "TZDIR"
- (string-append (assoc-ref inputs "tzdata")
- "/share/zoneinfo"))
+ (search-input-directory inputs "share/zoneinfo"))
;; Disable test for incorrect timezone: it only raises the
;; expected error when /usr/share/zoneinfo exists, even though
@@ -76,24 +76,13 @@
(substitute* "tests/settings_tests/tests.py"
((".*def test_incorrect_timezone.*" all)
(string-append " @unittest.skipIf(True, 'Disabled by Guix')\n"
- all)))
-
- ;; Preserve the PYTHONPATH created by Guix when running the tests.
- (substitute* "tests/admin_scripts/tests.py"
- (("python_path = \\[")
- (string-append "python_path = ['"
- (string-join
- (string-split (getenv "PYTHONPATH") #\:)
- "','")
- "', ")))
-
- #t))
+ all)))))
(replace 'check
(lambda* (#:key tests? #:allow-other-keys)
(if tests?
(with-directory-excursion "tests"
- (setenv "PYTHONPATH"
- (string-append "..:" (getenv "PYTHONPATH")))
+ ;; Tests expect PYTHONPATH to contain the root directory.
+ (setenv "PYTHONPATH" "..")
(invoke "python" "runtests.py"
;; By default tests run in parallel, which may cause
;; various race conditions. Run sequentially for
@@ -178,10 +167,10 @@ to the @dfn{don't repeat yourself} (DRY) principle.")
`(("python-six" ,python-six)
("python-vobject" ,python-vobject)
("python-werkzeug" ,python-werkzeug)
- ("python-dateutil" ,python-dateutil)))
+ ("python-dateutil" ,python-dateutil)
+ ("python-django" ,python-django)))
(native-inputs
- `(("python-django" ,python-django)
- ("python-mock" ,python-mock)
+ `(("python-mock" ,python-mock)
("python-factory-boy" ,python-factory-boy)
("python-tox" ,python-tox)
("python-pytest" ,python-pytest)
@@ -216,7 +205,7 @@ commands, additional database fields and admin extensions.")
(add-installed-pythonpath inputs outputs)
(setenv "PYTHONPATH"
(string-append ".:"
- (getenv "PYTHONPATH")))
+ (getenv "GUIX_PYTHONPATH")))
(invoke "invoke" "test")))))))
(native-inputs
`(("python-coverage" ,python-coverage)
@@ -262,10 +251,10 @@ that are useful for particular countries or cultures.")
(lambda _
(invoke "python" "runtests.py"))))))
(native-inputs
- `(("python-django" ,python-django)
- ("python-mock" ,python-mock)))
+ `(("python-mock" ,python-mock)))
(propagated-inputs
- `(("python-six" ,python-six)))
+ `(("python-django" ,python-django)
+ ("python-six" ,python-six)))
(synopsis "Easy-to-use math field/widget captcha for Django forms")
(description
"A multi-value-field that presents a human answerable question,
@@ -287,6 +276,8 @@ with arguments to the field constructor.")
(build-system python-build-system)
;; FIXME: How to make the test templates available to Django?
(arguments '(#:tests? #f))
+ (propagated-inputs
+ `(("python-django" ,python-django)))
(home-page "https://github.com/divio/django-classy-tags")
(synopsis "Class based template tags for Django")
(description
@@ -315,10 +306,10 @@ when coding custom template tags.")
(lambda _
(invoke "python3" "-m" "django" "test" "--settings=tests.settings"))))))
(propagated-inputs
- `(("python-isort" ,python-isort)))
- (native-inputs
`(("python-django" ,python-django)
- ("python-pytest" ,python-pytest)
+ ("python-isort" ,python-isort)))
+ (native-inputs
+ `(("python-pytest" ,python-pytest)
("python-mock" ,python-mock)))
(home-page
"https://github.com/jazzband/django-taggit")
@@ -340,10 +331,9 @@ when coding custom template tags.")
(base32
"14gzp5cv24z0qhxb7f7k7v9jgzpaj4n8yhjq83ynpx8183fs1rz4"))))
(build-system python-build-system)
- (native-inputs
- `(("python-django" ,python-django)))
(propagated-inputs
- `(("python-pillow" ,python-pillow)))
+ `(("python-django" ,python-django)
+ ("python-pillow" ,python-pillow)))
(home-page "https://github.com/SmileyChris/easy-thumbnails")
(synopsis "Easy thumbnails for Django")
(description
@@ -373,31 +363,26 @@ size and quality.")
(replace 'check
(lambda* (#:key tests? inputs outputs #:allow-other-keys)
(if tests?
- (begin
- (add-installed-pythonpath inputs outputs)
- (setenv "PYTHONPATH"
- (string-append ".:" ;for pytest_django_test
- (getenv "PYTHONPATH")))
- (setenv "PYTEST_DJANGO_TEST_RUNNER" "pytest")
- (setenv "DJANGO_SETTINGS_MODULE"
- "pytest_django_test.settings_sqlite_file")
- (invoke "pytest" "-vv" "-k"
- ;; FIXME: these tests fail to locate Django templates ...
- (string-append "not test_django_not_loaded_without_settings"
- " and not test_settings"
- ;; ... and this does not discover
- ;; 'pytest_django_test'.
- " and not test_urls_cache_is_cleared")))
- (format #t "test suite not run~%"))
- #t)))))
+ (begin
+ (setenv "PYTEST_DJANGO_TEST_RUNNER" "pytest")
+ (setenv "DJANGO_SETTINGS_MODULE"
+ "pytest_django_test.settings_sqlite_file")
+ (invoke "python" "-m" "pytest" "-vv" "-k"
+ ;; FIXME: these tests fail to locate Django templates ...
+ (string-append "not test_django_not_loaded_without_settings"
+ " and not test_settings"
+ ;; ... and this does not discover
+ ;; 'pytest_django_test'.
+ " and not test_urls_cache_is_cleared")))
+ (format #t "test suite not run~%")))))))
(native-inputs
`(("python-django" ,python-django)
("python-setuptools-scm" ,python-setuptools-scm)
;; For tests.
("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.")
@@ -406,14 +391,14 @@ useful tools for testing Django applications and projects.")
(define-public python-django-haystack
(package
(name "python-django-haystack")
- (version "2.8.1")
+ (version "3.1.1")
(source
(origin
(method url-fetch)
(uri (pypi-uri "django-haystack" version))
(sha256
(base32
- "1302fqsrx8w474xk5cmnmg3hjqfprlxnjg9qlg86arsr4v4vqm4b"))))
+ "10kaa5641cakpra2x3jqgys085gdkjcyns26plfyrmfpjmmpa1bd"))))
(build-system python-build-system)
(arguments
'(#:phases
@@ -421,19 +406,20 @@ useful tools for testing Django applications and projects.")
(add-after 'unpack 'loosen-verion-restrictions
(lambda _
(substitute* "setup.py"
- (("geopy.*") "geopy',\n"))
- #t))
+ (("geopy.*") "geopy\",\n"))))
(add-before 'check 'set-gdal-lib-path
(lambda* (#:key inputs #:allow-other-keys)
(setenv "GDAL_LIBRARY_PATH"
(string-append (assoc-ref inputs "gdal")
- "/lib"))
- #t)))
+ "/lib"))))
+ ;; Importing this module requires setting up a Django project.
+ (delete 'sanity-check))
#:tests? #f)) ; OSError: libgdal.so.27: cannot open shared object file
+ (propagated-inputs
+ `(("python-django" ,python-django)))
(native-inputs
`(("gdal" ,gdal)
("python-coverage" ,python-coverage)
- ("python-django" ,python-django)
("python-dateutil" ,python-dateutil)
("python-geopy" ,python-geopy)
("python-mock" ,python-mock)
@@ -506,8 +492,9 @@ them do this.")
("python-requests" ,python-requests)
("python-requests-oauthlib" ,python-requests-oauthlib)))
(native-inputs
- `(("python-django" ,python-django)
- ("python-mock" ,python-mock)))
+ `(("python-mock" ,python-mock)))
+ (inputs
+ `(("python-django" ,python-django)))
(home-page "https://github.com/pennersr/django-allauth")
(synopsis "Set of Django applications addressing authentication")
(description
@@ -532,10 +519,10 @@ account authentication.")
"1m1j2sx7q0blma0miswj3c8hrfi5q4y5cq2b816v8gagy89xgc57"))))
(build-system python-build-system)
(propagated-inputs
- `(("python-sqlparse" ,python-sqlparse)))
+ `(("python-sqlparse" ,python-sqlparse)
+ ("python-django" ,python-django)))
(native-inputs
- `(("python-django" ,python-django)
- ("python-django-jinja" ,python-django-jinja)
+ `(("python-django-jinja" ,python-django-jinja)
("python-html5lib" ,python-html5lib)))
(arguments
'(#:phases
@@ -565,7 +552,8 @@ request and response as a toolbar on the rendered page.")
(build-system python-build-system)
(arguments '(#:tests? #f)) ;XXX: 'make check' does "echo TODO"
(propagated-inputs
- `(("python-django-debug-toolbar" ,python-django-debug-toolbar)
+ `(("python-django" ,python-django)
+ ("python-django-debug-toolbar" ,python-django-debug-toolbar)
("python-jsonplus" ,python-jsonplus)
("python-six" ,python-six)
("python-sqlalchemy" ,python-sqlalchemy)))
@@ -612,10 +600,10 @@ templatetags and a full test suite.")
"0fc6i77faxxv1gjlp06lv3kw64b5bhdiypaygfxh5djddgk83fwa"))))
(build-system python-build-system)
(native-inputs
- `(("python-django" ,python-django)
- ("python-nose" ,python-nose)))
+ `(("python-nose" ,python-nose)))
(propagated-inputs
- `(("python-webassets" ,python-webassets)))
+ `(("python-django" ,python-django)
+ ("python-webassets" ,python-webassets)))
(home-page "https://github.com/miracle2k/django-assets")
(synopsis "Asset management for Django")
(description
@@ -627,7 +615,7 @@ merging, minifying and compiling CSS and Javascript files.")
(define-public python-django-jinja
(package
(name "python-django-jinja")
- (version "2.6.0")
+ (version "2.9.1")
(source
(origin
(method git-fetch)
@@ -637,10 +625,11 @@ merging, minifying and compiling CSS and Javascript files.")
(file-name (git-file-name name version))
(sha256
(base32
- "06ldbkfkm6sc0p9sqpjph06gxrqpj78ih3dc2yik2fcba2y5mak1"))))
+ "0p9pkn6jjzagpnvcrl9c2vjqamkms7ymvyhhmaqqqhrlv89qnzp7"))))
(build-system python-build-system)
(propagated-inputs
- `(("python-jinja2" ,python-jinja2)
+ `(("python-django" ,python-django)
+ ("python-jinja2" ,python-jinja2)
("python-pytz" ,python-pytz)
("python-django-pipeline" ,python-django-pipeline)))
(arguments
@@ -709,7 +698,7 @@ conn_max_age argument to easily enable Django’s connection pool.")
(lambda _
(invoke "python" "-m" "django" "test" "-v2"
"--settings=tests.settings"))))))
- (native-inputs
+ (propagated-inputs
;; XXX: Picklefield has not been updated in 10+ years and fails tests
;; with Django 3.2.
`(("python-django@2.2" ,python-django-2.2)))
@@ -731,6 +720,8 @@ conn_max_age argument to easily enable Django’s connection pool.")
(arguments
;; XXX: Tests require a Postgres database.
`(#:tests? #f))
+ (propagated-inputs
+ `(("python-django" ,python-django)))
(home-page "https://github.com/aykut/django-bulk-update")
(synopsis "Simple bulk update over Django ORM or with helper function")
(description
@@ -741,27 +732,25 @@ project aims to bulk update given objects using one query over Django ORM.")
(define-public python-django-contact-form
(package
(name "python-django-contact-form")
- (version "1.8.1")
+ (version "1.9")
(source (origin
(method url-fetch)
(uri (pypi-uri "django-contact-form" version))
(sha256
(base32
- "1zv7bcjfrg32gcsq3bclkld79l6mcy2wcvlj81h7q2ppv1wm8vqs"))))
+ "1my9hkrylckp5vfqg9b0kncrdlxjnwxll56sdciqn4v19i4wbq1y"))))
(build-system python-build-system)
(arguments
`(#:phases
(modify-phases %standard-phases
(replace 'check
(lambda _
- (setenv "PYTHONPATH"
- (string-append "./build/lib:"
- (getenv "PYTHONPATH")))
(invoke "coverage" "run" "--source" "contact_form"
"runtests.py"))))))
(native-inputs
- `(("python-coverage" ,python-coverage)
- ("python-django" ,python-django)))
+ `(("python-coverage" ,python-coverage)))
+ (propagated-inputs
+ `(("python-django" ,python-django)))
(home-page "https://github.com/ubernostrum/django-contact-form")
(synopsis "Contact form for Django")
(description
@@ -780,10 +769,9 @@ for Django sites.")
(base32
"0ccdiv784a5vnpfal36km4dyg12340rwhpr0riyy0k89wfnjn8yi"))))
(build-system python-build-system)
- (native-inputs
- `(("python-django" ,python-django)))
(propagated-inputs
- `(("python-six" ,python-six)))
+ `(("python-django" ,python-django)
+ ("python-six" ,python-six)))
(home-page "https://github.com/django/django-contrib-comments")
(synopsis "Comments framework")
(description
@@ -815,18 +803,13 @@ entries, photos, book chapters, or anything else.")
(which "env")))))
(replace 'check
(lambda*(#:key tests? #:allow-other-keys)
- (or
- (not tests?)
- (begin
- (setenv "PYTHONPATH"
- (string-append (getcwd) ":"
- (getenv "PYTHONPATH")))
- (setenv "DJANGO_SETTINGS_MODULE" "tests.settings")
- (invoke "django-admin" "test" "tests"))))))))
- (native-inputs
- `(("python-django" ,python-django)))
+ (when tests?
+ (setenv "DJANGO_SETTINGS_MODULE" "tests.settings")
+ (invoke "django-admin" "test" "tests"
+ "--pythonpath=.")))))))
(propagated-inputs
`(("python-css-html-js-minify" ,python-css-html-js-minify)
+ ("python-django" ,python-django)
("python-slimit" ,python-slimit)
("python-jsmin" ,python-jsmin)))
(home-page
@@ -858,14 +841,14 @@ support, and optional data-URI image and font embedding.")
(with-directory-excursion "tests"
(invoke "python" "runtests.py")))))))
(native-inputs
- `(("python-django" ,python-django)
- ("python-fakeredis" ,python-fakeredis)
+ `(("python-fakeredis" ,python-fakeredis)
("python-hiredis" ,python-hiredis)
("python-mock" ,python-mock)
("python-msgpack" ,python-msgpack)
("redis" ,redis)))
(propagated-inputs
- `(("python-redis" ,python-redis)))
+ `(("python-django" ,python-django)
+ ("python-redis" ,python-redis)))
(home-page "https://github.com/niwibe/django-redis")
(synopsis "Full featured redis cache backend for Django")
(description
@@ -893,13 +876,13 @@ support, and optional data-URI image and font embedding.")
"--settings=django_rq.tests.settings"
"--pythonpath=."))))))
(native-inputs
- `(("python-django" ,python-django)
- ("python-django-redis" ,python-django-redis)
+ `(("python-django-redis" ,python-django-redis)
("python-mock" ,python-mock)
("python-rq-scheduler" ,python-rq-scheduler)
("redis" ,redis)))
(propagated-inputs
- `(("python-rq" ,python-rq)))
+ `(("python-django" ,python-django)
+ ("python-rq" ,python-rq)))
(home-page "https://github.com/ui/django-rq")
(synopsis "Django integration with RQ")
(description
@@ -921,11 +904,10 @@ settings.py and easily use them in your project.")
(build-system python-build-system)
;; FIXME: Tests require disque, Redis, MongoDB, Docker.
(arguments '(#:tests? #f))
- (native-inputs
- `(("python-django" ,python-django)))
(propagated-inputs
`(("python-arrow" ,python-arrow)
("python-blessed" ,python-blessed)
+ ("python-django" ,python-django)
("python-django-picklefield" ,python-django-picklefield)))
(home-page "https://django-q.readthedocs.io/")
(synopsis "Multiprocessing distributed task queue for Django")
@@ -949,11 +931,10 @@ using Python multiprocessing.")
`(#:phases (modify-phases %standard-phases
(replace 'check
(lambda _
- (setenv "PYTHONPATH" (string-append "./test_project:"
- "./build/lib:.:"
- (getenv "PYTHONPATH")))
- (invoke "django-admin.py" "test" "--settings=settings"))))))
- (native-inputs
+ (invoke "django-admin"
+ "test" "--settings=test_project.settings"
+ "--pythonpath=."))))))
+ (propagated-inputs
`(("python-django" ,python-django)))
(home-page "https://github.com/jazzband/django-sortedm2m")
(synopsis "Drop-in replacement for django's own ManyToManyField")
@@ -978,11 +959,9 @@ the order of added relations.")
'(#:phases (modify-phases %standard-phases
(replace 'check
(lambda _
- (setenv "PYTHONPATH" (string-append ".:"
- (getenv "PYTHONPATH")))
(setenv "DJANGO_SETTINGS_MODULE" "tests.test_settings")
- (invoke "django-admin.py" "test" "-v2"))))))
- (native-inputs
+ (invoke "django-admin" "test" "--pythonpath=."))))))
+ (propagated-inputs
`(("python-django" ,python-django)))
(home-page "https://github.com/django-compressor/django-appconf")
(synopsis "Handle configuration defaults of packaged Django apps")
@@ -1013,17 +992,15 @@ name is purely coincidental.")
'(#:phases (modify-phases %standard-phases
(replace 'check
(lambda _
- (setenv "PYTHONPATH"
- (string-append "./tests/test_project:./build/lib:"
- (getenv "PYTHONPATH")))
+ (setenv "PYTHONPATH" "./tests/test_project")
(setenv "DJANGO_SETTINGS_MODULE" "project.settings")
(invoke "pytest" "-vv"))))))
(native-inputs
- `(("python-django" ,python-django)
- ("python-pytest" ,python-pytest)
+ `(("python-pytest" ,python-pytest)
("python-pytest-django" ,python-pytest-django)))
(propagated-inputs
- `(("django-appconf" ,python-django-appconf)))
+ `(("python-django" ,python-django)
+ ("django-appconf" ,python-django-appconf)))
(synopsis "Generate JavaScript catalog to static files")
(description
"A Django app that provides helper for generating JavaScript catalog to
@@ -1088,9 +1065,10 @@ Django projects, which allows association of a number of tags with any
(invoke "python" "runtests.py" "--nolint")
(format #t "test suite not run~%")))))))
(native-inputs
- `(("python-django" ,python-django)
- ("python-pytest" ,python-pytest)
+ `(("python-pytest" ,python-pytest)
("python-pytest-django" ,python-pytest-django)))
+ (propagated-inputs
+ `(("python-django" ,python-django)))
(home-page "https://www.django-rest-framework.org")
(synopsis "Toolkit for building Web APIs with Django")
(description
@@ -1111,10 +1089,9 @@ provides features like a Web-browsable API and authentication policies.")
"0vrkli625b5s1wldri3dyrfvqbxg7zxy2pg0rpjixw3b1ndz0ag8"))))
(build-system python-build-system)
(arguments '(#:tests? #f)) ; Tests not included with release.
- (native-inputs
- `(("python-django" ,python-django)))
(propagated-inputs
- `(("python-django-classy-tags" ,python-django-classy-tags)
+ `(("python-django" ,python-django)
+ ("python-django-classy-tags" ,python-django-classy-tags)
("python-six" ,python-six)))
(home-page "https://github.com/divio/django-sekizai")
(synopsis "Template blocks for Django projects")
@@ -1143,7 +1120,7 @@ a single block.")
(arguments
'(;; No included tests
#:tests? #f))
- (native-inputs
+ (propagated-inputs
`(("python-django" ,python-django)))
(home-page
"http://github.com/maraujop/django-crispy-forms")
@@ -1218,8 +1195,9 @@ template tag.")
(lambda _
(invoke "python" "runtests.py"))))))
(native-inputs
- `(("python-django" ,python-django)
- ("python-mock" ,python-mock)))
+ `(("python-mock" ,python-mock)))
+ (propagated-inputs
+ `(("python-django" ,python-django)))
(synopsis "Django test helpers to manage file storage side effects")
(description
"This project provides tools to help reduce the side effects of using
@@ -1251,10 +1229,10 @@ FileFields during tests.")
"--settings" "tests.settings")))))))
(native-inputs
`(("openldap" ,openldap)
- ("python-django" ,python-django)
("python-mock" ,python-mock)))
(propagated-inputs
- `(("python-ldap" ,python-ldap)))
+ `(("python-django" ,python-django)
+ ("python-ldap" ,python-ldap)))
(home-page "https://github.com/django-auth-ldap/django-auth-ldap")
(synopsis "Django LDAP authentication backend")
(description
@@ -1272,11 +1250,14 @@ FileFields during tests.")
(base32
"06041a8icazzp73kg93c7k1ska12wvkq7fpcad0l0sm1qnxx5yx7"))))
(build-system python-build-system)
- (arguments '(#:tests? #f)) ;no tests
- (native-inputs
- `(("python-django" ,python-django)))
+ (arguments
+ '(#:tests? #f ;no tests
+ #:phases (modify-phases %standard-phases
+ ;; Importing this module requires a Django project.
+ (delete 'sanity-check))))
(propagated-inputs
`(("python-certifi" ,python-certifi)
+ ("python-django" ,python-django)
("python-elasticsearch" ,python-elasticsearch)
("python-six" ,python-six)))
(home-page "https://github.com/cipriantarta/django-logging")
@@ -1299,10 +1280,10 @@ to ElasticSearch.")
"0jwlbyaxk91fq69g2y0zpfjgmjgh6l0lqm5mhys7m5968lkihvgp"))))
(build-system python-build-system)
(arguments '(#:tests? #f)) ;XXX: Requires a running PostgreSQL server
- (native-inputs
- `(("python-django" ,python-django)))
(propagated-inputs
- `(("python-netaddr" ,python-netaddr)
+ `(("python-django" ,python-django)
+ ("python-netaddr" ,python-netaddr)
+ ("python-psycopg2" ,python-psycopg2)
("python-six" ,python-six)))
(home-page "https://github.com/jimfunk/django-postgresql-netfields")
(synopsis "PostgreSQL netfields implementation for Django")
@@ -1327,29 +1308,24 @@ to ElasticSearch.")
(arguments
'(#:tests? #f ;FIXME: Django raises "Apps aren't loaded yet"!?
#:phases (modify-phases %standard-phases
- (add-before 'check 'loosen-requirements
+ (add-after 'unpack 'loosen-requirements
(lambda _
;; Do not depend on compatibility package for old
;; Python versions.
(substitute* "requirements.txt"
- (("enum-compat") ""))
- #t))
+ (("enum-compat") ""))))
(replace 'check
(lambda* (#:key tests? #:allow-other-keys)
(if tests?
(begin
- (setenv "PYTHONPATH"
- (string-append "./build/lib:.:"
- (getenv "PYTHONPATH")))
(setenv "DJANGO_SETTINGS_MODULE"
"test_project.settings")
(invoke "pytest" "-vv" "--doctest-modules"
"tests/" "url_filter/"))
(format #t "test suite not run~%")))))))
- (native-inputs
- `(("python-django" ,python-django)))
(propagated-inputs
`(("python-cached-property" ,python-cached-property)
+ ("python-django" ,python-django)
("python-six" ,python-six)))
(synopsis "Filter data via human-friendly URLs")
(description
diff --git a/gnu/packages/djvu.scm b/gnu/packages/djvu.scm
index 39c2b20d7e..a4cd4da2ed 100644
--- a/gnu/packages/djvu.scm
+++ b/gnu/packages/djvu.scm
@@ -182,7 +182,10 @@ a continuous layout.")
(substitute* "tests/test-xmp-broken.py"
;; Error message changed in recent versions of XML parser
(("XML parsing failure")
- "Error in XMLValidator")))))))
+ "Error in XMLValidator"))))
+ (add-before 'check 'set-home-for-tests
+ (lambda _
+ (setenv "HOME" "/tmp"))))))
(synopsis "PDF to DjVu converter")
(description
"@code{pdf2djvu} creates DjVu files from PDF files.
diff --git a/gnu/packages/dlang.scm b/gnu/packages/dlang.scm
index 88a0887a0a..c4cf1d9665 100644
--- a/gnu/packages/dlang.scm
+++ b/gnu/packages/dlang.scm
@@ -6,6 +6,7 @@
;;; Copyright © 2017, 2019 Tobias Geerinckx-Rice <me@tobias.gr>
;;; Copyright © 2020 Guy Fleury Iteriteka <gfleury@disroot.org>
;;; Copyright © 2021 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -27,6 +28,8 @@
#:use-module (guix packages)
#:use-module (guix download)
#:use-module (guix git-download)
+ #:use-module (guix utils)
+ #:use-module ((guix build utils) #:hide (delete which))
#:use-module (guix build-system gnu)
#:use-module (guix build-system cmake)
#:use-module (gnu packages)
@@ -37,11 +40,13 @@
#:use-module (gnu packages gdb)
#:use-module (gnu packages libedit)
#:use-module (gnu packages llvm)
+ #:use-module (gnu packages ninja)
#:use-module (gnu packages pkg-config)
#:use-module (gnu packages python)
#:use-module (gnu packages python-xyz)
#:use-module (gnu packages textutils)
- #:use-module (gnu packages xorg))
+ #:use-module (gnu packages xorg)
+ #:use-module (srfi srfi-1))
(define-public rdmd
(package
@@ -81,233 +86,338 @@ minimize the amount of work necessary. Unlike make, rdmd tracks dependencies
and freshness without requiring additional information from the user.")
(license license:boost1.0)))
-(define-public ldc-bootstrap
- (package
- (name "ldc")
- (version "0.17.6")
- (source
- (origin
- (method git-fetch)
- (uri (git-reference
- (url "https://github.com/ldc-developers/ldc")
- (commit (string-append "v" version))))
- (file-name (git-file-name name version))
- (sha256
- (base32 "1q6hm4fkrcwys83x0p4kfg9xrc1b9g2qicqif2zy5z4nsfsb5vgs"))))
- (build-system cmake-build-system)
- (supported-systems '("x86_64-linux" "i686-linux" "armhf-linux"))
- (properties
- ;; Some of the tests take a very long time on ARMv7. See
- ;; <https://lists.gnu.org/archive/html/guix-devel/2018-02/msg00312.html>.
- `((max-silent-time . ,(* 3600 3))))
- (arguments
- `(#:phases
- (modify-phases %standard-phases
- (add-after 'unpack 'unpack-submodule-sources
- (lambda* (#:key inputs #:allow-other-keys)
- (let ((unpack (lambda (input target)
- (let ((source (assoc-ref inputs input)))
- ;; Git checkouts are directories as long as
- ;; there are no patches; tarballs otherwise.
- (if (file-is-directory? source)
- (copy-recursively source target)
- (with-directory-excursion target
- (invoke "tar" "xvf" source
- "--strip-components=1")))))))
- (unpack "phobos-src" "runtime/phobos")
- (unpack "druntime-src" "runtime/druntime")
- (unpack "dmd-testsuite-src" "tests/d2/dmd-testsuite")
- #t)))
- (add-after 'unpack-submodule-sources 'patch-phobos
- (lambda* (#:key inputs #:allow-other-keys)
- (substitute* "runtime/phobos/std/process.d"
- (("/bin/sh") (which "sh"))
- (("echo") (which "echo")))
- (substitute* "runtime/phobos/std/datetime.d"
- (("/usr/share/zoneinfo/")
- (string-append (assoc-ref inputs "tzdata") "/share/zoneinfo"))
- (("tzName == \"[+]VERSION\"")
- "(tzName == \"+VERSION\" || std.algorithm.endsWith(tzName, \"/leapseconds\"))"))
- (substitute* "tests/d2/dmd-testsuite/Makefile"
- (("/bin/bash") (which "bash")))
- ;; the following two tests fail on i686
- (for-each delete-file '("tests/ir/attributes.d" "tests/ir/align.d")))))))
- (inputs
- `(("libconfig" ,libconfig)
- ("libedit" ,libedit)
- ("tzdata" ,tzdata)
- ("zlib" ,zlib)))
- (native-inputs
- `(("llvm" ,llvm-6)
- ("clang" ,clang-6)
- ("python-lit" ,python-lit)
- ("python-wrapper" ,python-wrapper)
- ("unzip" ,unzip)
- ("phobos-src"
- ,(origin
- (method git-fetch)
- (uri (git-reference
- (url "https://github.com/ldc-developers/phobos")
- (commit (string-append "ldc-v" version))))
- (file-name (git-file-name "phobos" version))
- (sha256
- (base32 "15jzs38wanks2jfp2izzl7zqrp4c8ai54ppsgm8ws86p3sbbkmj8"))
- (patches (search-patches "ldc-bootstrap-disable-tests.patch"))))
- ("druntime-src"
- ,(origin
- (method git-fetch)
- (uri (git-reference
- (url "https://github.com/ldc-developers/druntime")
- (commit (string-append "ldc-v" version))))
- (file-name (git-file-name "druntime" version))
- (sha256
- (base32 "00wr2kiggwnd8h7by51fhj1xc65hv1ysip5gbgdbkfar58p2d0bb"))))
- ("dmd-testsuite-src"
- ,(origin
- (method git-fetch)
- (uri (git-reference
- (url "https://github.com/ldc-developers/dmd-testsuite")
- (commit (string-append "ldc-v" version))))
- (file-name (git-file-name "dmd-testsuite" version))
- (sha256
- (base32 "1d1c0979wbippldrkjf7szyj4n87hxz8dwqg1r5b3aai37g9kcky"))))))
- (home-page "http://wiki.dlang.org/LDC")
- (synopsis "LLVM-based compiler for the D programming language")
- (description
- "LDC is an LLVM compiler for the D programming language. It is based on
+;;; The 0.17.6 version is the last release to support being bootstrapped
+;;; without a D compiler (requiring only a C++ compiler).
+;;; TODO: Bootstrap ldc from GDC (the D frontend for GCC).
+(define ldc-bootstrap-0.17
+ (package
+ (name "ldc")
+ (version "0.17.6")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/ldc-developers/ldc")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "1q6hm4fkrcwys83x0p4kfg9xrc1b9g2qicqif2zy5z4nsfsb5vgs"))))
+ (build-system cmake-build-system)
+ (supported-systems '("x86_64-linux" "i686-linux" "armhf-linux"))
+ (properties
+ ;; Some of the tests take a very long time on ARMv7. See
+ ;; <https://lists.gnu.org/archive/html/guix-devel/2018-02/msg00312.html>.
+ `((max-silent-time . ,(* 3600 3))))
+ (arguments
+ `(#:tests? #f ;requires obsolete python-lit test dependency
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'unpack-submodule-sources
+ (lambda* (#:key inputs #:allow-other-keys)
+ (let ((unpack (lambda (input target)
+ (let ((source (assoc-ref inputs input)))
+ ;; Git checkouts are directories as long as
+ ;; there are no patches; tarballs otherwise.
+ (if (file-is-directory? source)
+ (copy-recursively source target)
+ (with-directory-excursion target
+ (invoke "tar" "xvf" source
+ "--strip-components=1")))))))
+ (unpack "phobos-src" "runtime/phobos")
+ (unpack "druntime-src" "runtime/druntime")
+ (unpack "dmd-testsuite-src" "tests/d2/dmd-testsuite"))))
+ (add-after 'unpack-submodule-sources 'patch-paths
+ (lambda* (#:key inputs #:allow-other-keys)
+ (substitute* "runtime/phobos/std/process.d"
+ (("/bin/sh") (which "sh"))
+ (("echo") (which "echo")))
+ (substitute* "runtime/phobos/std/datetime.d"
+ (("/usr/share/zoneinfo/")
+ (string-append (assoc-ref inputs "tzdata") "/share/zoneinfo"))
+ (("tzName == \"[+]VERSION\"")
+ "(tzName == \"+VERSION\" || \
+std.algorithm.endsWith(tzName, \"/leapseconds\"))")))))))
+ (inputs
+ `(("libconfig" ,libconfig)
+ ("libedit" ,libedit)
+ ("tzdata" ,tzdata)
+ ("zlib" ,zlib)))
+ (native-inputs
+ `(("llvm" ,llvm-6)
+ ("python-wrapper" ,python-wrapper)
+ ("unzip" ,unzip)
+ ("phobos-src"
+ ,(origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/ldc-developers/phobos")
+ (commit (string-append "ldc-v" version))))
+ (file-name (git-file-name "phobos" version))
+ (sha256
+ (base32 "15jzs38wanks2jfp2izzl7zqrp4c8ai54ppsgm8ws86p3sbbkmj8"))))
+ ("druntime-src"
+ ,(origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/ldc-developers/druntime")
+ (commit (string-append "ldc-v" version))))
+ (file-name (git-file-name "druntime" version))
+ (sha256
+ (base32 "00wr2kiggwnd8h7by51fhj1xc65hv1ysip5gbgdbkfar58p2d0bb"))))
+ ("dmd-testsuite-src"
+ ,(origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/ldc-developers/dmd-testsuite")
+ (commit (string-append "ldc-v" version))))
+ (file-name (git-file-name "dmd-testsuite" version))
+ (sha256
+ (base32 "1d1c0979wbippldrkjf7szyj4n87hxz8dwqg1r5b3aai37g9kcky"))))))
+ (home-page "http://wiki.dlang.org/LDC")
+ (synopsis "LLVM-based compiler for the D programming language")
+ (description
+ "LDC is an LLVM compiler for the D programming language. It is based on
the latest DMD compiler that was written in C and is used for
bootstrapping more recent compilers written in D.")
- ;; Most of the code is released under BSD-3, except for code originally
- ;; written for GDC, which is released under GPLv2+, and the DMD frontend,
- ;; which is released under the "Boost Software License version 1.0".
- (license (list license:bsd-3
- license:gpl2+
- license:boost1.0))))
+ ;; Most of the code is released under BSD-3, except for code originally
+ ;; written for GDC, which is released under GPLv2+, and the DMD frontend,
+ ;; which is released under the "Boost Software License version 1.0".
+ (license (list license:bsd-3
+ license:gpl2+
+ license:boost1.0))))
-(define-public ldc
- ;; Phobos, druntime and dmd-testsuite library dependencies do
- ;; not always have a newer release than the compiler, hence we
- ;; retain this variable.
- (let ((older-version "1.10.0")) ;; retain this because sometimes the libs are older
- (package
- (inherit ldc-bootstrap)
- (name "ldc")
- (version "1.10.0")
- (source
- (origin
- (method git-fetch)
- (uri (git-reference
- (url "https://github.com/ldc-developers/ldc")
- (commit (string-append "v" version))))
- (file-name (git-file-name name version))
- (sha256
- (base32 "0qcb2rn01wql7y8qp31blbv3hwmnh3zjgzi2n7k168cxr6rrdhlp"))))
- (arguments
- `(#:phases
- (modify-phases %standard-phases
- (add-after 'unpack 'unpack-submodule-sources
- (lambda* (#:key inputs #:allow-other-keys)
- (let ((unpack (lambda (input target)
- (let ((source (assoc-ref inputs input)))
- ;; Git checkouts are directories as long as
- ;; there are no patches; tarballs otherwise.
- (if (file-is-directory? source)
- (copy-recursively source target)
- (with-directory-excursion target
- (invoke "tar" "xvf" source
- "--strip-components=1")))))))
- (unpack "phobos-src" "runtime/phobos")
- (unpack "druntime-src" "runtime/druntime")
- (unpack "dmd-testsuite-src" "tests/d2/dmd-testsuite")
- #t)))
- (add-after 'unpack-submodule-sources 'patch-phobos
+;;; This is the last version that supports being built with 32 bit machines
+;;; from 0.17.
+(define ldc-bootstrap-1.12
+ (package
+ (inherit ldc-bootstrap-0.17)
+ (version "1.12.0")
+ (source
+ (origin
+ (method url-fetch)
+ ;; The official release include the matching source code releases of
+ ;; phobos, druntime and dmd-testsuite.
+ (uri (string-append "https://github.com/ldc-developers/ldc/releases"
+ "/download/v" version "/ldc-" version "-src.tar.gz"))
+ (sha256
+ (base32 "1fdma1w8j37wkr0pqdar11slkk36qymamxnk6d9k8ybhjmxaaawm"))))
+ (arguments
+ (substitute-keyword-arguments (package-arguments ldc-bootstrap-0.17)
+ ((#:build-type _ #f) "Release")
+ ((#:configure-flags _ #f)
+ `(list "-GNinja"))
+ ((#:make-flags _ #f) ;used as build targets
+ `(list "all"))
+ ((#:tests? _) #f)
+ ((#:phases phases)
+ `(modify-phases ,phases
+ (delete 'unpack-submodule-sources)
+ (replace 'patch-paths
(lambda* (#:key inputs #:allow-other-keys)
- (substitute* '("runtime/phobos/std/process.d"
- "tests/linking/linker_switches.d")
+ (substitute* '("runtime/phobos/std/process.d")
(("/bin/sh") (which "sh"))
- (("echo") (which "echo")))
+ (("echo") (which "echo")))))
+ (replace 'build
+ ;; Building with Make would result in "make: *** [Makefile:166:
+ ;; all] Error 2".
+ (lambda* (#:key make-flags parallel-tests? #:allow-other-keys)
+ (let ((job-count (number->string (or (and parallel-tests?
+ (parallel-job-count))
+ 1))))
+ (apply invoke "cmake" "--build" "." "-j" job-count
+ "--target" make-flags))))
+ (replace 'install
+ (lambda _
+ (invoke "cmake" "--install" ".")))))))
+ (native-inputs
+ ;; Importing (gnu packages commencement) would introduce a cycle.
+ `(("ld-gold-wrapper" ,(module-ref (resolve-interface
+ '(gnu packages commencement))
+ 'ld-gold-wrapper))
+ ("llvm" ,llvm-6)
+ ("ldc" ,ldc-bootstrap-0.17)
+ ("ninja" ,ninja)
+ ("python-wrapper" ,python-wrapper)
+ ("unzip" ,unzip)))))
+
+;;; For 32 bits systems, 1.12 cannot build 1.27 directly, so we need another
+;;; hop.
+(define ldc-bootstrap-1.24
+ (package
+ (inherit ldc-bootstrap-1.12)
+ (version "1.24.0")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "https://github.com/ldc-developers/ldc/releases"
+ "/download/v" version "/ldc-" version "-src.tar.gz"))
+ (sha256
+ (base32 "0g5svf55i0kq55q49awmwqj9qi1n907cyrn1vjdjgs8nx6nn35gx"))))
+ (native-inputs
+ (fold alist-replace
+ (package-native-inputs ldc-bootstrap-1.12)
+ '("ldc" "llvm")
+ `((,ldc-bootstrap-1.12) (,llvm-11))))))
+
+(define ldc-bootstrap-1.27
+ (package
+ (inherit ldc-bootstrap-1.24)
+ (version "1.27.1")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "https://github.com/ldc-developers/ldc/releases"
+ "/download/v" version "/ldc-" version "-src.tar.gz"))
+ (sha256
+ (base32 "1775001ba6n8w46ln530kb5r66vs935ingnppgddq8wqnc0gbj4k"))))
+ (native-inputs
+ (fold alist-replace
+ (package-native-inputs ldc-bootstrap-1.24)
+ '("ldc" "llvm")
+ `((,ldc-bootstrap-1.24) (,llvm-11))))))
+
+(define-public ldc
+ (package
+ (inherit ldc-bootstrap-1.27)
+ (arguments
+ (substitute-keyword-arguments (package-arguments ldc-bootstrap-1.27)
+ ((#:make-flags _ #f)
+ '(list "all"
+ ;; Also build the test runner binaries.
+ "ldc2-unittest" "all-test-runners"))
+ ((#:configure-flags flags)
+ `(,@flags "-DBUILD_SHARED_LIBS=ON"
+ "-DLDC_LINK_MANUALLY=OFF"))
+ ((#:tests? _) #t)
+ ((#:phases phases)
+ `(modify-phases ,phases
+ (add-after 'unpack 'fix-compiler-rt-library-discovery
+ (lambda* (#:key inputs #:allow-other-keys)
+ (let ((clang-runtime (assoc-ref inputs "clang-runtime"))
+ (system ,(or (%current-target-system)
+ (%current-system))))
+ (define (gnu-triplet->clang-arch system)
+ (letrec-syntax
+ ((matches (syntax-rules (=>)
+ ((_ (system-prefix => target) rest ...)
+ (if (string-prefix? system-prefix system)
+ target
+ (matches rest ...)))
+ ((_)
+ (error "Clang target for system is unknown"
+ system)))))
+ (matches ("x86_64" => "x86_64")
+ ("i686" => "i386")
+ ("armhf" => "armhf"))))
+ ;; Coax LLVM into agreeing with Clang about system target
+ ;; naming.
+ (substitute* "driver/linker-gcc.cpp"
+ (("triple.getArchName\\(\\)")
+ (format #f "~s" (gnu-triplet->clang-arch system))))
+ ;; Augment the configuration of the ldc2 binaries so they can
+ ;; find the compiler-rt libraries they need to be linked with
+ ;; for the tests.
+ (substitute* (find-files "." "^ldc2.*\\.conf\\.in$")
+ ((".*lib-dirs = \\[\n" all)
+ (string-append all
+ " \"" clang-runtime
+ "/lib/linux\",\n"))))))
+ (add-after 'unpack 'patch-paths-in-tests
+ (lambda _
(substitute* "tests/d2/dmd-testsuite/Makefile"
(("/bin/bash") (which "bash")))
- ;; disable unittests in the following files. We are discussing with
- ;; upstream
+ (substitute* "tests/linking/linker_switches.d"
+ (("echo") (which "echo")))
+ (substitute* "tests/d2/dmd-testsuite/dshell/test6952.d"
+ (("/usr/bin/env bash")
+ (which "bash")))))
+ (add-after 'unpack 'disable-problematic-tests
+ (lambda* (#:key inputs #:allow-other-keys)
+ ;; Disable unittests in the following files.
(substitute* '("runtime/phobos/std/net/curl.d"
"runtime/phobos/std/datetime/systime.d"
- "runtime/phobos/std/datetime/timezone.d"
- )
+ "runtime/phobos/std/datetime/timezone.d")
(("version(unittest)") "version(skipunittest)")
((" unittest") " version(skipunittest) unittest"))
- ;; the following tests require a more recent LLVM
- (delete-file "tests/compilable/ctfe_math.d")
- (delete-file "tests/debuginfo/nested_gdb.d")
- (delete-file "tests/debuginfo/classtypes_gdb.d")
- ;; for the following tests ptrace fails with EPERM
- ;; (see <https://issues.guix.gnu.org/48541>):
- (delete-file "tests/d2/dmd-testsuite/runnable/b18504.d")
- (delete-file "tests/d2/dmd-testsuite/runnable/gdb14225.d")
- (delete-file "tests/d2/dmd-testsuite/runnable/gdb14276.d")
- (delete-file "tests/d2/dmd-testsuite/runnable/gdb14313.d")
- (delete-file "tests/d2/dmd-testsuite/runnable/gdb14330.d")
- (delete-file "tests/d2/dmd-testsuite/runnable/gdb1.d")
- (delete-file "tests/d2/dmd-testsuite/runnable/gdb4149.d")
- (delete-file "tests/d2/dmd-testsuite/runnable/gdb4181.d")
- (delete-file "tests/d2/dmd-testsuite/runnable/gdb15729.sh")
- ;; the following tests plugins we don't have.
+ ;; The following tests plugins we don't have.
(delete-file "tests/plugins/addFuncEntryCall/testPlugin.d")
- ;; the following tests requires AVX instruction set in the CPU.
- (substitute* "tests/d2/dmd-testsuite/runnable/test_cdvecfill.d"
+ ;; The following tests requires AVX instruction set in the CPU.
+ (substitute* "tests/d2/dmd-testsuite/runnable/cdvecfill.sh"
(("^// DISABLED: ") "^// DISABLED: linux64 "))
- #t))
+ ;; This unit test requires networking, fails with
+ ;; "core.exception.RangeError@std/socket.d(778): Range
+ ;; violation".
+ (substitute* "runtime/phobos/std/socket.d"
+ (("assert\\(ih.addrList\\[0\\] == 0x7F_00_00_01\\);.*")
+ ""))
+ ;; The GDB tests suite fails; there are a few bug reports about
+ ;; it upstream.
+ (for-each delete-file (find-files "tests" "gdb.*\\.(d|sh)$"))
+ (delete-file "tests/d2/dmd-testsuite/runnable/debug_info.d")
+ (delete-file "tests/d2/dmd-testsuite/runnable/b18504.d")
+ (substitute* "runtime/druntime/test/exceptions/Makefile"
+ ((".*TESTS\\+=rt_trap_exceptions_drt_gdb.*")
+ ""))
+ ;; The following tests fail on the supported 32 bit systems,
+ ;; which are not tested upstream.
+ (with-directory-excursion "tests"
+ (let ((system ,(or (%current-target-system)
+ (%current-system))))
+ (when (or (string-prefix? "armhf" system )
+ (string-prefix? "i686" system ))
+ (for-each delete-file
+ '("PGO/profile_rt_calls.d"
+ "codegen/mangling.d"
+ "debuginfo/print_gdb.d"
+ "dynamiccompile/bind.d"
+ "dynamiccompile/bind_bool.d"
+ "dynamiccompile/bind_func_opt.d"
+ "dynamiccompile/bind_nested_opt.d"
+ "dynamiccompile/bind_opt.d"
+ "dynamiccompile/compiler_context.d"
+ "dynamiccompile/compiler_context_parallel.d"
+ "instrument/xray_check_pipeline.d"
+ "instrument/xray_link.d"
+ "instrument/xray_simple_execution.d"
+ "sanitizers/msan_noerror.d"
+ "sanitizers/msan_uninitialized.d"
+ "d2/dmd-testsuite/runnable_cxx/cppa.d")))))))
+ (add-before 'configure 'set-cc-and-cxx-to-use-clang
+ ;; The tests require to be built with Clang; build everything
+ ;; with it, for simplicity.
+ (lambda _
+ (setenv "CC" (which "clang"))
+ (setenv "CXX" (which "clang++"))))
(replace 'check
- (lambda* (#:key inputs outputs #:allow-other-keys)
- ;; some tests call into gdb binary which needs SHELL and CC set
- (setenv "SHELL" (which "sh"))
- (setenv "CC" (string-append (assoc-ref inputs "gcc") "/bin/gcc"))
- (invoke "make" "test" "-j" (number->string (parallel-job-count))))))))
- (native-inputs
- `(("llvm" ,llvm-6)
- ("clang" ,clang-6)
- ("ldc" ,ldc-bootstrap)
- ("python-lit" ,python-lit)
- ("python-wrapper" ,python-wrapper)
- ("unzip" ,unzip)
- ("gdb" ,gdb)
- ("phobos-src"
- ,(origin
- (method git-fetch)
- (uri (git-reference
- (url "https://github.com/ldc-developers/phobos")
- (commit (string-append "ldc-v" older-version))))
- (file-name (git-file-name "phobos" older-version))
- (sha256
- (base32 "1gmlwnjdcf6s5aahadxsif9l5nyaj0rrn379g6fmhcvdk64kf509"))
- ;; This patch deactivates some tests that depend on network access
- ;; to pass. It also deactivates some tests that have some reliance
- ;; on timezone.
- ;;
- ;; For the network tests, there's an effort to get a version flag
- ;; added to deactivate these tests for distribution packagers
- ;; that is being pursued at
- ;; <https://forum.dlang.org/post/zmdbdgnzrxyvtpqafvyg@forum.dlang.org>.
- ;; It also deactivates a test that requires /root
- (patches (search-patches "ldc-disable-phobos-tests.patch"))))
- ("druntime-src"
- ,(origin
- (method git-fetch)
- (uri (git-reference
- (url "https://github.com/ldc-developers/druntime")
- (commit (string-append "ldc-v" older-version))))
- (file-name (git-file-name "druntime" older-version))
- (sha256
- (base32 "0a3yyjcnpvm5fbdczf76fx08kl154w17w06hlxf0j3p1p4jc85aj"))))
- ("dmd-testsuite-src"
- ,(origin
- (method git-fetch)
- (uri (git-reference
- (url "https://github.com/ldc-developers/dmd-testsuite")
- (commit (string-append "ldc-v" older-version))))
- (file-name (git-file-name "dmd-testsuite" older-version))
- (sha256
- (base32 "0mm3rliki1nqiqfaha7ssvm156aa398vpvf4v6895m7nn1mz7rss")))))))))
+ (lambda* (#:key tests? parallel-tests? #:allow-other-keys)
+ (when tests?
+ (let ((job-count (number->string
+ (or (and parallel-tests?
+ (parallel-job-count))
+ 1))))
+ ;; The test targets are tested separately to provide
+ ;; finer-grained diagnostics (see:
+ ;; https://raw.githubusercontent.com/ldc-developers/
+ ;; ldc/master/.azure-pipelines/3-posix-test.yml)
+ (display "running the ldc2 unit tests...\n")
+ (invoke "ctest" "--output-on-failure" "-j" job-count
+ "-R" "ldc2-unittest")
+ (display "running the lit test suite...\n")
+ (invoke "ctest" "--output-on-failure" "-j" job-count
+ "-R" "lit-tests")
+ (display "running the dmd test suite...\n")
+ (invoke "ctest" "--output-on-failure" "-j" job-count
+ "-R" "dmd-testsuite")
+ (display "running the defaultlib unit tests and druntime \
+integration tests...\n")
+ (invoke "ctest" "--output-on-failure" "-j" job-count
+ "-E" "dmd-testsuite|lit-tests|ldc2-unittest")))))))))
+ (native-inputs
+ (append (delete "llvm"
+ (alist-replace "ldc" (list ldc-bootstrap-1.27)
+ (package-native-inputs ldc-bootstrap-1.27)))
+ `(("clang" ,clang-11) ;propagates llvm and clang-runtime
+ ("python-lit" ,python-lit))))))
(define-public dub
(package
diff --git a/gnu/packages/dns.scm b/gnu/packages/dns.scm
index c4c4bd2b3a..63bf66647c 100644
--- a/gnu/packages/dns.scm
+++ b/gnu/packages/dns.scm
@@ -1417,7 +1417,21 @@ and TCP-capable recursive DNS server for finding domains on the internet.")
#:configure-flags
(list (string-append "--sysconfdir=/etc"))
#:make-flags
- (list (string-append "SYSCONFDIR=/" (assoc-ref %outputs "out") "/etc"))))
+ (list (string-append "SYSCONFDIR=/" (assoc-ref %outputs "out") "/etc"))
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'install 'wrap-program
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (let ((out (assoc-ref outputs "out"))
+ (coreutils (assoc-ref inputs "coreutils-minimal")))
+ (substitute* (string-append out "/sbin/resolvconf")
+ (("RESOLVCONF=\"\\$0\"")
+ (format #f "\
+RESOLVCONF=\"$0\"
+PATH=~a/bin:$PATH"
+ coreutils)))))))))
+ (inputs
+ `(("coreutils-minimal" ,coreutils-minimal)))
(home-page "https://roy.marples.name/projects/openresolv/")
(synopsis "Resolvconf POSIX compliant implementation, a middleman for resolv.conf")
(description "openresolv is an implementation of @command{resolvconf}, the
diff --git a/gnu/packages/docbook.scm b/gnu/packages/docbook.scm
index ae5bc5d895..1a1f963821 100644
--- a/gnu/packages/docbook.scm
+++ b/gnu/packages/docbook.scm
@@ -1,11 +1,12 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2014 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2014, 2021 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2014 Eric Bavier <bavier@member.fsf.org>
;;; Copyright © 2016 Mathieu Lirzin <mthl@gnu.org>
;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
;;; Copyright © 2020 Marius Bakke <marius@gnu.org>
;;; Copyright © 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;; Copyright © 2021 Mark H Weaver <mhw@netris.org>
+;;; Copyright © 2021 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2021 Andrew Whatson <whatson@gmail.com>
;;;
;;; This file is part of GNU Guix.
@@ -34,11 +35,13 @@
#:use-module (gnu packages perl)
#:use-module (gnu packages python)
#:use-module (gnu packages base)
+ #:use-module (gnu packages web-browsers)
#:use-module (gnu packages xml)
#:use-module ((guix licenses) #:prefix license:)
#:use-module (guix packages)
#:use-module (guix download)
#:use-module ((guix build utils) #:select (alist-replace))
+ #:use-module (guix build-system copy)
#:use-module (guix build-system gnu)
#:use-module (guix build-system trivial)
#:use-module (guix build-system python))
@@ -175,15 +178,17 @@ by no means limited to these applications.) This package provides XML DTDs.")
(define-public docbook-xsl
(package
(name "docbook-xsl")
- (version "1.79.1")
+ (version "1.79.2")
(source (origin
(method url-fetch)
- (uri (string-append "mirror://sourceforge/docbook/docbook-xsl/"
- version "/docbook-xsl-" version ".tar.bz2"))
- (patches (search-patches "docbook-xsl-nonrecursive-string-subst.patch"))
+ (uri (string-append "https://github.com/docbook/xslt10-stylesheets"
+ "/releases/download/release%2F" version
+ "/docbook-xsl-" version ".tar.bz2"))
+ (patches (search-patches "docbook-xsl-support-old-url.patch"
+ "docbook-xsl-nonrecursive-string-subst.patch"))
(sha256
(base32
- "0s59lihif2fr7rznckxr2kfyrvkirv76r1zvidp9b5mj28p4apvj"))
+ "0wd33z41kdsybyx3ay21w6bdlmgpd9kyn3mr5y520lsf8km28r9i"))
(modules '((guix build utils)))
(snippet
'(begin
@@ -191,9 +196,12 @@ by no means limited to these applications.) This package provides XML DTDs.")
#t))))
(build-system trivial-build-system)
(arguments
- `(#:builder (let ((name-version (string-append ,name "-" ,version)))
+ `(#:builder (begin
(use-modules (guix build utils))
+ (define name-version
+ (string-append ,name "-" ,version))
+
(let* ((bzip2 (assoc-ref %build-inputs "bzip2"))
(xz (assoc-ref %build-inputs "xz"))
(tar (assoc-ref %build-inputs "tar"))
@@ -222,6 +230,61 @@ by no means limited to these applications.) This package provides XML DTDs.")
"This package provides XSL style sheets for DocBook.")
(license (license:x11-style "" "See 'COPYING' file."))))
+(define-public docbook-xsl-ns
+ (package
+ (name "docbook-xsl-ns")
+ (version "1.79.1")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "mirror://sourceforge/docbook/"
+ name "/" version "/"
+ name "-" version ".tar.bz2"))
+ (sha256
+ (base32
+ "170ggf5dgjar65kkn5n33kvjr3pdinpj66nnxfx8b2avw0k91jin"))))
+ (build-system copy-build-system)
+ (outputs '("out" "doc"))
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ ;; XXX: The copy-build-system doesn't seem to allow installing to a
+ ;; different output.
+ (replace 'install
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (xml (string-append out "/xml/xsl/" ,name "-" ,version))
+ (doc (string-append (assoc-ref %outputs "doc")
+ "/share/doc/" ,name "-" ,version))
+ (select-rx (make-regexp
+ "(\\.xml$|\\.xsl$|\\.dtd$|\\.ent$)")))
+ ;; Install catalog.
+ (install-file "catalog.xml" xml)
+ (install-file "VERSION.xsl" xml)
+ (substitute* (string-append xml "/catalog.xml")
+ (("rewritePrefix=\"./")
+ (string-append "rewritePrefix=\"file://" xml "/")))
+ ;; Install style sheets.
+ (for-each (lambda (dir)
+ (for-each (lambda (f)
+ (install-file
+ f (string-append xml "/" (dirname f))))
+ (find-files dir select-rx)))
+ '("assembly" "common" "eclipse" "epub" "epub3" "fo"
+ "highlighting" "html" "htmlhelp" "javahelp" "lib"
+ "manpages" "params" "profiling" "roundtrip"
+ "template" "website"
+ "xhtml" "xhtml-1_1" "xhtml5"))
+ ;; Install documentation.
+ (install-file "NEWS" doc)
+ (install-file "RELEASE-NOTES.html" doc)
+ (copy-recursively "slides" doc)
+ (copy-recursively "webhelp" doc)))))))
+ (home-page "https://docbook.org")
+ (synopsis "DocBook XSL namespaced style sheets for document authoring")
+ (description "This package provides the @emph{namespaced} XSL style sheets
+for DocBook.")
+ (license (license:x11-style "" "See 'COPYING' file."))))
+
(define-public docbook-dsssl
(package
(name "docbook-dsssl")
@@ -399,42 +462,38 @@ the in DocBook SGML DTDs.")
(build-system python-build-system)
;; TODO: Add xfig/transfig for fig2dev utility
(inputs
- `(("texlive" ,(texlive-union (list texlive-amsfonts/patched
+ `(("texlive" ,(texlive-updmap.cfg (list texlive-amsfonts
texlive-latex-anysize
texlive-latex-appendix
+ texlive-latex-bookmark
texlive-latex-changebar
texlive-latex-colortbl
- texlive-latex-eepic
- texlive-latex-eso-pic
texlive-latex-fancybox
texlive-latex-fancyhdr
texlive-latex-fancyvrb
texlive-latex-float
texlive-latex-footmisc
- texlive-latex-hyperref
+ texlive-hyperref
texlive-latex-jknapltx
texlive-latex-listings
texlive-latex-multirow
- texlive-latex-oberdiek
texlive-latex-overpic
texlive-latex-pdfpages
+ texlive-latex-refcount
texlive-latex-subfigure
texlive-latex-titlesec
- texlive-latex-url
- texlive-latex-wasysym
+ texlive-wasysym
- texlive-fonts-ec
texlive-fonts-rsfs
- texlive-fonts-stmaryrd
+ texlive-stmaryrd
- texlive-generic-ifxetex)))
+ texlive-generic-iftex)))
("imagemagick" ,imagemagick) ;for convert
("inkscape" ,inkscape) ;for svg conversion
("docbook" ,docbook-xml)
("libxslt" ,libxslt))) ;for xsltproc
(arguments
- `(#:python ,python-2 ;'print' syntax
- ;; Using setuptools causes an invalid "package_base" path in
+ `(;; Using setuptools causes an invalid "package_base" path in
;; out/bin/.dblatex-real due to a missing leading '/'. This is caused
;; by dblatex's setup.py stripping the root path when creating the
;; script. (dblatex's setup.py still uses distutils and thus has to
@@ -478,6 +537,91 @@ DB2LaTeX.")
(inputs (alist-replace "imagemagick" `(,imagemagick/stable)
(package-inputs dblatex))))))
+(define-public docbook-utils
+ (package
+ (name "docbook-utils")
+ (version "0.6.14")
+ (source (origin
+ (method url-fetch)
+ ;; The original sources are not accessible anymore.
+ (uri (string-append "http://deb.debian.org/debian/pool/main/"
+ "d/docbook-utils/docbook-utils_"
+ version ".orig.tar.gz"))
+ (sha256
+ (base32
+ "1scj5vgw1xz872pq54a89blcxqqm11p90yzv8a9mqq57x27apyj8"))))
+ (build-system gnu-build-system)
+ (arguments
+ `(#:phases (modify-phases %standard-phases
+ (add-after 'unpack 'patch-build-system
+ (lambda _
+ (substitute* (find-files "." "\\.in$")
+ ;; Do not hard-code SGML_CATALOG_FILES.
+ ((".*SGML_CATALOG_FILES=/etc/sgml/catalog.*") "")
+ ;; Use OpenSP and OpenJade.
+ (("\\bjade\\b")
+ "openjade")
+ (("\\bnsgmls\\b")
+ "onsgmls"))
+ #t))
+ (add-after 'unpack 'patch-jw.in
+ ;; Do not override the SGML_CATALOG_FILES environment
+ ;; variable.
+ (lambda _
+ (substitute* "bin/jw.in"
+ ((".*SGML_CATALOG_FILES=`find.*")
+ "")
+ (("SGML_CATALOG_FILES=`echo.*")
+ ":\n")
+ (("SGML_CATALOG_FILES=\"\"")
+ ":")
+ (("\\bwhich\\b")
+ "command -v"))
+ #t))
+ (add-after 'unpack 'patch-txt-backend
+ (lambda _
+ ;; Locate lynx, links or w3m from the PATH, not from
+ ;; /usr/bin.
+ (substitute* "backends/txt"
+ (("CONVERT=/usr/bin/")
+ "CONVERT=")
+ (("\\[ -x /usr/bin/([^ ]+) \\]" dummy command)
+ (string-append "command -v " command " > /dev/null")))
+ #t)))))
+ ;; Propagated for convenience. All these tools are used at run time to
+ ;; provide the complete functionality of the docbook-utils commands.
+ (propagated-inputs
+ `(("texlive-jadetex" ,texlive-jadetex)
+ ("docbook-sgml" ,docbook-sgml-3.1)
+ ("docbook-dsssl" ,docbook-dsssl)
+ ("openjade" ,openjade)
+ ("opensp" ,opensp)
+ ("lynx" ,lynx)
+ ("perl-sgmls" ,perl-sgmls)))
+ (home-page "https://packages.debian.org/sid/docbook-utils")
+ (synopsis "DocBook converter to other formats")
+ (description "The docbook-utils package is a collection of utilities
+intended to ease the use of SGML and XML.
+@table @command
+@item jw
+Convert a SGML DocBook file to other formats such as Hyper Text Markup
+Language (HTML), Rich Text Format (RTF), PostScript (PS), man, Portable
+Document Format (PDF), TeX, Texinfo or plain text (txt). It can be used
+more conveniently via the following wrappers:
+@itemx docbook2dvi Convert a SGML DocBook file to the DVI format.
+@itemx docbook2html Convert a SGML DocBook file to an HTML document.
+@itemx docbook2man Convert a SGML DocBook file a man page.
+@itemx docbook2pdf Convert a SGML DocBook file to a PDF document.
+@itemx docbook2ps Convert a SGML DocBook file to a PS document.
+@itemx docbook2rtf Convert a SGML DocBook file to a RTF document.
+@itemx docbook2tex Convert a SGML DocBook file to a TeX document.
+@itemx docbook2texi Convert a SGML DocBook file to a Texinfo document.
+@itemx docbook2txt Convert a SGML DocBook file to a plain text document.
+@item sgmldiff
+Detect the differences in markup between two SGML files.
+@end table")
+ (license license:gpl2+)))
+
(define-public docbook2x
(package
(name "docbook2x")
diff --git a/gnu/packages/docker.scm b/gnu/packages/docker.scm
index 8bac1b89ce..472c5eb957 100644
--- a/gnu/packages/docker.scm
+++ b/gnu/packages/docker.scm
@@ -57,21 +57,21 @@
(define-public python-docker
(package
(name "python-docker")
- (version "3.7.3")
+ (version "5.0.3")
(source
(origin
(method url-fetch)
(uri (pypi-uri "docker" version))
(sha256
(base32
- "0qmrcvpaz37p85hfddsd4yc8hgqlkzs4cz09q9wmy0pz5pwajqm0"))))
+ "1yr7w8vmdis01myx26pqx7wcyz2cy1mfs421alppq3lpc9ms45nr"))))
(build-system python-build-system)
;; TODO: Tests require a running Docker daemon.
(arguments '(#:tests? #f))
(inputs
- `(("python-requests" ,python-requests-2.20)
+ `(("python-requests" ,python-requests)
("python-six" ,python-six)
- ("python-urllib3" ,python-urllib3-1.24)))
+ ("python-urllib3" ,python-urllib3)))
(propagated-inputs
`(("python-docker-pycreds" ,python-docker-pycreds)
("python-paramiko" ,python-paramiko) ;adds SSH support
@@ -106,23 +106,24 @@ client.")
(define-public docker-compose
(package
(name "docker-compose")
- (version "1.25.4")
+ (version "1.29.2")
(source
(origin
(method url-fetch)
(uri (pypi-uri "docker-compose" version))
(sha256
(base32
- "1ww8ckpj3n5jdg63qvmiqx3gk0fsrnynnnqj17fppymbwjzf5fps"))))
+ "1dq9kfak61xx7chjrzmkvbw9mvj9008k7g8q7mwi4x133p9dk32c"))))
(build-system python-build-system)
;; TODO: Tests require running Docker daemon.
(arguments '(#:tests? #f))
(inputs
- `(("python-cached-property"
- ,python-cached-property)
+ `(("python-cached-property" ,python-cached-property)
+ ("python-distro" ,python-distro)
("python-docker" ,python-docker)
("python-dockerpty" ,python-dockerpty)
("python-docopt" ,python-docopt)
+ ("python-dotenv" ,python-dotenv)
("python-jsonschema" ,python-jsonschema)
("python-pyyaml" ,python-pyyaml)
("python-requests" ,python-requests)
diff --git a/gnu/packages/documentation.scm b/gnu/packages/documentation.scm
index 19190f4480..4313af387e 100644
--- a/gnu/packages/documentation.scm
+++ b/gnu/packages/documentation.scm
@@ -185,8 +185,8 @@ markup) can be customized and extended by the user.")
(define-public doxygen
(package
(name "doxygen")
- (version "1.8.17")
- (home-page "http://www.doxygen.nl/")
+ (version "1.9.1")
+ (home-page "https://www.doxygen.nl/")
(source (origin
(method url-fetch)
(uri (list (string-append home-page "files/doxygen-"
@@ -196,9 +196,7 @@ markup) can be customized and extended by the user.")
".src.tar.gz")))
(sha256
(base32
- "16dmv0gm1x8rvbm82fmjvi213q8fxqxinm75pcf595flya59ific"))
- (patches (search-patches "doxygen-test.patch"
- "doxygen-1.8.17-runtests.patch"))))
+ "1lcif1qi20gf04qyjrx7x367669g17vz2ilgi4cmamp1whdsxbk7"))))
(build-system cmake-build-system)
(native-inputs
`(("bison" ,bison)
@@ -218,6 +216,12 @@ markup) can be customized and extended by the user.")
'())
#:test-target "tests"
#:phases (modify-phases %standard-phases
+ (add-after 'unpack 'disable-bibtex-test
+ (lambda _
+ ;; Disable test that requires bibtex to avoid a
+ ;; circular dependency.
+ (for-each delete-file-recursively
+ '("testing/012" "testing/012_cite.dox"))))
(add-before 'configure 'patch-sh
(lambda* (#:key inputs #:allow-other-keys)
(substitute* "src/portable.cpp"
diff --git a/gnu/packages/dunst.scm b/gnu/packages/dunst.scm
index 250840415e..2449620891 100644
--- a/gnu/packages/dunst.scm
+++ b/gnu/packages/dunst.scm
@@ -68,7 +68,7 @@
("which" ,which)))
(inputs
`(("dbus" ,dbus)
- ("gdk-pixbuf" ,gdk-pixbuf+svg) ; for svg support
+ ("librsvg" ,librsvg) ; for svg support
("glib" ,glib)
("cairo" ,cairo)
("pango" ,pango)
diff --git a/gnu/packages/ebook.scm b/gnu/packages/ebook.scm
index b2bf4e6dfb..deb001862c 100644
--- a/gnu/packages/ebook.scm
+++ b/gnu/packages/ebook.scm
@@ -329,7 +329,7 @@ sip-include-dirs = [\"" pyqt "/share/sip" "\"]")))
;; rather than create ..calibre-real-real-s. For more
;; information see: https://issues.guix.gnu.org/43249.
(find-files "." (lambda (file stat)
- (not (wrapper? file)))))))
+ (not (wrapped-program? file)))))))
#t)))))
(home-page "https://calibre-ebook.com/")
(synopsis "E-book library management software")
@@ -552,12 +552,12 @@ following formats:
(libmagic-path (string-append
(assoc-ref %build-inputs "file")
"/lib"))
- (python-path (getenv "PYTHONPATH")))
+ (python-path (getenv "GUIX_PYTHONPATH")))
(wrap-program (string-append out "/bin/cozy")
`("LD_LIBRARY_PATH" ":" prefix (,libmagic-path))
`("GI_TYPELIB_PATH" ":" prefix (,gi-typelib-path))
`("GST_PLUGIN_SYSTEM_PATH" ":" prefix (,gst-plugin-path))
- `("PYTHONPATH" ":" prefix (,python-path ,pylib)))))))))
+ `("GUIX_PYTHONPATH" ":" prefix (,python-path ,pylib)))))))))
(native-inputs
`(("desktop-file-utils" ,desktop-file-utils)
("gettext" ,gettext-minimal)
diff --git a/gnu/packages/ed.scm b/gnu/packages/ed.scm
index da4c3ddf04..accc461e9b 100644
--- a/gnu/packages/ed.scm
+++ b/gnu/packages/ed.scm
@@ -28,14 +28,14 @@
(define-public ed
(package
(name "ed")
- (version "1.16")
+ (version "1.17")
(source (origin
(method url-fetch)
(uri (string-append "mirror://gnu/ed/ed-"
version ".tar.lz"))
(sha256
(base32
- "0b4b1lwizvng9bvpcjnmpj2i80xz9xw2w8nfff27b2h4mca7mh6g"))))
+ "0m2yrkfjjraakxr98nsiakqrn351h99n706x9asgmdi57j43kpki"))))
(build-system gnu-build-system)
(native-inputs `(("lzip" ,lzip)))
(arguments
diff --git a/gnu/packages/education.scm b/gnu/packages/education.scm
index b864ac6c76..739acb6453 100644
--- a/gnu/packages/education.scm
+++ b/gnu/packages/education.scm
@@ -101,10 +101,9 @@
(add-after 'set-paths 'set-sdl-paths
(lambda* (#:key inputs #:allow-other-keys)
(setenv "CPATH"
- (string-append (assoc-ref inputs "sdl-mixer")
- "/include/SDL:"
- (or (getenv "CPATH") "")))
- #t)))))
+ (string-append
+ (search-input-directory inputs "include/SDL")
+ ":" (or (getenv "CPATH") ""))))))))
(inputs
`(("gtk+" ,gtk+-2)
("librsvg" ,librsvg)
@@ -157,8 +156,7 @@ of categories with some of the activities available in that category.
(add-before 'check 'start-xorg-server
(lambda* (#:key inputs #:allow-other-keys)
;; The test suite requires a running X server.
- (system (string-append (assoc-ref inputs "xorg-server")
- "/bin/Xvfb :1 &"))
+ (system "Xvfb :1 &")
(setenv "DISPLAY" ":1")
;; The test suite wants to write to /homeless-shelter
(setenv "HOME" (getcwd))
@@ -339,17 +337,16 @@ easy.")
;; Replace the sole minified file in the package.
(with-directory-excursion (string-append share "/src")
(delete-file "FileSaver.min.js")
- (symlink (string-append (assoc-ref %build-inputs "js-filesaver")
- "/share/javascript/FileSaver.min.js")
+ (symlink (search-input-file %build-inputs
+ "/share/javascript/FileSaver.min.js")
"FileSaver.min.js"))
;; Create a "snap" executable.
(let* ((bin (string-append out "/bin"))
(script (string-append bin "/snap"))
(snap (string-append share "/snap.html"))
- (bash (string-append (assoc-ref %build-inputs "bash")
- "/bin/sh"))
- (xdg-open (string-append (assoc-ref %build-inputs "xdg-utils")
- "/bin/xdg-open")))
+ (bash (search-input-file %build-inputs "/bin/sh"))
+ (xdg-open (search-input-file %build-inputs
+ "/bin/xdg-open")))
(mkdir-p bin)
(call-with-output-file script
(lambda (port)
@@ -498,8 +495,7 @@ specialized device.")
#t)))
(add-after 'install 'create-executable
(lambda* (#:key outputs inputs #:allow-other-keys)
- (let* ((python (string-append (assoc-ref inputs "python")
- "/bin/python"))
+ (let* ((python (search-input-file inputs "/bin/python"))
(out (assoc-ref outputs "out"))
(bin (string-append out "/bin"))
(executable (string-append bin "/childsplay")))
@@ -592,10 +588,9 @@ letters of the alphabet, spelling, eye-hand coordination, etc.")
;; Install the launcher.
(let* ((bin (string-append out "/bin"))
(script (string-append bin "/omnitux"))
- (bash (string-append (assoc-ref %build-inputs "bash")
- "/bin/bash"))
- (python (string-append (assoc-ref %build-inputs "python")
- "/bin/python2")))
+ (bash (search-input-file %build-inputs "/bin/bash"))
+ (python (search-input-file %build-inputs
+ "/bin/python2")))
(mkdir-p bin)
(with-output-to-file script
(lambda ()
@@ -854,8 +849,8 @@ stored and user can review his performance in any time.")
(string-prefix? "python-" label)))
inputs)))
(qtwebengineprocess
- (string-append (assoc-ref inputs "qtwebengine")
- "/lib/qt5/libexec/QtWebEngineProcess")))
+ (search-input-file inputs
+ "lib/qt5/libexec/QtWebEngineProcess")))
;; The program fails to find the QtWebEngineProcess program, so
;; we set QTWEBENGINEPROCESS_PATH to help it. PYTHONPATH is
;; wrapped to avoid declaring Python libraries as propagated
@@ -867,7 +862,7 @@ stored and user can review his performance in any time.")
`("PATH" prefix (,(string-append
(assoc-ref inputs "mpv")
"/bin")))
- `("PYTHONPATH" = ,site-packages)))
+ `("GUIX_PYTHONPATH" = ,site-packages)))
(find-files bin ".")))
#t)))))
(native-inputs
@@ -925,8 +920,13 @@ endless. For example:
(file-name (git-file-name name version))
(sha256
(base32 "13q02xpmps9qg8zrzzy2gzv4a6afgi28lxk4z242j780v0gphchp"))
- (patches
- (search-patches "t4k-common-libpng16.patch"))))
+ (patches (search-patches "t4k-common-libpng16.patch"))
+ (modules '((guix build utils)))
+ (snippet
+ `(begin
+ (substitute* "src/t4k_common.h"
+ (("char wrapped_lines") "extern char wrapped_lines"))
+ #t))))
(build-system cmake-build-system)
(arguments
`(#:tests? #f ;FIXME: cannot find how to run tests
@@ -934,9 +934,10 @@ endless. For example:
(modify-phases %standard-phases
(add-after 'set-paths 'set-sdl-paths
(lambda* (#:key inputs #:allow-other-keys)
- (setenv "CPATH" (string-append (assoc-ref inputs "sdl")
- "/include/SDL:"
- (or (getenv "CPATH") "")))))
+ (setenv "CPATH"
+ (string-append
+ (search-input-directory inputs "/include/SDL")
+ ":" (or (getenv "CPATH") "")))))
(add-after 'unpack 'fix-andika-font-path
(lambda* (#:key inputs #:allow-other-keys)
(substitute* "src/t4k_sdl.c"
@@ -975,6 +976,9 @@ TuxMath and TuxType.")
;; Unbundle fonts.
(snippet
`(begin
+ ;; Remove duplicate definition.
+ (substitute* "src/menu_lan.c"
+ (("lan_player_type.*MAX_CLIENTS\\];") ""))
(for-each delete-file (find-files "data/fonts" "\\.ttf$"))
#t))))
(build-system gnu-build-system)
@@ -985,10 +989,10 @@ TuxMath and TuxType.")
(add-after 'set-paths 'set-sdl-paths
(lambda* (#:key inputs #:allow-other-keys)
(setenv "CPATH"
- (string-append (assoc-ref inputs "sdl")
- "/include/SDL:"
- (or (getenv "CPATH") "")))
- #t))
+ (string-append
+ (search-input-directory inputs "/include/SDL")
+ ":"
+ (or (getenv "CPATH") "")))))
(add-after 'install 'install-desktop-file
(lambda* (#:key outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))
diff --git a/gnu/packages/elf.scm b/gnu/packages/elf.scm
index aab912648b..2bc1d00048 100644
--- a/gnu/packages/elf.scm
+++ b/gnu/packages/elf.scm
@@ -9,6 +9,7 @@
;;; Copyright © 2020 Mark Wielaard <mark@klomp.org>
;;; Copyright © 2020 Michael Rohleder <mike@rohleder.de>
;;; Copyright © 2021 Leo Le Bouter <lle-bout@zaclys.net>
+;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -32,6 +33,7 @@
#:use-module (guix build-system gnu)
#:use-module ((guix licenses) #:select (gpl3+ lgpl3+ lgpl2.0+))
#:use-module (gnu packages)
+ #:use-module (gnu packages autotools)
#:use-module (gnu packages compression)
#:use-module (gnu packages documentation)
#:use-module (gnu packages gcc)
@@ -47,14 +49,14 @@
(define-public elfutils
(package
(name "elfutils")
- (version "0.182")
+ (version "0.183")
(source (origin
(method url-fetch)
(uri (string-append "https://sourceware.org/elfutils/ftp/"
version "/elfutils-" version ".tar.bz2"))
(sha256
(base32
- "0n48dcadjy0wiilddzav2zaxdi30qkkfp160gw5mycyz9s8hdi7c"))
+ "1igjfia9x8h6fmh9nbl8mpz0i24my5iixrji99qmi79hilh7qqy3"))
(patches (search-patches "elfutils-tests-ptrace.patch"))))
(build-system gnu-build-system)
@@ -70,6 +72,7 @@
`(#:configure-flags (list (string-append "LDFLAGS=-Wl,-rpath="
(assoc-ref %outputs "out")
"/lib")
+ "--disable-static"
;; TODO: Enable the debuginfo server. It
;; increases the closure size significantly
;; and presents bootstrapping problems, so
@@ -204,22 +207,32 @@ static analysis of the ELF binaries at hand.")
(arguments
`(#:phases
(modify-phases %standard-phases
- (replace 'configure
- (lambda* (#:key outputs #:allow-other-keys)
- ;; This old `configure' script doesn't support
- ;; variables passed as arguments.
- (let ((out (assoc-ref outputs "out")))
- (setenv "CONFIG_SHELL" (which "bash"))
- (invoke "./configure"
- (string-append "--prefix=" out)
- ,@(if (string=? "powerpc64le-linux"
- (%current-system))
- '("--host=powerpc64le-unknown-linux-gnu")
- '())
- ,@(if (string=? "aarch64-linux"
- (%current-system))
- '("--host=aarch64-unknown-linux-gnu")
- '()))))))))
+ ;; This old 'configure' script doesn't support cross-compilation
+ ;; well. I.e., it fails to find the cross-compiler. Also,
+ ;; the old `configure' script doesn't support variables passed as
+ ;; arguments. A third problem is that config.sub is too old to
+ ;; recognise aarch64 and powerpc64le.
+ ;;
+ ;; Solve this by regenerating the configure script and letting
+ ;; autoreconf update 'config.sub'. While 'config.sub' is updated
+ ;; anyway, update 'config.guess' as well.
+ (add-before 'bootstrap 'delete-configure
+ (lambda* (#:key native-inputs inputs #:allow-other-keys)
+ (delete-file "configure")
+ (delete-file "config.sub")
+ (delete-file "config.guess")
+ (for-each (lambda (file)
+ (install-file
+ (string-append
+ (assoc-ref (or native-inputs inputs) "automake")
+ "/share/automake-"
+ ,(version-major+minor (package-version automake))
+ "/" file) "."))
+ '("config.sub" "config.guess")))))))
+ (native-inputs
+ `(("autoconf" ,autoconf)
+ ;; For up-to-date 'config.guess' and 'config.sub'
+ ("automake" ,automake)))
(home-page (string-append "https://web.archive.org/web/20181111033959/"
"http://www.mr511.de/software/english.html"))
(synopsis "ELF object file access library")
diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index db2110226d..71d1885079 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -308,7 +308,7 @@ e.g. emacs-geiser-guile for Guile.")
(string-append
"(eval-after-load 'geiser-impl '" all ")"))))))))
(inputs
- `(("guile" ,guile-2.2)))
+ `(("guile" ,guile-3.0)))
(propagated-inputs
`(("geiser" ,emacs-geiser)))
(home-page "https://nongnu.org/geiser/")
@@ -534,8 +534,7 @@ system.")
(lambda* (#:key inputs #:allow-other-keys)
(substitute* "hypb.el"
(("/bin/domainname")
- (string-append (assoc-ref inputs "inetutils")
- "/bin/dnsdomainname")))
+ (search-input-file inputs "bin/dnsdomainname")))
(substitute* "hyperbole.el"
(("\\(hyperb:check-dir-user\\)") ""))))
(add-after 'install 'install-images
@@ -744,14 +743,12 @@ on stdout instead of using a socket as the Emacsclient does.")
(make-file-writable "libgit.el")
(emacs-substitute-variables "libgit.el"
("libgit--module-file"
- (string-append (emacs:elpa-directory out) "/libegit2.so")))
- #t)))
+ (string-append (emacs:elpa-directory out) "/libegit2.so"))))))
(add-before 'install 'prepare-for-install
(lambda _
- (let ((s (string-append "../" ,name "-" ,version "-checkout")))
+ (let ((s "../source"))
(copy-file "libegit2.so" (string-append s "/libegit2.so"))
- (chdir s)
- #t)))
+ (chdir s))))
(replace 'install
(lambda* (#:key outputs #:allow-other-keys)
(let ((install (assoc-ref emacs:%standard-phases 'install)))
@@ -1456,7 +1453,7 @@ replacement.")
((f1 f2 ...) (dirname f1))
(_ "")))
- (let ((sh (string-append (assoc-ref inputs "bash") "/bin/sh")))
+ (let ((sh (search-input-file inputs "/bin/sh")))
(define emacs-prefix? (cut string-prefix? "emacs-" <>))
(setenv "SHELL" "sh")
@@ -2666,7 +2663,7 @@ as a library for other Emacs packages.")
(lambda* (#:key inputs #:allow-other-keys)
(emacs-substitute-variables "preview.el"
("preview-gs-command"
- (string-append (assoc-ref inputs "ghostscript") "/bin/gs")))
+ (search-input-file inputs "/bin/gs")))
(substitute* "preview.el"
(("\"dvipng ")
(string-append "\"" (assoc-ref inputs "texlive")
@@ -2692,7 +2689,7 @@ as a library for other Emacs packages.")
`(("perl" ,perl)))
(inputs
`(("ghostscript" ,ghostscript)
- ("texlive" ,(texlive-union (list texlive-amsfonts/patched)))))
+ ("texlive" ,(texlive-updmap.cfg (list texlive-amsfonts)))))
(home-page "https://www.gnu.org/software/auctex/")
(synopsis "Integrated environment for TeX")
(description
@@ -3069,8 +3066,7 @@ into mode hooks and is intended to be used that way.")
(chmod "ggtags.el" #o644)
(emacs-substitute-variables "ggtags.el"
("ggtags-executable-directory"
- (string-append (assoc-ref inputs "global") "/bin")))
- #t)))))
+ (dirname (search-input-file inputs "bin/global")))))))))
(home-page "https://github.com/leoliu/ggtags")
(synopsis "Frontend to the GNU Global source code tagging system")
(description "@code{ggtags} provides a frontend to the GNU Global source
@@ -3176,7 +3172,7 @@ directly inside Emacs. It requires a Google Map Static API key to function.")
(with-directory-excursion "texinfo"
(substitute* "Makefile"
(("\\/usr\\/bin\\/gzip")
- (string-append (assoc-ref inputs "gzip") "/bin/gzip")))
+ (search-input-file inputs "/bin/gzip")))
(invoke "make"
"clean"
"info"
@@ -5700,8 +5696,7 @@ for Flow files.")
(add-after 'unpack 'specify-python-location
;; Hard-code python3 executable location in the library.
(lambda* (#:key inputs #:allow-other-keys)
- (let ((python3 (string-append (assoc-ref inputs "python")
- "/bin/python3")))
+ (let ((python3 (search-input-file inputs "/bin/python3")))
(substitute* '("flycheck-grammalecte.el" "grammalecte.el")
(("\"python3") (string-append "\"" python3)))
(substitute* '("conjugueur.py" "flycheck_grammalecte.py")
@@ -5712,10 +5707,11 @@ for Flow files.")
(make-file-writable "grammalecte.el")
(emacs-substitute-variables "grammalecte.el"
("grammalecte-python-package-directory"
- (string-append (assoc-ref inputs "grammalecte")
- "/lib/python"
- ,(version-major+minor (package-version python))
- "/site-packages/grammalecte")))))
+ (search-input-directory
+ inputs
+ (string-append "lib/python"
+ ,(version-major+minor (package-version python))
+ "/site-packages/grammalecte"))))))
(add-after 'unpack 'do-not-phone-home
;; Do not check for Grammalecte updates, ever.
(lambda _
@@ -9583,9 +9579,7 @@ queries using counsel.")
(make-file-writable "counsel-notmuch.el")
(emacs-substitute-variables "counsel-notmuch.el"
("counsel-notmuch-path"
- (string-append (assoc-ref inputs "notmuch")
- "/bin/notmuch")))
- #t)))))
+ (search-input-file inputs "/bin/notmuch"))))))))
(inputs
`(("emacs-counsel" ,emacs-counsel)
("notmuch" ,notmuch)
@@ -10571,86 +10565,94 @@ indentation guides in Emacs:
(license license:gpl2+))))
(define-public emacs-elpy
- (package
- (name "emacs-elpy")
- (version "1.35.0")
- (source (origin
- (method git-fetch)
- (uri (git-reference
- (url "https://github.com/jorgenschaefer/elpy")
- (commit version)))
- (file-name (git-file-name name version))
- (sha256
- (base32
- "07rdb9w3bxzfr07224awa541xdy116hyc2b3bpl3fc3ikddmbydk"))))
- (build-system emacs-build-system)
- (arguments
- `(#:include (cons* "^elpy/[^/]+\\.py$" "^snippets\\/" %default-include)
- #:phases
- (modify-phases %standard-phases
- (add-after 'unpack 'patch-ffip-project-search-call
- (lambda _
- ;; Since version 6.0.0 of find-file-in-project,
- ;; ffip-project-search doesn't accept a third argument anymore
- ;; (see: https://github.com/jorgenschaefer/elpy/issues/1889).
- (substitute* "elpy.el"
- (("\\((ffip-project-search nil nil) project-root\\)" _ signature)
- (format #f "(let ((ffip-project-root project-root)) (~a))"
- signature)))))
- ;; The default environment of the RPC uses Virtualenv to install
- ;; Python dependencies from PyPI. We don't want/need this in Guix.
- (add-before 'check 'do-not-use-virtualenv
- (lambda _
- (setenv "ELPY_TEST_DONT_USE_VIRTUALENV" "1")
- (substitute* "elpy-rpc.el"
- (("defcustom elpy-rpc-virtualenv-path 'default")
- "defcustom elpy-rpc-virtualenv-path 'system"))))
- (add-before 'check 'build-doc
- (lambda _
- (with-directory-excursion "docs"
- (invoke "make" "info" "man"))
- ;; Move .info file at the root so that it can installed by the
- ;; 'move-doc phase.
- (rename-file "docs/_build/texinfo/Elpy.info" "Elpy.info")))
- (add-after 'build-doc 'install-manpage
- (lambda* (#:key outputs #:allow-other-keys)
- (let* ((out (assoc-ref outputs "out"))
- (man1 (string-append out "/share/man/man1")))
- (mkdir-p man1)
- (copy-file "docs/_build/man/elpy.1"
- (string-append man1 "/elpy.1"))))))
- #:tests? #t
- #:test-command '("ert-runner")))
- (propagated-inputs
- `(("emacs-company" ,emacs-company)
- ("emacs-find-file-in-project" ,emacs-find-file-in-project)
- ("emacs-highlight-indentation" ,emacs-highlight-indentation)
- ("emacs-yasnippet" ,emacs-yasnippet)
- ("pyvenv" ,emacs-pyvenv)
- ("s" ,emacs-s)
- ;; The following are recommended Python dependencies that make Elpy
- ;; much more useful. Installing these avoids Elpy prompting to install them
- ;; from PyPI using pip.
- ("python-autopep8" ,python-autopep8)
- ("python-black" ,python-black)
- ("python-flake8" ,python-flake8)
- ("python-jedi" ,python-jedi)
- ("python-rope" ,python-rope)
- ("python-yapf" ,python-yapf)))
- (native-inputs
- `(("ert-runner" ,emacs-ert-runner)
- ("emacs-f" ,emacs-f)
- ("python" ,python-wrapper)
- ;; For documentation.
- ("python-sphinx" ,python-sphinx)
- ("texinfo" ,texinfo)))
- (home-page "https://github.com/jorgenschaefer/elpy")
- (synopsis "Python development environment for Emacs")
- (description "Elpy brings powerful Python editing to Emacs. It combines
+ ;; Use the latest commit, as it contains unreleased fixes for Python 3.9 and
+ ;; Jedi 0.18.
+ (let ((commit "8d0de310d41ebf06b22321a8534546447456870c")
+ (revision "0"))
+ (package
+ (name "emacs-elpy")
+ (version (git-version "1.35.0" revision commit))
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/jorgenschaefer/elpy")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0hg6yk0wkfh2rwcc4h0bb6m2p3dg62ja22mjpa94khq52lv1piwf"))))
+ (build-system emacs-build-system)
+ (arguments
+ `(#:include (cons* "^elpy/[^/]+\\.py$" "^snippets\\/" %default-include)
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'disable-broken-tests
+ ;; Some tests are known to have problems with Python 3.9; disable
+ ;; them (see:
+ ;; https://github.com/jorgenschaefer/elpy/issues/1856).
+ ;; Aggressively remove the modules where failing tests were
+ ;; discovered, as they are similar and fail in a nondeterministic
+ ;; way.
+ (lambda _
+ (with-directory-excursion "test"
+ (for-each delete-file
+ (append (find-files "." "elpy-refactor")
+ (find-files "." "elpy-multiedit")
+ (find-files "." "elpy-pdb")
+ (find-files "." "elpy-promise"))))))
+ ;; The default environment of the RPC uses Virtualenv to install
+ ;; Python dependencies from PyPI. We don't want/need this in Guix.
+ (add-before 'check 'do-not-use-virtualenv
+ (lambda _
+ (setenv "ELPY_TEST_DONT_USE_VIRTUALENV" "1")
+ (substitute* "elpy-rpc.el"
+ (("defcustom elpy-rpc-virtualenv-path 'default")
+ "defcustom elpy-rpc-virtualenv-path 'system"))))
+ (add-before 'check 'build-doc
+ (lambda _
+ (with-directory-excursion "docs"
+ (invoke "make" "info" "man"))
+ ;; Move .info file at the root so that it can installed by the
+ ;; 'move-doc phase.
+ (rename-file "docs/_build/texinfo/Elpy.info" "Elpy.info")))
+ (add-after 'build-doc 'install-manpage
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (man1 (string-append out "/share/man/man1")))
+ (mkdir-p man1)
+ (copy-file "docs/_build/man/elpy.1"
+ (string-append man1 "/elpy.1"))))))
+ #:tests? #t
+ #:test-command '("ert-runner")))
+ (propagated-inputs
+ `(("emacs-company" ,emacs-company)
+ ("emacs-find-file-in-project" ,emacs-find-file-in-project)
+ ("emacs-highlight-indentation" ,emacs-highlight-indentation)
+ ("emacs-yasnippet" ,emacs-yasnippet)
+ ("pyvenv" ,emacs-pyvenv)
+ ("s" ,emacs-s)
+ ;; The following are recommended Python dependencies that make Elpy
+ ;; much more useful. Installing these avoids Elpy prompting to install them
+ ;; from PyPI using pip.
+ ("python-autopep8" ,python-autopep8)
+ ("python-black" ,python-black)
+ ("python-flake8" ,python-flake8)
+ ("python-jedi" ,python-jedi)
+ ("python-yapf" ,python-yapf)))
+ (native-inputs
+ `(("ert-runner" ,emacs-ert-runner)
+ ("emacs-f" ,emacs-f)
+ ("python" ,python-wrapper)
+ ;; For documentation.
+ ("python-sphinx" ,python-sphinx)
+ ("texinfo" ,texinfo)))
+ (home-page "https://github.com/jorgenschaefer/elpy")
+ (synopsis "Python development environment for Emacs")
+ (description "Elpy brings powerful Python editing to Emacs. It combines
and configures a number of other packages written in Emacs Lisp as well as
Python, together offering features such as navigation, documentation,
completion, interactive development and more.")
- (license license:gpl3+)))
+ (license license:gpl3+))))
(define-public emacs-rainbow-delimiters
(package
@@ -13490,8 +13492,7 @@ highlights quasi-quoted expressions.")
(bin (string-append out "/bin"))
(lisp (string-append out "/share/emacs/site-lisp/emacspeak"))
(info (string-append out "/share/info"))
- (emacs (string-append (assoc-ref inputs "emacs")
- "/bin/emacs")))
+ (emacs (search-input-file inputs "/bin/emacs")))
;; According to etc/install.org, the Emacspeak directory should
;; be copied to its installation destination.
(for-each
@@ -14312,10 +14313,10 @@ It should enable you to implement low-level X11 applications.")
(format #t "#!~a ~@
~a +SI:localuser:$USER ~@
exec ~a --exit-with-session ~a \"$@\" --eval '~s' ~%"
- (string-append (assoc-ref inputs "bash") "/bin/sh")
- (string-append (assoc-ref inputs "xhost") "/bin/xhost")
- (string-append (assoc-ref inputs "dbus") "/bin/dbus-launch")
- (string-append (assoc-ref inputs "emacs") "/bin/emacs")
+ (search-input-file inputs "/bin/sh")
+ (search-input-file inputs "/bin/xhost")
+ (search-input-file inputs "/bin/dbus-launch")
+ (search-input-file inputs "/bin/emacs")
'(cond
((file-exists-p "~/.exwm")
(load-file "~/.exwm"))
@@ -14428,10 +14429,10 @@ other operations.")
(format #t "#!~a ~@
~a +SI:localuser:$USER ~@
exec ~a --exit-with-session ~a \"$@\" --eval '~s' ~%"
- (string-append (assoc-ref inputs "bash") "/bin/sh")
- (string-append (assoc-ref inputs "xhost") "/bin/xhost")
- (string-append (assoc-ref inputs "dbus") "/bin/dbus-launch")
- (string-append (assoc-ref inputs "emacs") "/bin/emacs")
+ (search-input-file inputs "/bin/sh")
+ (search-input-file inputs "/bin/xhost")
+ (search-input-file inputs "/bin/dbus-launch")
+ (search-input-file inputs "/bin/emacs")
'(require 'exwmx-loader))))
(chmod exwm-executable #o555)
#t))))))
@@ -16659,7 +16660,7 @@ Features:
;; Patch shebangs.
(substitute* "epipe"
(("/usr/bin/env bash")
- (string-append (assoc-ref %build-inputs "bash") "/bin/bash")))
+ (search-input-file %build-inputs "/bin/bash")))
(patch-shebang "epipe.pl"
(list (string-append (assoc-ref %build-inputs "perl")
"/bin")))
@@ -24150,7 +24151,7 @@ processes for Emacs")
(chmod "src/elisp/treemacs-customization.el" #o644)
(emacs-substitute-variables "src/elisp/treemacs-customization.el"
("treemacs-python-executable"
- (string-append (assoc-ref inputs "python") "/bin/python3")))
+ (search-input-file inputs "/bin/python3")))
(chmod "src/elisp/treemacs-async.el" #o644)
(substitute* "src/elisp/treemacs-async.el"
(("src/scripts") (string-append "share/" ,name "/scripts"))))))
@@ -27232,14 +27233,14 @@ service, and connect it with Emacs via inter-process communication.")
(add-after 'unpack 'patch-sources
(lambda* (#:key inputs #:allow-other-keys)
;; Hard-code paths to `ffplay` and `ffmpeg`.
- (let* ((ffmpeg (assoc-ref inputs "ffmpeg"))
- (ffmpeg-bin (string-append ffmpeg "/bin/ffmpeg"))
- (ffplay-bin (string-append ffmpeg "/bin/ffplay")))
+ (let* ((ffplay-bin (search-input-file inputs "/bin/ffplay"))
+ (ffmpeg-bin (search-input-file inputs "/bin/ffmpeg")))
(substitute* '("telega-ffplay.el" "telega-vvnote.el")
(("(shell-command-to-string\|concat) \"(ffmpeg\|ffprobe)"
all func cmd)
- (string-append func " \"" (assoc-ref inputs "ffmpeg")
- "/bin/" cmd))
+ (string-append func " \""
+ (search-input-file
+ inputs (string-append "/bin/" cmd))))
(("\\(executable-find \"ffplay\"\\)")
(string-append "(and (file-executable-p \"" ffplay-bin "\")"
"\"" ffplay-bin "\")"))
@@ -27250,8 +27251,7 @@ service, and connect it with Emacs via inter-process communication.")
(lambda* (#:key inputs outputs #:allow-other-keys)
(substitute* "telega-customize.el"
(("@TELEGA_SERVER_BIN@")
- (string-append (assoc-ref inputs "emacs-telega-server")
- "/bin/telega-server")))
+ (search-input-file inputs "/bin/telega-server")))
(substitute* "telega-util.el"
(("@TELEGA_SHARE@")
(string-append (elpa-directory (assoc-ref outputs "out"))
@@ -27551,9 +27551,8 @@ REPL appropriate to the current major mode.")
(make-file-writable "rime.el")
(emacs-substitute-variables "rime.el"
("rime-share-data-dir"
- (string-append (assoc-ref inputs "rime-data")
- "/share/rime-data")))
- #t))
+ (search-input-directory inputs
+ "share/rime-data")))))
(add-before 'install 'build-emacs-module
(lambda _
(invoke "make" "lib"))))))
@@ -28545,9 +28544,7 @@ emoji.")
(make-file-writable "exiftool.el")
(emacs-substitute-variables "exiftool.el"
("exiftool-executable"
- (string-append (assoc-ref inputs "perl-image-exiftool")
- "/bin/exiftool")))
- #t)))))
+ (search-input-file inputs "/bin/exiftool"))))))))
(inputs
`(("perl-image-exiftool" ,perl-image-exiftool)))
(home-page "https://git.systemreboot.net/exiftool.el/about/")
diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm
index 03f8c25d67..4b243e98b6 100644
--- a/gnu/packages/emacs.scm
+++ b/gnu/packages/emacs.scm
@@ -73,6 +73,7 @@
#:use-module (gnu packages xml)
#:use-module (gnu packages xorg)
#:use-module (guix utils)
+ #:use-module (ice-9 match)
#:use-module (srfi srfi-1))
(define-public emacs
@@ -287,8 +288,9 @@
;; must also provide zlib as an input.
("libpng" ,libpng)
("zlib" ,zlib)
-
- ("librsvg" ,librsvg)
+ ("librsvg" ,@(if (target-x86-64?)
+ (list librsvg-bootstrap)
+ (list librsvg-2.40)))
("libxpm" ,libxpm)
("libxml2" ,libxml2)
("libice" ,libice)
@@ -372,7 +374,7 @@ languages.")
`(("gsettings-desktop-schemas" ,gsettings-desktop-schemas)
("glib-networking" ,glib-networking)))
(inputs
- `(("webkitgtk" ,webkitgtk)
+ `(("webkitgtk" ,webkitgtk-with-libsoup2)
,@(package-inputs emacs-next)))
(home-page "https://github.com/masm11/emacs")
(synopsis "Emacs text editor with @code{pgtk} and @code{xwidgets} support")
@@ -418,7 +420,7 @@ editor (with xwidgets support)")
(delete 'restore-emacs-pdmp)
(delete 'strip-double-wrap)))))
(inputs
- `(("webkitgtk" ,webkitgtk)
+ `(("webkitgtk" ,webkitgtk-with-libsoup2)
("libxcomposite" ,libxcomposite)
,@(package-inputs emacs)))))
diff --git a/gnu/packages/emulators.scm b/gnu/packages/emulators.scm
index d2964be25d..0ed8596a7e 100644
--- a/gnu/packages/emulators.scm
+++ b/gnu/packages/emulators.scm
@@ -16,6 +16,7 @@
;;; Copyright © 2021 Felipe Balbi <balbi@kernel.org>
;;; Copyright © 2021 Felix Gruber <felgru@posteo.net>
;;; Copyright © 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
+;;; Copyright © 2021 Guillaume Le Vaillant <glv@posteo.net>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -186,7 +187,10 @@ SuperCPU.")
(add-after 'unpack 'fix-source
(lambda _
(substitute* (find-files "." ".*\\.[ch]")
- (("\"zlib/zlib.h\"") "<zlib.h>"))))
+ (("\"zlib/zlib.h\"") "<zlib.h>"))
+ (substitute* "Makefile"
+ (("CFLAGS:=-std=gnu99" all)
+ (string-append all " -fcommon")))))
(delete 'configure)
(replace 'install
(lambda* args
@@ -286,11 +290,10 @@ console.")
(add-before 'configure 'generate-fonts&hardcore-libvulkan-path
(lambda* (#:key inputs outputs #:allow-other-keys)
(let ((fontfile
- (string-append (assoc-ref inputs "font-wqy-microhei")
- "/share/fonts/truetype/wqy-microhei.ttc"))
+ (search-input-file inputs
+ "/share/fonts/truetype/wqy-microhei.ttc"))
(libvulkan
- (string-append (assoc-ref inputs "vulkan-loader")
- "/lib/libvulkan.so")))
+ (search-input-file inputs "/lib/libvulkan.so")))
(chdir "docs")
(invoke "bash" "-c" "g++ -O2 $(freetype-config \
--cflags --libs) gc-font-tool.cpp -o gc-font-tool")
@@ -412,7 +415,7 @@ older games.")
(base32 "07jwmmm1bhfxavlhl854cj8l5iy5hqx5hpwkkjbcwqg7yh9jfs2x"))))
(build-system meson-build-system)
(arguments
- `(#:meson ,meson-0.55 #:configure-flags
+ `(#:configure-flags
;; These both try to git clone subprojects.
(list "-Dunit_tests=disabled" ; gtest
"-Duse_mt32emu=false"))) ; mt32emu
@@ -605,8 +608,7 @@ and a game metadata scraper.")
(bin (string-append out "/bin"))
(higan (string-append bin "/higan"))
(higan-original (string-append higan "-original"))
- (bash (string-append (assoc-ref inputs "bash")
- "/bin/bash"))
+ (bash (search-input-file inputs "/bin/bash"))
(coreutils (assoc-ref inputs "coreutils"))
(mkdir (string-append coreutils "/bin/mkdir"))
(cp (string-append coreutils "/bin/cp"))
@@ -840,13 +842,14 @@ from an emulator---from save states to scaling filters.")
'(#:phases
(modify-phases %standard-phases
;; The mupen64plus build system has no configure phase.
- (delete 'configure)
+ (replace 'configure
+ (lambda _
+ (substitute* "projects/unix/Makefile"
+ (("\\$\\(CFLAGS\\)")
+ "$(CFLAGS) -fcommon"))))
;; Makefile is in a subdirectory.
- (add-before
- 'build 'chdir-to-project-directory
- (lambda _
- (chdir "projects/unix")
- #t)))
+ (add-before 'build 'chdir-to-project-directory
+ (lambda _ (chdir "projects/unix"))))
#:make-flags (let ((out (assoc-ref %outputs "out")))
(list "all" (string-append "PREFIX=" out)))
;; There are no tests.
@@ -2027,8 +2030,7 @@ emulator.")
(lambda* (#:key inputs #:allow-other-keys)
(substitute* "cmake/FindCdio.cmake"
(("/usr/include/cdio")
- (string-append (assoc-ref inputs "libcdio") "/include/cdio")))
- #t))
+ (search-input-directory inputs "/include/cdio")))))
(add-after 'install 'wrap-program
(lambda* (#:key inputs outputs #:allow-other-keys)
(wrap-program (string-append (assoc-ref outputs "out")
@@ -2171,17 +2173,6 @@ performance, features, and ease of use.")
(guix build utils))
#:phases
(modify-phases %standard-phases
- (add-after 'unpack 'install-bindings-to-python-output
- (lambda* (#:key outputs #:allow-other-keys)
- ;; python-build-system will build the bindings and install them to
- ;; the "out" output, so change the build-internal names of the
- ;; outputs.
- ;;
- ;; TODO: remove this once #40469 lands, through the core-updates
- ;; holding zone, on master.
- (set-car! (assoc "out" outputs) "lib")
- (set-car! (assoc "python" outputs) "out")
- #t))
(add-before 'build 'build-library
(lambda* (#:key inputs #:allow-other-keys)
(invoke "make"
@@ -2194,7 +2185,7 @@ performance, features, and ease of use.")
"UNICORN_STATIC=no"
(string-append
"PREFIX="
- (assoc-ref outputs "lib")))))
+ (assoc-ref outputs "out")))))
(add-before 'build 'prepare-bindings
(lambda* (#:key outputs #:allow-other-keys)
(chdir "bindings/python")
@@ -2207,7 +2198,7 @@ performance, features, and ease of use.")
(("_path_list = \\[.*")
(string-append
"_path_list = [\""
- (assoc-ref outputs "lib")
+ (assoc-ref outputs "out")
;; eat the rest of the list
"/lib\"] + 0*[")))
#t))
@@ -2228,10 +2219,10 @@ performance, features, and ease of use.")
(let* ((python-samples (find-files "." "sample_.*"))
(c-samples (find-files "../../samples" ".*\\.c"))
(python-docdir
- (string-append (assoc-ref outputs "out")
+ (string-append (assoc-ref outputs "python")
"/share/doc/unicorn/samples"))
(c-docdir
- (string-append (assoc-ref outputs "lib")
+ (string-append (assoc-ref outputs "out")
"/share/doc/unicorn/samples")))
(for-each (cut install-file <> c-docdir) c-samples)
(for-each (cut install-file <> python-docdir) python-samples)
diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm
index dc119f5d63..4237b042e3 100644
--- a/gnu/packages/engineering.scm
+++ b/gnu/packages/engineering.scm
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020 Ricardo Wurmus <rekado@elephly.net>
+;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020, 2021 Ricardo Wurmus <rekado@elephly.net>
;;; Copyright © 2015 Federico Beffa <beffa@fbengineering.ch>
;;; Copyright © 2016, 2018, 2020, 2021 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2016 David Thompson <davet@gnu.org>
@@ -209,7 +209,7 @@ plans and designs.")
(define-public geda-gaf
(package
(name "geda-gaf")
- (version "1.10.0")
+ (version "1.10.2")
(source (origin
(method url-fetch)
(uri (string-append
@@ -218,7 +218,7 @@ plans and designs.")
version "/geda-gaf-" version ".tar.gz"))
(sha256
(base32
- "06ivgarvwbzjz2wigxzzkm8iszldi2p6x3a6jnlczjyrz4csddsy"))))
+ "19688b0671imy2i3jphcnq1120b8ymhr4wz2psiqylr82ljanqp8"))))
(build-system gnu-build-system)
(arguments
'(#:phases
@@ -253,7 +253,8 @@ plans and designs.")
("pcb" ,pcb)
("python" ,python-2))) ; for xorn
(native-inputs
- `(("pkg-config" ,pkg-config)
+ `(("groff" ,groff)
+ ("pkg-config" ,pkg-config)
("desktop-file-utils" ,desktop-file-utils)
("perl" ,perl))) ; for tests
(home-page "http://geda-project.org/")
@@ -316,7 +317,8 @@ utilities.")
(string-append "--with-pcb-datadir=" pcb "/share")
(string-append "--with-pcb-lib-path="
pcb "/share/pcb/pcblib-newlib:"
- pcb "/share/pcb/newlib")))
+ pcb "/share/pcb/newlib")
+ "CFLAGS=-fcommon"))
#:phases
(modify-phases %standard-phases
(add-before 'build 'fix-dynamic-link
@@ -328,12 +330,10 @@ utilities.")
(substitute* '("libleptongui/scheme/schematic/ffi/gtk.scm.in"
"utils/attrib/lepton-attrib.scm")
(("@LIBGTK@")
- (string-append (assoc-ref inputs "gtk")
- "/lib/libgtk-3.so")))
+ (search-input-file inputs "/lib/libgtk-3.so")))
(substitute* '("libleptongui/scheme/schematic/ffi/gobject.scm.in")
(("@LIBGOBJECT@")
- (string-append (assoc-ref inputs "glib")
- "/lib/libgobject-2.0.so")))
+ (search-input-file inputs "/lib/libgobject-2.0.so")))
(substitute* "liblepton/scheme/lepton/ffi.scm.in"
(("@LIBLEPTON@")
(string-append (assoc-ref outputs "out")
@@ -344,8 +344,7 @@ utilities.")
"/lib/libleptonattrib.so")))
(substitute* "liblepton/scheme/lepton/log.scm.in"
(("@LIBGLIB@")
- (string-append (assoc-ref inputs "glib")
- "/lib/libglib-2.0.so")))
+ (search-input-file inputs "/lib/libglib-2.0.so")))
;; For finding libraries when running tests before installation.
(setenv "LIBLEPTONGUI"
@@ -430,7 +429,8 @@ features.")))
;; fix of the mesa package we wrap the pcb executable such that
;; Mesa can find libudev.so.0 through LD_LIBRARY_PATH.
(let* ((out (assoc-ref outputs "out"))
- (path (string-append (assoc-ref inputs "udev") "/lib")))
+ (path (dirname
+ (search-input-file inputs "/lib/libudev.so"))))
(wrap-program (string-append out "/bin/pcb")
`("LD_LIBRARY_PATH" ":" prefix (,path))))
#t))
@@ -519,7 +519,7 @@ featuring various improvements and bug fixes.")))
;; FIXME: with texlive-tiny citation references are rendered as question
;; marks. During the build warnings like these are printed:
;; LaTeX Warning: Citation `nabors91' on page 2 undefined on input line 3.
- `(("texlive" ,(texlive-union (list texlive-fonts-amsfonts)))
+ `(("texlive" ,(texlive-updmap.cfg (list texlive-amsfonts)))
("ghostscript" ,ghostscript)))
(arguments
`(#:make-flags '("CC=gcc" "RM=rm" "SHELL=sh" "all")
@@ -735,6 +735,8 @@ ready for production.")
(base32
"1d2k43k7i4yvbpi4sw1263a8d0q98z2n7aqhmpinpkih8a681vn5"))))
(build-system gnu-build-system)
+ (arguments
+ '(#:configure-flags '("CFLAGS=-fcommon")))
(native-inputs
`(("glib:bin" ,glib "bin") ; for glib-compile-schemas, etc.
("desktop-file-utils" ,desktop-file-utils)
@@ -924,6 +926,16 @@ Emacs).")
(string-append "NGSPICE_DLL_FILE=\""
(assoc-ref inputs "libngspice")
"/lib/libngspice.so\"")))))
+ (add-after 'unpack 'fix-python-detection
+ (lambda _
+ (substitute* "CMakeModules/FindPythonLibs.cmake"
+ (("_PYTHON3_VERSIONS 3\\.8 3\\.7")
+ "_PYTHON3_VERSIONS 3.9 3.8 3.7"))))
+ (add-after 'unpack 'add-missing-include
+ (lambda _
+ (substitute* "common/lib_tree_model.cpp"
+ (("#include <eda_pattern_match.h>" all)
+ (string-append "#include <algorithm>\n" all)))))
(add-after 'install 'install-translations
(lambda* (#:key inputs outputs #:allow-other-keys)
(copy-recursively (assoc-ref inputs "kicad-i18n")
@@ -941,9 +953,9 @@ Emacs).")
,(version-major+minor
(package-version python))
"/site-packages:"
- (getenv "PYTHONPATH"))))
+ (getenv "GUIX_PYTHONPATH"))))
(wrap-program file
- `("PYTHONPATH" ":" prefix (,path))
+ `("GUIX_PYTHONPATH" ":" prefix (,path))
`("PATH" ":" prefix
(,(string-append python "/bin:")))))
#t)))))
@@ -1147,6 +1159,8 @@ worksheet templates.")))
(base32
"13qj7n9826qc9shkkgd1p6vcpj78v4h9d67wbg45prg7rbnzkzds"))))
(build-system gnu-build-system)
+ (arguments
+ '(#:configure-flags '("CFLAGS=-fcommon")))
(native-inputs
`(("pkg-config" ,pkg-config)
("gtk" ,gtk+-2)
@@ -1233,9 +1247,9 @@ WiFi signal strength maps. It visualizes them using a Voronoi diagram.")
,(version-major+minor
(package-version python))
"/site-packages:"
- (getenv "PYTHONPATH"))))
+ (getenv "GUIX_PYTHONPATH"))))
(wrap-program file
- `("PYTHONPATH" ":" prefix (,path))
+ `("GUIX_PYTHONPATH" ":" prefix (,path))
`("PATH" ":" prefix
(,(string-append python "/bin:")))))
#t)))))
@@ -1990,19 +2004,14 @@ parallel computing platforms. It also supports serial execution.")
(lambda* (#:key inputs #:allow-other-keys)
(substitute* "freehdl/freehdl-config"
(("pkg-config")
- (string-append (assoc-ref inputs "pkg-config")
- "/bin/pkg-config"))
+ (search-input-file inputs "/bin/pkg-config"))
(("cat")
- (string-append (assoc-ref inputs "coreutils")
- "/bin/cat")))
- #t))
+ (search-input-file inputs "/bin/cat")))))
(add-after 'patch-pkg-config 'setenv
(lambda* (#:key inputs #:allow-other-keys)
- (setenv "CXX" (string-append (assoc-ref inputs "gcc")
- "/bin/g++"))
- (setenv "SYSTEM_LIBTOOL" (string-append (assoc-ref inputs "libtool")
- "/bin/libtool"))
- #t))
+ (setenv "CXX" (search-input-file inputs "/bin/g++"))
+ (setenv "SYSTEM_LIBTOOL"
+ (search-input-file inputs "/bin/libtool"))))
(add-after 'setenv 'patch-gvhdl
(lambda _
(substitute* "v2cc/gvhdl.in"
@@ -2013,7 +2022,7 @@ parallel computing platforms. It also supports serial execution.")
(lambda* (#:key inputs #:allow-other-keys)
(substitute* "freehdl/freehdl-gennodes.in"
(("guile")
- (string-append (assoc-ref inputs "guile") "/bin/guile"))
+ (search-input-file inputs "/bin/guile"))
(("\\(debug") ";(debug")
(("\\(@ ") "(apply-emit")
(("\\(@@ ") "(apply-mini-format"))
@@ -2092,8 +2101,7 @@ parallel computing platforms. It also supports serial execution.")
(lambda* (#:key inputs outputs #:allow-other-keys)
(mkdir-p "build")
(chdir "build")
- (let ((lrelease (string-append (assoc-ref inputs "qttools")
- "/bin/lrelease"))
+ (let ((lrelease (search-input-file inputs "/bin/lrelease"))
(out (assoc-ref outputs "out")))
(invoke "qmake"
(string-append "QMAKE_LRELEASE=" lrelease)
@@ -2405,14 +2413,16 @@ comments.")))
(name "freecad")
(version "0.19.2")
(source
- (origin
- (method git-fetch)
- (uri (git-reference
- (url "https://github.com/FreeCAD/FreeCAD")
- (commit version)))
- (file-name (git-file-name name version))
- (sha256
- (base32 "0fhjv0x3dix1c7jml91yx63z9xifjlbhjbcdb73lw80smpxrq7mm"))))
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/FreeCAD/FreeCAD")
+ (commit version)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "0fhjv0x3dix1c7jml91yx63z9xifjlbhjbcdb73lw80smpxrq7mm"))
+ (patches (search-patches "freecad-vtk9.patch"
+ "freecad-boost-serialization.patch"))))
(build-system qt-build-system)
(native-inputs
`(("doxygen" ,doxygen)
@@ -2459,34 +2469,37 @@ comments.")))
("qtxmlpatterns" ,qtxmlpatterns)
("sqlite" ,sqlite)
("tbb" ,tbb)
- ("vtk" ,vtk-8)
+ ("vtk" ,vtk)
("xerces-c" ,xerces-c)
("zlib" ,zlib)))
(arguments
`(#:tests? #f ; Project has no tests
#:configure-flags
- (list
- "-DBUILD_QT5=ON"
- "-DBUILD_FLAT_MESH:BOOL=ON"
- (string-append "-DCMAKE_INSTALL_LIBDIR=" (assoc-ref %outputs "out") "/lib")
- (string-append "-DPYSIDE2UICBINARY="
- (assoc-ref %build-inputs "python-pyside-2-tools")
- "/bin/uic")
- (string-append "-DPYSIDE2RCCBINARY="
- (assoc-ref %build-inputs "python-pyside-2-tools")
- "/bin/rcc")
- "-DPYSIDE_LIBRARY=PySide2::pyside2"
- (string-append
- "-DPYSIDE_INCLUDE_DIR="
- (assoc-ref %build-inputs "python-pyside-2") "/include;"
- (assoc-ref %build-inputs "python-pyside-2") "/include/PySide2;"
- (assoc-ref %build-inputs "python-pyside-2") "/include/PySide2/QtCore;"
- (assoc-ref %build-inputs "python-pyside-2") "/include/PySide2/QtWidgets;"
- (assoc-ref %build-inputs "python-pyside-2") "/include/PySide2/QtGui;")
- "-DSHIBOKEN_LIBRARY=Shiboken2::libshiboken"
- (string-append "-DSHIBOKEN_INCLUDE_DIR="
- (assoc-ref %build-inputs "python-shiboken-2")
- "/include/shiboken2"))
+ ,#~(list
+ "-DBUILD_QT5=ON"
+ "-DBUILD_FLAT_MESH:BOOL=ON"
+ "-DBUILD_ENABLE_CXX_STD:STRING=C++17"
+ (string-append "-DCMAKE_INSTALL_LIBDIR=" #$output "/lib")
+ (string-append "-DPYSIDE2UICBINARY="
+ #$(this-package-native-input
+ "python-pyside-2-tools")
+ "/bin/uic")
+ (string-append "-DPYSIDE2RCCBINARY="
+ #$(this-package-native-input
+ "python-pyside-2-tools")
+ "/bin/rcc")
+ "-DPYSIDE_LIBRARY=PySide2::pyside2"
+ (string-append
+ "-DPYSIDE_INCLUDE_DIR="
+ #$(this-package-input "python-pyside-2") "/include;"
+ #$(this-package-input "python-pyside-2") "/include/PySide2;"
+ #$(this-package-input "python-pyside-2") "/include/PySide2/QtCore;"
+ #$(this-package-input "python-pyside-2") "/include/PySide2/QtWidgets;"
+ #$(this-package-input "python-pyside-2") "/include/PySide2/QtGui;")
+ "-DSHIBOKEN_LIBRARY=Shiboken2::libshiboken"
+ (string-append "-DSHIBOKEN_INCLUDE_DIR="
+ #$(this-package-input "python-shiboken-2")
+ "/include/shiboken2"))
#:phases
(modify-phases %standard-phases
(add-before 'configure 'restore-pythonpath
@@ -2497,8 +2510,8 @@ comments.")))
(lambda* (#:key outputs #:allow-other-keys)
(let ((out (assoc-ref outputs "out")))
(wrap-program (string-append out "/bin/FreeCAD")
- (list "PYTHONPATH"
- 'prefix (list (getenv "PYTHONPATH"))))))))))
+ (list "GUIX_PYTHONPATH"
+ 'prefix (list (getenv "GUIX_PYTHONPATH"))))))))))
(home-page "https://www.freecadweb.org/")
(synopsis "Your Own 3D Parametric Modeler")
(description
@@ -2828,9 +2841,7 @@ GUI.")
(delete-file "libpoke/pvm-vm2.c")))))
(build-system gnu-build-system)
;; The GUI, which we elide, requires tcl and tk.
- (native-inputs `(;; Requires bison 3.6+ but we currently only have 3.5.
- ;; Bison 3.6 will be available in the next core update.
- ("bison-3.6" ,bison-3.6)
+ (native-inputs `(("bison" ,bison)
("dejagnu" ,dejagnu)
("flex" ,flex)
("libtool" ,libtool)
diff --git a/gnu/packages/enlightenment.scm b/gnu/packages/enlightenment.scm
index 5e34303f14..259c44dc58 100644
--- a/gnu/packages/enlightenment.scm
+++ b/gnu/packages/enlightenment.scm
@@ -50,6 +50,7 @@
#:use-module (gnu packages gtk)
#:use-module (gnu packages ibus)
#:use-module (gnu packages image)
+ #:use-module (gnu packages libunwind)
#:use-module (gnu packages linux)
#:use-module (gnu packages llvm)
#:use-module (gnu packages lua)
@@ -91,7 +92,11 @@
("ibus" ,ibus)
("mesa" ,mesa)
("libraw" ,libraw)
- ("librsvg" ,librsvg)
+ ;; Only enable the optional SVG support on x86_64, as this is the only
+ ;; architecture where librsvg can be built.
+ ,@(if (target-x86-64?)
+ `(("librsvg" ,librsvg))
+ '())
("libspectre" ,libspectre)
("libtiff" ,libtiff)
("libxau" ,libxau)
@@ -127,6 +132,7 @@
("libjpeg" ,libjpeg-turbo)
("libsndfile" ,libsndfile)
("libpng" ,libpng)
+ ("libunwind" ,libunwind)
("libx11" ,libx11)
("libxkbcommon" ,libxkbcommon)
("luajit" ,luajit)
@@ -136,20 +142,23 @@
("wayland" ,wayland)
("zlib" ,zlib)))
(arguments
- `(#:configure-flags '("-Dembedded-lz4=false"
- "-Dbuild-examples=false"
- "-Decore-imf-loaders-disabler=scim"
- "-Dglib=true"
- "-Dmount-path=/run/setuid-programs/mount"
- "-Dunmount-path=/run/setuid-programs/umount"
- ;(string-append "-Ddictionaries-hyphen-dir="
- ; (assoc-ref %build-inputs "hyphen")
- ; "/share/hyphen")
- "-Dnetwork-backend=connman"
- ;; for wayland
- "-Dwl=true"
- "-Ddrm=true")
- #:tests? #f ; Many tests fail due to timeouts and network requests.
+ `(#:configure-flags
+ `("-Dembedded-lz4=false"
+ "-Dbuild-examples=false"
+ "-Decore-imf-loaders-disabler=scim"
+ "-Dglib=true"
+ "-Dmount-path=/run/setuid-programs/mount"
+ "-Dunmount-path=/run/setuid-programs/umount"
+ "-Dnetwork-backend=connman"
+ ;; Add 'rsvg' to the default list (json and avif) of disabled loaders
+ ;; unless librsvg is available.
+ ,,@(if (target-x86-64?)
+ '()
+ (list "-Devas-loaders-disabler=json,avif,rsvg"))
+ ;; For Wayland.
+ "-Dwl=true"
+ "-Ddrm=true")
+ #:tests? #f ; Many tests fail due to timeouts and network requests.
#:phases
(modify-phases %standard-phases
;; If we don't hardcode the location of libcurl.so and others then we
@@ -360,6 +369,7 @@ Libraries with some extra bells and whistles.")
("bluez" ,bluez)
("dbus" ,dbus)
("freetype" ,freetype)
+ ("libdrm" ,libdrm)
("libxcb" ,libxcb)
("libxext" ,libxext)
("linux-pam" ,linux-pam)
diff --git a/gnu/packages/entr.scm b/gnu/packages/entr.scm
index 5ca40690dd..9a7a3daef6 100644
--- a/gnu/packages/entr.scm
+++ b/gnu/packages/entr.scm
@@ -59,11 +59,11 @@
(lambda* (#:key inputs #:allow-other-keys)
(substitute* "entr.c"
(("/bin/sh" command)
- (string-append (assoc-ref inputs "bash") command))
+ (search-input-file inputs command))
(("/bin/cat" command)
- (string-append (assoc-ref inputs "coreutils") command))
+ (search-input-file inputs command))
(("/usr(/bin/clear)" _ command)
- (string-append (assoc-ref inputs "ncurses") command)))
+ (search-input-file inputs command)))
#t)))))
(inputs
`(("bash" ,bash)
diff --git a/gnu/packages/file-systems.scm b/gnu/packages/file-systems.scm
index 7cba71f6a4..30beb36eaf 100644
--- a/gnu/packages/file-systems.scm
+++ b/gnu/packages/file-systems.scm
@@ -879,7 +879,8 @@ All of this is accomplished without a centralized metadata server.")
(lambda* (#:key inputs #:allow-other-keys)
(substitute* (list "eatmydata.in" "eatmydata.sh.in")
(("basename|readlink|uname" command)
- (string-append (assoc-ref inputs "coreutils") "/bin/" command)))))
+ (search-input-file inputs
+ (string-append "bin/" command))))))
(add-before 'patch-file-names 'tighten-symlink-mode
;; When the ‘eatmydata’ helper detects that it's a symlink, it will
;; transparently invoke the command of the same name. However, it's
@@ -1057,11 +1058,9 @@ APFS.")
(assoc-ref inputs "bash")
match))
(("/bin/(rm|true)" match)
- (string-append (assoc-ref inputs "coreutils")
- match))
+ (search-input-file inputs match))
(("/usr(/bin/time)" _ match)
- (string-append (assoc-ref inputs "time")
- match))))
+ (search-input-file inputs match))))
(append (find-files "common" ".*")
(find-files "tests" ".*")
(find-files "tools" ".*")
@@ -1108,8 +1107,7 @@ APFS.")
(with-output-to-file helper
(lambda _
(format #t "#!~a --no-auto-compile\n!#\n"
- (string-append (assoc-ref inputs "guile")
- "/bin/guile"))
+ (search-input-file inputs "/bin/guile"))
(write
`(begin
(define (try proc dir)
@@ -1436,8 +1434,9 @@ On Guix System, you will need to invoke the included shell scripts as
(substitute* '("libfuse/lib/mount_util.c"
"libfuse/util/mount_util.c")
(("/bin/(u?)mount" _ maybe-u)
- (string-append (assoc-ref inputs "util-linux")
- "/bin/" maybe-u "mount")))
+ (search-input-file inputs
+ (string-append "bin/" maybe-u
+ "mount"))))
(substitute* '("libfuse/util/mount.mergerfs.c")
(("/bin/sh" command)
(string-append (assoc-ref inputs "bash-minimal") command))))))))
@@ -1490,10 +1489,9 @@ is similar to mhddfs, unionfs, and aufs.")
(string-append "'" (assoc-ref inputs "coreutils") "/bin/rm'")))
(substitute* "src/mergerfs.mktrash"
(("xattr")
- (string-append (assoc-ref inputs "python-xattr") "/bin/xattr"))
+ (search-input-file inputs "/bin/xattr"))
(("mkdir")
- (string-append (assoc-ref inputs "coreutils") "/bin/mkdir")))
- #t)))))
+ (search-input-file inputs "/bin/mkdir"))))))))
(synopsis "Tools to help manage data in a mergerfs pool")
(description "mergerfs-tools is a suite of programs that can audit
permissions and ownership of files and directories on a mergerfs volume,
diff --git a/gnu/packages/file.scm b/gnu/packages/file.scm
index f811ba77c7..1c330e5434 100644
--- a/gnu/packages/file.scm
+++ b/gnu/packages/file.scm
@@ -3,6 +3,8 @@
;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
;;; Copyright © 2016, 2017, 2018 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
+;;; Copyright © 2018 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2020 Michael Rohleder <mike@rohleder.de>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -29,14 +31,14 @@
(define-public file
(package
(name "file")
- (version "5.38")
+ (version "5.39")
(source (origin
(method url-fetch)
(uri (string-append "ftp://ftp.astron.com/pub/file/file-"
version ".tar.gz"))
(sha256
(base32
- "0d7s376b4xqymnrsjxi3nsv3f5v89pzfspzml2pcajdk5by2yg2r"))))
+ "1lgs2w2sgamzf27kz5h7pajz7v62554q21fbs11n4mfrfrm2hpgh"))))
(build-system gnu-build-system)
;; When cross-compiling, this package depends upon a native install of
diff --git a/gnu/packages/finance.scm b/gnu/packages/finance.scm
index 2f7f3741e0..6686ab482c 100644
--- a/gnu/packages/finance.scm
+++ b/gnu/packages/finance.scm
@@ -25,6 +25,7 @@
;;; Copyright © 2021 ZmnSCPxj jxPCSnmZ <ZmnSCPxj@protonmail.com>
;;; Copyright © 2021 François J <francois-oss@avalenn.eu>
;;; Copyright © 2021 Foo Chuan Wei <chuanwei.foo@hotmail.com>
+;;; Copyright © 2021 John Kehayias <john.kehayias@protonmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -56,6 +57,7 @@
#:use-module (guix build-system go)
#:use-module (guix build-system qt)
#:use-module (guix deprecation)
+ #:use-module (guix gexp)
#:use-module (guix utils)
#:use-module (gnu packages)
#:use-module (gnu packages aidc)
@@ -307,7 +309,14 @@ and dynamically with report tools based on filtering and graphical charts.")
(commit (string-append "v" version))))
(file-name (git-file-name name version))
(sha256
- (base32 "0x6jxwss3wwzbzlwmnwb8yzjk8f9wfawif4f1b74z2qg6hc4r7f6"))))
+ (base32 "0x6jxwss3wwzbzlwmnwb8yzjk8f9wfawif4f1b74z2qg6hc4r7f6"))
+ (snippet '(begin
+ ;; Remove test that fails due to difference in
+ ;; reported error message (missing leading "./" in the
+ ;; file name); started some time after Guix commit
+ ;; 727f05e1e285aa52f5a19ec923fdc2259859b4b1
+ (delete-file "test/regress/BF3C1F82-2.test")
+ #true))))
(build-system cmake-build-system)
(arguments
`(#:modules (,@%cmake-build-system-modules
@@ -346,8 +355,8 @@ and dynamically with report tools based on filtering and graphical charts.")
;; One test fails if it can't set the timezone.
(lambda* (#:key inputs #:allow-other-keys)
(setenv "TZDIR"
- (string-append (assoc-ref inputs "tzdata")
- "/share/zoneinfo"))
+ (search-input-directory inputs
+ "share/zoneinfo"))
;; Skip failing test BaselineTest_cmd-org.
;; This is a known upstream issue. See
;; https://github.com/ledger/ledger/issues/550
@@ -551,6 +560,14 @@ do so.")
(("sys\\.prefix")
(format #f "\"~a\"" out)))
#t)))
+ (add-after 'unpack 'relax-dnspython-version-requirement
+ ;; The version requirement for dnspython>=2.0,<2.1 makes the
+ ;; sanity-check phase fail, but the application seems to be working
+ ;; fine with dnspython 2.1 (the version we have currently).
+ (lambda _
+ (substitute* "contrib/requirements/requirements.txt"
+ (("dnspython>=.*")
+ "dnspython"))))
(add-after 'unpack 'use-libsecp256k1-input
(lambda* (#:key inputs #:allow-other-keys)
(substitute* "electrum/ecc_fast.py"
@@ -597,6 +614,7 @@ other machines/servers. Electrum does not download the Bitcoin blockchain.")
("python-pyaes" ,python-pyaes)
("python-pyqt" ,python-pyqt)
("python-pysocks" ,python-pysocks)
+ ("python-qdarkstyle" ,python-qdarkstyle)
("python-qrcode" ,python-qrcode)
("python-requests" ,python-requests)
("python-stem" ,python-stem)
@@ -623,6 +641,11 @@ other machines/servers. Electrum does not download the Bitcoin blockchain.")
(string-append "library_paths = ('"
(assoc-ref inputs "libsecp256k1")
"/lib/libsecp256k1.so.0'")))))
+ (add-after 'unpack 'relax-requirements
+ (lambda _
+ (substitute* "contrib/requirements/requirements.txt"
+ (("qdarkstyle==2\\.6\\.8")
+ "qdarkstyle"))))
(add-after 'install 'wrap-qt
(lambda* (#:key outputs inputs #:allow-other-keys)
(let ((out (assoc-ref outputs "out")))
@@ -663,6 +686,11 @@ other machines/servers. Electroncash does not download the Bitcoin Cash blockch
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 "1spsf7m3x4psp9s7mivr6x4886jnbq4i8ll2dl8bv5bsdhcd3pjm"))))
@@ -792,10 +820,10 @@ the Monero command line client and daemon.")
(arguments
`(#:tests? #f ; No tests
#:configure-flags
- (list "-DARCH=default"
- "-DENABLE_PASS_STRENGTH_METER=ON"
- (string-append "-DReadline_ROOT_DIR="
- (assoc-ref %build-inputs "readline")))
+ ,#~(list "-DARCH=default"
+ "-DENABLE_PASS_STRENGTH_METER=ON"
+ (string-append "-DReadline_ROOT_DIR="
+ #$(this-package-input "readline")))
#:phases
(modify-phases %standard-phases
(add-after 'unpack 'extract-monero-sources
@@ -803,9 +831,8 @@ the Monero command line client and daemon.")
;; to build the GUI.
(lambda* (#:key inputs #:allow-other-keys)
(mkdir-p "monero")
- (invoke "tar" "-xv" "--strip-components=1"
- "-C" "monero"
- "-f" (assoc-ref inputs "monero-source"))))
+ (copy-recursively (assoc-ref inputs "monero-source")
+ "monero")))
(add-after 'extract-monero-sources 'fix-build
(lambda _
(substitute* "src/version.js.in"
@@ -825,8 +852,7 @@ the Monero command line client and daemon.")
;; The monerod program must be available so that monero-wallet-gui
;; can start a Monero daemon if necessary.
(lambda* (#:key inputs outputs #:allow-other-keys)
- (symlink (string-append (assoc-ref inputs "monero")
- "/bin/monerod")
+ (symlink (search-input-file inputs "/bin/monerod")
(string-append (assoc-ref outputs "out")
"/bin/monerod")))))))
(home-page "https://web.getmonero.org/")
diff --git a/gnu/packages/flashing-tools.scm b/gnu/packages/flashing-tools.scm
index c5f1abccbf..bd65d01aa1 100644
--- a/gnu/packages/flashing-tools.scm
+++ b/gnu/packages/flashing-tools.scm
@@ -2,7 +2,7 @@
;;; Copyright © 2014 Mark H Weaver <mhw@netris.org>
;;; Copyright © 2014 Manolis Fragkiskos Ragkousis <manolis837@gmail.com>
;;; Copyright © 2016 Hartmut Goebel <h.goebel@crazy-compilers.com>
-;;; Copyright © 2016, 2018 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2016, 2018, 2021 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2016, 2019 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2017 Jonathan Brielmaier <jonathan.brielmaier@web.de>
;;; Copyright © 2017 Julien Lepiller <julien@lepiller.eu>
@@ -86,9 +86,15 @@
(substitute* "dmi.c"
(("\"dmidecode\"")
(format #f "~S"
- (string-append (assoc-ref inputs "dmidecode")
- "/sbin/dmidecode"))))
- #t)))))
+ (search-input-file inputs "/sbin/dmidecode"))))))
+ (add-before 'build 'patch-type-error
+ (lambda _
+ ;; See https://github.com/flashrom/flashrom/pull/133
+ (substitute* "libflashrom.c"
+ (("supported_boards\\[i\\].working = binfo\\[i\\].working")
+ "supported_boards[i].working = (enum flashrom_test_state)binfo[i].working")
+ (("supported_chipsets\\[i\\].status = chipset\\[i\\].status")
+ "supported_chipsets[i].status = (enum flashrom_test_state)chipset[i].status")))))))
(home-page "https://flashrom.org/")
(synopsis "Identify, read, write, erase, and verify ROM/flash chips")
(description
diff --git a/gnu/packages/fontutils.scm b/gnu/packages/fontutils.scm
index 2b98c6427b..2575bfb386 100644
--- a/gnu/packages/fontutils.scm
+++ b/gnu/packages/fontutils.scm
@@ -8,10 +8,13 @@
;;; Copyright © 2017 Nikita <nikita@n0.is>
;;; Copyright © 2017, 2018, 2020, 2021 Tobias Geerinckx-Rice <me@tobias.gr>
;;; Copyright © 2018 Ricardo Wurmus <rekado@elephly.net>
-;;; Copyright © 2018, 2019, 2020 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2018, 2019, 2020, 2021 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2019, 2020 Marius Bakke <mbakke@fastmail.com>
;;; Copyright © 2020 Roel Janssen <roel@gnu.org>
+;;; Copyright © 2020 Nicolas Goaziou <mail@nicolasgoaziou.fr>
+;;; Copyright © 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;; Copyright © 2020, 2021 Nicolas Goaziou <mail@nicolasgoaziou.fr>
+;;; Copyright © 2021 Sarah Morgensen <iskarian@mgsn.dev>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -32,10 +35,10 @@
#:use-module (gnu packages)
#:use-module (gnu packages autotools)
#:use-module (gnu packages bison)
- #:use-module (gnu packages build-tools) ;for meson-0.55
#:use-module (gnu packages check)
#:use-module (gnu packages compression)
#:use-module (gnu packages datastructures)
+ #:use-module (gnu packages docbook)
#:use-module (gnu packages flex)
#:use-module (gnu packages fonts)
#:use-module (gnu packages freedesktop)
@@ -59,6 +62,7 @@
#:use-module (gnu packages xdisorg)
#:use-module (gnu packages xml)
#:use-module (gnu packages xorg)
+ #:use-module (gnu packages tex)
#:use-module ((guix licenses) #:prefix license:)
#:use-module (guix packages)
#:use-module (guix download)
@@ -317,55 +321,61 @@ Font Format (WOFF).")
(license license:expat)))
(define-public fontconfig
- (package
- (name "fontconfig")
- (version "2.13.1")
- (source (origin
- (method url-fetch)
- (uri (string-append
- "https://www.freedesktop.org/software/fontconfig/release/fontconfig-"
- version ".tar.bz2"))
- (patches (search-patches "fontconfig-hurd-path-max.patch"))
- (sha256 (base32
- "0hb700a68kk0ip51wdlnjjc682kvlrmb6q920mzajykdk0mdsmgn"))))
- (build-system gnu-build-system)
- ;; In Requires or Requires.private of fontconfig.pc.
- (propagated-inputs `(("expat" ,expat)
- ("freetype" ,freetype)
- ("libuuid" ,util-linux "lib")))
- (inputs
- ;; We use to use 'gs-fonts' but they are not recognized by newer versions
- ;; of Pango, causing many applications to fail to find fonts otherwise.
- `(("font-dejavu" ,font-dejavu)))
- (native-inputs
- `(("gperf" ,gperf)
- ("pkg-config" ,pkg-config)))
- (arguments
- `(#:configure-flags
- (list "--with-cache-dir=/var/cache/fontconfig"
- ;; register the default fonts
- (string-append "--with-default-fonts="
- (assoc-ref %build-inputs "font-dejavu")
- "/share/fonts")
-
- ;; Register fonts from user and system profiles.
- (string-append "--with-add-fonts="
- "~/.guix-profile/share/fonts,"
- "/run/current-system/profile/share/fonts")
-
- ;; python is not actually needed
- "PYTHON=false")
- #:phases
- (modify-phases %standard-phases
- (replace 'install
- (lambda _
- ;; Don't try to create /var/cache/fontconfig.
- (invoke "make" "install"
- "fc_cachedir=$(TMPDIR)"
- "RUN_FC_CACHE_TEST=false"))))))
- (synopsis "Library for configuring and customizing font access")
- (description
- "Fontconfig can discover new fonts when installed automatically;
+ (hidden-package
+ (package
+ (name "fontconfig-minimal")
+ (version "2.13.94")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append
+ "https://www.freedesktop.org/software/"
+ "fontconfig/release/fontconfig-" version ".tar.xz"))
+ (sha256 (base32
+ "0g004r0bkkqz00mpm3svnnxn7d83158q0yb9ggxryizxfg5m5w55"))
+ (patches (search-patches "fontconfig-cache-ignore-mtime.patch"))))
+ (build-system gnu-build-system)
+ ;; In Requires or Requires.private of fontconfig.pc.
+ (propagated-inputs `(("expat" ,expat)
+ ("freetype" ,freetype)
+ ("libuuid" ,util-linux "lib")))
+ (inputs
+ ;; We use to use 'font-ghostscript' but they are not recognized by newer
+ ;; versions of Pango, causing many applications to fail to find fonts
+ ;; otherwise.
+ `(("font-dejavu" ,font-dejavu)))
+ (native-inputs
+ `(("gperf" ,gperf)
+ ("pkg-config" ,pkg-config)
+ ("python" ,python-minimal))) ;to avoid a cycle through tk
+ (arguments
+ `(#:configure-flags
+ (list "--disable-docs"
+ "--with-cache-dir=/var/cache/fontconfig"
+ ;; register the default fonts
+ (string-append "--with-default-fonts="
+ (assoc-ref %build-inputs "font-dejavu")
+ "/share/fonts"))
+ #:phases
+ (modify-phases %standard-phases
+ (add-before 'check 'skip-problematic-tests
+ (lambda _
+ ;; SOURCE_DATE_EPOCH doesn't make sense when ignoring mtime
+ (unsetenv "SOURCE_DATE_EPOCH")
+
+ (substitute* "test/run-test.sh"
+ ;; The crbug1004254 test attempts to fetch fonts from the
+ ;; network.
+ (("\\[ -x \"\\$BUILDTESTDIR\"/test-crbug1004254 \\]")
+ "false"))))
+ (replace 'install
+ (lambda _
+ ;; Don't try to create /var/cache/fontconfig.
+ (invoke "make" "install"
+ "fc_cachedir=$(TMPDIR)"
+ "RUN_FC_CACHE_TEST=false"))))))
+ (synopsis "Library for configuring and customizing font access")
+ (description
+ "Fontconfig can discover new fonts when installed automatically;
perform font name substitution, so that appropriate alternative fonts can
be selected if fonts are missing;
identify the set of fonts required to completely cover a set of languages;
@@ -373,10 +383,56 @@ have GUI configuration tools built as it uses an XML-based configuration file;
efficiently and quickly find needed fonts among the set of installed fonts;
be used in concert with the X Render Extension and FreeType to implement
high quality, anti-aliased and subpixel rendered text on a display.")
- ; The exact license is more X11-style than BSD-style.
- (license (license:non-copyleft "file://COPYING"
- "See COPYING in the distribution."))
- (home-page "https://www.freedesktop.org/wiki/Software/fontconfig")))
+ ; The exact license is more X11-style than BSD-style.
+ (license (license:non-copyleft "file://COPYING"
+ "See COPYING in the distribution."))
+ (native-search-paths
+ ;; Since version 2.13.94, fontconfig knows to find fonts from
+ ;; XDG_DATA_DIRS.
+ (list (search-path-specification
+ (variable "XDG_DATA_DIRS")
+ (files '("share")))))
+ (home-page "https://www.freedesktop.org/wiki/Software/fontconfig"))))
+
+;;; The documentation of fontconfig is built in a separate package, as it
+;;; causes a dramatic increase in the size of the closure of fontconfig. This
+;;; is intentionally named 'fontconfig', as it's intended as the user-facing
+;;; fontconfig package.
+(define-public fontconfig-with-documentation
+ (package
+ (inherit fontconfig)
+ (name "fontconfig")
+ (outputs (cons "doc" (package-outputs fontconfig)))
+ (arguments
+ (substitute-keyword-arguments (package-arguments fontconfig)
+ ((#:configure-flags configure-flags)
+ `(delete "--disable-docs" ,configure-flags))
+ ((#:phases phases '%standard-phases)
+ `(modify-phases ,phases
+ (add-after 'unpack 'no-pdf-doc
+ (lambda _
+ ;; Don't build documentation as PDF.
+ (substitute* "doc/Makefile.in"
+ (("^PDF_FILES = .*")
+ "PDF_FILES =\n"))))
+ (add-after 'install 'move-man-sections
+ (lambda* (#:key outputs #:allow-other-keys)
+ ;; Move share/man/man{3,5} to the "doc" output. Leave "man1" in
+ ;; "out" for convenience.
+ (let ((out (assoc-ref outputs "out"))
+ (doc (assoc-ref outputs "doc")))
+ (for-each (lambda (section)
+ (let ((source (string-append out "/share/man/"
+ section))
+ (target (string-append doc "/share/man/"
+ section)))
+ (copy-recursively source target)
+ (delete-file-recursively source)))
+ '("man3" "man5")))))))))
+ (native-inputs
+ (append (package-native-inputs fontconfig)
+ `(("docbook-utils" ,docbook-utils))))
+ (properties (alist-delete 'hidden? (package-properties fontconfig)))))
(define-public t1lib
(package
@@ -421,14 +477,14 @@ X11-system or any other graphical user interface.")
(define-public teckit
(package
(name "teckit")
- (version "2.5.9") ;signed by key 0xC9183BEA0288CDEE
+ (version "2.5.10") ; signed by key 0xC9183BEA0288CDEE
(source
(origin
(method url-fetch)
(uri (string-append "https://github.com/silnrsi/teckit/releases/"
"download/v" version "/teckit-" version ".tar.gz"))
(sha256
- (base32 "0gbxyip4wdibirdg2pvzayzyy927vxyd6dfyfiflx8zg88qzn8v8"))))
+ (base32 "12qnf8nhxyr4d5pc01s3vc6h726506957an4vvmmfz633cqi5796"))))
(build-system gnu-build-system)
(arguments
'(#:configure-flags '("--disable-static")))
@@ -472,17 +528,6 @@ applications should be.")
(base32
"01jzhwnj1c3d68dmw15jdxly0hwkmd8ja4kw755rbkykn1ly2qyx"))))
(build-system cmake-build-system)
- (arguments
- `(#:phases (modify-phases %standard-phases
- (add-after 'unpack 'adjust-test-PYTHONPATH
- (lambda _
- ;; Tell the build system not to override PYTHONPATH
- ;; while running the Python tests.
- (substitute* "Graphite.cmake"
- (("ENVIRONMENT PYTHONPATH=")
- (string-append "ENVIRONMENT PYTHONPATH="
- (getenv "PYTHONPATH") ":")))
- #t)))))
(native-inputs
`(("python" ,python)
("python-fonttools" ,python-fonttools)))
@@ -601,14 +646,14 @@ definitions.")
(define-public fontforge
(package
(name "fontforge")
- (version "20200314")
+ (version "20201107")
(source (origin
(method url-fetch)
(uri (string-append
"https://github.com/fontforge/fontforge/releases/download/"
version "/fontforge-" version ".tar.xz"))
(sha256
- (base32 "0qf88wd6riycq56d24brybyc93ns74s0nyyavm43zp2kfcihn6fd"))))
+ (base32 "0y3c8x1i6yf6ak9m5dhr1nldgfmg7zhnwdfd57ffs698c27vmg38"))))
(build-system cmake-build-system)
(native-inputs
`(("pkg-config" ,pkg-config)))
@@ -651,7 +696,8 @@ definitions.")
(add-after 'install 'set-library-path
(lambda* (#:key inputs outputs #:allow-other-keys)
(let ((out (assoc-ref outputs "out"))
- (potrace (string-append (assoc-ref inputs "potrace") "/bin")))
+ (potrace (dirname
+ (search-input-file inputs "bin/potrace"))))
(wrap-program (string-append out "/bin/fontforge")
;; Fontforge dynamically opens libraries.
`("LD_LIBRARY_PATH" ":" prefix
@@ -810,8 +856,6 @@ maintain the Noto Fonts project.")
(base32
"0jh05wzrif7z1xf9jzs8bgf49lpj5zs55agj414bmmwdddk7my7j"))))
(build-system meson-build-system)
- (arguments
- `(#:meson ,meson-0.55))
(native-inputs
`(("check" ,check)
("gcc" ,gcc-10) ;TODO: Remove when the default compiler is > GCC 7.
@@ -868,7 +912,7 @@ generated list of fallback fonts are checked.")
("glib" ,glib "bin")
("gobject-introspection" ,gobject-introspection)
("pkg-config" ,pkg-config)
- ("vala" ,vala-0.50)
+ ("vala" ,vala)
("yelp-tools" ,yelp-tools)))
(inputs
`(("fonconfig" ,fontconfig)
diff --git a/gnu/packages/freedesktop.scm b/gnu/packages/freedesktop.scm
index bf4bce553b..eba06600b2 100644
--- a/gnu/packages/freedesktop.scm
+++ b/gnu/packages/freedesktop.scm
@@ -2,7 +2,7 @@
;;; Copyright © 2015 Andreas Enge <andreas@enge.fr>
;;; Copyright © 2015 Sou Bunnbu <iyzsong@gmail.com>
;;; Copyright © 2015, 2017 Andy Wingo <wingo@pobox.com>
-;;; Copyright © 2015, 2016, 2017, 2019 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2015-2017, 2019, 2021 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2015, 2017, 2018, 2019, 2021 Ricardo Wurmus <rekado@elephly.net>
;;; Copyright © 2015 David Hashe <david.hashe@dhashe.com>
;;; Copyright © 2016, 2017, 2019, 2021 Efraim Flashner <efraim@flashner.co.il>
@@ -23,8 +23,11 @@
;;; Copyright © 2020 Anders Thuné <asse.97@gmail.com>
;;; Copyright © 2020 Raghav Gururajan <raghavgururajan@disroot.org>
;;; Copyright © 2021 pineapples <guixuser6392@protonmail.com>
+;;; Copyright © 2021 Sarah Morgensen <iskarian@mgsn.dev>
;;; Copyright © 2021 Robby Zambito <contact@robbyzambito.me>
+;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be>
;;; Copyright © 2021 John Kehayias <john.kehayias@protonmail.com>
+;;; Copyright © 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -46,6 +49,7 @@
#:use-module (guix utils)
#:use-module (guix packages)
#:use-module (guix download)
+ #:use-module (guix gexp)
#:use-module (guix git-download)
#:use-module (guix build-system cmake)
#:use-module (guix build-system gnu)
@@ -60,6 +64,7 @@
#:use-module (gnu packages base)
#:use-module (gnu packages bash)
#:use-module (gnu packages boost)
+ #:use-module (gnu packages build-tools)
#:use-module (gnu packages check)
#:use-module (gnu packages cmake)
#:use-module (gnu packages compression)
@@ -99,6 +104,7 @@
#:use-module (gnu packages python-crypto)
#:use-module (gnu packages python-xyz)
#:use-module (gnu packages rdesktop)
+ #:use-module (gnu packages rsync)
#:use-module (gnu packages samba)
#:use-module (gnu packages serialization)
#:use-module (gnu packages sqlite)
@@ -185,7 +191,7 @@
("python" ,python-wrapper)
("xsltproc" ,libxslt)))
(inputs
- `(("libsoup" ,libsoup)
+ `(("libsoup-minimal" ,libsoup-minimal-2)
("libstemmer" ,libstemmer)
("libxml2" ,libxml2)
("libyaml" ,libyaml)
@@ -221,12 +227,13 @@ application-centers for distributions.")
(sha256
(base32 "1sd8syldyq6bphfdm129s3gq554vfv7vh1vcwzk48gjryf101awk"))
(patches
- (search-patches "farstream-make.patch"))))
+ (search-patches
+ "farstream-gupnp.patch" ;for test 'transmitter/rawudp'
+ "farstream-make.patch"))))
(build-system glib-or-gtk-build-system)
(outputs '("out" "doc"))
(arguments
- `(#:tests? #f ; https://gitlab.freedesktop.org/farstream/farstream/-/issues/18
- #:configure-flags
+ `(#:configure-flags
(list
"--enable-gtk-doc"
"--enable-glib-asserts"
@@ -242,6 +249,15 @@ application-centers for distributions.")
(assoc-ref %build-inputs "common")
"common")
#t))
+ (add-after 'unpack 'disable-timeout-tests
+ (lambda _
+ (substitute* "tests/check/Makefile.am"
+ ;; This test timeouts despite changing
+ ;; the value of 'CK_DEFAULT_TIMEOUT' to 600,
+ ;; as per %common-gstreamer-phases.
+ ;; Reported to upstream:
+ ;; https://gitlab.freedesktop.org/farstream/farstream/-/issues/20
+ (("[ \t]*transmitter/nice.*$") ""))))
(add-after 'unpack 'patch-docbook-xml
(lambda* (#:key inputs #:allow-other-keys)
(with-directory-excursion "docs"
@@ -347,7 +363,8 @@ tests.")
(base32 "0vnf0pk516fwwh41v96c29l2i7h1pnwhivlkbf53kkx1q35g7lb3"))))
(build-system meson-build-system)
(arguments
- `(#:glib-or-gtk? #t
+ `(#:meson ,meson-0.59
+ #:glib-or-gtk? #t
#:phases
(modify-phases %standard-phases
;; AppInfo not available inside build environment.
@@ -478,14 +495,14 @@ freedesktop.org project.")
;; Updating this will rebuild over 700 packages through libinput-minimal.
(package
(name "libinput")
- (version "1.16.4")
+ (version "1.19.2")
(source (origin
(method url-fetch)
(uri (string-append "https://freedesktop.org/software/libinput/"
"libinput-" version ".tar.xz"))
(sha256
(base32
- "0acywdjppj5i591l879bnqa9cs4vgdwnhilwk550x5x8sl33m4k5"))))
+ "10xqk05mkvsyxfxpn3vwkwb7j22d38wlbg1l1k37f6pfyc59zhqg"))))
(build-system meson-build-system)
(arguments
`(#:configure-flags '("-Ddocumentation=false")
@@ -566,7 +583,7 @@ the freedesktop.org XDG Base Directory specification.")
(define-public elogind
(package
(name "elogind")
- (version "243.7")
+ (version "246.10")
(source (origin
(method git-fetch)
(uri (git-reference
@@ -575,47 +592,57 @@ the freedesktop.org XDG Base Directory specification.")
(file-name (git-file-name name version))
(sha256
(base32
- "1ccj3cbs9nsfg497wg195in1a7b9csm1jdm7z6q7vvx1ynpjxlxz"))))
+ "16045bhpwjq2nqgswln67ipg1zrz2djxlgkfngqng3jqpwagmnzq"))
+ (patches (search-patches
+ "elogind-revert-polkit-detection.patch"))))
(build-system meson-build-system)
(arguments
`(#:configure-flags
- (let* ((out (assoc-ref %outputs "out"))
- (sysconf (string-append out "/etc"))
- (libexec (string-append out "/libexec/elogind"))
- (dbuspolicy (string-append out "/etc/dbus-1/system.d"))
- (shadow (assoc-ref %build-inputs "shadow"))
- (shepherd (assoc-ref %build-inputs "shepherd"))
- (halt-path (string-append shepherd "/sbin/halt"))
- (kexec-path "") ;not available in Guix yet
- (nologin-path (string-append shadow "/sbin/nologin"))
- (poweroff-path (string-append shepherd "/sbin/shutdown"))
- (reboot-path (string-append shepherd "/sbin/reboot")))
- (list
- (string-append "-Drootprefix=" out)
- (string-append "-Dsysconfdir=" sysconf)
- (string-append "-Drootlibexecdir=" libexec)
- (string-append "-Ddbuspolicydir=" dbuspolicy)
- (string-append "-Dc_link_args=-Wl,-rpath=" libexec)
- (string-append "-Dcpp_link_args=-Wl,-rpath=" libexec)
- (string-append "-Dhalt-path=" halt-path)
- (string-append "-Dkexec-path=" kexec-path)
- (string-append "-Dpoweroff-path=" poweroff-path)
- (string-append "-Dreboot-path=" reboot-path)
- (string-append "-Dnologin-path=" nologin-path)
- "-Dcgroup-controller=elogind"
- "-Dman=true"
- ;; Disable some tests.
- "-Dslow-tests=false"))
+ ,#~(let* ((out #$output)
+ (sysconf (string-append out "/etc"))
+ (libexec (string-append out "/libexec/elogind"))
+ (dbuspolicy (string-append out "/etc/dbus-1/system.d"))
+ (kexec-tools #$(this-package-input "kexec-tools"))
+ (shadow #$(this-package-input "shadow"))
+ (shepherd #$(this-package-input "shepherd"))
+ (halt-path (string-append shepherd "/sbin/halt"))
+ (kexec-path (string-append kexec-tools "/sbin/kexec"))
+ (nologin-path (string-append shadow "/sbin/nologin"))
+ (poweroff-path (string-append shepherd "/sbin/shutdown"))
+ (reboot-path (string-append shepherd "/sbin/reboot")))
+ (list
+ (string-append "-Drootprefix=" out)
+ (string-append "-Dsysconfdir=" sysconf)
+ (string-append "-Drootlibexecdir=" libexec)
+ (string-append "-Ddbuspolicydir=" dbuspolicy)
+ (string-append "-Dc_link_args=-Wl,-rpath=" libexec)
+ (string-append "-Dcpp_link_args=-Wl,-rpath=" libexec)
+ (string-append "-Dhalt-path=" halt-path)
+ (string-append "-Dkexec-path=" kexec-path)
+ (string-append "-Dpoweroff-path=" poweroff-path)
+ (string-append "-Dreboot-path=" reboot-path)
+ (string-append "-Dnologin-path=" nologin-path)
+ "-Dcgroup-controller=elogind"
+ "-Dman=true"
+ ;; Disable some tests.
+ "-Dslow-tests=false"))
#:phases
(modify-phases %standard-phases
(add-after 'unpack 'fix-pkttyagent-path
(lambda _
(substitute* "meson.build"
(("join_paths\\(bindir, 'pkttyagent'\\)")
- "'\"/run/current-system/profile/bin/pkttyagent\"'"))
- #t))
+ "'\"/run/current-system/profile/bin/pkttyagent\"'"))))
(add-after 'unpack 'adjust-tests
(lambda _
+ ;; Skip the following test, which depends on users such as 'root'
+ ;; existing in the build environment.
+ (invoke "sed" "/src\\/test\\/test-user-util.c/,+2s/^/#/g"
+ "-i" "src/test/meson.build")
+ ;; FIXME: This one times out for unknown reasons.
+ (invoke "sed"
+ "/src\\/libelogind\\/sd-event\\/test-event.c/,+2s/^/#/g"
+ "-i" "src/test/meson.build")
;; This test tries to copy some bytes from /usr/lib/os-release,
;; which does not exist in the build container. Choose something
;; more likely to be available.
@@ -651,14 +678,12 @@ the freedesktop.org XDG Base Directory specification.")
;; logind system so that it can flicker the monitor, etc.
;; Just skip it until a more narrow selection can be made.
(substitute* "src/libelogind/sd-login/test-login.c"
- (("r = sd_pid_get_slice.*")
- "return 77;"))
- #t))
+ (("test_login\\(\\);")
+ "return 77;"))))
(add-after 'unpack 'change-pid-file-path
(lambda _
(substitute* "src/login/elogind.c"
- (("\"/run/elogind.pid\"") "\"/run/systemd/elogind.pid\""))
- #t)))))
+ (("\"/run/elogind.pid\"") "\"/run/systemd/elogind.pid\"")))))))
(native-inputs
`(("docbook-xml" ,docbook-xml)
("docbook-xml-4.2" ,docbook-xml-4.2)
@@ -671,7 +696,8 @@ the freedesktop.org XDG Base Directory specification.")
("python" ,python)
("xsltproc" ,libxslt)))
(inputs
- `(("linux-pam" ,linux-pam)
+ `(("kexec-tools" ,kexec-tools)
+ ("linux-pam" ,linux-pam)
("libcap" ,libcap)
("shadow" ,shadow) ;for 'nologin'
("shepherd" ,shepherd) ;for 'halt' and 'reboot', invoked
@@ -819,7 +845,8 @@ of a the system to know what users are logged in, and where.")
(install-file map data))
(find-files ".." "^(kbd-model-map|language-fallback-map)$"))
#t)))))))
- (native-inputs (package-native-inputs elogind))
+ (native-inputs `(,@(package-native-inputs elogind)
+ ("rsync" ,rsync)))
(inputs `(("libmount" ,util-linux "lib")
("xkeyboard-config" ,xkeyboard-config)
("kbd" ,kbd)
@@ -852,7 +879,7 @@ with localed. This package is extracted from the broader systemd package.")
(native-inputs
`(("pkg-config" ,pkg-config)
("scdoc" ,scdoc)))
- (inputs
+ (propagated-inputs
`(("elogind" ,elogind)))
(home-page "https://sr.ht/~kennylevinsen/seatd")
(synopsis "Seat management daemon and library")
@@ -955,43 +982,72 @@ Python.")
(define-public wayland
(package
(name "wayland")
- (version "1.18.0")
+ (version "1.19.0")
(source (origin
(method url-fetch)
(uri (string-append "https://wayland.freedesktop.org/releases/"
name "-" version ".tar.xz"))
(sha256
(base32
- "0k995rn96xkplrapz5k648j651wc43kq817xk1x8280h16gsfxa6"))))
- (build-system gnu-build-system)
+ "05bd2vphyx8qwa1mhsj1zdaiv4m4v94wrlssrn0lad8d601dkk5s"))))
+ (build-system meson-build-system)
+ (outputs '("out" "doc"))
(arguments
- `(#:parallel-tests? #f))
+ `(#:parallel-tests? #f
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'patch-docbook-xml
+ (lambda* (#:key native-inputs inputs #:allow-other-keys)
+ (with-directory-excursion "doc"
+ (substitute* (find-files "." "\\.xml$")
+ (("http://www.oasis-open.org/docbook/xml/4\\.5/")
+ (string-append (assoc-ref (or native-inputs inputs)
+ "docbook-xml")
+ "/xml/dtd/docbook/"))
+ (("http://www.oasis-open.org/docbook/xml/4\\.2/")
+ (string-append (assoc-ref (or native-inputs inputs)
+ "docbook-xml-4.2")
+ "/xml/dtd/docbook/"))))))
+ (add-after 'install 'move-doc
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (doc (assoc-ref outputs "doc")))
+ (mkdir-p (string-append doc "/share"))
+ (rename-file
+ (string-append out "/share/doc")
+ (string-append doc "/share/doc"))))))))
(native-inputs
- `(("doxygen" ,doxygen)
- ("graphviz" ,graphviz)
+ `(("docbook-xml-4.2" ,docbook-xml-4.2)
+ ("docbook-xml" ,docbook-xml)
+ ("docbook-xsl" ,docbook-xsl)
+ ("dot" ,graphviz)
+ ("doxygen" ,doxygen)
("pkg-config" ,pkg-config)
("xmlto" ,xmlto)
- ("xsltproc" ,libxslt)))
+ ("xsltproc" ,libxslt)
+ ,@(if (%current-target-system)
+ `(("pkg-config-for-build" ,pkg-config-for-build)
+ ("wayland" ,this-package)) ; for wayland-scanner
+ '())))
(inputs
- `(("docbook-xml" ,docbook-xml)
- ("docbook-xsl" ,docbook-xsl)
- ("expat" ,expat)
- ("libffi" ,libffi)
- ("libxml2" ,libxml2))) ; for XML_CATALOG_FILES
+ `(("expat" ,expat)
+ ("libxml2" ,libxml2))) ; for XML_CATALOG_FILES
+ (propagated-inputs
+ `(("libffi" ,libffi)))
(home-page "https://wayland.freedesktop.org/")
- (synopsis "Display server protocol")
- (description
- "Wayland is a protocol for a compositor to talk to its clients as well as
-a C library implementation of that protocol. The compositor can be a standalone
-display server running on Linux kernel modesetting and evdev input devices, an X
-application, or a wayland client itself. The clients can be traditional
-applications, X servers (rootless or fullscreen) or other display servers.")
- (license license:x11)))
+ (synopsis "Core Wayland window system code and protocol")
+ (description "Wayland is a project to define a protocol for a compositor to
+talk to its clients as well as a library implementation of the protocol. The
+compositor can be a standalone display server running on Linux kernel
+modesetting and evdev input devices, an X application, or a wayland client
+itself. The clients can be traditional applications, X servers (rootless or
+fullscreen) or other display servers.")
+ (license license:expat)))
(define-public wayland-protocols
(package
(name "wayland-protocols")
- (version "1.20")
+ (version "1.23")
(source (origin
(method url-fetch)
(uri (string-append
@@ -999,14 +1055,17 @@ applications, X servers (rootless or fullscreen) or other display servers.")
"wayland-protocols-" version ".tar.xz"))
(sha256
(base32
- "1rsdgvkkvxs3cjhpl6agvbkm53vm7k8rg127j9y2vn33m2hvg0lp"))))
- (build-system gnu-build-system)
+ "0xizccackgwszjhlq7jjiv2z2gwppljx0w32ga91bxlnby8z22kc"))))
+ (build-system meson-build-system)
(inputs
`(("wayland" ,wayland)))
(native-inputs
`(("pkg-config" ,pkg-config)))
(synopsis "Wayland protocols")
- (description "This package contains XML definitions of the Wayland protocols.")
+ (description "Wayland-Protocols contains Wayland protocols that add
+functionality not available in the Wayland core protocol. Such protocols either
+add completely new functionality, or extend the functionality of some other
+protocol either in Wayland core, or some other protocol in wayland-protocols.")
(home-page "https://wayland.freedesktop.org")
(license license:expat)))
@@ -1127,8 +1186,7 @@ applications, X servers (rootless or fullscreen) or other display servers.")
(add-before 'check 'start-xorg-server
(lambda* (#:key inputs #:allow-other-keys)
;; The test suite requires a running X server.
- (system (string-append (assoc-ref inputs "xorg-server")
- "/bin/Xvfb :1 &"))
+ (system "Xvfb :1 &")
(setenv "DISPLAY" ":1")
#t)))))
(home-page "https://wayland.freedesktop.org")
@@ -1341,57 +1399,63 @@ message bus.")
(define-public accountsservice
(package
(name "accountsservice")
- (version "0.6.50")
+ (version "0.6.55")
(source
(origin
(method url-fetch)
(uri (string-append "https://www.freedesktop.org/software/"
- "accountsservice/accountsservice-" version ".tar.xz"))
+ "accountsservice/accountsservice-"
+ version ".tar.xz"))
(sha256
- (base32 "0jn7vg1z4vxnna0hl33hbcb4bb3zpilxc2vyclh24vx4vvsjhn83"))))
- (build-system gnu-build-system)
+ (base32 "16wwd633jak9ajyr1f1h047rmd09fhf3kzjz6g5xjsz0lwcj8azz"))))
+ (build-system meson-build-system)
(arguments
- '(#:tests? #f ; XXX: tests require DocBook 4.1.2
+ `(#:meson ,meson-0.59 ;see https://github.com/mesonbuild/meson/issues/6470
+ #:tests? #f ; XXX: tests require DocBook 4.1.2
#:configure-flags
'("--localstatedir=/var"
- "--disable-systemd"
- "--enable-elogind")
+ "-Dsystemdsystemunitdir=/tmp/empty"
+ "-Dsystemd=false"
+ "-Delogind=true")
#:phases
(modify-phases %standard-phases
(add-after 'unpack 'patch-/bin/cat
(lambda _
(substitute* "src/user.c"
- (("/bin/cat") (which "cat")))
- #t))
+ (("/bin/cat") (which "cat")))))
(add-before
'configure 'pre-configure
(lambda* (#:key inputs #:allow-other-keys)
- ;; Don't try to create /var/lib/AccountsService.
- (substitute* "src/Makefile.in"
- (("\\$\\(MKDIR_P\\).*/lib/AccountsService.*") "true"))
+ (substitute* "meson_post_install.py"
+ (("in dst_dirs") "in []"))
(let ((shadow (assoc-ref inputs "shadow")))
(substitute* '("src/user.c" "src/daemon.c")
- (("/usr/sbin/usermod") (string-append shadow "/sbin/usermod"))
- (("/usr/sbin/useradd") (string-append shadow "/sbin/useradd"))
- (("/usr/sbin/userdel") (string-append shadow "/sbin/userdel"))
- (("/usr/bin/passwd") (string-append shadow "/bin/passwd"))
- (("/usr/bin/chage") (string-append shadow "/bin/chage"))))
- #t)))))
+ (("/usr/sbin/usermod")
+ (string-append shadow "/sbin/usermod"))
+ (("/usr/sbin/useradd")
+ (string-append shadow "/sbin/useradd"))
+ (("/usr/sbin/userdel")
+ (string-append shadow "/sbin/userdel"))
+ (("/usr/bin/passwd")
+ (string-append shadow "/bin/passwd"))
+ (("/usr/bin/chage")
+ (string-append shadow "/bin/chage")))))))))
(native-inputs
`(("glib:bin" ,glib "bin") ; for gdbus-codegen, etc.
("gobject-introspection" ,gobject-introspection)
("intltool" ,intltool)
("pkg-config" ,pkg-config)))
(inputs
- `(("elogind" ,elogind)
+ `(("dbus" ,dbus)
+ ("elogind" ,elogind)
("polkit" ,polkit)
("shadow" ,shadow)))
(home-page "https://www.freedesktop.org/wiki/Software/AccountsService/")
(synopsis "D-Bus interface for user account query and manipulation")
(description
- "The AccountService project provides a set of D-Bus interfaces for querying
-and manipulating user account information and an implementation of these
-interfaces, based on the useradd, usermod and userdel commands.")
+ "The AccountService project provides a set of D-Bus interfaces for
+querying and manipulating user account information and an implementation of
+these interfaces, based on the useradd, usermod and userdel commands.")
(license license:gpl3+)))
(define-public libmbim
@@ -2181,6 +2245,13 @@ useful with system integration.")
"https://launchpad.net/libappindicator/"
(version-major+minor version) "/" version
"/+download/libappindicator-" version ".tar.gz"))
+ (modules '((guix build utils)))
+ (snippet
+ '(begin
+ ;; Fix 'multiple definitions' error from GCC 10
+ (substitute* "bindings/python/appindicatormodule.c"
+ (("^#include <pygobject.h>" all)
+ (string-append "#define NO_IMPORT_PYGOBJECT\n" all)))))
(sha256
(base32
"17xlqd60v0zllrxp8bgq3k5a1jkj0svkqn8rzllcyjh8k0gpr46m"))))
@@ -2242,43 +2313,45 @@ fallback to generic Systray support if none of those are available.")
(define-public libportal
(package
- (name "libportal")
- (version "0.4")
- (source (origin
- (method url-fetch)
- (uri (string-append "https://github.com/flatpak/libportal/releases/download/"
- version "/libportal-" version ".tar.xz"))
- (sha256
- (base32
- "0a7gmhyf0b58xy335jyf524g1fyc2id4r88anhvg47430w4zbm9w"))))
- (build-system meson-build-system)
- (arguments
- `(#:phases
- (modify-phases %standard-phases
- (add-after 'install 'move-doc
- (lambda* (#:key outputs #:allow-other-keys)
- (let ((out (assoc-ref outputs "out"))
- (doc (assoc-ref outputs "doc"))
- (html "/share/gtk-doc"))
- (copy-recursively (string-append out html)
- (string-append doc html))
- (delete-file-recursively (string-append out html))
- #t))))))
- (native-inputs
- `(("pkg-config" ,pkg-config)
- ("gtk-doc" ,gtk-doc/stable)
- ("docbook-xsl" ,docbook-xsl)
- ("docbook-xml" ,docbook-xml)
- ("libxml2" ,libxml2)
- ("glib:bin" ,glib "bin")))
- (propagated-inputs
- `(("glib" ,glib)))
- (outputs '("out" "doc"))
- (home-page "https://github.com/flatpak/libportal")
- (synopsis "Flatpak portal library")
- (description
- "libportal provides GIO-style async APIs for most Flatpak portals.")
- (license license:lgpl2.1+)))
+ (name "libportal")
+ (version "0.4")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/flatpak/libportal")
+ (commit version)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1jh6wd96y4i218zbmmqw12zir8p88nm8dlsa3yx3lsqxd5c1krky"))))
+ (build-system meson-build-system)
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (add-after 'install 'move-doc
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let ((out (assoc-ref outputs "out"))
+ (doc (assoc-ref outputs "doc"))
+ (html "/share/gtk-doc"))
+ (copy-recursively (string-append out html)
+ (string-append doc html))
+ (delete-file-recursively (string-append out html))
+ #t))))))
+ (native-inputs
+ `(("pkg-config" ,pkg-config)
+ ("gtk-doc" ,gtk-doc/stable)
+ ("docbook-xsl" ,docbook-xsl)
+ ("docbook-xml" ,docbook-xml)
+ ("libxml2" ,libxml2)
+ ("glib:bin" ,glib "bin")))
+ (propagated-inputs
+ `(("glib" ,glib)))
+ (outputs '("out" "doc"))
+ (home-page "https://github.com/flatpak/libportal")
+ (synopsis "Flatpak portal library")
+ (description
+ "libportal provides GIO-style async APIs for most Flatpak portals.")
+ (license license:lgpl2.1+)))
(define-public xdg-desktop-portal
(package
@@ -2376,6 +2449,7 @@ and others.")
("autoconf" ,autoconf)
("automake" ,automake)
("libtool" ,libtool)
+ ("libxml2" ,libxml2)
("glib:bin" ,glib "bin")
("which" ,which)
("gettext" ,gettext-minimal)))
diff --git a/gnu/packages/ftp.scm b/gnu/packages/ftp.scm
index 17ad139162..0dd6958e51 100644
--- a/gnu/packages/ftp.scm
+++ b/gnu/packages/ftp.scm
@@ -5,6 +5,7 @@
;;; Copyright © 2016–2021 Tobias Geerinckx-Rice <me@tobias.gr>
;;; Copyright © 2017 Rene Saavedra <rennes@openmailbox.org>
;;; Copyright © 2021 David Larsson <david.larsson@selfhosted.xyz>
+;;; Copyright © 2021 Guillaume Le Vaillant <glv@posteo.net>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -132,6 +133,7 @@ reliability in mind.")
(let ((out (assoc-ref outputs "out")))
(setenv "CONFIG_SHELL" (which "sh"))
(setenv "SHELL" (which "sh"))
+ (setenv "CFLAGS" "-fcommon")
(invoke "./configure"
(string-append "--prefix=" out))))))
#:tests? #f)) ;there are no tests
diff --git a/gnu/packages/game-development.scm b/gnu/packages/game-development.scm
index ed733e317f..90855fc1e3 100644
--- a/gnu/packages/game-development.scm
+++ b/gnu/packages/game-development.scm
@@ -1,7 +1,7 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2014 Tomáš Čech <sleep_walker@suse.cz>
;;; Copyright © 2015 Mark H Weaver <mhw@netris.org>
-;;; Copyright © 2015, 2018 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2015, 2018, 2021 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2015, 2018 Alex Kost <alezost@gmail.com>
;;; Copyright © 2015, 2016, 2017 David Thompson <davet@gnu.org>
;;; Copyright © 2016, 2017, 2018, 2019, 2020, 2021 Efraim Flashner <efraim@flashner.co.il>
@@ -1328,15 +1328,12 @@ developed mainly for Ren'py.")
(lambda* (#:key inputs #:allow-other-keys)
(substitute* "module/setup.py"
(("/usr/include/fribidi")
- (string-append (assoc-ref inputs "fribidi")
- "/include/fribidi")))
- #t))
+ (search-input-directory inputs "include/fribidi")))))
(add-after 'set-paths 'set-build-vars
(lambda* (#:key inputs native-inputs #:allow-other-keys)
(setenv "RENPY_CYTHON"
- (string-append (assoc-ref (or native-inputs inputs)
- "python2-cython")
- "/bin/cython"))
+ (search-input-file (or native-inputs inputs)
+ "/bin/cython"))
(setenv "RENPY_DEPS_INSTALL" (string-join (map cdr inputs) ":"))
#t))
(replace 'build
@@ -1380,8 +1377,7 @@ developed mainly for Ren'py.")
`(("python2-future" ,python2-future)
("python2-pygame" ,python2-pygame-sdl2)))
(native-inputs
- `(("gcc" ,gcc-8) ; for const variables as initializer elements
- ("python2-cython" ,python2-cython)))
+ `(("python2-cython" ,python2-cython)))
(home-page "https://www.renpy.org/")
(synopsis "Ren'py python module")
(description "This package contains the shared libraries and Python modules
@@ -1580,7 +1576,7 @@ if __name__ == \"__main__\":
(assoc-ref inputs "python"))
"/site-packages")))
(wrap-program (string-append out "/bin/renpy")
- `("PYTHONPATH" =
+ `("GUIX_PYTHONPATH" =
(,@(delete-duplicates
(map
(lambda (store-path)
@@ -1671,6 +1667,7 @@ also comes with a built-in image and sound editor.")
(method url-fetch)
;; XXX: There is no URL that contains the version. :(
(uri "http://pulkomandy.tk/projects/GrafX2/downloads/21")
+ (file-name (string-append "grafx2-" version ".tgz"))
(sha256
(base32
"0svsy6rqmdj11b400c242i2ixihyz0hds0dgicqz6g6dcgmcl62q"))))
@@ -1687,7 +1684,8 @@ also comes with a built-in image and sound editor.")
;; SDL header files are referenced without the preceeding "SDL/".
(list (string-append "CFLAGS=-I"
(assoc-ref %build-inputs "sdl-union")
- "/include/SDL")
+ "/include/SDL"
+ " -fcommon")
(string-append "prefix="
(assoc-ref %outputs "out")))
#:tests? #f)) ; no check target
@@ -2847,10 +2845,9 @@ support.")
(add-before 'build 'fix-env
(lambda* (#:key inputs #:allow-other-keys)
(setenv "CPATH"
- (string-append (assoc-ref inputs "sdl2-union")
- "/include/SDL2:"
- (or (getenv "CPATH") "")))
- #t))
+ (string-append
+ (search-input-directory inputs "include/SDL2")
+ ":" (or (getenv "CPATH") "")))))
(add-after 'install 'really-install
(lambda* (#:key outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))
diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm
index 4d8e0752c5..4ea9aaaa66 100644
--- a/gnu/packages/games.scm
+++ b/gnu/packages/games.scm
@@ -5,7 +5,7 @@
;;; Copyright © 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021 Eric Bavier <bavier@posteo.net>
;;; Copyright © 2014 Cyrill Schenkel <cyrill.schenkel@gmail.com>
;;; Copyright © 2014 Sylvain Beucler <beuc@beuc.net>
-;;; Copyright © 2014, 2015, 2018, 2019 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2014, 2015, 2018, 2019, 2021 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2014, 2015, 2016 Sou Bunnbu <iyzsong@gmail.com>
;;; Copyright © 2014, 2015, 2019 Mark H Weaver <mhw@netris.org>
;;; Copyright © 2015, 2016 Andreas Enge <andreas@enge.fr>
@@ -42,7 +42,7 @@
;;; Copyright © 2019 Julien Lepiller <julien@lepiller.eu>
;;; Copyright © 2019, 2020 Jesse Gibbons <jgibbons2357+guix@gmail.com>
;;; Copyright © 2019 Dan Frumin <dfrumin@cs.ru.nl>
-;;; Copyright © 2019, 2020 Guillaume Le Vaillant <glv@posteo.net>
+;;; Copyright © 2019, 2020, 2021 Guillaume Le Vaillant <glv@posteo.net>
;;; Copyright © 2019, 2020 Timotej Lazar <timotej.lazar@araneo.si>
;;; Copyright © 2019 Josh Holland <josh@inv.alid.pw>
;;; Copyright © 2019 Pkill -9 <pkill9@runbox.com>
@@ -178,6 +178,7 @@
#:use-module (gnu packages protobuf)
#:use-module (gnu packages pulseaudio)
#:use-module (gnu packages python)
+ #:use-module (gnu packages python-web)
#:use-module (gnu packages python-xyz)
#:use-module (gnu packages qt)
#:use-module (gnu packages readline)
@@ -727,8 +728,7 @@ possible, while battling many vicious aliens.")
(bin (string-append out "/bin"))
(doc (string-append out "/share/doc/bsd-games-" ,version))
(man (string-append out "/share/man"))
- (word-list (string-append (assoc-ref inputs "miscfiles")
- "/share/web2"))
+ (word-list (search-input-file inputs "/share/web2"))
(static-data (string-append out "/share/games/bsd-games"))
;; Not a "./" because of substitute* in 'patch-install
;; below. The .// allow us not to mess with the games'
@@ -1236,10 +1236,9 @@ should be placed in @file{~/.local/share/falltergeist}.")
;; Set correct environment for SDL.
(lambda* (#:key inputs #:allow-other-keys)
(setenv "CPATH"
- (string-append (assoc-ref inputs "sdl")
- "/include/SDL:"
- (or (getenv "CPATH") "")))
- #t))
+ (string-append
+ (search-input-directory inputs "include/SDL")
+ ":" (or (getenv "CPATH") "")))))
(add-before 'build 'fix-settings-directory
;; Hide foobillardplus settings directory in $HOME.
(lambda _
@@ -1675,8 +1674,7 @@ shadow mimic them to reach blocks you couldn't reach alone.")
;; Look for xdg-open in the store.
(substitute* "src/core/web.c"
(("/usr(/bin/xdg-open)" _ bin)
- (string-append (assoc-ref inputs "xdg-utils") bin)))
- #t))
+ (search-input-file inputs bin)))))
(add-after 'unpack 'unbundle-fonts
(lambda* (#:key inputs #:allow-other-keys)
;; Replace bundled Roboto fonts with links to the store.
@@ -1770,7 +1768,8 @@ destroying an ancient book using a special wand.")
"0s5fg4z5in1h39fcr69j1qc5ynmg7a8mfprk3mc3c0csq3snfwz2"))))
(build-system meson-build-system)
(arguments
- '(#:glib-or-gtk? #t
+ `(#:glib-or-gtk? #t
+ #:meson ,meson-0.59
#:phases
(modify-phases %standard-phases
(add-after 'unpack 'skip-gtk-update-icon-cache
@@ -1982,10 +1981,9 @@ Chess). It is similar to standard chess but this variant is far more complicate
(add-after 'set-paths 'set-sdl-paths
(lambda* (#:key inputs #:allow-other-keys)
(setenv "CPATH"
- (string-append (assoc-ref inputs "sdl-union")
- "/include/SDL:"
- (or (getenv "CPATH") "")))
- #t)))))
+ (string-append
+ (search-input-directory inputs "include/SDL")
+ ":" (or (getenv "CPATH") ""))))))))
(inputs
`(("sdl-union" ,(sdl-union (list sdl sdl-mixer)))))
(home-page "http://lgames.sourceforge.net/LTris/")
@@ -2196,10 +2194,9 @@ Every puzzle has a complete solution, although there may be more than one.")
(add-after 'set-paths 'set-sdl'paths
(lambda* (#:key inputs #:allow-other-keys)
(setenv "CPATH"
- (string-append (assoc-ref inputs "sdl-union")
- "/include/SDL:"
- (or (getenv "CPATH") "")))
- #t)))))
+ (string-append
+ (search-input-directory inputs "/include/SDL")
+ ":" (or (getenv "CPATH") ""))))))))
(inputs
`(("fluidsynth" ,fluidsynth)
("glu" ,glu)
@@ -2360,9 +2357,9 @@ utilizing the art assets from the @code{SuperTux} project.")
(lambda (p)
(format p "\
#!~a
-export PYTHONPATH=~a/LIB:~a
+export GUIX_PYTHONPATH=~a/LIB:~a
exec -a \"~a\" ~a \"$@\"\n"
- (which "bash") data (getenv "PYTHONPATH")
+ (which "bash") data (getenv "GUIX_PYTHONPATH")
(which "python3")
(string-append lib "/main.py"))))
(chmod roguebox-adventures #o555))
@@ -2436,9 +2433,9 @@ can be explored and changed freely.")
(lambda (p)
(format p
"#!~a~@
- export PYTHONPATH=~a:~a~@
+ export GUIX_PYTHONPATH=~a:~a~@
exec -a \"~a\" ~a \"$@\"~%"
- (which "bash") data (getenv "PYTHONPATH")
+ (which "bash") data (getenv "GUIX_PYTHONPATH")
(which "python3")
(string-append data "/run_game.py"))))
(chmod executable #o555))
@@ -2469,8 +2466,8 @@ can be explored and changed freely.")
(lambda* (#:key outputs inputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))
(data (string-append out "/share/seahorse-adventures"))
- (vera (string-append (assoc-ref inputs "font-bitstream-vera")
- "/share/fonts/truetype/Vera.ttf")))
+ (vera (search-input-file
+ inputs "/share/fonts/truetype/Vera.ttf")))
(let ((themes-dir (string-append data "/data/themes/")))
(for-each
(lambda (theme)
@@ -3041,9 +3038,9 @@ properly.")
(add-after 'set-paths 'set-sdl-paths
(lambda* (#:key inputs #:allow-other-keys)
(setenv "CPATH"
- (string-append (assoc-ref inputs "sdl-union")
- "/include/SDL:"
- (or (getenv "CPATH") "")))))
+ (string-append
+ (search-input-directory inputs "include/SDL2")
+ ":" (or (getenv "CPATH") "")))))
(add-after 'patch-source-shebangs 'patch-makefile
(lambda* (#:key outputs #:allow-other-keys)
;; Replace /usr with package output directory.
@@ -3464,14 +3461,16 @@ exec ~a/bin/freedink -refdir ~a/share/dink\n"
"1mkh36xnnacnz9r00b5f9ld9309k32jv6mcavklbdnca8bl56bib"))))
(build-system gnu-build-system)
(arguments
- `(#:phases
+ `(#:configure-flags '("CFLAGS=-fcommon")
+ #:phases
(modify-phases %standard-phases
;; Fixes https://issues.guix.gnu.org/47195.
(add-after 'unpack 'patch-aplay-path
(lambda* (#:key inputs #:allow-other-keys)
(substitute* "xboard.conf"
(("aplay -q")
- (string-append (assoc-ref inputs "alsa-utils") "/bin/aplay -q")))))
+ (string-append (search-input-file inputs "/bin/aplay")
+ " -q")))))
;; Fixes https://issues.guix.gnu.org/45236.
(add-after 'unpack 'patch-default-engine
(lambda* (#:key inputs #:allow-other-keys)
@@ -3571,6 +3570,10 @@ are primarily in English, however some in other languages are provided.")
;; The actual source is buried a few directories deep.
(chdir "source/Irrlicht/")
#t))
+ (add-after 'chdir-to-source 'remove-<sys/sysctl.h>
+ (lambda _
+ (substitute* "COSOperator.cpp"
+ (("#include <sys/sysctl.h>") ""))))
(add-after 'chdir-to-source 'fix-build-env
(lambda* (#:key outputs #:allow-other-keys)
(let ((out (assoc-ref outputs "out")))
@@ -3776,9 +3779,12 @@ Widgets, and allows users to create more.")
(build-system cmake-build-system)
(arguments
`(#:tests? #f ; TODO The test running fails to run some tests.
- #:modules ((srfi srfi-1)
- (guix build cmake-build-system)
- (guix build utils))
+ #:imported-modules ,(cons '(guix build python-build-system)
+ %cmake-build-system-modules)
+ #:modules ((guix build cmake-build-system)
+ ((guix build python-build-system) #:select (guix-pythonpath))
+ (guix build utils)
+ (srfi srfi-1))
#:configure-flags
(list
(string-append "-DOPENALSOFT_INCLUDE_DIR="
@@ -3805,30 +3811,15 @@ Widgets, and allows users to create more.")
(delete 'check)
(add-after 'install 'check
(lambda* (#:key inputs outputs tests? #:allow-other-keys)
- (define python-version
- (let* ((version (last (string-split
- (assoc-ref inputs "python")
- #\-)))
- (components (string-split version #\.))
- (major+minor (take components 2)))
- (string-join major+minor ".")))
-
(when tests?
- ;; Set PYTHONPATH so that python finds the installed modules.
- (setenv "PYTHONPATH"
- (string-append (getenv "PYTHONPATH") ":"
- (assoc-ref outputs "out")
- "/lib/python"
- python-version
- "/site-packages"))
+ (add-installed-pythonpath inputs outputs)
;; The tests require an X server.
(system "Xvfb :1 &")
(setenv "DISPLAY" ":1")
(setenv "XDG_RUNTIME_DIR" "/tmp")
;; Run tests
(chdir ,(string-append "../" name "-" version))
- (invoke "python3" "run_tests.py" "-a"))
- #t)))))
+ (invoke "python3" "run_tests.py" "-a")))))))
(inputs
`(("sdl2" ,sdl2)
("sdl2-image" ,sdl2-image)
@@ -3903,7 +3894,10 @@ either by Infocom or created using the Inform compiler.")
(base32
"0wkahvqpzq6lzl5r49a4sd4p52frdmphnqsfdv7gdp24bykdfs6s"))))
(build-system gnu-build-system)
- (inputs `(("readline" ,readline)))
+ (inputs
+ `(("readline" ,readline)))
+ (arguments
+ `(#:configure-flags '("CFLAGS=-fcommon")))
(synopsis "Play the game of Go")
(description
"GNU Go is a program that plays the game of Go, in which players
@@ -4407,8 +4401,8 @@ OpenGFX provides you with...
(arguments
`(#:make-flags
(list (string-append "DIR_NAME=opensfx")
- (string-append "TAR=" (assoc-ref %build-inputs "tar")
- "/bin/tar"))
+ (string-append "TAR="
+ (search-input-file %build-inputs "/bin/tar")))
;; The check phase only verifies md5sums, see openttd-opengfx.
#:tests? #f
#:phases
@@ -4459,8 +4453,8 @@ the original Transport Tycoon Deluxe.")
(arguments
`(#:make-flags
(list (string-append "DIR_NAME=openmsx")
- (string-append "TAR=" (assoc-ref %build-inputs "tar")
- "/bin/tar"))
+ (string-append "TAR="
+ (search-input-file %build-inputs "/bin/tar")))
;; The check phase only verifies md5sums, see openttd-opengfx.
#:tests? #f
#:phases
@@ -4533,7 +4527,7 @@ Transport Tycoon Deluxe.")
(openrct2-title-sequences (string-append out
"/share/openrct2/title-sequences"))
(source (assoc-ref %build-inputs "source"))
- (unzip (string-append (assoc-ref %build-inputs "unzip") "/bin/unzip")))
+ (unzip (search-input-file %build-inputs "/bin/unzip")))
(copy-file source (string-append ,name "-" ,version ".zip"))
(invoke unzip (string-append ,name "-" ,version ".zip"))
(delete-file (string-append ,name "-" ,version ".zip"))
@@ -4573,7 +4567,7 @@ Transport Tycoon Deluxe.")
(openrct2-objects (string-append out
"/share/openrct2/objects"))
(source (assoc-ref %build-inputs "source"))
- (unzip (string-append (assoc-ref %build-inputs "unzip") "/bin/unzip")))
+ (unzip (search-input-file %build-inputs "/bin/unzip")))
(copy-file source (string-append ,name "-" ,version ".zip"))
(invoke unzip (string-append ,name "-" ,version ".zip"))
(delete-file (string-append ,name "-" ,version ".zip"))
@@ -4771,8 +4765,8 @@ players.")
(replace 'configure
(lambda* (#:key outputs inputs #:allow-other-keys)
(let ((out (assoc-ref outputs "out"))
- (dejavu (string-append (assoc-ref inputs "font-dejavu")
- "/share/fonts/truetype/DejaVuSans.ttf")))
+ (dejavu (search-input-file
+ inputs "/share/fonts/truetype/DejaVuSans.ttf")))
(substitute* "Makefile"
(("PREFIX=/usr/local") (string-append "PREFIX=" out)))
;; The patch above registers a free font for use by the binary,
@@ -4864,10 +4858,9 @@ http://lavachat.symlynx.com/unix/")
(add-after 'set-paths 'set-sdl-paths
(lambda* (#:key inputs #:allow-other-keys)
(setenv "CPATH"
- (string-append (assoc-ref inputs "sdl-union")
- "/include/SDL2:"
- (or (getenv "CPATH") "")))
- #t))
+ (string-append
+ (search-input-directory inputs "/include/SDL2")
+ ":" (or (getenv "CPATH") "")))))
(add-after 'install 'copy-data
(lambda* (#:key outputs #:allow-other-keys)
(let ((out (assoc-ref outputs "out")))
@@ -5729,14 +5722,10 @@ colors, pictures, and sounds.")
(script (string-append out "/bin/" ,name))
(data (string-append out "/share/" ,name))
(source (assoc-ref %build-inputs "source"))
- (unzip (string-append (assoc-ref %build-inputs "unzip")
- "/bin/unzip"))
- (patch (string-append (assoc-ref %build-inputs "patch")
- "/bin/patch"))
- (bash (string-append (assoc-ref %build-inputs "bash")
- "/bin/bash"))
- (love (string-append (assoc-ref %build-inputs "love")
- "/bin/love")))
+ (unzip (search-input-file %build-inputs "/bin/unzip"))
+ (patch (search-input-file %build-inputs "/bin/patch"))
+ (bash (search-input-file %build-inputs "/bin/bash"))
+ (love (search-input-file %build-inputs "/bin/love")))
(mkdir-p (dirname script))
(with-output-to-file script
@@ -5842,7 +5831,7 @@ throwing people around in pseudo-randomly generated buildings.")
(let* ((data (assoc-ref inputs "hyperrogue-data"))
(out (assoc-ref outputs "out"))
(sounds (string-append out "/share/hyperrogue/sounds"))
- (unzip (string-append (assoc-ref inputs "unzip") "/bin/unzip")))
+ (unzip (search-input-file inputs "/bin/unzip")))
;; Extract media license information into sounds directory.
(invoke unzip "-j" data
(string-append
@@ -6058,7 +6047,9 @@ starting a decryption sequence to reveal the original plaintext characters.")
("pkg-config" ,pkg-config)))
(arguments
`(#:configure-flags
- (list (string-append "-DCUSTOM_DATA_INSTALL_PATH="
+ (list "-DCMAKE_CXX_FLAGS=-fcommon"
+ "-DCMAKE_C_FLAGS=-fcommon"
+ (string-append "-DCUSTOM_DATA_INSTALL_PATH="
(assoc-ref %build-inputs "megaglest-data")
"/share/megaglest")
"-DBUILD_MEGAGLEST_TESTS=ON")
@@ -6208,11 +6199,10 @@ over 100 user-created campaigns.")
(replace 'configure
(lambda* (#:key inputs outputs #:allow-other-keys)
(setenv "CPLUS_INCLUDE_PATH"
- (string-append (assoc-ref inputs "sdl-union")
- "/include/SDL:"
- (assoc-ref inputs "python")
- "/include/python2.7:"
- (or (getenv "CPLUS_INCLUDE_PATH") "")))
+ (string-append
+ (search-input-directory inputs "include/SDL") ":"
+ (search-input-directory inputs "include/python2.7")
+ ":" (or (getenv "CPLUS_INCLUDE_PATH") "")))
(substitute* "src/main/main.cpp"
(("#include <SDL.h>" line)
(string-append line "
@@ -6687,9 +6677,8 @@ fight against their plot and save his fellow rabbits from slavery.")
(use-modules (guix build utils))
(let ((out (assoc-ref %outputs "out"))
(source (assoc-ref %build-inputs "source"))
- (tar (string-append (assoc-ref %build-inputs "tar") "/bin/tar"))
- (unzip (string-append (assoc-ref %build-inputs "unzip")
- "/bin/unzip"))
+ (tar (search-input-file %build-inputs "/bin/tar"))
+ (unzip (search-input-file %build-inputs "/bin/unzip"))
(xz-path (string-append (assoc-ref %build-inputs "xz") "/bin")))
(setenv "PATH" xz-path)
(mkdir out)
@@ -6951,9 +6940,9 @@ Crowther & Woods, its original authors, in 1995. It has been known as
(add-after 'set-paths 'set-sdl-paths
(lambda* (#:key inputs #:allow-other-keys)
(setenv "CPATH"
- (string-append (assoc-ref inputs "sdl-union")
- "/include/SDL2:"
- (or (getenv "CPATH") "")))))
+ (string-append
+ (search-input-directory inputs "/include/SDL2")
+ ":" (or (getenv "CPATH") "")))))
(delete 'check)
;; premake doesn't provide install target
(replace 'install
@@ -7176,7 +7165,7 @@ some graphical niceities, and numerous bug-fixes and other improvements.")
(native-inputs
`(("pkg-config" ,pkg-config)))
(inputs
- `(("curl" ,curl-minimal)
+ `(("curl" ,curl)
("libvorbis" ,libvorbis)
("mesa" ,mesa)
("openal" ,openal)
@@ -7566,6 +7555,8 @@ online.")
(base32
"1iy8rx7kjvi1zjiw4zh77szzmd1sgpqajvbhprh1sj93fhbxcdfl"))))
(build-system gnu-build-system)
+ (arguments
+ `(#:configure-flags (list "CFLAGS=-fcommon")))
(inputs `(("sdl2-net" ,sdl2-net)
("sdl2-mixer" , sdl2-mixer)
("sdl2" ,sdl2)))
@@ -7605,7 +7596,8 @@ affect gameplay).")
`(("automake" ,automake)
("autoreconf" ,autoconf))))
(arguments
- `(#:phases
+ `(#:configure-flags '("CFLAGS=-fcommon")
+ #:phases
(modify-phases %standard-phases
(replace 'bootstrap
;; The bundled autogen.sh script unconditionally runs ./configure.
@@ -7772,7 +7764,7 @@ quotation from a collection of quotes.")
(let* ((out (assoc-ref %outputs "out"))
(xonotic (string-append out "/share/xonotic"))
(source (assoc-ref %build-inputs "source"))
- (unzip (string-append (assoc-ref %build-inputs "unzip") "/bin/unzip")))
+ (unzip (search-input-file %build-inputs "/bin/unzip")))
(copy-file source (string-append ,name "-" ,version ".zip"))
(invoke unzip (string-append ,name "-" ,version ".zip"))
(mkdir-p out)
@@ -8058,8 +8050,7 @@ ncurses for text display.")
(arguments
;; XXX: Do not add debugging symbols, which cause the build to fail.
`(#:configure-flags (list "--buildtype=release")
- #:tests? #f ;sole test fails with a missing "/dev/dri" error
- #:meson ,meson-0.55))
+ #:tests? #f)) ;sole test fails with a missing "/dev/dri" error
(native-inputs
`(("gettext" ,gettext-minimal)
("pkg-config" ,pkg-config)))
@@ -8652,10 +8643,9 @@ download and unpack them separately.")
(add-after 'set-paths 'set-sdl-paths
(lambda* (#:key inputs #:allow-other-keys)
(setenv "CPATH"
- (string-append (assoc-ref inputs "sdl")
- "/include/SDL:"
- (or (getenv "CPATH") "")))
- #t))
+ (string-append
+ (search-input-directory inputs "/include/SDL")
+ ":" (or (getenv "CPATH") "")))))
(add-after 'unpack 'fix-compilation-errors
(lambda _
(substitute* "mrt/base_file.h"
@@ -8786,7 +8776,8 @@ affected by the gravity of the planets.")
"1nfkhcm0l89jyw8yr65na97g4l385zhjf7whkyg47c3v5sdqq2g7"))))
(build-system gnu-build-system)
(arguments
- `(#:phases
+ `(#:configure-flags '("CFLAGS=-fcommon")
+ #:phases
(modify-phases %standard-phases
(add-after 'unpack 'fix-install-directories
(lambda* (#:key outputs #:allow-other-keys)
@@ -8802,10 +8793,9 @@ affected by the gravity of the planets.")
(add-after 'set-paths 'set-sdl-paths
(lambda* (#:key inputs #:allow-other-keys)
(setenv "CPATH"
- (string-append (assoc-ref inputs "sdl")
- "/include/SDL:"
- (or (getenv "CPATH") "")))
- #t)))))
+ (string-append
+ (search-input-directory inputs "/include/SDL")
+ ":" (or (getenv "CPATH") ""))))))))
(inputs
`(("fontconfig" ,fontconfig)
("freeglut" ,freeglut)
@@ -8921,10 +8911,9 @@ where the player draws runes in real time to effect the desired spell.")
(add-before 'build 'fix-env
(lambda* (#:key inputs #:allow-other-keys)
(setenv "CPATH"
- (string-append (assoc-ref inputs "sdl2-union")
- "/include/SDL2:"
- (or (getenv "CPATH") "")))
- #t)))))
+ (string-append
+ (search-input-directory inputs "/include/SDL2")
+ ":" (or (getenv "CPATH") ""))))))))
(inputs
`(("sdl2-union" ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))
("zlib" ,zlib)))
@@ -9115,10 +9104,8 @@ action RPGs.")
;; parameters.
(lambda* (#:key inputs outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))
- (bash (string-append (assoc-ref inputs "bash")
- "/bin/bash"))
- (flare (string-append (assoc-ref inputs "flare-engine")
- "/bin/flare"))
+ (bash (search-input-file inputs "/bin/bash"))
+ (flare (search-input-file inputs "/bin/flare"))
(script (string-append out "/bin/flare-game")))
(mkdir-p (dirname script))
(call-with-output-file script
@@ -9425,7 +9412,14 @@ simulator.")
#:tests? #f ;no test
#:phases
(modify-phases %standard-phases
- (delete 'configure) ;no configure script
+ ;; There is no configure script
+ (replace 'configure
+ (lambda _
+ (substitute* "Makefile"
+ (("-funroll-loops")
+ "-funroll-loops -fcommon")
+ (("SDL_CFLAGS =")
+ "SDL_CFLAGS = -fcommon"))))
(add-after 'unpack 'fix-sdl-path
;; XXX: For some reason, `sdl2-config' reports stand-alone SDL
;; directory, not SDL-union provided as an input to the package.
@@ -9433,8 +9427,7 @@ simulator.")
(lambda* (#:key inputs #:allow-other-keys)
(substitute* "Makefile"
(("sdl2-config" command)
- (string-append command " --prefix=" (assoc-ref inputs "sdl"))))
- #t)))))
+ (string-append command " --prefix=" (assoc-ref inputs "sdl")))))))))
(inputs
`(("bzip2" ,bzip2)
("sdl" ,(sdl-union (list sdl2 sdl2-mixer sdl2-net)))
@@ -9635,8 +9628,7 @@ on items and player adaptability for character progression.")
(share (string-append out "/share/drascula"))
(scummvm (assoc-ref %build-inputs "scummvm")))
;; Install data.
- (let ((unzip (string-append (assoc-ref %build-inputs "unzip")
- "/bin/unzip"))
+ (let ((unzip (search-input-file %build-inputs "/bin/unzip"))
(doc (string-append out "/share/doc/" ,name "-" ,version)))
(for-each
(lambda (input)
@@ -9662,8 +9654,7 @@ on items and player adaptability for character progression.")
;; Create standalone executable.
(let* ((bin (string-append out "/bin"))
(executable (string-append bin "/drascula"))
- (bash (string-append (assoc-ref %build-inputs "bash")
- "/bin/bash")))
+ (bash (search-input-file %build-inputs "/bin/bash")))
(mkdir-p bin)
(with-output-to-file executable
(lambda ()
@@ -9753,8 +9744,7 @@ the World and demonstrating that he is even more evil than his brother Vlad.")
(bin (string-append out "/bin"))
(executable (string-append bin "/" ,name))
(scummvm (assoc-ref %build-inputs "scummvm")))
- (let ((unzip (string-append (assoc-ref %build-inputs "unzip")
- "/bin/unzip")))
+ (let ((unzip (search-input-file %build-inputs "/bin/unzip")))
(invoke unzip "-j" (assoc-ref %build-inputs "source")))
(let ((doc (string-append share "/doc/" ,name "-" ,version)))
(for-each (lambda (f) (install-file f doc))
@@ -9860,8 +9850,7 @@ Skorl. Maybe it would be an idea to try and escape...")
(bin (string-append out "/bin"))
(executable (string-append bin "/" ,name))
(scummvm (assoc-ref %build-inputs "scummvm")))
- (let ((unzip (string-append (assoc-ref %build-inputs "unzip")
- "/bin/unzip")))
+ (let ((unzip (search-input-file %build-inputs "/bin/unzip")))
(invoke unzip "-j" (assoc-ref %build-inputs "source")))
(let ((doc (string-append share "/doc/" ,name "-" ,version)))
(install-file "readme.txt" doc))
@@ -9959,8 +9948,7 @@ women and 6-foot-tall pygmies.")
(bin (string-append out "/bin"))
(executable (string-append bin "/" ,name))
(scummvm (assoc-ref %build-inputs "scummvm")))
- (let ((unzip (string-append (assoc-ref %build-inputs "unzip")
- "/bin/unzip")))
+ (let ((unzip (search-input-file %build-inputs "/bin/unzip")))
(invoke unzip "-j" (assoc-ref %build-inputs "source")))
(let ((doc (string-append share "/doc/bass-" ,version)))
(install-file "readme.txt" doc))
@@ -10283,6 +10271,11 @@ can be downloaded from @url{https://zero.sjeng.org/best-network}.")
(("qtchooser -run-tool=(.*) -qt=qt5" _ command)
command))
#t))
+ (add-after 'unpack 'fix-header
+ (lambda _
+ (substitute* "src/bitarray.h"
+ (("#include <cstring>" all)
+ (string-append all "\n#include <stdexcept>")))))
(add-after 'unpack 'fix-paths
(lambda _
(substitute* '("src/pics/Makefile.in"
@@ -10593,12 +10586,21 @@ This package is part of the KDE games module.")
(arguments
`(#:phases
(modify-phases %standard-phases
- (add-after 'install 'wrap
+ (add-after 'unpack 'fix-paths
+ (lambda* (#:key inputs #:allow-other-keys)
+ (substitute* "src/mjresource.py"
+ (("'share', 'kmahjongglib'" all)
+ (string-append "'" (assoc-ref inputs "libkmahjongg")
+ "/share', 'kmahjongglib'")))))
+ (add-after 'qt-wrap 'wrap
(lambda* (#:key outputs #:allow-other-keys)
(let ((out (assoc-ref outputs "out")))
- (wrap-program (string-append out "/bin/kajongg")
- `("PYTHONPATH" ":" prefix (,(getenv "PYTHONPATH"))))
- #t))))))
+ (for-each (lambda (program)
+ (wrap-program program
+ `("GUIX_PYTHONPATH" ":" prefix
+ (,(getenv "GUIX_PYTHONPATH")))))
+ (list (string-append out "/bin/kajongg")
+ (string-append out "/bin/kajonggserver")))))))))
(native-inputs
`(("extra-cmake-modules" ,extra-cmake-modules)
;("perl" ,perl)
@@ -10612,6 +10614,7 @@ This package is part of the KDE games module.")
("python" ,python)
("python-twisted" ,python-twisted)
("python-pyqt" ,python-pyqt)
+ ("python-zope-interface" ,python-zope-interface)
("qtbase" ,qtbase-5)
("qtsvg" ,qtsvg)))
(home-page "https://games.kde.org/")
@@ -12038,8 +12041,7 @@ and chess engines.")
(lambda* (#:key inputs #:allow-other-keys)
(substitute* "chessx.pro"
(("\\$\\$\\[QT_INSTALL_BINS\\]/lrelease")
- (string-append (assoc-ref inputs "qttools") "/bin/lrelease")))
- #t))
+ (search-input-file inputs "/bin/lrelease")))))
(add-after 'fix-paths 'make-qt-deterministic
(lambda _
(setenv "QT_RCC_SOURCE_DATE_OVERRIDE" "1")
@@ -12375,8 +12377,7 @@ game.") ;thanks to Debian for description
(("/opt/gsasl")
(assoc-ref inputs "gsasl"))
(("\\$\\$\\{PREFIX\\}/include/libircclient")
- (string-append (assoc-ref inputs "libircclient")
- "/include/libircclient"))
+ (search-input-directory inputs "/include/libircclient"))
(("LIB_DIRS =")
(string-append "LIB_DIRS = "
(assoc-ref inputs "boost") "/lib")))
diff --git a/gnu/packages/gawk.scm b/gnu/packages/gawk.scm
index d8494e9c1c..f8f13fc9a3 100644
--- a/gnu/packages/gawk.scm
+++ b/gnu/packages/gawk.scm
@@ -30,13 +30,13 @@
(define-public gawk
(package
(name "gawk")
- (version "5.0.1")
+ (version "5.1.0")
(source (origin
(method url-fetch)
(uri (string-append "mirror://gnu/gawk/gawk-" version
".tar.xz"))
(sha256
- (base32 "15570p7g2x54asvr2fsc56sxzmm08fbk4mzpcs5n92fp9vq8cklf"))))
+ (base32 "1gc2cccqy1x1bf6rhwlmd8q7dz7gnam6nwgl38bxapv6qm5flpyg"))))
(build-system gnu-build-system)
(arguments
`(#:phases (modify-phases %standard-phases
@@ -55,9 +55,7 @@
'((substitute* "extension/Makefile.in"
(("^.*: check-for-shared-lib-support" match)
(string-append "### " match))))
- '())
-
- #t)))
+ '()))))
(add-before 'check 'adjust-test-infrastructure
(lambda _
@@ -66,18 +64,26 @@
(substitute* "test/Makefile"
(("\\| more") ""))
+ ;; Silence a warning from bash about not being able
+ ;; to change to an ISO-8859-1 locale. The test itself
+ ;; works fine, but newer versions of bash give a
+ ;; locale warning which mangles the test output.
+ (substitute* "test/localenl.sh"
+ (("for LC_ALL in")
+ "for LC in")
+ (("export LC_ALL\n")
+ "export LC_ALL=$LC 2>/dev/null\n"))
+
;; Adjust the shebang in that file since it is then diff'd
;; against the actual test output.
(substitute* "test/watchpoint1.ok"
(("#! /usr/bin/gawk")
- (string-append "#!" (which "gawk"))))
- #t)))))
+ (string-append "#!" (which "gawk")))))))))
(inputs `(("libsigsegv" ,libsigsegv)
-
- ,@(if (%current-target-system)
- `(("bash" ,bash))
- '())))
+ ;; Use the full-fledged Bash package, otherwise the test suite
+ ;; sometimes fail non-deterministically.
+ ("bash" ,bash)))
(home-page "https://www.gnu.org/software/gawk/")
(synopsis "Text scanning and processing language")
diff --git a/gnu/packages/gcc.scm b/gnu/packages/gcc.scm
index e7807a4797..a825b6661e 100644
--- a/gnu/packages/gcc.scm
+++ b/gnu/packages/gcc.scm
@@ -1,7 +1,7 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2014, 2015, 2018 Mark H Weaver <mhw@netris.org>
-;;; Copyright © 2014, 2015, 2016, 2017, 2019 Ricardo Wurmus <rekado@elephly.net>
+;;; Copyright © 2014, 2015, 2016, 2017, 2019, 2021 Ricardo Wurmus <rekado@elephly.net>
;;; Copyright © 2015 Andreas Enge <andreas@enge.fr>
;;; Copyright © 2015, 2016, 2017, 2018, 2020, 2021 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2016 Carlos Sánchez de La Lama <csanchezdll@gmail.com>
@@ -47,6 +47,7 @@
#:use-module (guix download)
#:use-module (guix build-system gnu)
#:use-module (guix build-system trivial)
+ #:use-module (guix gexp)
#:use-module (guix utils)
#:use-module (srfi srfi-1)
#:use-module (ice-9 regex))
@@ -80,6 +81,11 @@ where the OS part is overloaded to denote a specific ABI---into GCC
;; Cilk has been removed from GCC 8 anyway.
'("--disable-libcilkrts"))
+ ;; glibc needs the 128-bit long double type on these architectures.
+ ((or (string-prefix? "powerpc64le-" target)
+ (string-prefix? "powerpc-" target))
+ '("--with-long-double-128"))
+
(else
;; TODO: Add `arm.*-gnueabi', etc.
'())))
@@ -275,13 +281,10 @@ where the OS part is overloaded to denote a specific ABI---into GCC
~a"
libc line))))
- ;; TODO: Make this unconditional in core-updates.
- ,@(if (target-powerpc?)
- `((when (file-exists? "gcc/config/rs6000")
- ;; Force powerpc libdir to be /lib and not /lib64
- (substitute* (find-files "gcc/config/rs6000")
- (("/lib64") "/lib"))))
- `())
+ (when (file-exists? "gcc/config/rs6000")
+ ;; Force powerpc libdir to be /lib and not /lib64
+ (substitute* (find-files "gcc/config/rs6000")
+ (("/lib64") "/lib")))
;; Don't retain a dependency on the build-time sed.
(substitute* "fixincludes/fixincl.x"
@@ -330,8 +333,7 @@ where the OS part is overloaded to denote a specific ABI---into GCC
;; but there's nothing useful to look for here.)
(substitute* "gcc/config.in"
(("PREFIX_INCLUDE_DIR")
- "PREFIX_INCLUDE_DIR_isnt_necessary_here"))
- #t)))
+ "PREFIX_INCLUDE_DIR_isnt_necessary_here")))))
(add-after 'configure 'post-configure
(lambda _
@@ -339,8 +341,7 @@ where the OS part is overloaded to denote a specific ABI---into GCC
;; build-time dependencies---e.g., `--with-ppl=/gnu/store/xxx'.
(substitute* "Makefile"
(("^TOPLEVEL_CONFIGURE_ARGUMENTS=(.*)$" _ rest)
- "TOPLEVEL_CONFIGURE_ARGUMENTS=\n"))
- #t)))))
+ "TOPLEVEL_CONFIGURE_ARGUMENTS=\n")))))))
(native-search-paths
;; Use the language-specific variables rather than 'CPATH' because they
@@ -388,15 +389,13 @@ Go. It also includes runtime support libraries for these languages.")
;; This is required for building with glibc-2.26.
;; https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81712
(snippet
- '(begin
- (for-each
- (lambda (dir)
- (substitute* (string-append "libgcc/config/"
- dir "/linux-unwind.h")
- (("struct ucontext") "ucontext_t")))
- '("aarch64" "alpha" "bfin" "i386" "m68k"
- "pa" "sh" "tilepro" "xtensa"))
- #t))))
+ '(for-each
+ (lambda (dir)
+ (substitute* (string-append "libgcc/config/"
+ dir "/linux-unwind.h")
+ (("struct ucontext") "ucontext_t")))
+ '("aarch64" "alpha" "bfin" "i386" "m68k"
+ "pa" "sh" "tilepro" "xtensa")))))
(supported-systems %supported-systems)
(inputs
`(("isl" ,isl-0.11)
@@ -424,15 +423,13 @@ Go. It also includes runtime support libraries for these languages.")
;; This is required for building with glibc-2.26.
;; https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81712
(snippet
- '(begin
- (for-each
- (lambda (dir)
- (substitute* (string-append "libgcc/config/"
- dir "/linux-unwind.h")
- (("struct ucontext") "ucontext_t")))
- '("aarch64" "alpha" "bfin" "i386" "m68k" "nios2"
- "pa" "sh" "tilepro" "xtensa"))
- #t))))
+ '(for-each
+ (lambda (dir)
+ (substitute* (string-append "libgcc/config/"
+ dir "/linux-unwind.h")
+ (("struct ucontext") "ucontext_t")))
+ '("aarch64" "alpha" "bfin" "i386" "m68k" "nios2"
+ "pa" "sh" "tilepro" "xtensa")))))
;; Override inherited texinfo-5 with latest version.
(native-inputs `(("perl" ,perl) ;for manpages
("texinfo" ,texinfo)))
@@ -460,8 +457,18 @@ Go. It also includes runtime support libraries for these languages.")
":"))
(format #t
"environment variable `CPLUS_INCLUDE_PATH' changed to ~a~%"
- (getenv "CPLUS_INCLUDE_PATH"))
- #t))))))))))
+ (getenv "CPLUS_INCLUDE_PATH"))))))))))))
+
+(define gcc-canadian-cross-objdump-snippet
+ ;; Fix 'libcc1/configure' error when cross-compiling GCC. Without that,
+ ;; 'libcc1/configure' wrongfully determines that '-rdynamic' support is
+ ;; missing because $gcc_cv_objdump is empty:
+ ;;
+ ;; https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67590
+ ;; http://cgit.openembedded.org/openembedded-core/commit/?id=f6e47aa9b12f9ab61530c40e0343f451699d9077
+ #~(substitute* "libcc1/configure"
+ (("\\$gcc_cv_objdump -T")
+ "$OBJDUMP_FOR_TARGET -T")))
(define-public gcc-5
;; Note: GCC >= 5 ships with .info files but 'make install' fails to install
@@ -483,21 +490,11 @@ Go. It also includes runtime support libraries for these languages.")
"gcc-5-source-date-epoch-2.patch"
"gcc-6-libsanitizer-mode-size.patch"
"gcc-fix-texi2pod.patch"
- "gcc-5-hurd.patch"))
+ "gcc-5-hurd.patch"
+ ;; See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86162
+ "gcc-5-fix-powerpc64le-build.patch"))
(modules '((guix build utils)))
- (snippet
- ;; Fix 'libcc1/configure' error when cross-compiling GCC.
- ;; Without that, 'libcc1/configure' wrongfully determines that
- ;; '-rdynamic' support is missing because $gcc_cv_objdump is
- ;; empty:
- ;;
- ;; https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67590
- ;; http://cgit.openembedded.org/openembedded-core/commit/?id=f6e47aa9b12f9ab61530c40e0343f451699d9077
- '(begin
- (substitute* "libcc1/configure"
- (("\\$gcc_cv_objdump -T")
- "$OBJDUMP_FOR_TARGET -T"))
- #t))))
+ (snippet gcc-canadian-cross-objdump-snippet)))
(inputs
`(;; GCC5 needs <isl/band.h> which is removed in later versions.
("isl" ,isl-0.18)
@@ -565,7 +562,9 @@ It also includes runtime support libraries for these languages.")))
"0l7d4m9jx124xsk6xardchgy2k5j5l2b15q322k31f0va4d8826k"))
(patches (search-patches "gcc-8-strmov-store-file-names.patch"
"gcc-5.0-libvtv-runpath.patch"
- "gcc-8-sort-libtool-find-output.patch"))))))
+ "gcc-8-sort-libtool-find-output.patch"))
+ (modules '((guix build utils)))
+ (snippet gcc-canadian-cross-objdump-snippet)))))
(define-public gcc-9
(package
@@ -580,7 +579,9 @@ It also includes runtime support libraries for these languages.")))
"13l3p6g2krilaawbapmn9zmmrh3zdwc36mfr3msxfy038hps6pf9"))
(patches (search-patches "gcc-9-strmov-store-file-names.patch"
"gcc-9-asan-fix-limits-include.patch"
- "gcc-5.0-libvtv-runpath.patch"))))))
+ "gcc-5.0-libvtv-runpath.patch"))
+ (modules '((guix build utils)))
+ (snippet gcc-canadian-cross-objdump-snippet)))))
(define-public gcc-10
(package
@@ -594,7 +595,9 @@ It also includes runtime support libraries for these languages.")))
(base32
"0i6378ig6h397zkhd7m4ccwjx5alvzrf2hm27p1pzwjhlv0h9x34"))
(patches (search-patches "gcc-9-strmov-store-file-names.patch"
- "gcc-5.0-libvtv-runpath.patch"))))))
+ "gcc-5.0-libvtv-runpath.patch"))
+ (modules '((guix build utils)))
+ (snippet gcc-canadian-cross-objdump-snippet)))))
(define-public gcc-11
(package
@@ -608,11 +611,13 @@ It also includes runtime support libraries for these languages.")))
(base32
"12zs6vd2rapp42x154m479hg3h3lsafn3xhg06hp5hsldd9xr3nh"))
(patches (search-patches "gcc-9-strmov-store-file-names.patch"
- "gcc-5.0-libvtv-runpath.patch"))))))
+ "gcc-5.0-libvtv-runpath.patch"))
+ (modules '((guix build utils)))
+ (snippet gcc-canadian-cross-objdump-snippet)))))
;; Note: When changing the default gcc version, update
;; the gcc-toolchain-* definitions.
-(define-public gcc gcc-7)
+(define-public gcc gcc-10)
(define-public (make-libstdc++ gcc)
"Return a libstdc++ package based on GCC. The primary use case is when
@@ -623,25 +628,16 @@ using compilers other than GCC."
(arguments
`(#:out-of-source? #t
#:phases
- ;; TODO: Use the target-powerpc arm for everyone.
- ,(if (target-powerpc?)
- `(modify-phases %standard-phases
- ;; Force rs6000 (i.e., powerpc) libdir to be /lib and not /lib64.
- (add-before 'chdir 'fix-rs6000-libdir
- (lambda _
- (when (file-exists? "gcc/config/rs6000")
- (substitute* (find-files "gcc/config/rs6000")
- (("/lib64") "/lib")))
- #t))
- (add-before 'configure 'chdir
- (lambda _
- (chdir "libstdc++-v3")
- #t)))
- `(alist-cons-before 'configure 'chdir
- (lambda _
- (chdir "libstdc++-v3")
- #t)
- %standard-phases))
+ (modify-phases %standard-phases
+ ;; Force rs6000 (i.e., powerpc) libdir to be /lib and not /lib64.
+ (add-before 'chdir 'fix-rs6000-libdir
+ (lambda _
+ (when (file-exists? "gcc/config/rs6000")
+ (substitute* (find-files "gcc/config/rs6000")
+ (("/lib64") "/lib")))))
+ (add-before 'configure 'chdir
+ (lambda _
+ (chdir "libstdc++-v3"))))
#:configure-flags `("--disable-libstdcxx-pch"
,(string-append "--with-gxx-include-dir="
@@ -692,16 +688,14 @@ using compilers other than GCC."
(modify-phases %standard-phases
(add-before 'configure 'chdir
(lambda _
- (chdir "libiberty")
- #t))
+ (chdir "libiberty")))
(replace 'install
(lambda* (#:key outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))
(lib (string-append out "/lib/"))
(include (string-append out "/include/")))
(install-file "libiberty.a" lib)
- (install-file "../include/libiberty.h" include))
- #t)))))
+ (install-file "../include/libiberty.h" include)))))))
(inputs '())
(outputs '("out"))
(native-inputs '())
@@ -741,10 +735,10 @@ as the 'native-search-paths' field."
`(modify-phases ,phases
(add-after 'install 'remove-broken-or-conflicting-files
(lambda* (#:key outputs #:allow-other-keys)
- (for-each delete-file
- (find-files (string-append (assoc-ref outputs "out") "/bin")
- ".*(c\\+\\+|cpp|g\\+\\+|gcov|gcc|gcc-.*)"))
- #t))))))))
+ (for-each
+ delete-file
+ (find-files (string-append (assoc-ref outputs "out") "/bin")
+ ".*(c\\+\\+|cpp|g\\+\\+|gcov|gcc|lto)(-.*)?$"))))))))))
(define* (custom-gcc-gccgo gcc name languages
#:optional
@@ -796,12 +790,13 @@ as the 'native-search-paths' field."
(define-public gfortran
(hidden-package
- (custom-gcc (package
- (inherit gcc)
- ;; XXX: Remove LIBSTDC++-HEADERS from the inputs just to
- ;; avoid a rebuild of all the GFORTRAN dependents.
- ;; TODO: Remove this hack on the next rebuild cycle.
- (inputs (alist-delete "libstdc++" (package-inputs gcc))))
+ (custom-gcc gcc
+ "gfortran" '("fortran")
+ %generic-search-paths)))
+
+(define-public gfortran-7
+ (hidden-package
+ (custom-gcc gcc-7
"gfortran" '("fortran")
%generic-search-paths)))
@@ -839,8 +834,7 @@ as the 'native-search-paths' field."
(lambda* (#:key outputs #:allow-other-keys)
(for-each delete-file
(find-files (string-append (assoc-ref outputs "out") "/bin")
- ".*(c\\+\\+|cpp|g\\+\\+|gcov|gcc|gcc-.*)"))
- #t))))))
+ ".*(c\\+\\+|cpp|g\\+\\+|gcov|gcc|gcc-.*)"))))))))
(synopsis "GCC library generating machine code on-the-fly at runtime")
(description
"This package is part of the GNU Compiler Collection and provides an
@@ -946,7 +940,7 @@ provides the GNU compiler for the Go programming language."))
(custom-gcc gcc-10 "gcc-objc" '("objc")
%objc-search-paths))
-(define-public gcc-objc gcc-objc-7)
+(define-public gcc-objc gcc-objc-10)
(define %objc++-search-paths
(list (search-path-specification
@@ -988,7 +982,7 @@ provides the GNU compiler for the Go programming language."))
(custom-gcc gcc-10 "gcc-objc++" '("obj-c++")
%objc++-search-paths))
-(define-public gcc-objc++ gcc-objc++-7)
+(define-public gcc-objc++ gcc-objc++-10)
(define (make-libstdc++-doc gcc)
"Return a package with the libstdc++ documentation for GCC."
@@ -1013,8 +1007,7 @@ provides the GNU compiler for the Go programming language."))
#:phases (modify-phases %standard-phases
(add-before 'configure 'chdir
(lambda _
- (chdir "libstdc++-v3")
- #t))
+ (chdir "libstdc++-v3")))
(add-before 'configure 'set-xsl-directory
(lambda* (#:key inputs #:allow-other-keys)
(let ((docbook (assoc-ref inputs "docbook-xsl")))
@@ -1023,8 +1016,7 @@ provides the GNU compiler for the Go programming language."))
(("@XSL_STYLE_DIR@")
(string-append
docbook "/xml/xsl/"
- (strip-store-file-name docbook))))
- #t)))
+ (strip-store-file-name docbook)))))))
(replace 'build
(lambda _
;; XXX: There's also a 'doc-info' target, but it
@@ -1051,7 +1043,7 @@ provides the GNU compiler for the Go programming language."))
(define-public isl
(package
(name "isl")
- (version "0.22.1")
+ (version "0.23")
(source (origin
(method url-fetch)
(uri (list (string-append
@@ -1062,7 +1054,7 @@ provides the GNU compiler for the Go programming language."))
name "-" version ".tar.bz2")))
(sha256
(base32
- "1kf54jib0nind1pvakblnfhimmwzm0y1llz8470ag0di5vwqwrhs"))))
+ "0k91zck10zxs9sk3yrbb92y1j3w981w3fbwkfwd7kl779b0j52f5"))))
(build-system gnu-build-system)
(outputs '("out" "static"))
(arguments
@@ -1081,8 +1073,7 @@ provides the GNU compiler for the Go programming language."))
;; libtool looks for it in the usual locations.
(substitute* (string-append out "/lib/libisl.la")
(("^old_library=.*")
- "old_library=''\n"))
- #t))))))
+ "old_library=''\n"))))))))
(inputs `(("gmp" ,gmp)))
(home-page "http://isl.gforge.inria.fr/")
(synopsis
@@ -1208,8 +1199,7 @@ effective code.")
(copy-file file
(string-append html "/"
file)))
- (find-files "." "\\.html$"))
- #t))))))
+ (find-files "." "\\.html$"))))))))
(synopsis "Reference manual for the C programming language")
(description
"This is a reference manual for the C programming language, as
diff --git a/gnu/packages/gd.scm b/gnu/packages/gd.scm
index 2923358d8f..1bd53a3b20 100644
--- a/gnu/packages/gd.scm
+++ b/gnu/packages/gd.scm
@@ -3,7 +3,7 @@
;;; Copyright © 2015, 2016 Mark H Weaver <mhw@netris.org>
;;; Copyright © 2015 Eric Bavier <bavier@member.fsf.org>
;;; Copyright © 2016, 2017 Leo Famulari <leo@famulari.name>
-;;; Copyright © 2017 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2017, 2021 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2017 Marius Bakke <mbakke@fastmail.com>
;;; Copyright © 2018, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
;;;
@@ -42,7 +42,7 @@
;; Note: With libgd.org now pointing to github.com, genuine old
;; tarballs are no longer available. Notably, versions 2.0.x are
;; missing.
- (version "2.3.0")
+ (version "2.3.2")
(source (origin
(method url-fetch)
(uri (string-append
@@ -50,9 +50,14 @@
version "/libgd-" version ".tar.xz"))
(sha256
(base32
- "0n5czhxzinvjvmhkf5l9fwjdx5ip69k5k7pj6zwb6zs1k9dibngc"))
- (patches (search-patches "gd-fix-tests-on-i686.patch"
- "gd-brect-bounds.patch"))))
+ "1yypywkh8vphcy4qqpf51kxpb0a3r7rjqk3fc61rpn70hiq092j7"))
+ (patches
+ (search-patches "gd-fix-tests-on-i686.patch"
+ "gd-brect-bounds.patch"
+ ;; Drop when
+ ;; https://github.com/libgd/libgd/issues/691
+ ;; is solved.
+ "gd-Revert-fix-303-gdlib.pc.patch"))))
(build-system gnu-build-system)
(arguments
;; As recommended by github.com/libgd/libgd/issues/278 to fix rounding
@@ -61,15 +66,14 @@
#:configure-flags '("--disable-static")
#:phases
(modify-phases %standard-phases
- ;; This test is known to fail on i686-linux:
+ ;; This test is known to fail on most architectures:
;; https://github.com/libgd/libgd/issues/359
;; TODO Replace this substitution with an upstream bug fix.
(add-after 'unpack 'disable-failing-test
(lambda _
(substitute* "tests/gdimagegrayscale/basic.c"
(("return gdNumFailures\\(\\)")
- "return 0"))
- #t)))))
+ "return 0")))))))
(native-inputs
`(("pkg-config" ,pkg-config)))
(inputs
diff --git a/gnu/packages/gdb.scm b/gnu/packages/gdb.scm
index 8c28f82992..aa9e479e46 100644
--- a/gnu/packages/gdb.scm
+++ b/gnu/packages/gdb.scm
@@ -4,7 +4,8 @@
;;; Copyright © 2015, 2016, 2019, 2021 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2020 Marius Bakke <mbakke@fastmail.com>
;;; Copyright © 2020 Vincent Legoll <vincent.legoll@gmail.com>
-;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
+;;; Copyright © 2020, 2021 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
+;;; Copyright © 2020, 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -23,6 +24,7 @@
(define-module (gnu packages gdb)
#:use-module (gnu packages)
+ #:use-module (gnu packages bash)
#:use-module (gnu packages hurd)
#:use-module (gnu packages ncurses)
#:use-module (gnu packages readline)
@@ -34,65 +36,74 @@
#:use-module (gnu packages pretty-print)
#:use-module (gnu packages python)
#:use-module (gnu packages pkg-config)
+ #:use-module (guix download)
#:use-module ((guix licenses) #:select (gpl3+))
#:use-module (guix packages)
- #:use-module (guix download)
+ #:use-module (guix utils)
#:use-module (guix build-system gnu)
#:use-module ((guix build utils) #:select (alist-replace))
#:use-module (srfi srfi-1))
-(define-public gdb-10
+(define-public gdb-11
(package
(name "gdb")
- (version "10.2")
+ (version "11.1")
(source (origin
- (method url-fetch)
- (uri (string-append "mirror://gnu/gdb/gdb-"
- version ".tar.xz"))
- (sha256
- (base32
- "0aag1c0fw875pvhjg1qp7x8pf6gf92bjv5gcic5716scacyj58da"))))
-
+ (method url-fetch)
+ (uri (string-append "mirror://gnu/gdb/gdb-"
+ version ".tar.xz"))
+ (sha256
+ (base32
+ "151z6d0265hv9cgx9zqqa4bd6vbp20hrljhd6bxl7lr0gd0crkyc"))))
(build-system gnu-build-system)
+ (outputs '("out" "debug"))
(arguments
- `(#:tests? #f ; FIXME "make check" fails on single-processor systems.
-
+ `(#:tests? #f ;FIXME: 217 unexpected failures
#:out-of-source? #t
-
#:modules ((srfi srfi-1)
,@%gnu-build-system-modules)
-
#:phases (modify-phases %standard-phases
- (add-after
- 'configure 'post-configure
- (lambda _
- (for-each patch-makefile-SHELL
- (find-files "." "Makefile\\.in"))
- #t))
- (add-after
- 'install 'remove-libs-already-in-binutils
- (lambda* (#:key native-inputs inputs outputs
- #:allow-other-keys)
- ;; Like Binutils, GDB installs libbfd, libopcodes, etc.
- ;; However, this leads to collisions when both are
- ;; installed, and really is none of its business,
- ;; conceptually. So remove them.
- (let* ((binutils (or (assoc-ref inputs "binutils")
- (assoc-ref native-inputs "binutils")))
- (out (assoc-ref outputs "out"))
- (files1 (with-directory-excursion binutils
- (append (find-files "lib")
- (find-files "include"))))
- (files2 (with-directory-excursion out
- (append (find-files "lib")
- (find-files "include"))))
- (common (lset-intersection string=?
- files1 files2)))
- (with-directory-excursion out
- (for-each delete-file common)
- #t)))))))
+ (add-after 'unpack 'patch-paths
+ (lambda* (#:key inputs #:allow-other-keys)
+ (let ((sh (string-append (assoc-ref inputs "bash")
+ "/bin/sh")))
+ (substitute* '("gdb/ser-pipe.c"
+ "gdbsupport/pathstuff.cc")
+ (("\"/bin/sh\"")
+ (format #f "~s" sh))))))
+ ,@(if (hurd-target?)
+ '((add-after 'unpack 'patch-gdb/hurd
+ (lambda* (#:key inputs #:allow-other-keys)
+ (let ((patch (assoc-ref inputs "hurd-build.patch")))
+ (invoke "patch" "-p1" "--force" "-i" patch)))))
+ '())
+ (add-after 'configure 'post-configure
+ (lambda _
+ (for-each patch-makefile-SHELL
+ (find-files "." "Makefile\\.in"))))
+ (add-after 'install 'remove-libs-already-in-binutils
+ (lambda* (#:key native-inputs inputs outputs
+ #:allow-other-keys)
+ ;; Like Binutils, GDB installs libbfd, libopcodes, etc.
+ ;; However, this leads to collisions when both are
+ ;; installed, and really is none of its business,
+ ;; conceptually. So remove them.
+ (let* ((binutils (or (assoc-ref inputs "binutils")
+ (assoc-ref native-inputs "binutils")))
+ (out (assoc-ref outputs "out"))
+ (files1 (with-directory-excursion binutils
+ (append (find-files "lib")
+ (find-files "include"))))
+ (files2 (with-directory-excursion out
+ (append (find-files "lib")
+ (find-files "include"))))
+ (common (lset-intersection string=?
+ files1 files2)))
+ (with-directory-excursion out
+ (for-each delete-file common))))))))
(inputs
- `(("expat" ,expat)
+ `(("bash" ,bash)
+ ("expat" ,expat)
("mpfr" ,mpfr)
("gmp" ,gmp)
("readline" ,readline)
@@ -106,18 +117,28 @@
("libxml2" ,libxml2)
;; The Hurd needs -lshouldbeinlibc.
- ,@(if (hurd-target?) `(("hurd" ,hurd)) '())))
+ ,@(if (hurd-target?)
+ `(("hurd" ,hurd)
+ ("hurd-build.patch"
+ ,(search-patch "gdb-fix-gnu-nat-build.patch")))
+ '())))
(native-inputs
- `(("texinfo" ,texinfo)
- ("dejagnu" ,dejagnu)
- ("pkg-config" ,pkg-config)
- ,@(if (hurd-target?)
- ;; When cross-compiling from x86_64-linux, make sure to use a
- ;; 32-bit MiG because we assume target i586-pc-gnu.
- `(("mig" ,(if (%current-target-system)
- mig/32-bit
- mig)))
- '())))
+ `(("texinfo" ,texinfo)
+ ("dejagnu" ,dejagnu)
+ ("pkg-config" ,pkg-config)
+ ,@(if (hurd-target?)
+ ;; When cross-compiling from x86_64-linux, make sure to use a
+ ;; 32-bit MiG because we assume target i586-pc-gnu.
+ `(("mig" ,(if (%current-target-system)
+ mig/32-bit
+ mig)))
+ '())))
+ ;; TODO: Add support for the GDB_DEBUG_FILE_DIRECTORY environment
+ ;; variable in GDB itself instead of relying on some glue code in
+ ;; the Guix-provided .gdbinit file.
+ (native-search-paths (list (search-path-specification
+ (variable "GDB_DEBUG_FILE_DIRECTORY")
+ (files '("lib/debug")))))
(home-page "https://www.gnu.org/software/gdb/")
(synopsis "The GNU debugger")
(description
@@ -128,31 +149,13 @@ the program is running to try to fix bugs. It can be used to debug programs
written in C, C++, Ada, Objective-C, Pascal and more.")
(license gpl3+)))
-;; This version of GDB is required by some of the Rust compilers, see
-;; <https://bugs.gnu.org/37810>.
-(define-public gdb-8.2
- (package
- (inherit gdb-10)
- (version "8.2.1")
- (source (origin
- (method url-fetch)
- (uri (string-append "mirror://gnu/gdb/gdb-"
- version ".tar.xz"))
- (sha256
- (base32
- "00i27xqawjv282a07i73lp1l02n0a3ywzhykma75qg500wll6sha"))))
- (inputs
- (alist-replace "guile" (list guile-2.0)
- (package-inputs gdb-10)))))
-
(define-public gdb
;; This is the fixed version that packages depend on. Update it rarely
;; enough to avoid massive rebuilds.
- gdb-10)
+ gdb-11)
(define-public gdb-minimal
- (package/inherit
- gdb
- (name "gdb-minimal")
- (inputs (fold alist-delete (package-inputs gdb)
- '("libxml2" "ncurses" "python-wrapper" "source-highlight")))))
+ (package/inherit gdb
+ (name "gdb-minimal")
+ (inputs (fold alist-delete (package-inputs gdb)
+ '("libxml2" "ncurses" "python-wrapper" "source-highlight")))))
diff --git a/gnu/packages/genimage.scm b/gnu/packages/genimage.scm
index f5574b04ee..7f2270cc09 100644
--- a/gnu/packages/genimage.scm
+++ b/gnu/packages/genimage.scm
@@ -41,96 +41,98 @@
#:use-module (gnu packages virtualization))
(define-public genimage
- (package
- (name "genimage")
- (version "14")
- (source (origin
- (method git-fetch)
- (uri (git-reference
- (url "https://github.com/pengutronix/genimage")
- (commit (string-append "v" version))))
- (file-name (git-file-name name version))
- (sha256
- (base32
- "1l45djpbaffhyw0allq3mgzwrdilk05iyj0nvp8l3s47vnp5bnbs"))
- (patches
- (search-patches "genimage-mke2fs-test.patch"))))
- (build-system gnu-build-system)
- (arguments
- `(#:modules
- ((ice-9 match)
- ,@%gnu-build-system-modules)
- #:phases
- (modify-phases %standard-phases
- (add-after 'unpack 'guixify
- (lambda* (#:key inputs #:allow-other-keys)
- (map (match-lambda
- ((input directory regexp)
- (substitute* "config.c"
- (((format #f "\\.def = \"(~a)\"" regexp) _ command)
- (format #f ".def = \"~a/~a/~a\""
- (assoc-ref inputs input) directory command)))))
- '(("cpio" "bin" "cpio")
- ("coreutils" "bin" "dd")
- ("e2fsprogs" "sbin" "debugfs|e2fsck|mke2fs|tune2fs")
- ("genext2fs" "bin" "genext2fs")
- ("cdrkit-libre" "bin" "genisoimage")
- ("mtools" "bin" "mcopy|mmd")
- ;; mkcramfs is obsolete.
- ("dosfstools" "sbin" "mkdosfs")
- ("mtd-utils" "sbin" "mkfs.(jffs2|ubifs)|ubinize")
- ("squashfs-tools" "bin" "mksquashfs")
- ("qemu" "bin" "qemu-img")
- ("tar" "bin" "tar")
- ("u-boot-tools" "bin" "mkimage")))
- (substitute* "util.c"
- (("\"/bin/sh\"")
- (string-append "\"" (assoc-ref inputs "bash") "/bin/sh\"")))))
- (add-before 'check 'fix-failing-tests
- (lambda _
- ;; We don't have /etc/passwd so uid 0 is not known as "root".
- ;; Thus patch it out.
- (substitute* '("test/ext2test.dump"
- "test/ext3test.dump"
- "test/ext4test.dump"
- "test/ext2test-percent.dump"
- "test/mke2fs.dump")
- (("root") "unknown"))))
- (add-before 'check 'setenv-check
- (lambda _
- ;; Our container doesn't provide access to /etc/mtab
- (setenv "EXT2FS_NO_MTAB_OK" "1")
- ;; Make test reproducible
- (setenv "GENIMAGE_MKFJFFS2" "mkfs.jffs2 -U")
- (setenv "GENIMAGE_MKE2FS" "mke2fs -E no_copy_xattrs")))
- (replace 'check
- (lambda _
- (invoke "make" "TEST_LOG_COMPILER=" "check"))))))
- (native-inputs
- `(("autoconf" ,autoconf)
- ("automake" ,automake)
+ (let ((commit "11bb04455eaf5434f0723c91a2224918ebd0a196")
+ (revision "1"))
+ (package
+ (name "genimage")
+ (version (git-version "14" revision commit))
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/pengutronix/genimage")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1dq3lk0awk12v2aidry35gvrci5a3nr6rzcq0j9hyyf0w1z1rn0l"))
+ (patches
+ (search-patches "genimage-mke2fs-test.patch"))))
+ (build-system gnu-build-system)
+ (arguments
+ `(#:modules
+ ((ice-9 match)
+ ,@%gnu-build-system-modules)
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'guixify
+ (lambda* (#:key inputs #:allow-other-keys)
+ (map (match-lambda
+ ((input directory regexp)
+ (substitute* "config.c"
+ (((format #f "\\.def = \"(~a)\"" regexp) _ command)
+ (format #f ".def = \"~a/~a/~a\""
+ (assoc-ref inputs input) directory command)))))
+ '(("cpio" "bin" "cpio")
+ ("coreutils" "bin" "dd")
+ ("e2fsprogs" "sbin" "debugfs|e2fsck|mke2fs|tune2fs")
+ ("genext2fs" "bin" "genext2fs")
+ ("cdrkit-libre" "bin" "genisoimage")
+ ("mtools" "bin" "mcopy|mmd")
+ ;; mkcramfs is obsolete.
+ ("dosfstools" "sbin" "mkdosfs")
+ ("mtd-utils" "sbin" "mkfs.(jffs2|ubifs)|ubinize")
+ ("squashfs-tools" "bin" "mksquashfs")
+ ("qemu" "bin" "qemu-img")
+ ("tar" "bin" "tar")
+ ("u-boot-tools" "bin" "mkimage")))
+ (substitute* "util.c"
+ (("\"/bin/sh\"")
+ (string-append "\"" (assoc-ref inputs "bash") "/bin/sh\"")))))
+ (add-before 'check 'fix-failing-tests
+ (lambda _
+ ;; We don't have /etc/passwd so uid 0 is not known as "root".
+ ;; Thus patch it out.
+ (substitute* '("test/ext2test.0.dump"
+ "test/ext3test.0.dump"
+ "test/ext4test.0.dump"
+ "test/ext2test-percent.0.dump"
+ "test/mke2fs.0.dump")
+ (("root") "unknown"))))
+ (add-before 'check 'setenv-check
+ (lambda _
+ ;; Our container doesn't provide access to /etc/mtab
+ (setenv "EXT2FS_NO_MTAB_OK" "1")
+ ;; Make test reproducible
+ (setenv "GENIMAGE_MKFJFFS2" "mkfs.jffs2 -U")
+ (setenv "GENIMAGE_MKE2FS" "mke2fs -E no_copy_xattrs")))
+ (replace 'check
+ (lambda _
+ (invoke "make" "TEST_LOG_COMPILER=" "check"))))))
+ (native-inputs
+ `(("autoconf" ,autoconf)
+ ("automake" ,automake)
;;; Note: cramfs is obsolete.
- ("dtc" ,dtc) ; for the tests
- ("pkg-config" ,pkg-config)
- ("util-linux" ,util-linux))) ; for the tests
- (inputs
- `(("bash" ,bash)
- ("cdrkit-libre" ,cdrkit-libre)
- ("cpio" ,cpio)
- ;; Note: invoked by final executable.
- ("coreutils" ,coreutils) ; chmod, dd
- ("dosfstools" ,dosfstools)
- ("e2fsprogs" ,e2fsprogs)
- ("genext2fs" ,genext2fs)
- ("libconfuse" ,libconfuse)
- ("mtd-utils" ,mtd-utils)
- ("mtools" ,mtools)
- ("qemu" ,qemu-minimal)
- ("squashfs-tools" ,squashfs-tools)
- ("tar" ,tar)
- ("u-boot-tools" ,u-boot-tools)))
- (synopsis "Create Flash images according to specification")
- (description "@command{genimage} creates Flash images according to a
+ ("dtc" ,dtc) ; for the tests
+ ("pkg-config" ,pkg-config)
+ ("util-linux" ,util-linux))) ; for the tests
+ (inputs
+ `(("bash" ,bash)
+ ("cdrkit-libre" ,cdrkit-libre)
+ ("cpio" ,cpio)
+ ;; Note: invoked by final executable.
+ ("coreutils" ,coreutils) ; chmod, dd
+ ("dosfstools" ,dosfstools)
+ ("e2fsprogs" ,e2fsprogs)
+ ("genext2fs" ,genext2fs)
+ ("libconfuse" ,libconfuse)
+ ("mtd-utils" ,mtd-utils)
+ ("mtools" ,mtools)
+ ("qemu" ,qemu-minimal)
+ ("squashfs-tools" ,squashfs-tools)
+ ("tar" ,tar)
+ ("u-boot-tools" ,u-boot-tools)))
+ (synopsis "Create Flash images according to specification")
+ (description "@command{genimage} creates Flash images according to a
specification file.")
- (home-page "https://github.com/pengutronix/genimage")
- (license license:gpl2)))
+ (home-page "https://github.com/pengutronix/genimage")
+ (license license:gpl2))))
diff --git a/gnu/packages/geo.scm b/gnu/packages/geo.scm
index 927ddb167d..84da1820f9 100644
--- a/gnu/packages/geo.scm
+++ b/gnu/packages/geo.scm
@@ -59,6 +59,7 @@
#:use-module (gnu packages bash)
#:use-module (gnu packages bison)
#:use-module (gnu packages boost)
+ #:use-module (gnu packages build-tools)
#:use-module (gnu packages check)
#:use-module (gnu packages compression)
#:use-module (gnu packages curl)
@@ -215,41 +216,32 @@ topology functions.")
(define-public gnome-maps
(package
(name "gnome-maps")
- (version "3.38.5")
+ (version "41.2")
(source (origin
(method url-fetch)
(uri (string-append "mirror://gnome/sources/" name "/"
- (version-major+minor version) "/"
+ (version-major version) "/"
name "-" version ".tar.xz"))
(sha256
(base32
- "1llgzm2ni3iy31dznqkc81vadv0fpqgpz2l9zzrj5jshvyq0akgh"))))
+ "037xmkmcmcw87vb1c1s3y225m8757k331cvk1m8cshf6mx61p0l1"))))
(build-system meson-build-system)
(arguments
- `(#:glib-or-gtk? #t
+ `(#:meson ,meson-0.59 ;positional arguments error with meson 0.60
+ #:glib-or-gtk? #t
#:phases
(modify-phases %standard-phases
(add-after 'unpack 'skip-gtk-update-icon-cache
;; Don't create 'icon-theme.cache'.
(lambda _
(substitute* "meson_post_install.py"
- (("gtk-update-icon-cache") "true"))
- #t))
+ (("gtk-update-icon-cache") "true"))))
(add-after 'unpack 'patch-dbus-service
(lambda* (#:key outputs #:allow-other-keys)
(substitute* "data/org.gnome.Maps.service.in"
(("@pkgdatadir@/org.gnome.Maps")
- (string-append (assoc-ref outputs "out") "/bin/gnome-maps")))
- #t))
- (add-after 'unpack 'fix-broken-tests
- (lambda _
- ;; For some reason setting LC_ALL=C and LANG=C as done in the
- ;; build system does not prevent these gratuitous commas from
- ;; being inserted.
- (substitute* "tests/utilsTest.js"
- (("1001 m") "1,001 m")
- (("1000 ft") "1,000 ft")
- (("5282 ft") "5,282 ft"))))
+ (string-append (assoc-ref outputs "out")
+ "/bin/gnome-maps")))))
(add-after 'install 'wrap
(lambda* (#:key inputs outputs #:allow-other-keys)
(let ((out (assoc-ref outputs "out"))
@@ -287,11 +279,12 @@ topology functions.")
("folks" ,folks)
("libchamplain" ,libchamplain)
("libgee" ,libgee)
+ ("libhandy" ,libhandy)
("libsecret" ,libsecret)
- ("libsoup" ,libsoup)
+ ("libsoup" ,libsoup-minimal-2)
("libgweather" ,libgweather)
("libxml2" ,libxml2)
- ("gdk-pixbuf" ,gdk-pixbuf+svg)
+ ("librsvg" ,librsvg)
("glib-networking" ,glib-networking)
("geoclue" ,geoclue)
("geocode-glib" ,geocode-glib)
@@ -302,7 +295,7 @@ topology functions.")
("gsettings-desktop-schemas" ,gsettings-desktop-schemas)
("gtk+" ,gtk+)
("rest" ,rest)
- ("webkitgtk" ,webkitgtk)))
+ ("webkitgtk" ,webkitgtk-with-libsoup2)))
(synopsis "Graphical map viewer and wayfinding program")
(description "GNOME Maps is a graphical map viewer. It uses map data from
the OpenStreetMap project. It can provide directions for walking, bicycling,
@@ -492,14 +485,12 @@ coverages using a SpatiaLite DBMS.")
'("--enable-rttopo=yes")
#:phases
(modify-phases %standard-phases
- ;; 3 tests are failing, ignore them:
+ ;; 1 test is failing, ignore it:
(add-after 'unpack 'ignore-broken-tests
(lambda _
(substitute* '("test/Makefile.in")
- (("\tcheck_sql_stmt.* (check_sql_.*)" all tiny) (string-append "\t" tiny))
- (("(\tch.*) check_v.*ble2.*$" all vt1) (string-append vt1 " \\\n"))
- (("\tch.* (check_v.*ble4.*)$" all vt4) (string-append "\t" vt4)))
- #t)))))
+ (("check_wms\\$\\(EXEEXT\\) check_drop_rename\\$\\(EXEEXT\\) ")
+ "check_wms$(EXEEXT) ")))))))
(synopsis "Extend SQLite to support Spatial SQL capabilities")
(description
"SpatiaLite is a library intended to extend the SQLite core to support
@@ -1356,7 +1347,7 @@ OpenStreetMap data files.")
("glib" ,glib)
("gobject-introspection" ,gobject-introspection)
("gtk+" ,gtk+)
- ("libsoup" ,libsoup)))
+ ("libsoup" ,libsoup-minimal-2)))
(home-page "https://nzjrs.github.io/osm-gps-map/")
(synopsis "GTK+ widget for displaying OpenStreetMap tiles")
(description
@@ -1376,6 +1367,7 @@ map display. Downloads map data from a number of websites, including
(url "https://github.com/opengribs/XyGrib")
(commit (string-append "v" version))))
(file-name (git-file-name name version))
+ (patches (search-patches "xygrib-fix-finding-data.patch"))
(sha256
(base32
"0xzsm8pr0zjk3f8j880fg5n82jyxn8xf1330qmmq1fqv7rsrg9ia"))
@@ -1390,18 +1382,15 @@ map display. Downloads map data from a number of websites, including
#t))))
(build-system cmake-build-system)
(arguments
- `(#:phases
+ `(#:configure-flags (list "-DGNU_PACKAGE=ON")
+
+ #:phases
(modify-phases %standard-phases
(add-after 'unpack 'patch-directories
(lambda* (#:key inputs #:allow-other-keys)
(let ((jpeg (assoc-ref inputs "openjpeg"))
(font (assoc-ref inputs "font-liberation")))
(substitute* "CMakeLists.txt"
- ;; Find libjpeg.
- (("/usr") jpeg)
- ;; Fix install locations.
- (("set\\(PREFIX_BIN.*") "set(PREFIX_BIN \"bin\")\n")
- (("set\\(PREFIX_PKGDATA.*") "set(PREFIX_PKGDATA \"share/${PROJECT_NAME}\")\n")
;; Skip looking for the static library.
(("\"libnova.a\"") ""))
;; Don't use the bundled font-liberation.
@@ -1410,8 +1399,7 @@ map display. Downloads map data from a number of websites, including
(string-append "\"" font "/share/fonts/truetype/\"")))
(substitute* "src/util/Util.h"
(("pathData\\(\\)\\+\"data/fonts/\"")
- (string-append "\"" font "/share/fonts/\""))))
- #t)))
+ (string-append "\"" font "/share/fonts/\"")))))))
#:tests? #f)) ; no tests
(native-inputs
`(("qttools" ,qttools)))
@@ -1424,6 +1412,10 @@ map display. Downloads map data from a number of websites, including
("proj" ,proj)
("qtbase" ,qtbase-5)
("zlib" ,zlib)))
+ (native-search-paths
+ (list (search-path-specification
+ (variable "XDG_DATA_DIRS")
+ (files '("share")))))
(synopsis "Weather Forecast Visualization")
(description
"XyGrib is a Grib file reader and visualizes meteorological data providing
@@ -1904,22 +1896,7 @@ using the dataset of topographical information collected by
;; of QMapShack, but they are not applied by default, for
;; some reason...
(invoke "patch" "-p1" "-i" "FindPROJ4.patch")
- (invoke "patch" "-p1" "-i" "FindQuaZip5.patch")
- #t))
- (add-after 'install 'wrap
- ;; The program fails to find the QtWebEngineProcess program,
- ;; so we set QTWEBENGINEPROCESS_PATH to help it.
- (lambda* (#:key inputs outputs #:allow-other-keys)
- (let ((bin (string-append (assoc-ref outputs "out") "/bin"))
- (qtwebengineprocess (string-append
- (assoc-ref inputs "qtwebengine")
- "/lib/qt5/libexec/QtWebEngineProcess")))
- (for-each (lambda (program)
- (wrap-program program
- `("QTWEBENGINEPROCESS_PATH" =
- (,qtwebengineprocess))))
- (find-files bin ".*")))
- #t)))))
+ (invoke "patch" "-p1" "-i" "FindQuaZip5.patch"))))))
(synopsis "GPS mapping application")
(description
"QMapShack can be used to plan your next outdoor trip or to visualize and
@@ -2039,7 +2016,7 @@ exchanged form one Spatial DBMS and the other.")
(define-public opencpn
(package
(name "opencpn")
- (version "5.0.0")
+ (version "5.2.4")
(source
(origin
(method git-fetch)
@@ -2048,7 +2025,7 @@ exchanged form one Spatial DBMS and the other.")
(commit (string-append "v" version))))
(file-name (git-file-name name version))
(sha256
- (base32 "1xv3h6svw9aay5ixpql231md3pf00qxvhg62z88daraf18hlkfja"))))
+ (base32 "0ffx0lmz1mp5433zqyxigy4qqav32xprpagd66krvihkyvqp2y6y"))))
(build-system cmake-build-system)
(native-inputs
`(("gettext" ,gettext-minimal)
@@ -2074,19 +2051,23 @@ exchanged form one Spatial DBMS and the other.")
("xz" ,xz)
("zlib" ,zlib)))
(arguments
- `(#:configure-flags '("-DENABLE_PORTAUDIO=ON"
- "-DENABLE_SNDFILE=ON"
- "-DBUNDLE_TCDATA=ON"
- "-DBUNDLE_GSHHS=CRUDE")
+ `(#:configure-flags '("-DOCPN_USE_BUNDLED_LIBS=OFF"
+ "-DOCPN_ENABLE_PORTAUDIO=ON"
+ "-DOCPN_ENABLE_SNDFILE=ON"
+ "-DOCPN_BUNDLE_TCDATA=ON"
+ "-DOCPN_BUNDLE_GSHHS=ON")
#:tests? #f ; No tests defined
#:phases
(modify-phases %standard-phases
(add-after 'unpack 'fix-build
- (lambda _
+ (lambda* (#:key inputs #:allow-other-keys)
(substitute* "CMakeLists.txt"
- (("set\\(wxWidgets_CONFIG_OPTIONS.*--toolkit=gtk3" all)
- (string-append all " --libs all")))
- #t)))))
+ (("wx-32.c; cc")
+ "wx-32.c; gcc")
+ (("\"/bin/sh\" \"-c\"")
+ (string-append "\"" (which "bash") "\" \"-c\""))
+ (("include\\(TargetSetup\\)")
+ "set(PKG_TARGET \"guix\")\nset(PKG_TARGET_VERSION 1)")))))))
(synopsis "Chart plotter and marine GPS navigation software")
(description
"OpenCPN is a chart plotter and marine navigation software designed to be
@@ -2163,8 +2144,7 @@ track your position right from your laptop.")
(modify-phases %standard-phases
(replace 'configure
(lambda* (#:key inputs outputs #:allow-other-keys)
- (let ((shell (string-append (assoc-ref inputs "bash")
- "/bin/bash")))
+ (let ((shell (search-input-file inputs "/bin/bash")))
(setenv "SHELL" shell)
(setenv "CONFIG_SHELL" shell)
(setenv "LDFLAGS" (string-append "-Wl,-rpath -Wl,"
@@ -2337,8 +2317,7 @@ growing set of geoscientific methods.")
(replace 'check
(lambda* (#:key inputs #:allow-other-keys)
(setenv "HOME" "/tmp")
- (system (string-append (assoc-ref inputs "xorg-server")
- "/bin/Xvfb :1 &"))
+ (system "Xvfb :1 &")
(setenv "DISPLAY" ":1")
(setenv "TRAVIS" "true")
(setenv "CTEST_OUTPUT_ON_FAILURE" "1")
@@ -2360,6 +2339,7 @@ growing set of geoscientific methods.")
"PyCoreAdittions"
"PyQgsAnnotation"
"PyQgsAppStartup"
+ "PyQgsAuthBasicMethod"
"PyQgsAuthenticationSystem"
"PyQgsAuxiliaryStorage"
"PyQgsDBManagerGpkg"
@@ -2614,46 +2594,6 @@ coordinates of addresses, cities, countries, and landmarks across the globe
using third-party geocoders and other data sources.")
(license license:expat)))
-(define-public marble-qt
- (let ((release "17.08")
- (commit "fc7166eeef784732033c999ba605364f9c82d21c")
- (revision "1"))
- (package
- (name "marble-qt")
- (version (git-version release revision commit))
- (source
- (origin
- (method git-fetch)
- (uri (git-reference
- (url "https://invent.kde.org/education/marble.git/")
- (commit commit)))
- (file-name (git-file-name name version))
- (sha256
- (base32 "0m0sf3sddaib7vc5lhbmh7ziw07p1hahg02f65sgfylyl5f5kj92"))
- (patches (search-patches
- "marble-qt-add-qt-headers.patch"))))
- (build-system cmake-build-system)
- (arguments
- `(#:tests? #f ; libmarblewidget-qt5.so.28 not found
- #:configure-flags
- '("-DCMAKE_BUILD_TYPE=Release"
- "-DWITH_KF5=FALSE")))
- (native-inputs
- `(("qttools" ,qttools)))
- (inputs
- `(("qtbase" ,qtbase-5)
- ("qtsvg" ,qtsvg)
- ("qtdeclarative" ,qtdeclarative)
- ("qtwebkit" ,qtwebkit)
- ("qtlocation" ,qtlocation)))
- (home-page "https://marble.kde.org/")
- (synopsis "Virtual globe and world atlas")
- (description "Marble is similar to a desktop globe. At closer scale it
-becomes a world atlas, while OpenStreetMap takes the user to street level. It
-supports searching for places of interest, viewing Wikipedia articles,
-creating routes by drag and drop and more.")
- (license license:gpl3))))
-
(define-public gplates
(package
(name "gplates")
diff --git a/gnu/packages/gettext.scm b/gnu/packages/gettext.scm
index 82604ee9be..a71af5bbe3 100644
--- a/gnu/packages/gettext.scm
+++ b/gnu/packages/gettext.scm
@@ -4,7 +4,7 @@
;;; Copyright © 2015, 2017 Ricardo Wurmus <rekado@elephly.net>
;;; Copyright © 2016, 2019 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2016 Alex Kost <alezost@gmail.com>
-;;; Copyright © 2017, 2019 Marius Bakke <mbakke@fastmail.com>
+;;; Copyright © 2017, 2019, 2020 Marius Bakke <marius@gnu.org>
;;; Copyright © 2017 Mathieu Othacehe <m.othacehe@gmail.com>
;;; Copyright © 2017 Eric Bavier <bavier@member.fsf.org>
;;; Copyright © 2018, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
@@ -52,14 +52,14 @@
(define-public gettext-minimal
(package
(name "gettext-minimal")
- (version "0.20.1")
+ (version "0.21")
(source (origin
(method url-fetch)
(uri (string-append "mirror://gnu/gettext/gettext-"
version ".tar.gz"))
(sha256
(base32
- "0p3zwkk27wm2m2ccfqm57nj7vqkmfpn7ja1nf65zmhz8qqs5chb6"))))
+ "04kbg1sx0ncfrsbr85ggjslqkzzb243fcw9nyh3rrv1a22ihszf7"))))
(build-system gnu-build-system)
(outputs '("out"
"doc")) ;9 MiB of HTML
@@ -238,12 +238,14 @@ from Markdown files.")
`(#:phases
(modify-phases %standard-phases
(add-after 'install 'wrap-programs
- (lambda* (#:key outputs #:allow-other-keys)
+ (lambda* (#:key inputs outputs #:allow-other-keys)
;; Make sure all executables in "bin" find the Perl modules
- ;; provided by this package at runtime.
+ ;; required by this package at runtime.
(let* ((out (assoc-ref outputs "out"))
(bin (string-append out "/bin/"))
- (path (string-append out "/lib/perl5/site_perl")))
+ (Pod::Parser (assoc-ref inputs "perl-pod-parser"))
+ (path (string-append out "/lib/perl5/site_perl:"
+ Pod::Parser "/lib/perl5/site_perl")))
(for-each (lambda (file)
(wrap-program file
`("PERL5LIB" ":" prefix (,path))))
@@ -263,6 +265,13 @@ from Markdown files.")
(string-append (assoc-ref inputs "docbook-xml")
"/xml/dtd/docbook/")))
#t))
+ (add-before 'build 'do-not-override-PERL5LIB
+ (lambda _
+ ;; Don't hard-code PERL5LIB to include just the build directory
+ ;; so that the build script finds modules from inputs.
+ (substitute* "Po4aBuilder.pm"
+ (("PERL5LIB=lib") ""))
+ (setenv "PERL5LIB" (string-append (getenv "PERL5LIB") ":lib"))))
(add-before 'check 'disable-failing-tests
(lambda _
;; FIXME: these tests require SGMLS.pm.
@@ -286,6 +295,8 @@ from Markdown files.")
("perl-test-pod" ,perl-test-pod)
("perl-yaml-tiny" ,perl-yaml-tiny)
("texlive" ,texlive-tiny)))
+ (inputs
+ `(("perl-pod-parser" ,perl-pod-parser)))
(home-page "https://po4a.org/")
(synopsis "Scripts to ease maintenance of translations")
(description
diff --git a/gnu/packages/ghostscript.scm b/gnu/packages/ghostscript.scm
index 03a516dc52..35e637648c 100644
--- a/gnu/packages/ghostscript.scm
+++ b/gnu/packages/ghostscript.scm
@@ -4,11 +4,12 @@
;;; Copyright © 2015 Ricardo Wurmus <rekado@elephly.net>
;;; Copyright © 2013, 2015, 2016, 2017, 2019 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2017 Alex Vong <alexvong1995@gmail.com>
-;;; Copyright © 2017, 2018, 2019 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2017, 2018, 2019, 2021 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2017 Leo Famulari <leo@famulari.name>
;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
;;; Copyright © 2018, 2020 Marius Bakke <mbakke@fastmail.com>
;;; Copyright © 2019 Mathieu Othacehe <m.othacehe@gmail.com>
+;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -48,15 +49,14 @@
(define-public lcms
(package
(name "lcms")
- (version "2.9")
+ (version "2.12")
(source (origin
(method url-fetch)
(uri (string-append "mirror://sourceforge/lcms/lcms/" version
"/lcms2-" version ".tar.gz"))
- (patches (search-patches "lcms-CVE-2018-16435.patch"))
(sha256 (base32
- "083xisy6z01zhm7p7rgk4bx9d6zlr8l20qkfv1g29ylnhgwzvij8"))))
+ "1x8hzq8kw16lgjxmqpnqah1p3hrqqhjpcl1ymiah8434x22kjrhq"))))
(build-system gnu-build-system)
(arguments
`(#:configure-flags '("--disable-static")))
@@ -69,7 +69,7 @@
focus on accuracy and performance. It uses the International Color
Consortium standard (ICC), approved as ISO 15076-1.")
(license license:x11)
- (home-page "http://www.littlecms.com/")
+ (home-page "https://www.littlecms.com/")
(properties '((cpe-name . "little_cms_color_engine")))))
(define-public libpaper
@@ -159,7 +159,7 @@ printing, and psresize, for adjusting page sizes.")
(define-public ghostscript
(package
(name "ghostscript")
- (version "9.52")
+ (version "9.54.0")
(source
(origin
(method url-fetch)
@@ -169,10 +169,8 @@ printing, and psresize, for adjusting page sizes.")
"/ghostscript-" version ".tar.xz"))
(sha256
(base32
- "0z1w42y2jmcpl2m1l3z0sfii6zmvzcwcgzn6bydklia6ig7jli2p"))
- (patches (search-patches "ghostscript-freetype-compat.patch"
- "ghostscript-CVE-2020-15900.patch"
- "ghostscript-no-header-creationdate.patch"
+ "0fvfvv6di5s6j4sy4gaw65klm23dby39bkdjxxq4w3v0vqyb9dy2"))
+ (patches (search-patches "ghostscript-no-header-creationdate.patch"
"ghostscript-no-header-id.patch"
"ghostscript-no-header-uuid.patch"))
(modules '((guix build utils)))
@@ -206,7 +204,7 @@ printing, and psresize, for adjusting page sizes.")
"--enable-dynamic"
"--disable-compile-inits"
(string-append "--with-fontpath="
- (assoc-ref %build-inputs "gs-fonts")
+ (assoc-ref %build-inputs "font-ghostscript")
"/share/fonts/type1/ghostscript")
,@(if (%current-target-system)
@@ -268,7 +266,7 @@ printing, and psresize, for adjusting page sizes.")
(native-inputs
`(("perl" ,perl)
("pkg-config" ,pkg-config) ;needed for freetype
- ("python" ,python-wrapper)
+ ("python" ,python-minimal-wrapper)
("tcl" ,tcl)
;; When cross-compiling, some of the natively-built tools require all
@@ -280,7 +278,7 @@ printing, and psresize, for adjusting page sizes.")
(inputs
`(("fontconfig" ,fontconfig)
("freetype" ,freetype)
- ("gs-fonts" ,gs-fonts)
+ ("font-ghostscript" ,font-ghostscript)
("jbig2dec" ,jbig2dec)
("libjpeg" ,libjpeg-turbo)
("libpaper" ,libpaper)
@@ -345,9 +343,9 @@ architecture.")
(license license:expat)
(home-page (package-home-page ghostscript))))
-(define-public gs-fonts
+(define-public font-ghostscript
(package
- (name "gs-fonts")
+ (name "font-ghostscript")
(version "8.11")
(source (origin
(method url-fetch)
@@ -386,16 +384,20 @@ Ghostscript. It currently includes the 35 standard PostScript fonts.")
(license license:gpl2)
(home-page "https://sourceforge.net/projects/gs-fonts/")))
+(define-public gs-fonts
+ (deprecated-package "gs-fonts" font-ghostscript))
+
(define-public libspectre
(package
(name "libspectre")
- (version "0.2.8")
+ (version "0.2.9")
(source (origin
(method url-fetch)
- (uri (string-append "https://libspectre.freedesktop.org/releases/libspectre-"
- version ".tar.gz"))
- (sha256 (base32
- "1a67iglsc3r05mzngyg9kb1gy8whq4fgsnyjwi7bqfw2i7rnl9b5"))))
+ (uri (string-append "https://libspectre.freedesktop.org/releases"
+ "/libspectre-" version ".tar.gz"))
+ (sha256
+ (base32
+ "1vgvxp77d5d9chhx4i9cv9hifw4x10jgw6aw8l2v90dgnm99rbj9"))))
(build-system gnu-build-system)
(inputs `(("ghostscript" ,ghostscript)))
(native-inputs `(("pkg-config" ,pkg-config)))
diff --git a/gnu/packages/gimp.scm b/gnu/packages/gimp.scm
index 11ec47b7e5..8c4f19d079 100644
--- a/gnu/packages/gimp.scm
+++ b/gnu/packages/gimp.scm
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2014, 2015 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2014, 2015, 2021 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2016, 2018 Ricardo Wurmus <rekado@elephly.net>
;;; Copyright © 2016, 2017, 2018, 2020 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2018, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
@@ -190,7 +190,9 @@ of a larger interface.")
"0fbh2ss1dy3sba4xjmfm4vxxjmx9a6rzgba9ycjygchbm957y3ag"))))
(build-system meson-build-system)
(arguments
- `(#:meson ,meson-0.55))
+ `(#:configure-flags
+ (list "-Denable-gir=false"
+ "-Dwith-docs=false")))
(native-inputs
`(("gobject-introspection" ,gobject-introspection)
("pkg-config" ,pkg-config)
@@ -230,7 +232,8 @@ provided, as well as a framework to add new color models and data types.")
"18cg566lplw7y7dn5v05pal24vxbfiic6097a40gnxdgkxmkr3k6"))))
(build-system meson-build-system)
(arguments
- `(#:meson ,meson-0.55
+ `(#:configure-flags
+ (list "-Dintrospection=false")
#:phases
(modify-phases %standard-phases
(add-after 'unpack 'extend-test-time-outs
@@ -322,7 +325,7 @@ buffers.")
;; Install 'sitecustomize.py' into gimp's python directory to
;; add pygobject and pygtk to pygimp's search path.
(lambda* (#:key outputs #:allow-other-keys)
- (let* ((pythonpath (getenv "PYTHONPATH"))
+ (let* ((pythonpath (getenv "GUIX_PYTHONPATH"))
(out (assoc-ref outputs "out"))
(sitecustomize.py
(string-append
@@ -393,8 +396,8 @@ that is extensible via a plugin system.")
(replace 'configure
(lambda* (#:key inputs #:allow-other-keys)
(mkdir-p "tmppkgconfig")
- (copy-file (string-append (assoc-ref inputs "gegl")
- "/lib/pkgconfig/gegl-0.4.pc")
+ (copy-file (search-input-file inputs
+ "/lib/pkgconfig/gegl-0.4.pc")
"tmppkgconfig/gegl-0.3.pc")
(setenv "PKG_CONFIG_PATH"
(string-append "tmppkgconfig:"
@@ -632,7 +635,7 @@ transferring the style of an image.")
;; Install 'sitecustomize.py' into glimpse's python directory to
;; add pygobject and pygtk to pygimp's search path.
(lambda* (#:key outputs #:allow-other-keys)
- (let* ((pythonpath (getenv "PYTHONPATH"))
+ (let* ((pythonpath (getenv "GUIX_PYTHONPATH"))
(out (assoc-ref outputs "out"))
(sitecustomize.py
(string-append
diff --git a/gnu/packages/gl.scm b/gnu/packages/gl.scm
index a417e363bb..f5a72d9048 100644
--- a/gnu/packages/gl.scm
+++ b/gnu/packages/gl.scm
@@ -12,8 +12,10 @@
;;; Copyright © 2019 Pierre Neidhardt <mail@ambrevar.xyz>
;;; Copyright © 2020 Marius Bakke <mbakke@fastmail.com>
;;; Copyright © 2020 Giacomo Leidi <goodoldpaul@autistici.org>
+;;; Copyright © 2020 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;; Copyright © 2020 Kei Kebreau <kkebreau@posteo.net>
;;; Copyright © 2021 Ivan Gankevich <i.gankevich@spbu.ru>
+;;; Copyright © 2021 John Kehayias <john.kehayias@protonmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -106,6 +108,7 @@ as ASCII text.")
(uri (string-append
"mirror://sourceforge/freeglut/freeglut/"
version "/freeglut-" version ".tar.gz"))
+ (patches (search-patches "freeglut-gcc-compat.patch"))
(sha256
(base32
"0s6sk49q8ijgbsrrryb7dzqx2fa744jhx1wck5cz5jia2010w06l"))))
@@ -235,7 +238,7 @@ also known as DXTn or DXTC) for Mesa.")
(define-public mesa
(package
(name "mesa")
- (version "20.2.4")
+ (version "21.2.5")
(source
(origin
(method url-fetch)
@@ -247,7 +250,7 @@ also known as DXTn or DXTC) for Mesa.")
version "/mesa-" version ".tar.xz")))
(sha256
(base32
- "14m09bk7akj0k02lg8fhvvzbdsashlbdsgl2cw7wbqfj2mhdqwh5"))
+ "1fxcdf4qs4vmyjcns7jv62w4jy3gr383ar5b7mr77nb0nxgmhjcf"))
(patches
(search-patches "mesa-skip-tests.patch"))))
(build-system meson-build-system)
@@ -266,11 +269,10 @@ also known as DXTn or DXTC) for Mesa.")
("libelf" ,elfutils) ;required for r600 when using llvm
("libva" ,(force libva-without-mesa))
("libxml2" ,libxml2)
- ;; TODO: Add 'libxml2-python' for OpenGL ES 1.1 and 2.0 support
("libxrandr" ,libxrandr)
("libxvmc" ,libxvmc)
,@(match (%current-system)
- ((or "x86_64-linux" "i686-linux" "powerpc64le-linux")
+ ((or "x86_64-linux" "i686-linux" "powerpc64le-linux" "aarch64-linux" "powerpc-linux")
;; Note: update the 'clang' input of mesa-opencl when bumping this.
`(("llvm" ,llvm-11)))
(_
@@ -282,12 +284,13 @@ also known as DXTn or DXTC) for Mesa.")
("flex" ,flex)
("gettext" ,gettext-minimal)
,@(match (%current-system)
- ((or "x86_64-linux" "i686-linux" "powerpc64le-linux")
+ ((or "x86_64-linux" "i686-linux" "powerpc64le-linux" "aarch64-linux" "powerpc-linux")
`(("glslang" ,glslang)))
(_
`()))
("pkg-config" ,pkg-config)
("python" ,python-wrapper)
+ ("python-libxml2", python-libxml2) ;for OpenGL ES 1.1 and 2.0 support
("python-mako" ,python-mako)
("which" ,(@ (gnu packages base) which))))
(outputs '("out" "bin"))
@@ -297,37 +300,39 @@ also known as DXTn or DXTC) for Mesa.")
((or "armhf-linux" "aarch64-linux")
;; TODO: Fix svga driver for non-Intel architectures.
'("-Dgallium-drivers=etnaviv,freedreno,kmsro,lima,nouveau,panfrost,r300,r600,swrast,tegra,v3d,vc4,virgl"))
- ("powerpc64le-linux"
+ ((or "powerpc64le-linux" "powerpc-linux")
'("-Dgallium-drivers=nouveau,r300,r600,radeonsi,swrast,virgl"))
(_
'("-Dgallium-drivers=iris,nouveau,r300,r600,radeonsi,svga,swrast,virgl")))
;; Enable various optional features. TODO: opencl requires libclc,
;; omx requires libomxil-bellagio
- "-Dplatforms=x11,drm,surfaceless,wayland"
+ "-Dplatforms=x11,wayland"
"-Dglx=dri" ;Thread Local Storage, improves performance
;; "-Dopencl=true"
;; "-Domx=true"
- "-Dosmesa=gallium"
- "-Dgallium-xa=true"
+ "-Dosmesa=true"
+ "-Dgallium-xa=enabled"
;; features required by wayland
- "-Dgles2=true"
- "-Dgbm=true"
- "-Dshared-glapi=true"
+ "-Dgles2=enabled"
+ "-Dgbm=enabled"
+ "-Dshared-glapi=enabled"
;; Explicitly enable Vulkan on some architectures.
,@(match (%current-system)
((or "i686-linux" "x86_64-linux")
'("-Dvulkan-drivers=intel,amd"))
- ("powerpc64le-linux"
- '("-Dvulkan-drivers=amd"))
+ ((or "powerpc64le-linux" "powerpc-linux")
+ '("-Dvulkan-drivers=amd,swrast"))
+ ("aarch64-linux"
+ '("-Dvulkan-drivers=freedreno,amd,broadcom,swrast"))
(_
'("-Dvulkan-drivers=auto")))
;; Enable the Vulkan overlay layer on architectures using llvm.
,@(match (%current-system)
- ((or "x86_64-linux" "i686-linux" "powerpc64le-linux")
- '("-Dvulkan-overlay-layer=true"))
+ ((or "x86_64-linux" "i686-linux" "powerpc64le-linux" "aarch64-linux" "powerpc-linux")
+ '("-Dvulkan-layers=device-select,overlay"))
(_
'()))
@@ -339,10 +344,10 @@ also known as DXTn or DXTC) for Mesa.")
,@(match (%current-system)
((or "x86_64-linux" "i686-linux")
'("-Ddri-drivers=i915,i965,nouveau,r200,r100"
- "-Dllvm=true")) ; default is x86/x86_64 only
- ("powerpc64le-linux"
+ "-Dllvm=enabled")) ; default is x86/x86_64 only
+ ((or "powerpc64le-linux" "aarch64-linux" "powerpc-linux")
'("-Ddri-drivers=nouveau,r200,r100"
- "-Dllvm=true"))
+ "-Dllvm=enabled"))
(_
'("-Ddri-drivers=nouveau,r200,r100"))))
@@ -356,25 +361,41 @@ also known as DXTn or DXTC) for Mesa.")
(guix build meson-build-system))
#:phases
(modify-phases %standard-phases
- ,@(if (string-prefix? "powerpc64le" (or (%current-target-system)
- (%current-system)))
- ;; Disable some of the llvmpipe tests.
- `((add-after 'unpack 'disable-failing-test
- (lambda _
- (substitute* "src/gallium/drivers/llvmpipe/lp_test_arit.c"
- (("0\\.5, ") ""))
- #t)))
- '())
- ,@(if (string-prefix? "i686" (or (%current-target-system)
- (%current-system)))
- ;; Disable new test from Mesa 19 that fails on i686. Upstream
- ;; report: <https://bugs.freedesktop.org/show_bug.cgi?id=110612>.
- `((add-after 'unpack 'disable-failing-test
- (lambda _
- (substitute* "src/util/tests/format/meson.build"
- (("'u_format_test',") ""))
- #t)))
- '())
+ (add-after 'unpack 'disable-failing-test
+ (lambda _
+ ,@(match (%current-system)
+ ("powerpc64le-linux"
+ ;; Disable some of the llvmpipe tests.
+ `((substitute* "src/gallium/drivers/llvmpipe/lp_test_arit.c"
+ (("0\\.5, ") ""))))
+ ("powerpc-linux"
+ ;; There are some tests which fail specifically on powerpc.
+ `((substitute* '(;; LLVM ERROR: Relocation type not implemented yet!
+ "src/gallium/drivers/llvmpipe/meson.build"
+ ;; This is probably a big-endian test failure.
+ "src/gallium/targets/osmesa/meson.build")
+ (("if with_tests") "if not with_tests"))
+ (substitute* "src/util/tests/format/meson.build"
+ ;; This is definately an endian-ness test failure.
+ (("'u_format_test', ") ""))
+ ;; It is only this portion of the test which fails.
+ (substitute* "src/mesa/main/tests/meson.build"
+ ((".*mesa_formats.*") ""))
+ ;; This test times out and receives SIGTERM.
+ (substitute* "src/amd/common/meson.build"
+ (("and not with_platform_windows") "and with_platform_windows"))))
+ ("i686-linux"
+ ;; Disable new test from Mesa 19 that fails on i686. Upstream
+ ;; report: <https://bugs.freedesktop.org/show_bug.cgi?id=110612>.
+ `((substitute* "src/util/tests/format/meson.build"
+ (("'u_format_test',") ""))))
+ ("aarch64-linux"
+ ;; The ir3_disasm test segfaults.
+ ;; The simplest way to skip it is to run a different test instead.
+ `((substitute* "src/freedreno/ir3/meson.build"
+ (("disasm\\.c'") "delay.c',\n link_args: ld_args_build_id"))))
+ (_
+ '((display "No tests to disable on this architecture.\n"))))))
(add-before 'configure 'fix-dlopen-libnames
(lambda* (#:key inputs outputs #:allow-other-keys)
(let ((out (assoc-ref outputs "out")))
@@ -392,28 +413,18 @@ also known as DXTn or DXTC) for Mesa.")
;; it's never installed since Mesa removed its
;; egl_gallium support.
(("\"gbm_dri\\.so")
- (string-append "\"" out "/lib/dri/gbm_dri.so")))
- #t)))
+ (string-append "\"" out "/lib/dri/gbm_dri.so"))))))
(add-after 'install 'split-outputs
(lambda* (#:key outputs #:allow-other-keys)
(let ((out (assoc-ref outputs "out"))
(bin (assoc-ref outputs "bin")))
- ,@(match (%current-system)
- ((or "i686-linux" "x86_64-linux" "powerpc64le-linux")
- ;; Install the Vulkan overlay control script to a separate
- ;; output to prevent a reference on Python, saving ~70 MiB
- ;; on the closure size.
- '((copy-recursively (string-append out "/bin")
- (string-append bin "/bin"))
- (delete-file-recursively (string-append out "/bin"))))
- (_
- ;; XXX: On architectures without the Vulkan overlay layer
- ;; just create an empty file because outputs can not be
- ;; added conditionally.
- '((mkdir-p (string-append bin "/bin"))
- (call-with-output-file (string-append bin "/bin/.empty")
- (const #t)))))
- #t)))
+ ;; Not all architectures have the Vulkan overlay control script.
+ (mkdir-p (string-append out "/bin"))
+ (call-with-output-file (string-append out "/bin/.empty")
+ (const #t))
+ (copy-recursively (string-append out "/bin")
+ (string-append bin "/bin"))
+ (delete-file-recursively (string-append out "/bin")))))
(add-after 'install 'symlinks-instead-of-hard-links
(lambda* (#:key outputs #:allow-other-keys)
;; All the drivers and gallium targets create hard links upon
@@ -447,8 +458,7 @@ also known as DXTn or DXTC) for Mesa.")
file)
(symlink reference file)))
others))))
- (delete-duplicates inodes))
- #t))))))
+ (delete-duplicates inodes))))))))
(home-page "https://mesa3d.org/")
(synopsis "OpenGL and Vulkan implementations")
(description "Mesa is a free implementation of the OpenGL and Vulkan
@@ -460,6 +470,10 @@ from software emulation to complete hardware acceleration for modern GPUs.")
(define-public mesa-opencl
(package/inherit mesa
(name "mesa-opencl")
+ (source (origin
+ (inherit (package-source mesa))
+ (patches (cons (search-patch "mesa-opencl-all-targets.patch")
+ (origin-patches (package-source mesa))))))
(arguments
(substitute-keyword-arguments (package-arguments mesa)
((#:configure-flags flags)
@@ -679,7 +693,7 @@ OpenGL graphics API.")
(define-public libepoxy
(package
(name "libepoxy")
- (version "1.5.4")
+ (version "1.5.5")
(source (origin
(method url-fetch)
(uri (string-append
@@ -687,7 +701,7 @@ OpenGL graphics API.")
version "/libepoxy-" version ".tar.xz"))
(sha256
(base32
- "1ll9fach4v30dsyd47s5ial4gaiwihzr2afb77vxxzzy3mlcrlhb"))))
+ "0mh5bdgqfd8m4wj6jlvn4ac94sgfa8r6ish75ciwrhdw47dn65i6"))))
(arguments
`(#:phases
(modify-phases %standard-phases
@@ -707,7 +721,8 @@ OpenGL graphics API.")
(native-inputs
`(("pkg-config" ,pkg-config)
("python" ,python)))
- (inputs
+ (propagated-inputs
+ ;; epoxy.pc: 'Requires.private: gl egl'
`(("mesa" ,mesa)))
(home-page "https://github.com/anholt/libepoxy/")
(synopsis "A library for handling OpenGL function pointer management")
diff --git a/gnu/packages/glib.scm b/gnu/packages/glib.scm
index 8ed1e3a944..398d3943e5 100644
--- a/gnu/packages/glib.scm
+++ b/gnu/packages/glib.scm
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2013, 2014, 2015, 2016, 2019, 2020 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2013, 2014, 2015, 2016, 2019, 2020, 2021 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2013, 2015 Andreas Enge <andreas@enge.fr>
;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org>
;;; Copyright © 2014, 2015, 2016, 2017, 2018, 2021 Mark H Weaver <mhw@netris.org>
@@ -11,9 +11,12 @@
;;; Copyright © 2018 Alex Vong <alexvong1995@gmail.com>
;;; Copyright © 2019, 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;; Copyright © 2019 Giacomo Leidi <goodoldpaul@autistici.org>
-;;; Copyright © 2019, 2020 Marius Bakke <mbakke@fastmail.com>
+;;; Copyright © 2019, 2020, 2021 Marius Bakke <marius@gnu.org>
;;; Copyright © 2020 Nicolò Balzarotti <nicolo@nixo.xyz>
+;;; Copyright © 2020 Florian Pelz <pelzflorian@pelzflorian.de>
+;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
;;; Copyright © 2020 Arthur Margerit <ruhtra.mar@gmail.com>
+;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -34,19 +37,24 @@
#:use-module (gnu packages)
#:use-module (gnu packages backup)
#:use-module (gnu packages base)
+ #:use-module (gnu packages bash)
#:use-module (gnu packages bison)
+ #:use-module (gnu packages boost)
#:use-module (gnu packages check)
#:use-module (gnu packages compression)
#:use-module (gnu packages docbook)
#:use-module (gnu packages documentation)
+ #:use-module (gnu packages elf)
#:use-module (gnu packages enlightenment)
#:use-module (gnu packages file)
#:use-module (gnu packages flex)
#:use-module (gnu packages gettext)
#:use-module (gnu packages gnome)
+ #:use-module (gnu packages graphviz)
#:use-module (gnu packages gperf)
#:use-module (gnu packages gtk)
#:use-module (gnu packages libffi)
+ #:use-module (gnu packages libunwind)
#:use-module (gnu packages linux)
#:use-module (gnu packages m4)
#:use-module (gnu packages nettle)
@@ -58,7 +66,6 @@
#:use-module (gnu packages pkg-config)
#:use-module (gnu packages python)
#:use-module (gnu packages python-xyz)
- #:use-module (gnu packages selinux)
#:use-module (gnu packages web)
#:use-module (gnu packages xml)
#:use-module (gnu packages xorg)
@@ -71,6 +78,8 @@
#:use-module ((guix licenses) #:prefix license:)
#:use-module (guix packages)
#:use-module (guix utils)
+ #:use-module (guix gexp)
+ #:use-module (srfi srfi-26)
#:use-module ((srfi srfi-1) #:hide (zip))
;; Export variables up-front to allow circular dependency with the 'xorg'
@@ -90,7 +99,7 @@
(define dbus
(package
(name "dbus")
- (version "1.12.16")
+ (version "1.12.20")
(source (origin
(method url-fetch)
(uri (string-append
@@ -98,9 +107,8 @@
version ".tar.gz"))
(sha256
(base32
- "107ckxaff1cv4q6kmfdi2fb1nlsv03312a7kf6lb4biglhpjv8jl"))
- (patches (search-patches "dbus-CVE-2020-12049.patch"
- "dbus-helper-search-path.patch"))))
+ "1zp5gpx61v1cpqf2zwb1cidhp9xylvw49d3zydkxqk6b1qa20xpp"))
+ (patches (search-patches "dbus-helper-search-path.patch"))))
(build-system gnu-build-system)
(arguments
'(#:configure-flags
@@ -170,254 +178,175 @@ shared NFS home directories.")
(define glib
(package
- (name "glib")
- (version "2.62.6")
- (replacement glib/fixed)
- (source (origin
- (method url-fetch)
- (uri (string-append "mirror://gnome/sources/"
- name "/" (string-take version 4) "/"
- name "-" version ".tar.xz"))
- (sha256
- (base32
- "174bsmbmcvaw69ff9g60q5sx0fn23rkhqcwqz17h5s7sprps4kqh"))
- (patches (search-patches "glib-appinfo-watch.patch"
- "glib-tests-timer.patch"))
- (modules '((guix build utils)))
- (snippet
- '(begin
- (substitute* "tests/spawn-test.c"
- (("/bin/sh") "sh"))
- #t))))
- (build-system meson-build-system)
- (outputs '("out" ; everything
- "bin")) ; glib-mkenums, gtester, etc.; depends on Python
- (propagated-inputs
- `(("pcre" ,pcre) ; in the Requires.private field of glib-2.0.pc
- ("libffi" ,libffi) ; in the Requires.private field of gobject-2.0.pc
- ;; These are in the Requires.private field of gio-2.0.pc
- ("util-linux" ,util-linux "lib") ;for libmount
- ("libselinux" ,libselinux)
- ("zlib" ,zlib)))
- (native-inputs
- `(("gettext" ,gettext-minimal)
- ("m4" ,m4) ; for installing m4 macros
- ("dbus" ,dbus) ; for GDBus tests
- ("pkg-config" ,pkg-config)
- ("python" ,python-wrapper)
- ("perl" ,perl) ; needed by GIO tests
- ("tzdata" ,tzdata-for-tests))) ; for tests/gdatetime.c
- (arguments
- `(#:disallowed-references (,tzdata-for-tests)
- #:phases
- (modify-phases %standard-phases
- (add-after 'unpack 'patch-dbus-launch-path
- (lambda* (#:key inputs #:allow-other-keys)
- (let ((dbus (assoc-ref inputs "dbus")))
- (substitute* "gio/gdbusaddress.c"
- (("command_line = g_strdup_printf \\(\"dbus-launch")
- (string-append "command_line = g_strdup_printf (\""
- dbus "/bin/dbus-launch")))
- #t)))
- (add-after 'unpack 'patch-gio-launch-desktop
- (lambda* (#:key outputs #:allow-other-keys)
- (let ((out (assoc-ref outputs "out")))
- ;; See also <https://gitlab.gnome.org/GNOME/glib/issues/1633>
- ;; for another future fix.
- (substitute* "gio/gdesktopappinfo.c"
- (("gio-launch-desktop")
- (string-append out "/libexec/gio-launch-desktop")))
- #t)))
- ;; TODO: Remove the conditional in the next core-updates cycle.
- ;; Needed to build glib on slower ARM nodes.
- ,@(if (string-prefix? "arm" (%current-system))
- `((add-after 'unpack 'increase-test-timeout
- (lambda _
- (substitute* "meson.build"
- (("test_timeout = 60")
- "test_timeout = 120")
- (("test_timeout_slow = 120")
- "test_timeout_slow = 180")))))
- '())
- (add-before 'build 'pre-build
- (lambda* (#:key inputs outputs #:allow-other-keys)
- ;; For tests/gdatetime.c.
- (setenv "TZDIR"
- (string-append (assoc-ref inputs "tzdata")
- "/share/zoneinfo"))
-
- ;; Some tests want write access there.
- (setenv "HOME" (getcwd))
- (setenv "XDG_CACHE_HOME" (getcwd))
- #t))
- (add-after 'unpack 'disable-failing-tests
- (lambda _
- (let ((disable
- (lambda (test-file test-paths)
- (define pattern+procs
- (map (lambda (test-path)
- (cons
- ;; XXX: only works for single line statements.
- (format #f "g_test_add_func.*\"~a\".*" test-path)
- (const "")))
- test-paths))
- (substitute test-file pattern+procs)))
- (failing-tests
- '(("glib/tests/thread.c"
- (;; prlimit(2) returns ENOSYS on Linux 2.6.32-5-xen-amd64
- ;; as found on hydra.gnu.org, and strace(1) doesn't
- ;; recognize it.
- "/thread/thread4"))
-
- ;; This tries to find programs in FHS directories.
- ("glib/tests/utils.c"
- ("/utils/find-program"))
-
- ;; This fails because "glib/tests/echo-script" cannot be
- ;; found.
- ("glib/tests/spawn-singlethread.c"
- ("/gthread/spawn-script"))
-
- ("glib/tests/timer.c"
- (;; fails if compiler optimizations are enabled, which they
- ;; are by default.
- "/timer/stop"))
-
- ("gio/tests/gapplication.c"
- (;; XXX: proven to be unreliable. See:
- ;; <https://bugs.debian.org/756273>
- ;; <http://bugs.gnu.org/18445>
- "/gapplication/quit"
-
- ;; XXX: fails randomly for unknown reason. See:
- ;; <https://lists.gnu.org/archive/html/guix-devel/2016-04/msg00215.html>
- "/gapplication/local-actions"))
-
- ("gio/tests/contenttype.c"
- (;; XXX: requires shared-mime-info.
- "/contenttype/guess"
- "/contenttype/guess_svg_from_data"
- "/contenttype/subtype"
- "/contenttype/list"
- "/contenttype/icon"
- "/contenttype/symbolic-icon"
- "/contenttype/tree"))
-
- ("gio/tests/appinfo.c"
- (;; XXX: requires update-desktop-database.
- "/appinfo/associations"))
-
- ("gio/tests/desktop-app-info.c"
- (;; XXX: requires update-desktop-database.
- "/desktop-app-info/delete"
- "/desktop-app-info/default"
- "/desktop-app-info/fallback"
- "/desktop-app-info/lastused"
- "/desktop-app-info/search"))
-
- ("gio/tests/gdbus-peer.c"
- (;; Requires /etc/machine-id.
- "/gdbus/codegen-peer-to-peer"))
-
- ("gio/tests/gdbus-address-get-session.c"
- (;; Requires /etc/machine-id.
- "/gdbus/x11-autolaunch"))
-
- ("gio/tests/gsocketclient-slow.c"
- (;; These tests tries to resolve "localhost", and fails.
- "/socket-client/happy-eyeballs/slow"
- "/socket-client/happy-eyeballs/cancellation/delayed"))
-
- )))
- (for-each (lambda (x) (apply disable x)) failing-tests)
- #t)))
- (replace 'check
- (lambda _
- (setenv "MESON_TESTTHREADS"
- (number->string (parallel-job-count)))
- ;; Do not run tests marked as "flaky".
- (invoke "meson" "test" "--no-suite" "flaky")))
- ;; TODO: meson does not permit the bindir to be outside of prefix.
- ;; See https://github.com/mesonbuild/meson/issues/2561
- ;; We can remove this once meson is patched.
- (add-after 'install 'move-executables
- (lambda* (#:key outputs #:allow-other-keys)
- (let ((out (assoc-ref outputs "out"))
- (bin (assoc-ref outputs "bin")))
- (mkdir-p bin)
- (rename-file (string-append out "/bin")
- (string-append bin "/bin"))
- ;; This one is an implementation detail of glib.
- ;; It is wrong that that's in "/bin" in the first place,
- ;; but that's what upstream is doing right now.
- ;; See <https://gitlab.gnome.org/GNOME/glib/issues/1633>.
- (mkdir (string-append out "/libexec"))
- (rename-file (string-append bin "/bin/gio-launch-desktop")
- (string-append out "/libexec/gio-launch-desktop"))
- ;; Do not refer to "bindir", which points to "${prefix}/bin".
- ;; We don't patch "bindir" to point to "$bin/bin", because that
- ;; would create a reference cycle between the "out" and "bin"
- ;; outputs.
- (substitute* (list (string-append out "/lib/pkgconfig/gio-2.0.pc")
- (string-append out "/lib/pkgconfig/glib-2.0.pc"))
- (("bindir=\\$\\{prefix\\}/bin") "")
- (("=\\$\\{bindir\\}/") "="))
- #t))))))
- ;; TODO: see above for explanation.
- ;; #:configure-flags (list (string-append "--bindir="
- ;; (assoc-ref %outputs "bin")
- ;; "/bin"))
-
- (native-search-paths
- ;; This variable is not really "owned" by GLib, but several related
- ;; packages refer to it: gobject-introspection's tools use it as a search
- ;; path for .gir files, and it's also a search path for schemas produced
- ;; by 'glib-compile-schemas'.
- (list (search-path-specification
- (variable "XDG_DATA_DIRS")
- (files '("share")))
- ;; To load extra gio modules from glib-networking, etc.
- (search-path-specification
- (variable "GIO_EXTRA_MODULES")
- (files '("lib/gio/modules")))))
- (search-paths native-search-paths)
- (properties '((hidden? . #t)))
-
- (synopsis "Thread-safe general utility library; basis of GTK+ and GNOME")
- (description
- "GLib provides data structure handling for C, portability wrappers,
-and interfaces for such runtime functionality as an event loop, threads,
-dynamic loading, and an object system.")
- (home-page "https://developer.gnome.org/glib/")
- (license license:lgpl2.1+)))
+ (name "glib")
+ (version "2.70.0")
+ (source
+ (origin
+ (method url-fetch)
+ (uri
+ (string-append "mirror://gnome/sources/"
+ name "/" (string-take version 4) "/"
+ name "-" version ".tar.xz"))
+ (sha256
+ (base32 "0hh7hk02fkm1bn48k4z8f3kgv9qbni5z22gizd567fn527w7s390"))
+ (patches
+ (search-patches "glib-appinfo-watch.patch"
+ "glib-skip-failing-test.patch"))
+ (modules '((guix build utils)))
+ (snippet
+ '(begin
+ (substitute* "tests/spawn-test.c"
+ (("/bin/sh") "sh"))))))
+ (build-system meson-build-system)
+ (outputs '("out" ;libraries, locales, etc
+ "static" ;static libraries
+ "bin" ;executables; depends on Python
+ "debug"))
+ (arguments
+ `(#:disallowed-references
+ (,tzdata-for-tests
+ ;; Verify glib-mkenums, gtester, ... use the cross-compiled
+ ;; python.
+ ,@(if (%current-target-system)
+ (map (cut gexp-input <> #:native? #t)
+ `(,(this-package-native-input "python")
+ ,(this-package-native-input "python-wrapper")))
+ '()))
+ #:configure-flags (list "--default-library=both"
+ "-Dman=false"
+ "-Dselinux=disabled"
+ (string-append "--bindir="
+ (assoc-ref %outputs "bin")
+ "/bin"))
+ #:phases
+ (modify-phases %standard-phases
+ ;; Needed to pass the test phase on slower ARM and i686 machines.
+ (add-after 'unpack 'increase-test-timeout
+ (lambda _
+ (substitute* "meson.build"
+ (("(test_timeout.*) = ([[:digit:]]+)" all first second)
+ (string-append first " = " second "0")))))
+ (add-after 'unpack 'disable-failing-tests
+ (lambda _
+ (substitute* "gio/tests/meson.build"
+ ((".*'testfilemonitor'.*") ;marked as flaky
+ ""))
+ (with-directory-excursion "glib/tests"
+ (substitute* '("unix.c" "utils.c")
+ (("[ \t]*g_test_add_func.*;") "")))
+ (with-directory-excursion "gio/tests"
+ (substitute* '("contenttype.c" "gdbus-address-get-session.c"
+ "gdbus-peer.c" "appinfo.c" "desktop-app-info.c")
+ (("[ \t]*g_test_add_func.*;") "")))
-(define glib/fixed
- (package
- (inherit glib)
- (source (origin
- (inherit (package-source glib))
- (patches
- (append (search-patches "glib-CVE-2021-27218.patch"
- "glib-CVE-2021-27219-01.patch"
- "glib-CVE-2021-27219-02.patch"
- "glib-CVE-2021-27219-03.patch"
- "glib-CVE-2021-27219-04.patch"
- "glib-CVE-2021-27219-05.patch"
- "glib-CVE-2021-27219-06.patch"
- "glib-CVE-2021-27219-07.patch"
- "glib-CVE-2021-27219-08.patch"
- "glib-CVE-2021-27219-09.patch"
- "glib-CVE-2021-27219-10.patch"
- "glib-CVE-2021-27219-11.patch"
- "glib-CVE-2021-27219-12.patch"
- "glib-CVE-2021-27219-13.patch"
- "glib-CVE-2021-27219-14.patch"
- "glib-CVE-2021-27219-15.patch"
- "glib-CVE-2021-27219-16.patch"
- "glib-CVE-2021-27219-17.patch"
- "glib-CVE-2021-27219-18.patch"
- "glib-CVE-2021-28153.patch")
- (origin-patches (package-source glib))))))))
+ ,@(if (target-x86-32?)
+ ;; Comment out parts of timer.c that fail on i686 due to
+ ;; excess precision when building with GCC 10:
+ ;; <https://gitlab.gnome.org/GNOME/glib/-/issues/820>.
+ '((substitute* "glib/tests/timer.c"
+ (("^ g_assert_cmpuint \\(micros.*" all)
+ (string-append "//" all "\n"))
+ (("^ g_assert_cmpfloat \\(elapsed, ==.*" all)
+ (string-append "//" all "\n"))))
+ '())))
+ ;; Python references are not being patched in patch-phase of build,
+ ;; despite using python-wrapper as input. So we patch them manually.
+ ;;
+ ;; These python scripts are both used during build and installed,
+ ;; so at first, use a python from 'native-inputs', not 'inputs'. When
+ ;; cross-compiling, the 'patch-shebangs' phase will replace
+ ;; the native python with a python from 'inputs'.
+ (add-after 'unpack 'patch-python-references
+ (lambda* (#:key native-inputs inputs #:allow-other-keys)
+ (substitute* '("gio/gdbus-2.0/codegen/gdbus-codegen.in"
+ "glib/gtester-report.in"
+ "gobject/glib-genmarshal.in"
+ "gobject/glib-mkenums.in")
+ (("@PYTHON@")
+ (search-input-file (or native-inputs inputs)
+ (string-append
+ "/bin/python"
+ ,(version-major+minor
+ (package-version python))))))))
+ (add-before 'check 'pre-check
+ (lambda* (#:key native-inputs inputs outputs #:allow-other-keys)
+ ;; For tests/gdatetime.c.
+ (setenv "TZDIR"
+ (search-input-directory (or native-inputs inputs)
+ "share/zoneinfo"))
+ ;; Some tests want write access there.
+ (setenv "HOME" (getcwd))
+ (setenv "XDG_CACHE_HOME" (getcwd))))
+ (add-after 'install 'move-static-libraries
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let ((out (assoc-ref outputs "out"))
+ (static (assoc-ref outputs "static")))
+ (mkdir-p (string-append static "/lib"))
+ (for-each (lambda (a)
+ (rename-file a (string-append static "/lib/"
+ (basename a))))
+ (find-files out "\\.a$")))))
+ (add-after 'install 'patch-pkg-config-files
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let ((out (assoc-ref outputs "out")))
+ ;; Do not refer to "bindir", which points to "${prefix}/bin".
+ ;; We don't patch "bindir" to point to "$bin/bin", because that
+ ;; would create a reference cycle between the "out" and "bin"
+ ;; outputs.
+ (substitute*
+ (list
+ (string-append out "/lib/pkgconfig/gio-2.0.pc")
+ (string-append out "/lib/pkgconfig/glib-2.0.pc"))
+ (("^bindir=.*")
+ "")
+ (("=\\$\\{bindir\\}/")
+ "="))))))))
+ (native-inputs
+ `(("gettext" ,gettext-minimal)
+ ("m4" ,m4) ; for installing m4 macros
+ ("perl" ,perl) ; needed by GIO tests
+ ("pkg-config" ,pkg-config)
+ ("python" ,python) ; For 'patch-python-references
+ ("python-wrapper" ,python-wrapper)
+ ("tzdata" ,tzdata-for-tests))) ; for tests/gdatetime.c
+ (inputs
+ `(("bash-completion" ,bash-completion)
+ ;; "python", "python-wrapper" and "bash-minimal"
+ ;; are for the 'patch-shebangs' phase, to make
+ ;; sure the installed scripts end up with a correct shebang
+ ;; when cross-compiling.
+ ("python" ,python)
+ ("python-wrapper" ,python-wrapper)
+ ("bash-minimal" ,bash-minimal)
+ ("dbus" ,dbus)
+ ("libelf" ,libelf)))
+ (propagated-inputs
+ `(("libffi" ,libffi) ; in the Requires.private field of gobject-2.0.pc
+ ("pcre" ,pcre) ; in the Requires.private field of glib-2.0.pc
+ ("util-linux" ,util-linux "lib") ;for libmount
+ ("zlib" ,zlib))) ; in the Requires.private field of glib-2.0.pc
+ (native-search-paths
+ ;; This variable is not really "owned" by GLib, but several related
+ ;; packages refer to it: gobject-introspection's tools use it as a search
+ ;; path for .gir files, and it's also a search path for schemas produced
+ ;; by 'glib-compile-schemas'.
+ (list
+ (search-path-specification
+ (variable "XDG_DATA_DIRS")
+ (files '("share")))
+ ;; To load extra gio modules from glib-networking, etc.
+ (search-path-specification
+ (variable "GIO_EXTRA_MODULES")
+ (files '("lib/gio/modules")))))
+ (search-paths native-search-paths)
+ (synopsis "Low-level core library for GNOME projects")
+ (description "GLib provides the core application building blocks for
+libraries and applications written in C. It provides the core object system
+used in GNOME, the main loop implementation, and a large set of utility
+functions for strings and common data structures.")
+ (home-page "https://wiki.gnome.org/Projects/GLib")
+ (license license:lgpl2.1+)
+ (properties '((hidden? . #t)))))
(define-public glib-with-documentation
;; glib's doc must be built in a separate package since it requires gtk-doc,
@@ -426,93 +355,149 @@ dynamic loading, and an object system.")
(properties (alist-delete 'hidden? (package-properties glib)))
(outputs (cons "doc" (package-outputs glib))) ; 20 MiB of GTK-Doc reference
(native-inputs
- `(("gtk-doc" ,gtk-doc) ; for the doc
- ("docbook-xml" ,docbook-xml)
+ `(("docbook-xml-4.2" ,docbook-xml-4.2)
+ ("docbook-xml-4.5" ,docbook-xml)
+ ("docbook-xsl" ,docbook-xsl)
+ ("gtk-doc" ,gtk-doc)
("libxml2" ,libxml2)
+ ("xsltproc" ,libxslt)
,@(package-native-inputs glib)))
(arguments
(substitute-keyword-arguments (package-arguments glib)
((#:configure-flags flags ''())
- `(cons "-Dgtk_doc=true" ,flags))
+ `(cons "-Dgtk_doc=true"
+ (delete "-Dman=false" ,flags)))
((#:phases phases)
`(modify-phases ,phases
+ (add-after 'unpack 'patch-docbook-xml
+ (lambda* (#:key inputs #:allow-other-keys)
+ (with-directory-excursion "docs"
+ (substitute* (find-files "." "\\.xml$")
+ (("http://www.oasis-open.org/docbook/xml/4\\.5/")
+ (string-append (assoc-ref inputs "docbook-xml-4.5")
+ "/xml/dtd/docbook/"))
+ (("http://www.oasis-open.org/docbook/xml/4\\.2/")
+ (string-append (assoc-ref inputs "docbook-xml-4.2")
+ "/xml/dtd/docbook/"))))))
(add-after 'install 'move-doc
(lambda* (#:key outputs #:allow-other-keys)
- (let ((out (assoc-ref outputs "out"))
- (doc (assoc-ref outputs "doc"))
- (html (string-append "/share/gtk-doc")))
- (copy-recursively (string-append out html)
- (string-append doc html))
- (delete-file-recursively (string-append out html))
- #t)))))))))
+ (let* ((out (assoc-ref outputs "out"))
+ (doc (assoc-ref outputs "doc"))
+ (html (string-append "/share/gtk-doc")))
+ (mkdir-p (string-append doc "/share"))
+ (rename-file
+ (string-append out html)
+ (string-append doc html)))))))))))
-;;; TODO: Merge into glib as a 'static' output on core-updates.
-(define-public glib-static
- (hidden-package
- (package
- (inherit glib)
- (name "glib-static")
- (outputs '("out"))
- (arguments
- (substitute-keyword-arguments (package-arguments glib)
- ((#:configure-flags flags ''())
- `(cons* "--default-library=static"
- "-Dselinux=disabled"
- "-Dman=false"
- "-Dgtk_doc=false"
- "-Dinternal_pcre=false"
- ,flags))
- ((#:phases phases)
- `(modify-phases ,phases
- (delete 'move-executables)
- (replace 'install
- ;; Only install the static libraries.
- (lambda* (#:key outputs #:allow-other-keys)
- (let* ((out (assoc-ref outputs "out"))
- (lib (string-append out "/lib")))
- (for-each (lambda (f)
- (install-file f lib))
- (find-files "." "\\.a$"))))))))))))
+(define (python-extension-suffix python triplet)
+ "Determine the suffix for C extensions for PYTHON when compiled
+for TRIPLET."
+ ;; python uses strings like 'x86_64-linux-gnu' instead of
+ ;; 'x86_64-unknown-linux-gnu'.
+ (define normalised-system
+ (string-replace-substring triplet "-unknown-" "-"))
+ (define major.minor (version-major+minor (package-version python)))
+ (define majorminor (string-delete #\. major.minor))
+ (string-append
+ ;; If guix' python package used "--with-pydebug", a #\d would
+ ;; need to be added, likewise "--with-pymalloc" and "--with-wide-unicode"
+ ;; would require a #\m and #\u, see cpython's configure.ac.
+ ".cpython-" majorminor "-" normalised-system
+ (if (target-mingw? triplet)
+ ".dll"
+ ".so")))
+
+(define (correct-library-name-phase python name)
+ "Return a G-exp evaluating to a phase renaming the python extension NAME
+from what Meson thinks its name should be to what python expects its name
+to be. NAME must not include the platform-specific suffix. This can only
+be used when cross-compiling."
+ #~(lambda _
+ (define name #$name)
+ (define native-suffix
+ #$(python-extension-suffix python
+ (nix-system->gnu-triplet (%current-system))))
+ (define target-suffix
+ #$(python-extension-suffix python (%current-target-system)))
+ (define native-name
+ (string-append name native-suffix))
+ (define target-name
+ (string-append name target-suffix))
+ (rename-file native-name target-name)))
(define gobject-introspection
(package
(name "gobject-introspection")
- (version "1.62.0")
- (source
- (origin
- (method url-fetch)
- (uri
- (string-append "mirror://gnome/sources/"
- "gobject-introspection/" (version-major+minor version)
- "/gobject-introspection-" version ".tar.xz"))
- (sha256
- (base32 "18lhglg9v6y83lhqzyifc1z0wrlawzrhzzxx0a3h1g7xaz97xvmi"))
- (patches
- (search-patches
- "gobject-introspection-cc.patch"
- "gobject-introspection-girepository.patch"
- "gobject-introspection-absolute-shlib-path.patch"))))
+ (version "1.66.1")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "mirror://gnome/sources/"
+ "gobject-introspection/" (version-major+minor version)
+ "/gobject-introspection-" version ".tar.xz"))
+ (sha256
+ (base32 "078n0q7b6z682mf4irclrksm73cyixq295mqnqifl9plwmgaai6x"))
+ (patches (search-patches
+ "gobject-introspection-cc.patch"
+ "gobject-introspection-girepository.patch"
+ "gobject-introspection-absolute-shlib-path.patch"))))
(build-system meson-build-system)
(arguments
- `(#:phases
+ `(,@(if (%current-target-system)
+ `(#:configure-flags
+ '("-Dgi_cross_use_prebuilt_gi=true"
+ ;; Building introspection data requires running binaries
+ ;; for ‘host’ on ‘build’, so don't do that.
+ ;;
+ ;; TODO: it would be nice to have introspection data anyways
+ ;; as discussed here: https://issues.guix.gnu.org/50201#60.
+ "-Dbuild_introspection_data=false"))
+ '())
+ #:phases
+ ,#~
(modify-phases %standard-phases
+ #$@(if (%current-target-system)
+ ;; 'typelibs' is undefined.
+ `((add-after 'unpack 'set-typelibs
+ (lambda _
+ (substitute* "meson.build"
+ (("\\bsources: typelibs\\b")
+ "sources: []")))))
+ '())
(add-after 'unpack 'do-not-use-/usr/bin/env
(lambda _
(substitute* "tools/g-ir-tool-template.in"
(("#!@PYTHON_CMD@")
(string-append "#!" (which "python3"))))
- #t)))))
+ #t))
+ #$@(if (%current-target-system)
+ ;; Meson gives python extensions an incorrect name, see
+ ;; <https://github.com/mesonbuild/meson/issues/7049>.
+ #~((add-after 'install 'rename-library
+ #$(correct-library-name-phase
+ (this-package-input "python")
+ #~(string-append #$output
+ "/lib/gobject-introspection/giscanner"
+ "/_giscanner"))))
+ #~()))))
(native-inputs
`(("glib" ,glib "bin")
- ("pkg-config" ,pkg-config)))
+ ("pkg-config" ,pkg-config)
+ ;; TODO(core-updates): Unconditionally place "flex" and "bison"
+ ;; in 'native-inputs'.
+ ,@(if (%current-target-system)
+ `(("bison" ,bison)
+ ("flex" ,flex))
+ '())))
(inputs
- `(("bison" ,bison)
- ("flex" ,flex)
- ("glib" ,glib)
- ("python" ,python-wrapper)
+ `(,@(if (%current-target-system)
+ `(("python" ,python))
+ `(("bison" ,bison)
+ ("flex" ,flex)
+ ("python" ,python-wrapper)))
("zlib" ,zlib)))
(propagated-inputs
- `(;; In practice, GIR users will need libffi when using
+ `(("glib" ,glib)
+ ;; In practice, GIR users will need libffi when using
;; gobject-introspection.
("libffi" ,libffi)))
(native-search-paths
@@ -609,7 +594,7 @@ The intltool collection can be used to do these things:
(let ((prog (string-append (assoc-ref outputs "out")
"/bin/itstool")))
(wrap-program prog
- `("PYTHONPATH" = (,(getenv "PYTHONPATH"))))
+ `("GUIX_PYTHONPATH" = (,(getenv "GUIX_PYTHONPATH"))))
#t))))))
(home-page "http://www.itstool.org")
(synopsis "Tool to translate XML documents with PO files")
@@ -646,6 +631,16 @@ translated.")
(base32
"09g8swvc95bk1z6j8sw463p2v0dqmgm2zjfndf7i8sbcyq67dr3w"))))
(build-system gnu-build-system)
+ (arguments
+ (if (%current-target-system)
+ `(#:configure-flags
+ ;; Run a native 'dbus-binding-tool' instead of a cross-compiled
+ ;; 'dbus-binding-tool' when cross-compiling.
+ ,#~(list
+ (string-append
+ "--with-dbus-binding-tool="
+ #+(file-append this-package "/bin/dbus-binding-tool"))))
+ '()))
(propagated-inputs ; according to dbus-glib-1.pc
`(("dbus" ,dbus)
("glib" ,glib)))
@@ -664,63 +659,149 @@ by GDBus included in Glib.")
(define libsigc++
(package
(name "libsigc++")
- (version "2.10.3")
+ (version "3.0.6")
(source (origin
- (method url-fetch)
- (uri (string-append "mirror://gnome/sources/libsigc++/"
- (version-major+minor version) "/"
- name "-" version ".tar.xz"))
- (sha256
- (base32
- "11j7j1jv4z58d9s7jvl42fnqa1dzl4idgil9r45cjv1w673dys0b"))))
- (build-system gnu-build-system)
- (native-inputs `(("pkg-config" ,pkg-config)
- ("m4" ,m4)))
+ (method url-fetch)
+ (uri (string-append "mirror://gnome/sources/libsigc++/"
+ (version-major+minor version) "/"
+ name "-" version ".tar.xz"))
+ (sha256
+ (base32
+ "1kn57b039lg20182lnchl1ys27vf34brn43f895cal8nc7sdq3mp"))))
+ (build-system meson-build-system)
+ (outputs '("out" "doc"))
+ (arguments
+ `(#:configure-flags
+ (list
+ "-Dbuild-documentation=true")
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'patch-docbook-xml
+ (lambda* (#:key inputs #:allow-other-keys)
+ (with-directory-excursion "docs"
+ (substitute* (find-files "." "\\.xml$")
+ (("http://www.oasis-open.org/docbook/xml/4\\.1\\.2/")
+ (string-append (assoc-ref inputs "docbook-xml")
+ "/xml/dtd/docbook/"))))
+ #t))
+ (add-after 'install 'move-doc
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (doc (assoc-ref outputs "doc")))
+ (mkdir-p (string-append doc "/share"))
+ (rename-file
+ (string-append out "/share/doc")
+ (string-append doc "/share/doc"))
+ #t))))))
+ (native-inputs
+ `(("docbook-xml" ,docbook-xml-4.1.2)
+ ("docbook-xsl" ,docbook-xsl)
+ ("dot" ,graphviz)
+ ("doxygen" ,doxygen)
+ ("m4" ,m4)
+ ("mm-common" ,mm-common)
+ ("perl" ,perl)
+ ("pkg-config" ,pkg-config)
+ ("xmllint" ,libxml2)
+ ("xsltproc" ,libxslt)))
+ (inputs
+ `(("boost" ,boost)))
(home-page "https://libsigcplusplus.github.io/libsigcplusplus/")
(synopsis "Type-safe callback system for standard C++")
(description
"Libsigc++ implements a type-safe callback system for standard C++. It
-allows you to define signals and to connect those signals to any callback
-function, either global or a member function, regardless of whether it is
-static or virtual.
+ allows you to define signals and to connect those signals to any callback
+ function, either global or a member function, regardless of whether it is
+ static or virtual.
-It also contains adaptor classes for connection of dissimilar callbacks and
-has an ease of use unmatched by other C++ callback libraries.")
- (license license:lgpl2.1+)))
+ It also contains adaptor classes for connection of dissimilar callbacks and
+ has an ease of use unmatched by other C++ callback libraries.")
+ (license license:lgpl3+)))
+
+ (define-public libsigc++-2
+ (package
+ (inherit libsigc++)
+ (name "libsigc++")
+ (version "2.9.3")
+ (source
+ (origin
+ (method url-fetch)
+ (uri
+ (string-append "mirror://gnome/sources/libsigc++/"
+ (version-major+minor version)
+ "/libsigc++-" version ".tar.xz"))
+ (sha256
+ (base32 "0zq963d0sss82q62fdfjs7l9iwbdch51albck18cb631ml0v7y8b"))))
+ (build-system gnu-build-system)
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'patch-docbook-xml
+ (lambda* (#:key inputs #:allow-other-keys)
+ (with-directory-excursion "docs"
+ (substitute* (find-files "." "\\.xml$")
+ (("http://www.oasis-open.org/docbook/xml/4\\.1\\.2/")
+ (string-append (assoc-ref inputs "docbook-xml")
+ "/xml/dtd/docbook/"))))
+ #t))
+ (add-after 'install 'move-doc
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (doc (assoc-ref outputs "doc")))
+ (mkdir-p (string-append doc "/share"))
+ (rename-file
+ (string-append out "/share/doc")
+ (string-append doc "/share/doc"))
+ #t))))))))
(define glibmm
(package
(name "glibmm")
- (version "2.62.0")
+ (version "2.68.0")
(source (origin
- (method url-fetch)
- (uri (string-append "mirror://gnome/sources/glibmm/"
- (version-major+minor version)
- "/glibmm-" version ".tar.xz"))
- (sha256
- (base32
- "1ziwx6r7k7wbvg4qq1rgrv8zninapgrmhn1hs6926a3krh9ryr9n"))))
- (build-system gnu-build-system)
+ (method url-fetch)
+ (uri (string-append "mirror://gnome/sources/glibmm/"
+ (version-major+minor version)
+ "/glibmm-" version ".tar.xz"))
+ (sha256
+ (base32
+ "0xgkyhb2876mcyyib5rk3ya9aingyj68h02nl22yvkhx35rqbwy1"))))
+ (build-system meson-build-system)
+ (outputs '("out" "doc"))
(arguments
- `(#:phases
+ `(#:configure-flags
+ (list
+ "-Dbuild-documentation=true")
+ #:phases
(modify-phases %standard-phases
- (add-before 'build 'pre-build
+ (add-after 'unpack 'disable-failing-tests
(lambda _
- ;; This test uses /etc/fstab as an example file to read
- ;; from; choose a better example.
- (substitute* "tests/giomm_simple/main.cc"
- (("/etc/fstab")
- (string-append (getcwd)
- "/tests/giomm_simple/main.cc")))
-
- ;; This test does a DNS lookup, and then expects to be able
- ;; to open a TLS session; just skip it.
- (substitute* "tests/giomm_tls_client/main.cc"
- (("Gio::init.*$")
- "return 77;\n"))
- #t)))))
- (native-inputs `(("pkg-config" ,pkg-config)
- ("glib" ,glib "bin")))
+ (substitute* "tests/meson.build"
+ ;; This test uses /etc/fstab as an example file to read
+ ;; from; disable it.
+ (("[ \t]*.*giomm_simple.*$") "")
+ ;; This test does a DNS lookup, and then expects to be able
+ ;; to open a TLS session; just skip it.
+ (("[ \t]*.*giomm_tls_client.*$") ""))
+ #t))
+ (add-after 'install 'move-doc
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (doc (assoc-ref outputs "doc")))
+ (mkdir-p (string-append doc "/share"))
+ (rename-file
+ (string-append out "/share/doc")
+ (string-append doc "/share/doc"))
+ #t))))))
+ (native-inputs
+ `(("dot" ,graphviz)
+ ("doxygen" ,doxygen)
+ ("glib:bin" ,glib "bin")
+ ("m4" ,m4)
+ ("mm-common" ,mm-common)
+ ("perl" ,perl)
+ ("pkg-config" ,pkg-config)
+ ("xsltproc" ,libxslt)))
(propagated-inputs
`(("libsigc++" ,libsigc++)
("glib" ,glib)))
@@ -735,7 +816,7 @@ useful for C++.")
(package
(inherit glibmm)
(name "glibmm")
- (version "2.64.2")
+ (version "2.64.5")
(source
(origin
(method url-fetch)
@@ -744,10 +825,10 @@ useful for C++.")
(version-major+minor version)
"/glibmm-" version ".tar.xz"))
(sha256
- (base32 "1v6lp23fr2qh4zshcnm28sn29j3nzgsvcqj2nhmrnvamipjq4lm7"))))
+ (base32 "11m37sbx0i18cl17d0fkq0bik4bbzlb5n8kcl651jhci5ipci3sh"))))
(propagated-inputs
- `(("libsigc++" ,libsigc++)
- ("glib" ,glib)))))
+ `(("libsigc++" ,libsigc++-2)
+ ,@(package-propagated-inputs glibmm)))))
(define-public python2-pygobject-2
(package
@@ -790,7 +871,7 @@ useful for C++.")
(define-public python-pygobject
(package
(name "python-pygobject")
- (version "3.34.0")
+ (version "3.40.1")
(source
(origin
(method url-fetch)
@@ -799,7 +880,7 @@ useful for C++.")
"/pygobject-" version ".tar.xz"))
(sha256
(base32
- "06i7ynnbvgpz0gw09zsjbvhgcp5qz4yzdifw27qjwdazg2mckql7"))
+ "0d80g5kgf2i9cginyhalvb7ibfk9g30yilqzmcsw6h6byj8xbih0"))
(modules '((guix build utils)))
(snippet
'(begin
@@ -811,10 +892,19 @@ useful for C++.")
'("test_atoms.py" "test_overrides_gtk.py"))
#t)))))
(build-system meson-build-system)
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (replace 'check
+ (lambda* (#:key tests? #:allow-other-keys)
+ (when tests?
+ ;; The default 90 seconds can be too low on slower machines.
+ (invoke "meson" "test" "--timeout-multiplier" "5")))))))
(native-inputs
`(("glib-bin" ,glib "bin")
("pkg-config" ,pkg-config)
- ("python-pytest" ,python-pytest)))
+ ("python-pytest" ,python-pytest)
+ ("python-wrapper" ,python-wrapper))) ; For patching shebangs
(inputs
`(("python" ,python)
("python-pycairo" ,python-pycairo)
@@ -1006,7 +1096,8 @@ This package provides the library for GLib applications.")
(inputs
`(("efl" ,efl)
("expat" ,expat)
- ("glib" ,glib)))
+ ("glib" ,glib)
+ ("libunwind" ,libunwind)))
(native-inputs
`(("pkg-config" ,pkg-config)))
(arguments
@@ -1094,7 +1185,7 @@ Some codes examples can be find at:
("gtk+" ,gtk+)
("json-glib" ,json-glib)
("libarchive" ,libarchive)
- ("libsoup" ,libsoup)))
+ ("libsoup" ,libsoup-minimal-2)))
(arguments
`(#:configure-flags
(list "-Ddep11=false"
diff --git a/gnu/packages/gnome-xyz.scm b/gnu/packages/gnome-xyz.scm
index d409d15c7a..35304a7485 100644
--- a/gnu/packages/gnome-xyz.scm
+++ b/gnu/packages/gnome-xyz.scm
@@ -11,6 +11,7 @@
;;; Copyright © 2020 Ellis Kenyo <me@elken.dev>
;;; Copyright © 2020 Stefan Reichör <stefan@xsteve.at>
;;; Copyright © 2021 Vinicius Monego <monego@posteo.net>
+;;; Copyright © 2021 Guillaume Le Vaillant <glv@posteo.net>
;;; Copyright © 2021 Songlin Jiang <hollowman@hollowman.ml>
;;; Copyright © 2021 Justin Veilleux <terramorpha@cock.li>
;;;
@@ -471,7 +472,6 @@ faster window switching.")
("nautilus" ,nautilus)
("openssh" ,openssh)
("openssl" ,openssl)
- ("python-nautilus" ,python-nautilus)
("python-pygobject" ,python-pygobject)
("upower" ,upower)))
(native-inputs
@@ -638,7 +638,7 @@ notebooks and tiling window managers.")
(define-public arc-theme
(package
(name "arc-theme")
- (version "20201013")
+ (version "20210412")
(source (origin
(method git-fetch)
(uri (git-reference
@@ -647,24 +647,19 @@ notebooks and tiling window managers.")
(file-name (git-file-name name version))
(sha256
(base32
- "1x2l1mwjx68dwf3jb1i90c1q8nqsl1wf2zggcn8im6590k5yv39s"))))
- (build-system gnu-build-system)
+ "0zs44dagp6baiyszlr1kj5ncap43fg32dv07rl46nxbds2p65lh4"))))
+ (build-system meson-build-system)
(arguments
'(#:configure-flags
- (list "--disable-cinnamon")
+ '("-Dthemes=gnome-shell,gtk2,gtk3,metacity,plank,unity,xfwm")
#:phases
(modify-phases %standard-phases
- ;; autogen.sh calls configure at the end of the script.
- (replace 'bootstrap
- (lambda _ (invoke "autoreconf" "-vfi")))
(add-before 'build 'set-home ;placate Inkscape
(lambda _
(setenv "HOME" (getcwd))
#t)))))
(native-inputs
- `(("autoconf" ,autoconf)
- ("automake" ,automake)
- ("glib" ,glib "bin") ; for glib-compile-resources
+ `(("glib" ,glib "bin") ; for glib-compile-resources
("gnome-shell" ,gnome-shell)
("gtk+" ,gtk+)
("inkscape" ,inkscape)
@@ -932,7 +927,7 @@ track stocks, currencies and cryptocurrencies.")
;; Note to maintainer: VLS must be built with a Vala toolchain the same
;; version or newer. Therefore when you update this package you may need
;; to update Vala too.
- (version "0.48.1")
+ (version "0.48.3")
(source (origin
(method git-fetch)
(uri (git-reference
@@ -940,7 +935,7 @@ track stocks, currencies and cryptocurrencies.")
(commit version)))
(file-name (git-file-name name version))
(sha256
- (base32 "12k095052jkvbiyz8gzkj6w7r7p16d5m18fyikl48yvh5nln8fw0"))))
+ (base32 "1gnvc91gdp3wj9r3r3xxfr09f9lw39cfypn2q5f0443dhhmp059j"))))
(build-system meson-build-system)
(arguments '(#:glib-or-gtk? #t))
(inputs
@@ -948,7 +943,7 @@ track stocks, currencies and cryptocurrencies.")
("json-glib" ,json-glib)
("jsonrpc-glib" ,jsonrpc-glib)
("libgee" ,libgee)
- ("vala" ,vala-0.50)))
+ ("vala" ,vala)))
(native-inputs
`(("pkg-config" ,pkg-config)))
(home-page "https://github.com/benwaffle/vala-language-server")
diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
index 49a67e4e13..404c0e4d7d 100644
--- a/gnu/packages/gnome.scm
+++ b/gnu/packages/gnome.scm
@@ -39,7 +39,7 @@
;;; Copyright © 2019 Giacomo Leidi <goodoldpaul@autistici.org>
;;; Copyright © 2019 Jelle Licht <jlicht@fsfe.org>
;;; Copyright © 2019 Jonathan Frederickson <jonathan@terracrypt.net>
-;;; Copyright © 2019, 2020 Maxim Cournoyer <maxim.cournoyer@gmail.com>
+;;; Copyright © 2019, 2020, 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;; Copyright © 2019, 2020 Martin Becze <mjbecze@riseup.net>
;;; Copyright © 2019 David Wilson <david@daviwil.com>
;;; Copyright © 2019, 2020 Raghav Gururajan <raghavgururajan@disroot.org>
@@ -60,6 +60,10 @@
;;; Copyright © 2020, 2021 Sébastien Lerique <sl@eauchat.org>
;;; Copyright © 2021 Trevor Hass <thass@okstate.edu>
;;; Copyright © 2021 Solene Rapenne <solene@perso.pw>
+;;; Copyright © 2021 Guillaume Le Vaillant <glv@posteo.net>
+;;; Copyright © 2021 Felix Gruber <felgru@posteo.net>
+;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be>
+;;; Copyright © 2021 Josselin Poiret <josselin.poiret@protonmail.ch>
;;; Copyright © 2021 Mathieu Othacehe <othacehe@gnu.org>
;;;
;;; This file is part of GNU Guix.
@@ -106,6 +110,7 @@
#:use-module (gnu packages djvu)
#:use-module (gnu packages dns)
#:use-module (gnu packages docbook)
+ #:use-module (gnu packages docker)
#:use-module (gnu packages documentation)
#:use-module (gnu packages enchant)
#:use-module (gnu packages flex)
@@ -136,6 +141,7 @@
#:use-module (gnu packages inkscape)
#:use-module (gnu packages iso-codes)
#:use-module (gnu packages kerberos)
+ #:use-module (gnu packages language)
#:use-module (gnu packages libcanberra)
#:use-module (gnu packages libffi)
#:use-module (gnu packages libunistring)
@@ -143,8 +149,11 @@
#:use-module (gnu packages libusb)
#:use-module (gnu packages linux)
#:use-module (gnu packages lirc)
+ #:use-module (gnu packages llvm)
#:use-module (gnu packages lua)
#:use-module (gnu packages mail)
+ #:use-module (gnu packages man)
+ #:use-module (gnu packages markup)
#:use-module (gnu packages mp3)
#:use-module (gnu packages multiprecision)
#:use-module (gnu packages music)
@@ -162,7 +171,6 @@
#:use-module (gnu packages pdf)
#:use-module (gnu packages perl)
#:use-module (gnu packages photo)
- #:use-module (gnu packages php)
#:use-module (gnu packages pkg-config)
#:use-module (gnu packages polkit)
#:use-module (gnu packages popt)
@@ -248,6 +256,11 @@
(string-append (assoc-ref inputs "docbook-xml-4.1.2")
"/xml/dtd/docbook/"))))
#t))
+ (add-before 'check 'set-home
+ (lambda _
+ ;; A test using GIO expects ~/.config/glib-2.0/settings to be
+ ;; writable.
+ (setenv "HOME" (getcwd))))
(add-after 'install 'move-doc
(lambda* (#:key outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))
@@ -333,41 +346,28 @@ Desktop. It is designed to be as simple as possible and has some unique
features to enable users to create their discs easily and quickly.")
(license license:gpl2+)))
-(define-public libcloudproviders
+;;; Minimal variant, used to break a cycle with Inkscape.
+(define-public libcloudproviders-minimal
(package
- (name "libcloudproviders")
+ (name "libcloudproviders-minimal")
(version "0.3.1")
(source
(origin
(method url-fetch)
(uri
- (string-append "mirror://gnome/sources/" name "/"
- (version-major+minor version) "/"
- name "-" version ".tar.xz"))
+ (string-append "mirror://gnome/sources/libcloudproviders/"
+ (version-major+minor version)
+ "/libcloudproviders-" version ".tar.xz"))
(sha256
(base32 "0aars24myf6n8b8hm1n12hsgcm54097kpbpm4ba31zp1l4y22qs7"))))
(build-system meson-build-system)
- (outputs '("out" "doc"))
(arguments
- `(#:glib-or-gtk? #t ; To wrap binaries and/or compile schemas
- #:configure-flags
- (list
- "-Denable-gtk-doc=true")
- #:phases
- (modify-phases %standard-phases
- (add-after 'install 'move-doc
- (lambda* (#:key outputs #:allow-other-keys)
- (let* ((out (assoc-ref outputs "out"))
- (doc (assoc-ref outputs "doc")))
- (mkdir-p (string-append doc "/share"))
- (rename-file
- (string-append out "/share/gtk-doc")
- (string-append doc "/share/gtk-doc"))
- #t))))))
+ `(#:glib-or-gtk? #t ; To wrap binaries and/or compile schemas
+ #:configure-flags (list "-Dintrospection=false"
+ "-Denable-gtk-doc=false"
+ "-Dvapigen=false")))
(native-inputs
`(("glib:bin" ,glib "bin")
- ("gobject-introspection" ,gobject-introspection)
- ("gtk-doc" ,gtk-doc/stable)
("pkg-config" ,pkg-config)
("vala" ,vala)))
(inputs
@@ -381,6 +381,31 @@ services.")
(home-page "https://csorianognome.wordpress.com/2015/07/07/cloud-providers/")
(license license:lgpl3+)))
+(define-public libcloudproviders
+ (package/inherit libcloudproviders-minimal
+ (name "libcloudproviders")
+ (version "0.3.1")
+ (outputs (cons "doc" (package-outputs libcloudproviders-minimal)))
+ (arguments
+ (substitute-keyword-arguments (package-arguments libcloudproviders-minimal)
+ ((#:configure-flags _)
+ '(list "-Denable-gtk-doc=true")) ;false by default
+ ((#:phases phases '%standard-phases)
+ `(modify-phases %standard-phases
+ (add-after 'install 'move-doc
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (doc (assoc-ref outputs "doc")))
+ (mkdir-p (string-append doc "/share"))
+ (rename-file
+ (string-append out "/share/gtk-doc")
+ (string-append doc "/share/gtk-doc")))))))))
+ (native-inputs
+ (append
+ `(("gobject-introspection" ,gobject-introspection)
+ ("gtk-doc" ,gtk-doc/stable))
+ (package-native-inputs libcloudproviders-minimal)))))
+
(define-public libgrss
(package
(name "libgrss")
@@ -585,7 +610,7 @@ in JavaScript.")
("vala" ,vala)))
(inputs
`(("avahi" ,avahi)
- ("gdk-pixbuf" ,gdk-pixbuf+svg)
+ ("librsvg" ,librsvg)
("gee" ,libgee)
("gst-plugins-base" ,gst-plugins-base)
("gtk+" ,gtk+)))
@@ -593,7 +618,7 @@ in JavaScript.")
`(("glib" ,glib)
("glib-networking" ,glib-networking)
("gstreamer" ,gstreamer)
- ("libsoup" ,libsoup)))
+ ("libsoup-minimal" ,libsoup-minimal-2)))
(synopsis "Media management library")
(description "Libdmapsharing is a library which allows programs to access,
share and control the playback of media content using DMAP (DAAP, DPAP & DACP).
@@ -862,20 +887,21 @@ tomorrow, the rest of the week and for special occasions.")
(define-public gnome-photos
(package
(name "gnome-photos")
- (version "3.34.2")
+ (version "40.0")
(source
(origin
(method url-fetch)
(uri
(string-append "mirror://gnome/sources/" name "/"
- (version-major+minor version) "/"
+ (version-major version) "/"
name "-" version ".tar.xz"))
(sha256
(base32
- "06ml5sf8xhpan410msqz085hmfc7082d368pb82yq646y9pcfn9w"))))
+ "1bzi79plw6ji6qlckhxnwfnswy6jpnhzmmyanml2i2xg73hp6bg0"))))
(build-system meson-build-system)
(arguments
- `(#:glib-or-gtk? #t
+ `(#:meson ,meson-0.59 ;positional arguments error with meson 0.60
+ #:glib-or-gtk? #t
#:configure-flags
(list "-Ddogtail=false" ; Not available
;; Required for RUNPATH validation.
@@ -888,8 +914,8 @@ tomorrow, the rest of the week and for special occasions.")
(let*
((out (assoc-ref outputs "out")))
(wrap-program (string-append out "/bin/gnome-photos")
- `("GRL_PLUGIN_PATH" = (,(getenv "GRL_PLUGIN_PATH")))))
- #t)))))
+ `("GRL_PLUGIN_PATH" =
+ (,(getenv "GRL_PLUGIN_PATH"))))))))))
(native-inputs
`(("dbus" ,dbus)
("desktop-file-utils" ,desktop-file-utils)
@@ -904,7 +930,7 @@ tomorrow, the rest of the week and for special occasions.")
(inputs
`(("babl" ,babl)
("cairo" ,cairo)
- ("gdk-pixbuf" ,gdk-pixbuf+svg)
+ ("librsvg" ,librsvg)
("gegl" ,gegl)
("geocode-glib" ,geocode-glib)
("gexiv2" ,gexiv2)
@@ -916,6 +942,7 @@ tomorrow, the rest of the week and for special occasions.")
("libdazzle" ,libdazzle)
("libgdata" ,libgdata)
("libgfbgraph" ,gfbgraph)
+ ("libhandy" ,libhandy)
("libjpeg" ,libjpeg-turbo)
("libpng" ,libpng)
("librest" ,rest)
@@ -932,20 +959,21 @@ cloud integration is offered through GNOME Online Accounts.")
(define-public gnome-music
(package
(name "gnome-music")
- (version "3.34.5")
+ (version "40.1.1")
(source
(origin
(method url-fetch)
(uri
(string-append "mirror://gnome/sources/" name "/"
- (version-major+minor version) "/"
+ (version-major version) "/"
name "-" version ".tar.xz"))
(sha256
(base32
- "1r5sfw5cbd6qqh27lzhblazir0bfi3k7nqppw66qw990isqm5psy"))))
+ "0lcdal4qdhclr8961p57xf010y92l6wwmkw86lyi9wy224z6gjr0"))))
(build-system meson-build-system)
(arguments
- `(#:glib-or-gtk? #t
+ `(#:meson ,meson-0.59 ;positional arguments error with meson 0.60
+ #:glib-or-gtk? #t
#:phases
(modify-phases %standard-phases
(add-after 'install 'wrap-gnome-music
@@ -957,11 +985,14 @@ cloud integration is offered through GNOME Online Accounts.")
(package-version python))
"/site-packages")))
(wrap-program (string-append out "/bin/gnome-music")
- `("GI_TYPELIB_PATH" = (,(getenv "GI_TYPELIB_PATH")))
- `("GST_PLUGIN_SYSTEM_PATH" = (,(getenv "GST_PLUGIN_SYSTEM_PATH")))
- `("GRL_PLUGIN_PATH" = (,(getenv "GRL_PLUGIN_PATH")))
- `("PYTHONPATH" = (,(getenv "PYTHONPATH") ,pylib))))
- #t)))))
+ `("GI_TYPELIB_PATH" =
+ (,(getenv "GI_TYPELIB_PATH")))
+ `("GST_PLUGIN_SYSTEM_PATH" =
+ (,(getenv "GST_PLUGIN_SYSTEM_PATH")))
+ `("GRL_PLUGIN_PATH" =
+ (,(getenv "GRL_PLUGIN_PATH")))
+ `("GUIX_PYTHONPATH" =
+ (,(getenv "GUIX_PYTHONPATH") ,pylib)))))))))
(native-inputs
`(("desktop-file-utils" ,desktop-file-utils)
("gettext" ,gettext-minimal)
@@ -975,11 +1006,13 @@ cloud integration is offered through GNOME Online Accounts.")
("grilo" ,grilo)
("grilo-plugins" ,grilo-plugins)
("gst-plugins-base" ,gst-plugins-base)
+ ("gst-plugins-good" ,gst-plugins-good)
("gstreamer" ,gstreamer)
("gvfs" ,gvfs)
+ ("json-glib" ,json-glib)
("libdazzle" ,libdazzle)
("libmediaart" ,libmediaart)
- ("libsoup" ,libsoup)
+ ("libsoup" ,libsoup-minimal-2)
("pycairo" ,python-pycairo)
("pygobject" ,python-pygobject)
("tracker" ,tracker)
@@ -1019,7 +1052,7 @@ between different kinds of computer systems.")
(define-public tepl
(package
(name "tepl")
- (version "4.4.0")
+ (version "6.00.0")
(source
(origin
(method url-fetch)
@@ -1029,12 +1062,14 @@ between different kinds of computer systems.")
name "-" version ".tar.xz"))
(sha256
(base32
- "0mm2z849hnni7597an05mrv0dckrxjngpf2xfa0g5s17i8x6gxp6"))))
- (build-system glib-or-gtk-build-system)
+ "0qvs7s86gqyyrzi0r5fbrj8zczlgv8xhdjswgbgc1afwjnl9fqx8"))))
+ (build-system meson-build-system)
(arguments
- `(#:tests? #f)) ; FIX-ME: Requires gvfs
+ `(#:glib-or-gtk? #t
+ #:tests? #f)) ; FIX-ME: Requires gvfs
(native-inputs
- `(("gobject-introspection" ,gobject-introspection)
+ `(("glib" ,glib "bin")
+ ("gobject-introspection" ,gobject-introspection)
("pkg-config" ,pkg-config)))
(inputs
`(("amtk" ,amtk)
@@ -1049,6 +1084,22 @@ GtkSourceView-based text editors and IDEs.")
(home-page "https://wiki.gnome.org/Projects/Tepl")
(license license:lgpl2.1+)))
+(define-public tepl-5
+ (package
+ (inherit tepl)
+ (name "tepl")
+ (version "5.0.1")
+ (source
+ (origin
+ (method url-fetch)
+ (uri
+ (string-append "mirror://gnome/sources/" name "/"
+ (version-major+minor version) "/"
+ name "-" version ".tar.xz"))
+ (sha256
+ (base32
+ "0118j64s4fb350phbgda2rk6sv19rfgglxc7nf248llzc1klj9xi"))))))
+
(define-public krb5-auth-dialog
(package
(name "krb5-auth-dialog")
@@ -1124,21 +1175,15 @@ freedesktop.org desktop notification specification.")
"1x8yvjy0yg17qyhmqws8xh2k8dvzrhpwqz7j1cfwzalrb1i9c5g8"))))
(build-system meson-build-system)
(arguments
- `(#:meson ,meson-0.55
- #:phases
+ `(#:phases
(modify-phases %standard-phases
(add-after 'unpack 'patch
(lambda* (#:key inputs #:allow-other-keys)
(substitute* "util/mm-common-prepare.in"
- (("ln") (string-append (assoc-ref inputs "coreutils")
- "/bin/ln"))
- (("cp") (string-append (assoc-ref inputs "coreutils")
- "/bin/cp"))
- (("sed") (string-append (assoc-ref inputs "sed")
- "/bin/sed"))
- (("cat") (string-append (assoc-ref inputs "coreutils")
- "/bin/cat")))
- #t)))))
+ (("ln") (search-input-file inputs "/bin/ln"))
+ (("cp") (search-input-file inputs "/bin/cp"))
+ (("sed") (search-input-file inputs "/bin/sed"))
+ (("cat") (search-input-file inputs "/bin/cat"))))))))
(native-inputs
`(("coreutils" ,coreutils)
("gettext" ,gettext-minimal)
@@ -1204,7 +1249,7 @@ in particular in the GNOME desktop.")
(define-public gnome-color-manager
(package
(name "gnome-color-manager")
- (version "3.32.0")
+ (version "3.36.0")
(source (origin
(method url-fetch)
(uri (string-append "mirror://gnome/sources/" name "/"
@@ -1212,7 +1257,7 @@ in particular in the GNOME desktop.")
name "-" version ".tar.xz"))
(sha256
(base32
- "1vpxa2zjz3lkq9ldjg0fl65db9s6b4kcs8nyaqfz3jygma7ifg3w"))))
+ "0fxdng74d8hwhfx1nwl1i4jx9h9f6c2hkyc12f01kqbjcimrxnwx"))))
(build-system meson-build-system)
(arguments
`(#:glib-or-gtk? #t
@@ -1265,13 +1310,30 @@ in the GNOME desktop.")
name "-" version ".tar.xz"))
(sha256
(base32
- "1n2jz9i8a42zwxx5h8j2gdy6q1vyydh4vl00r0al7w8jzdh24p44"))))
+ "1n2jz9i8a42zwxx5h8j2gdy6q1vyydh4vl00r0al7w8jzdh24p44"))
+ (patches
+ (search-patches
+ "gnome-online-miners-tracker-3.patch"))))
(build-system glib-or-gtk-build-system)
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'fix-configure
+ (lambda _
+ (substitute* "configure.ac"
+ (("AX_CHECK_ENABLE_DEBUG.*")
+ ""))))
+ (add-after 'fix-configure 'autoreconf
+ (lambda _
+ (invoke "autoreconf" "-vif"))))))
(native-inputs
- `(("gettext" ,gettext-minimal)
+ `(("autoconf" ,autoconf)
+ ("automake" ,automake)
+ ("gettext" ,gettext-minimal)
("glib:bin" ,glib "bin")
("gobject-introspection" ,gobject-introspection)
("gtk+:bin" ,gtk+ "bin")
+ ("libtool" ,libtool)
("pkg-config" ,pkg-config)))
(inputs
`(("gnome-online-accounts" ,gnome-online-accounts)
@@ -1310,8 +1372,10 @@ It has miners for Facebook, Flickr, Google, ownCloud and SkyDrive.")
("pkg-config" ,pkg-config)
("vala" ,vala)))
(inputs
- `(("gtk+" ,gtk+)
- ("libsoup" ,libsoup)))
+ `(("gtk+" ,gtk+)))
+ (propagated-inputs
+ ;; The .pc file "Requires" libsoup-2.4.
+ `(("libsoup" ,libsoup-minimal-2)))
(synopsis "GObject-based API over @acronym{SSDP, Simple Service Discovery
Protocol} for GNOME")
(description "This package provides a library to handle resource discovery
@@ -1333,6 +1397,13 @@ a debugging tool, @command{gssdp-device-sniffer}.")
(base32
"1ld7mrpdv9cszmfzh7i19qx4li25j3fr7x1jp38l8phzlmz3187p"))))
(build-system meson-build-system)
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (add-before 'check 'pre-check
+ (lambda _
+ ;; Tests require a writable HOME.
+ (setenv "HOME" (getcwd)))))))
(native-inputs
`(("gettext" ,gettext-minimal)
("glib:bin" ,glib "bin")
@@ -1407,7 +1478,8 @@ given profile, etc. DLNA is a subset of UPnP A/V.")
("gobject-introspection" ,gobject-introspection)
("gtk-doc" ,gtk-doc/stable)
("libxml" ,libxml2)
- ("pkg-config" ,pkg-config)))
+ ("pkg-config" ,pkg-config)
+ ("vala" ,vala)))
(inputs
`(("gtk+" ,gtk+)
("gupnp" ,gupnp)))
@@ -1430,8 +1502,6 @@ and implementation of UPnP A/V profiles.")
(base32
"1mlw1qgj8nkd9ll6b6h54r1gfdy3zp8a8xqz7qfyfaj85jjgbph7"))))
(build-system meson-build-system)
- (arguments
- `(#:meson ,meson-next))
(native-inputs
`(("glib:bin" ,glib "bin")
("pkg-config" ,pkg-config)))
@@ -1451,18 +1521,19 @@ extraction, and lookup for applications on the desktop.")
(define-public gnome-initial-setup
(package
(name "gnome-initial-setup")
- (version "3.32.1")
+ (version "40.4")
(source (origin
(method url-fetch)
(uri (string-append "mirror://gnome/sources/gnome-initial-setup/"
- (version-major+minor version)
+ (version-major version)
"/gnome-initial-setup-" version ".tar.xz"))
(sha256
(base32
- "1gwhp7dalyc8zsb2pa66cmpdrj2d6drbq5p331sq6zp8ds10k9ry"))))
+ "06q3p4f8g9zr7a4mw3qr556mi0dg9qzrj8n46ybdz93fxs26aaj1"))))
(build-system meson-build-system)
(arguments
- '(#:configure-flags '(;; Enable camera support for user selfie.
+ `(#:meson ,meson-0.59 ;positional arguments error with meson 0.60
+ #:configure-flags '(;; Enable camera support for user selfie.
"-Dcheese=auto"
"-Dsystemd=false")
#:phases (modify-phases %standard-phases
@@ -1485,10 +1556,10 @@ extraction, and lookup for applications on the desktop.")
(inputs
`(("accountsservice" ,accountsservice)
;("adwaita-icon-theme" ,adwaita-icon-theme)
+ ("elogind" ,elogind)
("gdm" ,gdm)
("geoclue" ,geoclue)
("gnome-desktop" ,gnome-desktop)
- ("gnome-getting-started-docs" ,gnome-getting-started-docs)
("gnome-online-accounts" ,gnome-online-accounts)
("gnome-online-accounts:lib" ,gnome-online-accounts "lib")
("gstreamer" ,gstreamer)
@@ -1504,7 +1575,7 @@ extraction, and lookup for applications on the desktop.")
("pwquality" ,libpwquality)
("rest" ,rest)
("upower" ,upower)
- ("webkitgtk" ,webkitgtk)
+ ("webkitgtk" ,webkitgtk-with-libsoup2)
("libgnomekbd" ,libgnomekbd)))
(synopsis "Initial setup wizard for GNOME desktop")
(description "This package provides a set-up wizard when a
@@ -1516,7 +1587,7 @@ tour of all gnome components and allows the user to set them up.")
(define-public gnome-user-share
(package
(name "gnome-user-share")
- (version "3.33.1")
+ (version "3.34.0")
(source (origin
(method url-fetch)
(uri (string-append "mirror://gnome/sources/" name "/"
@@ -1524,12 +1595,13 @@ tour of all gnome components and allows the user to set them up.")
name "-" version ".tar.xz"))
(sha256
(base32
- "0lf790pyamdyj7180ils8vizjl8brxcg7jsm1iavfp9ay4wa8mz7"))))
+ "04r9ck9v4i0d31grbli1d4slw2d6dcsfkpaybkwbzi7wnj72l30x"))))
(build-system meson-build-system)
(arguments
- `(#:glib-or-gtk? #t
+ `(#:meson ,meson-0.59 ;positional arguments error with meson 0.60
+ #:glib-or-gtk? #t
#:configure-flags
- `("-Dsystemd=false"
+ `("-Dsystemduserunitdir=/tmp/empty"
;; Enable nautilus extension for file sharing.
"-Dnautilus_extension=true")))
(native-inputs
@@ -1556,7 +1628,7 @@ sharing to the masses.")
(define-public sushi
(package
(name "sushi")
- (version "3.32.1")
+ (version "3.38.1")
(source (origin
(method url-fetch)
(uri (string-append "mirror://gnome/sources/" name "/"
@@ -1564,7 +1636,7 @@ sharing to the masses.")
name "-" version ".tar.xz"))
(sha256
(base32
- "02idvqjk76lii9xyg3b1yz4rw721709bdm5j8ikjym6amcghl0aj"))))
+ "1sc8i0vrw6bn43rklnwp2fl1gq0r0xfd3bszcqxd0a2mh46d3rpk"))))
(build-system meson-build-system)
(arguments
`(#:glib-or-gtk? #t
@@ -1574,11 +1646,11 @@ sharing to the masses.")
(lambda* (#:key outputs #:allow-other-keys)
(let ((prog (string-append (assoc-ref outputs "out")
"/bin/sushi")))
- ;; Put existing typelibs before sushi's deps, so as to correctly
- ;; infer gdk-pixbuf
+ ;; Put existing typelibs before sushi's deps, so as to
+ ;; correctly infer gdk-pixbuf.
(wrap-program prog
- `("GI_TYPELIB_PATH" suffix (,(getenv "GI_TYPELIB_PATH"))))
- #t))))))
+ `("GI_TYPELIB_PATH" suffix
+ (,(getenv "GI_TYPELIB_PATH"))))))))))
(native-inputs
`(("glib:bin" ,glib "bin")
("gettext" ,gettext-minimal)
@@ -1594,23 +1666,23 @@ sharing to the masses.")
("gjs" ,gjs)
("gst-plugins-base" ,gst-plugins-base)
("gstreamer" ,gstreamer)
- ("gtksourceview" ,gtksourceview-3)
+ ("gtksourceview" ,gtksourceview)
("harfbuzz" ,harfbuzz)
("libepoxy" ,libepoxy)
("libmusicbrainz" ,libmusicbrainz)
("libxml2" ,libxml2)
("neon" ,neon)
- ("webkitgtk" ,webkitgtk)))
+ ("webkitgtk" ,webkitgtk-with-libsoup2)))
(synopsis "File previewer for the GNOME desktop")
- (description "Sushi is a DBus-activated service that allows applications to
-preview files on the GNOME desktop.")
+ (description "Sushi is a DBus-activated service that allows applications
+to preview files on the GNOME desktop.")
(home-page "https://gitlab.gnome.org/GNOME/sushi")
(license license:gpl2+)))
(define-public rygel
(package
(name "rygel")
- (version "0.38.3")
+ (version "0.40.1")
(source (origin
(method url-fetch)
(uri (string-append "mirror://gnome/sources/" name "/"
@@ -1618,23 +1690,34 @@ preview files on the GNOME desktop.")
name "-" version ".tar.xz"))
(sha256
(base32
- "003xficqb08r1dgid20i7cn889lbfwrglpx78rjd5nkvgxbimhh8"))))
- (build-system gnu-build-system)
+ "0bd3d2swa8lq47b9r04x8xwdr9nhjnrwqi6scygd134wb5vxfh22"))))
+ (build-system meson-build-system)
+ (arguments
+ ;; Disable the tracker plugin.
+ '(#:configure-flags
+ (list "-Dplugins=external,gst-launch,lms,media-export,
+mpris,playbin,ruih,tracker3")))
(native-inputs
`(("gettext" ,gettext-minimal)
+ ("glib:bin" ,glib "bin") ; for glib-compile-schemas, etc.
("gobject-introspection" ,gobject-introspection)
("gtk-doc" ,gtk-doc/stable)
("pkg-config" ,pkg-config)
- ("vala" ,vala)))
+ ("vala" ,vala)
+ ("docbook-xml" ,docbook-xml)
+ ("dockbook-xsl" ,docbook-xsl)
+ ("xsltproc" ,libxslt)))
(inputs
`(("gdk-pixbuf" ,gdk-pixbuf)
("gssdp" ,gssdp)
("gstreamer" ,gstreamer)
("gst-plugins-base" ,gst-plugins-base)
+ ("gst-editing-services" ,gst-editing-services)
("gtk+" ,gtk+)
("gupnp" ,gupnp)
("gupnp-av" ,gupnp-av)
("gupnp-dlna" ,gupnp-dlna)
+ ("json-glib" ,json-glib)
("libgee" ,libgee)
("libmediaart" ,libmediaart)
("libsoup" ,libsoup)
@@ -1707,7 +1790,7 @@ project.")
(define-public gnome-menus
(package
(name "gnome-menus")
- (version "3.32.0")
+ (version "3.36.0")
(source (origin
(method url-fetch)
(uri (string-append "mirror://gnome/sources/gnome-menus/"
@@ -1715,7 +1798,7 @@ project.")
name "-" version ".tar.xz"))
(sha256
(base32
- "0x2blzqrapmbsbfzxjcdcpa3vkw9hq5k96h9kvjmy9kl415wcl68"))))
+ "07xvaf8s0fiv0035nk8zpzymn5www76w2a1vflrgqmp9plw8yd6r"))))
(build-system gnu-build-system)
(native-inputs
`(("gettext" ,gettext-minimal)
@@ -1730,14 +1813,14 @@ configuration files for the GNOME menu, as well as a simple menu editor.")
(define-public deja-dup
(package
(name "deja-dup")
- (version "40.6")
+ (version "42.8")
(source (origin
(method url-fetch)
(uri (string-append "https://gitlab.gnome.org/World/deja-dup/-/archive/"
version "/deja-dup-" version ".tar.bz2"))
(sha256
(base32
- "0lwazh6crby5wpy9fg6zvwy4plqbhs2f98bm5lbizjdlbh88n5q0"))))
+ "0d1jnlxpk52x56aqxz1g2xb4y4sm24h08p2di8mc1k8n8b52rpi4"))))
(build-system meson-build-system)
(arguments
`(#:glib-or-gtk? #t
@@ -1790,7 +1873,8 @@ configuration files for the GNOME menu, as well as a simple menu editor.")
("libgpg-error" ,libgpg-error)
("libnotify" ,libnotify)
("libsecret" ,libsecret)
- ("libsoup" ,libsoup)
+ ("libsoup" ,libsoup-minimal-2)
+ ("libhandy" ,libhandy)
("packagekit" ,packagekit)
("python" ,python)
("python-pygobject" ,python-pygobject)))
@@ -1826,7 +1910,6 @@ either on a local, or remote machine via a number of methods.")
(build-system glib-or-gtk-build-system)
(native-inputs
`(("desktop-file-utils" ,desktop-file-utils)
- ("gcc" ,gcc-8) ;required for -Wcast-function-type
("gettext" ,gettext-minimal)
("glib:bin" ,glib "bin")
("gobject-introspection" ,gobject-introspection)
@@ -1852,15 +1935,15 @@ and running smart commands.")
(define-public gnome-user-docs
(package
(name "gnome-user-docs")
- (version "3.32.3")
+ (version "40.5")
(source
(origin
(method url-fetch)
(uri (string-append "mirror://gnome/sources/gnome-user-docs/"
- (version-major+minor version)
+ (version-major version)
"/gnome-user-docs-" version ".tar.xz"))
(sha256
- (base32 "0dvsl0ldg8rf7yq0r4dv1pn41s7gjgcqp7agkbflkbmhrl6vbhig"))))
+ (base32 "0p6ysdqlfc7vvzsrcanl9bhsc7666sv42xxzpbgsf5j55z3yrkpr"))))
(build-system gnu-build-system)
(native-inputs
`(("gettext" ,gettext-minimal)
@@ -1875,34 +1958,6 @@ and system administrators.")
(home-page "https://live.gnome.org/DocumentationProject")
(license license:cc-by3.0)))
-(define-public gnome-getting-started-docs
- (package
- (name "gnome-getting-started-docs")
- (version "3.32.2")
- (source
- (origin
- (method url-fetch)
- (uri (string-append "mirror://gnome/sources/gnome-getting-started-docs/"
- (version-major+minor version)
- "/gnome-getting-started-docs-" version ".tar.xz"))
- (sha256
- (base32 "1v4k465mlzrhgcdddzs6bmm0yliyrfx6jg3gh0s17a08i0w5rbwq"))))
- (build-system gnu-build-system)
- (native-inputs
- `(("gettext" ,gettext-minimal)
- ("itstool" ,itstool)
- ("pkg-config" ,pkg-config)
- ("xmllint" ,libxml2)))
- (synopsis "Help to get new users started with the GNOME desktop")
- (description
- "The GNOME Getting Started Documentation contains GNOME's intuitive
-\"Getting Started\" tour, with video guides, that can be viewed with Yelp.
-
-It is normally used together with @command{gnome-initial-setup}, but is also
-useful as a tutorial and users' guide for new or less experienced users.")
- (home-page "https://live.gnome.org/DocumentationProject")
- (license license:cc-by-sa3.0)))
-
(define-public dia
;; This version from GNOME's repository includes fixes for compiling with
;; recent versions of the build tools. The latest activity on the
@@ -1946,12 +2001,10 @@ relationship modeling, and network diagrams. The program supports various file
formats like PNG, SVG, PDF and EPS.")
(license license:gpl2+))))
-;; This is the unstable release, but it is required for the current stable
-;; release of gvfs (1.38.1).
(define-public libgdata
(package
(name "libgdata")
- (version "0.17.9")
+ (version "0.18.1")
(source (origin
(method url-fetch)
(uri (string-append "mirror://gnome/sources/" name "/"
@@ -1959,34 +2012,32 @@ formats like PNG, SVG, PDF and EPS.")
name "-" version ".tar.xz"))
(sha256
(base32
- "0fj54yqxdapdppisqm1xcyrpgcichdmipq0a0spzz6009ikzgi45"))))
- (build-system gnu-build-system)
+ "1iq4d1qy0vkmy29xvr13dgz4pxvn5v3yi2swryld0ajinvp951fx"))))
+ (build-system meson-build-system)
(arguments
'(#:phases
(modify-phases %standard-phases
- (add-before 'check 'disable-failing-tests
+ (add-before 'check 'set-home-for-tests
(lambda _
- ;; The PicasaWeb API tests fail with gnome-online-accounts@3.24.2.
- ;; They have been removed in libgdata 0.17.6, so just do the same.
- (substitute* "gdata/tests/Makefile"
- (("picasaweb\\$\\(EXEEXT\\) ") ""))
- #t)))))
+ (setenv "HOME" "/tmp"))))))
(native-inputs
`(("glib:bin" ,glib "bin")
+ ("gobject-introspection" ,gobject-introspection)
("gsettings-desktop-schemas" ,gsettings-desktop-schemas)
("intltool" ,intltool)
("pkg-config" ,pkg-config)
("uhttpmock" ,uhttpmock)))
(inputs
`(("cyrus-sasl" ,cyrus-sasl)
- ("glib-networking" ,glib-networking)))
+ ("glib-networking" ,glib-networking)
+ ("vala" ,vala)))
(propagated-inputs
`(("gcr" ,gcr)
("glib" ,glib)
("gnome-online-accounts:lib" ,gnome-online-accounts "lib")
("json-glib" ,json-glib)
("liboauth" ,liboauth)
- ("libsoup" ,libsoup)
+ ("libsoup" ,libsoup-minimal-2)
("libxml2" ,libxml2)))
(home-page "https://wiki.gnome.org/Projects/libgdata")
(synopsis "Library for accessing online service APIs")
@@ -2033,19 +2084,20 @@ to other formats.")
(define-public gnome-characters
(package
(name "gnome-characters")
- (version "3.30.0")
+ (version "40.0")
(source
(origin
(method url-fetch)
(uri (string-append "mirror://gnome/sources/"
- "gnome-characters/" (version-major+minor version)
+ "gnome-characters/" (version-major version)
"/gnome-characters-" version ".tar.xz"))
(sha256
(base32
- "08cwz39iwgsyyb2wqhb8vfbmh1cwfkgfiy7adp08w7rwqi99x3dp"))))
+ "0z2xa4w921bzpzj6gv88pvbrijcnnwni6jxynwz0ybaravyzaqha"))))
(build-system meson-build-system)
(arguments
- `(#:glib-or-gtk? #t
+ `(#:meson ,meson-0.59 ;positional arguments error with meson 0.60
+ #:glib-or-gtk? #t
#:phases (modify-phases %standard-phases
(add-after 'install 'wrap
(lambda* (#:key outputs #:allow-other-keys)
@@ -2054,8 +2106,7 @@ to other formats.")
(wrap-program (string-append (assoc-ref outputs "out")
"/bin/gnome-characters")
`("GI_TYPELIB_PATH" ":" prefix
- (,(getenv "GI_TYPELIB_PATH"))))
- #t)))))
+ (,(getenv "GI_TYPELIB_PATH")))))))))
(native-inputs
`(("gettext" ,gettext-minimal)
("glib:bin" ,glib "bin")
@@ -2065,6 +2116,7 @@ to other formats.")
(inputs
`(("gjs" ,gjs)
("gtk+" ,gtk+)
+ ("libhandy" ,libhandy)
("libunistring" ,libunistring)
("gnome-desktop" ,gnome-desktop)))
(home-page "https://wiki.gnome.org/Apps/CharacterMap")
@@ -2099,18 +2151,18 @@ commonly used macros.")
(define-public gnome-contacts
(package
(name "gnome-contacts")
- (version "3.34")
+ (version "40.0")
(source (origin
(method url-fetch)
(uri (string-append "mirror://gnome/sources/gnome-contacts/"
- (version-major+minor version) "/"
+ (version-major version) "/"
name "-" version ".tar.xz"))
(sha256
(base32
- "04igc9xvyc4kb5xf5g2missnvyvj9zv5cqxf5k4z7hb0sv42wq4r"))))
+ "0w2g5xhw65adzvwzakrj5kaim4sw1w7s8qqwm3nm6inq50znzpn9"))))
(build-system meson-build-system)
(arguments
- `(#:configure-flags '("-Dcheese=false")
+ `(#:configure-flags '("-Dcheese=disabled")
#:phases
(modify-phases %standard-phases
(add-after 'unpack 'generate-vapis
@@ -2121,16 +2173,16 @@ commonly used macros.")
(invoke "vapigen" "--directory=vapi" "--pkg=gio-2.0"
"--library=goa-1.0"
- (string-append goa "/share/gir-1.0/Goa-1.0.gir"))
- #t))
+ (string-append goa "/share/gir-1.0/Goa-1.0.gir"))))
(add-after 'unpack 'skip-gtk-update-icon-cache
;; Don't create 'icon-theme.cache'.
(lambda _
(substitute* "build-aux/meson_post_install.py"
- (("gtk-update-icon-cache") "true"))
- #t)))))
+ (("gtk-update-icon-cache") "true")))))))
(native-inputs
- `(("glib:bin" ,glib "bin")
+ `(("docbook-xml" ,docbook-xml-4.2)
+ ("docbook-xsl" ,docbook-xsl)
+ ("glib:bin" ,glib "bin")
("pkg-config" ,pkg-config)))
(inputs
`(("docbook-xml" ,docbook-xml)
@@ -2143,6 +2195,7 @@ commonly used macros.")
("gst-plugins-base" ,gst-plugins-base)
("gtk+" ,gtk+)
("libgee" ,libgee)
+ ("libhandy" ,libhandy)
("libxslt" ,libxslt)
("telepathy-glib" ,telepathy-glib)
("vala" ,vala)))
@@ -2159,16 +2212,16 @@ offline sources, providing a centralized place for managing your contacts.")
(define-public gnome-desktop
(package
(name "gnome-desktop")
- (version "3.34.2")
+ (version "40.4")
(source
(origin
(method url-fetch)
(uri (string-append "mirror://gnome/sources/" name "/"
- (version-major+minor version) "/"
+ (version-major version) "/"
name "-" version ".tar.xz"))
(sha256
(base32
- "1v983xirwp1y6ggz97bh742ak6gff0hxb359dgn37nikjxhvm0a0"))))
+ "1vs5knn2yj6a449p9bn5w5407i1yvxfxg8xv844qgl70hpsrdbl8"))))
(build-system meson-build-system)
(arguments
'(#:phases
@@ -2198,10 +2251,11 @@ offline sources, providing a centralized place for managing your contacts.")
;; Tests require a running X server and locales.
(system "Xvfb :1 &")
(setenv "DISPLAY" ":1")
+ (setenv "XDG_CACHE_HOME" "/tmp/xdg-cache")
+ (setenv "XDG_CONFIG_HOME" "/tmp")
(setenv "GUIX_LOCPATH"
- (string-append (assoc-ref inputs "glibc-locales")
- "/lib/locale"))
- #t)))))
+ (search-input-directory inputs
+ "lib/locale")))))))
(native-inputs
`(("glib:bin" ,glib "bin") ; for gdbus-codegen
("glibc-locales" ,glibc-locales) ; for tests
@@ -2273,18 +2327,19 @@ and keep up to date translations of documentation.")
(define-public gnome-disk-utility
(package
(name "gnome-disk-utility")
- (version "3.34.0")
+ (version "40.2")
(source (origin
(method url-fetch)
(uri (string-append "mirror://gnome/sources/" name "/"
- (version-major+minor version) "/"
+ (version-major version) "/"
name "-" version ".tar.xz"))
(sha256
(base32
- "1mb7q90lnlp97dhxhnadhjagcfd12dfqzp0vj9h6b1r61pzhy97y"))))
+ "1rr1ypb89p51b6428yqvczmpmylwjfnhnkgx78hzm3vxm3m15lff"))))
(build-system meson-build-system)
(arguments
- '(#:configure-flags '("-Dlogind=libelogind")
+ `(#:meson ,meson-0.59 ;positional arguments error with meson 0.60
+ #:configure-flags '("-Dlogind=libelogind")
#:phases
(modify-phases %standard-phases
(add-after 'unpack 'skip-gtk-update-icon-cache
@@ -2309,6 +2364,7 @@ and keep up to date translations of documentation.")
("gtk+" ,gtk+)
("libcanberra" ,libcanberra)
("libdvdread" ,libdvdread)
+ ("libhandy" ,libhandy)
("libnotify" ,libnotify)
("libpwquality" ,libpwquality)
("libsecret" ,libsecret)
@@ -2321,18 +2377,19 @@ and keep up to date translations of documentation.")
(define-public gnome-font-viewer
(package
(name "gnome-font-viewer")
- (version "3.30.0")
+ (version "40.0")
(source (origin
(method url-fetch)
(uri (string-append "mirror://gnome/sources/gnome-font-viewer/"
- (version-major+minor version)
+ (version-major version)
"/gnome-font-viewer-" version ".tar.xz"))
(sha256
(base32
- "1wwnx2zrlbd2d6np7m9s78alx6j6ranrnh1g2z6zrv9qcj8rpzz5"))))
+ "0hpyi0sz3gcqqs9lkwyk8b6hr39m3n27432x98kxr436jj37dk6j"))))
(build-system meson-build-system)
(arguments
- '(#:phases
+ `(#:meson ,meson-0.59 ;positional arguments error with meson 0.60
+ #:phases
(modify-phases %standard-phases
(add-after 'unpack 'patch-post-install-script
(lambda _
@@ -2356,7 +2413,9 @@ and keep up to date translations of documentation.")
(inputs
`(("glib" ,glib)
("gnome-desktop" ,gnome-desktop)
- ("gtk+" ,gtk+)))
+ ("gtk+" ,gtk+)
+ ("libhandy" ,libhandy)
+ ("libxml2" ,libxml2)))
(home-page "https://gitlab.gnome.org/GNOME/gnome-font-viewer")
(synopsis "GNOME Fonts")
(description "Application to show you the fonts installed on your computer
@@ -2367,7 +2426,7 @@ the font would look under various sizes.")
(define-public gcr
(package
(name "gcr")
- (version "3.34.0")
+ (version "3.41.0")
(source (origin
(method url-fetch)
(uri (string-append "mirror://gnome/sources/" name "/"
@@ -2375,8 +2434,8 @@ the font would look under various sizes.")
name "-" version ".tar.xz"))
(sha256
(base32
- "0925snsixzkwh49xiayqmj6fcrmklqk8kyy0jkv7m64h9abm1pr9"))))
- (build-system gnu-build-system)
+ "00fsf82ycac8qi0kkiq759p6jrn63pyz4ksn4wnq7m4ax94zq289"))))
+ (build-system meson-build-system)
(arguments
'(#:phases
(modify-phases %standard-phases
@@ -2384,10 +2443,21 @@ the font would look under various sizes.")
;; build environment.
(add-after 'unpack 'disable-failing-tests
(lambda _
- (substitute* "Makefile.in"
- (("[[:blank:]]+test-system-prompt\\$\\(EXEEXT\\)")
+ (substitute* "gcr/meson.build"
+ (("[[:blank:]]+'system-prompt',")
""))
#t))
+ (add-after 'unpack 'skip-gtk-update-icon-cache
+ ;; Don't create 'icon-theme.cache'.
+ (lambda _
+ (substitute* "meson_post_install.py"
+ (("gtk-update-icon-cache") "true"))
+ #t))
+ (add-after 'unpack 'fix-systemd-detection
+ (lambda _
+ (substitute* "gcr/gcr-ssh-agent-service.c"
+ (("#ifdef WITH_SYSTEMD")
+ "#if (WITH_SYSTEMD)"))))
(add-before 'check 'pre-check
(lambda _
;; Some tests expect to write to $HOME.
@@ -2396,11 +2466,17 @@ the font would look under various sizes.")
(inputs
`(("dbus" ,dbus)
("gnupg" ,gnupg) ;called as a child process during tests
- ("libgcrypt" ,libgcrypt)))
+ ("libgcrypt" ,libgcrypt)
+ ("libsecret" ,libsecret)))
(native-inputs
`(("python" ,python-wrapper) ;for tests
+ ("openssh" ,openssh) ;for tests
("pkg-config" ,pkg-config)
("gettext" ,gettext-minimal)
+ ("autoconf" ,autoconf)
+ ("automake" ,automake)
+ ("libtool" ,libtool)
+ ("gtk-doc" ,gtk-doc)
("glib" ,glib "bin")
("gobject-introspection" ,gobject-introspection)
("libxml2" ,libxml2)
@@ -2509,15 +2585,15 @@ GNOME Desktop.")
(define-public gnome-keyring
(package
(name "gnome-keyring")
- (version "3.34.0")
+ (version "40.0")
(source (origin
(method url-fetch)
(uri (string-append "mirror://gnome/sources/" name "/"
- (version-major+minor version) "/"
+ (version-major version) "/"
name "-" version ".tar.xz"))
(sha256
(base32
- "0hqrsh5g9q9lm190f0m85q4nki8k4ng7wphl6qbccdry59aakkg9"))))
+ "0cdrlcw814zayhvlaxqs1sm9bqlfijlp22dzzd0g5zg2isq4vlm3"))))
(build-system gnu-build-system)
(arguments
`(#:tests? #f ;48 of 603 tests fail because /var/lib/dbus/machine-id does
@@ -2568,7 +2644,7 @@ GNOME Desktop.")
("autoconf" ,autoconf)
("automake" ,automake)
("libxslt" ,libxslt) ;for documentation
- ("docbook-xml" ,docbook-xml-4.2)
+ ("docbook-xml" ,docbook-xml-4.3)
("docbook-xsl" ,docbook-xsl)))
(propagated-inputs
`(("gcr" ,gcr)))
@@ -2587,24 +2663,31 @@ forgotten when the session ends.")
(define-public evince
(package
(name "evince")
- (version "3.36.5")
+ (version "40.2")
(source (origin
- (method url-fetch)
- (uri (string-append "mirror://gnome/sources/evince/"
- (version-major+minor version) "/"
- "evince-" version ".tar.xz"))
- (sha256
- (base32
- "0z79jl0j9xq9wgwkfr0d1w1qrdy4447y8shs407n5srr0vixc3bg"))))
- (build-system glib-or-gtk-build-system)
+ (method url-fetch)
+ (uri "mirror://gnome/sources/evince/40/evince-40.2.tar.xz")
+ (sha256
+ (base32
+ "0xrwls1bhvny8vvd7mfjy9p26zjch0pd6x6j9jn9g2ka6xwyrxqg"))))
+ (build-system meson-build-system)
(arguments
- `(#:configure-flags '("--disable-nautilus" "--enable-introspection")
+ `(#:meson ,meson-0.59 ;positional arguments error with meson 0.60
+ #:glib-or-gtk? #t
+ #:build-type "release"
+ #:configure-flags
+ '("-Dnautilus=false"
+ "-Dintrospection=true"
+ ;; XXX: Generating the documentation fails because the
+ ;; libevdocument.devhelp document cannot be created. This seems to be
+ ;; caused by a problem during the XSL transformation.
+ "-Dgtk_doc=false")
#:phases
(modify-phases %standard-phases
- (add-before 'install 'skip-gtk-update-icon-cache
+ (add-after 'unpack 'skip-gtk-update-icon-cache
;; Don't create 'icon-theme.cache'.
(lambda _
- (substitute* "data/Makefile"
+ (substitute* "meson_post_install.py"
(("gtk-update-icon-cache") "true"))
#t)))))
(inputs
@@ -2633,9 +2716,7 @@ forgotten when the session ends.")
("dconf" ,dconf)
("libcanberra" ,libcanberra)
("libsecret" ,libsecret)
-
- ;; For tests.
- ("dogtail" ,python2-dogtail)))
+ ("libhandy" ,libhandy)))
(native-inputs
`(("itstool" ,itstool)
("intltool" ,intltool)
@@ -2655,16 +2736,16 @@ on the GNOME Desktop with a single simple application.")
(define-public gsettings-desktop-schemas
(package
(name "gsettings-desktop-schemas")
- (version "3.34.0")
+ (version "41.0")
(source
(origin
- (method url-fetch)
- (uri (string-append "mirror://gnome/sources/" name "/"
- (version-major+minor version) "/"
- name "-" version ".tar.xz"))
- (sha256
- (base32
- "1bayr76aylawf2fhyjhv9zgk4kpv7ivrrmd80khb0h3h1wk092r8"))))
+ (method url-fetch)
+ (uri (string-append "mirror://gnome/sources/" name "/"
+ (version-major version) "/"
+ name "-" version ".tar.xz"))
+ (sha256
+ (base32
+ "1v9jagk679m01nji0acirynxinziv036618c7xc49l4nwmr9ja3p"))))
(build-system meson-build-system)
(arguments
'(#:phases (modify-phases %standard-phases
@@ -2673,27 +2754,24 @@ on the GNOME Desktop with a single simple application.")
(let ((theme (assoc-ref inputs "gnome-backgrounds")))
(substitute* (find-files "schemas"
"\\.gschema\\.xml\\.in$")
- ;; Provide the correct file name of the default GNOME
- ;; background, 'adwaita-timed.xml'.
+ ;; Provide the correct file name of the default
+ ;; GNOME background, 'adwaita-timed.xml'.
(("@datadir@/backgrounds/gnome")
(string-append theme "/share/backgrounds/gnome"))
;; Do not reference fonts, that may not exist.
- (("'Source Code Pro 10'") "'Monospace 11'"))
- #t))))))
+ (("'Source Code Pro 10'") "'Monospace 11'"))))))))
(inputs
`(("glib" ,glib)
("gnome-backgrounds" ,gnome-backgrounds)))
(native-inputs
- `(("intltool" ,intltool)
- ("glib" ,glib "bin") ; glib-compile-schemas, etc.
+ `(("gettext" ,gettext-minimal)
+ ("glib" ,glib "bin") ; glib-compile-schemas, etc.
("gobject-introspection" ,gobject-introspection)
("pkg-config" ,pkg-config)))
(home-page "https://launchpad.net/gsettings-desktop-schemas")
- (synopsis
- "GNOME settings for various desktop components")
- (description
- "Gsettings-desktop-schemas contains a collection of GSettings schemas
-for settings shared by various components of the GNOME desktop.")
+ (synopsis "GNOME settings for various desktop components")
+ (description "Gsettings-desktop-schemas contains a collection of GSettings
+schemas for settings shared by various components of the GNOME desktop.")
(license license:lgpl2.1+)))
(define-public python-liblarch
@@ -2765,7 +2843,7 @@ and how they are displayed (View).")
(package-version python))
"/site-packages")))
(wrap-program prog
- `("PYTHONPATH" = (,(getenv "PYTHONPATH") ,pylib))
+ `("GUIX_PYTHONPATH" = (,(getenv "GUIX_PYTHONPATH") ,pylib))
`("GI_TYPELIB_PATH" = (,(getenv "GI_TYPELIB_PATH"))))
#t))))))
(native-inputs
@@ -2776,7 +2854,7 @@ and how they are displayed (View).")
("gtk+:bin" ,gtk+ "bin")
("pkg-config" ,pkg-config)))
(inputs
- `(("gdk-pixbuf" ,gdk-pixbuf+svg)
+ `(("librsvg" ,librsvg)
("gsettings-desktop-schemas" ,gsettings-desktop-schemas)
("gtk+" ,gtk+)
("pango" ,pango)
@@ -2865,19 +2943,23 @@ GNOME and KDE desktops to the icon names proposed in the specification.")
;; gnome-icon-theme was renamed to adwaita-icon-theme after version 3.12.0.
(define-public adwaita-icon-theme
- (package (inherit gnome-icon-theme)
+ (package/inherit gnome-icon-theme
(name "adwaita-icon-theme")
- (version "3.34.3")
+ (version "40.1.1")
(source (origin
(method url-fetch)
(uri (string-append "mirror://gnome/sources/" name "/"
- (version-major+minor version) "/"
+ (version-major version) "/"
name "-" version ".tar.xz"))
(sha256
(base32
- "025rj1fskw1y448hiar4a9icyzpyr242nlh9xhsmyp8jb71dihp7"))))
+ "1xpqa1rgmixlp953938d08xvf7kv36h747ysial8g65dsrp46v0b"))))
(native-inputs
- `(("gtk-encode-symbolic-svg" ,gtk+ "bin")))))
+ ;; The following requires the SVG pixbuf loader, provided by librsvg,
+ ;; available on x86_64 only.
+ `(,@(if (target-64bit?)
+ `(("gtk-encode-symbolic-svg" ,gtk+ "bin"))
+ '())))))
(define-public tango-icon-theme
(package
@@ -3098,7 +3180,7 @@ some form of information without getting in the user's way.")
(define-public libpeas
(package
(name "libpeas")
- (version "1.28.0")
+ (version "1.30.0")
(source
(origin
(method url-fetch)
@@ -3107,7 +3189,7 @@ some form of information without getting in the user's way.")
name "-" version ".tar.xz"))
(sha256
(base32
- "05cb7drn6arc4gi02wgsvzibigi2riz5gnfnmlb0zmbfnj9ikna2"))))
+ "18xrk1c1ixlhkmykcfiafrl2am470ws687xqvjlq40zwkcp5dx8b"))))
(build-system meson-build-system)
(arguments
'(#:phases
@@ -3117,6 +3199,8 @@ some form of information without getting in the user's way.")
(let ((xorg-server (assoc-ref inputs "xorg-server"))
(disp ":1"))
(setenv "DISPLAY" disp)
+ (setenv "XDG_CACHE_HOME" "/tmp/xdg-cache")
+ (setenv "XDG_CONFIG_HOME" "/tmp")
;; Tests require a running X server.
(system (format #f "~a/bin/Xvfb ~a &" xorg-server disp))
#t))))))
@@ -3185,7 +3269,7 @@ API add-ons to make GTK+ widgets OpenGL-capable.")
(define-public glade3
(package
(name "glade")
- (version "3.36.0")
+ (version "3.38.2")
(source (origin
(method url-fetch)
(uri (string-append "mirror://gnome/sources/" name "/"
@@ -3193,27 +3277,47 @@ API add-ons to make GTK+ widgets OpenGL-capable.")
name "-" version ".tar.xz"))
(sha256
(base32
- "023gx8rj51njn8fsb6ma5kz1irjpxi4js0n8rwy22inc4ysldd8r"))))
- (build-system glib-or-gtk-build-system)
+ "1dxsiz9ahqkxg2a1dw9sbd8jg59y5pdz4c1gvnbmql48gmj8gz4q"))
+ (patches (search-patches
+ "glade-gls-set-script-name.patch"
+ "glade-test-widget-null-icon.patch"))))
+ (build-system meson-build-system)
(arguments
- `(#:phases
+ `(#:meson ,meson-0.59
+ #:phases
(modify-phases %standard-phases
+ (add-after 'unpack 'skip-gtk-update-icon-cache
+ ;; Don't create 'icon-theme.cache'.
+ (lambda _
+ (substitute* "meson_post_install.py"
+ (("gtk-update-icon-cache") "true"))))
+
+ ,@(if (this-package-native-input "gjs")
+ '()
+ '((add-after 'unpack 'skip-gjs-test
+ (lambda _
+ ;; When the optional dependency on GJS is missing, skip
+ ;; the GJS plugin tests.
+ (substitute* "tests/modules.c"
+ (("g_test_add.*JavaScript.*" all)
+ (string-append "// " all "\n")))
+ (delete-file "tests/catalogs/gjsplugin.xml")))))
+
(add-before 'configure 'fix-docbook
(lambda* (#:key inputs #:allow-other-keys)
- (substitute* "man/Makefile.in"
- (("http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl")
+ (substitute* "man/meson.build"
+ (("http://docbook.sourceforge.net/release/xsl/\
+current/manpages/docbook.xsl")
(string-append (assoc-ref inputs "docbook-xsl")
"/xml/xsl/docbook-xsl-"
,(package-version docbook-xsl)
- "/manpages/docbook.xsl")))
- #t))
+ "/manpages/docbook.xsl")))))
(add-before 'check 'pre-check
(lambda _
(setenv "HOME" "/tmp")
;; Tests require a running X server.
(system "Xvfb :1 &")
- (setenv "DISPLAY" ":1")
- #t)))))
+ (setenv "DISPLAY" ":1"))))))
(inputs
`(("gtk+" ,gtk+)
("libxml2" ,libxml2)))
@@ -3224,7 +3328,16 @@ API add-ons to make GTK+ widgets OpenGL-capable.")
("libxslt" ,libxslt) ;for xsltproc
("docbook-xml" ,docbook-xml-4.2)
("docbook-xsl" ,docbook-xsl)
- ("python" ,python-2)
+ ("glib:bin" ,glib "bin")
+ ("python-pygobject" ,python-pygobject)
+ ("gobject-introspection" ,gobject-introspection)
+
+ ;; GJS depends on Rust, which is x86_64-only so far, so remove the GJS
+ ;; dependency on other platforms (FIXME).
+ ,@(if (target-x86-64?)
+ `(("gjs" ,gjs))
+ '())
+
("pkg-config" ,pkg-config)
("xorg-server" ,xorg-server-for-tests)))
(home-page "https://glade.gnome.org")
@@ -3283,104 +3396,70 @@ XML/CSS rendering engine.")
(sha256
(base32
"0kbpp9ksl7977xiga37sk1gdw1r039v6zviqznl7alvvg39yp26i"))))
- (build-system gnu-build-system)
- (arguments
- '(#:configure-flags '("--disable-static")))
- (native-inputs
- `(("pkg-config" ,pkg-config)
- ("gettext" ,gettext-minimal)
-
- ;; For tests.
- ("perl" ,perl)
- ("perl-xml-parser" ,perl-xml-parser)))
- (inputs
- `(("zlib" ,zlib)
- ("bzip2" ,bzip2)))
- (propagated-inputs
- `(("gdk-pixbuf" ,gdk-pixbuf)
- ("glib" ,glib)
- ("libxml2" ,libxml2)))
- (home-page "https://www.gnome.org/projects/libgsf")
- (synopsis "GNOME's Structured File Library")
- (description
- "Libgsf aims to provide an efficient extensible I/O abstraction for
-dealing with different structured file formats.")
-
- ;; LGPLv2.1-only.
- (license license:lgpl2.1)))
-
-(define-public librsvg
- (package
- (name "librsvg")
- (version "2.40.21")
- (source (origin
- (method url-fetch)
- (uri (string-append "mirror://gnome/sources/" name "/"
- (version-major+minor version) "/"
- name "-" version ".tar.xz"))
- (sha256
- (base32
- "1fljkag2gr7c4k5mn798lgf9903xslz8h51bgvl89nnay42qjqpp"))))
- (build-system gnu-build-system)
+ (build-system glib-or-gtk-build-system)
+ (outputs '("out" "bin" "doc"))
(arguments
`(#:configure-flags
- (list "--disable-static"
- "--enable-vala") ; needed for e.g. gnome-mines
+ (list
+ "--disable-static"
+ "--enable-introspection"
+ (string-append "--with-gir-dir="
+ (assoc-ref %outputs "out")
+ "/share/gir-"
+ ,(version-major
+ (package-version gobject-introspection))
+ ".0")
+ (string-append "--with-typelib-dir="
+ (assoc-ref %outputs "out")
+ "/lib/girepository-"
+ ,(version-major
+ (package-version gobject-introspection))
+ ".0")
+ (string-append "--with-html-dir="
+ (assoc-ref %outputs "doc")
+ "/share/gtk-doc/html")
+ "--with-zlib"
+ "--with-bz2")
#:phases
(modify-phases %standard-phases
- (add-before 'configure 'pre-configure
+ (add-after 'unpack 'patch-docbook-xml
(lambda* (#:key inputs #:allow-other-keys)
- (substitute* "gdk-pixbuf-loader/Makefile.in"
- ;; By default the gdk-pixbuf loader is installed under
- ;; gdk-pixbuf's prefix. Work around that.
- (("gdk_pixbuf_moduledir = .*$")
- (string-append "gdk_pixbuf_moduledir = "
- "$(prefix)/lib/gdk-pixbuf-2.0/2.10.0/"
- "loaders\n"))
- ;; Drop the 'loaders.cache' file, it's in gdk-pixbuf+svg.
- (("gdk_pixbuf_cache_file = .*$")
- "gdk_pixbuf_cache_file = $(TMPDIR)/loaders.cache\n"))
- #t))
- (add-before 'check 'remove-failing-tests
- (lambda _
- (with-directory-excursion "tests/fixtures/reftests"
- (for-each delete-file
- '(;; This test fails on i686:
- "svg1.1/masking-path-04-b.svg"
- ;; This test fails on armhf:
- "svg1.1/masking-mask-01-b.svg"
- ;; This test fails on aarch64:
- "bugs/777834-empty-text-children.svg")))
+ (with-directory-excursion "doc"
+ (substitute* "gsf-docs.xml"
+ (("http://www.oasis-open.org/docbook/xml/4.5/")
+ (string-append (assoc-ref inputs "docbook-xml")
+ "/xml/dtd/docbook/"))))
#t)))))
(native-inputs
- `(("pkg-config" ,pkg-config)
- ("vala" ,vala)
- ("glib" ,glib "bin") ; glib-mkenums, etc.
- ("gobject-introspection" ,gobject-introspection))) ; g-ir-compiler, etc.
+ `(("docbook-xml" ,docbook-xml)
+ ("gettext" ,gettext-minimal)
+ ("gobject-introspection" ,gobject-introspection)
+ ("perl" ,perl)
+ ("perl-xml-parser" ,perl-xml-parser)
+ ("pkg-config" ,pkg-config)
+ ("python" ,python-wrapper)))
(inputs
- `(;; XXX: 1.44 causes some test failures, so we stick with 1.42 for
- ;; this ancient version of librsvg.
- ("pango" ,pango-1.42)
- ("libcroco" ,libcroco)
- ("bzip2" ,bzip2)
- ("libgsf" ,libgsf)
- ("libxml2" ,libxml2)))
- (propagated-inputs
- ;; librsvg-2.0.pc refers to all of that.
- `(("cairo" ,cairo)
+ `(("bzip2" ,bzip2)
("gdk-pixbuf" ,gdk-pixbuf)
- ("glib" ,glib)))
- (home-page "https://wiki.gnome.org/LibRsvg")
- (synopsis "Render SVG files using Cairo")
- (description
- "Librsvg is a C library to render SVG files using the Cairo 2D graphics
-library.")
- (license license:lgpl2.0+)))
+ ("zlib" ,zlib)))
+ (propagated-inputs
+ `(("glib" ,glib)
+ ("libxml2" ,libxml2)))
+ (synopsis "G Structured File Library")
+ (description "Libgsf aims to provide an efficient extensible I/O abstraction
+for dealing with different structured file formats.")
+ (home-page "https://gitlab.gnome.org/GNOME/libgsf")
+ (license
+ (list
+ ;; Library
+ license:lgpl2.1+
+ ;; Others
+ license:lgpl2.0+))))
-(define-public librsvg-next
+(define-public librsvg
(package
(name "librsvg")
- (version "2.50.3")
+ (version "2.50.7")
(source (origin
(method url-fetch)
(uri (string-append "mirror://gnome/sources/librsvg/"
@@ -3388,13 +3467,12 @@ library.")
"librsvg-" version ".tar.xz"))
(sha256
(base32
- "0n79i4wj9hm0d3bbn4xvknq5ylhqs16pvhaqr1rxspx9wfc8lad4"))
+ "1g3f8byg5w08fx1bka12mmpl59v6a4q2p827w6m2la6mijq63yzz"))
(modules '((guix build utils)))
(snippet
- '(begin (delete-file-recursively "vendor")
- #t))))
+ '(begin (delete-file-recursively "vendor")))))
(build-system cargo-build-system)
- (outputs '("out" "doc"))
+ (outputs '("out" "doc" "debug"))
(arguments
`(#:install-source? #f
#:modules
@@ -3456,8 +3534,7 @@ library.")
(substitute* "rsvg-docs.xml"
(("http://www.oasis-open.org/docbook/xml/4.3/")
(string-append (assoc-ref inputs "docbook-xml")
- "/xml/dtd/docbook/"))))
- #t))
+ "/xml/dtd/docbook/"))))))
(add-after 'unpack 'prepare-for-build
(lambda _
;; In lieu of #:make-flags
@@ -3465,39 +3542,37 @@ library.")
;; Something about the build environment resists building
;; successfully with the '--locked' flag.
(substitute* '("Makefile.am" "Makefile.in")
- (("--locked") ""))
- #t))
+ (("--locked") ""))))
(add-before 'configure 'pre-configure
- (lambda _
+ (lambda* (#:key outputs #:allow-other-keys)
(substitute* "gdk-pixbuf-loader/Makefile.in"
;; By default the gdk-pixbuf loader is installed under
;; gdk-pixbuf's prefix. Work around that.
(("gdk_pixbuf_moduledir = .*$")
(string-append "gdk_pixbuf_moduledir = "
- "$(prefix)/lib/gdk-pixbuf-2.0/2.10.0/"
- "loaders\n"))
- ;; Drop the 'loaders.cache' file, it's in gdk-pixbuf+svg.
- (("gdk_pixbuf_cache_file = .*$")
- "gdk_pixbuf_cache_file = $(TMPDIR)/loaders.cache\n"))
- #t))
+ "$(prefix)/"
+ ,(dirname %gdk-pixbuf-loaders-cache-file) "/"
+ "loaders\n")))
+ (substitute* "configure"
+ (("gdk_pixbuf_cache_file=.*")
+ (string-append "gdk_pixbuf_cache_file="
+ (assoc-ref outputs "out") "/"
+ ,%gdk-pixbuf-loaders-cache-file "\n")))))
(add-after 'configure 'gnu-configure
- (lambda* (#:key inputs native-inputs outputs #:allow-other-keys)
- ((assoc-ref gnu:%standard-phases 'configure)
- #:native-inputs native-inputs
- #:inputs inputs
- #:outputs outputs
- #:configure-flags
- (list "--disable-static"
- "--enable-vala"
- (string-append "--with-html-dir="
- (assoc-ref %outputs "doc")
- "/share/gtk-doc/html")))))
+ (lambda* (#:key outputs #:allow-other-keys #:rest args)
+ (apply (assoc-ref gnu:%standard-phases 'configure)
+ #:configure-flags
+ (list "--disable-static"
+ "--enable-vala"
+ (string-append "--with-html-dir="
+ (assoc-ref outputs "doc")
+ "/share/gtk-doc/html"))
+ args)))
(add-after 'configure 'dont-vendor-self
(lambda* (#:key vendor-dir #:allow-other-keys)
;; Don't keep the whole tarball in the vendor directory
(delete-file-recursively
- (string-append vendor-dir "/" ,name "-" ,version ".tar.xz"))
- #t))
+ (string-append vendor-dir "/" ,name "-" ,version ".tar.xz"))))
(replace 'build
(assoc-ref gnu:%standard-phases 'build))
(add-before 'check 'ignore-failing-tests
@@ -3523,8 +3598,7 @@ library.")
(("fn multiple_input_files_not_allowed_for_png_output" all)
(string-append "#[ignore] " all))
(("fn stylesheet_option_error" all)
- (string-append "#[ignore] " all)))
- #t))
+ (string-append "#[ignore] " all)))))
(replace 'check
(lambda* args
((assoc-ref gnu:%standard-phases 'check)
@@ -3532,26 +3606,24 @@ library.")
(replace 'install
(assoc-ref gnu:%standard-phases 'install)))))
(native-inputs
- `(("docbook-xml" ,docbook-xml-4.3)
- ("glib" ,glib "bin")
- ("gobject-introspection" ,gobject-introspection)
- ("pkg-config" ,pkg-config)
- ("python" ,python-wrapper)
- ("ruby" ,ruby)
- ("vala" ,vala)))
- (inputs
- `(("bzip2" ,bzip2)
- ("fontconfig" ,fontconfig)
- ("freetype" ,freetype)
- ("harfbuzz" ,harfbuzz)
- ("libcroco" ,libcroco)
- ("libgsf" ,libgsf)
- ("libxml2" ,libxml2)
- ("pango" ,pango)))
+ (list docbook-xml-4.3
+ `(,glib "bin")
+ gobject-introspection
+ pkg-config
+ python-wrapper
+ ruby
+ vala))
+ (inputs
+ (list bzip2
+ fontconfig
+ freetype
+ harfbuzz
+ libcroco
+ libgsf
+ libxml2
+ pango))
(propagated-inputs
- `(("cairo" ,cairo)
- ("gdk-pixbuf" ,gdk-pixbuf)
- ("glib" ,glib)))
+ (list cairo gdk-pixbuf glib))
(synopsis "SVG rendering library")
(description "Librsvg is a library to render SVG images to Cairo surfaces.
GNOME uses this to render SVG icons. Outside of GNOME, other desktop
@@ -3560,6 +3632,104 @@ diagrams.")
(home-page "https://wiki.gnome.org/LibRsvg")
(license license:lgpl2.1+)))
+;; This copy of librsvg uses the bundled rust libraries. It is useful for
+;; packages which have too many dependencies to be rebuilt as frequently
+;; as the rust inputs are updated.
+;; TODO: Remove this package and use packaged rust libraries!
+(define-public librsvg-bootstrap
+ (package
+ (inherit librsvg)
+ (name "librsvg")
+ (version "2.50.7")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "mirror://gnome/sources/librsvg/"
+ (version-major+minor version) "/"
+ "librsvg-" version ".tar.xz"))
+ (sha256
+ (base32
+ "1g3f8byg5w08fx1bka12mmpl59v6a4q2p827w6m2la6mijq63yzz"))
+ (modules '((guix build utils)))
+ (snippet
+ '(begin
+ (for-each delete-file (find-files "vendor" "\\.a$"))))))
+ (arguments
+ (substitute-keyword-arguments (package-arguments librsvg)
+ ((#:vendor-dir _ "vendor") "vendor")
+ ((#:cargo-inputs _) '())
+ ((#:cargo-development-inputs _) '())))
+ (properties '((hidden? . #t)))))
+
+(define-public librsvg-2.40
+ ;; This is the last version implemented in C.
+ (package
+ (inherit librsvg)
+ (version "2.40.21")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "mirror://gnome/sources/librsvg/"
+ (version-major+minor version)
+ "/librsvg-" version ".tar.xz"))
+ (sha256
+ (base32
+ "1fljkag2gr7c4k5mn798lgf9903xslz8h51bgvl89nnay42qjqpp"))))
+ (build-system gnu-build-system)
+ (arguments
+ `(#:configure-flags (list "--disable-static")
+ #:phases
+ (modify-phases %standard-phases
+ (add-before 'configure 'pre-configure
+ (lambda* (#:key inputs #:allow-other-keys)
+ (substitute* "gdk-pixbuf-loader/Makefile.in"
+ ;; By default the gdk-pixbuf loader is installed under
+ ;; gdk-pixbuf's prefix. Work around that.
+ (("gdk_pixbuf_moduledir = .*$")
+ (string-append "gdk_pixbuf_moduledir = "
+ "$(prefix)/lib/gdk-pixbuf-2.0/2.10.0/"
+ "loaders\n"))
+ ;; Drop the 'loaders.cache' file, it's in gdk-pixbuf+svg.
+ (("gdk_pixbuf_cache_file = .*$")
+ "gdk_pixbuf_cache_file = $(TMPDIR)/loaders.cache\n"))
+ #t))
+ (add-before 'check 'remove-failing-tests
+ (lambda _
+ (with-directory-excursion "tests/fixtures/reftests"
+ (for-each delete-file
+ '(;; This test fails on i686:
+ "svg1.1/masking-path-04-b.svg"
+ ;; This test fails on armhf:
+ "svg1.1/masking-mask-01-b.svg"
+ ;; This test fails on aarch64:
+ "bugs/777834-empty-text-children.svg"
+
+ ;; These two tests fail due to slightly different
+ ;; text rendering (different kerning or similar),
+ ;; nothing alarming.
+ "bugs/340047.svg"
+ "bugs/749415.svg"))))))))
+ (native-inputs
+ (list pkg-config
+ `(,glib "bin") ; glib-mkenums, etc.
+ gobject-introspection)) ; g-ir-compiler, etc.
+ (inputs
+ (list pango libcroco bzip2 libgsf libxml2))
+ (propagated-inputs
+ ;; librsvg-2.0.pc refers to all of that.
+ (list cairo gdk-pixbuf glib))
+ (synopsis "Render SVG files using Cairo (ancient C version)")
+ (properties '((hidden? . #t)))))
+
+(define* (librsvg-for-system #:optional
+ (system (or (%current-target-system)
+ (%current-system))))
+ ;; Since librsvg 2.50 depends on Rust, and Rust is only correctly supported
+ ;; on x86_64 so far, use the ancient C version on other platforms (FIXME).
+ (if (string-prefix? "x86_64-" system)
+ librsvg
+ librsvg-2.40))
+
+(export librsvg-for-system)
+
(define-public libidl
(package
(name "libidl")
@@ -3617,11 +3787,19 @@ functionality was designed to be as reusable and portable as possible.")
;; ... which they then completly ignore !!
#:phases
(modify-phases %standard-phases
+ (add-after 'unpack 'fix-parallel-build
+ ;; Parallel build fails because of a failed dependency,
+ ;; https://bugzilla.gnome.org/show_bug.cgi?id=732274
+ (lambda _
+ (substitute* "src/services/name/Makefile.am"
+ (("orbit_name_server_2_DEPENDENCIES = \\$(DEPS) CosNaming.h")
+ "orbit_name_server_2_DEPENDENCIES = \
+$(DEPS) CosNaming.h libname-server-2.a"))))
(add-before 'configure 'ignore-deprecations
(lambda _
(substitute* "linc2/src/Makefile.in"
- (("-DG_DISABLE_DEPRECATED") "-DGLIB_DISABLE_DEPRECATION_WARNINGS"))
- #t)))))
+ (("-DG_DISABLE_DEPRECATED")
+ "-DGLIB_DISABLE_DEPRECATION_WARNINGS")))))))
(inputs `(("glib" ,glib)
("libidl" ,libidl)))
(native-inputs
@@ -4233,7 +4411,7 @@ engineering.")
(package-version python))
"/site-packages")))
(wrap-program prog
- `("PYTHONPATH" = (,(getenv "PYTHONPATH") ,pylib))
+ `("PYTHONPATH" = (,(getenv "GUIX_PYTHONPATH") ,pylib))
`("GI_TYPELIB_PATH" = (,(getenv "GI_TYPELIB_PATH"))))))))))
(native-inputs
`(("desktop-file-utils" ,desktop-file-utils)
@@ -4243,7 +4421,7 @@ engineering.")
("gtk+:bin" ,gtk+ "bin")
("pkg-config" ,pkg-config)))
(inputs
- `(("gdk-pixbuf" ,gdk-pixbuf+svg)
+ `(("librsvg" ,librsvg)
("gsettings-desktop-schemas" ,gsettings-desktop-schemas)
("gtk+" ,gtk+)
("pango" ,pango)
@@ -4294,15 +4472,15 @@ engineering.")
(define-public seahorse
(package
(name "seahorse")
- (version "3.36.2")
+ (version "41.0")
(source
(origin
(method url-fetch)
(uri (string-append "mirror://gnome/sources/" name "/"
- (version-major+minor version) "/" name "-"
+ (version-major version) "/" name "-"
version ".tar.xz"))
(sha256
- (base32 "16wmxxppgcgfj8zkagcny5af1c81x32ysm9d6j9f2k7bmik21ss5"))))
+ (base32 "1x99i7kdvd8hbxcs5rfrq7nw6r9bfzaw263zaigjjj04h6gc1vp6"))))
(build-system meson-build-system)
(arguments
'(#:glib-or-gtk? #t
@@ -4313,7 +4491,11 @@ engineering.")
(lambda _
(substitute* "build-aux/meson_post_install.py"
(("gtk-update-icon-cache") "true"))
- #t)))))
+ #t))
+ (add-before 'check 'pre-check
+ (lambda _
+ ;; Tests require a writable HOME.
+ (setenv "HOME" (getcwd)))))))
(inputs
`(("gtk+" ,gtk+)
("gcr" ,gcr)
@@ -4322,10 +4504,10 @@ engineering.")
("openldap" ,openldap)
("openssh" ,openssh)
("avahi" ,avahi)
- ("libhandy" ,libhandy-0.0)
+ ("libhandy" ,libhandy)
("libpwquality" ,libpwquality)
("libsecret" ,libsecret)
- ("libsoup" ,libsoup)))
+ ("libsoup" ,libsoup-minimal-2)))
(native-inputs
`(("gettext" ,gettext-minimal)
("glib:bin" ,glib "bin")
@@ -4343,52 +4525,61 @@ passwords in the GNOME keyring.")
(define-public vala
(package
(name "vala")
- (version "0.46.5")
+ (version "0.54.2")
(source (origin
(method url-fetch)
- (uri (string-append "mirror://gnome/sources/" name "/"
+ (uri (string-append "mirror://gnome/sources/vala/"
(version-major+minor version) "/"
- name "-" version ".tar.xz"))
+ "vala-" version ".tar.xz"))
(sha256
(base32
- "07fv895sp9wq74b20qig7hic0r4ynrr5pfaqba02r44xb794fy0s"))))
- (build-system gnu-build-system)
+ "048k5c6c6y7jyb961krnrb7m0kghr0yrkpnfx3j5ckbx652yfkc8"))))
+ (build-system glib-or-gtk-build-system)
(arguments
- '(#:phases
+ '(#:configure-flags '("--enable-coverage")
+ #:phases
(modify-phases %standard-phases
+ (add-after 'unpack 'patch-docbook-xml
+ (lambda* (#:key inputs #:allow-other-keys)
+ (with-directory-excursion "doc/manual"
+ (substitute* '("manual.xml" "version.xml.in")
+ (("http://www.oasis-open.org/docbook/xml/4.4/")
+ (string-append (assoc-ref inputs "docbook-xml")
+ "/xml/dtd/docbook/"))))))
(add-before 'check 'pre-check
- (lambda _
- (setenv "CC" "gcc")
- (substitute* "valadoc/tests/testrunner.sh"
- (("export PKG_CONFIG_PATH=" m)
- (string-append m "$PKG_CONFIG_PATH:")))
- ;; For missing '/etc/machine-id'.
- (setenv "DBUS_FATAL_WARNINGS" "0")
- #t)))))
+ (lambda _
+ (setenv "CC" "gcc")
+ (substitute* "valadoc/tests/libvaladoc\
+/tests-extra-environment.sh"
+ (("export PKG_CONFIG_PATH=" m)
+ (string-append m "$PKG_CONFIG_PATH:"))))))))
(native-inputs
- `(("pkg-config" ,pkg-config)
+ `(("bison" ,bison)
+ ("dbus" ,dbus) ; for dbus tests
+ ("docbook-xml" ,docbook-xml-4.4)
+ ("docbook-xsl" ,docbook-xsl)
("flex" ,flex)
- ("bison" ,bison)
- ("xsltproc" ,libxslt)
- ("dbus" ,dbus) ; for dbus tests
- ("gobject-introspection" ,gobject-introspection))) ; for gir tests
- (inputs
- `(("graphviz" ,graphviz)))
+ ("gobject-introspection" ,gobject-introspection) ; for gir tests
+ ("help2man" ,help2man)
+ ("perl" ,perl)
+ ("pkg-config" ,pkg-config)
+ ("xsltproc" ,libxslt)))
(propagated-inputs
- `(("glib" ,glib))) ; required by libvala-0.40.pc
+ `(("glib" ,glib) ; required by libvala-0.40.pc
+ ("libgvc" ,graphviz)))
(home-page "https://wiki.gnome.org/Projects/Vala/")
- (synopsis "Compiler for the GObject type system")
- (description
- "Vala is a programming language that aims to bring modern programming
-language features to GNOME developers without imposing any additional runtime
-requirements and without using a different ABI compared to applications and
-libraries written in C.")
+ (synopsis "Compiler using the GObject type system")
+ (description "Vala is a programming language using modern high level
+abstractions without imposing additional runtime requirements and without using
+a different ABI compared to applications and libraries written in C. Vala uses
+the GObject type system and has additional code generation routines that make
+targeting the GNOME stack simple.")
(license license:lgpl2.1+)))
-(define-public vala-0.50
- (package
- (inherit vala)
- (version "0.50.2")
+;;; An older variant kept to build libsoup-minimal-2.
+(define-public vala-0.52
+ (package/inherit vala
+ (version "0.52.0")
(source (origin
(method url-fetch)
(uri (string-append "mirror://gnome/sources/vala/"
@@ -4396,12 +4587,12 @@ libraries written in C.")
"vala-" version ".tar.xz"))
(sha256
(base32
- "1nnf0x6vk0a9p2y6z7jwjfvmlxh3qhj581v381r0y1sxsv35s39c"))))))
+ "12y6p8wdjp01vmfhxg2cgh32xnyqq6ivblvrar9clnj6vc867qhx"))))))
(define-public vte
(package
(name "vte")
- (version "0.60.3")
+ (version "0.64.2")
(source (origin
(method url-fetch)
(uri (string-append "mirror://gnome/sources/vte/"
@@ -4409,7 +4600,7 @@ libraries written in C.")
"vte-" version ".tar.xz"))
(sha256
(base32
- "0al2v6fn061v4j1wwvppim1q283y2a6s0iyl29hxhmx3h48nxdzy"))))
+ "063ys3330cvhbz1dln9irhciavb2prw098lvhpcc2rx6cl5q4g1b"))))
(build-system meson-build-system)
(arguments
`(#:configure-flags
@@ -4506,7 +4697,8 @@ selection and URL hints.")))
(arguments
;; Disable -Werror and such, to avoid build failures on compilation
;; warnings.
- '(#:configure-flags '("--enable-compile-warnings=minimum")
+ '(#:configure-flags '("--enable-compile-warnings=minimum"
+ "CFLAGS=-O2 -g -fcommon")
#:phases
(modify-phases %standard-phases
(add-before 'install 'skip-gtk-update-icon-cache
@@ -4544,7 +4736,7 @@ and RDP protocols.")
(define-public dconf
(package
(name "dconf")
- (version "0.36.0")
+ (version "0.40.0")
(source (origin
(method url-fetch)
(uri (string-append
@@ -4553,7 +4745,7 @@ and RDP protocols.")
name "-" version ".tar.xz"))
(sha256
(base32
- "0bfs069pjv6lhp7xrzmrhz3876ay2ryqxzc6mlva1hhz34ibprlz"))))
+ "0cs5nayg080y8pb9b7qccm1ni8wkicdmqp1jsgc22110r6j24zyg"))))
(build-system meson-build-system)
(propagated-inputs
;; In Requires of dconf.pc.
@@ -4573,7 +4765,7 @@ and RDP protocols.")
("vala" ,vala)))
(arguments
`(#:glib-or-gtk? #t
- #:configure-flags '("-Denable-gtk-doc=true")
+ #:configure-flags '("-Dgtk_doc=true")
#:phases (modify-phases %standard-phases
(add-after 'unpack 'increase-test-timeout
(lambda _
@@ -4589,36 +4781,91 @@ is to provide a backend to GSettings on platforms that don't already have
configuration storage systems.")
(license license:lgpl2.1+)))
-(define-public json-glib
+(define-public json-glib-minimal
(package
- (name "json-glib")
- (version "1.4.4")
+ (name "json-glib-minimal")
+ (version "1.6.2")
(source (origin
(method url-fetch)
- (uri (string-append "mirror://gnome/sources/" name "/"
- (version-major+minor version) "/"
- name "-" version ".tar.xz"))
+ (uri (string-append "mirror://gnome/sources/json-glib/"
+ (version-major+minor version)
+ "/json-glib-" version ".tar.xz"))
(sha256
(base32
- "0ixwyis47v5bkx6h8a1iqlw3638cxcv57ivxv4gw2gaig51my33j"))))
+ "092g2dyy1hhl0ix9kp33wcab0pg1qicnsv0cj5ms9g9qs336cgd3"))))
(build-system meson-build-system)
+ (arguments
+ `(#:glib-or-gtk? #t)) ; To wrap binaries and/or compile schemas
(native-inputs
`(("gettext" ,gettext-minimal)
- ("glib" ,glib "bin") ;for glib-mkenums and glib-genmarshal
- ("gobject-introspection" ,gobject-introspection)
+ ("glib" ,glib "bin") ;for glib-mkenums and glib-genmarshal
("pkg-config" ,pkg-config)))
+ (inputs
+ `(("bash-minimal" ,bash-minimal)))
(propagated-inputs
- `(("glib" ,glib))) ;according to json-glib-1.0.pc
+ `(("glib" ,glib))) ;according to json-glib-1.0.pc
(home-page "https://wiki.gnome.org/Projects/JsonGlib")
- (synopsis "Compiler for the GObject type system")
- (description
- "JSON-GLib is a C library based on GLib providing serialization and
-deserialization support for the JavaScript Object Notation (JSON) format
-described by RFC 4627. It provides parser and generator GObject classes and
-various wrappers for the complex data types employed by JSON, such as arrays
-and objects.")
+ (synopsis "Glib and GObject implementation of JSON")
+ (description "JSON-GLib is a library providing serialization and
+described by RFC 4627. It implements a full JSON parser and generator using
+GLib and GObject, and integrates JSON with GLib data types.")
(license license:lgpl2.1+)))
+(define-public json-glib
+ (package/inherit json-glib-minimal
+ (name "json-glib")
+ (outputs (cons "doc" (package-outputs json-glib-minimal)))
+ (arguments
+ (substitute-keyword-arguments (package-arguments json-glib-minimal)
+ ((#:configure-flags _)
+ `(list "-Ddocs=true"
+ "-Dman=true"
+ ,@(if (%current-target-system)
+ ;; If enabled, gtkdoc-scangobj will try to execute a
+ ;; cross-compiled binary.
+ '("-Dgtk_doc=disabled"
+ ;; Trying to build introspection data when cross-compiling
+ ;; causes errors during linking.
+ "-Dintrospection=disabled")
+ '())))
+ ((#:phases phases '%standard-phases)
+ `(modify-phases ,phases
+ (add-after 'unpack 'patch-docbook
+ (lambda* (#:key native-inputs inputs #:allow-other-keys)
+ (with-directory-excursion "doc"
+ (substitute* (find-files "." "\\.xml$")
+ (("http://www.oasis-open.org/docbook/xml/4\\.3/")
+ (string-append (assoc-ref (or native-inputs inputs)
+ "docbook-xml")
+ "/xml/dtd/docbook/")))
+ (substitute* "meson.build"
+ (("http://docbook.sourceforge.net/release/xsl/current/")
+ (string-append (assoc-ref (or native-inputs inputs)
+ "docbook-xsl")
+ "/xml/xsl/docbook-xsl-1.79.2/"))))))
+ ;; When cross-compiling, there are no docs to move.
+ ,(if (%current-target-system)
+ '(add-after 'install 'stub-docs
+ (lambda* (#:key outputs #:allow-other-keys)
+ ;; The daemon doesn't like empty output paths.
+ (mkdir (assoc-ref outputs "doc"))))
+ '(add-after 'install 'move-docs
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (doc (assoc-ref outputs "doc")))
+ (mkdir-p (string-append doc "/share"))
+ (rename-file
+ (string-append out "/share/gtk-doc")
+ (string-append doc "/share/gtk-doc"))))))))))
+ (native-inputs
+ (append
+ `(("docbook-xml" ,docbook-xml-4.3)
+ ("docbook-xsl" ,docbook-xsl)
+ ("gobject-introspection" ,gobject-introspection)
+ ("gtk-doc" ,gtk-doc)
+ ("xsltproc" ,libxslt))
+ (package-native-inputs json-glib-minimal)))))
+
(define-public libxklavier
(package
(name "libxklavier")
@@ -4703,7 +4950,7 @@ library.")
(define-public glib-networking
(package
(name "glib-networking")
- (version "2.62.2")
+ (version "2.70.0")
(source (origin
(method url-fetch)
(uri (string-append "mirror://gnome/sources/glib-networking/"
@@ -4711,23 +4958,39 @@ library.")
"glib-networking-" version ".tar.xz"))
(sha256
(base32
- "0i2mw75297ql72h47vyvff3hqa0kcmqybblj52fqrarb0kfbhi06"))))
+ "0dbg1na239mbavn4hknkax5sns9q2dbdnqw9wcpmhv58mzkhid36"))
+ (patches
+ (search-patches "glib-networking-gnutls-binding.patch"))))
(build-system meson-build-system)
(arguments
- `(#:configure-flags '("-Dlibproxy_support=false")))
+ (if (target-64bit?)
+ '()
+ (list #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'work-around-32-bit-time-t
+ (lambda _
+ (invoke "patch" "--force" "-p1" "-i"
+ #$(local-file
+ (search-patch
+ "glib-networking-32-bit-time.patch")))))))))
(native-inputs
`(("pkg-config" ,pkg-config)
- ("intltool" ,intltool)))
+ ("gettext" ,gettext-minimal)))
(inputs
`(("glib" ,glib)
("gnutls" ,gnutls)
- ("gsettings-desktop-schemas" ,gsettings-desktop-schemas)))
- (home-page "https://www.gnome.org")
- (synopsis "Network-related GIO modules")
- (description
- "This package contains various network related extensions for the GIO
-library.")
- (license license:lgpl2.0+)))
+ ("gsettings-desktop-schemas" ,gsettings-desktop-schemas)
+ ("libproxy" ,libproxy)))
+ (home-page "https://wiki.gnome.org/Projects/GLib")
+ (synopsis "Network extensions for GLib")
+ (description
+ "Glib-networking contains the implementations of certain GLib networking
+features that cannot be implemented directly in GLib itself because of their
+dependencies. Currently it contains GnuTLS and OpenSSL-based implementations of
+GTlsBackend, a libproxy-based implementation of GProxyResolver,
+GLibproxyResolver, and a GNOME GProxyResolver that uses the proxy information
+from the GSettings schemas in gsettings-desktop-schemas.")
+ (license license:lgpl2.1+)))
(define-public rest
(package
@@ -4753,7 +5016,7 @@ library.")
(propagated-inputs
;; rest-0.7.pc refers to all these.
`(("glib" ,glib)
- ("libsoup" ,libsoup)
+ ("libsoup" ,libsoup-minimal-2)
("libxml2" ,libxml2)))
(home-page "https://www.gtk.org/")
(synopsis "RESTful web api query library")
@@ -4763,10 +5026,11 @@ claim to be \"RESTful\". It includes convenience wrappers for libsoup and
libxml to ease remote use of the RESTful API.")
(license license:lgpl2.1+)))
-(define-public libsoup
+;;; A minimal version of libsoup used to prevent a cycle with Inkscape.
+(define-public libsoup-minimal
(package
- (name "libsoup")
- (version "2.72.0")
+ (name "libsoup-minimal")
+ (version "3.0.3")
(source (origin
(method url-fetch)
(uri (string-append "mirror://gnome/sources/libsoup/"
@@ -4774,25 +5038,12 @@ libxml to ease remote use of the RESTful API.")
"libsoup-" version ".tar.xz"))
(sha256
(base32
- "11skbyw2pw32178q3h8pi7xqa41b2x4k6q4k9f75zxmh8s23y30p"))))
+ "0pp2s9rj7pp45ac99hbqszznln5ljj38cbc8lbljfc5fmm6v0rai"))))
(build-system meson-build-system)
- (outputs '("out" "doc"))
(arguments
- `(#:modules ((guix build utils)
- (guix build meson-build-system)
- (ice-9 popen))
-
- #:configure-flags '("-Dgtk_doc=true")
+ `(#:configure-flags '("-Dgtk_doc=false")
#:phases
(modify-phases %standard-phases
- (add-after 'unpack 'patch-docbook-xml
- (lambda* (#:key inputs #:allow-other-keys)
- (let ((xmldoc (string-append (assoc-ref inputs "docbook-xml")
- "/xml/dtd/docbook")))
- (substitute* (find-files "docs/reference")
- (("http://.*/docbookx\\.dtd")
- (string-append xmldoc "/docbookx.dtd")))
- #t)))
(add-after 'unpack 'adjust-tests
(lambda _
;; This test fails due to missing /etc/nsswitch.conf
@@ -4801,93 +5052,37 @@ libxml to ease remote use of the RESTful API.")
((".*/sockets/unconnected.*") ""))
;; These fail because "subdomain.localhost" does not resolve in
- ;; the build environment.
- (substitute* "tests/hsts-test.c"
- ((".*/hsts/basic.*") "")
- ((".*/hsts/subdomains.*") "")
- ((".*/hsts/superdomain.*") "")
- ((".*/hsts/utf8-address.*") ""))
+ ;; the build environment. Moreover, the hsts-test suite fails on
+ ;; i686-linux because of errors from `session_get_uri' like
+ ;; "Unexpected status 200 OK (expected 301 Moved Permanently)"
+ ;; (see: https://gitlab.gnome.org/GNOME/libsoup/-/issues/239).
+ (substitute* "tests/meson.build"
+ ((".*'name': 'hsts'.*") ""))
(substitute* "tests/hsts-db-test.c"
- ((".*/hsts-db/subdomains.*") ""))
-
- ;; Generate a self-signed certificate that has "localhost" as its
- ;; 'dnsName'. Failing to do that, and starting with GnuTLS
- ;; 3.5.12, tests such as "ssl-tests" fail:
- ;;
- ;; ERROR:ssl-test.c:406:do_tls_interaction_test: Unexpected status 6 Unacceptable TLS certificate (expected 200 OK)
- ;;
- ;; 'certtool' is interactive so we have to pipe it the answers.
- ;; Reported at <https://bugzilla.gnome.org/show_bug.cgi?id=784696>.
- (let ((pipe (open-output-pipe "certtool --generate-self-signed \
- --load-privkey tests/test-key.pem --outfile tests/test-cert.pem")))
- (for-each (lambda (line)
- (display line pipe)
- (newline pipe))
- '("" ;Common name
- "" ;UID
- "Guix" ;Organizational unit name
- "GNU" ;Organization name
- "" ;Locality name
- "" ;State or province
- "" ;Country
- "" ;subject's domain component (DC)
- "" ;E-mail
- "" ;serial number
- "-1" ;expiration time
- "N" ;belong to authority?
- "N" ;web client certificate?
- "N" ;IPsec IKE?
- "Y" ;web server certificate?
- "localhost" ;dnsName of subject
- "" ;dnsName of subject (end)
- "" ;URI of subject
- "127.0.0.1" ;IP address of subject
- "" ;signing?
- "" ;encryption (RSA)?
- "" ;data encryption?
- "" ;sign OCSP requests?
- "" ;sign code?
- "" ;time stamping?
- "" ;email protection?
- "" ;URI of the CRL distribution point
- "y" ;above info OK?
- ))
- (close-pipe pipe))
- #t))
- (add-after 'install 'move-doc
- (lambda* (#:key outputs #:allow-other-keys)
- (let ((out (assoc-ref outputs "out"))
- (doc (assoc-ref outputs "doc")))
- (mkdir-p (string-append doc "/share"))
- (copy-recursively (string-append out "/share/gtk-doc")
- (string-append doc "/share/gtk-doc"))
- (delete-file-recursively (string-append out "/share/gtk-doc"))
- #t))))))
- (native-inputs
- `(("docbook-xml" ,docbook-xml-4.1.2)
- ("glib:bin" ,glib "bin") ; for glib-mkenums
- ("gobject-introspection" ,gobject-introspection)
- ("gtk-doc" ,gtk-doc/stable)
- ("intltool" ,intltool)
- ("pkg-config" ,pkg-config)
- ("python" ,python-wrapper)
- ("vala" ,vala)
- ("php" ,php)
- ("curl" ,curl)
- ("gnutls" ,gnutls) ;for 'certtool'
- ("httpd" ,httpd)))
+ ((".*/hsts-db/subdomains.*") "")))))))
+ (native-inputs
+ (list `(,glib "bin") ;for glib-mkenums
+ gobject-introspection
+ intltool
+ pkg-config
+ python-wrapper
+ vala
+ curl
+ gnutls ;for 'certtool'
+ httpd))
(propagated-inputs
- ;; libsoup-2.4.pc refers to all of these (except where otherwise noted)
- `(("brotli" ,brotli)
- ("glib" ,glib)
- ("glib-networking" ,glib-networking) ; for GIO runtime modules
- ("libpsl" ,libpsl)
- ("libxml2" ,libxml2)
- ("sqlite" ,sqlite)
- ("zlib" ,zlib)))
- (inputs
- `(("mit-krb5" ,mit-krb5)
- ("ntlm_auth" ,samba))) ; For ntlm_auth support
+ ;; libsoup-3.0.pc refers to all of these (except where otherwise noted)
+ (list brotli
+ glib
+ glib-networking ; for GIO runtime modules
+ libpsl
+ nghttp2 ;for pkg-config
+ `(,nghttp2 "lib")
+ libxml2
+ sqlite
+ zlib))
+ (inputs
+ (list mit-krb5 samba/fixed)) ; For ntlm_auth support
(home-page "https://wiki.gnome.org/Projects/libsoup")
(synopsis "GLib-based HTTP Library")
(description
@@ -4895,20 +5090,61 @@ libxml to ease remote use of the RESTful API.")
and the GLib main loop, to integrate well with GNOME applications.")
(license license:lgpl2.0+)))
+;;; An older variant kept to build the 'rest' package.
+(define-public libsoup-minimal-2
+ (package/inherit libsoup-minimal
+ (version "2.72.0")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "mirror://gnome/sources/libsoup/"
+ (version-major+minor version) "/"
+ "libsoup-" version ".tar.xz"))
+ (sha256
+ (base32
+ "11skbyw2pw32178q3h8pi7xqa41b2x4k6q4k9f75zxmh8s23y30p"))))
+ (arguments
+ (substitute-keyword-arguments (package-arguments libsoup-minimal)
+ ((#:phases phases)
+ `(modify-phases ,phases
+ (add-after 'unpack 'disable-failing-tests
+ (lambda _
+ ;; Disable the SSL test, failing since 2.68 and resolved in
+ ;; libsoup 3.
+ (substitute* "tests/meson.build"
+ (("[ \t]*\\['ssl', true, \\[\\]\\],") ""))))))))
+ (native-inputs
+ (modify-inputs (package-native-inputs libsoup-minimal)
+ (replace "vala" vala-0.52)))))
-;;; A minimal version of libsoup used to prevent a cycle with Inkscape.
-(define-public libsoup-minimal
- (package/inherit libsoup
- (name "libsoup-minimal")
- (outputs (delete "doc" (package-outputs libsoup)))
+(define-public libsoup
+ (package/inherit libsoup-minimal
+ (name "libsoup")
+ (outputs (cons "doc" (package-outputs libsoup-minimal)))
(arguments
- (substitute-keyword-arguments (package-arguments libsoup)
+ (substitute-keyword-arguments (package-arguments libsoup-minimal)
((#:configure-flags configure-flags)
- `(delete "-Dgtk_doc=true" ,configure-flags))
+ `(cons "-Dgtk_doc=true"
+ (delete "-Dgtk_doc=false" ,configure-flags)))
((#:phases phases)
`(modify-phases ,phases
- (delete 'move-doc)))))
- (native-inputs (alist-delete "gtk-doc" (package-native-inputs libsoup)))))
+ (add-after 'unpack 'patch-docbook-xml
+ (lambda* (#:key inputs #:allow-other-keys)
+ (let ((xmldoc (string-append (assoc-ref inputs "docbook-xml")
+ "/xml/dtd/docbook")))
+ (substitute* (find-files "docs/reference")
+ (("http://.*/docbookx\\.dtd")
+ (string-append xmldoc "/docbookx.dtd"))))))
+ (add-after 'install 'move-doc
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let ((out (assoc-ref outputs "out"))
+ (doc (assoc-ref outputs "doc")))
+ (mkdir-p (string-append doc "/share"))
+ (copy-recursively (string-append out "/share/gtk-doc")
+ (string-append doc "/share/gtk-doc"))
+ (delete-file-recursively
+ (string-append out "/share/gtk-doc")))))))))
+ (native-inputs (modify-inputs (package-native-inputs libsoup-minimal)
+ (prepend docbook-xml-4.1.2 gtk-doc)))))
(define-public libsecret
(package
@@ -5006,25 +5242,25 @@ and other secrets. It communicates with the \"Secret Service\" using DBus.")
(define-public gnome-mines
(package
(name "gnome-mines")
- (version "3.36.1")
+ (version "40.0")
(source
(origin
(method url-fetch)
(uri (string-append "mirror://gnome/sources/" name "/"
- (version-major+minor version) "/"
+ (version-major version) "/"
name "-" version ".tar.xz"))
(sha256
- (base32 "0m2680r94nk61imym4x73j03jwfjd8cxm592m5ybiqdfdw6i723i"))))
+ (base32 "0sf6kdvhr4pr3hddnj6ql9larz2wy108sri31id6x9g459nbly8z"))))
(build-system meson-build-system)
(arguments
- '(#:glib-or-gtk? #t
+ `(#:glib-or-gtk? #t
+ #:meson ,meson-0.59
#:phases
(modify-phases %standard-phases
(add-after 'unpack 'skip-gtk-update-icon-cache
(lambda _
(substitute* "build-aux/meson_post_install.py"
- (("gtk-update-icon-cache") (which "true")))
- #t)))))
+ (("gtk-update-icon-cache") (which "true"))))))))
(native-inputs
`(("glib:bin" ,glib "bin") ; for glib-compile-resources
("pkg-config" ,pkg-config)
@@ -5089,26 +5325,26 @@ once.")
(define-public gnome-sudoku
(package
(name "gnome-sudoku")
- (version "3.34.1")
+ (version "40.2")
(source
(origin
(method url-fetch)
(uri (string-append "mirror://gnome/sources/" name "/"
- (version-major+minor version) "/"
+ (version-major version) "/"
name "-" version ".tar.xz"))
(sha256
(base32
- "025y85r4qqardivvwiwhbmgarziykdy224m8zlrq8b79zv82793b"))))
+ "18slsxifad5cjz4fqi818i66jc9b7kzgn01qxa0ra4y7wcqha4in"))))
(build-system meson-build-system)
(arguments
- '(#:glib-or-gtk? #t
+ `(#:glib-or-gtk? #t
+ #:meson ,meson-0.59
#:phases
(modify-phases %standard-phases
(add-after 'unpack 'skip-gtk-update-icon-cache
(lambda _
(substitute* "build-aux/post_install.py"
- (("gtk-update-icon-cache") (which "true")))
- #t)))))
+ (("gtk-update-icon-cache") (which "true"))))))))
(native-inputs
`(("pkg-config" ,pkg-config)
("desktop-file-utils" ,desktop-file-utils)
@@ -5135,7 +5371,7 @@ more fun.")
(define-public gnome-terminal
(package
(name "gnome-terminal")
- (version "3.34.2")
+ (version "3.40.3")
(source
(origin
(method url-fetch)
@@ -5144,7 +5380,7 @@ more fun.")
name "-" version ".tar.xz"))
(sha256
(base32
- "0gc004f9b5k94gkdanmqjz3wqgnpny0l3nqm8zd19h4f0ps27mrv"))))
+ "08hsic7sn32xw12i3j0ard2bhfhp8gmzqm0pa8xzl5l1jhzsmsfb"))))
(build-system glib-or-gtk-build-system)
(arguments
'(#:configure-flags
@@ -5153,14 +5389,16 @@ more fun.")
#:phases
(modify-phases %standard-phases
(add-before 'configure 'patch-/bin/true
- (lambda _
- (substitute* "configure"
- (("/bin/true") (which "true"))))))))
+ (lambda _
+ (substitute* "configure"
+ (("/bin/true") (which "true"))))))))
(native-inputs
- `(("pkg-config" ,pkg-config)
+ `(("docbook-xsl" ,docbook-xsl)
+ ("pkg-config" ,pkg-config)
("desktop-file-utils" ,desktop-file-utils)
("intltool" ,intltool)
("itstool" ,itstool)
+ ("libxslt" ,libxslt)
("xmllint" ,libxml2)))
(propagated-inputs
`(("dconf" ,dconf)))
@@ -5182,9 +5420,9 @@ It supports several profiles, multiple tabs and implements several
keyboard shortcuts.")
(license license:gpl3+)))
-(define-public colord
+(define-public colord-minimal
(package
- (name "colord")
+ (name "colord-minimal")
(version "1.4.5")
(source
(origin
@@ -5195,33 +5433,27 @@ keyboard shortcuts.")
(base32 "05sydi6qqqx1rrqwnga1vbg9srkf89wdcfw5w4p4m7r37m2flx5p"))))
(build-system meson-build-system)
(arguments
- '(;; FIXME: One test fails:
+ '( ;; FIXME: One test fails:
;; /colord/icc-store (in lib/colord/colord-self-test-private):
;; Incorrect content type for /tmp/colord-vkve/already-exists.icc, got
;; application/x-zerosize
#:tests? #f
#:glib-or-gtk? #t
- #:configure-flags (list "-Dlocalstatedir=/var"
- ;; No dep on systemd.
- "-Dsystemd=false"
- ;; Wants to install to global completion dir;
- ;; punt.
+ #:configure-flags (list "-Dargyllcms_sensor=false" ;requires spotread
"-Dbash_completion=false"
"-Ddaemon_user=colord"
+ "-Ddocs=false"
+ "-Dlocalstatedir=/var"
+ "-Dman=false"
"-Dsane=true"
- "-Dvapi=true"
- ;; Requires spotread.
- "-Dargyllcms_sensor=false"
- ;; TODO: Requires docbook2x.
- "-Dman=false")
+ "-Dsystemd=false") ;no systemd
#:phases
(modify-phases %standard-phases
(add-before 'configure 'patch-build-system
(lambda* (#:key outputs #:allow-other-keys)
(substitute* "rules/meson.build"
(("udev.get_pkgconfig_variable\\('udevdir'\\)")
- (string-append "'" (assoc-ref outputs "out") "/lib/udev'")))
- #t))
+ (string-append "'" (assoc-ref outputs "out") "/lib/udev'")))))
(add-before 'configure 'set-sqlite3-file-name
(lambda* (#:key inputs #:allow-other-keys)
;; "colormgr dump" works by invoking the "sqlite3" command.
@@ -5229,13 +5461,10 @@ keyboard shortcuts.")
(let ((sqlite (assoc-ref inputs "sqlite")))
(substitute* "client/cd-util.c"
(("\"sqlite3\"")
- (string-append "\"" sqlite "/bin/sqlite3\"")))
- #t))))))
+ (string-append "\"" sqlite "/bin/sqlite3\"")))))))))
(native-inputs
`(("glib:bin" ,glib "bin") ; for glib-compile-resources, etc.
("gettext" ,gettext-minimal)
- ("gobject-introspection" ,gobject-introspection)
- ("gtk-doc" ,gtk-doc/stable)
("pkg-config" ,pkg-config)
("vala" ,vala)))
(propagated-inputs
@@ -5245,7 +5474,8 @@ keyboard shortcuts.")
("udev" ,eudev)))
(inputs
`(("dbus-glib" ,dbus-glib)
- ("gusb" ,gusb)
+ ("gobject-introspection" ,gobject-introspection)
+ ("gusb" ,gusb-minimal)
("libgudev" ,libgudev)
("libusb" ,libusb)
("polkit" ,polkit)
@@ -5259,6 +5489,41 @@ install and generate color profiles to accurately color manage input and
output devices.")
(license license:gpl2+)))
+(define-public colord
+ (package/inherit colord-minimal
+ (name "colord")
+ (arguments
+ (substitute-keyword-arguments
+ (package-arguments colord-minimal)
+ ((#:configure-flags flags)
+ `(begin
+ (use-modules (srfi srfi-1))
+ (append '("-Dbash_completion=true"
+ "-Ddocs=true"
+ "-Dman=true"
+ "-Dvapi=true")
+ (fold delete ,flags '("-Dbash_completion=false"
+ "-Ddocs=false"
+ "-Dman=false")))))
+ ((#:phases phases)
+ `(modify-phases ,phases
+ (add-after 'unpack 'fix-bash-completion-dir
+ (lambda* (#:key outputs #:allow-other-keys)
+ (substitute* "data/meson.build"
+ (("bash_completion.get_pkgconfig_variable\
+\\('completionsdir'\\)")
+ (string-append "'" (assoc-ref outputs "out")
+ "/etc/bash_completion.d'")))))))))
+ (native-inputs
+ (append
+ `(("bash-completion" ,bash-completion)
+ ("docbook-xsl-ns" ,docbook-xsl-ns)
+ ("gtk-doc" ,gtk-doc/stable)
+ ("libxml2" ,libxml2) ;for XML_CATALOG_FILES
+ ("libxslt" ,libxslt)
+ ("vala" ,vala)) ;for VAPI, needed by simple-scan
+ (package-native-inputs colord-minimal)))))
+
(define-public geoclue
(package
(name "geoclue")
@@ -5274,7 +5539,7 @@ output devices.")
(patches (search-patches "geoclue-config.patch"))))
(build-system meson-build-system)
(arguments
- '(#:configure-flags (list "-Dbus-srv-user=geoclue")))
+ '(#:configure-flags (list "-Ddbus-srv-user=geoclue")))
(native-inputs
`(("pkg-config" ,pkg-config)
("gobject-introspection" ,gobject-introspection)
@@ -5287,7 +5552,7 @@ output devices.")
("glib:bin" ,glib "bin")
("glib-networking" ,glib-networking)
("json-glib" ,json-glib)
- ("libsoup" ,libsoup)))
+ ("libsoup" ,libsoup-minimal-2)))
(home-page "https://gitlab.freedesktop.org/geoclue/geoclue/-/wikis/home")
(synopsis "Geolocation service")
(description "Geoclue is a D-Bus service that provides location
@@ -5317,9 +5582,7 @@ permission from user.")
(add-before 'check 'set-locales
(lambda* (#:key inputs #:allow-other-keys)
(setenv "GUIX_LOCPATH"
- (string-append (assoc-ref inputs "glibc-locales")
- "/lib/locale"))
- #t)))))
+ (search-input-directory inputs "lib/locale")))))))
(native-inputs
`(("glib:bin" ,glib "bin") ; for glib-mkenums
("glibc-locales" ,glibc-locales) ; for tests
@@ -5332,7 +5595,7 @@ permission from user.")
;; geocode-glib-1.0.pc refers to GIO.
`(("glib" ,glib)))
(inputs
- `(("libsoup" ,libsoup)))
+ `(("libsoup" ,libsoup-minimal-2)))
(home-page "https://github.com/GNOME/geocode-glib/")
(synopsis "Geocoding and reverse-geocoding library")
(description
@@ -5426,15 +5689,15 @@ service via the system message bus.")
(define-public libgweather
(package
(name "libgweather")
- (version "3.34.0")
+ (version "40.0")
(source (origin
(method url-fetch)
(uri (string-append "mirror://gnome/sources/" name "/"
- (version-major+minor version) "/"
+ (version-major version) "/"
name "-" version ".tar.xz"))
(sha256
(base32
- "1fgiqswkhiaijanml3mb16ajn5aanrk7x6yiwagp9n9rssam6902"))))
+ "1rkf4yv43qcahyx7bismdv6z2vh5azdnm1fqfmnzrada9cm8ykna"))))
(build-system meson-build-system)
(arguments
`(#:tests? #f ; one of two tests requires network access
@@ -5447,14 +5710,15 @@ service via the system message bus.")
("gobject-introspection" ,gobject-introspection)
("pkg-config" ,pkg-config)
("vala" ,vala)
- ("intltool" ,intltool)))
+ ("intltool" ,intltool)
+ ("python-pygobject" ,python-pygobject)))
(propagated-inputs
;; gweather-3.0.pc refers to GTK+, GDK-Pixbuf, GLib/GObject, libxml, and
;; libsoup.
`(("gtk+" ,gtk+)
("gdk-pixbuf" ,gdk-pixbuf)
("libxml2" ,libxml2)
- ("libsoup" ,libsoup)
+ ("libsoup" ,libsoup-minimal-2)
("geocode-glib" ,geocode-glib)))
(inputs
`(("tzdata" ,tzdata)))
@@ -5468,20 +5732,21 @@ services for numerous locations.")
(define-public gnome-settings-daemon
(package
(name "gnome-settings-daemon")
- (version "3.34.1")
+ (version "41.0")
(source
(origin
(method url-fetch)
(uri (string-append "mirror://gnome/sources/" name "/"
- (version-major+minor version) "/"
+ (version-major version) "/"
name "-" version ".tar.xz"))
(sha256
(base32
- "07y1gbicz0pbxmdgwrdzyc4byy30wfwpbqgvnx27gnpqmc5s50cr"))
+ "111qcvlqjpasnswdniy5n53wyrs1y7a91qx1w4nsppnizdhn7jp6"))
(patches (search-patches "gnome-settings-daemon-gc.patch"))))
(build-system meson-build-system)
(arguments
- `(#:glib-or-gtk? #t
+ `(#:meson ,meson-0.59
+ #:glib-or-gtk? #t
#:configure-flags
(list (string-append "-Dudev_dir="
(assoc-ref %outputs "out")
@@ -5503,8 +5768,7 @@ services for numerous locations.")
(substitute* "plugins/housekeeping/gsd-disk-space.c"
(("g_find_program_in_path \\(DISK_SPACE_ANALYZER\\)")
(string-append "g_strdup (\"" baobab
- "/bin/baobab\")")))
- #t))))
+ "/bin/baobab\")")))))))
;; Color management test can't reach the colord system service.
#:tests? #f))
@@ -5626,7 +5890,7 @@ which are easy to play with the aid of a mouse.")
(define-public amtk
(package
(name "amtk")
- (version "5.0.2")
+ (version "5.3.1")
(source (origin
(method url-fetch)
(uri (string-append "mirror://gnome/sources/amtk/"
@@ -5634,10 +5898,8 @@ which are easy to play with the aid of a mouse.")
"amtk-" version ".tar.xz"))
(sha256
(base32
- "11jgz2i9wjzv4alrxl1qyxiapb52w7vs5ygfgsw0qgdap8gqkk3i"))))
- (build-system gnu-build-system)
- (arguments
- '(#:configure-flags '("--enable-gtk-doc")))
+ "12v3nj1bb7507ndprjggq0hpz8k719b4bwvl8sm43p3ibmn27anm"))))
+ (build-system meson-build-system)
(native-inputs
`(("gobject-introspection" ,gobject-introspection)
("glib:bin" ,glib "bin") ; for glib-mkenums
@@ -5657,26 +5919,33 @@ both a traditional UI or a modern UI with a GtkHeaderBar.")
(define-public devhelp
(package
(name "devhelp")
- (version "3.34.0")
+ (version "41.2")
(source (origin
(method url-fetch)
(uri (string-append "mirror://gnome/sources/" name "/"
- (version-major+minor version) "/"
+ (version-major version) "/"
name "-" version ".tar.xz"))
(sha256
(base32
- "0zpmn6fgkgiayvn4diia5df0s6s7dqrdnp3nrvpavsmgn0vhb4pg"))))
+ "1lk0gycjvs6gibhy0zs3ffkrkzrkyl5nkp7n60hgpa6syjq91apc"))))
(build-system meson-build-system)
(arguments
- '(#:glib-or-gtk? #t
+ `(#:glib-or-gtk? #t
+ #:meson ,meson-0.59
#:phases
(modify-phases %standard-phases
(add-after 'unpack 'skip-gtk-update-icon-cache
;; Don't create 'icon-theme.cache'.
(lambda _
- (substitute* "meson_post_install.py"
- (("gtk-update-icon-cache") "true"))
- #t)))))
+ (substitute* "build-aux/meson/meson_post_install.py"
+ (("gtk-update-icon-cache") "true"))))
+ (add-after 'unpack 'fix-devhelp-gir-inputs
+ ;; It still mentions webkitgtk 4.0
+ (lambda _
+ (substitute* "devhelp/meson.build"
+ (("'WebKit2-4.0'") "'WebKit2-4.1'")))))))
+ (propagated-inputs
+ `(("gsettings-desktop-schemas" ,gsettings-desktop-schemas)))
(native-inputs
`(("intltool" ,intltool)
("itstool" ,itstool)
@@ -5695,6 +5964,22 @@ natively with GTK-Doc (the API reference system developed for GTK+ and used
throughout GNOME for API documentation).")
(license license:gpl2+)))
+(define-public devhelp-with-libsoup2
+ (package/inherit devhelp
+ (arguments
+ (substitute-keyword-arguments (package-arguments devhelp)
+ ((#:phases phases '%standard-phases)
+ `(modify-phases %standard-phases
+ (add-after 'unpack 'skip-gtk-update-icon-cache
+ ;; Don't create 'icon-theme.cache'.
+ (lambda _
+ (substitute* "build-aux/meson/meson_post_install.py"
+ (("gtk-update-icon-cache") "true"))))))))
+ (inputs
+ `(("amtk" ,amtk)
+ ("gsettings-desktop-schemas" ,gsettings-desktop-schemas)
+ ("webkitgtk" ,webkitgtk-with-libsoup2)))))
+
(define-public cogl
(package
(name "cogl")
@@ -5895,7 +6180,7 @@ OpenGL-based interactive canvas library.")
(define-public libchamplain
(package
(name "libchamplain")
- (version "0.12.16")
+ (version "0.12.20")
(source (origin
(method url-fetch)
(uri (string-append
@@ -5903,15 +6188,14 @@ OpenGL-based interactive canvas library.")
version ".tar.xz"))
(sha256
(base32
- "13chvc2n074i0jw5jlb8i7cysda4yqx58ca6y3mrlrl9g37k2zja"))))
- (build-system gnu-build-system)
- (arguments '(#:configure-flags '("--enable-vala")))
+ "0rihpb0npqpihqcdz4w03rq6xl7jdckfqskvv9diq2hkrnzv8ch2"))))
+ (build-system meson-build-system)
(native-inputs
`(("gobject-introspection" ,gobject-introspection)
("pkg-config" ,pkg-config)
("vala" ,vala)))
(propagated-inputs
- `(("libsoup" ,libsoup)
+ `(("libsoup" ,libsoup-minimal-2)
("sqlite" ,sqlite)
("clutter" ,clutter)
("clutter-gtk" ,clutter-gtk)
@@ -6044,7 +6328,7 @@ as possible!")
(define-public grilo
(package
(name "grilo")
- (version "0.3.12")
+ (version "0.3.13")
(source
(origin
(method url-fetch)
@@ -6052,7 +6336,7 @@ as possible!")
(version-major+minor version) "/"
"grilo-" version ".tar.xz"))
(sha256
- (base32 "0w8sq5g6g1rg85h53vbll8va70fcp6082mlpmy98aa03444ddyyv"))))
+ (base32 "0ywjvh7xw4ql1q4fvl0q5n06n08pga1g1nc9l7c3x5214gr3fj6i"))))
(build-system meson-build-system)
(native-inputs
`(("glib:bin" ,glib "bin") ; for glib-mkenums and glib-genmarshal
@@ -6067,7 +6351,7 @@ as possible!")
("gtk+" ,gtk+)
("libxml2" ,libxml2)
("liboauth" ,liboauth)
- ("libsoup" ,libsoup)
+ ("libsoup" ,libsoup-minimal-2)
("totem-pl-parser" ,totem-pl-parser)))
(native-search-paths
(list (search-path-specification
@@ -6084,7 +6368,7 @@ for application developers.")
(define-public grilo-plugins
(package
(name "grilo-plugins")
- (version "0.3.11")
+ (version "0.3.13")
(source
(origin
(method url-fetch)
@@ -6092,7 +6376,7 @@ for application developers.")
(version-major+minor version) "/"
name "-" version ".tar.xz"))
(sha256
- (base32 "0wyd3n5mn7b77hxylkc3f62v01mlavh96901pz342hwrn42ydqnx"))))
+ (base32 "1y10nnd711qxwgpz6spzp1rnk50fyf11kk1n71a31ab4fgb0ahqw"))))
(build-system meson-build-system)
(native-inputs
`(("gettext" ,gettext-minimal)
@@ -6115,12 +6399,24 @@ for application developers.")
("libmediaart" ,libmediaart)
;("librest" ,rest) ; unused
("libsoup" ,libsoup)
+ ("python-pygobject" ,python-pygobject)
("totam-pl-parser" ,totem-pl-parser)
- ("tracker" ,tracker))) ; unused because it's too old
+ ("tracker" ,tracker)
+ ("tracker-miners" ,tracker-miners)))
(arguments
`(#:glib-or-gtk? #t
;;Disable lua-factory as it needs missing dependencies
- #:configure-flags '("-Denable-lua-factory=no")))
+ #:configure-flags '("-Denable-lua-factory=no")
+ #:phases
+ (modify-phases %standard-phases
+ (add-before 'configure 'set-shell
+ (lambda _
+ (setenv "SHELL" (which "bash"))))
+ ;; Disable the tracker test that requires the UPower daemon.
+ (add-before 'configure 'fix-tests
+ (lambda* (#:key inputs #:allow-other-keys)
+ (substitute* "tests/tracker3/meson.build"
+ (("'test_tracker3'.*") "")))))))
(home-page "https://live.gnome.org/Grilo")
(synopsis "Plugins for the Grilo media discovery library")
(description
@@ -6184,7 +6480,8 @@ discovery protocols.")
("grilo-plugins" ,grilo-plugins)
("vala" ,vala)))
(arguments
- `(#:glib-or-gtk? #t
+ `(#:meson ,meson-0.59 ;positional arguments error with meson 0.60
+ #:glib-or-gtk? #t
;; Disable automatic GStreamer plugin installation via PackageKit and
;; all that.
@@ -6264,12 +6561,12 @@ which can read a large number of file formats.")
(gi-typelib-path (getenv "GI_TYPELIB_PATH"))
(gst-plugin-path (getenv "GST_PLUGIN_SYSTEM_PATH"))
(grl-plugin-path (getenv "GRL_PLUGIN_PATH"))
- (python-path (getenv "PYTHONPATH")))
+ (python-path (getenv "GUIX_PYTHONPATH")))
(wrap-program (string-append out "/bin/rhythmbox")
`("GI_TYPELIB_PATH" ":" prefix (,gi-typelib-path))
`("GST_PLUGIN_SYSTEM_PATH" ":" prefix (,gst-plugin-path))
`("GRL_PLUGIN_PATH" ":" prefix (,grl-plugin-path))
- `("PYTHONPATH" ":" prefix (,python-path))))
+ `("GUIX_PYTHONPATH" ":" prefix (,python-path))))
#t)))))
(propagated-inputs
`(("dconf" ,dconf)))
@@ -6286,7 +6583,7 @@ which can read a large number of file formats.")
("tdb" ,tdb)
("gnome-desktop" ,gnome-desktop)
("python" ,python)
- ("python-pygobject" ,python2-pygobject)
+ ("python-pygobject" ,python-pygobject)
("vala" ,vala)
("gmime" ,gmime)
("adwaita-icon-theme" ,adwaita-icon-theme)
@@ -6302,6 +6599,7 @@ which can read a large number of file formats.")
("libsoup" ,libsoup)
("libnotify" ,libnotify)
("libpeas" ,libpeas)
+ ("libsoup" ,libsoup-minimal-2)
("lirc" ,lirc)
;; TODO: clutter* only used by visualizer plugin, which also requires mx
;;("clutter" ,clutter)
@@ -6324,18 +6622,19 @@ supports playlists, song ratings, and any codecs installed through gstreamer.")
(define-public eog
(package
(name "eog")
- (version "3.34.1")
+ (version "40.3")
(source (origin
(method url-fetch)
(uri (string-append "mirror://gnome/sources/" name "/"
- (version-major+minor version) "/"
+ (version-major version) "/"
name "-" version ".tar.xz"))
(sha256
(base32
- "0b7ld4azs9xbdjsk9b91ywhdzvxgajhndiwiivxjzbr0hjgp7c7x"))))
+ "0ddjwcd77nw0rxb5x5bz5hd671m8gya9827p8rsnb58x103kpai8"))))
(build-system meson-build-system)
(arguments
- `(#:configure-flags
+ `(#:meson ,meson-0.59 ;positional arguments error with meson 0.60
+ #:configure-flags
;; Otherwise, the RUNPATH will lack the final 'eog' path component.
(list (string-append "-Dc_link_args=-Wl,-rpath="
(assoc-ref %outputs "out") "/lib/eog"))
@@ -6345,15 +6644,13 @@ supports playlists, song ratings, and any codecs installed through gstreamer.")
;; Don't create 'icon-theme.cache'.
(lambda _
(substitute* "meson_post_install.py"
- (("gtk-update-icon-cache") "true"))
- #t))
+ (("gtk-update-icon-cache") "true"))))
(add-after 'install 'wrap-eog
(lambda* (#:key outputs #:allow-other-keys)
(let ((out (assoc-ref outputs "out"))
(gi-typelib-path (getenv "GI_TYPELIB_PATH")))
(wrap-program (string-append out "/bin/eog")
- `("GI_TYPELIB_PATH" ":" prefix (,gi-typelib-path))))
- #t)))))
+ `("GI_TYPELIB_PATH" ":" prefix (,gi-typelib-path)))))))))
(propagated-inputs
`(("dconf" ,dconf)))
(native-inputs
@@ -6371,8 +6668,9 @@ supports playlists, song ratings, and any codecs installed through gstreamer.")
("lcms" ,lcms)
("libexif" ,libexif)
("libpeas" ,libpeas)
+ ("libportal" ,libportal)
("libjpeg" ,libjpeg-turbo)
- ("librsvg" ,librsvg-next)
+ ("librsvg" ,librsvg)
("gsettings-desktop-schemas" ,gsettings-desktop-schemas)
("gtk+" ,gtk+)))
(home-page "https://wiki.gnome.org/Apps/EyeOfGnome")
@@ -6388,7 +6686,7 @@ supports image conversion, rotation, and slideshows.")
;; 'XDG_DATA_DIRS' appropriately set.
(package
(name "eog-plugins")
- (version "3.26.4")
+ (version "3.26.7")
(source (origin
(method url-fetch)
(uri (string-append "mirror://gnome/sources/eog-plugins/"
@@ -6396,7 +6694,7 @@ supports image conversion, rotation, and slideshows.")
"eog-plugins-" version ".tar.xz"))
(sha256
(base32
- "0pd7fqa4ciy5844k5s1c6rlsqkk8pxd8cchxjcjhxlsngm9lynnx"))))
+ "0gbvl54hjawcrj2cbkvsw5jx11p6jv1xkc58c8ikwwpb56gc3ric"))))
(build-system gnu-build-system)
(home-page "https://wiki.gnome.org/Apps/EyeOfGnome/Plugins")
(synopsis "Extensions for the Eye of GNOME image viewer")
@@ -6457,7 +6755,7 @@ part of udev-extras, then udev, then systemd. It's now a project on its own.")
(define-public gvfs
(package
(name "gvfs")
- (version "1.40.2")
+ (version "1.48.1")
(source (origin
(method url-fetch)
(uri (string-append "mirror://gnome/sources/gvfs/"
@@ -6465,13 +6763,11 @@ part of udev-extras, then udev, then systemd. It's now a project on its own.")
"gvfs-" version ".tar.xz"))
(sha256
(base32
- "07lpcfric3h0302n9b1pwa38mjb76r9s98kg2867y2d1qvzfivxx"))
- ;; This patch may be removed when upgrading to version 1.46.x.
- (patches
- (search-patches "gvfs-add-support-for-libplist-2.2.patch"))))
+ "1hlxl6368h6nyqp1888szxs9hnpcw98k3h23dgqi29xd38klzsmj"))))
(build-system meson-build-system)
(arguments
- '(#:glib-or-gtk? #t
+ `(#:meson ,meson-0.59
+ #:glib-or-gtk? #t
#:configure-flags
(list "-Dsystemduserunitdir=no"
"-Dtmpfilesdir=no"
@@ -6479,7 +6775,7 @@ part of udev-extras, then udev, then systemd. It's now a project on its own.")
(string-append "-Dc_link_args=-Wl,-rpath="
(assoc-ref %outputs "out") "/lib/gvfs"))))
(native-inputs
- `(("glib:bin" ,glib "bin") ; for glib-genmarshal, etc.
+ `(("glib:bin" ,glib "bin") ;for glib-genmarshal, etc.
("gettext" ,gettext-minimal)
("gtk-doc" ,gtk-doc/stable)
("pkg-config" ,pkg-config)
@@ -6490,10 +6786,11 @@ part of udev-extras, then udev, then systemd. It's now a project on its own.")
("docbook-xsl" ,docbook-xsl)
("dbus" ,dbus)
("elogind" ,elogind)
- ("fuse" ,fuse)
+ ("fuse" ,fuse-3)
("gcr" ,gcr)
("glib" ,glib)
("gnome-online-accounts" ,gnome-online-accounts)
+ ("gsettings-desktop-schemas" ,gsettings-desktop-schemas)
("libarchive" ,libarchive)
("libbluray" ,libbluray)
("libcap" ,libcap)
@@ -6512,47 +6809,50 @@ part of udev-extras, then udev, then systemd. It's now a project on its own.")
("openssh" ,openssh)
("polkit" ,polkit)
("udisks" ,udisks)))
- ;; CVE-2019-{12447,12448,12449} are fixed in the 1.40.2 release.
- (properties '((lint-hidden-cve . ("CVE-2019-12447"
- "CVE-2019-12448"
- "CVE-2019-12449"))))
(home-page "https://wiki.gnome.org/gvfs/")
(synopsis "Userspace virtual file system for GIO")
(description
"GVFS is a userspace virtual file system designed to work with the I/O
-abstraction of GIO. It contains a GIO module that seamlessly adds GVFS support
-to all applications using the GIO API. It also supports exposing the GVFS
-mounts to non-GIO applications using FUSE.
+abstraction of GIO. It contains a GIO module that seamlessly adds GVFS
+support to all applications using the GIO API. It also supports exposing the
+GVFS mounts to non-GIO applications using FUSE.
GVFS comes with a set of backends, including trash support, SFTP, SMB, HTTP,
DAV, and others.")
(license license:lgpl2.0+)))
-(define-public gusb
+(define-public gusb-minimal
(package
- (name "gusb")
+ (name "gusb-minimal")
(version "0.3.5")
(source (origin
(method git-fetch)
(uri (git-reference
- (url "https://github.com/hughsie/libgusb")
- (commit version)))
+ (url "https://github.com/hughsie/libgusb")
+ (commit version)))
(file-name (git-file-name name version))
(sha256
(base32
"0ifhdqhpyxwsg0z9s1anj7cf5pya5qsqyp5ksh9n7mqwa4lrjkl8"))))
(build-system meson-build-system)
+ (arguments
+ `(#:tests? #f ;libusb fails to initialize. Wonder what that is.
+ #:configure-flags
+ (cons "-Ddocs=false"
+ (if ,(%current-target-system)
+ ;; Introspection data cannot currently be cross-compiled.
+ '("-Dintrospection=false"
+ ;; Requires introspection data.
+ "-Dvapi=false")
+ '()))))
(native-inputs
`(("gobject-introspection" ,gobject-introspection)
("pkg-config" ,pkg-config)
- ("vala" ,vala)
- ("gtk-doc" ,gtk-doc/stable)))
+ ("vala" ,vala)))
(propagated-inputs
;; Both of these are required by gusb.pc.
`(("glib" ,glib)
("libusb" ,libusb)))
- (arguments
- `(#:tests? #f)) ;libusb fails to initialize. Wonder what that is.
(home-page "https://github.com/hughsie/libgusb")
(synopsis "GLib binding for libusb1")
(description
@@ -6562,22 +6862,35 @@ and integration into a mainloop. This makes it easy to integrate low level
USB transfers with your high-level application or system daemon.")
(license license:lgpl2.1+)))
+(define-public gusb
+ (package/inherit gusb-minimal
+ (name "gusb")
+ (arguments
+ (substitute-keyword-arguments (package-arguments gusb-minimal)
+ ((#:configure-flags flags)
+ `(cons "-Ddocs=true"
+ (delete "-Ddocs=false" ,flags)))))
+ (native-inputs
+ (cons `("gtk-doc" ,gtk-doc/stable)
+ (package-native-inputs gusb-minimal)))))
+
(define-public simple-scan
(package
(name "simple-scan")
- (version "3.38.2")
+ (version "40.5")
(source
(origin
(method url-fetch)
(uri (string-append "mirror://gnome/sources/simple-scan/"
- (version-major+minor version) "/"
+ (version-major version) "/"
"simple-scan-" version ".tar.xz"))
(sha256
- (base32 "02sdkhxgr6i7iy481h4xavgaqd0a5dlsipzwrm4qd242jrr813d8"))))
+ (base32 "195rh8zj5n497gj42rd77mvkdl15hk0i08ll5h4hb9kcrgj7jlzb"))))
(build-system meson-build-system)
;; TODO: Fix icons in home screen, About dialogue, and scan menu.
(arguments
- '(#:glib-or-gtk? #t))
+ `(#:meson ,meson-0.59 ;positional arguments error with meson 0.60
+ #:glib-or-gtk? #t))
(inputs
`(("gtk" ,gtk+)
("zlib" ,zlib)
@@ -6585,6 +6898,7 @@ USB transfers with your high-level application or system daemon.")
("colord" ,colord)
("gdk-pixbuf" ,gdk-pixbuf)
("gusb" ,gusb)
+ ("libhandy" ,libhandy)
("libsane" ,sane-backends)))
(native-inputs
`(("gettext" ,gettext-minimal)
@@ -6638,7 +6952,7 @@ almost all of them.")
":")))
(wrap-program (string-append out "/bin/eolie")
`("LD_LIBRARY_PATH" ":" prefix (,path))
- `("PYTHONPATH" ":" prefix (,(getenv "PYTHONPATH")))
+ `("GUIX_PYTHONPATH" ":" prefix (,(getenv "GUIX_PYTHONPATH")))
`("GI_TYPELIB_PATH" = (,(getenv "GI_TYPELIB_PATH")))))
#t)))))
(native-inputs
@@ -6675,42 +6989,40 @@ a secret password store, an adblocker, and a modern UI.")
(define-public epiphany
(package
(name "epiphany")
- (version "3.34.4")
+ (version "40.3")
(source (origin
(method url-fetch)
(uri (string-append "mirror://gnome/sources/epiphany/"
- (version-major+minor version) "/"
+ (version-major version) "/"
"epiphany-" version ".tar.xz"))
(sha256
(base32
- "13ar3s40cds1rplwbzx0fzigf120w0rydiv05r3k6zpc0zy91qb0"))))
+ "0r7m34xzz3shdfxf2abxb069izak3yv3ijlg29qy4pfmyawkilfs"))))
(build-system meson-build-system)
(arguments
- '(#:glib-or-gtk? #t
+ `(#:glib-or-gtk? #t
+ #:meson ,meson-0.59
#:phases
(modify-phases %standard-phases
(add-after 'unpack 'skip-gtk-update-icon-cache
;; Don't create 'icon-theme.cache'.
(lambda _
(substitute* "post_install.py"
- (("gtk-update-icon-cache") "true"))
- #t))
+ (("gtk-update-icon-cache") "true"))))
(add-after 'unpack 'disable-failing-tests
(lambda _
(substitute* "tests/meson.build"
- ;; embed_shell fails, because webkitgtk apparently no longer supports
- ;; overriding the ftp schema
- ;; web_app_utils fails due to missing network access
+ ;; embed_shell fails, because webkitgtk apparently no longer
+ ;; supports overriding the ftp schema web_app_utils fails due
+ ;; to missing network access.
(("(embed_shell|web_app_utils)_test,")
- "find_program('sh'), args: ['-c', 'exit 77'],"))
- #t))
+ "find_program('sh'), args: ['-c', 'exit 77'],"))))
(add-before 'check 'pre-check
(lambda _
;; Tests require a running X server.
(system "Xvfb :1 &")
- (setenv "DISPLAY" ":1")
- #t)))
+ (setenv "DISPLAY" ":1"))))
#:configure-flags
;; Otherwise, the RUNPATH will lack the final 'epiphany' path component.
(list (string-append "-Dc_link_args=-Wl,-rpath="
@@ -6728,19 +7040,22 @@ a secret password store, an adblocker, and a modern UI.")
(inputs
`(("avahi" ,avahi)
("gcr" ,gcr)
- ("gdk-pixbuf+svg" ,gdk-pixbuf+svg) ; for loading SVG files
+ ("librsvg" ,librsvg) ; for loading SVG files
("glib-networking" ,glib-networking)
("gnome-desktop" ,gnome-desktop)
("gsettings-desktop-schemas" ,gsettings-desktop-schemas)
("json-glib" ,json-glib)
("iso-codes" ,iso-codes)
+ ("libarchive" ,libarchive)
("libdazzle" ,libdazzle)
+ ("libhandy" ,libhandy)
("libnotify" ,libnotify)
+ ("libportal" ,libportal)
("libsecret" ,libsecret)
("libxslt" ,libxslt)
("nettle" ,nettle) ; for hogweed
("sqlite" ,sqlite)
- ("webkitgtk" ,webkitgtk)))
+ ("webkitgtk" ,webkitgtk-with-libsoup2)))
(home-page "https://wiki.gnome.org/Apps/Web")
(synopsis "GNOME web browser")
(description
@@ -6784,7 +7099,7 @@ principles are simplicity and standards compliance.")
(let ((prog (string-append (assoc-ref outputs "out")
"/bin/d-feet")))
(wrap-program prog
- `("PYTHONPATH" = (,(getenv "PYTHONPATH")))
+ `("GUIX_PYTHONPATH" = (,(getenv "GUIX_PYTHONPATH")))
`("GI_TYPELIB_PATH" = (,(getenv "GI_TYPELIB_PATH"))))
#t))))))
(native-inputs
@@ -6810,21 +7125,28 @@ of running programs and invoke methods on those interfaces.")
(define-public yelp-xsl
(package
(name "yelp-xsl")
- (version "3.34.2")
+ (version "41.0")
(source
(origin
(method url-fetch)
(uri
(string-append "mirror://gnome/sources/" name "/"
- (version-major+minor version) "/"
+ (version-major version) "/"
name "-" version ".tar.xz"))
(sha256
- (base32 "1bdpgkzawhqmw52l6zx8czzg1ndfgcf1p44m2bxjdpqkc4afcgqc"))))
+ (base32 "19d46rkajvr0f04560vlrzwvac88x5j8ilvzwkawbn5vjg069kf8"))))
(build-system gnu-build-system)
+ (arguments
+ `(#:configure-flags
+ (list
+ "--enable-doc")))
(native-inputs
- `(("gettext-minimal" ,gettext-minimal)
+ `(("ducktype" ,mallard-ducktype)
+ ("gettext" ,gettext-minimal)
+ ("intltool" ,intltool)
("itstool" ,itstool)
- ("xmllint" ,libxml2)))
+ ("xmllint" ,libxml2)
+ ("xsltproc" ,libxslt)))
(synopsis "XSL stylesheets for Yelp")
(description "Yelp-XSL is a collection of programs and data files to help
you build, maintain, and distribute documentation. It provides XSLT stylesheets
@@ -6845,15 +7167,15 @@ jQuery.Syntax JavaScript libraries.")
(define-public yelp
(package
(name "yelp")
- (version "3.32.2")
+ (version "41.0")
(source (origin
(method url-fetch)
(uri (string-append "mirror://gnome/sources/" name "/"
- (version-major+minor version) "/"
+ (version-major version) "/"
name "-" version ".tar.xz"))
(sha256
(base32
- "0yrl96icmmrxvg7sxl519gzg9qb368cmzgrr9ddh181ignkxzx7f"))))
+ "11shrqass8ak8m10nayqssa6sbrrxa13ffpamvqi1c0yzkxdk9r5"))))
(build-system glib-or-gtk-build-system)
(native-inputs
`(("glib:bin" ,glib "bin") ; for glib-genmarshal, etc.
@@ -7019,10 +7341,9 @@ metadata in photo and video files of various formats.")
("libgphoto2" ,libgphoto2)
("libgudev" ,libgudev)
("libraw" ,libraw)
- ("libsoup" ,libsoup)
("libxml2" ,libxml2)
("sqlite" ,sqlite)
- ("webkitgtk" ,webkitgtk)))
+ ("webkitgtk" ,webkitgtk-with-libsoup2)))
(home-page "https://wiki.gnome.org/Apps/Shotwell")
(synopsis "Photo manager for GNOME 3")
(description
@@ -7035,7 +7356,7 @@ share them with others via social networking and more.")
(define-public file-roller
(package
(name "file-roller")
- (version "3.38.0")
+ (version "3.40.0")
(source (origin
(method url-fetch)
(uri (string-append "mirror://gnome/sources/file-roller/"
@@ -7043,7 +7364,7 @@ share them with others via social networking and more.")
"file-roller-" version ".tar.xz"))
(sha256
(base32
- "06ikvjjcgb8nxabkn2rywy76a1c7s6w8dszaxvaxldbxarp1qgbj"))))
+ "039w1dcpa5ypmv6sm634alk9vbcdkyvy595vkh5gn032jsiqca2a"))))
(build-system meson-build-system)
(native-inputs
`(("desktop-file-utils" ,desktop-file-utils) ; for update-desktop-database
@@ -7071,44 +7392,35 @@ such as gzip tarballs.")
(define-public gnome-session
(package
(name "gnome-session")
- (version "3.34.2")
+ (version "40.1")
(source (origin
(method url-fetch)
(uri (string-append "mirror://gnome/sources/" name "/"
- (version-major+minor version) "/"
+ (version-major version) "/"
name "-" version ".tar.xz"))
+ (patches (search-patches "gnome-session-support-elogind.patch"))
(sha256
(base32
- "1qgqp97f8k2zi2ydvhds14zsjzfj7cv521r6wx5sw0qacn0p7dwb"))))
+ "02z0xr6sv9ibl7awbw9j4y05hf4jk1zgvsbbmh7n27hhjvsvc8pl"))))
(arguments
- '(#:glib-or-gtk? #t
+ `(#:meson ,meson-0.59
+ #:glib-or-gtk? #t
#:phases
(modify-phases %standard-phases
- (add-before 'configure 'pre-configure
- (lambda* (#:key outputs #:allow-other-keys)
- ;; Use elogind instead of systemd.
- (substitute* "meson.build"
- (("libsystemd-login") "libelogind")
- (("and libsystemd_daemon_dep.found.*") ","))
- (substitute* "gnome-session/gsm-systemd.c"
- (("#include <systemd/sd-login.h>")
- "#include <elogind/sd-login.h>"))
- ;; Remove uses of the systemd daemon.
- (substitute* "gnome-session/gsm-autostart-app.c"
- (("#ifdef HAVE_SYSTEMD") "#if 0"))
- #t))
(add-after 'install 'wrap-gnome-session
(lambda* (#:key inputs outputs #:allow-other-keys)
;; Make sure 'gnome-session' finds the 'gsettings' program.
(let ((glib (assoc-ref inputs "glib:bin"))
(out (assoc-ref outputs "out")))
(wrap-program (string-append out "/bin/gnome-session")
- `("PATH" ":" prefix (,(string-append glib "/bin"))))
- #t))))
+ `("PATH" ":" prefix (,(string-append glib "/bin"))))))))
#:configure-flags
'("-Ddocbook=false" ; FIXME: disabled because of docbook validation error
"-Dman=false" ; FIXME: disabled because of docbook validation error
+ "-Delogind=true"
+ "-Dsystemd=false"
+ "-Dsystemd_session=disable"
"-Dsystemd_journal=false")))
(build-system meson-build-system)
(native-inputs
@@ -7142,7 +7454,7 @@ configuration program to choose applications starting on login.")
(define-public gjs
(package
(name "gjs")
- (version "1.58.3")
+ (version "1.70.0")
(source (origin
(method url-fetch)
(uri (string-append "mirror://gnome/sources/" name "/"
@@ -7150,30 +7462,26 @@ configuration program to choose applications starting on login.")
name "-" version ".tar.xz"))
(sha256
(base32
- "1bkksx362007zs8c31ydygb29spwa5g5kch1ad2grc2sp53wv7ya"))))
- (build-system gnu-build-system)
+ "0pqwhq0znprs0h5ixz396912acwzk9zvjfhi9qvh52ii38s2j1jb"))
+ (modules '((guix build utils)))
+ (snippet
+ '(begin
+ (substitute* "installed-tests/scripts/testCommandLine.sh"
+ (("Valentín") "")
+ (("☭") ""))))))
+ (build-system meson-build-system)
(arguments
- '(#:phases
+ '(#:configure-flags '("-Dinstalled_tests=false")
+ #:phases
(modify-phases %standard-phases
- (add-before
- 'check 'pre-check
- (lambda _
- ;; The test suite requires a running X server.
- (system "Xvfb :1 &")
- (setenv "DISPLAY" ":1")
-
- ;; For the missing /etc/machine-id.
- (setenv "DBUS_FATAL_WARNINGS" "0")
+ (add-before 'check 'pre-check
+ (lambda _
+ ;; The test suite requires a running X server.
+ (system "Xvfb :1 &")
+ (setenv "DISPLAY" ":1")
- ;; Our mozjs-38 package does not compile the required Intl API
- ;; support for these failing tests.
- (substitute* "installed-tests/js/testLocale.js"
- ((".*toBeDefined.*") "")
- ((".*expect\\(datestr\\).*") ""))
- (substitute* "installed-tests/scripts/testCommandLine.sh"
- (("Valentín") "")
- (("☭") ""))
- #t)))))
+ ;; For the missing /etc/machine-id.
+ (setenv "DBUS_FATAL_WARNINGS" "0"))))))
(native-inputs
`(("glib:bin" ,glib "bin") ; for glib-compile-resources
("pkg-config" ,pkg-config)
@@ -7187,7 +7495,7 @@ configuration program to choose applications starting on login.")
;; These are all in the Requires.private field of gjs-1.0.pc.
`(("cairo" ,cairo)
("gobject-introspection" ,gobject-introspection)
- ("mozjs" ,mozjs-60)))
+ ("mozjs" ,mozjs-78)))
(inputs
`(("gtk+" ,gtk+)
("readline" ,readline)))
@@ -7201,18 +7509,19 @@ javascript engine and the GObject introspection framework.")
(define-public gedit
(package
(name "gedit")
- (version "3.34.1")
+ (version "40.1")
(source (origin
(method url-fetch)
(uri (string-append "mirror://gnome/sources/" name "/"
- (version-major+minor version) "/"
+ (version-major version) "/"
name "-" version ".tar.xz"))
(sha256
(base32
- "1inm50sdfw63by1lf4f1swb59mpyxlly0g5rdg99j5l3357fzygb"))))
+ "149ngl9qw6h59546lir1pa7hvw23ppsnqlj9mfqphmmn5jl99qsm"))))
(build-system meson-build-system)
(arguments
- `(#:glib-or-gtk? #t
+ `(#:meson ,meson-0.59 ;positional arguments error with meson 0.60
+ #:glib-or-gtk? #t
#:configure-flags
;; Otherwise, the RUNPATH will lack the final path component.
(list (string-append "-Dc_link_args=-Wl,-rpath="
@@ -7243,11 +7552,11 @@ javascript engine and the GObject introspection framework.")
(let ((out (assoc-ref outputs "out"))
(gtksourceview (assoc-ref inputs "gtksourceview"))
(gi-typelib-path (getenv "GI_TYPELIB_PATH"))
- (python-path (getenv "PYTHONPATH")))
+ (python-path (getenv "GUIX_PYTHONPATH")))
(wrap-program (string-append out "/bin/gedit")
;; For plugins.
`("GI_TYPELIB_PATH" ":" prefix (,gi-typelib-path))
- `("PYTHONPATH" ":" prefix (,python-path))
+ `("GUIX_PYTHONPATH" ":" prefix (,python-path))
;; For language-specs.
`("XDG_DATA_DIRS" ":" prefix (,(string-append gtksourceview
"/share")))))
@@ -7271,7 +7580,8 @@ javascript engine and the GObject introspection framework.")
(base32 "16yld0ap7qj1n96h4f2sqkjmibg7xx5xwkqxdfzam2nmyfdlrrrs"))))
("pkg-config" ,pkg-config)))
(inputs
- `(("glib" ,glib)
+ `(("amtk" ,amtk)
+ ("glib" ,glib)
("gspell" ,gspell)
("gtk+" ,gtk+)
("gtksourceview" ,gtksourceview)
@@ -7280,6 +7590,7 @@ javascript engine and the GObject introspection framework.")
("iso-codes" ,iso-codes)
("python-pygobject" ,python-pygobject)
("python" ,python)
+ ("tepl" ,tepl)
("gsettings-desktop-schemas" ,gsettings-desktop-schemas)
("libx11" ,libx11)
("vala" ,vala)
@@ -7322,69 +7633,143 @@ to display dialog boxes from the commandline and shell scripts.")
(define-public mutter
(package
(name "mutter")
- (version "3.34.2")
+ (version "41.0")
(source (origin
(method url-fetch)
(uri (string-append "mirror://gnome/sources/" name "/"
- (version-major+minor version) "/"
+ (version-major version) "/"
name "-" version ".tar.xz"))
(sha256
(base32
- "0b8bz5kvs7rlwvqsg87cf6jhrrj95vgd1l235mjx8rip35ipfvrd"))))
+ "17pqrm48kddqrc3fl96n5knhaxyn0crg0zv7zpmqhk848jks307s"))))
;; NOTE: Since version 3.21.x, mutter now bundles and exports forked
;; versions of cogl and clutter. As a result, many of the inputs,
;; propagated-inputs, and configure flags used in cogl and clutter are
;; needed here as well.
(build-system meson-build-system)
(arguments
- '(;; XXX: All mutter tests fail with the following error:
- ;; Settings schema 'org.gnome.mutter' is not installed
- #:tests? #f
+ `(#:imported-modules (,@%meson-build-system-modules
+ (guix build syscalls))
+ #:modules ((guix build meson-build-system)
+ (guix build syscalls)
+ (guix build utils)
+ (ice-9 match))
#:glib-or-gtk? #t
#:configure-flags
- ;; TODO: Enable profiler when Sysprof is packaged.
- (list "-Dprofiler=false"
- ;; Otherwise, the RUNPATH will lack the final path component.
- (string-append "-Dc_link_args=-Wl,-rpath="
- (assoc-ref %outputs "out") "/lib:"
- (assoc-ref %outputs "out") "/lib/mutter-5")
-
- ;; The following flags are needed for the bundled clutter
- (string-append "-Dxwayland_path="
- (assoc-ref %build-inputs "xorg-server-xwayland")
- "/bin/Xwayland")
-
- ;; the remaining flags are needed for the bundled cogl
- (string-append "-Dopengl_libname="
- (assoc-ref %build-inputs "mesa")
- "/lib/libGL.so"))
- #:phases (modify-phases %standard-phases
- (add-after 'unpack 'fix-build-with-mesa-20
- (lambda _
- ;; Mimic upstream commit a444a4c5f58ea516ad for
- ;; compatibility with Mesa 20. Remove for 3.36.
- (substitute* '("src/backends/meta-egl-ext.h"
- "src/backends/meta-egl.c"
- "src/backends/meta-egl.h")
- (("#include <EGL/eglext\\.h>" all)
- (string-append all "\n#include <EGL/eglmesaext.h>")))
- (substitute* "cogl/cogl/meson.build"
- (("#include <EGL/eglext\\.h>" all)
- (string-append all "\\n#include <EGL/eglmesaext.h>")))
- #t)))))
+ (list
+ ;; Otherwise, the RUNPATH will lack the final path component.
+ (string-append "-Dc_link_args=-Wl,-rpath="
+ (assoc-ref %outputs "out") "/lib:"
+ (assoc-ref %outputs "out") "/lib/mutter-9")
+ ;; Disable systemd support.
+ "-Dsystemd=false"
+ ;; The following flags are needed for the bundled clutter
+ (string-append "-Dxwayland_path="
+ (assoc-ref %build-inputs "xorg-server-xwayland")
+ "/bin/Xwayland")
+ ;; the remaining flags are needed for the bundled cogl
+ (string-append "-Dopengl_libname="
+ (assoc-ref %build-inputs "mesa")
+ "/lib/libGL.so")
+ (string-append "-Dgles2_libname="
+ (assoc-ref %build-inputs "mesa")
+ "/lib/libGLESv2.so")
+ "-Degl_device=true" ;false by default
+ "-Dwayland_eglstream=true") ;false by default
+ #:test-options
+ (list "--verbose")
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'patch-dlopen-calls
+ (lambda* (#:key inputs #:allow-other-keys)
+ (substitute* "src/wayland/meta-wayland-egl-stream.c"
+ (("libnvidia-egl-wayland.so.1")
+ (string-append (assoc-ref inputs "egl-wayland")
+ "/lib/libnvidia-egl-wayland.so.1")))))
+ (add-before 'configure 'set-udev-dir
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (setenv "PKG_CONFIG_UDEV_UDEVDIR"
+ (string-append (assoc-ref outputs "out")
+ "/lib/udev"))))
+ (add-after 'unpack 'disable-problematic-tests
+ (lambda _
+ ;; The native-headless test hangs due to attempting to use audio,
+ ;; unavailable in the container.
+ ;; Note: the following sed expression deletes the whole test(...)
+ ;; expression paragraph. For an explanation, see: info '(sed)
+ ;; Multiline techniques'.
+ (invoke "sed" "/./{H;$!d} ; x ; s/^.*native-headless.*$//"
+ "-i" "src/tests/meson.build")))
+ (replace 'check
+ (lambda* (#:key tests? test-options parallel-tests?
+ #:allow-other-keys)
+ (when tests?
+ ;; Setup (see the 'test-mutter' CI target at
+ ;; https://gitlab.gnome.org/GNOME/mutter/-/raw/main/.gitlab-ci.yml).
+ (setenv "XDG_RUNTIME_DIR" "runtime-dir")
+ (setenv "GSETTINGS_SCHEMA_DIR" "data")
+ (setenv "MUTTER_DEBUG_DUMMY_MODE_SPECS" "800x600@10.0")
+ (setenv "PIPEWIRE_DEBUG" "2")
+ (setenv "PIPEWIRE_LOG" "meson-logs/pipewire.log")
+ (setenv "XVFB_SERVER_ARGS" "+iglx -noreset")
+ (setenv "G_SLICE" "always-malloc")
+ (setenv "MALLOC_CHECK" "3")
+ (setenv "NO_AT_BRIDGE" "1")
+ ;; This is needed, otherwise the "mutter:core+mutter/unit /
+ ;; anonymous-file" test would fail (see:
+ ;; https://gitlab.gnome.org/GNOME/mutter/-/issues/2017).
+ (setenv "CI_JOB_ID" "1")
+
+ (invoke "glib-compile-schemas" (getenv "GSETTINGS_SCHEMA_DIR"))
+ (mkdir-p (getenv "XDG_RUNTIME_DIR"))
+ (chmod (getenv "XDG_RUNTIME_DIR") #o755)
+ (invoke "pipewire" "--version") ;check for pipewire
+ (system "pipewire &") ;always returns 0 due to forking
+
+ (setenv "MESON_TESTTHREADS"
+ (if parallel-tests?
+ (number->string (parallel-job-count))
+ "1"))
+ (match (primitive-fork)
+ (0 ;child process
+ (set-child-subreaper!)
+ ;; Use tini so that signals are properly handled and
+ ;; doubly-forked processes get reaped; otherwise,
+ ;; python-dbusmock would waste time polling for the dbus
+ ;; processes it spawns to be reaped, in vain.
+ (apply execlp "tini" "--"
+ "dbus-run-session" "--"
+ "xvfb-run" "-a" "-s" (getenv "XVFB_SERVER_ARGS")
+ "meson" "test" "-t" "0" "--print-errorlogs"
+ test-options))
+ (pid
+ (match (waitpid pid)
+ ((_ . status)
+ (unless (zero? status)
+ (error "`meson test' exited with status"
+ status))))))))))))
(native-inputs
`(("desktop-file-utils" ,desktop-file-utils) ; for update-desktop-database
- ("glib:bin" ,glib "bin") ; for glib-compile-schemas, etc.
+ ("glib:bin" ,glib "bin") ; for glib-compile-schemas, etc.
("gobject-introspection" ,gobject-introspection)
("intltool" ,intltool)
("pkg-config" ,pkg-config)
- ("xorg-server" ,xorg-server-for-tests)
+ ("xvfb-run" ,xvfb-run)
;; For git build
("autoconf" ,autoconf)
("automake" ,automake)
- ("libtool" ,libtool)))
+ ("libtool" ,libtool)
+ ;; For tests.
+ ;; Warnings are configured to be fatal during the tests; add an icon
+ ;; theme to please libxcursor.
+ ("adwaita-icon-theme" ,adwaita-icon-theme)
+ ("libxcursor" ,libxcursor) ;for XCURSOR_PATH
+ ("pipewire" ,pipewire-0.3)
+ ("python-dbus" ,python-dbus)
+ ("python-dbusmock" ,python-dbusmock)
+ ("tini" ,tini))) ;acting as init (zombie reaper)
(propagated-inputs
- `(;; libmutter.pc refers to these:
+ `( ;; libmutter.pc refers to these:
("gsettings-desktop-schemas" ,gsettings-desktop-schemas)
("gtk+" ,gtk+)
;; mutter-clutter-1.0.pc and mutter-cogl-1.0.pc refer to these:
@@ -7396,19 +7781,23 @@ to display dialog boxes from the commandline and shell scripts.")
("libinput" ,libinput)
("libx11" ,libx11)
("libxcomposite" ,libxcomposite)
+ ("libxcvt" ,libxcvt)
("libxdamage" ,libxdamage)
("libxext" ,libxext)
("libxfixes" ,libxfixes)
("libxkbcommon" ,libxkbcommon)
+ ("libxml2" ,libxml2)
("libxrandr" ,libxrandr)
("mesa" ,mesa)
("pango" ,pango)
("udev" ,eudev)
("xinput" ,xinput)))
(inputs
- `(("elogind" ,elogind)
+ `(("egl-wayland" ,egl-wayland) ;for wayland-eglstream-protocols
+ ("elogind" ,elogind)
("gnome-desktop" ,gnome-desktop)
("gnome-settings-daemon" ,gnome-settings-daemon)
+ ("graphene" ,graphene)
("libcanberra-gtk" ,libcanberra)
("libgudev" ,libgudev)
("libice" ,libice)
@@ -7417,8 +7806,9 @@ to display dialog boxes from the commandline and shell scripts.")
("libxkbfile" ,libxkbfile)
("libxrandr" ,libxrandr)
("libxtst" ,libxtst)
- ("pipewire" ,pipewire)
+ ("pipewire" ,pipewire-0.3)
("startup-notification" ,startup-notification)
+ ("sysprof" ,sysprof)
("upower-glib" ,upower)
("xkeyboard-config" ,xkeyboard-config)
("xorg-server-xwayland" ,xorg-server-xwayland)
@@ -7435,7 +7825,7 @@ window manager.")
(define-public gnome-online-accounts
(package
(name "gnome-online-accounts")
- (version "3.36.0")
+ (version "3.43.1")
(source (origin
(method url-fetch)
(uri (string-append "mirror://gnome/sources/" name "/"
@@ -7443,7 +7833,7 @@ window manager.")
name "-" version ".tar.xz"))
(sha256
(base32
- "0bigfi225g1prnxpb9lcc1i7mdcrkplwb05vilc43jik12cn53qw"))))
+ "1s5pmy3hx6hhnyi40r7b773py9kn2qbkxnpxv6149z9fl5ikdjrv"))))
(outputs '("out" "lib"))
(build-system glib-or-gtk-build-system)
(arguments
@@ -7462,8 +7852,7 @@ window manager.")
(("@datadir@") (string-append lib "/share")))
;; Make sure gobject-introspection knows about the output
;; too (see <https://bugs.gnu.org/36535>).
- (setenv "outputs" "out lib")
- #t))))))
+ (setenv "outputs" "out lib")))))))
(native-inputs
`(("glib:bin" ,glib "bin") ; for glib-compile-schemas, etc.
("gobject-introspection" ,gobject-introspection)
@@ -7479,32 +7868,30 @@ window manager.")
("json-glib" ,json-glib)
("libsecret" ,libsecret)
("rest" ,rest)
- ("webkitgtk" ,webkitgtk)))
+ ;; WebKitGtk propagates libsoup 3, which causes the build to fail; so
+ ;; use a special variant.
+ ("webkitgtk" ,webkitgtk-with-libsoup2)))
(synopsis "Single sign-on framework for GNOME")
(home-page "https://wiki.gnome.org/Projects/GnomeOnlineAccounts")
(description
"GNOME Online Accounts provides interfaces so that applications and
-libraries in GNOME can access the user's online accounts. It has providers for
-Google, ownCloud, Facebook, Flickr, Windows Live, Pocket, Foursquare, Microsoft
-Exchange, Last.fm, IMAP/SMTP, Jabber, SIP and Kerberos.")
+libraries in GNOME can access the user's online accounts. It has providers
+for Google, ownCloud, Facebook, Flickr, Windows Live, Pocket, Foursquare,
+Microsoft Exchange, Last.fm, IMAP/SMTP, Jabber, SIP and Kerberos.")
(license license:lgpl2.0+)))
(define-public evolution-data-server
(package
(name "evolution-data-server")
- (version "3.34.2")
- (source (origin
- (method url-fetch)
- (uri (string-append "mirror://gnome/sources/" name "/"
- (version-major+minor version) "/"
- name "-" version ".tar.xz"))
- (patches (search-patches "evolution-data-server-locales.patch"
- "evolution-data-server-libical-compat.patch"
- "evolution-data-server-CVE-2020-14928.patch"
- "evolution-data-server-CVE-2020-16117.patch"))
- (sha256
- (base32
- "16z85y6hhazcrp5ngw47w4x9r0j8zrj7awv5im58hhp0xs19zf1y"))))
+ (version "3.42.1")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "mirror://gnome/sources/" name "/"
+ (version-major+minor version) "/"
+ name "-" version ".tar.xz"))
+ (sha256
+ (base32 "0a7my8spwcaf2i2fz8ndddi1drv6l9gxq0qblmnkxzyhfwm7zrp6"))))
(build-system cmake-build-system)
(arguments
'(#:configure-flags
@@ -7530,27 +7917,25 @@ Exchange, Last.fm, IMAP/SMTP, Jabber, SIP and Kerberos.")
;; assertion failed (g_slist_length (contacts) == 20): (0 == 20)
(delete-file-recursively "tests/book-migration")
(substitute* "tests/CMakeLists.txt"
- (("add_subdirectory\\(book-migration\\)") ""))
- #t))
+ (("add_subdirectory\\(book-migration\\)") ""))))
(add-after 'unpack 'patch-paths
(lambda _
(substitute* '("tests/test-server-utils/e-test-server-utils.c"
"tests/libedata-book/data-test-utils.c"
"tests/libedata-book/test-book-cache-utils.c"
"tests/libedata-cal/test-cal-cache-utils.c")
- (("/bin/rm") (which "rm")))
- #t))
+ (("/bin/rm") (which "rm")))))
(add-before 'configure 'dont-override-rpath
(lambda _
(substitute* "CMakeLists.txt"
;; CMakeLists.txt hard-codes runpath to just the libdir.
;; Remove it so the configure flag is respected.
- (("SET\\(CMAKE_INSTALL_RPATH .*") ""))
- #t)))))
+ (("SET\\(CMAKE_INSTALL_RPATH .*") "")))))))
(native-inputs
`(("glib:bin" ,glib "bin") ; for glib-mkenums, etc.
("gobject-introspection" ,gobject-introspection)
("gperf" ,gperf)
+ ("gsettings-desktop-schemas" ,gsettings-desktop-schemas)
("intltool" ,intltool)
("pkg-config" ,pkg-config)
("vala" ,vala)
@@ -7560,7 +7945,7 @@ Exchange, Last.fm, IMAP/SMTP, Jabber, SIP and Kerberos.")
`(("gtk+" ,gtk+)
("libical" ,libical)
("libsecret" ,libsecret)
- ("libsoup" ,libsoup)
+ ("libsoup" ,libsoup-minimal-2)
("nss" ,nss)
("sqlite" ,sqlite)))
(inputs
@@ -7572,7 +7957,7 @@ Exchange, Last.fm, IMAP/SMTP, Jabber, SIP and Kerberos.")
("libgweather" ,libgweather)
("mit-krb5" ,mit-krb5)
("openldap" ,openldap)
- ("webkitgtk" ,webkitgtk)))
+ ("webkitgtk" ,webkitgtk-with-libsoup2)))
(synopsis "Store address books and calendars")
(home-page "https://wiki.gnome.org/Apps/Evolution")
(description
@@ -7610,12 +7995,12 @@ Evolution (hence the name), but is now used by other packages as well.")
(add-after 'install 'wrap-programs
(lambda* (#:key outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))
- (python-path (getenv "PYTHONPATH"))
+ (python-path (getenv "GUIX_PYTHONPATH"))
(gi-typelib-path (getenv "GI_TYPELIB_PATH")))
(for-each
(lambda (prog)
(wrap-program prog
- `("PYTHONPATH" ":" prefix (,python-path))
+ `("GUIX_PYTHONPATH" ":" prefix (,python-path))
`("GI_TYPELIB_PATH" ":" prefix (,gi-typelib-path))))
(list (string-append out "/bin/caribou-preferences")
(string-append out "/libexec/antler-keyboard"))))
@@ -7649,30 +8034,24 @@ users.")
(define-public network-manager
(package
(name "network-manager")
- (version "1.24.0")
+ (version "1.32.12")
(source (origin
(method url-fetch)
(uri (string-append "mirror://gnome/sources/NetworkManager/"
(version-major+minor version) "/"
"NetworkManager-" version ".tar.xz"))
- (patches (search-patches "network-manager-plugin-path.patch"))
+ (patches (search-patches "network-manager-plugin-path.patch"
+ "network-manager-meson.patch"))
(sha256
(base32
- "06044fl60bjlj7c6rqqfbm5795h61h6yzp7ch392hzcnm46wwhn3"))
- (modules '((guix build utils)))
- (snippet
- '(begin
- (substitute* "src/devices/wwan/nm-modem-manager.c"
- (("systemd") "elogind"))
- #t))))
+ "0jzmz0zw64dgvdn2g7pppr7bkywpbxcbdb1viv6p7zh2lnh3dax8"))))
(build-system meson-build-system)
(outputs '("out"
- "doc")) ; 8 MiB of gtk-doc HTML
+ "doc")) ; 8 MiB of gtk-doc HTML
(arguments
`(#:configure-flags
(let ((out (assoc-ref %outputs "out"))
- (dhclient (string-append (assoc-ref %build-inputs "isc-dhcp")
- "/sbin/dhclient")))
+ (dhclient (search-input-file %build-inputs "/sbin/dhclient")))
(list
;; Otherwise, the RUNPATH will lack the final 'NetworkManager' path
;; component.
@@ -7708,33 +8087,38 @@ users.")
;; cope with being already in the Guix build jail as that jail
;; lacks some features that they would like to proxy over (like
;; a /sys mount).
- (substitute* "src/platform/tests/meson.build"
+ (substitute* "src/core/tests/meson.build"
+ ((".*test-l3cfg.*") ""))
+ (substitute* "src/core/devices/tests/meson.build"
+ ((".*test-acd.*") "")
+ ((".*test-lldp.*") ""))
+ (substitute* "src/core/platform/tests/meson.build"
((".*test-address-linux.*") "")
((".*test-cleanup-linux.*") "")
((".*test-link-linux.*") "")
- ((".*test-route-linux.*") ""))
- (substitute* "src/devices/tests/meson.build"
- ((".*test-acd.*") "")
- ((".*test-lldp.*") ""))
- #t))
+ ((".*test-lldp.*") "")
+ ((".*test-route-linux.*") "")
+ ((".*test-tc-linux.*") ""))
+ ;; FIXME: The jansson check fails (see:
+ ;; https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/issues/837
+ (substitute* "src/libnm-core-impl/tests/test-setting.c"
+ (("g_assert\\(nm_json_vt\\(\\)\\);")
+ "return TRUE;"))))
(add-after 'unpack 'patch-docbook-xml
(lambda* (#:key inputs #:allow-other-keys)
(let ((xmldoc (string-append (assoc-ref inputs "docbook-xml")
"/xml/dtd/docbook")))
(substitute* (find-files "." ".*\\.(xsl|xml)")
(("http://.*/docbookx\\.dtd")
- (string-append xmldoc "/docbookx.dtd")))
- #t)))
+ (string-append xmldoc "/docbookx.dtd"))))))
(add-before 'check 'pre-check
(lambda _
;; For the missing /etc/machine-id.
- (setenv "DBUS_FATAL_WARNINGS" "0")
- #t))
+ (setenv "DBUS_FATAL_WARNINGS" "0")))
(add-before 'install 'no-polkit-magic
;; Meson ‘magically’ invokes pkexec, which fails (not setuid).
(lambda _
- (setenv "PKEXEC_UID" "something")
- #t))
+ (setenv "PKEXEC_UID" "something")))
(add-after 'install 'move-doc
(lambda* (#:key outputs #:allow-other-keys)
(let ((out (assoc-ref outputs "out"))
@@ -7745,8 +8129,7 @@ users.")
(string-append doc directory))
(delete-file-recursively
(string-append out directory)))
- '("/share/doc" "/share/gtk-doc"))
- #t))))))
+ '("/share/doc" "/share/gtk-doc"))))))))
(propagated-inputs
`(("glib" ,glib)))
(native-inputs
@@ -7780,11 +8163,12 @@ users.")
("libgudev" ,libgudev)
("libndp" ,libndp)
("libnl" ,libnl)
+ ("libselinux" ,libselinux)
("libsoup" ,libsoup)
("mobile-broadband-provider-info" ,mobile-broadband-provider-info)
("modem-manager" ,modem-manager)
- ("newt" ,newt) ;for the 'nmtui' console interface
- ("openresolv" ,openresolv) ; alternative resolv.conf manager
+ ("newt" ,newt) ;for the 'nmtui' console interface
+ ("openresolv" ,openresolv) ; alternative resolv.conf manager
("polkit" ,polkit)
("ppp" ,ppp)
("readline" ,readline)
@@ -7825,10 +8209,8 @@ services.")
(modify-phases %standard-phases
(add-after 'configure 'patch-path
(lambda* (#:key inputs outputs #:allow-other-keys #:rest args)
- (let* ((ovpn (string-append (assoc-ref inputs "openvpn")
- "/sbin/openvpn"))
- (modprobe (string-append (assoc-ref inputs "kmod")
- "/bin/modprobe"))
+ (let* ((ovpn (search-input-file inputs "/sbin/openvpn"))
+ (modprobe (search-input-file inputs "/bin/modprobe"))
(pretty-ovpn (string-append "\"" ovpn "\"")))
(for-each
(lambda (file)
@@ -7881,10 +8263,8 @@ to virtual private networks (VPNs) via OpenVPN.")
(modify-phases %standard-phases
(add-after 'configure 'patch-path
(lambda* (#:key inputs outputs #:allow-other-keys #:rest args)
- (let* ((vpnc (string-append (assoc-ref inputs "vpnc")
- "/sbin/vpnc"))
- (modprobe (string-append (assoc-ref inputs "kmod")
- "/bin/modprobe"))
+ (let* ((vpnc (search-input-file inputs "/sbin/vpnc"))
+ (modprobe (search-input-file inputs "/bin/modprobe"))
(pretty-ovpn (string-append "\"" vpnc "\"")))
(substitute* "src/nm-vpnc-service.c"
(("\"/usr/local/sbin/vpnc\"") pretty-ovpn)
@@ -7930,10 +8310,9 @@ Compatible with Cisco VPN concentrators configured to use IPsec.")
(modify-phases %standard-phases
(add-after 'configure 'patch-path
(lambda* (#:key inputs outputs #:allow-other-keys #:rest args)
- (let* ((openconnect (string-append (assoc-ref inputs "openconnect")
- "/sbin/openconnect"))
- (modprobe (string-append (assoc-ref inputs "kmod")
- "/bin/modprobe"))
+ (let* ((openconnect (search-input-file inputs
+ "/sbin/openconnect"))
+ (modprobe (search-input-file inputs "/bin/modprobe"))
(pretty-ovpn (string-append "\"" openconnect "\"")))
(substitute* "src/nm-openconnect-service.c"
(("\"/usr(/local)?/s?bin/openconnect\"") pretty-ovpn)
@@ -8001,7 +8380,8 @@ Cisco's AnyConnect SSL VPN.")
"1gj6lqqi613j2m49v9i82lqg1rv7kwwc8z4nxjcwpaa0ins803f7"))))
(build-system meson-build-system)
(arguments
- '(#:glib-or-gtk? #t
+ `(#:meson ,meson-0.59
+ #:glib-or-gtk? #t
#:configure-flags
'("-Dappindicator=yes")))
(native-inputs
@@ -8068,7 +8448,7 @@ the available networks and allows users to easily switch between them.")
(string-append xsldoc "/html/chunk.xsl")))))))))
(propagated-inputs
;; libxml++-3.0.pc refers to all these.
- `(("glibmm" ,glibmm)
+ `(("glibmm" ,glibmm-2.64)
("libxml2" ,libxml2)))
(native-inputs
`(("autoconf" ,autoconf)
@@ -8109,128 +8489,151 @@ library.")
(define-public gdm
(package
(name "gdm")
- (version "3.34.1")
+ (version "40.1")
(source (origin
(method url-fetch)
(uri (string-append "mirror://gnome/sources/" name "/"
- (version-major+minor version) "/"
+ (version-major version) "/"
name "-" version ".tar.xz"))
(sha256
(base32
- "1lyqvcwxhwxklbxn4xjswjzr6fhjix6h28mi9ypn34wdm9bzcpg8"))
- (patches (search-patches "gdm-default-session.patch"))))
- (build-system glib-or-gtk-build-system)
+ "1zbks7bwbys1pn7sk0aq0dbn09adx51amb441z4z4j28cvma3f5b"))
+ (patches
+ (search-patches
+ "gdm-default-session.patch"
+ "gdm-elogind-support.patch"
+ "gdm-remove-hardcoded-xwayland-path.patch"
+ "gdm-wayland-session-wrapper-from-env.patch"
+ "gdm-pass-gdk-pixbuf-loader-env.patch"))))
+ (build-system meson-build-system)
(arguments
- '(#:configure-flags
- `("--without-plymouth"
- "--disable-systemd-journal"
-
- ;; Using --with-initial-vt=7 allows GDM to run alongside TTY 1,
- ;; instead of having to replace it (i.e., stopping the mingetty
- ;; service for TTY 1 before starting GDM).
- "--with-initial-vt=7"
-
- ;; Use '/etc/environment' for locale settings instead of the
- ;; systemd-specific '/etc/locale.conf'.
- "--with-lang-file=/etc/environment"
-
- ,(string-append "--with-udevdir="
- (assoc-ref %outputs "out") "/lib/udev")
-
- "--localstatedir=/var"
- ,(string-append "--with-default-path="
- (string-join '("/run/setuid-programs"
- "/run/current-system/profile/bin"
- "/run/current-system/profile/sbin")
- ":"))
- ;; Put GDM in bindir so that glib-or-gtk-build-system wraps the
- ;; XDG_DATA_DIRS so that it finds its schemas.
- "--sbindir" ,(string-append (assoc-ref %outputs "out") "/bin"))
+ `(#:glib-or-gtk? #t
+ #:configure-flags
+ ,#~(list
+ "-Dplymouth=disabled"
+ "-Dsystemd-journal=false"
+
+ ;; Using --with-initial-vt=7 allows GDM to run alongside TTY 1,
+ ;; instead of having to replace it (i.e., stopping the mingetty
+ ;; service for TTY 1 before starting GDM).
+ "-Dinitial-vt=7"
+
+ ;; Use elogind instead of systemd.
+ "-Dlogind-provider=elogind"
+ "-Dsystemdsystemunitdir=no"
+ "-Dsystemduserunitdir=no"
+
+ ;; Use '/etc/environment' for locale settings instead of the
+ ;; systemd-specific '/etc/locale.conf'.
+ "-Dlang-file=/etc/environment"
+
+ (string-append "-Dudev-dir=" #$output "/lib/udev")
+
+ "--localstatedir=/var"
+ (string-append "-Ddefault-path="
+ (string-join '("/run/setuid-programs"
+ "/run/current-system/profile/bin"
+ "/run/current-system/profile/sbin")
+ ":"))
+ ;; Put GDM in bindir so that glib-or-gtk-build-system wraps the
+ ;; XDG_DATA_DIRS so that it finds its schemas.
+ "--sbindir" (string-append #$output "/bin"))
#:phases
(modify-phases %standard-phases
(add-before
- 'configure 'pre-configure
- (lambda* (#:key inputs outputs #:allow-other-keys)
- ;; We don't have <systemd/sd-daemon.h>.
- (substitute* '("common/gdm-log.c"
- "daemon/gdm-server.c"
- "daemon/gdm-session-worker.c"
- "daemon/gdm-session-worker-job.c")
- (("#include <systemd/sd-daemon\\.h>") ""))
- ;; Use elogind for sd-login.
- (substitute* '("common/gdm-common.c"
- "daemon/gdm-local-display-factory.c"
- "daemon/gdm-manager.c"
- "libgdm/gdm-user-switching.c")
- (("#include <systemd/sd-login\\.h>")
- "#include <elogind/sd-login.h>"))
- ;; Check for elogind.
- (substitute* '("configure")
- (("libsystemd")
- "libelogind"))
- ;; Look for system-installed sessions in
- ;; /run/current-system/profile/share.
- (substitute* '("libgdm/gdm-sessions.c"
- "daemon/gdm-session.c"
- "daemon/gdm-display.c"
- "daemon/gdm-launch-environment.c")
- (("DATADIR \"/x")
- "\"/run/current-system/profile/share/x")
- (("DATADIR \"/wayland")
- "\"/run/current-system/profile/share/wayland")
- (("DATADIR \"/gnome")
- "\"/run/current-system/profile/share/gnome"))
- (let ((propagate '("GDM_CUSTOM_CONF"
- "GDM_DBUS_DAEMON"
- "GDM_X_SERVER"
- "GDM_X_SESSION"
- ;; XXX: Remove this once GNOME Shell is
- ;; a dependency of GDM.
- "XDG_DATA_DIRS")))
- (substitute* "daemon/gdm-session.c"
- (("set_up_session_environment \\(self\\);")
- (apply string-append
- "set_up_session_environment (self);\n"
- (map (lambda (name)
- (string-append
- "gdm_session_set_environment_variable "
- "(self, \"" name "\","
- "g_getenv (\"" name "\"));\n"))
- propagate)))))
- ;; Find the configuration file using an environment variable.
- (substitute* '("common/gdm-settings.c")
- (("GDM_CUSTOM_CONF")
- (string-append "(g_getenv(\"GDM_CUSTOM_CONF\") != NULL"
- " ? g_getenv(\"GDM_CUSTOM_CONF\")"
- " : GDM_CUSTOM_CONF)")))
- ;; Use service-supplied path to X.
- (substitute* '("daemon/gdm-server.c")
- (("\\(X_SERVER X_SERVER_ARG_FORMAT")
- "(\"%s\" X_SERVER_ARG_FORMAT, g_getenv (\"GDM_X_SERVER\")"))
- (substitute* '("daemon/gdm-wayland-session.c"
- "daemon/gdm-x-session.c")
- (("\"dbus-daemon\"")
- "g_getenv (\"GDM_DBUS_DAEMON\")")
- (("X_SERVER")
- "g_getenv (\"GDM_X_SERVER\")")
- (("GDMCONFDIR \"/Xsession\"")
- "g_getenv (\"GDM_X_SESSION\")"))
- ;; Use an absolute path for GNOME Session.
- (substitute* "daemon/gdm-launch-environment.c"
- (("\"gnome-session\"")
- (string-append "\"" (assoc-ref inputs "gnome-session")
- "/bin/gnome-session\"")))
- ;; Do not automatically select the placeholder session.
- (substitute* "daemon/gdm-session.c"
- (("!g_str_has_suffix [(]base_name, \"\\.desktop\"[)]")
- (string-append "!g_str_has_suffix (base_name, \".desktop\") || "
- "(g_strcmp0(search_dirs[i], \""
- (assoc-ref outputs "out") "/share/gdm/BuiltInSessions/"
- "\") == 0 && "
- "g_strcmp0(base_name, \"fail.desktop\") == 0)"))
- (("g_error [(]\"GdmSession: no session desktop files installed, aborting\\.\\.\\.\"[)];")
- "{ self->fallback_session_name = g_strdup(\"fail\"); goto out; }"))
- #t))
+ 'configure 'pre-configure
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ ;; We don't have <systemd/sd-daemon.h>.
+ (substitute* '("common/gdm-log.c"
+ "daemon/gdm-server.c"
+ "daemon/gdm-session-worker.c"
+ "daemon/gdm-session-worker-job.c")
+ (("#include <systemd/sd-daemon\\.h>") ""))
+ ;; Use elogind for sd-login.
+ (substitute* '("common/gdm-common.c"
+ "daemon/gdm-local-display-factory.c"
+ "daemon/gdm-manager.c"
+ "libgdm/gdm-user-switching.c")
+ (("#include <systemd/sd-login\\.h>")
+ "#include <elogind/sd-login.h>"))
+ ;; Look for system-installed sessions in
+ ;; /run/current-system/profile/share.
+ (substitute* '("libgdm/gdm-sessions.c"
+ "daemon/gdm-session.c"
+ "daemon/gdm-display.c"
+ "daemon/gdm-launch-environment.c")
+ (("DATADIR \"/x")
+ "\"/run/current-system/profile/share/x")
+ (("DATADIR \"/wayland")
+ "\"/run/current-system/profile/share/wayland")
+ (("DATADIR \"/gnome")
+ "\"/run/current-system/profile/share/gnome"))
+ (let ((propagate '("GDM_CUSTOM_CONF"
+ "GDM_DBUS_DAEMON"
+ "GDM_X_SERVER"
+ "GDM_X_SESSION"
+ ;; XXX: Remove this once GNOME Shell is
+ ;; a dependency of GDM.
+ "XDG_DATA_DIRS")))
+ (substitute* "daemon/gdm-session.c"
+ (("set_up_session_environment \\(self\\);")
+ (apply string-append
+ "set_up_session_environment (self);\n"
+ (map (lambda (name)
+ (string-append
+ "gdm_session_set_environment_variable "
+ "(self, \"" name "\","
+ "g_getenv (\"" name "\"));\n"))
+ propagate)))))
+ ;; Find the configuration file using an environment variable.
+ (substitute* '("common/gdm-settings.c")
+ (("GDM_CUSTOM_CONF")
+ (string-append "(g_getenv(\"GDM_CUSTOM_CONF\") != NULL"
+ " ? g_getenv(\"GDM_CUSTOM_CONF\")"
+ " : GDM_CUSTOM_CONF)")))
+ ;; Use service-supplied path to X.
+ (substitute* '("daemon/gdm-server.c")
+ (("\\(X_SERVER X_SERVER_ARG_FORMAT")
+ "(\"%s\" X_SERVER_ARG_FORMAT, g_getenv (\"GDM_X_SERVER\")"))
+ (substitute* '("daemon/gdm-wayland-session.c"
+ "daemon/gdm-x-session.c")
+ (("\"dbus-daemon\"")
+ "g_getenv (\"GDM_DBUS_DAEMON\")")
+ (("X_SERVER")
+ "g_getenv (\"GDM_X_SERVER\")")
+ (("GDMCONFDIR \"/Xsession\"")
+ "g_getenv (\"GDM_X_SESSION\")"))
+ ;; Use an absolute path for GNOME Session.
+ (substitute* "daemon/gdm-launch-environment.c"
+ (("\"gnome-session\"")
+ (string-append "\"" (assoc-ref inputs "gnome-session")
+ "/bin/gnome-session\"")))
+ ;; Do not automatically select the placeholder session.
+ (substitute* "daemon/gdm-session.c"
+ (("!g_str_has_suffix [(]base_name, \"\\.desktop\"[)]")
+ (string-append "!g_str_has_suffix (base_name, \".desktop\") || "
+ "(g_strcmp0(search_dirs[i], \""
+ (assoc-ref outputs "out") "/share/gdm/BuiltInSessions/"
+ "\") == 0 && "
+ "g_strcmp0(base_name, \"fail.desktop\") == 0)"))
+ (("g_error [(]\"GdmSession: no session desktop files installed, aborting\\.\\.\\.\"[)];")
+ "{ self->fallback_session_name = g_strdup(\"fail\"); goto out; }"))))
+ (add-before 'install 'install-logo
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (guix-icons (assoc-ref inputs "guix-icons"))
+ (icon
+ (string-append guix-icons "/share/icons/hicolor/\
+scalable/apps/guix-white-icon.svg"))
+ (schema
+ (string-append out "/share/glib-2.0/schemas/\
+org.gnome.login-screen.gschema.override")))
+ (mkdir-p (dirname schema))
+ (with-output-to-file schema
+ (lambda ()
+ (format #t "\
+[org.gnome.login-screen]
+logo='~a'~%" icon))))))
;; GDM requires that there be at least one desktop entry
;; file. This phase installs a hidden one that simply
;; fails. This enables users to use GDM with a
@@ -8252,8 +8655,7 @@ library.")
"Name=Fail\n"
"Comment=This session fails immediately.\n"
"NoDisplay=true\n"
- "Exec=false\n"))))
- #t)))
+ "Exec=false\n")))))))
;; GDM needs GNOME Session to run these applications. We link
;; their autostart files in `share/gdm/greeter/autostart'
;; because GDM explicitly tells GNOME Session to look there.
@@ -8270,12 +8672,13 @@ library.")
(with-directory-excursion autostart
(for-each (lambda (desktop)
(symlink desktop (basename desktop)))
- (find-files (string-append settings "/etc/xdg"))))
- #t))))))
+ (find-files
+ (string-append settings "/etc/xdg"))))))))))
(native-inputs
`(("dconf" ,dconf)
("glib:bin" ,glib "bin") ; for glib-compile-schemas, etc.
("gobject-introspection" ,gobject-introspection)
+ ("guix-icons" ,guix-icons)
("intltool" ,intltool)
("itstool" ,itstool)
("pkg-config" ,pkg-config)
@@ -8284,6 +8687,7 @@ library.")
`(("accountsservice" ,accountsservice)
("check" ,check-0.14) ;for testing
("elogind" ,elogind)
+ ("eudev" ,eudev)
("gnome-session" ,gnome-session)
("gnome-settings-daemon" ,gnome-settings-daemon)
("gtk+" ,gtk+)
@@ -8337,6 +8741,7 @@ usage and information about running processes.")
(base32
"1a9ynlwwkb3wpg293ym517vmrkk63y809mmcv9a21k5yr199x53c"))))
(build-system meson-build-system)
+ (arguments `(#:meson ,meson-0.59))
(native-inputs
`(("glib:bin" ,glib "bin") ; for gdbus-codegen, etc.
("gtk+" ,gtk+ "bin") ; gtk-update-icon-cache
@@ -8353,7 +8758,8 @@ usage and information about running processes.")
(inputs
`(("eudev" ,eudev)
("libcanberra" ,libcanberra)
- ("libnotify" ,libnotify)))
+ ("libnotify" ,libnotify)
+ ("python-dbus" ,python-dbus)))
(synopsis "GNOME Bluetooth subsystem")
(home-page "https://wiki.gnome.org/Projects/GnomeBluetooth")
(description
@@ -8364,18 +8770,19 @@ devices using the GNOME desktop.")
(define-public gnome-control-center
(package
(name "gnome-control-center")
- (version "3.34.2")
+ (version "40.1")
(source (origin
(method url-fetch)
(uri (string-append "mirror://gnome/sources/" name "/"
- (version-major+minor version) "/"
+ (version-major version) "/"
name "-" version ".tar.xz"))
(sha256
(base32
- "054igagvmyzpaa5nwzz98gv7bk7l5dwp6g813707132si3szlpx8"))))
+ "0rr4d5m2a72vrb31jgyx49dp0s2pwgyxsrk4hyw5ym66wq63c3v1"))))
(build-system meson-build-system)
(arguments
- '(#:glib-or-gtk? #t
+ `(#:meson ,meson-0.59 ;positional arguments error with meson 0.60
+ #:glib-or-gtk? #t
#:configure-flags
(list "-Dcheese=false"
(string-append "-Dgnome_session_libexecdir="
@@ -8400,8 +8807,8 @@ devices using the GNOME desktop.")
(("\"gkbd-keyboard-display")
(string-append "\"" libgnomekbd
"/bin/gkbd-keyboard-display")))
- (substitute* '("panels/network/net-device-wifi.c"
- "panels/network/net-device.c"
+ (substitute* '("panels/network/net-device-bluetooth.c"
+ "panels/network/net-device-mobile.c"
"panels/network/connection-editor/net-connection-editor.c")
(("\"nm-connection-editor")
(string-append "\"" nm-applet
@@ -8409,17 +8816,15 @@ devices using the GNOME desktop.")
(substitute* '("panels/user-accounts/run-passwd.c")
(("/usr/bin/passwd")
"/run/setuid-programs/passwd"))
- (substitute* "panels/info/cc-info-overview-panel.c"
+ (substitute* "panels/info-overview/cc-info-overview-panel.c"
(("DATADIR \"/gnome/gnome-version.xml\"")
(string-append "\"" gnome-desktop
- "/share/gnome/gnome-version.xml\"")))
- #t)))
+ "/share/gnome/gnome-version.xml\""))))))
(add-after 'unpack 'skip-gtk-update-icon-cache
;; Don't create 'icon-theme.cache'.
(lambda _
(substitute* "build-aux/meson/meson_post_install.py"
- (("gtk-update-icon-cache") (which "true")))
- #t)))))
+ (("gtk-update-icon-cache") (which "true"))))))))
(native-inputs
`(("glib:bin" ,glib "bin") ; for glib-mkenums, etc.
("intltool" ,intltool)
@@ -8453,7 +8858,7 @@ devices using the GNOME desktop.")
("libnma" ,libnma)
("libpwquality" ,libpwquality)
("libsecret" ,libsecret)
- ("libsoup" ,libsoup)
+ ("libsoup" ,libsoup-minimal-2)
("libxml2" ,libxml2)
("libwacom" ,libwacom)
("mesa" ,mesa)
@@ -8478,35 +8883,22 @@ properties, screen resolution, and other GNOME parameters.")
(define-public gnome-shell
(package
(name "gnome-shell")
- (version "3.34.5")
+ (version "41.0")
(source (origin
(method url-fetch)
(uri (string-append "mirror://gnome/sources/" name "/"
- (version-major+minor version) "/"
+ (version-major version) "/"
name "-" version ".tar.xz"))
(sha256
(base32
- "0l3mdn7g2c22mdhrqkxvvc1pk2w0v32f2v4a6n1phvaalwcg75nj"))
- (patches (search-patches "gnome-shell-CVE-2020-17489.patch"
- "gnome-shell-theme.patch"
- "gnome-shell-disable-test.patch"))
- (modules '((guix build utils)))
- (snippet
- #~(begin
- ;; Copy images for use on the GDM log-in screen.
- (copy-file #$(file-append %artwork-repository
- "/slim/0.x/background.png")
- "data/theme/guix-background.png")
- (copy-file #$(file-append %artwork-repository
- "/logo/Guix-horizontal-white.svg")
- "data/theme/guix-logo.svg")
- #t))))
+ "0ragmcln210zvzhc2br33yprbkj9drjzd7inp5sdxra0a7l73yaj"))))
(build-system meson-build-system)
(arguments
- `(#:glib-or-gtk? #t
- #:disallowed-references ((,glib "bin")
- ,inkscape ,libxslt
- ,ruby-sass)
+ `(#:meson ,meson-0.59 ;positional arguments error with meson 0.60
+ #:glib-or-gtk? #t
+ #:disallowed-references ,(list (gexp-input glib "bin")
+ (gexp-input libxslt)
+ (gexp-input ruby-sass))
#:configure-flags
(list "-Dsystemd=false"
;; Otherwise, the RUNPATH will lack the final path component.
@@ -8527,13 +8919,12 @@ properties, screen resolution, and other GNOME parameters.")
out "/share/gnome-control-center/keybindings")))
(substitute* "meson.build"
(("keysdir =.*")
- (string-append "keysdir = '" keysdir "'\n")))
- #t)))
- (add-before 'configure 'convert-logo-to-png
- (lambda* (#:key inputs #:allow-other-keys)
- ;; Convert the logo from SVG to PNG.
- (invoke "inkscape" "--export-png=data/theme/guix-logo.png"
- "data/theme/guix-logo.svg")))
+ (string-append "keysdir = '" keysdir "'\n"))))))
+ (add-after 'unpack 'skip-gtk-update-icon-cache
+ ;; Don't create 'icon-theme.cache'.
+ (lambda _
+ (substitute* "meson/postinstall.py"
+ (("gtk-update-icon-cache") "true"))))
(add-before 'configure 'record-absolute-file-names
(lambda* (#:key inputs #:allow-other-keys)
(substitute* "js/misc/ibusManager.js"
@@ -8543,51 +8934,41 @@ properties, screen resolution, and other GNOME parameters.")
(substitute* "js/ui/status/keyboard.js"
(("'gkbd-keyboard-display'")
(string-append "'" (assoc-ref inputs "libgnomekbd")
- "/bin/gkbd-keyboard-display'")))
- #t))
+ "/bin/gkbd-keyboard-display'")))))
(add-before 'check 'pre-check
(lambda* (#:key inputs #:allow-other-keys)
;; Tests require a running X server.
(system "Xvfb :1 &")
(setenv "DISPLAY" ":1")
- #t))
+ (setenv "HOME" "/tmp"))) ;to avoid "fatal" warnings
(add-after 'install 'wrap-programs
(lambda* (#:key inputs outputs #:allow-other-keys)
(let ((out (assoc-ref outputs "out"))
(gi-typelib-path (getenv "GI_TYPELIB_PATH"))
- (python-path (getenv "PYTHONPATH")))
+ (python-path (getenv "GUIX_PYTHONPATH")))
(wrap-program (string-append out "/bin/gnome-shell")
- `("GI_TYPELIB_PATH" ":" prefix (,gi-typelib-path))
- ;; FIXME: gnome-shell loads these libraries with unqualified
- ;; names only, so they need to be on LD_LIBRARY_PATH. The
- ;; alternative might be to patch gnome-shell.
- `("LD_LIBRARY_PATH" ":" prefix
- ,(map (lambda (pkg)
- (string-append (assoc-ref inputs pkg) "/lib"))
- '("gdk-pixbuf"
- "gnome-bluetooth" "librsvg" "libgweather"))))
+ `("GI_TYPELIB_PATH" ":" prefix (,gi-typelib-path)))
(for-each
(lambda (prog)
(wrap-program (string-append out "/bin/" prog)
- `("PYTHONPATH" ":" prefix (,python-path))
+ `("GUIX_PYTHONPATH" ":" prefix (,python-path))
`("GI_TYPELIB_PATH" ":" prefix (,gi-typelib-path))))
- '("gnome-shell-extension-tool" "gnome-shell-perf-tool"))
- #t)))
+ '("gnome-shell-extension-tool" "gnome-shell-perf-tool")))))
(replace 'glib-or-gtk-wrap
(let ((wrap (assoc-ref %standard-phases 'glib-or-gtk-wrap)))
(lambda* (#:key inputs outputs #:allow-other-keys #:rest rest)
- ;; By default Inkscape et al. would end up in the XDG_DATA_DIRS
+ ;; By default intltool et al. would end up in the XDG_DATA_DIRS
;; settings of the wrappers created by the 'glib-or-gtk-wrap'
;; phase. Fix that since we don't need these.
(wrap #:inputs (fold alist-delete inputs
- '("inkscape" "intltool" "glib:bin"))
+ '("intltool" "glib:bin"))
#:outputs outputs)))))))
(native-inputs
`(("asciidoc" ,asciidoc)
("glib:bin" ,glib "bin") ; for glib-compile-schemas, etc.
("desktop-file-utils" ,desktop-file-utils) ; for update-desktop-database
("gobject-introspection" ,gobject-introspection)
- ("inkscape" ,inkscape)
+ ("hicolor-icon-theme" ,hicolor-icon-theme)
("intltool" ,intltool)
("pkg-config" ,pkg-config)
("python" ,python)
@@ -8603,12 +8984,14 @@ properties, screen resolution, and other GNOME parameters.")
("evolution-data-server" ,evolution-data-server)
("gcr" ,gcr)
("gdm" ,gdm)
- ("gdk-pixbuf" ,gdk-pixbuf+svg)
+ ("librsvg" ,librsvg)
("gjs" ,gjs)
+ ("gtk" ,gtk)
("gnome-autoar" ,gnome-autoar)
("gnome-bluetooth" ,gnome-bluetooth)
("gnome-desktop" ,gnome-desktop)
("gnome-settings-daemon" ,gnome-settings-daemon)
+ ("graphene" ,graphene)
("gst-plugins-base" ,gst-plugins-base)
("ibus" ,ibus)
("libcanberra" ,libcanberra)
@@ -8630,9 +9013,6 @@ properties, screen resolution, and other GNOME parameters.")
;; Missing propagation? See also: <https://bugs.gnu.org/27264>
("librsvg" ,librsvg)
("geoclue" ,geoclue)))
- ;; CVE-2019-3820 was fixed before GNOME 3.34 was released, in upstream
- ;; commit f0a7395b3006360905ccdc642982f9fc67378927.
- (properties '((lint-hidden-cve . ("CVE-2019-3820"))))
(synopsis "Desktop shell for GNOME")
(home-page "https://wiki.gnome.org/Projects/GnomeShell")
(description
@@ -8668,7 +9048,7 @@ like switching to windows and launching applications.")
("vala" ,vala)))
(inputs
`(("cairo" ,cairo)
- ("gdk-pixbuf" ,gdk-pixbuf+svg)
+ ("librsvg" ,librsvg)
("glib" ,glib)
("gnutls" ,gnutls)
("libgcrypt" ,libgcrypt)
@@ -8689,7 +9069,7 @@ core C library, and bindings for Python (PyGTK).")
(define-public gnome-autoar
(package
(name "gnome-autoar")
- (version "0.3.3")
+ (version "0.4.1")
(source (origin
(method url-fetch)
(uri (string-append "mirror://gnome/sources/" name "/"
@@ -8697,10 +9077,11 @@ core C library, and bindings for Python (PyGTK).")
name "-" version ".tar.xz"))
(sha256
(base32
- "012w7rhhpxvlrnnhqy01vwzg1wxqpy8jbqgizn47wnip7bvh0917"))))
- (build-system glib-or-gtk-build-system)
+ "03hmm7cjgjvyxlflghfa89s1amj16qapl2c9pv0r2bfrp87dasv4"))))
+ (build-system meson-build-system)
(native-inputs
`(("gobject-introspection" ,gobject-introspection)
+ ("glib:bin" ,glib "bin")
("pkg-config" ,pkg-config)))
(propagated-inputs
`(("libarchive" ,libarchive))) ; Required by gnome-autoar-0.pc
@@ -8716,7 +9097,7 @@ easy, safe, and automatic.")
(define-public tracker
(package
(name "tracker")
- (version "2.3.5")
+ (version "3.1.2")
(source (origin
(method url-fetch)
(uri (string-append "mirror://gnome/sources/tracker/"
@@ -8724,7 +9105,7 @@ easy, safe, and automatic.")
"tracker-" version ".tar.xz"))
(sha256
(base32
- "1ixxyqjlv7pnl4j8g6b72fkbjvzfspza8y71ppkncry8i6xkr223"))))
+ "13zcc07wd51sz7kglk3xbjrsq7d835cxfr7iwjr7nn2xcri8jdns"))))
(build-system meson-build-system)
(arguments
`(#:glib-or-gtk? #t
@@ -8732,19 +9113,41 @@ easy, safe, and automatic.")
;; Otherwise, the RUNPATH will lack the final path component.
(list (string-append "-Dc_link_args=-Wl,-rpath="
(assoc-ref %outputs "out") "/lib:"
- (assoc-ref %outputs "out") "/lib/tracker-2.0"))
+ (assoc-ref %outputs "out") "/lib/tracker-3.0")
+ "-Ddocs=false"
+ "-Dsystemd_user_services=false")
#:phases
(modify-phases %standard-phases
- (add-before 'check 'pre-check
+ (add-before 'configure 'set-shell
(lambda _
- ;; Some tests expect to write to $HOME.
- (setenv "HOME" "/tmp")
- #t)))))
+ (setenv "SHELL" (which "bash"))))
+ (add-before 'configure 'fix-paths
+ (lambda* (#:key inputs #:allow-other-keys)
+ (let* ((manpage "/etc/asciidoc/docbook-xsl/manpage.xsl")
+ (file (search-input-file inputs manpage)))
+ (substitute* "docs/manpages/meson.build"
+ (("/etc/asciidoc[^']+")
+ file)))))
+ (replace 'check
+ (lambda* (#:key tests? #:allow-other-keys)
+ (when tests?
+ ;; Some tests expect to write to $HOME.
+ (setenv "HOME" "/tmp")
+ (invoke "dbus-run-session" "--" "meson" "test"
+ "--print-errorlogs")))))))
(native-inputs
`(("glib:bin" ,glib "bin")
("gobject-introspection" ,gobject-introspection)
+ ("docbook-xsl" ,docbook-xsl)
+ ("docbook-xml-4.5" ,docbook-xml)
+ ("gsettings-desktop-schemas" ,gsettings-desktop-schemas)
+ ("asciidoc" ,asciidoc)
+ ("xsltproc" ,libxslt)
+ ("cmake-minimal" ,cmake-minimal)
("python-pygobject" ,python-pygobject)
+ ("gtk-doc" ,gtk-doc/stable)
("intltool" ,intltool)
+ ("dbus" ,dbus)
("pkg-config" ,pkg-config)
("vala" ,vala)))
(inputs
@@ -8753,7 +9156,7 @@ easy, safe, and automatic.")
("libxml2" ,libxml2)
("icu4c" ,icu4c) ; libunistring gets miner-miner-fs test to fail.
("json-glib" ,json-glib)
- ("libsoup" ,libsoup)))
+ ("libsoup" ,libsoup-minimal-2))) ; tracker-miners requires the same version.
(synopsis "Metadata database, indexer and search tool")
(home-page "https://wiki.gnome.org/Projects/Tracker")
(description
@@ -8786,7 +9189,7 @@ endpoint and it understands SPARQL. ")
(define-public tracker-miners
(package
(name "tracker-miners")
- (version "2.3.4")
+ (version "3.1.2")
(source (origin
(method url-fetch)
(uri (string-append "mirror://gnome/sources/tracker-miners/"
@@ -8794,7 +9197,7 @@ endpoint and it understands SPARQL. ")
"/tracker-miners-" version ".tar.xz"))
(sha256
(base32
- "10wy8d8ski52k809p7s6lbw72qmg05bbmhnl00vx4qrbzqyxvc0b"))))
+ "0fpd69lgm8cckbamcf9c2q57glxf0s3jcfwkq8p3s4lfsvdclmd0"))))
(build-system meson-build-system)
(arguments
`(#:glib-or-gtk? #t
@@ -8803,16 +9206,54 @@ endpoint and it understands SPARQL. ")
;; Ensure the RUNPATH contains all installed library locations.
(string-append "-Dc_link_args=-Wl,-rpath="
(assoc-ref %outputs "out")
- "/lib/tracker-miners-2.0")
+ "/lib/tracker-miners-3.0")
;; TODO: Enable functional tests. Currently, the following error
;; appears:
;; Exception: The functional tests require DConf to be the default
;; GSettings backend. Got GKeyfileSettingsBackend instead.
- "-Dfunctional_tests=false")))
+ "-Dfunctional_tests=false"
+ "-Dsystemd_user_services=false")
+ #:phases
+ (modify-phases %standard-phases
+ (add-before 'configure 'set-shell
+ (lambda _
+ (setenv "SHELL" (which "bash"))))
+ (add-before 'configure 'fix-paths
+ (lambda* (#:key inputs #:allow-other-keys)
+ (let* ((manpage "/etc/asciidoc/docbook-xsl/manpage.xsl")
+ (file (search-input-file inputs manpage)))
+ (substitute* "docs/manpages/meson.build"
+ (("/etc/asciidoc[^']+")
+ file)))))
+ (add-before 'configure 'fix-tests
+ (lambda* (#:key inputs #:allow-other-keys)
+ ;; Disable those tests that require the functional_tests option
+ ;; to be true and the UPower daemon to be started.
+ (substitute* "examples/python/meson.build"
+ (("foreach example_name:.*")
+ "foreach example_name: []"))
+ ;; Disable this test that is failing randomly:
+ ;; https://gitlab.gnome.org/GNOME/tracker-miners/-/issues/170.
+ (substitute* "tests/libtracker-miner/meson.build"
+ (("'miner-fs'.*")
+ ""))))
+ (replace 'check
+ (lambda* (#:key tests? #:allow-other-keys)
+ (when tests?
+ ;; Some tests expect to write to $HOME.
+ (setenv "HOME" "/tmp")
+ (setenv "LANG" "en_US.UTF-8")
+ (invoke "dbus-run-session" "--" "meson" "test"
+ "--print-errorlogs")))))))
(native-inputs
`(("dbus" ,dbus)
("intltool" ,intltool)
("glib:bin" ,glib "bin")
+ ("docbook-xsl" ,docbook-xsl)
+ ("docbook-xml-4.5" ,docbook-xml)
+ ("gsettings-desktop-schemas" ,gsettings-desktop-schemas)
+ ("asciidoc" ,asciidoc)
+ ("xsltproc" ,libxslt)
("gobject-introspection" ,gobject-introspection)
("pkg-config" ,pkg-config)
("python-pygobject" ,python-pygobject)))
@@ -8824,6 +9265,7 @@ endpoint and it understands SPARQL. ")
("glib" ,glib)
("gstreamer" ,gstreamer)
("icu4c" ,icu4c)
+ ("json-glib" ,json-glib)
("libcue" ,libcue)
("libexif" ,libexif)
("libgsf" ,libgsf)
@@ -8833,10 +9275,12 @@ endpoint and it understands SPARQL. ")
("libosinfo" ,libosinfo)
("libpng" ,libpng)
("libseccomp" ,libseccomp)
+ ("libsoup" ,libsoup-minimal-2) ; because tracker requires this version.
("libtiff" ,libtiff)
("libvorbis" ,libvorbis)
("libxml2" ,libxml2)
("poppler" ,poppler)
+ ("shared-mime-info" ,shared-mime-info)
("taglib" ,taglib)
("totem-pl-parser" ,totem-pl-parser)
("tracker" ,tracker)
@@ -8857,26 +9301,26 @@ shared object databases, search tools and indexing.")
(define-public nautilus
(package
(name "nautilus")
- (version "3.34.2")
+ (version "41.0")
(source (origin
(method url-fetch)
(uri (string-append "mirror://gnome/sources/" name "/"
- (version-major+minor version) "/"
+ (version-major version) "/"
name "-" version ".tar.xz"))
(sha256
(base32
- "19zqwq4qyyncc5wq3xls0f7rsavnw741k336p2h7kx35p4kf41mv"))))
+ "1rd1a0wjh2sc7mzw6m61rryvgxpi2lin4xj0x9khqw04q6nl3fgr"))))
(build-system meson-build-system)
(arguments
- '(#:glib-or-gtk? #t
+ `(#:glib-or-gtk? #t
+ #:meson ,meson-0.59
#:phases
(modify-phases %standard-phases
(add-after 'unpack 'skip-gtk-update-icon-cache
;; Don't create 'icon-theme.cache'.
(lambda _
(substitute* "build-aux/meson/postinstall.py"
- (("gtk-update-icon-cache") "true"))
- #t)))
+ (("gtk-update-icon-cache") "true")))))
;; XXX: FAIL: check-nautilus
;; Settings schema 'org.gnome.nautilus.preferences' is not installed
#:tests? #f))
@@ -8894,8 +9338,12 @@ shared object databases, search tools and indexing.")
("gnome-desktop" ,gnome-desktop)
("gnome-autoar" ,gnome-autoar)
("gst-plugins-base" ,gst-plugins-base)
+ ("json-glib" ,json-glib)
+ ("libhandy" ,libhandy)
+ ("libportal" ,libportal)
("libseccomp" ,libseccomp)
("libselinux" ,libselinux)
+ ("libsoup" ,libsoup-minimal-2) ; to satisfy tracker dependencies
("tracker" ,tracker)
("tracker-miners" ,tracker-miners)
;; XXX: gtk+ is required by libnautilus-extension.pc
@@ -8917,16 +9365,16 @@ files.")
(define-public baobab
(package
(name "baobab")
- (version "3.38.0")
+ (version "40.0")
(source (origin
(method url-fetch)
(uri (string-append
"mirror://gnome/sources/" name "/"
- (version-major+minor version) "/"
+ (version-major version) "/"
name "-" version ".tar.xz"))
(sha256
(base32
- "0ac3fbl15l836yvgw724q4whbkws9v4b6l2xy6bnp0b0g0a6i104"))))
+ "19yii3bdgivxrcka1c4g6dpbmql5nyawwhzlsph7z6bs68nambm6"))))
(build-system meson-build-system)
(arguments
'(#:glib-or-gtk? #t))
@@ -8940,7 +9388,8 @@ files.")
("glib" ,glib "bin")
("vala" ,vala)))
(inputs
- `(("gtk+" ,gtk+)))
+ `(("gtk+" ,gtk+)
+ ("libhandy" ,libhandy)))
(synopsis "Disk usage analyzer for GNOME")
(description
"Baobab (Disk Usage Analyzer) is a graphical application to analyse disk
@@ -8953,19 +9402,19 @@ is complete it provides a graphical representation of each selected folder.")
(define-public gnome-backgrounds
(package
(name "gnome-backgrounds")
- (version "3.34.0")
+ (version "40.1")
(source
(origin
(method url-fetch)
(uri (string-append "mirror://gnome/sources/" name "/"
- (version-major+minor version) "/"
+ (version-major version) "/"
name "-" version ".tar.xz"))
(sha256
(base32
- "0zxlwy55fz7i582hch2wnj8zy1kzikssgaix0l2y41ccp5nzpdy2"))))
+ "03m7ldfk00cly9igrq0qizq1y0f45vijmm23f1dl5kh1lc6qmpv0"))))
(build-system meson-build-system)
(native-inputs
- `(("intltool" ,intltool)))
+ `(("gettext" ,gettext-minimal)))
(home-page "https://gitlab.gnome.org/GNOME/gnome-backgrounds")
(synopsis "Background images for the GNOME desktop")
(description
@@ -8981,16 +9430,18 @@ can add your own files to the collection.")
(define-public gnome-screenshot
(package
(name "gnome-screenshot")
- (version "3.34.0")
+ (version "40.0")
(source
(origin
(method url-fetch)
(uri (string-append "mirror://gnome/sources/" name "/"
- (version-major+minor version) "/"
+ (version-major version) "/"
name "-" version ".tar.xz"))
(sha256
(base32
- "1rmiq890j7gfn5mcz31xy6jfnnxgc17dq67bhn2k9m5ylbvza2n8"))))
+ "1qm544ymwibk31s30k47vnn79xg30m18r7l4di0c57g375dak31n"))
+ (patches
+ (search-patches "gnome-screenshot-meson-0.60.patch"))))
(build-system meson-build-system)
(arguments
'(#:phases
@@ -9010,6 +9461,7 @@ can add your own files to the collection.")
(inputs
`(("gtk+" ,gtk+)
("libcanberra" ,libcanberra)
+ ("libhandy" ,libhandy)
("libx11" ,libx11)
("libxext" ,libxext)))
(home-page "https://gitlab.gnome.org/GNOME/gnome-screenshot")
@@ -9023,7 +9475,7 @@ beautifying border effects.")
(define-public dconf-editor
(package
(name "dconf-editor")
- (version "3.34.2")
+ (version "3.38.3")
(source
(origin
(method url-fetch)
@@ -9032,7 +9484,7 @@ beautifying border effects.")
name "-" version ".tar.xz"))
(sha256
(base32
- "0pwxjada2vaf69ihpjgp9nky54iykvxq63lp1vl8pxjanif2mk6f"))))
+ "1qvrxrk1h8bd75xwasxbvlkqrw6xkavjimvc7sslkw6lvb3z86jp"))))
(build-system meson-build-system)
(native-inputs
`(("glib:bin" ,glib "bin") ; for glib-compile-schemas, gio-2.0.
@@ -9044,6 +9496,8 @@ beautifying border effects.")
`(("dconf" ,dconf)
("gtk+" ,gtk+)
("libxml2" ,libxml2)))
+ (arguments
+ `(#:meson ,meson-0.59))
(home-page "https://gitlab.gnome.org/GNOME/dconf-editor")
(synopsis "Graphical editor for GNOME's dconf configuration system")
(description
@@ -9117,15 +9571,15 @@ associations for GNOME.")
(define-public gnome-weather
(package
(name "gnome-weather")
- (version "3.34.0")
+ (version "40.1")
(source (origin
(method url-fetch)
(uri (string-append "mirror://gnome/sources/" name "/"
- (version-major+minor version) "/"
+ (version-major version) "/"
name "-" version ".tar.xz"))
(sha256
(base32
- "1g63xzs17i36if923b36k9fwbk0nqa5vz6zh1k6q2axrzhhpx1i4"))))
+ "0k9wnyinvx6433r07kvjyahgqc605g7gbpf3d0h6vi4p8x61849x"))))
(build-system meson-build-system)
(native-inputs
`(("gettext" ,gettext-minimal)
@@ -9134,34 +9588,39 @@ associations for GNOME.")
("gtk+:bin" ,gtk+ "bin")
("pkg-config" ,pkg-config)))
(inputs
- `( ;("adwaita-icon-theme" ,adwaita-icon-theme)
- ("appstream-glib" ,appstream-glib)
+ `(("appstream-glib" ,appstream-glib)
("geoclue" ,geoclue)
- ("gdk-pixbuf" ,gdk-pixbuf)
("gjs" ,gjs)
("gnome-desktop" ,gnome-desktop)
- ("libgweather" ,libgweather)))
+ ("libgweather" ,libgweather)
+ ("libhandy" ,libhandy)))
(arguments
- `(#:glib-or-gtk? #t
+ `(#:meson ,meson-0.59 ;positional arguments error with meson 0.60
+ #:glib-or-gtk? #t
#:phases
- (modify-phases %standard-phases
- (add-after 'install 'fix-desktop-file
- ;; FIXME: "gapplication launch org.gnome.Weather" fails for some reason.
- ;; See https://issues.guix.gnu.org/issue/39324.
- (lambda* (#:key outputs #:allow-other-keys)
- (let* ((out (assoc-ref outputs "out"))
- (applications (string-append out "/share/applications")))
- (substitute* (string-append applications "/org.gnome.Weather.desktop")
- (("Exec=.*") "Exec=gnome-weather\n"))
- #t)))
- (add-after 'install 'wrap
- (lambda* (#:key inputs outputs #:allow-other-keys)
- (let ((out (assoc-ref outputs "out"))
- (gi-typelib-path (getenv "GI_TYPELIB_PATH")))
- ;; GNOME Weather needs the typelib files of GTK+, Pango etc at runtime.
- (wrap-program (string-append out "/bin/gnome-weather")
- `("GI_TYPELIB_PATH" ":" prefix (,gi-typelib-path)))
- #t))))))
+ ,#~(modify-phases %standard-phases
+ (add-after 'unpack 'fix-service-file
+ (lambda _
+ (substitute* "data/org.gnome.Weather.service.in"
+ (("Exec=[[:graph:]]+")
+ (string-append "Exec=" #$output
+ "/bin/gnome-weather")))))
+ (add-after 'install 'fix-desktop-file
+ ;; FIXME: "gapplication launch org.gnome.Weather" fails for some
+ ;; reason. See https://issues.guix.gnu.org/issue/39324.
+ (lambda _
+ (let ((applications
+ (string-append #$output "/share/applications")))
+ (substitute* (string-append applications
+ "/org.gnome.Weather.desktop")
+ (("Exec=.*") "Exec=gnome-weather\n")))))
+ (add-after 'install 'wrap
+ (lambda _
+ (let ((gi-typelib-path (getenv "GI_TYPELIB_PATH")))
+ ;; GNOME Weather needs the typelib files of GTK+, Pango etc
+ ;; at runtime.
+ (wrap-program (string-append #$output "/bin/gnome-weather")
+ `("GI_TYPELIB_PATH" ":" prefix (,gi-typelib-path)))))))))
(synopsis "Weather monitoring for GNOME desktop")
(description "GNOME Weather is a small application that allows you to
monitor the current weather conditions for your city, or anywhere in the
@@ -9177,15 +9636,12 @@ world.")
(build-system trivial-build-system)
(arguments '(#:builder (begin (mkdir %output) #t)))
(propagated-inputs
- ;; TODO: Add or remove packages according to:
- ;; <https://calc.disroot.org/2nu6mpf88ynq.html>.
- `(
- ;; GNOME-Core-OS-Services
+ `(;; GNOME-Core-OS-Services
("accountsservice" ,accountsservice)
("network-manager" ,network-manager)
("packagekit" ,packagekit)
("upower" ,upower)
- ;; GNOME-Core-Shell
+ ;; GNOME-Core-Shell
("adwaita-icon-theme" ,adwaita-icon-theme)
("gdm" ,gdm)
("glib-networking" ,glib-networking)
@@ -9194,7 +9650,6 @@ world.")
("gnome-color-manager" ,gnome-color-manager)
("gnome-control-center" ,gnome-control-center)
("gnome-desktop" ,gnome-desktop)
- ("gnome-getting-started-docs" ,gnome-getting-started-docs)
("gnome-initial-setup" ,gnome-initial-setup)
("gnome-keyring" ,gnome-keyring)
("gnome-menus" ,gnome-menus)
@@ -9211,7 +9666,7 @@ world.")
("orca" ,orca)
("rygel" ,rygel)
("sushi" ,sushi)
- ;; GNOME-Core-Utilities
+ ;; GNOME-Core-Utilities
("baobab" ,baobab)
("cheese" ,cheese)
;; XXX: EoG requires librsvg-next, which depends on Rust, which currently
@@ -9232,8 +9687,8 @@ world.")
("gnome-disk-utility" ,gnome-disk-utility)
("gnome-font-viewer" ,gnome-font-viewer)
("gnome-maps" ,gnome-maps)
- ; TODO: ("gnome-music" ,gnome-music)
- ; TODO: ("gnome-photos" ,gnome-photos)
+ ("gnome-music" ,gnome-music)
+ ("gnome-photos" ,gnome-photos)
("gnome-screenshot" ,gnome-screenshot)
("gnome-system-monitor" ,gnome-system-monitor)
("gnome-terminal" ,gnome-terminal)
@@ -9241,8 +9696,9 @@ world.")
("nautilus" ,nautilus)
("simple-scan" ,simple-scan)
("totem" ,totem)
+ ("tracker-miners" ,tracker-miners)
("yelp" ,yelp)
- ;; Others
+ ;; Others
("hicolor-icon-theme" ,hicolor-icon-theme)
("gnome-online-accounts" ,gnome-online-accounts)
@@ -9251,7 +9707,7 @@ world.")
;; XXX: Find out exactly which ones are needed and why.
("font-abattis-cantarell" ,font-abattis-cantarell)
("font-dejavu" ,font-dejavu)
- ("at-spi2-core" ,at-spi2-core)
+ ("at-spi2-core" ,at-spi2-core-minimal)
("dbus" ,dbus)
("dconf" ,dconf)
("desktop-file-utils" ,desktop-file-utils)
@@ -9353,7 +9809,7 @@ specified duration and save it as a GIF encoded animated image file.")
(package-version python))
"/site-packages")))
(wrap-program prog
- `("PYTHONPATH" = (,(getenv "PYTHONPATH") ,pylib))
+ `("GUIX_PYTHONPATH" = (,(getenv "GUIX_PYTHONPATH") ,pylib))
`("GI_TYPELIB_PATH" = (,(getenv "GI_TYPELIB_PATH"))))
#t))))))
(native-inputs
@@ -9452,15 +9908,15 @@ Microsoft SkyDrive and Hotmail, using their REST protocols.")
(define-public gnome-clocks
(package
(name "gnome-clocks")
- (version "3.34.0")
+ (version "40.0")
(source (origin
(method url-fetch)
(uri (string-append "mirror://gnome/sources/" name "/"
- (version-major+minor version) "/"
+ (version-major version) "/"
name "-" version ".tar.xz"))
(sha256
(base32
- "0g7hjk55smhkd09hwa9kag3h5a12l494wj89w9smpdk3ghsmy6b1"))))
+ "02d3jg46sn8d9gd4dsaly22gg5vkbz2gpq4pmwpvncb4rsqk7sn2"))))
(build-system meson-build-system)
(arguments
'(#:glib-or-gtk? #t
@@ -9470,8 +9926,7 @@ Microsoft SkyDrive and Hotmail, using their REST protocols.")
;; Don't create 'icon-theme.cache'.
(lambda _
(substitute* "build-aux/post-install.py"
- (("gtk-update-icon-cache") "true"))
- #t)))))
+ (("gtk-update-icon-cache") "true")))))))
(native-inputs
`(("vala" ,vala)
("pkg-config" ,pkg-config)
@@ -9486,6 +9941,7 @@ Microsoft SkyDrive and Hotmail, using their REST protocols.")
("geoclue" ,geoclue)
("geocode-glib" ,geocode-glib)
("libgweather" ,libgweather)
+ ("libhandy" ,libhandy)
("gnome-desktop" ,gnome-desktop)))
(home-page "https://wiki.gnome.org/Apps/Clocks")
(synopsis "GNOME's clock application")
@@ -9497,18 +9953,19 @@ desktop. It supports world clock, stop watch, alarms, and count down timer.")
(define-public gnome-calendar
(package
(name "gnome-calendar")
- (version "3.34.2")
+ (version "40.2")
(source (origin
(method url-fetch)
(uri (string-append "mirror://gnome/sources/" name "/"
- (version-major+minor version) "/"
+ (version-major version) "/"
name "-" version ".tar.xz"))
(sha256
(base32
- "1bnmd191044zn2kr6f5vg7sm5q59qf7z652awll1f7s6ahijr8rw"))))
+ "0czasxnmbw2zm21lmxam8qixacagciq3f815s809hn0f9byh2dwy"))))
(build-system meson-build-system)
(arguments
- '(#:glib-or-gtk? #t
+ `(#:glib-or-gtk? #t
+ #:meson ,meson-0.59
;; gnome-calendar has to be installed before the tests can be run
;; https://bugzilla.gnome.org/show_bug.cgi?id=788224
#:tests? #f
@@ -9530,6 +9987,7 @@ desktop. It supports world clock, stop watch, alarms, and count down timer.")
("libdazzle" ,libdazzle)
("libedataserverui" ,evolution-data-server)
("libgweather" ,libgweather)
+ ("libhandy" ,libhandy)
("geoclue" ,geoclue)))
(propagated-inputs
`(("evolution-data-server" ,evolution-data-server)))
@@ -9543,46 +10001,43 @@ desktop. It supports multiple calendars, month, week and year view.")
(define-public gnome-todo
(package
(name "gnome-todo")
- (version "3.28.1")
+ (version "40.1")
(source (origin
(method url-fetch)
(uri (string-append "mirror://gnome/sources/" name "/"
- (version-major+minor version) "/"
+ (version-major version) "/"
name "-" version ".tar.xz"))
(sha256
(base32
- "08ygqbib72jlf9y0a16k54zz51sncpq2wa18wp81v46q8301ymy7"))
- (patches
- (search-patches "gnome-todo-delete-esource-duplicate.patch"))))
+ "1r1fb3zgjvkhx93by24j8cg1w1g3zvwr49vqkscjn261vqs44jq3"))))
(build-system meson-build-system)
(arguments
- '(#:glib-or-gtk? #t
- #:phases (modify-phases %standard-phases
- (add-after
- 'install 'wrap-gnome-todo
- (lambda* (#:key inputs outputs #:allow-other-keys)
- (let ((out (assoc-ref outputs "out"))
- (gi-typelib-path (getenv "GI_TYPELIB_PATH"))
- (python-path (getenv "PYTHONPATH")))
- (wrap-program (string-append out "/bin/gnome-todo")
- ;; XXX: gi plugins are broken.
- ;; See https://bugzilla.gnome.org/show_bug.cgi?id=787212
- ;; For plugins.
- `("GI_TYPELIB_PATH" ":" prefix (,gi-typelib-path))
- `("PYTHONPATH" ":" prefix (,python-path))))
- #t)))))
+ `(#:glib-or-gtk? #t
+ ;; XXX: Some tests fail with the following error:
+ ;; Settings schema 'org.gnome.todo' is not installed.
+ #:tests? #f
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'skip-gtk-update-icon-cache
+ ;; Don't create 'icon-theme.cache'.
+ (lambda _
+ (substitute* "build-aux/meson/meson_post_install.py"
+ (("gtk-update-icon-cache") "true")))))))
(native-inputs
`(("gettext" ,gettext-minimal)
("gobject-introspection" ,gobject-introspection)
("glib:bin" ,glib "bin") ; For glib-compile-resources
- ("gtk+-bin" ,gtk+ "bin") ; For gtk-update-icon-cache
+ ("gtk-bin" ,gtk "bin") ; For gtk-update-icon-cache
("pkg-config" ,pkg-config)))
(inputs
`(("rest" ,rest) ; For Todoist plugin
+ ("gtk" ,gtk)
("json-glib" ,json-glib) ; For Todoist plugin
+ ("libadwaita" ,libadwaita)
("libedataserverui" ,evolution-data-server)
("libical" ,libical)
("libpeas" ,libpeas)
+ ("libportal" ,libportal)
("python-pygobject" ,python-pygobject)
("evolution-data-server" ,evolution-data-server)
("gnome-online-accounts:lib" ,gnome-online-accounts "lib")
@@ -9597,26 +10052,25 @@ fit the GNOME desktop.")
(define-public gnome-dictionary
(package
(name "gnome-dictionary")
- (version "3.26.1")
+ (version "40.0")
(source (origin
(method url-fetch)
(uri (string-append "mirror://gnome/sources/" name "/"
- (version-major+minor version) "/"
+ (version-major version) "/"
name "-" version ".tar.xz"))
(sha256
(base32
- "007k2bq8iplg4psdpz074r5d4zxvn4s95qym4rw9hs6giljbrf0n"))))
+ "1d8dhcfys788vv27v34i3s3x3jdvdi2kqn2a5p8c937a9hm0qr9f"))))
(build-system meson-build-system)
- (arguments '(#:glib-or-gtk? #t
- #:phases (modify-phases %standard-phases
- (add-after 'unpack 'patch-install-script
- (lambda _
- ;; This script attempts to compile glib schemas
- ;; and create an empty MIME database. We do
- ;; that elsewhere, so prevent it from running.
- (substitute* "build-aux/post-install.sh"
- (("\\[ -z \"\\$DESTDIR\" \\]") "false"))
- #t)))))
+ (arguments
+ '(#:glib-or-gtk? #t
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'skip-gtk-update-icon-cache
+ ;; Don't create 'icon-theme.cache'.
+ (lambda _
+ (substitute* "build-aux/meson/post-install.py"
+ (("gtk-update-icon-cache") "true")))))))
(native-inputs
`(("glib:bin" ,glib "bin")
("gobject-introspection" ,gobject-introspection)
@@ -9637,20 +10091,21 @@ existing databases over the internet.")
(define-public gnome-tweaks
(package
(name "gnome-tweaks")
- (version "3.34.1")
+ (version "40.0")
(source (origin
(method url-fetch)
(uri (string-append "mirror://gnome/sources/gnome-tweaks/"
- (version-major+minor version) "/"
+ (version-major version) "/"
"gnome-tweaks-" version ".tar.xz"))
(patches
(list (search-patch "gnome-tweaks-search-paths.patch")))
(sha256
(base32
- "19y62dj4n5i6v4zpjllxl51dch6ndy8xs45v5aqmmq9xyfrqk5yq"))))
+ "0sn3xsjhnini0f2dyi1ymrr3fb8mi7w5j5lsyw11rc5h67h3ypzr"))))
(build-system meson-build-system)
(arguments
`(#:glib-or-gtk? #t
+ #:meson ,meson-0.59
#:configure-flags '("-Dlocalstatedir=/tmp"
"-Dsysconfdir=/tmp")
#:imported-modules ((guix build python-build-system)
@@ -9661,26 +10116,32 @@ existing databases over the internet.")
;; Don't create 'icon-theme.cache'.
(lambda _
(substitute* "meson-postinstall.py"
- (("gtk-update-icon-cache") "true"))
- #t))
+ (("gtk-update-icon-cache") "true"))))
(add-after 'install 'wrap
(@@ (guix build python-build-system) wrap))
- (add-after 'wrap 'wrap-gi-typelib
+ (add-after 'wrap 'wrap-gi-typelib-and-python
(lambda* (#:key inputs outputs #:allow-other-keys)
(let ((out (assoc-ref outputs "out"))
(gi-typelib-path (getenv "GI_TYPELIB_PATH")))
- (wrap-program (string-append out "/bin/gnome-tweaks")
- `("GI_TYPELIB_PATH" ":" prefix (,gi-typelib-path))))
- #t)))))
- (native-inputs
- `(("intltool" ,intltool)
+ (let ((python-path
+ (string-append out "/lib/python"
+ ,(version-major+minor
+ (package-version python))
+ "/site-packages")))
+ (wrap-program (string-append out "/bin/gnome-tweaks")
+ `("GI_TYPELIB_PATH" ":" prefix (,gi-typelib-path))
+ `("GUIX_PYTHONPATH" ":" prefix (,python-path))))))))))
+ (native-inputs
+ `(("glib:bin" ,glib "bin") ; for glib-compile-resources, etc.
+ ("intltool" ,intltool)
("pkg-config" ,pkg-config)))
(inputs
- `(("gnome-desktop" ,gnome-desktop)
+ `(("bash-minimal" ,bash-minimal) ; to execute the wrapper program
+ ("gnome-desktop" ,gnome-desktop)
("gtk+" ,gtk+)
("gobject-introspection" ,gobject-introspection)
("gsettings-desktop-schemas" ,gsettings-desktop-schemas)
- ("libhandy" ,libhandy-0.0)
+ ("libhandy" ,libhandy)
("libnotify" ,libnotify)
("libsoup" ,libsoup)
("nautilus" ,nautilus)
@@ -9698,15 +10159,15 @@ GNOME Shell appearance and extension, etc.")
(define-public gnome-shell-extensions
(package
(name "gnome-shell-extensions")
- (version "3.34.2")
+ (version "40.4")
(source (origin
(method url-fetch)
(uri (string-append "mirror://gnome/sources/" name "/"
- (version-major+minor version) "/"
+ (version-major version) "/"
name "-" version ".tar.xz"))
(sha256
(base32
- "1f5l35l3kdkzrv49xmg1sh11vwmgjbg7hx3gb91i39bfl1snxqd1"))))
+ "0yfd1bcwf72dmr1hfh7g8s5cb7snyiyg86575hqx1frbq914q7gm"))))
(build-system meson-build-system)
(arguments
'(#:configure-flags '("-Dextension_set=all")))
@@ -9725,7 +10186,7 @@ functionality and behavior.")
(define-public folks
(package
(name "folks")
- (version "0.13.1")
+ (version "0.15.3")
(source (origin
(method url-fetch)
(uri (string-append
@@ -9734,7 +10195,7 @@ functionality and behavior.")
"folks-" version ".tar.xz"))
(sha256
(base32
- "0pda8sx4ap3lyri5fdrnakl29la1zkhwlc9bmnp13qigp1iwdw9x"))))
+ "19a4qp9ry8y24jx1v5456qn9lnw843571vkkah3bxx4ky3x3gmr1"))))
(build-system meson-build-system)
(arguments
'(#:phases
@@ -9756,6 +10217,7 @@ functionality and behavior.")
(native-inputs
`(("glib:bin" ,glib "bin")
("gobject-introspection" ,gobject-introspection)
+ ("python-dbusmock" ,python-dbusmock)
("intltool" ,intltool)
("pkg-config" ,pkg-config)
("vala" ,vala)))
@@ -9879,18 +10341,25 @@ handling the startup notification side.")
(define-public gnome-calculator
(package
(name "gnome-calculator")
- (version "3.34.1")
+ (version "40.1")
(source
(origin
(method url-fetch)
(uri (string-append "mirror://gnome/sources/" name "/"
- (version-major+minor version) "/"
+ (version-major version) "/"
name "-" version ".tar.xz"))
(sha256
(base32
- "0lbh87255zzggqzai6543qg920y52bl4vs5m5h5087ghzg14hlsd"))))
+ "1xkazxbkpn1z5pfphhps7fc5q4yc8lp7f6b222n8bx5iyxhwbrkz"))))
(build-system meson-build-system)
- (arguments '(#:glib-or-gtk? #t))
+ (arguments
+ '(#:glib-or-gtk? #t
+ #:phases
+ (modify-phases %standard-phases
+ (add-before 'check 'pre-check
+ (lambda _
+ ;; Tests require a writable HOME.
+ (setenv "HOME" (getcwd)))))))
(native-inputs
`(("gettext" ,gettext-minimal)
("glib:bin" ,glib "bin") ; for glib-compile-schemas, gio-2.0.
@@ -9902,7 +10371,8 @@ handling the startup notification side.")
`(("glib" ,glib)
("gtksourceview" ,gtksourceview)
("libgee" ,libgee)
- ("libsoup" ,libsoup)
+ ("libhandy" ,libhandy)
+ ("libsoup" ,libsoup-minimal-2)
("libxml2" ,libxml2)
("mpc" ,mpc)
("mpfr" ,mpfr)))
@@ -10083,16 +10553,16 @@ Bluefish supports many programming and markup languages.")
(define-public gnome-system-monitor
(package
(name "gnome-system-monitor")
- (version "3.32.1")
+ (version "40.1")
(source
(origin
(method url-fetch)
(uri (string-append "mirror://gnome/sources/" name "/"
- (version-major+minor version) "/"
+ (version-major version) "/"
name "-" version ".tar.xz"))
(sha256
(base32
- "1wd43qdgjav6xamq5z5cy8fri5zr01jga3plc9w95gcia0rk3ha8"))))
+ "06hxd4igxas2kyind5jwfq5qbfkknykpdfy2sy3anylhcx1hzczx"))))
(build-system meson-build-system)
(arguments
'(#:glib-or-gtk? #t
@@ -10108,7 +10578,8 @@ Bluefish supports many programming and markup languages.")
(inputs
`(("gdk-pixbuf" ,gdk-pixbuf) ; for loading SVG files.
("gtk+" ,gtk+)
- ("gtkmm" ,gtkmm)
+ ("gtkmm" ,gtkmm-3)
+ ("libhandy" ,libhandy)
("librsvg" ,librsvg)
("libxml2" ,libxml2)
("libwnck" ,libwnck)))
@@ -10173,16 +10644,16 @@ accessibility infrastructure.")
(define-public orca
(package
(name "orca")
- (version "3.34.1")
+ (version "40.0")
(source (origin
(method url-fetch)
(uri (string-append
"mirror://gnome/sources/" name "/"
- (version-major+minor version) "/"
+ (version-major version) "/"
name "-" version ".tar.xz"))
(sha256
(base32
- "1q38n7hyshkiszmn361skxjynxr31lcms7a1iny6d0zlpmh1vnk4"))))
+ "0hq0zdcn80ficpcffbk667907v6m7dih3dhyc7ss01mrj3iyw000"))))
(build-system glib-or-gtk-build-system)
(arguments
'(#:phases
@@ -10203,8 +10674,8 @@ accessibility infrastructure.")
(,(getenv "GI_TYPELIB_PATH")))
`("GST_PLUGIN_SYSTEM_PATH" ":" prefix
(,(getenv "GST_PLUGIN_SYSTEM_PATH")))
- `("PYTHONPATH" ":" prefix
- (,(getenv "PYTHONPATH")))))
+ `("GUIX_PYTHONPATH" ":" prefix
+ (,(getenv "GUIX_PYTHONPATH")))))
#t)))))
(native-inputs
`(("intltool" ,intltool)
@@ -10262,9 +10733,7 @@ that support the Assistive Technology Service Provider Interface (AT-SPI).")
;; Allow Enchant and its Aspell backend to find the en_US
;; dictionary.
(setenv "ASPELL_DICT_DIR"
- (string-append (assoc-ref inputs "aspell-dict-en")
- "/lib/aspell"))
- #t)))))
+ (search-input-directory inputs "/lib/aspell")))))))
(inputs
`(("iso-codes" ,iso-codes)))
(native-inputs
@@ -10385,7 +10854,7 @@ views can be printed as PDF or PostScript files, or exported to HTML.")
("libnotify" ,libnotify)
("libsecret" ,libsecret)
("libhandy" ,libhandy)
- ("libsoup" ,libsoup)
+ ("libsoup" ,libsoup-minimal-2)
("python" ,python)
("python-beautifulsoup4" ,python-beautifulsoup4)
("python-gst" ,python-gst)
@@ -10443,9 +10912,11 @@ photo-booth-like software, such as Cheese.")
version ".tar.xz"))
(sha256
(base32
- "0vyim2avlgq3a48rgdfz5g21kqk11mfb53b2l883340v88mp7ll8"))))
+ "0vyim2avlgq3a48rgdfz5g21kqk11mfb53b2l883340v88mp7ll8"))
+ (patches (search-patches "cheese-vala-update.patch"))))
(arguments
- `(#:glib-or-gtk? #t
+ `(#:meson ,meson-0.59 ;positional arguments error with meson 0.60
+ #:glib-or-gtk? #t
;; Tests require GDK.
#:tests? #f
#:phases
@@ -10537,7 +11008,7 @@ apply fancy special effects and lets you share the fun with others.")
(package-version python))
"/site-packages")))
(wrap-program prog
- `("PYTHONPATH" = (,(getenv "PYTHONPATH") ,pylib))
+ `("GUIX_PYTHONPATH" = (,(getenv "GUIX_PYTHONPATH") ,pylib))
`("GI_TYPELIB_PATH" = (,(getenv "GI_TYPELIB_PATH"))))
#t))))))
(native-inputs
@@ -10680,7 +11151,7 @@ configurable file renaming. ")
(inputs `(("glib" ,glib)
("gtk+" ,gtk+)
("gdk-pixbuf" ,gdk-pixbuf)
- ("gtkmm" ,gtkmm)
+ ("gtkmm" ,gtkmm-3)
("glibmm" ,glibmm)
("libx11" ,libx11)
("libxtst" ,libxtst)
@@ -10791,7 +11262,7 @@ generic enough to work for everyone.")
(define-public evolution
(package
(name "evolution")
- (version "3.34.2")
+ (version "3.42.1")
(source (origin
(method url-fetch)
(uri (string-append "mirror://gnome/sources/evolution/"
@@ -10799,8 +11270,7 @@ generic enough to work for everyone.")
"evolution-" version ".tar.xz"))
(sha256
(base32
- "164vy8h432pjglafn8y2ms4gsvk3kbgc63h5qp0mk5dv4smsp29c"))
- (patches (search-patches "evolution-CVE-2020-11879.patch"))))
+ "0igfzapdvgfx2gnpwfkjfkn7l5j186wk88ni39vqas1sl7ijlls6"))))
(build-system cmake-build-system)
(arguments
`(#:imported-modules (,@%cmake-build-system-modules
@@ -10822,8 +11292,7 @@ generic enough to work for everyone.")
(substitute* "src/modules/alarm-notify/CMakeLists.txt"
(("\\$\\{edsuimoduledir\\}")
(string-append (assoc-ref outputs "out")
- "/lib/evolution-data-server/ui-modules")))
- #t))
+ "/lib/evolution-data-server/ui-modules")))))
(add-after 'install 'glib-or-gtk-compile-schemas
(assoc-ref glib-or-gtk:%standard-phases 'glib-or-gtk-compile-schemas))
(add-after 'install 'glib-or-gtk-wrap
@@ -10848,7 +11317,7 @@ generic enough to work for everyone.")
("libsoup" ,libsoup)
("nss" ,nss)
("openldap" ,openldap)
- ("webkitgtk" ,webkitgtk)
+ ("webkitgtk" ,webkitgtk-with-libsoup2) ; because of evolution-data-server
("ytnef" ,ytnef)))
(home-page "https://gitlab.gnome.org/GNOME/evolution")
(synopsis "Manage your email, contacts and schedule")
@@ -10875,6 +11344,11 @@ functionality.")
(build-system meson-build-system)
(arguments
`(#:glib-or-gtk? #t
+
+ ;; See
+ ;; <https://github.com/mesonbuild/meson/issues/9492#issuecomment-973117289>.
+ #:meson ,meson-0.59
+
#:configure-flags
;; Ensure the RUNPATH contains all installed library locations.
(list (string-append "-Dc_link_args=-Wl,-rpath="
@@ -10962,8 +11436,7 @@ advanced image management tool")
;; python-dbus cannot be found but it's really there. See
;; https://github.com/SpotlightKid/jack-select/issues/2
(substitute* "setup.py"
- (("'dbus-python',") ""))
- #t))
+ (("'dbus-python',") ""))))
(add-after 'install 'wrap-program
(lambda* (#:key outputs #:allow-other-keys)
(let ((prog (string-append (assoc-ref outputs "out")
@@ -10974,9 +11447,8 @@ advanced image management tool")
(package-version python))
"/site-packages")))
(wrap-program prog
- `("PYTHONPATH" = (,(getenv "PYTHONPATH") ,pylib))
- `("GI_TYPELIB_PATH" = (,(getenv "GI_TYPELIB_PATH"))))
- #t)))
+ `("GUIX_PYTHONPATH" = (,(getenv "GUIX_PYTHONPATH") ,pylib))
+ `("GI_TYPELIB_PATH" = (,(getenv "GI_TYPELIB_PATH")))))))
(add-after 'wrap-program 'glib-or-gtk-wrap
(assoc-ref glib-or-gtk:%standard-phases 'glib-or-gtk-wrap)))))
(home-page "https://gnome-terminator.org/")
@@ -10989,7 +11461,7 @@ tabs, and it supports drag and drop re-ordering of terminals.")
(define-public libhandy
(package
(name "libhandy")
- (version "1.2.2")
+ (version "1.2.3")
(source
(origin
(method git-fetch)
@@ -10998,14 +11470,26 @@ tabs, and it supports drag and drop re-ordering of terminals.")
(commit version)))
(file-name (git-file-name name version))
(sha256
- (base32 "0345x7gif6yjm95y62lww71lj84wfwsr2p32r3iww8shavb8scyk"))))
+ (base32 "1ng2607cp4dfl169rj7zi8q5p6fzxy3a4l0glm7mj75yd1a603rz"))))
(build-system meson-build-system)
(arguments
`(#:configure-flags
'("-Dglade_catalog=enabled"
- "-Dgtk_doc=true")
+ ;; XXX: Generating the documentation fails because the
+ ;; libhandy.devhelp2 document cannot be created. This seems to be
+ ;; caused by a problem during the XSL transformation.
+ "-Dgtk_doc=false")
#:phases
(modify-phases %standard-phases
+ (add-after 'unpack 'patch-docbook-xml
+ (lambda* (#:key inputs #:allow-other-keys)
+ (for-each
+ (lambda (file)
+ (substitute* file
+ (("http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd")
+ (search-input-file inputs
+ "/xml/dtd/docbook/docbookx.dtd"))))
+ (find-files "doc" "\\.xml"))))
(add-before 'check 'pre-check
(lambda _
;; Tests require a running X server.
@@ -11014,12 +11498,15 @@ tabs, and it supports drag and drop re-ordering of terminals.")
#t)))))
(inputs
`(("gtk+" ,gtk+)
- ("glade" ,glade3)
- ("libxml2" ,libxml2)))
+ ("glade" ,glade3)))
(native-inputs
`(("glib:bin" ,glib "bin")
("gobject-introspection" ,gobject-introspection) ; for g-ir-scanner
("vala" ,vala)
+ ("libxml2" ,libxml2)
+ ("libxslt" ,libxslt)
+ ("docbook-xsl" ,docbook-xsl)
+ ("docbook-xml" ,docbook-xml-4.3)
("gtk-doc" ,gtk-doc/stable)
("pkg-config" ,pkg-config)
("gettext" ,gettext-minimal)
@@ -11167,6 +11654,13 @@ repository and commit your work.")
(arguments
`(#:phases
(modify-phases %standard-phases
+ ;; The 'config.sub' is too old to recognise aarch64.
+ ,@(if (and=> (%current-target-system) target-aarch64?)
+ `((add-after 'unpack 'replace-config.sub
+ (lambda _
+ (delete-file "config.sub")
+ (symlink (which "config.sub") "config.sub"))))
+ '())
(add-after 'unpack 'remove-deprecated-macro
(lambda _
(substitute* '("server/gam_node.c"
@@ -11174,12 +11668,38 @@ repository and commit your work.")
"server/gam_node.h"
"server/gam_subscription.c")
(("G_CONST_RETURN") "const"))
- #t)))))
+ #t))
+ ;; The configure script runs a test program unconditionally,
+ ;; without an option to manually set the test result.
+ ;; Override this test anyway.
+ ,@(if (%current-target-system)
+ `((add-after 'bootstrap 'set-have-abstract-sockets
+ (lambda _
+ (define in-abstract-sockets-test? #f)
+ (substitute* "configure"
+ (("^#### Abstract sockets\n$")
+ (set! in-abstract-sockets-test? #t)
+ "#### Abstract sockets\n")
+ (("^have_abstract_sockets=no\n$")
+ (set! in-abstract-sockets-test? #f)
+ ;; ‘Abstract sockets’ appear to be Linux-only.
+ (string-append "have_abstract_sockets="
+ ,(if (target-linux?)
+ "yes"
+ "no")
+ "\nif false; then\nif false; then :\n"))
+ (("^(.*\n)$" line)
+ (if in-abstract-sockets-test?
+ "" ; delete
+ line))))))
+ '()))))
(inputs
`(("glib" ,glib)))
(native-inputs
- `(("intltool" ,intltool)
- ("pkg-config" ,pkg-config)))
+ `(("pkg-config" ,pkg-config)
+ ,@(if (and=> (%current-target-system) target-aarch64?)
+ `(("config" ,config))
+ '())))
(home-page "https://people.gnome.org/~veillard/gamin/")
(synopsis "File alteration monitor")
(description
@@ -11266,15 +11786,15 @@ index files needed for Adwaita to be used outside of GNOME.")
(define-public gnote
(package
(name "gnote")
- (version "3.38.1")
+ (version "40.2")
(source
(origin
(method url-fetch)
(uri (string-append "mirror://gnome/sources/" name "/"
- (version-major+minor version) "/"
+ (version-major version) "/"
"gnote-" version ".tar.xz"))
(sha256
- (base32 "1adjfjhmsm2d33999khjyzvli6kiz1jlzavn77jhd49kfzhxa9y4"))))
+ (base32 "01fqdfgcl32cf40jw9q0h7f5bghl1lvf89vln1lh41ncrk0iw6vy"))))
(build-system glib-or-gtk-build-system)
(native-inputs
`(("desktop-file-utils" ,desktop-file-utils)
@@ -11289,7 +11809,7 @@ index files needed for Adwaita to be used outside of GNOME.")
("gsettings-desktop-schemas" ,gsettings-desktop-schemas)
("gspell" ,gspell)
("gtk+" ,gtk+)
- ("gtkmm" ,gtkmm)
+ ("gtkmm" ,gtkmm-3)
("libsecret" ,libsecret)
("libuuid" ,util-linux "lib")
("libxml2" ,libxml2)
@@ -11359,26 +11879,29 @@ integrate seamlessly with the GNOME desktop.")
(define-public gnome-boxes
(package
(name "gnome-boxes")
- (version "3.36.6")
+ (version "41.1")
(source
(origin
(method url-fetch)
(uri (string-append "mirror://gnome/sources/gnome-boxes/"
- (version-major+minor version) "/"
+ (version-major version) "/"
"gnome-boxes-" version ".tar.xz"))
(sha256
- (base32 "0c3cw90xqqcpacc2z06ljs0gg8saxizfgjzg9alhpwgz3gl4c5pg"))))
+ (base32 "1wzhm8n485cqhbai4qshgrwl05ix881g8gjshilrj6vg8p1li79h"))
+ (patches
+ (search-patches "gnome-boxes-add-guix-logo.patch"))))
(build-system meson-build-system)
(arguments
- '(#:glib-or-gtk? #t
+ `(#:meson ,meson-0.59 ;positional arguments error with meson 0.60
+ #:glib-or-gtk? #t
#:configure-flags (list "-Drdp=false"
(string-append "-Dc_link_args=-Wl,-rpath="
(assoc-ref %outputs "out")
"/lib/gnome-boxes"))))
(native-inputs
- `(("glib:bin" ,glib "bin") ; for glib-compile-resources
- ("gtk+:bin" ,gtk+ "bin") ; for gtk-update-icon-cache
- ("desktop-file-utils" ,desktop-file-utils) ; for update-desktop-database
+ `(("glib:bin" ,glib "bin") ;for glib-compile-resources
+ ("gtk+:bin" ,gtk+ "bin") ;for gtk-update-icon-cache
+ ("desktop-file-utils" ,desktop-file-utils) ;for update-desktop-database
("itstool" ,itstool)
("intltool" ,intltool)
("vala" ,vala)
@@ -11389,9 +11912,12 @@ integrate seamlessly with the GNOME desktop.")
("gsettings-desktop-schemas" ,gsettings-desktop-schemas)
("gtk" ,gtk+)
("gtk-vnc" ,gtk-vnc)
+ ("gtksourceview" ,gtksourceview)
+ ("json-glib" ,json-glib)
+ ("libhandy" ,libhandy)
("libosinfo" ,libosinfo)
("libsecret" ,libsecret)
- ("libsoup" ,libsoup)
+ ("libsoup" ,libsoup-minimal-2)
("libusb" ,libusb)
("libvirt" ,libvirt)
("libvirt-glib" ,libvirt-glib)
@@ -11399,7 +11925,7 @@ integrate seamlessly with the GNOME desktop.")
("spice-gtk" ,spice-gtk)
("sparql-query" ,sparql-query)
("vte" ,vte)
- ("webkitgtk" ,webkitgtk)
+ ("webkitgtk" ,webkitgtk-with-libsoup2) ;for webkit2gtk-4.0
("tracker" ,tracker)
("libgudev" ,libgudev)))
(home-page "https://wiki.gnome.org/Apps/Boxes")
@@ -11418,34 +11944,46 @@ these services on the Guix System.")
(define-public geary
(package
(name "geary")
- (version "3.34.1")
+ (version "40.0")
(source (origin
(method git-fetch)
(uri (git-reference
- (url "https://gitlab.gnome.org/GNOME/geary")
- (commit version)))
+ (url "https://gitlab.gnome.org/GNOME/geary.git")
+ (commit (string-append "gnome-" version))))
(file-name (git-file-name name version))
(sha256
(base32
- "01cc921kyh3zxz07biqbdzkjgmdcc36kwjyajm4y382a75cl5zg7"))
- (patches (search-patches "geary-CVE-2020-24661.patch"))))
+ "04hvw86r8sczvjm1z3ls5y5y5h6nyfb648rjkfx05ib00mqq5v1x"))))
(build-system meson-build-system)
(arguments
`(#:glib-or-gtk? #t
+ #:configure-flags
+ '("-Dprofile=release")
#:phases (modify-phases %standard-phases
(add-after 'unpack 'disable-failing-tests
(lambda _
- (substitute* "test/meson.build"
- (("test\\('client-tests', geary_test_client_bin\\)")
- ""))
- #t))
+ (substitute* "test/test-client.vala"
+ (("client.add_suite\\(new Application.CertificateManagerTest\\(\\).suite\\);")
+ ""))))
+ (add-after 'unpack 'generate-vapis
+ (lambda* (#:key inputs #:allow-other-keys)
+ ;; It’s not possible to generate the GMime vapi, because
+ ;; there’s custom metadata that gmime didn’t
+ ;; install. Thus, the vapi should be built and installed
+ ;; with gmime.
+ (define gmime
+ (assoc-ref inputs "gmime"))
+ (copy-file (string-append gmime "/share/vala/vapi/gmime-3.0.vapi")
+ "bindings/vapi/gmime-3.0.vapi")))
(add-after 'unpack 'disable-postinstall-script
(lambda _
- (substitute* "meson.build"
- (("meson.add_install_script\\(\
-join_paths\\('build-aux', 'post_install.py'\\)\\)")
- ""))
- #t))
+ (substitute* "build-aux/post_install.py"
+ (("gtk-update-icon-cache")
+ "true"))))
+ (add-before 'check 'setup-home
+ (lambda _
+ ;; Tests require a writable HOME.
+ (setenv "HOME" (getcwd))))
(add-before 'check 'setup-xvfb
(lambda _
(system "Xvfb :1 &")
@@ -11455,28 +11993,33 @@ join_paths\\('build-aux', 'post_install.py'\\)\\)")
("folks" ,folks)
("gcr" ,gcr)
("glib" ,glib)
- ("gmime" ,gmime-2.6)
+ ("gmime" ,gmime)
("gnome-online-accounts:lib"
,gnome-online-accounts "lib")
+ ("gsettings-desktop-schemas" ,gsettings-desktop-schemas)
("gspell" ,gspell)
+ ("gsound" ,gsound)
("gtk+" ,gtk+)
("iso-codes" ,iso-codes)
("json-glib" ,json-glib)
("libcanberra" ,libcanberra)
("libgee" ,libgee)
- ("libhandy" ,libhandy-0.0)
+ ("libhandy" ,libhandy)
("libpeas" ,libpeas)
("libsecret" ,libsecret)
+ ("libstemmer" ,libstemmer)
("libunwind" ,libunwind)
("sqlite" ,sqlite)
- ("webkitgtk" ,webkitgtk)
+ ("webkitgtk" ,webkitgtk-with-libsoup2)
("ytnef" ,ytnef)))
(native-inputs
`(("appstream-glib" ,appstream-glib)
("cmake-minimal" ,cmake-minimal)
("desktop-file-utils" ,desktop-file-utils)
("gettext" ,gettext-minimal)
+ ("glib" ,glib)
("glib:bin" ,glib "bin")
+ ("gmime" ,gmime)
("gobject-introspection" ,gobject-introspection)
("gsettings-desktop-schemas" ,gsettings-desktop-schemas)
("itstool" ,itstool)
@@ -11529,6 +12072,8 @@ to.")
`(("gtk+" ,gtk+)
("librsvg" ,librsvg)
("libxml2" ,libxml2)))
+ (arguments
+ `(#:configure-flags '("CFLAGS=-fcommon")))
(home-page "https://glabels.org/")
(synopsis "Program for creating labels and business cards")
(description
@@ -11537,11 +12082,10 @@ designed to work with various laser/ink-jet peel-off label and business
card sheets that you’ll find at most office supply stores.")
(license license:gpl3+)))
-;; Version 3.38.0 is out but requires tepl>=5 which requires glib>=2.64.
(define-public gnome-latex
(package
(name "gnome-latex")
- (version "3.36.0")
+ (version "3.38.0")
(source
(origin
(method url-fetch)
@@ -11549,7 +12093,7 @@ card sheets that you’ll find at most office supply stores.")
(version-major+minor version) "/"
"gnome-latex-" version ".tar.xz"))
(sha256
- (base32 "1869kr1zhcp04mzbi67lwgk497w840dbbc7427i9yh9b9s7j6mqn"))))
+ (base32 "0xqd49pgi82dygqnxj08i1v22b0vwwhx3zvdinhrx4jny339yam8"))))
(build-system glib-or-gtk-build-system)
(native-inputs
`(("gettext" ,gettext-minimal)
@@ -11569,7 +12113,7 @@ card sheets that you’ll find at most office supply stores.")
("gtk+" ,gtk+)
("gtksourceview" ,gtksourceview)
("libgee" ,libgee)
- ("tepl" ,tepl)
+ ("tepl" ,tepl-5)
("uchardet" ,uchardet)))
(home-page "https://wiki.gnome.org/Apps/GNOME-LaTeX")
(synopsis "LaTeX editor for the GNOME desktop")
@@ -11608,7 +12152,7 @@ and toolbars.")
(package-version python))
"/site-packages")))
(wrap-program prog
- `("PYTHONPATH" = (,(getenv "PYTHONPATH") ,pylib))
+ `("GUIX_PYTHONPATH" = (,(getenv "GUIX_PYTHONPATH") ,pylib))
`("GI_TYPELIB_PATH" = (,(getenv "GI_TYPELIB_PATH"))))
#t))))))
(native-inputs
@@ -11670,11 +12214,11 @@ GTK+. It integrates well with the GNOME desktop environment.")
(package-version python))
"/site-packages")))
(wrap-program prog
- `("PYTHONPATH" = (,(getenv "PYTHONPATH") ,pylib))
+ `("PYTHONPATH" = (,(getenv "GUIX_PYTHONPATH") ,pylib))
`("GI_TYPELIB_PATH" = (,(getenv "GI_TYPELIB_PATH")))
- `("PATH" prefix (,(string-append (assoc-ref inputs "pandoc")
- "/bin"))))
- #t))))))
+ `("PATH" prefix (,(dirname
+ (search-input-file inputs
+ "/bin/pandoc")))))))))))
(inputs
`(("glib" ,glib)
("gobject-introspection" ,gobject-introspection)
@@ -11733,7 +12277,7 @@ It uses pandoc as back-end for parsing Markdown.")
(pygo (string-append
(assoc-ref inputs "python-pygobject") site))
(python-wrap
- `("PYTHONPATH" = (,evdev ,pygo))))
+ `("GUIX_PYTHONPATH" = (,evdev ,pygo))))
(wrap-program (string-append out "/bin/" "ratbagctl")
python-wrap)
#t))))))
@@ -11957,7 +12501,7 @@ GObject introspection bindings.")
(define-public sysprof
(package
(name "sysprof")
- (version "3.36.0")
+ (version "3.42.1")
(source
(origin
(method url-fetch)
@@ -11965,7 +12509,7 @@ GObject introspection bindings.")
(version-major+minor version) "/"
"sysprof-" version ".tar.xz"))
(sha256
- (base32 "024i0gzqnm79rpr4gqxdvcj6gvf82xdlcp2p1k9ikcppmi6xnw46"))))
+ (base32 "0090986ar3lz9m9fy7l5y9ibzzmgsx54cm6gp8ggsxgf0habi5hp"))))
(build-system meson-build-system)
(arguments
`(#:configure-flags
@@ -11981,9 +12525,12 @@ GObject introspection bindings.")
(("gtk-update-icon-cache") "true")
(("update-desktop-database") "true"))
#t)))))
+ (propagated-inputs
+ `(("polkit" ,polkit)))
(inputs
`(("glib" ,glib)
("gtk+" ,gtk+)
+ ("json-glib" ,json-glib)
("libdazzle" ,libdazzle)
("polkit" ,polkit)))
(native-inputs
@@ -12008,25 +12555,22 @@ libraries. Applications do not need to be recompiled--or even restarted.")
(define-public gnome-builder
(package
(name "gnome-builder")
- (version "3.36.1")
+ (version "41.2")
(source (origin
(method url-fetch)
(uri (string-append "mirror://gnome/sources/" name "/"
- (version-major+minor version) "/"
+ (version-major version) "/"
name "-" version ".tar.xz"))
(sha256
(base32
- "17pvmd5jypar8dkr6w56hvf7jnq4l1wih2wwgkrv7sblr7rkkar2"))))
+ "04p031i999dccbnlbysmr6f93x7dji7b559j6yhdsqbqgxb7ncan"))))
(build-system meson-build-system)
(arguments
- `(#:configure-flags (list "-Dnetwork_tests=false"
+ `(#:glib-or-gtk? #t ; To wrap binaries and compile schemas
+ #:configure-flags (list "-Dnetwork_tests=false"
;; TODO: Enable all plugins...
- "-Dplugin_clang=false"
+ ;; Flatpak plugin wants libsoup 2
"-Dplugin_flatpak=false"
- "-Dplugin_glade=false"
- ;; XXX: This one has been shown not to work in
- ;; <https://issues.guix.gnu.org/45272>
- "-Dplugin_jedi=false"
;; ... except this one.
"-Dplugin_update_manager=false")
#:phases
@@ -12039,8 +12583,7 @@ libraries. Applications do not need to be recompiled--or even restarted.")
(substitute* "src/libide/meson.build"
(("/usr/lib")
(string-append (assoc-ref inputs "python-pygobject")
- "/lib")))
- #t))
+ "/lib")))))
(add-after 'configure 'fix-ninja
(lambda _
;; #43296: meson(?) incorrectly assumes we want to link
@@ -12054,7 +12597,10 @@ libraries. Applications do not need to be recompiled--or even restarted.")
(setenv "DISPLAY" ":1")
#t)))))
(inputs
- `(("devhelp" ,devhelp)
+ `(("cmark" ,cmark)
+ ("clang" ,clang)
+ ("devhelp" ,devhelp-with-libsoup2)
+ ("glade" ,glade3)
("gspell" ,gspell)
("gtk+" ,gtk+)
("json-glib" ,json-glib)
@@ -12062,11 +12608,14 @@ libraries. Applications do not need to be recompiled--or even restarted.")
("libdazzle" ,libdazzle)
("libgit2-glib" ,libgit2-glib)
("libpeas" ,libpeas)
+ ("libportal" ,libportal)
+ ("libsoup" ,libsoup-minimal-2)
+ ("llvm" ,llvm)
("python-pygobject" ,python-pygobject)
("sysprof" ,sysprof)
("template-glib" ,template-glib)
("vte" ,vte)
- ("webkitgtk" ,webkitgtk)))
+ ("webkitgtk" ,webkitgtk-with-libsoup2)))
(propagated-inputs
`(("gtksourceview" ,gtksourceview))) ;needed for settings
(native-inputs
@@ -12120,7 +12669,7 @@ integrated profiler via Sysprof, debugging support, and more.")
(let ((prog (string-append (assoc-ref outputs "out")
"/bin/komikku")))
(wrap-program prog
- `("PYTHONPATH" = (,(getenv "PYTHONPATH")))
+ `("GUIX_PYTHONPATH" = (,(getenv "GUIX_PYTHONPATH")))
`("GI_TYPELIB_PATH" = (,(getenv "GI_TYPELIB_PATH"))))
#t))))))
(inputs
@@ -12168,10 +12717,15 @@ developed with the aim of being used with the Librem 5 phone.")
version "." "_")))))
(file-name (git-file-name name version))
(sha256
- (base32 "18rg773gq9v3cdywpmrp12c5xyp97ir9yqjinccpi22sksb1kl8a"))))
+ (base32 "18rg773gq9v3cdywpmrp12c5xyp97ir9yqjinccpi22sksb1kl8a"))
+ (modules '((guix build utils)))
+ (snippet
+ ;; Remove the bundled sqlite, but keep its header because code relies
+ ;; on this header variant.
+ '(delete-file "libgda/sqlite/sqlite-src/sqlite3.c"))))
(build-system gnu-build-system)
(arguments
- `(#:configure-flags '("--enable-vala")
+ `(#:configure-flags '("--enable-system-sqlite" "--enable-vala")
;; There's a race between check_cnc_lock and check_threaded_cnc
;; in tests/multi-threading.
#:parallel-tests? #f
@@ -12210,6 +12764,7 @@ developed with the aim of being used with the Librem 5 phone.")
("libsecret" ,libsecret)
("libxslt" ,libxslt)
("openssl" ,openssl)
+ ("sqlite" ,sqlite)
("vala" ,vala)))
(native-inputs
`(("autoconf" ,autoconf)
@@ -12238,15 +12793,15 @@ your data.")
(define-public gtranslator
(package
(name "gtranslator")
- (version "3.36.0")
+ (version "40.0")
(source (origin
(method url-fetch)
(uri (string-append "mirror://gnome/sources/" name "/"
- (version-major+minor version) "/"
+ (version-major version) "/"
name "-" version ".tar.xz"))
(sha256
(base32
- "1lxd2nkji4jk8g2xmyc1a1r3ww710ddk91zh9psmx8xlb4xivaid"))))
+ "0d48nc11z0m91scy21ah56ysxns82zvswx8lglvlkig1vqvblgpc"))))
(build-system meson-build-system)
(inputs
`(("json-glib" ,json-glib)
@@ -12258,7 +12813,8 @@ your data.")
("gspell" ,gspell)
("libdazzle" ,libdazzle)
("libgda" ,libgda)
- ("libsoup" ,libsoup)))
+ ("libhandy" ,libhandy)
+ ("libsoup" ,libsoup-minimal-2)))
(native-inputs
`(("glib:bin" ,glib "bin")
("itstool" ,itstool)
@@ -12266,7 +12822,8 @@ your data.")
(propagated-inputs
`(("gtksourceview" ,gtksourceview))) ; required for source view
(arguments
- `(#:build-type "release"
+ `(#:meson ,meson-0.59
+ #:build-type "release"
#:glib-or-gtk? #t
#:phases
(modify-phases %standard-phases
@@ -12312,7 +12869,7 @@ world.")
(package-version python))
"/site-packages")))
(wrap-program prog
- `("PYTHONPATH" = (,(getenv "PYTHONPATH") ,pylib))
+ `("PYTHONPATH" = (,(getenv "GUIX_PYTHONPATH") ,pylib))
`("GI_TYPELIB_PATH" = (,(getenv "GI_TYPELIB_PATH"))))
#t))))))
(native-inputs
@@ -12348,6 +12905,49 @@ world.")
Document Analysis and Recognition program.")
(license license:gpl3+)))
+(define-public libadwaita
+ (let ((commit "8d66b987a19979d9d7b85dacc6bad5ce0c8743fe")
+ (revision "1"))
+ (package
+ (name "libadwaita")
+ (version (git-version "0.0.1" revision commit))
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://gitlab.gnome.org/GNOME/libadwaita.git")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0i3wav6jsyi4w4i2r1rad769m5y5s9djj4zqb7dfyh0bad24ba3q"))))
+ (build-system meson-build-system)
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (add-before 'check 'pre-check
+ (lambda* (#:key inputs #:allow-other-keys)
+ ;; Tests require a running X server.
+ (system "Xvfb :1 &")
+ (setenv "DISPLAY" ":1"))))))
+ (native-inputs
+ `(("sassc" ,sassc)
+ ("glib:bin" ,glib "bin")
+ ("gtk-doc" ,gtk-doc/stable)
+ ("pkg-config" ,pkg-config)
+ ("vala" ,vala)
+ ("xvfb" ,xorg-server-for-tests)))
+ (inputs
+ `(("gtk" ,gtk)
+ ("gobject-introspection" ,gobject-introspection)
+ ("libportal" ,libportal)))
+ (home-page "https://gnome.pages.gitlab.gnome.org/libadwaita/")
+ (synopsis "Building blocks for GNOME applications")
+ (description
+ "@code{libadwaita} offers widgets and objects to build GNOME
+applications scaling from desktop workstations to mobile phones. It is the
+successor of @code{libhandy} for GTK4.")
+ (license license:lgpl2.1+))))
+
(define-public gnome-power-manager
(package
(name "gnome-power-manager")
diff --git a/gnu/packages/gnucash.scm b/gnu/packages/gnucash.scm
index eb5c0023e6..239c9d03cd 100644
--- a/gnu/packages/gnucash.scm
+++ b/gnu/packages/gnucash.scm
@@ -5,7 +5,7 @@
;;; Copyright © 2017 Chris Marusich <cmmarusich@gmail.com>
;;; Copyright © 2017, 2019 Tobias Geerinckx-Rice <me@tobias.gr>
;;; Copyright © 2019 Maxim Cournoyer <maxim.cournoyer@gmail.com>
-;;; Copyright © 2019 Guillaume Le Vaillant <glv@posteo.net>
+;;; Copyright © 2019, 2021 Guillaume Le Vaillant <glv@posteo.net>
;;; Copyright © 2020 Prafulla Giri <pratheblackdiamond@gmail.com>
;;; Copyright © 2020 Christopher Lam <christopher.lck@gmail.com>
;;;
@@ -63,15 +63,14 @@
;; directory.
(package
(name "gnucash")
- (version "4.2")
+ (version "4.6")
(source
(origin
(method url-fetch)
(uri (string-append "mirror://sourceforge/gnucash/gnucash%20%28stable%29/"
version "/gnucash-" version ".tar.bz2"))
(sha256
- (base32
- "020k1mm909dcgs52ls4v7xx3yn8gqazi9awyr81l6y7pkq1spn2n"))))
+ (base32 "0csp8iddhc901vv09gl5lj970g6ili696vwj4vdpkiprp7gh26r5"))))
(build-system cmake-build-system)
(inputs
`(("guile" ,guile-3.0)
@@ -84,7 +83,7 @@
("libofx" ,libofx)
("libxml2" ,libxml2)
("libxslt" ,libxslt)
- ("webkitgtk" ,webkitgtk)
+ ("webkitgtk" ,webkitgtk-with-libsoup2)
("aqbanking" ,aqbanking)
("python" ,python)
("perl-date-manip" ,perl-date-manip)
@@ -93,6 +92,7 @@
(native-inputs
`(("glib" ,glib "bin") ; glib-compile-schemas, etc.
("intltool" ,intltool)
+ ("gmp" ,gmp)
("googlemock" ,(package-source googletest))
("googletest" ,googletest)
("gnucash-docs" ,gnucash-docs)
@@ -231,8 +231,7 @@ installed as well as Yelp, the Gnome help browser.")
(uri (string-append "mirror://sourceforge/gnucash/gnucash%20%28stable%29/"
version "/gnucash-docs-" version revision ".tar.gz"))
(sha256
- (base32
- "1p1rbv0gyi07nh5pzhk3xm46w66kjyaipb6rpaq9yb9gil1nl7q5"))))
+ (base32 "1365k4wb8zfm2zyg7zqyvajbzh9311m2zi1vpvbpp8p4sibqjksw"))))
(build-system gnu-build-system)
;; These are native-inputs because they are only required for building the
;; documentation.
diff --git a/gnu/packages/gnunet.scm b/gnu/packages/gnunet.scm
index d0a9955005..c1ccf8d702 100644
--- a/gnu/packages/gnunet.scm
+++ b/gnu/packages/gnunet.scm
@@ -164,7 +164,8 @@ tool to extract metadata from a file and print the results.")
version ".tar.gz"))
(sha256
(base32
- "0bh39irwzkv48fkw43skfgkk8ka3793bx1lm21sgw6zxi0djyyx3"))))
+ "0bh39irwzkv48fkw43skfgkk8ka3793bx1lm21sgw6zxi0djyyx3"))
+ (patches (search-patches "libmicrohttpd-0.9.73-test-ssl3.patch"))))
(build-system gnu-build-system)
(inputs
`(("curl" ,curl)
diff --git a/gnu/packages/gnupg.scm b/gnu/packages/gnupg.scm
index 348724e8fb..ddfc6dee69 100644
--- a/gnu/packages/gnupg.scm
+++ b/gnu/packages/gnupg.scm
@@ -18,6 +18,7 @@
;;; Copyright © 2018 Björn Höfling <bjoern.hoefling@bjoernhoefling.de>
;;; Copyright © 2019 Mathieu Othacehe <m.othacehe@gmail.com>
;;; Copyright © 2020 Fredrik Salomonsson <plattfot@posteo.net>
+;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be>
;;; Copyright © 2021 Nikita Domnitskii <nikita@domnitskii.me>
;;;
;;; This file is part of GNU Guix.
@@ -80,13 +81,14 @@
#:use-module (guix build-system gnu)
#:use-module (guix build-system perl)
#:use-module (guix build-system python)
+ #:use-module (ice-9 match)
#:use-module (guix build-system meson)
#:use-module (srfi srfi-1))
(define-public libgpg-error
(package
(name "libgpg-error")
- (version "1.37")
+ (version "1.42")
(source
(origin
(method url-fetch)
@@ -94,32 +96,48 @@
version ".tar.bz2"))
(sha256
(base32
- "0qwpx8mbc2l421a22l0l1hpzkip9jng06bbzgxwpkkvk5bvnybdk"))))
+ "08syj8mlarww8mh8x3s0x6hjqbnxp2lkg3hab57qqpv1dh7yf1zw"))))
(build-system gnu-build-system)
(arguments
(if (%current-target-system)
- `(#:modules ((ice-9 match)
- (guix build gnu-build-system)
+ `(#:modules ((guix build gnu-build-system)
(guix build utils))
#:phases
(modify-phases %standard-phases
+ ;; If this is left out, some generated header
+ ;; files will be sprinkled with ‘\c’, which
+ ;; the compiler won't like.
+ (add-after 'unpack 'fix-gen-lock-obj.sh
+ (lambda _
+ (substitute* "src/gen-lock-obj.sh"
+ (("if test -n `echo -n`") "if ! test -n `echo -n`"))))
;; When cross-compiling, some platform specific properties cannot
;; be detected. Create a symlink to the appropriate platform
- ;; file. See Cross-Compiling section at:
+ ;; file if required. Note that these platform files depend on
+ ;; both the operating system and architecture!
+ ;;
+ ;; See Cross-Compiling section at:
;; https://github.com/gpg/libgpg-error/blob/master/README
(add-after 'unpack 'cross-symlinks
- (lambda* (#:key target inputs #:allow-other-keys)
- (let ((triplet
- (match (string-take target
- (string-index target #\-))
- ("armhf" "arm-unknown-linux-gnueabi")
- ("mips64el" "mips-unknown-linux-gnu")
- (x
- (string-append x "-unknown-linux-gnu")))))
- (symlink
- (string-append "lock-obj-pub." triplet ".h")
- "src/syscfg/lock-obj-pub.linux-gnu.h"))
- #t))))
+ (lambda _
+ (define (link triplet source)
+ (symlink (string-append "lock-obj-pub." triplet ".h")
+ (string-append "src/syscfg/lock-obj-pub."
+ source ".h")))
+ ,(let* ((target (%current-target-system))
+ (architecture
+ (string-take target (string-index target #\-))))
+ (cond ((target-linux? target)
+ (match architecture
+ ("armhf"
+ `(link "arm-unknown-linux-gnueabi" "linux-gnu"))
+ ("mips64el"
+ `(link "mips-unknown-linux-gnu" "linux-gnu"))
+ ;; Don't always link to the "linux-gnu"
+ ;; configuration, as this is not correct for
+ ;; all architectures.
+ (_ #t)))
+ (#t #t)))))))
'()))
(native-inputs `(("gettext" ,gettext-minimal)))
(home-page "https://gnupg.org")
@@ -136,14 +154,14 @@ Daemon and possibly more in the future.")
(define-public libgcrypt
(package
(name "libgcrypt")
- (version "1.8.5")
+ (version "1.8.8")
(source (origin
(method url-fetch)
(uri (string-append "mirror://gnupg/libgcrypt/libgcrypt-"
version ".tar.bz2"))
(sha256
(base32
- "1hvsazms1bfd769q0ngl0r9g5i4m9mpz9jmvvrdzyzk3rfa2ljiv"))))
+ "1xasrh9zxhgj2n5n8dvpzbwn1mzpmlzy270xhbq2gl8xk2xy4pc9"))))
(build-system gnu-build-system)
(propagated-inputs
`(("libgpg-error-host" ,libgpg-error)))
@@ -175,7 +193,7 @@ generation.")
(define-public libassuan
(package
(name "libassuan")
- (version "2.5.4")
+ (version "2.5.5")
(source
(origin
(method url-fetch)
@@ -183,7 +201,7 @@ generation.")
version ".tar.bz2"))
(sha256
(base32
- "1w7vnnycq4z7gf4bk38pi4hrb8qrrzgfpz3cd7frwldxnfbfx060"))))
+ "1r1lvcp67gn5lfrj1g388sd77ca6qwnmxndirdysd71gk362z34f"))))
(build-system gnu-build-system)
(propagated-inputs
`(("libgpg-error" ,libgpg-error)
@@ -203,7 +221,7 @@ provided.")
(define-public libksba
(package
(name "libksba")
- (version "1.5.0")
+ (version "1.6.0")
(source
(origin
(method url-fetch)
@@ -212,7 +230,7 @@ provided.")
version ".tar.bz2"))
(sha256
(base32
- "1fm0mf3wq9fmyi1rmc1vk2fafn6liiw2mgxml3g7ybbb44lz2jmf"))))
+ "12x40y9ihs8nw2xs2y2vjfw90mhikbm5rvabma0dh5frybk87mns"))))
(build-system gnu-build-system)
(propagated-inputs
`(("libgpg-error" ,libgpg-error)))
@@ -262,7 +280,7 @@ compatible to GNU Pth.")
(define-public gnupg
(package
(name "gnupg")
- (version "2.2.29")
+ (version "2.2.30")
(source (origin
(method url-fetch)
(uri (string-append "mirror://gnupg/gnupg/gnupg-" version
@@ -270,7 +288,7 @@ compatible to GNU Pth.")
(patches (search-patches "gnupg-default-pinentry.patch"))
(sha256
(base32
- "1j8cpp08zlz9a9n4g9z6352m1bvl369r94p4pjg8z0948pdprl1r"))))
+ "1111ry31gaxv76miqsy6l0kwxwlx8sz0jk41jhyrjwx649p6sqyc"))))
(build-system gnu-build-system)
(native-inputs
`(("pkg-config" ,pkg-config)))
@@ -299,14 +317,12 @@ compatible to GNU Pth.")
(substitute* "scd/scdaemon.c"
(("\"(libpcsclite\\.so[^\"]*)\"" _ name)
(string-append "\"" (assoc-ref inputs "pcsc-lite")
- "/lib/" name "\"")))
- #t))
+ "/lib/" name "\"")))))
(add-after 'build 'patch-scheme-tests
(lambda _
(substitute* (find-files "tests" ".\\.scm$")
(("/usr/bin/env gpgscm")
- (string-append (getcwd) "/tests/gpgscm/gpgscm")))
- #t))
+ (string-append (getcwd) "/tests/gpgscm/gpgscm")))))
(add-before 'build 'patch-test-paths
(lambda _
(substitute* '("tests/inittests"
@@ -318,8 +334,7 @@ compatible to GNU Pth.")
(substitute* "common/t-exectool.c"
(("/bin/cat") (which "cat"))
(("/bin/true") (which "true"))
- (("/bin/false") (which "false")))
- #t)))))
+ (("/bin/false") (which "false"))))))))
(home-page "https://gnupg.org/")
(synopsis "GNU Privacy Guard")
(description
@@ -333,6 +348,25 @@ libskba (working with X.509 certificates and CMS data).")
(properties '((ftp-server . "ftp.gnupg.org")
(ftp-directory . "/gcrypt/gnupg")))))
+(define-public gnupg-2.2.32
+ (package
+ (inherit gnupg)
+ (version "2.2.32")
+
+ ;; Hide this version because packages like 'emacs-pinentry' propagate the
+ ;; default GnuPG and "guix install gnupg emacs-pinentry" would fail with a
+ ;; collision error.
+ (properties `((hidden? . #t)
+ ,@(package-properties gnupg)))
+
+ (source (origin
+ (inherit (package-source gnupg))
+ (uri (string-append "mirror://gnupg/gnupg/gnupg-" version
+ ".tar.bz2"))
+ (sha256
+ (base32
+ "0506gv54z10c96z5821z9p0ksibk1pfilsmag39ffqrcz0sinmxj"))))))
+
(define-public gnupg-1
(package (inherit gnupg)
(version "1.4.23")
@@ -342,7 +376,8 @@ libskba (working with X.509 certificates and CMS data).")
".tar.bz2"))
(sha256
(base32
- "1fkq4sqldvf6a25mm2qz95swv1qjg464736091w51djiwqbjyin9"))))
+ "1fkq4sqldvf6a25mm2qz95swv1qjg464736091w51djiwqbjyin9"))
+ (patches (search-patches "gnupg-1-build-with-gcc10.patch"))))
(native-inputs '())
(inputs
`(("zlib" ,zlib)
@@ -410,12 +445,15 @@ and every application benefits from this.")
(chdir "lang/qt")
#t)))))
(native-inputs
- `(("pkg-config" ,pkg-config)
- ,@(package-native-inputs gpgme)))
+ ;; Use GnuPG 2.2.32. With 2.2.30, 'testSymmetricEncryptDecrypt' in
+ ;; t-encrypt.cpp fails because 'gpg' wrongfully ask for a passphrase do
+ ;; decrypt the cypher text.
+ (modify-inputs (package-native-inputs gpgme)
+ (replace "gnupg" gnupg-2.2.32)
+ (prepend pkg-config)))
(inputs
- `(("gpgme" ,gpgme)
- ("qtbase" ,qtbase-5)
- ,@(package-inputs gpgme)))
+ (modify-inputs (package-inputs gpgme)
+ (prepend gpgme qtbase-5)))
(synopsis "Qt API bindings for gpgme")
(description "QGpgme provides a very high level Qt API around GpgMEpp.
@@ -451,8 +489,10 @@ gpgpme starting with version 1.7.")
;; When cross-compiling, the bash script 'libgcrypt-config'
;; must be accessible during the configure phase.
(setenv "PATH"
- (string-append (assoc-ref inputs "libgcrypt")
- "/bin:" (getenv "PATH")))))))))
+ (string-append
+ (dirname
+ (search-input-file inputs "bin/libgcrypt-config"))
+ ":" (getenv "PATH")))))))))
(native-inputs
`(("pkg-config" ,pkg-config)
("autoconf" ,autoconf)
@@ -664,8 +704,7 @@ signing, decryption, verification, and key-listing parsing.")
(add-before
'build 'set-gpg-file-name
(lambda* (#:key inputs outputs #:allow-other-keys)
- (let* ((gpg (string-append (assoc-ref inputs "gpg")
- "/bin/gpg")))
+ (let* ((gpg (search-input-file inputs "/bin/gpg")))
(substitute* "libpius/constants.py"
(("/usr/bin/gpg2") gpg))
#t))))))
@@ -1193,8 +1232,7 @@ over.")
(delete 'configure) ; no configure script
(add-before 'install 'hardlink-gnupg
(lambda* (#:key inputs #:allow-other-keys)
- (let ((gpg (string-append (assoc-ref inputs "gnupg")
- "/bin/gpg")))
+ (let ((gpg (search-input-file inputs "/bin/gpg")))
(substitute* (find-files "." "jetring-[[:alpha:]]+$")
(("gpg -") (string-append gpg " -"))
(("\\\"gpg\\\"") (string-append "\"" gpg "\"")))
diff --git a/gnu/packages/gnuzilla.scm b/gnu/packages/gnuzilla.scm
index 6d9f8f44ac..bbc6b53677 100644
--- a/gnu/packages/gnuzilla.scm
+++ b/gnu/packages/gnuzilla.scm
@@ -1,6 +1,6 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2013, 2015 Andreas Enge <andreas@enge.fr>
-;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021 Mark H Weaver <mhw@netris.org>
;;; Copyright © 2015 Sou Bunnbu <iyzsong@gmail.com>
;;; Copyright © 2016, 2017, 2018, 2019, 2021 Efraim Flashner <efraim@flashner.co.il>
@@ -16,6 +16,8 @@
;;; Copyright © 2020, 2021 Jonathan Brielmaier <jonathan.brielmaier@web.de>
;;; Copyright © 2020 Marius Bakke <marius@gnu.org>
;;; Copyright © 2021 Brice Waegeneire <brice@waegenei.re>
+;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be>
+;;; Copyright © 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;; Copyright © 2021 Baptiste Strazzul <bstrazzull@hotmail.fr>
;;;
;;; This file is part of GNU Guix.
@@ -342,8 +344,7 @@ in C/C++.")
(let ((out (assoc-ref outputs "out")))
(setenv "SHELL" (which "sh"))
(setenv "CONFIG_SHELL" (which "sh"))
- (setenv "AUTOCONF" (string-append (assoc-ref inputs "autoconf")
- "/bin/autoconf"))
+ (setenv "AUTOCONF" (which "autoconf"))
(apply invoke "./configure"
(cons (string-append "--prefix=" out)
configure-flags))))))))
@@ -359,7 +360,7 @@ in C/C++.")
;; we take the Debian version instead, because it is easier to work with.
(package
(inherit mozjs-38)
- (version "60.2.3-2")
+ (version "60.2.3-4")
(source (origin
(method git-fetch)
(uri (git-reference
@@ -368,27 +369,49 @@ in C/C++.")
(file-name (git-file-name "mozjs" version))
(sha256
(base32
- "091w050rwzrdcbgyi934k2viyccmlqxrp13sm2mql71mabb5dai6"))))
+ "1xl6avsj9gkgma71p56jzs7nasc767k3n1frnmri5pad4rj94bij"))))
(arguments
`(#:tests? #f ; FIXME: all tests pass, but then the check phase fails anyway.
#:test-target "check-jstests"
#:configure-flags
- '("--enable-ctypes"
- "--enable-optimize"
- "--enable-pie"
- "--enable-readline"
- "--enable-shared-js"
- "--enable-system-ffi"
- "--with-system-nspr"
- "--with-system-zlib"
- "--with-system-icu"
- "--with-intl-api"
- ;; This is important because without it gjs will segfault during the
- ;; configure phase. With jemalloc only the standalone mozjs console
- ;; will work.
- "--disable-jemalloc")
+ ;; TODO(core-updates): unconditionally use 'quasiquote
+ ,#~(#$(if (%current-target-system)
+ #~quasiquote
+ #~quote)
+ ("--enable-ctypes"
+ "--enable-optimize"
+ "--enable-pie"
+ "--enable-readline"
+ "--enable-shared-js"
+ "--enable-system-ffi"
+ "--with-system-nspr"
+ #$@(if (%current-target-system)
+ #~(,(string-append "--with-nspr-prefix="
+ #$(this-package-input "nspr")))
+ #~())
+ "--with-system-zlib"
+ "--with-system-icu"
+ "--with-intl-api"
+ ;; This is important because without it gjs will segfault during the
+ ;; configure phase. With jemalloc only the standalone mozjs console
+ ;; will work.
+ "--disable-jemalloc"
+ ;; Mozilla deviates from Autotools conventions due to historical
+ ;; reasons.
+ #$@(if (%current-target-system)
+ #~(#$(string-append
+ "--host="
+ (nix-system->gnu-triplet (%current-system)))
+ #$(string-append "--target=" (%current-target-system)))
+ #~())))
#:phases
(modify-phases %standard-phases
+ ;; Make sure pkg-config will be found.
+ ,@(if (%current-target-system)
+ `((add-before 'configure 'set-PKG-CONFIG
+ (lambda _
+ (setenv "PKG_CONFIG" ,(pkg-config-for-target)))))
+ '())
(replace 'configure
(lambda* (#:key inputs outputs configure-flags #:allow-other-keys)
;; The configure script does not accept environment variables as
@@ -399,8 +422,7 @@ in C/C++.")
(chdir "run-configure-from-here")
(setenv "SHELL" (which "sh"))
(setenv "CONFIG_SHELL" (which "sh"))
- (setenv "AUTOCONF" (string-append (assoc-ref inputs "autoconf")
- "/bin/autoconf"))
+ (setenv "AUTOCONF" (which "autoconf"))
(apply invoke "../js/src/configure"
(cons (string-append "--prefix=" out)
configure-flags))
@@ -422,7 +444,7 @@ in C/C++.")
(define-public mozjs-78
(package
(inherit mozjs-60)
- (version "78.6.1")
+ (version "78.15.0")
(source (origin
(method url-fetch)
;; TODO: Switch to IceCat source once available on ftp.gnu.org.
@@ -431,7 +453,7 @@ in C/C++.")
version "esr.source.tar.xz"))
(sha256
(base32
- "1kp75838a38x4h0w98qn01g9asn7jlgm64bz7n70353bnr6bf1qd"))))
+ "0l91cxdc5v9fps79ckb1kid4gw6v5qng1jd9zvaacwaiv628shx4"))))
(arguments
`(#:imported-modules ,%cargo-utils-modules ;for `generate-all-checksums'
#:modules ((guix build cargo-utils)
@@ -458,12 +480,6 @@ in C/C++.")
"--with-intl-api")
#:phases
(modify-phases %standard-phases
- (add-after 'unpack 'patch-StructuredClone.h
- (lambda _
- (substitute* "js/public/StructuredClone.h"
- (("class SharedArrayRawBufferRefs \\{")
- "class JS_PUBLIC_API SharedArrayRawBufferRefs {"))
- #t))
(add-after 'patch-source-shebangs 'patch-cargo-checksums
(lambda _
(let ((null-hash
@@ -487,8 +503,7 @@ in C/C++.")
(chdir "run-configure-from-here")
(setenv "SHELL" (which "sh"))
(setenv "CONFIG_SHELL" (which "sh"))
- (setenv "AUTOCONF" (string-append (assoc-ref inputs "autoconf")
- "/bin/autoconf"))
+ (setenv "AUTOCONF" (which "autoconf"))
(apply invoke "../js/src/configure"
(cons (string-append "--prefix=" out)
configure-flags))
@@ -564,7 +579,7 @@ in C/C++.")
("rust" ,rust)
("cargo" ,rust "cargo")))
(inputs
- `(("icu4c" ,icu4c-68)
+ `(("icu4c" ,icu4c)
("readline" ,readline)
("zlib" ,zlib)))))
@@ -916,7 +931,7 @@ in C/C++.")
("libffi" ,libffi)
("ffmpeg" ,ffmpeg)
("libvpx" ,libvpx)
- ("icu4c" ,icu4c-69)
+ ("icu4c" ,icu4c)
("pixman" ,pixman)
("pulseaudio" ,pulseaudio)
("mesa" ,mesa)
@@ -949,8 +964,8 @@ in C/C++.")
("patch" ,(canonical-package patch))
- ("rust" ,rust-1.51)
- ("cargo" ,rust-1.51 "cargo")
+ ("rust" ,rust)
+ ("cargo" ,rust "cargo")
("rust-cbindgen" ,rust-cbindgen-0.19)
("llvm" ,llvm-11)
("clang" ,clang-11)
@@ -972,7 +987,7 @@ in C/C++.")
#:configure-flags `("--enable-application=browser"
"--with-distribution-id=org.gnu"
-
+ "--enable-geckodriver"
;; Do not require addons in the global app or
;; system directories to be signed by Mozilla.
"--with-unsigned-addon-scopes=app,system"
@@ -1064,8 +1079,7 @@ in C/C++.")
(format #t "applying '~a'...~%" file)
(invoke patch "--force" "--no-backup-if-mismatch"
"-p1" "--input" file))))
- (or native-inputs inputs)))
- #t))
+ (or native-inputs inputs)))))
(add-after 'apply-guix-specific-patches 'remove-bundled-libraries
(lambda _
;; Remove bundled libraries that we don't use, since they may
@@ -1114,8 +1128,7 @@ in C/C++.")
;; UNBUNDLE-ME! "gfx/graphite2"
"js/src/ctypes/libffi"
;; UNBUNDLE-ME! "db/sqlite3"
- ))
- #t))
+ ))))
(add-after 'remove-bundled-libraries 'fix-ffmpeg-runtime-linker
(lambda* (#:key inputs #:allow-other-keys)
(let* ((ffmpeg (assoc-ref inputs "ffmpeg"))
@@ -1123,8 +1136,7 @@ in C/C++.")
;; Arrange to load libavcodec.so by its absolute file name.
(substitute* "dom/media/platforms/ffmpeg/FFmpegRuntimeLinker.cpp"
(("libavcodec\\.so")
- libavcodec))
- #t)))
+ libavcodec)))))
(add-after 'fix-ffmpeg-runtime-linker 'build-sandbox-whitelist
(lambda* (#:key inputs #:allow-other-keys)
(define (runpath-of lib)
@@ -1154,8 +1166,7 @@ in C/C++.")
whitelist-string)
(format port "~%pref(\"security.sandbox.content.read_path_whitelist\", ~S);~%"
whitelist-string)
- (close-output-port port))
- #t))
+ (close-output-port port))))
(add-after 'patch-source-shebangs 'patch-cargo-checksums
(lambda _
(use-modules (guix build cargo-utils))
@@ -1184,8 +1195,7 @@ in C/C++.")
"intl"
"servo"
"security/manager/ssl"
- "build")))
- #t))
+ "build")))))
(delete 'bootstrap)
(replace 'configure
;; configure does not work followed by both "SHELL=..." and
@@ -1245,10 +1255,15 @@ in C/C++.")
(("[0-9a-df-np-sv-z]{32}" hash)
(string-append (string-take hash 8)
"<!-- Guix: not a runtime dependency -->"
- (string-drop hash 8)))))
- #t))
+ (string-drop hash 8)))))))
(replace 'install
- (lambda _ (invoke "./mach" "install")))
+ (lambda* (#:key outputs #:allow-other-keys)
+ (invoke "./mach" "install")
+ ;; The geckodriver binary is not installed by the above, for some
+ ;; reason. Use 'find-files' to avoid having to deal with the
+ ;; system/architecture-specific file name.
+ (install-file (first (find-files "." "geckodriver"))
+ (string-append (assoc-ref outputs "out") "/bin"))))
(add-after 'install 'wrap-program
(lambda* (#:key inputs outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))
@@ -1273,8 +1288,7 @@ in C/C++.")
;; package on guix has been observed to be unstable when
;; using wayland, and the bundled extensions stop working.
;; `("MOZ_ENABLE_WAYLAND" = ("1"))
- `("LD_LIBRARY_PATH" prefix ,ld-libs))
- #t)))
+ `("LD_LIBRARY_PATH" prefix ,ld-libs)))))
(add-after 'wrap-program 'install-desktop-entry
(lambda* (#:key outputs #:allow-other-keys)
;; Install the '.desktop' file.
@@ -1287,8 +1301,7 @@ in C/C++.")
(("Icon=.*") "Icon=icecat\n")
(("NewWindow") "new-window")
(("NewPrivateWindow") "new-private-window"))
- (install-file desktop-file applications)
- #t)))
+ (install-file desktop-file applications))))
(add-after 'install-desktop-entry 'install-icons
(lambda* (#:key outputs #:allow-other-keys)
(let ((out (assoc-ref outputs "out")))
@@ -1302,14 +1315,15 @@ in C/C++.")
(copy-file file (string-append icons "/icecat.png"))))
'("default16.png" "default22.png" "default24.png"
"default32.png" "default48.png" "content/icon64.png"
- "mozicon128.png" "default256.png"))
- #t)))))))
+ "mozicon128.png" "default256.png")))))))))
(home-page "https://www.gnu.org/software/gnuzilla/")
(synopsis "Entirely free browser derived from Mozilla Firefox")
(description
"IceCat is the GNU version of the Firefox browser. It is entirely free
software, which does not recommend non-free plugins and addons. It also
-features built-in privacy-protecting features.
+features built-in privacy-protecting features. This package also includes the
+@command{geckodriver} command, which can be useful for automated web
+testing.
WARNING: IceCat 91 has not yet been released by the upstream IceCat project.
This is a preview release, and does not currently meet the privacy-respecting
@@ -1470,8 +1484,7 @@ standards of the IceCat project.")
(setenv "MOZ_NOSPAM" "1")
(setenv "MACH_USE_SYSTEM_PYTHON" "1")
(setenv "PYTHON"
- (string-append (assoc-ref inputs "python2")
- "/bin/python"))
+ (search-input-file inputs "/bin/python"))
(setenv "MOZ_BUILD_DATE" ,%icedove-build-id) ; avoid timestamp
(setenv "MOZ_APP_NAME" "icedove")
(setenv "LDFLAGS" (string-append "-Wl,-rpath="
@@ -1574,7 +1587,7 @@ standards of the IceCat project.")
("gtk+" ,gtk+)
("gtk+-2" ,gtk+-2)
("hunspell" ,hunspell)
- ("icu4c" ,icu4c-69)
+ ("icu4c" ,icu4c)
("libcanberra" ,libcanberra)
("libevent" ,libevent)
("libffi" ,libffi)
@@ -1617,7 +1630,7 @@ standards of the IceCat project.")
(sha256
(base32
"00zj1k3c8p66ylf9n7xp42y6kiv3h6hf8ba7bk6f8wj3hh0r2hrd")))))
- ("cargo" ,rust-1.51 "cargo")
+ ("cargo" ,rust "cargo")
("clang" ,clang)
("llvm" ,llvm)
("m4" ,m4)
@@ -1627,7 +1640,7 @@ standards of the IceCat project.")
("pkg-config" ,pkg-config)
("python" ,python)
("python2" ,python-2.7)
- ("rust" ,rust-1.51)
+ ("rust" ,rust)
("rust-cbindgen" ,rust-cbindgen-0.19)
("which" ,which)
("yasm" ,yasm)))
diff --git a/gnu/packages/gobby.scm b/gnu/packages/gobby.scm
index 0e1910d7ce..1ff06e833d 100644
--- a/gnu/packages/gobby.scm
+++ b/gnu/packages/gobby.scm
@@ -3,6 +3,7 @@
;;; Copyright © 2017, 2019 Arun Isaac <arunisaac@systemreboot.net>
;;; Copyright © 2021 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2021 Tobias Geerinckx-Rice <me@tobias.gr>
+;;; Copyright © 2021 Felix Gruber <felgru@posteo.net>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -24,6 +25,7 @@
#:use-module (guix download)
#:use-module (guix utils)
#:use-module ((guix licenses) #:prefix license:)
+ #:use-module (guix build-system glib-or-gtk)
#:use-module (guix build-system gnu)
#:use-module (gnu packages)
#:use-module (gnu packages glib)
@@ -63,7 +65,7 @@
(string-append "gnutls_priority_set_direct"
"(session, \"NORMAL:+ANON-DH\", NULL)"))))))))
(inputs
- `(("libsigc++" ,libsigc++)
+ `(("libsigc++" ,libsigc++-2)
("gnutls" ,gnutls)))
(home-page "https://gobby.github.io/")
(synopsis "Network access framework for IPv4/IPv6")
@@ -90,7 +92,7 @@
(native-inputs
`(("pkg-config" ,pkg-config)))
(inputs
- `(("libsigc++" ,libsigc++)
+ `(("libsigc++" ,libsigc++-2)
("gnutls" ,gnutls)
("libnet6" ,libnet6)))
(home-page "https://gobby.github.io/")
@@ -143,7 +145,7 @@ connect to a server running the old 0.4 protocol.")
(define-public gobby
(package
(name "gobby")
- (version "0.5.0")
+ (version "0.6.0")
(source (origin
(method url-fetch)
(uri (string-append "http://releases.0x539.de/gobby/gobby-"
@@ -151,16 +153,17 @@ connect to a server running the old 0.4 protocol.")
(file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
- "165x0r668ma5blziisvbr8qig3jw9hf7i6w8r7wwvz3wsac3bswc"))))
- (build-system gnu-build-system)
+ "1p2wbnchxy2wdzk19p7bxfpbq5zawa0l500na57jp8jgk3qz7czx"))))
+ (build-system glib-or-gtk-build-system)
(native-inputs
`(("pkg-config" ,pkg-config)
- ("intltool" ,intltool)))
+ ("intltool" ,intltool)
+ ("itstool" ,itstool)))
(inputs
`(("gnutls" ,gnutls)
("gsasl" ,gsasl)
- ("gtkmm-2" ,gtkmm-2)
- ("gtksourceview-2" ,gtksourceview-2)
+ ("gtkmm" ,gtkmm-3)
+ ("gtksourceview" ,gtksourceview-3)
("libinfinity" ,libinfinity)
("libxml++-2" ,libxml++-2)))
(arguments
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index 70731e2720..e54692205d 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -2,7 +2,7 @@
;;; Copyright © 2016, 2017, 2018, 2019, 2020, 2021 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2016 Matthew Jordan <matthewjordandevops@yandex.com>
;;; Copyright © 2016 Andy Wingo <wingo@igalia.com>
-;;; Copyright © 2016, 2019 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2016, 2019, 2021 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2016, 2017 Petter <petter@mykolab.ch>
;;; Copyright © 2016, 2017, 2018, 2019, 2020 Leo Famulari <leo@famulari.name>
;;; Copyright © 2017 Sergei Trofimovich <slyfox@inbox.ru>
@@ -272,7 +272,8 @@ in the style of communicating sequential processes (@dfn{CSP}).")
(lambda* (#:key inputs outputs #:allow-other-keys)
(let* ((gcclib (string-append (assoc-ref inputs "gcc:lib") "/lib"))
(ld (string-append (assoc-ref inputs "libc") "/lib"))
- (loader (car (find-files ld "^ld-linux.+")))
+ (loader (car (append (find-files ld "^ld-linux.+")
+ (find-files ld "^ld(64)?\\.so.+"))))
(net-base (assoc-ref inputs "net-base"))
(tzdata-path
(string-append (assoc-ref inputs "tzdata") "/share/zoneinfo"))
@@ -310,6 +311,11 @@ in the style of communicating sequential processes (@dfn{CSP}).")
(("/bin/pwd") (which "pwd"))
(("/bin/sh") (which "sh")))
+ ;; Backport fix for go-1.14 with GCC 9+
+ ;; https://github.com/golang/go/issues/39157
+ (substitute* "cmd/go/note_test.go"
+ (("cannot find 'ld'") "cannot find [‘']ld[’']"))
+
;; Add libgcc to runpath
(substitute* "cmd/link/internal/ld/lib.go"
(("!rpath.set") "true"))
@@ -404,6 +410,7 @@ in the style of communicating sequential processes (@dfn{CSP}).")
(setenv "GOOS" "linux")
(setenv "GOROOT" (dirname (getcwd)))
(setenv "GOROOT_FINAL" output)
+ (setenv "GOCACHE" "/tmp/go-cache")
(setenv "CGO_ENABLED" "1")
(invoke "sh" "all.bash"))))
(replace 'install
@@ -442,7 +449,9 @@ in the style of communicating sequential processes (@dfn{CSP}).")
(copy-recursively "../" output)
#t)))))))
(native-inputs
- `(("go" ,go-1.4)
+ `(,@(if (member (%current-system) (package-supported-systems go-1.4))
+ `(("go" ,go-1.4))
+ `(("go" ,gccgo-10)))
("go-skip-gc-test.patch" ,(search-patch "go-skip-gc-test.patch"))
,@(match (%current-system)
((or "armhf-linux" "aarch64-linux")
@@ -790,7 +799,13 @@ in the style of communicating sequential processes (@dfn{CSP}).")
(install-file file (string-append out "/share/doc/go")))
'("AUTHORS" "CONTRIBUTORS" "CONTRIBUTING.md" "PATENTS"
"README.md" "SECURITY.md"))))))))
- (inputs (alist-delete "gcc:lib" (package-inputs go-1.16)))))
+ (inputs (alist-delete "gcc:lib" (package-inputs go-1.16)))
+ (native-inputs
+ `(,@(if (not (member (%current-system) (package-supported-systems go-1.4)))
+ ;; gccgo-10.4, 11.3 and lower has a bug which causes bootstrapping
+ ;; to fail. Use go-1.16 until we have a newer version available.
+ (alist-replace "go" (list go-1.16) (package-native-inputs go-1.16))
+ (package-native-inputs go-1.16))))))
(define-public go go-1.14)
diff --git a/gnu/packages/gpodder.scm b/gnu/packages/gpodder.scm
index 07df1da2f2..0c8f1cf50d 100644
--- a/gnu/packages/gpodder.scm
+++ b/gnu/packages/gpodder.scm
@@ -94,9 +94,6 @@
#t)))
(replace 'check
(lambda* (#:key tests? #:allow-other-keys)
- ; The `unittest' target overrides the PYTHONPATH variable.
- (substitute* "makefile"
- (("PYTHONPATH=src/") "PYTHONPATH=${PYTHONPATH}:src/"))
(when tests?
(invoke "make" "unittest"))))
;; 'msgmerge' introduces non-determinism by resetting the
diff --git a/gnu/packages/gps.scm b/gnu/packages/gps.scm
index 9ffa80fc01..dfdb0a5b56 100644
--- a/gnu/packages/gps.scm
+++ b/gnu/packages/gps.scm
@@ -281,7 +281,7 @@ such as elevation, speed, heart rate, power, temperature, and gear shifts.")
":")))
(for-each (lambda (script)
(wrap-program (string-append out "/bin/" script)
- `("PYTHONPATH" ":" prefix (,pythonpath))))
+ `("GUIX_PYTHONPATH" ":" prefix (,pythonpath))))
'("gegps" "gpscat" "gpsfake" "gpsprof"
"ubxtool" "xgps" "xgpsspeed" "zerk"))))))))
(synopsis "GPS service daemon")
diff --git a/gnu/packages/graphics.scm b/gnu/packages/graphics.scm
index aa026c60e3..99b4010e76 100644
--- a/gnu/packages/graphics.scm
+++ b/gnu/packages/graphics.scm
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2015, 2016 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2015, 2016, 2021 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2015 Tomáš Čech <sleep_walker@gnu.org>
;;; Copyright © 2016, 2019 Leo Famulari <leo@famulari.name>
;;; Copyright © 2016, 2017, 2019 Ricardo Wurmus <rekado@elephly.net>
@@ -21,7 +21,7 @@
;;; Copyright © 2020 Jakub Kądziołka <kuba@kadziolka.net>
;;; Copyright © 2020, 2021 Nicolas Goaziou <mail@nicolasgoaziou.fr>
;;; Copyright © 2020 Raghav Gururajan <raghavgururajan@disroot.org>
-;;; Copyright © 2020 Maxim Cournoyer <maxim.cournoyer@gmail.com>
+;;; Copyright © 2020, 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;; Copyright © 2020 Gabriel Arazas <foo.dogsquared@gmail.com>
;;; Copyright © 2021 Antoine Côté <antoine.cote@posteo.net>
;;; Copyright © 2021 Andy Tai <atai@atai.org>
@@ -119,85 +119,6 @@
#:use-module (guix packages)
#:use-module (guix utils))
-(define-public eglexternalplatform
- (package
- (name "eglexternalplatform")
- (version "1.1")
- (source
- (origin
- (method git-fetch)
- (uri
- (git-reference
- (url "https://github.com/NVIDIA/eglexternalplatform")
- (commit version)))
- (file-name
- (git-file-name name version))
- (sha256
- (base32 "0lr5s2xa1zn220ghmbsiwgmx77l156wk54c7hybia0xpr9yr2nhb"))))
- (build-system copy-build-system)
- (arguments
- `(#:phases
- (modify-phases %standard-phases
- (add-after 'unpack 'patch-pkgconfig
- (lambda* (#:key outputs #:allow-other-keys)
- (substitute* "eglexternalplatform.pc"
- (("/usr")
- (assoc-ref outputs "out")))
- #t))
- (add-after 'install 'revise
- (lambda* (#:key outputs #:allow-other-keys)
- (let* ((out (assoc-ref outputs "out")))
- (mkdir-p (string-append out "/include/EGL"))
- (rename-file
- (string-append out "/interface")
- (string-append out "/include/EGL"))
- (mkdir-p (string-append out "/share/pkgconfig"))
- (rename-file
- (string-append out "/eglexternalplatform.pc")
- (string-append out "/share/pkgconfig/eglexternalplatform.pc"))
- (for-each delete-file-recursively
- (list
- (string-append out "/samples")
- (string-append out "/COPYING")
- (string-append out "/README.md"))))
- #t)))))
- (synopsis "EGL External Platform interface")
- (description "EGLExternalPlatform is an specification of the EGL External
-Platform interface for writing EGL platforms and their interactions with modern
-window systems on top of existing low-level EGL platform implementations. This
-keeps window system implementation specifics out of EGL drivers by using
-application-facing EGL functions.")
- (home-page "https://github.com/NVIDIA/eglexternalplatform")
- (license license:expat)))
-
-(define-public egl-wayland
- (package
- (name "egl-wayland")
- (version "1.1.7")
- (source
- (origin
- (method git-fetch)
- (uri (git-reference
- (url "https://github.com/NVIDIA/egl-wayland")
- (commit version)))
- (file-name (git-file-name name version))
- (sha256
- (base32 "0xcx1132zwyp4qps074m72ngjlfmysi1jc2d0lp1ml1r9bllkam6"))))
- (build-system meson-build-system)
- (native-inputs
- `(("pkg-config" ,pkg-config)))
- (inputs
- `(("mesa" ,mesa)
- ("wayland" ,wayland)))
- (propagated-inputs
- `(("eglexternalplatform" ,eglexternalplatform)))
- (synopsis "EGLStream-based Wayland external platform")
- (description "EGL-Wayland is an implementation of a EGL External Platform
-library to add client-side Wayland support to EGL on top of EGLDevice and
-EGLStream families of extensions.")
- (home-page "https://github.com/NVIDIA/egl-wayland")
- (license license:expat)))
-
(define-public mmm
(package
(name "mmm")
@@ -487,7 +408,7 @@ applications.")
`(("boost" ,boost)
("c-blosc" ,c-blosc)
("ilmbase" ,ilmbase)
- ("tbb" ,tbb)
+ ("tbb" ,tbb-2020)
("zlib" ,zlib)))
(native-inputs
`(("pkg-config" ,pkg-config)))
@@ -503,14 +424,14 @@ typically encountered in feature film production.")
(define-public blender
(package
(name "blender")
- (version "2.92.0")
+ (version "2.93.6")
(source (origin
(method url-fetch)
(uri (string-append "https://download.blender.org/source/"
"blender-" version ".tar.xz"))
(sha256
(base32
- "15a5vffn18a920286x0avbc2rap56k6y531wgibq68r90g2cz4g7"))))
+ "19i84bh8jiamf38fj9p24q8w8fhg3hhl49940dh74h4flyfyqfg7"))))
(build-system cmake-build-system)
(arguments
(let ((python-version (version-major+minor (package-version python))))
@@ -553,14 +474,19 @@ typically encountered in feature film production.")
#t))
(add-after 'set-paths 'add-ilmbase-include-path
(lambda* (#:key inputs #:allow-other-keys)
- ;; OpenEXR propagates ilmbase, but its include files do not appear
- ;; in the CPATH, so we need to add "$ilmbase/include/OpenEXR/" to
- ;; the CPATH to satisfy the dependency on "half.h".
- (setenv "CPATH"
- (string-append (assoc-ref inputs "ilmbase")
- "/include/OpenEXR"
- ":" (or (getenv "CPATH") "")))
- #t))))))
+ ;; OpenEXR propagates ilmbase, but its include files do not
+ ;; appear in the C_INCLUDE_PATH, so we need to add
+ ;; "$ilmbase/include/OpenEXR/" to the C_INCLUDE_PATH to satisfy
+ ;; the dependency on "half.h" and "Iex.h".
+ (let ((headers (string-append
+ (assoc-ref inputs "ilmbase")
+ "/include/OpenEXR")))
+ (setenv "C_INCLUDE_PATH"
+ (string-append headers ":"
+ (or (getenv "C_INCLUDE_PATH") "")))
+ (setenv "CPLUS_INCLUDE_PATH"
+ (string-append headers ":"
+ (or (getenv "CPLUS_INCLUDE_PATH") ""))))))))))
(inputs
`(("boost" ,boost)
("jemalloc" ,jemalloc)
@@ -587,7 +513,7 @@ typically encountered in feature film production.")
("python" ,python)
("python-numpy" ,python-numpy)
("openvdb" ,openvdb)
- ("tbb" ,tbb)
+ ("tbb" ,tbb-2020)
("zlib" ,zlib)
("embree" ,embree)))
(home-page "https://blender.org/")
@@ -659,10 +585,9 @@ application can be customized via its API for Python scripting.")
;; in the CPATH, so we need to add "$ilmbase/include/OpenEXR/" to
;; the CPATH to satisfy the dependency on "half.h".
(setenv "CPATH"
- (string-append (assoc-ref inputs "ilmbase")
- "/include/OpenEXR"
- ":" (or (getenv "CPATH") "")))
- #t))))))
+ (string-append
+ (search-input-directory inputs "include/OpenEXR")
+ ":" (or (getenv "CPATH") "")))))))))
(inputs
`(("boost" ,boost)
("jemalloc" ,jemalloc)
@@ -851,79 +776,73 @@ exception-handling library.")
(license license:bsd-3)))
(define-public lib2geom
- ;; Use the latest master commit, as the 1.0 release suffer build problems.
- (let ((revision "4")
- (commit "b29d60e49a58f4e8069544b44863b1a623e4ee59"))
- (package
- (name "lib2geom")
- (version (git-version "1.0" revision commit))
- (source (origin
- (method git-fetch)
- (uri (git-reference
- (url "https://gitlab.com/inkscape/lib2geom.git")
- (commit commit)))
- (file-name (git-file-name name version))
- (sha256
- (base32
- "0xd8f3cgfnipdav4w8j54r7hzy9f3m7xk42ppcfhdjz2hriggyk6"))
- (patches
- ;; Patch submitted to upstream (see:
- ;; https://gitlab.com/inkscape/lib2geom/-/merge_requests/32).
- (search-patches "lib2geom-fix-tests.patch"))
- (modules '((guix build utils)))
- (snippet
- '(begin
- ;; Fix py2geom module initialization (see:
- ;; https://gitlab.com/inkscape/lib2geom/merge_requests/18).
- (substitute* "src/py2geom/__init__.py"
- (("_py2geom") "py2geom._py2geom"))
- #t))))
- (build-system cmake-build-system)
- (arguments
- `(#:imported-modules ((guix build python-build-system)
- ,@%cmake-build-system-modules)
- #:configure-flags '("-D2GEOM_BUILD_SHARED=ON"
- "-D2GEOM_BOOST_PYTHON=ON"
- ;; Compiling the Cython bindings fail (see:
- ;; https://gitlab.com/inkscape/lib2geom/issues/21).
- "-D2GEOM_CYTHON_BINDINGS=OFF")
- #:phases
- (modify-phases %standard-phases
- (add-after 'unpack 'patch-python-lib-install-path
- (lambda* (#:key inputs outputs #:allow-other-keys)
- (let* ((python-version (@ (guix build python-build-system)
- python-version))
- (python-maj-min-version (python-version
- (assoc-ref inputs "python")))
- (site-package (string-append
- (assoc-ref outputs "out")
- "/lib/python" python-maj-min-version
- "/site-packages")))
- (substitute* '("src/cython/CMakeLists.txt"
- "src/py2geom/CMakeLists.txt")
- (("PYTHON_LIB_INSTALL \"[^\"]*\"")
- (format #f "PYTHON_LIB_INSTALL ~s" site-package))))
- #t)))))
- (native-inputs `(("python" ,python-wrapper)
- ("googletest" ,googletest)
- ("pkg-config" ,pkg-config)))
- (inputs `(("cairo" ,cairo)
- ("pycairo" ,python-pycairo)
- ("double-conversion" ,double-conversion)
- ("glib" ,glib)
- ("gsl" ,gsl)))
- (propagated-inputs
- `(("boost" ,boost))) ;referred to in 2geom/pathvector.h.
- (home-page "https://gitlab.com/inkscape/lib2geom/")
- (synopsis "C++ 2D graphics library")
- (description "2geom is a C++ library of mathematics for paths, curves,
+ (package
+ (name "lib2geom")
+ (version "1.1")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://gitlab.com/inkscape/lib2geom.git")
+ (commit version)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "03bx9k1m4bfhmx0ldsg0bks6i8h7fmvl5vbg6gmpq0bk0nkmpnmv"))))
+ (build-system cmake-build-system)
+ (arguments
+ `(#:imported-modules ((guix build python-build-system)
+ ,@%cmake-build-system-modules)
+ #:configure-flags '("-D2GEOM_BUILD_SHARED=ON"
+ "-D2GEOM_BOOST_PYTHON=ON"
+ ;; Compiling the Cython bindings fail (see:
+ ;; https://gitlab.com/inkscape/lib2geom/issues/21).
+ "-D2GEOM_CYTHON_BINDINGS=OFF")
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'patch-python-lib-install-path
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (let* ((python-version (@ (guix build python-build-system)
+ python-version))
+ (python-maj-min-version (python-version
+ (assoc-ref inputs "python")))
+ (site-package (string-append
+ (assoc-ref outputs "out")
+ "/lib/python" python-maj-min-version
+ "/site-packages")))
+ (substitute* '("src/cython/CMakeLists.txt"
+ "src/py2geom/CMakeLists.txt")
+ (("PYTHON_LIB_INSTALL \"[^\"]*\"")
+ (format #f "PYTHON_LIB_INSTALL ~s" site-package))))))
+ ,@(if (target-x86-32?)
+ `((add-after 'unpack 'skip-faulty-test
+ (lambda _
+ ;; This test fails on i686 when comparing floating point
+ ;; values, probably due to excess precision. However,
+ ;; '-fexcess-precision' is not implemented for C++ in
+ ;; GCC 10 so just skip it.
+ (substitute* "tests/CMakeLists.txt"
+ (("bezier-test") "")))))
+ '()))))
+ (native-inputs `(("python" ,python-wrapper)
+ ("googletest" ,googletest)
+ ("pkg-config" ,pkg-config)))
+ (inputs `(("cairo" ,cairo)
+ ("pycairo" ,python-pycairo)
+ ("double-conversion" ,double-conversion)
+ ("glib" ,glib)
+ ("gsl" ,gsl)))
+ (propagated-inputs
+ `(("boost" ,boost))) ;referred to in 2geom/pathvector.h.
+ (home-page "https://gitlab.com/inkscape/lib2geom/")
+ (synopsis "C++ 2D graphics library")
+ (description "2geom is a C++ library of mathematics for paths, curves,
and other geometric calculations. Designed for vector graphics, it tackles
Bézier curves, conic sections, paths, intersections, transformations, and
basic geometries.")
- ;; Because the library is linked with the GNU Scientific Library
- ;; (GPLv3+), the combined work must be licensed as GPLv3+ (see:
- ;; https://gitlab.com/inkscape/inkscape/issues/784).
- (license license:gpl3+))))
+ ;; Because the library is linked with the GNU Scientific Library
+ ;; (GPLv3+), the combined work must be licensed as GPLv3+ (see:
+ ;; https://gitlab.com/inkscape/inkscape/issues/784).
+ (license license:gpl3+)))
(define-public pstoedit
(package
@@ -1196,7 +1115,7 @@ with strong support for multi-part, multi-channel use cases.")
(define-public openimageio
(package
(name "openimageio")
- (version "2.2.10.1")
+ (version "2.2.11.1")
(source (origin
(method git-fetch)
(uri (git-reference
@@ -1205,7 +1124,7 @@ with strong support for multi-part, multi-channel use cases.")
(file-name (git-file-name name version))
(sha256
(base32
- "0wzh5n527l7ia1754cf9xmbvv4ya6hj34dy6cbq9xk9372h8gd9q"))))
+ "1i9r6vgz15aj1yzbf5a9lqhlyakjs793yrw5gw720l84lcyigad7"))))
(build-system cmake-build-system)
;; FIXME: To run all tests successfully, test image sets from multiple
;; third party sources have to be present. For details see
@@ -1218,6 +1137,7 @@ with strong support for multi-part, multi-channel use cases.")
(inputs
`(("boost" ,boost)
("fmt" ,fmt)
+ ("libheif" ,libheif)
("libpng" ,libpng)
("libjpeg" ,libjpeg-turbo)
("libtiff" ,libtiff)
@@ -1619,7 +1539,8 @@ and understanding different BRDFs (and other component functions).")
version ".tar.gz")))
(sha256
(base32 "07wii4i824vy9qsvjsgqxppgqmfdxq0xa87i5yk53fijriadq7mb"))
- (patches (search-patches "agg-am_c_prototype.patch"))))
+ (patches (search-patches "agg-am_c_prototype.patch"
+ "agg-2.5-gcc8.patch"))))
(build-system gnu-build-system)
(arguments
'(#:configure-flags
@@ -1788,8 +1709,7 @@ requirements.")
(add-before 'check 'start-xorg-server
(lambda* (#:key inputs #:allow-other-keys)
;; The test suite requires a running X server.
- (system (string-append (assoc-ref inputs "xorg-server")
- "/bin/Xvfb :1 &"))
+ (system "Xvfb :1 &")
(setenv "DISPLAY" ":1")
#t)))))
(native-inputs
diff --git a/gnu/packages/graphviz.scm b/gnu/packages/graphviz.scm
index 6d3bb292ac..19a777fec9 100644
--- a/gnu/packages/graphviz.scm
+++ b/gnu/packages/graphviz.scm
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2013, 2015 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2013, 2015, 2021 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2015, 2020 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2016 Theodoros Foradis <theodoros@foradis.org>
;;; Copyright © 2017, 2018, 2019 Ricardo Wurmus <rekado@elephly.net>
@@ -34,6 +34,7 @@
#:use-module (guix download)
#:use-module (guix git-download)
#:use-module (guix utils)
+ #:use-module (guix gexp)
#:use-module (gnu packages)
#:use-module (gnu packages autotools)
#:use-module (gnu packages bison)
@@ -50,6 +51,7 @@
#:use-module (gnu packages perl)
#:use-module (gnu packages pkg-config)
#:use-module (gnu packages python)
+ #:use-module (gnu packages python-build)
#:use-module (gnu packages python-check)
#:use-module (gnu packages python-xyz)
#:use-module (gnu packages sphinx)
@@ -63,48 +65,48 @@
(define-public graphviz
(package
(name "graphviz")
- (replacement graphviz/fixed)
- (version "2.42.3")
+ (version "2.49.0")
(source (origin
(method url-fetch)
- (uri (string-append
- "https://www2.graphviz.org/Packages/stable/portable_source/"
- "graphviz-" version ".tar.gz"))
+ (uri (string-append "https://gitlab.com/api/v4/projects/4207231"
+ "/packages/generic/graphviz-releases/"
+ version "/graphviz-" version ".tar.xz"))
(sha256
(base32
- "1pbswjbx3fjdlsxcm7cmlsl5bvaa3d6gcnr0cr8x3c8pag13zbwg"))))
+ "042s6mbi681pwgffqww2ap780230nrsrfpfiz9a41dcjb5a0m524"))))
(build-system gnu-build-system)
(arguments
;; FIXME: rtest/rtest.sh is a ksh script (!). Add ksh as an input.
- '(#:tests? #f
- #:phases
- (modify-phases %standard-phases
- (add-after 'install 'move-docs
- (lambda* (#:key outputs #:allow-other-keys)
- (let ((out (assoc-ref outputs "out"))
- (doc (assoc-ref outputs "doc")))
- (mkdir-p (string-append doc "/share/graphviz"))
- (rename-file (string-append out "/share/graphviz/doc")
- (string-append doc "/share/graphviz/doc"))
- #t)))
- (add-after 'move-docs 'move-guile-bindings
- (lambda* (#:key outputs #:allow-other-keys)
- (let* ((out (assoc-ref outputs "out"))
- (lib (string-append out "/lib"))
- (extdir (string-append lib
- "/guile/2.0/extensions")))
- (mkdir-p extdir)
- (rename-file (string-append
- lib "/graphviz/guile/libgv_guile.so")
- (string-append extdir
- "/libgv_guile.so"))
- #t))))))
+ (list #:tests? #f
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'install 'move-docs
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let ((out (assoc-ref outputs "out"))
+ (doc (assoc-ref outputs "doc")))
+ (mkdir-p (string-append doc "/share/graphviz"))
+ (rename-file (string-append out "/share/graphviz/doc")
+ (string-append doc "/share/graphviz/doc")))))
+ (add-after 'move-docs 'move-guile-bindings
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (lib (string-append out "/lib"))
+ (extdir (string-append lib "/guile/"
+ #$(version-major+minor
+ (package-version
+ (this-package-input "guile")))
+ "/extensions")))
+ (mkdir-p extdir)
+ (rename-file (string-append
+ lib "/graphviz/guile/libgv_guile.so")
+ (string-append extdir
+ "/libgv_guile.so"))))))))
(inputs
`(("libXrender" ,libxrender)
("libX11" ,libx11)
("gts" ,gts)
- ("gd" ,gd) ; FIXME: Our GD is too old
- ("guile" ,guile-2.0) ;Guile bindings
+ ("gd" ,gd)
+ ("guile" ,guile-3.0) ;Guile bindings
("pango" ,pango)
("fontconfig" ,fontconfig)
("freetype" ,freetype)
@@ -128,15 +130,6 @@ software engineering, database and web design, machine learning, and in visual
interfaces for other technical domains.")
(license license:epl1.0)))
-(define-public graphviz/fixed
- (hidden-package
- (package
- (inherit graphviz)
- (source (origin
- (inherit (package-source graphviz))
- (patches (append (search-patches "graphviz-CVE-2020-18032.patch")
- (origin-patches (package-source graphviz)))))))))
-
;; Older Graphviz needed for pygraphviz. See
;; https://github.com/pygraphviz/pygraphviz/issues/175
(define-public graphviz-2.38
@@ -159,19 +152,20 @@ interfaces for other technical domains.")
(arguments
(substitute-keyword-arguments (package-arguments graphviz)
((#:phases phases)
- `(modify-phases ,phases
- (add-after 'unpack 'prepare-bootstrap
- (lambda _
- (substitute* "autogen.sh"
- (("/bin/sh") (which "sh"))
- (("\\$GRAPHVIZ_VERSION_DATE") "0"))
- (setenv "CONFIG_SHELL" (which "sh"))
- (setenv "SHELL" (which "sh"))
+ #~(modify-phases #$phases
+ (add-after 'unpack 'prepare-bootstrap
+ (lambda _
+ (substitute* "autogen.sh"
+ (("/bin/sh") (which "sh"))
+ (("\\$GRAPHVIZ_VERSION_DATE") "0"))
+ (setenv "CONFIG_SHELL" (which "sh"))
+ (setenv "SHELL" (which "sh"))
- (map make-file-writable (find-files "." ".*"))
- #t))
- (replace 'bootstrap
- (lambda _ (invoke (which "sh") "autogen.sh" "NOCONFIG") #t))))))
+ (map make-file-writable (find-files "." ".*"))
+ #t))
+ (replace 'bootstrap
+ (lambda _
+ (invoke (which "sh") "autogen.sh" "NOCONFIG") #t))))))
(native-inputs
`(("autoconf" ,autoconf)
("automake" ,automake)
@@ -222,7 +216,7 @@ visualization tool suite.")
(define-public python-pygraphviz
(package
(name "python-pygraphviz")
- (version "1.5")
+ (version "1.7")
(source
(origin
(method git-fetch)
@@ -232,18 +226,14 @@ visualization tool suite.")
(file-name (string-append "pygraphviz-" version "-checkout"))
(sha256
(base32
- "1yldym38m8ckgflln83i88143pd9fjj1vfp23sq39fs6np5g0nzp"))))
+ "0jqc3dzy9n0hn3b99zq8jp53901zpjzvvi5ns5mbaxg8kdrb1lfx"))))
(build-system python-build-system)
- (arguments
- `(#:configure-flags
- (let ((graphviz (assoc-ref %build-inputs "graphviz")))
- (list (string-append "--include-path=" graphviz "/include")
- (string-append "--library-path=" graphviz "/lib")))))
(inputs
- `(("graphviz" ,graphviz-2.38)))
+ `(("graphviz" ,graphviz)))
(native-inputs
`(("python-nose" ,python-nose)
("python-mock" ,python-mock)
+ ("python-pytest" ,python-pytest)
("python-doctest-ignore-unicode" ,python-doctest-ignore-unicode)))
(home-page "https://pygraphviz.github.io")
(synopsis "Python interface to Graphviz")
@@ -253,9 +243,6 @@ write, and draw graphs using Python to access the Graphviz graph data
structure and layout algorithms.")
(license license:bsd-3)))
-(define-public python2-pygraphviz
- (package-with-python2 python-pygraphviz))
-
(define-public python-uqbar
(package
(name "python-uqbar")
@@ -368,11 +355,10 @@ Graphviz and LaTeX.")
":" (assoc-ref inputs "gdk-pixbuf") "/lib/girepository-1.0"
":" (assoc-ref inputs "atk") "/lib/girepository-1.0")))
`("PATH" ":" prefix
- (,(string-append (assoc-ref inputs "graphviz") "/bin"))))
- #t)))))
+ (,(dirname (search-input-file inputs "bin/dot"))))))))))
(inputs
`(("atk" ,atk)
- ("gdk-pixbuf" ,gdk-pixbuf+svg)
+ ("librsvg" ,librsvg)
("graphviz" ,graphviz)
("gtk+" ,gtk+)
("python-pycairo" ,python-pycairo)
diff --git a/gnu/packages/groovy.scm b/gnu/packages/groovy.scm
index 382dfe7faf..ecbd0cb0bd 100644
--- a/gnu/packages/groovy.scm
+++ b/gnu/packages/groovy.scm
@@ -827,7 +827,7 @@ and modify groovy's @dfn{Abstract Syntax Tree} (AST)."))))
"java-jansi" "java-jline-2"))
;; antlr.jar is present twice in antlr2. Symlink doesn't like
;; it, so we symlink it here.
- (symlink (string-append (assoc-ref inputs "antlr2") "/lib/antlr.jar")
+ (symlink (search-input-file inputs "/lib/antlr.jar")
(string-append out-lib "/antlr.jar"))
(for-each
(lambda (tool)
diff --git a/gnu/packages/gstreamer.scm b/gnu/packages/gstreamer.scm
index 2927055240..7ea5f19a8d 100644
--- a/gnu/packages/gstreamer.scm
+++ b/gnu/packages/gstreamer.scm
@@ -37,9 +37,11 @@
#:use-module (guix build-system trivial)
#:use-module (guix utils)
#:use-module (gnu packages)
+ #:use-module (gnu packages aidc)
#:use-module (gnu packages audio)
#:use-module (gnu packages autotools)
#:use-module (gnu packages base)
+ #:use-module (gnu packages bash)
#:use-module (gnu packages bison)
#:use-module (gnu packages cdrom)
#:use-module (gnu packages curl)
@@ -49,6 +51,7 @@
#:use-module (gnu packages flex)
#:use-module (gnu packages freedesktop)
#:use-module (gnu packages gettext)
+ #:use-module (gnu packages ghostscript)
#:use-module (gnu packages gl)
#:use-module (gnu packages glib)
#:use-module (gnu packages gnome)
@@ -57,16 +60,22 @@
#:use-module (gnu packages graphviz)
#:use-module (gnu packages gtk)
#:use-module (gnu packages image)
+ #:use-module (gnu packages image-processing)
#:use-module (gnu packages iso-codes)
#:use-module (gnu packages java)
#:use-module (gnu packages libunwind)
#:use-module (gnu packages libusb)
#:use-module (gnu packages linux)
+ #:use-module (gnu packages maths)
#:use-module (gnu packages mp3)
+ #:use-module (gnu packages multiprecision)
+ #:use-module (gnu packages music)
#:use-module (gnu packages ncurses)
+ #:use-module (gnu packages nettle)
#:use-module (gnu packages networking)
#:use-module (gnu packages ocr)
#:use-module (gnu packages perl)
+ #:use-module (gnu packages photo)
#:use-module (gnu packages pulseaudio)
#:use-module (gnu packages qt)
#:use-module (gnu packages rdf)
@@ -84,6 +93,8 @@
#:use-module (gnu packages telephony)
#:use-module (gnu packages tls)
#:use-module (gnu packages version-control)
+ #:use-module (gnu packages vulkan)
+ #:use-module (gnu packages webkit)
#:use-module (gnu packages assembly)
#:use-module (gnu packages xml))
@@ -300,7 +311,7 @@ applications that want audio visualisation and audio visualisation plugins.")
(inputs
`(("alsa-lib" ,alsa-lib)
("esound" ,esound)
- ("gdk-pixbuf" ,gdk-pixbuf+svg)
+ ("librsvg" ,librsvg)
("gtk+" ,gtk+-2)
("jack" ,jack-2)
("libx11" ,libx11)
@@ -398,7 +409,7 @@ arrays of data.")
(define-public gstreamer-docs
(package
(name "gstreamer-docs")
- (version "1.18.2")
+ (version "1.18.5")
(source (origin
(method url-fetch)
(uri (string-append
@@ -406,7 +417,7 @@ arrays of data.")
"/gstreamer-docs-" version ".tar.xz"))
(sha256
(base32
- "07hrgn11ll16yahyyh5684k8ms1j9npsyb8lj0skwbapin4czshm"))))
+ "1xvqrqv1zxqdpvd02dvr0xspk30c8b940vvnr9x75a08nx0x75xh"))))
(build-system trivial-build-system)
(arguments
`(#:modules ((guix build utils))
@@ -424,8 +435,7 @@ arrays of data.")
(invoke (string-append tar "/bin/tar") "-xvf" source
"--strip-components=3"
(string-append ,name "-" ,version
- "/devhelp/books/GStreamer")))
- #t))))
+ "/devhelp/books/GStreamer")))))))
(native-inputs
`(("tar" ,tar)
("xz" ,xz)))
@@ -455,22 +465,21 @@ the GStreamer multimedia framework.")
(("'CK_DEFAULT_TIMEOUT', '[0-9]*'")
"'CK_DEFAULT_TIMEOUT', '600'")
(("timeout ?: .*\\)")
- "timeout: 90 * 60)"))
- #t))))
+ "timeout: 90 * 60)"))))))
(define-public gstreamer
(package
(name "gstreamer")
- (version "1.18.2")
+ (version "1.18.5")
(source
(origin
- (method url-fetch)
- (uri (string-append
- "https://gstreamer.freedesktop.org/src/gstreamer/gstreamer-"
- version ".tar.xz"))
- (sha256
- (base32
- "0ijlmvr660m8zn09xlmnq1ajrziqsivp2hig5a9mabhcjx7ypkb6"))))
+ (method url-fetch)
+ (uri (string-append
+ "https://gstreamer.freedesktop.org/src/gstreamer/gstreamer-"
+ version ".tar.xz"))
+ (sha256
+ (base32
+ "02p8my6dzmm4rvd93s3qnh8w5bm9bh4f7gdydbsvnn9llqr251jm"))))
(build-system meson-build-system)
(arguments
`(#:phases
@@ -487,24 +496,44 @@ the GStreamer multimedia framework.")
(("tcase_add_test \\(tc_chain, test_stress_cleanup_unschedule.*")
"")
(("tcase_add_test \\(tc_chain, test_stress_reschedule.*")
- ""))
- #t)))
- '()))))
- (propagated-inputs `(("glib" ,glib))) ; required by gstreamer-1.0.pc.
+ "")))))
+ '())
+ (add-after 'unpack 'disable-problematic-tests
+ (lambda _
+ ;; Disable the 'pipelines-seek' test, which appears to be load
+ ;; sensitive (see:
+ ;; https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/854).
+ (substitute* "tests/check/meson.build"
+ ((".*'pipelines/seek.c'.*")
+ "")))))))
+ (propagated-inputs
+ ;; In gstreamer-1.0.pc:
+ ;; Requires: glib-2.0, gobject-2.0
+ ;; Requires.private: gmodule-no-export-2.0 libunwind libdw
+ `(("elfutils" ,elfutils) ; libdw
+ ("glib" ,glib)
+ ("libunwind" ,libunwind)))
(native-inputs
- `(("bison" ,bison)
+ `(("bash-completion" ,bash-completion)
+ ("bison" ,bison)
("flex" ,flex)
+ ("gettext" ,gettext-minimal)
("glib" ,glib "bin")
("gobject-introspection" ,gobject-introspection)
("perl" ,perl)
("pkg-config" ,pkg-config)
("python-wrapper" ,python-wrapper)))
+ (inputs
+ `(("gmp" ,gmp)
+ ("libcap" ,libcap)
+ ;; For tests.
+ ("gsl" ,gsl)))
(native-search-paths
(list (search-path-specification
(variable "GST_PLUGIN_SYSTEM_PATH")
(files '("lib/gstreamer-1.0")))))
(home-page "https://gstreamer.freedesktop.org/")
- (synopsis "Multimedia library")
+ (synopsis "Multimedia framework")
(description
"GStreamer is a library for constructing graphs of media-handling
components. The applications it supports range from simple Ogg/Vorbis
@@ -521,21 +550,22 @@ This package provides the core library and elements.")
(define-public gst-plugins-base
(package
(name "gst-plugins-base")
- (version "1.18.2")
+ (version "1.18.5")
(source
(origin
(method url-fetch)
(uri (string-append "https://gstreamer.freedesktop.org/src/" name "/"
name "-" version ".tar.xz"))
- (patches (search-patches "gst-plugins-base-fix-id3v2-invalid-read.patch"))
(sha256
(base32
- "1b05kg46azrxxvq42c71071lfsnc34pw4vynnkczdqi6g0gzn16x"))))
+ "18vg8kk7p2p8za8zaqg0v7z6898yw5a3b12vvl7xn02pb3s7l2wn"))))
(build-system meson-build-system)
(propagated-inputs
`(("glib" ,glib) ;required by gstreamer-sdp-1.0.pc
("gstreamer" ,gstreamer) ;required by gstreamer-plugins-base-1.0.pc
-
+ ;; wayland-client.h is referred to in
+ ;; include/gstreamer-1.0/gst/gl/wayland/gstgldisplay_wayland.h
+ ("wayland" ,wayland)
;; XXX: Do not enable Orc optimizations on ARM systems because
;; it leads to two test failures.
;; https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/issues/683
@@ -544,6 +574,7 @@ This package provides the core library and elements.")
'()
`(("orc" ,orc))))) ;required by gstreamer-audio-1.0.pc
(inputs
+ ;; TODO: Add libvorbisidec
`(("cdparanoia" ,cdparanoia)
("pango" ,pango)
("libogg" ,libogg)
@@ -554,26 +585,48 @@ This package provides the core library and elements.")
("libXext" ,libxext)
("libxv" ,libxv)
("alsa-lib" ,alsa-lib)
- ;; XXX Don't build with opus on 32-bit systems:
- ;; <https://bugs.gnu.org/32360>
- ,@(if (target-64bit?)
- `(("opus" ,opus))
- '())))
+ ("opus" ,opus)
+ ("graphene" ,graphene)
+ ("iso-codes" ,iso-codes)
+ ("libgudev" ,libgudev)
+ ("libjpeg" ,libjpeg-turbo)
+ ("libpng" ,libpng)
+ ("libvisual" ,libvisual)
+ ("mesa" ,mesa)
+ ("wayland-protocols" ,wayland-protocols)))
(native-inputs
- `(("pkg-config" ,pkg-config)
- ("glib:bin" ,glib "bin")
- ("gobject-introspection" ,gobject-introspection)
- ("python-wrapper" ,python-wrapper)))
+ `(("pkg-config" ,pkg-config)
+ ("glib:bin" ,glib "bin")
+ ("gobject-introspection" ,gobject-introspection)
+ ("python-wrapper" ,python-wrapper)
+ ("gettext" ,gettext-minimal)
+ ("xorg-server" ,xorg-server-for-tests)))
(arguments
- `(#:configure-flags '("-Dgl=disabled")
- #:phases
+ `(#:phases
(modify-phases %standard-phases
,@%common-gstreamer-phases
+ (add-after 'unpack 'disable-problematic-tests
+ (lambda _
+ (substitute* "tests/check/meson.build"
+ ;; This test causes nondeterministic failures (see:
+ ;; https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/issues/950).
+ ((".*'elements/appsrc.c'.*")
+ ""))))
(add-before 'configure 'patch
(lambda _
(substitute* "tests/check/libs/pbutils.c"
- (("/bin/sh") (which "sh")))
- #t)))))
+ (("/bin/sh") (which "sh")))))
+ (add-before 'check 'pre-check
+ (lambda _
+ ;; Tests require a running X server.
+ (system "Xvfb :1 +extension GLX &")
+ (setenv "DISPLAY" ":1")
+ ;; Tests write to $HOME.
+ (setenv "HOME" (getcwd))
+ ;; Tests look for $XDG_RUNTIME_DIR.
+ (setenv "XDG_RUNTIME_DIR" (getcwd))
+ ;; For missing '/etc/machine-id'.
+ (setenv "DBUS_FATAL_WARNINGS" "0"))))))
(home-page "https://gstreamer.freedesktop.org/")
(synopsis
"Plugins for the GStreamer multimedia library")
@@ -584,7 +637,7 @@ for the GStreamer multimedia library.")
(define-public gst-plugins-good
(package
(name "gst-plugins-good")
- (version "1.18.2")
+ (version "1.18.5")
(source
(origin
(method url-fetch)
@@ -592,11 +645,9 @@ for the GStreamer multimedia library.")
(string-append
"https://gstreamer.freedesktop.org/src/" name "/"
name "-" version ".tar.xz"))
- (patches (search-patches "gst-plugins-good-fix-test.patch"
- "gst-plugins-good-CVE-2021-3497.patch"
- "gst-plugins-good-CVE-2021-3498.patch"))
+ (patches (search-patches "gst-plugins-good-fix-test.patch"))
(sha256
- (base32 "1929nhjsvbl4bw37nfagnfsnxz737cm2x3ayz9ayrn9lwkfm45zp"))))
+ (base32 "0svrapawych2s3lm4lx3x023zxq5kcx50jnfmh0qigszfskyxbis"))))
(build-system meson-build-system)
(arguments
`(#:glib-or-gtk? #t ; To wrap binaries and/or compile schemas
@@ -630,7 +681,7 @@ for the GStreamer multimedia library.")
("bzip2" ,bzip2)
("cairo" ,cairo)
("flac" ,flac)
- ("gdk-pixbuf" ,gdk-pixbuf+svg)
+ ("librsvg" ,(librsvg-for-system))
("glib" ,glib)
("glib-networking" ,glib-networking)
("glu" ,glu)
@@ -677,15 +728,14 @@ model to base your own plug-in on, here it is.")
(define-public gst-plugins-bad
(package
(name "gst-plugins-bad")
- (version "1.18.2")
+ (version "1.18.5")
(source (origin
(method url-fetch)
(uri (string-append "https://gstreamer.freedesktop.org/src/"
name "/" name "-" version ".tar.xz"))
- (patches (search-patches "gst-plugins-bad-fix-overflow.patch"))
(sha256
(base32
- "06ildd4rl6cynirv3p00d2ddf5is9svj4i7mkahldzhq24pq5mca"))
+ "13k7mm2wmsbhd04a20v9lj4afpf0w33ambpwlrw8bl7hjhxr4r51"))
(modules '((guix build utils)))
(snippet
'(begin
@@ -694,6 +744,7 @@ model to base your own plug-in on, here it is.")
(build-system meson-build-system)
(arguments
`(#:configure-flags '("-Dsctp-internal-usrsctp=disabled")
+ #:glib-or-gtk? #t ; To wrap binaries and/or compile schemas
#:phases
(modify-phases %standard-phases
,@%common-gstreamer-phases
@@ -705,8 +756,7 @@ model to base your own plug-in on, here it is.")
(lambda _
(substitute* "tests/check/meson.build"
(("\\[\\['elements/asfmux\\.c'\\]\\],")
- ""))
- #t)))
+ "")))))
'())
(add-after 'unpack 'adjust-tests
(lambda* (#:key native-inputs inputs #:allow-other-keys)
@@ -719,6 +769,15 @@ model to base your own plug-in on, here it is.")
(string-append "'GST_PLUGIN_SYSTEM_PATH_1_0', '"
gst-plugins-good "/lib/gstreamer-1.0'"))
+ ;; https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/issues/1136
+ ((".*elements/msdkh264enc\\.c.*") "")
+ ((".*elements/svthevcenc\\.c.*") "")
+
+ ;; The 'elements_shm.test_shm_live' test sometimes times out
+ ;; (see:
+ ;; https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/790).
+ ((".*'elements/shm\\.c'.*") "")
+
;; FIXME: Why is this failing.
((".*elements/dash_mpd\\.c.*") "")
@@ -727,61 +786,134 @@ model to base your own plug-in on, here it is.")
((".*elements/curlhttpsrc\\.c.*") "")
;; https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/issues/1412
((".*elements/dtls\\.c.*") ""))
- #t))))))
+ (substitute* "tests/check/elements/zxing.c"
+ ;; zxing 1.2.0 seemingly changed the type representation of
+ ;; the EAN_13 structure; disable it.
+ ((".*\"EAN_13\".*")
+ "")))))
+ (add-before 'check 'pre-check
+ (lambda _
+ ;; Tests require a running X server.
+ (system "Xvfb :1 +extension GLX &")
+ (setenv "DISPLAY" ":1")
+ ;; Tests write to $HOME.
+ (setenv "HOME" (getcwd))
+ ;; Tests look for $XDG_RUNTIME_DIR.
+ (setenv "XDG_RUNTIME_DIR" (getcwd))
+ ;; For missing '/etc/machine-id'.
+ (setenv "DBUS_FATAL_WARNINGS" "0"))))))
(propagated-inputs
- `(("gst-plugins-base" ,gst-plugins-base)))
+ `(("gstreamer" ,gstreamer)
+ ("gst-plugins-base" ,gst-plugins-base)))
(native-inputs
- `(("glib:bin" ,glib "bin") ; for glib-mkenums, etc.
+ `(("gettext" ,gettext-minimal)
+ ("glib:bin" ,glib "bin") ; for glib-mkenums, etc.
("gobject-introspection" ,gobject-introspection)
+ ("gsettings-desktop-schemas" ,gsettings-desktop-schemas)
("gst-plugins-good" ,gst-plugins-good) ;for tests
+ ("perl" ,perl)
("pkg-config" ,pkg-config)
- ("python" ,python)))
+ ("python" ,python-wrapper)
+ ("xorg-server" ,xorg-server-for-tests)))
(inputs
- ;; XXX: The following dependencies are missing:
- ;; vo-amrwbenc, vo-aacenc, bs2b, chromaprint, directfb, daala, libdts,
- ;; faac, flite, libgsm, libde265, libmms, libmimic, mjpegtools,
- ;; mpeg2enc, libofa, opencv, openh264, openni2, libtimemmgr, wildmidi,
- ;; openspc, gme, sbc, schroedinger, zbar, librtmp, spandsp
`(("bluez" ,bluez)
+ ("bzip2" ,bzip2)
+ ("cairo" ,cairo)
+ ;; ("ccextractor" ,ccextractor)
+ ("chromaprint" ,chromaprint)
("curl" ,curl)
+ ("directfb" ,directfb)
+ ;;("dssim" ,dssim)
+ ("faac" ,faac)
("faad2" ,faad2)
+ ("flite" ,flite)
("fluidsynth" ,fluidsynth)
+ ("glib" ,glib)
+ ("glib-networking" ,glib-networking)
+ ("glu" ,glu)
+ ("gsm" ,gsm)
("gtk+" ,gtk+)
+ ("iqa" ,iqa)
("ladspa" ,ladspa)
+ ("lcms" ,lcms)
+ ("libaom" ,libaom)
("libass" ,libass)
+ ("libbs2b" ,libbs2b)
+ ("libdc1394" ,libdc1394)
+ ("libdca" ,libdca)
+ ("libde265" ,libde265)
+ ("libdrm" ,libdrm)
("libdvdnav" ,libdvdnav)
("libdvdread" ,libdvdread)
+ ("libexif" ,libexif)
+ ("libfdk" ,libfdk)
("libgcrypt" ,libgcrypt)
+ ("libgme" ,libgme)
("libgudev" ,libgudev)
("libkate" ,libkate)
+ ("libmfx" ,mediasdk)
+ ("libmms" ,libmms)
("libmodplug" ,libmodplug)
+ ("libmpcdec" ,libmpcdec)
("libnice" ,libnice)
+ ("libofa" ,libofa)
+ ("libopenmpt" ,libopenmpt)
("librsvg" ,librsvg)
("libsndfile" ,libsndfile)
("libsrtp" ,libsrtp)
("libssh2" ,libssh2)
+ ("libtiff" ,libtiff)
("libusb" ,libusb)
+ ("libva" ,libva)
("libvdpau" ,libvdpau)
("libwebp" ,libwebp)
+ ("libx11" ,libx11)
+ ("libxcb" ,libxcb)
+ ("libxext" ,libxext)
+ ("libxkbcommon" ,libxkbcommon)
("libxml2" ,libxml2)
+ ("libxshm" ,libxshmfence)
+ ("lilv" ,lilv)
("lrdf" ,lrdf)
+ ("lv2" ,lv2)
("mesa" ,mesa)
+ ("mjpegtools" ,mjpegtools)
("neon" ,neon)
+ ("nettle" ,nettle)
("openal" ,openal)
- ("openexr" ,openexr-2)
+ ;; ("opencv" ,opencv)
+ ("openexr" ,openexr)
+ ("openh264" ,openh264)
("openjpeg" ,openjpeg)
+ ;; ("openni2" ,openni2)
+ ("opensles" ,opensles)
("openssl" ,openssl)
("opus" ,opus)
("orc" ,orc)
- ;("qtbase" ,qtbase-5)
- ;("qtdeclarative" ,qtdeclarative)
- ;("qtx11extras" ,qtx11extras)
+ ("pango" ,pango)
+ ("rtmp" ,rtmpdump)
+ ("sbc" ,sbc)
+ ("sctp" ,lksctp-tools)
("soundtouch" ,soundtouch)
+ ("spandsp" ,spandsp)
("srt" ,srt)
+ ("svthevcenc" ,svt-hevc)
+ ("tinyalsa" ,tinyalsa)
+ ("transcode" ,transcode)
("usrsctp" ,usrsctp)
+ ("v4l" ,v4l-utils)
+ ("voaacenc", vo-aacenc)
+ ("voamrwbenc" ,vo-amrwbenc)
+ ("vulkan-headers" ,vulkan-headers)
+ ("vulkan-loader" ,vulkan-loader)
("x265" ,x265)
- ("webrtc-audio-processing" ,webrtc-audio-processing)
- ("wayland" ,wayland)))
+ ("wayland" ,wayland)
+ ("webrtcdsp" ,webrtc-audio-processing)
+ ("wildmidi" ,wildmidi)
+ ("wpebackend-fdo" ,wpebackend-fdo)
+ ;; ("wpewebkit" ,wpewebkit)
+ ("zbar" ,zbar)
+ ("zxing" ,zxing-cpp-1.2)))
(home-page "https://gstreamer.freedesktop.org/")
(synopsis "Plugins for the GStreamer multimedia library")
(description
@@ -792,16 +924,15 @@ par compared to the rest.")
(define-public gst-plugins-ugly
(package
(name "gst-plugins-ugly")
- (version "1.18.2")
+ (version "1.18.5")
(source
(origin
(method url-fetch)
(uri
(string-append "https://gstreamer.freedesktop.org/src/"
name "/" name "-" version ".tar.xz"))
- (patches (search-patches "gst-plugins-ugly-fix-out-of-bound-reads.patch"))
(sha256
- (base32 "1nwbcv5yaib3d8icvyja3zf6lyjf5zf1hndbijrhj8j7xlia0dx3"))))
+ (base32 "1nb6kz3gbn8r0sld6xkm16qpgyb2bvhafb7sff9rgagqk0z80cnz"))))
(build-system meson-build-system)
(arguments
`(#:glib-or-gtk? #t ; To wrap binaries and/or compile schemas
@@ -818,8 +949,7 @@ par compared to the rest.")
;; Tests look for $XDG_RUNTIME_DIR.
(setenv "XDG_RUNTIME_DIR" (getcwd))
;; For missing '/etc/machine-id'.
- (setenv "DBUS_FATAL_WARNINGS" "0")
- #t)))))
+ (setenv "DBUS_FATAL_WARNINGS" "0"))))))
(native-inputs
`(("gettext" ,gettext-minimal)
("glib:bin" ,glib "bin")
@@ -852,7 +982,7 @@ think twice about shipping them.")
(define-public gst-libav
(package
(name "gst-libav")
- (version "1.18.2")
+ (version "1.18.5")
(source
(origin
(method url-fetch)
@@ -860,9 +990,8 @@ think twice about shipping them.")
(string-append
"https://gstreamer.freedesktop.org/src/" name "/"
name "-" version ".tar.xz"))
- (patches (search-patches "gst-libav-64channels-stack-corruption.patch"))
(sha256
- (base32 "0jbzams9ggk3sq9ywv4gsl9rghyn203l2582m6l5c1sz9ka9m5in"))))
+ (base32 "0j55jgk9sbhinfx2gsg21q609x6yzrixrn5xxlxd378fj6500bl2"))))
(build-system meson-build-system)
(native-inputs
`(("perl" ,perl)
@@ -883,7 +1012,7 @@ decoders, muxers, and demuxers provided by FFmpeg.")
(define-public gst-editing-services
(package
(name "gst-editing-services")
- (version "1.18.2")
+ (version "1.18.5")
(source (origin
(method url-fetch)
(uri (string-append
@@ -891,15 +1020,21 @@ decoders, muxers, and demuxers provided by FFmpeg.")
"gst-editing-services-" version ".tar.xz"))
(sha256
(base32
- "0pv2k8zlpn3vv2sdlspi3m63ixcwzi90pjly2ypbkg59ab97rb15"))))
+ "1x8db4021qv4ypq1g6n5q2awrb7glr4xp1h650c3w7q59lwsix4a"))))
(build-system meson-build-system)
(arguments
;; FIXME: 16/22 failing tests.
`(#:tests? #f
+ #:glib-or-gtk? #t ; To wrap binaries and/or compile schemas
#:phases (modify-phases %standard-phases
,@%common-gstreamer-phases)))
+ (propagated-inputs
+ `(("gstreamer" ,gstreamer)
+ ("gst-plugins-base" ,gst-plugins-base)))
(inputs
- `(("gst-plugins-base" ,gst-plugins-base)
+ `(("glib" ,glib)
+ ("glib-networking" ,glib-networking)
+ ("gtk+" ,gtk+)
("libxml2" ,libxml2)))
(native-inputs
`(("flex" ,flex)
@@ -909,7 +1044,7 @@ decoders, muxers, and demuxers provided by FFmpeg.")
("gst-plugins-good" ,gst-plugins-good)
("perl" ,perl)
("pkg-config" ,pkg-config)
- ("python" ,python)))
+ ("python" ,python-wrapper)))
(home-page "https://gstreamer.freedesktop.org/")
(synopsis "GStreamer library for non-linear editors")
(description
@@ -942,7 +1077,7 @@ given, also pass them to the build system instead of the ones used by PKG."
(define-public python-gst
(package
(name "python-gst")
- (version "1.18.2")
+ (version "1.18.5")
(source (origin
(method url-fetch)
(uri (string-append
@@ -950,7 +1085,7 @@ given, also pass them to the build system instead of the ones used by PKG."
"gst-python-" version ".tar.xz"))
(sha256
(base32
- "171qxzndii7ynn9ag3a12h9vyydxzwy1j4ip3cb8hgim1dv0z7g1"))))
+ "0lmwwmr3wm56qlrdrb0d5cpmqxkcmarz61wmp1nrv5852f3qadjk"))))
(build-system meson-build-system)
(arguments
`(#:modules ((guix build meson-build-system)
diff --git a/gnu/packages/gtk.scm b/gnu/packages/gtk.scm
index 4e427deaef..cb658af389 100644
--- a/gnu/packages/gtk.scm
+++ b/gnu/packages/gtk.scm
@@ -24,9 +24,10 @@
;;; Copyright © 2019 Giacomo Leidi <goodoldpaul@autistici.org>
;;; Copyright © 2020 Brendan Tildesley <mail@brendan.scot>
;;; Copyright © 2020 Guillaume Le Vaillant <glv@posteo.net>
-;;; Copyright © 2020 Maxim Cournoyer <maxim.cournoyer@gmail.com>
+;;; Copyright © 2020, 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;; Copyright © 2021 Leo Famulari <leo@famulari.name>
;;; Copyright © 2021 Simon Streit <simon@netpanic.org>
+;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -45,6 +46,7 @@
(define-module (gnu packages gtk)
#:use-module ((guix licenses) #:prefix license:)
+ #:use-module (guix gexp)
#:use-module (guix utils)
#:use-module (guix packages)
#:use-module (guix download)
@@ -60,6 +62,9 @@
#:use-module (gnu packages algebra)
#:use-module (gnu packages autotools)
#:use-module (gnu packages base)
+ #:use-module (gnu packages bash)
+ #:use-module (gnu packages boost)
+ #:use-module (gnu packages build-tools)
#:use-module (gnu packages texinfo)
#:use-module (gnu packages check)
#:use-module (gnu packages compression)
@@ -74,21 +79,30 @@
#:use-module (gnu packages gl)
#:use-module (gnu packages glib)
#:use-module (gnu packages gnome)
+ #:use-module (gnu packages graphviz)
#:use-module (gnu packages icu4c)
#:use-module (gnu packages image)
+ #:use-module (gnu packages iso-codes)
#:use-module (gnu packages libffi)
#:use-module (gnu packages linux)
+ #:use-module (gnu packages m4)
+ #:use-module (gnu packages man)
#:use-module (gnu packages pdf)
#:use-module (gnu packages perl)
#:use-module (gnu packages perl-check)
#:use-module (gnu packages pkg-config)
#:use-module (gnu packages pretty-print)
#:use-module (gnu packages python)
+ #:use-module (gnu packages python-build)
#:use-module (gnu packages python-xyz)
+ #:use-module (gnu packages gstreamer)
#:use-module (gnu packages guile)
#:use-module (gnu packages guile-xyz)
#:use-module (gnu packages cups)
#:use-module (gnu packages version-control)
+ #:use-module (gnu packages video)
+ #:use-module (gnu packages vulkan)
+ #:use-module (gnu packages web)
#:use-module (gnu packages xml)
#:use-module (gnu packages xorg)
#:use-module (gnu packages xdisorg)
@@ -99,86 +113,113 @@
(define-public atk
(package
- (name "atk")
- (version "2.34.1")
- (source (origin
- (method url-fetch)
- (uri (string-append "mirror://gnome/sources/" name "/"
- (version-major+minor version) "/"
- name "-" version ".tar.xz"))
- (sha256
- (base32
- "1jwp16r6p5z66k4b2v8zlzhyshhwlmyi27ippkrgqr8jsary7w6l"))))
- (build-system meson-build-system)
- (propagated-inputs `(("glib" ,glib))) ; required by atk.pc
- (native-inputs
- `(("pkg-config" ,pkg-config)
- ("gettext" ,gettext-minimal)
- ("glib" ,glib "bin") ; glib-mkenums, etc.
- ("gobject-introspection" ,gobject-introspection))) ; g-ir-compiler, etc.
- (synopsis "GNOME accessibility toolkit")
- (description
- "ATK provides the set of accessibility interfaces that are implemented
+ (name "atk")
+ (version "2.36.0")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "mirror://gnome/sources/" name "/"
+ (version-major+minor version) "/"
+ name "-" version ".tar.xz"))
+ (sha256
+ (base32
+ "1217cmmykjgkkim0zr1lv5j13733m4w5vipmy4ivw0ll6rz28xpv"))))
+ (build-system meson-build-system)
+ (arguments
+ `(#:glib-or-gtk? #t ; To wrap binaries and/or compile schemas
+ ,@(if (%current-target-system)
+ `(#:configure-flags
+ ;; introspection requires running binaries for the host system
+ ;; on the build system.
+ '("-Dintrospection=false"))
+ '())))
+ (propagated-inputs `(("glib" ,glib))) ; required by atk.pc
+ (native-inputs
+ `(("gettext" ,gettext-minimal)
+ ("glib" ,glib "bin") ; glib-mkenums, etc.
+ ("gobject-introspection" ,gobject-introspection) ; g-ir-compiler, etc.
+ ("pkg-config" ,pkg-config)))
+ (synopsis "GNOME accessibility toolkit")
+ (description
+ "ATK provides the set of accessibility interfaces that are implemented
by other toolkits and applications. Using the ATK interfaces, accessibility
tools have full access to view and control running applications.")
- (license license:lgpl2.0+)
- (home-page "https://developer.gnome.org/atk/")))
+ (license license:lgpl2.1+)
+ (home-page "https://wiki.gnome.org/Accessibility")))
(define-public cairo
(package
- (name "cairo")
- (version "1.16.0")
- (source (origin
- (method url-fetch)
- (uri (string-append "https://cairographics.org/releases/cairo-"
- version ".tar.xz"))
- (patches (search-patches "cairo-CVE-2018-19876.patch"
- "cairo-CVE-2020-35492.patch"))
- (sha256
- (base32
- "0c930mk5xr2bshbdljv005j3j8zr47gqmkry3q6qgvqky6rjjysy"))))
- (build-system gnu-build-system)
- (propagated-inputs
- `(("fontconfig" ,fontconfig)
- ("freetype" ,freetype)
- ("glib" ,glib)
- ("libpng" ,libpng)
- ("libx11" ,libx11)
- ("libxext" ,libxext)
- ("libxrender" ,libxrender)
- ("pixman" ,pixman)))
- (inputs
- `(("ghostscript" ,ghostscript)
- ("libspectre" ,libspectre)
- ("poppler" ,poppler)
- ("xorgproto" ,xorgproto)
- ("zlib" ,zlib)))
- (native-inputs
- `(("pkg-config" ,pkg-config)
- ("python" ,python-wrapper)))
+ (name "cairo")
+ (version "1.16.0")
+ (source
+ (origin
+ (method url-fetch)
+ (uri
+ (string-append "https://cairographics.org/releases/cairo-"
+ version ".tar.xz"))
+ (sha256
+ (base32 "0c930mk5xr2bshbdljv005j3j8zr47gqmkry3q6qgvqky6rjjysy"))
+ (patches (search-patches
+ "cairo-CVE-2018-19876.patch"
+ "cairo-CVE-2020-35492.patch"))))
+ (build-system glib-or-gtk-build-system)
+ (outputs '("out" "doc"))
(arguments
- `(#:tests? #f ; see http://lists.gnu.org/archive/html/bug-guix/2013-06/msg00085.html
- #:configure-flags '("--enable-tee" ;needed for GNU Icecat
- "--enable-xml" ;for cairo-xml support
- "--disable-static")))
- (synopsis "2D graphics library")
- (description
- "Cairo is a 2D graphics library with support for multiple output devices.
-Currently supported output targets include the X Window System (via both
-Xlib and XCB), Quartz, Win32, image buffers, PostScript, PDF, and SVG file
-output. Experimental backends include OpenGL, BeOS, OS/2, and DirectFB.
-
-Cairo is designed to produce consistent output on all output media while
-taking advantage of display hardware acceleration when available
-eg. through the X Render Extension).
-
-The cairo API provides operations similar to the drawing operators of
-PostScript and PDF. Operations in cairo including stroking and filling cubic
-Bézier splines, transforming and compositing translucent images, and
-antialiased text rendering. All drawing operations can be transformed by any
-affine transformation (scale, rotation, shear, etc.).")
- (license license:lgpl2.1) ; or Mozilla Public License 1.1
- (home-page "https://cairographics.org/")))
+ `(#:tests? #f ; see http://lists.gnu.org/archive/html/bug-guix/2013-06/msg00085.html
+ #:configure-flags
+ (list
+ "--disable-static"
+ ;; XXX: To be enabled.
+ ;; "--enable-gallium=yes"
+ ;; "--enable-gl=yes"
+ ;; " --enable-glesv2=yes"
+ ;; "--enable-glesv3=yes"
+ ;; "--enable-cogl=yes"
+ ;; "--enable-directfb=yes"
+ ;; "--enable-vg=yes"
+ "--enable-tee=yes" ;needed for GNU IceCat
+ "--enable-xml=yes" ;for cairo-xml support
+ (string-append "--with-html-dir="
+ (assoc-ref %outputs "doc")
+ "/share/gtk-doc/html"))))
+ (native-inputs
+ `(("gobject-introspection" ,gobject-introspection)
+ ("pkg-config" ,pkg-config)
+ ("python" ,python-wrapper)))
+ (inputs
+ ;; TODO(core-updates): make this unconditional
+ `(,@(if (%current-target-system)
+ `(("bash-minimal" ,bash-minimal)) ; for glib-or-gtk-wrap
+ '())
+ ("drm" ,libdrm)
+ ("ghostscript" ,ghostscript)
+ ("libspectre" ,libspectre)
+ ("poppler" ,poppler)))
+ (propagated-inputs
+ `( ;; ("cogl" ,cogl)
+ ;; ("directfb" ,directfb)
+ ("fontconfig" ,fontconfig)
+ ("freetype" ,freetype)
+ ("glib" ,glib)
+ ;; ("gtk+" ,gtk+)
+ ("libpng" ,libpng)
+ ;; ("librsvg" ,librsvg)
+ ;; ("opengl" ,mesa)
+ ("pixman" ,pixman)
+ ("x11" ,libx11)
+ ("xcb" ,libxcb)
+ ("xext" ,libxext)
+ ("xrender" ,libxrender)))
+ (synopsis "Multi-platform 2D graphics library")
+ (description "Cairo is a 2D graphics library with support for multiple output
+devices. Currently supported output targets include the X Window System (via
+both Xlib and XCB), Quartz, Win32, image buffers, PostScript, PDF, and SVG file
+output. Experimental backends include OpenGL, BeOS, OS/2, and DirectFB.")
+ (home-page "https://cairographics.org/")
+ (license
+ ;; This project is dual-licensed.
+ (list
+ license:lgpl2.1+
+ license:mpl1.1))))
(define-public cairo-sans-poppler
;; Variant used to break the dependency cycle between Poppler and Cairo.
@@ -201,15 +242,15 @@ affine transformation (scale, rotation, shear, etc.).")
(define-public harfbuzz
(package
(name "harfbuzz")
- (version "2.6.4")
+ (version "2.8.2")
(source (origin
(method url-fetch)
- (uri (string-append "https://www.freedesktop.org/software/"
- "harfbuzz/release/harfbuzz-"
+ (uri (string-append "https://github.com/harfbuzz/harfbuzz"
+ "/releases/download/" version "/harfbuzz-"
version ".tar.xz"))
(sha256
(base32
- "04iwq13w6zkdhljmsxrzgg4fyh04qnwfn57rgrl9kmijc7cvh4wl"))))
+ "1rvv86wpm3y04fqns1655268rhvhvms469837709v2z2bhwn316m"))))
(build-system gnu-build-system)
(outputs '("out"
"bin")) ; 160K, only hb-view depend on cairo
@@ -266,11 +307,13 @@ affine transformation (scale, rotation, shear, etc.).")
(build-system gnu-build-system)
(outputs '("out" "doc"))
(arguments
- `(#:configure-flags
- (list
- (string-append "--with-html-docdir="
- (assoc-ref %outputs "doc")
- "/share/doc/datrie/html"))))
+ (list #:configure-flags
+ #~(list (string-append "--with-html-docdir=" #$output:doc
+ "/share/doc/datrie/html"))
+
+ ;; Several tests refer to the 'test.tri' file, leading to race
+ ;; conditions when running tests in parallel.
+ #:parallel-tests? #f))
(native-inputs
`(("doxygen" ,doxygen)
("pkg-config" ,pkg-config)))
@@ -301,7 +344,8 @@ representing trie. Trie is a kind of digital search tree.")
(assoc-ref %outputs "doc")
"/share/doc/libthai/html"))))
(native-inputs
- `(("doxygen" ,doxygen)
+ `(("datrie" ,libdatrie)
+ ("doxygen" ,doxygen)
("pkg-config" ,pkg-config)))
(propagated-inputs
`(("datrie" ,libdatrie)))
@@ -314,54 +358,61 @@ applications.")
(define-public pango
(package
- (name "pango")
- (version "1.44.7")
- (source (origin
- (method url-fetch)
- (uri (string-append "mirror://gnome/sources/pango/"
- (version-major+minor version) "/"
- name "-" version ".tar.xz"))
- (patches (search-patches "pango-skip-libthai-test.patch"))
- (sha256
- (base32
- "07qvxa2sk90chp1l12han6vxvy098mc37sdqcznyywyv2g6bd9b6"))))
- (build-system meson-build-system)
- (arguments
- '(#:phases (modify-phases %standard-phases
- (add-after 'unpack 'disable-cantarell-tests
- (lambda _
- (substitute* "tests/meson.build"
- ;; XXX FIXME: These tests require "font-abattis-cantarell", but
- ;; adding it here would introduce a circular dependency.
- (("\\[ 'test-harfbuzz'.*") "")
- (("\\[ 'test-itemize'.*") "")
- (("\\[ 'test-layout'.*") ""))
- #t)))))
- (propagated-inputs
- ;; These are all in Requires or Requires.private of the '.pc' files.
- `(("cairo" ,cairo)
- ("fribidi" ,fribidi)
- ("fontconfig" ,fontconfig)
- ("freetype" ,freetype)
- ("glib" ,glib)
- ("harfbuzz" ,harfbuzz)
-
- ;; Some packages, such as Openbox, expect Pango to be built with the
- ;; optional libxft support.
- ("libxft" ,libxft)))
- (inputs
- `(("zlib" ,zlib)))
- (native-inputs
- `(("pkg-config" ,pkg-config)
- ("glib" ,glib "bin") ; glib-mkenums, etc.
- ("gobject-introspection" ,gobject-introspection))) ; g-ir-compiler, etc.
- (synopsis "GNOME text and font handling library")
- (description
- "Pango is the core text and font handling library used in GNOME
-applications. It has extensive support for the different writing systems
-used throughout the world.")
- (license license:lgpl2.0+)
- (home-page "https://developer.gnome.org/pango/")))
+ (name "pango")
+ (version "1.48.10")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "mirror://gnome/sources/pango/"
+ (version-major+minor version) "/"
+ name "-" version ".tar.xz"))
+ (patches (search-patches "pango-skip-libthai-test.patch"))
+ (sha256
+ (base32
+ "166wxhsjb6hb0dk7wkkdcmpvasl9n0a0aa64mdgagzfdidwzbq91"))))
+ (build-system meson-build-system)
+ (arguments
+ '(#:glib-or-gtk? #t ; To wrap binaries and/or compile schemas
+ #:phases (modify-phases %standard-phases
+ (add-after 'unpack 'disable-cantarell-tests
+ (lambda _
+ (substitute* "tests/meson.build"
+ ;; XXX FIXME: These tests require "font-abattis-cantarell", but
+ ;; adding it here would introduce a circular dependency.
+ (("\\[ 'test-layout'.*") "")
+ (("\\[ 'test-itemize'.*") "")
+ (("\\[ 'test-font'.*") "")
+ (("\\[ 'test-harfbuzz'.*") "")))))))
+ (propagated-inputs
+ ;; These are all in Requires or Requires.private of the '.pc' files.
+ `(("cairo" ,cairo)
+ ("fontconfig" ,fontconfig)
+ ("freetype" ,freetype)
+ ("fribidi" ,fribidi)
+ ("glib" ,glib)
+ ("harfbuzz" ,harfbuzz)
+ ("libthai" ,libthai)
+ ;; Some packages, such as Openbox, expect Pango to be built with the
+ ;; optional libxft support.
+ ("libxft" ,libxft)
+ ("libxrender" ,libxrender)))
+ (inputs
+ `(("bash-minimal" ,bash-minimal)
+ ("zlib" ,zlib)))
+ (native-inputs
+ `(("glib" ,glib "bin") ; glib-mkenums, etc.
+ ("gobject-introspection" ,gobject-introspection) ; g-ir-compiler, etc.
+ ("help2man" ,help2man)
+ ("perl" ,perl)
+ ("pkg-config" ,pkg-config)
+ ("python" ,python-wrapper)))
+ (synopsis "Text and font handling library")
+ (description "Pango is a library for laying out and rendering of text, with
+an emphasis on internationalization. Pango can be used anywhere that text
+layout is needed, though most of the work on Pango so far has been done in the
+context of the GTK+ widget toolkit. Pango forms the core of text and font
+handling for GTK+-2.x.")
+ (home-page "https://pango.gnome.org/")
+ (license license:lgpl2.0+)))
(define-public pango-1.42
(package
@@ -381,10 +432,11 @@ used throughout the world.")
(add-after 'configure 'disable-layout-test
(lambda _
;; This test requires that fontconfig uses bitmap fonts
- ;; such as "gs-fonts"; however providing such a package
- ;; alone is not enough, as the requirement comes from
- ;; deeper in the font stack. Since this version of Pango
- ;; is only used for librsvg, simply disable the test.
+ ;; such as "font-ghostscript"; however providing such a
+ ;; package alone is not enough, as the requirement comes
+ ;; from deeper in the font stack. Since this version of
+ ;; Pango is only used for librsvg, simply disable the
+ ;; test.
(substitute* "tests/Makefile"
(("test-layout\\$\\(EXEEXT\\)") ""))
#t)))))))
@@ -573,378 +625,629 @@ highlighting and other features typical of a source code editor.")
(define-public gdk-pixbuf
(package
- (name "gdk-pixbuf")
- (version "2.40.0")
- (source (origin
- (method url-fetch)
- (uri (string-append "mirror://gnome/sources/" name "/"
- (version-major+minor version) "/"
- name "-" version ".tar.xz"))
- (patches (search-patches "gdk-pixbuf-CVE-2020-29385.patch"))
- (sha256
- (base32
- "1rnlx9yfw970maxi2x6niaxmih5la11q1ilr7gzshz2kk585k0hm"))))
- (build-system meson-build-system)
- (arguments
- `(#:configure-flags '("-Dinstalled_tests=false")
- #:phases
- (modify-phases %standard-phases
- (add-after
- 'unpack 'disable-failing-tests
- (lambda _
- (substitute* "tests/meson.build"
- ;; XXX FIXME: This test fails on armhf machines with:
- ;; SKIP Not enough memory to load bitmap image
- ;; ERROR: cve-2015-4491 - too few tests run (expected 4, got 2)
- ((".*'cve-2015-4491'.*") "")
- ;; XXX FIXME: This test fails with:
- ;; ERROR:pixbuf-jpeg.c:74:test_type9_rotation_exif_tag:
- ;; assertion failed (error == NULL): Data differ
- ;; (gdk-pixbuf-error-quark, 0)
- ((".*'pixbuf-jpeg'.*") ""))
- #t))
- ;; The slow tests take longer than the specified timeout.
- ,@(if (any (cute string=? <> (%current-system))
- '("armhf-linux" "aarch64-linux"))
- '((replace 'check
- (lambda _
- (invoke "meson" "test" "--timeout-multiplier" "5"))))
- '()))))
- (propagated-inputs
- `(;; Required by gdk-pixbuf-2.0.pc
- ("glib" ,glib)
- ("libpng" ,libpng)
- ;; Used for testing and required at runtime.
- ("shared-mime-info" ,shared-mime-info)))
- (inputs
- `(("libjpeg" ,libjpeg-turbo)
- ("libtiff" ,libtiff)
- ("libx11" ,libx11)))
- (native-inputs
- `(("pkg-config" ,pkg-config)
- ("gettext" ,gettext-minimal)
- ("glib" ,glib "bin") ; glib-mkenums, etc.
- ("gobject-introspection" ,gobject-introspection))) ; g-ir-compiler, etc.
- (synopsis "GNOME image loading and manipulation library")
- (description
- "GdkPixbuf is a library for image loading and manipulation developed
-in the GNOME project.")
- (license license:lgpl2.0+)
- (home-page "https://developer.gnome.org/gdk-pixbuf/")))
-
-;; To build gdk-pixbuf with SVG support, we need librsvg, and librsvg depends
-;; on gdk-pixbuf, so this new varibale. Also, librsvg adds 90MiB to the
-;; closure size.
-(define-public gdk-pixbuf+svg
- (package/inherit gdk-pixbuf
- (name "gdk-pixbuf+svg")
- (inputs
- `(("librsvg" ,librsvg)
- ,@(package-inputs gdk-pixbuf)))
+ (name "gdk-pixbuf")
+ (version "2.42.4")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "mirror://gnome/sources/" name "/"
+ (version-major+minor version) "/"
+ name "-" version ".tar.xz"))
+ (sha256
+ (base32
+ "0k9f9177qxaryaxprwrhqnv5p2gdq4a8i6y05gm98qa8izc5v77y"))))
+ (build-system meson-build-system)
+ (outputs '("out" "debug"))
(arguments
- '(#:configure-flags '("-Dinstalled-tests=false")
- #:tests? #f ; tested by the gdk-pixbuf package already
+ `(#:glib-or-gtk? #t ; To wrap binaries and/or compile schemas
+ #:configure-flags '("-Dinstalled_tests=false")
#:phases
(modify-phases %standard-phases
- (add-after 'install 'register-svg-loader
- (lambda* (#:key inputs outputs #:allow-other-keys)
- (let* ((out (assoc-ref outputs "out"))
- (librsvg (assoc-ref inputs "librsvg"))
- (loaders
- (append
- (find-files out "^libpixbufloader-.*\\.so$")
- (find-files librsvg "^libpixbufloader-.*\\.so$")))
- (gdk-pixbuf-query-loaders
- (string-append out "/bin/gdk-pixbuf-query-loaders")))
- (apply invoke
- gdk-pixbuf-query-loaders
- "--update-cache"
- loaders)))))))
- (synopsis
- "GNOME image loading and manipulation library, with SVG support")))
+ (add-after 'unpack 'patch-docbook
+ (lambda* (#:key native-inputs inputs #:allow-other-keys)
+ (with-directory-excursion "docs"
+ (substitute* "meson.build"
+ (("http://docbook.sourceforge.net/release/xsl/current/")
+ (string-append (assoc-ref ,(if (%current-target-system)
+ '(or native-inputs inputs)
+ 'inputs) "docbook-xsl")
+ "/xml/xsl/docbook-xsl-1.79.2/")))
+ (substitute* (find-files "." "\\.xml$")
+ (("http://www.oasis-open.org/docbook/xml/4\\.3/")
+ (string-append (assoc-ref ,(if (%current-target-system)
+ '(or native-inputs inputs)
+ 'inputs) "docbook-xml")
+ "/xml/dtd/docbook/"))))))
+ (add-before 'configure 'disable-failing-tests
+ (lambda _
+ (substitute* "tests/meson.build"
+ (("\\[ 'pixbuf-fail', \\['conform', 'slow'\\], \\],")
+ ""))))
+ ;; The slow tests take longer than the specified timeout.
+ ,@(if (any (cute string=? <> (%current-system))
+ '("armhf-linux" "aarch64-linux"))
+ '((replace 'check
+ (lambda _
+ (invoke "meson" "test" "--timeout-multiplier" "5"))))
+ '()))))
+ (propagated-inputs
+ `( ;; Required by gdk-pixbuf-2.0.pc
+ ("glib" ,glib)
+ ;; Required by gdk-pixbuf-xlib-2.0.pc
+ ("libx11" ,libx11)
+ ;; Used for testing and required at runtime.
+ ("shared-mime-info" ,shared-mime-info)))
+ (inputs
+ `(,@(if (%current-target-system)
+ `(("bash-minimal" ,bash-minimal)) ; for glib-or-gtk-wrap
+ '())
+ ("libjpeg" ,libjpeg-turbo)
+ ("libpng" ,libpng)
+ ("libtiff" ,libtiff)))
+ (native-inputs
+ `(("docbook-xml" ,docbook-xml-4.3)
+ ("docbook-xsl" ,docbook-xsl)
+ ("gettext" ,gettext-minimal)
+ ("glib" ,glib "bin") ; glib-mkenums, etc.
+ ("gobject-introspection" ,gobject-introspection) ; g-ir-compiler, etc.
+ ("perl" ,perl)
+ ("pkg-config" ,pkg-config)
+ ("xsltproc" ,libxslt)))
+ (native-search-paths
+ ;; This file is produced by the gdk-pixbuf-loaders-cache-file
+ ;; profile hook.
+ (list (search-path-specification
+ (variable "GDK_PIXBUF_MODULE_FILE")
+ (files (list %gdk-pixbuf-loaders-cache-file))
+ (separator #f) ;single valued
+ (file-type 'regular))))
+ (synopsis "Image loading library")
+ (description "GdkPixbuf is a library that loads image data in various
+formats and stores it as linear buffers in memory. The buffers can then be
+scaled, composited, modified, saved, or rendered.")
+ (home-page "https://wiki.gnome.org/Projects/GdkPixbuf")
+ (license license:lgpl2.1+)))
-(define-public at-spi2-core
- (package
- (name "at-spi2-core")
- (version "2.34.0")
- (source (origin
- (method url-fetch)
- (uri (string-append "mirror://gnome/sources/" name "/"
- (version-major+minor version) "/"
- name "-" version ".tar.xz"))
- (sha256
- (base32
- "1ihixwhh3c16q6253qj9gf69741rb2pi51822a4rylsfcyywsafn"))))
- (build-system meson-build-system)
- (outputs '("out" "doc"))
- (arguments
- '(#:configure-flags
- (list "-Ddocs=true")
- #:phases
- (modify-phases %standard-phases
- (add-after 'unpack 'set-documentation-path
- (lambda* (#:key outputs #:allow-other-keys)
- ;; Ensure that the cross-references point to the "doc" output.
- (substitute* "doc/libatspi/meson.build"
- (("docpath =.*")
- (string-append "docpath = '" (assoc-ref outputs "doc") "/share/gtk-doc/html'\n")))
- #t))
- (add-before 'install 'prepare-doc-directory
- (lambda* (#:key outputs #:allow-other-keys)
- (mkdir-p (string-append (assoc-ref outputs "doc") "/share"))
- #t))
- (add-after 'install 'move-documentation
- (lambda* (#:key outputs #:allow-other-keys)
- (let ((out (assoc-ref outputs "out"))
- (doc (assoc-ref outputs "doc")))
- (copy-recursively
- (string-append out "/share/gtk-doc")
- (string-append doc "/share/gtk-doc"))
- (delete-file-recursively
- (string-append out "/share/gtk-doc")))
- #t))
- (add-after 'install 'check
- (lambda _
- (setenv "HOME" (getenv "TMPDIR")) ; xfconfd requires a writable HOME
- ;; Run test-suite under a dbus session.
- (setenv "XDG_DATA_DIRS" ; for finding org.xfce.Xfconf.service
- (string-append %output "/share"))
- ;; Don't fail on missing '/etc/machine-id'.
- (setenv "DBUS_FATAL_WARNINGS" "0") ;
- (invoke "dbus-launch" "ninja" "test")))
- (delete 'check))))
- (propagated-inputs
- ;; atspi-2.pc refers to all these.
- `(("dbus" ,dbus)
- ("glib" ,glib)
- ("libxi" ,libxi)
- ("libxtst" ,libxtst)))
- (native-inputs
- `(("gettext" ,gettext-minimal)
- ("gobject-introspection" ,gobject-introspection)
- ("gtk-doc" ,gtk-doc/stable)
- ("glib" ,glib "bin")
- ("pkg-config" ,pkg-config)))
- (synopsis "Assistive Technology Service Provider Interface, core components")
- (description
- "The Assistive Technology Service Provider Interface, core components,
+;;; A minimal variant used to prevent a cycle with Inkscape.
+(define-public at-spi2-core-minimal
+ (hidden-package
+ (package
+ (name "at-spi2-core")
+ (version "2.40.0")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "mirror://gnome/sources/" name "/"
+ (version-major+minor version) "/"
+ name "-" version ".tar.xz"))
+ (sha256
+ (base32
+ "0a9l6cfxynjn6jcp29d72i75xbkrzs1l5kmqcwmfal801b9sg5j1"))))
+ (build-system meson-build-system)
+ (arguments
+ '(#:glib-or-gtk? #t ; To wrap binaries and/or compile schemas
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'install 'check
+ (lambda _
+ (setenv "HOME" (getenv "TMPDIR")) ; xfconfd requires a writable HOME
+ ;; Run test-suite under a dbus session.
+ (setenv "XDG_DATA_DIRS" ; for finding org.xfce.Xfconf.service
+ (string-append %output "/share"))
+ ;; Don't fail on missing '/etc/machine-id'.
+ (setenv "DBUS_FATAL_WARNINGS" "0") ;
+ (invoke "dbus-launch" "ninja" "test")))
+ (delete 'check))))
+ (inputs
+ `(("bash-minimal" ,bash-minimal)))
+ (propagated-inputs
+ ;; atspi-2.pc refers to all these.
+ `(("dbus" ,dbus)
+ ("glib" ,glib)
+ ("libx11" ,libx11)
+ ("libxi" ,libxi)
+ ("libxtst" ,libxtst)))
+ (native-inputs
+ `(("gettext" ,gettext-minimal)
+ ("glib" ,glib "bin")
+ ("gobject-introspection" ,gobject-introspection)
+ ("pkg-config" ,pkg-config)
+ ("python" ,python-wrapper)))
+ (synopsis "Assistive Technology Service Provider Interface, core components")
+ (description
+ "The Assistive Technology Service Provider Interface, core components,
is part of the GNOME accessibility project.")
- (license license:lgpl2.0+)
- (home-page "https://projects.gnome.org/accessibility/")))
+ (license license:lgpl2.1+)
+ (home-page "https://wiki.gnome.org/Accessibility/"))))
-;;; A minimal variant used to prevent a cycle with Inkscape.
-(define at-spi2-core-minimal
- (package
- (inherit at-spi2-core)
- (name "at-spi2-core-minimal")
- (outputs (delete "doc" (package-outputs at-spi2-core)))
+(define-public at-spi2-core
+ (package/inherit at-spi2-core-minimal
+ (outputs (cons "doc" (package-outputs at-spi2-core-minimal)))
(arguments
- (substitute-keyword-arguments (package-arguments at-spi2-core)
- ((#:configure-flags configure-flags)
- `(delete "-Ddocs=true" ,configure-flags))
+ (substitute-keyword-arguments (package-arguments at-spi2-core-minimal)
+ ((#:configure-flags flags ''())
+ `(cons ,(if (%current-target-system)
+ "-Ddocs=false"
+ "-Ddocs=true")
+ ,flags))
((#:phases phases)
`(modify-phases ,phases
- (delete 'set-documentation-path)
- (delete 'prepare-doc-directory)
- (delete 'move-documentation)))))
+ (add-after 'unpack 'set-documentation-path
+ (lambda* (#:key outputs #:allow-other-keys)
+ ;; Ensure that the cross-references point to the "doc" output.
+ (substitute* "doc/libatspi/meson.build"
+ (("docpath =.*")
+ (string-append "docpath = '" (assoc-ref outputs "doc")
+ "/share/gtk-doc/html'\n")))))
+ (add-before 'install 'prepare-doc-directory
+ (lambda* (#:key outputs #:allow-other-keys)
+ (mkdir-p (string-append (assoc-ref outputs "doc") "/share"))))
+ ,@(if (%current-target-system)
+ '()
+ '((add-after 'install 'move-documentation
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let ((out (assoc-ref outputs "out"))
+ (doc (assoc-ref outputs "doc")))
+ (copy-recursively
+ (string-append out "/share/gtk-doc")
+ (string-append doc "/share/gtk-doc"))
+ (delete-file-recursively
+ (string-append out "/share/gtk-doc")))))))))))
(native-inputs
- (alist-delete "gtk-doc" (package-native-inputs at-spi2-core)))))
+ (append `(("docbook-xml" ,docbook-xml-4.3)
+ ("gtk-doc" ,gtk-doc/stable)
+ ("libxml2" ,libxml2)) ;for XML_CATALOG_FILES
+ (package-native-inputs at-spi2-core-minimal)))
+ (properties (alist-delete 'hidden?
+ (package-properties at-spi2-core-minimal)))))
(define-public at-spi2-atk
(package
- (name "at-spi2-atk")
- (version "2.34.1")
- (source (origin
- (method url-fetch)
- (uri (string-append "mirror://gnome/sources/" name "/"
- (version-major+minor version) "/"
- name "-" version ".tar.xz"))
- (sha256
- (base32
- "05ncp7s5nddjinffs26mcvpbd63vk1m3cv5y530p3plgfhqgjvbp"))))
- (build-system meson-build-system)
- (arguments
- '(#:phases
- (modify-phases %standard-phases
- (replace 'check
- ;; Run test-suite under a dbus session.
- (lambda _
- (setenv "DBUS_FATAL_WARNINGS" "0")
- (invoke "dbus-launch" "meson" "test"))))))
- (propagated-inputs
- ;; TODO: Replace by at-spi2-core-minimal in the next staging window, or
- ;; when Inkscape 0.92 is upgraded to 1.0 to avoid a cycle.
- `(("at-spi2-core" ,at-spi2-core))) ; required by atk-bridge-2.0.pc
- (inputs
- `(("atk" ,atk)))
- (native-inputs
- `(("pkg-config" ,pkg-config)
- ;; For tests.
- ("dbus" ,dbus)
- ("libxml2" ,libxml2)))
- (synopsis "Assistive Technology Service Provider Interface, ATK bindings")
- (description
- "The Assistive Technology Service Provider Interface
+ (name "at-spi2-atk")
+ (version "2.38.0")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "mirror://gnome/sources/" name "/"
+ (version-major+minor version) "/"
+ name "-" version ".tar.xz"))
+ (sha256
+ (base32
+ "0ks6r9sx27l80n3a7yjmkilxv48cqj183wc7cap3caw2myjhi86g"))))
+ (build-system meson-build-system)
+ (arguments
+ `(#:glib-or-gtk? #t ; To wrap binaries and/or compile schemas
+ ;; Compiling tests requires "libxml2" to be in 'inputs'.
+ ,@(if (%current-target-system)
+ `(#:configure-flags '("-Dtests=false"))
+ '())
+ #:phases
+ (modify-phases %standard-phases
+ (replace 'check
+ ;; Run test-suite under a dbus session.
+ (lambda _
+ (setenv "DBUS_FATAL_WARNINGS" "0")
+ (invoke "dbus-launch" "meson" "test"))))))
+ (propagated-inputs
+ `(("at-spi2-core" ,at-spi2-core-minimal))) ; required by atk-bridge-2.0.pc
+ (inputs
+ `(("atk" ,atk)
+ ("glib" ,glib)))
+ (native-inputs
+ `(("dbus" ,dbus) ; For tests
+ ("gobject-introspection" ,gobject-introspection)
+ ("libxml2" ,libxml2)
+ ("pkg-config" ,pkg-config)))
+ (synopsis "Assistive Technology Service Provider Interface, ATK bindings")
+ (description
+ "The Assistive Technology Service Provider Interface
is part of the GNOME accessibility project.")
- (license license:lgpl2.0+)
- (home-page "https://projects.gnome.org/accessibility/")))
+ (license license:lgpl2.1+)
+ (home-page "https://wiki.gnome.org/Accessibility/")))
(define-public gtk+-2
(package
- (name "gtk+")
- (version "2.24.32")
- (source (origin
- (method url-fetch)
- (uri (string-append "mirror://gnome/sources/" name "/"
- (version-major+minor version) "/"
- name "-" version ".tar.xz"))
- (sha256
- (base32
- "0bjq7ja9gwcv6n5q4qkvdjjx40wsdiikksz1zqxvxsm5vlyskj5n"))
- (patches (search-patches "gtk2-respect-GUIX_GTK2_PATH.patch"
- "gtk2-respect-GUIX_GTK2_IM_MODULE_FILE.patch"
- "gtk2-theme-paths.patch"))))
- (build-system gnu-build-system)
- (outputs '("out" "bin" "doc"))
- (propagated-inputs
- `(("atk" ,atk)
- ("gdk-pixbuf" ,gdk-pixbuf+svg)
- ("pango" ,pango)))
- (inputs
- `(("cups" ,cups)
- ("libxcomposite" ,libxcomposite)
- ("libxcursor" ,libxcursor)
- ("libxdamage" ,libxdamage)
- ("libxi" ,libxi)
- ("libxinerama" ,libxinerama)
- ("libxrandr" ,libxrandr)))
- (native-inputs
- `(("perl" ,perl)
- ("gettext" ,gettext-minimal)
- ("glib" ,glib "bin")
- ("gobject-introspection" ,gobject-introspection)
- ("pkg-config" ,pkg-config)
- ("python-wrapper" ,python-wrapper)))
- (arguments
- `(#:configure-flags
- (list "--with-xinput=yes"
- (string-append "--with-html-dir="
- (assoc-ref %outputs "doc")
- "/share/gtk-doc/html"))
- #:phases
- (modify-phases %standard-phases
- (add-before 'configure 'disable-tests
- (lambda _
- ;; FIXME: re-enable tests requiring an X server
- (substitute* "gtk/Makefile.in"
- (("SUBDIRS = theme-bits . tests") "SUBDIRS = theme-bits ."))
- #t))
- (add-after 'install 'remove-cache
- (lambda* (#:key outputs #:allow-other-keys)
- (for-each
+ (name "gtk+")
+ (version "2.24.33")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "mirror://gnome/sources/" name "/"
+ (version-major+minor version) "/"
+ name "-" version ".tar.xz"))
+ (sha256
+ (base32
+ "1nn6kks1zyvb5xikr9y2k7r9bwjy1g4b0m0s66532bclymbwfamc"))
+ (patches (search-patches "gtk2-respect-GUIX_GTK2_PATH.patch"
+ "gtk2-respect-GUIX_GTK2_IM_MODULE_FILE.patch"
+ "gtk2-theme-paths.patch"
+ "gtk2-fix-builder-test.patch"))))
+ (build-system gnu-build-system)
+ (outputs '("out" "bin" "doc" "debug"))
+ (propagated-inputs
+ (list atk cairo
+ (if (target-x86-64?)
+ librsvg-bootstrap
+ librsvg-2.40)
+ glib pango))
+ (inputs
+ (list cups
+ libx11
+ libxcomposite
+ libxcursor
+ libxext
+ libxdamage
+ libxi
+ libxinerama
+ libxkbcommon
+ libxrandr
+ libxrender
+ libxshmfence))
+ (native-inputs
+ (list gettext-minimal
+ `(,glib "bin")
+ gobject-introspection
+ intltool
+ perl
+ pkg-config
+ python-wrapper
+ xorg-server-for-tests))
+ (arguments
+ `(#:parallel-tests? #f
+ #:configure-flags
+ (list "--with-xinput=yes"
+ (string-append "--with-html-dir="
+ (assoc-ref %outputs "doc")
+ "/share/gtk-doc/html"))
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'disable-failing-tests
+ (lambda _
+ (substitute* "gtk/Makefile.in"
+ (("aliasfilescheck\\.sh") ""))
+ (substitute* "gtk/tests/recentmanager.c"
+ (("g_test_add_func \\(\"/recent-manager.*;") ""))
+ (substitute* "gtk/tests/defaultvalue.c"
+ (("return g_test_run\\(\\);") ""))
+ #t))
+ (add-before 'check 'pre-check
+ (lambda _
+ ;; Tests require a running X server.
+ (system "Xvfb :1 +extension GLX &")
+ (setenv "DISPLAY" ":1")
+ ;; Tests write to $HOME.
+ (setenv "HOME" (getcwd))
+ ;; Tests look for $XDG_RUNTIME_DIR.
+ (setenv "XDG_RUNTIME_DIR" (getcwd))
+ ;; For missing '/etc/machine-id'.
+ (setenv "DBUS_FATAL_WARNINGS" "0")
+ #t))
+ (add-after 'install 'remove-cache
+ (lambda* (#:key outputs #:allow-other-keys)
+ (for-each
delete-file
(find-files (assoc-ref outputs "out") "immodules.cache"))
- #t)))))
- (native-search-paths
- (list (search-path-specification
- (variable "GUIX_GTK2_PATH")
- (files '("lib/gtk-2.0")))))
- (synopsis "Cross-platform toolkit for creating graphical user interfaces")
- (description
- "GTK+, or the GIMP Toolkit, is a multi-platform toolkit for creating
+ #t)))))
+ (native-search-paths
+ (list (search-path-specification
+ (variable "GUIX_GTK2_PATH")
+ (files '("lib/gtk-2.0")))))
+ (search-paths native-search-paths)
+ (synopsis "Cross-platform toolkit for creating graphical user interfaces")
+ (description
+ "GTK+, or the GIMP Toolkit, is a multi-platform toolkit for creating
graphical user interfaces. Offering a complete set of widgets, GTK+ is
suitable for projects ranging from small one-off tools to complete
application suites.")
- (license license:lgpl2.0+)
- (home-page "https://www.gtk.org/")))
+ (license license:lgpl2.0+)
+ (home-page "https://www.gtk.org/")))
(define-public gtk+
- (package (inherit gtk+-2)
- (name "gtk+")
- (version "3.24.24")
- (source (origin
- (method url-fetch)
- (uri (string-append "mirror://gnome/sources/" name "/"
- (version-major+minor version) "/"
- name "-" version ".tar.xz"))
- (sha256
- (base32
- "12ipk1d376bai9v820qzhxba93kkh5abi6mhyqr4hwjvqmkl77fc"))
- (patches (search-patches "gtk3-respect-GUIX_GTK3_PATH.patch"
- "gtk3-respect-GUIX_GTK3_IM_MODULE_FILE.patch"))))
- (propagated-inputs
- `(("at-spi2-atk" ,at-spi2-atk)
- ("atk" ,atk)
- ("gdk-pixbuf" ,gdk-pixbuf+svg)
- ("libepoxy" ,libepoxy)
- ("libxcursor" ,libxcursor)
- ("libxi" ,libxi)
- ("libxinerama" ,libxinerama)
- ("libxkbcommon" ,libxkbcommon)
- ("libxdamage" ,libxdamage)
- ("libxrandr" ,libxrandr)
- ("mesa" ,mesa)
- ("pango" ,pango)
- ("wayland" ,wayland)
- ("wayland-protocols" ,wayland-protocols)))
- (inputs
- `(("libxml2" ,libxml2)
- ;; XXX: colord depends on mozjs (through polkit), which fails on
- ;; on non-intel systems now.
- ;;("colord" ,colord)
- ("cups" ,cups) ;for printing support
- ;; XXX: rest depends on p11-kit, which fails on mips64el now.
- ;;("rest" ,rest)
- ("json-glib" ,json-glib)))
- (native-inputs
- `(("perl" ,perl)
- ("glib" ,glib "bin")
- ("gettext" ,gettext-minimal)
- ("pkg-config" ,pkg-config)
- ("gobject-introspection" ,gobject-introspection)
- ("python-wrapper" ,python-wrapper)
- ;; By using a special xorg-server for GTK+'s tests, we reduce the impact
- ;; of updating xorg-server directly on the master branch.
- ("xorg-server" ,xorg-server-for-tests)))
- (arguments
- `(#:disallowed-references (,xorg-server-for-tests)
- ;; 47 MiB goes to "out" (24 of which is locale data!), and 26 MiB goes
- ;; to "doc".
- #:configure-flags (list (string-append "--with-html-dir="
- (assoc-ref %outputs "doc")
- "/share/gtk-doc/html")
- ;; The header file <gdk/gdkwayland.h> is required
- ;; by gnome-control-center
- "--enable-wayland-backend"
- ;; This is necessary to build both backends.
- "--enable-x11-backend"
- ;; This enables the HTML5 websocket backend.
- "--enable-broadway-backend")
- #:phases (modify-phases %standard-phases
- (add-before 'configure 'pre-configure
- (lambda _
- ;; Disable most tests, failing in the chroot with the message:
- ;; D-Bus library appears to be incorrectly set up; failed to read
- ;; machine uuid: Failed to open "/etc/machine-id": No such file or
- ;; directory.
- ;; See the manual page for dbus-uuidgen to correct this issue.
- (substitute* "testsuite/Makefile.in"
- (("SUBDIRS = gdk gtk a11y css reftests")
- "SUBDIRS = gdk"))
- #t))
- (add-after 'install 'move-desktop-files
- ;; Move desktop files into 'bin' to avoid cycle references.
- (lambda* (#:key outputs #:allow-other-keys)
- (let ((out (assoc-ref outputs "out"))
- (bin (assoc-ref outputs "bin")))
- (mkdir-p (string-append bin "/share"))
- (rename-file (string-append out "/share/applications")
- (string-append bin "/share/applications"))
- #t))))))
- (native-search-paths
- (list (search-path-specification
- (variable "GUIX_GTK3_PATH")
- (files '("lib/gtk-3.0")))))))
+ (package
+ (inherit gtk+-2)
+ (name "gtk+")
+ (version "3.24.30")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "mirror://gnome/sources/" name "/"
+ (version-major+minor version) "/"
+ name "-" version ".tar.xz"))
+ (sha256
+ (base32
+ "1a9vg840fjq1mmm403b67k624qrkxh9shaz9pv7z9l8a6bzvyxds"))
+ (patches (search-patches "gtk3-respect-GUIX_GTK3_PATH.patch"
+ "gtk3-respect-GUIX_GTK3_IM_MODULE_FILE.patch"))))
+ (propagated-inputs
+ (list atk
+ at-spi2-atk
+ cairo
+ fribidi
+ fontconfig
+ freetype
+ (if (target-x86-64?)
+ librsvg-bootstrap
+ librsvg-2.40)
+ glib
+ libcloudproviders-minimal
+ libepoxy
+ libx11
+ libxcomposite
+ libxcursor
+ libxdamage
+ libxext
+ libxfixes
+ libxi
+ libxinerama
+ libxkbcommon
+ libxrandr
+ libxrender
+ mesa
+ pango
+ wayland
+ wayland-protocols))
+ (inputs
+ (list colord-minimal ;to prevent a cycle with inkscape
+ cups
+ graphene
+ harfbuzz
+ iso-codes
+ json-glib-minimal
+ libxml2
+ rest))
+ (native-inputs
+ (list docbook-xml-4.1.2
+ gettext-minimal
+ `(,glib "bin")
+ gobject-introspection
+ hicolor-icon-theme
+ perl
+ pkg-config
+ python-wrapper
+ sassc
+ ;; By using a special xorg-server for GTK+'s tests, we reduce the impact
+ ;; of updating xorg-server directly on the master branch.
+ xorg-server-for-tests
+ libxslt))
+ (arguments
+ `(#:imported-modules ((guix build glib-or-gtk-build-system)
+ ,@%gnu-build-system-modules)
+ #:modules ((guix build utils)
+ (guix build gnu-build-system)
+ ((guix build glib-or-gtk-build-system) #:prefix glib-or-gtk:))
+ #:disallowed-references (,xorg-server-for-tests)
+ ;; 47 MiB goes to "out" (24 of which is locale data!), and 26 MiB goes
+ ;; to "doc".
+ #:configure-flags (list (string-append "--with-html-dir="
+ (assoc-ref %outputs "doc")
+ "/share/gtk-doc/html")
+ "--enable-cloudproviders"
+ ;; The header file <gdk/gdkwayland.h> is required
+ ;; by gnome-control-center
+ "--enable-wayland-backend"
+ ;; This is necessary to build both backends.
+ "--enable-x11-backend"
+ ;; This enables the HTML5 websocket backend.
+ "--enable-broadway-backend")
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'generate-gdk-pixbuf-loaders-cache-file
+ (assoc-ref glib-or-gtk:%standard-phases
+ 'generate-gdk-pixbuf-loaders-cache-file))
+ (add-after 'unpack 'disable-failing-tests
+ (lambda _
+ (substitute* "testsuite/gtk/Makefile.in"
+ (("builderparser cellarea check-icon-names check-cursor-names")
+ "builderparser cellarea check-cursor-names")
+ (("notify no-gtk-init object objects-finalize papersize rbtree")
+ "no-gtk-init papersize rbtree")
+ (("stylecontext templates textbuffer textiter treemodel treepath")
+ "stylecontext textbuffer textiter treemodel treepath"))
+ (substitute* "testsuite/a11y/Makefile.in"
+ (("accessibility-dump tree-performance text children derive")
+ "tree-performance text children derive"))
+ (substitute* "testsuite/reftests/Makefile.in"
+ (("TEST_PROGS = gtk-reftest")
+ "TEST_PROGS = "))
+ #t))
+ (add-before 'check 'pre-check
+ (lambda _
+ ;; Tests require a running X server.
+ (system "Xvfb :1 +extension GLX &")
+ (setenv "DISPLAY" ":1")
+ ;; Tests write to $HOME.
+ (setenv "HOME" (getcwd))
+ ;; Tests look for $XDG_RUNTIME_DIR.
+ (setenv "XDG_RUNTIME_DIR" (getcwd))
+ ;; For missing '/etc/machine-id'.
+ (setenv "DBUS_FATAL_WARNINGS" "0")
+ #t))
+ (add-after 'install 'move-desktop-files
+ ;; Move desktop files into 'bin' to avoid cycle references.
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let ((out (assoc-ref outputs "out"))
+ (bin (assoc-ref outputs "bin")))
+ (mkdir-p (string-append bin "/share"))
+ (rename-file (string-append out "/share/applications")
+ (string-append bin "/share/applications"))
+ #t))))))
+ (native-search-paths
+ (list (search-path-specification
+ (variable "GUIX_GTK3_PATH")
+ (files '("lib/gtk-3.0")))))))
+
+(define-public gtk
+ (package
+ (name "gtk")
+ (version "4.2.1")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "mirror://gnome/sources/" name "/"
+ (version-major+minor version) "/"
+ name "-" version ".tar.xz"))
+ (sha256
+ (base32 "1rh9fd5axf79pmd93hb2fmmflic5swcvqvq6vqghlgz4bmvnjc82"))
+ (patches
+ (search-patches "gtk4-respect-GUIX_GTK4_PATH.patch"))))
+ (build-system meson-build-system)
+ (outputs '("out" "bin" "doc"))
+ (arguments
+ `(#:modules ((guix build utils)
+ (guix build meson-build-system)
+ ((guix build glib-or-gtk-build-system) #:prefix glib-or-gtk:))
+ #:configure-flags
+ (list
+ "-Dbroadway-backend=true" ;for broadway display-backend
+ "-Dcloudproviders=enabled" ;for cloud-providers support
+ "-Dtracker=enabled" ;for filechooser search support
+ "-Dcolord=enabled" ;for color printing support
+ ,@(if (%current-target-system)
+ ;; If true, gtkdoc-scangobj will try to execute a
+ ;; cross-compiled binary.
+ '("-Dgtk_doc=false")
+ '("-Dgtk_doc=true"))
+ "-Dman-pages=true")
+ #:parallel-tests? #f ;parallel tests are not supported
+ #:test-options '("--setup=x11" ;defaults to wayland
+ ;; Use the same test options as upstream uses for
+ ;; their CI.
+ "--suite=gtk"
+ "--no-suite=gsk-compare-broadway")
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'generate-gdk-pixbuf-loaders-cache-file
+ (assoc-ref glib-or-gtk:%standard-phases
+ 'generate-gdk-pixbuf-loaders-cache-file))
+ (add-after 'unpack 'patch
+ (lambda* (#:key inputs native-inputs outputs #:allow-other-keys)
+ ;; Correct DTD resources of docbook.
+ (substitute* (find-files "docs" "\\.xml$")
+ (("http://www.oasis-open.org/docbook/xml/4.3/")
+ (string-append
+ (assoc-ref (or native-inputs inputs) "docbook-xml-4.3")
+ "/xml/dtd/docbook/")))
+ ;; Disable building of icon cache.
+ (substitute* "meson.build"
+ (("gtk_update_icon_cache: true")
+ "gtk_update_icon_cache: false"))
+ ;; Disable failing tests.
+ (substitute* (find-files "testsuite" "meson.build")
+ (("[ \t]*'empty-text.node',") "")
+ (("[ \t]*'testswitch.node',") "")
+ (("[ \t]*'widgetfactory.node',") ""))
+ (substitute* "testsuite/reftests/meson.build"
+ (("[ \t]*'label-wrap-justify.ui',") "")) ))
+ (add-before 'build 'set-cache
+ (lambda _
+ (setenv "XDG_CACHE_HOME" (getcwd))))
+ (add-before 'check 'pre-check
+ (lambda _
+ ;; Tests require a running X server.
+ (system "Xvfb :1 +extension GLX &")
+ (setenv "DISPLAY" ":1")
+ ;; Tests write to $HOME.
+ (setenv "HOME" (getcwd))
+ ;; Tests look for those variables.
+ (setenv "XDG_RUNTIME_DIR" (getcwd))
+ ;; For missing '/etc/machine-id'.
+ (setenv "DBUS_FATAL_WARNINGS" "0")))
+ (add-after 'install 'move-files
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (bin (assoc-ref outputs "bin"))
+ (doc (assoc-ref outputs "doc")))
+ (for-each mkdir-p
+ (list
+ (string-append bin "/bin")
+ (string-append bin "/share/applications")
+ (string-append bin "/share/icons")
+ (string-append bin "/share/man")
+ (string-append bin "/share/metainfo")
+ (string-append doc "/share/doc")))
+ ;; Move programs and related files to output 'bin'.
+ (for-each (lambda (dir)
+ (rename-file
+ (string-append out dir)
+ (string-append bin dir)))
+ (list
+ "/bin"
+ "/share/applications"
+ "/share/icons"
+ "/share/man"
+ "/share/metainfo"))
+ ;; Move HTML documentation to output 'doc'.
+ (rename-file
+ (string-append out "/share/doc")
+ (string-append doc "/share/doc"))))))))
+ (native-inputs
+ `(("docbook-xml-4.3" ,docbook-xml-4.3)
+ ("docbook-xsl" ,docbook-xsl)
+ ("gettext-minimal" ,gettext-minimal)
+ ("glib:bin" ,glib "bin")
+ ("gobject-introspection" ,gobject-introspection) ;for building introspection data
+ ("gtk-doc" ,gtk-doc) ;for building documentation
+ ("intltool" ,intltool)
+ ("libxslt" ,libxslt) ;for building man-pages
+ ("pkg-config" ,pkg-config)
+ ;; These python modules are required for building documentation.
+ ("python-jinja2" ,python-jinja2)
+ ("python-markdown" ,python-markdown)
+ ("python-markupsafe" ,python-markupsafe)
+ ("python-pygments" ,python-pygments)
+ ("python-toml" ,python-toml)
+ ("python-typogrify" ,python-typogrify)
+ ("sassc" ,sassc) ;for building themes
+ ("vala" ,vala)
+ ("xorg-server-for-tests" ,xorg-server-for-tests)))
+ (inputs
+ `(("colord" ,colord) ;for color printing support
+ ("cups" ,cups) ;for CUPS print-backend
+ ("ffmpeg" ,ffmpeg) ;for ffmpeg media-backend
+ ("fribidi" ,fribidi)
+ ("gstreamer" ,gstreamer) ;for gstreamer media-backend
+ ("gst-plugins-bad" ,gst-plugins-bad) ;provides gstreamer-player
+ ("gst-plugins-base" ,gst-plugins-base) ;provides gstreamer-gl
+ ("harfbuzz" ,harfbuzz)
+ ("iso-codes" ,iso-codes)
+ ("json-glib" ,json-glib)
+ ("libcloudproviders" ,libcloudproviders) ;for cloud-providers support
+ ("librsvg" ,librsvg)
+ ("python" ,python)
+ ("rest" ,rest)
+ ("tracker" ,tracker))) ;for filechooser search support
+ (propagated-inputs
+ ;; Following dependencies are referenced in .pc files.
+ `(("cairo" ,cairo)
+ ("fontconfig" ,fontconfig)
+ ("librsvg" ,librsvg)
+ ("glib" ,glib)
+ ("graphene" ,graphene)
+ ("libepoxy" ,libepoxy)
+ ("libx11" ,libx11) ;for x11 display-backend
+ ("libxcomposite" ,libxcomposite)
+ ("libxcursor" ,libxcursor)
+ ("libxdamage" ,libxdamage)
+ ("libxext" ,libxext)
+ ("libxfixes" ,libxfixes)
+ ("libxi" ,libxi)
+ ("libxinerama" ,libxinerama) ;for xinerama support
+ ("libxkbcommon" ,libxkbcommon)
+ ("libxrandr" ,libxrandr)
+ ("libxrender" ,libxrender)
+ ("pango" ,pango)
+ ("vulkan-headers" ,vulkan-headers)
+ ("vulkan-loader" ,vulkan-loader) ;for vulkan graphics API support
+ ("wayland" ,wayland) ;for wayland display-backend
+ ("wayland-protocols" ,wayland-protocols)))
+ (native-search-paths
+ (list
+ (search-path-specification
+ (variable "GUIX_GTK4_PATH")
+ (files '("lib/gtk-4.0")))))
+ (search-paths native-search-paths)
+ (home-page "https://www.gtk.org/")
+ (synopsis "Cross-platform widget toolkit")
+ (description "GTK is a multi-platform toolkit for creating graphical user
+interfaces. Offering a complete set of widgets, GTK is suitable for projects
+ranging from small one-off tools to complete application suites.")
+ (license license:lgpl2.1+)))
;;;
;;; Guile bindings.
@@ -1098,7 +1401,7 @@ exceptions, macros, and a dynamic programming environment.")
("libtool" ,libtool)
("texinfo" ,texinfo)))
(inputs `(("guile" ,guile-3.0)
- ("librsvg" ,librsvg)
+ ("librsvg" ,(librsvg-for-system))
("guile-lib" ,guile-lib))) ;for (unit-test)
(propagated-inputs `(("guile-cairo" ,guile-cairo)))
(synopsis "Render SVG images using Cairo from Guile")
@@ -1252,23 +1555,45 @@ guile-gnome-platform (GNOME developer libraries), and guile-gtksourceview.")
(define-public cairomm
(package
(name "cairomm")
- (version "1.12.2")
+ (version "1.16.0")
(source (origin
(method url-fetch)
(uri (string-append "https://www.cairographics.org/releases/"
- name "-" version ".tar.gz"))
+ name "-" version ".tar.xz"))
(sha256
(base32
- "16fmigxsaz85c3lgcls7biwyz8zy8c8h3jndfm54cxxas3a7zi25"))))
- (build-system gnu-build-system)
+ "1ya4y7qa000cjawqwswbqv26y5icfkmhs5iiiil4dxgrqn91923y"))))
+ (build-system meson-build-system)
+ (outputs '("out" "doc"))
(arguments
- ;; The examples lack -lcairo.
- '(#:make-flags '("LDFLAGS=-lcairo")))
- (native-inputs `(("pkg-config" ,pkg-config)))
+ `(#:glib-or-gtk? #t ; To wrap binaries and/or compile schemas
+ #:configure-flags
+ (list
+ "-Dbuild-documentation=true"
+ "-Dboost-shared=true")
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'install 'move-doc
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (doc (assoc-ref outputs "doc")))
+ (mkdir-p (string-append doc "/share"))
+ (rename-file
+ (string-append out "/share/doc")
+ (string-append doc "/share/doc"))
+ #t))))))
+ (native-inputs
+ `(("boost" ,boost)
+ ("dot" ,graphviz)
+ ("doxygen" ,doxygen)
+ ("mm-common" ,mm-common)
+ ("perl" ,perl)
+ ("pkg-config" ,pkg-config)
+ ("xsltproc" ,libxslt)))
+ (inputs
+ `(("fontconfig" ,fontconfig)))
(propagated-inputs
`(("libsigc++" ,libsigc++)
- ("freetype" ,freetype)
- ("fontconfig" ,fontconfig)
("cairo" ,cairo)))
(home-page "https://cairographics.org/")
(synopsis "C++ bindings to the Cairo 2D graphics library")
@@ -1277,37 +1602,61 @@ guile-gnome-platform (GNOME developer libraries), and guile-gtksourceview.")
library.")
(license license:lgpl2.0+)))
-(define-public cairomm-1.13
+(define-public cairomm-1.14
(package
(inherit cairomm)
(name "cairomm")
- (version "1.13.1")
+ (version "1.14.2")
(source
(origin
(method url-fetch)
(uri
(string-append "https://www.cairographics.org/releases/"
- name "-" version ".tar.gz"))
+ name "-" version ".tar.xz"))
(sha256
- (base32 "1xlfl0fm5mgv53lr8xjv2kqsk3bz67qkk6qzvbrqmbvbvvbqp9wp"))))
+ (base32 "1qwdj9xw1w651kqwh82nipbryimm1ir5n3c6q34nphsx576bj9h1"))))
(propagated-inputs
- `(("cairo" ,cairo)
- ("sigc++" ,libsigc++)))))
+ `(("libsigc++" ,libsigc++-2)
+ ,@(package-propagated-inputs cairomm)))))
(define-public pangomm
(package
(name "pangomm")
- (version "2.42.0")
+ (version "2.48.0")
(source (origin
- (method url-fetch)
- (uri (string-append "mirror://gnome/sources/" name "/"
- (version-major+minor version) "/"
- name "-" version ".tar.xz"))
- (sha256
- (base32
- "0mmzxp3wniaafkxr30sb22mq9x44xckb5d60h1bl99lkzxks0vfa"))))
- (build-system gnu-build-system)
- (native-inputs `(("pkg-config" ,pkg-config)))
+ (method url-fetch)
+ (uri (string-append "mirror://gnome/sources/" name "/"
+ (version-major+minor version) "/"
+ name "-" version ".tar.xz"))
+ (sha256
+ (base32
+ "0y2vyp6azvhrii6rzs89kr08wg8z1p562awyr812131zqdsd83ly"))))
+ (build-system meson-build-system)
+ (outputs '("out" "doc"))
+ (arguments
+ `(#:glib-or-gtk? #t ; To wrap binaries and/or compile schemas
+ #:configure-flags
+ (list
+ "-Dbuild-documentation=true")
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'install 'move-doc
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (doc (assoc-ref outputs "doc")))
+ (mkdir-p (string-append doc "/share"))
+ (rename-file
+ (string-append out "/share/doc")
+ (string-append doc "/share/doc"))
+ #t))))))
+ (native-inputs
+ `(("dot" ,graphviz)
+ ("doxygen" ,doxygen)
+ ("m4" ,m4)
+ ("mm-common" ,mm-common)
+ ("perl" ,perl)
+ ("pkg-config" ,pkg-config)
+ ("xsltproc" ,libxslt)))
(propagated-inputs
`(("cairo" ,cairo)
("cairomm" ,cairomm)
@@ -1320,11 +1669,11 @@ library.")
library.")
(license license:lgpl2.1+)))
-(define-public pangomm-2.42
+(define-public pangomm-2.46
(package
(inherit pangomm)
(name "pangomm")
- (version "2.42.1")
+ (version "2.46.0")
(source
(origin
(method url-fetch)
@@ -1333,102 +1682,202 @@ library.")
(version-major+minor version) "/"
name "-" version ".tar.xz"))
(sha256
- (base32 "03zli5amizhv9bfklwfq7xyf0b5dagchx1lnz9f0v1rhk69h9gql"))))
+ (base32 "06zczkaxf5p5kjgnzrfylzi40w9a8lxpndgs7rpn12qrsq27sy6k"))))
(propagated-inputs
- `(("cairomm" ,cairomm-1.13)
+ `(("cairomm" ,cairomm-1.14)
("glibmm" ,glibmm-2.64)
("pango" ,pango)))))
(define-public atkmm
(package
(name "atkmm")
- (version "2.28.0")
+ (version "2.36.0")
(source (origin
- (method url-fetch)
- (uri (string-append "mirror://gnome/sources/" name "/"
- (version-major+minor version) "/"
- name "-" version ".tar.xz"))
- (sha256
- (base32
- "0fnxrspxkhhbrjphqrpvl3zjm66n50s4cywrrrwkhbflgy8zqk2c"))))
- (build-system gnu-build-system)
- (native-inputs `(("pkg-config" ,pkg-config)))
+ (method url-fetch)
+ (uri (string-append "mirror://gnome/sources/" name "/"
+ (version-major+minor version) "/"
+ name "-" version ".tar.xz"))
+ (sha256
+ (base32
+ "0wwr0663jrqx2klsasffd9wpk3kqnwisj1y3ahdkjdk5hzrsjgy9"))))
+ (build-system meson-build-system)
+ (outputs '("out" "doc"))
+ (arguments
+ `(#:glib-or-gtk? #t ; To wrap binaries and/or compile schemas
+ #:configure-flags
+ (list
+ "-Dbuild-documentation=true")
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'install 'move-doc
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (doc (assoc-ref outputs "doc")))
+ (mkdir-p (string-append doc "/share"))
+ (rename-file
+ (string-append out "/share/doc")
+ (string-append doc "/share/doc"))
+ #t))))))
+ (native-inputs
+ `(("dot" ,graphviz)
+ ("doxygen" ,doxygen)
+ ("m4" ,m4)
+ ("mm-common" ,mm-common)
+ ("perl" ,perl)
+ ("pkg-config" ,pkg-config)
+ ("xsltproc" ,libxslt)))
(propagated-inputs
`(("glibmm" ,glibmm) ("atk" ,atk)))
- (home-page "https://www.gtkmm.org")
- (synopsis "C++ interface to the ATK accessibility library")
- (description
- "ATKmm provides a C++ programming interface to the ATK accessibility
-toolkit.")
- (license license:lgpl2.1+)))
+ (synopsis "C++ bindings for ATK")
+ (description "ATKmm is the C++ binding for the ATK library.")
+ (home-page "https://wiki.gnome.org/Accessibility")
+ (license
+ (list
+ ;; Library
+ license:lgpl2.1+
+ ;; Tools
+ license:gpl2+))))
+
+(define-public atkmm-2.28
+ (package
+ (inherit atkmm)
+ (name "atkmm")
+ (version "2.28.1")
+ (source
+ (origin
+ (method url-fetch)
+ (uri
+ (string-append "mirror://gnome/sources/" name "/"
+ (version-major+minor version) "/"
+ name "-" version ".tar.xz"))
+ (sha256
+ (base32 "1b8vycqzr3lfvk2l73f4kk74hj48081zbh9r1r2ilr3h8xh7cs0i"))))
+ (propagated-inputs
+ `(("glibmm" ,glibmm-2.64)
+ ,@(package-propagated-inputs atkmm)))))
(define-public gtkmm
(package
(name "gtkmm")
- (version "3.24.2")
- (source (origin
- (method url-fetch)
- (uri (string-append "mirror://gnome/sources/" name "/"
- (version-major+minor version) "/"
- name "-" version ".tar.xz"))
- (sha256
- (base32
- "1hxdnhavjyvbcpxhd5z17l9fj4182028s66lc0s16qqqrldhjwbd"))))
- (build-system gnu-build-system)
- (native-inputs `(("pkg-config" ,pkg-config)
- ("glib" ,glib "bin") ;for 'glib-compile-resources'
- ("xorg-server" ,xorg-server-for-tests)))
+ (version "4.4.0")
+ (source
+ (origin
+ (method url-fetch)
+ (uri
+ (string-append "mirror://gnome/sources/" name "/"
+ (version-major+minor version) "/"
+ name "-" version ".tar.xz"))
+ (sha256
+ (base32 "1nhdf1s437k41af6frbqw2sky46qci0hgkg9h86a9rlnc0r69d1f"))))
+ (build-system meson-build-system)
+ (outputs '("out" "doc"))
+ (arguments
+ `(#:configure-flags '("-Dbuild-documentation=true")
+ #:phases
+ (modify-phases %standard-phases
+ (add-before 'build 'set-cache
+ (lambda _
+ (setenv "XDG_CACHE_HOME" (getcwd))))
+ (add-before 'check 'pre-check
+ (lambda _
+ ;; Tests require a running X server.
+ (system "Xvfb :1 +extension GLX &")
+ (setenv "DISPLAY" ":1")
+ ;; Tests write to $HOME.
+ (setenv "HOME" (getcwd))
+ (setenv "XDG_RUNTIME_DIR" (getcwd))
+ ;; For missing '/etc/machine-id'.
+ (setenv "DBUS_FATAL_WARNINGS" "0")))
+ (add-after 'install 'move-doc
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (doc (assoc-ref outputs "doc")))
+ (mkdir-p (string-append doc "/share"))
+ (rename-file
+ (string-append out "/share/doc")
+ (string-append doc "/share/doc"))))))))
+ (native-inputs
+ `(("dot" ,graphviz)
+ ("doxygen" ,doxygen)
+ ("glib:bin" ,glib "bin")
+ ("m4" ,m4)
+ ("mm-common" ,mm-common)
+ ("perl" ,perl)
+ ("pkg-config" ,pkg-config)
+ ("xsltproc" ,libxslt)
+ ("xorg-server" ,xorg-server-for-tests)))
(propagated-inputs
- `(("pangomm" ,pangomm)
+ `(("atkmm" ,atkmm)
("cairomm" ,cairomm)
- ("atkmm" ,atkmm)
- ("gtk+" ,gtk+)
- ("glibmm" ,glibmm)))
- (arguments
- `(#:disallowed-references (,xorg-server-for-tests)
- #:phases (modify-phases %standard-phases
- (add-before 'check 'run-xvfb
- (lambda* (#:key inputs #:allow-other-keys)
- (let ((xorg-server (assoc-ref inputs "xorg-server")))
- ;; Tests such as 'object_move/test' require a running
- ;; X server.
- (system (string-append xorg-server "/bin/Xvfb :1 &"))
- (setenv "DISPLAY" ":1")
- ;; Don't fail because of the missing /etc/machine-id.
- (setenv "DBUS_FATAL_WARNINGS" "0")
- #t))))))
+ ("glibmm" ,glibmm)
+ ("gtk" ,gtk)
+ ("pangomm" ,pangomm)))
+ (synopsis "C++ Interfaces for GTK+ and GNOME")
+ (description "GTKmm is the official C++ interface for the popular GUI
+library GTK+. Highlights include typesafe callbacks, and a comprehensive set
+of widgets that are easily extensible via inheritance. You can create user
+interfaces either in code or with the Glade User Interface designer, using
+libglademm. There's extensive documentation, including API reference and a
+tutorial.")
(home-page "https://gtkmm.org/")
- (synopsis
- "C++ interface to the GTK+ graphical user interface library")
- (description
- "gtkmm is the official C++ interface for the popular GUI library GTK+.
-Highlights include typesafe callbacks, and a comprehensive set of widgets that
-are easily extensible via inheritance. You can create user interfaces either
-in code or with the Glade User Interface designer, using libglademm. There's
-extensive documentation, including API reference and a tutorial.")
- (license license:lgpl2.1+)))
+ (license
+ (list
+ ;; Library
+ license:lgpl2.1+
+ ;; Tools
+ license:gpl2+))))
+(define-public gtkmm-3
+ (package
+ (inherit gtkmm)
+ (name "gtkmm")
+ (version "3.24.5")
+ (source
+ (origin
+ (method url-fetch)
+ (uri
+ (string-append "mirror://gnome/sources/" name "/"
+ (version-major+minor version) "/"
+ name "-" version ".tar.xz"))
+ (sha256
+ (base32 "1ri2msp3cmzi6r65ghwb8gfavfaxv0axpwi3q60nm7v8hvg36qw5"))))
+ (arguments
+ (substitute-keyword-arguments (package-arguments gtkmm)
+ ;; Use meson 0.59 to workaround a new issue with meson 0.60 (see:
+ ;; https://github.com/mesonbuild/meson/issues/9350#issuecomment-953799600).
+ ((#:meson _ #f)
+ meson-0.59)))
+ (propagated-inputs
+ `(("atkmm-2.28" ,atkmm-2.28)
+ ("cairomm-1.14" ,cairomm-1.14)
+ ("glibmm" ,glibmm)
+ ("gtk+" ,gtk+)
+ ("pangomm-2.42" ,pangomm-2.46)))))
(define-public gtkmm-2
- (package (inherit gtkmm)
+ (package
+ (inherit gtkmm)
(name "gtkmm")
(version "2.24.5")
- (source (origin
- (method url-fetch)
- (uri (string-append "mirror://gnome/sources/" name "/"
- (version-major+minor version) "/"
- name "-" version ".tar.xz"))
- (sha256
- (base32
- "0wkbzvsx4kgw16f6xjdc1dz7f77ldngdila4yi5lw2zrgcxsb006"))))
- (arguments '())
- (native-inputs `(("pkg-config" ,pkg-config)))
+ (source
+ (origin
+ (method url-fetch)
+ (uri
+ (string-append "mirror://gnome/sources/" name "/"
+ (version-major+minor version) "/"
+ name "-" version ".tar.xz"))
+ (sha256
+ (base32 "0wkbzvsx4kgw16f6xjdc1dz7f77ldngdila4yi5lw2zrgcxsb006"))))
+ (build-system gnu-build-system)
+ (arguments
+ (strip-keyword-arguments
+ '(#:configure-flags) (package-arguments gtkmm)))
(propagated-inputs
- `(("pangomm" ,pangomm)
- ("cairomm" ,cairomm)
- ("atkmm" ,atkmm)
+ `(("atkmm" ,atkmm-2.28)
+ ("cairomm" ,cairomm-1.14)
+ ("glibmm" ,glibmm-2.64)
("gtk+" ,gtk+-2)
- ("glibmm" ,glibmm)))))
+ ("pangomm" ,pangomm-2.46)))))
(define-public gtksourceviewmm
(package
@@ -1447,7 +1896,7 @@ extensive documentation, including API reference and a tutorial.")
(propagated-inputs
;; In 'Requires' of gtksourceviewmm-3.0.pc.
`(("glibmm" ,glibmm)
- ("gtkmm" ,gtkmm)
+ ("gtkmm" ,gtkmm-3)
("gtksourceview" ,gtksourceview-3)))
(synopsis "C++ interface to the GTK+ 'GtkTextView' widget")
(description
@@ -1465,7 +1914,7 @@ printing and other features typical of a source code editor.")
(define-public python-pycairo
(package
(name "python-pycairo")
- (version "1.19.1")
+ (version "1.20.0")
(source
(origin
(method url-fetch)
@@ -1473,7 +1922,7 @@ printing and other features typical of a source code editor.")
version "/pycairo-" version ".tar.gz"))
(sha256
(base32
- "111fav9m1iagw3nh2ws2vzkjh34r97yl7rdlpvsngsqg521k251c"))))
+ "1326aa2ybhhhrvz3n4p22z5sic25m016ddb5yq0hvbprnw6a35an"))))
(build-system python-build-system)
(native-inputs
`(("pkg-config" ,pkg-config)
@@ -1792,7 +2241,7 @@ information.")
(define-public gtk-doc
(package
(name "gtk-doc")
- (version "1.28")
+ (version "1.33.2")
(source (origin
(method url-fetch)
(uri (string-append "mirror://gnome/sources/" name "/"
@@ -1800,8 +2249,10 @@ information.")
name "-" version ".tar.xz"))
(sha256
(base32
- "05apmwibkmn1icx05l8aw241lhymcx01zvk5i499cb150bijj7li"))))
- (build-system gnu-build-system)
+ "0hxza8qp52lrq7s1vbilz2vh4170cail560zi8khl0zb42d706yc"))
+ (patches
+ (search-patches "gtk-doc-respect-xml-catalog.patch"))))
+ (build-system meson-build-system)
(arguments
`(#:parallel-tests? #f
#:phases
@@ -1809,82 +2260,67 @@ information.")
(add-after 'unpack 'patch-gtk-doc-scan
(lambda* (#:key inputs #:allow-other-keys)
(substitute* "gtk-doc.xsl"
- (("http://docbook.sourceforge.net/release/xsl/current/html/chunk.xsl")
- (string-append (assoc-ref inputs "docbook-xsl")
- "/xml/xsl/docbook-xsl-"
- ,(package-version docbook-xsl)
- "/html/chunk.xsl"))
- (("http://docbook.sourceforge.net/release/xsl/current/common/en.xml")
- (string-append (assoc-ref inputs "docbook-xsl")
- "/xml/xsl/docbook-xsl-"
- ,(package-version docbook-xsl)
- "/common/en.xml")))
- #t))
- (add-after 'patch-gtk-doc-scan 'patch-test-out
- (lambda _
- ;; sanity.sh counts the number of status lines. Since our
- ;; texlive regenerates the fonts every time and the font
- ;; generator metafont outputs a lot of extra lines, this
- ;; test would always fail. Disable it for now.
- (substitute* "tests/Makefile.in"
- (("empty.sh sanity.sh") "empty.sh"))
+ (("http://docbook.sourceforge.net/release/xsl/current/html/chunk.xsl")
+ (string-append (assoc-ref inputs "docbook-xsl")
+ "/xml/xsl/docbook-xsl-"
+ ,(package-version docbook-xsl)
+ "/html/chunk.xsl"))
+ (("http://docbook.sourceforge.net/release/xsl/current/common/en.xml")
+ (string-append (assoc-ref inputs "docbook-xsl")
+ "/xml/xsl/docbook-xsl-"
+ ,(package-version docbook-xsl)
+ "/common/en.xml")))
#t))
- (add-before 'build 'set-HOME
+ (add-after 'unpack 'disable-failing-tests
(lambda _
- ;; FIXME: dblatex with texlive-union does not find the built
- ;; metafonts, so it tries to generate them in HOME.
- (setenv "HOME" "/tmp")
- #t))
- (add-before 'configure 'fix-docbook
- (lambda* (#:key inputs #:allow-other-keys)
- (substitute* "configure"
- ;; The configure check is overzealous about making sure that
- ;; things are in place -- it uses the xmlcatalog tool to make
- ;; sure that docbook-xsl is available, but this tool can only
- ;; look in one catalog file, unlike the $XML_CATALOG_FILES
- ;; variable that Guix defines. Fool the test by using the
- ;; docbook-xsl catalog explicitly and get on with life.
- (("\"\\$XML_CATALOG_FILE\" \
-\"http://docbook.sourceforge.net/release/xsl/")
- (string-append (car (find-files (assoc-ref inputs "docbook-xsl")
- "^catalog.xml$"))
- " \"http://docbook.sourceforge.net/release/xsl/")))
+ (substitute* "tests/Makefile.am"
+ (("annotations.sh bugs.sh empty.sh fail.sh gobject.sh program.sh")
+ ""))
#t))
(add-after 'install 'wrap-executables
(lambda* (#:key outputs #:allow-other-keys)
(let ((out (assoc-ref outputs "out")))
(for-each (lambda (prog)
(wrap-program prog
- `("PYTHONPATH" ":" prefix (,(getenv "PYTHONPATH")))))
- (find-files (string-append out "/bin")))
- #t))))
- #:configure-flags
- (list (string-append "--with-xml-catalog="
- (assoc-ref %build-inputs "docbook-xml")
- "/xml/dtd/docbook/catalog.xml"))))
+ `("GUIX_PYTHONPATH" ":" prefix (,(getenv "GUIX_PYTHONPATH")))))
+ (find-files (string-append out "/bin")))))))))
(native-inputs
- `(("pkg-config" ,pkg-config)
+ `(("gettext" ,gettext-minimal)
+ ("glib:bin" ,glib "bin")
+ ("gobject-introspection" ,gobject-introspection)
("itstool" ,itstool)
- ("libxml" ,libxml2)
- ("gettext" ,gettext-minimal)
- ("bc" ,bc)))
+ ("perl" ,perl)
+ ("pkg-config" ,pkg-config)
+ ("python-wrapper" ,python-wrapper)))
(inputs
- `(("perl" ,perl)
- ("python" ,python)
- ("xsltproc" ,libxslt)
+ `(("bc" ,bc)
("dblatex" ,dblatex)
("docbook-xml" ,docbook-xml-4.3)
("docbook-xsl" ,docbook-xsl)
- ("source-highlight" ,source-highlight)
("glib" ,glib)
- ("python-six" ,python-six)))
- (home-page "https://www.gtk.org/gtk-doc/")
- (synopsis "Documentation generator from C source code")
- (description
- "GTK-Doc generates API documentation from comments added to C code. It is
-typically used to document the public API of GTK+ and GNOME libraries, but it
-can also be used to document application code.")
- (license license:gpl2+)))
+ ("libxml2" ,libxml2)
+ ("libxslt" ,libxslt)
+ ("python" ,python)
+ ("python-anytree" ,python-anytree)
+ ("python-lxml" ,python-lxml)
+ ("python-parameterized" ,python-parameterized)
+ ("python-pygments" ,python-pygments)
+ ("python-unittest2" ,python-unittest2)
+ ("source-highlight" ,source-highlight)
+ ("yelp-tools" ,yelp-tools)))
+ (home-page "https://wiki.gnome.org/DocumentationProject/GtkDoc")
+ (synopsis "GTK+ DocBook Documentation Generator")
+ (description "GtkDoc is a tool used to extract API documentation from C-code
+like Doxygen, but handles documentation of GObject (including signals and
+properties) that makes it very suitable for GTK+ apps and libraries. It uses
+docbook for intermediate files and can produce html by default and pdf/man-pages
+with some extra work.")
+ (license
+ (list
+ ;; Docs.
+ license:fdl1.1+
+ ;; Others.
+ license:gpl2+))))
;; This is a variant of the 'gtk-doc' package that is not updated often. It
;; is intended to be used as a native-input at build-time only. This allows
@@ -2017,7 +2453,7 @@ Parcellite and adds bugfixes and features.")
(define-public graphene
(package
(name "graphene")
- (version "1.10.0")
+ (version "1.10.6")
(source
(origin
(method git-fetch)
@@ -2027,15 +2463,19 @@ Parcellite and adds bugfixes and features.")
(commit version)))
(file-name (git-file-name name version))
(sha256
- (base32 "14a0j1rvjlc7yhfdmhmckdmkzy4ch61qbzywdlw1xv58h23wx29p"))))
+ (base32 "0g2jjy6xizzjxlp0dr81h1f5l16dzcnhznhj6jvhpdjqcvgp98xr"))))
(build-system meson-build-system)
(arguments
`(#:glib-or-gtk? #t ; To wrap binaries and/or compile schemas
#:configure-flags
(list
- "-Dinstalled_tests=false")))
+ "-Dinstalled_tests=false"
+ ,@(if (%current-target-system)
+ ;; Introspection requires running binaries for 'host' on 'build'.
+ '("-Dintrospection=false")
+ '()))))
(native-inputs
- `(("git" ,git-minimal)
+ `(("git" ,git-minimal/fixed)
("gobject-introspection" ,gobject-introspection)
("mutest" ,mutest)
("pkg-config" ,pkg-config)))
@@ -2349,7 +2789,8 @@ library for drawing.")
(build-system gnu-build-system)
(arguments
`(#:configure-flags (list "--enable-glade"
- "--enable-introspection")
+ "--enable-introspection"
+ "CFLAGS=-fcommon")
#:phases
(modify-phases %standard-phases
;; The "configure" script is present, but otherwise the project is
@@ -2359,11 +2800,14 @@ library for drawing.")
(lambda _
(delete-file "configure")
#t))
- (add-after 'unpack 'rename-type
+ (add-after 'unpack 'patch-for-compatibility
(lambda _
(substitute* "glade/glade-gtksheet-editor.c"
(("GladeEditableIface") "GladeEditableInterface"))
- #t))
+ ;; Glade 3.37 renamed the macro GWA_GET_CLASS to
+ ;; GLADE_WIDGET_ADAPTOR_GET_ADAPTOR_CLASS.
+ (substitute* "glade/glade-gtksheet-editor.c"
+ (("GWA_GET_CLASS") "GLADE_WIDGET_ADAPTOR_GET_ADAPTOR_CLASS"))))
;; Fix glade install directories.
(add-before 'bootstrap 'configure-glade-directories
(lambda* (#:key outputs #:allow-other-keys)
diff --git a/gnu/packages/guile-xyz.scm b/gnu/packages/guile-xyz.scm
index 37add951ac..01a25abee9 100644
--- a/gnu/packages/guile-xyz.scm
+++ b/gnu/packages/guile-xyz.scm
@@ -1159,9 +1159,7 @@ messaging library.")
;; command.
(substitute* "src/hmac.scm"
(("openssl")
- (string-append (assoc-ref inputs "openssl")
- "/bin/openssl")))
- #t))
+ (search-input-file inputs "/bin/openssl")))))
;; XXX: The code uses 'include' to include its own source
;; files, and "-L src" isn't enough in this case.
@@ -1283,7 +1281,9 @@ tracker's SOAP service, such as @url{https://bugs.gnu.org}.")
version ".tar.lz"))
(sha256
(base32
- "1rc8r0fgvflnyq5ckl7ii8sghpsgpkzxa8vskjr1ak2kyar6m35k"))))
+ "1rc8r0fgvflnyq5ckl7ii8sghpsgpkzxa8vskjr1ak2kyar6m35k"))
+ (patches
+ (search-patches "guile-email-fix-tests.patch"))))
(build-system gnu-build-system)
(native-inputs
`(("pkg-config" ,pkg-config)
@@ -1787,6 +1787,9 @@ provides tight coupling to Guix.")
"GUILE_PKG([3.0 2.2 2.0])\n"))
#t))))
(build-system gnu-build-system)
+ ;; XXX: Tests expect 'test-runner-current' to not return #f after
+ ;; 'test-end', which is no longer the case in Guile 3.0.7.
+ (arguments '(#:tests? #f))
(native-inputs
`(("autoconf" ,autoconf)
("automake" ,automake)
@@ -2912,7 +2915,7 @@ chunks can be expressions as well as simple tokens.")
(("/usr/local/lib/guile")
(string-append (assoc-ref outputs "out") "/lib/guile"))
(("/usr/local/include/guile")
- (string-append (assoc-ref inputs "guile") "/include/guile"))
+ (search-input-directory inputs "/include/guile"))
(("-L/usr/local/lib")
(string-append "-L" (assoc-ref inputs "guile") "/lib")))
#t))
@@ -3318,7 +3321,7 @@ API.")
("perl" ,perl)
("pkg-config" ,pkg-config)
("texinfo" ,texinfo)
- ("texlive" ,(texlive-union (list texlive-generic-epsf)))))
+ ("texlive" ,(texlive-updmap.cfg (list texlive-epsf)))))
(inputs
`(("dbus-glib" ,dbus-glib)
("guile" ,guile-3.0)
@@ -3602,7 +3605,7 @@ feature-set, fully programmable in Guile Scheme.")
("vigra-c" ,vigra-c)
("guile" ,guile-2.2)))
(native-inputs
- `(("texlive" ,(texlive-union (list texlive-booktabs
+ `(("texlive" ,(texlive-updmap.cfg (list texlive-booktabs
texlive-lm
texlive-siunitx
texlive-standalone
@@ -3990,7 +3993,14 @@ over, or update a value in arbitrary data structures.")
(file-name (git-file-name name version))
(sha256
(base32
- "16k61f1jn3g48jaf3730b9l0izr5j933jzyri73nmcnjd09gm35i"))))
+ "16k61f1jn3g48jaf3730b9l0izr5j933jzyri73nmcnjd09gm35i"))
+ (modules '((guix build utils)))
+ (snippet
+ ;; Guile >= 3.0.7 no longer uses libltdl so we need to explicitly add
+ ;; ".libs" so that 'load-extension' finds the '.so' file.
+ '(substitute* "pre-inst-env.in"
+ (("^LD_LIBRARY_PATH=.*$")
+ "LD_LIBRARY_PATH=\"$abs_top_builddir/.libs\"\n")))))
(build-system gnu-build-system)
(arguments
'(#:make-flags '("GUILE_AUTO_COMPILE=0"))) ; to prevent guild warnings
@@ -4531,12 +4541,12 @@ including parsing and code generation.")
(delete-file-recursively "docs")
#t))
(add-after 'install 'install-info-documentation
- (lambda* (#:key outputs #:allow-other-keys)
+ (lambda* (#:key inputs outputs #:allow-other-keys)
(let* ((share (string-append (assoc-ref outputs "out") "/share"))
(doc (string-append share "/doc/" ,name "-" ,version))
(info (string-append share "/info/"))
- (makeinfo (string-append (assoc-ref %build-inputs "texinfo")
- "/bin/makeinfo")))
+ (makeinfo (search-input-file inputs
+ "/bin/makeinfo")))
(invoke makeinfo "guile-shapefile.texi" "-o" info)
#t))))))
(inputs
diff --git a/gnu/packages/guile.scm b/gnu/packages/guile.scm
index 2108b9f9d3..28887dd69f 100644
--- a/gnu/packages/guile.scm
+++ b/gnu/packages/guile.scm
@@ -16,6 +16,7 @@
;;; Copyright © 2018 Eric Bavier <bavier@member.fsf.org>
;;; Copyright © 2019 Taylan Kammer <taylan.kammer@gmail.com>
;;; Copyright © 2020, 2021 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -62,9 +63,7 @@
#:use-module (guix build-system gnu)
#:use-module (guix build-system guile)
#:use-module (guix deprecation)
- #:use-module (guix utils)
- #:use-module (ice-9 match)
- #:use-module ((srfi srfi-1) #:prefix srfi-1:))
+ #:use-module (guix utils))
;;; Commentary:
;;;
@@ -85,7 +84,12 @@
"0l200a0v7h8bh0cwz6v7hc13ds39cgqsmfrks55b1rbj5vniyiy3"))
(patches (search-patches "guile-1.8-cpp-4.5.patch"))))
(build-system gnu-build-system)
- (arguments '(#:configure-flags '("--disable-error-on-warning")
+ (arguments '(#:configure-flags '("--disable-error-on-warning"
+
+ ;; Build with '-O1' to work around GC
+ ;; crash on x86_64:
+ ;; <https://issues.guix.gnu.org/50427>.
+ "CFLAGS=-O1 -g -Wall")
;; Insert a phase before `configure' to patch things up.
#:phases
@@ -104,21 +108,24 @@
;; The usual /bin/sh...
(substitute* "ice-9/popen.scm"
- (("/bin/sh") (which "sh")))
- #t)))))
+ (("/bin/sh") (which "sh"))))))
+
+ ;; XXX: Several numerical tests and tests related to
+ ;; 'inet-pton' fail on glibc 2.33/GCC 10. Disable them.
+ ;; TODO: Remove this package when its dependents no longer
+ ;; need it.
+ #:tests? #f))
;; When cross-compiling, a native version of Guile itself is needed.
(native-inputs (if (%current-target-system)
`(("self" ,this-package))
'()))
- (inputs `(("gawk" ,gawk)
- ("readline" ,readline)))
+ (inputs (list gawk readline))
;; Since `guile-1.8.pc' has "Libs: ... -lgmp -lltdl", these must be
;; propagated.
- (propagated-inputs `(("gmp" ,gmp)
- ("libltdl" ,libltdl)))
+ (propagated-inputs (list gmp libltdl))
(native-search-paths
(list (search-path-specification
@@ -180,6 +187,11 @@ without requiring the source code to be rewritten.")
(arguments
`(#:configure-flags '("--disable-static") ; saves 3 MiB
+
+ ;; Work around non-reproducible .go files as described in
+ ;; <https://bugs.gnu.org/20272>, which affects 2.0, 2.2, and 3.0 so far.
+ #:parallel-build? #f
+
#:phases
(modify-phases %standard-phases
,@(if (hurd-system?)
@@ -246,7 +258,8 @@ without requiring the source code to be rewritten.")
"013mydzhfswqci6xmyc1ajzd59pfbdak15i0b090nhr9bzm7dxyd"))
(modules '((guix build utils)))
(patches (search-patches
- "guile-2.2-skip-oom-test.patch"))
+ "guile-2.2-skip-oom-test.patch"
+ "guile-2.2-skip-so-test.patch"))
;; Remove the pre-built object files. Instead, build everything
;; from source, at the expense of significantly longer build
@@ -255,6 +268,13 @@ without requiring the source code to be rewritten.")
(for-each delete-file
(find-files "prebuilt" "\\.go$"))
#t))))
+ (arguments
+ (substitute-keyword-arguments (package-arguments guile-2.0)
+ ((#:configure-flags flags ''())
+ (if (target-x86-32?) ;<https://issues.guix.gnu.org/49368>
+ `(append ,flags '("CFLAGS=-g -O2 -fexcess-precision=standard"))
+ flags))))
+
(properties '((timeout . 72000) ;20 hours
(max-silent-time . 36000))) ;10 hours (needed on ARM
; when heavily loaded)
@@ -285,21 +305,75 @@ without requiring the source code to be rewritten.")
(package
(inherit guile-2.2)
(name "guile")
- (version "3.0.2")
+ (version "3.0.7")
(source (origin
(inherit (package-source guile-2.2))
+ (patches '()) ; We no longer need the patches.
(uri (string-append "mirror://gnu/guile/guile-"
version ".tar.xz"))
(sha256
(base32
- "12lziar4j27j9whqp2n18427q45y9ghq7gdd8lqhmj1k0lr7vi2k"))))
+ "1dwiwsrpm4f96alfnz6wibq378242z4f16vsxgy1n9r00v3qczgm"))
+ ;; Replace the snippet because the oom-test still
+ ;; fails on some 32-bit architectures.
+ (snippet '(begin
+ (substitute* "test-suite/standalone/Makefile.in"
+ (("test-out-of-memory") ""))
+ (for-each delete-file
+ (find-files "prebuilt" "\\.go$"))))))
+
+ ;; Build with the bundled mini-GMP to avoid interference with GnuTLS' own
+ ;; use of GMP via Nettle: <https://issues.guix.gnu.org/46330>.
+ (propagated-inputs
+ (modify-inputs (package-propagated-inputs guile-2.2)
+ (delete "gmp" "libltdl")))
(arguments
- ;; XXX: JIT-enabled Guile crashes in obscure ways on GNU/Hurd.
- (if (hurd-target?)
- (substitute-keyword-arguments (package-arguments guile-2.2)
- ((#:configure-flags flags ''())
- `(cons "--disable-jit" ,flags)))
- (package-arguments guile-2.2)))
+ (substitute-keyword-arguments (package-arguments guile-2.0)
+ ((#:configure-flags flags ''())
+ ;; XXX: JIT-enabled Guile crashes in obscure ways on GNU/Hurd.
+ `(cons* ,@(if (hurd-target?)
+ '("--disable-jit")
+ '())
+ ;; -fexcess-precision=standard is required when compiling for
+ ;; i686-linux, otherwise "numbers.test" will fail
+ ;; (see <https://issues.guix.gnu.org/49368> and
+ ;; <https://issues.guix.gnu.org/49659>).
+ ;; TODO: Keep this in GUILE-2.2 and remove from here on next
+ ;; rebuild cycle.
+ ,@(if (target-x86-32?)
+ '("CFLAGS=-g -O2 -fexcess-precision=standard")
+ '())
+ "--enable-mini-gmp"
+ ,flags))
+ ((#:phases phases)
+ `(modify-phases ,phases
+ (add-before 'check 'disable-stack-overflow-test
+ (lambda _
+ ;; This test can invoke the "OOM killer", especially when
+ ;; running on emulated hardware (QEMU). Skip it.
+ (substitute* "test-suite/standalone/test-stack-overflow"
+ (("!#")
+ "!#\n(exit 77)\n"))))
+
+ ,@(if (string-prefix? "powerpc-" (%current-system))
+ `((add-after 'unpack 'adjust-bootstrap-flags
+ (lambda _
+ ;; Upstream knows about suggested solution.
+ ;; https://debbugs.gnu.org/cgi/bugreport.cgi?bug=45214
+ (substitute* "bootstrap/Makefile.in"
+ (("^GUILE_OPTIMIZATIONS.*")
+ "GUILE_OPTIMIZATIONS = -O1 -Oresolve-primitives -Ocps\n")))))
+ '())
+ ,@(if (or (target-ppc32?)
+ (target-riscv64?))
+ `((add-after 'unpack 'skip-failing-fdes-test
+ (lambda _
+ ;; ERROR: ((system-error "seek" "~A" ("Bad file descriptor") (9)))
+ (substitute* "test-suite/tests/ports.test"
+ (("fdes not closed\"" all) (string-append all "(exit 77)")))
+ #t)))
+ '())))))
+
(native-search-paths
(list (search-path-specification
(variable "GUILE_LOAD_PATH")
@@ -310,31 +384,7 @@ without requiring the source code to be rewritten.")
"share/guile/site/3.0")))))))
(define-public guile-3.0-latest
- ;; TODO: Make this 'guile-3.0' on the next rebuild cycle.
- (package
- (inherit guile-3.0)
- (version "3.0.7")
- (source (origin
- (inherit (package-source guile-3.0)) ;preserve snippet
- (patches '())
- (uri (string-append "mirror://gnu/guile/guile-"
- version ".tar.xz"))
- (sha256
- (base32
- "1dwiwsrpm4f96alfnz6wibq378242z4f16vsxgy1n9r00v3qczgm"))))
-
- ;; Build with the bundled mini-GMP to avoid interference with GnuTLS' own
- ;; use of GMP via Nettle: <https://issues.guix.gnu.org/46330>. Use
- ;; LIBGC/DISABLE-MUNMAP to work around <https://bugs.gnu.org/40525>.
- ;; Remove libltdl, which is no longer used.
- (propagated-inputs
- `(("bdw-gc" ,libgc/disable-munmap)
- ,@(srfi-1:fold srfi-1:alist-delete (package-propagated-inputs guile-3.0)
- '("gmp" "libltdl" "bdw-gc"))))
- (arguments
- (substitute-keyword-arguments (package-arguments guile-3.0)
- ((#:configure-flags flags ''())
- `(cons "--enable-mini-gmp" ,flags))))))
+ guile-3.0)
(define-public guile-3.0/libgc-7
;; Using libgc-7 avoid crashes that can occur, particularly when loading
@@ -344,8 +394,8 @@ without requiring the source code to be rewritten.")
(package
(inherit guile-3.0-latest)
(propagated-inputs
- `(("bdw-gc" ,libgc-7)
- ,@(srfi-1:alist-delete "bdw-gc" (package-propagated-inputs guile-3.0)))))))
+ (modify-inputs (package-propagated-inputs guile-3.0)
+ (replace "bdw-gc" libgc-7))))))
(define-public guile-3.0/fixed
;; A package of Guile that's rarely changed. It is the one used in the
@@ -386,14 +436,14 @@ without requiring the source code to be rewritten.")
(delete-file "test-suite/tests/version.test")
#t))))))
(native-inputs
- `(("autoconf" ,autoconf)
- ("automake" ,automake)
- ("libtool" ,libtool)
- ("flex" ,flex)
- ("gettext" ,gnu-gettext)
- ("texinfo" ,texinfo)
- ("gperf" ,gperf)
- ,@(package-native-inputs guile-3.0)))
+ (modify-inputs (package-native-inputs guile-3.0)
+ (prepend autoconf
+ automake
+ libtool
+ flex
+ gnu-gettext
+ texinfo
+ gperf)))
(synopsis "Development version of GNU Guile"))))
(define* (make-guile-readline guile #:optional (name "guile-readline"))
@@ -403,7 +453,8 @@ without requiring the source code to be rewritten.")
(source (package-source guile))
(build-system gnu-build-system)
(arguments
- '(#:configure-flags '("--disable-silent-rules")
+ '(#:configure-flags '("--disable-silent-rules"
+ "--enable-mini-gmp") ;for Guile >= 3.0.6
#:phases (modify-phases %standard-phases
(add-before 'build 'chdir
(lambda* (#:key outputs #:allow-other-keys)
@@ -512,18 +563,18 @@ GNU@tie{}Guile. Use the @code{(ice-9 readline)} module and call its
;; FAIL: test-out-of-memory
(substitute* "test-suite/standalone/Makefile.am"
(("(check_SCRIPTS|TESTS) \\+= test-out-of-memory") ""))
-
+
(patch-shebang "build-aux/git-version-gen")
(invoke "sh" "autogen.sh")
#t))))))
(native-inputs
- `(("autoconf" ,autoconf)
- ("automake" ,automake)
- ("libtool" ,libtool)
- ("flex" ,flex)
- ("texinfo" ,texinfo)
- ("gettext" ,gettext-minimal)
- ,@(package-native-inputs guile-2.2))))))
+ (modify-inputs (package-native-inputs guile-2.2)
+ (prepend autoconf
+ automake
+ libtool
+ flex
+ texinfo
+ gettext-minimal))))))
;;;
@@ -545,9 +596,8 @@ GNU@tie{}Guile. Use the @code{(ice-9 readline)} module and call its
(build-system gnu-build-system)
(arguments
`(#:make-flags '("GUILE_AUTO_COMPILE=0"))) ;to prevent guild warnings
- (native-inputs `(("pkg-config" ,pkg-config)
- ("guile" ,guile-2.2)))
- (inputs `(("guile" ,guile-2.2)))
+ (native-inputs (list pkg-config guile-2.2))
+ (inputs (list guile-2.2))
(synopsis "JSON module for Guile")
(description
"Guile-JSON supports parsing and building JSON documents according to the
@@ -585,9 +635,8 @@ specification. These are the main features:
(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 guile-json-4
(package
@@ -643,10 +692,8 @@ specification. These are the main features:
(format #f "(dynamic-link \"~a/lib/libgdbm.so\")"
(assoc-ref inputs "gdbm"))))
#t)))))
- (native-inputs
- `(("guile" ,guile-3.0)))
- (inputs
- `(("gdbm" ,gdbm)))
+ (native-inputs (list guile-3.0))
+ (inputs (list gdbm))
(home-page "https://github.com/ijp/guile-gdbm")
(synopsis "Guile bindings to the GDBM library via Guile's FFI")
(description
@@ -675,14 +722,8 @@ Guile's foreign function interface.")
"1nryy9j3bk34i0alkmc9bmqsm0ayz92k1cdf752mvhyjjn8nr928"))
(file-name (string-append name "-" version "-checkout"))))
(build-system gnu-build-system)
- (native-inputs
- `(("autoconf" ,autoconf)
- ("automake" ,automake)
- ("guile" ,guile-3.0)
- ("pkg-config" ,pkg-config)))
- (inputs
- `(("guile" ,guile-3.0)
- ("sqlite" ,sqlite)))
+ (native-inputs (list autoconf automake guile-3.0 pkg-config))
+ (inputs (list guile-3.0 sqlite))
(synopsis "Access SQLite databases from Guile")
(description
"This package provides Guile bindings to the SQLite database system.")
@@ -720,13 +761,8 @@ Guile's foreign function interface.")
(doc (string-append out "/share/doc/" package)))
(install-file "README.md" doc)
#t))))))
- (native-inputs
- `(("autoconf" ,autoconf)
- ("automake" ,automake)
- ("pkg-config" ,pkg-config)
- ("guile" ,guile-3.0)))
- (inputs
- `(("guile" ,guile-3.0)))
+ (native-inputs (list autoconf automake pkg-config guile-3.0))
+ (inputs (list guile-3.0))
(synopsis "Structured access to bytevector contents for Guile")
(description
"Guile bytestructures offers a system imitating the type system
@@ -756,22 +792,18 @@ type system, elevating types to first-class status.")
(file-name (git-file-name name version))
(sha256
(base32
- "11a51acibwi2hpaygmrpn6nwbr4lqalc87ihrgj3mhz6swbsk9n7"))))
+ "11a51acibwi2hpaygmrpn6nwbr4lqalc87ihrgj3mhz6swbsk9n7"))
+ (patches (search-patches
+ "guile-git-adjust-for-libgit2-1.2.0.patch"))))
(build-system gnu-build-system)
(arguments
`(#:make-flags '("GUILE_AUTO_COMPILE=0"))) ; to prevent guild warnings
(native-inputs
- `(("pkg-config" ,pkg-config)
- ("autoconf" ,autoconf)
- ("automake" ,automake)
- ("texinfo" ,texinfo)
- ("guile" ,guile-3.0)
- ("guile-bytestructures" ,guile-bytestructures)))
+ (list pkg-config autoconf automake texinfo guile-3.0 guile-bytestructures))
(inputs
- `(("guile" ,guile-3.0)
- ("libgit2" ,libgit2)))
+ (list guile-3.0 libgit2))
(propagated-inputs
- `(("guile-bytestructures" ,guile-bytestructures)))
+ (list guile-bytestructures))
(synopsis "Guile bindings for libgit2")
(description
"This package provides Guile bindings to libgit2, a library to
@@ -806,16 +838,8 @@ manipulate repositories of the Git version control system.")
(arguments
'(#:make-flags
'("GUILE_AUTO_COMPILE=0"))) ;to prevent guild warnings
- (native-inputs
- `(("autoconf" ,autoconf)
- ("automake" ,automake)
- ("pkg-config" ,pkg-config)
- ,@(if (%current-target-system)
- `(("guile" ,guile-3.0)) ;for 'guild compile' and 'guile-3.0.pc'
- '())))
- (inputs
- `(("guile" ,guile-3.0)
- ("zlib" ,zlib)))
+ (native-inputs (list autoconf automake pkg-config guile-3.0))
+ (inputs (list guile-3.0 zlib))
(synopsis "Guile bindings to zlib")
(description
"This package provides Guile bindings for zlib, a lossless
@@ -845,16 +869,8 @@ Guile's foreign function interface.")
(arguments
'(#:make-flags
'("GUILE_AUTO_COMPILE=0"))) ;to prevent guild warnings
- (native-inputs
- `(("autoconf" ,autoconf)
- ("automake" ,automake)
- ("pkg-config" ,pkg-config)
- ,@(if (%current-target-system)
- `(("guile" ,guile-3.0)) ;for 'guild compile' and 'guile-3.0.pc'
- '())))
- (inputs
- `(("guile" ,guile-3.0)
- ("lzlib" ,lzlib)))
+ (native-inputs (list autoconf automake pkg-config guile-3.0))
+ (inputs (list guile-3.0 lzlib))
(synopsis "Guile bindings to lzlib")
(description
"This package provides Guile bindings for lzlib, a C library for
@@ -880,14 +896,8 @@ pure Scheme by using Guile's foreign function interface.")
(base32
"1c8l7829b5yx8wdc0mrhzjfwb6h9hb7cd8dfxcr71a7vlsi86310"))))
(build-system gnu-build-system)
- (native-inputs
- `(("autoconf" ,autoconf)
- ("automake" ,automake)
- ("pkg-config" ,pkg-config)
- ("guile" ,guile-3.0)))
- (inputs
- `(("zstd" ,zstd "lib")
- ("guile" ,guile-3.0)))
+ (native-inputs (list autoconf automake pkg-config guile-3.0))
+ (inputs (list `(,zstd "lib") guile-3.0))
(synopsis "GNU Guile bindings to the zstd compression library")
(description
"This package provides a GNU Guile interface to the zstd (``zstandard'')
diff --git a/gnu/packages/haskell-xyz.scm b/gnu/packages/haskell-xyz.scm
index ae077f7400..8373d93c76 100644
--- a/gnu/packages/haskell-xyz.scm
+++ b/gnu/packages/haskell-xyz.scm
@@ -3,7 +3,7 @@
;;; Copyright © 2015 Siniša Biđin <sinisa@bidin.eu>
;;; Copyright © 2015 Paul van der Walt <paul@denknerd.org>
;;; Copyright © 2015, 2019 Eric Bavier <bavier@member.fsf.org>
-;;; Copyright © 2016, 2018, 2019 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2016, 2018, 2019, 2021 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2016, 2017 Nikita <nikita@n0.is>
;;; Copyright © 2016, 2019 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2015, 2016, 2017, 2018, 2019 Ricardo Wurmus <rekado@elephly.net>
@@ -5800,8 +5800,7 @@ descriptions.")
(let* ((out (assoc-ref outputs "out"))
(elisp-file "elisp/hindent.el")
(dest (string-append out "/share/emacs/site-lisp"))
- (emacs (string-append (assoc-ref inputs "emacs")
- "/bin/emacs")))
+ (emacs (search-input-file inputs "/bin/emacs")))
(make-file-writable elisp-file)
(emacs-substitute-variables elisp-file
("hindent-process-path"
diff --git a/gnu/packages/haskell.scm b/gnu/packages/haskell.scm
index e8bbc9dd10..d3db023f08 100644
--- a/gnu/packages/haskell.scm
+++ b/gnu/packages/haskell.scm
@@ -3,7 +3,7 @@
;;; Copyright © 2015 Siniša Biđin <sinisa@bidin.eu>
;;; Copyright © 2015 Paul van der Walt <paul@denknerd.org>
;;; Copyright © 2015, 2019 Eric Bavier <bavier@member.fsf.org>
-;;; Copyright © 2016, 2018, 2019 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2016, 2018, 2019, 2021 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2016, 2017 Nikita <nikita@n0.is>
;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020 Ricardo Wurmus <rekado@elephly.net>
@@ -22,6 +22,7 @@
;;; Copyright © 2020 Marius Bakke <mbakke@fastmail.com>
;;; Copyright © 2021 Matthew James Kraai <kraai@ftbfs.org>
;;; Copyright © 2021 Xinglu Chen <public@yoctocell.xyz>
+;;; Copyright © 2021 Simon Tournier <zimon.toutoune@gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -248,9 +249,8 @@ top of CLISP.")
(gmp-lib (string-append gmp "/lib"))
(gmp-include (string-append gmp "/include"))
(ncurses-lib
- (string-append (assoc-ref inputs "ncurses") "/lib"))
- (ld-so (string-append (assoc-ref inputs "libc")
- ,(glibc-dynamic-linker)))
+ (dirname (search-input-file inputs "/lib/libncurses.so")))
+ (ld-so (search-input-file inputs ,(glibc-dynamic-linker)))
(libtinfo-dir
(string-append ghc-bootstrap-prefix
"/lib/ghc-7.8.4/terminfo-0.4.0.0")))
@@ -635,7 +635,7 @@ interactive environment for the functional language Haskell.")
(sha256
(base32
"0c55pj2820q26rikhpf636sn4mjgqsxjrl94vsywrh79dxp3k14z"))))
- ("git" ,git) ; invoked during tests
+ ("git" ,git-minimal/fixed) ; invoked during tests
,@(filter (match-lambda
(("ghc-bootstrap" . _) #f)
(("ghc-testsuite" . _) #f)
@@ -688,7 +688,7 @@ interactive environment for the functional language Haskell.")
(sha256
(base32
"1zl25gg6bpx5601k8h3cqnns1xfc0nqgwnh8jvn2s65ra3f2g1nz"))))
- ("git" ,git-minimal) ; invoked during tests
+ ("git" ,git-minimal/fixed) ; invoked during tests
,@(filter (match-lambda
(("ghc-bootstrap" . _) #f)
(("ghc-testsuite" . _) #f)
@@ -712,12 +712,18 @@ interactive environment for the functional language Haskell.")
(("\\]\\), " all)
(string-append all "expect_broken(0)], ")))))
;; TODO: Turn this into an undconditional patch on the next rebuild.
- ,@(if (string=? "i686-linux" (%current-system))
+ ,@(if (string-prefix? "i686" (or (%current-target-system)
+ (%current-system)))
'((add-after 'skip-more-tests 'skip-failing-tests-i686
(lambda _
(substitute* '("testsuite/tests/codeGen/should_compile/all.T")
(("(test\\('T15155l', )when\\(unregisterised\\(\\), skip\\)" all before)
- (string-append before "when(arch('i386'), skip)"))))))
+ (string-append before "when(arch('i386'), skip)")))
+ ;; Unexpected failures:
+ ;; quasiquotation/T14028.run T14028 [bad stderr] (dyn)
+ (substitute* '("testsuite/tests/quasiquotation/all.T")
+ (("unless\\(config.have_ext_interp, skip\\),")
+ "unless(config.have_ext_interp, skip), when(arch('i386'), skip),")))))
'())))))
(native-search-paths (list (search-path-specification
(variable "GHC_PACKAGE_PATH")
diff --git a/gnu/packages/hurd.scm b/gnu/packages/hurd.scm
index 59a7b55943..1e6af1029f 100644
--- a/gnu/packages/hurd.scm
+++ b/gnu/packages/hurd.scm
@@ -1,6 +1,6 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2014, 2015, 2016, 2017 Manolis Fragkiskos Ragkousis <manolis837@gmail.com>
-;;; Copyright © 2018, 2020 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2018, 2020, 2021 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2020 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2020 Marius Bakke <mbakke@fastmail.com>
;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
@@ -51,20 +51,16 @@
hurd-target?
hurd-triplet?))
-(define (hurd-triplet? triplet)
- (and (string-suffix? "-gnu" triplet)
- (not (string-contains triplet "linux"))))
-
(define (hurd-target?)
"Return true if the cross-compilation target or the current system is
GNU/Hurd."
- (or (and=> (%current-target-system) hurd-triplet?)
+ (or (and=> (%current-target-system) target-hurd?)
(and (not (%current-target-system))
- (and=> (%current-system) hurd-triplet?))))
+ (and=> (%current-system) target-hurd?))))
(define (hurd-system?)
"Return true if the current system is the Hurd."
- (and=> (%current-system) hurd-triplet?))
+ (and=> (%current-system) target-hurd?))
(define (hurd-source-url version)
(string-append "mirror://gnu/hurd/hurd-"
@@ -305,6 +301,8 @@ Hurd-minimal package which are needed for both glibc and GCC.")
(name "gnumach")
(arguments
(substitute-keyword-arguments (package-arguments gnumach-headers)
+ ((#:make-flags flags ''())
+ `(cons "CFLAGS=-fcommon" ,flags))
((#:configure-flags flags ''())
`(cons "--enable-kdb" ,flags)) ;enable kernel debugger
((#:phases phases '%standard-phases)
@@ -314,8 +312,7 @@ Hurd-minimal package which are needed for both glibc and GCC.")
(let* ((out (assoc-ref outputs "out"))
(boot (string-append out "/boot")))
(invoke "make" "gnumach.gz")
- (install-file "gnumach.gz" boot)
- #t)))))))
+ (install-file "gnumach.gz" boot))))))))
(native-inputs
`(("mig" ,mig)
("perl" ,perl)
@@ -378,9 +375,10 @@ Hurd-minimal package which are needed for both glibc and GCC.")
(lambda* (#:key inputs #:allow-other-keys)
(for-each (lambda (var)
(setenv var
- (string-append (assoc-ref inputs "libtirpc")
- "/include/tirpc:"
- (or (getenv var) ""))))
+ (string-append
+ (search-input-directory inputs
+ "include/tirpc")
+ ":" (or (getenv var) ""))))
'("CROSS_C_INCLUDE_PATH" "C_INCLUDE_PATH"
"CROSS_CPATH" "CPATH"))
#t))
@@ -510,16 +508,18 @@ exec ${system}/rc \"$@\"
(copy-file "unifont"
(string-append datadir "/vga-system.bdf"))
#t))))
- #:configure-flags (list (string-append "LDFLAGS=-Wl,-rpath="
- %output "/lib")
- "--disable-ncursesw"
- "--without-libbz2"
- "--without-libz"
- "--without-parted"
- ;; This is needed to pass the configure check for
- ;; clnt_create
- "ac_func_search_save_LIBS=-ltirpc"
- "ac_cv_search_clnt_create=false")))
+ #:configure-flags
+ ,#~(list (string-append "LDFLAGS=-Wl,-rpath="
+ #$output "/lib")
+ "--disable-ncursesw"
+ "--without-libbz2"
+ "--without-libz"
+ "--without-parted"
+ ;; This is needed to pass the configure check for
+ ;; clnt_create
+ "ac_func_search_save_LIBS=-ltirpc"
+ "ac_cv_search_clnt_create=false"
+ "CFLAGS=-fcommon")))
(build-system gnu-build-system)
(inputs
`(("glibc-hurd-headers" ,glibc/hurd-headers)
@@ -581,15 +581,15 @@ implementing them.")
(build-system gnu-build-system)
(arguments
`(#:make-flags
- (list (string-append "SHELL=" (assoc-ref %build-inputs "bash")
- "/bin/bash")
+ (list (string-append "SHELL="
+ (search-input-file %build-inputs "/bin/bash"))
"PKGDIR=libdde_linux26"
,@(if (%current-target-system)
(list "CC=i586-pc-gnu-gcc"
"LINK_PROGRAM=i586-pc-gnu-gcc")
(list "CC=gcc")))
#:configure-flags
- (list (string-append "LDFLAGS=-Wl,-rpath=" %output "/lib"))
+ ,#~(list (string-append "LDFLAGS=-Wl,-rpath=" #$output "/lib"))
#:phases
(modify-phases %standard-phases
(delete 'configure)
diff --git a/gnu/packages/ibus.scm b/gnu/packages/ibus.scm
index ab4b82284e..4cf6762d24 100644
--- a/gnu/packages/ibus.scm
+++ b/gnu/packages/ibus.scm
@@ -7,6 +7,7 @@
;;; Copyright © 2018, 2019, 2020, 2021 Peng Mei Yu <pengmeiyu@riseup.net>
;;; Copyright © 2020 kanichos <kanichos@yandex.ru>
;;; Copyright © 2020 Vincent Legoll <vincent.legoll@gmail.com>
+;;; Copyright © 2021 Felix Gruber <felgru@posteo.net>
;;; Copyright © 2021 Songlin Jiang <hollowman@hollowman.ml>
;;;
;;; This file is part of GNU Guix.
@@ -44,6 +45,7 @@
#:use-module (gnu packages databases)
#:use-module (gnu packages datastructures)
#:use-module (gnu packages dbm)
+ #:use-module (gnu packages docbook)
#:use-module (gnu packages freedesktop)
#:use-module (gnu packages gettext)
#:use-module (gnu packages glib)
@@ -51,19 +53,22 @@
#:use-module (gnu packages gtk)
#:use-module (gnu packages iso-codes)
#:use-module (gnu packages logging)
+ #:use-module (gnu packages perl)
#:use-module (gnu packages pkg-config)
#:use-module (gnu packages python)
+ #:use-module (gnu packages python-xyz)
#:use-module (gnu packages python-web)
#:use-module (gnu packages serialization)
#:use-module (gnu packages sqlite)
#:use-module (gnu packages textutils)
#:use-module (gnu packages unicode)
- #:use-module (gnu packages xorg))
+ #:use-module (gnu packages xorg)
+ #:use-module (gnu packages xdisorg))
(define-public ibus
(package
(name "ibus")
- (version "1.5.22")
+ (version "1.5.24")
(source (origin
(method url-fetch)
(uri (string-append "https://github.com/ibus/ibus/"
@@ -71,12 +76,14 @@
version "/ibus-" version ".tar.gz"))
(sha256
(base32
- "0jmy2w01phpmqnjnfnak7nvfna57mpgfnl87jwc4iai8ijjynw41"))))
+ "07s2ly75xv50bqg37mn37i9akqvcfd45k2mbplxrsqk3a2b3mwxb"))))
(build-system glib-or-gtk-build-system)
+ (outputs '("out" "doc"))
(arguments
- `(#:tests? #f ; tests fail because there's no connection to dbus
- #:parallel-build? #f ; race condition discovered with emoji support
+ `(#:parallel-build? #f ; race condition discovered with emoji support
#:configure-flags (list "--enable-python-library"
+ "--enable-gtk-doc"
+ "--enable-memconf"
(string-append
"--with-unicode-emoji-dir="
(assoc-ref %build-inputs "unicode-emoji")
@@ -91,6 +98,20 @@
"--enable-wayland")
#:phases
(modify-phases %standard-phases
+ (add-after 'unpack 'disable-failing-tests
+ (lambda _
+ ;; These tests require /etc/machine-id.
+ (with-directory-excursion "src/tests"
+ (substitute* '("ibus-share.c" "ibus-compose.c"
+ "ibus-keypress.c")
+ (("[ \t]*return g_test_run \\(\\);") "")))))
+ (add-after 'unpack 'patch-docbook-xml
+ (lambda* (#:key inputs #:allow-other-keys)
+ (with-directory-excursion "docs/reference/ibus"
+ (substitute* "ibus-docs.sgml.in"
+ (("http://www.oasis-open.org/docbook/xml/4.1.2/")
+ (string-append (assoc-ref inputs "docbook-xml")
+ "/xml/dtd/docbook/"))))))
(add-after 'unpack 'patch-python-target-directories
(lambda* (#:key outputs #:allow-other-keys)
(let ((root (string-append (assoc-ref outputs "out")
@@ -101,13 +122,11 @@
(("(py2?overridesdir)=.*" _ var)
(string-append var "=" root "/gi/overrides/"))
(("(pkgpython2dir=).*" _ var)
- (string-append var root "/ibus"))))
- #t))
+ (string-append var root "/ibus"))))))
(add-before 'configure 'disable-dconf-update
(lambda _
(substitute* "data/dconf/Makefile.in"
- (("dconf update") "echo dconf update"))
- #t))
+ (("dconf update") "echo dconf update"))))
(add-after 'unpack 'delete-generated-files
(lambda _
(for-each (lambda (file)
@@ -115,53 +134,85 @@
(when (file-exists? c)
(format #t "deleting ~a\n" c)
(delete-file c))))
- (find-files "." "\\.vala"))
- #t))
+ (find-files "." "\\.vala"))))
(add-after 'unpack 'fix-paths
(lambda* (#:key inputs #:allow-other-keys)
(substitute* "src/ibusenginesimple.c"
(("/usr/share/X11/locale")
- (string-append (assoc-ref inputs "libx11")
- "/share/X11/locale")))
+ (search-input-directory inputs
+ "share/X11/locale")))
(substitute* "ui/gtk3/xkblayout.vala"
(("\"(setxkbmap|xmodmap)\"" _ prog)
- (string-append "\"" (assoc-ref inputs prog) "/bin/" prog "\"")))
- #t))
+ (string-append "\""
+ (search-input-file inputs
+ (string-append "bin/" prog))
+ "\"")))))
+ (add-before 'check 'pre-check
+ (lambda _
+ ;; Tests write to $HOME.
+ (setenv "HOME" (getcwd))
+ ;; Tests look for $XDG_RUNTIME_DIR.
+ (setenv "XDG_RUNTIME_DIR" (getcwd))
+ ;; For missing '/etc/machine-id'.
+ (setenv "DBUS_FATAL_WARNINGS" "0")
+ ;; Tests require a running X server.
+ (system "Xvfb :1 +extension GLX &")
+ (setenv "DISPLAY" ":1")
+ ;; Tests require running iBus daemon.
+ (system "./bus/ibus-daemon --daemonize")))
+ (add-after 'install 'move-doc
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (doc (assoc-ref outputs "doc")))
+ (mkdir-p (string-append doc "/share"))
+ (rename-file
+ (string-append out "/share/gtk-doc")
+ (string-append doc "/share/gtk-doc")))))
(add-after 'wrap-program 'wrap-with-additional-paths
(lambda* (#:key outputs #:allow-other-keys)
;; Make sure 'ibus-setup' runs with the correct PYTHONPATH and
;; GI_TYPELIB_PATH.
(let ((out (assoc-ref outputs "out")))
(wrap-program (string-append out "/bin/ibus-setup")
- `("PYTHONPATH" ":" prefix (,(getenv "PYTHONPATH")))
+ `("GUIX_PYTHONPATH" ":" prefix (,(getenv "GUIX_PYTHONPATH")))
`("GI_TYPELIB_PATH" ":" prefix
(,(getenv "GI_TYPELIB_PATH")
- ,(string-append out "/lib/girepository-1.0")))))
- #t)))))
+ ,(string-append out "/lib/girepository-1.0"))))))))))
(inputs
`(("dbus" ,dbus)
("dconf" ,dconf)
- ("gconf" ,gconf)
+ ("glib" ,glib)
("gtk2" ,gtk+-2)
("gtk+" ,gtk+)
+ ("iso-codes" ,iso-codes)
("json-glib" ,json-glib)
("libnotify" ,libnotify)
("libx11" ,libx11)
+ ("libxkbcommon" ,libxkbcommon)
+ ("libxtst" ,libxtst)
+ ("pygobject" ,python-pygobject)
+ ("python" ,python)
+ ("python-dbus" ,python-dbus)
("setxkbmap" ,setxkbmap)
+ ("ucd" ,ucd)
+ ("unicode-cldr-common" ,unicode-cldr-common)
+ ("unicode-emoji" ,unicode-emoji)
("wayland" ,wayland)
- ("xmodmap" ,xmodmap)
- ("iso-codes" ,iso-codes)
- ("pygobject2" ,python-pygobject)
- ("python" ,python)))
+ ("xmodmap" ,xmodmap)))
(native-inputs
- `(("glib" ,glib "bin") ; for glib-genmarshal
+ `(("docbook-xml" ,docbook-xml-4.1.2)
+ ("glib" ,glib "bin") ; for glib-genmarshal
("gettext" ,gettext-minimal)
+ ("gnome-common" ,gnome-common)
("gobject-introspection" ,gobject-introspection) ; for g-ir-compiler
- ("ucd" ,ucd)
- ("unicode-emoji" ,unicode-emoji)
- ("unicode-cldr-common" ,unicode-cldr-common)
+ ("gtk+:bin" ,gtk+ "bin")
+ ("gtk-doc" ,gtk-doc)
+ ("perl" ,perl)
+ ("pkg-config" ,pkg-config)
+ ("python-wrapper" ,python-wrapper)
("vala" ,vala)
- ("pkg-config" ,pkg-config)))
+ ("which" ,which)
+ ("xorg-server" ,xorg-server-for-tests)))
(native-search-paths
(list (search-path-specification
(variable "IBUS_COMPONENT_PATH")
@@ -198,8 +249,8 @@ may also simplify input method development.")
;; PYTHONPATH and GI_TYPELIB_PATH.
(let ((out (assoc-ref outputs "out")))
(wrap-program (string-append out "/libexec/ibus-setup-libpinyin")
- `("PYTHONPATH" ":" =
- (,(getenv "PYTHONPATH")
+ `("GUIX_PYTHONPATH" ":" prefix
+ (,(getenv "GUIX_PYTHONPATH")
,(string-append (assoc-ref inputs "ibus")
"/lib/girepository-1.0")
,(string-append (assoc-ref outputs "out")
@@ -280,8 +331,8 @@ Chinese pinyin input methods.")
(for-each
(lambda (prog)
(wrap-program (string-append out "/libexec/" prog)
- `("PYTHONPATH" ":" prefix
- (,(getenv "PYTHONPATH")))
+ `("GUIX_PYTHONPATH" ":" prefix
+ (,(getenv "GUIX_PYTHONPATH")))
`("GI_TYPELIB_PATH" ":" prefix
(,(getenv "GI_TYPELIB_PATH")
,(string-append out "/lib/girepository-1.0")))))
@@ -320,6 +371,7 @@ Japanese language input in most graphical applications.")
(sha256
(base32
"0pqk0i3zcii3fx5laj9qzbgd58jvq6wn31j76w4zix2i4b1lqcqv"))
+ (patches (search-patches "librime-fix-build-with-gcc10.patch"))
(modules '((guix build utils)))
(snippet
'(begin
@@ -752,7 +804,7 @@ hanja dictionary and small hangul character classification.")
(lambda* (#:key inputs outputs #:allow-other-keys)
(wrap-program (string-append (assoc-ref outputs "out")
"/libexec/ibus-setup-hangul")
- `("PYTHONPATH" ":" prefix (,(getenv "PYTHONPATH")))
+ `("GUIX_PYTHONPATH" ":" prefix (,(getenv "GUIX_PYTHONPATH")))
`("LD_LIBRARY_PATH" ":" prefix
(,(string-append (assoc-ref inputs "libhangul") "/lib")))
`("GI_TYPELIB_PATH" ":" prefix
diff --git a/gnu/packages/icu4c.scm b/gnu/packages/icu4c.scm
index 12f8393900..b9671a6ab1 100644
--- a/gnu/packages/icu4c.scm
+++ b/gnu/packages/icu4c.scm
@@ -1,13 +1,14 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2013 Andreas Enge <andreas@enge.fr>
;;; Copyright © 2015, 2016 Mark H Weaver <mhw@netris.org>
-;;; Copyright © 2016, 2017 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2016, 2017, 2020 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2017 Clément Lassieur <clement@lassieur.org>
;;; Copyright © 2017 Ricardo Wurmus <rekado@elephly.net>
;;; Copyright © 2019, 2020 Marius Bakke <mbakke@fastmail.com>
;;; Copyright © 2019 Mathieu Othacehe <m.othacehe@gmail.com>
;;; Copyright © 2020 Björn Höfling <bjoern.hoefling@bjoernhoefling.de>
;;; Copyright © 2020 Julien Lepiller <julien@lepiller.eu>
+;;; Copyright © 2021 Guillaume Le Vaillant <glv@posteo.net>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -29,6 +30,7 @@
#:use-module (gnu packages java)
#:use-module (gnu packages perl)
#:use-module (gnu packages python)
+ #:use-module (guix gexp)
#:use-module (guix licenses)
#:use-module (guix packages)
#:use-module (guix utils)
@@ -39,7 +41,7 @@
(define-public icu4c
(package
(name "icu4c")
- (version "66.1")
+ (version "69.1")
(source (origin
(method url-fetch)
(uri (string-append
@@ -48,10 +50,8 @@
"/icu4c-"
(string-map (lambda (x) (if (char=? x #\.) #\_ x)) version)
"-src.tgz"))
- (patch-flags '("-p2"))
- (patches (search-patches "icu4c-CVE-2020-10531.patch"))
(sha256
- (base32 "0bharwzc9nzkbrcf405z2nb3h7q0711z450arz0mjmdrk8hg58sj"))))
+ (base32 "0icps0avkwy5df3wwc5kybxcg63hcgk4phdh9g244g0xrmx7pfjc"))))
(build-system gnu-build-system)
;; When cross-compiling, this package needs a source directory of a
;; native-build of itself.
@@ -130,22 +130,6 @@ C/C++ part.")
(base32
"09fng7a80xj8d5r1cgbgq8r47dsw5jsr6si9p2cj2ylhwgg974f7"))))))
-(define-public icu4c-69
- (package
- (inherit icu4c)
- (version "69.1")
- (source (origin
- (method url-fetch)
- (uri (string-append
- "https://github.com/unicode-org/icu/releases/download/release-"
- (string-map (lambda (x) (if (char=? x #\.) #\- x)) version)
- "/icu4c-"
- (string-map (lambda (x) (if (char=? x #\.) #\_ x)) version)
- "-src.tgz"))
- (sha256
- (base32
- "0icps0avkwy5df3wwc5kybxcg63hcgk4phdh9g244g0xrmx7pfjc"))))))
-
(define-public icu4c-build-root
(package
(inherit icu4c)
@@ -182,18 +166,19 @@ C/C++ part.")
(build-system ant-build-system)
(arguments
`(#:make-flags
- (list (string-append "-Djunit.core.jar="
- (car (find-files
- (assoc-ref %build-inputs "java-junit")
- ".*.jar$")))
- (string-append "-Djunit.junitparams.jar="
- (car (find-files
- (assoc-ref %build-inputs "java-junitparams")
- ".*.jar$")))
- (string-append "-Djunit.hamcrest.jar="
- (car (find-files
- (assoc-ref %build-inputs "java-hamcrest-core")
- ".*.jar$"))))
+ ,#~(list
+ (string-append "-Djunit.core.jar="
+ (car (find-files
+ #$(this-package-native-input "java-junit")
+ ".*.jar$")))
+ (string-append "-Djunit.junitparams.jar="
+ (car (find-files
+ #$(this-package-native-input "java-junitparams")
+ ".*.jar$")))
+ (string-append "-Djunit.hamcrest.jar="
+ (car (find-files
+ #$(this-package-native-input "java-hamcrest-core")
+ ".*.jar$"))))
#:phases
(modify-phases %standard-phases
(add-before 'configure 'chdir
diff --git a/gnu/packages/idutils.scm b/gnu/packages/idutils.scm
index 26472c6900..6d2f003734 100644
--- a/gnu/packages/idutils.scm
+++ b/gnu/packages/idutils.scm
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2012, 2013, 2015 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2012, 2013, 2015, 2021 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2018 Efraim Flashner <efraim@flashner.co.il>
;;;
;;; This file is part of GNU Guix.
@@ -36,7 +36,6 @@
(sha256
(base32
"1hmai3422iaqnp34kkzxdnywl7n7pvlxp11vrw66ybxn9wxg90c1"))
- (patches (search-patches "diffutils-gets-undeclared.patch"))
(modules '((guix build utils)))
(snippet
'(begin
@@ -49,8 +48,15 @@
"# define _IO_IN_BACKUP 0x100\n"
"#endif\n\n"
"/* BSD stdio derived implementations")))
- #t))))
+
+ ;; 'gets' is deprecated in glibc 2.33 and its declaration is
+ ;; no longer visible by default from <stdio.h>.
+ (substitute* "lib/stdio.in.h"
+ (("_GL_WARN_ON_USE \\(gets.*") ""))))))
(build-system gnu-build-system)
+ (arguments
+ ;; XXX: These Gnulib tests fail with GCC 10 and glibc 2.33; skip them.
+ '(#:make-flags '("XFAIL_TESTS=test-sprintf-posix test-isnanl-nolibm")))
(native-inputs `(("emacs" ,emacs-minimal)))
(home-page "https://www.gnu.org/software/idutils/")
(synopsis "Identifier database utilities")
diff --git a/gnu/packages/image-processing.scm b/gnu/packages/image-processing.scm
index 9becd530b6..194160315b 100644
--- a/gnu/packages/image-processing.scm
+++ b/gnu/packages/image-processing.scm
@@ -17,6 +17,7 @@
;;; Copyright © 2021 Andy Tai <atai@atai.org>
;;; Copyright © 2021 Ekaitz Zarraga <ekaitz@elenq.tech>
;;; Copyright © 2021 Paul Garlick <pgarlick@tourbillion-technology.com>
+;;; Copyright © 2021 Guillaume Le Vaillant <glv@posteo.net>
;;; Copyright © 2021 Ivan Gankevich <i.gankevich@spbu.ru>
;;;
;;; This file is part of GNU Guix.
@@ -358,97 +359,6 @@ a suite of 3D interaction widgets, supports parallel processing, and
integrates with various databases on GUI toolkits such as Qt and Tk.")
(license license:bsd-3)))
-;; freecad needs an old version of VTK, because VTK's API changed from 8 to 9
-(define-public vtk-8
- (package
- (name "vtk")
- (version "8.2.0")
- (source (origin
- (method url-fetch)
- (uri (string-append "https://vtk.org/files/release/"
- (version-major+minor version)
- "/VTK-" version ".tar.gz"))
- (sha256
- (base32
- "1fspgp8k0myr6p2a6wkc21ldcswb4bvmb484m12mxgk1a9vxrhrl"))
- (patches
- (search-patches "vtk-8-fix-freetypetools-build-failure.patch"))
- (modules '((guix build utils)))
- (snippet
- '(begin
- (for-each
- (lambda (dir)
- (delete-file-recursively
- (string-append "ThirdParty/" dir "/vtk" dir)))
- ;; ogg, pugixml depended upon unconditionally
- '("doubleconversion" "eigen" "expat" "freetype" "gl2ps"
- "glew" "hdf5" "jpeg" "jsoncpp" "libproj" "libxml2" "lz4"
- "netcdf" "png" "sqlite" "theora" "tiff" "zlib"))
- #t))))
- (build-system cmake-build-system)
- (arguments
- '(#:build-type "Release" ;Build without '-g' to save space.
- #:configure-flags '(;"-DBUILD_TESTING:BOOL=TRUE"
- ;"-DVTK_MODULE_USE_EXTERNAL_vtkogg:BOOL=TRUE" ; not honored
- "-DVTK_USE_SYSTEM_DOUBLECONVERSION:BOOL=TRUE"
- "-DVTK_USE_SYSTEM_EIGEN:BOOL=TRUE"
- "-DVTK_USE_SYSTEM_EXPAT:BOOL=TRUE"
- "-DVTK_USE_SYSTEM_FREETYPE:BOOL=TRUE"
- "-DVTK_USE_SYSTEM_GL2PS:BOOL=TRUE"
- "-DVTK_USE_SYSTEM_GLEW:BOOL=TRUE"
- "-DVTK_USE_SYSTEM_HDF5:BOOL=TRUE"
- "-DVTK_USE_SYSTEM_JPEG:BOOL=TRUE"
- "-DVTK_USE_SYSTEM_JSONCPP:BOOL=TRUE"
- "-DVTK_USE_SYSTEM_LIBPROJ:BOOL=TRUE"
- "-DVTK_USE_SYSTEM_LIBXML2:BOOL=TRUE"
- "-DVTK_USE_SYSTEM_LZ4:BOOL=TRUE"
- "-DVTK_USE_SYSTEM_NETCDF:BOOL=TRUE"
- "-DVTK_USE_SYSTEM_PNG:BOOL=TRUE"
- ;"-DVTK_USE_SYSTEM_PUGIXML:BOOL=TRUE" ; breaks IO/CityGML
- "-DVTK_USE_SYSTEM_SQLITE:BOOL=TRUE"
- "-DVTK_USE_SYSTEM_THEORA:BOOL=TRUE"
- "-DVTK_USE_SYSTEM_TIFF:BOOL=TRUE"
- "-DVTK_USE_SYSTEM_ZLIB:BOOL=TRUE")
- #:tests? #f)) ;XXX: test data not included
- (inputs
- `(("double-conversion" ,double-conversion)
- ("eigen" ,eigen)
- ("expat" ,expat)
- ("freetype" ,freetype)
- ("gl2ps" ,gl2ps)
- ("glew" ,glew)
- ("glu" ,glu)
- ("hdf5" ,hdf5)
- ("jpeg" ,libjpeg-turbo)
- ("jsoncpp" ,jsoncpp)
- ;("libogg" ,libogg)
- ("libtheora" ,libtheora)
- ("libX11" ,libx11)
- ("libxml2" ,libxml2)
- ("libXt" ,libxt)
- ("lz4" ,lz4)
- ("mesa" ,mesa)
- ("netcdf" ,netcdf)
- ("png" ,libpng)
- ("proj" ,proj.4)
- ;("pugixml" ,pugixml)
- ("sqlite" ,sqlite)
- ("tiff" ,libtiff)
- ("xorgproto" ,xorgproto)
- ("zlib" ,zlib)))
- (home-page "https://vtk.org/")
- (synopsis "Libraries for 3D computer graphics")
- (description
- "The Visualization Toolkit (VTK) is a C++ library for 3D computer graphics,
-image processing and visualization. It supports a wide variety of
-visualization algorithms including: scalar, vector, tensor, texture, and
-volumetric methods; and advanced modeling techniques such as: implicit
-modeling, polygon reduction, mesh smoothing, cutting, contouring, and Delaunay
-triangulation. VTK has an extensive information visualization framework, has
-a suite of 3D interaction widgets, supports parallel processing, and
-integrates with various databases on GUI toolkits such as Qt and Tk.")
- (license license:bsd-3)))
-
;; itksnap needs an older variant of VTK.
(define-public vtk-6
(package (inherit vtk)
@@ -580,10 +490,8 @@ integrates with various databases on GUI toolkits such as Qt and Tk.")
(mkdir "../opencv-contrib")
(copy-recursively (assoc-ref inputs "opencv-extra")
"../opencv-extra")
- (invoke "tar" "xvf"
- (assoc-ref inputs "opencv-contrib")
- "--strip-components=1"
- "-C" "../opencv-contrib")))
+ (copy-recursively (assoc-ref inputs "opencv-contrib")
+ "../opencv-contrib")))
(add-after 'set-paths 'add-ilmbase-include-path
(lambda* (#:key inputs #:allow-other-keys)
@@ -591,10 +499,11 @@ integrates with various databases on GUI toolkits such as Qt and Tk.")
;; in the CPATH, so we need to add "$ilmbase/include/OpenEXR/" to
;; the CPATH to satisfy the dependency on "ImathVec.h".
(setenv "CPATH"
- (string-append (assoc-ref inputs "ilmbase")
- "/include/OpenEXR"
- ":" (or (getenv "CPATH") "")))
- #t))
+ (string-append
+ (string-drop-right
+ (search-input-file inputs "include/OpenEXR/ImathVec.h")
+ 11)
+ ":" (or (getenv "CPATH") "")))))
(add-before 'check 'start-xserver
(lambda* (#:key inputs #:allow-other-keys)
(let ((xorg-server (assoc-ref inputs "xorg-server"))
@@ -1362,6 +1271,12 @@ segmentation.")
(arguments
`(#:phases
(modify-phases %standard-phases
+ (add-after 'unpack 'loosen-requirements
+ (lambda _
+ ;; Don't require an outdated version of matplotlib.
+ (substitute* "setup.py"
+ (("matplotlib<3\\.3")
+ "matplotlib"))))
(add-before 'check 'start-xserver
(lambda* (#:key inputs #:allow-other-keys)
(let ((xorg-server (assoc-ref inputs "xorg-server")))
diff --git a/gnu/packages/image-viewers.scm b/gnu/packages/image-viewers.scm
index 291dcd383d..ff6af70a2c 100644
--- a/gnu/packages/image-viewers.scm
+++ b/gnu/packages/image-viewers.scm
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2013, 2017, 2018, 2019, 2020 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2013, 2017, 2018, 2019, 2020, 2021 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2014 Ian Denhardt <ian@zenhack.net>
;;; Copyright © 2015, 2016 Alex Kost <alezost@gmail.com>
;;; Copyright © 2016, 2017, 2018, 2019, 2020, 2021 Efraim Flashner <efraim@flashner.co.il>
@@ -20,6 +20,7 @@
;;; Copyright © 2021 Stefan Reichör <stefan@xsteve.at>
;;; Copyright © 2021 Raghav Gururajan <rg@raghavgururajan.name>
;;; Copyright © 2021 jgart <jgart@dismail.de>
+;;; Copyright © 2021 Guillaume Le Vaillant <glv@posteo.net>
;;; Copyright © 2021 Zheng Junjie <873216071@qq.com>
;;; Copyright © 2021 dissent <disseminatedissent@protonmail.com>
;;;
@@ -304,7 +305,7 @@ actions.")
(define-public geeqie
(package
(name "geeqie")
- (version "1.5")
+ (version "1.6")
(source (origin
(method git-fetch)
(uri (git-reference
@@ -312,13 +313,30 @@ actions.")
(commit (string-append "v" version))))
(sha256
(base32
- "0nf45sh3pwsv98sppcrqj81b6mdi31n1sbc7gn88m8mhpfp1qq6k"))
- (file-name (git-file-name name version))))
+ "1i9yd8lddp6b9s9vjjjzbpqj4bvwidxc6kiba6vdrk7dda5akyky"))
+ (file-name (git-file-name name version))
+ (patches (search-patches "geeqie-clutter.patch"))))
(build-system gnu-build-system)
(arguments
- `( ;; Enable support for a "map" pane using GPS data.
- #:configure-flags '("--enable-map"
- "--enable-gtk3")))
+ ;; Enable support for a "map" pane using GPS data.
+ `(#:configure-flags '("CFLAGS=-O2 -g -fcommon"
+ "--enable-map"
+ "--enable-gtk3")
+ #:phases (modify-phases %standard-phases
+ (add-after 'unpack 'correctly-locate-aux-scripts
+ ;; The git checkout has symlinks under the auxdir
+ ;; directory pointing to /usr/share/automake-1.16/depcomp
+ ;; and /usr/share/automake-1.16/install-sh, which causes
+ ;; the configure phase to fail (see:
+ ;; https://github.com/BestImageViewer/geeqie/issues/936).
+ (lambda* (#:key inputs #:allow-other-keys)
+ (let ((automake (assoc-ref inputs "automake")))
+ (delete-file "auxdir/depcomp")
+ (symlink (car (find-files automake "depcomp"))
+ "auxdir/depcomp")
+ (delete-file "auxdir/install-sh")
+ (symlink (car (find-files automake "install-sh"))
+ "auxdir/install-sh")))))))
(inputs
`(("clutter" ,clutter)
("libchamplain" ,libchamplain)
@@ -329,7 +347,7 @@ actions.")
(native-inputs
`(("autoconf" ,autoconf)
("automake" ,automake)
- ("glib" ,glib "bin") ; glib-gettextize
+ ("glib" ,glib "bin") ; glib-gettextize
("intltool" ,intltool)
("pkg-config" ,pkg-config)))
(home-page "http://www.geeqie.org/")
@@ -617,10 +635,9 @@ It supports JPEG, PNG and GIF formats.")
;; not use 'OpenEXR.pc'. Thus, we need to add
;; "$ilmbase/include/OpenEXR/" to the CPATH.
(setenv "CPATH"
- (string-append (assoc-ref inputs "ilmbase")
- "/include/OpenEXR"
- ":" (or (getenv "CPATH") "")))
- #t)))))
+ (string-append
+ (search-input-directory inputs "include/OpenEXR")
+ ":" (or (getenv "CPATH") ""))))))))
(home-page "http://qtpfsgui.sourceforge.net")
(synopsis "High dynamic range (HDR) imaging application")
(description
@@ -831,7 +848,7 @@ displayed in a terminal.")
("libjpeg-turbo" ,libjpeg-turbo)
("libinih" ,libinih)
("libnsgif" ,libnsgif)
- ("librsvg" ,librsvg-next)
+ ("librsvg" ,librsvg)
("libtiff" ,libtiff)
("libxkbcommon" ,libxkbcommon)
("pango" ,pango)
diff --git a/gnu/packages/image.scm b/gnu/packages/image.scm
index ff3963e6f5..c488d58416 100644
--- a/gnu/packages/image.scm
+++ b/gnu/packages/image.scm
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2013, 2017, 2019 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2013, 2017, 2019, 2021 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2013, 2015, 2016 Andreas Enge <andreas@enge.fr>
;;; Copyright © 2014, 2015, 2016, 2020 Mark H Weaver <mhw@netris.org>
;;; Copyright © 2014, 2015 Alex Kost <alezost@gmail.com>
@@ -26,6 +26,7 @@
;;; Copyright © 2020 Giacomo Leidi <goodoldpaul@autistici.org>
;;; Copyright © 2020 R Veera Kumar <vkor@vkten.in>
;;; Copyright © 2020 Maxim Cournoyer <maxim.cournoyer@gmail.com>
+;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
;;; Copyright © 2020 Zhu Zihao <all_but_last@163.com>
;;; Copyright © 2020, 2021 Vinicius Monego <monego@posteo.net>
;;; Copyright © 2021 Sharlatan Hellseher <sharlatanus@gmail.com>
@@ -115,8 +116,8 @@
(origin
(method url-fetch)
(uri
- (string-append "https://sourceforge.net/projects/iqa/files/"
- "1.1.2%20Release/iqa_1.1.2_src.tar.gz/download"))
+ (string-append "mirror://sourceforge/iqa/"
+ version " Release" "/iqa_" version "_src.tar.gz"))
(sha256
(base32 "00mgwy031ammab6bwmd1whhvqv3fxy1cs1igabq0n3ag12zhjs77"))))
(build-system gnu-build-system)
@@ -585,7 +586,7 @@ extracting icontainer icon files.")
(define-public libtiff
(package
(name "libtiff")
- (version "4.1.0")
+ (version "4.3.0")
(source
(origin
(method url-fetch)
@@ -593,11 +594,10 @@ extracting icontainer icon files.")
version ".tar.gz"))
(sha256
(base32
- "0d46bdvxdiv59lxnb0xz9ywm8arsr6xsapi5s6y6vnys2wjz6aax"))))
- (replacement libtiff/fixed)
+ "1j3snghqjbhwmnm5vz3dr1zm68dj15mgbx1wqld7vkl7n2nfaihf"))))
(build-system gnu-build-system)
(outputs '("out"
- "doc")) ;1.3 MiB of HTML documentation
+ "doc")) ;1.8 MiB of HTML documentation
(arguments
;; Instead of using --docdir, this package has its own --with-docdir.
`(#:configure-flags
@@ -618,20 +618,6 @@ collection of tools for doing simple manipulations of TIFF images.")
"See COPYRIGHT in the distribution."))
(home-page "http://www.simplesystems.org/libtiff/")))
-(define-public libtiff/fixed
- (package
- (inherit libtiff)
- (name "libtiff")
- (version "4.2.0")
- (source
- (origin
- (method url-fetch)
- (uri (string-append "https://download.osgeo.org/libtiff/tiff-"
- version ".tar.gz"))
- (sha256
- (base32
- "1jrkjv0xya9radddn8idxvs2gqzp3l2b1s8knlizmn7ad3jq817b"))))))
-
(define-public leptonica
(package
(name "leptonica")
@@ -694,15 +680,15 @@ arithmetic ops.")
(define-public jbig2dec
(package
(name "jbig2dec")
- (version "0.18")
+ (version "0.19")
(source (origin
(method url-fetch)
(uri (string-append "https://github.com/ArtifexSoftware"
"/ghostpdl-downloads/releases/download"
- "/gs951/" name "-" version ".tar.gz"))
+ "/gs9533/" name "-" version ".tar.gz"))
(sha256
(base32
- "0pigfw2v0ppvr0lbysm69gx0zsa5q2q92yrb8af2j3im6x97f6cy"))))
+ "0dwa24kjqyg9hmm40fh048sdxfpnasz43l2rm8wlkw1qbdlpd517"))))
(build-system gnu-build-system)
(arguments '(#:configure-flags '("--disable-static")
#:phases (modify-phases %standard-phases
@@ -720,7 +706,7 @@ arithmetic ops.")
`(("autoconf" ,autoconf)
("automake" ,automake)
("libtool" ,libtool)
- ("python" ,python-wrapper))) ;for tests
+ ("python" ,python-minimal-wrapper))) ;for tests
(synopsis "Decoder of the JBIG2 image compression format")
(description
"JBIG2 is designed for lossy or lossless encoding of @code{bilevel} (1-bit
@@ -813,17 +799,17 @@ images of initially unknown height.")
(define-public openjpeg-data
(package
(name "openjpeg-data")
- (version "2020.05.19")
+ (version "2020.11.30")
(source
(origin
(method git-fetch)
(uri
(git-reference
(url "https://github.com/uclouvain/openjpeg-data")
- (commit "c5c4a8c")))
+ (commit "cd724fb1f93e6af41ebc68c4904f4bf2a4cd1e60")))
(file-name (git-file-name name version))
(sha256
- (base32 "1jp84gbhw8q5b8mhc322ql9410hjf32w9hg10x4isfa9j59mnncb"))))
+ (base32 "1q2swh4g9r9haqs075fyk42aclqcs9q51lqqzfb57lisszminpwm"))))
(build-system copy-build-system)
(synopsis "Test files for OpenJPEG")
(description "OpenJPEG-Data contains all files required to run the openjpeg
@@ -835,23 +821,47 @@ test suite, including conformance tests (following Rec. ITU-T T.803 | ISO/IEC
(define-public openjpeg
(package
(name "openjpeg")
- (version "2.3.1")
+ (version "2.4.0")
(source
(origin
(method git-fetch)
- (uri
- (git-reference
- (url "https://github.com/uclouvain/openjpeg")
- (commit
- (string-append "v" version))))
- (file-name
- (git-file-name "openjpeg" version))
+ (uri (git-reference
+ (url "https://github.com/uclouvain/openjpeg")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
(sha256
- (base32 "1dn98d2dfa1lqyxxmab6rrcv52dyhjr4g7i4xf2w54fqsx14ynrb"))))
+ (base32 "143dvy5g6v6129lzvl0r8mrgva2fppkn0zl099qmi9yi9l9h7yyf"))))
(build-system cmake-build-system)
(arguments
- '(#:tests? #f ;TODO: requires a 1.1 GiB data repository
- #:configure-flags '("-DBUILD_STATIC_LIBS=OFF")))
+ `(#:configure-flags
+ (list
+ "-DBUILD_STATIC_LIBS=OFF"
+ "-DBUILD_UNIT_TESTS=ON"
+ "-DBUILD_TESTING=ON"
+ (string-append "-DOPJ_DATA_ROOT="
+ (assoc-ref %build-inputs "openjpeg-data")))
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'disable-failing-tests
+ (lambda _
+ ;; To be re-enabled after upstream fixes the bug,
+ ;; https://github.com/uclouvain/openjpeg/issues/1264
+ (substitute* "tests/CMakeLists.txt"
+ (("add_subdirectory\\(nonregression\\)")
+ ""))
+ ;; These tests fail on all architectures except x86_64
+ (substitute* "tests/conformance/CMakeLists.txt"
+ ;; 4, 5, 6 fail
+ (("numFileC1P0 RANGE 1 16") "numFileC1P0 RANGE 7 16")
+ ;; 2, 3, 4, 5 fail
+ (("numFileC1P1 RANGE 1 7") "numFileC1P1 1 6 7")
+ ;; 2, 3 fail
+ (("numFileJP2 RANGE 1 9") "numFileJP2 RANGE 4 9")
+ ;; All fail
+ (("subsampling.*") "")
+ (("zoo.*") "")))))))
+ (native-inputs
+ `(("openjpeg-data" ,openjpeg-data))) ; Files for test-suite
(inputs
`(("lcms" ,lcms)
("libpng" ,libpng)
@@ -1169,79 +1179,87 @@ graphics image formats like PNG, BMP, JPEG, TIFF and others.")
(home-page "http://freeimage.sourceforge.net")))
(define-public vigra
- (package
- (name "vigra")
- (version "1.11.1")
- (source
- (origin
- (method url-fetch)
- (uri (string-append "https://github.com/ukoethe/vigra/releases/download/"
- "Version-" (string-join (string-split version #\.) "-")
- "/vigra-" version "-src.tar.gz"))
- (patches (search-patches "vigra-python-compat.patch"))
- (sha256 (base32
- "1bqs8vx5i1bzamvv563i24gx2xxdidqyxh9iaj46mbznhc84wmm5"))))
- (build-system cmake-build-system)
- (inputs
- `(("boost" ,boost)
- ("fftw" ,fftw)
- ("fftwf" ,fftwf)
- ("hdf5" ,hdf5)
- ("ilmbase" ,ilmbase) ; propagated by openexr, but needed explicitly
- ; to create a configure-flag
- ("libjpeg" ,libjpeg-turbo)
- ("libpng" ,libpng)
- ("libtiff" ,libtiff)
- ("openexr" ,openexr-2)
- ("python" ,python-wrapper)
- ("python-numpy" ,python-numpy)
- ("zlib" ,zlib)))
- (native-inputs
- `(("doxygen" ,doxygen)
- ("python-nose" ,python-nose)
- ("sphinx" ,python-sphinx)))
- (arguments
- `(#:test-target "check"
- #:phases
- (modify-phases %standard-phases
- (add-after 'unpack 'disable-broken-tests
- (lambda _
- ;; See https://github.com/ukoethe/vigra/issues/432
- (substitute* "test/fourier/CMakeLists.txt"
- (("VIGRA_ADD_TEST.*") ""))
- ;; This test fails with Numpy 1.15:
- ;; <https://github.com/ukoethe/vigra/issues/436>.
- (substitute* "vigranumpy/test/CMakeLists.txt"
- (("test1\\.py") ""))
- #t)))
- #:configure-flags
- (list "-Wno-dev" ; suppress developer mode with lots of warnings
- (string-append "-DVIGRANUMPY_INSTALL_DIR="
- (assoc-ref %outputs "out")
- "/lib/python"
- ,(version-major+minor (package-version python))
- "/site-packages")
- ;; OpenEXR is not enabled by default.
- "-DWITH_OPENEXR=1"
- ;; Fix rounding error on 32-bit machines
- "-DCMAKE_C_FLAGS=-ffloat-store"
- ;; The header files of ilmbase are not found when included
- ;; by the header files of openexr, and an explicit flag
- ;; needs to be set.
- (string-append "-DCMAKE_CXX_FLAGS=-I"
- (assoc-ref %build-inputs "ilmbase")
- "/include/OpenEXR"
- " -ffloat-store"))))
- (synopsis "Computer vision library")
- (description
- "VIGRA stands for Vision with Generic Algorithms. It is an image
-processing and analysis library that puts its main emphasis on customizable
-algorithms and data structures. It is particularly strong for
-multi-dimensional image processing.")
- (license license:expat)
- (home-page "https://ukoethe.github.io/vigra/")
- (properties '((max-silent-time . 7200))))) ;2 hours, to avoid timing out
-
+ (let ((commit "9b514fa00a136f5fd81bb57ee9f6293c333ffc1f")
+ (revision "0"))
+ (package
+ (name "vigra")
+ (version (git-version "1.11.1" revision commit))
+ (source
+ (origin
+ ;; The last release is 1.11.1, from 2017. It's becoming more and more
+ ;; difficult to build this old release, and the upstream developers
+ ;; suggest on their home page to build from the Git repo, saying "It is
+ ;; generally safe to use the 'master' branch of the development snapshot,
+ ;; as we avoid uploading untested or incompatible changes to this branch."
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/ukoethe/vigra")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256 (base32
+ "1vzlypviala109imwxkp46lqhhxszf79ypfb8wxg6z7g02j7mm73"))))
+ (build-system cmake-build-system)
+ (inputs
+ `(("boost" ,boost)
+ ("fftw" ,fftw)
+ ("fftwf" ,fftwf)
+ ("hdf5" ,hdf5)
+ ("ilmbase" ,ilmbase) ; propagated by openexr, but needed explicitly
+ ; to create a configure-flag
+ ("libjpeg" ,libjpeg-turbo)
+ ("libpng" ,libpng)
+ ("libtiff" ,libtiff)
+ ("openexr" ,openexr-2)
+ ("python" ,python-wrapper)
+ ;("python-numpy" ,python-numpy)
+ ("zlib" ,zlib)))
+ (native-inputs
+ `(("doxygen" ,doxygen)
+ ("python-nose" ,python-nose)
+ ("sphinx" ,python-sphinx)))
+ (arguments
+ `(#:test-target "check"
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'disable-broken-tests
+ (lambda _
+ ;; See https://github.com/ukoethe/vigra/issues/432
+ (substitute* "test/fourier/CMakeLists.txt"
+ (("VIGRA_ADD_TEST.*") ""))
+ ;; This test fails with Numpy 1.15:
+ ;; <https://github.com/ukoethe/vigra/issues/436>.
+ (substitute* "vigranumpy/test/CMakeLists.txt"
+ (("test1\\.py") ""))
+ #t)))
+ #:configure-flags
+ (list "-Wno-dev" ; suppress developer mode with lots of warnings
+ (string-append "-DVIGRANUMPY_INSTALL_DIR="
+ (assoc-ref %outputs "out")
+ "/lib/python"
+ ,(version-major+minor (package-version python))
+ "/site-packages")
+ ;; Vigranumpy isn't compatible with numpy >= 1.20.
+ "-DWITH_VIGRANUMPY=0"
+ ;; OpenEXR is not enabled by default.
+ "-DWITH_OPENEXR=1"
+ ;; Fix rounding error on 32-bit machines
+ "-DCMAKE_C_FLAGS=-ffloat-store"
+ ;; The header files of ilmbase are not found when included
+ ;; by the header files of openexr, and an explicit flag
+ ;; needs to be set.
+ (string-append "-DCMAKE_CXX_FLAGS=-I"
+ (assoc-ref %build-inputs "ilmbase")
+ "/include/OpenEXR"
+ " -ffloat-store"))))
+ (synopsis "Computer vision library")
+ (description
+ "VIGRA stands for Vision with Generic Algorithms. It is an image
+ processing and analysis library that puts its main emphasis on customizable
+ algorithms and data structures. It is particularly strong for
+ multi-dimensional image processing.")
+ (license license:expat)
+ (home-page "https://ukoethe.github.io/vigra/")
+ (properties '((max-silent-time . 7200)))))) ;2 hours, to avoid timing out
(define-public vigra-c
(let* ((commit "66ff4fa5a7d4a77415caa676a45c2c6ea16562e7")
@@ -1279,7 +1297,7 @@ language bindings to VIGRA.")
(define-public libwebp
(package
(name "libwebp")
- (version "1.1.0")
+ (version "1.2.0")
(source
(origin
;; No tarballs are provided for >0.6.1.
@@ -1290,7 +1308,7 @@ language bindings to VIGRA.")
(file-name (git-file-name name version))
(sha256
(base32
- "0r2yy9if0ndvpzadk39bigvsygyqnlv0xjb9w2aj6rs534mncazz"))))
+ "1rgblphsd56033w7lpkrzl7m5w0fi7wavxri1ayzlg8fhpmmqp4k"))))
(build-system gnu-build-system)
(inputs
`(("freeglut" ,freeglut)
@@ -1447,7 +1465,7 @@ ISO/IEC 15444-1).")
(define-public zimg
(package
(name "zimg")
- (version "2.9.3")
+ (version "3.0.3")
(source
(origin
(method git-fetch)
@@ -1456,7 +1474,7 @@ ISO/IEC 15444-1).")
(commit (string-append "release-" version))))
(file-name (git-file-name name version))
(sha256
- (base32 "1dqyrq3p8bkgvj4ci50ac342hjnhyz6xxvhiwp7wpi3v3nbj7s02"))))
+ (base32 "0pwgf1mybpa3fs13p6jryzm32vfldyql9biwaypqdcimlnlmyk20"))))
(build-system gnu-build-system)
(native-inputs
`(("autoconf" ,autoconf)
@@ -2344,7 +2362,7 @@ GIF, TIFF, WEBP, BMP, PNG, XPM formats.")
("gettext" ,gettext-minimal)))
(inputs
`(("gtk+" ,gtk+)
- ("gdk-pixbuf" ,gdk-pixbuf+svg)
+ ("librsvg" ,librsvg)
("hicolor-icon-theme" ,hicolor-icon-theme)
("libmypaint" ,libmypaint)
("mypaint-brushes" ,mypaint-brushes)
@@ -2383,10 +2401,8 @@ Wacom-style graphics tablets.")
(add-after 'unpack 'configure
(lambda* (#:key inputs #:allow-other-keys)
(substitute* (list "src/dependency.py" "src/exif.py")
- (("'exiftool")
- (string-append "'"
- (assoc-ref inputs "perl-image-exiftool")
- "/bin/exiftool")))))
+ (("exiftool")
+ (search-input-file inputs "/bin/exiftool")))))
(add-before 'install 'check
(lambda _
(invoke "pytest")))
@@ -2400,9 +2416,9 @@ Wacom-style graphics tablets.")
(lambda* (#:key inputs outputs #:allow-other-keys)
(let ((out (assoc-ref outputs "out")))
(wrap-program (string-append out "/bin/phockup")
- `("PYTHONPATH" prefix
+ `("GUIX_PYTHONPATH" prefix
,(search-path-as-string->list
- (getenv "PYTHONPATH"))))))))))
+ (getenv "GUIX_PYTHONPATH"))))))))))
(inputs
`(("perl-image-exiftool" ,perl-image-exiftool)
("python" ,python)
diff --git a/gnu/packages/imagemagick.scm b/gnu/packages/imagemagick.scm
index 4f0ffcbcc6..f7cd961c05 100644
--- a/gnu/packages/imagemagick.scm
+++ b/gnu/packages/imagemagick.scm
@@ -235,12 +235,12 @@ script.")
"--with-quantum-depth=16" ; required by Octave
"--enable-quantum-library-names"
(string-append "--with-gs-font-dir="
- (assoc-ref %build-inputs "gs-fonts")
+ (assoc-ref %build-inputs "font-ghostscript")
"/share/fonts/type1/ghostscript"))))
(inputs
`(("graphviz" ,graphviz)
("ghostscript" ,ghostscript)
- ("gs-fonts" ,gs-fonts)
+ ("font-ghostscript" ,font-ghostscript)
("lcms" ,lcms)
("libx11" ,libx11)
("libxml2" ,libxml2)
diff --git a/gnu/packages/inkscape.scm b/gnu/packages/inkscape.scm
index 8747218e54..ed40322e0d 100644
--- a/gnu/packages/inkscape.scm
+++ b/gnu/packages/inkscape.scm
@@ -4,7 +4,7 @@
;;; Copyright © 2016, 2018 Ricardo Wurmus <rekado@elephly.net>
;;; Copyright © 2017, 2020 Marius Bakke <mbakke@fastmail.com>
;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
-;;; Copyright © 2020 Maxim Cournoyer <maxim.cournoyer@gmail.com>
+;;; Copyright © 2020, 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;; Copyright © 2020 Boris A. Dekshteyn <boris.dekshteyn@gmail.com>
;;; Copyright © 2020 Ekaitz Zarraga <ekaitz@elenq.tech>
;;;
@@ -55,71 +55,6 @@
(define-public inkscape
(package
(name "inkscape")
- (version "0.92.4")
- (source (origin
- (method url-fetch)
- (uri (string-append "https://media.inkscape.org/dl/"
- "resources/file/"
- "inkscape-" version ".tar.bz2"))
- (patches (search-patches "inkscape-poppler-0.76.patch"))
- (sha256
- (base32
- "0pjinhjibfsz1aywdpgpj3k23xrsszpj4a1ya5562dkv2yl2vv2p"))))
- (build-system cmake-build-system)
- (inputs
- `(("aspell" ,aspell)
- ("gtkmm" ,gtkmm-2)
- ("gtk" ,gtk+-2)
- ("gsl" ,gsl)
- ("poppler" ,poppler)
- ("libpng" ,libpng)
- ("libxml2" ,libxml2)
- ("libxslt" ,libxslt)
- ("libgc" ,libgc)
- ("freetype" ,freetype)
- ("popt" ,popt)
- ("potrace" ,potrace)
- ("python" ,python-2)
- ("lcms" ,lcms)
- ("boost" ,boost)))
- (native-inputs
- `(("intltool" ,intltool)
- ("glib" ,glib "bin")
- ("perl" ,perl)
- ("pkg-config" ,pkg-config)))
- ;; FIXME: tests require gmock
- (arguments
- `(#:tests? #f
- #:phases
- (modify-phases %standard-phases
- (add-after 'unpack 'patch-icon-cache-generator
- (lambda _
- (substitute* "share/icons/application/CMakeLists.txt"
- (("gtk-update-icon-cache") "true"))
- #t))
- (add-after 'unpack 'adjust-for-new-poppler
- (lambda _
- (substitute* (find-files "src/extension/internal/pdfinput")
- ;; Needed for Poppler 0.82.
- (("Unicode \\*u") "Unicode const *u")
- ;; Needed for Poppler 0.83.
- (("\\(GfxPath") "(const GfxPath")
- (("GfxSubpath") "const GfxSubpath")
- (("new GlobalParams\\(\\)")
- "std::unique_ptr<GlobalParams>(new GlobalParams())")
- (("new GlobalParams\\(poppler_datadir\\)")
- "std::unique_ptr<GlobalParams>(new GlobalParams(poppler_datadir))"))
- #t)))))
- (home-page "https://inkscape.org/")
- (synopsis "Vector graphics editor")
- (description "Inkscape is a vector graphics editor. What sets Inkscape
-apart is its use of Scalable Vector Graphics (SVG), an XML-based W3C standard,
-as the native format.")
- (license license:gpl2+)))
-
-(define-public inkscape-1.1
- (package
- (name "inkscape")
(version "1.1.1")
(source
(origin
@@ -212,8 +147,7 @@ endif()~%~%"
((".*find_package\\(DoubleConversion.*") ""))))))
(build-system cmake-build-system)
(arguments
- `(#:tests? #t
- #:test-target "check" ;otherwise some test binaries are missing
+ `(#:test-target "check" ;otherwise some test binaries are missing
#:imported-modules (,@%cmake-build-system-modules
(guix build glib-or-gtk-build-system))
#:modules ((guix build cmake-build-system)
@@ -221,6 +155,9 @@ endif()~%~%"
(guix build utils))
#:phases
(modify-phases %standard-phases
+ (add-after 'unpack 'generate-gdk-pixbuf-loaders-cache-file
+ (assoc-ref glib-or-gtk:%standard-phases
+ 'generate-gdk-pixbuf-loaders-cache-file))
(add-after 'unpack 'patch-icon-cache-generator
(lambda _
(substitute* "share/icons/application/CMakeLists.txt"
@@ -236,8 +173,7 @@ endif()~%~%"
(add-after 'unpack 'set-home
;; Mute Inkscape warnings during tests.
(lambda _
- (setenv "HOME" (getcwd))
- (format #t "ARGS is set to: ~a" (getenv "ARGS"))))
+ (setenv "HOME" (getcwd))))
;; Move the check phase after the install phase, as when run in the
;; tests, Inkscape relies on files that are not yet installed, such
;; as the "share/inkscape/ui/units.xml" file.
@@ -253,12 +189,13 @@ endif()~%~%"
(lambda* (#:key outputs #:allow-other-keys)
(let ((out (assoc-ref outputs "out")))
(wrap-program (string-append out "/bin/inkscape")
- `("PYTHONPATH" ":" prefix (,(getenv "PYTHONPATH"))))))))))
+ `("GUIX_PYTHONPATH" ":" prefix
+ (,(getenv "GUIX_PYTHONPATH"))))))))))
(inputs
`(("aspell" ,aspell)
("autotrace" ,autotrace)
("gdl" ,gdl-minimal)
- ("gtkmm" ,gtkmm)
+ ("gtkmm" ,gtkmm-3)
("gtk" ,gtk+)
("gtkspell3" ,gtkspell3)
("gsl" ,gsl)
@@ -269,7 +206,7 @@ endif()~%~%"
("libxml2" ,libxml2)
("libxslt" ,libxslt)
("libgc" ,libgc)
- ("libsoup" ,libsoup-minimal)
+ ("libsoup" ,libsoup-minimal-2)
("libcdr" ,libcdr)
("libvisio" ,libvisio)
("libwpd" ,libwpd)
diff --git a/gnu/packages/irc.scm b/gnu/packages/irc.scm
index 840c27f5c5..5a3aba50b7 100644
--- a/gnu/packages/irc.scm
+++ b/gnu/packages/irc.scm
@@ -120,7 +120,7 @@
(modify-phases %standard-phases
(add-after 'unpack 'patch-inxi-reference
(lambda* (#:key inputs #:allow-other-keys)
- (let ((inxi (string-append (assoc-ref inputs "inxi") "/bin/inxi")))
+ (let ((inxi (search-input-file inputs "/bin/inxi")))
(symlink inxi "data/scripts/inxi")
#t))))
#:tests? #f)) ; no test target
diff --git a/gnu/packages/irods.scm b/gnu/packages/irods.scm
index bb0263682c..e9ac0d5297 100644
--- a/gnu/packages/irods.scm
+++ b/gnu/packages/irods.scm
@@ -120,18 +120,15 @@
(("'usr', 'lib', 'irods'") "'lib', 'irods'"))
(substitute* "scripts/irods/pypyodbc.py"
(("\"/usr/lib/libodbc.so\"")
- (string-append (assoc-ref inputs "unixodbc") "/lib/libodbc.so")))))
+ (search-input-file inputs "/lib/libodbc.so")))))
(add-after 'set-paths 'adjust-CPLUS_INCLUDE_PATH
(lambda* (#:key inputs #:allow-other-keys)
(let ((gcc (assoc-ref inputs "gcc")))
(setenv "CPLUS_INCLUDE_PATH"
(string-join
- (cons* (string-append (assoc-ref inputs "libcxx+libcxxabi")
- "/include/c++/v1")
- (string-append (assoc-ref inputs "catch2")
- "/include/catch2")
- (string-append (assoc-ref inputs "json")
- "/include/nlohmann")
+ (cons* (search-input-directory inputs "/include/c++/v1")
+ (search-input-directory inputs "/include/catch2")
+ (search-input-directory inputs "/include/nlohmann")
;; Hide GCC's C++ headers so that they do not interfere with
;; the Clang headers.
(delete (string-append gcc "/include/c++")
@@ -231,10 +228,10 @@ stored.")
(let ((gcc (assoc-ref inputs "gcc")))
(setenv "CPLUS_INCLUDE_PATH"
(string-join
- (cons* (string-append (assoc-ref inputs "libcxx+libcxxabi")
- "/include/c++/v1")
- (string-append (assoc-ref inputs "json")
- "/include/nlohmann")
+ (cons* (search-input-directory inputs
+ "include/c++/v1")
+ (search-input-directory inputs
+ "include/nlohmann")
;; Hide GCC's C++ headers so that they do not interfere with
;; the Clang headers.
(delete (string-append gcc "/include/c++")
diff --git a/gnu/packages/iso-codes.scm b/gnu/packages/iso-codes.scm
index 637390d734..b2cfd3434c 100644
--- a/gnu/packages/iso-codes.scm
+++ b/gnu/packages/iso-codes.scm
@@ -44,10 +44,19 @@
(base32
"1q6x9c5x4x0x4q11iygldsmxdyzhz1mb4n8im76glwsgqsqyjs80"))))
(build-system gnu-build-system)
+ ;; TODO(staging): Unconditionally move inputs to native-inputs.
+ (native-inputs
+ (if (%current-target-system)
+ `(("python" ,python-wrapper)
+ ("perl" ,perl)
+ ("gettext" ,gettext-minimal))
+ '()))
(inputs
- `(("gettext" ,gettext-minimal)
- ("perl" ,perl)
- ("python" ,python-wrapper)))
+ `(,@(if (%current-target-system)
+ '()
+ `(("gettext" ,gettext-minimal)
+ ("perl" ,perl)
+ ("python" ,python-wrapper)))))
(synopsis "Various ISO standards")
(description
"This package provides lists of various ISO standards (e.g. country,
diff --git a/gnu/packages/jami.scm b/gnu/packages/jami.scm
index 5cb92840dc..7c38b17b5e 100644
--- a/gnu/packages/jami.scm
+++ b/gnu/packages/jami.scm
@@ -546,6 +546,11 @@ decentralized calling using P2P-DHT.")
(add-after 'unpack 'change-directory
(lambda _
(chdir "client-gnome")))
+ (add-after 'change-directory 'fix-webkit-detection
+ (lambda _
+ (substitute* "CMakeLists.txt"
+ (("WEBKIT webkit2gtk-4.0")
+ "WEBKIT webkit2gtk-4.1"))))
(add-after 'install 'glib-or-gtk-compile-schemas
(assoc-ref gtk:%standard-phases 'glib-or-gtk-compile-schemas))
(add-after 'glib-or-gtk-compile-schemas 'glib-or-gtk-wrap
diff --git a/gnu/packages/java-graphics.scm b/gnu/packages/java-graphics.scm
index f7a89021cd..960579f770 100644
--- a/gnu/packages/java-graphics.scm
+++ b/gnu/packages/java-graphics.scm
@@ -75,8 +75,7 @@ libraries.")
(add-before 'check 'start-xorg-server
(lambda* (#:key inputs #:allow-other-keys)
;; The test suite requires a running X server.
- (system (string-append (assoc-ref inputs "xorg-server")
- "/bin/Xvfb :1 -screen 0 640x480x24 &"))
+ (system "Xvfb :1 -screen 0 640x480x24 &")
(setenv "DISPLAY" ":1")
#t)))))
(inputs
diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm
index fdd849b8d6..c5f78750e3 100644
--- a/gnu/packages/java.scm
+++ b/gnu/packages/java.scm
@@ -9,7 +9,7 @@
;;; Copyright © 2017, 2019, 2021 Tobias Geerinckx-Rice <me@tobias.gr>
;;; Copyright © 2018, 2019 Gábor Boskovits <boskovits@gmail.com>
;;; Copyright © 2018 Chris Marusich <cmmarusich@gmail.com>
-;;; Copyright © 2018, 2019, 2020 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2018, 2019, 2020, 2021 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2019, 2020, 2021 Björn Höfling <bjoern.hoefling@bjoernhoefling.de>
;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
;;; Copyright © 2020 Raghav Gururajan <raghavgururajan@disroot.org>
@@ -17,6 +17,7 @@
;;; Copyright © 2021 Vincent Legoll <vincent.legoll@gmail.com>
;;; Copyright © 2021 Mike Gerwitz <mtg@gnu.org>
;;; Copyright © 2021 Pierre Langlois <pierre.langlois@gmx.com>
+;;; Copyright © 2021 Guillaume Le Vaillant <glv@posteo.net>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -42,6 +43,7 @@
#:use-module (guix svn-download)
#:use-module ((guix build utils) #:select (alist-replace))
#:use-module (guix utils)
+ #:use-module (guix gexp)
#:use-module (guix build-system ant)
#:use-module (guix build-system gnu)
#:use-module (guix build-system maven)
@@ -58,6 +60,7 @@
#:use-module (gnu packages elf)
#:use-module (gnu packages fontutils)
#:use-module (gnu packages gawk)
+ #:use-module (gnu packages gcc)
#:use-module (gnu packages gettext)
#:use-module (gnu packages gl)
#:use-module (gnu packages ghostscript) ;lcms
@@ -129,24 +132,11 @@
(base32 "0lpbnb4dq4azmsvlhp6khq1gy42kyqyjv8gww74g5lm2y6blm4fa"))))
(build-system gnu-build-system)
(arguments
- `(#:configure-flags (list "--enable-debuginfo" "--disable-static")
- #:phases (modify-phases %standard-phases
- (replace 'configure
- (lambda* (#:key build target native-inputs inputs outputs
- (configure-flags '()) out-of-source? system
- #:allow-other-keys)
- (let ((configure (assoc-ref %standard-phases 'configure))
- (enable-64bit? (member system '("aarch64-linux"
- "x86_64-linux"
- "mips64el-linux"))))
- (configure #:build build #:target target
- #:native-inputs native-inputs
- #:inputs inputs #:outputs outputs
- #:configure-flags `(,(if enable-64bit?
- "--enable-64bit"
- '())
- ,@configure-flags)
- #:out-of-source? out-of-source?)))))))
+ `(#:configure-flags (list "--enable-debuginfo"
+ "--disable-static"
+ ,@(if (target-64bit?)
+ `("--enable-64bit")
+ '()))))
(synopsis "ANTLR C Library")
(description "LIBANTLR3C provides run-time C libraries for ANTLR3 (ANother
Tool for Language Recognition v3).")
@@ -197,7 +187,7 @@ and binary format defined in The Java Virtual Machine Specification.")
(delete 'configure)
(add-before 'install 'fix-wrapper
(lambda* (#:key inputs #:allow-other-keys)
- (let ((jps (string-append (assoc-ref inputs "jdk") "/bin/jps")))
+ (let ((jps (search-input-file inputs "/bin/jps")))
(substitute* "bin/drip"
(("jps") jps)
(("brew update && brew upgrade drip") "guix pull && guix install drip")
@@ -242,13 +232,13 @@ only faster.")
(sha256
(base32
"0i99wf9xd3hw1sj2sazychb9prx8nadxh2clgvk3zlmb28v0jbfz"))
- (patches (search-patches "classpath-aarch64-support.patch"))))
+ (patches (search-patches "classpath-aarch64-support.patch"
+ "classpath-miscompilation.patch"))))
(build-system gnu-build-system)
(arguments
`(#:configure-flags
(list (string-append "JAVAC="
- (assoc-ref %build-inputs "jikes")
- "/bin/jikes")
+ (search-input-file %build-inputs "/bin/jikes"))
"--disable-Werror"
"--disable-gmp"
"--disable-gtk-peer"
@@ -259,17 +249,6 @@ only faster.")
"--disable-gjdoc")
#:phases
(modify-phases %standard-phases
- ;; XXX: This introduces a memory leak as we remove a call to free up
- ;; memory for the file name string. This was necessary because of a
- ;; runtime error that would have prevented us from building
- ;; ant-bootstrap later. See https://issues.guix.gnu.org/issue/36685
- ;; for the gnarly details.
- (add-after 'unpack 'remove-call-to-free
- (lambda _
- (substitute* "native/jni/java-io/java_io_VMFile.c"
- (("result = cpio_isFileExists.*" m)
- (string-append m "\n//")))
- #t))
(add-after 'install 'install-data
(lambda _ (invoke "make" "install-data"))))))
(native-inputs
@@ -373,19 +352,15 @@ JNI.")
(modify-phases %standard-phases
(delete 'bootstrap)
(delete 'configure)
- (replace 'build
+ (add-before 'build 'define-java-environment-variables
(lambda* (#:key inputs #:allow-other-keys)
+ ;; First, set environment variables (eases debugging on -K).
(setenv "JAVA_HOME" (assoc-ref inputs "jamvm"))
- (setenv "JAVACMD"
- (string-append (assoc-ref inputs "jamvm")
- "/bin/jamvm"))
- (setenv "JAVAC"
- (string-append (assoc-ref inputs "jikes")
- "/bin/jikes"))
- (setenv "CLASSPATH"
- (string-append (assoc-ref inputs "jamvm")
- "/lib/rt.jar"))
-
+ (setenv "JAVACMD" (search-input-file inputs "/bin/jamvm"))
+ (setenv "JAVAC" (search-input-file inputs "/bin/jikes"))
+ (setenv "CLASSPATH" (search-input-file inputs "/lib/rt.jar"))))
+ (replace 'build
+ (lambda* (#:key inputs #:allow-other-keys)
;; Ant complains if this file doesn't exist.
(setenv "HOME" "/tmp")
(with-output-to-file "/tmp/.ant.properties"
@@ -487,8 +462,7 @@ build process and its dependencies, whereas Make uses Makefile format.")
(lambda* (#:key inputs #:allow-other-keys)
(setenv "CLASSPATH"
(string-join
- (cons (string-append (assoc-ref inputs "jamvm")
- "/lib/rt.jar")
+ (cons (search-input-file inputs "/lib/rt.jar")
(find-files (string-append
(assoc-ref inputs "ant-bootstrap")
"/lib")
@@ -935,6 +909,33 @@ machine.")))
"patches/hotspot/hs23/drop_unlicensed_test.patch")
(("#!/bin/sh") (string-append "#!" (which "sh"))))
#t))
+ (add-after 'unpack 'fix-openjdk
+ (lambda _
+ (substitute* "openjdk/jdk/make/common/Defs-linux.gmk"
+ (("CFLAGS_COMMON = -fno-strict-aliasing" all)
+ (string-append all " -fcommon")))
+ (substitute* "openjdk/hotspot/src/share/vm/code/relocInfo.hpp"
+ (("inline friend relocInfo prefix_relocInfo\\(int datalen = 0\\);")
+ "inline friend relocInfo prefix_relocInfo(int datalen);"))
+ (substitute*
+ '("openjdk/jdk/src/solaris/native/java/net/PlainSocketImpl.c"
+ "openjdk/jdk/src/solaris/native/java/net/PlainDatagramSocketImpl.c")
+ (("#include <sys/sysctl.h>")
+ "#include <linux/sysctl.h>"))
+ ;; It looks like the "h = 31 * h + c" line of the jsum()
+ ;; function gets miscompiled. After a few iterations of the loop
+ ;; the result of "31 * h" is always 0x8000000000000000.
+ ;; Bad optimization maybe...
+ ;; Transform "31 * h + c" into a convoluted "32 * h + c - h"
+ ;; as a workaround.
+ (substitute* "openjdk/hotspot/src/share/vm/memory/dump.cpp"
+ (("h = 31 \\* h \\+ c;")
+ "jlong h0 = h;\nfor(int i = 0; i < 5; i++) h += h;\nh += c - h0;"))
+ ;; Our gcc version is higher than 4.3; replace the failing
+ ;; expression to test this by its result.
+ (substitute* "openjdk/jdk/make/sun/font/Makefile"
+ (("\"\\$\\(shell expr.*0\"")
+ "\"1\" \"0\""))))
(add-after 'unpack 'patch-paths
(lambda* (#:key inputs #:allow-other-keys)
;; buildtree.make generates shell scripts, so we need to replace
@@ -1103,6 +1104,7 @@ machine.")))
(uri (hg-reference
(url "http://hg.openjdk.java.net/jdk6/jdk6/")
(changeset "jdk6-b41")))
+ (file-name "jdk6-checkout")
(sha256
(base32
"14q47yfg586fs64w30g8mk92m5dkxsvr36zzh0ra99xk5x0x96mv"))))
@@ -1112,6 +1114,7 @@ machine.")))
(uri (hg-reference
(url "http://hg.openjdk.java.net/jdk6/jdk6/jdk/")
(changeset "jdk6-b41")))
+ (file-name "jdk-checkout")
(sha256
(base32
"165824nhg1k1dx6zs9dny0j49rmk35jw5b13dmz8c77jfajml4v9"))))
@@ -1121,6 +1124,7 @@ machine.")))
(uri (hg-reference
(url "http://hg.openjdk.java.net/jdk6/jdk6/hotspot/")
(changeset "jdk6-b41")))
+ (file-name "hotspot-checkout")
(sha256
(base32
"07lc1z4k5dj9nrc1wvwmpvxr3xgxrdkdh53xb95skk5ij49yagfd"))))
@@ -1130,6 +1134,7 @@ machine.")))
(uri (hg-reference
(url "http://hg.openjdk.java.net/jdk6/jdk6/corba/")
(changeset "jdk6-b41")))
+ (file-name "corba-checkout")
(sha256
(base32
"1p9g1r9dnax2iwp7yb59qx7m4nmshqhwmrb2b8jj8zgbd9dl2i3q"))))
@@ -1139,6 +1144,7 @@ machine.")))
(uri (hg-reference
(url "http://hg.openjdk.java.net/jdk6/jdk6/langtools/")
(changeset "jdk6-b41")))
+ (file-name "langtools-checkout")
(sha256
(base32
"1x52wd67fynbbd9ild6fb4wvba3f5hhwk03qdjfazd0a1qr37z3d"))))
@@ -1148,6 +1154,7 @@ machine.")))
(uri (hg-reference
(url "http://hg.openjdk.java.net/jdk6/jdk6/jaxp/")
(changeset "jdk6-b41")))
+ (file-name "jaxp-checkout")
(sha256
(base32
"0shlqrvzpr4nrkmv215lbxnby63s3yvbdh1yxcayznsyqwa4nlxm"))))
@@ -1157,6 +1164,7 @@ machine.")))
(uri (hg-reference
(url "http://hg.openjdk.java.net/jdk6/jdk6/jaxws/")
(changeset "jdk6-b41")))
+ (file-name "jaxws-checkout")
(sha256
(base32
"0835lkw8vib1xhp8lxnybhlvzdh699hbi4mclxanydjk63zbpxk0"))))))
@@ -1279,6 +1287,25 @@ bootstrapping purposes.")
"openjdk.src/jdk/src/solaris/native/sun/nio/fs/LinuxNativeDispatcher.c")
(("attr/xattr.h") "sys/xattr.h"))
#t))
+ (add-after 'unpack 'fix-openjdk
+ (lambda _
+ (substitute* "openjdk.src/jdk/make/common/Defs-linux.gmk"
+ (("CFLAGS_COMMON = -fno-strict-aliasing" all)
+ (string-append all " -fcommon")))
+ (substitute*
+ '("openjdk.src/jdk/src/solaris/native/java/net/PlainSocketImpl.c"
+ "openjdk.src/jdk/src/solaris/native/java/net/PlainDatagramSocketImpl.c")
+ (("#include <sys/sysctl.h>")
+ "#include <linux/sysctl.h>"))
+ ;; It looks like the "h = 31 * h + c" line of the jsum()
+ ;; function gets miscompiled. After a few iterations of the loop
+ ;; the result of "31 * h" is always 0x8000000000000000.
+ ;; Bad optimization maybe...
+ ;; Transform "31 * h + c" into a convoluted "32 * h + c - h"
+ ;; as a workaround.
+ (substitute* "openjdk.src/hotspot/src/share/vm/memory/dump.cpp"
+ (("h = 31 \\* h \\+ c;")
+ "jlong h0 = h;\nfor(int i = 0; i < 5; i++) h += h;\nh += c - h0;"))))
(add-after 'unpack 'fix-x11-extension-include-path
(lambda* (#:key inputs #:allow-other-keys)
(substitute* "openjdk.src/jdk/make/sun/awt/mawt.gmk"
@@ -1572,8 +1599,8 @@ bootstrapping purposes.")
(add-after 'install 'install-keystore
(lambda* (#:key inputs outputs #:allow-other-keys)
(let* ((keystore "cacerts")
- (certs-dir (string-append (assoc-ref inputs "nss-certs")
- "/etc/ssl/certs"))
+ (certs-dir (search-input-directory inputs
+ "etc/ssl/certs"))
(keytool (string-append (assoc-ref outputs "jdk")
"/bin/keytool")))
(define (extract-cert file target)
@@ -1754,7 +1781,7 @@ IcedTea build harness.")
(guix build syscalls)
,@%gnu-build-system-modules)
- #:disallowed-references ((,icedtea-7 "jdk"))
+ #:disallowed-references ,(list (gexp-input icedtea-7 "jdk"))
,@(substitute-keyword-arguments (package-arguments icedtea-7)
((#:modules modules)
@@ -1767,7 +1794,9 @@ IcedTea build harness.")
(srfi srfi-26)))
((#:configure-flags flags)
`(let ((jdk (assoc-ref %build-inputs "jdk")))
- `( ;;"--disable-bootstrap"
+ `("CFLAGS=-fcommon"
+ "CXXFLAGS=-fcommon"
+ ;;"--disable-bootstrap"
"--enable-bootstrap"
"--enable-nss"
,(string-append "--with-parallel-jobs="
@@ -1832,6 +1861,13 @@ new Date();"))
(find-files "openjdk.src/jdk/src/solaris/native"
"\\.c|\\.h"))
#t)))
+ (replace 'fix-openjdk
+ (lambda _
+ (substitute*
+ '("openjdk.src/jdk/src/solaris/native/java/net/PlainSocketImpl.c"
+ "openjdk.src/jdk/src/solaris/native/java/net/PlainDatagramSocketImpl.c")
+ (("#include <sys/sysctl.h>")
+ "#include <linux/sysctl.h>"))))
(replace 'install
(lambda* (#:key outputs #:allow-other-keys)
(let ((doc (string-append (assoc-ref outputs "doc")
@@ -1910,7 +1946,8 @@ new Date();"))
((guix build syscalls)
,@%gnu-build-system-modules)
- #:disallowed-references (,icedtea-8 (,icedtea-8 "jdk"))
+ #:disallowed-references ,(list (gexp-input icedtea-8)
+ (gexp-input icedtea-8 "jdk"))
#:phases
(modify-phases %standard-phases
@@ -1925,7 +1962,12 @@ new Date();"))
(lambda* (#:key inputs outputs #:allow-other-keys)
;; TODO: unbundle libpng and lcms
(invoke "bash" "./configure"
- (string-append "--with-freetype=" (assoc-ref inputs "freetype"))
+ ;; Add flags for compilation with gcc >= 10
+ ,(string-append "--with-extra-cflags=-fcommon"
+ " -fno-delete-null-pointer-checks"
+ " -fno-lifetime-dse")
+ (string-append "--with-freetype="
+ (assoc-ref inputs "freetype"))
"--disable-freetype-bundling"
"--disable-warnings-as-errors"
"--disable-hotspot-gtest"
@@ -2099,17 +2141,28 @@ new Date();"))
(replace 'configure
(lambda* (#:key inputs outputs #:allow-other-keys)
(invoke "bash" "./configure"
- (string-append "--with-freetype=" (assoc-ref inputs "freetype"))
+ ;; Add flags for compilation with gcc >= 10
+ ,(string-append "--with-extra-cflags=-fcommon"
+ " -fno-delete-null-pointer-checks"
+ " -fno-lifetime-dse")
+ (string-append "--with-freetype="
+ (assoc-ref inputs "freetype"))
"--disable-freetype-bundling"
"--disable-warnings-as-errors"
"--disable-hotspot-gtest"
"--with-giflib=system"
"--with-libjpeg=system"
"--with-native-debug-symbols=zipped"
- (string-append "--prefix=" (assoc-ref outputs "out")))
- #t))))
+ (string-append "--prefix=" (assoc-ref outputs "out")))))
+ (add-after 'unpack 'disable-warnings-as-errors
+ (lambda _
+ ;; It looks like the "--disable-warnings-as-errors" option of
+ ;; the 'configure' phase is not working.
+ (substitute* "make/autoconf/generated-configure.sh"
+ (("-Werror") ""))))))
((#:disallowed-references _ '())
- `(,openjdk9 (,openjdk9 "jdk")))))
+ `(,(gexp-input openjdk9)
+ ,(gexp-input openjdk9 "jdk")))))
(native-inputs
`(("openjdk9" ,openjdk9)
("openjdk9:jdk" ,openjdk9 "jdk")
@@ -2141,12 +2194,17 @@ new Date();"))
`(#:imported-modules ((guix build syscalls)
,@%gnu-build-system-modules)
- #:disallowed-references (,openjdk10 (,openjdk10 "jdk"))
+ #:disallowed-references ,(list (gexp-input openjdk10)
+ (gexp-input openjdk10 "jdk"))
#:tests? #f; requires jtreg
;; TODO package jtreg
#:configure-flags
- `("--disable-option-checking" ; --enable-fast-install default flag errors otherwise
+ `(;; Add flags for compilation with gcc >= 10
+ ,(string-append "--with-extra-cflags=-fcommon"
+ " -fno-delete-null-pointer-checks"
+ " -fno-lifetime-dse")
+ "--disable-option-checking" ; --enable-fast-install default flag errors otherwise
"--disable-warnings-as-errors"
;; make validate-runpath pass, see: http://issues.guix.info/issue/32894
"--with-native-debug-symbols=zipped"
@@ -2635,6 +2693,7 @@ new Date();"))
(substitute-keyword-arguments (package-arguments ant-bootstrap)
((#:phases phases)
`(modify-phases ,phases
+ (delete 'define-java-environment-variables)
(add-after 'unpack 'remove-scripts
;; Remove bat / cmd scripts for DOS as well as the antRun and runant
;; wrappers.
@@ -3072,9 +3131,9 @@ debugging, etc.")
#t))))
(arguments
`(#:make-flags ; bootstrap from javacc-4
- (list (string-append "-Dbootstrap-jar="
- (assoc-ref %build-inputs "javacc")
- "/share/java/javacc.jar"))
+ ,#~(list (string-append "-Dbootstrap-jar="
+ #$(this-package-native-input "javacc")
+ "/share/java/javacc.jar"))
#:test-target "test"
#:phases
(modify-phases %standard-phases
@@ -3251,19 +3310,22 @@ Main-Class: org.eclipse.jdt.internal.compiler.batch.Main\n"
(lambda* (#:key inputs #:allow-other-keys)
(substitute* "build/build.xml"
(("\\$\\{lib\\}/testng/testng-jdk15.jar")
- (string-append (assoc-ref inputs "java-testng")
- "/share/java/java-testng.jar"))
+ (search-input-file inputs
+ "/share/java/java-testng.jar"))
(("\\$\\{lib\\}/commons-lang/commons-lang.jar")
- (string-append (assoc-ref inputs "java-commons-lang")
- "/share/java/commons-lang-"
- ,(package-version java-commons-lang) ".jar"))
+ (search-input-file inputs
+ (string-append
+ "/share/java/commons-lang-"
+ ,(package-version java-commons-lang)
+ ".jar")))
(("\\$\\{lib\\}/commons-io/commons-io.jar")
- (string-append (assoc-ref inputs "java-commons-io")
- "/lib/m2/commons-io/commons-io/"
- ,(package-version java-commons-io)
- "/commons-io-"
- ,(package-version java-commons-io)
- ".jar"))
+ (search-input-file inputs
+ (string-append
+ "/lib/m2/commons-io/commons-io/"
+ ,(package-version java-commons-io)
+ "/commons-io-"
+ ,(package-version java-commons-io)
+ ".jar")))
;; Remove dependency on svn
(("<build-info.*") "")
(("\\$\\{revision.number\\}")
@@ -3397,11 +3459,9 @@ libraries from the SIS division at ETH Zurich like jHDF5.")
(add-after 'unpack 'unpack-build-resources
(lambda* (#:key inputs #:allow-other-keys)
(mkdir-p "../build_resources")
- (invoke "tar" "xf" (assoc-ref inputs "build-resources")
- "-C" "../build_resources"
- "--strip-components=1")
- (mkdir-p "../build_resources/lib")
- #t))
+ (copy-recursively (assoc-ref inputs "build-resources")
+ "../build_resources")
+ (mkdir-p "../build_resources/lib")))
(add-after 'unpack-build-resources 'fix-dependencies
(lambda* (#:key inputs #:allow-other-keys)
;; FIXME: There should be a more convenient abstraction for
@@ -3436,8 +3496,7 @@ libraries from the SIS division at ETH Zurich like jHDF5.")
(rename-file "build-common.xml.new" "build-common.xml"))
(substitute* "build/build.xml"
(("\\$\\{lib\\}/cisd-base/cisd-base.jar")
- (string-append (assoc-ref inputs "java-cisd-base")
- "/share/java/sis-base.jar"))
+ (search-input-file inputs "/share/java/sis-base.jar"))
;; Remove dependency on svn
(("<build-info.*") "")
(("\\$\\{revision.number\\}")
@@ -3539,29 +3598,32 @@ libraries from the SIS division at ETH Zurich like jHDF5.")
(lambda* (#:key inputs #:allow-other-keys)
(substitute* "../build_resources/ant/build-common.xml"
(("../libraries/testng/testng-jdk15.jar")
- (string-append (assoc-ref inputs "java-testng")
- "/share/java/java-testng.jar")))
+ (search-input-file inputs
+ "/share/java/java-testng.jar")))
(substitute* "build/build.xml"
(("\\$\\{lib\\}/sis-base/sis-base.jar")
- (string-append (assoc-ref inputs "java-cisd-base")
- "/share/java/sis-base.jar"))
+ (search-input-file inputs
+ "/share/java/sis-base.jar"))
(("\\$\\{lib\\}/cisd-args4j/cisd-args4j.jar")
- (string-append (assoc-ref inputs "java-cisd-args4j")
- "/share/java/cisd-args4j.jar"))
+ (search-input-file inputs
+ "/share/java/cisd-args4j.jar"))
(("\\$\\{lib\\}/commons-lang/commons-lang.jar")
- (string-append (assoc-ref inputs "java-commons-lang")
- "/share/java/commons-lang-"
- ,(package-version java-commons-lang) ".jar"))
+ (search-input-file inputs
+ (string-append
+ "/share/java/commons-lang-"
+ ,(package-version java-commons-lang)
+ ".jar")))
(("\\$\\{lib\\}/commons-io/commons-io.jar")
- (string-append (assoc-ref inputs "java-commons-io")
- "/lib/m2/commons-io/commons-io/"
- ,(package-version java-commons-io)
- "/commons-io-"
- ,(package-version java-commons-io)
- ".jar"))
+ (search-input-file inputs
+ (string-append
+ "/lib/m2/commons-io/commons-io/"
+ ,(package-version java-commons-io)
+ "/commons-io-"
+ ,(package-version java-commons-io)
+ ".jar")))
(("\\$\\{lib\\}/testng/testng-jdk15.jar")
- (string-append (assoc-ref inputs "java-testng")
- "/share/java/java-testng.jar"))
+ (search-input-file inputs
+ "/share/java/java-testng.jar"))
(("\\$\\{lib\\}/junit4/junit.jar")
(car (find-files (assoc-ref inputs "java-junit") "jar$")))
(("\\$\\{lib\\}/jmock/hamcrest/hamcrest-core.jar")
@@ -3668,8 +3730,8 @@ HDF5 files, building on the libraries provided by the HDF Group.")
`(#:tests? #f ; there is no test target
#:build-target "compile"
#:make-flags
- (list "-Dbuild.compiler=javac1.8"
- (string-append "-Ddist=" (assoc-ref %outputs "out")))
+ ,#~(list "-Dbuild.compiler=javac1.8"
+ (string-append "-Ddist=" #$output))
#:phases
(modify-phases %standard-phases
(replace 'install
@@ -5421,7 +5483,7 @@ complex transformations and code analysis tools.")
(delete 'build)
(delete 'configure)
(replace 'install
- (install-pom-file (assoc-ref %build-inputs "source"))))))
+ ,#~(install-pom-file #$source)))))
(home-page "https://ow2.org")
(synopsis "Ow2.org parent pom")
(description "This package contains the parent pom for projects from ow2.org,
@@ -5870,12 +5932,12 @@ overly clever.")
`(#:build-target "jar"
#:test-target "test"
#:make-flags
- (let ((hamcrest (assoc-ref %build-inputs "java-hamcrest-core"))
- (junit (assoc-ref %build-inputs "java-junit")))
- (list (string-append "-Djunit.jar="
- (car (find-files junit "jar$")))
- (string-append "-Dhamcrest.jar="
- (car (find-files hamcrest ".*.jar$")))))
+ ,#~(let ((hamcrest #$(this-package-native-input "java-hamcrest-core"))
+ (junit #$(this-package-native-input "java-junit")))
+ (list (string-append "-Djunit.jar="
+ (car (find-files junit "jar$")))
+ (string-append "-Dhamcrest.jar="
+ (car (find-files hamcrest ".*.jar$")))))
#:phases
(modify-phases %standard-phases
;; We want to build the jar in the build phase and run the tests
@@ -5884,8 +5946,7 @@ overly clever.")
(lambda _
(substitute* "build.xml"
(("name=\"jar\" depends=\"test\"")
- "name=\"jar\" depends=\"compile\""))
- #t))
+ "name=\"jar\" depends=\"compile\""))))
;; There is no install target.
(replace 'install
(install-from-pom "pom.xml")))))
@@ -5960,15 +6021,15 @@ targeting the JVM.")
(arguments
`(#:test-target "test"
#:make-flags
- (let ((hamcrest (assoc-ref %build-inputs "java-hamcrest-core"))
- (junit (assoc-ref %build-inputs "java-junit"))
- (easymock (assoc-ref %build-inputs "java-easymock")))
- (list (string-append "-Djunit.jar="
- (car (find-files junit "jar$")))
- (string-append "-Dhamcrest.jar="
- (car (find-files hamcrest "jar$")))
- (string-append "-Deasymock.jar=" easymock
- "/share/java/easymock.jar")))
+ ,#~(let ((hamcrest #$(this-package-native-input "java-hamcrest-core"))
+ (junit #$(this-package-native-input "java-junit"))
+ (easymock #$(this-package-native-input "java-easymock")))
+ (list (string-append "-Djunit.jar="
+ (car (find-files junit "jar$")))
+ (string-append "-Dhamcrest.jar="
+ (car (find-files hamcrest "jar$")))
+ (string-append "-Deasymock.jar=" easymock
+ "/share/java/easymock.jar")))
#:phases
(modify-phases %standard-phases
(replace 'install
@@ -6100,9 +6161,9 @@ setter and getter method.")
(arguments
`(#:test-target "test"
#:make-flags
- (list (string-append "-Djunit.jar="
- (car (find-files (assoc-ref %build-inputs "java-junit")
- "jar$"))))
+ ,#~(list (string-append "-Djunit.jar="
+ (car (find-files #$(this-package-native-input "java-junit")
+ "jar$"))))
#:phases
(modify-phases %standard-phases
(add-after 'build 'build-javadoc ant-build-javadoc)
@@ -6135,9 +6196,9 @@ file filters and endian classes.")
(arguments
`(#:test-target "test"
#:make-flags
- (list (string-append "-Dmaven.junit.jar="
- (car (find-files (assoc-ref %build-inputs "java-junit")
- "jar$"))))
+ ,#~(list (string-append "-Dmaven.junit.jar="
+ (car (find-files #$(this-package-native-input "java-junit")
+ "jar$"))))
#:phases
(modify-phases %standard-phases
(add-before 'build 'delete-network-tests
@@ -6171,11 +6232,11 @@ file filters and endian classes.")
(arguments
`(#:test-target "test"
#:make-flags
- (list (string-append "-Dmaven.junit.jar="
- (car (find-files (assoc-ref %build-inputs "java-junit")
- "jar$")))
- "-Dmaven.compiler.source=1.7"
- "-Dmaven.compiler.target=1.7")
+ ,#~(list (string-append "-Dmaven.junit.jar="
+ (car (find-files #$(this-package-native-input "java-junit")
+ "jar$")))
+ "-Dmaven.compiler.source=1.7"
+ "-Dmaven.compiler.target=1.7")
#:phases
(modify-phases %standard-phases
(add-before 'build 'delete-network-tests
@@ -7853,8 +7914,7 @@ JavaMail API.")
`(#:tests? #f ; tests require unpackaged software
#:jar-name "log4j-api.jar"
#:make-flags
- (list (string-append "-Ddist.dir=" (assoc-ref %outputs "out")
- "/share/java"))
+ ,#~(list (string-append "-Ddist.dir=" #$output "/share/java"))
#:phases
(modify-phases %standard-phases
(add-after 'unpack 'enter-dir
@@ -7915,8 +7975,7 @@ Java.")
#:jar-name "log4j-core.jar"
#:jdk ,icedtea-8
#:make-flags
- (list (string-append "-Ddist.dir=" (assoc-ref %outputs "out")
- "/share/java"))
+ ,#~(list (string-append "-Ddist.dir=" #$output "/share/java"))
#:phases
(modify-phases %standard-phases
(add-after 'unpack 'enter-dir
@@ -13080,7 +13139,7 @@ from ORO, Inc.")
(lambda* (#:key inputs #:allow-other-keys)
(substitute* "build.xml"
;; Since we removed the bundled ant.jar, give the correct path
- (("lib/ant.jar") (string-append (assoc-ref inputs "ant") "/lib/ant.jar"))
+ (("lib/ant.jar") (search-input-file inputs "/lib/ant.jar"))
;; We removed generated native libraries. We can only rebuild one
;; so don't fail if we can't find a native library for another architecture.
(("zipfileset") "zipfileset erroronmissingarchive=\"false\""))
@@ -13103,7 +13162,8 @@ from ORO, Inc.")
("libx11" ,libx11)
("libxt" ,libxt)))
(native-inputs
- `(("java-junit" ,java-junit)
+ `(("gcc" ,gcc-7)
+ ("java-junit" ,java-junit)
("java-hamcrest-core" ,java-hamcrest-core)))
(home-page "https://github.com/java-native-access/jna")
(synopsis "Access to native shared libraries from Java")
@@ -13134,8 +13194,7 @@ Java method invocation.")
(lambda* (#:key inputs #:allow-other-keys)
(substitute* "nbproject/project.properties"
(("../../build/jna.jar")
- (string-append (assoc-ref inputs "java-native-access")
- "/share/java/jna.jar"))
+ (search-input-file inputs "/share/java/jna.jar"))
(("../../lib/hamcrest-core-.*.jar")
(car (find-files (assoc-ref inputs "java-hamcrest-core")
"jar$")))
@@ -14323,15 +14382,14 @@ can be interpreted by IDEs and static analysis tools to improve code analysis.")
"/test-model/pcal")
"\\.cfg$"))))
(replace 'install
- (lambda* (#:key inputs #:allow-other-keys)
- (let* ((share (string-append %output "/share/java"))
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (let* ((share (string-append (assoc-ref outputs "out") "/share/java"))
(jar-name "tla2tools.jar"); set in project.properties
(jar (string-append ,tlatools
"/dist/" jar-name))
(java-cp (string-append share "/" jar-name))
- (bin (string-append %output "/bin"))
- (java (string-append (assoc-ref inputs "jdk")
- "/bin/java")))
+ (bin (string-append (assoc-ref outputs "out") "/bin"))
+ (java (search-input-file inputs "/bin/java")))
(install-file jar share)
(mkdir-p bin)
;; Generate wrapper scripts for bin/, which invoke common
diff --git a/gnu/packages/javascript.scm b/gnu/packages/javascript.scm
index 6d4efe2c92..d5967e7252 100644
--- a/gnu/packages/javascript.scm
+++ b/gnu/packages/javascript.scm
@@ -5,6 +5,7 @@
;;; Copyright © 2017, 2018, 2019, 2020 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2018 Nicolas Goaziou <mail@nicolasgoaziou.fr>
;;; Copyright © 2021 Pierre Neidhardt <mail@ambrevar.xyz>
+;;; Copyright © 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -80,8 +81,7 @@
(use-modules (guix build utils))
(chdir (assoc-ref %build-inputs "source"))
(let ((target (string-append %output "/share/javascript/context-menu")))
- (apply invoke (string-append (assoc-ref %build-inputs "esbuild")
- "/bin/esbuild")
+ (apply invoke (search-input-file %build-inputs "/bin/esbuild")
"--bundle"
"--tsconfig=tsconfig.json"
(string-append "--outdir=" target)
@@ -209,8 +209,7 @@ be able to view it naturally and easily.")))
(begin
(use-modules (guix build utils))
(chdir (assoc-ref %build-inputs "source"))
- (let ((esbuild (string-append (assoc-ref %build-inputs "esbuild")
- "/bin/esbuild"))
+ (let ((esbuild (search-input-file %build-inputs "/bin/esbuild"))
(target (string-append %output "/share/javascript/commander")))
(invoke esbuild
"--bundle"
@@ -251,8 +250,7 @@ command-line interfaces. ")
(begin
(use-modules (guix build utils))
(chdir (assoc-ref %build-inputs "source"))
- (let ((esbuild (string-append (assoc-ref %build-inputs "esbuild")
- "/bin/esbuild"))
+ (let ((esbuild (search-input-file %build-inputs "/bin/esbuild"))
(target (string-append %output "/share/javascript/xmldom-sre")))
(invoke esbuild
"--bundle"
@@ -637,12 +635,31 @@ Javascript and a small built-in standard library with C library wrappers.")
"19szwxzvl2g65fw95ggvb8h0ma5bd9vvnnccn59hwnc4dida1x4n"))))
(build-system gnu-build-system)
(arguments
- '(#:tests? #f ; No tests.
+ `(#:tests? #f ; No tests.
#:make-flags (list "-f" "Makefile.sharedlibrary"
(string-append "INSTALL_PREFIX=" %output))
#:phases
(modify-phases %standard-phases
- (delete 'configure))))
+ (delete 'configure)
+ ;; At least another major GNU/Linux distribution carries their own
+ ;; .pc file with this package.
+ (add-after 'install 'install-pkg-config
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (pkg-config-dir (string-append out "/lib/pkgconfig")))
+ (mkdir-p pkg-config-dir)
+ (with-output-to-file (string-append pkg-config-dir "/duktape.pc")
+ (lambda _
+ (format #t "prefix=~@*~a~@
+ libdir=${prefix}/lib~@
+ includedir=${prefix}/include~@
+
+ Name: duktape~@
+ Description: Embeddable Javascript engine~@
+ Version: ~a~@
+ Libs: -L${libdir} -lduktape~@
+ Cflags: -I${includedir}~%"
+ out ,version)))))))))
(home-page "https://duktape.org/")
(synopsis "Small embeddable Javascript engine")
(description "Duktape is an embeddable Javascript engine, with a focus on
diff --git a/gnu/packages/jemalloc.scm b/gnu/packages/jemalloc.scm
index c4b87b540d..21a315303b 100644
--- a/gnu/packages/jemalloc.scm
+++ b/gnu/packages/jemalloc.scm
@@ -1,7 +1,8 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2015 Sou Bunnbu <iyzsong@gmail.com>
-;;; Copyright © 2017 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2017, 2020, 2021 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2017 Eric Bavier <bavier@member.fsf.org>
+;;; Copyright © 2021 Ryan Sundberg <ryan@arctype.co>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -21,6 +22,7 @@
(define-module (gnu packages jemalloc)
#:use-module (srfi srfi-1)
#:use-module (srfi srfi-26)
+ #:use-module (ice-9 match)
#:use-module ((guix licenses) #:select (bsd-2))
#:use-module (guix packages)
#:use-module (guix download)
@@ -29,10 +31,10 @@
#:use-module (gnu packages perl)
#:use-module (guix build-system gnu))
-(define-public jemalloc
+(define-public jemalloc-4.5.0
(package
(name "jemalloc")
- (version "5.2.1")
+ (version "4.5.0")
(source (origin
(method url-fetch)
(uri (string-append
@@ -40,7 +42,7 @@
version "/jemalloc-" version ".tar.bz2"))
(sha256
(base32
- "1xl7z0vwbn5iycg7amka9jd6hxd8nmfk7nahi4p9w2bnw9f0wcrl"))))
+ "10373xhpc10pgmai9fkc1z0rs029qlcb3c0qfnvkbwdlcibdh2cl"))))
(build-system gnu-build-system)
(arguments
`(#:phases
@@ -52,13 +54,14 @@
(substitute* "Makefile.in"
(("\\$\\(srcroot\\)test/unit/pages.c \\\\") "\\"))
#t)))
- ,@(if (any (cute string-prefix? <> (or (%current-target-system)
- (%current-system)))
- '("x64_64" "i686"))
- ;; Transparent huge pages are only enabled by default on Intel processors
- '()
- '(#:configure-flags (list "--disable-thp")))))
- (inputs `(("perl" ,perl)))
+ #:configure-flags
+ '(,@(match (%current-system)
+ ((or "i686-linux" "x86_64-linux")
+ '())
+ ("powerpc-linux"
+ (list "--disable-thp" "CPPFLAGS=-maltivec"))
+ (_
+ (list "--disable-thp"))))))
;; Install the scripts to a separate output to avoid referencing Perl and
;; Bash in the default output, saving ~75 MiB on the closure.
(outputs '("out" "bin"))
@@ -69,10 +72,10 @@
fragmentation avoidance and scalable concurrency support.")
(license bsd-2)))
-(define-public jemalloc-4.5.0
+(define-public jemalloc
(package
- (inherit jemalloc)
- (version "4.5.0")
+ (inherit jemalloc-4.5.0)
+ (version "5.2.1")
(source (origin
(method url-fetch)
(uri (string-append
@@ -80,5 +83,12 @@ fragmentation avoidance and scalable concurrency support.")
version "/jemalloc-" version ".tar.bz2"))
(sha256
(base32
- "10373xhpc10pgmai9fkc1z0rs029qlcb3c0qfnvkbwdlcibdh2cl"))))
- (inputs '())))
+ "1xl7z0vwbn5iycg7amka9jd6hxd8nmfk7nahi4p9w2bnw9f0wcrl"))))
+ (arguments
+ (substitute-keyword-arguments (package-arguments jemalloc-4.5.0)
+ ;; Disable the thread local storage model in jemalloc 5 to prevent
+ ;; shared libraries linked to libjemalloc from crashing on dlopen()
+ ;; https://github.com/jemalloc/jemalloc/issues/937
+ ((#:configure-flags base-configure-flags '())
+ `(cons "--disable-initial-exec-tls" ,base-configure-flags))))
+ (inputs `(("perl" ,perl)))))
diff --git a/gnu/packages/julia-xyz.scm b/gnu/packages/julia-xyz.scm
index e4be7efdd2..28c36d3037 100644
--- a/gnu/packages/julia-xyz.scm
+++ b/gnu/packages/julia-xyz.scm
@@ -137,6 +137,8 @@ ANSI escape codes to another format.")
(sha256
(base32 "1g0kyzcdykgs247j72jpc2qqall696jwgb3hnn4cxmbi8bkf7wpk"))))
(build-system julia-build-system)
+ (arguments
+ `(#:parallel-tests? #f))
(home-page "https://github.com/JuliaTesting/Aqua.jl")
(synopsis "Automated quality assurance for Julia packages")
(description "@acronym{Aqua.jl, Auto QUality Assurance for Julia packages},
@@ -157,6 +159,12 @@ provides functions to run a few automatable checks for Julia packages.")
(sha256
(base32 "0cmldnzvdgmfnrnrzgj6v1mfr2rvk5096392rwmhd3iyx7v0pq33"))))
(build-system julia-build-system)
+ (arguments
+ ;; XXXX: Unexpected failures for i686, e.g.,
+ ;; Expression: @inferred(ArrayInterface.size(Rnr)) === (StaticInt(4),)
+ ;; Evaluated: (static(2),) === (static(4),)
+ ;; Disable as stopgap.
+ `(#:tests? ,(not (target-x86-32?))))
(propagated-inputs
`(("julia-ifelse" ,julia-ifelse)
("julia-requires" ,julia-requires)
@@ -297,6 +305,25 @@ the entries on the bands.")
(sha256
(base32 "1xz3kdrphp4b158pg7dwkiry49phs2fjjpdvk1hjpww5ykxacks8"))))
(build-system julia-build-system)
+ (arguments
+ `(#:phases
+ ,@(if (target-x86-32?)
+ '((modify-phases %standard-phases
+ (add-after 'unpack 'remove-failing-tests-i686
+ (lambda _
+ (substitute* "test/GroupsTests.jl"
+ (("@test sprint\\(show, g1\\)")
+ "@test_broken sprint(show, g1)")
+ (("@test sprint\\(show, g1; context = :boundto => 1\\)")
+ "@test_broken sprint(show, g1; context = :boundto => 1)")
+ (("@test sprint\\(show, g1; context = :limit => false\\)")
+ "@test_broken sprint(show, g1; context = :limit => false)")
+ (("@test @test_deprecated") "@test_broken"))
+ (substitute* "test/ExecutionTests.jl"
+ ;; Evaluated: 12 == 8
+ (("@test @ballocated\\(Ref\\(1\\)\\)")
+ "@test_broken @ballocated(Ref(1))"))))))
+ '(%standard-phases))))
(propagated-inputs `(("julia-json" ,julia-json)))
(home-page "https://github.com/JuliaCI/BenchmarkTools.jl")
(synopsis "Benchmarking framework for the Julia language")
@@ -319,6 +346,15 @@ benchmarks as well as comparing benchmark results.")
(sha256
(base32 "1by26036fk9mawmcgqxpwizgbs398v9p6vrbsgg7h6llqn3q9iw1"))))
(build-system julia-build-system)
+ (arguments
+ `(#:phases
+ ,@(if (target-64bit?)
+ '(%standard-phases)
+ '((modify-phases %standard-phases
+ (add-after 'unpack 'fix-tests-int32-i686
+ (lambda _
+ (substitute* "test/test_blockarrays.jl"
+ (("Int64") "Int32")))))))))
(propagated-inputs
`(("julia-arraylayouts" ,julia-arraylayouts)
("julia-fillarrays" ,julia-fillarrays)))
@@ -783,8 +819,7 @@ way.")
(add-after 'link-depot 'fix-tests
(lambda _
(substitute* "test/runtests.jl"
- (("option.toml") "test/option.toml"))
- #t))
+ (("option.toml") "test/option.toml"))))
(add-after 'link-depot 'dont-use-exproniconlite
(lambda _
(substitute* '("Project.toml"
@@ -793,8 +828,13 @@ way.")
(("ExproniconLite") "Expronicon"))
(substitute* "Project.toml"
(("55351af7-c7e9-48d6-89ff-24e801d99491")
- "6b7a57c9-7cc1-4fdf-b7f5-e857abae3636"))
- #t)))))
+ "6b7a57c9-7cc1-4fdf-b7f5-e857abae3636"))))
+ ,@(if (target-64bit?)
+ '()
+ '((add-after 'unpack 'fix-tests-int32-i686
+ (lambda _
+ (substitute* "test/runtests.jl"
+ (("Int64") "Int32")))))))))
(propagated-inputs
`(("julia-crayons" ,julia-crayons)
("julia-expronicon" ,julia-expronicon)
@@ -978,6 +1018,19 @@ Julia from R or Python.")
`(("julia-compat" ,julia-compat)
("julia-orderedcollections" ,julia-orderedcollections)))
(build-system julia-build-system)
+ (arguments
+ `(#:phases
+ ,@(if (target-x86-32?)
+ '((modify-phases %standard-phases
+ (add-after 'unpack 'remove-failing-test-i686
+ (lambda _
+ ;; The evaluation returns the correct value,
+ ;; Evaluated: "Accumulator(1 => 3, 3 => 4)"
+ ;; but, for some reasons, is considered as failed.
+ (substitute* "test/test_accumulator.jl"
+ (("@test sprint\\(show,Accumulator\\(1 => 3, 3 => 4\\)\\)")
+ "@test_broken sprint(show, Accumulator(1 => 3, 3 => 4))"))))))
+ '(%standard-phases))))
(home-page "https://github.com/JuliaCollections/DataStructures.jl")
(synopsis "Julia module providing different data structures")
(description "This package implements a variety of data structures,
@@ -1650,6 +1703,17 @@ types and sparsity.")
(sha256
(base32 "09nsf9cgk49yrvprflnhd9h5rrgs280rgj8sad3csghxdx6jqk5c"))))
(build-system julia-build-system)
+ (arguments
+ `(#:phases
+ ,@(if (target-x86-32?)
+ '((modify-phases %standard-phases
+ (add-after 'unpack 'remove-failing-test-i686
+ (lambda _
+ ;; Machine Precision incorrectly handled
+ (substitute* "test/methods.jl"
+ (("@test central_fdm\\(15, 5, adapt=2\\)\\(exp, 1.0\\)")
+ "@test_broken central_fdm(15, 5, adapt=2)(exp, 1.0)"))))))
+ '(%standard-phases))))
(inputs
`(("julia-benchmarktools" ,julia-benchmarktools)))
(propagated-inputs
@@ -1731,6 +1795,12 @@ c-style numerical formatting.")
(sha256
(base32 "1vb46x8mcn61g1l14qrk22c043khg2ml4q1ci7h4k2v34f2ak5fs"))))
(build-system julia-build-system)
+ (arguments
+ ;; XXXX: Unexpected and non-deterministic failures for i686, e.g.,
+ ;; Expression: dual_isapprox(FDNUM ^ PRIMAL, exp(PRIMAL * log(FDNUM)))
+ ;; ERROR: LoadError: LoadError: There was an error during testing
+ ;; Disable as stopgap.
+ `(#:tests? ,(not (target-x86-32?))))
(inputs ;required for tests
`(("julia-calculus" ,julia-calculus)
("julia-difftests" ,julia-difftests)))
@@ -1918,14 +1988,18 @@ matrices the Schur form is often more useful.")
(lambda _
(substitute* '("Project.toml"
"src/GeometryBasics.jl")
- ((".*EarCut.*") ""))
- #t))
+ ((".*EarCut.*") ""))))
(add-after 'link-depot 'skip-incompatible-test
(lambda _
(substitute* "test/runtests.jl"
(("@testset.*MetaT and heterogeneous data.*" all)
- (string-append all "return\n")))
- #t)))))
+ (string-append all "return\n")))))
+ ,@(if (target-64bit?)
+ '()
+ '((add-after 'unpack 'fix-tests-int32-i686
+ (lambda _
+ (substitute* "test/runtests.jl"
+ (("Int64") "Int32")))))))))
(propagated-inputs
`(("julia-itertools" ,julia-itertools)
("julia-staticarrays" ,julia-staticarrays)
@@ -2517,6 +2591,13 @@ interfaces with @file{.ini} files.")
(sha256
(base32 "1236c20k388qlh7k74mhf7hkbn0vf7ss8b1rgh1a6aj0234ayfnc"))))
(build-system julia-build-system)
+ (arguments
+ `(#:parallel-tests? #f
+ ;; XXXX: Unexpected failures for i686, e.g.,
+ ;; Got exception outside of a @test
+ ;; OverflowError: 96908232 * 106943408 overflowed for type Int32
+ ;; Disable as stopgap.
+ #:tests? ,(not (target-x86-32?))))
(propagated-inputs
`(("julia-axisalgorithms" ,julia-axisalgorithms)
("julia-offsetarrays" ,julia-offsetarrays)
@@ -2551,6 +2632,20 @@ and exceptional performance.")
(sha256
(base32 "0gsz89cd3iygbl5qr389k9vwpg7w1nk0s90g25nsmk34y9hifxag"))))
(build-system julia-build-system)
+ (arguments
+ `(#:phases
+ ,@(if (target-x86-32?)
+ '((modify-phases %standard-phases
+ (add-after 'unpack 'remove-failing-test-i686
+ (lambda _
+ (substitute* "test/runtests.jl"
+ ;; For some reason, the output is correct but the test
+ ;; is considered as failed:
+ ;; Expression: duration(ClosedInterval(A, B)) ≡ 60
+ ;; Evaluated: 60 ≡ 60
+ (("@test duration\\(ClosedInterval")
+ "@test_broken duration(ClosedInterval"))))))
+ '(%standard-phases))))
(propagated-inputs
`(("julia-ellipsisnotation" ,julia-ellipsisnotation)))
(native-inputs
@@ -2776,6 +2871,15 @@ equations in string literals in the Julia language.")
(sha256
(base32 "17rhlrmgfvdw8w62pg32ikr9j4xy2ylr7mx7ar0hnpzryv929rp5"))))
(build-system julia-build-system)
+ (arguments
+ `(#:phases
+ ,@(if (target-64bit?)
+ '(%standard-phases)
+ '((modify-phases %standard-phases
+ (add-after 'unpack 'fix-tests-int32-i686
+ (lambda _
+ (substitute* "test/multests.jl"
+ (("Int64") "Int32")))))))))
(propagated-inputs
`(("julia-arraylayouts" ,julia-arraylayouts)
("julia-fillarrays" ,julia-fillarrays)
@@ -2852,6 +2956,15 @@ that let you do deep transformations of code.")
(sha256
(base32 "0l5adird8m1cmnsxwhzi5hcr7q9bm1rf7a6018zc7kcn2yxdshy3"))))
(build-system julia-build-system)
+ (arguments
+ `(#:phases
+ ,@(if (target-64bit?)
+ '(%standard-phases)
+ '((modify-phases %standard-phases
+ (add-after 'unpack 'fix-tests-int32-i686
+ (lambda _
+ (substitute* "test/runtests.jl"
+ (("Int64") "Int32")))))))))
(propagated-inputs
`(("julia-fixedpointnumbers" ,julia-fixedpointnumbers)))
(native-inputs
@@ -3169,6 +3282,22 @@ Julia, with type-driven, overloadable packing/unpacking functionality.")
(sha256
(base32 "1isyj8h4nx96cr6892d154v8pw1nhr7mjyz5bd6ffr2mkzb2bq4f"))))
(build-system julia-build-system)
+ (arguments
+ `(#:phases
+ ,@(if (target-x86-32?)
+ '((modify-phases %standard-phases
+ (add-after 'unpack 'remove-failing-test-i686
+ (lambda _
+ (substitute* "test/utilities.jl"
+ ;; Non-deterministic returned value, e.g.,
+ ;; Expression: n == @allocated(f())
+ ;; Evaluated: 240 == 120
+ ;; and for some other values:
+ ;; Got correct result, please change to @test
+ ;; so @test_broken is not enough.
+ (("@test n == @allocated f\\(\\)")
+ " "))))))
+ '(%standard-phases))))
(propagated-inputs
`(("julia-offsetarrays" ,julia-offsetarrays)))
(home-page "https://github.com/jump-dev/MutableArithmetics.jl")
@@ -4005,6 +4134,8 @@ package can help create and update if need be.")
(sha256
(base32 "03hyfy7c0ma45b0y756j76awi3az2ii4bz4s8cxm3xw9yy1z7b01"))))
(build-system julia-build-system)
+ (arguments
+ `(#:parallel-tests? #f))
(inputs ;required for test
`(("julia-example" ,julia-example)))
(propagated-inputs
@@ -4031,6 +4162,12 @@ can be avoided.")
(sha256
(base32 "1wrr6sqj2xl9grkvdp88rw3manxy9vbx28zq2wssya5ns1xabsnl"))))
(build-system julia-build-system)
+ (arguments
+ ;; XXXX: Test suite failing for i686, e.g.,
+ ;; Expression: hash(tr_float, hash(1)) === hash(v_float, hash(1))
+ ;; MethodError: no method matching decompose(::ReverseDiff.TrackedReal{Float64, Float64, Nothing})
+ ;; Disable as stopgap.
+ `(#:tests? ,(not (target-x86-32?))))
(propagated-inputs
`(("julia-diffresults" ,julia-diffresults)
("julia-diffrules" ,julia-diffrules)
@@ -4540,6 +4677,16 @@ applied to any distance.")
(sha256
(base32 "0rjcpyjwzg70n87q5r9c5i1qzigavncslxssm3rk5a3y549py56v"))))
(build-system julia-build-system)
+ (arguments
+ `(#:phases
+ ,@(if (target-64bit?)
+ '(%standard-phases)
+ '((modify-phases %standard-phases
+ (add-after 'unpack 'fix-tests-int32-i686
+ (lambda _
+ (substitute* '("src/utils.jl"
+ "test/runtests.jl")
+ (("Int64") "Int32")))))))))
(propagated-inputs
`(("julia-dataapi" ,julia-dataapi)
("julia-staticarrays" ,julia-staticarrays)
@@ -4914,6 +5061,8 @@ working with @acronym{URIs,Uniform Resource Identifiers}, as defined in RFC
(sha256
(base32 "10qwscd15dnmvx116dwvg99m7kmwgmj5ahdkq7psiq48lcc554gq"))))
(build-system julia-build-system)
+ (arguments
+ `(#:parallel-tests? #f))
(propagated-inputs
`(("julia-constructionbase" ,julia-constructionbase)))
(home-page "https://painterqubits.github.io/Unitful.jl/stable/")
@@ -4984,6 +5133,16 @@ allows for efficient string representation and transfer")
(sha256
(base32 "04yykivi8zrbryxlmb0p5xa6lma8iq22r5s863117dnnqj5gaffd"))))
(build-system julia-build-system)
+ (arguments
+ `(#:phases
+ ,@(if (target-x86-32?)
+ '((modify-phases %standard-phases
+ (add-after 'unpack 'remove-failing-test-i686
+ (lambda _
+ (substitute* "test/woodbury.jl"
+ (("@test logdet\\(W\\)")
+ "@test_broken logdet(W)"))))))
+ '(%standard-phases))))
(home-page "https://github.com/timholy/WoodburyMatrices.jl")
(synopsis "Support for the Woodbury matrix identity for Julia")
(description "This package provides support for the Woodbury matrix identity
diff --git a/gnu/packages/julia.scm b/gnu/packages/julia.scm
index 33242a08a4..17f4a9a169 100644
--- a/gnu/packages/julia.scm
+++ b/gnu/packages/julia.scm
@@ -6,6 +6,7 @@
;;; Copyright © 2020 Tobias Geerinckx-Rice <me@tobias.gr>
;;; Copyright © 2021 Jean-Baptiste Volatier <jbv@pm.me>
;;; Copyright © 2021 Simon Tournier <zimon.toutoune@gmail.com>
+;;; Copyright © 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -54,26 +55,6 @@
#:use-module (gnu packages wget)
#:use-module (ice-9 match))
-(define libuv-julia
- (let ((commit "fb3e3364c33ae48c827f6b103e05c3f0e78b79a9")
- (revision "3"))
- ;; When upgrading Julia, also upgrade this. Get the commit from
- ;; https://github.com/JuliaLang/julia/blob/v1.6.1/deps/libuv.version
- (package
- (inherit libuv)
- (name "libuv-julia")
- (version (git-version "2.0.0" revision commit))
- (source (origin
- (method git-fetch)
- (uri (git-reference
- (url "https://github.com/JuliaLang/libuv")
- (commit commit)))
- (file-name (git-file-name name version))
- (sha256
- (base32
- "1kqpn19d20aka30h6q5h8lnzyp0vw0xzgx0wm4w2r5j6yf76m2hr"))))
- (home-page "https://github.com/JuliaLang/libuv"))))
-
(define libunwind-julia
;; The Julia projects requires their patched version.
;; Get from https://github.com/JuliaLang/julia/tree/master/deps/patches
@@ -90,147 +71,30 @@
(base32
"1y0l08k6ak1mqbfj6accf9s5686kljwgsl4vcqpxzk5n74wpm6a3"))
(patches
- (list
- (julia-patch "libunwind-prefer-extbl"
- "0lr4dafw8qyfh8sw8hhbwkql1dlhqv8px7k81y2l20hhxfgnh2m1")
- (julia-patch "libunwind-static-arm"
- "1jk3bmiw61ypcchqkk1fyg5wh8wpggk574wxyfyaic870zh3lhgq")
- (julia-patch "libunwind-cfa-rsp"
- "1aswjhvysahhldbzh1afbf0hsjxrvs6xidsz2i7s1cjkjbdiia1z")))))
+ (append
+ ;; Fix linker issue for i686-linux because GCC10 changed default
+ ;; (see '-fno-common' option).
+ (search-patches "libunwind-julia-fix-GCC10-fno-common.patch")
+ (list
+ (julia-patch "libunwind-prefer-extbl"
+ "0lr4dafw8qyfh8sw8hhbwkql1dlhqv8px7k81y2l20hhxfgnh2m1")
+ (julia-patch "libunwind-static-arm"
+ "1jk3bmiw61ypcchqkk1fyg5wh8wpggk574wxyfyaic870zh3lhgq")
+ (julia-patch "libunwind-cfa-rsp"
+ "1aswjhvysahhldbzh1afbf0hsjxrvs6xidsz2i7s1cjkjbdiia1z"))))))
(home-page "https://github.com/JuliaLang/tree/master/deps/")))
(define (julia-patch-url version name)
(string-append "https://raw.githubusercontent.com/JuliaLang/julia/v" version
"/deps/patches/" name ".patch"))
-(define (julia-patch name sha)
+(define-public (julia-patch name sha)
(let ((version "1.6.1"))
(origin (method url-fetch)
(uri (julia-patch-url version name))
(sha256 (base32 sha))
(file-name name))))
-(define llvm-julia
- (package
- (inherit llvm-11)
- (name "llvm-julia")
- (source (origin
- (inherit (package-source llvm-11))
- ;; Those patches are inside the Julia source repo.
- ;; They are _not_ Julia specific (https://github.com/julialang/julia#llvm)
- ;; but they are required to build Julia.
- ;; Discussion: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=919628
- (patches
- (map (match-lambda
- ((name hash)
- (julia-patch name hash)))
- (list
- '("llvm-D27629-AArch64-large_model_6.0.1"
- "1qrshmlqvnasdyc158vfn3hnbigqph3lsq7acb9w8lwkpnnm2j4z")
- '("llvm8-D34078-vectorize-fdiv"
- "19spqc3xsazn1xs9gpcgv9ldadfkv49rmc5khl7sf1dlmhgi4602")
- '("llvm-7.0-D44650"
- "1h55kkmkiisfj6sk956if2bcj9s0v6n5czn8dxb870vp5nccj3ir")
- '("llvm7-symver-jlprefix"
- "00ng32x6xhm9czczirn5r1q1mc1myad44fqhi061hwh1vb46dwgm")
- '("llvm-6.0-DISABLE_ABI_CHECKS"
- "014fawd1ba7yckalypfld22zgic87x9nx3cim42zrwygywd36pyg")
- '("llvm9-D50010-VNCoercion-ni"
- "1s1d3sjsiq4vxg7ncy5cz56zgy5vcq6ls3iqaiqkvr23wyryqmdx")
- '("llvm7-revert-D44485"
- "0f59kq3p3mpwsbmskypbi4zn01l6ig0x7v2rjp08k2r8z8m6fa8n")
- '("llvm-11-D75072-SCEV-add-type"
- "176xi1lnbnv2rcs05ywhyb7pd0xgmibayvwzksksg44wg2dh8mbx")
- '("llvm-julia-tsan-custom-as"
- "0awh40kf6lm4wn1nsjd1bmhfwq7rqj811szanp2xkpspykw9hg9s")
- '("llvm-D80101"
- "1gsdwmgmpbignvqyxcnlprj899259p3dvdznlncd84ss445qgq3j")
- '("llvm-D84031"
- "0nks9sbk7p0r5gyr0idrmm93a5fmdai8kihz9532dx4zhcvvqbjc")
- '("llvm-10-D85553"
- "1zjq7j9q2qp56hwkc8yc8f0z7kvam3j7hj8sb7qyd77r255ff78l")
- '("llvm-10-unique_function_clang-sa"
- "1jys9w2zqk3dasnxqh0qz5ij7rxi6mkgq9pqjsclmamr5169zyan")
- ;'("llvm-D88630-clang-cmake"
- ; "0rs6s71nqnjkny7i69gqazhqj5jqfdr0bkxs2v5a55sfx8fa1k54")
- '("llvm-11-D85313-debuginfo-empty-arange"
- "1f672d5385xpgb8yrim8d3b7wg2z1l81agnshm1q61kdvjixqx32")
- '("llvm-11-D90722-rtdyld-absolute-relocs"
- "0kmnai229yyxkmpk9lxd180mcnhk2i8d87k2sg89gc8as18w10r6")
- '("llvm-invalid-addrspacecast-sink"
- "1n1b7j4s80vj7x5377aj9vyphmxx1q6bm0chhkxp6zsy3mx3g2ry")
- '("llvm-11-D92906-ppc-setjmp"
- "0cmd4dsblp7a8m03j16dqxws0ijh55zf4jzzxmj341qxa1gamdp9")
- '("llvm-11-PR48458-X86ISelDAGToDAG"
- "0vwzvlhsdazhxg4gj8g2f00a4f8qc5cgac23w575xk3pgba1jh6y")
- '("llvm-11-D93092-ppc-knownbits"
- "1748bypsc7c9lbs3fnkv0kwvch6bn85kj98j4jdaz254ig0wa6xj")
- '("llvm-11-D93154-globalisel-as"
- "1k5wd4z3pa7zj0gyjkif7viqj906dhqlbb7dc95gig40nbxv6zpj")
- '("llvm-11-ppc-half-ctr"
- "0piywisfz6cmw3133kz7vzhiqflq2y7igakqxlym0gi8pqylv7w9")
- '("llvm-11-ppc-sp-from-bp"
- "1wmg3485cx5f9pbykyl3jibk1wwv4w1x30hl4jyfndzr2yh8azf9")
- '("llvm-rGb498303066a6-gcc11-header-fix"
- "0hkd4rwhvh8g2yh13g29wiwnjpv2yd1hdyiv1ryw8izl25bz9c67")
- '("llvm-11-D94813-mergeicmps"
- "0cmy0ywkgyrdcvr9bd6pd912lyd4gcsrib4z0v05dwgcdxhk7y29")
- '("llvm-11-D94980-CTR-half"
- "1yf8cxib3z8hz7zi9n6v2g2c6vpfr4slq9hpx8m8yq8f1jbyw3fw")
- '("llvm-11-D94058-sext-atomic-ops"
- "1x6p6k6q651z5jcqxx8vj17cxnv196mka7mwn7dpp6c23lwgfdpb")
- '("llvm-11-D96283-dagcombine-half"
- "0lv4iq2f8qrcz1xyxfic3bcr5p0aqam3a7c6pp6fnw3riixm096k"))))
- (patch-flags '("-p1"))))
- (arguments
- (substitute-keyword-arguments (package-arguments llvm-11)
- ((#:phases phases)
- `(modify-phases ,phases
- (add-after 'unpack 'patch-round-two
- ;; We have to do the patching in two rounds because we can't
- ;; pass '-p1' and '-p2' in the source field.
- (lambda* (#:key inputs #:allow-other-keys)
- (map (lambda (patchname)
- (invoke "patch" patchname "-p2"))
- (list "llvm-11-AArch64-FastIsel-bug"
- "llvm-11-D97435-AArch64-movaddrreg"
- "llvm-11-D97571-AArch64-loh"
- "llvm-11-aarch64-addrspace"))))))
- ((#:build-type _) "Release")
- ((#:configure-flags flags)
- `(list
- ;; Build a native compiler and the NVPTX backend (NVIDIA) since
- ;; Julia insists on it, nothing more. This reduces build times and
- ;; disk usage.
- ,(string-append "-DLLVM_TARGETS_TO_BUILD=" (system->llvm-target))
- "-DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD=NVPTX"
-
- "-DLLVM_INSTALL_UTILS=ON"
- "-DLLVM_BUILD_TESTS=ON"
- "-DLLVM_ENABLE_FFI=ON"
- "-DLLVM_ENABLE_RTTI=ON"
- ;; "-DLLVM_HOST_TRIPLE=${stdenv.hostPlatform.config}"
- ;; "-DLLVM_DEFAULT_TARGET_TRIPLE=${stdenv.hostPlatform.config}"
- ;; "-DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD=WebAssembly"
- "-DLLVM_ENABLE_DUMP=ON"
- "-DLLVM_LINK_LLVM_DYLIB=ON"
- "-DLLVM_VERSION_SUFFIX:STRING=jl"))))
- (inputs
- (append
- (package-inputs llvm-11)
- `(("llvm-11-AArch64-FastIsel-bug"
- ,(julia-patch "llvm-11-AArch64-FastIsel-bug"
- "1m2vddj1mw4kbij8hbrx82piyy6bvr2x7wwdnlxfaqcm72ipzyh9"))
- ("llvm-11-D97435-AArch64-movaddrreg"
- ,(julia-patch "llvm-11-D97435-AArch64-movaddrreg"
- "10jnavq9ljkj7j2gqj2zd1pwqpqb5zs3zp9h96pmz0djbmxwa86y"))
- ("llvm-11-D97571-AArch64-loh"
- ,(julia-patch "llvm-11-D97571-AArch64-loh"
- "128zcbg1w1j7hngsf7z1a7alc6lig6l2rqgjp6i8nk3k3f842v6n"))
- ("llvm-11-aarch64-addrspace"
- ,(julia-patch "llvm-11-aarch64-addrspace"
- "0ckbzgfirxrf2d5bpinpngp7gnilbjrk0cbdfyl3h6f5v6i6xj6m")))))))
-
(define-public libwhich
(package
(name "libwhich")
@@ -285,7 +149,8 @@ libraries. It is also a bit like @code{ldd} and @code{otool -L}.")
(base32
"1515x8fs25l3f9csbmd1v4nm041zvjnvigy6s5iidy4yrkwdx4r5"))
(patches
- (search-patches "julia-SOURCE_DATE_EPOCH-mtime.patch"))))
+ (search-patches "julia-SOURCE_DATE_EPOCH-mtime.patch"
+ "julia-allow-parallel-build.patch"))))
(build-system gnu-build-system)
(arguments
`(#:test-target "test"
@@ -331,8 +196,7 @@ libraries. It is also a bit like @code{ldd} and @code{otool -L}.")
(("(install: .*) \\$\\(BUILDROOT\\)/doc/_build/html/en/index.html" _ line)
(string-append line "\n"))
(("src ui doc deps")
- "src ui deps"))
- #t))
+ "src ui deps"))))
(add-after 'unpack 'use-system-libwhich
(lambda* (#:key inputs #:allow-other-keys)
;; don't build it
@@ -341,15 +205,13 @@ libraries. It is also a bit like @code{ldd} and @code{otool -L}.")
;; call our version
(substitute* "base/Makefile"
(("\\$\\$\\(build_depsbindir\\)/libwhich")
- (string-append (assoc-ref inputs "libwhich") "/bin/libwhich")))
- #t))
+ (search-input-file inputs "/bin/libwhich")))))
(add-after 'unpack 'change-number-of-precompile-statements
(lambda _
;; Remove nss-certs drops the number of statements below 1200,
;; causing the build to fail prematurely.
(substitute* "contrib/generate_precompile.jl"
- (("1200") "1100"))
- #t))
+ (("1200") "1100"))))
;; For some reason libquadmath is unavailable on this architecture.
;; https://github.com/JuliaLang/julia/issues/41613
,@(if (target-aarch64?)
@@ -387,14 +249,11 @@ libraries. It is also a bit like @code{ldd} and @code{otool -L}.")
(substitute* "base/Makefile"
(("\\$\\(build_includedir\\)/uv/errno.h")
- (string-append (assoc-ref inputs "libuv")
- "/include/uv/errno.h")))
- #t))
+ (search-input-file inputs "/include/uv/errno.h")))))
(add-before 'build 'replace-default-shell
(lambda _
(substitute* "base/client.jl"
- (("/bin/sh") (which "sh")))
- #t))
+ (("/bin/sh") (which "sh")))))
(add-before 'build 'shared-objects-paths
(lambda* (#:key inputs #:allow-other-keys)
(let ((jlpath
@@ -458,26 +317,37 @@ libraries. It is also a bit like @code{ldd} and @code{otool -L}.")
(to "suitesparse" "libsuitesparseconfig"))
(((from "libumfpack")) (to "suitesparse" "libumfpack")))
(substitute* (jlpath "Zlib")
- (((from "libz")) (to "zlib" "libz"))))
- #t))
+ (((from "libz")) (to "zlib" "libz"))))))
+ (add-after 'unpack 'enable-parallel-tests
+ (lambda* (#:key parallel-tests? #:allow-other-keys)
+ (setenv "JULIA_CPU_THREADS" (if parallel-tests?
+ (number->string (parallel-job-count))
+ "1"))
+ (format #t "JULIA_CPU_THREADS environment variable set to ~a~%"
+ (getenv "JULIA_CPU_THREADS"))))
(add-after 'unpack 'adjust-test-suite
(lambda* (#:key inputs #:allow-other-keys)
- (let (;(pcre2 (assoc-ref inputs "pcre2"))
+ (let ((pcre2 (assoc-ref inputs "pcre2"))
(mbedtls-apache (assoc-ref inputs "mbedtls"))
(mpfr (assoc-ref inputs "mpfr"))
+ (gmp (assoc-ref inputs "gmp"))
+ (nghttp2 (assoc-ref inputs "libnghttp2"))
(suitesparse (assoc-ref inputs "suitesparse")))
;; Some tests only check to see if the input is the correct version.
- ;(substitute* "stdlib/PCRE2_jll/test/runtests.jl"
- ; (("10.36.0") ,(package-version pcre2)))
+ (substitute* "stdlib/PCRE2_jll/test/runtests.jl"
+ (("10.36.0") ,(package-version pcre2)))
(substitute* "stdlib/MbedTLS_jll/test/runtests.jl"
(("2.24.0") ,(package-version mbedtls-apache)))
(substitute* "stdlib/MPFR_jll/test/runtests.jl"
(("4.1.0") ,(package-version mpfr)))
+ (substitute* "stdlib/GMP_jll/test/runtests.jl"
+ (("6.2.0") ,(package-version gmp)))
+ (substitute* "stdlib/nghttp2_jll/test/runtests.jl"
+ (("1.41.0") ,(package-version nghttp2)))
(substitute* "stdlib/SuiteSparse_jll/test/runtests.jl"
(("5004") ,(string-replace-substring
(version-major+minor
- (package-version suitesparse)) "." "0")))
- #t)))
+ (package-version suitesparse)) "." "0"))))))
(add-before 'check 'disable-broken-tests
(lambda _
;; disabling REPL tests because they require a stdin
@@ -490,8 +360,8 @@ libraries. It is also a bit like @code{ldd} and @code{otool -L}.")
;; Dates/io tests fail on master when networking is unavailable
;; https://github.com/JuliaLang/julia/issues/34655
(substitute* "stdlib/Dates/test/io.jl"
- (("\"Dates.Date") "\"Date")
- (("\"Dates.Time") "\"Time"))
+ (("using Dates") "import Dates
+using Dates: @dateformat_str, Date, DateTime, DateFormat, Time"))
;; Upstream bug I found when packaging
;; https://github.com/JuliaLang/julia/issues/35785
(substitute* "test/file.jl"
@@ -515,7 +385,19 @@ libraries. It is also a bit like @code{ldd} and @code{otool -L}.")
(substitute* "test/cmdlineargs.jl"
(("test v\\[3") "test_broken v[3")
(("test isempty\\(v\\[3") "test_broken isempty(v[3"))
- #t))
+ ;; These tests randomly fails because they depend on CPU.
+ (substitute* "stdlib/LinearAlgebra/test/matmul.jl"
+ ;; Fixed in v1.6.4 (see:
+ ;; https://github.com/JuliaLang/julia/blob/v1.6.4/
+ ;; stdlib/LinearAlgebra/test/matmul.jl#L155).
+ (("@test mul\\!\\(C, vf, transpose\\(vf\\), 2, 3\\)\
+ == 2vf\\*vf' \\.\\+ 3C0")
+ "@test mul!(C, vf, transpose(vf), 2, 3) ≈ 2vf*vf' .+ 3C0"))
+ (substitute* "test/math.jl"
+ ;; @test_broken cannot be used because if the test randomly
+ ;; passes, then it also raises an error.
+ (("@test isinf\\(log1p\\(-one\\(T\\)\\)\\)")
+ " "))))
(add-before 'install 'symlink-libraries
(lambda* (#:key inputs outputs #:allow-other-keys)
(let ((link
@@ -536,8 +418,7 @@ libraries. It is also a bit like @code{ldd} and @code{otool -L}.")
(link "zlib" "usr/lib/julia/" "libz\\.so")
(link "libunwind" "usr/lib/julia/" "libunwind\\.so")
(symlink (string-append (assoc-ref inputs "p7zip") "/bin/7z")
- "usr/libexec/7z")
- #t)))
+ "usr/libexec/7z"))))
(add-after 'install 'symlink-llvm-utf8proc
(lambda* (#:key inputs outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))
@@ -552,8 +433,7 @@ libraries. It is also a bit like @code{ldd} and @code{otool -L}.")
(find-files (string-append (assoc-ref inputs pkgname)
"/lib") pred)))))
(link "llvm" "libLLVM-11jl\\.so")
- (link "utf8proc" "libutf8proc\\.so")
- #t)))
+ (link "utf8proc" "libutf8proc\\.so"))))
(add-after 'install 'make-wrapper
(lambda* (#:key inputs outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))
@@ -564,8 +444,7 @@ libraries. It is also a bit like @code{ldd} and @code{otool -L}.")
`("JULIA_LOAD_PATH" ":" prefix
("" "$JULIA_LOAD_PATH"))
`("JULIA_DEPOT_PATH" ":" prefix
- ("" "$JULIA_DEPOT_PATH"))))
- #t))))
+ ("" "$JULIA_DEPOT_PATH"))))))))
#:make-flags
(list
(string-append "prefix=" (assoc-ref %outputs "out"))
@@ -641,7 +520,7 @@ libraries. It is also a bit like @code{ldd} and @code{otool -L}.")
("gfortran:lib" ,gfortran "lib")
("gmp" ,gmp)
("lapack" ,lapack)
- ("libgit2" ,libgit2)
+ ("libgit2" ,libgit2-1.1)
("libnghttp2" ,nghttp2 "lib")
("libssh2" ,libssh2)
("libunwind" ,libunwind-julia)
@@ -652,9 +531,7 @@ libraries. It is also a bit like @code{ldd} and @code{otool -L}.")
("openblas" ,openblas)
("openlibm" ,openlibm)
("p7zip" ,p7zip)
- ;; pcre2-10.35 has a bug with the JIT regex parser:
- ;; https://github.com/JuliaLang/julia/issues/40231#issuecomment-812753324
- ("pcre2" ,pcre2-10.36)
+ ("pcre2" ,pcre2)
("suitesparse" ,suitesparse)
("utf8proc" ,utf8proc-2.6.1)
("wget" ,wget)
diff --git a/gnu/packages/jupyter.scm b/gnu/packages/jupyter.scm
index 0de7ad998a..9d4a506949 100644
--- a/gnu/packages/jupyter.scm
+++ b/gnu/packages/jupyter.scm
@@ -420,9 +420,9 @@ nix-shell-wrapper|repo2docker-entrypoint)")
(let* ((out (assoc-ref outputs "doc"))
(doc (string-append out "/share/doc/"
,name)))
- (setenv "PYTHONPATH"
+ (setenv "GUIX_PYTHONPATH"
(string-append (getcwd) ":"
- (getenv "PYTHONPATH")))
+ (getenv "GUIX_PYTHONPATH")))
(with-directory-excursion "docs"
(invoke "make" "html")
(copy-recursively "build/html"
diff --git a/gnu/packages/kde-frameworks.scm b/gnu/packages/kde-frameworks.scm
index 6a48dc229a..ef304dd0df 100644
--- a/gnu/packages/kde-frameworks.scm
+++ b/gnu/packages/kde-frameworks.scm
@@ -33,6 +33,7 @@
#:use-module ((guix licenses) #:prefix license:)
#:use-module (guix packages)
#:use-module (guix utils)
+ #:use-module (guix gexp)
#:use-module (gnu packages)
#:use-module (gnu packages acl)
#:use-module (gnu packages admin)
@@ -294,12 +295,12 @@ http://freedesktop.org/wiki/Specifications/open-collaboration-services/")
;; TODO: qtdeclarative (yields one failing test)
`(("qtbase" ,qtbase-5)))
(arguments
- `(#:configure-flags
- (list (string-append
- "-DUDEV_RULES_INSTALL_DIR=" %output "/lib/udev/rules.d"))
- ;; TODO: Make tests pass: DBUS_FATAL_WARNINGS=0 still yields 7/8 tests
- ;; failing. When running after install, tests hang.
- #:tests? #f))
+ (list #:configure-flags
+ #~(list (string-append
+ "-DUDEV_RULES_INSTALL_DIR=" #$output "/lib/udev/rules.d"))
+ ;; TODO: Make tests pass: DBUS_FATAL_WARNINGS=0 still yields 7/8 tests
+ ;; failing. When running after install, tests hang.
+ #:tests? #f))
(home-page "https://community.kde.org/Frameworks")
(synopsis "QML wrapper for BlueZ")
(description "bluez-qt is a Qt-style library for accessing the bluez
@@ -457,9 +458,8 @@ GZip format, via a subclass of QIODevice.")
(lambda* (#:key inputs #:allow-other-keys)
(setenv "TZ" "Europe/Prague")
(setenv "TZDIR"
- (string-append (assoc-ref inputs "tzdata")
- "/share/zoneinfo"))
- #t)))))
+ (search-input-directory inputs
+ "share/zoneinfo")))))))
(home-page "https://community.kde.org/Frameworks")
(synopsis "Library for interfacing with calendars")
(description "This library provides access to and handling of calendar
@@ -1647,8 +1647,7 @@ integrated it into your application's other widgets.")
;; Xvfb doesn't have proper glx support and needs a pixeldepth
;; of 24 bit to avoid "libGL error: failed to load driver: swrast"
;; "Could not initialize GLX"
- (system (string-append (assoc-ref inputs "xorg-server")
- "/bin/Xvfb :1 -screen 0 640x480x24 &"))
+ (system "Xvfb :1 -screen 0 640x480x24 &")
(setenv "DISPLAY" ":1")
#t)))))
(home-page "https://community.kde.org/Frameworks")
@@ -2392,8 +2391,7 @@ their settings.")
(lambda* (#:key inputs #:allow-other-keys)
;; The test suite requires a running X server, setting
;; QT_QPA_PLATFORM=offscreen does not suffice.
- (system (string-append (assoc-ref inputs "xorg-server")
- "/bin/Xvfb :1 -screen 0 640x480x24 &"))
+ (system "Xvfb :1 -screen 0 640x480x24 &")
(setenv "DISPLAY" ":1")
#t)))))
(home-page "https://community.kde.org/Frameworks")
@@ -3069,12 +3067,12 @@ to easily extend the contacts collection.")
(add-after 'unpack 'fix-paths-for-test
;; This test tries to access paths like /home, /usr/bin and /bin/ls
;; which don't exist in the build-container. Change to existing paths.
- (lambda _
+ (lambda* (#:key inputs #:allow-other-keys)
(substitute* "autotests/runnercontexttest.cpp"
(("/home\"") "/tmp\"") ;; single path-part
(("//usr/bin\"") (string-append (getcwd) "\"")) ;; multiple path-parts
- (("/bin/ls" path)
- (string-append (assoc-ref %build-inputs "coreutils") path)))))
+ (("/bin/ls")
+ (search-input-file inputs "/bin/ls")))))
(add-before 'check 'check-setup
(lambda _
(setenv "HOME" (getcwd))
@@ -3697,8 +3695,8 @@ workspace.")
(lambda* (#:key inputs tests? #:allow-other-keys)
(setenv "HOME" (getcwd))
(setenv "TZDIR" ; KDateTimeTestsome needs TZDIR
- (string-append (assoc-ref inputs "tzdata")
- "/share/zoneinfo"))
+ (search-input-directory inputs
+ "share/zoneinfo"))
;; Make Qt render "offscreen", required for tests
(setenv "QT_QPA_PLATFORM" "offscreen")
;; enable debug output
diff --git a/gnu/packages/kde-multimedia.scm b/gnu/packages/kde-multimedia.scm
index 21ca996246..84cdca94ad 100644
--- a/gnu/packages/kde-multimedia.scm
+++ b/gnu/packages/kde-multimedia.scm
@@ -24,6 +24,7 @@
#:use-module ((guix licenses) #:prefix license:)
#:use-module (guix packages)
#:use-module (guix utils)
+ #:use-module (guix gexp)
#:use-module (gnu packages)
#:use-module (gnu packages audio)
#:use-module (gnu packages base)
@@ -186,8 +187,7 @@ This package is part of the KDE multimedia module.")
(lambda* (#:key inputs #:allow-other-keys)
;; The test suite requires a running X server, setting
;; QT_QPA_PLATFORM=offscreen does not suffice.
- (system (string-append (assoc-ref inputs "xorg-server")
- "/bin/Xvfb :1 -screen 0 640x480x24 &"))
+ (system "Xvfb :1 -screen 0 640x480x24 &")
(setenv "DISPLAY" ":1")
#t))
(replace 'check
@@ -308,11 +308,11 @@ This package is part of the KDE multimedia module.")
`(#:phases
(modify-phases %standard-phases
(add-after 'unpack 'set-absolute-library-paths
- (lambda _
+ (lambda* (#:key inputs #:allow-other-keys)
;; Set absolute paths for dlopened libraries. We can’t use k3b’s
;; runpath as they are loaded by the Qt library.
- (let ((libcdio-paranoia (assoc-ref %build-inputs "libcdio-paranoia"))
- (libdvdcss (assoc-ref %build-inputs "libdvdcss")))
+ (let ((libcdio-paranoia (assoc-ref inputs "libcdio-paranoia"))
+ (libdvdcss (assoc-ref inputs "libdvdcss")))
(substitute* "libk3b/tools/k3bcdparanoialib.cpp"
(("\"(cdio_cdda|cdio_paranoia)\"" _ library)
(string-append "\"" libcdio-paranoia "/lib/" library "\"")))
@@ -321,12 +321,12 @@ This package is part of the KDE multimedia module.")
(string-append "\"" libdvdcss "/lib/" library "\""))))
#t))
(add-after 'qt-wrap 'wrap-path
- (lambda _
+ (lambda* (#:key inputs outputs #:allow-other-keys)
;; Set paths to backend programs.
- (wrap-program (string-append (assoc-ref %outputs "out") "/bin/k3b")
+ (wrap-program (string-append (assoc-ref outputs "out") "/bin/k3b")
`("PATH" ":" prefix
,(map (lambda (input)
- (string-append (assoc-ref %build-inputs input) "/bin"))
+ (string-append (assoc-ref inputs input) "/bin"))
'("cdrdao" "dvd+rw-tools" "libburn" "sox"))))
#t)))))
(native-inputs
@@ -475,11 +475,11 @@ autoloading of subtitle files for use while playing video.")
("qtquickcontrols2" ,qtquickcontrols2) ; not listed as dependency
("qtx11extras" ,qtx11extras)))
(arguments
- `(#:tests? #f ; test program gets built, but is not found
- #:configure-flags
- (list (string-append "-DCMAKE_CXX_FLAGS=-I"
- (assoc-ref %build-inputs "gst-plugins-base")
- "/include/gstreamer-1.0"))))
+ (list #:tests? #f ; test program gets built, but is not found
+ #:configure-flags
+ #~(list (string-append "-DCMAKE_CXX_FLAGS=-I"
+ #$(this-package-input "gst-plugins-base")
+ "/include/gstreamer-1.0"))))
(home-page "https://kde.org/applications/multimedia/org.kde.kamoso")
(synopsis "Take pictures and videos out of your webcam")
(description "Kamoso is a simple and friendly program to use your
@@ -577,10 +577,11 @@ This package is part of the KDE multimedia module.")
("xcb-util-keysyms" ,xcb-util-keysyms)
("xcb-util-wm" ,xcb-util-wm)))
(arguments
- `(#:configure-flags
- (list (string-append
- "-DCMAKE_CXX_FLAGS=-I"
- (assoc-ref %build-inputs "qtx11extras") "/include/qt5"))))
+ (list #:configure-flags
+ #~(list (string-append
+ "-DCMAKE_CXX_FLAGS=-I"
+ #$(this-package-input "qtx11extras")
+ "/include/qt5"))))
(home-page "https://kde.org/applications/multimedia/org.kde.kmplayer")
(synopsis "Media player using mplayer/phonon as backend")
(description "Kmplayer can play all the audio/video supported by
diff --git a/gnu/packages/kde-pim.scm b/gnu/packages/kde-pim.scm
index a4011e8d3a..b63f72f071 100644
--- a/gnu/packages/kde-pim.scm
+++ b/gnu/packages/kde-pim.scm
@@ -90,10 +90,10 @@
#:phases
(modify-phases (@ (guix build qt-build-system) %standard-phases)
(add-before 'configure 'add-definitions
- (lambda _
- (let ((out (assoc-ref %outputs "out"))
- (mysql (assoc-ref %build-inputs "mysql"))
- (pgsql (assoc-ref %build-inputs "postgresql")))
+ (lambda* (#:key outputs inputs #:allow-other-keys)
+ (let ((out (assoc-ref outputs "out"))
+ (mysql (assoc-ref inputs "mysql"))
+ (pgsql (assoc-ref inputs "postgresql")))
(with-output-to-file "CMakeLists.txt.new"
(lambda _
(display
@@ -759,10 +759,9 @@ for KDE PIM.")
;; found during one of the compilation steps without
;; this hack.
(setenv "CPLUS_INCLUDE_PATH"
- (string-append (assoc-ref inputs "akonadi-mime")
- "/include/KF5:"
- (or (getenv "CPLUS_INCLUDE_PATH") "")))
- #t)))))
+ (string-append
+ (search-input-directory inputs "include/KF5")
+ ":" (or (getenv "CPLUS_INCLUDE_PATH") ""))))))))
(home-page "https://invent.kde.org/pim/kdepim-runtime")
(synopsis "Runtime components for Akonadi KDE")
(description "This package contains Akonadi agents written using KDE
@@ -1373,10 +1372,9 @@ using a Qt/KMime C++ API.")
;; FIXME: One of the compilation steps fail to find
;; <Libkdepim/MultiplyingLine> without this hack.
(setenv "CPLUS_INCLUDE_PATH"
- (string-append (assoc-ref inputs "libkdepim")
- "/include/KF5:"
- (or (getenv "CPLUS_INCLUDE_PATH") "")))
- #t)))))
+ (string-append
+ (search-input-directory inputs "include/KF5")
+ ":" (or (getenv "CPLUS_INCLUDE_PATH") ""))))))))
(home-page "https://invent.kde.org/pim/messagelib")
(synopsis "KDE PIM messaging libraries")
(description "This package provides several libraries for messages,
diff --git a/gnu/packages/kde-plasma.scm b/gnu/packages/kde-plasma.scm
index b7a2b14f65..8496208816 100644
--- a/gnu/packages/kde-plasma.scm
+++ b/gnu/packages/kde-plasma.scm
@@ -25,6 +25,7 @@
#:use-module (guix packages)
#:use-module (guix download)
#:use-module ((guix licenses) #:prefix license:)
+ #:use-module (guix gexp)
#:use-module (guix build-system cmake)
#:use-module (guix build-system qt)
#:use-module (gnu packages compression)
@@ -154,8 +155,7 @@ call it if it is not associated to a terminal.")
(modify-phases %standard-phases
(add-before 'check 'check-setup
(lambda* (#:key inputs outputs #:allow-other-keys)
- (system (string-append (assoc-ref inputs "xorg-server")
- "/bin/Xvfb :1 -screen 0 640x480x24 &"))
+ (system "Xvfb :1 -screen 0 640x480x24 &")
(setenv "DISPLAY" ":1")
#t))
(delete 'check)
@@ -270,21 +270,22 @@ basic needs and easy to configure for those who want special setups.")
("zlib" ,zlib)))
(build-system qt-build-system)
(arguments
- `(#:configure-flags
- `(,(string-append "-DKDE_INSTALL_DATADIR="
- (assoc-ref %outputs "out") "/share"))
- #:phases
- (modify-phases %standard-phases
- (add-before 'configure 'patch-cmakelists
- (lambda _
- ;; TODO: Verify: This should no longer be necessary, since
- ;; KF5AuthConfig.cmake.in contains this already.
- (substitute* "processcore/CMakeLists.txt"
- (("KAUTH_HELPER_INSTALL_DIR") "KDE_INSTALL_LIBEXECDIR"))))
- (replace 'check
- (lambda _
- ;; TODO: Fix this failing test-case
- (invoke "ctest" "-E" "processtest"))))))
+ (list #:configure-flags
+ #~`(,(string-append "-DKDE_INSTALL_DATADIR="
+ #$output "/share"))
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-before 'configure 'patch-cmakelists
+ (lambda _
+ ;; TODO: Verify: This should no longer be necessary, since
+ ;; KF5AuthConfig.cmake.in contains this already.
+ (substitute* "processcore/CMakeLists.txt"
+ (("KAUTH_HELPER_INSTALL_DIR")
+ "KDE_INSTALL_LIBEXECDIR"))))
+ (replace 'check
+ (lambda _
+ ;; TODO: Fix this failing test-case
+ (invoke "ctest" "-E" "processtest"))))))
(home-page "https://userbase.kde.org/KSysGuard")
(synopsis "Network enabled task and system monitoring")
(description "KSysGuard can obtain information on system load and
diff --git a/gnu/packages/kde-systemtools.scm b/gnu/packages/kde-systemtools.scm
index 86f169e819..a76efdeb01 100644
--- a/gnu/packages/kde-systemtools.scm
+++ b/gnu/packages/kde-systemtools.scm
@@ -261,7 +261,7 @@ This package is part of the KDE base applications module.")
("libxcb" ,libxcb)
("libxtst" ,libxtst)
("oxygen-icons" ,oxygen-icons) ;; default icon set
- ("pipewire" ,pipewire)
+ ("pipewire" ,pipewire-0.3)
("qtbase" ,qtbase-5)
("qtx11extras" ,qtx11extras)
("xcb-util-image" ,xcb-util-image)
diff --git a/gnu/packages/kde.scm b/gnu/packages/kde.scm
index bf0cfd44e0..858b70a9c1 100644
--- a/gnu/packages/kde.scm
+++ b/gnu/packages/kde.scm
@@ -7,7 +7,7 @@
;;; Copyright © 2018 Gábor Boskovits <boskovits@gmail.com>
;;; Copyright © 2019 Nicolas Goaziou <mail@nicolasgoaziou.fr>
;;; Copyright © 2018, 2019, 2020 Hartmut Goebel <h.goebel@crazy-compilers.com>
-;;; Copyright © 2019, 2020 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2019, 2020, 2021 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2020 Marius Bakke <marius@gnu.org>
;;; Copyright © 2020, 2021 Michael Rohleder <mike@rohleder.de>
;;; Copyright © 2020 Prafulla Giri <pratheblackdiamond@gmail.com>
@@ -57,10 +57,12 @@
#:use-module (gnu packages ebook)
#:use-module (gnu packages flex)
#:use-module (gnu packages fontutils)
+ #:use-module (gnu packages geo)
#:use-module (gnu packages gettext)
#:use-module (gnu packages ghostscript)
#:use-module (gnu packages gl)
#:use-module (gnu packages gnome)
+ #:use-module (gnu packages gps)
#:use-module (gnu packages graphics)
#:use-module (gnu packages image)
#:use-module (gnu packages kde-frameworks)
@@ -74,6 +76,7 @@
#:use-module (gnu packages perl)
#:use-module (gnu packages photo)
#:use-module (gnu packages pkg-config)
+ #:use-module (gnu packages protobuf)
#:use-module (gnu packages pulseaudio)
#:use-module (gnu packages python)
#:use-module (gnu packages tls)
@@ -709,17 +712,13 @@ different notification systems.")
(arguments
`(#:configure-flags '("-DBUILD_TESTING=ON"
"-DKDE_INSTALL_LIBEXECDIR=libexec")
- #:phases (modify-phases %standard-phases
- (add-after 'set-paths 'extend-CPLUS_INCLUDE_PATH
- (lambda* (#:key inputs #:allow-other-keys)
- ;; FIXME: <kcmutils_version.h> is not found during one
- ;; of the compilation steps without this hack.
- (setenv "CPLUS_INCLUDE_PATH"
- (string-append (assoc-ref inputs "kcmutils")
- "/include/KF5:"
- (or (getenv "CPLUS_INCLUDE_PATH")
- "")))
- #t)))
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'adjust-include-header
+ (lambda _
+ (substitute* "plugins/runcommand/runcommandplugin.cpp"
+ (("<kcmutils_version.h>")
+ "<KF5/kcmutils_version.h>")))))
#:tests? #f)) ; tests fail hard in our build environment
(native-inputs
`(("extra-cmake-modules" ,extra-cmake-modules)
@@ -992,6 +991,63 @@ Python, PHP, and Perl.")
(description "Runtime library for kdegames")
(license (list license:gpl2+ license:fdl1.2+))))
+(define-public marble-qt
+ (package
+ (name "marble-qt")
+ (version "21.08.3")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://invent.kde.org/education/marble.git/")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "15gqym45z0gjzdc4ypfj0fki96c3dad4ygsi6lfr8yvwsx8swrb6"))))
+ (build-system qt-build-system)
+ (arguments
+ ;; FIXME: libmarblewidget-qt5.so.28 not found. Also enable the
+ ;; corresponding configure flag to build tests.
+ `(#:tests? #f
+ #:configure-flags
+ (list "-DBUILD_MARBLE_TOOLS=YES" ; file conversion tools
+ "-DBUILD_TOUCH=YES"
+ "-DBUILD_MARBLE_TESTS=FALSE")))
+ (native-inputs
+ `(("extra-cmake-modules" ,extra-cmake-modules)
+ ("qttools" ,qttools)))
+ ;; One optional dependency missing: libwlocate.
+ (inputs
+ `(("gpsd" ,gpsd)
+ ("kcoreaddons" ,kcoreaddons)
+ ("kcrash" ,kcrash)
+ ("kdoctools" ,kdoctools)
+ ("ki18n" ,ki18n)
+ ("kio" ,kio)
+ ("knewstuff" ,knewstuff)
+ ("kparts" ,kparts)
+ ("krunner" ,krunner)
+ ("kwallet" ,kwallet)
+ ("perl" ,perl)
+ ("phonon" ,phonon)
+ ("protobuf" ,protobuf)
+ ("qtbase" ,qtbase-5)
+ ("qtdeclarative" ,qtdeclarative)
+ ("qtlocation" ,qtlocation)
+ ("qtserialport" ,qtserialport)
+ ("qtsvg" ,qtsvg)
+ ;; ("qtwebengine" ,qtwebengine) ; FIXME: not found by CMake
+ ("shapelib" ,shapelib)
+ ("shared-mime-info" ,shared-mime-info)
+ ("zlib" ,zlib)))
+ (home-page "https://marble.kde.org/")
+ (synopsis "Virtual globe and world atlas")
+ (description "Marble is similar to a desktop globe. At closer scale it
+becomes a world atlas, while OpenStreetMap takes the user to street level. It
+supports searching for places of interest, viewing Wikipedia articles,
+creating routes by drag and drop and more.")
+ (license license:lgpl2.1+)))
+
(define-public okular
(package
(name "okular")
diff --git a/gnu/packages/kerberos.scm b/gnu/packages/kerberos.scm
index 92cc84b673..dc05c710a6 100644
--- a/gnu/packages/kerberos.scm
+++ b/gnu/packages/kerberos.scm
@@ -10,6 +10,8 @@
;;; Copyright © 2017 Alex Vong <alexvong1995@gmail.com>
;;; Copyright © 2019 Mathieu Othacehe <m.othacehe@gmail.com>
;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
+;;; Copyright © 2020, 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
+;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -29,6 +31,7 @@
(define-module (gnu packages kerberos)
#:use-module (gnu packages)
#:use-module (gnu packages autotools)
+ #:use-module (gnu packages bash)
#:use-module (gnu packages bison)
#:use-module (gnu packages dbm)
#:use-module (gnu packages perl)
@@ -41,19 +44,20 @@
#:use-module (gnu packages compression)
#:use-module (gnu packages readline)
#:use-module (gnu packages sqlite)
+ #:use-module (gnu packages tcl)
#:use-module (gnu packages texinfo)
#:use-module (gnu packages tls)
#:use-module ((guix licenses) #:prefix license:)
#:use-module (guix packages)
#:use-module (guix download)
+ #:use-module (guix gexp)
#:use-module (guix utils)
#:use-module (guix build-system gnu))
(define-public mit-krb5
(package
(name "mit-krb5")
- (replacement mit-krb5-1.18.4)
- (version "1.18")
+ (version "1.19.2")
(source (origin
(method url-fetch)
(uri (list
@@ -63,15 +67,17 @@
(string-append "https://kerberos.org/dist/krb5/"
(version-major+minor version)
"/krb5-" version ".tar.gz")))
- (patches (search-patches "mit-krb5-qualify-short-hostnames.patch"
- "mit-krb5-hurd.patch"))
+ (patches (search-patches "mit-krb5-hurd.patch"))
(sha256
(base32
- "121c5xsy3x0i4wdkrpw62yhvji6virbh6n30ypazkp0isws3k4bk"))))
+ "0snz1jm2w4dkk65zcz953jmmv9mqa30fanch2bk8r3rs9vp3yi8h"))))
(build-system gnu-build-system)
(native-inputs
`(("bison" ,bison)
- ("perl" ,perl)))
+ ("perl" ,perl)
+ ("tcl" ,tcl))) ;required for some tests
+ (inputs
+ `(("openssl" ,openssl)))
(arguments
`(;; XXX: On 32-bit systems, 'kdb5_util' hangs on an fcntl/F_SETLKW call
;; while running the tests in 'src/tests'. Also disable tests when
@@ -95,20 +101,14 @@
(modify-phases %standard-phases
(add-after 'unpack 'enter-source-directory
(lambda _
- (chdir "src")
- #t))
+ (chdir "src")))
(add-before 'check 'pre-check
(lambda* (#:key inputs native-inputs #:allow-other-keys)
(let ((perl (assoc-ref (or native-inputs inputs) "perl")))
(substitute* "plugins/kdb/db2/libdb2/test/run.test"
(("/bin/cat") (string-append perl "/bin/perl"))
(("D/bin/sh") (string-append "D" (which "sh")))
- (("bindir=/bin/.") (string-append "bindir=" perl "/bin"))))
-
- ;; avoid service names since /etc/services is unavailable
- (substitute* "tests/resolve/Makefile"
- (("-p telnet") "-p 23"))
- #t)))))
+ (("bindir=/bin/.") (string-append "bindir=" perl "/bin")))))))))
(synopsis "MIT Kerberos 5")
(description
"Massachusetts Institute of Technology implementation of Kerberos.
@@ -120,28 +120,6 @@ cryptography.")
(home-page "https://web.mit.edu/kerberos/")
(properties '((cpe-name . "kerberos")))))
-(define-public mit-krb5-1.18.4
- ;; Hide the package to avoid displaying the confusing "1.1a" version in the
- ;; user interface.
- (hidden-package
- (package
- (inherit mit-krb5)
- ; version 1.18.4
- (version "1.1a")
- (source (origin
- (method url-fetch)
- (uri (list
- (string-append "https://web.mit.edu/kerberos/dist/krb5/"
- "1.18"
- "/krb5-1.18.4.tar.gz")
- (string-append "https://kerberos.org/dist/krb5/"
- "1.18"
- "/krb5-1.18.4.tar.gz")))
- (patches (search-patches "mit-krb5-hurd.patch"))
- (sha256
- (base32
- "1j4zm5npv3yxrwrsdwlxias0ycj4qfxzgnz0h9zffla7b4pmw236")))))))
-
(define-public shishi
(package
(name "shishi")
@@ -208,34 +186,72 @@ After installation, the system administrator should generate keys using
(substitute* "configure"
(("User=.*$") "User=Guix\n")
(("Host=.*$") "Host=GNU")
- (("Date=.*$") "Date=2019\n"))
- #t))))
+ (("Date=.*$") "Date=2019\n"))))))
(build-system gnu-build-system)
(arguments
- '(#:configure-flags (list
- ;; Avoid 7 MiB of .a files.
- "--disable-static"
+ `(#:configure-flags
+ ,#~(list
+ ;; Avoid 7 MiB of .a files.
+ "--disable-static"
- ;; Do not build libedit.
- (string-append
- "--with-readline-lib="
- (assoc-ref %build-inputs "readline") "/lib")
- (string-append
- "--with-readline-include="
- (assoc-ref %build-inputs "readline") "/include")
+ ;; Do not build libedit.
+ (string-append
+ "--with-readline-lib="
+ (assoc-ref %build-inputs "readline") "/lib")
+ (string-append
+ "--with-readline-include="
+ (assoc-ref %build-inputs "readline") "/include")
- ;; Do not build sqlite.
- (string-append
- "--with-sqlite3="
- (assoc-ref %build-inputs "sqlite")))
+ ;; Do not build sqlite.
+ (string-append
+ "--with-sqlite3="
+ (assoc-ref %build-inputs "sqlite"))
+ #$@(if (%current-target-system)
+ ;; The configure script is too pessimistic.
+ ;; Setting this also resolves a linking error.
+ #~("ac_cv_func_getpwnam_r_posix=yes"
+ ;; Allow 'slc' and 'asn1_compile' to be found.
+ (string-append "--with-cross-tools="
+ #+(file-append this-package
+ "/libexec/heimdal")))
+ #~()))
#:phases (modify-phases %standard-phases
(add-before 'configure 'pre-configure
- (lambda _
- (substitute* '("appl/afsutil/pagsh.c"
- "tools/Makefile.in")
- (("/bin/sh") (which "sh")))
- #t))
+ ;; TODO(core-updates): Unconditionally use the
+ ;; %current-target-system branch.
+ (,(if (%current-target-system)
+ 'lambda*
+ 'lambda)
+ ,(if (%current-target-system)
+ '(#:key inputs #:allow-other-keys)
+ '_)
+ ,@(if (%current-target-system)
+ `((substitute* "configure"
+ ;; The e2fsprogs input is included for libcom_err,
+ ;; let's use it even if cross-compiling.
+ (("test \"\\$\\{krb_cv_com_err\\}\" = \"yes\"")
+ ":")
+ ;; Our 'compile_et' is not in --with-cross-tools,
+ ;; which confuses heimdal.
+ (("ac_cv_prog_COMPILE_ET=\\$\\{with_cross_tools\\}compile_et")
+ "ac_cv_PROG_COMPILE_ET=compile_et")))
+ '())
+ ,@(if (%current-target-system)
+ '((substitute* '("appl/afsutil/pagsh.c" "appl/su/su.c")
+ (("/bin/sh")
+ (search-input-file inputs "bin/sh"))
+ ;; Use the cross-compiled bash instead of the
+ ;; native bash (XXX shouldn't _PATH_BSHELL point
+ ;; to a cross-compiled bash?).
+ (("_PATH_BSHELL")
+ (string-append
+ "\"" (search-input-file inputs "bin/sh") "\"")))
+ (substitute* '("tools/Makefile.in")
+ (("/bin/sh") (which "sh"))))
+ '((substitute* '("appl/afsutil/pagsh.c"
+ "tools/Makefile.in")
+ (("/bin/sh") (which "sh")))))))
(add-before 'check 'pre-check
(lambda _
;; For 'getxxyyy-test'.
@@ -245,16 +261,18 @@ After installation, the system administrator should generate keys using
;; FIXME: figure out why 'kdc' tests fail.
(with-output-to-file "tests/db/have-db.in"
(lambda ()
- (format #t "#!~a~%exit 1~%" (which "sh"))))
- #t)))
+ (format #t "#!~a~%exit 1~%" (which "sh")))))))
;; Tests fail when run in parallel.
#:parallel-tests? #f))
(native-inputs `(("e2fsprogs" ,e2fsprogs) ;for 'compile_et'
("texinfo" ,texinfo)
- ("unzip" ,unzip))) ;for tests
+ ("unzip" ,unzip) ;for tests
+ ("perl" ,perl)))
(inputs `(("readline" ,readline)
+ ("bash-minimal" ,bash-minimal)
("bdb" ,bdb)
("e2fsprogs" ,e2fsprogs) ;for libcom_err
+ ("mit-krb5" ,mit-krb5)
("sqlite" ,sqlite)))
(home-page "http://www.h5l.org/")
(synopsis "Kerberos 5 network authentication")
diff --git a/gnu/packages/kodi.scm b/gnu/packages/kodi.scm
index 1e50624696..2416fb1c61 100644
--- a/gnu/packages/kodi.scm
+++ b/gnu/packages/kodi.scm
@@ -349,8 +349,7 @@ alternatives. In compilers, this can reduce the cascade of secondary errors.")
(substitute* "xbmc/platform/linux/LinuxTimezone.cpp"
(("/usr/share/zoneinfo")
- (string-append (assoc-ref inputs "tzdata")
- "/share/zoneinfo")))
+ (search-input-directory inputs "share/zoneinfo")))
;; Don't phone home to check for updates.
(substitute* "system/addon-manifest.xml"
@@ -510,8 +509,8 @@ plug-in system.")
(use-modules (guix build utils))
(copy-recursively (assoc-ref %build-inputs "source") ".")
(substitute* "kodi-cli"
- (("/bin/bash") (string-append (assoc-ref %build-inputs "bash")
- "/bin/bash"))
+ (("/bin/bash")
+ (search-input-file %build-inputs "/bin/bash"))
(("output=\\$\\((curl)" all curl)
(string-append "output=$("
(assoc-ref %build-inputs "curl")
diff --git a/gnu/packages/language.scm b/gnu/packages/language.scm
index 4d0705d9e3..1eb3f5087b 100644
--- a/gnu/packages/language.scm
+++ b/gnu/packages/language.scm
@@ -131,8 +131,7 @@
(lambda* (#:key inputs outputs #:allow-other-keys)
(substitute* "configure.ac"
(("/usr/share/anthy/anthy.dic")
- (string-append (assoc-ref inputs "anthy")
- "/share/anthy/anthy.dic")))
+ (search-input-file inputs "/share/anthy/anthy.dic")))
(substitute* "configure.ac"
(("/usr/bin:\\$GTK3_LIBDIR/libgtk-3-0")
(string-append (assoc-ref inputs "gtk+:bin")
@@ -976,10 +975,11 @@ suitable for both the desktop and mobile devices.")
(lambda* (#:key inputs #:allow-other-keys)
(substitute* "tegakigtk/fakekey.py"
(("libX11.so.6" so)
- (string-append (assoc-ref inputs "libx11") "/lib/" so))
+ (search-input-file inputs
+ (string-append "/lib/" so)))
(("libXtst.so.6" so)
- (string-append (assoc-ref inputs "libxtst") "/lib/" so)))
- #t))))))
+ (search-input-file inputs
+ (string-append "/lib/" so))))))))))
(inputs ; required for sending key strokes
`(("libx11" ,libx11)
("libxtst" ,libxtst)))
diff --git a/gnu/packages/ld-wrapper.in b/gnu/packages/ld-wrapper.in
index 2b68b87fb9..0d53e746af 100644
--- a/gnu/packages/ld-wrapper.in
+++ b/gnu/packages/ld-wrapper.in
@@ -11,11 +11,12 @@
# <https://lists.gnu.org/archive/html/guile-devel/2016-03/msg00000.html>.
unset GUILE_LOAD_COMPILED_PATH
+unset GUILE_SYSTEM_COMPILED_PATH
main="(@ (gnu build-support ld-wrapper) ld-wrapper)"
exec @GUILE@ -c "(load-compiled \"@SELF@.go\") (apply $main (cdr (command-line)))" "$@"
!#
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2020 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2020 Marius Bakke <mbakke@fastmail.com>
;;;
;;; This file is part of GNU Guix.
diff --git a/gnu/packages/less.scm b/gnu/packages/less.scm
index 56d40978b8..7ebc1e7dc9 100644
--- a/gnu/packages/less.scm
+++ b/gnu/packages/less.scm
@@ -84,11 +84,11 @@ text editors.")
(lambda* (#:key inputs #:allow-other-keys)
(substitute* "lesspipe.sh"
(("tput colors")
- (string-append (assoc-ref inputs "ncurses")
- "/bin/tput colors"))
+ (string-append (search-input-file inputs "/bin/tput")
+ " colors"))
(("file -")
- (string-append (assoc-ref inputs "file")
- "/bin/file -"))))))))
+ (string-append (search-input-file inputs "/bin/file")
+ " -"))))))))
(inputs
`(("file" ,file)
("ncurses" ,ncurses))) ; for tput
diff --git a/gnu/packages/libdaemon.scm b/gnu/packages/libdaemon.scm
index e47d66cfa7..9dc851e823 100644
--- a/gnu/packages/libdaemon.scm
+++ b/gnu/packages/libdaemon.scm
@@ -1,5 +1,6 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2013, 2014, 2020 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -17,8 +18,10 @@
;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
(define-module (gnu packages libdaemon)
+ #:use-module (gnu packages autotools)
#:use-module (guix licenses)
#:use-module (guix packages)
+ #:use-module (guix utils)
#:use-module (guix download)
#:use-module (guix build-system gnu))
@@ -45,21 +48,34 @@
"0d5qlq5ab95wh1xc87rqrh1vx6i8lddka1w3f1zcqvcqdxgyn8zx"))
(file-name (string-append name "-" version ".tar.gz"))))
(build-system gnu-build-system)
- (arguments
- (if (%current-target-system)
- ;; The 'setpgrp' test cannot provide an answer when cross-compiling,
- ;; so provide the right one for glibc.
- `(#:configure-flags (list "ac_cv_func_setpgrp_void=yes"
-
- ;; TODO: Move this globally on the next
- ;; rebuild cycle.
- ;; Set a valid localstatedir for the
- ;; benefit of the default
- ;; 'daemon_pid_file_proc', used by the
- ;; Hurd's console client.
- "--localstatedir=/var"))
+ (native-inputs
+ (if (and=> (%current-target-system) target-aarch64?)
+ `(("config" ,config)) ; for config.sub
'()))
+ (arguments
+ `(,@(if (%current-target-system)
+ ;; The 'setpgrp' test cannot provide an answer when cross-compiling,
+ ;; so provide the right one for glibc.
+ `(#:configure-flags (list "ac_cv_func_setpgrp_void=yes"
+ ;; TODO: Move this globally on the next
+ ;; rebuild cycle.
+ ;; Set a valid localstatedir for the
+ ;; benefit of the default
+ ;; 'daemon_pid_file_proc', used by the
+ ;; Hurd's console client.
+ "--localstatedir=/var"))
+ '())
+ ,@(if (and=> (%current-target-system) target-aarch64?)
+ `(#:phases
+ (modify-phases %standard-phases
+ (add-before 'configure 'update-config.sub
+ (lambda _
+ ;; Replace outdated config.sub such that aarch64
+ ;; will be recognised as an architecture.
+ (delete-file "config.sub")
+ (symlink (which "config.sub") "config.sub")))))
+ '())))
;; XXX: Stale URL, missing replacement. See <http://bugs.gnu.org/18639>.
(home-page "http://0pointer.de/lennart/projects/libdaemon/")
diff --git a/gnu/packages/libevent.scm b/gnu/packages/libevent.scm
index c55b0d89d1..0b4a244076 100644
--- a/gnu/packages/libevent.scm
+++ b/gnu/packages/libevent.scm
@@ -28,6 +28,7 @@
#:use-module (guix licenses)
#:use-module (guix packages)
#:use-module (guix download)
+ #:use-module (guix git-download)
#:use-module (guix build-system gnu)
#:use-module (guix build-system perl)
#:use-module (gnu packages autotools)
@@ -41,7 +42,7 @@
(define-public libevent
(package
(name "libevent")
- (version "2.1.11")
+ (version "2.1.12")
(source (origin
(method url-fetch)
(uri (string-append
@@ -49,12 +50,13 @@
version "-stable/libevent-" version "-stable.tar.gz"))
(sha256
(base32
- "0g988zqm45sj1hlhhz4il5z4dpi5dl74hzjwzl4md37a09iaqnx6"))))
+ "1fq30imk8zd26x8066di3kpc5zyfc5z6frr3zll685zcx4dxxrlj"))))
(build-system gnu-build-system)
(outputs '("out" "bin"))
(arguments
;; This skips some of the tests which fail on armhf and aarch64.
- '(#:configure-flags '("--disable-libevent-regress")))
+ '(#:configure-flags '("--disable-libevent-regress"
+ "--disable-openssl")))
(inputs
`(("python" ,python-wrapper))) ;for 'event_rpcgen.py'
(native-inputs
@@ -76,7 +78,7 @@ loop.")
(define-public libev
(package
(name "libev")
- (version "4.31")
+ (version "4.33")
(source (origin
(method url-fetch)
(uri (string-append "http://dist.schmorp.de/libev/Attic/libev-"
@@ -84,7 +86,7 @@ loop.")
".tar.gz"))
(sha256
(base32
- "0nkfqv69wfyy2bpga4d53iqydycpik8jp8x6q70353hia8mmv1gd"))))
+ "1sjs4324is7fp21an4aas2z4dwsvs6z4xwrmp72vwpq1s6wbfzjh"))))
(build-system gnu-build-system)
(arguments
'(#:configure-flags '("--disable-static")))
@@ -102,21 +104,20 @@ limited support for fork events.")
(define-public libuv
(package
(name "libuv")
- (version "1.35.0")
+ (version "1.41.1")
(source (origin
(method url-fetch)
(uri (string-append "https://dist.libuv.org/dist/v" version
"/libuv-v" version ".tar.gz"))
(sha256
(base32
- "0126mfmaw3s92dsga60sydgwjmzwg9cd36n127pydmisah17v50f"))))
+ "0zb818sjwnxn5yv3qvkxaprjf037yqmjipk5i3a8rg1q4izhrnv5"))))
(build-system gnu-build-system)
(arguments
'(#:configure-flags '("--disable-static")
;; XXX: Some tests want /dev/tty, attempt to make connections, etc.
#:tests? #f))
- ;; TODO replace with autoconf on core-updates
- (native-inputs `(("autoconf" ,autoconf-wrapper)
+ (native-inputs `(("autoconf" ,autoconf)
("automake" ,automake)
("libtool" ,libtool)
@@ -150,6 +151,27 @@ resolution, asynchronous file system operations, and threading primitives.")
"0wpb9pz3r8nksnrf4zbixj2kk9whr7abi45ydrwyv2js2ljrc4j3"))))
(properties '((hidden? . #t)))))
+(define-public libuv-julia
+ (let ((commit "fb3e3364c33ae48c827f6b103e05c3f0e78b79a9")
+ (revision "3"))
+ ;; When upgrading Julia, also upgrade this. Get the commit from
+ ;; https://github.com/JuliaLang/julia/blob/v1.6.1/deps/libuv.version
+ (package
+ (inherit libuv)
+ (name "libuv-julia")
+ (version (git-version "2.0.0" revision commit))
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/JuliaLang/libuv")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1kqpn19d20aka30h6q5h8lnzyp0vw0xzgx0wm4w2r5j6yf76m2hr"))))
+ (home-page "https://github.com/JuliaLang/libuv")
+ (properties '((hidden? . #t))))))
+
(define-public perl-anyevent
(package
(name "perl-anyevent")
diff --git a/gnu/packages/libffi.scm b/gnu/packages/libffi.scm
index d62a1588c1..b0a66c11c5 100644
--- a/gnu/packages/libffi.scm
+++ b/gnu/packages/libffi.scm
@@ -2,11 +2,11 @@
;;; Copyright © 2012, 2013, 2014, 2020, 2021 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2014 Federico Beffa <beffa@fbengineering.ch>
;;; Copyright © 2015, 2019 Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de>
-;;; Copyright © 2016, 2017, 2020 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2016, 2017, 2020, 2021 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2016, 2017 Ben Woodcroft <donttrustben@gmail.com>
;;; Copyright © 2017, 2019, 2020 Marius Bakke <marius@gnu.org>
;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
-;;; Copyright © 2019 Maxim Cournoyer <maxim.cournoyer@gmail.com>
+;;; Copyright © 2019, 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;; Copyright © 2020 John Doe <dftxbs3e@free.fr>
;;;
;;; This file is part of GNU Guix.
@@ -51,45 +51,15 @@
name "-" version ".tar.gz"))
(sha256
(base32
- "0mi0cpf8aa40ljjmzxb7im6dbj45bb0kllcd09xgmp834y9agyvj"))))
+ "0mi0cpf8aa40ljjmzxb7im6dbj45bb0kllcd09xgmp834y9agyvj"))
+ (patches (search-patches "libffi-3.3-powerpc-fixes.patch"
+ "libffi-float128-powerpc64le.patch"))))
(build-system gnu-build-system)
(arguments
`(;; Prevent the build system from passing -march and -mtune to the
;; compiler. See "ax_cc_maxopt.m4" and "ax_gcc_archflag.m4".
- #:configure-flags '("--enable-portable-binary" "--without-gcc-arch")
-
- ;; TODO: Inline patches on next rebuild cycle.
- ,@(if (string-prefix? "powerpc-" (or (%current-target-system)
- (%current-system)))
- '(#:phases (modify-phases %standard-phases
- (add-after 'unpack 'apply-patch
- (lambda* (#:key inputs #:allow-other-keys)
- (let ((patch (assoc-ref inputs
- "powerpc-patch")))
- (invoke "patch" "--force" "-p1"
- "-i" patch))))))
- '())
- ,@(if (string-prefix? "powerpc64le-" (or (%current-target-system)
- (%current-system)))
- '(#:phases (modify-phases %standard-phases
- (add-after 'unpack 'apply-patch2
- (lambda* (#:key inputs #:allow-other-keys)
- (let ((patch (assoc-ref inputs
- "powerpc64le-patch")))
- (invoke "patch" "--force" "-p1"
- "-i" patch))))))
- '())))
- (inputs
- (cond
- ((string-prefix? "powerpc-" (or (%current-target-system)
- (%current-system)))
- `(("powerpc-patch" ,@(search-patches
- "libffi-3.3-powerpc-fixes.patch"))))
- ((string-prefix? "powerpc64le-" (or (%current-target-system)
- (%current-system)))
- `(("powerpc64le-patch" ,@(search-patches
- "libffi-float128-powerpc64le.patch"))))
- (else '())))
+ #:configure-flags '("--enable-portable-binary"
+ "--without-gcc-arch")))
(outputs '("out" "debug"))
(synopsis "Foreign function call interface library")
(description
@@ -128,20 +98,10 @@ conversions for values passed between the two languages.")
`(("pkg-config" ,pkg-config)
("python-pytest" ,python-pytest)))
(arguments
- `(#:modules ((ice-9 ftw)
- (srfi srfi-26)
- (guix build utils)
- (guix build python-build-system))
- #:phases
+ `(#:phases
(modify-phases %standard-phases
(replace 'check
(lambda _
- (setenv "PYTHONPATH"
- (string-append
- (getenv "PYTHONPATH")
- ":" (getcwd) "/build/"
- (car (scandir "build" (cut string-prefix? "lib." <>)))))
-
;; XXX The "normal" approach of setting CC and friends does
;; not work here. Is this the correct way of doing things?
(substitute* "testing/embedding/test_basic.py"
@@ -152,8 +112,7 @@ conversions for values passed between the two languages.")
"linker_so='gcc -shared')")))
(substitute* "testing/cffi0/test_ownlib.py"
(("\"cc testownlib") "\"gcc testownlib"))
- (invoke "py.test" "-v" "c/" "testing/")
- #t))
+ (invoke "py.test" "-v" "c/" "testing/")))
(add-before 'check 'patch-paths-of-dynamically-loaded-libraries
(lambda* (#:key inputs #:allow-other-keys)
;; Shared libraries should be referred by their absolute path as
@@ -176,8 +135,7 @@ conversions for values passed between the two languages.")
(format #f "lib_m = ['~a']" libm)))
(substitute* "c/test_c.py"
(("find_and_load_library\\(['\"]{1}c['\"]{1}")
- (format #f "find_and_load_library('~a'" libc)))
- #t))))))
+ (format #f "find_and_load_library('~a'" libc)))))))))
(home-page "https://cffi.readthedocs.io/")
(synopsis "Foreign function interface for Python")
(description "Foreign Function Interface for Python calling C code.")
diff --git a/gnu/packages/libidn.scm b/gnu/packages/libidn.scm
index 8731ed3f83..b2234ff126 100644
--- a/gnu/packages/libidn.scm
+++ b/gnu/packages/libidn.scm
@@ -1,10 +1,11 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2012 Andreas Enge <andreas@enge.fr>
-;;; Copyright © 2016, 2017 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2016, 2017, 2021 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2017 Marius Bakke <mbakke@fastmail.com>
;;; Copyright © 2017 Mark H Weaver <mhw@netris.org>
;;; Copyright © 2017 Eric Bavier <bavier@member.fsf.org>
;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
+;;; Copyright © 2020 Michael Rohleder <mike@rohleder.de>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -33,14 +34,14 @@
(define-public libidn
(package
(name "libidn")
- (version "1.35")
+ (version "1.37")
(source (origin
(method url-fetch)
(uri (string-append "mirror://gnu/libidn/libidn-" version
".tar.gz"))
(sha256
(base32
- "07pyy0afqikfq51z5kbzbj9ldbd12mri0zvx0mfv3ds6bc0g26pi"))))
+ "1hljls9rkilh04dwiwg388wk8djkac8idijrdysqq2nqbh6rg3iw"))))
(build-system gnu-build-system)
;; FIXME: No Java and C# libraries are currently built.
(arguments
@@ -59,16 +60,14 @@ Java libraries.")
(define-public libidn2
(package
(name "libidn2")
- (version "2.3.0")
+ (version "2.3.1")
(source (origin
(method url-fetch)
(uri (string-append "mirror://gnu/libidn/" name "-" version
- ".tar.lz"))
+ ".tar.gz"))
(sha256
(base32
- "14yw4w37ya6rcqa7h6p44x6711dwgq2j22xg6k79ybbf04sj88kb"))))
- (native-inputs
- `(("lzip" ,lzip)))
+ "0b8gsksj2g9f4iywwdma3v4jcg7i9rqvdxfmclwvbf1n72a89xla"))))
(inputs
`(("libunistring" ,libunistring)))
(build-system gnu-build-system)
diff --git a/gnu/packages/libreoffice.scm b/gnu/packages/libreoffice.scm
index 0dcdf46ff1..ab75650481 100644
--- a/gnu/packages/libreoffice.scm
+++ b/gnu/packages/libreoffice.scm
@@ -6,7 +6,7 @@
;;; Copyright © 2017 Thomas Danckaert <post@thomasdanckaert.be>
;;; Copyright © 2017–2021 Tobias Geerinckx-Rice <me@tobias.gr>
;;; Copyright © 2017 Andy Wingo <wingo@igalia.com>
-;;; Copyright © 2017, 2018, 2019 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2017, 2018, 2019, 2021 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2017, 2018, 2019 Marius Bakke <mbakke@fastmail.com>
;;; Copyright © 2017 Rutger Helling <rhelling@mykolab.com>
;;; Copyright © 2018, 2019 Ricardo Wurmus <rekado@elephly.net>
@@ -272,8 +272,16 @@ into other word processors.")
(uri (string-append "mirror://sourceforge/libebook/libe-book-"
version "/libe-book-" version ".tar.xz"))
(sha256
- (base32
- "1yg1vws1wggzhjw672bpgh2x541g5i9wryf67g51m0r79zrqz3by"))))
+ (base32
+ "1yg1vws1wggzhjw672bpgh2x541g5i9wryf67g51m0r79zrqz3by"))
+ (modules '((guix build utils)))
+ (snippet
+ '(begin
+ ;; This can be removed with the next release.
+ ;; Needed for icu4c compatibility >= 68.0.
+ (substitute* "src/lib/EBOOKCharsetConverter.cpp"
+ (("TRUE, TRUE, &status")
+ "true, true, &status"))))))
(build-system gnu-build-system)
(native-inputs
`(("cppunit" ,cppunit)
@@ -545,7 +553,8 @@ library primarily intended for language guessing.")
"1b1lvqh68rwij1yvmxy02hsmh7i74ma5767mk8mg5nx6chajshhf"))))
(build-system gnu-build-system)
(arguments
- '(#:phases (modify-phases %standard-phases
+ '(#:configure-flags '("--disable-werror")
+ #:phases (modify-phases %standard-phases
(add-before 'build 'adjust-for-ICU-65
(lambda _
;; Fix build with ICU 65 and later. Taken from this
@@ -583,7 +592,15 @@ Aldus/Macromedia/Adobe FreeHand documents.")
(uri (string-append "https://dev-www.libreoffice.org/src/" name "/"
name "-" version ".tar.xz"))
(sha256 (base32
- "1fhkn013gzg59f4z7rldpbi0nj7lgdqzxanspsqa6axvmahw2dpg"))))
+ "1fhkn013gzg59f4z7rldpbi0nj7lgdqzxanspsqa6axvmahw2dpg"))
+ (modules '((guix build utils)))
+ (snippet
+ '(begin
+ ;; This can be removed with the next release.
+ ;; https://gerrit.libreoffice.org/c/libmspub/+/73814
+ (substitute* "src/lib/MSPUBMetaData.h"
+ (("include <vector>" all)
+ (string-append all "\n#include <cstdint>")))))))
(build-system gnu-build-system)
(native-inputs
`(("doxygen" ,doxygen)
@@ -955,8 +972,8 @@ library.")
(myspell (string-append out "/share/myspell"))
(doc (string-append out "/share/doc/"
,name))
- (unzip (string-append (assoc-ref %build-inputs "unzip")
- "/bin/unzip")))
+ (unzip (search-input-file %build-inputs
+ "/bin/unzip")))
(invoke unzip "-j" "-o" (assoc-ref %build-inputs "source"))
(invoke unzip "-j" "-o" "pl_PL.zip")
(for-each (cut install-file <> hunspell)
@@ -1228,10 +1245,7 @@ converting QuarkXPress file format. It supports versions 3.1 to 4.1.")
(substitute* '("shell/source/unix/exec/shellexec.cxx"
"shell/source/unix/misc/senddoc.sh")
(("/usr/bin/xdg-open")
- (string-append (assoc-ref inputs "xdg-utils")
- "/bin/xdg-open")))
-
- #t))
+ (search-input-file inputs "/bin/xdg-open")))))
(add-after 'install 'reset-zip-timestamps
(lambda* (#:key outputs #:allow-other-keys)
(let ((out (assoc-ref outputs "out")))
diff --git a/gnu/packages/libsigsegv.scm b/gnu/packages/libsigsegv.scm
index 927a12f4cf..627447e876 100644
--- a/gnu/packages/libsigsegv.scm
+++ b/gnu/packages/libsigsegv.scm
@@ -26,14 +26,14 @@
(define-public libsigsegv
(package
(name "libsigsegv")
- (version "2.12")
+ (version "2.13")
(source (origin
(method url-fetch)
(uri (string-append
"mirror://gnu/libsigsegv/libsigsegv-"
version ".tar.gz"))
(sha256
- (base32 "1dlhqf4igzpqayms25lkhycjq1ccavisx8cnb3y4zapbkqsszq9s"))))
+ (base32 "06c1qjiv69hjvbq06mcxdi5hzfadhy28sa83zxspqpxhfr0ywy5y"))))
(build-system gnu-build-system)
(home-page "https://www.gnu.org/software/libsigsegv/")
(synopsis "Library for handling page faults")
diff --git a/gnu/packages/libusb.scm b/gnu/packages/libusb.scm
index 8da6984249..711b37e845 100644
--- a/gnu/packages/libusb.scm
+++ b/gnu/packages/libusb.scm
@@ -10,6 +10,7 @@
;;; Copyright © 2018 Vagrant Cascadian <vagrant@debian.org>
;;; Copyright © 2020 Marius Bakke <mbakke@fastmail.com>
;;; Copyright © 2020 Christopher Howard <christopher@librehacker.com>
+;;; Copyright © 2021 Guillaume Le Vaillant <glv@posteo.net>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -543,6 +544,7 @@ proposed for standardization.")
'(#:configure-flags
(let ((libid3tag (assoc-ref %build-inputs "libid3tag")))
(list
+ "CFLAGS=-fcommon"
;; libid3tag provides no .pc file, so pkg-config fails to find them.
(string-append "ID3TAG_CFLAGS=-I" libid3tag "/include")
(string-append "ID3TAG_LIBS=-L" libid3tag "/lib -lid3tag -lz")))))
diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index 1e51dd8d83..7dd565bff8 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -22,7 +22,7 @@
;;; Copyright © 2017, 2018, 2020, 2021 Leo Famulari <leo@famulari.name>
;;; Copyright © 2017 José Miguel Sánchez García <jmi2k@openmailbox.com>
;;; Copyright © 2017 Gábor Boskovits <boskovits@gmail.com>
-;;; Copyright © 2017, 2019 Mathieu Othacehe <m.othacehe@gmail.com>
+;;; Copyright © 2017, 2019, 2021 Mathieu Othacehe <othacehe@gnu.org>
;;; Copyright © 2017 Clément Lassieur <clement@lassieur.org>
;;; Copyright © 2017, 2018, 2019 Rutger Helling <rhelling@mykolab.com>
;;; Copyright © 2017 nee <nee-git@hidamari.blue>
@@ -52,7 +52,13 @@
;;; Copyright © 2020 pukkamustard <pukkamustard@posteo.net>
;;; Copyright © 2021 B. Wilson <elaexuotee@wilsonb.com>
;;; Copyright © 2021 Ivan Gankevich <i.gankevich@spbu.ru>
+;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be>
+;;; Copyright © 2021 Guillaume Le Vaillant <glv@posteo.net>
+;;; Copyright © 2021 Sarah Morgensen <iskarian@mgsn.dev>
+;;; Copyright © 2021 Felix Gruber <felgru@posteo.net>
+;;; Copyright © 2021 Josselin Poiret <josselin.poiret@protonmail.ch>
;;; Copyright © 2021 Olivier Dion <olivier.dion@polymtl.ca>
+;;; Copyright © 2021 Solene Rapenne <solene@perso.pw>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -76,6 +82,7 @@
#:use-module (gnu packages algebra)
#:use-module (gnu packages audio)
#:use-module (gnu packages autotools)
+ #:use-module (gnu packages avahi)
#:use-module (gnu packages backup)
#:use-module (gnu packages base)
#:use-module (gnu packages bash)
@@ -144,10 +151,10 @@
#:use-module (gnu packages xdisorg)
#:use-module (gnu packages xorg)
#:use-module (gnu packages groff)
- #:use-module (gnu packages rsync)
#:use-module (gnu packages selinux)
#:use-module (gnu packages swig)
#:use-module (guix build-system cmake)
+ #:use-module (guix build-system copy)
#:use-module (guix build-system gnu)
#:use-module (guix build-system go)
#:use-module (guix build-system meson)
@@ -542,14 +549,12 @@ corresponding UPSTREAM-SOURCE (an origin), using the given DEBLOB-SCRIPTS."
,@(if (version>=? version "4.16")
`(("flex" ,flex)
("bison" ,bison))
- '())
- ,@(if (version>=? version "5.3")
- `(("rsync" ,rsync))
'())))
(arguments
`(#:modules ((guix build gnu-build-system)
(guix build utils)
- (srfi srfi-1))
+ (srfi srfi-1)
+ (ice-9 match))
#:phases
(modify-phases %standard-phases
(delete 'configure)
@@ -560,32 +565,37 @@ corresponding UPSTREAM-SOURCE (an origin), using the given DEBLOB-SCRIPTS."
(%current-system))))
(defconfig ,(system->defconfig
(or (%current-target-system)
- (%current-system)))))
+ (%current-system))))
+ (make-target ,(if (version>=? version "5.3")
+ "headers"
+ "headers_check")))
(setenv "ARCH" arch)
(format #t "`ARCH' set to `~a'~%" (getenv "ARCH"))
(invoke "make" defconfig)
- (invoke "make" "mrproper" "headers_check"))))
+ (invoke "make" "mrproper" make-target))))
(replace 'install
(lambda* (#:key outputs #:allow-other-keys)
(let ((out (assoc-ref outputs "out")))
- (invoke "make"
- (string-append "INSTALL_HDR_PATH=" out)
- "headers_install")
+
+ ;; Mimic the quiet_cmd_headers_install target to avoid a
+ ;; dependency on rsync.
+ (for-each (lambda (file)
+ (let ((destination (string-append
+ out "/include/"
+ ;; Drop the 'usr/include' prefix.
+ (match (string-split file #\/)
+ ((_ _ path ...)
+ (string-join path "/"))))))
+ (format #t "`~a' -> `~a'~%" file destination)
+ (install-file file (dirname destination))))
+ (find-files "usr/include" "\\.h$"))
(mkdir (string-append out "/include/config"))
(call-with-output-file
(string-append out
"/include/config/kernel.release")
(lambda (p)
- (format p "~a-default~%" ,version)))
-
- ;; Remove the '.install' and '..install.cmd' files; the
- ;; latter contains store paths, which pulls in bootstrap
- ;; binaries in the build environment, and prevents bit
- ;; reproducibility for the bootstrap binaries.
- (for-each delete-file (find-files out "\\.install"))
-
- #t))))
+ (format p "~a-default~%" ,version)))))))
#:allowed-references ()
#:tests? #f))
(home-page "https://www.gnu.org/software/linux-libre/")
@@ -630,11 +640,11 @@ corresponding UPSTREAM-SOURCE (an origin), using the given DEBLOB-SCRIPTS."
;; The following package is used in the early bootstrap, and thus must be kept
;; stable and with minimal build requirements.
-(define-public linux-libre-headers-5.4.20
- (make-linux-libre-headers "5.4.20" "gnu"
- "1qxhf6dmcwjblzx8fgn6vr10p38xw10iwh6d1y1v1mxb25y30b47"))
+(define-public linux-libre-headers-5.10.35
+ (make-linux-libre-headers "5.10.35" "gnu"
+ "0q2rnchad55d49f3rajrkazz0fcjv1irwrdb1hwjnl01fzm2gjk3"))
-(define-public linux-libre-headers linux-libre-headers-5.4.20)
+(define-public linux-libre-headers linux-libre-headers-5.10.35)
;;;
@@ -804,15 +814,18 @@ for ARCH and optionally VARIANT, or #f if there is no such configuration."
(add-after 'unpack 'patch-/bin/pwd
(lambda _
(substitute* (find-files "." "^Makefile(\\.include)?$")
- (("/bin/pwd") "pwd"))
- #t))
+ (("/bin/pwd") "pwd"))))
(replace 'configure
(lambda* (#:key inputs native-inputs target #:allow-other-keys)
- ;; Avoid introducing timestamps
+ ;; Avoid introducing timestamps.
(setenv "KCONFIG_NOTIMESTAMP" "1")
(setenv "KBUILD_BUILD_TIMESTAMP" (getenv "SOURCE_DATE_EPOCH"))
- ;; Set ARCH and CROSS_COMPILE
+ ;; Other variables useful for reproducibility.
+ (setenv "KBUILD_BUILD_USER" "guix")
+ (setenv "KBUILD_BUILD_HOST" "guix")
+
+ ;; Set ARCH and CROSS_COMPILE.
(let ((arch ,(system->linux-architecture
(or (%current-target-system)
(%current-system)))))
@@ -883,8 +896,7 @@ for ARCH and optionally VARIANT, or #f if there is no such configuration."
(false-if-file-not-found
(delete-file (string-append moddir "/" version "/build")))
(false-if-file-not-found
- (delete-file (string-append moddir "/" version "/source"))))
- #t))))
+ (delete-file (string-append moddir "/" version "/source"))))))))
#:tests? #f))
(home-page "https://www.gnu.org/software/linux-libre/")
(synopsis "100% free redistribution of a cleaned Linux kernel")
@@ -1805,7 +1817,7 @@ providing the system administrator with some help in common tasks.")
(define-public util-linux
(package
(name "util-linux")
- (version "2.35.1")
+ (version "2.37.1")
(source (origin
(method url-fetch)
(uri (string-append "mirror://kernel.org/linux/utils/"
@@ -1813,7 +1825,7 @@ providing the system administrator with some help in common tasks.")
"util-linux-" version ".tar.xz"))
(sha256
(base32
- "1yfpy6bkab4jw61mpx48gfy24yrqp4a7arvpis8csrkk53fkxpnr"))
+ "0xkb7vw2040zi4m0sbhs5qn5l8nrq4xsf4sdxf3cy9mpachd8jwf"))
(patches (search-patches "util-linux-tests.patch"))
(modules '((guix build utils)))
(snippet
@@ -1831,7 +1843,10 @@ providing the system administrator with some help in common tasks.")
"static")) ;2.9 MiB static .a libraries
(arguments
`(#:configure-flags (list "--disable-use-tty-group"
- "--enable-fs-paths-default=/run/current-system/profile/sbin"
+ (string-append
+ "--enable-fs-paths-default="
+ "/run/setuid-programs"
+ ":/run/current-system/profile/sbin")
;; Don't try to chown root:root mount and umount
"--disable-makeinstall-chown"
"--localstatedir=/var"
@@ -1857,44 +1872,45 @@ providing the system administrator with some help in common tasks.")
;; libraries below $exec_prefix when $libdir does not
;; match any of the "usual" locations. Fix that.
(("usrlib_execdir='\\$\\{exec_prefix\\}'\\$libdir")
- "usrlib_execdir=$libdir"))
- #t))
+ "usrlib_execdir=$libdir"))))
(add-before 'build 'set-umount-file-name
(lambda* (#:key outputs #:allow-other-keys)
;; Tell 'eject' the right file name of 'umount'.
(let ((out (assoc-ref outputs "out")))
(substitute* "sys-utils/eject.c"
(("\"/bin/umount\"")
- (string-append "\"" out "/bin/umount\"")))
- #t)))
+ (string-append "\"" out "/bin/umount\""))))))
(add-before 'check 'pre-check
- (lambda* (#:key inputs outputs #:allow-other-keys)
- (let ((out (assoc-ref outputs "out"))
- (net (assoc-ref inputs "net-base")))
+ (lambda* (#:key native-inputs inputs #:allow-other-keys)
+ (let ((services (search-input-file (or native-inputs inputs)
+ "etc/services")))
;; Change the test to refer to the right file.
(substitute* "tests/ts/misc/mcookie"
(("/etc/services")
- (string-append net "/etc/services")))
+ services))
;; The C.UTF-8 locale does not exist in our libc.
(substitute* "tests/ts/column/invalid-multibyte"
- (("C\\.UTF-8") "en_US.utf8"))
- #t)))
- ;; TODO: Remove the conditional on the next rebuild cycle.
- ,@(if (string-prefix? "arm" (%current-system))
- '((add-before 'check 'disable-setarch-test
- (lambda _
- ;; The setarch tests are unreliable in QEMU's
- ;; user-mode emulation, which is our primary
- ;; method of building ARMv7 packages.
- ;; <https://github.com/karelzak/util-linux/issues/601>
- (substitute* "tests/ts/misc/setarch"
- (("ts_init_subtest.*" all)
- (string-append
- all "\n"
- "ts_skip \"setarch tests are unreliable under QEMU\"")))
- #t)))
- '())
+ (("C\\.UTF-8") "en_US.utf8")))))
+ (add-before 'check 'disable-setarch-test
+ (lambda _
+ ;; The setarch tests are unreliable in QEMU's user-mode
+ ;; emulation, which is our primary method of building
+ ;; ARMv7 packages. See
+ ;; <https://github.com/karelzak/util-linux/issues/601>.
+ (substitute* "tests/ts/misc/setarch"
+ (("ts_init_subtest.*" all)
+ (string-append
+ all "\n"
+ "ts_skip \"setarch tests are unreliable under QEMU\"")))))
+ (add-before 'check 'disable-lsns-test
+ (lambda _
+ ;; The lsns tests can fail due to ioctl(_, NS_GET_USERNS)
+ ;; returning ENOTTY, indicating this kernel does not
+ ;; support user namespaces. Curiously, this test can fail
+ ;; on i686 even if the same test passes on x86_64 on the
+ ;; same machine. See <https://issues.guix.gnu.org/49933>.
+ (delete-file "tests/ts/lsns/ioctl_ns")))
(add-after 'install 'move-static-libraries
(lambda* (#:key outputs #:allow-other-keys)
(let ((lib (assoc-ref outputs "lib"))
@@ -1913,9 +1929,7 @@ providing the system administrator with some help in common tasks.")
;; files so that Libtool does the right thing when both
;; the shared and static library is available.
(substitute* (find-files "lib" "\\.la$")
- (("old_library=.*") "old_library=''\n")))
-
- #t)))
+ (("old_library=.*") "old_library=''\n"))))))
(add-after 'install 'adjust-pkg-config-files
(lambda* (#:key outputs #:allow-other-keys)
(let ((lib (assoc-ref outputs "lib")))
@@ -1923,18 +1937,14 @@ providing the system administrator with some help in common tasks.")
;; the pkg-config files to avoid a cyclic reference on "out".
(substitute* (find-files (string-append lib "/lib/pkgconfig")
"\\.pc$")
- (("^(exec_)?prefix=.*") "")))
- #t)))))
- (inputs `(("zlib" ,zlib)
- ("ncurses" ,ncurses)
-
- ;; XXX: This is so that the 'pre-check' phase can find it.
- ,@(if (%current-target-system)
- `(("net-base" ,net-base))
- '())))
+ (("^(exec_)?prefix=.*") ""))))))))
+ (inputs
+ (list file ;for libmagic
+ ncurses
+ zlib))
(native-inputs
- `(("perl" ,perl)
- ("net-base" ,net-base))) ;for tests
+ (list net-base ;for tests
+ perl))
(home-page "https://www.kernel.org/pub/linux/utils/util-linux/")
(synopsis "Collection of utilities for the Linux kernel")
(description "Util-linux is a diverse collection of Linux kernel
@@ -2163,7 +2173,7 @@ module.")
(define-public e2fsprogs
(package
(name "e2fsprogs")
- (version "1.45.6")
+ (version "1.46.4")
(source (origin
(method url-fetch)
(uri (string-append
@@ -2172,7 +2182,7 @@ module.")
"e2fsprogs-" version ".tar.xz"))
(sha256
(base32
- "0mj2yizwygs7xww8jfy5mxjn8ww4pvc0b1hg1p2vsnirailsx9zz"))))
+ "04wp77fg842dhribgn0xvbd77idh0n7a839ga4bwy78v7i9l445i"))))
(build-system gnu-build-system)
(inputs `(("util-linux" ,util-linux "lib")))
(native-inputs `(("pkg-config" ,pkg-config)
@@ -2214,8 +2224,7 @@ module.")
"INSTALL_SYMLINK = sh"))
(substitute* (find-files "." "^Makefile.in$")
(("#!/bin/sh")
- (string-append "#!" (which "sh"))))
- #t))
+ (string-append "#!" (which "sh"))))))
(add-after 'install 'install-libs
(lambda* (#:key outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))
@@ -2230,8 +2239,7 @@ module.")
(let ((archives (find-files lib "\\.a$")))
(for-each (lambda (file)
(chmod file #o666))
- archives))
- #t))))))
+ archives))))))))
(home-page "http://e2fsprogs.sourceforge.net/")
(synopsis "Creating and checking ext2/ext3/ext4 file systems")
(description
@@ -2267,8 +2275,7 @@ module.")
(ice-9 ftw)
(srfi srfi-26))
- (let ((e2fsck (string-append (assoc-ref %build-inputs "e2fsprogs")
- "/sbin/e2fsck"))
+ (let ((e2fsck (search-input-file %build-inputs "/sbin/e2fsck"))
(bin (string-append (assoc-ref %outputs "out") "/sbin")))
(mkdir-p bin)
(with-directory-excursion bin
@@ -2343,7 +2350,7 @@ Zerofree requires the file system to be unmounted or mounted read-only.")
(define-public strace
(package
(name "strace")
- (version "5.8")
+ (version "5.13")
(home-page "https://strace.io")
(source (origin
(method url-fetch)
@@ -2351,23 +2358,28 @@ Zerofree requires the file system to be unmounted or mounted read-only.")
"/strace-" version ".tar.xz"))
(sha256
(base32
- "1abs3svkg9985f4jrxx34sj1dcpsf95vv1a0g01c777zgygncjnz"))))
+ "0mmns22bjjvakxj29si0x4dcylcgy26llpcimkb0llcxif439k2s"))
+ (patches (search-patches "strace-readlink-tests.patch"))))
(build-system gnu-build-system)
(arguments
'(#:phases
(modify-phases %standard-phases
(add-after 'unpack 'patch-/bin/sh
(lambda _
- (substitute* "strace.c"
+ (substitute* "src/strace.c"
(("/bin/sh") (which "sh")))
#t))
(add-after 'unpack 'disable-failing-tests
(lambda _
- ;; XXX These hang forever even if the test time-out is extended.
(substitute* "tests/Makefile.in"
- (("^\tstrace-DD?D?\\.test \\\\.*") ""))
+ ;; XXX: These hang forever even if the test time-out is
+ ;; extended.
+ (("^\tstrace-DD?D?\\.test \\\\.*") "")
+ (("^\tpidns-cache.test \\\\.*") "")
+ (("^\t.*--pidns-translation.test \\\\.*") ""))
#t)))
- ;; Don't fail if the architecture doesn't support different personalities.
+ ;; Don't fail if the architecture doesn't support different
+ ;; personalities.
#:configure-flags '("--enable-mpers=check")
;; See <https://debbugs.gnu.org/cgi/bugreport.cgi?bug=32459>.
#:parallel-tests? #f)) ; undeterministic failures
@@ -2402,24 +2414,96 @@ an executed process and the signals received by that process. It can also
intercept and print the system calls executed by the program.")
(license license:gpl2+)))
+(define-public alsa-ucm-conf
+ (package
+ (name "alsa-ucm-conf")
+ (version "1.2.4")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append
+ "ftp://ftp.alsa-project.org/pub/lib/" name "-"
+ version ".tar.bz2"))
+ (sha256
+ (base32
+ "0h6kzi1cfdqyxp4pwpqh5wb89c8s9wrgix315bvamffwfxf56frc"))))
+ (build-system copy-build-system)
+ (arguments
+ '(#:install-plan
+ '(("ucm" "share/alsa/ucm")
+ ("ucm2" "share/alsa/ucm2"))))
+ (home-page "https://www.alsa-project.org/wiki/Main_Page")
+ (synopsis "The Advanced Linux Sound Architecture Use Case Manager")
+ (description
+ "This package contains Advanced Linux Sound Architecture Use Case Manager
+configuration of audio input/output names and routing for specific audio
+hardware.")
+ (license license:bsd-3)))
+
+(define-public alsa-topology-conf
+ (package
+ (name "alsa-topology-conf")
+ (version "1.2.4")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append
+ "ftp://ftp.alsa-project.org/pub/lib/" name "-"
+ version ".tar.bz2"))
+ (sha256
+ (base32
+ "01zdg6q4s6d01k39z96wi4vbhrfw1i2g4yi5dijwfk6a5vjfdq2m"))))
+ (build-system copy-build-system)
+ (arguments
+ '(#:install-plan
+ '(("topology" "share/alsa/topology"))))
+ (home-page "https://www.alsa-project.org/wiki/Main_Page")
+ (synopsis "The Advanced Linux Sound Architecture libraries")
+ (description
+ "This package contains Advanced Linux Sound Architecture topology
+configuration files that can be used for specific audio hardware.")
+ (license license:bsd-3)))
+
(define-public alsa-lib
(package
(name "alsa-lib")
(version "1.2.4")
(source (origin
- (method url-fetch)
- (uri (string-append
- "ftp://ftp.alsa-project.org/pub/lib/alsa-lib-"
- version ".tar.bz2"))
- (sha256
- (base32
- "1xq8d48wfy59qw4x7383j32n8j5njndw5hcgnmlg9pvclphlnmgp"))))
+ (method url-fetch)
+ (uri (string-append
+ "ftp://ftp.alsa-project.org/pub/lib/alsa-lib-"
+ version ".tar.bz2"))
+ (sha256
+ (base32
+ "1xq8d48wfy59qw4x7383j32n8j5njndw5hcgnmlg9pvclphlnmgp"))))
(build-system gnu-build-system)
(arguments
'(#:configure-flags (list (string-append "LDFLAGS=-Wl,-rpath="
(assoc-ref %outputs "out")
- "/lib"))))
- (home-page "https://www.alsa-project.org/")
+ "/lib"))
+ #:phases
+ (modify-phases %standard-phases
+ (add-before 'install 'pre-install
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (let* ((ucm
+ (string-append (assoc-ref inputs "alsa-ucm-conf")))
+ (topology
+ (string-append (assoc-ref inputs "alsa-topology-conf")))
+ (alsa
+ (string-append (assoc-ref outputs "out") "/share/alsa"))
+ (ucm-share
+ (string-append ucm "/share/alsa/ucm"))
+ (ucm2-share
+ (string-append ucm "/share/alsa/ucm2"))
+ (topology-share
+ (string-append topology "/share/alsa/topology")))
+ (mkdir-p alsa)
+ (symlink ucm-share (string-append alsa "/ucm"))
+ (symlink ucm2-share (string-append alsa "/ucm2"))
+ (symlink topology-share (string-append alsa "/topology")))
+ #t)))))
+ (inputs
+ `(("alsa-ucm-conf" ,alsa-ucm-conf)
+ ("alsa-topology-conf" ,alsa-topology-conf)))
+ (home-page "https://www.alsa-project.org/wiki/Main_Page")
(synopsis "The Advanced Linux Sound Architecture libraries")
(description
"The Advanced Linux Sound Architecture (ALSA) provides audio and
@@ -2572,7 +2656,7 @@ external rate conversion.")
("bison" ,bison)))
(inputs
`(("libmnl" ,libmnl)
- ("libnftnl" ,libnftnl)))
+ ("libnftnl" ,libnftnl/fixed)))
(arguments
'(#:tests? #f ; no test suite
#:configure-flags ; add $libdir to the RUNPATH of executables
@@ -2831,10 +2915,10 @@ network hardware types (plipconfig, slattach) and advanced aspects of IP
configuration (iptunnel, ipmaddr).")
(license license:gpl2+))))
-(define-public libcap-2.31
+(define-public libcap
(package
(name "libcap")
- (version "2.31")
+ (version "2.51")
(source (origin
(method url-fetch)
(uri (string-append
@@ -2842,23 +2926,34 @@ configuration (iptunnel, ipmaddr).")
"libcap2/libcap-" version ".tar.xz"))
(sha256
(base32
- "0ikwm0kngrqa4ci80lqnrkk17kg09q7dxrz28y0gm5qw3vj8s266"))))
- (build-system gnu-build-system)
- (arguments '(#:phases
- (modify-phases %standard-phases
- (replace 'configure
- ;; Add $libdir to the RUNPATH of executables.
- (lambda _
- (substitute* "Make.Rules"
- (("LDFLAGS := #-g")
- (string-append "LDFLAGS := -Wl,-rpath="
- %output "/lib")))
- #t)))
+ "1ych13qc1mvzv8iscbims5b317vxcmy5ffpmfy98zk7bgamz62b6"))))
+ (build-system gnu-build-system)
+ (arguments `(#:phases
+ ,#~(modify-phases %standard-phases
+ (replace 'configure
+ ;; Add $libdir to the RUNPATH of executables.
+ (lambda _
+ (substitute* "Make.Rules"
+ (("LDFLAGS \\?= #-g")
+ (string-append "LDFLAGS ?= -Wl,-rpath="
+ ;; TODO(core-updates): Use #$output
+ ;; unconditionally.
+ #$(if (%current-target-system)
+ #~#$output
+ '%output)
+ "/lib"))))))
#:test-target "test"
- #:make-flags (list "lib=lib"
- (string-append "prefix="
- (assoc-ref %outputs "out"))
- "RAISE_SETFCAP=no")))
+ #:make-flags
+ (list "lib=lib"
+ (string-append "prefix=" (assoc-ref %outputs "out"))
+ "RAISE_SETFCAP=no"
+ ;; Tell the makefile to use TARGET-gcc and friends
+ ;; when cross-compiling.
+ ,@(if (%current-target-system)
+ `(,(string-append "CROSS_COMPILE="
+ (%current-target-system) "-")
+ "BUILD_CC=gcc")
+ '()))))
(native-inputs `(("perl" ,perl)))
(supported-systems (delete "i586-gnu" %supported-systems))
(home-page "https://sites.google.com/site/fullycapable/")
@@ -2870,37 +2965,6 @@ Linux-based operating systems.")
;; License is BSD-3 or GPLv2, at the user's choice.
(license license:gpl2)))
-;; libcap 2.31 has problems with newer kernels, so provide this newer variant.
-;; Keep the old libcap around to avoid rebuilding 'coreutils' and 'avahi'.
-;; To be merged with libcap on the next rebuild cycle.
-(define-public libcap
- (package
- (inherit libcap-2.31)
- (version "2.45")
- (source (origin
- (method url-fetch)
- (uri (string-append
- "mirror://kernel.org/linux/libs/security/linux-privs/"
- "libcap2/libcap-" version ".tar.xz"))
- (sha256
- (base32
- "11ijmi7jik9iw6pdszc6bylhggghr8cza03bcrbhbqf0cpvkjrnn"))))
- (arguments
- (substitute-keyword-arguments (package-arguments libcap-2.31)
- ((#:phases phases)
- `(modify-phases ,phases
- (replace 'configure
- (lambda _
- ;; Add $libdir to the RUNPATH of executables.
- (substitute* "Make.Rules"
- (("LDFLAGS \\?= #-g")
- (string-append "LDFLAGS ?= -Wl,-rpath="
- %output "/lib")))
- #t))))))))
-
-(define-deprecated libcap/next libcap)
-(export libcap/next)
-
(define-public bridge-utils
(package
(name "bridge-utils")
@@ -3126,6 +3190,9 @@ settings.")
(base32
"0a8fwyxnc5qdxff8sl2sfsbnvgh6pkij4yafiln0fxgg6bal7knj"))))
(build-system gnu-build-system)
+ (arguments
+ ;; Allow compilation with GCC 10.
+ '(#:configure-flags '("CFLAGS=-O2 -g -fcommon")))
(inputs `(("ncurses" ,ncurses)))
(home-page "http://www.jpj.net/~trevor/aumix.html")
(synopsis "Audio mixer for X and the console")
@@ -3202,11 +3269,12 @@ processes currently causing I/O.")
;; it refers to the right ones.
(substitute* '("lib/mount_util.c" "util/mount_util.c")
(("/bin/(u?)mount" _ maybe-u)
- (string-append (assoc-ref inputs "util-linux")
- "/bin/" maybe-u "mount")))
- (substitute* "util/mount.fuse.c"
- (("/bin/sh" command)
- (string-append (assoc-ref inputs "bash-minimal") command)))
+ (search-input-file inputs
+ (string-append "bin/"
+ maybe-u "mount"))))
+ (substitute* '("util/mount.fuse.c")
+ (("/bin/sh")
+ (search-input-file inputs "/bin/sh")))
;; This hack leads libfuse to search for 'fusermount' in
;; $PATH, where it may find a setuid-root binary, instead of
@@ -3228,6 +3296,66 @@ user-space processes.")
(license (list license:lgpl2.1 ;library
license:gpl2+)))) ;command-line utilities
+(define-public fuse-3
+ (package
+ (inherit fuse)
+ (name "fuse")
+ (version "3.10.5")
+ (source (origin
+ (method url-fetch)
+ (uri
+ (string-append "https://github.com/libfuse/libfuse/releases/"
+ "download/fuse-" version
+ "/fuse-" version ".tar.xz"))
+ (sha256
+ (base32
+ "0rlnnsiw614qcmgy8xz67044gqc1pbvvf2yxjv44lh27bm487qmj"))))
+ (build-system meson-build-system)
+ (arguments
+ `(#:configure-flags
+ ,#~(list
+ (string-append "-Dudevrulesdir=" #$output "/udev/rules.d")
+ "-Duseroot=false")
+ #:tests? #f
+ #:phases
+ ,#~(modify-phases %standard-phases
+ (add-after 'unpack 'set-file-names
+ (lambda* (#:key inputs #:allow-other-keys)
+ ;; libfuse calls out to mount(8) and umount(8). Make sure
+ ;; it refers to the right ones.
+ (substitute* '("lib/mount_util.c")
+ (("/bin/(u?)mount" _ maybe-u)
+ (search-input-file inputs
+ (string-append "bin/"
+ maybe-u "mount"))))
+ (substitute* '("util/mount.fuse.c")
+ (("/bin/sh")
+ (search-input-file inputs "/bin/sh")))
+
+ ;; This hack leads libfuse to search for 'fusermount' in
+ ;; $PATH, where it may find a setuid-root binary, instead of
+ ;; trying solely $out/sbin/fusermount and failing because
+ ;; it's not setuid.
+ (substitute* "lib/meson.build"
+ (("-DFUSERMOUNT_DIR=[[:graph:]]+")
+ "-DFUSERMOUNT_DIR=\"/var/empty\"'"))))
+ (add-after 'unpack 'fix-install
+ (lambda* (#:key inputs #:allow-other-keys)
+ (substitute* '("util/meson.build")
+ (("install_helper.sh") "true"))
+ (substitute* '("util/meson.build")
+ (("fuseconf_path = .*")
+ "fuseconf_path = '/etc/fuse.conf'"))))
+ (add-before 'configure 'set-paths
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (let ((dummy-init.d
+ (string-append (getcwd) "/etc/init.d")))
+ (setenv "MOUNT_FUSE_PATH"
+ (string-append #$output "/sbin"))
+ (setenv "UDEV_RULES_PATH"
+ (string-append #$output
+ "/lib/udev/rules.d"))))))))))
+
(define-public unionfs-fuse
(package
(name "unionfs-fuse")
@@ -3568,7 +3696,7 @@ to use Linux' inotify mechanism, which allows file accesses to be monitored.")
(define-public kmod
(package
(name "kmod")
- (version "27")
+ (version "29")
(source (origin
(method url-fetch)
(uri
@@ -3576,16 +3704,19 @@ to use Linux' inotify mechanism, which allows file accesses to be monitored.")
"kmod-" version ".tar.xz"))
(sha256
(base32
- "035wzfzjx4nwidk747p8n085mgkvy531ppn16krrajx2dkqzply1"))
+ "0am54mi5rk72g5q7k6l6f36gw3r9vwgjmyna43ywcjhqmakyx00b"))
(patches (search-patches "kmod-module-directory.patch"))))
(build-system gnu-build-system)
(native-inputs
- `(("pkg-config" ,pkg-config)))
+ `(("pkg-config" ,pkg-config)
+ ;; For tests.
+ ("zstd" ,zstd)))
(inputs
`(("xz" ,xz)
- ("zlib" ,zlib)))
+ ("zlib" ,zlib)
+ ("zstd-lib" ,zstd "lib")))
(arguments
- `(#:configure-flags '("--with-xz" "--with-zlib"
+ `(#:configure-flags '("--with-xz" "--with-zlib" "--with-zstd"
"--disable-test-modules")
#:phases
(modify-phases %standard-phases
@@ -4290,27 +4421,28 @@ country-specific regulations for the wireless spectrum.")
(substitute* '("prog/pwm/pwmconfig"
"prog/pwm/fancontrol")
(("gnuplot")
- (string-append (assoc-ref inputs "gnuplot")
- "/bin/gnuplot"))
+ (search-input-file inputs "/bin/gnuplot"))
(("cat ")
- (string-append (assoc-ref inputs "coreutils")
- "/bin/cat "))
+ (string-append (search-input-file inputs "/bin/cat")
+ " "))
(("e?grep " match)
- (string-append (assoc-ref inputs "grep")
- "/bin/" match))
+ (string-append (search-input-file inputs
+ (string-append
+ "/bin/"
+ (string-trim-right match)))
+ " "))
(("sed -e")
- (string-append (assoc-ref inputs "sed")
- "/bin/sed -e"))
+ (string-append (search-input-file inputs "/bin/sed")
+ " -e"))
(("cut -d")
- (string-append (assoc-ref inputs "coreutils")
- "/bin/cut -d"))
+ (string-append (search-input-file inputs "/bin/cut")
+ " -d"))
(("sleep ")
- (string-append (assoc-ref inputs "coreutils")
- "/bin/sleep "))
+ (string-append (search-input-file inputs "/bin/sleep")
+ " "))
(("readlink -f")
- (string-append (assoc-ref inputs "coreutils")
- "/bin/readlink -f")))
- #t)))))
+ (string-append (search-input-file inputs "/bin/readlink")
+ " -f"))))))))
(home-page "https://hwmon.wiki.kernel.org/lm_sensors")
(synopsis "Utilities to read temperature/voltage/fan sensors")
(description
@@ -5149,7 +5281,7 @@ Bluetooth audio output devices like headphones or loudspeakers.")
(define-public bluez
(package
(name "bluez")
- (version "5.55")
+ (version "5.61")
(source (origin
(method url-fetch)
(uri (string-append
@@ -5157,7 +5289,7 @@ Bluetooth audio output devices like headphones or loudspeakers.")
version ".tar.xz"))
(sha256
(base32
- "124v9s4y1s7s6klx5vlmzpk1jlr4x84ch7r7scm7x2f42dqp2qw8"))))
+ "0fs2kjsdhylxniqhii63i85fjszbqbz3iddwmgz4nmbr472xdbw3"))))
(build-system gnu-build-system)
(arguments
`(#:configure-flags
@@ -5198,10 +5330,11 @@ Bluetooth audio output devices like headphones or loudspeakers.")
(("hid2hci --method")
(string-append out "/lib/udev/hid2hci --method"))
(("/sbin/udevadm")
- (string-append (assoc-ref inputs "eudev") "/bin/udevadm")))
+ (search-input-file inputs "/bin/udevadm")))
#t))))))
(native-inputs
`(("pkg-config" ,pkg-config)
+ ("rst2man" ,python-docutils)
("gettext" ,gettext-minimal)))
(inputs
`(("glib" ,glib)
@@ -5520,7 +5653,8 @@ obviously it can be shared with files outside our set).")
(build-system gnu-build-system)
(arguments
- `(#:phases
+ `(#:configure-flags '("CFLAGS=-fcommon")
+ #:phases
(modify-phases %standard-phases
(add-after 'install 'install-headers
(lambda* (#:key outputs #:allow-other-keys)
@@ -5899,6 +6033,7 @@ invocations of itself.")
(native-inputs `(("pkg-config" ,pkg-config)))
(arguments
'(#:configure-flags (list "--disable-static"
+ "--disable-ldconfig" ;not necessary
"--exec-prefix=${prefix}"
"--with-fuse=external" ;use our own FUSE
"--enable-mount-helper"
@@ -6660,7 +6795,8 @@ monitoring tools for Linux. These include @code{mpstat}, @code{iostat},
(file-name (git-file-name name version))))
(build-system gnu-build-system)
(arguments
- `(#:phases
+ `(#:configure-flags '("CFLAGS=-fcommon")
+ #:phases
(modify-phases %standard-phases
(add-after 'unpack 'patch-udev-rules-absolute-path-bins
(lambda* (#:key inputs #:allow-other-keys)
@@ -6938,6 +7074,24 @@ libnftnl has been previously known as libnftables. This library is currently
used by nftables.")
(license license:gpl2+)))
+;; This is used in iptables, which contributes to rust. We're pinning this
+;; variant to avoid accidental rebuilds of rust.
+(define-public libnftnl/fixed
+ (package (inherit libnftnl)
+ (version "1.2.0")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "mirror://netfilter.org/libnftnl/"
+ "libnftnl-" version ".tar.bz2"))
+ (sha256
+ (base32 "1xblq1cbcxhr6qmjpy98i1qdza148idgz99vbhjc7s4vzvfizc4h"))))
+ (build-system gnu-build-system)
+ (native-inputs
+ `(("pkg-config" ,pkg-config)))
+ (inputs
+ `(("libmnl" ,libmnl)))))
+
(define-public nftables
(package
(name "nftables")
@@ -7296,6 +7450,11 @@ libraries, which are often integrated directly into libfabric.")
(arguments
'(#:make-flags `("PSM_USE_SYS_UUID=1" "CC=gcc" "WERROR="
,(string-append "INSTALL_PREFIX=" %output)
+ ,(string-append "CFLAGS=-Wall -fpic -fPIC -D_GNU_SOURCE"
+ " -funwind-tables -O3 -g3"
+ " -DPSM_USE_SYS_UUID"
+ " -Wno-strict-aliasing -DNVALGRIND"
+ " -fcommon")
,(string-append "LDFLAGS=-Wl,-rpath=" %output "/lib"))
#:tests? #f
#:phases (modify-phases %standard-phases
@@ -7922,34 +8081,42 @@ without using the archiver.")
(license license:gpl3+)))
(define-public fakechroot
- (package
- (name "fakechroot")
- (version "2.20.1")
- (source (origin
- (method url-fetch)
- (uri (string-append
- "https://github.com/dex4er/fakechroot/releases/download/"
- version "/fakechroot-" version ".tar.gz"))
- (sha256
- (base32
- "1aijkd0b45wav25v01qhw8zxwa3pl0nnp9fabmmy1nlx7hr09gas"))))
- (build-system gnu-build-system)
- (arguments
- ;; XXX: The tests heavily assume they run on an FHS system so for now
- ;; skip them.
- '(#:tests? #f
- #:configure-flags '("--disable-static")))
- (synopsis "Emulate @code{chroot} by overriding file system calls")
- (description
- "@command{fakechroot} runs a command in an environment were is additional
+ ;; XXX: Build from the change submitted at
+ ;; <https://github.com/dex4er/fakechroot/pull/85> to allow compilation
+ ;; against glibc 2.33. Switch back to the official repository on the next
+ ;; release.
+ (let ((commit "e7c1f3a446e594a4d0cce5f5d499c9439ce1d5c5")
+ (revision "0"))
+ (package
+ (name "fakechroot")
+ (version (git-version "2.20.1" revision commit))
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/lipnitsk/fakechroot")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0gac6a6djx3nf343vd33sr5qqngz8ss3aij54zl8x9wb47pc11kb"))))
+ (build-system gnu-build-system)
+ (arguments
+ ;; XXX: The tests heavily assume they run on an FHS system so for now
+ ;; skip them.
+ '(#:tests? #f
+ #:configure-flags '("--disable-static")))
+ (native-inputs (list autoconf automake libtool perl))
+ (synopsis "Emulate @code{chroot} by overriding file system calls")
+ (description
+ "@command{fakechroot} runs a command in an environment were is additional
possibility to use @code{chroot} command without root privileges. This is
useful for allowing users to create own chrooted environment with possibility
to install another packages without need for root privileges.
It works by providing @file{libfakechroot.so}, a shared library meant to be
set as @code{LD_PRELOAD} to override the C library file system functions.")
- (home-page "https://github.com/dex4er/fakechroot/")
- (license license:lgpl2.1+)))
+ (home-page "https://github.com/dex4er/fakechroot/")
+ (license license:lgpl2.1+))))
(define-public inputattach
(package
@@ -7972,10 +8139,8 @@ set as @code{LD_PRELOAD} to override the C library file system functions.")
(replace 'build
(lambda* (#:key inputs #:allow-other-keys)
(with-directory-excursion "inputattach"
- (invoke (string-append (assoc-ref inputs "gcc")
- "/bin/gcc")
- "-O2" "-o" "inputattach" "inputattach.c"))
- #t))
+ (invoke "gcc" "-O2" "-o" "inputattach"
+ "inputattach.c"))))
(delete 'check)
(replace 'install
(lambda* (#:key outputs #:allow-other-keys)
@@ -8005,7 +8170,8 @@ types and interfaces and translates so that the X server can use them.")
(file-name (git-file-name name version))
(sha256
(base32
- "1q5wrqnhhs6r49p8yvkw1pl0cnsd4rndxy4h5lvdydwgf1civcwc"))))
+ "1q5wrqnhhs6r49p8yvkw1pl0cnsd4rndxy4h5lvdydwgf1civcwc"))
+ (patches (search-patches "pipewire-0.2.7-fno-common.patch"))))
(build-system meson-build-system)
(arguments
'(#:configure-flags '("-Dsystemd=false")))
@@ -8038,7 +8204,7 @@ of Linux application development.")
(package
(inherit pipewire)
(name "pipewire")
- (version "0.3.29")
+ (version "0.3.40")
(source (origin
(method git-fetch)
(uri (git-reference
@@ -8047,20 +8213,23 @@ of Linux application development.")
(file-name (git-file-name name version))
(sha256
(base32
- "16jjxcnahxqfcawz77ywx837ybhwzcivn7hgqb9cmlp1y2syy8gk"))))
+ "1c6gni23l5w3ghwqnfs712kjj6l1825f0ib8a6r2xc1ymr0sx3kr"))))
(arguments
'(#:configure-flags
(list (string-append "-Dudevrulesdir=" (assoc-ref %outputs "out")
"/lib/udev/rules.d")
- "-Dsystemd=disabled")
+ "-Dsystemd=disabled"
+ "-Dsession-managers=[]")
#:phases
(modify-phases %standard-phases
;; Skip shrink-runpath, otherwise validate-runpath fails.
(delete 'shrink-runpath))))
(inputs
(append (package-inputs pipewire)
- `(("bluez" ,bluez)
+ `(("avahi" ,avahi)
+ ("bluez" ,bluez)
("jack" ,jack-2)
+ ("ldacbt" ,ldacbt)
("pulseaudio" ,pulseaudio)
("vulkan-loader" ,vulkan-loader)
("vulkan-headers" ,vulkan-headers))))))
@@ -8266,6 +8435,11 @@ bindings, and the command-line tool @command{babeltrace2}.")
(arguments
;; There are no automated tests.
'(#:tests? #f))
+ ;; This variant of binutils is used for the 64 bit support needed to
+ ;; assemble the `purgatory/arch/i386/compat_x86_64.S' program on i686-linux.
+ (native-inputs (list (make-ld-wrapper "ld-wrapper"
+ #:binutils binutils-next)
+ binutils-next))
(home-page "https://projects.horms.net/projects/kexec/")
(synopsis "Tools for booting directly into different kernels")
(description "This package provides the @code{kexec} program and ancillary
@@ -8415,7 +8589,7 @@ headers.")
(lambda (python-executable)
(format #t "Wrapping: ~A.~%" python-executable)
(wrap-program python-executable
- `("PYTHONPATH" ":" prefix
+ `("GUIX_PYTHONPATH" ":" prefix
(,(string-append lib
"/python"
,(version-major+minor
diff --git a/gnu/packages/lisp-xyz.scm b/gnu/packages/lisp-xyz.scm
index e25d0f5488..1a902842af 100644
--- a/gnu/packages/lisp-xyz.scm
+++ b/gnu/packages/lisp-xyz.scm
@@ -1043,9 +1043,9 @@ antialiased TrueType font rendering using CLX and XRender extension.")
(add-after 'create-asdf-configuration 'build-image
(lambda* (#:key outputs #:allow-other-keys)
(build-image (string-append
- (assoc-ref %outputs "image")
+ (assoc-ref outputs "image")
"/bin/slynk")
- %outputs
+ outputs
#:dependencies '("slynk"
"slynk/arglists"
"slynk/fancy-inspector"
@@ -1778,8 +1778,7 @@ satisfying the test.")
version ".tgz"))
(sha256
(base32
- "06mf8wn95yf5swhmzk4vp0xr4ylfl33dgfknkabbkd8n6jns8gcf"))
- (file-name (string-append "colorize" version "-checkout"))))
+ "06mf8wn95yf5swhmzk4vp0xr4ylfl33dgfknkabbkd8n6jns8gcf"))))
(build-system asdf-build-system/sbcl)
(synopsis "Common Lisp library for encoding text in various web-savvy encodings")
(description
@@ -6973,7 +6972,7 @@ cl-plumbing libraries.")
(lambda* (#:key inputs #:allow-other-keys)
(substitute* "src/lzlib.lisp"
(("liblz\\.so")
- (string-append (assoc-ref inputs "lzlib") "/lib/liblz.so")))
+ (search-input-file inputs "/lib/liblz.so")))
#t)))))
(synopsis "Common Lisp library for lzip (de)compression")
(description
@@ -7128,11 +7127,10 @@ function.")
(lambda* (#:key inputs #:allow-other-keys)
(substitute* "src/init.lisp"
(("libgobject-2\\.0\\.so")
- (string-append (assoc-ref inputs "glib") "/lib/libgobject-2.0.so"))
+ (search-input-file inputs "/lib/libgobject-2.0.so"))
(("libgirepository-1\\.0\\.so")
- (string-append (assoc-ref inputs "gobject-introspection")
- "/lib/libgirepository-1.0.so")))
- #t)))))
+ (search-input-file inputs
+ "/lib/libgirepository-1.0.so"))))))))
(synopsis "Common Lisp bindings to GObject Introspection")
(description
"This library is a bridge between Common Lisp and GObject
@@ -8215,8 +8213,7 @@ sacrificing much in the way of power.")
(lambda* (#:key inputs #:allow-other-keys)
(substitute* "hdf-cffi/hdf-cffi.lisp"
(("/usr/lib/i386-linux-gnu/hdf5/serial/libhdf5.so")
- (string-append (assoc-ref inputs "hdf5")
- "/lib/libhdf5.so")))
+ (search-input-file inputs "/lib/libhdf5.so")))
(substitute* "gsl-cffi/gsl-cffi.lisp"
(("define-foreign-library gsl-cffi" all)
(string-append all " (:unix "
@@ -8546,9 +8543,7 @@ has a small codebase that's easy to understand and use.")
(lambda* (#:key inputs #:allow-other-keys)
(substitute* "lib.lisp"
(("/usr/lib/libuv.so")
- (string-append (assoc-ref inputs "libuv")
- "/lib/libuv.so")))
- #t))
+ (search-input-file inputs "/lib/libuv.so")))))
(add-after 'fix-paths 'fix-system-definition
(lambda _
(substitute* "cl-libuv.asd"
@@ -8606,12 +8601,9 @@ has a small codebase that's easy to understand and use.")
(lambda* (#:key inputs #:allow-other-keys)
(substitute* "src/ssl/package.lisp"
(("libcrypto\\.so")
- (string-append (assoc-ref inputs "openssl")
- "/lib/libcrypto.so"))
+ (search-input-file inputs "/lib/libcrypto.so"))
(("libssl\\.so")
- (string-append (assoc-ref inputs "openssl")
- "/lib/libssl.so")))
- #t)))))
+ (search-input-file inputs "/lib/libssl.so"))))))))
(synopsis "Asynchronous operations for Common Lisp")
(description
"Cl-async is a library for general purpose, non-blocking programming in
@@ -11861,13 +11853,10 @@ and saving 2-dimensional pixel-based images.")
"/share/fonts/truetype/")))
(substitute* "Extensions/fontconfig/src/functions.lisp"
(("libfontconfig\\.so")
- (string-append (assoc-ref inputs "fontconfig")
- "/lib/libfontconfig.so")))
+ (search-input-file inputs "/lib/libfontconfig.so")))
(substitute* "Extensions/harfbuzz/src/functions.lisp"
(("libharfbuzz\\.so")
- (string-append (assoc-ref inputs "harfbuzz")
- "/lib/libharfbuzz.so")))
- #t))
+ (search-input-file inputs "/lib/libharfbuzz.so")))))
(add-after 'unpack 'fix-build
(lambda _
;; The cffi-grovel system does not get loaded automatically,
@@ -13986,9 +13975,7 @@ library are feedforward neural networks trained using backpropagation.")
(lambda* (#:key inputs #:allow-other-keys)
(substitute* "src/libzstd.lisp"
(("libzstd\\.so")
- (string-append (assoc-ref inputs "zstd-lib")
- "/lib/libzstd.so")))
- #t)))))
+ (search-input-file inputs "/lib/libzstd.so"))))))))
(synopsis "Common Lisp library for Zstandard (de)compression")
(description
"This Common Lisp library provides functions for Zstandard
@@ -15214,7 +15201,7 @@ related C functions to get information about the mounted file system.")
(lambda* (#:key inputs #:allow-other-keys)
(substitute* "src/unix/cl-diskspace-list-all-disks-with-df.lisp"
(("grep")
- (string-append (assoc-ref inputs "grep") "/bin/grep")))
+ (search-input-file inputs "/bin/grep")))
(substitute* "src/unix/cl-diskspace-list-all-disks-with-df.lisp"
(("/bin/df")
(which "df")))
@@ -15554,14 +15541,13 @@ compiled foreign library collection.")
(lambda* (#:key inputs #:allow-other-keys)
(substitute* "gl/library.lisp"
(("libGL.so" all)
- (string-append (assoc-ref inputs "mesa") "/lib/" all)))
+ (search-input-file inputs "/lib/libGL.so")))
(substitute* "glu/library.lisp"
(("libGLU.so" all)
- (string-append (assoc-ref inputs "glu") "/lib/" all)))
+ (search-input-file inputs "/lib/libGLU.so")))
(substitute* "glut/library.lisp"
(("libglut.so" all)
- (string-append (assoc-ref inputs "freeglut") "/lib/" all)))
- #t)))))
+ (search-input-file inputs "/lib/libglut.so"))))))))
(inputs
`(("alexandria" ,sbcl-alexandria)
("cffi" ,sbcl-cffi)
@@ -16469,9 +16455,8 @@ Common Lisp.")
(add-after 'unpack 'patch-libev-lib-path
(lambda* (#:key inputs #:allow-other-keys)
(substitute* "src/lev.lisp"
- (("libev.so" all)
- (string-append (assoc-ref inputs "libev")
- "/lib/" all))))))))
+ (("libev.so" _)
+ (search-input-file inputs "/lib/libev.so"))))))))
(inputs
`(("cffi" ,sbcl-cffi)
("libev" ,libev)))
@@ -17046,8 +17031,8 @@ and even allows the generic visualisation of graphs in this format.")
(add-after 'unpack 'patch-glfw-lib-path
(lambda* (#:key inputs #:allow-other-keys)
(substitute* "glfw-bindings.lisp"
- (("libglfw.so.3" all)
- (string-append (assoc-ref inputs "glfw") "/lib/" all))))))))
+ (("libglfw.so.3" _)
+ (search-input-file inputs "/lib/libglfw.so.3"))))))))
(inputs
`(("alexandria" ,sbcl-alexandria)
("cffi" ,sbcl-cffi)
@@ -18449,7 +18434,8 @@ variable portably in Common Lisp.")
(native-inputs
`(("lift" ,sbcl-lift)))
(arguments
- `(#:phases
+ `(#:tests? #f ; FIXME: Tests get stuck indefinitly
+ #:phases
(modify-phases %standard-phases
(add-after 'unpack 'fix-paths
(lambda* (#:key inputs outputs #:allow-other-keys)
diff --git a/gnu/packages/lisp.scm b/gnu/packages/lisp.scm
index 95443a3573..983255e0c5 100644
--- a/gnu/packages/lisp.scm
+++ b/gnu/packages/lisp.scm
@@ -5,7 +5,7 @@
;;; Copyright © 2016 Federico Beffa <beffa@fbengineering.ch>
;;; Copyright © 2016, 2017 Nikita <nikita@n0.is>
;;; Copyright © 2016, 2017 Andy Patterson <ajpatter@uwaterloo.ca>
-;;; Copyright © 2017, 2019 Ricardo Wurmus <rekado@elephly.net>
+;;; Copyright © 2017, 2019, 2020 Ricardo Wurmus <rekado@elephly.net>
;;; Copyright © 2017, 2018, 2019 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2017, 2019–2021 Tobias Geerinckx-Rice <me@tobias.gr>
;;; Copyright © 2018 Benjamin Slade <slade@jnanam.net>
@@ -48,6 +48,7 @@
#:use-module (guix packages)
#:use-module (guix download)
#:use-module (guix git-download)
+ #:use-module (guix gexp)
#:use-module (guix utils)
#:use-module (guix build-system copy)
#:use-module (guix build-system gnu)
@@ -67,20 +68,21 @@
#:use-module (gnu packages gl)
#:use-module (gnu packages glib)
#:use-module (gnu packages groff)
- #:use-module (gnu packages m4)
- #:use-module (gnu packages maths)
- #:use-module (gnu packages multiprecision)
- #:use-module (gnu packages ncurses)
#:use-module (gnu packages libffcall)
#:use-module (gnu packages libffi)
#:use-module (gnu packages libsigsegv)
#:use-module (gnu packages linux)
+ #:use-module (gnu packages m4)
+ #:use-module (gnu packages maths)
+ #:use-module (gnu packages multiprecision)
+ #:use-module (gnu packages ncurses)
+ #:use-module (gnu packages onc-rpc)
#:use-module (gnu packages perl)
#:use-module (gnu packages readline)
#:use-module (gnu packages sdl)
#:use-module (gnu packages tex)
- #:use-module (gnu packages tls)
#:use-module (gnu packages texinfo)
+ #:use-module (gnu packages tls)
#:use-module (gnu packages version-control)
#:use-module (gnu packages xorg)
#:use-module (ice-9 match))
@@ -129,33 +131,52 @@ Definition Facility.")
(license license:expat)))
(define-public gcl
- (let ((commit "d3335e2b3deb63f930eb0328e9b05377744c9512")
- (revision "2")) ;Guix package revision
+ (let ((commit "ff7ef981765cc0efdb4b1db27c292f5c11a72753")
+ (revision "3")) ;Guix package revision
(package
(name "gcl")
- (version (string-append "2.6.12-" revision "."
- (string-take commit 7)))
+ (version (git-version "2.6.12" revision commit))
(source
(origin
(method git-fetch)
(uri (git-reference
(url "https://git.savannah.gnu.org/r/gcl.git")
(commit commit)))
- (file-name (string-append "gcl-" version "-checkout"))
+ (file-name (git-file-name name version))
(sha256
- (base32 "05v86lhvsby05nzvcd3c4k0wljvgdgd0i6arzd2fx1yd67dl6fgj"))))
+ (base32 "0z64fxxcaial2i1s1hms8r095dm1ff3wd8ivwdx894a3yln9c0an"))))
(build-system gnu-build-system)
(arguments
`(#:parallel-build? #f ; The build system seems not to be thread safe.
#:test-target "ansi-tests/test_results"
- #:configure-flags '("--enable-ansi") ; required for use by the maxima package
- #:make-flags (list
- (string-append "GCL_CC=" (assoc-ref %build-inputs "gcc")
- "/bin/gcc")
- (string-append "CC=" (assoc-ref %build-inputs "gcc")
- "/bin/gcc"))
+ #:configure-flags ,#~(list
+ "--enable-ansi" ; required by the maxima package
+ (string-append "CFLAGS=-I"
+ #$(this-package-input "libtirpc")
+ "/include/tirpc")
+ (string-append "LDFLAGS=-L"
+ #$(this-package-input "libtirpc")
+ "/lib")
+ "LIBS=-ltirpc")
+ #:make-flags ,#~(list
+ (string-append "GCL_CC=" #$gcc "/bin/gcc")
+ (string-append "CC="#$gcc "/bin/gcc"))
#:phases
(modify-phases %standard-phases
+ (add-after 'unpack 'realpath-workaround
+ ;; Calls to the realpath function can set errno even if the return
+ ;; value of the function indicates that there is no error, which
+ ;; make massert consider that there was an error.
+ (lambda _
+ (substitute* "gcl/o/main.c"
+ (("massert\\(realpath\\(s,o\\)\\);" all)
+ "massert((realpath(s, o) != NULL) && ((errno = 0) == 0));"))))
+ (add-after 'unpack 'fix-makefile
+ ;; The "final" target doesn't exist.
+ (lambda _
+ (substitute* "gcl/makefile"
+ (("\\$\\(MAKE\\) -C \\$\\(PORTDIR\\) final")
+ "$(MAKE) -C $(PORTDIR)"))))
(add-before 'configure 'pre-conf
(lambda* (#:key inputs #:allow-other-keys)
(chdir "gcl")
@@ -210,7 +231,9 @@ Definition Facility.")
;; https://www.ma.utexas.edu/pipermail/maxima/2008/009769.html
(delete 'strip))))
(inputs
- `(("gmp" ,gmp)
+ `(("bash-minimal" ,bash-minimal)
+ ("gmp" ,gmp)
+ ("libtirpc" ,libtirpc)
("readline" ,readline)))
(native-inputs
`(("m4" ,m4)
@@ -447,7 +470,7 @@ an interpreter, a compiler, a debugger, and much more.")
("ed" ,ed)
("inetutils" ,inetutils) ;for hostname(1)
("texinfo" ,texinfo)
- ("texlive" ,(texlive-union (list texlive-tex-texinfo)))
+ ("texlive" ,(texlive-updmap.cfg (list texlive-tex-texinfo)))
("which" ,which)
("zlib" ,zlib)))
(arguments
@@ -519,10 +542,6 @@ an interpreter, a compiler, a debugger, and much more.")
(("\\(deftest grent\\.[12]" all)
(string-append "#+nil ;disabled by Guix\n" all))))
#t))
- ;; FIXME: the texlive-union insists on regenerating fonts. It stores
- ;; them in HOME, so it needs to be writeable.
- (add-before 'build 'set-HOME
- (lambda _ (setenv "HOME" "/tmp") #t))
(replace 'build
(lambda* (#:key outputs #:allow-other-keys)
(setenv "CC" "gcc")
@@ -1209,12 +1228,11 @@ assembler, PEG) is less than 1MB.")
(modify-phases %standard-phases
(add-before 'install 'fix-utils-path
(lambda* (#:key inputs #:allow-other-keys)
- (let* ((coreutils (string-append (assoc-ref inputs "coreutils") "/bin/"))
- (cat (string-append coreutils "cat"))
- (paste (string-append coreutils "paste"))
- (sort (string-append coreutils "sort"))
- (basename (string-append coreutils "basename"))
- (sed (string-append (assoc-ref inputs "sed") "/bin/sed")))
+ (let* ((cat (search-input-file inputs "/bin/cat"))
+ (paste (search-input-file inputs "/bin/paste"))
+ (sort (search-input-file inputs "/bin/sort"))
+ (basename (search-input-file inputs "/bin/basename"))
+ (sed (search-input-file inputs "/bin/sed")))
(substitute* "lisp-repl-core-dumper"
(("\\$\\(basename") (string-append "$(" basename))
(("\\<cat\\>") cat)
diff --git a/gnu/packages/llvm.scm b/gnu/packages/llvm.scm
index 617dfb6974..6e234035e4 100644
--- a/gnu/packages/llvm.scm
+++ b/gnu/packages/llvm.scm
@@ -16,9 +16,12 @@
;;; Copyright © 2019 Brett Gilio <brettg@gnu.org>
;;; Copyright © 2020 Giacomo Leidi <goodoldpaul@autistici.org>
;;; Copyright © 2020 Jakub Kądziołka <kuba@kadziolka.net>
-;;; Copyright © 2020 Maxim Cournoyer <maxim.cournoyer@gmail.com>
+;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be>
+;;; Copyright © 2020, 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;; Copyright © 2021 Julien Lepiller <julien@lepiller.eu>
;;; Copyright © 2021 Lars-Dominik Braun <lars@6xq.net>
+;;; Copyright © 2021 Guillaume Le Vaillant <glv@posteo.net>
+;;; Copyright © 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -39,6 +42,7 @@
#:use-module (guix packages)
#:use-module ((guix licenses) #:prefix license:)
#:use-module (guix download)
+ #:use-module (guix gexp)
#:use-module (guix git-download)
#:use-module (guix memoization)
#:use-module (guix utils)
@@ -51,7 +55,9 @@
#:use-module (gnu packages base)
#:use-module (gnu packages gcc)
#:use-module (gnu packages bootstrap) ;glibc-dynamic-linker
+ #:use-module (gnu packages check) ;python-lit
#:use-module (gnu packages compression)
+ #:use-module (gnu packages julia) ;julia-patch
#:use-module (gnu packages libedit)
#:use-module (gnu packages libffi)
#:use-module (gnu packages lua)
@@ -64,7 +70,10 @@
#:use-module (gnu packages python)
#:use-module (gnu packages swig)
#:use-module (gnu packages xml)
- #:export (system->llvm-target))
+ #:use-module (srfi srfi-1)
+ #:use-module (ice-9 match)
+ #:export (make-lld-wrapper
+ system->llvm-target))
(define* (system->llvm-target #:optional
(system (or (and=> (%current-target-system)
@@ -492,20 +501,37 @@ output), and Binutils.")
(build-system cmake-build-system)
(outputs '("out" "opt-viewer"))
(native-inputs
- `(("python" ,python)
+ `(("python" ,python-wrapper)
("perl" ,perl)))
(inputs
`(("libffi" ,libffi)))
(propagated-inputs
`(("zlib" ,zlib))) ;to use output from llvm-config
(arguments
- `(#:configure-flags '("-DCMAKE_SKIP_BUILD_RPATH=FALSE"
- "-DCMAKE_BUILD_WITH_INSTALL_RPATH=FALSE"
- "-DBUILD_SHARED_LIBS:BOOL=TRUE"
- "-DLLVM_ENABLE_FFI:BOOL=TRUE"
- "-DLLVM_REQUIRES_RTTI=1" ; For some third-party utilities
- "-DLLVM_INSTALL_UTILS=ON") ; Needed for rustc.
-
+ ;; TODO(core-updates): Unconditionally use quasiquote
+ `(#:configure-flags
+ ,#~(#$(if (%current-target-system)
+ #~quasiquote
+ #~quote)
+ ;; These options are required for cross-compiling LLVM according to
+ ;; https://llvm.org/docs/HowToCrossCompileLLVM.html.
+ (#$@(if (%current-target-system)
+ #~(,(string-append "-DLLVM_TABLEGEN="
+ #+(file-append this-package
+ "/bin/llvm-tblgen"))
+ #$(string-append "-DLLVM_DEFAULT_TARGET_TRIPLE="
+ (%current-target-system))
+ #$(string-append "-DLLVM_TARGET_ARCH="
+ (system->llvm-target))
+ #$(string-append "-DLLVM_TARGETS_TO_BUILD="
+ (system->llvm-target)))
+ #~())
+ "-DCMAKE_SKIP_BUILD_RPATH=FALSE"
+ "-DCMAKE_BUILD_WITH_INSTALL_RPATH=FALSE"
+ "-DBUILD_SHARED_LIBS:BOOL=TRUE"
+ "-DLLVM_ENABLE_FFI:BOOL=TRUE"
+ "-DLLVM_REQUIRES_RTTI=1" ; For some third-party utilities
+ "-DLLVM_INSTALL_UTILS=ON")) ; Needed for rustc.
;; Don't use '-g' during the build, to save space.
#:build-type "Release"
#:phases
@@ -571,11 +597,7 @@ of programming tools as well as libraries with equivalent functionality.")
(uri (llvm-uri "llvm" version))
(sha256
(base32
- "0s94lwil98w7zb7cjrbnxli0z7gklb312pkw74xs1d6zk346hgwi"))))
- (native-inputs
- `(;; TODO: Switch to Python 3 in the next rebuild cycle.
- ("python" ,python-2)
- ("perl" ,perl)))))
+ "0s94lwil98w7zb7cjrbnxli0z7gklb312pkw74xs1d6zk346hgwi"))))))
(define-public clang-runtime-11
(clang-runtime-from-llvm
@@ -601,23 +623,23 @@ of programming tools as well as libraries with equivalent functionality.")
(define-public llvm-10
(package
(inherit llvm-11)
- (version "10.0.0")
+ (version "10.0.1")
(source
(origin
(method url-fetch)
(uri (llvm-uri "llvm" version))
(sha256
(base32
- "1pwgm6cr0xr5a0hrbqs1zvsvvjvy0yq1y47c96804wcs795s90yz"))))))
+ "1wydhbp9kyjp5y0rc627imxgkgqiv3dfirbqil9dgpnbaw5y7n65"))))))
(define-public clang-runtime-10
(clang-runtime-from-llvm
llvm-10
- "0x9c531k6ww21s2mkdwqx1vbdjmx6d4wmfb8gdbj0wqa796sczba"))
+ "1yjqjri753w0fzmxcyz687nvd97sbc9rsqrxzpq720na47hwh3fr"))
(define-public clang-10
(clang-from-llvm llvm-10 clang-runtime-10
- "08fbxa2a0kr3ni35ckppj0kyvlcyaywrhpqwcdrdy0z900mhcnw8"
+ "091bvcny2lh32zy8f3m9viayyhb2zannrndni7325rl85cwgr6pr"
#:patches '("clang-10.0-libc-search-path.patch")
#:tools-extra
(origin
@@ -626,7 +648,7 @@ of programming tools as well as libraries with equivalent functionality.")
(package-version llvm-10)))
(sha256
(base32
- "074ija5s2jsdn0k035r2dzmryjmqxdnyg4xwvaqych2bazv8rpxc")))))
+ "06n1yp638rh24xdxv9v2df0qajxbjz4w59b7dd4ky36drwmpi4yh")))))
(define-public clang-toolchain-10
(make-clang-toolchain clang-10))
@@ -825,6 +847,8 @@ of programming tools as well as libraries with equivalent functionality.")
(origin
(method url-fetch)
(uri (llvm-uri "llvm" version))
+ (patches
+ (search-patches "llvm-3.6-fix-build-with-gcc-10.patch"))
(sha256
(base32
"153vcvj8gvgwakzr4j0kndc0b7wn91c2g1vy2vg24s6spxcc23gn"))))))
@@ -859,14 +883,13 @@ of programming tools as well as libraries with equivalent functionality.")
(add-after 'unpack 'find-rpc-includes
(lambda* (#:key inputs #:allow-other-keys)
(setenv "CPATH"
- (string-append (assoc-ref inputs "libtirpc")
- "/include/tirpc/:"
- (or (getenv "CPATH") "")))
+ (string-append
+ (search-input-directory inputs "/include/tirpc")
+ ":" (or (getenv "CPATH") "")))
(setenv "CPLUS_INCLUDE_PATH"
- (string-append (assoc-ref inputs "libtirpc")
- "/include/tirpc/:"
- (or (getenv "CPLUS_INCLUDE_PATH") "")))
- #t))))))
+ (string-append
+ (search-input-directory inputs "/include/tirpc")
+ ":" (or (getenv "CPLUS_INCLUDE_PATH") "")))))))))
(inputs
`(("libtirpc" ,libtirpc)
("llvm" ,llvm-3.5))))))
@@ -975,6 +998,48 @@ of programming tools as well as libraries with equivalent functionality.")
components which highly leverage existing libraries in the larger LLVM Project.")
(license license:asl2.0))) ; With LLVM exception
+(define* (make-lld-wrapper lld #:key lld-as-ld?)
+ "Return a LLD wrapper. When LLD-AS-LD? is true, create a 'ld' symlink that
+points to 'lld'."
+ (package
+ (name (if lld-as-ld? "lld-as-ld-wrapper" "lld-wrapper"))
+ (version "0")
+ (source #f)
+ (build-system trivial-build-system)
+ (inputs `(("ld.lld-wrapper" ,(make-ld-wrapper "ld.lld-wrapper"
+ #:binutils lld
+ #:linker "ld.lld"))
+ ("lld-wrapper" ,(make-ld-wrapper "lld-wrapper"
+ #:binutils lld
+ #:linker "lld"))))
+ (arguments
+ (list #:builder
+ #~(let ((ld.lld (string-append #$(this-package-input
+ "ld.lld-wrapper")
+ "/bin/ld.lld"))
+ (lld (string-append #$(this-package-input "lld-wrapper")
+ "/bin/lld")))
+ (mkdir #$output)
+ (mkdir (string-append #$output "/bin"))
+ (symlink ld.lld (string-append #$output "/bin/ld.lld"))
+ (symlink lld (string-append #$output "/bin/lld"))
+ (when #$lld-as-ld?
+ (symlink ld.lld (string-append #$output "/bin/ld"))))))
+ (synopsis "LLD linker wrapper")
+ (description "This is a linker wrapper for LLD; like @code{ld-wrapper}, it
+wraps the linker to add any missing @code{-rpath} flags, and to detect any
+misuse of libraries outside of the store.")
+ (home-page "https://www.gnu.org/software/guix/")
+ (license license:gpl3+)))
+
+;;; A LLD wrapper suitable to use with -fuse-ld and GCC or with Clang.
+(define-public lld-wrapper
+ (make-lld-wrapper lld))
+
+;;; A LLD wrapper that can be used as a (near) drop-in replacement to GNU ld.
+(define-public lld-as-ld-wrapper
+ (make-lld-wrapper lld #:lld-as-ld? #t))
+
(define-public lldb
(package
(name "lldb")
@@ -1232,14 +1297,14 @@ with that of libgomp, the GNU Offloading and Multi Processing Library.")
(define-public python-llvmlite
(package
(name "python-llvmlite")
- (version "0.34.0")
+ (version "0.37.0")
(source
(origin
(method url-fetch)
(uri (pypi-uri "llvmlite" version))
(sha256
(base32
- "0qqzs6h34002ig2jn31vk08q9hh5kn84lhmv4bljz3yakg8y0gph"))))
+ "05avhsvdcqh8wfpblx16qslfq3masqcbkfyn8p3c13h1rmqbi4k3"))))
(build-system python-build-system)
(arguments
`(#:phases
@@ -1258,25 +1323,22 @@ with that of libgomp, the GNU Offloading and Multi Processing Library.")
"binding/libllvmlite.so")))
(substitute* "llvmlite/binding/ffi.py"
(("_lib_name = get_library_name\\(\\)")
- (format #f "_lib_name = ~s" libllvmlite.so)))
- #t)))
+ (format #f "_lib_name = ~s" libllvmlite.so))))))
(add-after 'unpack 'skip-failing-tests
(lambda _
(substitute* "llvmlite/tests/test_binding.py"
((" def test_libm\\(self\\).*" all)
- (string-append " @unittest.skip('Fails on Guix')\n" all)))
- #t))
+ (string-append " @unittest.skip('Fails on Guix')\n" all)))))
(add-before 'build 'set-compiler/linker-flags
(lambda* (#:key inputs #:allow-other-keys)
(let ((llvm (assoc-ref inputs "llvm")))
;; Refer to ffi/Makefile.linux.
(setenv "CPPFLAGS" "-fPIC")
(setenv "LDFLAGS" (string-append "-Wl,-rpath="
- llvm "/lib"))
- #t))))))
+ llvm "/lib"))))))))
(inputs
`(("llvm"
- ,(let* ((patches-commit "061ab39e1d4591f3aa842458252a19ad01858167")
+ ,(let* ((patches-commit "a4a19e8af2c5ef9b9901f20193e4be070726da97")
(patch-uri (lambda (name)
(string-append
"https://raw.githubusercontent.com/numba/"
@@ -1291,36 +1353,47 @@ with that of libgomp, the GNU Offloading and Multi Processing Library.")
(list
(patch-origin
"partial-testing.patch"
- "1cwy4jsmijd838q0bylxl77vrwrb7ksijfly5062ay32303jmj86")
+ "0g3nkci87knvmn7piqhmh4bcc65ff8r921cvfcibyiv65klv3syg")
(patch-origin
"0001-Revert-Limit-size-of-non-GlobalValue-name.patch"
"0n4k7za0smx6qwdipsh6x5lm7bfvzzb3p9r8q1zq1dqi4na21295"))))
- (if (string=? "aarch64-linux" (%current-system))
- (package
- (inherit llvm-9)
- (source
- (origin
- (inherit (package-source llvm-9))
- (patches
+ (package
+ (inherit llvm-11)
+ (source
+ (origin
+ (inherit (package-source llvm-11))
+ (patches
+ (if (string=? "aarch64-linux" (%current-system))
`(,(patch-origin
"intel-D47188-svml-VF_LLVM9.patch"
- "1f9ld7wc8bn4gbvdsmk07w1rq371h42vy05rxsq9a22f57rljqbd")
+ "0gnnlfxr8p1a7ls93hzcpfqpa8r0icypfwj8l9cmkslq5sz8p64r")
,@arch-independent-patches
- ,@(origin-patches (package-source llvm-9)))))))
- (package
- (inherit llvm-10)
- (source
- (origin
- (inherit (package-source llvm-10))
- (patches
+ ,@(origin-patches (package-source llvm-11)))
`(,(patch-origin
"intel-D47188-svml-VF.patch"
- "0n46qjwfl7i12bl7wp0cyxl277axfvaaz5lxx5kdlgwjcpa582dg")
+ "0gnnlfxr8p1a7ls93hzcpfqpa8r0icypfwj8l9cmkslq5sz8p64r")
,(patch-origin
"expect-fastmath-entrypoints-in-add-TLI-mappings.ll.patch"
"0jxhjkkwwi1cy898l2n57l73ckpw0v73lqnrifp7r1mwpsh624nv")
,@arch-independent-patches
- ,@(origin-patches (package-source llvm-10))))))))))))
+ ,@(origin-patches (package-source llvm-11)))))))
+ (arguments
+ (substitute-keyword-arguments (package-arguments llvm-11)
+ ((#:phases phases)
+ `(modify-phases ,phases
+ (add-after 'unpack 'patch-round-two
+ ;; We have to do the patching in two rounds because we can't
+ ;; pass '-p1' and '-p2' in the source field.
+ (lambda* (#:key inputs #:allow-other-keys)
+ (invoke "patch"
+ (assoc-ref inputs "llvm_11_consecutive_registers")
+ "-p2")))))))
+ (native-inputs
+ `(("llvm_11_consecutive_registers"
+ ,(patch-origin
+ "llvm_11_consecutive_registers.patch"
+ "04msd34dnpr3lpss0pam3mckwnvzrab266z6sml1hya0akv0m3f3"))
+ ,@(package-native-inputs llvm-11))))))))
(home-page "https://llvmlite.pydata.org")
(synopsis "Wrapper around basic LLVM functionality")
(description
@@ -1412,6 +1485,11 @@ C/C++/Obj-C code according to a set of style options, see
(description "This package renames every occurrence of a symbol at point
using @code{clang-rename}.")))
+
+;;;
+;;; LLVM variants.
+;;;
+
(define make-ocaml-llvm
;; Make it a memoizing procedure so its callers below don't end up defining
;; two equal-but-not-eq "ocaml-llvm" packages for the default LLVM.
@@ -1455,3 +1533,312 @@ LLVM."))))
(define-public ocaml-llvm-9 (make-ocaml-llvm llvm-9))
(define-public ocaml-llvm-10 (make-ocaml-llvm llvm-10))
(define-public ocaml-llvm-11 (make-ocaml-llvm llvm-11))
+
+(define-public llvm-julia
+ (package
+ (inherit llvm-11)
+ (name "llvm-julia")
+ (properties `((hidden? . #t)
+ ,@(package-properties llvm-11)))
+ (source (origin
+ (inherit (package-source llvm-11))
+ ;; Those patches are inside the Julia source repo.
+ ;; They are _not_ Julia specific (https://github.com/julialang/julia#llvm)
+ ;; but they are required to build Julia.
+ ;; Discussion: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=919628
+ (patches
+ (map (match-lambda
+ ((name hash)
+ (julia-patch name hash)))
+ (list
+ '("llvm-D27629-AArch64-large_model_6.0.1"
+ "1qrshmlqvnasdyc158vfn3hnbigqph3lsq7acb9w8lwkpnnm2j4z")
+ '("llvm8-D34078-vectorize-fdiv"
+ "19spqc3xsazn1xs9gpcgv9ldadfkv49rmc5khl7sf1dlmhgi4602")
+ '("llvm-7.0-D44650"
+ "1h55kkmkiisfj6sk956if2bcj9s0v6n5czn8dxb870vp5nccj3ir")
+ '("llvm7-symver-jlprefix"
+ "00ng32x6xhm9czczirn5r1q1mc1myad44fqhi061hwh1vb46dwgm")
+ '("llvm-6.0-DISABLE_ABI_CHECKS"
+ "014fawd1ba7yckalypfld22zgic87x9nx3cim42zrwygywd36pyg")
+ '("llvm9-D50010-VNCoercion-ni"
+ "1s1d3sjsiq4vxg7ncy5cz56zgy5vcq6ls3iqaiqkvr23wyryqmdx")
+ '("llvm7-revert-D44485"
+ "0f59kq3p3mpwsbmskypbi4zn01l6ig0x7v2rjp08k2r8z8m6fa8n")
+ '("llvm-11-D75072-SCEV-add-type"
+ "176xi1lnbnv2rcs05ywhyb7pd0xgmibayvwzksksg44wg2dh8mbx")
+ '("llvm-julia-tsan-custom-as"
+ "0awh40kf6lm4wn1nsjd1bmhfwq7rqj811szanp2xkpspykw9hg9s")
+ '("llvm-D80101"
+ "1gsdwmgmpbignvqyxcnlprj899259p3dvdznlncd84ss445qgq3j")
+ '("llvm-D84031"
+ "0nks9sbk7p0r5gyr0idrmm93a5fmdai8kihz9532dx4zhcvvqbjc")
+ '("llvm-10-D85553"
+ "1zjq7j9q2qp56hwkc8yc8f0z7kvam3j7hj8sb7qyd77r255ff78l")
+ '("llvm-10-unique_function_clang-sa"
+ "1jys9w2zqk3dasnxqh0qz5ij7rxi6mkgq9pqjsclmamr5169zyan")
+ ;'("llvm-D88630-clang-cmake"
+ ; "0rs6s71nqnjkny7i69gqazhqj5jqfdr0bkxs2v5a55sfx8fa1k54")
+ '("llvm-11-D85313-debuginfo-empty-arange"
+ "1f672d5385xpgb8yrim8d3b7wg2z1l81agnshm1q61kdvjixqx32")
+ '("llvm-11-D90722-rtdyld-absolute-relocs"
+ "0kmnai229yyxkmpk9lxd180mcnhk2i8d87k2sg89gc8as18w10r6")
+ '("llvm-invalid-addrspacecast-sink"
+ "1n1b7j4s80vj7x5377aj9vyphmxx1q6bm0chhkxp6zsy3mx3g2ry")
+ '("llvm-11-D92906-ppc-setjmp"
+ "0cmd4dsblp7a8m03j16dqxws0ijh55zf4jzzxmj341qxa1gamdp9")
+ '("llvm-11-PR48458-X86ISelDAGToDAG"
+ "0vwzvlhsdazhxg4gj8g2f00a4f8qc5cgac23w575xk3pgba1jh6y")
+ '("llvm-11-D93092-ppc-knownbits"
+ "1748bypsc7c9lbs3fnkv0kwvch6bn85kj98j4jdaz254ig0wa6xj")
+ '("llvm-11-D93154-globalisel-as"
+ "1k5wd4z3pa7zj0gyjkif7viqj906dhqlbb7dc95gig40nbxv6zpj")
+ '("llvm-11-ppc-half-ctr"
+ "0piywisfz6cmw3133kz7vzhiqflq2y7igakqxlym0gi8pqylv7w9")
+ '("llvm-11-ppc-sp-from-bp"
+ "1wmg3485cx5f9pbykyl3jibk1wwv4w1x30hl4jyfndzr2yh8azf9")
+ '("llvm-rGb498303066a6-gcc11-header-fix"
+ "0hkd4rwhvh8g2yh13g29wiwnjpv2yd1hdyiv1ryw8izl25bz9c67")
+ '("llvm-11-D94813-mergeicmps"
+ "0cmy0ywkgyrdcvr9bd6pd912lyd4gcsrib4z0v05dwgcdxhk7y29")
+ '("llvm-11-D94980-CTR-half"
+ "1yf8cxib3z8hz7zi9n6v2g2c6vpfr4slq9hpx8m8yq8f1jbyw3fw")
+ '("llvm-11-D94058-sext-atomic-ops"
+ "1x6p6k6q651z5jcqxx8vj17cxnv196mka7mwn7dpp6c23lwgfdpb")
+ '("llvm-11-D96283-dagcombine-half"
+ "0lv4iq2f8qrcz1xyxfic3bcr5p0aqam3a7c6pp6fnw3riixm096k"))))
+ (patch-flags '("-p1"))))
+ (arguments
+ (substitute-keyword-arguments (package-arguments llvm-11)
+ ((#:phases phases)
+ `(modify-phases ,phases
+ (add-after 'unpack 'patch-round-two
+ ;; We have to do the patching in two rounds because we can't
+ ;; pass '-p1' and '-p2' in the source field.
+ (lambda* (#:key inputs #:allow-other-keys)
+ (map (lambda (patchname)
+ (invoke "patch" patchname "-p2"))
+ (list "llvm-11-AArch64-FastIsel-bug"
+ "llvm-11-D97435-AArch64-movaddrreg"
+ "llvm-11-D97571-AArch64-loh"
+ "llvm-11-aarch64-addrspace"))))))
+ ((#:build-type _) "Release")
+ ((#:configure-flags flags)
+ `(list
+ ;; Build a native compiler and the NVPTX backend (NVIDIA) since
+ ;; Julia insists on it, nothing more. This reduces build times and
+ ;; disk usage.
+ ,(string-append "-DLLVM_TARGETS_TO_BUILD=" (system->llvm-target))
+ "-DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD=NVPTX"
+
+ "-DLLVM_INSTALL_UTILS=ON"
+ "-DLLVM_BUILD_TESTS=ON"
+ "-DLLVM_ENABLE_FFI=ON"
+ "-DLLVM_ENABLE_RTTI=ON"
+ ;; "-DLLVM_HOST_TRIPLE=${stdenv.hostPlatform.config}"
+ ;; "-DLLVM_DEFAULT_TARGET_TRIPLE=${stdenv.hostPlatform.config}"
+ ;; "-DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD=WebAssembly"
+ "-DLLVM_ENABLE_DUMP=ON"
+ "-DLLVM_LINK_LLVM_DYLIB=ON"
+ "-DLLVM_VERSION_SUFFIX:STRING=jl"))))
+ (inputs
+ (append
+ (package-inputs llvm-11)
+ `(("llvm-11-AArch64-FastIsel-bug"
+ ,(julia-patch "llvm-11-AArch64-FastIsel-bug"
+ "1m2vddj1mw4kbij8hbrx82piyy6bvr2x7wwdnlxfaqcm72ipzyh9"))
+ ("llvm-11-D97435-AArch64-movaddrreg"
+ ,(julia-patch "llvm-11-D97435-AArch64-movaddrreg"
+ "10jnavq9ljkj7j2gqj2zd1pwqpqb5zs3zp9h96pmz0djbmxwa86y"))
+ ("llvm-11-D97571-AArch64-loh"
+ ,(julia-patch "llvm-11-D97571-AArch64-loh"
+ "128zcbg1w1j7hngsf7z1a7alc6lig6l2rqgjp6i8nk3k3f842v6n"))
+ ("llvm-11-aarch64-addrspace"
+ ,(julia-patch "llvm-11-aarch64-addrspace"
+ "0ckbzgfirxrf2d5bpinpngp7gnilbjrk0cbdfyl3h6f5v6i6xj6m")))))))
+
+(define %cling-version "0.9")
+
+(define llvm-cling ;LLVM 9 with approximately 10 patches for cling
+ (let ((base llvm-9))
+ (package/inherit base
+ (name "llvm-cling")
+ (source
+ (origin
+ (inherit (package-source base))
+ (method git-fetch)
+ (uri (git-reference
+ (url "http://root.cern/git/llvm.git")
+ (commit (string-append "cling-v" %cling-version))))
+ (file-name (git-file-name "llvm-cling" %cling-version))
+ (sha256
+ (base32
+ "0y3iwv3c9152kybmdrwvadggjs163r25h7rmlxzr3hfpr463pnwf"))
+ (modules '((guix build utils)))
+ (snippet
+ ;; The source is missing an include directive (see:
+ ;; https://github.com/vgvassilev/cling/issues/219).
+ '(substitute* "utils/benchmark/src/benchmark_register.h"
+ (("^#include <vector>.*" all)
+ (string-append all "#include <limits>\n"))))))
+ (outputs '("out"))
+ (arguments
+ (substitute-keyword-arguments (package-arguments base)
+ ((#:configure-flags _ ''())
+ '(list "-DLLVM_PARALLEL_LINK_JOBS=1" ;cater to smaller build machines
+ ;; Only enable compiler support for the host architecture to
+ ;; save on build time.
+ "-DLLVM_TARGETS_TO_BUILD=host;NVPTX"
+ "-DLLVM_INSTALL_UTILS=ON"
+ "-DLLVM_ENABLE_RTTI=ON"
+ "-DLLVM_ENABLE_FFI=ON"
+ "-DLLVM_BUILD_LLVM_DYLIB=ON"
+ "-DLLVM_LINK_LLVM_DYLIB=ON"))
+ ((#:phases phases '%standard-phases)
+ `(modify-phases ,phases
+ (delete 'shared-lib-workaround)
+ (delete 'install-opt-viewer))))))))
+
+(define clang-cling-runtime
+ (let ((base clang-runtime-9))
+ (package/inherit base
+ (name "clang-cling-runtime")
+ (arguments
+ (substitute-keyword-arguments (package-arguments base)
+ ((#:phases phases '%standard-phases)
+ `(modify-phases ,phases
+ (add-after 'install 'delete-static-libraries
+ ;; This reduces the size from 22 MiB to 4 MiB.
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let ((out (assoc-ref outputs "out")))
+ (for-each delete-file (find-files out "\\.a$")))))))))
+ (inputs (modify-inputs (package-inputs base)
+ (replace "llvm" llvm-cling))))))
+
+(define clang-cling ;modified clang 9 with ~ 60 patches for cling
+ (let ((base clang-9))
+ (package/inherit base
+ (name "clang-cling")
+ (source
+ (origin
+ (inherit (package-source base))
+ (method git-fetch)
+ (uri (git-reference
+ (url "http://root.cern/git/clang.git")
+ (commit (string-append "cling-v" %cling-version))))
+ (file-name (git-file-name "clang-cling" %cling-version))
+ (sha256
+ (base32
+ "128mxkwghss6589wvm6amzv183aq88rdrnfxjiyjcji5hx84vpby"))))
+ (arguments
+ (substitute-keyword-arguments (package-arguments base)
+ ((#:phases phases '%standard-phases)
+ `(modify-phases ,phases
+ (add-after 'install 'delete-static-libraries
+ ;; This reduces the size by half, from 220 MiB to 112 MiB.
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let ((out (assoc-ref outputs "out")))
+ (for-each delete-file (find-files out "\\.a$")))))))))
+ (propagated-inputs
+ (modify-inputs (package-propagated-inputs base)
+ (replace "llvm" llvm-cling)
+ (replace "clang-runtime" clang-cling-runtime))))))
+
+(define-public cling
+ ;; The tagged v0.9 release doesn't build, so use the latest commit.
+ (let ((commit "d78d1a03fedfd2bf6d2b6ff295aca576d98940df")
+ (revision "1")
+ (version* "0.9"))
+ (package
+ (name "cling")
+ (version (git-version version* revision commit))
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "http://root.cern/git/cling.git")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0lsbxv21b4qw11xkw9iipdpca64jjwwqxm0qf5v2cgdlibf8m8n9"))
+ ;; Patch submitted upstream here:
+ ;; https://github.com/root-project/cling/pull/433.
+ (patches (search-patches "cling-use-shared-library.patch"))))
+ (build-system cmake-build-system)
+ (arguments
+ `(#:build-type "Release" ;keep the build as lean as possible
+ #:tests? #f ;FIXME: 78 tests fail (out of ~200)
+ #:test-target "check-cling"
+ #:configure-flags
+ (list (string-append "-DCLING_CXX_PATH="
+ (assoc-ref %build-inputs "gcc") "/bin/g++")
+ ;; XXX: The AddLLVM.cmake module expects LLVM_EXTERNAL_LIT to
+ ;; be a Python script, not a shell executable.
+ (string-append "-DLLVM_EXTERNAL_LIT="
+ (assoc-ref %build-inputs "python-lit")
+ "/bin/.lit-real"))
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'set-version
+ (lambda _
+ (make-file-writable "VERSION")
+ (call-with-output-file "VERSION"
+ (lambda (port)
+ (format port "~a~%" ,version)))))
+ (add-after 'unpack 'patch-paths
+ (lambda* (#:key inputs #:allow-other-keys)
+ (substitute* "lib/Interpreter/CIFactory.cpp"
+ (("\bsed\b")
+ (which "sed"))
+ ;; This ensures that the default C++ library used by Cling is
+ ;; that of the compiler that was used to build it, rather
+ ;; than that of whatever g++ happens to be on PATH.
+ (("ReadCompilerIncludePaths\\(CLING_CXX_RLTV")
+ (string-append "ReadCompilerIncludePaths(\""
+ (assoc-ref inputs "gcc") "/bin/g++\""))
+ ;; Cling uses libclang's CompilerInvocation::GetResourcesPath
+ ;; to resolve Clang's library prefix, but this fails on Guix
+ ;; because it is relative to the output of cling rather than
+ ;; clang (see:
+ ;; https://github.com/root-project/cling/issues/434). Fully
+ ;; shortcut the logic in this method to return the correct
+ ;; static location.
+ (("static std::string getResourceDir.*" all)
+ (string-append all
+ " return std::string(\""
+ (assoc-ref inputs "clang-cling")
+ "/lib/clang/" ,(package-version clang-cling)
+ "\");")))
+ ;; Check for the 'lit' command for the tests, not 'lit.py'
+ ;; (see: https://github.com/root-project/cling/issues/432).
+ (substitute* "CMakeLists.txt"
+ (("lit.py")
+ "lit"))))
+ (add-after 'unpack 'adjust-lit.cfg
+ ;; See: https://github.com/root-project/cling/issues/435.
+ (lambda _
+ (substitute* "test/lit.cfg"
+ (("config.llvm_tools_dir \\+ '")
+ "config.cling_obj_root + '/bin"))))
+ (add-after 'install 'delete-static-libraries
+ ;; This reduces the size from 17 MiB to 5.4 MiB.
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let ((out (assoc-ref outputs "out")))
+ (for-each delete-file (find-files out "\\.a$"))))))))
+ (native-inputs
+ `(("python" ,python)
+ ("python-lit" ,python-lit)))
+ (inputs
+ `(("clang-cling" ,clang-cling)
+ ("llvm-cling" ,llvm-cling)))
+ (home-page "https://root.cern/cling/")
+ (synopsis "Interactive C++ interpreter")
+ (description "Cling is an interactive C++17 standard compliant
+interpreter, built on top of LLVM and Clang. Cling can be used as a
+read-eval-print loop (REPL) to assist with rapid application development.
+Here's how to print @samp{\"Hello World!\"} using @command{cling}:
+
+@example
+cling '#include <stdio.h>' 'printf(\"Hello World!\\n\");'
+@end example")
+ (license license:lgpl2.1+)))) ;for the combined work
diff --git a/gnu/packages/logging.scm b/gnu/packages/logging.scm
index 06a1905479..cc2ee9b4dc 100644
--- a/gnu/packages/logging.scm
+++ b/gnu/packages/logging.scm
@@ -7,6 +7,7 @@
;;; Copyright © 2019 Gábor Boskovits <boskovits@gmail.com>
;;; Copyright © 2019 Meiyo Peng <meiyo@riseup.net>
;;; Copyright © 2020 Marius Bakke <mbakke@fastmail.com>
+;;; Copyright © 2021 Guillaume Le Vaillant <glv@posteo.net>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -76,7 +77,7 @@ staying as close to their API as is reasonable.")
(define-public glog
(package
(name "glog")
- (version "0.4.0")
+ (version "0.5.0")
(home-page "https://github.com/google/glog")
(source (origin
(method git-fetch)
@@ -84,19 +85,9 @@ staying as close to their API as is reasonable.")
(commit (string-append "v" version))))
(sha256
(base32
- "1xd3maiipfbxmhc9rrblc5x52nxvkwxp14npg31y5njqvkvzax9b"))
+ "17014q25c99qyis6l3fwxidw6222bb269fdlr74gn7pzmzg4lvg3"))
(file-name (git-file-name name version))))
- (build-system gnu-build-system)
- (arguments
- `(#:phases (modify-phases %standard-phases
- (add-before 'check 'disable-signal-tests
- (lambda _
- ;; XXX: This test fails on non x86_64. See e.g.
- ;; https://github.com/google/glog/issues/219 and
- ;; https://github.com/google/glog/issues/256.
- (substitute* "Makefile"
- (("\tsignalhandler_unittest_sh") "\t$(EMPTY)"))
- #t)))))
+ (build-system cmake-build-system)
(native-inputs
`(("perl" ,perl) ;for tests
("autoconf" ,autoconf)
diff --git a/gnu/packages/lsof.scm b/gnu/packages/lsof.scm
index b317902ee7..04c1d80b52 100644
--- a/gnu/packages/lsof.scm
+++ b/gnu/packages/lsof.scm
@@ -3,6 +3,7 @@
;;; Copyright © 2017 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2018, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
;;; Copyright © 2018, 2019 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -31,79 +32,76 @@
(define-public lsof
(package
- (name "lsof")
- (version "4.94.0")
- (source
- (origin
- (method git-fetch)
- (uri (git-reference
- (url "https://github.com/lsof-org/lsof")
- (commit version)))
- (file-name (git-file-name name version))
- (sha256
- (base32 "0yxv2jg6rnzys49lyrz9yjb4knamah4xvlqj596y6ix3vm4k3chp"))
- (patches (search-patches "lsof-fatal-test-failures.patch"))))
- (build-system gnu-build-system)
- (native-inputs
- `(("groff" ,groff) ; for soelim
- ("perl" ,perl)))
- (arguments
- `(#:phases
- (modify-phases %standard-phases
- (replace 'configure
- (lambda _
- (setenv "LSOF_CC" ,(cc-for-target))
- (setenv "LSOF_MAKE" "make")
+ (name "lsof")
+ (version "4.94.0")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/lsof-org/lsof")
+ (commit version)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "0yxv2jg6rnzys49lyrz9yjb4knamah4xvlqj596y6ix3vm4k3chp"))
+ (patches (search-patches "lsof-fatal-test-failures.patch"))))
+ (build-system gnu-build-system)
+ (native-inputs
+ `(("groff" ,groff) ; for soelim
+ ("perl" ,perl)))
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (replace 'configure
+ (lambda _
+ (setenv "LSOF_CC" ,(cc-for-target))
+ (setenv "LSOF_MAKE" "make")
- ;; By default, the makefile captures the output of 'uname -a'.
- ;; Provide a fixed output instead to make builds reproducible.
- (setenv "LSOF_SYSINFO"
- (string-append "GNU/" (utsname:sysname (uname))
- " (GNU Guix)"))
+ ;; By default, the makefile captures the output of 'uname -a'.
+ ;; Provide a fixed output instead to make builds reproducible.
+ (setenv "LSOF_SYSINFO"
+ (string-append "GNU/" (utsname:sysname (uname))
+ " (GNU Guix)"))
- (invoke "./Configure" "linux")
- #t))
- (add-after 'configure 'patch-timestamps
- (lambda _
- (substitute* "Makefile"
- (("`date`") "`date --date=@1`"))
- #t))
- (add-after 'build 'build-man-page
- (lambda _
- (with-output-to-file "lsof.8"
- (lambda _ (invoke "soelim" "Lsof.8")))
- #t))
- (add-before 'check 'disable-failing-tests
- (lambda _
- (substitute* "tests/Makefile"
- ;; Fails with ‘ERROR!!! client gethostbyaddr() failure’.
- (("(STDTST=.*) LTsock" _ prefix) prefix)
- ;; Fails without access to a remote NFS server.
- (("(OPTTST=.*) LTnfs" _ prefix) prefix))
- #t))
- (replace 'check
- (lambda* (#:key tests? #:allow-other-keys)
- (when tests?
- (with-directory-excursion "tests"
- ;; Tests refuse to run on ‘unvalidated’ platforms.
- (make-file-writable "TestDB")
- (invoke "./Add2TestDB")
+ (invoke "./Configure" "linux")))
+ (add-after 'configure 'patch-timestamps
+ (lambda _
+ (substitute* "Makefile"
+ (("`date`") "`date --date=@1`"))))
+ (add-after 'build 'build-man-page
+ (lambda _
+ (with-output-to-file "lsof.8"
+ (lambda _ (invoke "soelim" "Lsof.8")))))
+ (add-before 'check 'disable-failing-tests
+ (lambda _
+ (substitute* "tests/Makefile"
+ ;; Fails with ‘ERROR!!! client gethostbyaddr() failure’.
+ (("(STDTST=.*) LTsock" _ prefix) prefix)
+ ;; LTnfs fails without access to a remote NFS server, and LTlock
+ ;; fails when run on a Btrfs file system (see:
+ ;; https://github.com/lsof-org/lsof/issues/152).
+ (("OPTTST=[[:space:]]*LTbigf LTdnlc LTlock LTnfs")
+ "OPTTST = LTbigf LTdnlc"))))
+ (replace 'check
+ (lambda* (#:key tests? #:allow-other-keys)
+ (when tests?
+ (with-directory-excursion "tests"
+ ;; Tests refuse to run on ‘unvalidated’ platforms.
+ (make-file-writable "TestDB")
+ (invoke "./Add2TestDB")
- ;; The ‘standard’ tests suggest running ‘optional’ ones as well.
- (invoke "make" "standard" "optional")))
- #t))
- (replace 'install
- (lambda* (#:key outputs #:allow-other-keys)
- (let ((out (assoc-ref outputs "out")))
- (install-file "lsof" (string-append out "/bin"))
- (install-file "lsof.8" (string-append out "/share/man/man8")))
- #t)))))
- (synopsis "Display information about open files")
- (description
- "Lsof stands for LiSt Open Files, and it does just that.
+ ;; The ‘standard’ tests suggest running ‘optional’ ones as well.
+ (invoke "make" "standard" "optional")))))
+ (replace 'install
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let ((out (assoc-ref outputs "out")))
+ (install-file "lsof" (string-append out "/bin"))
+ (install-file "lsof.8" (string-append out "/share/man/man8"))))))))
+ (synopsis "Display information about open files")
+ (description
+ "Lsof stands for LiSt Open Files, and it does just that.
It lists information about files that are open by the processes running
on the system.")
- (license (license:fsf-free
- "file://00FAQ"
- "License inspired by zlib, see point 1.9 of 00FAQ in the distribution."))
- (home-page "https://people.freebsd.org/~abe/")))
+ (license (license:fsf-free
+ "file://00FAQ"
+ "License inspired by zlib, see point 1.9 of 00FAQ in the distribution."))
+ (home-page "https://people.freebsd.org/~abe/")))
diff --git a/gnu/packages/lua.scm b/gnu/packages/lua.scm
index 2d43bc979c..22dc7c6bc4 100644
--- a/gnu/packages/lua.scm
+++ b/gnu/packages/lua.scm
@@ -1125,8 +1125,7 @@ shell command executions.")
"1999bgrh52124a5g4qizav3x257ff2brjr855srpm1jv1nxzbygv"))))
(build-system meson-build-system)
(arguments
- `(#:meson ,meson-0.55
- ;; Tests are disabled for now due to an issue that affecs guix:
+ `(;; Tests are disabled for now due to an issue that affecs guix:
;; <https://gitlab.com/emilua/emilua/-/issues/22>
#:configure-flags
(list "-Denable_http=true"
@@ -1193,7 +1192,7 @@ enabled.")
(lambda* (#:key inputs #:allow-other-keys)
(substitute* "fennel"
(("/usr/bin/env .*lua")
- (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)))))
diff --git a/gnu/packages/lxde.scm b/gnu/packages/lxde.scm
index f81d7af3c4..15cabe702b 100644
--- a/gnu/packages/lxde.scm
+++ b/gnu/packages/lxde.scm
@@ -6,9 +6,10 @@
;;; Copyright © 2017 Brendan Tildesley <mail@brendan.scot>
;;; Copyright © 2018–2021 Tobias Geerinckx-Rice <me@tobias.gr>
;;; Copyright © 2018 ison <ison@airmail.cc>
-;;; Copyright © 2018, 2019 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2018, 2019, 2021 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2018 Ricardo Wurmus <rekado@elephly.net>
;;; Copyright © 2019 Meiyo Peng <meiyo@riseup.net>
+;;; Copyright © 2021 Guillaume Le Vaillant <glv@posteo.net>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -226,6 +227,8 @@ performance, all instances of the terminal are sharing a single process.")
(inputs `(("glib" ,glib)
("libfm" ,libfm-extra)))
(native-inputs `(("pkg-config" ,pkg-config)))
+ (arguments
+ `(#:configure-flags '("CFLAGS=-fcommon")))
(synopsis "LXDE implementation of the freedesktop menu's cache")
(description "Menu-cache is a library creating and utilizing caches to
speed up the access to freedesktop.org defined application menus.")
@@ -370,8 +373,7 @@ with freedesktop.org standard.")
#t)))
(add-after 'patch-share-dirs 'patch-mime-dirs
(lambda* (#:key inputs #:allow-other-keys)
- (let* ((mime (string-append (assoc-ref inputs "shared-mime-info")
- "/share/mime")))
+ (let* ((mime (search-input-directory inputs "/share/mime")))
(with-directory-excursion "src"
(substitute* '("mime-type/mime-type.c" "ptk/ptk-file-menu.c")
(("/usr(/local)?/share/mime") mime)))
@@ -398,10 +400,9 @@ with freedesktop.org standard.")
"terminal_su=/run/setuid-programs/su")
(("#graphical_su=/usr/bin/gksu")
(string-append "graphical_su="
- (string-append (assoc-ref inputs "ktsuss")
- "/bin/ktsuss"))))
- #t)))
+ (search-input-file inputs "/bin/ktsuss")))))))
#:configure-flags (list
+ "CFLAGS=-fcommon"
(string-append "--with-preferable-sudo="
(assoc-ref %build-inputs "ktsuss")
"/bin/ktsuss")
diff --git a/gnu/packages/machine-learning.scm b/gnu/packages/machine-learning.scm
index 3185c15aea..3bb09129f5 100644
--- a/gnu/packages/machine-learning.scm
+++ b/gnu/packages/machine-learning.scm
@@ -16,7 +16,7 @@
;;; Copyright © 2020 Konrad Hinsen <konrad.hinsen@fastmail.net>
;;; Copyright © 2020 Edouard Klein <edk@beaver-labs.com>
;;; Copyright © 2020, 2021 Vinicius Monego <monego@posteo.net>
-;;; Copyright © 2020 Maxim Cournoyer <maxim.cournoyer@gmail.com>
+;;; Copyright © 2020, 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -141,20 +141,28 @@ sparsely connected networks.")
(build-system gnu-build-system)
(arguments
`(#:tests? #f ; no "check" target
- #:phases (modify-phases %standard-phases
- (delete 'configure)
- (replace
- 'install ; no ‘install’ target
- (lambda* (#:key outputs #:allow-other-keys)
- (let* ((out (assoc-ref outputs "out"))
- (bin (string-append out "/bin/")))
- (mkdir-p bin)
- (for-each (lambda (file)
- (copy-file file (string-append bin file)))
- '("svm-train"
- "svm-predict"
- "svm-scale")))
- #t)))))
+ #:phases
+ (modify-phases %standard-phases
+ (delete 'configure)
+ (add-after 'build 'build-lib
+ (lambda _
+ (invoke "make" "lib")))
+ (replace 'install ; no ‘install’ target
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (bin (string-append out "/bin/"))
+ (lib (string-append out "/lib/"))
+ (inc (string-append out "/include/libsvm")))
+ (mkdir-p bin)
+ (for-each (lambda (file)
+ (copy-file file (string-append bin file)))
+ '("svm-train"
+ "svm-predict"
+ "svm-scale"))
+ (mkdir-p lib)
+ (install-file "libsvm.so.2" lib)
+ (mkdir-p inc)
+ (install-file "svm.h" inc)))))))
(home-page "https://www.csie.ntu.edu.tw/~cjlin/libsvm/")
(synopsis "Library for Support Vector Machines")
(description
@@ -222,20 +230,7 @@ classification.")
#:phases
(modify-phases %standard-phases
(add-after 'unpack 'enter-dir
- (lambda _ (chdir "ghmm") #t))
- (delete 'check)
- (add-after 'install 'check
- (assoc-ref %standard-phases 'check))
- (add-before 'check 'fix-PYTHONPATH
- (lambda* (#:key inputs outputs #:allow-other-keys)
- (let ((python-version (python-version
- (assoc-ref inputs "python"))))
- (setenv "PYTHONPATH"
- (string-append (getenv "PYTHONPATH")
- ":" (assoc-ref outputs "out")
- "/lib/python" python-version
- "/site-packages")))
- #t))
+ (lambda _ (chdir "ghmm")))
(add-after 'enter-dir 'fix-runpath
(lambda* (#:key outputs #:allow-other-keys)
(substitute* "ghmmwrapper/setup.py"
@@ -246,8 +241,7 @@ classification.")
line
"\"-Wl,-rpath="
(assoc-ref outputs "out")
- "/lib\", ")))
- #t))
+ "/lib\", ")))))
(add-after 'enter-dir 'disable-broken-tests
(lambda _
(substitute* "tests/Makefile.am"
@@ -267,8 +261,7 @@ classification.")
line indent)
(string-append indent
"@unittest.skip(\"Disabled by Guix\")\n"
- line)))
- #t)))))
+ line))))))))
(inputs
`(("python" ,python-2) ; only Python 2 is supported
("libxml2" ,libxml2)))
@@ -303,7 +296,8 @@ training, HMM clustering, HMM mixtures.")
"15xlax3z31lsn62vlg94hkm75nm40q4679amnfg13jm8m2bnhy5m"))))
(build-system gnu-build-system)
(arguments
- `(#:configure-flags (list "--enable-blast")))
+ `(#:configure-flags (list "--enable-blast"
+ "CFLAGS=-fcommon")))
(inputs
`(("perl" ,perl)))
(home-page "http://micans.org/mcl/")
@@ -341,7 +335,7 @@ networks) based on simulation of (stochastic) flow in graphs.")
(substitute* "setup.ml"
(("LDFLAGS=-fPIC")
(string-append "LDFLAGS=-fPIC\"; \"SHELL=" (which "sh")))
- (("-std=c89") "-std=gnu99")
+ (("-std=c89") "-std=gnu99 -fcommon")
;; This is a mutable string, which is no longer supported. Use
;; a byte buffer instead.
@@ -354,7 +348,7 @@ networks) based on simulation of (stochastic) flow in graphs.")
((" s;")
" s);"))
(substitute* "myocamlbuild.ml"
- (("std=c89") "std=gnu99"))
+ (("std=c89") "std=gnu99 -fcommon"))
;; Since we build with a more recent OCaml, we have to use C99 or
;; later. This causes problems with the old C code.
(substitute* "src/impala/matrix.c"
@@ -946,7 +940,7 @@ computing environments.")
(define-public python-scikit-learn
(package
(name "python-scikit-learn")
- (version "0.24.2")
+ (version "1.0.1")
(source
(origin
(method git-fetch)
@@ -956,7 +950,7 @@ computing environments.")
(file-name (git-file-name name version))
(sha256
(base32
- "0hm92biqwwc87bqnr56lwa5bz77lr7k9q21rdwksnfzq3vsdp2nm"))))
+ "07k92y78sk4074vh5hp8y63pwl592wgl8azrfp0q84chxk8igfx9"))))
(build-system python-build-system)
(arguments
`(#:phases
@@ -964,14 +958,17 @@ computing environments.")
(add-after 'build 'build-ext
(lambda _ (invoke "python" "setup.py" "build_ext" "--inplace")))
(replace 'check
- (lambda _
- ;; Restrict OpenBLAS threads to prevent segfaults while testing!
- (setenv "OPENBLAS_NUM_THREADS" "1")
+ (lambda* (#:key tests? #:allow-other-keys)
+ (when tests?
+ ;; Restrict OpenBLAS threads to prevent segfaults while testing!
+ (setenv "OPENBLAS_NUM_THREADS" "1")
- ;; Some tests require write access to $HOME.
- (setenv "HOME" "/tmp")
+ ;; Some tests require write access to $HOME.
+ (setenv "HOME" "/tmp")
- (invoke "pytest" "sklearn" "-m" "not network")))
+ (invoke "pytest" "sklearn" "-m" "not network"
+ ;; This test tries to access the internet.
+ "-k" "not test_load_boston_alternative"))))
(add-before 'reset-gzip-timestamps 'make-files-writable
(lambda* (#:key outputs #:allow-other-keys)
;; Make sure .gz files are writable so that the
@@ -1014,6 +1011,28 @@ data analysis.")
(sha256
(base32
"08zbzi8yx5wdlxfx9jap61vg1malc9ajf576w7a0liv6jvvrxlpj"))))
+ (arguments
+ `(#:python ,python-2
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'build 'build-ext
+ (lambda _ (invoke "python" "setup.py" "build_ext" "--inplace")))
+ (replace 'check
+ (lambda* (#:key tests? #:allow-other-keys)
+ (when tests?
+ ;; Restrict OpenBLAS threads to prevent segfaults while testing!
+ (setenv "OPENBLAS_NUM_THREADS" "1")
+
+ ;; Some tests require write access to $HOME.
+ (setenv "HOME" "/tmp")
+
+ (invoke "pytest" "sklearn" "-m" "not network"
+ "-k"
+ (string-append
+ ;; This test tries to access the internet.
+ "not test_load_boston_alternative"
+ ;; This test fails for unknown reasons
+ " and not test_rank_deficient_design"))))))))
(inputs
`(("openblas" ,openblas)))
(native-inputs
@@ -1647,7 +1666,7 @@ automatically.")
(let* ((server (string-append bin "/kaldi-gst-server"))
(client (string-append bin "/kaldi-gst-client"))
(worker (string-append bin "/kaldi-gst-worker"))
- (PYTHONPATH (getenv "PYTHONPATH"))
+ (PYTHONPATH (getenv "GUIX_PYTHONPATH"))
(GST_PLUGIN_PATH (string-append
(assoc-ref inputs "gst-kaldi-nnet2-online")
"/lib/gstreamer-1.0:${GST_PLUGIN_PATH}"))
@@ -1656,7 +1675,7 @@ automatically.")
(lambda _
(format #t
"#!~a
-export PYTHONPATH=~a
+export GUIX_PYTHONPATH=~a
export GST_PLUGIN_PATH=~a
exec ~a ~a/~a \"$@\"~%"
(which "bash") PYTHONPATH GST_PLUGIN_PATH
@@ -1750,7 +1769,7 @@ Python.")
((guix build python-build-system)
#:select (python-version)))
#:imported-modules (,@%cmake-build-system-modules
- (guix build python-build-system))
+ (guix build python-build-system))
#:phases
(modify-phases %standard-phases
(add-after 'unpack 'set-source-file-times-to-1980
@@ -1780,10 +1799,9 @@ Python.")
;; https://github.com/tensorflow/tensorflow/issues/34197
(substitute* (find-files "tensorflow/python" ".*\\.cc$")
(("(nullptr,)(\\ +/. tp_print)" _ _ tp_print)
- (string-append "NULL, " tp_print)))
- #t))
+ (string-append "NULL, " tp_print)))))
(add-after 'python3.7-compatibility 'chdir
- (lambda _ (chdir "tensorflow/contrib/cmake") #t))
+ (lambda _ (chdir "tensorflow/contrib/cmake")))
(add-after 'chdir 'disable-downloads
(lambda* (#:key inputs #:allow-other-keys)
(substitute* (find-files "external" "\\.cmake$")
@@ -1798,36 +1816,31 @@ Python.")
;; Sqlite
(("include\\(sqlite\\)") "")
(("\\$\\{sqlite_STATIC_LIBRARIES\\}")
- (string-append (assoc-ref inputs "sqlite")
- "/lib/libsqlite3.so"))
+ (search-input-file inputs "/lib/libsqlite3.so"))
(("sqlite_copy_headers_to_destination") "")
;; PNG
(("include\\(png\\)") "")
(("\\$\\{png_STATIC_LIBRARIES\\}")
- (string-append (assoc-ref inputs "libpng")
- "/lib/libpng16.so"))
+ (search-input-file inputs "/lib/libpng16.so"))
(("png_copy_headers_to_destination") "")
;; JPEG
(("include\\(jpeg\\)") "")
(("\\$\\{jpeg_STATIC_LIBRARIES\\}")
- (string-append (assoc-ref inputs "libjpeg")
- "/lib/libjpeg.so"))
+ (search-input-file inputs "/lib/libjpeg.so"))
(("jpeg_copy_headers_to_destination") "")
;; GIF
(("include\\(gif\\)") "")
(("\\$\\{gif_STATIC_LIBRARIES\\}")
- (string-append (assoc-ref inputs "giflib")
- "/lib/libgif.so"))
+ (search-input-file inputs "/lib/libgif.so"))
(("gif_copy_headers_to_destination") "")
;; lmdb
(("include\\(lmdb\\)") "")
(("\\$\\{lmdb_STATIC_LIBRARIES\\}")
- (string-append (assoc-ref inputs "lmdb")
- "/lib/liblmdb.so"))
+ (search-input-file inputs "/lib/liblmdb.so"))
(("lmdb_copy_headers_to_destination") "")
;; Protobuf
@@ -1879,8 +1892,7 @@ set(eigen_INCLUDE_DIRS ${CMAKE_CURRENT_BINARY_DIR}/external/eigen_archive "
(("tf_core_cpu grpc") "tf_core_cpu"))
;; This directory is a dependency of many targets.
- (mkdir-p "protobuf")
- #t))
+ (mkdir-p "protobuf")))
(add-after 'configure 'unpack-third-party-sources
(lambda* (#:key inputs #:allow-other-keys)
;; This is needed to configure bundled packages properly.
@@ -1920,8 +1932,7 @@ set(eigen_INCLUDE_DIRS ${CMAKE_CURRENT_BINARY_DIR}/external/eigen_archive "
"re2"))
(rename-file "../build/cub/src/cub/cub-1.8.0/"
- "../build/cub/src/cub/cub/")
- #t))
+ "../build/cub/src/cub/cub/")))
(add-after 'unpack 'fix-python-build
(lambda* (#:key inputs outputs #:allow-other-keys)
(mkdir-p "protobuf-src")
@@ -1932,9 +1943,6 @@ set(eigen_INCLUDE_DIRS ${CMAKE_CURRENT_BINARY_DIR}/external/eigen_archive "
"-C" "eigen-src" "--strip-components=1")
(substitute* "tensorflow/contrib/cmake/tf_python.cmake"
- ;; Ensure that all Python dependencies can be found at build time.
- (("PYTHONPATH=\\$\\{CMAKE_CURRENT_BINARY_DIR\\}/tf_python" m)
- (string-append m ":" (getenv "PYTHONPATH")))
;; Take protobuf source files from our source package.
(("\\$\\{CMAKE_CURRENT_BINARY_DIR\\}/protobuf/src/protobuf/src/google")
(string-append (getcwd) "/protobuf-src/src/google")))
@@ -1946,7 +1954,7 @@ set(eigen_INCLUDE_DIRS ${CMAKE_CURRENT_BINARY_DIR}/external/eigen_archive "
(string-append (getcwd) "/eigen-src/"))
;; Take Eigen headers from our own package.
(("\\$\\{CMAKE_CURRENT_BINARY_DIR\\}/external/eigen_archive")
- (string-append (assoc-ref inputs "eigen") "/include/eigen3")))
+ (search-input-directory inputs "/include/eigen3")))
;; Correct the RUNPATH of ops libraries generated for Python.
;; TODO: this doesn't work :(
@@ -1960,21 +1968,22 @@ set(eigen_INCLUDE_DIRS ${CMAKE_CURRENT_BINARY_DIR}/external/eigen_archive "
(string-append "set_target_properties(${_AT_TARGET} PROPERTIES \
COMPILE_FLAGS ${target_compile_flags} \
INSTALL_RPATH_USE_LINK_PATH TRUE \
-INSTALL_RPATH " (assoc-ref outputs "out") "/lib)\n")))
- #t))
+INSTALL_RPATH " (assoc-ref outputs "out") "/lib)\n")))))
(add-after 'build 'build-pip-package
- (lambda* (#:key outputs #:allow-other-keys)
+ (lambda* (#:key outputs parallel-build? #:allow-other-keys)
(setenv "LDFLAGS"
(string-append "-Wl,-rpath="
(assoc-ref outputs "out") "/lib"))
- (invoke "make" "tf_python_build_pip_package")
- #t))
+ (invoke "make" "-j" (if parallel-build?
+ (number->string (parallel-job-count))
+ "1")
+ "tf_python_build_pip_package")))
(add-after 'build-pip-package 'install-python
(lambda* (#:key inputs outputs #:allow-other-keys)
(let ((out (assoc-ref outputs "out"))
(wheel (car (find-files "../build/tf_python/dist/" "\\.whl$")))
(python-version (python-version
- (assoc-ref inputs "python"))))
+ (assoc-ref inputs "python"))))
(invoke "python" "-m" "pip" "install" wheel
(string-append "--prefix=" out))
@@ -1983,8 +1992,7 @@ INSTALL_RPATH " (assoc-ref outputs "out") "/lib)\n")))
(string-append
out "/lib/python" python-version
"/site-packages/tensorflow/contrib/"
- "seq2seq/python/ops/lib_beam_search_ops.so"))
- #t))))))
+ "seq2seq/python/ops/lib_beam_search_ops.so"))))))))
(native-inputs
`(("pkg-config" ,pkg-config)
("protobuf:native" ,protobuf-3.6) ; protoc
@@ -2244,7 +2252,7 @@ advanced research.")
(install-file file target-dir)))
(find-files "." "\\.h$")))))))))
(inputs
- `(("abseil-cpp" ,abseil-cpp)
+ `(("abseil-cpp" ,abseil-cpp-20200923.3)
("eigen" ,eigen-for-tensorflow-lite)
("flatbuffers" ,flatbuffers)
("python" ,python)))
@@ -2552,24 +2560,31 @@ with image data, text data, and sequence data.")
(delete-file "keras/backend/theano_backend.py")
(delete-file "keras/backend/cntk_backend.py")
(delete-file "tests/keras/backend/backend_test.py")
-
;; FIXME: This doesn't work because Tensorflow is missing the
;; coder ops library.
- (delete-file "tests/keras/test_callbacks.py")
- #t))
+ (delete-file "tests/keras/test_callbacks.py")))
(replace 'check
- (lambda _
- ;; These tests attempt to download data files from the internet.
- (delete-file "tests/integration_tests/test_datasets.py")
- (delete-file "tests/integration_tests/imagenet_utils_test.py")
- ;; Backport https://github.com/keras-team/keras/pull/12479.
- (substitute* "tests/keras/engine/test_topology.py"
- (("np.ones\\(\\(3, 2\\)\\)")
- "1."))
- (invoke "python" "-m" "pytest"
- ;; The following test fail only in the build container;
- ;; skip it.
- "-k" "not test_selu"))))))
+ (lambda* (#:key tests? #:allow-other-keys)
+ (when tests?
+ ;; These tests attempt to download data files from the internet.
+ (delete-file "tests/integration_tests/test_datasets.py")
+ (delete-file "tests/integration_tests/imagenet_utils_test.py")
+ ;; Backport https://github.com/keras-team/keras/pull/12479.
+ (substitute* "tests/keras/engine/test_topology.py"
+ (("np.ones\\(\\(3, 2\\)\\)")
+ "1."))
+ (invoke "python" "-m" "pytest" "tests"
+ "-p" "no:pep8"
+ ;; FIXME: python-build-system lacks PARALLEL-TESTS?
+ "-n" (number->string (parallel-job-count))
+ "-k"
+ (string-append
+ ;; The following test fails only in the build
+ ;; container; skip it.
+ "not test_selu "
+ ;; The following test was found flaky and removed in
+ ;; recent versions.
+ "and not test_stateful_metrics"))))))))
(propagated-inputs
`(("python-h5py" ,python-h5py)
("python-keras-applications" ,python-keras-applications)
@@ -2596,7 +2611,6 @@ with image data, text data, and sequence data.")
and capable of running on top of TensorFlow. It was developed with a focus on
enabling fast experimentation. Use Keras if you need a deep learning library
that:
-
@itemize
@item Allows for easy and fast prototyping (through user friendliness,
modularity, and extensibility).
@@ -2836,13 +2850,10 @@ TensorFlow.js, PyTorch, and MediaPipe.")
(lambda* (#:key inputs outputs tests? #:allow-other-keys)
;; Run the test suite following the instructions in
;; 'CONTRIBUTING.md'. XXX: Unfortunately this doesn't
- ;; work, unless you set PYTHONPATH presumably.
+ ;; work, unless you set GUIX_PYTHONPATH presumably.
(when tests?
- (let ((python-site (site-packages inputs outputs)))
- (setenv "PYTHONPATH"
- (string-append python-site ":"
- (getenv "PYTHONPATH")))
- (invoke "python" "test/run_test.py")))))
+ (add-installed-pythonpath inputs outputs)
+ (invoke "python" "test/run_test.py"))))
(add-after 'install 'remove-test-executables
(lambda* (#:key inputs outputs #:allow-other-keys)
;; Remove test executables, but keep other executables
@@ -2855,6 +2866,7 @@ TensorFlow.js, PyTorch, and MediaPipe.")
;; XXX: Tests attempt to download data such as
;; <https://raw.githubusercontent.com/pytorch/test-infra/master/stats/slow-tests.json>.
+ ;; We're also missing some Python modules, such as expecttest.
#:tests? #f))
(native-inputs
`(("cmake" ,cmake)
@@ -2878,6 +2890,7 @@ TensorFlow.js, PyTorch, and MediaPipe.")
("zstd" ,zstd)))
(propagated-inputs
`(("python-astunparse" ,python-astunparse)
+ ("python-click" ,python-click)
("python-numpy" ,python-numpy)
("python-pyyaml" ,python-pyyaml)
("python-cffi" ,python-cffi)
diff --git a/gnu/packages/mail.scm b/gnu/packages/mail.scm
index e52b48a2d6..5863ea8788 100644
--- a/gnu/packages/mail.scm
+++ b/gnu/packages/mail.scm
@@ -40,6 +40,7 @@
;;; 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>
@@ -728,13 +729,14 @@ It adds a large amount of new and improved features to mutt.")
(native-inputs
`(("pkg-config" ,pkg-config)
("gnupg" ,gnupg) ; for tests only
- ("gobject-introspection" ,gobject-introspection)))
+ ("gobject-introspection" ,gobject-introspection)
+ ("vala" ,vala)))
(inputs `(("glib" ,glib)
("gpgme" ,gpgme)
("zlib" ,zlib)))
(arguments
`(#:configure-flags
- (list "--enable-introspection=yes")
+ (list "--enable-introspection=yes" "--enable-vapigen=yes")
#:phases
(modify-phases %standard-phases
(add-after
@@ -923,7 +925,7 @@ mailpack. What can alterMIME do?
`(("boost" ,boost)
("gmime" ,gmime)
("gobject-introspection" ,gobject-introspection) ; it is referenced
- ("gtkmm" ,gtkmm)
+ ("gtkmm" ,gtkmm-3)
("libpeas" ,libpeas)
("libsass" ,libsass)
("notmuch" ,notmuch)
@@ -1221,8 +1223,7 @@ security functionality including PGP, S/MIME, SSH, and SSL.")
(lambda* (#:key inputs #:allow-other-keys)
;; For mu/test/test-mu-query.c
(setenv "TZDIR"
- (string-append (assoc-ref inputs "tzdata")
- "/share/zoneinfo"))))
+ (search-input-directory inputs "share/zoneinfo"))))
(add-after 'install 'install-emacs-autoloads
(lambda* (#:key outputs #:allow-other-keys)
(emacs-generate-autoloads
@@ -1332,7 +1333,7 @@ Notmuch.")
(let* ((out (assoc-ref outputs "out"))
(bin (string-append out "/bin/notifymuch")))
(wrap-program bin
- `("PYTHONPATH" ":" prefix (,(getenv "PYTHONPATH")))
+ `("GUIX_PYTHONPATH" ":" prefix (,(getenv "GUIX_PYTHONPATH")))
`("GI_TYPELIB_PATH" ":" prefix
(,(getenv "GI_TYPELIB_PATH")
,(string-append out "/lib/girepository-1.0")))))
@@ -1685,8 +1686,8 @@ compresses it.")
(lambda* (#:key inputs #:allow-other-keys)
(substitute* "src/procmime.c"
(("/usr/share/mime/globs")
- (string-append (assoc-ref inputs "shared-mime-info")
- "/share/mime/globs"))))))))
+ (search-input-directory inputs
+ "/share/mime/globs"))))))))
(native-inputs
`(("bison" ,bison)
;;("docbook-utils" ,docbook-utils)
@@ -1705,7 +1706,7 @@ compresses it.")
("enchant" ,enchant)
("expat" ,expat)
("fontconfig" ,fontconfig)
- ("gdk-pixbuf+svg" ,gdk-pixbuf+svg)
+ ("librsvg" ,librsvg)
("ghostscript" ,ghostscript)
("glib" ,glib)
("gnupg" ,gnupg)
@@ -1933,11 +1934,7 @@ facilities for checking incoming mail.")
("icu4c" ,icu4c)
("libsodium" ,libsodium) ; extra password algorithms
("libstemmer" ,libstemmer)
- ;; FIXME: The 'test-backtrace' tests fail on arm when using glibc's
- ;; backtrace_symbol() function so fallback to using libunwind.
- ,@(if (target-arm?)
- `(("libunwind" ,libunwind))
- '())
+ ("libunwind" ,libunwind)
("linux-pam" ,linux-pam)
("lz4" ,lz4)
("openssl" ,openssl)
@@ -3023,6 +3020,7 @@ transfer protocols.")
(let ((out (assoc-ref outputs "out"))
(path (getenv "PERL5LIB")))
(wrap-script (string-append out "/bin/sieve-connect")
+ #:guile (search-input-file inputs "bin/guile")
`("PERL5LIB" ":" = (,path)))
#t))))))
(inputs
@@ -3361,14 +3359,14 @@ filtering, digest delivery, and more.")
(define-public python-mailmanclient
(package
(name "python-mailmanclient")
- (version "3.3.1")
+ (version "3.3.3")
(source
(origin
(method url-fetch)
(uri (pypi-uri "mailmanclient" version))
(sha256
(base32
- "0pjgzpvhdb6ql8asb20xr8d01m646zpghmcp9fmscks0n1k4di4g"))))
+ "0ppqnv84v7npgjykhqdy5c38vanz4l0qw871kpsl27z4fm365zlj"))))
(build-system python-build-system)
(arguments
`(#:tests? #f)) ; Requires mailman running
@@ -3467,14 +3465,14 @@ installation on systems where resources are limited. Its features include:
(define-public python-django-mailman3
(package
(name "python-django-mailman3")
- (version "1.3.4")
+ (version "1.3.7")
(source
(origin
(method url-fetch)
(uri (pypi-uri "django-mailman3" version))
(sha256
(base32
- "1yrm7wpjy34xai72vn2vkhc9131cdrbqy08rrabf36kynj5vcdvy"))))
+ "1dzycnwdr1gavs1dgmcv1lz24x0fkp8y864fy52fgbz72d6c5a3f"))))
(build-system python-build-system)
(arguments
'(#:phases
@@ -3503,24 +3501,14 @@ interacting with Mailman.")
(define-public python-mailman-hyperkitty
(package
(name "python-mailman-hyperkitty")
- (version "1.1.0")
+ (version "1.2.0")
(source
(origin
(method url-fetch)
(uri (pypi-uri "mailman-hyperkitty" version))
(sha256
(base32
- "1lfqa9admhvdv71f528jmz2wl0i5cv77v6l64px2pm4zqr9ckkjx"))
- (patches
- (list
- (origin
- ;; see: https://gitlab.com/mailman/mailman-hyperkitty/issues/17
- ;; fixes test_archive_message_unserializable
- (method url-fetch)
- (uri "https://salsa.debian.org/mailman-team/mailman-hyperkitty/raw/debian/1.1.0-9/debian/patches/0002-Skip-the-test_archive_message_unserializable.patch")
- (sha256
- (base32
- "0p1fwm46c4bl81lvsg3kjhn2r1lwgkpgxamb3xyqn7h9qdrw10hw")))))))
+ "1ni6vf1yi14c0l895fk278x4na7ymhpkl1q0vnpzbkzplpa7200i"))))
(build-system python-build-system)
(propagated-inputs
`(("python-requests" ,python-requests)
@@ -3543,26 +3531,26 @@ which sends emails to HyperKitty, the official Mailman3 web archiver.")
(define-public python-hyperkitty
(package
(name "python-hyperkitty")
- (version "1.3.3")
+ (version "1.3.5")
(source
(origin
(method url-fetch)
(uri (pypi-uri "HyperKitty" version))
(sha256
(base32
- "0p85r9q6mn5as5b39xp9hkkipnk0156acx540n2ygk3qb3jd4a5n"))))
+ "11lz1s2p8n43h1cdr9l5dppsigg8qdppckdwdndzn7a8r8mj4sc2"))))
(build-system python-build-system)
(arguments
'(#:phases
(modify-phases %standard-phases
(replace 'check
(lambda _
- (setenv "PYTHONPATH" (string-append ".:" (getenv "PYTHONPATH")))
(invoke "example_project/manage.py" "test"
- "--settings=hyperkitty.tests.settings_test"))))))
+ "--settings=hyperkitty.tests.settings_test"
+ "--pythonpath=."))))))
(propagated-inputs
`(("python-dateutil" ,python-dateutil)
- ("python-django" ,python-django-2.2)
+ ("python-django" ,python-django)
("python-django-compressor" ,python-django-compressor)
("python-django-extensions" ,python-django-extensions)
("python-django-gravatar2" ,python-django-gravatar2)
@@ -3572,6 +3560,7 @@ which sends emails to HyperKitty, the official Mailman3 web archiver.")
("python-djangorestframework" ,python-djangorestframework)
("python-flufl-lock" ,python-flufl-lock)
("python-mailmanclient" ,python-mailmanclient)
+ ("python-mistune-next" ,python-mistune-next)
("python-networkx" ,python-networkx)
("python-pytz" ,python-pytz)
("python-robot-detection" ,python-robot-detection)))
@@ -3579,6 +3568,7 @@ which sends emails to HyperKitty, the official Mailman3 web archiver.")
`(("python-beautifulsoup4" ,python-beautifulsoup4)
("python-elasticsearch" ,python-elasticsearch)
("python-isort" ,python-isort)
+ ("python-lxml" ,python-lxml)
("python-mock" ,python-mock)
("python-whoosh" ,python-whoosh)))
(home-page "https://gitlab.com/mailman/hyperkitty")
@@ -4189,7 +4179,7 @@ Git and exports them in maildir format or to an MDA through a pipe.")
;; 'git' is invoked in various files of the PublicInbox
;; perl module.
`("PATH" ":" prefix
- (,(string-append (assoc-ref inputs "git") "/bin")))))
+ (,(dirname (search-input-file inputs "/bin/git"))))))
(find-files (string-append out "/bin"))))
#t)))))
(native-inputs
diff --git a/gnu/packages/make-bootstrap.scm b/gnu/packages/make-bootstrap.scm
index cdcb1dcaa2..4ea97368a9 100644
--- a/gnu/packages/make-bootstrap.scm
+++ b/gnu/packages/make-bootstrap.scm
@@ -1,11 +1,12 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2017, 2021 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
;;; Copyright © 2018, 2019 Mark H Weaver <mhw@netris.org>
;;; Copyright © 2018, 2019, 2021 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
;;; Copyright © 2019, 2020 Marius Bakke <mbakke@fastmail.com>
;;; Copyright © 2020 Mathieu Othacehe <m.othacehe@gmail.com>
+;;; Copyright © 2021 Pierre Langlois <pierre.langlois@gmx.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -23,13 +24,14 @@
;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
(define-module (gnu packages make-bootstrap)
+ #:use-module (guix gexp)
#:use-module (guix utils)
#:use-module (guix packages)
#:use-module (guix memoization)
#:use-module ((guix licenses) #:select (gpl3+))
#:use-module (guix build-system trivial)
#:use-module (guix build-system gnu)
- #:use-module ((gnu packages) #:select (search-patch))
+ #:use-module ((gnu packages) #:select (search-patch search-patches))
#:use-module (gnu packages base)
#:use-module (gnu packages cross-base)
#:use-module (gnu packages bash)
@@ -72,8 +74,10 @@ for `sh' in $PATH, and without nscd, and with static NSS modules."
(package
(inherit base)
(source (origin (inherit (package-source base))
- (patches (cons (search-patch "glibc-bootstrap-system.patch")
- (origin-patches (package-source base))))))
+ (patches (append (search-patches
+ "glibc-bootstrap-system.patch"
+ "glibc-static-nss.patch")
+ (origin-patches (package-source base))))))
(arguments
(substitute-keyword-arguments (package-arguments base)
((#:configure-flags flags)
@@ -83,6 +87,12 @@ for `sh' in $PATH, and without nscd, and with static NSS modules."
"--enable-static-nss"
,flags))))
+ ;; Make sure to build glibc with the same compiler version as the rest
+ ;; of the bootstrap. Otherwise it fails to statically link on aarch64.
+ (native-inputs
+ `(("gcc" ,gcc-7)
+ ,@(package-native-inputs base)))
+
;; Remove the 'debug' output to allow bit-reproducible builds (when the
;; 'debug' output is used, ELF files end up with a .gnu_debuglink, which
;; includes a CRC of the corresponding debugging symbols; those symbols
@@ -203,8 +213,17 @@ for `sh' in $PATH, and without nscd, and with static NSS modules."
(("^xz_LDADD =")
"xz_LDADD = -all-static"))
#t)))))))
- (gawk (package (inherit gawk)
- (source (origin (inherit (package-source gawk))
+ (gawk (package
+ (inherit gawk)
+ (source (origin
+ (inherit (package-source gawk))
+ (modules '((guix build utils)))
+ (snippet
+ ;; Do not build 'getopt.c' since that leads to a
+ ;; link failure due to duplicate symbols with
+ ;; 'libc.a'.
+ '(substitute* "support/Makefile.in"
+ (("getopt\\.\\$\\(OBJEXT\\)") "")))
(patches (cons (search-patch "gawk-shell.patch")
(origin-patches
(package-source gawk))))))
@@ -213,7 +232,9 @@ for `sh' in $PATH, and without nscd, and with static NSS modules."
;; plug-in mechanism just fail on static builds:
;;
;; ./fts.awk:1: error: can't open shared library `filefuncs' for reading (No such file or directory)
- #:tests? #f
+ ;;
+ ;; Therefore disable extensions support.
+ #:configure-flags (list "--disable-extensions")
,@(substitute-keyword-arguments (package-arguments gawk)
((#:phases phases)
@@ -260,19 +281,9 @@ for `sh' in $PATH, and without nscd, and with static NSS modules."
(delete 'fix-egrep-and-fgrep)))))))
(finalize (compose static-package
package-with-relocatable-glibc)))
- `(,@(map (match-lambda
- ((name package)
- (list name (finalize package))))
- `(("tar" ,tar)
- ("gzip" ,gzip)
- ("bzip2" ,bzip2)
- ("xz" ,xz)
- ("patch" ,patch)
- ("coreutils" ,coreutils)
- ("sed" ,sed)
- ("grep" ,grep)
- ("gawk" ,gawk)))
- ("bash" ,static-bash))))
+ (append (map finalize
+ (list tar gzip bzip2 xz patch coreutils sed grep gawk))
+ (list static-bash))))
(define %static-binaries
(package
@@ -317,7 +328,10 @@ for `sh' in $PATH, and without nscd, and with static NSS modules."
;; same name as the input.
(for-each (match-lambda
((name . dir)
- (let ((source (string-append dir "/bin/" name)))
+ (let* ((name (if (string-prefix? "bash" name)
+ "bash"
+ name))
+ (source (string-append dir "/bin/" name)))
(format #t "copying ~s...~%" source)
(copy-file source
(string-append bin "/" name)))))
@@ -362,7 +376,7 @@ for `sh' in $PATH, and without nscd, and with static NSS modules."
(out (assoc-ref %outputs "out")))
(copy-linux-headers out in)
#t))))
- (inputs `(("linux-libre-headers" ,linux-libre-headers)))))
+ (inputs (list linux-libre-headers))))
(define %binutils-static
;; Statically-linked Binutils.
@@ -374,10 +388,6 @@ for `sh' in $PATH, and without nscd, and with static NSS modules."
(package-arguments binutils))
((#:configure-flags flags _ ...)
flags)))
- #:make-flags ,(match (memq #:make-flags (package-arguments binutils))
- ((#:make-flags flags _ ...)
- flags)
- (_ ''()))
#:strip-flags '("--strip-all")
#:phases (modify-phases %standard-phases
(add-before 'configure 'all-static
@@ -395,32 +405,31 @@ for `sh' in $PATH, and without nscd, and with static NSS modules."
(define %binutils-static-stripped
;; The subset of Binutils that we need.
- (package (inherit %binutils-static)
+ (package
+ (inherit %binutils-static)
(name (string-append (package-name %binutils-static) "-stripped"))
(build-system trivial-build-system)
(outputs '("out"))
(arguments
- `(#:modules ((guix build utils))
- #:builder
- (begin
- (use-modules (guix build utils))
-
- (setvbuf (current-output-port)
- (cond-expand (guile-2.0 _IOLBF) (else 'line)))
- (let* ((in (assoc-ref %build-inputs "binutils"))
- (out (assoc-ref %outputs "out"))
- (bin (string-append out "/bin")))
- (mkdir-p bin)
- (for-each (lambda (file)
- (let ((target (string-append bin "/" file)))
- (format #t "copying `~a'...~%" file)
- (copy-file (string-append in "/bin/" file)
- target)
- (remove-store-references target)))
- '("ar" "as" "ld" "nm" "objcopy" "objdump"
- "ranlib" "readelf" "size" "strings" "strip"))
- #t))))
- (inputs `(("binutils" ,%binutils-static)))))
+ (list #:modules '((guix build utils))
+ #:builder
+ #~(begin
+ (use-modules (guix build utils))
+
+ (setvbuf (current-output-port)
+ (cond-expand (guile-2.0 _IOLBF) (else 'line)))
+ (let* ((in #$%binutils-static)
+ (out #$output)
+ (bin (string-append out "/bin")))
+ (mkdir-p bin)
+ (for-each (lambda (file)
+ (let ((target (string-append bin "/" file)))
+ (format #t "copying `~a'...~%" file)
+ (copy-file (string-append in "/bin/" file)
+ target)
+ (remove-store-references target)))
+ '("ar" "as" "ld" "nm" "objcopy" "objdump"
+ "ranlib" "readelf" "size" "strings" "strip"))))))))
(define (%glibc-stripped)
;; GNU libc's essential shared libraries, dynamic linker, and headers,
@@ -441,7 +450,7 @@ for `sh' in $PATH, and without nscd, and with static NSS modules."
(assoc-ref %build-inputs "kernel-headers")))))
(inputs `(("kernel-headers"
,(if (or (and (%current-target-system)
- (hurd-triplet? (%current-target-system)))
+ (target-hurd? (%current-target-system)))
(string-suffix? "-hurd" (%current-system)))
gnumach-headers
linux-libre-headers))
@@ -533,66 +542,64 @@ for `sh' in $PATH, and without nscd, and with static NSS modules."
(define %gcc-stripped
;; The subset of GCC files needed for bootstrap.
- (package (inherit gcc-7)
+ (package
+ (inherit gcc-7)
(name "gcc-stripped")
(build-system trivial-build-system)
(source #f)
(outputs '("out")) ;only one output
(arguments
- `(#:modules ((guix build utils))
- #:builder
- (begin
- (use-modules (srfi srfi-1)
- (srfi srfi-26)
- (guix build utils))
-
- (setvbuf (current-output-port)
- (cond-expand (guile-2.0 _IOLBF) (else 'line)))
- (let* ((out (assoc-ref %outputs "out"))
- (bindir (string-append out "/bin"))
- (libdir (string-append out "/lib"))
- (includedir (string-append out "/include"))
- (libexecdir (string-append out "/libexec"))
- (gcc (assoc-ref %build-inputs "gcc")))
- (copy-recursively (string-append gcc "/bin") bindir)
- (for-each remove-store-references
- (find-files bindir ".*"))
-
- (copy-recursively (string-append gcc "/lib") libdir)
- (for-each remove-store-references
- (remove (cut string-suffix? ".h" <>)
- (find-files libdir ".*")))
-
- (copy-recursively (string-append gcc "/libexec")
- libexecdir)
- (for-each remove-store-references
- (find-files libexecdir ".*"))
-
- ;; Starting from GCC 4.8, helper programs built natively
- ;; (‘genchecksum’, ‘gcc-nm’, etc.) rely on C++ headers.
- (copy-recursively (string-append gcc "/include/c++")
- (string-append includedir "/c++"))
-
- ;; For native builds, check whether the binaries actually work.
- ,@(if (%current-target-system)
- '()
- '((for-each (lambda (prog)
- (invoke (string-append gcc "/bin/" prog)
- "--version"))
- '("gcc" "g++" "cpp"))))
-
- #t))))
- (inputs `(("gcc" ,%gcc-static)))))
+ (list #:modules '((guix build utils))
+ #:builder
+ #~(begin
+ (use-modules (srfi srfi-1)
+ (srfi srfi-26)
+ (guix build utils))
+
+ (setvbuf (current-output-port)
+ (cond-expand (guile-2.0 _IOLBF) (else 'line)))
+ (let* ((out #$output)
+ (bindir (string-append out "/bin"))
+ (libdir (string-append out "/lib"))
+ (includedir (string-append out "/include"))
+ (libexecdir (string-append out "/libexec"))
+ (gcc #$%gcc-static))
+ (copy-recursively (string-append gcc "/bin") bindir)
+ (for-each remove-store-references
+ (find-files bindir ".*"))
+
+ (copy-recursively (string-append gcc "/lib") libdir)
+ (for-each remove-store-references
+ (remove (cut string-suffix? ".h" <>)
+ (find-files libdir ".*")))
+
+ (copy-recursively (string-append gcc "/libexec")
+ libexecdir)
+ (for-each remove-store-references
+ (find-files libexecdir ".*"))
+
+ ;; Starting from GCC 4.8, helper programs built natively
+ ;; (‘genchecksum’, ‘gcc-nm’, etc.) rely on C++ headers.
+ (copy-recursively (string-append gcc "/include/c++")
+ (string-append includedir "/c++"))
+
+ ;; For native builds, check whether the binaries actually work.
+ #$@(if (%current-target-system)
+ '()
+ '((for-each (lambda (prog)
+ (invoke (string-append gcc "/bin/" prog)
+ "--version"))
+ '("gcc" "g++" "cpp"))))))))))
;; Two packages: first build static, bare minimum content.
(define %mescc-tools-static
;; A statically linked MesCC Tools.
(package
- (inherit mescc-tools-0.5.2)
+ (inherit mescc-tools)
(name "mescc-tools-static")
(arguments
`(#:system "i686-linux"
- ,@(substitute-keyword-arguments (package-arguments mescc-tools-0.5.2)
+ ,@(substitute-keyword-arguments (package-arguments mescc-tools)
((#:make-flags flags)
`(cons "CC=gcc -static" ,flags)))))))
@@ -605,52 +612,47 @@ for `sh' in $PATH, and without nscd, and with static NSS modules."
(name (string-append (package-name %mescc-tools-static) "-stripped"))
(build-system trivial-build-system)
(arguments
- `(#:modules ((guix build utils))
- #:builder
- (begin
- (use-modules (guix build utils))
- (let* ((in (assoc-ref %build-inputs "mescc-tools"))
- (out (assoc-ref %outputs "out"))
- (bin (string-append out "/bin")))
- (mkdir-p bin)
- (for-each (lambda (file)
- (let ((target (string-append bin "/" file)))
- (format #t "copying `~a'...~%" file)
- (copy-file (string-append in "/bin/" file)
- target)
- (remove-store-references target)))
- '( "M1" "blood-elf" "hex2"))
- #t))))
- (inputs `(("mescc-tools" ,%mescc-tools-static)))))
+ (list #:modules '((guix build utils))
+ #:builder
+ #~(begin
+ (use-modules (guix build utils))
+ (let* ((in #$%mescc-tools-static)
+ (out #$output)
+ (bin (string-append out "/bin")))
+ (mkdir-p bin)
+ (for-each (lambda (file)
+ (let ((target (string-append bin "/" file)))
+ (format #t "copying `~a'...~%" file)
+ (copy-file (string-append in "/bin/" file)
+ target)
+ (remove-store-references target)))
+ '( "M1" "blood-elf" "hex2"))))))))
;; Two packages: first build static, bare minimum content.
(define-public %mes-minimal
;; A minimal Mes without documentation.
- (let ((triplet "i686-unknown-linux-gnu"))
- (package
- (inherit mes-0.19)
- (name "mes-minimal")
- (native-inputs
- `(("guile" ,guile-2.2)))
- (arguments
- `(#:system "i686-linux"
- #:strip-binaries? #f
- #:configure-flags '("--mes")
- #:phases
- (modify-phases %standard-phases
- (delete 'patch-shebangs)
- (add-after 'install 'strip-install
- (lambda _
- (let* ((out (assoc-ref %outputs "out"))
- (share (string-append out "/share")))
- (delete-file-recursively (string-append out "/lib/guile"))
- (delete-file-recursively (string-append share "/guile"))
- (delete-file-recursively (string-append share "/mes/scaffold"))
-
- (for-each delete-file
- (find-files
- (string-append share "/mes/lib")
- "\\.(h|c)")))))))))))
+ (package
+ (inherit mes)
+ (name "mes-minimal")
+ (native-inputs (list guile-3.0))
+ (arguments
+ `(#:system "i686-linux"
+ #:strip-binaries? #f
+ #:configure-flags '("--mes")
+ #:phases
+ (modify-phases %standard-phases
+ (delete 'patch-shebangs)
+ (add-after 'install 'strip-install
+ (lambda _
+ (let* ((out (assoc-ref %outputs "out"))
+ (share (string-append out "/share")))
+ (delete-file-recursively (string-append out "/lib/guile"))
+ (delete-file-recursively (string-append share "/guile"))
+
+ (for-each delete-file
+ (find-files
+ (string-append share "/mes/lib")
+ "\\.(h|c)"))))))))))
;; next remove store references.
(define %mes-minimal-stripped
@@ -660,21 +662,20 @@ for `sh' in $PATH, and without nscd, and with static NSS modules."
(name (string-append (package-name %mes-minimal) "-stripped"))
(build-system trivial-build-system)
(arguments
- `(#:modules ((guix build utils))
- #:builder
- (begin
- (use-modules (guix build utils))
- (let ((in (assoc-ref %build-inputs "mes"))
- (out (assoc-ref %outputs "out")))
-
- (copy-recursively in out)
- (for-each (lambda (dir)
- (for-each remove-store-references
- (find-files (string-append out "/" dir)
- ".*")))
- '("bin" "share/mes"))
- #t))))
- (inputs `(("mes" ,%mes-minimal)))))
+ (list #:modules '((guix build utils))
+ #:allowed-references '()
+ #:builder
+ #~(begin
+ (use-modules (guix build utils))
+ (let ((in #$%mes-minimal)
+ (out #$output))
+
+ (copy-recursively in out)
+ (for-each (lambda (dir)
+ (for-each remove-store-references
+ (find-files (string-append out "/" dir)
+ ".*")))
+ '("bin" "share/mes"))))))))
(define* (make-guile-static guile patches)
(package-with-relocatable-glibc
@@ -692,25 +693,22 @@ for `sh' in $PATH, and without nscd, and with static NSS modules."
(outputs (delete "debug" (package-outputs guile)))
(inputs
- `(("libunistring:static" ,libunistring "static")
- ,@(package-inputs guile)))
+ (modify-inputs (package-inputs guile)
+ (prepend `(,libunistring "static"))))
(propagated-inputs
- `(("bdw-gc" ,libgc/static-libs)
- ,@(alist-delete "bdw-gc"
- (package-propagated-inputs guile))))
+ (modify-inputs (package-propagated-inputs guile)
+ (replace "bdw-gc" libgc/static-libs)))
(arguments
(substitute-keyword-arguments (package-arguments guile)
((#:configure-flags flags '())
;; When `configure' checks for ltdl availability, it
;; doesn't try to link using libtool, and thus fails
;; because of a missing -ldl. Work around that.
-
- ;; XXX: On ARMv7, disable JIT: it causes crashes with 3.0.2,
- ;; possibly related to <https://bugs.gnu.org/40737>.
- (if (target-arm32?)
- ''("LDFLAGS=-ldl" "--disable-jit")
- ''("LDFLAGS=-ldl")))
+ `(list "LDFLAGS=-ldl" "--enable-mini-gmp"
+ ,@(if (hurd-target?)
+ '("--disable-jit")
+ '())))
((#:phases phases '%standard-phases)
`(modify-phases ,phases
@@ -757,44 +755,41 @@ for `sh' in $PATH, and without nscd, and with static NSS modules."
(build-system trivial-build-system)
(arguments
;; The end result should depend on nothing but itself.
- `(#:allowed-references ("out")
- #:modules ((guix build utils))
- #:builder
- (let ((version ,(version-major+minor (package-version static-guile))))
- (use-modules (guix build utils))
-
- (let* ((in (assoc-ref %build-inputs "guile"))
- (out (assoc-ref %outputs "out"))
- (guile1 (string-append in "/bin/guile"))
- (guile2 (string-append out "/bin/guile")))
- (mkdir-p (string-append out "/share/guile/" version))
- (copy-recursively (string-append in "/share/guile/" version)
- (string-append out "/share/guile/" version))
-
- (mkdir-p (string-append out "/lib/guile/" version "/ccache"))
- (copy-recursively (string-append in "/lib/guile/" version "/ccache")
- (string-append out "/lib/guile/" version "/ccache"))
-
- (mkdir (string-append out "/bin"))
- (copy-file guile1 guile2)
-
- ;; Verify that the relocated Guile works.
- ,@(if (%current-target-system)
- '()
- '((invoke guile2 "--version")))
-
- ;; Strip store references.
- (remove-store-references guile2)
-
- ;; Verify that the stripped Guile works. If it aborts, it could be
- ;; that it tries to open iconv descriptors and fails because libc's
- ;; iconv data isn't available (see `guile-default-utf8.patch'.)
- ,@(if (%current-target-system)
- '()
- '((invoke guile2 "--version")))
-
- #t))))
- (inputs `(("guile" ,static-guile)))
+ (list #:allowed-references '("out")
+ #:modules '((guix build utils))
+ #:builder
+ #~(let ((version #$(version-major+minor (package-version static-guile))))
+ (use-modules (guix build utils))
+
+ (let* ((in #$static-guile)
+ (out #$output)
+ (guile1 (string-append in "/bin/guile"))
+ (guile2 (string-append out "/bin/guile")))
+ (mkdir-p (string-append out "/share/guile/" version))
+ (copy-recursively (string-append in "/share/guile/" version)
+ (string-append out "/share/guile/" version))
+
+ (mkdir-p (string-append out "/lib/guile/" version "/ccache"))
+ (copy-recursively (string-append in "/lib/guile/" version "/ccache")
+ (string-append out "/lib/guile/" version "/ccache"))
+
+ (mkdir (string-append out "/bin"))
+ (copy-file guile1 guile2)
+
+ ;; Verify that the relocated Guile works.
+ #$@(if (%current-target-system)
+ '()
+ '((invoke guile2 "--version")))
+
+ ;; Strip store references.
+ (remove-store-references guile2)
+
+ ;; Verify that the stripped Guile works. If it aborts, it could be
+ ;; that it tries to open iconv descriptors and fails because libc's
+ ;; iconv data isn't available (see `guile-default-utf8.patch'.)
+ #$@(if (%current-target-system)
+ '()
+ '((invoke guile2 "--version")))))))
(outputs '("out"))
(synopsis "Minimal statically-linked and relocatable Guile")))
@@ -809,37 +804,35 @@ for `sh' in $PATH, and without nscd, and with static NSS modules."
(define (tarball-package pkg)
"Return a package containing a tarball of PKG."
- (package (inherit pkg)
+ (package
+ (inherit pkg)
(name (string-append (package-name pkg) "-tarball"))
(build-system trivial-build-system)
- (native-inputs `(("tar" ,tar)
- ("xz" ,xz)))
- (inputs `(("input" ,pkg)))
+ (native-inputs (list tar xz))
(arguments
- (let ((name (package-name pkg))
- (version (package-version pkg)))
- `(#:modules ((guix build utils))
- #:builder
- (begin
- (use-modules (guix build utils))
- (let ((out (assoc-ref %outputs "out"))
- (input (assoc-ref %build-inputs "input"))
- (tar (assoc-ref %build-inputs "tar"))
- (xz (assoc-ref %build-inputs "xz")))
- (mkdir out)
- (set-path-environment-variable "PATH" '("bin") (list tar xz))
- (with-directory-excursion input
- (invoke "tar" "cJvf"
- (string-append out "/"
- ,name "-" ,version
- "-"
- ,(or (%current-target-system)
- (%current-system))
- ".tar.xz")
- "."
- ;; avoid non-determinism in the archive
- "--sort=name" "--mtime=@0"
- "--owner=root:0" "--group=root:0")))))))))
+ (list #:modules '((guix build utils))
+ #:builder
+ #~(begin
+ (use-modules (guix build utils))
+ (let ((out #$output)
+ (input #$pkg)
+ (tar #+(this-package-native-input "tar"))
+ (xz #+(this-package-native-input "xz")))
+ (mkdir out)
+ (set-path-environment-variable "PATH" '("bin") (list tar xz))
+ (with-directory-excursion input
+ (invoke "tar" "cJvf"
+ (string-append out "/"
+ #$(package-name pkg) "-"
+ #$(package-version pkg)
+ "-"
+ #$(or (%current-target-system)
+ (%current-system))
+ ".tar.xz")
+ "."
+ ;; avoid non-determinism in the archive
+ "--sort=name" "--mtime=@0"
+ "--owner=root:0" "--group=root:0"))))))))
(define %bootstrap-binaries-tarball
;; A tarball with the statically-linked bootstrap binaries.
@@ -882,36 +875,38 @@ for `sh' in $PATH, and without nscd, and with static NSS modules."
(source #f)
(build-system trivial-build-system)
(arguments
- `(#:modules ((guix build utils))
- #:builder
- (let ((out (assoc-ref %outputs "out")))
- (use-modules (guix build utils)
- (ice-9 match)
- (srfi srfi-26))
-
- (setvbuf (current-output-port)
- (cond-expand (guile-2.0 _IOLBF) (else 'line)))
- (mkdir out)
- (chdir out)
- (for-each (match-lambda
- ((name . directory)
- (for-each (lambda (file)
- (format #t "~a -> ~a~%" file out)
- (symlink file (basename file)))
- (find-files directory "\\.tar\\."))))
- %build-inputs)
- #t)))
- (inputs `(("guile-tarball" ,%guile-bootstrap-tarball)
- ,@(match (or (%current-target-system) (%current-system))
- ((or "i686-linux" "x86_64-linux")
- `(("bootstrap-mescc-tools" ,%mescc-tools-bootstrap-tarball)
- ("bootstrap-mes" ,%mes-bootstrap-tarball)
- ("bootstrap-linux-libre-headers"
- ,%linux-libre-headers-bootstrap-tarball)))
- (_ `(("gcc-tarball" ,%gcc-bootstrap-tarball)
- ("binutils-tarball" ,%binutils-bootstrap-tarball)
- ("glibc-tarball" ,(%glibc-bootstrap-tarball))
- ("coreutils&co-tarball" ,%bootstrap-binaries-tarball))))))
+ (list #:modules '((guix build utils))
+ #:builder
+ #~(begin
+ (use-modules (guix build utils)
+ (ice-9 match)
+ (srfi srfi-26))
+
+ (define out #$output)
+
+ (setvbuf (current-output-port)
+ (cond-expand (guile-2.0 _IOLBF) (else 'line)))
+ (mkdir out)
+ (chdir out)
+ (for-each (match-lambda
+ ((name . directory)
+ (for-each (lambda (file)
+ (format #t "~a -> ~a~%" file out)
+ (symlink file (basename file)))
+ (find-files directory "\\.tar\\."))))
+ %build-inputs))))
+ (inputs
+ (append (list %guile-bootstrap-tarball)
+ (match (or (%current-target-system) (%current-system))
+ ((or "i686-linux" "x86_64-linux")
+ (list %mescc-tools-bootstrap-tarball
+ %mes-bootstrap-tarball
+ %linux-libre-headers-bootstrap-tarball))
+ (_
+ (list %gcc-bootstrap-tarball
+ %binutils-bootstrap-tarball
+ (%glibc-bootstrap-tarball)
+ %bootstrap-binaries-tarball)))))
(synopsis "Tarballs containing all the bootstrap binaries")
(description synopsis)
(home-page #f)
diff --git a/gnu/packages/man.scm b/gnu/packages/man.scm
index 7db3da2bb7..47c5ae1288 100644
--- a/gnu/packages/man.scm
+++ b/gnu/packages/man.scm
@@ -8,6 +8,8 @@
;;; Copyright © 2018, 2019 Rutger Helling <rhelling@mykolab.com>
;;; Copyright © 2018, 2019 Marius Bakke <mbakke@fastmail.com>
;;; Copyright © 2020 Vincent Legoll <vincent.legoll@gmail.com>
+;;; Copyright © 2021 Guillaume Le Vaillant <glv@posteo.net>
+;;; Copyright © 2021 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -36,6 +38,7 @@
#:use-module (gnu packages dbm)
#:use-module (gnu packages flex)
#:use-module (gnu packages gawk)
+ #:use-module (gnu packages gettext)
#:use-module (gnu packages groff)
#:use-module (gnu packages less)
#:use-module (gnu packages perl)
@@ -50,10 +53,9 @@
(source
(origin
(method url-fetch)
- (uri
- (string-append "https://sourceforge.net/projects/xmltoman/files/"
- "xmltoman/xmltoman-" version ".tar.gz/xmltoman-"
- version ".tar.gz/download"))
+ (uri (string-append "mirror://sourceforge/xmltoman/xmltoman/"
+ "xmltoman-" version ".tar.gz/"
+ "xmltoman-" version ".tar.gz"))
(sha256
(base32 "1c0lvzr7kdy63wbn1jv6s126ds7add3pxqb0vlxd3v5a2sir91wl"))))
(build-system gnu-build-system)
@@ -307,9 +309,11 @@ Linux kernel and C library interfaces employed by user-space programs.")
(license license:gpl2+)))
(define-public help2man
+ ;; TODO: Manual pages for languages not available from the implicit
+ ;; input "locales" contain the original (English) text.
(package
(name "help2man")
- (version "1.47.13")
+ (version "1.48.3")
(source
(origin
(method url-fetch)
@@ -317,18 +321,28 @@ Linux kernel and C library interfaces employed by user-space programs.")
version ".tar.xz"))
(sha256
(base32
- "08q5arxz4j4pyx5q4712c2rn7p7dw7as9xg38yvmsh1c3ynvpy5p"))))
+ "1b58s40dh2lflrkgbyxg1s48p8icb5a5yzp9ch83kg9zchygyqc3"))))
(build-system gnu-build-system)
(arguments `(;; There's no `check' target.
- #:tests? #f))
+ #:tests? #f
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'patch-help2man-with-perl-gettext
+ (lambda* (#:key inputs #:allow-other-keys)
+ (let ((lib (assoc-ref inputs "perl-gettext"))
+ (fmt "use lib '~a/lib/perl5/site_perl';~%~a"))
+ (substitute* "help2man.PL"
+ (("^use Locale::gettext.*$" load)
+ (format #f fmt lib load))))
+ #t)))))
(inputs
`(("perl" ,perl)
- ;; TODO: Add these optional dependencies.
- ;; ("perl-LocaleGettext" ,perl-LocaleGettext)
- ;; ("gettext" ,gettext-minimal)
- ))
+ ,@(if (%current-target-system)
+ '()
+ `(("perl-gettext" ,perl-gettext)))))
(native-inputs
- `(("perl" ,perl)))
+ `(("perl" ,perl)
+ ("gettext" ,gettext-minimal)))
(home-page "https://www.gnu.org/software/help2man/")
(synopsis "Automatically generate man pages from program --help")
(description
diff --git a/gnu/packages/markup.scm b/gnu/packages/markup.scm
index 06e653a1c9..d0b987159f 100644
--- a/gnu/packages/markup.scm
+++ b/gnu/packages/markup.scm
@@ -93,8 +93,7 @@ processing library written in C.")
(let ((source (assoc-ref %build-inputs "source"))
(out (assoc-ref %outputs "out"))
(perlbd (string-append (assoc-ref %build-inputs "perl") "/bin"))
- (unzip (string-append (assoc-ref %build-inputs "unzip")
- "/bin/unzip")))
+ (unzip (search-input-file %build-inputs "/bin/unzip")))
(mkdir-p out)
(with-directory-excursion out
(invoke unzip source)
diff --git a/gnu/packages/mastodon.scm b/gnu/packages/mastodon.scm
index 4847bbeed9..0c759b1c01 100644
--- a/gnu/packages/mastodon.scm
+++ b/gnu/packages/mastodon.scm
@@ -128,7 +128,7 @@ Features include:
("libgee" ,libgee)
("libhandy" ,libhandy)
("libsoup" ,libsoup)
- ("vala" ,vala-0.50)
+ ("vala" ,vala)
("xdg-utils" ,xdg-utils)))
(home-page "https://github.com/bleakgrey/tootle")
(synopsis "GTK3 client for Mastodon")
diff --git a/gnu/packages/mate.scm b/gnu/packages/mate.scm
index ede37fe5d9..c1c24afea4 100644
--- a/gnu/packages/mate.scm
+++ b/gnu/packages/mate.scm
@@ -7,6 +7,7 @@
;;; Copyright © 2019 Guy Fleury Iteriteka <hoonandon@gmail.com>
;;; Copyright © 2020 Jonathan Brielmaier <jonathan.brielmaier@web.de>
;;; Copyright © 2020 Mathieu Othacehe <m.othacehe@gmail.com>
+;;; Copyright © 2021 Guillaume Le Vaillant <glv@posteo.net>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -277,9 +278,7 @@ desktop and the mate-about program.")
(lambda* (#:key inputs #:allow-other-keys)
(substitute* "data/check-timezones.sh"
(("/usr/share/zoneinfo/zone.tab")
- (string-append (assoc-ref inputs "tzdata")
- "/share/zoneinfo/zone.tab")))
- #t)))))
+ (search-input-file inputs "/share/zoneinfo/zone.tab"))))))))
(native-inputs
`(("pkg-config" ,pkg-config)
("intltool" ,intltool)
@@ -290,7 +289,7 @@ desktop and the mate-about program.")
("tzdata" ,tzdata)))
(propagated-inputs
;; both of these are requires.private in mateweather.pc
- `(("libsoup" ,libsoup)
+ `(("libsoup-minimal" ,libsoup-minimal-2)
("libxml2" ,libxml2)))
(home-page "https://mate-desktop.org/")
(synopsis "MATE library for weather information from the Internet")
@@ -474,7 +473,7 @@ sound systems.")
("gobject-introspection" ,gobject-introspection)))
(inputs
`(("cairo" ,cairo)
- ("gdk-pixbuf" ,gdk-pixbuf+svg)
+ ("librsvg" ,(librsvg-for-system))
("glib" ,glib)
("gtk+" ,gtk+)
("libx11" ,libx11)
@@ -686,7 +685,7 @@ mate-volume-control, a MATE volume control application and applet.")
("libcanberra" ,libcanberra)
("libice" ,libice)
("libmateweather" ,libmateweather)
- ("librsvg" ,librsvg)
+ ("librsvg" ,(librsvg-for-system))
("libsm" ,libsm)
("libx11" ,libx11)
("libxau" ,libxau)
@@ -710,7 +709,7 @@ infamous 'Wanda the Fish'.")
(define-public atril
(package
(name "atril")
- (version "1.22.0")
+ (version "1.24.0")
(source
(origin
(method url-fetch)
@@ -718,7 +717,7 @@ infamous 'Wanda the Fish'.")
name "-" version ".tar.xz"))
(sha256
(base32
- "1xd49j4qwrlg2nh2zvspf91yk033dp8a58dy9azqg2yz4bcvywxb"))))
+ "0967gxw7h2qh2kpwl0jgv58hicz6aa92kr12mnykbpikad25s95y"))))
(build-system glib-or-gtk-build-system)
(arguments
`(#:configure-flags (list (string-append "--with-openjpeg="
@@ -762,6 +761,7 @@ infamous 'Wanda the Fish'.")
("glib:bin" ,glib "bin")
("gobject-introspection" ,gobject-introspection)
("gtk-doc" ,gtk-doc)
+ ("texlive-bin" ,texlive-bin) ;synctex
("xmllint" ,libxml2)
("zlib" ,zlib)))
(inputs
@@ -788,14 +788,14 @@ infamous 'Wanda the Fish'.")
("libgxps" ,libgxps)
("libjpeg" ,libjpeg-turbo)
("libxml2" ,libxml2)
- ("dogtail" ,python2-dogtail)
+ ("dogtail" ,python-dogtail)
("shared-mime-info" ,shared-mime-info)
("gdk-pixbuf" ,gdk-pixbuf)
("gsettings-desktop-schemas" ,gsettings-desktop-schemas)
("libgnome-keyring" ,libgnome-keyring)
("libarchive" ,libarchive)
("marco" ,marco)
- ("openjpeg" ,openjpeg-1)
+ ("openjpeg" ,openjpeg)
("pango" ,pango)
;;("texlive" ,texlive)
;; TODO:
@@ -983,8 +983,7 @@ icons on the MATE desktop. It works on local and remote file systems.")
("polkit" ,polkit)
("startup-notification" ,startup-notification)))
(propagated-inputs
- `(("gdk-pixbuf" ,gdk-pixbuf+svg) ; mate-slab.pc
- ("librsvg" ,librsvg))) ; mate-slab.pc
+ `(("librsvg" ,(librsvg-for-system)))) ;mate-slab.pc
(home-page "https://mate-desktop.org/")
(synopsis "MATE Desktop configuration tool")
(description
@@ -1219,7 +1218,7 @@ Re-decorates windows on un-maximise.
("dbus-glib" ,dbus-glib)
("glib" ,glib)
("gtk+" ,gtk+)
- ("gdk-pixbuf" ,gdk-pixbuf+svg)
+ ("librsvg" ,(librsvg-for-system))
("libcanberra" ,libcanberra)
("libglade" ,libglade)
("libmatekbd" ,libmatekbd)
@@ -1271,7 +1270,7 @@ can be used as backgrounds in the MATE Desktop environment.")
("cairo" ,cairo)
("glib" ,glib)
("gtk+" ,gtk+)
- ("gdk-pixbuf" ,gdk-pixbuf+svg)
+ ("librsvg" ,(librsvg-for-system))
("libcanberra" ,libcanberra)
("libgtop" ,libgtop)
("libx11" ,libx11)
@@ -1324,7 +1323,6 @@ can be used as backgrounds in the MATE Desktop environment.")
("exempi" ,exempi)
("glib" ,glib)
("gtk+" ,gtk+)
- ("gdk-pixbuf" ,gdk-pixbuf+svg)
("libcanberra" ,libcanberra)
("libx11" ,libx11)
("libxext" ,libxext)
@@ -1332,7 +1330,7 @@ can be used as backgrounds in the MATE Desktop environment.")
("libxml2" ,libxml2)
("libexif" ,libexif)
("libjpeg" ,libjpeg-turbo)
- ("librsvg" ,librsvg)
+ ("librsvg" ,(librsvg-for-system))
("lcms" ,lcms)
("mate-desktop" ,mate-desktop)
("pango" ,pango)
@@ -1343,7 +1341,7 @@ can be used as backgrounds in the MATE Desktop environment.")
(synopsis "Eye of MATE")
(description
"Eye of MATE is the Image viewer for the MATE Desktop.")
- (license (list license:gpl2))))
+ (license license:gpl2)))
(define-public engrampa
(package
@@ -1384,7 +1382,7 @@ can be used as backgrounds in the MATE Desktop environment.")
("file" ,file)
("glib" ,glib)
("gtk+" ,gtk+)
- ("gdk-pixbuf" ,gdk-pixbuf+svg)
+ ("librsvg" ,(librsvg-for-system))
("json-glib" ,json-glib)
("libcanberra" ,libcanberra)
("libx11" ,libx11)
@@ -1468,7 +1466,7 @@ can be used as backgrounds in the MATE Desktop environment.")
`(("cairo" ,cairo)
("glib" ,glib)
("glibmm" ,glibmm)
- ("gtkmm" ,gtkmm)
+ ("gtkmm" ,gtkmm-3)
("gtk+" ,gtk+)
("gdk-pixbuf" ,gdk-pixbuf)
("libsigc++" ,libsigc++)
@@ -1476,7 +1474,7 @@ can be used as backgrounds in the MATE Desktop environment.")
("libxml2" ,libxml2)
("libwnck" ,libwnck)
("libgtop" ,libgtop)
- ("librsvg" ,librsvg)
+ ("librsvg" ,(librsvg-for-system))
("polkit" ,polkit)))
(home-page "https://mate-desktop.org/")
(synopsis "System Monitor for MATE")
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index 83f31c1396..33ae378a2a 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -5,7 +5,7 @@
;;; Copyright © 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021 Eric Bavier <bavier@posteo.net>
;;; Copyright © 2014 Federico Beffa <beffa@fbengineering.ch>
;;; Copyright © 2014 Mathieu Lirzin <mathieu.lirzin@openmailbox.org>
-;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020 Ricardo Wurmus <rekado@elephly.net>
+;;; Copyright © 2015–2021 Ricardo Wurmus <rekado@elephly.net>
;;; Copyright © 2015 Sou Bunnbu <iyzsong@gmail.com>
;;; Copyright © 2015, 2018 Mark H Weaver <mhw@netris.org>
;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020, 2021 Efraim Flashner <efraim@flashner.co.il>
@@ -26,7 +26,7 @@
;;; Copyright © 2018 Joshua Sierles, Nextjournal <joshua@nextjournal.com>
;;; Copyright © 2018 Nadya Voronova <voronovank@gmail.com>
;;; Copyright © 2018 Adam Massmann <massmannak@gmail.com>
-;;; Copyright © 2018, 2020 Marius Bakke <mbakke@fastmail.com>
+;;; Copyright © 2018, 2020, 2021 Marius Bakke <marius@gnu.org>
;;; Copyright © 2018 Eric Brown <brown@fastmail.com>
;;; Copyright © 2018, 2021 Julien Lepiller <julien@lepiller.eu>
;;; Copyright © 2018 Amin Bandali <bandali@gnu.org>
@@ -48,6 +48,7 @@
;;; Copyright © 2021 Paul A. Patience <paul@apatience.com>
;;; Copyright © 2021 Ivan Gankevich <i.gankevich@spbu.ru>
;;; Copyright © 2021 Jean-Baptiste Volatier <jbv@pm.me>
+;;; Copyright © 2021 Guillaume Le Vaillant <glv@posteo.net>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -72,6 +73,7 @@
#:use-module (guix packages)
#:use-module (guix download)
#:use-module (guix git-download)
+ #:use-module (guix gexp)
#:use-module (guix utils)
#:use-module ((guix build utils) #:select (alist-replace))
#:use-module (guix build-system cmake)
@@ -84,6 +86,7 @@
#:use-module (gnu packages audio)
#:use-module (gnu packages autotools)
#:use-module (gnu packages base)
+ #:use-module (gnu packages bash)
#:use-module (gnu packages bison)
#:use-module (gnu packages boost)
#:use-module (gnu packages check)
@@ -144,6 +147,7 @@
#:use-module (gnu packages scheme)
#:use-module (gnu packages serialization)
#:use-module (gnu packages shells)
+ #:use-module (gnu packages sphinx)
#:use-module (gnu packages tcl)
#:use-module (gnu packages texinfo)
#:use-module (gnu packages tex)
@@ -167,6 +171,8 @@
(inputs `(("gtk+" ,gtk+)
("libxml2" ,libxml2)))
(native-inputs `(("pkg-config" ,pkg-config)))
+ (arguments
+ `(#:configure-flags '("CFLAGS=-O2 -g -fcommon")))
(synopsis "Natural deduction first-order logic interface")
(description "Aris is a program for performing logical proofs. It supports
propositional and predicate logic, as well as Boolean algebra and
@@ -376,8 +382,8 @@ programming language.")
(let* ((out (assoc-ref outputs "out"))
(bin (string-append out "/bin")))
(wrap-program (string-append bin "/units_cur")
- `("PYTHONPATH" ":" prefix
- ,(search-path-as-string->list (getenv "PYTHONPATH"))))
+ `("GUIX_PYTHONPATH" ":" prefix
+ ,(search-path-as-string->list (getenv "GUIX_PYTHONPATH"))))
#t))))))
(synopsis "Conversion between thousands of scales")
(description
@@ -515,46 +521,56 @@ precision floating point numbers.")
(define-public gsl
(package
(name "gsl")
- (version "2.6")
+ (version "2.7")
(source (origin
(method url-fetch)
(uri (string-append "mirror://gnu/gsl/gsl-"
version ".tar.gz"))
(sha256
(base32
- "1a460zj9xmbgvcymkdhqh313c4l29mn9cffbi5vf33x3qygk70mp"))))
+ "0av04cpblphvvs3kl5rwphniarml503501vrpqw31rd0bmwg7fzg"))))
(build-system gnu-build-system)
(arguments
(let ((system (%current-system)))
- (cond
- ((or (string-prefix? "aarch64" system)
- (string-prefix? "powerpc" system))
- ;; Some sparse matrix tests are failing on AArch64 and PowerPC:
- ;; https://lists.gnu.org/archive/html/bug-gsl/2020-04/msg00001.html
- '(#:phases (modify-phases %standard-phases
- (add-before 'check 'disable-failing-tests
- (lambda _
- (substitute* "spmatrix/test.c"
- ((".*test_complex.*") "\n"))
- #t)))))
- ((string-prefix? "i686" system)
- ;; There are rounding issues with these tests on i686:
- ;; https://lists.gnu.org/archive/html/bug-gsl/2016-10/msg00000.html
- ;; https://lists.gnu.org/archive/html/bug-gsl/2020-04/msg00000.html
- '(#:phases (modify-phases %standard-phases
- (add-before 'check 'disable-failing-tests
- (lambda _
- (substitute* "linalg/test.c"
- ((".*gsl_test\\(test_LU_decomp.*") "\n")
- ((".*gsl_test\\(test_LUc_decomp.*") "\n")
- ((".*gsl_test\\(test_cholesky_decomp.*") "\n")
- ((".*gsl_test\\(test_COD_lssolve2.*") "\n"))
- (substitute* "spmatrix/test.c"
- ((".*test_all.*") "\n")
- ((".*test_float.*") "\n")
- ((".*test_complex.*") "\n"))
- #t)))))
- (else '()))))
+ `(#:configure-flags (list "--disable-static") ;halves package size
+ #:phases
+ (modify-phases %standard-phases
+ ,@(cond
+ ((or (string-prefix? "aarch64" system)
+ (string-prefix? "powerpc" system))
+ ;; Some sparse matrix tests are failing on AArch64 and PowerPC:
+ ;; https://lists.gnu.org/archive/html/bug-gsl/2020-04/msg00001.html
+ '((add-before 'check 'disable-failing-tests
+ (lambda _
+ (substitute* "spmatrix/test.c"
+ ((".*test_complex.*") "\n"))))))
+
+ ((string-prefix? "i686" system)
+ ;; There are rounding issues with these tests on i686:
+ ;; https://lists.gnu.org/archive/html/bug-gsl/2016-10/msg00000.html
+ ;; https://lists.gnu.org/archive/html/bug-gsl/2020-04/msg00000.html
+ '((add-before 'check 'disable-failing-tests
+ (lambda _
+ (substitute* "linalg/test.c"
+ ((".*gsl_test\\(test_LU_decomp.*") "\n")
+ ((".*gsl_test\\(test_LUc_decomp.*") "\n")
+ ((".*gsl_test\\(test_QR_decomp_r.*") "\n")
+ ((".*gsl_test\\(test_cholesky_decomp.*") "\n")
+ ((".*gsl_test\\(test_pcholesky_solve.*") "\n")
+ ((".*gsl_test\\(test_COD_lssolve2.*") "\n"))
+ (substitute* "spmatrix/test.c"
+ ((".*test_all.*") "\n")
+ ((".*test_float.*") "\n")
+ ((".*test_complex.*") "\n"))
+
+ ;; XXX: These tests abort with:
+ ;; gsl: cholesky.c:645: ERROR: matrix is not positive definite
+ (substitute* '("multifit_nlinear/test.c"
+ "multilarge_nlinear/test.c")
+ (("gsl_ieee_env_setup.*" all)
+ (string-append "exit (77);\n" all)))))))
+
+ (else '()))))))
(home-page "https://www.gnu.org/software/gsl/")
(synopsis "Numerical library for C and C++")
(description
@@ -565,6 +581,15 @@ differential equations, linear algebra, Fast Fourier Transforms and random
numbers.")
(license license:gpl3+)))
+;; TODO: Merge back into the gsl package as a separate output.
+(define-public gsl-static
+ (package/inherit gsl
+ (name "gsl-static")
+ (arguments
+ `(,@(package-arguments gsl)
+ #:configure-flags (list "--disable-shared")
+ #:make-flags (list "CFLAGS=-fPIC")))))
+
(define-public sleef
(package
(name "sleef")
@@ -916,15 +941,15 @@ problems in numerical linear algebra.")
"0nnap9q1mv14g57dl3vkvxrdr10k5w7zzyxs6rgxhia8q8mphgqb"))))
(build-system cmake-build-system)
(arguments
- `(#:phases
+ `(#:configure-flags '("-DCMAKE_C_FLAGS=-fcommon -O2")
+ #:phases
(modify-phases %standard-phases
;; These tests use a lot of stack variables and segfault without
;; lifting resource limits.
(add-after 'unpack 'disable-broken-tests
(lambda _
(substitute* "TESTING/CMakeLists.txt"
- (("add_lapack_test.* xeigtstz\\)") ""))
- #t))
+ (("add_lapack_test.* xeigtstz\\)") ""))))
(replace 'install
(lambda* (#:key outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))
@@ -946,8 +971,7 @@ problems in numerical linear algebra.")
"\\.h$")))
(copy-recursively (string-append "../clapack-"
,version "-CMAKE/INCLUDE")
- (string-append out "/include"))
- #t))))))
+ (string-append out "/include"))))))))
(home-page "https://www.netlib.org/clapack/")
(synopsis "Numerical linear algebra library for C")
(description
@@ -961,7 +985,7 @@ provide LAPACK for someone who does not have access to a Fortran compiler.")
(define-public scalapack
(package
(name "scalapack")
- (version "2.0.2")
+ (version "2.1.0")
(source
(origin
(method url-fetch)
@@ -969,8 +993,8 @@ provide LAPACK for someone who does not have access to a Fortran compiler.")
version ".tgz"))
(sha256
(base32
- "0p1r61ss1fq0bs8ynnx7xq4wwsdvs32ljvwjnx6yxr8gd6pawx0c"))
- (patches (search-patches "scalapack-blacs-mpi-deprecations.patch"))))
+ "19i0h9vdc3zsy58r6fy1vs2kz2l7amifkz0cf926j90xz1n23nb1"))
+ (patches (search-patches "scalapack-gcc-10-compilation.patch"))))
(build-system cmake-build-system)
(inputs
`(("mpi" ,openmpi)
@@ -980,7 +1004,15 @@ provide LAPACK for someone who does not have access to a Fortran compiler.")
`(#:configure-flags `("-DBUILD_SHARED_LIBS:BOOL=YES")
#:phases (modify-phases %standard-phases
(add-before 'check 'mpi-setup
- ,%openmpi-setup))))
+ ,%openmpi-setup)
+ (add-after 'unpack 'skip-faulty-test
+ (lambda _
+ ;; FIXME: Skip these two tests that fail to complete for
+ ;; unknown reasons:
+ ;; <https://github.com/Reference-ScaLAPACK/scalapack/issues/43>.
+ (substitute* "TESTING/CMakeLists.txt"
+ (("^add_test\\(x[sd]hseqr.*" all)
+ (string-append "# " all "\n"))))))))
(home-page "http://www.netlib.org/scalapack/")
(synopsis "Library for scalable numerical linear algebra")
(description
@@ -1081,6 +1113,8 @@ computations.")
(arguments
`(#:parallel-tests? #f
#:configure-flags (list "--enable-shared"
+ "FCFLAGS=-fallow-argument-mismatch"
+ "FFLAGS=-fallow-argument-mismatch"
(string-append "CPPFLAGS=-I"
(assoc-ref %build-inputs "libtirpc")
"/include/tirpc"))
@@ -1114,7 +1148,7 @@ computations.")
;; .so-files. We truncate the hashes to avoid
;; unnecessary store references to those compilers:
(substitute* "libhdf4.settings"
- (("(/gnu/store/)([a-Z0-9]*)" all prefix hash)
+ (("(/gnu/store/)([0-9A-Za-z]*)" all prefix hash)
(string-append prefix (string-take hash 10) "...")))
#t))
(add-after 'install 'provide-absolute-libjpeg-reference
@@ -1363,9 +1397,9 @@ extremely large and complex data collections.")
#:make-flags
(list (string-append "HDFLIB=" (assoc-ref %build-inputs "hdf4") "/lib")
(string-append "HDF5LIB=" (assoc-ref %build-inputs "hdf5") "/lib")
- (string-append "ZLIB=" (assoc-ref %build-inputs "zlib") "/lib/libz.so")
+ (string-append "ZLIB=" (search-input-file %build-inputs "/lib/libz.so"))
(string-append "JPEGLIB="
- (assoc-ref %build-inputs "libjpeg") "/lib/libjpeg.so")
+ (search-input-file %build-inputs "/lib/libjpeg.so"))
"LLEXT=so")
#:phases
@@ -1382,16 +1416,20 @@ extremely large and complex data collections.")
"hdf/hdf5lib/exceptions/Makefile.in"
"hdf/hdflib/Makefile.in")
(("\\$\\(TOP\\)/lib/slf4j-api-1\\.7\\.5\\.jar")
- (string-append (assoc-ref inputs "slf4j-api")
- "/share/java/slf4j-api.jar")))
+ ;; 'slf4j-api-X.Y.Z.jar' is installed in a Maven-style
+ ;; directory, so use 'find-files' to find it.
+ (car (find-files (assoc-ref inputs "slf4j-api")
+ "^slf4j-api.*\\.jar$"))))
;; Replace outdated config.sub and config.guess:
(with-directory-excursion "config"
(for-each (lambda (file)
(install-file
- (string-append (assoc-ref inputs "automake")
- "/share/automake-"
- ,(version-major+minor (package-version automake))
- "/" file) "."))
+ (search-input-file inputs
+ (string-append
+ "/share/automake-"
+ ,(version-major+minor (package-version automake))
+ "/" file))
+ "."))
'("config.sub" "config.guess")))
;; Fix embedded version number
@@ -1409,8 +1447,9 @@ extremely large and complex data collections.")
(testjars
(append
(map (lambda (i)
- (string-append (assoc-ref inputs i)
- "/share/java/" i ".jar"))
+ (car (find-files (assoc-ref inputs i)
+ (string-append "^" i
+ ".*\\.jar$"))))
'("slf4j-api" "slf4j-simple"))
(list
(car (find-files (assoc-ref inputs "junit") "jar$"))
@@ -1423,11 +1462,9 @@ extremely large and complex data collections.")
"test/hdf5lib/junit.sh.in"
"examples/runExample.sh.in")
(("/usr/bin/test")
- (string-append (assoc-ref inputs "coreutils")
- "/bin/test"))
+ (search-input-file inputs "/bin/test"))
(("/usr/bin/uname")
- (string-append (assoc-ref inputs "coreutils")
- "/bin/uname"))
+ (search-input-file inputs "/bin/uname"))
(("CLASSPATH=[^\n]*")
(string-append "CLASSPATH=" class-path)))
(setenv "CLASSPATH" class-path))
@@ -1661,6 +1698,13 @@ similar to MATLAB, GNU Octave or SciPy.")
(sha256
(base32
"1a2fpp15a2rl1m50gcvvzd9y6bavl6vjf9zzf63sz5gdmq06yiqf"))
+ (modules '((guix build utils)))
+ (snippet
+ ;; Make sure this variable is defined only once. Failing to do so
+ ;; would break builds of 'netcdf-parallel-openmpi' with a
+ ;; multiple-definition link error with GCC 10.
+ '(substitute* "ncdump/ocprint.c"
+ (("^int ocdebug") "static int ocdebug")))
(patches (search-patches "netcdf-date-time.patch"))))
(build-system gnu-build-system)
(native-inputs
@@ -1694,7 +1738,7 @@ similar to MATLAB, GNU Octave or SciPy.")
;; filenames to avoid unnecessary references to the corresponding
;; store items.
(substitute* "libnetcdf.settings"
- (("(/gnu/store/)([a-Z0-9]*)" all prefix hash)
+ (("(/gnu/store/)([0-9A-Za-z]*)" all prefix hash)
(string-append prefix (string-take hash 10) "...")))
#t)))
@@ -1743,7 +1787,9 @@ sharing of scientific data.")
"0x4acvfhbsx1q79dkkwrwbgfhm0w5ngnp4zj5kk92s1khihmqfhj"))))
(build-system gnu-build-system)
(arguments
- `(#:parallel-tests? #f))
+ `(#:configure-flags '("FCFLAGS=-fallow-argument-mismatch"
+ "FFLAGS=-fallow-argument-mismatch")
+ #:parallel-tests? #f))
(inputs
`(("netcdf" ,netcdf)))
(native-inputs
@@ -1971,7 +2017,7 @@ interfaces.")
(lambda* (#:key inputs outputs #:allow-other-keys)
(delete-file (string-append
(site-packages inputs outputs)
- "PyNomad-0.0.0-py"
+ "/PyNomad-0.0.0-py"
(python-version (assoc-ref inputs "python"))
".egg-info"))
#t)))))
@@ -2503,7 +2549,7 @@ script files.")
,@(package-inputs octave-cli)))
(native-inputs
`(("qttools" , qttools) ;for lrelease
- ("texlive" ,(texlive-union (list texlive-epsf))) ; for texi2dvi
+ ("texlive" ,(texlive-updmap.cfg (list texlive-epsf))) ; for texi2dvi
,@(package-native-inputs octave-cli)))
(arguments
(substitute-keyword-arguments (package-arguments octave-cli)
@@ -2637,7 +2683,7 @@ Open CASCADE library.")
("libxi" ,libxi)
("libxmu" ,libxmu)
("mesa" ,mesa)
- ("tbb" ,tbb)
+ ("tbb" ,tbb-2020)
("tcl" ,tcl)
("tk" ,tk)))
;; TODO: build Overview documentation and add 'doc' output.
@@ -2839,7 +2885,7 @@ September 2004}")
(define-public petsc
(package
(name "petsc")
- (version "3.11.2")
+ (version "3.16.1")
(source
(origin
(method url-fetch)
@@ -2847,12 +2893,13 @@ September 2004}")
(uri (string-append "http://ftp.mcs.anl.gov/pub/petsc/release-snapshots/"
"petsc-lite-" version ".tar.gz"))
(sha256
- (base32 "1645nwwcp9bcnfnxikk480mhbbacdvhsay2c401818hk97dqj5nx"))))
+ (base32 "0sm03vpg010q9icidiq587n325m0598cj6hab2rdv85nwyygg74h"))))
(outputs '("out" ; libraries and headers
"examples")) ; ~30MiB of examples
(build-system gnu-build-system)
(native-inputs
- `(("python" ,python-2)))
+ `(("python" ,python)
+ ("which" ,which)))
(inputs
`(("gfortran" ,gfortran)
("openblas" ,openblas)
@@ -2861,75 +2908,80 @@ September 2004}")
;; leaving out opengl, as configuration seems to only be for mac
))
(arguments
- `(#:test-target "test"
- #:parallel-build? #f ; build is parallel by default
- #:configure-flags
- `("--with-mpi=0"
- "--with-openmp=1"
- "--with-openblas=1"
- "--with-superlu=1")
- #:make-flags
- ;; Honor (parallel-job-count) for build. Do not use --with-make-np,
- ;; whose value is dumped to $out/lib/petsc/conf/petscvariables.
- (list (format #f "MAKE_NP=~a" (parallel-job-count)))
- #:phases
- (modify-phases %standard-phases
- (replace 'configure
- ;; PETSc's configure script is actually a python script, so we can't
- ;; run it with bash.
- (lambda* (#:key outputs (configure-flags '())
- #:allow-other-keys)
- (let* ((prefix (assoc-ref outputs "out"))
- (flags `(,(string-append "--prefix=" prefix)
- ,@configure-flags)))
- (format #t "build directory: ~s~%" (getcwd))
- (format #t "configure flags: ~s~%" flags)
- (apply invoke "./configure" flags))))
- (add-after 'configure 'clean-local-references
- (lambda* (#:key outputs #:allow-other-keys)
- (let ((out (assoc-ref outputs "out")))
- (substitute* (find-files "." "^petsc(conf|machineinfo).h$")
- ;; Prevent build directory from leaking into compiled code
- (((getcwd)) out)
- ;; Scrub timestamp for reproducibility
- ((".*Libraries compiled on.*") ""))
- (substitute* (find-files "." "petscvariables")
- ;; Do not expose build machine characteristics, set to defaults.
- (("MAKE_NP = [:digit:]+") "MAKE_NP = 2")
- (("NPMAX = [:digit:]+") "NPMAX = 2"))
- #t)))
- (add-after 'install 'clean-install
- ;; Try to keep installed files from leaking build directory names.
- (lambda* (#:key inputs outputs #:allow-other-keys)
- (let ((out (assoc-ref outputs "out")))
- (substitute* (map (lambda (file)
- (string-append out "/lib/petsc/conf/" file))
- '("petscvariables"))
- (((getcwd)) out))
- ;; Make compiler references point to the store
- (substitute* (string-append out "/lib/petsc/conf/petscvariables")
- (("= (gcc|g\\+\\+|gfortran)" _ compiler)
- (string-append "= " (which compiler))))
- ;; PETSc installs some build logs, which aren't necessary.
- (for-each (lambda (file)
- (let ((f (string-append out "/lib/petsc/conf/" file)))
- (when (file-exists? f)
- (delete-file f))))
- '("configure.log" "make.log" "gmake.log"
- "test.log" "error.log" "RDict.db"
- "PETScBuildInternal.cmake"
- ;; Once installed, should uninstall with Guix
- "uninstall.py"))
- #t)))
- (add-after 'install 'move-examples
- (lambda* (#:key outputs #:allow-other-keys)
- (let* ((out (assoc-ref outputs "out"))
- (examples (assoc-ref outputs "examples"))
- (exdir (string-append out "/share/petsc/examples"))
- (exdir' (string-append examples "/share/petsc/examples")))
- (copy-recursively exdir exdir')
- (delete-file-recursively exdir)
- #t))))))
+ (list
+ #:test-target "test"
+ #:parallel-build? #f ; build is parallel by default
+ #:configure-flags
+ #~(list "--with-mpi=0"
+ "--with-openmp=1"
+ "--with-openblas=1"
+ (string-append "--with-openblas-dir="
+ #$(this-package-input "openblas"))
+ "--with-superlu=1")
+ #:make-flags
+ ;; Honor (parallel-job-count) for build. Do not use --with-make-np,
+ ;; whose value is dumped to $out/lib/petsc/conf/petscvariables.
+ #~(list (format #f "MAKE_NP=~a" (parallel-job-count)))
+ #:phases
+ #~(modify-phases %standard-phases
+ (replace 'configure
+ ;; PETSc's configure script is actually a python script, so we can't
+ ;; run it with bash.
+ (lambda* (#:key outputs (configure-flags '())
+ #:allow-other-keys)
+ (let* ((prefix (assoc-ref outputs "out"))
+ (flags `(,(string-append "--prefix=" prefix)
+ ,@configure-flags)))
+ (format #t "build directory: ~s~%" (getcwd))
+ (format #t "configure flags: ~s~%" flags)
+ (apply invoke "./configure" flags)
+
+ ;; Generate test scripts with the right shebang.
+ (substitute* "config/example_template.py"
+ (("#!/usr/bin/env bash")
+ (string-append "#!" (which "bash")))))))
+ (add-after 'configure 'clean-local-references
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let ((out (assoc-ref outputs "out")))
+ (substitute* (find-files "." "^petsc(conf|machineinfo).h$")
+ ;; Prevent build directory from leaking into compiled code
+ (((getcwd)) out)
+ ;; Scrub timestamp for reproducibility
+ ((".*Libraries compiled on.*") ""))
+ (substitute* (find-files "." "petscvariables")
+ ;; Do not expose build machine characteristics, set to defaults.
+ (("MAKE_NP = [:digit:]+") "MAKE_NP = 2")
+ (("NPMAX = [:digit:]+") "NPMAX = 2")))))
+ (add-after 'install 'clean-install
+ ;; Try to keep installed files from leaking build directory names.
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (let ((out (assoc-ref outputs "out")))
+ (substitute* (map (lambda (file)
+ (string-append out "/lib/petsc/conf/" file))
+ '("petscvariables"))
+ (((getcwd)) out))
+ ;; Make compiler references point to the store
+ (substitute* (string-append out "/lib/petsc/conf/petscvariables")
+ (("= (gcc|g\\+\\+|gfortran)" _ compiler)
+ (string-append "= " (which compiler))))
+ ;; PETSc installs some build logs, which aren't necessary.
+ (for-each (lambda (file)
+ (let ((f (string-append out "/lib/petsc/conf/" file)))
+ (when (file-exists? f)
+ (delete-file f))))
+ '("configure.log" "make.log" "gmake.log"
+ "test.log" "error.log" "RDict.db"
+ "PETScBuildInternal.cmake"
+ ;; Once installed, should uninstall with Guix
+ "uninstall.py")))))
+ (add-after 'install 'move-examples
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (examples (assoc-ref outputs "examples"))
+ (exdir (string-append out "/share/petsc/examples"))
+ (exdir' (string-append examples "/share/petsc/examples")))
+ (copy-recursively exdir exdir')
+ (delete-file-recursively exdir)))))))
(home-page "https://www.mcs.anl.gov/petsc")
(synopsis "Library to solve PDEs")
(description "PETSc, pronounced PET-see (the S is silent), is a suite of
@@ -2939,16 +2991,18 @@ scientific applications modeled by partial differential equations.")
"https://www.mcs.anl.gov/petsc/documentation/copyright.html"))))
(define-public petsc-complex
- (package (inherit petsc)
+ (package
+ (inherit petsc)
(name "petsc-complex")
(arguments
(substitute-keyword-arguments (package-arguments petsc)
((#:configure-flags cf)
- `(cons "--with-scalar-type=complex" ,cf))))
+ #~(cons "--with-scalar-type=complex" #$cf))))
(synopsis "Library to solve PDEs (with complex scalars)")))
(define-public petsc-openmpi
- (package (inherit petsc)
+ (package
+ (inherit petsc)
(name "petsc-openmpi")
(inputs
`(("hdf5" ,hdf5-parallel-openmpi)
@@ -2962,27 +3016,28 @@ scientific applications modeled by partial differential equations.")
(arguments
(substitute-keyword-arguments (package-arguments petsc)
((#:configure-flags cf)
- ``("--with-hypre=1"
- "--with-mpiexec=mpirun"
- "--with-metis=1"
- "--with-mumps=1"
- "--with-scalapack=1"
- "--with-ptscotch=1"
- ,(string-append "--with-mpi-dir="
- (assoc-ref %build-inputs "openmpi"))
- ,(string-append "--with-hdf5-include="
- (assoc-ref %build-inputs "hdf5") "/include")
- ,(string-append "--with-hdf5-lib="
- (assoc-ref %build-inputs "hdf5") "/lib/libhdf5.a")
- ,@(delete "--with-mpi=0" ,cf)))
+ #~`("--with-hypre=1"
+ "--with-mpiexec=mpirun"
+ "--with-metis=1"
+ "--with-mumps=1"
+ "--with-scalapack=1"
+ "--with-ptscotch=1"
+ ,(string-append "--with-mpi-dir="
+ #$(this-package-input "openmpi"))
+ ,(string-append "--with-hdf5-include="
+ #$(this-package-input "hdf5") "/include")
+ ,(string-append "--with-hdf5-lib="
+ #$(this-package-input "hdf5") "/lib/libhdf5.a")
+ ,@(delete "--with-mpi=0" #$cf)))
((#:phases phases)
- `(modify-phases ,phases
- (add-before 'configure 'mpi-setup
- ,%openmpi-setup)))))
+ #~(modify-phases #$phases
+ (add-before 'configure 'mpi-setup
+ #$%openmpi-setup)))))
(synopsis "Library to solve PDEs (with MUMPS and MPI support)")))
(define-public petsc-complex-openmpi
- (package (inherit petsc-complex)
+ (package
+ (inherit petsc-complex)
(name "petsc-complex-openmpi")
(inputs
`(("openmpi" ,openmpi)
@@ -2990,27 +3045,27 @@ scientific applications modeled by partial differential equations.")
(arguments
(substitute-keyword-arguments (package-arguments petsc-complex)
((#:configure-flags cf)
- ``("--with-mpiexec=mpirun"
- ,(string-append "--with-mpi-dir="
- (assoc-ref %build-inputs "openmpi"))
- ,@(delete "--with-mpi=0" ,cf)))
+ #~`("--with-mpiexec=mpirun"
+ ,(string-append "--with-mpi-dir="
+ #$(this-package-input "openmpi"))
+ ,@(delete "--with-mpi=0" #$cf)))
((#:phases phases)
- `(modify-phases ,phases
- (add-before 'configure 'mpi-setup
- ,%openmpi-setup)))))
+ #~(modify-phases #$phases
+ (add-before 'configure 'mpi-setup
+ #$%openmpi-setup)))))
(synopsis "Library to solve PDEs (with complex scalars and MPI support)")))
(define-public python-petsc4py
(package
(name "python-petsc4py")
- (version "3.11.0")
+ (version "3.16.1")
(source
(origin
(method url-fetch)
(uri (pypi-uri "petsc4py" version))
(sha256
(base32
- "1rm1qj5wlkhxl39by9n78lh3gbmii31wsnb8j1rr5hvfr5xgbx2q"))
+ "0pxr6qa7p0pmpq0av29lx8lzlrdcfdzj87ynixzr8dn42y13a662"))
(modules '((guix build utils)))
(snippet
'(begin
@@ -3075,7 +3130,7 @@ savings are consistently > 5x.")
(define-public slepc
(package
(name "slepc")
- (version "3.11.1")
+ (version "3.16.1")
(source
(origin
(method url-fetch)
@@ -3083,10 +3138,11 @@ savings are consistently > 5x.")
version ".tar.gz"))
(sha256
(base32
- "1yq84q9wannc8xwapxpay4ypdd675picwi395hhsdvng9q6hf5j8"))))
+ "1ysfm77s5fcissv3q0k5d65mlp93zi4anqg62q3cd25dn66sva5i"))))
(build-system gnu-build-system)
(native-inputs
- `(("python" ,python-2)
+ `(("python" ,python)
+ ("which" ,which)
("petsc:examples" ,petsc "examples"))) ;for gmakegen.py script
(inputs
`(("arpack" ,arpack-ng)
@@ -3147,7 +3203,9 @@ as well as other related problems such as the singular value decomposition.
The emphasis of the software is on methods and techniques appropriate for
problems in which the associated matrices are sparse, for example, those
arising after the discretization of partial differential equations.")
- (license license:bsd-2)))
+ (license license:bsd-2)
+ (properties
+ `((release-monitoring-url . "http://slepc.upv.es/download/")))))
(define-public slepc-complex
(package (inherit slepc)
@@ -3168,10 +3226,10 @@ arising after the discretization of partial differential equations.")
,%openmpi-setup)))))
(inputs
`(("mpi" ,openmpi)
- ("arpack" ,arpack-ng-openmpi)
,@(alist-delete "arpack" (package-inputs slepc))))
(propagated-inputs
`(("petsc" ,petsc-openmpi)
+ ("arpack" ,arpack-ng-openmpi)
,@(alist-delete "petsc" (package-propagated-inputs slepc))))
(synopsis "Scalable library for eigenproblems (with MPI support)")))
@@ -3186,14 +3244,14 @@ arising after the discretization of partial differential equations.")
(define-public python-slepc4py
(package
(name "python-slepc4py")
- (version "3.11.0")
+ (version "3.16.1")
(source
(origin
(method url-fetch)
(uri (pypi-uri "slepc4py" version))
(sha256
(base32
- "1ksp08kxf4wg408b9nn39z3qfhy643j22d4rfbl30vzxk2rxh4lq"))))
+ "0fq997y73ymvcvdrxycp450pxwdgnqaw62gv9rwncfgsfplkvs9w"))))
(build-system python-build-system)
(arguments
`(#:phases
@@ -3439,7 +3497,7 @@ SCALAP = -Wl,-rpath=$(SCALAPDIR) -Wl,-rpath='$$ORIGIN' -L$(SCALAPDIR) -lsc
LIBOTHERS = -pthread
CDEFS = -DAdd_
PIC = -fPIC
-OPTF = -O2 -DALLOW_NON_INIT $(PIC)
+OPTF = -O2 -DALLOW_NON_INIT -fallow-argument-mismatch $(PIC)
OPTL = -O2 $(PIC)
OPTC = -O2 $(PIC)
INCS = $(INCSEQ)
@@ -4142,8 +4200,9 @@ to BMP, JPEG or PNG image formats.")
(patches (search-patches "maxima-defsystem-mkdir.patch"))))
(build-system gnu-build-system)
(inputs
- `(("gcl" ,gcl)
+ `(("bash" ,bash-minimal)
("gnuplot" ,gnuplot) ;for plots
+ ("sbcl" ,sbcl)
("sed" ,sed)
("tk" ,tk))) ;Tcl/Tk is used by 'xmaxima'
(native-inputs
@@ -4152,15 +4211,11 @@ to BMP, JPEG or PNG image formats.")
("python" ,python)))
(arguments
`(#:configure-flags
- (list "--enable-gcl"
- (string-append "--with-posix-shell="
- (assoc-ref %build-inputs "bash")
- "/bin/sh")
- (string-append "--with-wish="
- (assoc-ref %build-inputs "tk")
- "/bin/wish"
- (let ((v ,(package-version tk)))
- (string-take v (string-index-right v #\.)))))
+ ,#~(list "--enable-sbcl"
+ (string-append "--with-sbcl=" #$sbcl "/bin/sbcl")
+ (string-append "--with-posix-shell=" #$bash-minimal "/bin/sh")
+ (string-append "--with-wish=" #$tk "/bin/wish"
+ #$(version-major+minor (package-version tk))))
;; By default Maxima attempts to write temporary files to
;; '/tmp/nix-build-maxima-*', which won't exist at run time.
;; Work around that.
@@ -4169,13 +4224,12 @@ to BMP, JPEG or PNG image formats.")
(modify-phases %standard-phases
(add-after 'unpack 'patch-paths
(lambda* (#:key inputs #:allow-other-keys)
- (let* ((sed (string-append (assoc-ref inputs "sed") "/bin/sed"))
+ (let* ((sed (search-input-file inputs "/bin/sed"))
(coreutils (assoc-ref inputs "coreutils"))
(dirname (string-append coreutils "/bin/dirname"))
(head (string-append coreutils "/bin/head"))
- (perl (string-append (assoc-ref inputs "perl") "/bin/perl"))
- (python (string-append (assoc-ref inputs "python")
- "/bin/python3")))
+ (perl (search-input-file inputs "/bin/perl"))
+ (python (search-input-file inputs "/bin/python3")))
(substitute* "src/maxima.in"
(("sed ") (string-append sed " "))
(("dirname") dirname)
@@ -4198,7 +4252,7 @@ to BMP, JPEG or PNG image formats.")
(invoke "sh" "-c"
(string-append
"./maxima-local "
- "--lisp=gcl "
+ "--lisp=sbcl "
"--batch-string=\"run_testsuite();\" "
"| grep -q \"No unexpected errors found\""))))
;; Make sure the doc and emacs files are found in the
@@ -4209,8 +4263,7 @@ to BMP, JPEG or PNG image formats.")
(let* ((gnuplot (assoc-ref inputs "gnuplot"))
(out (assoc-ref outputs "out"))
(datadir (string-append out "/share/maxima/" ,version))
- (binutils (string-append (assoc-ref inputs "binutils")
- "/bin")))
+ (binutils (dirname (search-input-file inputs "/bin/as"))))
(with-directory-excursion out
(mkdir-p "share/emacs")
(mkdir-p "share/doc")
@@ -4376,16 +4429,17 @@ parts of it.")
(define-public openblas
(package
(name "openblas")
- (version "0.3.9")
+ (version "0.3.18")
(source
(origin
- (method url-fetch)
- (uri (string-append "mirror://sourceforge/openblas/v" version "/OpenBLAS%20"
- version "%20version.tar.gz"))
- (file-name (string-append name "-" version ".tar.gz"))
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/xianyi/OpenBLAS")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
(sha256
(base32
- "14iz9xnrb9xiwgj84j94mc74gg0zn2vsy9fmsijxxma1n7dck4w3"))))
+ "17zdd8asylz2w71hczrz5y344p6d5ds1jn4901maw7zcp3dbk63g"))))
(build-system gnu-build-system)
(arguments
`(#:test-target "test"
@@ -4402,6 +4456,7 @@ parts of it.")
(list (string-append "PREFIX=" (assoc-ref %outputs "out"))
"SHELL=bash"
"MAKE_NB_JOBS=0" ;use jobserver for submakes
+ "NO_STATIC=1" ;avoid a 67 MiB static archive
;; This is the maximum number of threads OpenBLAS will ever use (that
;; is, if $OPENBLAS_NUM_THREADS is greater than that, then NUM_THREADS
@@ -4417,20 +4472,18 @@ parts of it.")
,@(let ((system (or (%current-target-system) (%current-system))))
(cond
((or (string-prefix? "x86_64" system)
- (string-prefix? "i686" system))
- '("DYNAMIC_ARCH=1"))
+ (string-prefix? "i686" system)
+ (string-prefix? "powerpc64le" system)
+ (string-prefix? "aarch64" system))
+ ;; Dynamic older enables a few extra CPU architectures that
+ ;; were released before 2010.
+ '("DYNAMIC_ARCH=1" "DYNAMIC_OLDER=1" "TARGET=GENERIC"))
;; On some of these architectures the CPU can't be detected.
- ((string-prefix? "powerpc64le" system)
- '("DYNAMIC_ARCH=1"
- "TARGET=GENERIC"))
;; On MIPS we force the "SICORTEX" TARGET, as for the other
;; two available MIPS targets special extended instructions
;; for Loongson cores are used.
((string-prefix? "mips" system)
'("TARGET=SICORTEX"))
- ;; On aarch64 force the generic 'armv8-a' target
- ((string-prefix? "aarch64" system)
- '("TARGET=ARMV8"))
;; Failed to detect CPU.
((string-prefix? "armhf" system)
'("TARGET=ARMV7"))
@@ -4444,8 +4497,7 @@ parts of it.")
;; Get libgfortran found when building in utest.
(setenv "FEXTRALIB"
(string-append "-L" (assoc-ref inputs "fortran-lib")
- "/lib"))
- #t)))))
+ "/lib")))))))
(inputs
`(("fortran-lib" ,gfortran "lib")))
(native-inputs
@@ -4735,6 +4787,7 @@ packages.")
(method url-fetch)
(uri (string-append "mirror://sourceforge/math-atlas/Stable/"
version "/atlas" version ".tar.bz2"))
+ (patches (search-patches "atlas-gfortran-compat.patch"))
(sha256
(base32
"1dyjlq3fiparvm8ypwk6rsmjzmnwk81l88gkishphpvc79ryp216"))))
@@ -5410,7 +5463,7 @@ set.")
(define-public hypre
(package
(name "hypre")
- (version "2.15.1")
+ (version "2.20.0")
(source
(origin
(method git-fetch)
@@ -5419,28 +5472,55 @@ set.")
(commit (string-append "v" version))))
(file-name (git-file-name name version))
(sha256
- (base32 "1lvh4ybqkriyqfg2zmic6mrg1981qv1i9vry1fdgsabn81hb71g4"))
- (modules '((guix build utils)))
- (snippet
- '(begin
- ;; Remove use of __DATE__ and __TIME__ for reproducibility;
- ;; substitute the release date.
- (substitute* "src/utilities/HYPRE_utilities.h"
- (("Date Compiled: .*$")
- "Date Compiled: Oct 19 2018 15:23:00 +0000\"\n"))
- #t))))
+ (base32 "14iqjwg5sv1qjn7c2cfv0xxmn9rwamjrhh9hgs8fjbywcbvrkjdi"))))
(build-system gnu-build-system)
- (outputs '("out" ; 6.1 MiB of headers and libraries
- "doc")) ; 4.8 MiB of documentation
+ (outputs '("out" ;5.3 MiB of headers and libraries
+ "doc")) ;12 MiB of documentation
(native-inputs
`(("doc++" ,doc++)
- ("netpbm" ,netpbm)
- ("perl" ,perl) ; needed to run 'ppmquant' during tests
- ("texlive" ,(texlive-union (list texlive-xypic
- texlive-cm
- texlive-latex-hyperref
- texlive-bibtex)))
- ("ghostscript" ,ghostscript)))
+ ("doxygen" ,doxygen)
+ ("python" ,python)
+ ("python-breathe" ,python-breathe)
+ ("python-sphinx" ,python-sphinx)
+ ("texlive" ,(texlive-updmap.cfg (list texlive-adjustbox
+ texlive-amsfonts
+ texlive-bibtex
+ texlive-caption
+ texlive-cm
+ texlive-etoolbox
+ texlive-jknappen
+ texlive-sectsty
+ texlive-tex-gyre
+ texlive-wasy
+ texlive-xcolor
+ texlive-xypic
+ texlive-generic-listofitems
+ texlive-generic-ulem
+ texlive-latex-capt-of
+ texlive-latex-cmap
+ texlive-latex-colortbl
+ texlive-latex-etoc
+ texlive-latex-fancyhdr
+ texlive-latex-fancyvrb
+ texlive-latex-float
+ texlive-latex-fncychap
+ texlive-latex-framed
+ texlive-latex-geometry
+ texlive-latex-hanging
+ texlive-hyperref
+ texlive-latex-multirow
+ texlive-latex-natbib
+ texlive-latex-needspace
+ texlive-latex-newunicodechar
+ texlive-latex-parskip
+ texlive-latex-stackengine
+ texlive-latex-tabulary
+ texlive-latex-titlesec
+ texlive-latex-tocloft
+ texlive-latex-upquote
+ texlive-latex-varwidth
+ texlive-wasysym
+ texlive-latex-wrapfig)))))
(inputs
`(("blas" ,openblas)
("lapack" ,lapack)))
@@ -5456,12 +5536,6 @@ set.")
"--with-blas")
#:phases
(modify-phases %standard-phases
- (add-before 'build 'set-HOME
- (lambda _
- ;; FIXME: texlive-union does not find the built
- ;; metafonts, so it tries to generate them in HOME.
- (setenv "HOME" "/tmp")
- #t))
(add-before 'configure 'chdir-src
(lambda _ (chdir "src")))
(replace 'configure
@@ -5476,7 +5550,7 @@ set.")
configure-flags)))))))
(add-after 'build 'build-docs
(lambda _
- (invoke "make" "-Cdocs" "pdf" "html")))
+ (invoke "make" "-C" "docs")))
(replace 'check
(lambda _
(setenv "LD_LIBRARY_PATH" (string-append (getcwd) "/hypre/lib"))
@@ -5487,8 +5561,7 @@ set.")
(when (positive? size)
(error (format #f "~a size ~d; error indication~%"
filename size)))))
- (find-files "test" ".*\\.err$"))
- #t))
+ (find-files "test" ".*\\.err$"))))
(add-after 'install 'install-docs
(lambda* (#:key outputs #:allow-other-keys)
;; Custom install because docs/Makefile doesn't honor ${docdir}.
@@ -5497,10 +5570,9 @@ set.")
(with-directory-excursion "docs"
(for-each (lambda (base)
(install-file (string-append base ".pdf") docdir)
- (copy-recursively base docdir)) ; html docs
- '("HYPRE_usr_manual"
- "HYPRE_ref_manual")))
- #t))))))
+ (copy-recursively (string-append base "-html")
+ (string-append docdir "/" base)))
+ '("usr-manual" "ref-manual")))))))))
(home-page "https://computing.llnl.gov/projects\
/hypre-scalable-linear-solvers-multigrid-methods")
(synopsis "Library of solvers and preconditioners for linear equations")
@@ -6111,7 +6183,8 @@ and comparisons are supported.")
("blas" ,openblas)
("suitesparse" ,suitesparse))) ;TODO: Add hypre
(arguments
- `(#:configure-flags `("-DEXAMPLES_ENABLE_C:BOOL=ON"
+ `(#:configure-flags `("-DCMAKE_C_FLAGS=-O2 -g -fcommon"
+ "-DEXAMPLES_ENABLE_C:BOOL=ON"
"-DEXAMPLES_ENABLE_CXX:BOOL=ON"
"-DEXAMPLES_ENABLE_F77:BOOL=ON"
"-DEXAMPLES_ENABLE_F90:BOOL=ON"
@@ -6131,6 +6204,9 @@ and comparisons are supported.")
(description "SUNDIALS is a family of software packages implemented with
the goal of providing robust time integrators and nonlinear solvers that can
easily be incorporated into existing simulation codes.")
+ (properties
+ '((release-monitoring-url
+ . "https://computing.llnl.gov/projects/sundials/sundials-software")))
(license license:bsd-3)))
(define-public sundials-openmpi
@@ -7225,9 +7301,8 @@ of C, Java, or Ada programs.")
(modify-phases %standard-phases
(add-before 'configure 'export-shell
(lambda* (#:key inputs #:allow-other-keys)
- (setenv "CONFIG_SHELL" (string-append (assoc-ref inputs "bash")
- "/bin/sh"))
- #t)))))
+ (setenv "CONFIG_SHELL"
+ (search-input-file inputs "/bin/sh")))))))
(inputs
`(("gmp" ,gmp)))
(propagated-inputs
diff --git a/gnu/packages/maven-parent-pom.scm b/gnu/packages/maven-parent-pom.scm
index 84af3a1c53..8df4d9710b 100644
--- a/gnu/packages/maven-parent-pom.scm
+++ b/gnu/packages/maven-parent-pom.scm
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2020 Julien Lepiller <julien@lepiller.eu>
+;;; Copyright © 2020, 2021 Julien Lepiller <julien@lepiller.eu>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -20,6 +20,7 @@
#:use-module ((guix licenses) #:prefix license:)
#:use-module (guix packages)
#:use-module (guix download)
+ #:use-module (guix gexp)
#:use-module (guix git-download)
#:use-module (guix utils)
#:use-module (guix build-system ant)
@@ -321,14 +322,15 @@ other projects as their parent pom.")
(base32
"0yl2hbwz2kn1hll1i00ddzn8f89bfdcjwdifz0pj2j15k1gjch7v"))))
(arguments
- `(#:tests? #f
+ (list
+ #:tests? #f
#:phases
- (modify-phases %standard-phases
- (delete 'unpack)
- (delete 'configure)
- (delete 'build)
- (replace 'install
- (install-pom-file (assoc-ref %build-inputs "source")))))))))
+ #~(modify-phases %standard-phases
+ (delete 'unpack)
+ (delete 'configure)
+ (delete 'build)
+ (replace 'install
+ (install-pom-file #$(package-source this-package)))))))))
(define* (make-plexus-parent-pom version hash #:optional parent)
(hidden-package
@@ -516,14 +518,15 @@ tool. This package contains the Maven parent POM.")
"11skhrjgrrs6z5rw1w39ap1pzhrc99g0czip10kz7wsavg746ibm"))))
(build-system ant-build-system)
(arguments
- `(#:tests? #f
+ (list
+ #:tests? #f
#:phases
- (modify-phases %standard-phases
- (delete 'unpack)
- (delete 'build)
- (delete 'configure)
- (replace 'install
- (install-pom-file (assoc-ref %build-inputs "source"))))))
+ #~(modify-phases %standard-phases
+ (delete 'unpack)
+ (delete 'build)
+ (delete 'configure)
+ (replace 'install
+ (install-pom-file #$(package-source this-package))))))
(propagated-inputs
`(("maven-parent-pom-27" ,maven-parent-pom-27)))
(home-page "https://apache.org/maven")
diff --git a/gnu/packages/mes.scm b/gnu/packages/mes.scm
index 1d1dd189b0..07e63384ff 100644
--- a/gnu/packages/mes.scm
+++ b/gnu/packages/mes.scm
@@ -57,8 +57,7 @@
(base32
"0lkd9lyspvhxlfs0496gsllwinh62jk9wij6gpadvx9gwz6yavd9"))))
(build-system gnu-build-system)
- (native-inputs
- `(("guile" ,guile-2.2)))
+ (native-inputs (list guile-2.2))
(synopsis "LALR(1) Parser Generator in Guile")
(description
"NYACC is an LALR(1) parser generator implemented in Guile.
@@ -93,10 +92,8 @@ extensive examples, including parsers for the Javascript and C99 languages.")
(("^DOCDIR =.*")
"DOCDIR = @prefix@/share/doc/$(PACKAGE_TARNAME)\n"))
#t))))
- (native-inputs
- `(("pkg-config" ,pkg-config)))
- (inputs
- `(("guile" ,guile-2.2)))))
+ (native-inputs (list pkg-config))
+ (inputs (list guile-2.2))))
(define-public nyacc
(package
@@ -117,8 +114,7 @@ extensive examples, including parsers for the Javascript and C99 languages.")
"GUILE_GLOBAL_SITE=\
$prefix/share/guile/site/$GUILE_EFFECTIVE_VERSION\n"))
#t))))
- (inputs
- `(("guile" ,guile-3.0)))
+ (inputs (list guile-3.0))
(description
"@acronym{NYACC, Not Yet Another Compiler Compiler} is set of Guile modules
for generating parsers and lexical analyzers. It provides sample parsers,
@@ -153,69 +149,39 @@ parsers to allow execution with Guile as extension languages.")))
(sha256
(base32
"065ksalfllbdrzl12dz9d9dcxrv97wqxblslngsc6kajvnvlyvpk"))))
- (inputs
- `(("guile" ,guile-2.2)))))
+ (inputs (list guile-3.0))))
-(define-public mes-0.19
- ;; Mes used for bootstrap.
+(define-public mes
(package
(name "mes")
- (version "0.19")
+ (version "0.23")
(source (origin
(method url-fetch)
(uri (string-append "mirror://gnu/mes/"
"mes-" version ".tar.gz"))
(sha256
(base32
- "15h4yhaywdc0djpjlin2jz1kzahpqxfki0r0aav1qm9nxxmnp1l0"))))
- (build-system gnu-build-system)
- (supported-systems '("i686-linux" "x86_64-linux"))
- (propagated-inputs
- `(("mescc-tools" ,mescc-tools-0.5.2)
- ("nyacc" ,nyacc-0.86)))
+ "0mnryfkl0dwbr5gxp16j5s95gw7z1vm1fqa1pxabp0aiar1hw53s"))))
+ (supported-systems '("armhf-linux" "i686-linux" "x86_64-linux"))
+ (propagated-inputs (list mescc-tools nyacc-1.00.2))
(native-inputs
- `(("guile" ,guile-2.2)
- ,@(let ((target-system (or (%current-target-system)
+ (append (list guile-3.0)
+ (let ((target-system (or (%current-target-system)
(%current-system))))
(cond
((string-prefix? "x86_64-linux" target-system)
;; Use cross-compiler rather than #:system "i686-linux" to get
;; MesCC 64 bit .go files installed ready for use with Guile.
- `(("i686-linux-binutils" ,(cross-binutils "i686-unknown-linux-gnu"))
- ("i686-linux-gcc" ,(cross-gcc "i686-unknown-linux-gnu"))))
+ (list (cross-binutils "i686-unknown-linux-gnu")
+ (cross-gcc "i686-unknown-linux-gnu")))
(else
'())))
- ("graphviz" ,graphviz)
- ("help2man" ,help2man)
- ("perl" ,perl) ; build-aux/gitlog-to-changelog
- ("texinfo" ,texinfo)))
+ (list graphviz help2man
+ perl ;build-aux/gitlog-to-changelog
+ texinfo)))
+ (build-system gnu-build-system)
(arguments
`(#:strip-binaries? #f)) ; binutil's strip b0rkes MesCC/M1/hex2 binaries
- (synopsis "Scheme interpreter and C compiler for full source bootstrapping")
- (description
- "GNU Mes--Maxwell Equations of Software--brings the Reduced Binary Seed
-bootstrap to Guix and aims to help create full source bootstrapping for
-GNU/Linux distributions. It consists of a mutual self-hosting Scheme
-interpreter in C and a Nyacc-based C compiler in Scheme and is compatible with
-Guile.")
- (home-page "https://www.gnu.org/software/mes/")
- (license gpl3+)))
-
-(define-public mes
- (package
- (inherit mes-0.19)
- (version "0.23")
- (source (origin
- (method url-fetch)
- (uri (string-append "mirror://gnu/mes/"
- "mes-" version ".tar.gz"))
- (sha256
- (base32
- "0mnryfkl0dwbr5gxp16j5s95gw7z1vm1fqa1pxabp0aiar1hw53s"))))
- (supported-systems '("armhf-linux" "i686-linux" "x86_64-linux"))
- (propagated-inputs
- `(("mescc-tools" ,mescc-tools)
- ("nyacc" ,nyacc-1.00.2)))
(native-search-paths
(list (search-path-specification
(variable "C_INCLUDE_PATH")
@@ -226,180 +192,80 @@ Guile.")
(search-path-specification
(variable "MES_PREFIX")
(separator #f)
- (files '("")))))))
+ (files '("")))))
+ (synopsis "Scheme interpreter and C compiler for full source bootstrapping")
+ (description
+ "GNU Mes--Maxwell Equations of Software--brings the Reduced Binary Seed
+bootstrap to Guix and aims to help create full source bootstrapping for
+GNU/Linux distributions. It consists of a mutual self-hosting Scheme
+interpreter in C and a Nyacc-based C compiler in Scheme and is compatible with
+Guile.")
+ (home-page "https://www.gnu.org/software/mes/")
+ (license gpl3+)))
-(define-public mes-rb5
- ;; This is the Reproducible-Builds summit 5's Mes, also built on Debian
- ;; GNU/Linux and NixOS to produce the same, bit-for-bit identical result.
+(define-public mescc-tools
(package
- (inherit mes)
- (name "mes-rb5")
- (version "0.22")
+ (name "mescc-tools")
+ (version "1.2.0")
(source (origin
- (method url-fetch)
- (uri (string-append "mirror://gnu/mes/"
- "mes-" version ".tar.gz"))
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://git.savannah.nongnu.org/r/mescc-tools.git")
+ (commit (string-append "Release_" version))
+ (recursive? #t))) ;for M2libc
+ (file-name (git-file-name name version))
(sha256
(base32
- "0p1jsrrmcbc0zrvbvnjbb6iyxr0in71km293q8qj6gnar6bw09av"))))
- (supported-systems '("i686-linux" "x86_64-linux"))
- (inputs '())
- (propagated-inputs '())
- (native-inputs
- `(("bash" ,bash)
- ("coreutils" ,coreutils)
- ("grep" ,grep)
- ("guile" ,guile-2.2)
- ("gzip" ,gzip)
- ("libc" ,glibc)
- ("locales" ,glibc-utf8-locales)
- ("make" ,gnu-make)
- ("mes" ,mes)
- ("mescc-tools" ,mescc-tools)
- ("nyacc" ,nyacc-0.99)
- ("sed" ,sed)
- ("tar" ,tar)))
- (supported-systems '("i686-linux"))
+ "1xkn5sspfxldy4wm8fq8gd8kwn46578zhfl12c16pq74x21zb198"))))
+ (build-system gnu-build-system)
+ (supported-systems '("i686-linux" "x86_64-linux"
+ "armhf-linux" "aarch64-linux"
+ "powerpc64le-linux"))
(arguments
- `(#:implicit-inputs? #f
- #:strip-binaries? #f ; binutil's strip b0rkes MesCC/M1/hex2 binaries
- #:modules ((guix build gnu-build-system)
- (guix build utils)
- (ice-9 popen)
- (ice-9 rdelim))
- #:phases
- (modify-phases %standard-phases
- (add-before 'configure 'setenv
- (lambda _
- (setenv "AR" "mesar")
- (setenv "CC" "mescc")
- (setenv "GUILD" "true")
- (setenv "SCHEME" "mes")
- (setenv "LC_ALL" "en_US.UTF-8")
- #t))
- (replace 'configure
- (lambda _
- (let ((out (assoc-ref %outputs "out")))
- (invoke "sh" "configure.sh"
- (string-append "--prefix=" out)
- "--host=i686-unkown-linux-gnu"
- "--with-courage"))))
- (replace 'build
- (lambda _
- (invoke "sh" "bootstrap.sh")))
- (replace 'check
- (lambda _
- (copy-file "bin/mes-mescc" "bin/mes-mescc-0.21")
- (system* "sed" "-i" "s/0\\.22/0\\.21/" "bin/mes-mescc-0.21")
- (let ((sha256sum
- (read-delimited
- " "
- (open-pipe* OPEN_READ "sha256sum" "bin/mes-mescc-0.21"))))
- (unless
- (equal?
- sha256sum
- "9e0bcb1633c58e7bc415f6ea27cee7951d6b0658e13cdc147e992b31a14625fb")
- (throw 'error "mes checksum failure"))
- #t)))
- (replace 'install
- (lambda _
- (invoke "sh" "install.sh"))))))))
-
-(define-public mescc-tools-0.5.2
- ;; Mescc-tools used for bootstrap.
- (let ((commit "bb062b0da7bf2724ca40f9002b121579898d4ef7")
- (revision "0")
- (version "0.5.2"))
- (package
- (name "mescc-tools")
- (version (git-version version revision commit))
- (source (origin
- (method git-fetch)
- (uri (git-reference
- (url "https://git.savannah.nongnu.org/r/mescc-tools.git")
- (commit commit)))
- (file-name (git-file-name name version))
- (sha256
- (base32
- "1nc6rnax66vmhqsjg0kgx23pihdcxmww6v325ywf59vsq1jqjvff"))))
- (build-system gnu-build-system)
- (supported-systems '("i686-linux" "x86_64-linux"))
- (arguments
- `(#:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out")))
- #:test-target "test"
- #:phases (modify-phases %standard-phases
- (delete 'configure))))
- (synopsis "Tools for the full source bootstrapping process")
- (description
- "Mescc-tools is a collection of tools for use in a full source
+ `(#:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out")))
+ #:test-target "test"
+ #:phases (modify-phases %standard-phases
+ (delete 'configure))))
+ (native-inputs (list which))
+ (synopsis "Tools for the full source bootstrapping process")
+ (description
+ "Mescc-tools is a collection of tools for use in a full source
bootstrapping process. It consists of the M1 macro assembler, the hex2
linker, the blood-elf symbol table generator, the kaem shell, exec_enable and
get_machine.")
(home-page "https://savannah.nongnu.org/projects/mescc-tools")
- (license gpl3+))))
+ (license gpl3+)))
-(define-public mescc-tools
+(define-public m2-planet
(package
- (inherit mescc-tools-0.5.2)
- (name "mescc-tools")
- (version "0.7.0")
- (source
- (origin
- (method url-fetch)
- (uri (string-append
- "http://git.savannah.nongnu.org/cgit/mescc-tools.git/snapshot/"
- name "-Release_" version
- ".tar.gz"))
- (file-name (string-append name "-" version ".tar.gz"))
- (sha256
- (base32
- "1p1ijia4rm3002f5sypidl9v5gq0mlch9b0n61rpxkdsaaxjqax3"))))
- (supported-systems '("armhf-linux" "aarch64-linux"
- "i686-linux" "x86_64-linux"))
+ (name "m2-planet")
+ (version "1.8.0")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/oriansj/m2-planet")
+ (commit (string-append "Release_" version))
+ (recursive? #t))) ;for M2libc
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0525fhijrjljgaabmgsjy8yk2pmh5zf8lwa44wpvkjc18knl7nza"))))
+ (native-inputs (list mescc-tools))
+ (build-system gnu-build-system)
(arguments
- (substitute-keyword-arguments (package-arguments mescc-tools-0.5.2)
- ((#:make-flags _)
- `(list (string-append "PREFIX=" (assoc-ref %outputs "out"))
- "CC=gcc"))
- ((#:phases phases)
- `(modify-phases ,phases
- (add-after 'unpack 'patch-prefix
- (lambda _
- (substitute* "sha256.sh"
- (("/usr/bin/sha256sum") (which "sha256sum")))
- #t))))))))
-
-(define-public m2-planet
- (let ((commit "b87ddb0051b168ea45f8d49a610dcd069263336a")
- (revision "2"))
- (package
- (name "m2-planet")
- (version (string-append "1.4.0-" revision "." (string-take commit 7)))
- (source (origin
- (method git-fetch)
- (uri (git-reference
- (url "https://github.com/oriansj/m2-planet")
- (commit commit)))
- (file-name (git-file-name name version))
- (sha256
- (base32
- "0yyc0fcbbxi9jqa1n76x0rwspdrwmc8g09jlmsw9c35nflrhmz8q"))))
- (native-inputs
- `(("mescc-tools" ,mescc-tools)))
- (build-system gnu-build-system)
- (arguments
- `(#:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out")))
- #:tests? #f
- #:phases (modify-phases %standard-phases
- (delete 'bootstrap)
- (delete 'configure))))
- (synopsis "The PLAtform NEutral Transpiler")
- (description
- "M2-Planet, the PLAtform NEutral Transpiler, when combined with
+ `(#:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
+ ,(string-append "CC=" (cc-for-target)))
+ #:tests? #f
+ #:phases (modify-phases %standard-phases
+ (delete 'bootstrap)
+ (delete 'configure))))
+ (synopsis "The PLAtform NEutral Transpiler")
+ (description
+ "M2-Planet, the PLAtform NEutral Transpiler, when combined with
mescc-tools, compiles a subset of the C language into working binaries with
introspective steps in between. It is self-hosting and for bootstrapping it
also has an implementation in the M1 macro assembly language. M2-Planet is
built as Phase-5 of the full source bootstrapping process and is capable of
building GNU Mes.")
- (home-page "https://github.com/oriansj/m2-planet")
- (license gpl3+))))
+ (home-page "https://github.com/oriansj/m2-planet")
+ (license gpl3+)))
diff --git a/gnu/packages/messaging.scm b/gnu/packages/messaging.scm
index 0ac5ac4c01..a81214947c 100644
--- a/gnu/packages/messaging.scm
+++ b/gnu/packages/messaging.scm
@@ -3,7 +3,7 @@
;;; Copyright © 2014, 2017 Julien Lepiller <julien@lepiller.eu>
;;; Copyright © 2015 Taylan Ulrich Bayırlı/Kammer <taylanbayirli@gmail.com>
;;; Copyright © 2015 Andreas Enge <andreas@enge.fr>
-;;; Copyright © 2015, 2016, 2017, 2018, 2019 Ricardo Wurmus <rekado@elephly.net>
+;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2021 Ricardo Wurmus <rekado@elephly.net>
;;; Copyright © 2015, 2018, 2019, 2020, 2021 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2016, 2017 Nikita <nikita@n0.is>
;;; Copyright © 2016 Andy Patterson <ajpatter@uwaterloo.ca>
@@ -314,18 +314,17 @@ user interfaces in a fast and easy way. It is based on GLib and ncurses.")
(base32 "1s16cripy5w9k12534qb012iwc5m9qcjyrywgsziyn3kl3i0aa8h"))))
(build-system gnu-build-system)
(arguments
+ ;; 'test/manual/userconfig.h' contains definitions in lieu of
+ ;; declarations, hence '-fcommon'.
`(#:configure-flags
- (list
- "--disable-static")
+ (list "--disable-static" "CFLAGS=-O2 -g -fcommon")
#:phases
(modify-phases %standard-phases
(add-after 'unpack 'patch-shebangs
(lambda* (#:key inputs #:allow-other-keys)
(substitute* "protobufgen.sh"
(("/bin/sh")
- (string-append (assoc-ref inputs "bash")
- "/bin/sh")))
- #t)))))
+ (search-input-file inputs "/bin/sh"))))))))
(native-inputs
`(("autoconf" ,autoconf)
("automake" ,automake)
@@ -873,7 +872,8 @@ used by Pidgin and Bitlbee, among others, to access
(let* ((out (assoc-ref outputs "out"))
(bin (string-append out "/bin")))
(wrap-program (string-append bin "/hexchat")
- `("PYTHONPATH" ":" prefix (,(getenv "PYTHONPATH"))))))))))
+ `("GUIX_PYTHONPATH" ":" prefix
+ (,(getenv "GUIX_PYTHONPATH"))))))))))
(synopsis "Graphical IRC client")
(description
"HexChat lets you connect to multiple IRC networks at once. The main
@@ -1250,7 +1250,7 @@ of xmpppy.")
"share/gajim/plugins")))
;; Gajim needs to use the propagated inputs of its plugins.
(search-path-specification
- (variable "PYTHONPATH")
+ (variable "GUIX_PYTHONPATH")
(files
(list
(string-append
@@ -1423,7 +1423,7 @@ Encryption to Gajim.")
;; NOTE: Commented-out lines are to be enabled in v0.3.0.
`(("atk" ,atk)
("cairo" ,cairo)
- ("gdk-pixbuf" ,gdk-pixbuf+svg)
+ ("librsvg" ,librsvg)
("glib" ,glib)
("glib-networking" ,glib-networking)
("gpgme" ,gpgme)
@@ -1439,7 +1439,7 @@ Encryption to Gajim.")
("libgee" ,libgee)
("libnice" ,libnice)
("libsignal-protocol-c" ,libsignal-protocol-c)
- ("libsoup" ,libsoup)
+ ("libsoup" ,libsoup-minimal-2)
;;("libsrtp" ,libsrtp) ;for calls support
("pango" ,pango)
("qrencode" ,qrencode)
@@ -1697,8 +1697,7 @@ messenger protocol.")
(lambda* (#:key inputs outputs #:allow-other-keys)
(substitute* "../source/src/xlib/gtk.c"
(("libgtk-3.so")
- (string-append (assoc-ref inputs "gtk+")
- "/lib/libgtk-3.so")))))
+ (search-input-file inputs "/lib/libgtk-3.so")))))
(add-after 'install 'wrap-program
(lambda* (#:key inputs outputs #:allow-other-keys)
(wrap-program (string-append (assoc-ref outputs "out")
@@ -2058,7 +2057,9 @@ support, and more.")
"1rmrn7a1bb7vm26yaklrvx008a9qhwc32s57dwrlf40lv9gffwny"))))
(build-system gnu-build-system)
(arguments
- `(#:phases
+ `(#:configure-flags
+ (list "CFLAGS=-fcommon")
+ #:phases
(modify-phases %standard-phases
;; For 'system' commands in Scheme code.
(add-after 'install 'wrap-program
@@ -3094,18 +3095,14 @@ designed for experienced users.")
`(#:phases
(modify-phases %standard-phases
(add-after 'unpack 'cd-to-zulip-dir
- (lambda _
- (chdir "zulip")
- #t))
+ (lambda _ (chdir "zulip")))
(replace 'check
(lambda* (#:key inputs outputs tests? #:allow-other-keys)
(let ((test-zulip "../tools/test-zulip"))
(when tests?
(add-installed-pythonpath inputs outputs)
- (setenv "PYTHONPATH" (string-append ".:" (getenv "PYTHONPATH")))
(patch-shebang test-zulip)
- (invoke test-zulip))
- #t))))))
+ (invoke test-zulip))))))))
(propagated-inputs
`(("python-matrix-client" ,python-matrix-client)
("python-pyopenssl" ,python-pyopenssl)
@@ -3275,7 +3272,7 @@ a number of clients.")
"import sys\n"
(map (lambda (path)
(string-append "sys.path.append('" path "')\n"))
- (string-split (getenv "PYTHONPATH") #\:)))))
+ (string-split (getenv "GUIX_PYTHONPATH") #\:)))))
;; Install script.
(mkdir-p weechat-python)
(copy-file "main.py"
@@ -3325,7 +3322,7 @@ Weechat communicate over the Matrix protocol.")
all
(map (lambda (path)
(string-append "sys.path.append('" path "')\n"))
- (string-split (getenv "PYTHONPATH") #\:)))))
+ (string-split (getenv "GUIX_PYTHONPATH") #\:)))))
;; Install script.
(install-file "wee_slack.py"
(string-append (assoc-ref outputs "out")
diff --git a/gnu/packages/monitoring.scm b/gnu/packages/monitoring.scm
index f71daaee8a..2e0768f24b 100644
--- a/gnu/packages/monitoring.scm
+++ b/gnu/packages/monitoring.scm
@@ -56,6 +56,7 @@
#:use-module (gnu packages perl)
#:use-module (gnu packages pkg-config)
#:use-module (gnu packages python)
+ #:use-module (gnu packages python-build)
#:use-module (gnu packages python-web)
#:use-module (gnu packages python-xyz)
#:use-module (gnu packages rrdtool)
@@ -358,15 +359,16 @@ HTTP. Features:
(define-public python-whisper
(package
(name "python-whisper")
- (version "1.0.2")
+ (version "1.1.8")
(source
(origin
(method url-fetch)
(uri (pypi-uri "whisper" version))
(sha256
(base32
- "1v1bi3fl1i6p4z4ki692bykrkw6907dn3mfq0151f70lvi3zpns3"))))
+ "1bk29w09zcpsv8hp0g0al7nwrxa07z0ycls3mbh83wfavk83aprl"))))
(build-system python-build-system)
+ (native-inputs (list python-six))
(home-page "http://graphiteapp.org/")
(synopsis "Fixed size round-robin style database for Graphite")
(description "Whisper is one of three components within the Graphite
diff --git a/gnu/packages/mp3.scm b/gnu/packages/mp3.scm
index 3555958f2a..406d010193 100644
--- a/gnu/packages/mp3.scm
+++ b/gnu/packages/mp3.scm
@@ -9,6 +9,7 @@
;;; Copyright © 2019 Ricardo Wurmus <rekado@elephly.net>
;;; Copyright © 2020 Michael Rohleder <mike@rohleder.de>
;;; Copyright © 2021 Simon Streit <simon@netpanic.org>
+;;; Copyright © 2021 Guillaume Le Vaillant <glv@posteo.net>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -412,7 +413,8 @@ command-line tool as well as a C library, libmpg123.")
(base32
"0ki8mh76bbmdh77qsiw682dvi8y468yhbdabqwg05igmwc1wqvq5"))
(patches
- (search-patches "mpg321-CVE-2019-14247.patch"))))
+ (search-patches "mpg321-CVE-2019-14247.patch"
+ "mpg321-gcc-10.patch"))))
(build-system gnu-build-system)
(arguments '(#:configure-flags '("--disable-alsa")))
(inputs
@@ -481,7 +483,7 @@ use with CD-recording software).")
(patches (search-patches "ripperx-missing-file.patch"))))
(build-system gnu-build-system)
(propagated-inputs
- `(("gs-fonts" ,gs-fonts)
+ `(("font-ghostscript" ,font-ghostscript)
("cdparanoia" ,cdparanoia)
("flac" ,flac)
("lame" ,lame)
@@ -544,7 +546,9 @@ format.")
(lambda _
(substitute* "Makefile"
(("CC[[:blank:]]*:=.*")
- "CC := gcc\n"))))
+ "CC := gcc\n"))
+
+ (setenv "CFLAGS" "-fcommon -g"))) ;allow compilation with GCC 10
(replace 'install
(lambda* (#:key outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))
diff --git a/gnu/packages/mpd.scm b/gnu/packages/mpd.scm
index e99dd49adc..ea41f9e97e 100644
--- a/gnu/packages/mpd.scm
+++ b/gnu/packages/mpd.scm
@@ -7,7 +7,7 @@
;;; Copyright © 2016, 2018, 2019, 2020 Leo Famulari <leo@famulari.name>
;;; Copyright © 2018–2021 Tobias Geerinckx-Rice <me@tobias.gr>
;;; Copyright © 2019 Evan Straw <evan.straw99@gmail.com>
-;;; Copyright © 2020 Ricardo Wurmus <rekado@elephly.net>
+;;; Copyright © 2020, 2021 Ricardo Wurmus <rekado@elephly.net>
;;; Copyright © 2020 Lars-Dominik Braun <lars@6xq.net>
;;; Copyright © 2020, 2021 Simon Streit <simon@netpanic.org>
;;; Copyright © 2021 Noah Evans <noah@nevans.me>
@@ -120,8 +120,7 @@ interfacing MPD in the C, C++ & Objective C languages.")
"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)
@@ -408,15 +407,15 @@ other MPD frontends.")
(add-after 'install 'wrap-program
(lambda* (#:key inputs outputs #:allow-other-keys)
(let ((out (assoc-ref outputs "out"))
- (python-path (getenv "PYTHONPATH")))
+ (python-path (getenv "GUIX_PYTHONPATH")))
(wrap-program (string-append out "/bin/mpDris2")
- `("PYTHONPATH" ":" prefix (,python-path)))
+ `("GUIX_PYTHONPATH" ":" prefix (,python-path)))
#t))))))
(inputs
`(("python-mpd2" ,python-mpd2)
("python-dbus" ,python-dbus)
("python-pygobject" ,python-pygobject)
- ("python" ,python))) ; Sets PYTHONPATH.
+ ("python" ,python))) ; Sets GUIX_PYTHONPATH.
;; For bootstrapping.
(native-inputs
`(("autoconf" ,autoconf)
@@ -507,9 +506,8 @@ artists along with albumart.")
(let ((prog (string-append (assoc-ref outputs "out")
"/bin/mcg")))
(wrap-program prog
- `("PYTHONPATH" = (,(getenv "PYTHONPATH")))
- `("GI_TYPELIB_PATH" = (,(getenv "GI_TYPELIB_PATH"))))
- #t)))
+ `("GUIX_PYTHONPATH" = (,(getenv "GUIX_PYTHONPATH")))
+ `("GI_TYPELIB_PATH" = (,(getenv "GI_TYPELIB_PATH")))))))
(add-after 'wrap-program 'glib-or-gtk-wrap
(assoc-ref glib-or-gtk:%standard-phases 'glib-or-gtk-wrap)))))
(synopsis "Covergrid for the MPD")
diff --git a/gnu/packages/mpi.scm b/gnu/packages/mpi.scm
index 77711c90ff..0398e28eff 100644
--- a/gnu/packages/mpi.scm
+++ b/gnu/packages/mpi.scm
@@ -263,12 +263,11 @@ bind processes, and much more.")
(add-after 'unpack 'find-opensm-headers
(lambda* (#:key inputs #:allow-other-keys)
(setenv "C_INCLUDE_PATH"
- (string-append (assoc-ref inputs "opensm")
- "/include/infiniband"))
+ (search-input-directory inputs
+ "/include/infiniband"))
(setenv "CPLUS_INCLUDE_PATH"
- (string-append (assoc-ref inputs "opensm")
- "/include/infiniband"))
- #t))
+ (search-input-directory inputs
+ "/include/infiniband"))))
(add-before 'build 'remove-absolute
(lambda _
;; Remove compiler absolute file names (OPAL_FC_ABSOLUTE
@@ -359,8 +358,7 @@ software vendors, application developers and computer science researchers.")
(lambda* (#:key inputs #:allow-other-keys)
(substitute* "ompi/mpi/java/c/Makefile.in"
(("\\$\\(top_builddir\\)/ompi/lib@OMPI_LIBMPI_NAME@.la")
- (string-append (assoc-ref inputs "openmpi") "/lib/libmpi.la")))
- #t))
+ (search-input-file inputs "/lib/libmpi.la")))))
(add-after 'install 'strip-jar-timestamps
(assoc-ref ant:%standard-phases 'strip-jar-timestamps)))))))
(synopsis "Java bindings for MPI")))
diff --git a/gnu/packages/multiprecision.scm b/gnu/packages/multiprecision.scm
index 7861e2f589..c7307da0cf 100644
--- a/gnu/packages/multiprecision.scm
+++ b/gnu/packages/multiprecision.scm
@@ -39,7 +39,7 @@
(define-public gmp
(package
(name "gmp")
- (version "6.2.0")
+ (version "6.2.1")
(source (origin
(method url-fetch)
(uri
@@ -47,7 +47,7 @@
version ".tar.xz"))
(sha256
(base32
- "09hmg8k63mbfrx1x3yy6y1yzbbq85kw5avbibhcgrg9z3ganr3i5"))
+ "1wml97fdmpcynsbw9yl77rj29qibfp652d0w3222zlfx5j8jjj7x"))
(patches (search-patches "gmp-faulty-test.patch"))))
(build-system gnu-build-system)
(native-inputs `(("m4" ,m4)))
@@ -114,13 +114,13 @@ It is aimed at use in, for example, cryptography and computational algebra.")
(define-public mpfr
(package
(name "mpfr")
- (version "4.0.2")
+ (version "4.1.0")
(source (origin
(method url-fetch)
(uri (string-append "mirror://gnu/mpfr/mpfr-" version
".tar.xz"))
(sha256 (base32
- "12m3amcavhpqygc499s3fzqlb8f2j2rr7fkqsm10xbjfc04fffqx"))))
+ "0zwaanakrqjf84lfr5hfsdr7hncwv9wj0mchlr7cmxigfgqs760c"))))
(build-system gnu-build-system)
(outputs '("out" "debug"))
(propagated-inputs `(("gmp" ,gmp))) ; <mpfr.h> refers to <gmp.h>
@@ -135,14 +135,14 @@ correct rounding.")
(define-public mpc
(package
(name "mpc")
- (version "1.1.0")
+ (version "1.2.1")
(source (origin
(method url-fetch)
(uri (string-append
"mirror://gnu/mpc/mpc-" version ".tar.gz"))
(sha256
(base32
- "0biwnhjm3rx3hc0rfpvyniky4lpzsvdcwhmcn7f0h4iw2hwcb1b9"))))
+ "0n846hqfqvmsmim7qdlms0qr86f1hck19p12nq3g3z2x74n3sl0p"))))
(build-system gnu-build-system)
(outputs '("out" "debug"))
(propagated-inputs `(("gmp" ,gmp) ; <mpc.h> refers to both
@@ -403,8 +403,9 @@ multiplies.")
#:make-flags
(list (string-append "PREFIX=" (assoc-ref %outputs "out"))
"CFLAGS += -DLTM_DESC -DUSE_LTM"
- (string-append "EXTRALIBS=" (assoc-ref %build-inputs "libtommath")
- "/lib/libtommath.so")
+ (string-append "EXTRALIBS="
+ (search-input-file %build-inputs
+ "/lib/libtommath.so"))
(string-append "CC=" ,(cc-for-target)))))
(native-inputs
`(("libtool" ,libtool)))
diff --git a/gnu/packages/music.scm b/gnu/packages/music.scm
index 9d2fad853e..c01671b909 100644
--- a/gnu/packages/music.scm
+++ b/gnu/packages/music.scm
@@ -17,7 +17,7 @@
;;; Copyright © 2018 nee <nee.git@hidamari.blue>
;;; Copyright © 2018, 2021 Stefan Reichör <stefan@xsteve.at>
;;; Copyright © 2018 Pierre Neidhardt <mail@ambrevar.xyz>
-;;; Copyright © 2018, 2019 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2018, 2019, 2021 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2018 Björn Höfling <bjoern.hoefling@bjoernhoefling.de>
;;; Copyright © 2019 Gabriel Hondet <gabrielhondet@gmail.com>
;;; Copyright © 2019 Timotej Lazar <timotej.lazar@araneo.si>
@@ -635,7 +635,7 @@ many input formats and provides a customisable Vi-style user interface.")
;; Replace hard-coded diff file name.
(substitute* "tests/integration.c"
(("/usr/bin/diff")
- (string-append (assoc-ref inputs "diffutils") "/bin/diff")))
+ (search-input-file inputs "/bin/diff")))
;; Denemo's documentation says to use this command to run its
;; test suite.
(invoke "make" "-C" "tests" "check")))
@@ -643,8 +643,7 @@ many input formats and provides a customisable Vi-style user interface.")
;; This phase sets the default path for lilypond to its current
;; location in the store.
(lambda* (#:key inputs #:allow-other-keys)
- (let* ((lilypond (string-append (assoc-ref inputs "lilypond")
- "/bin/lilypond")))
+ (let* ((lilypond (search-input-file inputs "/bin/lilypond")))
(substitute* "src/core/prefops.c"
(("g_string_new \\(\"lilypond\"\\);")
(string-append "g_string_new (\""
@@ -1453,23 +1452,22 @@ and auto-mapping slices to MIDI note numbers.")
"/share/fonts/opentype/"))
#:phases
(modify-phases %standard-phases
- (add-after 'unpack 'use-texlive-union
- (lambda _
- ;; FIXME: fonts are not found and have to be generated in HOME.
- (setenv "HOME" "/tmp")
- ;; The test for the "lh" package fails, even though it is among
- ;; the inputs.
- (substitute* "configure"
- (("TEX_FIKPARM=.*") "TEX_FIKPARM=found\n"))
- #t))
(add-after 'unpack 'fix-path-references
(lambda _
(substitute* "scm/backend-library.scm"
(("\\(search-executable '\\(\"gs\"\\)\\)")
(string-append "\"" (which "gs") "\""))
(("\"/bin/sh\"")
- (string-append "\"" (which "sh") "\"")))
- #t))
+ (string-append "\"" (which "sh") "\"")))))
+ (add-after 'fix-path-references 'adjust-to-API-change
+ (lambda _
+ (substitute* '("Documentation/pictures/GNUmakefile"
+ "stepmake/stepmake/tex-rules.make")
+ ((".*-c .setpdfwrite.*") ""))
+ (substitute* "scm/backend-library.scm"
+ (("\"-c.setpdfwrite\"") ""))
+ (substitute* "scm/framework-ps.scm"
+ (("\".setpdfwrite ") "\""))))
(add-before 'configure 'prepare-configuration
(lambda _
(substitute* "configure"
@@ -1480,14 +1478,12 @@ and auto-mapping slices to MIDI note numbers.")
;; Also allow for SOURCE_DATE_EPOCH = 0 in fontforge.
(("20110222") "19700101"))
(setenv "out" "www")
- (setenv "conf" "www")
- #t))
+ (setenv "conf" "www")))
(add-after 'install 'install-info
(lambda _
(invoke "make"
"-j" (number->string (parallel-job-count))
- "conf=www" "install-info")
- #t)))))
+ "conf=www" "install-info"))))))
(inputs
`(("guile" ,guile-1.8)
("font-dejavu" ,font-dejavu)
@@ -1506,9 +1502,9 @@ and auto-mapping slices to MIDI note numbers.")
("gettext" ,gettext-minimal)
("imagemagick" ,imagemagick)
("netpbm" ,netpbm) ;for pngtopnm
- ("texlive" ,(texlive-union (list texlive-metapost
- texlive-generic-epsf
- texlive-latex-lh
+ ("texlive" ,(texlive-updmap.cfg (list texlive-metapost
+ texlive-epsf
+ texlive-lh
texlive-latex-cyrillic)))
("texinfo" ,texinfo)
("texi2html" ,texi2html-1.82)
@@ -1591,7 +1587,7 @@ listeners answer questions about music quickly and simply.")
("python-iniconfig" ,python-iniconfig)
("python-isort" ,python-isort)
("python-mypy" ,python-mypy)
- ("python-pytest" ,python-pytest-6)
+ ("python-pytest" ,python-pytest)
("python-pytest-cov" ,python-pytest-cov)
("python-sphinx-autodoc-typehints" ,python-sphinx-autodoc-typehints)))
(inputs
@@ -1646,7 +1642,7 @@ typographic detail of symbols on the page.")
("python-iniconfig" ,python-iniconfig)
("python-isort" ,python-isort)
("python-mypy" ,python-mypy)
- ("python-pytest" ,python-pytest-6)
+ ("python-pytest" ,python-pytest)
("python-pytest-cov" ,python-pytest-cov)
("python-pytest-helpers-namespace" ,python-pytest-helpers-namespace)))
(propagated-inputs
@@ -1688,7 +1684,7 @@ and manipulating rhythms such as accelerandi, taleas, and more.")
("python-iniconfig" ,python-iniconfig)
("python-isort" ,python-isort)
("python-mypy" ,python-mypy)
- ("python-pytest" ,python-pytest-6)
+ ("python-pytest" ,python-pytest)
("python-pytest-cov" ,python-pytest-cov)
("python-pytest-helpers-namespace" ,python-pytest-helpers-namespace)))
(propagated-inputs
@@ -1735,7 +1731,7 @@ music theorist Paul Nauert's quantization grids or Q-Grids, for short.")
("python-iniconfig" ,python-iniconfig)
("python-isort" ,python-isort)
("python-mypy" ,python-mypy)
- ("python-pytest" ,python-pytest-6)
+ ("python-pytest" ,python-pytest)
("python-pytest-cov" ,python-pytest-cov)
("python-pytest-helpers-namespace" ,python-pytest-helpers-namespace)))
(propagated-inputs
@@ -1885,7 +1881,7 @@ complete studio.")
(build-system gnu-build-system)
(inputs
`(("liblo" ,liblo)
- ("gtkmm" ,gtkmm)
+ ("gtkmm" ,gtkmm-3)
("alsa-lib" ,alsa-lib)
("libxml++" ,libxml++-2)))
(native-inputs
@@ -2093,9 +2089,9 @@ for path in [path for path in sys.path if 'site-packages' in path]: site.addsite
(lambda* (#:key inputs outputs #:allow-other-keys)
;; Make sure 'solfege' runs with the correct PYTHONPATH.
(let* ((out (assoc-ref outputs "out"))
- (path (getenv "PYTHONPATH")))
+ (path (getenv "GUIX_PYTHONPATH")))
(wrap-program (string-append out "/bin/solfege")
- `("PYTHONPATH" ":" prefix (,path))))
+ `("GUIX_PYTHONPATH" ":" prefix (,path))))
#t)))))
(inputs
`(("python" ,python-2)
@@ -3312,9 +3308,7 @@ can connect to any JACK port and record the output into a stereo WAV file.")
;; Fix reference to dlopened libraries.
(substitute* "jackselect/alsainfo.py"
(("libasound.so.2")
- (string-append (assoc-ref inputs "alsa-lib")
- "/lib/libasound.so.2")))
- #t))
+ (search-input-file inputs "/lib/libasound.so.2")))))
(replace 'build
(assoc-ref python:%standard-phases 'build))
(add-after 'install 'wrap
@@ -3498,7 +3492,13 @@ and hold, etc.")
"/include/"))
#:phases
(modify-phases %standard-phases
- (delete 'configure))))
+ (delete 'configure)
+ (add-before 'build 'target-specific-glib-API-version
+ (lambda _
+ ;; See https://github.com/brummer10/gxtuner/pull/21
+ (setenv "CFLAGS"
+ "-DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_54\
+ -DGLIB_VERSION_MAX_ALLOWED=GLIB_VERSION_2_54"))))))
(inputs
`(("gtk+" ,gtk+)
("jack" ,jack-1)
@@ -3585,8 +3585,7 @@ socket or command line.")
(lambda* (#:key inputs #:allow-other-keys)
(substitute* "curseradio/curseradio.py"
(("/usr/bin/mpv")
- (string-append (assoc-ref inputs "mpv") "/bin/mpv")))
- #t)))))
+ (search-input-file inputs "/bin/mpv"))))))))
(propagated-inputs
`(("python-lxml" ,python-lxml)
("python-requests" ,python-requests)
@@ -4757,9 +4756,6 @@ change user data such as profile information, collections and wantlists,
inventory, and orders.")
(license license:bsd-2)))
-(define-public python2-discogs-client
- (package-with-python2 python-discogs-client))
-
(define-public libsmf
(package
(name "libsmf")
@@ -5518,6 +5514,10 @@ Recording Code} (ISRC) can be extracted.}")
(arguments
`(#:phases
(modify-phases %standard-phases
+ (add-after 'unpack 'fix-build
+ (lambda _
+ (substitute* "src/CMakeLists.txt"
+ (("\\*.inc") ""))))
(replace 'check
(lambda _
;; requires network connections
@@ -6396,7 +6396,9 @@ MIDI drums and comes as two separate drumkits: Black Pearl and Red Zeppelin.")
(file-name (git-file-name name version))
(sha256
(base32
- "17ys2vvhncx9i3ydg3xwgz1d3gqv4yr5mqi7vr0i0ca6nad6x3d4"))))
+ "17ys2vvhncx9i3ydg3xwgz1d3gqv4yr5mqi7vr0i0ca6nad6x3d4"))
+ ;; Apply GCC 9 fixes from https://github.com/mtytel/helm/pull/233
+ (patches (search-patches "helm-fix-gcc-9-build.patch"))))
(build-system gnu-build-system)
(arguments
`(#:tests? #f ; no "check" target
@@ -6461,7 +6463,6 @@ and as an LV2 plugin.")
(build-system meson-build-system)
(arguments
`(#:glib-or-gtk? #t
- #:meson ,meson-0.55
#:configure-flags
`("-Dtests=true"
"-Dmanpage=true"
@@ -6934,7 +6935,7 @@ It is provided as an LV2 plugin and as a standalone Jack application.")
(substitute* (string-append bin "a2j")
(("a2j_control") (string-append bin "a2j_control")))
(wrap-program (string-append bin "a2j_control")
- `("PYTHONPATH" prefix (,(getenv "PYTHONPATH"))))
+ `("PYTHONPATH" prefix (,(getenv "GUIX_PYTHONPATH"))))
#t))))))
(build-system meson-build-system)
(inputs
diff --git a/gnu/packages/ncurses.scm b/gnu/packages/ncurses.scm
index 2e63565591..edf475a8ef 100644
--- a/gnu/packages/ncurses.scm
+++ b/gnu/packages/ncurses.scm
@@ -5,7 +5,7 @@
;;; Copyright © 2016 Nikita <nikita@n0.is>
;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2016 Jan Nieuwenhuizen <janneke@gnu.org>
-;;; Copyright © 2017, 2019, 2020 Marius Bakke <mbakke@fastmail.com>
+;;; Copyright © 2017, 2019, 2020, 2021 Marius Bakke <marius@gnu.org>
;;; Copyright © 2018, 2019 Tobias Geerinckx-Rice <me@tobias.gr>
;;; Copyright © 2020 Michael Rohleder <mike@rohleder.de>
;;;
@@ -36,16 +36,17 @@
#:use-module (gnu packages pkg-config)
#:use-module (gnu packages swig)
#:use-module (gnu packages linux)
- #:use-module (guix utils))
+ #:use-module (guix utils)
+ #:use-module (ice-9 match))
(define-public ncurses
(package
(name "ncurses")
- (version "6.2")
+ (version "6.2.20210619")
(source (origin
(method url-fetch)
(uri (string-append "mirror://gnu/ncurses/ncurses-"
- (car (string-split version #\-))
+ (version-major+minor version)
".tar.gz"))
(sha256
(base32
@@ -57,8 +58,7 @@
(let ((patch-makefile-phase
'(lambda _
(for-each patch-makefile-SHELL
- (find-files "." "Makefile.in"))
- #t))
+ (find-files "." "Makefile.in"))))
(configure-phase
;; The 'configure' script does not understand '--docdir', so we must
;; override that and use '--mandir' instead.
@@ -74,18 +74,20 @@
(if target
(cons (string-append "--host=" target)
configure-flags)
- configure-flags))
- #t)))
+ configure-flags)))))
(apply-rollup-patch-phase
;; Ncurses distributes "stable" patchsets to be applied on top
;; of the release tarball. These are only available as shell
;; scripts(!) so we decompress and apply them in a phase.
;; See <https://invisible-mirror.net/archives/ncurses/6.1/README>.
'(lambda* (#:key inputs native-inputs #:allow-other-keys)
- (copy-file (assoc-ref (or native-inputs inputs) "rollup-patch")
- (string-append (getcwd) "/rollup-patch.sh.bz2"))
- (invoke "bzip2" "-d" "rollup-patch.sh.bz2")
- (invoke "sh" "rollup-patch.sh")))
+ (let ((rollup-patch (assoc-ref (or native-inputs inputs)
+ "rollup-patch")))
+ (when rollup-patch
+ (copy-file rollup-patch
+ (string-append (getcwd) "/rollup-patch.sh.bz2"))
+ (invoke "bzip2" "-d" "rollup-patch.sh.bz2")
+ (invoke "sh" "rollup-patch.sh")))))
(remove-shebang-phase
'(lambda _
;; To avoid retaining a reference to the bootstrap Bash via the
@@ -98,8 +100,7 @@
(("@SHELL@ \\$0")
"$0")
(("mandir=.*$")
- "mandir=share/man"))
- #t))
+ "mandir=share/man"))))
(post-install-phase
`(lambda* (#:key outputs #:allow-other-keys)
(let ((out (assoc-ref outputs "out")))
@@ -156,13 +157,12 @@
(when (file-exists? packagew.pc)
(symlink packagew.pc package.pc))))
'())))
- '("curses" "ncurses" "form" "panel" "menu")))
- #t))))
+ '("curses" "ncurses" "form" "panel" "menu")))))))
`(#:configure-flags
,(cons*
'quasiquote
`(("--with-shared" "--without-debug" "--enable-widec"
-
+
"--enable-pc-files"
,(list 'unquote '(string-append "--with-pkg-config-libdir="
(assoc-ref %outputs "out")
@@ -195,6 +195,8 @@
,@(if (target-mingw?) '("--enable-term-driver") '()))))
#:tests? #f ; no "check" target
#:phases (modify-phases %standard-phases
+ (add-after 'unpack 'apply-rollup-patch
+ ,apply-rollup-patch-phase)
(replace 'configure ,configure-phase)
(add-after 'install 'post-install
,post-install-phase)
@@ -206,6 +208,17 @@
`(,@(if (%current-target-system)
`(("self" ,this-package)) ;for `tic'
'())
+ ("rollup-patch"
+ ,(origin
+ (method url-fetch)
+ (uri (match (string-split (version-major+minor+point version) #\.)
+ ((major minor point)
+ (string-append "https://invisible-mirror.net/archives"
+ "/ncurses/" major "." minor "/ncurses-"
+ major "." minor "-" point "-patch.sh.bz2"))))
+ (sha256
+ (base32
+ "1b6522cvi4066bgh9lp93q8lk93zcjjssvnw1512z447xvazy2y6"))))
("pkg-config" ,pkg-config)))
(native-search-paths
(list (search-path-specification
diff --git a/gnu/packages/netpbm.scm b/gnu/packages/netpbm.scm
index 96025661ca..5f3dcdb8ea 100644
--- a/gnu/packages/netpbm.scm
+++ b/gnu/packages/netpbm.scm
@@ -1,6 +1,6 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2013, 2015 Andreas Enge <andreas@enge.fr>
-;;; Copyright © 2015, 2016 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2015, 2016, 2021 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
;;;
;;; This file is part of GNU Guix.
@@ -132,8 +132,7 @@
(display (string-append "LDFLAGS += -Wl,-rpath=" %output "/lib") f)
(close-port f))
- (let ((rgb (string-append (assoc-ref inputs "xorg-rgb")
- "/share/X11/rgb.txt")))
+ (let ((rgb (search-input-file inputs "/share/X11/rgb.txt")))
(substitute* "config.mk"
(("/usr/share/netpbm/rgb.txt") rgb))
@@ -143,8 +142,7 @@
(("\"%s/gs\"")
"\"%s/gsc\"")
(("/usr/bin/gs")
- (string-append (assoc-ref inputs "ghostscript") "/bin/gsc"))))
- #t))
+ (search-input-file inputs "/bin/gsc"))))))
(add-before 'check 'setup-check
(lambda _
;; install temporarily into /tmp/netpbm
diff --git a/gnu/packages/nettle.scm b/gnu/packages/nettle.scm
index 7f85f54fbf..f9f34467c9 100644
--- a/gnu/packages/nettle.scm
+++ b/gnu/packages/nettle.scm
@@ -1,7 +1,7 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2012, 2013, 2014, 2015 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2016, 2021 Mark H Weaver <mhw@netris.org>
-;;; Copyright © 2017 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2017, 2020, 2021 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;;
;;; This file is part of GNU Guix.
@@ -73,43 +73,21 @@ cryptographic toolkits for object-oriented languages or in applications
themselves.")
(license gpl2+)))
-(define-public nettle-3.5
+(define-public nettle
;; This version is not API-compatible with version 2. In particular, lsh
;; cannot use it yet. So keep it separate.
(package (inherit nettle-2)
- (version "3.5.1")
- (replacement nettle-3.5/fixed)
+ (version "3.7.3")
(source (origin
(method url-fetch)
(uri (string-append "mirror://gnu/nettle/nettle-"
version ".tar.gz"))
(sha256
(base32
- "06clvkdfxhlbagn4afssylmn5vrak59dlmnvy8b2xc31hycs3k3m"))))
+ "1w5wwc3q0r97d2ifhx77cw7y8s20bm8x52is9j93p2h47yq5w7v6"))))
(arguments
(substitute-keyword-arguments (package-arguments nettle-2)
((#:configure-flags flags)
;; Build "fat" binaries where the right implementation is chosen
;; at run time based on CPU features (starting from 3.1.)
`(cons "--enable-fat" ,flags))))))
-
-(define nettle-3.5/fixed
- (package-with-extra-patches
- nettle-3.5
- (search-patches "nettle-3.5-check-_pkcs1_sec_decrypt-msg-len.patch"
- "nettle-3.5-CVE-2021-3580-pt1.patch"
- "nettle-3.5-CVE-2021-3580-pt2.patch")))
-
-(define-public nettle-3.7
- (package (inherit nettle-3.5)
- (version "3.7.3")
- (source (origin
- (method url-fetch)
- (uri (string-append "mirror://gnu/nettle/nettle-"
- version ".tar.gz"))
- (sha256
- (base32
- "1w5wwc3q0r97d2ifhx77cw7y8s20bm8x52is9j93p2h47yq5w7v6"))))))
-
-;;; Upgrading Nettle on master would cause 10000+ packages to be rebuilt.
-(define-public nettle nettle-3.5)
diff --git a/gnu/packages/networking.scm b/gnu/packages/networking.scm
index 739bd1a35a..f351dfe095 100644
--- a/gnu/packages/networking.scm
+++ b/gnu/packages/networking.scm
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2014, 2017, 2018 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2014, 2017, 2018, 2021 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2015, 2016, 2017, 2018, 2020 Ricardo Wurmus <rekado@elephly.net>
;;; Copyright © 2015 Mark H Weaver <mhw@netris.org>
;;; Copyright © 2015, 2016, 2017, 2021 Stefan Reichör <stefan@xsteve.at>
@@ -43,7 +43,10 @@
;;; Copyright © 2021 Hartmut Goebel <h.goebel@crazy-compilers.com>
;;; Copyright © 2021 Justin Veilleux <terramorpha@cock.li>
;;; Copyright © 2021 Vinicius Monego <monego@posteo.net>
+;;; Copyright © 2021 Felix Gruber <felgru@posteo.net>
;;; Copyright © 2021 Milkey Mouse <milkeymouse@meme.institute>
+;;; Copyright © 2021 Guillaume Le Vaillant <glv@posteo.net>
+;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -265,65 +268,83 @@ Android, and ChromeOS.")
(license license:lgpl2.1+)))
(define-public libnice
- (package
- (name "libnice")
- (version "0.1.18")
- (source
- (origin
- (method url-fetch)
- (uri
- (string-append "https://libnice.freedesktop.org/releases/"
- name "-" version ".tar.gz"))
- (sha256
- (base32 "1x3kj9b3dy9m2h6j96wgywfamas1j8k2ca43k5v82kmml9dx5asy"))))
- (build-system meson-build-system)
- (outputs '("out" "doc"))
- (arguments
- `(#:glib-or-gtk? #t ; To wrap binaries and/or compile schemas
- #:configure-flags
- (list
- "-Dgtk_doc=enabled")
- #:phases
- (modify-phases %standard-phases
- (add-after 'unpack 'disable-failing-test
- (lambda _
- (substitute* "tests/meson.build"
- ;; ‘test-set-port-range.c:66:main: assertion failed:
- ;; (nice_agent_gather_candidates (agent, stream1))’
- (("'test-set-port-range'") "#"))
- #t))
- (add-after 'install 'move-docs
- (lambda* (#:key outputs #:allow-other-keys)
- (let* ((out (assoc-ref outputs "out"))
- (doc (assoc-ref outputs "doc")))
- (mkdir-p (string-append doc "/share"))
- (rename-file
- (string-append out "/share/gtk-doc")
- (string-append doc "/share/gtk-doc"))
- #t))))))
- (native-inputs
- `(("glib:bin" ,glib "bin")
- ("gobject-introspection" ,gobject-introspection)
- ("gtk-doc" ,gtk-doc/stable)
- ("pkg-config" ,pkg-config)))
- (inputs
- `(("gstreamer" ,gstreamer)
- ("gst-plugins-base" ,gst-plugins-base)
- ("libnsl" ,libnsl)))
- (propagated-inputs
- `(("glib" ,glib)
- ("glib-networking" ,glib-networking)
- ("gnutls" ,gnutls)))
- (synopsis "GLib ICE implementation")
- (description "LibNice is a library that implements the Interactive
+ ;; The latest release is old and randomly fails tests with GStreamer 1.18.5,
+ ;; such as: "test-bind: ../libnice-0.1.18/stun/tests/test-bind.c:234:
+ ;; bad_responses: Assertion `len >= 20' failed"
+ (let ((revision "0")
+ (commit "47a96334448838c43d7e72f4ef51b317befbfae1"))
+ (package
+ (name "libnice")
+ (version (git-version "0.1.18" revision commit))
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://gitlab.freedesktop.org/libnice/libnice")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "19ypjazslmsb9vqs2wyyzvi72h5jbn16dbng7pxh485djdrmgcg4"))))
+ (build-system meson-build-system)
+ (outputs '("out" "doc"))
+ (arguments
+ `(#:glib-or-gtk? #t ; To wrap binaries and/or compile schemas
+ #:configure-flags
+ (list
+ "-Dgtk_doc=enabled")
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'disable-failing-tests
+ (lambda _
+ (substitute* "tests/meson.build"
+ ;; ‘test-set-port-range.c:66:main: assertion failed:
+ ;; (nice_agent_gather_candidates (agent, stream1))’
+ (("'test-set-port-range'" all)
+ (string-append "# " all))
+ ;; The following test is disabled as it fails in a
+ ;; nondeterministic fashion (see:
+ ;; https://gitlab.freedesktop.org/libnice/libnice/-/issues/151).
+ (("'test-bsd'" all)
+ (string-append "# " all)))
+ (substitute* "stun/tests/meson.build"
+ ;; test-bind.c:234: bad_responses: Assertion `len >= 20'
+ ;; failed (see:
+ ;; https://gitlab.freedesktop.org/libnice/libnice/-/issues/150).
+ (("'bind', ")
+ ""))))
+ (add-after 'install 'move-docs
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (doc (assoc-ref outputs "doc")))
+ (mkdir-p (string-append doc "/share"))
+ (rename-file
+ (string-append out "/share/gtk-doc")
+ (string-append doc "/share/gtk-doc"))))))))
+ (native-inputs
+ `(("glib:bin" ,glib "bin")
+ ("gobject-introspection" ,gobject-introspection)
+ ("graphviz" ,graphviz)
+ ("gtk-doc" ,gtk-doc/stable)
+ ("pkg-config" ,pkg-config)))
+ (inputs
+ `(("gstreamer" ,gstreamer)
+ ("gst-plugins-base" ,gst-plugins-base)
+ ("libnsl" ,libnsl)))
+ (propagated-inputs
+ `(("glib" ,glib)
+ ("glib-networking" ,glib-networking)
+ ("gnutls" ,gnutls)))
+ (synopsis "GLib ICE implementation")
+ (description "LibNice is a library that implements the Interactive
Connectivity Establishment (ICE) standard (RFC 5245 & RFC 8445). It provides a
GLib-based library, libnice, as well as GStreamer elements to use it.")
- (home-page "https://libnice.freedesktop.org/")
- (license
- ;; This project is dual-licensed.
- (list
- license:lgpl2.1+
- license:mpl1.1))))
+ (home-page "https://libnice.freedesktop.org/")
+ (license
+ ;; This project is dual-licensed.
+ (list
+ license:lgpl2.1+
+ license:mpl1.1)))))
(define-public rtmpdump
;; There are no tags in the repository, and the project is unlikely to
@@ -669,24 +690,24 @@ systems with no further dependencies.")
"blueman-manager.in" "blueman-mechanism.in"
"blueman-rfcomm-watcher.in" "blueman-sendto.in"
"blueman-services.in" "blueman-tray.in")
- (("@PYTHON@") (string-append (assoc-ref inputs "python")
- "/bin/python"
- ,(version-major+minor
- (package-version python))))))))
+ (("@PYTHON@")
+ (search-input-file inputs
+ (string-append
+ "/bin/python"
+ ,(version-major+minor
+ (package-version python)))))))))
;; Fix loading of external programs.
(add-after 'unpack 'patch-external-programs
(lambda* (#:key inputs #:allow-other-keys)
(substitute* '("blueman/main/NetConf.py"
"blueman/main/PPPConnection.py")
(("/usr/sbin/bluetoothd")
- (string-append (assoc-ref inputs "bluez")
- "/libexec/bluetooth/bluetoothd"))
+ (search-input-directory inputs
+ "/libexec/bluetooth/bluetoothd"))
(("/sbin/iptables")
- (string-append (assoc-ref inputs "iptables")
- "/sbin/iptables"))
+ (search-input-file inputs "/sbin/iptables"))
(("/usr/sbin/pppd")
- (string-append (assoc-ref inputs "ppp")
- "/sbin/pppd")))))
+ (search-input-file inputs "/sbin/pppd")))))
;; Fix loading of pulseaudio libraries.
(add-after 'unpack 'patch-pulseaudio-libraries
(lambda* (#:key inputs #:allow-other-keys)
@@ -711,7 +732,7 @@ systems with no further dependencies.")
(for-each
(lambda (program)
(wrap-program program
- `("PYTHONPATH" = (,(getenv "PYTHONPATH") ,lib))
+ `("GUIX_PYTHONPATH" = (,(getenv "GUIX_PYTHONPATH") ,lib))
`("GI_TYPELIB_PATH" = (,(getenv "GI_TYPELIB_PATH")))))
(append
(map (lambda (prog) (string-append bin prog))
@@ -729,7 +750,7 @@ systems with no further dependencies.")
(inputs
`(("bluez" ,bluez)
("dbus" ,dbus)
- ("gdkpixbuf" ,gdk-pixbuf+svg)
+ ("librsvg" ,librsvg)
("glib" ,glib)
("gtk+" ,gtk+)
("iproute2" ,iproute)
@@ -974,7 +995,17 @@ or server shell scripts with network connections.")
version ".tar.gz"))
(sha256
(base32
- "0p9ilj4v96q32klavx0phw9va21fjp8vpk11nbh6v2ppxnnxfhwm"))))
+ "0p9ilj4v96q32klavx0phw9va21fjp8vpk11nbh6v2ppxnnxfhwm"))
+ (modules '((guix build utils)))
+ (snippet
+ ;; 'sys_errlist' & co. are gone in glibc 2.33; work around it.
+ '(substitute* "percent_m.c"
+ (("sys_errlist\\[errno\\]")
+ "strerror (errno)")
+ (("errno < sys_nerr")
+ "(1)")
+ (("errno >= sys_nerr")
+ "(0)")))))
(build-system gnu-build-system)
(arguments
`(#:phases
@@ -1764,8 +1795,7 @@ TCP connection, TLS handshake and so on) in the terminal.")
(lambda* (#:key inputs #:allow-other-keys)
(substitute* "test-suite/testheaders.sh"
(("/bin/true")
- (string-append (assoc-ref inputs "coreutils")
- "/bin/true"))))))))
+ (search-input-file inputs "/bin/true"))))))))
(inputs
`(("perl" ,perl)
("openldap" ,openldap)
@@ -1847,7 +1877,8 @@ live network and disk I/O bandwidth monitor.")
("zlib" ,zlib)))
(arguments
`(#:configure-flags
- (list "--with-experimental=yes" ; build wesside-ng, etc.
+ (list "CFLAGS=-fcommon"
+ "--with-experimental=yes" ; build wesside-ng, etc.
"--with-gcrypt") ; openssl's the default
#:phases (modify-phases %standard-phases
(add-before 'bootstrap 'patch-evalrev
@@ -1860,8 +1891,8 @@ live network and disk I/O bandwidth monitor.")
#t))
(add-after 'build 'absolutize-tools
(lambda* (#:key inputs #:allow-other-keys)
- (let ((ethtool (string-append (assoc-ref inputs "ethtool")
- "/sbin/ethtool")))
+ (let ((ethtool (search-input-file inputs
+ "/sbin/ethtool")))
(substitute* "scripts/airmon-ng"
(("ethtool ")
(string-append ethtool " ")))
@@ -2250,8 +2281,13 @@ sockets in Perl.")
`(#:phases
(modify-phases %standard-phases
(replace 'check
- (lambda _
- (invoke "ctest" "-E" "url-test"))))))
+ ;; TODO(core-updates): Make this unconditional.
+ ,(if (%current-target-system)
+ '(lambda* (#:key tests? #:allow-other-keys)
+ (when tests?
+ (invoke "ctest" "-E" "url-test")))
+ '(lambda _
+ (invoke "ctest" "-E" "url-test")))))))
(synopsis "Library providing automatic proxy configuration management")
(description "Libproxy handles the details of HTTP/HTTPS proxy
configuration for applications across all scenarios. Applications using
@@ -3420,7 +3456,7 @@ and targeted primarily for asynchronous processing of HTTP-requests.")
(build-system cmake-build-system)
(inputs
`(("argon2" ,argon2)
- ("nettle" ,nettle-3.7)
+ ("nettle" ,nettle)
("readline" ,readline)
("jsoncpp" ,jsoncpp)
("openssl" ,openssl) ;required for the DHT proxy
@@ -3480,7 +3516,7 @@ and targeted primarily for asynchronous processing of HTTP-requests.")
(rename-file (string-append out "/bin")
(string-append tools "/bin"))
(wrap-program (string-append tools "/bin/dhtcluster")
- `("PYTHONPATH" prefix (,site-packages)))))))))
+ `("GUIX_PYTHONPATH" prefix (,site-packages)))))))))
(home-page "https://github.com/savoirfairelinux/opendht/")
(synopsis "Lightweight Distributed Hash Table (DHT) library")
(description "OpenDHT provides an easy to use distributed in-memory data
@@ -3672,8 +3708,9 @@ written (and providing API) in C. Current implementation covers YANG 1.0 (RFC
#:phases (modify-phases %standard-phases (delete 'configure))
#:make-flags
(list (string-append "PREFIX=" (assoc-ref %outputs "out"))
- (string-append "PKG_CONFIG=" (assoc-ref %build-inputs "pkg-config")
- "/bin/pkg-config")
+ (string-append "PKG_CONFIG="
+ (search-input-file %build-inputs
+ "/bin/pkg-config"))
,(string-append "CC=" (cc-for-target)))))
(home-page "https://www.open-mesh.org/projects/batman-adv/wiki/Wiki")
(synopsis "Management tool for the mesh networking BATMAN protocol")
@@ -3703,11 +3740,8 @@ module @code{batman-adv}, for Layer 2.")
(lambda* (#:key inputs outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))
(man (string-append out "/share/man")))
- (invoke "make"
- (string-append "PYTHONPATH=" (getenv "PYTHONPATH"))
- "doc/pagekite.1")
- (install-file "doc/pagekite.1" (string-append man "/man1"))
- #t))))))
+ (invoke "make" "doc/pagekite.1")
+ (install-file "doc/pagekite.1" (string-append man "/man1"))))))))
(inputs
`(("python-six" ,python-six)
("python-socksipychain" ,python-socksipychain)))
diff --git a/gnu/packages/ninja.scm b/gnu/packages/ninja.scm
index 11ee472d56..4c4a2f37a7 100644
--- a/gnu/packages/ninja.scm
+++ b/gnu/packages/ninja.scm
@@ -31,7 +31,7 @@
(define-public ninja
(package
(name "ninja")
- (version "1.10.0")
+ (version "1.10.2")
(source (origin
(method git-fetch)
(uri (git-reference
@@ -40,7 +40,7 @@
(file-name (git-file-name name version))
(sha256
(base32
- "1fbzl7mrcrwp527sgkc1npfl3k6bbpydpiq98xcf1a1hkrx0z5x4"))))
+ "0mspq4mvx41qri2v2zlg2y3znx5gfw6d8s3czbcfpr2218qbpz55"))))
(build-system gnu-build-system)
(inputs `(("python" ,python-wrapper)))
(arguments
@@ -51,8 +51,7 @@
(substitute* "src/subprocess-posix.cc"
(("/bin/sh") (which "sh")))
(substitute* "src/subprocess_test.cc"
- (("/bin/echo") (which "echo")))
- #t))
+ (("/bin/echo") (which "echo")))))
(replace 'build
(lambda _
(invoke "./configure.py" "--bootstrap")))
@@ -67,8 +66,7 @@
(bin (string-append out "/bin"))
(doc (string-append out "/share/doc/ninja")))
(install-file "ninja" bin)
- (install-file "doc/manual.asciidoc" doc)
- #t))))))
+ (install-file "doc/manual.asciidoc" doc)))))))
(home-page "https://ninja-build.org/")
(synopsis "Small build system")
(description
diff --git a/gnu/packages/node.scm b/gnu/packages/node.scm
index dccf871d2c..69b290c7d5 100644
--- a/gnu/packages/node.scm
+++ b/gnu/packages/node.scm
@@ -2,13 +2,14 @@
;;; Copyright © 2014 Cyrill Schenkel <cyrill.schenkel@gmail.com>
;;; Copyright © 2015 Andreas Enge <andreas@enge.fr>
;;; Copyright © 2015, 2016 David Thompson <davet@gnu.org>
-;;; Copyright © 2016 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2016, 2021 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2017 Mike Gerwitz <mtg@gnu.org>
;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
;;; Copyright © 2018, 2019, 2020, 2021 Marius Bakke <marius@gnu.org>
;;; Copyright © 2020, 2021 Pierre Langlois <pierre.langlois@gmx.com>
;;; Copyright © 2020 Ricardo Wurmus <rekado@elephly.net>
;;; Copyright © 2021 Simon Tournier <zimon.toutoune@gmail.com>
+;;; Copyright © 2021 Guillaume Le Vaillant <glv@posteo.net>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -217,9 +218,8 @@
(setenv "CXX" ,(cxx-for-target))
(setenv "PKG_CONFIG" ,(pkg-config-for-target))
(apply invoke
- (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)
@@ -443,8 +443,7 @@ Node.js and web browsers.")
(delete 'configure)
(replace 'build
(lambda* (#:key inputs #:allow-other-keys)
- (let ((esbuild (string-append (assoc-ref inputs "esbuild")
- "/bin/esbuild")))
+ (let ((esbuild (search-input-file inputs "/bin/esbuild")))
(invoke esbuild
"--platform=node"
"--outfile=lib/builder.js"
@@ -499,8 +498,7 @@ Node.js and web browsers.")
(delete 'configure)
(replace 'build
(lambda* (#:key inputs #:allow-other-keys)
- (let ((esbuild (string-append (assoc-ref inputs "esbuild")
- "/bin/esbuild")))
+ (let ((esbuild (search-input-file inputs "/bin/esbuild")))
(invoke esbuild
"--platform=node"
"--outfile=lib/frontend.js"
@@ -554,8 +552,7 @@ Node.js and web browsers.")
(delete 'configure)
(replace 'build
(lambda* (#:key inputs #:allow-other-keys)
- (let ((esbuild (string-append (assoc-ref inputs "esbuild")
- "/bin/esbuild")))
+ (let ((esbuild (search-input-file inputs "/bin/esbuild")))
(invoke esbuild
"--platform=node"
"--outfile=lib/api.js"
@@ -607,10 +604,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 native-inputs #:allow-other-keys)
+ (let ((esbuild (search-input-file (or native-inputs inputs)
+ "/bin/esbuild")))
(invoke esbuild
"--platform=node"
"--outfile=bin/generate.js"
@@ -748,9 +744,8 @@ source files.")
(setenv "CXX" ,(cxx-for-target))
(setenv "PKG_CONFIG" ,(pkg-config-for-target))
(apply invoke
- (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 --git a/gnu/packages/nss.scm b/gnu/packages/nss.scm
index e41d016db4..b230044b57 100644
--- a/gnu/packages/nss.scm
+++ b/gnu/packages/nss.scm
@@ -3,8 +3,10 @@
;;; Copyright © 2014, 2015, 2016, 2017, 2018, 2019, 2021 Mark H Weaver <mhw@netris.org>
;;; Copyright © 2016, 2017, 2018, 2019 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2017, 2018 Tobias Geerinckx-Rice <me@tobias.gr>
-;;; Copyright © 2020 Marius Bakke <mbakke@fastmail.com>
+;;; Copyright © 2020, 2021 Marius Bakke <marius@gnu.org>
;;; Copyright © 2020 Jonathan Brielmaier <jonathan.brielmaier@web.de>
+;;; Copyright © 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
+;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -23,20 +25,22 @@
(define-module (gnu packages nss)
#:use-module (guix packages)
+ #:use-module (guix utils)
+ #:use-module (guix gexp)
#:use-module (guix download)
#:use-module (guix build-system gnu)
#:use-module ((guix licenses) #:prefix license:)
#:use-module (gnu packages)
+ #:use-module (gnu packages bash)
#:use-module (gnu packages check)
#:use-module (gnu packages compression)
#:use-module (gnu packages perl)
- #:use-module (gnu packages sqlite)
- #:use-module (ice-9 match))
+ #:use-module (gnu packages sqlite))
(define-public nspr
(package
(name "nspr")
- (version "4.29")
+ (version "4.31")
(source (origin
(method url-fetch)
(uri (string-append
@@ -44,17 +48,37 @@
version "/src/nspr-" version ".tar.gz"))
(sha256
(base32
- "10i5x637x0jqmdi47grkzgn56fg6770naa3wrhr4dmsrh3dnna12"))))
+ "1j5b2m8cjlhnnv8sq34587avaagkqvh521w4f95miwgvsn3xlaap"))))
(build-system gnu-build-system)
+ (inputs
+ ;; For 'compile-et.pl' and 'nspr-config'.
+ `(("perl" ,perl) ;for 'compile-et.pl'
+ ("bash-minimal" ,bash-minimal))) ;for 'nspr-config'
(native-inputs
`(("perl" ,perl)))
(arguments
- `(#:tests? #f ; no check target
- #:configure-flags (list "--disable-static"
- "--enable-64bit"
- (string-append "LDFLAGS=-Wl,-rpath="
- (assoc-ref %outputs "out")
- "/lib"))
+ `(;; Prevent the 'native' perl from sneaking into the closure.
+ ;; XXX it would be nice to do the same for 'bash-minimal',
+ ;; but using 'canonical-package' causes loops.
+ ,@(if (%current-target-system)
+ `(#:disallowed-references
+ (,(gexp-input (this-package-native-input "perl") #:native? #t)))
+ '())
+ #:tests? #f ; no check target
+ #:configure-flags
+ (list "--disable-static"
+ "--enable-64bit"
+ (string-append "LDFLAGS=-Wl,-rpath="
+ (assoc-ref %outputs "out") "/lib")
+ ;; Mozilla deviates from Autotools conventions
+ ;; due to historical reasons. Adjust to Mozilla conventions,
+ ;; otherwise the Makefile will try to use TARGET-gcc
+ ;; as a ‘native’ compiler.
+ ,@(if (%current-target-system)
+ `(,(string-append "--host="
+ (nix-system->gnu-triplet (%current-system)))
+ ,(string-append "--target=" (%current-target-system)))
+ '()))
;; Use fixed timestamps for reproducibility.
#:make-flags '("SH_DATE='1970-01-01 00:00:01'"
;; This is epoch 1 in microseconds.
@@ -83,11 +107,12 @@ in the Mozilla clients.")
(base32
"0v3zds1id71j5a5si42a658fjz8nv2f6zp6w4gqrqmdr6ksz8sxv"))))))
+;;; Note: When updating, verify that the nss-certs package still builds fine
+;;; as it inherits its source from the nss package.
(define-public nss
(package
(name "nss")
- (version "3.59")
- (replacement nss/fixed)
+ (version "3.71")
(source (origin
(method url-fetch)
(uri (let ((version-with-underscores
@@ -98,22 +123,21 @@ in the Mozilla clients.")
"nss-" version ".tar.gz")))
(sha256
(base32
- "096fs3z21r171q24ca3rq53p1389xmvqz1f2rpm7nlm8r9s82ag6"))
+ "0ly2l3dv6z5hlxs72h5x6796ni3x1bq60saavaf42ddgv4ax7b4r"))
;; Create nss.pc and nss-config.
(patches (search-patches "nss-3.56-pkgconfig.patch"
+ "nss-getcwd-nonnull.patch"
"nss-increase-test-timeout.patch"))
(modules '((guix build utils)))
(snippet
'(begin
;; Delete the bundled copy of these libraries.
(delete-file-recursively "nss/lib/zlib")
- (delete-file-recursively "nss/lib/sqlite")
- #t))))
+ (delete-file-recursively "nss/lib/sqlite")))))
(build-system gnu-build-system)
(outputs '("out" "bin"))
(arguments
- `(#:parallel-build? #f ; not supported
- #:make-flags
+ `(#:make-flags
(let* ((out (assoc-ref %outputs "out"))
(nspr (string-append (assoc-ref %build-inputs "nspr")))
(rpath (string-append "-Wl,-rpath=" out "/lib/nss")))
@@ -133,27 +157,27 @@ in the Mozilla clients.")
(modify-phases %standard-phases
(replace 'configure
(lambda _
- (setenv "CC" "gcc")
+ (setenv "CC" ,(cc-for-target))
;; Tells NSS to build for the 64-bit ABI if we are 64-bit system.
- ,@(match (%current-system)
- ((or "x86_64-linux" "aarch64-linux")
- `((setenv "USE_64" "1")))
- (_
- '()))
- #t))
+ ,@(if (target-64bit?)
+ `((setenv "USE_64" "1"))
+ '())))
(replace 'check
- (lambda _
- ;; Use 127.0.0.1 instead of $HOST.$DOMSUF as HOSTADDR for testing.
- ;; The later requires a working DNS or /etc/hosts.
- (setenv "DOMSUF" "localdomain")
- (setenv "USE_IP" "TRUE")
- (setenv "IP_ADDRESS" "127.0.0.1")
+ (lambda* (#:key tests? #:allow-other-keys)
+ (if tests?
+ (begin
+ ;; Use 127.0.0.1 instead of $HOST.$DOMSUF as HOSTADDR for
+ ;; testing. The latter requires a working DNS or /etc/hosts.
+ (setenv "DOMSUF" "localdomain")
+ (setenv "USE_IP" "TRUE")
+ (setenv "IP_ADDRESS" "127.0.0.1")
- ;; The "PayPalEE.cert" certificate expires every six months,
- ;; leading to test failures:
- ;; <https://bugzilla.mozilla.org/show_bug.cgi?id=609734>. To
- ;; work around that, set the time to roughly the release date.
- (invoke "faketime" "2020-11-01" "./nss/tests/all.sh")))
+ ;; The "PayPalEE.cert" certificate expires every six months,
+ ;; leading to test failures:
+ ;; <https://bugzilla.mozilla.org/show_bug.cgi?id=609734>. To
+ ;; work around that, set the time to roughly the release date.
+ (invoke "faketime" "2021-09-30" "./nss/tests/all.sh"))
+ (format #t "test suite not run~%"))))
(replace 'install
(lambda* (#:key outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))
@@ -174,21 +198,21 @@ in the Mozilla clients.")
;; Install other files.
(copy-recursively "dist/public/nss" inc)
(copy-recursively (string-append obj "/bin") bin)
- (copy-recursively (string-append obj "/lib") lib)
- #t))))))
+ (copy-recursively (string-append obj "/lib") lib)))))))
(inputs
`(("sqlite" ,sqlite)
("zlib" ,zlib)))
- (propagated-inputs `(("nspr" ,nspr))) ; required by nss.pc.
- (native-inputs `(("perl" ,perl)
- ("libfaketime" ,libfaketime))) ;for tests
+ (propagated-inputs
+ `(("nspr" ,nspr))) ;required by nss.pc.
+ (native-inputs
+ `(("perl" ,perl)
+ ("libfaketime" ,libfaketime))) ;for tests
;; The NSS test suite takes around 48 hours on Loongson 3A (MIPS) when
;; another build is happening concurrently on the same machine.
- (properties '((timeout . 216000))) ; 60 hours
+ (properties '((timeout . 216000))) ;60 hours
- (home-page
- "https://developer.mozilla.org/en-US/docs/Mozilla/Projects/NSS")
+ (home-page "https://developer.mozilla.org/en-US/docs/Mozilla/Projects/NSS")
(synopsis "Network Security Services")
(description
"Network Security Services (@dfn{NSS}) is a set of libraries designed to
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index c1912d49b7..909728fc66 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -22,6 +22,8 @@
;;; Copyright © 2021 Sharlatan Hellseher <sharlatanus@gmail.com>
;;; Copyright © 2021 Xinglu Chen <public@yoctocell.xyz>
;;; Copyright © 2021 Ivan Gankevich <i.gankevich@spbu.ru>
+;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be>
+;;; Copyright © 2021 Sarah Morgensen <iskarian@mgsn.dev>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -43,6 +45,7 @@
#:use-module (gnu packages algebra)
#:use-module (gnu packages autotools)
#:use-module (gnu packages base)
+ #:use-module (gnu packages bash)
#:use-module (gnu packages bison)
#:use-module (gnu packages boost)
#:use-module (gnu packages compression)
@@ -88,6 +91,7 @@
#:use-module (guix build-system gnu)
#:use-module (guix build-system ocaml)
#:use-module (guix download)
+ #:use-module (guix gexp)
#:use-module (guix git-download)
#:use-module ((guix licenses) #:prefix license:)
#:use-module (guix packages)
@@ -212,8 +216,7 @@ This package produces a native @command{ocamlc} and a bytecode @command{ocamllex
(modify-phases %standard-phases
(add-after 'unpack 'patch-/bin/sh-references
(lambda* (#:key inputs #:allow-other-keys)
- (let* ((sh (string-append (assoc-ref inputs "bash")
- "/bin/sh"))
+ (let* ((sh (search-input-file inputs "/bin/sh"))
(quoted-sh (string-append "\"" sh "\"")))
(with-fluids ((%default-port-encoding #f))
(for-each
@@ -257,6 +260,7 @@ functional, imperative and object-oriented styles of programming.")
"http://caml.inria.fr/pub/distrib/ocaml-"
(version-major+minor version)
"/ocaml-" version ".tar.xz"))
+ (patches (search-patches "ocaml-4.09-multiple-definitions.patch"))
(sha256
(base32
"1v3z5ar326f3hzvpfljg4xj8b9lmbrl53fn57yih1bkbx3gr3yzj"))))))
@@ -268,6 +272,7 @@ functional, imperative and object-oriented styles of programming.")
(define ocaml-4.07-boot
(package
(inherit ocaml-4.09)
+ (name "ocaml-boot")
(version "4.07.1")
(source (origin
(method url-fetch)
@@ -278,6 +283,7 @@ functional, imperative and object-oriented styles of programming.")
(sha256
(base32
"1f07hgj5k45cylj1q3k5mk8yi02cwzx849b1fwnwia8xlcfqpr6z"))
+ (patches (search-patches "ocaml-multiple-definitions.patch"))
(modules '((guix build utils)))
(snippet
`(begin
@@ -404,6 +410,7 @@ depend: $(STDLIB_MLIS) $(STDLIB_DEPS)"))
(define-public ocaml-4.07
(package
(inherit ocaml-4.07-boot)
+ (name "ocaml")
(arguments
(substitute-keyword-arguments (package-arguments ocaml-4.09)
((#:phases phases)
@@ -453,13 +460,11 @@ depend: $(STDLIB_MLIS) $(STDLIB_DEPS)"))
(build-system ocaml-build-system)
(arguments
`(#:make-flags
- (list (string-append "OCAMLBUILD_PREFIX=" (assoc-ref %outputs "out"))
- (string-append "OCAMLBUILD_BINDIR=" (assoc-ref %outputs "out")
- "/bin")
- (string-append "OCAMLBUILD_LIBDIR=" (assoc-ref %outputs "out")
- "/lib/ocaml/site-lib")
- (string-append "OCAMLBUILD_MANDIR=" (assoc-ref %outputs "out")
- "/share/man"))
+ ,#~(list (string-append "OCAMLBUILD_PREFIX=" #$output)
+ (string-append "OCAMLBUILD_BINDIR=" #$output "/bin")
+ (string-append "OCAMLBUILD_LIBDIR=" #$output
+ "/lib/ocaml/site-lib")
+ (string-append "OCAMLBUILD_MANDIR=" #$output "/share/man"))
#:phases
(modify-phases %standard-phases
(delete 'configure))
@@ -582,10 +587,9 @@ for day to day programming.")
("ocaml-ounit" ,ocaml-ounit)))
(arguments
`(#:make-flags
- (list
- "all" "opt"
- (string-append "BINDIR=" (assoc-ref %outputs "out")
- "/bin"))
+ ,#~(list
+ "all" "opt"
+ (string-append "BINDIR=" #$output "/bin"))
#:phases
(modify-phases %standard-phases
(delete 'configure))))
@@ -644,20 +648,11 @@ underlying solvers like Cplex, Gurobi, Lpsolver, Glpk, CbC, SCIP or WBO.")
(build-system ocaml-build-system)
(arguments
`(#:configure-flags
- (list (string-append "SHELL="
- (assoc-ref %build-inputs "bash")
- "/bin/sh"))
+ ,#~(list (string-append "SHELL="
+ #+(file-append (canonical-package bash-minimal)
+ "/bin/sh")))
#:make-flags
- (list (string-append "LIBDIR="
- (assoc-ref %outputs "out")
- "/lib/ocaml/site-lib"))
- #:phases
- (modify-phases %standard-phases
- (add-after 'unpack 'fix-test-script
- (lambda _
- (substitute* "applications/dose-tests.py"
- (("warning\\(")
- "from warnings import warn\nwarn(")))))))
+ ,#~(list (string-append "LIBDIR=" #$output "/lib/ocaml/site-lib"))))
(propagated-inputs
`(("ocaml-graph" ,ocaml-graph)
("ocaml-cudf" ,ocaml-cudf)
@@ -702,8 +697,8 @@ repository-wide uninstallability checks.")
(modify-phases %standard-phases
(delete 'configure))
#:build-flags
- (list "build" "--lib-dir"
- (string-append (assoc-ref %outputs "out") "/lib/ocaml/site-lib"))))
+ ,#~(list "build" "--lib-dir"
+ (string-append #$output "/lib/ocaml/site-lib"))))
(native-inputs
`(("ocaml-findlib" ,ocaml-findlib)
("ocamlbuild" ,ocamlbuild)
@@ -762,8 +757,8 @@ let () = String.split_on_char ':' (Sys.getenv \"OCAMLPATH\")
(build-system ocaml-build-system)
(arguments
`(#:tests? #f; No tests
- #:make-flags (list (string-append "LIBDIR=" (assoc-ref %outputs "out")
- "/lib/ocaml/site-lib"))
+ #:make-flags ,#~(list (string-append "LIBDIR=" #$output
+ "/lib/ocaml/site-lib"))
#:phases
(modify-phases %standard-phases
(delete 'configure))))
@@ -795,8 +790,7 @@ the opam file format.")
(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\""))
@@ -844,8 +838,9 @@ the opam file format.")
;; 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="
@@ -1113,7 +1108,7 @@ Knuth’s LR(1) parser construction technique.")
(define-public lablgtk
(package
(name "lablgtk")
- (version "2.18.10")
+ (version "2.18.11")
(source (origin
(method git-fetch)
(uri (git-reference
@@ -1122,7 +1117,7 @@ Knuth’s LR(1) parser construction technique.")
(file-name (git-file-name name version))
(sha256
(base32
- "0w8cdfcv2wc19sd3qzj3qq77qc6rbnbynsz02gzbl15kgrvgrfxi"))))
+ "179ipx0c6bpxm4gz0syxgqy09dp5p4x9qsdil7s9jlx8ffg1mm0w"))))
(build-system gnu-build-system)
(native-inputs
`(("ocaml" ,ocaml)
@@ -1205,7 +1200,8 @@ libpanel, librsvg and quartz.")
`(("ocaml" ,ocaml-4.09)
;; For documentation
("ghostscript" ,ghostscript)
- ("texlive" ,texlive-tiny)
+ ("texlive" ,(texlive-updmap.cfg
+ (list texlive-fonts-ec texlive-dvips-l3backend)))
("hevea" ,hevea)
("lynx" ,lynx)
("which" ,which)))
@@ -1403,9 +1399,8 @@ other XUnit testing frameworks.")
(delete 'configure))
#:install-target "install-findlib"
#:make-flags
- (list "all" "allopt"
- (string-append "INSTALLDIR=" (assoc-ref %outputs "out")
- "/lib/ocaml"))))
+ ,#~(list "all" "allopt"
+ (string-append "INSTALLDIR=" #$output "/lib/ocaml"))))
(home-page "https://github.com/xavierleroy/camlzip")
(synopsis "Provides easy access to compressed files")
(description "Provides easy access to compressed files in ZIP, GZIP and
@@ -1545,9 +1540,8 @@ archive(byte) = \"frontc.cma\"
archive(native) = \"frontc.cmxa\""))))
(symlink (string-append out "/lib/ocaml/frontc")
(string-append out "/lib/ocaml/FrontC"))))))
- #:make-flags (list (string-append "PREFIX="
- (assoc-ref %outputs "out"))
- "OCAML_SITE=$(LIB_DIR)/ocaml/")))
+ #:make-flags ,#~(list (string-append "PREFIX=" #$output)
+ "OCAML_SITE=$(LIB_DIR)/ocaml/")))
(properties '()))))
(define-public ocaml-qcheck
@@ -1675,10 +1669,10 @@ full_split, cut, rcut, etc..")
(build-system ocaml-build-system)
(arguments
`(#:tests? #f; require odoc
- #:make-flags (list "release"
- (string-append "PREFIX=" (assoc-ref %outputs "out"))
- (string-append "LIBDIR=" (assoc-ref %outputs "out")
- "/lib/ocaml/site-lib"))
+ #:make-flags ,#~(list "release"
+ (string-append "PREFIX=" #$output)
+ (string-append "LIBDIR=" #$output
+ "/lib/ocaml/site-lib"))
#:phases
(modify-phases %standard-phases
(replace 'configure
@@ -2217,8 +2211,8 @@ dates and times.")
`(("ocamlbuild" ,ocamlbuild)))
(arguments
`(#:tests? #f
- #:make-flags (list (string-append "LIBDIR=" (assoc-ref %outputs "out")
- "/lib/ocaml/site-lib/cmdliner"))
+ #:make-flags ,#~(list (string-append "LIBDIR=" #$output
+ "/lib/ocaml/site-lib/cmdliner"))
#:phases
(modify-phases %standard-phases
(delete 'configure)
@@ -3153,7 +3147,7 @@ OCaml code.")
(build-system ocaml-build-system)
(arguments
`(#:make-flags
- (list (string-append "PREFIX=" (assoc-ref %outputs "out")))
+ ,#~(list (string-append "PREFIX=" #$output))
#:tests? #f ; no test target
#:phases
(modify-phases %standard-phases
@@ -3892,8 +3886,8 @@ and 4 (random based) according to RFC 4122.")
(modify-phases %standard-phases
(add-before 'configure 'set-shell
(lambda* (#:key inputs #:allow-other-keys)
- (setenv "CONFIG_SHELL" (string-append (assoc-ref inputs "bash")
- "/bin/sh")))))))
+ (setenv "CONFIG_SHELL"
+ (search-input-file inputs "/bin/sh")))))))
(inputs `(("lablgtk" ,lablgtk)))
(properties `((upstream-name . "ocamlgraph")))
(home-page "http://ocamlgraph.lri.fr/")
@@ -3917,9 +3911,10 @@ and 4 (random based) according to RFC 4122.")
(build-system ocaml-build-system)
(arguments
`(#:make-flags
- (list (string-append "DESTDIR=" (assoc-ref %outputs "out"))
- (string-append "SHELL=" (assoc-ref %build-inputs "bash")
- "/bin/sh"))
+ ,#~(list (string-append "DESTDIR=" #$output)
+ (string-append "SHELL="
+ #+(file-append (canonical-package bash-minimal)
+ "/bin/sh")))
#:phases
(modify-phases %standard-phases
(add-after 'unpack 'make-files-writable
@@ -4400,28 +4395,23 @@ cross-platform SDL C library.")
(build-system ocaml-build-system)
(arguments
`(#:phases
- (modify-phases %standard-phases
- (delete 'configure)
- (replace 'build
- (lambda _
- (invoke "make")
- #t))
- (replace 'check
- (lambda _
- (invoke "make" "tests")
- #t))
- (add-before 'install 'set-binpath
- ;; Change binary path in the makefile
- (lambda _
- (let ((out (assoc-ref %outputs "out")))
- (substitute* "GNUmakefile"
- (("BINDIR = (.*)$")
- (string-append "BINDIR = " out "/bin"))))
- #t))
- (replace 'install
- (lambda _
- (invoke "make" "install")
- #t)))))
+ ,#~(modify-phases %standard-phases
+ (delete 'configure)
+ (replace 'build
+ (lambda _
+ (invoke "make")))
+ (replace 'check
+ (lambda _
+ (invoke "make" "tests")))
+ (add-before 'install 'set-binpath
+ ;; Change binary path in the makefile
+ (lambda _
+ (substitute* "GNUmakefile"
+ (("BINDIR = (.*)$")
+ (string-append "BINDIR = " #$output "/bin")))))
+ (replace 'install
+ (lambda _
+ (invoke "make" "install"))))))
(synopsis "Proof-checker for the λΠ-calculus modulo theory, an extension of
the λ-calculus")
(description "Dedukti is a proof-checker for the λΠ-calculus modulo
@@ -4932,7 +4922,7 @@ the OCaml language.")
"0nzp43hp8pbjqkrxnwp5lgjrabxayf61h18fjaydi0s5faq6f3xh"))))
(build-system ocaml-build-system)
(inputs
- `(("gsl" ,gsl)))
+ `(("gsl" ,gsl-static)))
(native-inputs
`(("ocamlbuild" ,ocamlbuild)))
(arguments '())
@@ -7855,8 +7845,9 @@ browsers and Node.js.")
#t)))))
(native-inputs
`(("which" ,which)
- ("texlive" ,(texlive-union (list texlive-fonts-ec texlive-preprint
- texlive-latex-hyperref texlive-bibtex)))))
+ ("texlive" ,(texlive-updmap.cfg
+ (list texlive-fonts-ec texlive-preprint
+ texlive-hyperref texlive-bibtex)))))
(propagated-inputs
`(("hevea" ,hevea)))
(home-page "https://www.lri.fr/~filliatr/bibtex2html/")
diff --git a/gnu/packages/onc-rpc.scm b/gnu/packages/onc-rpc.scm
index 8b3892d2f0..aa49f5fb6a 100644
--- a/gnu/packages/onc-rpc.scm
+++ b/gnu/packages/onc-rpc.scm
@@ -37,7 +37,7 @@
(define-public libtirpc
(package
(name "libtirpc")
- (version "1.2.5")
+ (version "1.3.1")
(source (origin
(method url-fetch)
(uri (string-append "mirror://sourceforge/libtirpc/libtirpc/"
@@ -45,26 +45,22 @@
version ".tar.bz2"))
(sha256
(base32
- "1jl6a5kkw2vrp4gb6pmvf72rqimywvwfb9f7iz2xjg4wgq63bdpk"))))
+ "05zf16ilwwkzv4cccaac32nssrj3rg444n9pskiwbgk6y359an14"))))
(build-system gnu-build-system)
(arguments
`(#:configure-flags '("--disable-static")
#:phases
(modify-phases %standard-phases
- (add-after 'unpack 'remote-dangling-symlink
- (lambda _
+ (add-after 'unpack 'adjust-netconfig-reference
+ (lambda* (#:key outputs #:allow-other-keys)
(substitute* '("man/netconfig.5"
"man/getnetconfig.3t"
"man/getnetpath.3t"
"man/rpc.3t"
"src/getnetconfig.c"
"tirpc/netconfig.h")
- (("/etc/netconfig") (string-append %output "/etc/netconfig")))
-
- ;; Remove the dangling symlinks since it breaks the
- ;; 'patch-source-shebangs' file tree traversal.
- (delete-file "INSTALL")
- #t)))))
+ (("/etc/netconfig") (string-append (assoc-ref outputs "out")
+ "/etc/netconfig"))))))))
(inputs `(("mit-krb5" ,mit-krb5)))
(home-page "https://sourceforge.net/projects/libtirpc/")
(synopsis "Transport-independent Sun/ONC RPC implementation")
@@ -78,9 +74,7 @@ IPv4 and IPv6. ONC RPC is notably used by the network file system (NFS).")
(package/inherit libtirpc
(name "libtirpc-hurd")
(source (origin (inherit (package-source libtirpc))
- (patches (append (origin-patches (package-source libtirpc))
- (search-patches "libtirpc-hurd.patch"
- "libtirpc-hurd-client.patch")))))
+ (patches (search-patches "libtirpc-hurd.patch"))))
(arguments
(substitute-keyword-arguments (package-arguments libtirpc)
((#:configure-flags flags ''())
diff --git a/gnu/packages/openbox.scm b/gnu/packages/openbox.scm
index 00c93c3864..36270aff67 100644
--- a/gnu/packages/openbox.scm
+++ b/gnu/packages/openbox.scm
@@ -22,6 +22,7 @@
#:use-module ((guix licenses) #:select (gpl2+))
#:use-module (guix packages)
#:use-module (guix download)
+ #:use-module (guix utils)
#:use-module (guix build-system gnu)
#:use-module (gnu packages freedesktop)
#:use-module (gnu packages gettext)
@@ -51,7 +52,7 @@
(propagated-inputs `(("python2-pyxdg" ,python2-pyxdg)))
(inputs `(("imlib2" ,imlib2)
("libxml2" ,libxml2)
- ("librsvg" ,librsvg)
+ ("librsvg" ,(librsvg-for-system))
("libsm" ,libsm)
("libxcursor" ,libxcursor)
("libxinerama" ,libxinerama)
diff --git a/gnu/packages/openldap.scm b/gnu/packages/openldap.scm
index 1f3e775451..3981f3f69f 100644
--- a/gnu/packages/openldap.scm
+++ b/gnu/packages/openldap.scm
@@ -7,6 +7,7 @@
;;; Copyright © 2019 Mathieu Othacehe <m.othacehe@gmail.com>
;;; Copyright © 2020 Lars-Dominik Braun <ldb@leibniz-psychology.org>
;;; Copyright © 2020 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -61,8 +62,7 @@
(define-public openldap
(package
(name "openldap")
- (replacement openldap-2.4.57)
- (version "2.4.50")
+ (version "2.4.57")
(source (origin
(method url-fetch)
;; See <http://www.openldap.org/software/download/> for a list of
@@ -78,7 +78,7 @@
"openldap-release/openldap-" version ".tgz")))
(sha256
(base32
- "1f46nlfwmys110j36sifm7ah8m8f3s10c3vaiikmmigmifapvdaw"))))
+ "0nmlyqhc52v24b4awh914sczmvxbazgq2cnlycvb9dgcwvhlgfn7"))))
(build-system gnu-build-system)
(inputs `(("bdb" ,bdb-5.3)
("cyrus-sasl" ,cyrus-sasl)
@@ -126,27 +126,6 @@
(license openldap2.8)
(home-page "https://www.openldap.org/")))
-(define-public openldap-2.4.57
- (package
- (inherit openldap)
- (version "2.4.57")
- (source (origin
- (method url-fetch)
- ;; See <http://www.openldap.org/software/download/> for a list of
- ;; mirrors.
- (uri (list (string-append
- "ftp://mirror.switch.ch/mirror/OpenLDAP/"
- "openldap-release/openldap-" version ".tgz")
- (string-append
- "https://www.openldap.org/software/download/OpenLDAP/"
- "openldap-release/openldap-" version ".tgz")
- (string-append
- "ftp://ftp.dti.ad.jp/pub/net/OpenLDAP/"
- "openldap-release/openldap-" version ".tgz")))
- (sha256
- (base32
- "0nmlyqhc52v24b4awh914sczmvxbazgq2cnlycvb9dgcwvhlgfn7"))))))
-
(define-public nss-pam-ldapd
(package
(name "nss-pam-ldapd")
@@ -236,20 +215,20 @@ servers from Python programs.")
(define-public 389-ds-base
(package
(name "389-ds-base")
- (version "1.4.0.31")
+ (version "1.4.4.17")
(source (origin
(method url-fetch)
- (uri (string-append "https://releases.pagure.org/389-ds-base/"
- "389-ds-base-" version ".tar.bz2"))
+ (uri (string-append "https://github.com/389ds/389-ds-base/archive/"
+ "389-ds-base-" version ".tar.gz"))
(sha256
(base32
- "1rs218iqxyclccsdqb529favdsmz88zw785lsxd9ln43ja3x3l65"))))
+ "0i8m4crbnjjhfb7cq758rd0fxyz36i291yq6fykkprjykz9s3zv4"))))
(build-system gnu-build-system)
(arguments
`(#:modules ((srfi srfi-1)
(guix build gnu-build-system)
((guix build python-build-system)
- #:select (python-version))
+ #:select (add-installed-pythonpath python-version))
(guix build utils))
#:imported-modules ((guix build python-build-system)
,@%gnu-build-system-modules)
@@ -276,12 +255,17 @@ servers from Python programs.")
(lambda _
(substitute* "include/ldaputil/certmap.h"
(("nss3/cert.h") "nss/cert.h"))
+ (substitute* "src/lib389/lib389/utils.py"
+ (("'/sbin/ip'")
+ (string-append "'" (which "ip") "'")))
(substitute* "src/lib389/lib389/nss_ssl.py"
(("'/usr/bin/certutil'")
(string-append "'" (which "certutil") "'"))
+ (("'/usr/bin/openssl'")
+ (string-append "'" (which "openssl") "'"))
(("'/usr/bin/c_rehash'")
- (string-append "'" (which "perl") "', '" (which "c_rehash") "'")))
- #t))
+ (string-append "'" (which "perl") "', '"
+ (which "c_rehash") "'")))))
(add-after 'unpack 'overwrite-default-locations
(lambda* (#:key outputs #:allow-other-keys)
(let ((out (assoc-ref outputs "out")))
@@ -299,8 +283,7 @@ servers from Python programs.")
(substitute* '("src/lib389/lib389/instance/setup.py"
"src/lib389/lib389/instance/remove.py")
(("etc_dirsrv_path = .*")
- "etc_dirsrv_path = '/etc/dirsrv/'\n"))
- #t)))
+ "etc_dirsrv_path = '/etc/dirsrv/'\n")))))
(add-after 'unpack 'fix-install-location-of-python-tools
(lambda* (#:key inputs outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))
@@ -309,18 +292,16 @@ servers from Python programs.")
(python-version (assoc-ref inputs "python"))
"/site-packages/")))
;; Install directory must be on PYTHONPATH.
- (setenv "PYTHONPATH"
- (string-append (getenv "PYTHONPATH")
- ":" pythondir))
+ (add-installed-pythonpath inputs outputs)
;; Install directory must exist.
(mkdir-p pythondir)
(substitute* "src/lib389/setup.py"
(("/usr") out))
(substitute* "Makefile.am"
(("setup.py install --skip-build" m)
- (string-append m " --prefix=" out
- " --root=/ --single-version-externally-managed"))))
- #t))
+ (string-append
+ m " --prefix=" out
+ " --root=/ --single-version-externally-managed"))))))
(add-after 'build 'build-python-tools
(lambda* (#:key make-flags #:allow-other-keys)
;; Set DETERMINISTIC_BUILD to override the embedded mtime in pyc
@@ -329,27 +310,23 @@ servers from Python programs.")
;; Use deterministic hashes for strings, bytes, and datetime
;; objects.
(setenv "PYTHONHASHSEED" "0")
- (apply invoke "make" "lib389" make-flags)
- #t))
+ (apply invoke "make" "lib389" make-flags)))
(add-after 'install 'install-python-tools
(lambda* (#:key make-flags #:allow-other-keys)
- (apply invoke "make" "lib389-install" make-flags)
- #t))
+ (apply invoke "make" "lib389-install" make-flags)))
(add-after 'install-python-tools 'wrap-python-tools
(lambda* (#:key outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))
- (path (getenv "PYTHONPATH")))
+ (pythonpath (getenv "GUIX_PYTHONPATH")))
(for-each (lambda (file)
(wrap-program (string-append out file)
- `("PYTHONPATH" ":" prefix (,path))))
+ `("GUIX_PYTHONPATH" ":" prefix (,pythonpath))))
'("/sbin/dsconf"
"/sbin/dscreate"
"/sbin/dsctl"
"/sbin/dsidm"
"/bin/ds-logpipe.py"
- "/bin/ds-replcheck"
- "/bin/readnsstate")))
- #t)))))
+ "/bin/ds-replcheck"))))))))
(inputs
`(("bdb" ,bdb)
("cracklib" ,cracklib)
@@ -357,6 +334,7 @@ servers from Python programs.")
("gnutls" ,gnutls)
("httpd" ,httpd)
("icu4c" ,icu4c)
+ ("iproute" ,iproute)
("libevent" ,libevent)
("libselinux" ,libselinux)
("linux-pam" ,linux-pam)
@@ -364,7 +342,7 @@ servers from Python programs.")
("net-snmp" ,net-snmp)
("nspr" ,nspr)
("nss" ,nss)
- ("nss:bin" ,nss "bin") ; for certutil
+ ("nss:bin" ,nss "bin") ; for certutil
("openldap" ,openldap)
("openssl" ,openssl) ; #included by net-snmp
("pcre" ,pcre)
@@ -430,4 +408,3 @@ Other features include:
are mapped to a special Python case-insensitive dictionary, tracking the
changes of the dictionary to modify the entry on the server easily.")
(license expat)))
-
diff --git a/gnu/packages/openstack.scm b/gnu/packages/openstack.scm
index 1c35fe570f..b614bcf0d1 100644
--- a/gnu/packages/openstack.scm
+++ b/gnu/packages/openstack.scm
@@ -27,6 +27,7 @@
#:use-module (gnu packages check)
#:use-module (gnu packages gnupg)
#:use-module (gnu packages python)
+ #:use-module (gnu packages python-build)
#:use-module (gnu packages python-check)
#:use-module (gnu packages python-crypto)
#:use-module (gnu packages python-web)
diff --git a/gnu/packages/orpheus.scm b/gnu/packages/orpheus.scm
index d981be279c..8214311a18 100644
--- a/gnu/packages/orpheus.scm
+++ b/gnu/packages/orpheus.scm
@@ -76,12 +76,9 @@
;; To avoid propagating the mpg321 and vorbis-tools inputs, we can
;; make the orpheus application execute the needed players from the
;; store.
- (let ((ogg123 (string-append (assoc-ref inputs "vorbis-tools")
- "/bin/ogg123"))
- (mpg321 (string-append (assoc-ref inputs "mpg321")
- "/bin/mpg321"))
- (which (string-append (assoc-ref inputs "which")
- "/bin/which")))
+ (let ((ogg123 (search-input-file inputs "/bin/ogg123"))
+ (mpg321 (search-input-file inputs "/bin/mpg321"))
+ (which (search-input-file inputs "/bin/which")))
(substitute* "src/orpheusconf.cc"
(("ogg123") ogg123)
(("which") which)
diff --git a/gnu/packages/package-management.scm b/gnu/packages/package-management.scm
index 6a51e7eb9b..27e5e6aa15 100644
--- a/gnu/packages/package-management.scm
+++ b/gnu/packages/package-management.scm
@@ -19,6 +19,7 @@
;;; Copyright © 2020 Vincent Legoll <vincent.legoll@gmail.com>
;;; Copyright © 2021 Ivan Gankevich <i.gankevich@spbu.ru>
;;; Copyright © 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
+;;; Copyright © 2021 John Kehayias <john.kehayias@protonmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -36,6 +37,7 @@
;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
(define-module (gnu packages package-management)
+ #:use-module (gnu artwork)
#:use-module (gnu packages)
#:use-module (gnu packages acl)
#:use-module (gnu packages attr)
@@ -69,6 +71,7 @@
#:use-module (gnu packages guile)
#:use-module (gnu packages guile-xyz)
#:use-module (gnu packages hurd)
+ #:use-module (gnu packages imagemagick)
#:use-module (gnu packages less)
#:use-module (gnu packages libedit)
#:use-module (gnu packages linux)
@@ -84,6 +87,7 @@
#:use-module (gnu packages pkg-config)
#:use-module (gnu packages popt)
#:use-module (gnu packages python)
+ #:use-module (gnu packages python-build)
#:use-module (gnu packages python-check)
#:use-module (gnu packages python-web)
#:use-module (gnu packages python-xyz)
@@ -104,6 +108,7 @@
#:use-module (guix build-system gnu)
#:use-module (guix build-system meson)
#:use-module (guix build-system python)
+ #:use-module (guix build-system trivial)
#:use-module (guix download)
#:use-module (guix gexp)
#:use-module (guix git-download)
@@ -585,6 +590,64 @@ out) and returning a package that uses that as its 'source'."
#:recursive? #t
#:select? (force select?))))))))
+(define-public guix-icons
+ (package
+ (inherit guix)
+ (name "guix-icons")
+ (version "0.1")
+ (source %artwork-repository)
+ (build-system trivial-build-system)
+ (native-inputs
+ `(("imagemagick" ,imagemagick)))
+ (inputs
+ '())
+ (arguments
+ `(#:modules ((guix build utils)
+ (gnu build svg))
+ #:builder
+ ,(with-extensions (list guile-rsvg guile-cairo)
+ #~(begin
+ (use-modules (guix build utils)
+ (gnu build svg))
+ (let* ((logo (string-append #$source "/logo/Guix.svg"))
+ (logo-white
+ (string-append #$source
+ "/logo/Guix-horizontal-white.svg"))
+ (theme "hicolor")
+ (category "apps")
+ (sizes '(16 24 32 48 64 72 96 128 256 512 1024))
+ (icons
+ (string-append #$output "/share/icons/" theme))
+ (scalable-dir
+ (string-append icons "/scalable/" category)))
+ (setenv "XDG_CACHE_HOME" (getcwd))
+
+ ;; Create the scalable icon files.
+ (mkdir-p scalable-dir)
+ (copy-file logo
+ (string-append scalable-dir "/guix-icon.svg"))
+ (copy-file logo-white
+ (string-append scalable-dir
+ "/guix-white-icon.svg"))
+
+ ;; Create the fixed dimensions icon files.
+ (for-each
+ (lambda (size)
+ (let* ((dimension
+ (format #f "~ax~a" size size))
+ (file
+ (string-append icons "/" dimension "/" category
+ "/guix-icon.png")))
+ (mkdir-p (dirname file))
+ (svg->png logo file
+ #:width size
+ #:height size)))
+ sizes))))))
+ (synopsis "GNU Guix icons")
+ (description "This package contains GNU Guix icons organized according to
+the Icon Theme Specification. They can be used by applications querying the
+GTK icon cache for instance.")))
+
;;;
;;; Other tools.
@@ -980,7 +1043,7 @@ written entirely in Python.")
(define-public conan
(package
(name "conan")
- (version "1.40.2")
+ (version "1.42.0")
(source
(origin
(method git-fetch) ;no tests in PyPI archive
@@ -990,7 +1053,7 @@ written entirely in Python.")
(file-name (git-file-name name version))
(sha256
(base32
- "0hp8qs54l4cw043f1kycjwgdr7f388lsyxqcbzfaayr6xg1d3dw0"))))
+ "153npvj81m1c33gfcv2nry7xhyikxnhjns7lvs525f1x20ck6asg"))))
(build-system python-build-system)
(arguments
`(#:phases
@@ -999,7 +1062,9 @@ written entirely in Python.")
(lambda _
(substitute* "conans/requirements.txt"
(("node-semver==0.6.1")
- "node-semver>=0.6.1"))))
+ "node-semver>=0.6.1")
+ (("Jinja2>=2.9, <3")
+ "Jinja2>=2.9"))))
(add-after 'unpack 'patch-paths
(lambda* (#:key inputs #:allow-other-keys)
(let ((coreutils (assoc-ref inputs "coreutils")))
@@ -1104,9 +1169,9 @@ written entirely in Python.")
(native-inputs
`(("autoconf" ,autoconf)
("automake" ,automake)
- ("cmake" ,cmake) ;requires cmake >= 3.17
+ ("cmake" ,cmake)
("git" ,git-minimal)
- ("meson" ,meson-0.55)
+ ("meson" ,meson)
("ninja",ninja)
("pkg-config" ,pkg-config)
("python-bottle" ,python-bottle)
@@ -1463,7 +1528,7 @@ for packaging and deployment of cross-compiled Windows applications.")
(define-public libostree
(package
(name "libostree")
- (version "2021.3")
+ (version "2021.6")
(source
(origin
(method url-fetch)
@@ -1471,7 +1536,7 @@ for packaging and deployment of cross-compiled Windows applications.")
"https://github.com/ostreedev/ostree/releases/download/v"
(version-major+minor version) "/libostree-" version ".tar.xz"))
(sha256
- (base32 "1cyhr3s7xsgnsais5m4cjwdwcq46naf25r1k042c4n1y1jgs798g"))))
+ (base32 "0cgmnjf4mr4wn4fliq6ncs0q9qwblrlizjfhx57p7m332g5k21p8"))))
(build-system gnu-build-system)
(arguments
'(#:phases
@@ -1503,7 +1568,7 @@ for packaging and deployment of cross-compiled Windows applications.")
("glib" ,glib)
("gpgme" ,gpgme)
("libarchive" ,libarchive)
- ("libsoup" ,libsoup)
+ ("libsoup" ,libsoup-minimal-2) ; needs libsoup-2.4
("util-linux" ,util-linux)))
(home-page "https://ostree.readthedocs.io/en/latest/")
(synopsis "Operating system and container binary deployment and upgrades")
@@ -1548,8 +1613,8 @@ the boot loader configuration.")
(add-after 'unpack 'fix-tests
(lambda* (#:key inputs #:allow-other-keys)
(copy-recursively
- (string-append (assoc-ref inputs "glibc-utf8-locales")
- "/lib/locale/") "/tmp/locale")
+ (search-input-directory inputs "lib/locale")
+ "/tmp/locale")
(for-each make-file-writable (find-files "/tmp"))
(substitute* "tests/make-test-runtime.sh"
(("cp `which.*") "echo guix\n")
@@ -1605,7 +1670,7 @@ cp -r /tmp/locale/*/en_US.*")))
("libarchive" ,libarchive)
("libostree" ,libostree)
("libseccomp" ,libseccomp)
- ("libsoup" ,libsoup)
+ ("libsoup" ,libsoup-minimal-2)
("libxau" ,libxau)
("libxml2" ,libxml2)
("p11-kit-next" ,p11-kit-next)
diff --git a/gnu/packages/pantheon.scm b/gnu/packages/pantheon.scm
index 6e78f45e14..4067b3c3cf 100644
--- a/gnu/packages/pantheon.scm
+++ b/gnu/packages/pantheon.scm
@@ -115,7 +115,7 @@ desktop.")
(define-public sideload
(package
(name "sideload")
- (version "1.1.1")
+ (version "6.0.2")
(source
(origin
(method git-fetch)
@@ -125,27 +125,22 @@ desktop.")
(file-name (git-file-name name version))
(sha256
(base32
- "0mlc3nm2navzxm8k1rwpbw4w6mv30lmhqybm8jqxd4v8x7my73vq"))))
+ "0abpcawmmv5mgzk2i5n9rlairmjr2v9rg9b8c9g7xa085s496bi9"))))
(build-system meson-build-system)
(arguments
`(#:glib-or-gtk? #t
- #:configure-flags (list (string-append "-Dflatpak="
- (assoc-ref %build-inputs "flatpak")
- "/include"))
#:phases
(modify-phases %standard-phases
(add-before 'install 'set-environment-variables
(lambda _
;; Disable compiling schemas and updating desktop databases
- (setenv "DESTDIR" "/")
- #t))
+ (setenv "DESTDIR" "/")))
(add-after 'install 'install-symlinks
(lambda* (#:key outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))
(bin (string-append out "/bin/io.elementary.sideload"))
(link (string-append out "/bin/sideload")))
- (symlink bin link)
- #t))))))
+ (symlink bin link)))))))
(inputs
`(("flatpak" ,flatpak)
("glib" ,glib)
@@ -153,6 +148,7 @@ desktop.")
("gtk" ,gtk+)
("hicolor-icon-theme" ,hicolor-icon-theme)
("libgee" ,libgee)
+ ("libhandy" ,libhandy)
("libostree" ,libostree)
("libxml2" ,libxml2)))
(propagated-inputs
diff --git a/gnu/packages/pascal.scm b/gnu/packages/pascal.scm
index 0fdbecf05c..e199f981a1 100644
--- a/gnu/packages/pascal.scm
+++ b/gnu/packages/pascal.scm
@@ -1,6 +1,8 @@
;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2017 David Hashe <david.hashe@dhashe.com>
;;; Copyright © 2017 Kei Kebreau <address@hidden>
;;; Copyright © 2020 Eric Bavier <bavier@posteo.net>
+;;; Copyright © 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -34,28 +36,32 @@
#:use-module (gnu packages xml)
#:use-module (ice-9 match))
-(define fpc-bootstrap-i386-3.0.4
+(define %fpc-version "3.2.2")
+(define %fpc-release-date "2021/05/19")
+
+;;; FIXME: Bootstrap properly; these are prebuilt binaries.
+(define fpc-bootstrap-i386
(origin
(method url-fetch)
- (uri
- "mirror://sourceforge/freepascal/Linux/3.0.4/fpc-3.0.4.i386-linux.tar")
+ (uri (string-append "mirror://sourceforge/freepascal/Linux/"
+ %fpc-version "/fpc-" %fpc-version ".i386-linux.tar"))
(sha256
(base32
- "05xfgxa6vb0y2ryfsgn21m2kwaxhci6l2zxa3akvlnqminjsjvda"))))
+ "0n4r85dsr86zlk7r4hbd4nj14sda6rwgdgzxg4gj4q981fn80agn"))))
-(define fpc-bootstrap-x86_64-3.0.4
+(define fpc-bootstrap-x86_64
(origin
(method url-fetch)
- (uri
- "mirror://sourceforge/freepascal/Linux/3.0.4/fpc-3.0.4.x86_64-linux.tar")
+ (uri (string-append "mirror://sourceforge/freepascal/Linux/"
+ %fpc-version "/fpc-" %fpc-version ".x86_64-linux.tar"))
(sha256
(base32
- "0xzxh689iyjfmkqkhcqg9plrjmdx82hbyywyyc7jm0n92fpmp5ky"))))
+ "10qywczzz4qlcmmzxb7axnvwniq76ky130vd8iv6ljskll4c7njs"))))
(define-public fpc
(package
(name "fpc")
- (version "3.2.2") ; Update release date below!
+ (version %fpc-version)
(source (origin
(method url-fetch)
(uri (string-append "mirror://sourceforge/freepascal/Source/"
@@ -76,8 +82,7 @@
(mkdir-p "install")
(rename-file "install-doc" "install/doc")
(rename-file "install-man" "install/man")
- (delete-file "fpcsrc/tests/utils/dosbox/exitcode.exe")
- #t))))
+ (delete-file "fpcsrc/tests/utils/dosbox/exitcode.exe")))))
(build-system gnu-build-system)
(supported-systems '("i686-linux" "x86_64-linux"))
(inputs
@@ -88,14 +93,15 @@
("zlib" ,zlib)))
(native-inputs
;; FPC is built with FPC, so we need bootstrap binaries.
- `(("fpc-binary"
- ,(match (or (%current-target-system)
- (%current-system))
- ("i686-linux" fpc-bootstrap-i386-3.0.4)
- ;("powerpc64le-linux" fpc-bootstrap-ppc64le-3.0.4)
- ;("powerpc-linux" fpc-bootstrap-ppc-3.0.4)
- ("x86_64-linux" fpc-bootstrap-x86_64-3.0.4)
- (_ fpc-bootstrap-x86_64-3.0.4)))))
+ `(("fpc-binary" ,(match (or (%current-target-system)
+ (%current-system))
+ ("i686-linux" fpc-bootstrap-i386)
+ ;;("powerpc64le-linux" fpc-bootstrap-ppc64le)
+ ;;("powerpc-linux" fpc-bootstrap-ppc)
+ ("x86_64-linux" fpc-bootstrap-x86_64)
+ ;; XXX: Wrong, but innocuous so long
+ ;; `supported-systems' is kept in sync.
+ (_ fpc-bootstrap-x86_64)))))
(arguments
`(#:tests? #f ; no tests available
#:phases
@@ -115,7 +121,7 @@
(add-after 'unpack-bin 'install-bin
(lambda* (#:key inputs #:allow-other-keys)
(with-directory-excursion
- (string-append fpc-bootstrap-path "/fpc-3.0.4."
+ (string-append fpc-bootstrap-path "/fpc-" ,version "."
arch "-linux")
(let ((binary-tarball
(string-append "binary." arch "-linux.tar"))
@@ -131,8 +137,7 @@
(add-after 'patch-source-shebangs 'patch-inline-shebangs
(lambda _
(substitute* "fpcsrc/compiler/cscript.pas"
- (("#!/bin/sh") (string-append "#!" (which "sh"))))
- #t))
+ (("#!/bin/sh") (string-append "#!" (which "sh"))))))
(add-before 'build 'patch-release-date
(lambda _ ; reproducibility
(substitute* (list "fpcdocs/prog.tex"
@@ -143,18 +148,16 @@
"fpcsrc/utils/fpcm/fpcmmain.pp"
"fpcsrc/utils/fpcreslipo/fpcreslipo.pp"
"fpcsrc/compiler/version.pas")
- (("\\{\\$I(NCLUDE)? %DATE%\\}") "'2020/06/19'"))
- #t))
+ (("\\{\\$I(NCLUDE)? %DATE%\\}")
+ (format #f "'~a'" ,%fpc-release-date)))))
(replace 'configure
(lambda* (#:key inputs outputs #:allow-other-keys)
(substitute* "fpcsrc/compiler/systems/t_linux.pas"
;; Point to the current glibc dynamic linker.
(("/lib/ld-linux.so.2")
- (string-append (assoc-ref inputs "libc")
- ,(glibc-dynamic-linker)))
+ (search-input-file inputs ,(glibc-dynamic-linker)))
(("/lib64/ld-linux-x86-64.so.2")
- (string-append (assoc-ref inputs "libc")
- ,(glibc-dynamic-linker)))
+ (search-input-file inputs ,(glibc-dynamic-linker)))
; TODO: /lib/ld-linux-armhf.so.3
; TODO: /lib/ld-linux-aarch64.so.1
; TODO: /lib64/ld64.so.2
@@ -167,8 +170,7 @@
"if (isdll) then")))
(substitute* "fpcsrc/compiler/options.pas"
(("exepath\\+'../etc/'")
- (string-append "'" (assoc-ref outputs "out") "/etc'")))
- #t))
+ (string-append "'" (assoc-ref outputs "out") "/etc'")))))
(replace 'build
(lambda* (#:key inputs #:allow-other-keys)
(let* ((fpc-bin (string-append fpc-bootstrap-path "/bin"))
@@ -179,7 +181,7 @@
(setenv "PATH"
(string-append (getenv "PATH") ":"
fpc-bootstrap-path
- "/lib/fpc/3.0.4"))
+ "/lib/fpc/" ,version))
(setenv "FPC" fpc)
;; Specify target operating system using "-T" option
(invoke fpcmake (string-append "-T" arch "-linux"))
@@ -214,8 +216,8 @@
(glibc (assoc-ref inputs "glibc")))
(wrap-program fpc
`("PATH" ":" prefix (,(string-append ld "/bin")))
- `("LIBRARY_PATH" ":" prefix (,(string-append glibc "/lib"))))
- #t)))))))
+ `("LIBRARY_PATH" ":" prefix
+ (,(string-append glibc "/lib")))))))))))
;; fpc invokes gcc, so make sure LIBRARY_PATH et.al are set.
;(native-search-paths (package-native-search-paths gcc))
(home-page "https://www.freepascal.org")
diff --git a/gnu/packages/password-utils.scm b/gnu/packages/password-utils.scm
index 1b8df3ebe3..4658c9fa8d 100644
--- a/gnu/packages/password-utils.scm
+++ b/gnu/packages/password-utils.scm
@@ -460,10 +460,6 @@ random passwords that pass the checks.")
#t)))
(add-after 'install 'manpage
(lambda* (#:key outputs #:allow-other-keys)
- ;; Without this substitution, it fails with
- ;; ImportError: No module named 'gpg'
- (substitute* "Makefile"
- (("PYTHONPATH=.") ""))
(invoke "make" "assword.1")
(install-file
"assword.1"
@@ -527,11 +523,11 @@ any X11 window.")
(substitute* "contrib/dmenu/passmenu"
(("dmenu=dmenu\n")
(string-append "dmenu="
- (assoc-ref inputs "dmenu") "/bin/dmenu\n"))
+ (search-input-file inputs "/bin/dmenu")
+ "\n"))
(("xdotool=\"xdotool")
(string-append "xdotool=\""
- (assoc-ref inputs "xdotool") "/bin/xdotool")))
- #t))
+ (search-input-file inputs "/bin/xdotool"))))))
(add-after 'install 'install-passmenu
(lambda* (#:key outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))
@@ -1058,7 +1054,8 @@ by GnuPG's symmetrical encryption.")
(native-inputs `(("pkg-config" ,pkg-config)
("intltool" ,intltool)))
(arguments
- `(#:phases
+ `(#:configure-flags '("CFLAGS=-O2 -g -fcommon")
+ #:phases
(modify-phases %standard-phases
(add-before 'configure 'pre-configure
;; The file po/POTFILES.in ends up missing for some reason in
diff --git a/gnu/packages/patches/abseil-cpp-fix-gtest.patch b/gnu/packages/patches/abseil-cpp-fix-gtest.patch
deleted file mode 100644
index 38971448f3..0000000000
--- a/gnu/packages/patches/abseil-cpp-fix-gtest.patch
+++ /dev/null
@@ -1,16 +0,0 @@
-The GTEST_ALLOW_UNINSTANTIATED_PARAMTERIZED_TEST macro was added to googletest
-in commit 0b024bd9 on master. It has been used in an abseil-cpp release before
-a googletest release.
-
---- a/absl/container/internal/unordered_map_modifiers_test.h
-+++ b/absl/container/internal/unordered_map_modifiers_test.h
-@@ -286,7 +286,9 @@ class UniquePtrModifiersTest : public ::testing::Test {
- }
- };
-
-+#ifdef GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST
- GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(UniquePtrModifiersTest);
-+#endif
-
- TYPED_TEST_SUITE_P(UniquePtrModifiersTest);
-
diff --git a/gnu/packages/patches/agg-2.5-gcc8.patch b/gnu/packages/patches/agg-2.5-gcc8.patch
new file mode 100644
index 0000000000..dfcfc6cd4a
--- /dev/null
+++ b/gnu/packages/patches/agg-2.5-gcc8.patch
@@ -0,0 +1,14 @@
+Taken from: https://gitweb.gentoo.org/repo/gentoo.git/tree/x11-libs/agg/files/agg-2.5-gcc8.patch.
+
+diff -uprN agg-2.5/include/agg_renderer_outline_aa.h agg-2.5-fixed/include/agg_renderer_outline_aa.h
+--- agg-2.5/include/agg_renderer_outline_aa.h 2018-08-25 02:02:52.507254241 +0800
++++ agg-2.5-fixed/include/agg_renderer_outline_aa.h 2018-08-25 02:04:15.291175316 +0800
+@@ -1375,7 +1375,7 @@ namespace agg
+ //---------------------------------------------------------------------
+ void profile(const line_profile_aa& prof) { m_profile = &prof; }
+ const line_profile_aa& profile() const { return *m_profile; }
+- line_profile_aa& profile() { return *m_profile; }
++ const line_profile_aa& profile() { return *m_profile; }
+
+ //---------------------------------------------------------------------
+ int subpixel_width() const { return m_profile->subpixel_width(); }
diff --git a/gnu/packages/patches/atlas-gfortran-compat.patch b/gnu/packages/patches/atlas-gfortran-compat.patch
new file mode 100644
index 0000000000..5b46f5a64d
--- /dev/null
+++ b/gnu/packages/patches/atlas-gfortran-compat.patch
@@ -0,0 +1,37 @@
+Fix build with gfortran 10.
+
+Taken from Debian:
+https://salsa.debian.org/science-team/atlas/-/blob/master/debian/patches/gfortran-10.patch
+
+--- a/interfaces/blas/C/testing/c_dblat1.f
++++ b/interfaces/blas/C/testing/c_dblat1.f
+@@ -247,11 +247,11 @@
+ IF (ICASE.EQ.7) THEN
+ * .. DNRM2TEST ..
+ STEMP(1) = DTRUE1(NP1)
+- CALL STEST1(DNRM2TEST(N,SX,INCX),STEMP,STEMP,SFAC)
++ CALL STEST1(DNRM2TEST(N,SX,INCX),STEMP(1),STEMP,SFAC)
+ ELSE IF (ICASE.EQ.8) THEN
+ * .. DASUMTEST ..
+ STEMP(1) = DTRUE3(NP1)
+- CALL STEST1(DASUMTEST(N,SX,INCX),STEMP,STEMP,SFAC)
++ CALL STEST1(DASUMTEST(N,SX,INCX),STEMP(1),STEMP,SFAC)
+ ELSE IF (ICASE.EQ.9) THEN
+ * .. DSCALTEST ..
+ CALL DSCALTEST(N,SA((INCX-1)*5+NP1),SX,INCX)
+--- a/interfaces/blas/C/testing/c_sblat1.f
++++ b/interfaces/blas/C/testing/c_sblat1.f
+@@ -247,11 +247,11 @@
+ IF (ICASE.EQ.7) THEN
+ * .. SNRM2TEST ..
+ STEMP(1) = DTRUE1(NP1)
+- CALL STEST1(SNRM2TEST(N,SX,INCX),STEMP,STEMP,SFAC)
++ CALL STEST1(SNRM2TEST(N,SX,INCX),STEMP(1),STEMP,SFAC)
+ ELSE IF (ICASE.EQ.8) THEN
+ * .. SASUMTEST ..
+ STEMP(1) = DTRUE3(NP1)
+- CALL STEST1(SASUMTEST(N,SX,INCX),STEMP,STEMP,SFAC)
++ CALL STEST1(SASUMTEST(N,SX,INCX),STEMP(1),STEMP,SFAC)
+ ELSE IF (ICASE.EQ.9) THEN
+ * .. SSCALTEST ..
+ CALL SSCALTEST(N,SA((INCX-1)*5+NP1),SX,INCX)
diff --git a/gnu/packages/patches/awesome-4.3-fno-common.patch b/gnu/packages/patches/awesome-4.3-fno-common.patch
new file mode 100644
index 0000000000..62f153d012
--- /dev/null
+++ b/gnu/packages/patches/awesome-4.3-fno-common.patch
@@ -0,0 +1,178 @@
+Taken from: https://github.com/awesomeWM/awesome/commit/d256d9055095f27a33696e0aeda4ee20ed4fb1a0
+Author: Reiner Herrmann <reiner@reiner-h.de>
+
+--- a/common/lualib.c
++++ b/common/lualib.c
+@@ -20,6 +20,8 @@
+ #include "common/lualib.h"
+ #include "luaa.h"
+
++lua_CFunction lualib_dofunction_on_error;
++
+ void luaA_checkfunction(lua_State *L, int idx)
+ {
+ if(!lua_isfunction(L, idx))
+--- a/common/lualib.h
++++ b/common/lualib.h
+@@ -28,7 +28,7 @@
+ #include "common/util.h"
+
+ /** Lua function to call on dofunction() error */
+-lua_CFunction lualib_dofunction_on_error;
++extern lua_CFunction lualib_dofunction_on_error;
+
+ void luaA_checkfunction(lua_State *, int);
+ void luaA_checktable(lua_State *, int);
+--- a/luaa.c
++++ b/luaa.c
+@@ -91,6 +91,8 @@ extern const struct luaL_Reg awesome_mouse_meta[];
+ extern const struct luaL_Reg awesome_root_methods[];
+ extern const struct luaL_Reg awesome_root_meta[];
+
++signal_array_t global_signals;
++
+ /** A call into the Lua code aborted with an error.
+ *
+ * This signal is used in the example configuration, @{05-awesomerc.md},
+--- a/luaa.h
++++ b/luaa.h
+@@ -317,7 +317,7 @@ const char *luaA_find_config(xdgHandle *, const char *, luaA_config_callback *);
+ bool luaA_parserc(xdgHandle *, const char *);
+
+ /** Global signals */
+-signal_array_t global_signals;
++extern signal_array_t global_signals;
+
+ int luaA_class_index_miss_property(lua_State *, lua_object_t *);
+ int luaA_class_newindex_miss_property(lua_State *, lua_object_t *);
+--- a/objects/button.c
++++ b/objects/button.c
+@@ -35,6 +35,8 @@
+
+ #include "button.h"
+
++lua_class_t button_class;
++
+ /** Button object.
+ *
+ * @tfield int button The mouse button number, or 0 for any button.
+--- a/objects/button.h
++++ b/objects/button.h
+@@ -39,7 +39,7 @@ typedef struct button_t
+ xcb_button_t button;
+ } button_t;
+
+-lua_class_t button_class;
++extern lua_class_t button_class;
+ LUA_OBJECT_FUNCS(button_class, button_t, button)
+ ARRAY_FUNCS(button_t *, button, DO_NOTHING)
+
+--- a/objects/client.c
++++ b/objects/client.c
+@@ -108,6 +108,8 @@
+ #include <xcb/shape.h>
+ #include <cairo-xcb.h>
+
++lua_class_t client_class;
++
+ /** Client class.
+ *
+ * This table allow to add more dynamic properties to the clients. For example,
+--- a/objects/client.h
++++ b/objects/client.h
+@@ -200,7 +200,7 @@ struct client_t
+ ARRAY_FUNCS(client_t *, client, DO_NOTHING)
+
+ /** Client class */
+-lua_class_t client_class;
++extern lua_class_t client_class;
+
+ LUA_OBJECT_FUNCS(client_class, client_t, client)
+
+--- a/objects/drawin.c
++++ b/objects/drawin.c
+@@ -46,6 +46,8 @@
+ #include <cairo-xcb.h>
+ #include <xcb/shape.h>
+
++lua_class_t drawin_class;
++
+ /** Drawin object.
+ *
+ * @field border_width Border width.
+--- a/objects/drawin.h
++++ b/objects/drawin.h
+@@ -52,7 +52,7 @@ void luaA_drawin_systray_kickout(lua_State *);
+
+ void drawin_class_setup(lua_State *);
+
+-lua_class_t drawin_class;
++extern lua_class_t drawin_class;
+
+ #endif
+ // vim: filetype=c:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80
+--- a/objects/key.c
++++ b/objects/key.c
+@@ -43,6 +43,8 @@
+ #include <xkbcommon/xkbcommon.h>
+ #include <glib.h>
+
++lua_class_t key_class;
++
+ /** Key object.
+ *
+ * @tfield string key The key to trigger an event.
+--- a/objects/key.h
++++ b/objects/key.h
+@@ -36,7 +36,7 @@ typedef struct keyb_t
+ xcb_keycode_t keycode;
+ } keyb_t;
+
+-lua_class_t key_class;
++extern lua_class_t key_class;
+ LUA_OBJECT_FUNCS(key_class, keyb_t, key)
+ DO_ARRAY(keyb_t *, key, DO_NOTHING)
+
+--- a/objects/tag.c
++++ b/objects/tag.c
+@@ -190,6 +190,8 @@
+ #include "ewmh.h"
+ #include "luaa.h"
+
++lua_class_t tag_class;
++
+ /**
+ * @signal request::select
+ */
+--- a/objects/tag.h
++++ b/objects/tag.h
+@@ -46,7 +46,7 @@ struct tag
+ client_array_t clients;
+ };
+
+-lua_class_t tag_class;
++extern lua_class_t tag_class;
+ LUA_OBJECT_FUNCS(tag_class, tag_t, tag)
+
+ void tag_class_setup(lua_State *);
+--- a/objects/window.c
++++ b/objects/window.c
+@@ -59,6 +59,7 @@
+ #include "property.h"
+ #include "xwindow.h"
+
++lua_class_t window_class;
+ LUA_CLASS_FUNCS(window, window_class)
+
+ static xcb_window_t
+--- a/objects/window.h
++++ b/objects/window.h
+@@ -80,7 +80,7 @@ typedef struct
+ WINDOW_OBJECT_HEADER
+ } window_t;
+
+-lua_class_t window_class;
++extern lua_class_t window_class;
+
+ void window_class_setup(lua_State *);
+
diff --git a/gnu/packages/patches/bdb-5.3-atomics-on-gcc-9.patch b/gnu/packages/patches/bdb-5.3-atomics-on-gcc-9.patch
new file mode 100644
index 0000000000..56d404da15
--- /dev/null
+++ b/gnu/packages/patches/bdb-5.3-atomics-on-gcc-9.patch
@@ -0,0 +1,22 @@
+Patch borrowed from Arch Linux. Allows compiling bdb 5.3 and earlier with GCC newer than 7.
+
+--- src/dbinc/atomic.h 2013-03-12 14:07:22.000000000 -0400
++++ src/dbinc/atomic.h.change 2013-03-12 14:06:35.000000000 -0400
+@@ -144,7 +144,7 @@
+ #define atomic_inc(env, p) __atomic_inc(p)
+ #define atomic_dec(env, p) __atomic_dec(p)
+ #define atomic_compare_exchange(env, p, o, n) \
+- __atomic_compare_exchange((p), (o), (n))
++ __atomic_compare_exchange_db((p), (o), (n))
+ static inline int __atomic_inc(db_atomic_t *p)
+ {
+ int temp;
+@@ -176,7 +176,7 @@
+ * http://gcc.gnu.org/onlinedocs/gcc-4.1.0/gcc/Atomic-Builtins.html
+ * which configure could be changed to use.
+ */
+-static inline int __atomic_compare_exchange(
++static inline int __atomic_compare_exchange_db(
+ db_atomic_t *p, atomic_value_t oldval, atomic_value_t newval)
+ {
+ atomic_value_t was;
diff --git a/gnu/packages/patches/biber-fix-encoding-write.patch b/gnu/packages/patches/biber-fix-encoding-write.patch
deleted file mode 100644
index 56cd11212e..0000000000
--- a/gnu/packages/patches/biber-fix-encoding-write.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From 2a9b15aefb842a734637f3d230936ea1b7c60096 Mon Sep 17 00:00:00 2001
-From: Philip Kime <Philip@kime.org.uk>
-Date: Thu, 8 Nov 2018 22:02:09 +0100
-Subject: [PATCH] Fix to address #239
-
----
- lib/Biber.pm | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/lib/Biber.pm b/lib/Biber.pm
-index 8b1f80a5..d97fca29 100644
---- a/lib/Biber.pm
-+++ b/lib/Biber.pm
-@@ -311,6 +311,8 @@ sub parse_ctrlfile {
- unless (eval {$checkbuf = File::Slurper::read_text($ctrl_file_path, 'latin1')}) {
- biber_error("$ctrl_file_path is not UTF-8 or even latin1, how horrible.");
- }
-+ # Write ctrl file as UTF-8
-+ File::Slurper::write_text($ctrl_file_path, NFC($checkbuf));# Unicode NFC boundary
- }
-
- $checkbuf = NFD($checkbuf);# Unicode NFD boundary
-@@ -319,8 +321,6 @@ sub parse_ctrlfile {
- unlink($output) unless $output eq '-';# ignore deletion of STDOUT marker
- biber_error("$ctrl_file_path is malformed, last biblatex run probably failed. Deleted $output");
- }
-- # Write ctrl file as UTF-8
-- File::Slurper::write_text($ctrl_file_path, NFC($checkbuf));# Unicode NFC boundary
-
- # Validate if asked to
- if (Biber::Config->getoption('validate_control')) {
diff --git a/gnu/packages/patches/biber-sortinithash.patch b/gnu/packages/patches/biber-sortinithash.patch
deleted file mode 100644
index 5a626705e6..0000000000
--- a/gnu/packages/patches/biber-sortinithash.patch
+++ /dev/null
@@ -1,1666 +0,0 @@
-This is a backport of this upstream commit to Biber 2.12:
-
- From 6b61b4c13778cf638f82569ab9e413f09f111ba5 Mon Sep 17 00:00:00 2001
- From: Philip Kime <Philip@kime.org.uk>
- Date: Sat, 12 Jan 2019 17:19:51 +0100
- Subject: [PATCH] Updated tests after U::C upgrade changed sortinit hashes
-
-It addresses test failures found with recent versions of the
-Biber dependencies.
-
-diff --git a/t/annotations.t b/t/annotations.t
-index b4f641e..c6f86c7 100644
---- a/t/annotations.t
-+++ b/t/annotations.t
-@@ -73,7 +73,7 @@ my $ann1 = q| \entry{ann1}{misc}{}
- \strng{authorfullhash}{90ae96c82de92e36949bc64254bbde0c}
- \field{extraname}{1}
- \field{sortinit}{L}
-- \field{sortinithash}{2c7981aaabc885868aba60f0c09ee20f}
-+ \field{sortinithash}{dad3efd0836470093a7b4a7bb756eb8c}
- \field{labelnamesource}{author}
- \field{labeltitlesource}{title}
- \field{title}{The Title}
-@@ -116,7 +116,7 @@ my $ann2 = q| \entry{ann2}{misc}{}
- \strng{authorfullhash}{90ae96c82de92e36949bc64254bbde0c}
- \field{extraname}{2}
- \field{sortinit}{L}
-- \field{sortinithash}{2c7981aaabc885868aba60f0c09ee20f}
-+ \field{sortinithash}{dad3efd0836470093a7b4a7bb756eb8c}
- \field{labelnamesource}{author}
- \field{labeltitlesource}{title}
- \field{title}{The Title}
-diff --git a/t/basic-misc.t b/t/basic-misc.t
-index d4664b1..a9168cc 100644
---- a/t/basic-misc.t
-+++ b/t/basic-misc.t
-@@ -97,7 +97,7 @@ my $u1 = q| \entry{u1}{misc}{}
- \strng{authorfullhash}{b78abdc838d79b6576f2ed0021642766}
- \field{labelalpha}{AAA\textbf{+}00}
- \field{sortinit}{A}
-- \field{sortinithash}{d77c7cdd82ff690d4c3ef13216f92f0b}
-+ \field{sortinithash}{a3dcedd53b04d1adfd5ac303ecd5e6fa}
- \true{singletitle}
- \true{uniquework}
- \field{labelnamesource}{author}
-@@ -231,7 +231,7 @@ my $murray1 = q| \entry{murray}{article}{}
- \strng{authorfullhash}{1572cc3fd324f560e5e71d041a6bd764}
- \field{labelalpha}{Hos\textbf{+}98}
- \field{sortinit}{H}
-- \field{sortinithash}{5f15a7bc777ad49ff15aa4d2831b1681}
-+ \field{sortinithash}{6db6145dae8dc9e1271a8d556090b50a}
- \true{singletitle}
- \true{uniquework}
- \field{labelnamesource}{author}
-@@ -348,7 +348,7 @@ my $murray2 = q| \entry{murray}{article}{}
- \strng{authorfullhash}{1572cc3fd324f560e5e71d041a6bd764}
- \field{labelalpha}{Hos98}
- \field{sortinit}{H}
-- \field{sortinithash}{5f15a7bc777ad49ff15aa4d2831b1681}
-+ \field{sortinithash}{6db6145dae8dc9e1271a8d556090b50a}
- \true{singletitle}
- \true{uniquework}
- \field{labelnamesource}{author}
-@@ -389,7 +389,7 @@ my $t1 = q+ \entry{t1}{misc}{}
- \field{extraname}{1}
- \field{labelalpha}{Bro92}
- \field{sortinit}{B}
-- \field{sortinithash}{276475738cc058478c1677046f857703}
-+ \field{sortinithash}{8de16967003c7207dae369d874f1456e}
- \true{uniquework}
- \field{labelnamesource}{author}
- \field{labeltitlesource}{title}
-@@ -419,7 +419,7 @@ my $t2 = q| \entry{t2}{misc}{}
- \field{extraname}{2}
- \field{labelalpha}{Bro94}
- \field{sortinit}{B}
-- \field{sortinithash}{276475738cc058478c1677046f857703}
-+ \field{sortinithash}{8de16967003c7207dae369d874f1456e}
- \true{uniquework}
- \field{labelnamesource}{author}
- \field{labeltitlesource}{title}
-@@ -452,7 +452,7 @@ my $anon1 = q| \entry{anon1}{unpublished}{}
- \strng{shortauthorfullhash}{9873a6cc65c553faa2b21aaad626fe4b}
- \field{labelalpha}{XAn35}
- \field{sortinit}{A}
-- \field{sortinithash}{d77c7cdd82ff690d4c3ef13216f92f0b}
-+ \field{sortinithash}{a3dcedd53b04d1adfd5ac303ecd5e6fa}
- \true{singletitle}
- \true{uniquework}
- \field{labelnamesource}{shortauthor}
-@@ -491,7 +491,7 @@ my $anon2 = q| \entry{anon2}{unpublished}{}
- \strng{shortauthorfullhash}{f64c29e89ea49402b997956610b58ef6}
- \field{labelalpha}{YAn39}
- \field{sortinit}{A}
-- \field{sortinithash}{d77c7cdd82ff690d4c3ef13216f92f0b}
-+ \field{sortinithash}{a3dcedd53b04d1adfd5ac303ecd5e6fa}
- \true{singletitle}
- \true{uniquework}
- \field{labelnamesource}{shortauthor}
-@@ -526,7 +526,7 @@ my $url1 = q| \entry{url1}{misc}{}
- \field{extraname}{4}
- \field{labelalpha}{Ali05}
- \field{sortinit}{A}
-- \field{sortinithash}{d77c7cdd82ff690d4c3ef13216f92f0b}
-+ \field{sortinithash}{a3dcedd53b04d1adfd5ac303ecd5e6fa}
- \field{extraalpha}{4}
- \field{labelnamesource}{author}
- \field{year}{2005}
-@@ -710,7 +710,7 @@ my $isbn1 = q| \entry{isbn1}{misc}{}
- \field{extraname}{1}
- \field{labelalpha}{Flu}
- \field{sortinit}{F}
-- \field{sortinithash}{669c706c6f1fbf3b5a83d26f1d9e9e72}
-+ \field{sortinithash}{fb0c0faa89eb6abae8213bf60e6799ea}
- \field{extraalpha}{1}
- \field{labelnamesource}{author}
- \field{isbn}{978-0-8165-2066-4}
-@@ -735,7 +735,7 @@ my $isbn2 = q| \entry{isbn2}{misc}{}
- \field{extraname}{2}
- \field{labelalpha}{Flu}
- \field{sortinit}{F}
-- \field{sortinithash}{669c706c6f1fbf3b5a83d26f1d9e9e72}
-+ \field{sortinithash}{fb0c0faa89eb6abae8213bf60e6799ea}
- \field{extraalpha}{2}
- \field{labelnamesource}{author}
- \field{isbn}{978-0-8165-2066-4}
-@@ -778,7 +778,7 @@ my $clone1 = q| \entry{snk1}{book}{}
- \field{extraname}{2}
- \field{labelalpha}{vDoe}
- \field{sortinit}{v}
-- \field{sortinithash}{75dd7385c90b2252c3ae853a80ca853b}
-+ \field{sortinithash}{02432525618c08e2b03cac47c19764af}
- \field{extraalpha}{2}
- \field{labelnamesource}{author}
- \endentry
-@@ -807,7 +807,7 @@ my $clone2 = q| \entry{clone-snk1}{book}{}
- \field{extraname}{1}
- \field{labelalpha}{vDoe}
- \field{sortinit}{v}
-- \field{sortinithash}{75dd7385c90b2252c3ae853a80ca853b}
-+ \field{sortinithash}{02432525618c08e2b03cac47c19764af}
- \field{extraalpha}{1}
- \field{labelnamesource}{author}
- \field{addendum}{add}
-@@ -839,7 +839,7 @@ my $ent1 = q| \entry{ent1}{book}{}
- \strng{authorfullhash}{b2536a425d549b46de5f21c4d468050a}
- \field{labelalpha}{SdB}
- \field{sortinit}{S}
-- \field{sortinithash}{322b1d5276f2f6c1bccdcd15920dbee6}
-+ \field{sortinithash}{c319cff79d99c853d775f88277d4e45f}
- \true{singletitle}
- \field{labelnamesource}{author}
- \endentry
-@@ -862,7 +862,7 @@ my $verb1 = q| \entry{verb1}{book}{}
- \strng{authorfullhash}{cac5a25f503e71f5ef28f474e14007b6}
- \field{labelalpha}{All}
- \field{sortinit}{A}
-- \field{sortinithash}{d77c7cdd82ff690d4c3ef13216f92f0b}
-+ \field{sortinithash}{a3dcedd53b04d1adfd5ac303ecd5e6fa}
- \true{singletitle}
- \field{labelnamesource}{author}
- \verb{verba}
-diff --git a/t/biblatexml.t b/t/biblatexml.t
-index ad9ad25..0959bfa 100644
---- a/t/biblatexml.t
-+++ b/t/biblatexml.t
-@@ -111,7 +111,7 @@ my $l1 = q| \entry{bltx1}{misc}{useprefix=false}
- \strng{translatornamehash}{b44eba830fe9817fbe8e53c82f1cbe04}
- \strng{translatorfullhash}{b44eba830fe9817fbe8e53c82f1cbe04}
- \field{sortinit}{v}
-- \field{sortinithash}{75dd7385c90b2252c3ae853a80ca853b}
-+ \field{sortinithash}{02432525618c08e2b03cac47c19764af}
- \field{extradatescope}{labelyear}
- \field{labeldatesource}{}
- \field{labelnamesource}{author}
-@@ -158,7 +158,7 @@ my $l1 = q| \entry{bltx1}{misc}{useprefix=false}
-
- my $l2 = q| \entry{loopkey:a}{book}{}
- \field{sortinit}{0}
-- \field{sortinithash}{168ad0c7c5ed09f1d28c6675717b5b03}
-+ \field{sortinithash}{bcf7a1f4afb88b7299f988caccb80d1c}
- \endentry
- |;
-
-diff --git a/t/crossrefs.t b/t/crossrefs.t
-index 915b52b..b6191c6 100644
---- a/t/crossrefs.t
-+++ b/t/crossrefs.t
-@@ -82,7 +82,7 @@ my $cr1 = q| \entry{cr1}{inbook}{}
- \strng{editornamehash}{c129df5593fdaa7475548811bfbb227d}
- \strng{editorfullhash}{c129df5593fdaa7475548811bfbb227d}
- \field{sortinit}{G}
-- \field{sortinithash}{5e8d2bf9d38de41b1528bd307546008f}
-+ \field{sortinithash}{62eb2aa29549e4fdbd3cb154ec5711cb}
- \true{singletitle}
- \true{uniquetitle}
- \true{uniquework}
-@@ -131,7 +131,7 @@ my $cr2 = q| \entry{cr2}{inbook}{}
- \strng{editornamehash}{c129df5593fdaa7475548811bfbb227d}
- \strng{editorfullhash}{c129df5593fdaa7475548811bfbb227d}
- \field{sortinit}{F}
-- \field{sortinithash}{669c706c6f1fbf3b5a83d26f1d9e9e72}
-+ \field{sortinithash}{fb0c0faa89eb6abae8213bf60e6799ea}
- \true{singletitle}
- \true{uniquetitle}
- \true{uniquework}
-@@ -165,7 +165,7 @@ my $cr_m = q| \entry{cr_m}{book}{}
- \strng{editornamehash}{c129df5593fdaa7475548811bfbb227d}
- \strng{editorfullhash}{c129df5593fdaa7475548811bfbb227d}
- \field{sortinit}{G}
-- \field{sortinithash}{5e8d2bf9d38de41b1528bd307546008f}
-+ \field{sortinithash}{62eb2aa29549e4fdbd3cb154ec5711cb}
- \true{crossrefsource}
- \true{uniquetitle}
- \field{labeltitlesource}{title}
-@@ -203,7 +203,7 @@ my $cr3 = q| \entry{cr3}{inbook}{}
- \strng{editornamehash}{a1f5c22413396d599ec766725b226735}
- \strng{editorfullhash}{a1f5c22413396d599ec766725b226735}
- \field{sortinit}{A}
-- \field{sortinithash}{d77c7cdd82ff690d4c3ef13216f92f0b}
-+ \field{sortinithash}{a3dcedd53b04d1adfd5ac303ecd5e6fa}
- \true{singletitle}
- \true{uniquetitle}
- \true{uniquework}
-@@ -248,7 +248,7 @@ my $cr4 = q| \entry{cr4}{inbook}{}
- \strng{editornamehash}{6ea89bd4958743a20b70fe17647d6af5}
- \strng{editorfullhash}{6ea89bd4958743a20b70fe17647d6af5}
- \field{sortinit}{M}
-- \field{sortinithash}{cfd219b90152c06204fab207bc6c7cab}
-+ \field{sortinithash}{2e5c2f51f7fa2d957f3206819bf86dc3}
- \true{singletitle}
- \true{uniquetitle}
- \true{uniquework}
-@@ -279,7 +279,7 @@ my $crt = q| \entry{crt}{book}{}
- \strng{editornamehash}{a1f5c22413396d599ec766725b226735}
- \strng{editorfullhash}{a1f5c22413396d599ec766725b226735}
- \field{sortinit}{B}
-- \field{sortinithash}{276475738cc058478c1677046f857703}
-+ \field{sortinithash}{8de16967003c7207dae369d874f1456e}
- \true{uniquetitle}
- \field{labeltitlesource}{title}
- \field{title}{Beasts of the Burbling Burns}
-@@ -315,7 +315,7 @@ my $cr6 = q| \entry{cr6}{inproceedings}{}
- \strng{editorfullhash}{344a7f427fb765610ef96eb7bce95257}
- \field{extraname}{2}
- \field{sortinit}{A}
-- \field{sortinithash}{d77c7cdd82ff690d4c3ef13216f92f0b}
-+ \field{sortinithash}{a3dcedd53b04d1adfd5ac303ecd5e6fa}
- \true{uniquetitle}
- \true{uniquework}
- \field{labelnamesource}{author}
-@@ -366,7 +366,7 @@ my $cr7 = q| \entry{cr7}{inbook}{}
- \strng{bookauthorfullhash}{91a1dd4aeed3c4ec29ca74c4e778be5f}
- \field{extraname}{1}
- \field{sortinit}{A}
-- \field{sortinithash}{d77c7cdd82ff690d4c3ef13216f92f0b}
-+ \field{sortinithash}{a3dcedd53b04d1adfd5ac303ecd5e6fa}
- \true{uniquetitle}
- \true{uniquework}
- \field{labelnamesource}{author}
-@@ -401,7 +401,7 @@ my $cr8 = q| \entry{cr8}{incollection}{}
- \strng{authorfullhash}{3d449e56eb3ca1ae80dc99a18d689795}
- \field{extraname}{4}
- \field{sortinit}{S}
-- \field{sortinithash}{322b1d5276f2f6c1bccdcd15920dbee6}
-+ \field{sortinithash}{c319cff79d99c853d775f88277d4e45f}
- \true{singletitle}
- \true{uniquetitle}
- \true{uniquework}
-@@ -431,7 +431,7 @@ my $xr1 = q| \entry{xr1}{inbook}{}
- \strng{authornamehash}{e0ecc4fc668ee499d1afba44e1ac064d}
- \strng{authorfullhash}{e0ecc4fc668ee499d1afba44e1ac064d}
- \field{sortinit}{Z}
-- \field{sortinithash}{156173bd08b075d7295bc3e0f4735a04}
-+ \field{sortinithash}{8f7b480688e809b50b6f6577b16f3db5}
- \true{singletitle}
- \true{uniquetitle}
- \true{uniquework}
-@@ -460,7 +460,7 @@ my $xr2 = q| \entry{xr2}{inbook}{}
- \strng{authornamehash}{6afa09374ecfd6b394ce714d2d9709c7}
- \strng{authorfullhash}{6afa09374ecfd6b394ce714d2d9709c7}
- \field{sortinit}{I}
-- \field{sortinithash}{320bc8fe8101b9376f9f21cd507de0e8}
-+ \field{sortinithash}{9417e9a1288a9371e2691d999083ed39}
- \true{singletitle}
- \true{uniquetitle}
- \true{uniquework}
-@@ -491,7 +491,7 @@ my $xrm = q| \entry{xrm}{book}{}
- \strng{editornamehash}{809950f9b59ae207092b909a19dcb27b}
- \strng{editorfullhash}{809950f9b59ae207092b909a19dcb27b}
- \field{sortinit}{C}
-- \field{sortinithash}{963e9d84a3da2344e8833203de5aed05}
-+ \field{sortinithash}{4c244ceae61406cdc0cc2ce1cb1ff703}
- \true{xrefsource}
- \true{uniquetitle}
- \field{labeltitlesource}{title}
-@@ -516,7 +516,7 @@ my $xr3 = q| \entry{xr3}{inbook}{}
- \strng{authornamehash}{9788055665b9bb4b37c776c3f6b74f16}
- \strng{authorfullhash}{9788055665b9bb4b37c776c3f6b74f16}
- \field{sortinit}{N}
-- \field{sortinithash}{f7242c3ed3dc50029fca1be76c497c7c}
-+ \field{sortinithash}{98cf339a479c0454fe09153a08675a15}
- \true{singletitle}
- \true{uniquetitle}
- \true{uniquework}
-@@ -546,7 +546,7 @@ my $xrt = q| \entry{xrt}{book}{}
- \strng{editornamehash}{bf7d6b02f3e073913e5bfe5059508dd5}
- \strng{editorfullhash}{bf7d6b02f3e073913e5bfe5059508dd5}
- \field{sortinit}{K}
-- \field{sortinithash}{9fd838a31ba64d981e8f44562bd33f89}
-+ \field{sortinithash}{d3edc18d54b9438a72c24c925bfb38f4}
- \true{uniquetitle}
- \field{labeltitlesource}{title}
- \field{title}{Kings, Cork and Calculation}
-@@ -572,7 +572,7 @@ my $xr4 = q| \entry{xr4}{inbook}{}
- \strng{authorfullhash}{7804ffef086c0c4686c235807f5cb502}
- \field{extraname}{1}
- \field{sortinit}{M}
-- \field{sortinithash}{cfd219b90152c06204fab207bc6c7cab}
-+ \field{sortinithash}{2e5c2f51f7fa2d957f3206819bf86dc3}
- \field{labelnamesource}{author}
- \field{labeltitlesource}{title}
- \field{origyear}{1933}
-@@ -600,7 +600,7 @@ my $mxr = q| \entry{mxr}{inbook}{}
- \strng{authorfullhash}{7804ffef086c0c4686c235807f5cb502}
- \field{extraname}{2}
- \field{sortinit}{M}
-- \field{sortinithash}{cfd219b90152c06204fab207bc6c7cab}
-+ \field{sortinithash}{2e5c2f51f7fa2d957f3206819bf86dc3}
- \field{labelnamesource}{author}
- \field{labeltitlesource}{title}
- \field{origyear}{1933}
-@@ -625,7 +625,7 @@ my $mcr = q| \entry{mcr}{inbook}{}
- \strng{authorfullhash}{7804ffef086c0c4686c235807f5cb502}
- \field{extraname}{3}
- \field{sortinit}{M}
-- \field{sortinithash}{cfd219b90152c06204fab207bc6c7cab}
-+ \field{sortinithash}{2e5c2f51f7fa2d957f3206819bf86dc3}
- \field{labelnamesource}{author}
- \field{labeltitlesource}{title}
- \field{origyear}{1933}
-@@ -660,7 +660,7 @@ my $ccr1 = q| \entry{ccr2}{book}{}
- \strng{editorfullhash}{cfee758a1c82df2e26af1985e061bb0a}
- \field{extraname}{1}
- \field{sortinit}{V}
-- \field{sortinithash}{75dd7385c90b2252c3ae853a80ca853b}
-+ \field{sortinithash}{02432525618c08e2b03cac47c19764af}
- \true{uniquetitle}
- \true{uniquework}
- \field{labelnamesource}{author}
-@@ -694,7 +694,7 @@ my $ccr2 = q| \entry{ccr3}{inbook}{}
- \strng{editornamehash}{cfee758a1c82df2e26af1985e061bb0a}
- \strng{editorfullhash}{cfee758a1c82df2e26af1985e061bb0a}
- \field{sortinit}{P}
-- \field{sortinithash}{8d51b3d5b78d75b54308d706b9bbe285}
-+ \field{sortinithash}{bb5b15f2db90f7aef79bb9e83defefcb}
- \true{uniquetitle}
- \field{labeltitlesource}{title}
- \field{booktitle}{Misc etc.}
-@@ -726,7 +726,7 @@ my $ccr3 = q| \entry{ccr4}{inbook}{}
-
- my $s1 = q| \entry{s1}{inbook}{}
- \field{sortinit}{S}
-- \field{sortinithash}{322b1d5276f2f6c1bccdcd15920dbee6}
-+ \field{sortinithash}{c319cff79d99c853d775f88277d4e45f}
- \true{uniquetitle}
- \field{labeltitlesource}{title}
- \strng{crossref}{s2}
-@@ -760,7 +760,7 @@ my $xc2 = q| \entry{xc2}{inbook}{}
- \strng{bookauthorfullhash}{1a0f7d518cccdad859a74412ef956474}
- \field{extraname}{2}
- \field{sortinit}{C}
-- \field{sortinithash}{963e9d84a3da2344e8833203de5aed05}
-+ \field{sortinithash}{4c244ceae61406cdc0cc2ce1cb1ff703}
- \true{xrefsource}
- \field{labelnamesource}{author}
- \field{booktitle}{Title}
-@@ -769,7 +769,7 @@ my $xc2 = q| \entry{xc2}{inbook}{}
-
- my $b1 = q| \entry{b1}{inbook}{}
- \field{sortinit}{2}
-- \field{sortinithash}{cbff857e587bcb4635511624d773949e}
-+ \field{sortinithash}{ed39bb39cf854d5250e95b1c1f94f4ed}
- \strng{crossref}{b2}
- \field{day}{3}
- \field{month}{3}
-@@ -803,7 +803,7 @@ my $sup1 = q| \entry{sup1}{mvbook}{}
- \strng{authorfullhash}{556c8dba145b472e6a8598d506f7cbe2}
- \field{extraname}{3}
- \field{sortinit}{S}
-- \field{sortinithash}{322b1d5276f2f6c1bccdcd15920dbee6}
-+ \field{sortinithash}{c319cff79d99c853d775f88277d4e45f}
- \true{crossrefsource}
- \true{singletitle}
- \field{labelnamesource}{author}
-@@ -828,7 +828,7 @@ my $sup2 = q| \entry{sup2}{book}{}
- \strng{authorfullhash}{556c8dba145b472e6a8598d506f7cbe2}
- \field{extraname}{1}
- \field{sortinit}{S}
-- \field{sortinithash}{322b1d5276f2f6c1bccdcd15920dbee6}
-+ \field{sortinithash}{c319cff79d99c853d775f88277d4e45f}
- \true{singletitle}
- \field{labelnamesource}{author}
- \field{labeltitlesource}{title}
-diff --git a/t/datalists.t b/t/datalists.t
-index 3081cc4..4855e3d 100644
---- a/t/datalists.t
-+++ b/t/datalists.t
-@@ -187,7 +187,7 @@ my $K11 = q| \entry{K11}{book}{}
- \strng{authornamehash}{4edc280a0ef229f9c061e3b121b17482}
- \strng{authorfullhash}{4edc280a0ef229f9c061e3b121b17482}
- \field{sortinit}{a}
-- \field{sortinithash}{d77c7cdd82ff690d4c3ef13216f92f0b}
-+ \field{sortinithash}{a3dcedd53b04d1adfd5ac303ecd5e6fa}
- \field{extradatescope}{labelyear}
- \field{labeldatesource}{}
- \field{labelnamesource}{author}
-@@ -219,7 +219,7 @@ my $K12 = q| \entry{K12}{book}{}
- \strng{authornamehash}{a846a485fc9cbb59b0ebeedd6ac637e4}
- \strng{authorfullhash}{a846a485fc9cbb59b0ebeedd6ac637e4}
- \field{sortinit}{Z}
-- \field{sortinithash}{156173bd08b075d7295bc3e0f4735a04}
-+ \field{sortinithash}{8f7b480688e809b50b6f6577b16f3db5}
- \field{extradatescope}{labelyear}
- \field{labeldatesource}{}
- \field{labelnamesource}{author}
-diff --git a/t/dateformats.t b/t/dateformats.t
-index 6beb567..0d5072a 100644
---- a/t/dateformats.t
-+++ b/t/dateformats.t
-@@ -88,7 +88,7 @@ my $l13c = q| \entry{L13}{book}{}
- \strng{authorfullhash}{8c77336299b25bdada7bf8038f46722f}
- \field{extraname}{3}
- \field{sortinit}{D}
-- \field{sortinithash}{2ef1bd9a78cc71eb74d7231c635177b8}
-+ \field{sortinithash}{c438b3d5d027251ba63f5ed538d98af5}
- \field{extradatescope}{labelyear}
- \field{labeldatesource}{}
- \field{labelnamesource}{author}
-@@ -126,7 +126,7 @@ my $l14 = q| \entry{L14}{book}{}
- \strng{authorfullhash}{8c77336299b25bdada7bf8038f46722f}
- \field{extraname}{4}
- \field{sortinit}{D}
-- \field{sortinithash}{2ef1bd9a78cc71eb74d7231c635177b8}
-+ \field{sortinithash}{c438b3d5d027251ba63f5ed538d98af5}
- \field{extradate}{3}
- \field{extradatescope}{labelyear}
- \field{labeldatesource}{}
-@@ -168,7 +168,7 @@ my $l15 = q| \entry{L15}{book}{}
- \strng{authorfullhash}{8c77336299b25bdada7bf8038f46722f}
- \field{extraname}{12}
- \field{sortinit}{D}
-- \field{sortinithash}{2ef1bd9a78cc71eb74d7231c635177b8}
-+ \field{sortinithash}{c438b3d5d027251ba63f5ed538d98af5}
- \field{extradate}{4}
- \field{labelnamesource}{author}
- \field{labeltitlesource}{title}
-@@ -201,7 +201,7 @@ my $l16 = q| \entry{L16}{proceedings}{}
- \strng{editorfullhash}{8c77336299b25bdada7bf8038f46722f}
- \field{extraname}{13}
- \field{sortinit}{D}
-- \field{sortinithash}{2ef1bd9a78cc71eb74d7231c635177b8}
-+ \field{sortinithash}{c438b3d5d027251ba63f5ed538d98af5}
- \field{extradate}{7}
- \field{extradatescope}{labelyear}
- \field{labeldatesource}{event}
-@@ -240,7 +240,7 @@ my $l17 = q| \entry{L17}{proceedings}{}
- \strng{editorfullhash}{8c77336299b25bdada7bf8038f46722f}
- \field{extraname}{5}
- \field{sortinit}{D}
-- \field{sortinithash}{2ef1bd9a78cc71eb74d7231c635177b8}
-+ \field{sortinithash}{c438b3d5d027251ba63f5ed538d98af5}
- \field{extradate}{4}
- \field{extradatescope}{labelyear}
- \field{labeldatesource}{}
-@@ -299,7 +299,7 @@ my $l17c = q| \entry{L17}{proceedings}{}
- \strng{editorfullhash}{8c77336299b25bdada7bf8038f46722f}
- \field{extraname}{5}
- \field{sortinit}{D}
-- \field{sortinithash}{2ef1bd9a78cc71eb74d7231c635177b8}
-+ \field{sortinithash}{c438b3d5d027251ba63f5ed538d98af5}
- \field{extradatescope}{labelyear}
- \field{labeldatesource}{orig}
- \field{labelnamesource}{editor}
-@@ -357,7 +357,7 @@ my $l17e = q| \entry{L17}{proceedings}{}
- \strng{editorfullhash}{8c77336299b25bdada7bf8038f46722f}
- \field{extraname}{5}
- \field{sortinit}{D}
-- \field{sortinithash}{2ef1bd9a78cc71eb74d7231c635177b8}
-+ \field{sortinithash}{c438b3d5d027251ba63f5ed538d98af5}
- \field{extradatescope}{labelyear}
- \field{labeldatesource}{event}
- \field{labelnamesource}{editor}
-@@ -479,7 +479,7 @@ my $era1 = q| \entry{era1}{article}{}
- \strng{authorfullhash}{556c8dba145b472e6a8598d506f7cbe2}
- \field{extraname}{9}
- \field{sortinit}{S}
-- \field{sortinithash}{322b1d5276f2f6c1bccdcd15920dbee6}
-+ \field{sortinithash}{c319cff79d99c853d775f88277d4e45f}
- \field{extradatescope}{labelyear}
- \field{labeldatesource}{}
- \field{labelnamesource}{author}
-@@ -512,7 +512,7 @@ my $era2 = q| \entry{era2}{inproceedings}{}
- \strng{authorfullhash}{556c8dba145b472e6a8598d506f7cbe2}
- \field{extraname}{10}
- \field{sortinit}{S}
-- \field{sortinithash}{322b1d5276f2f6c1bccdcd15920dbee6}
-+ \field{sortinithash}{c319cff79d99c853d775f88277d4e45f}
- \field{extradatescope}{labelyear}
- \field{labeldatesource}{}
- \field{labelnamesource}{author}
-@@ -546,7 +546,7 @@ my $era3 = q| \entry{era3}{inproceedings}{}
- \strng{authorfullhash}{556c8dba145b472e6a8598d506f7cbe2}
- \field{extraname}{11}
- \field{sortinit}{S}
-- \field{sortinithash}{322b1d5276f2f6c1bccdcd15920dbee6}
-+ \field{sortinithash}{c319cff79d99c853d775f88277d4e45f}
- \field{extradatescope}{labelyear}
- \field{labeldatesource}{}
- \field{labelnamesource}{author}
-@@ -580,7 +580,7 @@ my $era4 = q| \entry{era4}{inproceedings}{}
- \strng{authorfullhash}{556c8dba145b472e6a8598d506f7cbe2}
- \field{extraname}{6}
- \field{sortinit}{S}
-- \field{sortinithash}{322b1d5276f2f6c1bccdcd15920dbee6}
-+ \field{sortinithash}{c319cff79d99c853d775f88277d4e45f}
- \field{extradatescope}{labelyear}
- \field{labeldatesource}{}
- \field{labelnamesource}{author}
-@@ -622,7 +622,7 @@ my $time1 = q| \entry{time1}{article}{}
- \strng{authorfullhash}{556c8dba145b472e6a8598d506f7cbe2}
- \field{extraname}{2}
- \field{sortinit}{S}
-- \field{sortinithash}{322b1d5276f2f6c1bccdcd15920dbee6}
-+ \field{sortinithash}{c319cff79d99c853d775f88277d4e45f}
- \field{extradatescope}{labelyear}
- \field{labeldatesource}{}
- \field{labelnamesource}{author}
-@@ -671,7 +671,7 @@ my $range1 = q| \entry{range1}{inproceedings}{}
- \strng{authorfullhash}{556c8dba145b472e6a8598d506f7cbe2}
- \field{extraname}{7}
- \field{sortinit}{S}
-- \field{sortinithash}{322b1d5276f2f6c1bccdcd15920dbee6}
-+ \field{sortinithash}{c319cff79d99c853d775f88277d4e45f}
- \field{extradate}{1}
- \field{extradatescope}{labelyear}
- \field{labeldatesource}{}
-@@ -712,7 +712,7 @@ my $range2 = q| \entry{range2}{inproceedings}{}
- \strng{authorfullhash}{556c8dba145b472e6a8598d506f7cbe2}
- \field{extraname}{8}
- \field{sortinit}{S}
-- \field{sortinithash}{322b1d5276f2f6c1bccdcd15920dbee6}
-+ \field{sortinithash}{c319cff79d99c853d775f88277d4e45f}
- \field{extradate}{2}
- \field{extradatescope}{labelyear}
- \field{labeldatesource}{}
-@@ -753,7 +753,7 @@ my $season1 = q| \entry{season1}{inproceedings}{}
- \strng{authorfullhash}{556c8dba145b472e6a8598d506f7cbe2}
- \field{extraname}{1}
- \field{sortinit}{S}
-- \field{sortinithash}{322b1d5276f2f6c1bccdcd15920dbee6}
-+ \field{sortinithash}{c319cff79d99c853d775f88277d4e45f}
- \field{extradatescope}{labelyear}
- \field{labeldatesource}{}
- \field{labelnamesource}{author}
-@@ -785,7 +785,7 @@ my $unspec1 = q| \entry{unspec1}{inproceedings}{}
- \strng{authorfullhash}{556c8dba145b472e6a8598d506f7cbe2}
- \field{extraname}{4}
- \field{sortinit}{S}
-- \field{sortinithash}{322b1d5276f2f6c1bccdcd15920dbee6}
-+ \field{sortinithash}{c319cff79d99c853d775f88277d4e45f}
- \field{extradatescope}{labelyear}
- \field{labeldatesource}{}
- \field{labelnamesource}{author}
-@@ -838,7 +838,7 @@ my $unspec2 = q| \entry{unspec2}{article}{}
- \strng{authorfullhash}{556c8dba145b472e6a8598d506f7cbe2}
- \field{extraname}{3}
- \field{sortinit}{S}
-- \field{sortinithash}{322b1d5276f2f6c1bccdcd15920dbee6}
-+ \field{sortinithash}{c319cff79d99c853d775f88277d4e45f}
- \field{extradatescope}{labelyear}
- \field{labeldatesource}{}
- \field{labelnamesource}{author}
-diff --git a/t/encoding.t b/t/encoding.t
-index a150b4f..36d9955 100644
---- a/t/encoding.t
-+++ b/t/encoding.t
-@@ -52,7 +52,7 @@ my $encode1 = q| \entry{testŠ}{book}{}
- \strng{authorfullhash}{06a47edae2e847800cfd78323a0e6be8}
- \field{labelalpha}{Enc99}
- \field{sortinit}{E}
-- \field{sortinithash}{f615fb9c6fba11c6f962fb3fd599810e}
-+ \field{sortinithash}{c554bd1a0b76ea92b9f105fe36d9c7b0}
- \field{labeldatesource}{year}
- \true{singletitle}
- \field{labelnamesource}{author}
-@@ -82,7 +82,7 @@ my $encode2 = q| \entry{test1}{book}{}
- \strng{authorfullhash}{06a47edae2e847800cfd78323a0e6be8}
- \field{labelalpha}{Enc99}
- \field{sortinit}{E}
-- \field{sortinithash}{f615fb9c6fba11c6f962fb3fd599810e}
-+ \field{sortinithash}{c554bd1a0b76ea92b9f105fe36d9c7b0}
- \field{labeldatesource}{year}
- \true{singletitle}
- \field{labelnamesource}{author}
-@@ -112,7 +112,7 @@ my $encode3 = q| \entry{test1}{book}{}
- \strng{authorfullhash}{06a47edae2e847800cfd78323a0e6be8}
- \field{labelalpha}{Enc99}
- \field{sortinit}{E}
-- \field{sortinithash}{f615fb9c6fba11c6f962fb3fd599810e}
-+ \field{sortinithash}{c554bd1a0b76ea92b9f105fe36d9c7b0}
- \field{labeldatesource}{year}
- \true{singletitle}
- \field{labelnamesource}{author}
-@@ -142,7 +142,7 @@ my $encode5 = q| \entry{test}{book}{}
- \strng{authorfullhash}{06a47edae2e847800cfd78323a0e6be8}
- \field{labelalpha}{Enc99}
- \field{sortinit}{E}
-- \field{sortinithash}{f615fb9c6fba11c6f962fb3fd599810e}
-+ \field{sortinithash}{c554bd1a0b76ea92b9f105fe36d9c7b0}
- \field{labeldatesource}{year}
- \true{singletitle}
- \field{labelnamesource}{author}
-@@ -172,7 +172,7 @@ my $encode6 = q| \entry{test}{book}{}
- \strng{authorfullhash}{06a47edae2e847800cfd78323a0e6be8}
- \field{labelalpha}{Enc99}
- \field{sortinit}{E}
-- \field{sortinithash}{f615fb9c6fba11c6f962fb3fd599810e}
-+ \field{sortinithash}{c554bd1a0b76ea92b9f105fe36d9c7b0}
- \field{labeldatesource}{year}
- \true{singletitle}
- \field{labelnamesource}{author}
-@@ -202,7 +202,7 @@ my $encode7 = q| \entry{test}{book}{}
- \strng{authorfullhash}{06a47edae2e847800cfd78323a0e6be8}
- \field{labelalpha}{Enc99}
- \field{sortinit}{E}
-- \field{sortinithash}{f615fb9c6fba11c6f962fb3fd599810e}
-+ \field{sortinithash}{c554bd1a0b76ea92b9f105fe36d9c7b0}
- \field{labeldatesource}{year}
- \true{singletitle}
- \field{labelnamesource}{author}
-diff --git a/t/names.t b/t/names.t
-index 7228042..b73f2ed 100644
---- a/t/names.t
-+++ b/t/names.t
-@@ -188,7 +188,7 @@ my $l1 = q| \entry{L1}{book}{}
- \strng{authornamehash}{72287a68c1714cb1b9f4ab9e03a88b96}
- \strng{authorfullhash}{72287a68c1714cb1b9f4ab9e03a88b96}
- \field{sortinit}{A}
-- \field{sortinithash}{d77c7cdd82ff690d4c3ef13216f92f0b}
-+ \field{sortinithash}{a3dcedd53b04d1adfd5ac303ecd5e6fa}
- \field{labelnamesource}{author}
- \endentry
- |;
-@@ -208,7 +208,7 @@ my $l2 = q| \entry{L2}{book}{}
- \strng{authornamehash}{2098d59d0f19a2e003ee06c1aa750d57}
- \strng{authorfullhash}{2098d59d0f19a2e003ee06c1aa750d57}
- \field{sortinit}{B}
-- \field{sortinithash}{276475738cc058478c1677046f857703}
-+ \field{sortinithash}{8de16967003c7207dae369d874f1456e}
- \field{labelnamesource}{author}
- \endentry
- |;
-@@ -228,7 +228,7 @@ my $l3 = q| \entry{L3}{book}{}
- \strng{authornamehash}{c8b06fe88bde128b25eb0b3b1cc5837c}
- \strng{authorfullhash}{c8b06fe88bde128b25eb0b3b1cc5837c}
- \field{sortinit}{C}
-- \field{sortinithash}{963e9d84a3da2344e8833203de5aed05}
-+ \field{sortinithash}{4c244ceae61406cdc0cc2ce1cb1ff703}
- \field{labelnamesource}{author}
- \endentry
- |;
-@@ -248,7 +248,7 @@ my $l4 = q| \entry{L4}{book}{}
- \strng{authornamehash}{5ec958b850c0c2de7de7c42c84b9c419}
- \strng{authorfullhash}{5ec958b850c0c2de7de7c42c84b9c419}
- \field{sortinit}{D}
-- \field{sortinithash}{2ef1bd9a78cc71eb74d7231c635177b8}
-+ \field{sortinithash}{c438b3d5d027251ba63f5ed538d98af5}
- \field{labelnamesource}{author}
- \endentry
- |;
-@@ -270,7 +270,7 @@ my $l5 = q| \entry{L5}{book}{}
- \strng{authornamehash}{c6b9d281cc1ff3f35570f76f463d4244}
- \strng{authorfullhash}{c6b9d281cc1ff3f35570f76f463d4244}
- \field{sortinit}{v}
-- \field{sortinithash}{75dd7385c90b2252c3ae853a80ca853b}
-+ \field{sortinithash}{02432525618c08e2b03cac47c19764af}
- \field{labelnamesource}{author}
- \endentry
- |;
-@@ -292,7 +292,7 @@ my $l6 = q| \entry{L6}{book}{}
- \strng{authornamehash}{5fd24d3d1608a310ec205a6b201a5495}
- \strng{authorfullhash}{5fd24d3d1608a310ec205a6b201a5495}
- \field{sortinit}{v}
-- \field{sortinithash}{75dd7385c90b2252c3ae853a80ca853b}
-+ \field{sortinithash}{02432525618c08e2b03cac47c19764af}
- \field{labelnamesource}{author}
- \endentry
- |;
-@@ -314,7 +314,7 @@ my $l7 = q| \entry{L7}{book}{}
- \strng{authornamehash}{98edb0b90251df22b74328d9227eceb7}
- \strng{authorfullhash}{98edb0b90251df22b74328d9227eceb7}
- \field{sortinit}{v}
-- \field{sortinithash}{75dd7385c90b2252c3ae853a80ca853b}
-+ \field{sortinithash}{02432525618c08e2b03cac47c19764af}
- \field{labelnamesource}{author}
- \endentry
- |;
-@@ -336,7 +336,7 @@ my $l8 = q| \entry{L8}{book}{}
- \strng{authornamehash}{1211dc8dbbc191cbcab4da3c3c1fc48a}
- \strng{authorfullhash}{1211dc8dbbc191cbcab4da3c3c1fc48a}
- \field{sortinit}{v}
-- \field{sortinithash}{75dd7385c90b2252c3ae853a80ca853b}
-+ \field{sortinithash}{02432525618c08e2b03cac47c19764af}
- \field{labelnamesource}{author}
- \endentry
- |;
-@@ -356,7 +356,7 @@ my $l9 = q| \entry{L9}{book}{}
- \strng{authornamehash}{bae61a889ab149a6deafe45333204cf0}
- \strng{authorfullhash}{bae61a889ab149a6deafe45333204cf0}
- \field{sortinit}{I}
-- \field{sortinithash}{320bc8fe8101b9376f9f21cd507de0e8}
-+ \field{sortinithash}{9417e9a1288a9371e2691d999083ed39}
- \field{labelnamesource}{author}
- \endentry
- |;
-@@ -379,7 +379,7 @@ my $l10 = q| \entry{L10}{book}{}
- \strng{authornamehash}{37b4325752e394ddfb2fc810f6c88e27}
- \strng{authorfullhash}{37b4325752e394ddfb2fc810f6c88e27}
- \field{sortinit}{J}
-- \field{sortinithash}{fce5f8d0bd05e8d93f3dbe21c78897ca}
-+ \field{sortinithash}{c45040a764d616897e7f5b30174d7b92}
- \field{labelnamesource}{author}
- \endentry
- |;
-@@ -402,7 +402,7 @@ my $l10a = q| \entry{L10a}{book}{}
- \strng{authornamehash}{7bf2c9d8b89a1930ee91bfddcaf20c9c}
- \strng{authorfullhash}{7bf2c9d8b89a1930ee91bfddcaf20c9c}
- \field{sortinit}{P}
-- \field{sortinithash}{8d51b3d5b78d75b54308d706b9bbe285}
-+ \field{sortinithash}{bb5b15f2db90f7aef79bb9e83defefcb}
- \field{labelnamesource}{author}
- \endentry
- |;
-@@ -427,7 +427,7 @@ my $l11 = q| \entry{L11}{book}{}
- \strng{authornamehash}{9f48d231be68c9435fab4faca55a5caf}
- \strng{authorfullhash}{9f48d231be68c9435fab4faca55a5caf}
- \field{sortinit}{v}
-- \field{sortinithash}{75dd7385c90b2252c3ae853a80ca853b}
-+ \field{sortinithash}{02432525618c08e2b03cac47c19764af}
- \field{labelnamesource}{author}
- \endentry
- |;
-@@ -449,7 +449,7 @@ my $l12 = q| \entry{L12}{book}{}
- \strng{authornamehash}{d7ca88c13a8f7ce1c23e920010a31f83}
- \strng{authorfullhash}{d7ca88c13a8f7ce1c23e920010a31f83}
- \field{sortinit}{d}
-- \field{sortinithash}{2ef1bd9a78cc71eb74d7231c635177b8}
-+ \field{sortinithash}{c438b3d5d027251ba63f5ed538d98af5}
- \true{uniqueprimaryauthor}
- \field{labelnamesource}{author}
- \endentry
-@@ -470,7 +470,7 @@ my $l13 = q| \entry{L13}{book}{}
- \strng{authornamehash}{227ac48bb788a658cfaa4eefc71ff0cc}
- \strng{authorfullhash}{227ac48bb788a658cfaa4eefc71ff0cc}
- \field{sortinit}{V}
-- \field{sortinithash}{75dd7385c90b2252c3ae853a80ca853b}
-+ \field{sortinithash}{02432525618c08e2b03cac47c19764af}
- \field{labelnamesource}{author}
- \endentry
- |;
-@@ -490,7 +490,7 @@ my $l14 = q| \entry{L14}{book}{}
- \strng{authornamehash}{779475052c17ed56dc3be900d0dfdf87}
- \strng{authorfullhash}{779475052c17ed56dc3be900d0dfdf87}
- \field{sortinit}{S}
-- \field{sortinithash}{322b1d5276f2f6c1bccdcd15920dbee6}
-+ \field{sortinithash}{c319cff79d99c853d775f88277d4e45f}
- \field{labelnamesource}{author}
- \endentry
- |;
-@@ -513,7 +513,7 @@ my $l15 = q| \entry{L15}{book}{}
- \strng{authorfullhash}{783c636e853e47a854ae034ebe9dde62}
- \field{extraname}{1}
- \field{sortinit}{v}
-- \field{sortinithash}{75dd7385c90b2252c3ae853a80ca853b}
-+ \field{sortinithash}{02432525618c08e2b03cac47c19764af}
- \field{labelnamesource}{author}
- \endentry
- |;
-@@ -536,7 +536,7 @@ my $l16 = q| \entry{L16}{book}{}
- \strng{authorfullhash}{783c636e853e47a854ae034ebe9dde62}
- \field{extraname}{2}
- \field{sortinit}{v}
-- \field{sortinithash}{75dd7385c90b2252c3ae853a80ca853b}
-+ \field{sortinithash}{02432525618c08e2b03cac47c19764af}
- \field{labelnamesource}{author}
- \endentry
- |;
-@@ -557,7 +557,7 @@ my $l17 = q| \entry{L17}{book}{}
- \strng{authorfullhash}{b51f667a3384d92ea5458ba80716bff7}
- \field{extraname}{1}
- \field{sortinit}{L}
-- \field{sortinithash}{2c7981aaabc885868aba60f0c09ee20f}
-+ \field{sortinithash}{dad3efd0836470093a7b4a7bb756eb8c}
- \field{labelnamesource}{author}
- \endentry
- |;
-@@ -578,7 +578,7 @@ my $l18 = q| \entry{L18}{book}{}
- \strng{authorfullhash}{b51f667a3384d92ea5458ba80716bff7}
- \field{extraname}{2}
- \field{sortinit}{L}
-- \field{sortinithash}{2c7981aaabc885868aba60f0c09ee20f}
-+ \field{sortinithash}{dad3efd0836470093a7b4a7bb756eb8c}
- \field{labelnamesource}{author}
- \endentry
- |;
-@@ -598,7 +598,7 @@ my $l19 = q| \entry{L19}{book}{}
- \strng{authornamehash}{83caa52f21f97e572dd3267bdf62978a}
- \strng{authorfullhash}{83caa52f21f97e572dd3267bdf62978a}
- \field{sortinit}{M}
-- \field{sortinithash}{cfd219b90152c06204fab207bc6c7cab}
-+ \field{sortinithash}{2e5c2f51f7fa2d957f3206819bf86dc3}
- \field{labelnamesource}{author}
- \endentry
- |;
-@@ -618,7 +618,7 @@ my $l19a = q| \entry{L19a}{book}{}
- \strng{authornamehash}{0963f6904ccfeaac2770c5882a587001}
- \strng{authorfullhash}{0963f6904ccfeaac2770c5882a587001}
- \field{sortinit}{L}
-- \field{sortinithash}{2c7981aaabc885868aba60f0c09ee20f}
-+ \field{sortinithash}{dad3efd0836470093a7b4a7bb756eb8c}
- \field{labelnamesource}{author}
- \endentry
- |;
-@@ -639,7 +639,7 @@ my $l20 = q| \entry{L20}{book}{}
- \strng{authornamehash}{5f26c2f3b33095d5b005714893f4d698}
- \strng{authorfullhash}{5f26c2f3b33095d5b005714893f4d698}
- \field{sortinit}{F}
-- \field{sortinithash}{669c706c6f1fbf3b5a83d26f1d9e9e72}
-+ \field{sortinithash}{fb0c0faa89eb6abae8213bf60e6799ea}
- \field{labelnamesource}{author}
- \endentry
- |;
-@@ -660,7 +660,7 @@ my $l21 = q| \entry{L21}{book}{}
- \strng{authorfullhash}{4389a3c0dc7da74487b50808ba9436ad}
- \field{extraname}{1}
- \field{sortinit}{S}
-- \field{sortinithash}{322b1d5276f2f6c1bccdcd15920dbee6}
-+ \field{sortinithash}{c319cff79d99c853d775f88277d4e45f}
- \field{labelnamesource}{author}
- \endentry
- |;
-@@ -681,7 +681,7 @@ my $l22u = q| \entry{L22}{book}{}
- \strng{authorfullhash}{e58b861545799d0eaf883402a882126e}
- \field{extraname}{1}
- \field{sortinit}{Š}
-- \field{sortinithash}{322b1d5276f2f6c1bccdcd15920dbee6}
-+ \field{sortinithash}{c319cff79d99c853d775f88277d4e45f}
- \field{labelnamesource}{author}
- \endentry
- |;
-@@ -703,7 +703,7 @@ my $l22 = q| \entry{L22}{book}{}
- \strng{authorfullhash}{e58b861545799d0eaf883402a882126e}
- \field{extraname}{1}
- \field{sortinit}{\v{S}}
-- \field{sortinithash}{322b1d5276f2f6c1bccdcd15920dbee6}
-+ \field{sortinithash}{c319cff79d99c853d775f88277d4e45f}
- \true{uniqueprimaryauthor}
- \field{labelnamesource}{author}
- \endentry
-@@ -726,7 +726,7 @@ my $l23 = q| \entry{L23}{book}{}
- \strng{authorfullhash}{4389a3c0dc7da74487b50808ba9436ad}
- \field{extraname}{3}
- \field{sortinit}{S}
-- \field{sortinithash}{322b1d5276f2f6c1bccdcd15920dbee6}
-+ \field{sortinithash}{c319cff79d99c853d775f88277d4e45f}
- \field{labelnamesource}{author}
- \endentry
- |;
-@@ -747,7 +747,7 @@ my $l24 = q| \entry{L24}{book}{}
- \strng{authorfullhash}{e58b861545799d0eaf883402a882126e}
- \field{extraname}{2}
- \field{sortinit}{Š}
-- \field{sortinithash}{322b1d5276f2f6c1bccdcd15920dbee6}
-+ \field{sortinithash}{c319cff79d99c853d775f88277d4e45f}
- \field{labelnamesource}{author}
- \endentry
- |;
-@@ -765,7 +765,7 @@ my $l25 = q| \entry{L25}{book}{}
- \strng{authornamehash}{d7cd2c5ea0848abc3e90609558b84a45}
- \strng{authorfullhash}{d7cd2c5ea0848abc3e90609558b84a45}
- \field{sortinit}{A}
-- \field{sortinithash}{d77c7cdd82ff690d4c3ef13216f92f0b}
-+ \field{sortinithash}{a3dcedd53b04d1adfd5ac303ecd5e6fa}
- \field{labelnamesource}{author}
- \endentry
- |;
-@@ -783,7 +783,7 @@ my $l26 = q| \entry{L26}{book}{}
- \strng{authornamehash}{8eee1dbafdbd0a4b73157e60f18b4784}
- \strng{authorfullhash}{8eee1dbafdbd0a4b73157e60f18b4784}
- \field{sortinit}{S}
-- \field{sortinithash}{322b1d5276f2f6c1bccdcd15920dbee6}
-+ \field{sortinithash}{c319cff79d99c853d775f88277d4e45f}
- \field{labelnamesource}{author}
- \endentry
- |;
-@@ -791,7 +791,7 @@ my $l26 = q| \entry{L26}{book}{}
- # Malformed anyway but a decent test
- my $l28 = q| \entry{L28}{book}{}
- \field{sortinit}{0}
-- \field{sortinithash}{168ad0c7c5ed09f1d28c6675717b5b03}
-+ \field{sortinithash}{bcf7a1f4afb88b7299f988caccb80d1c}
- \warn{\item Name "Deux et al.,, O." is malformed (consecutive commas): skipping name}
- \endentry
- |;
-@@ -810,7 +810,7 @@ my $l29 = q| \entry{L29}{book}{}
- \strng{authornamehash}{27ad192a3a715aa89152b2a4ee392e8c}
- \strng{authorfullhash}{27ad192a3a715aa89152b2a4ee392e8c}
- \field{sortinit}{U}
-- \field{sortinithash}{36a2444f5238e0dcf4bb59704df6624d}
-+ \field{sortinithash}{77a6935510e008adcf5b555e7b4f0711}
- \field{labelnamesource}{author}
- \endentry
- |;
-@@ -850,7 +850,7 @@ my $l31 = q| \entry{L31}{book}{}
- \strng{translatornamehash}{29c3ff92fff79d09a8b44d2f775de0b1}
- \strng{translatorfullhash}{29c3ff92fff79d09a8b44d2f775de0b1}
- \field{sortinit}{\~{Z}}
-- \field{sortinithash}{156173bd08b075d7295bc3e0f4735a04}
-+ \field{sortinithash}{8f7b480688e809b50b6f6577b16f3db5}
- \true{uniqueprimaryauthor}
- \field{labelnamesource}{author}
- \endentry
-diff --git a/t/options.t b/t/options.t
-index 940a282..c14d694 100644
---- a/t/options.t
-+++ b/t/options.t
-@@ -100,7 +100,7 @@ my $l1 = q| \entry{L1}{book}{}
- \strng{authornamehash}{bd051a2f7a5f377e3a62581b0e0f8577}
- \strng{authorfullhash}{bd051a2f7a5f377e3a62581b0e0f8577}
- \field{sortinit}{D}
-- \field{sortinithash}{2ef1bd9a78cc71eb74d7231c635177b8}
-+ \field{sortinithash}{c438b3d5d027251ba63f5ed538d98af5}
- \field{extradatescope}{labelyear}
- \field{labeldatesource}{}
- \field{labelnamesource}{author}
-@@ -137,7 +137,7 @@ my $l2 = q| \entry{L2}{book}{maxcitenames=3,maxbibnames=3,maxsortnames=3,maxi
- \strng{authornamehash}{19eec87c959944d6d9c72434a42856ba}
- \strng{authorfullhash}{19eec87c959944d6d9c72434a42856ba}
- \field{sortinit}{E}
-- \field{sortinithash}{f615fb9c6fba11c6f962fb3fd599810e}
-+ \field{sortinithash}{c554bd1a0b76ea92b9f105fe36d9c7b0}
- \field{extradatescope}{labelyear}
- \field{labeldatesource}{}
- \field{labelnamesource}{author}
-@@ -169,7 +169,7 @@ my $l3 = q| \entry{L3}{book}{blah=10}
- \strng{authornamehash}{490250da1f3b92580d97563dc96c6c84}
- \strng{authorfullhash}{490250da1f3b92580d97563dc96c6c84}
- \field{sortinit}{B}
-- \field{sortinithash}{276475738cc058478c1677046f857703}
-+ \field{sortinithash}{8de16967003c7207dae369d874f1456e}
- \field{extradatescope}{labelyear}
- \field{labeldatesource}{}
- \field{labelnamesource}{author}
-diff --git a/t/related-entries.t b/t/related-entries.t
-index 53dce64..b38ac79 100644
---- a/t/related-entries.t
-+++ b/t/related-entries.t
-@@ -56,7 +56,7 @@ my $k1 = q| \entry{key1}{article}{}
- \strng{authorfullhash}{a517747c3d12f99244ae598910d979c5}
- \field{extraname}{1}
- \field{sortinit}{1}
-- \field{sortinithash}{2174f786c6195e7fe2ee1c229b416e29}
-+ \field{sortinithash}{50c6687d7fc80f50136d75228e3c59ba}
- \field{extradatescope}{labelyear}
- \field{labeldatesource}{}
- \field{labelnamesource}{author}
-@@ -95,7 +95,7 @@ my $k2 = q| \entry{key2}{inbook}{}
- \strng{authorfullhash}{a517747c3d12f99244ae598910d979c5}
- \field{extraname}{2}
- \field{sortinit}{2}
-- \field{sortinithash}{cbff857e587bcb4635511624d773949e}
-+ \field{sortinithash}{ed39bb39cf854d5250e95b1c1f94f4ed}
- \field{extradatescope}{labelyear}
- \field{labeldatesource}{}
- \field{labelnamesource}{author}
-@@ -243,7 +243,7 @@ my $kck4 = q| \entry{caf8e34be07426ae7127c1b4829983c1}{inbook}{dataonly,useed
-
- my $c1 = q| \entry{c1}{book}{}
- \field{sortinit}{3}
-- \field{sortinithash}{a4b52e5432884761f50fb9571273b93e}
-+ \field{sortinithash}{a37a8ef248a93c322189792c34fc68c9}
- \field{related}{9ab62b5ef34a985438bfdf7ee0102229}
- \endentry
- |;
-@@ -330,7 +330,7 @@ my $un1 = q| \entry{kullback}{book}{}
- \strng{authorfullhash}{34c5bbf9876c37127c3abe4e7d7a7198}
- \field{extraname}{1}
- \field{sortinit}{5}
-- \field{sortinithash}{3c19c3776b658b3558e9e2e4840c01e2}
-+ \field{sortinithash}{5dd416adbafacc8226114bc0202d5fdd}
- \field{extradatescope}{year}
- \field{labelnamesource}{author}
- \field{labeltitlesource}{title}
-@@ -364,7 +364,7 @@ my $un2 = q| \entry{kullback:related}{book}{}
- \strng{authorfullhash}{34c5bbf9876c37127c3abe4e7d7a7198}
- \field{extraname}{2}
- \field{sortinit}{6}
-- \field{sortinithash}{57e57fb8451e7fcfa45d1e069f6d3136}
-+ \field{sortinithash}{7851c86048328b027313775d8fbd2131}
- \field{extradatescope}{year}
- \field{labelnamesource}{author}
- \field{labeltitlesource}{title}
-diff --git a/t/remote-files.t b/t/remote-files.t
-index c747dcd..6f4cf4d 100644
---- a/t/remote-files.t
-+++ b/t/remote-files.t
-@@ -86,7 +86,7 @@ my $cu1 = q| \entry{citeulike:8283461}{article}{}
- \strng{authornamehash}{a700cc0bdce78f5a1f50ff6314ff6f2a}
- \strng{authorfullhash}{094b095bbb7ac93fdd3e2eafdcec0cac}
- \field{sortinit}{M}
-- \field{sortinithash}{cfd219b90152c06204fab207bc6c7cab}
-+ \field{sortinithash}{2e5c2f51f7fa2d957f3206819bf86dc3}
- \field{extradatescope}{labelyear}
- \field{labeldatesource}{year}
- \field{labelnamesource}{author}
-@@ -133,7 +133,7 @@ my $dl1 = q| \entry{AbdelbarH98}{article}{}
- \strng{authornamehash}{bb887c5d0458bfb1f3f7e6afc8d1def4}
- \strng{authorfullhash}{bb887c5d0458bfb1f3f7e6afc8d1def4}
- \field{sortinit}{A}
-- \field{sortinithash}{d77c7cdd82ff690d4c3ef13216f92f0b}
-+ \field{sortinithash}{a3dcedd53b04d1adfd5ac303ecd5e6fa}
- \field{extradatescope}{labelyear}
- \field{labeldatesource}{year}
- \field{labelnamesource}{author}
-diff --git a/t/set-dynamic.t b/t/set-dynamic.t
-index 9ab5fdd..0846f8a 100644
---- a/t/set-dynamic.t
-+++ b/t/set-dynamic.t
-@@ -51,7 +51,7 @@ my $out = $biber->get_output_obj;
- my $string1 = q| \entry{DynSet}{set}{}
- \set{Dynamic1,Dynamic2,Dynamic3}
- \field{sortinit}{1}
-- \field{sortinithash}{2174f786c6195e7fe2ee1c229b416e29}
-+ \field{sortinithash}{50c6687d7fc80f50136d75228e3c59ba}
- \endentry
- |;
-
-@@ -71,7 +71,7 @@ my $string2 = q| \entry{Dynamic1}{book}{}
- \strng{authornamehash}{252caa7921a061ca92087a1a52f15b78}
- \strng{authorfullhash}{252caa7921a061ca92087a1a52f15b78}
- \field{sortinit}{8}
-- \field{sortinithash}{07edf88d4ea82509b9c4b4d13f41c452}
-+ \field{sortinithash}{1b24cab5087933ef0826a7cd3b99e994}
- \field{labeldatesource}{year}
- \field{labelnamesource}{author}
- \field{labeltitlesource}{title}
-@@ -98,7 +98,7 @@ my $string3 = q| \entry{Dynamic2}{book}{}
- \strng{authornamehash}{894a5fe6de820f5dcce84a65581667f4}
- \strng{authorfullhash}{894a5fe6de820f5dcce84a65581667f4}
- \field{sortinit}{9}
-- \field{sortinithash}{1dd72ab054147731c9d824b49aba0534}
-+ \field{sortinithash}{54047ffb55bdefa0694bbd554c1b11a0}
- \field{labeldatesource}{year}
- \field{labelnamesource}{author}
- \field{labeltitlesource}{title}
-@@ -124,7 +124,7 @@ my $string4 = q| \entry{Dynamic3}{book}{}
- \strng{authornamehash}{fc3cc97631ceaecdde2aee6cc60ab42b}
- \strng{authorfullhash}{fc3cc97631ceaecdde2aee6cc60ab42b}
- \field{sortinit}{1}
-- \field{sortinithash}{2174f786c6195e7fe2ee1c229b416e29}
-+ \field{sortinithash}{50c6687d7fc80f50136d75228e3c59ba}
- \field{labeldatesource}{year}
- \field{labelnamesource}{author}
- \field{labeltitlesource}{title}
-@@ -151,7 +151,7 @@ my $string5 = q| \entry{Dynamic3}{book}{}
- \strng{authornamehash}{fc3cc97631ceaecdde2aee6cc60ab42b}
- \strng{authorfullhash}{fc3cc97631ceaecdde2aee6cc60ab42b}
- \field{sortinit}{1}
-- \field{sortinithash}{2174f786c6195e7fe2ee1c229b416e29}
-+ \field{sortinithash}{50c6687d7fc80f50136d75228e3c59ba}
- \field{labeldatesource}{year}
- \field{labelnamesource}{author}
- \field{labeltitlesource}{title}
-diff --git a/t/set-legacy.t b/t/set-legacy.t
-index 4e56991..9d40acb 100644
---- a/t/set-legacy.t
-+++ b/t/set-legacy.t
-@@ -45,7 +45,7 @@ my $out = $biber->get_output_obj;
- my $string1 = q| \entry{Elias1955}{set}{}
- \set{Elias1955a,Elias1955b}
- \field{sortinit}{1}
-- \field{sortinithash}{2174f786c6195e7fe2ee1c229b416e29}
-+ \field{sortinithash}{50c6687d7fc80f50136d75228e3c59ba}
- \endentry
- |;
-
-diff --git a/t/set-static.t b/t/set-static.t
-index 1e45d4d..a6cbe73 100644
---- a/t/set-static.t
-+++ b/t/set-static.t
-@@ -47,7 +47,7 @@ my $out = $biber->get_output_obj;
- my $string1 = q| \entry{Static1}{set}{}
- \set{Static2,Static4,Static3}
- \field{sortinit}{B}
-- \field{sortinithash}{276475738cc058478c1677046f857703}
-+ \field{sortinithash}{8de16967003c7207dae369d874f1456e}
- \field{annotation}{Some notes}
- \endentry
- |;
-@@ -68,7 +68,7 @@ my $string2 = q| \entry{Static2}{book}{}
- \strng{authornamehash}{43874d80d7ce68027102819f16c47df1}
- \strng{authorfullhash}{43874d80d7ce68027102819f16c47df1}
- \field{sortinit}{B}
-- \field{sortinithash}{276475738cc058478c1677046f857703}
-+ \field{sortinithash}{8de16967003c7207dae369d874f1456e}
- \field{labeldatesource}{year}
- \field{labelnamesource}{author}
- \field{labeltitlesource}{title}
-@@ -94,7 +94,7 @@ my $string3 = q| \entry{Static3}{book}{}
- \strng{authornamehash}{22dafa5cd57bb5dd7f3e3bab98fd539c}
- \strng{authorfullhash}{22dafa5cd57bb5dd7f3e3bab98fd539c}
- \field{sortinit}{D}
-- \field{sortinithash}{2ef1bd9a78cc71eb74d7231c635177b8}
-+ \field{sortinithash}{c438b3d5d027251ba63f5ed538d98af5}
- \field{labeldatesource}{year}
- \field{labelnamesource}{author}
- \field{labeltitlesource}{title}
-@@ -119,7 +119,7 @@ my $string4 = q| \entry{Static4}{book}{}
- \strng{authornamehash}{da80091c8cd89e5269bd55af1bd5d2fa}
- \strng{authorfullhash}{da80091c8cd89e5269bd55af1bd5d2fa}
- \field{sortinit}{C}
-- \field{sortinithash}{963e9d84a3da2344e8833203de5aed05}
-+ \field{sortinithash}{4c244ceae61406cdc0cc2ce1cb1ff703}
- \field{labeldatesource}{year}
- \field{labelnamesource}{author}
- \field{labeltitlesource}{title}
-@@ -145,7 +145,7 @@ my $string5 = q| \entry{Static2}{book}{}
- \strng{authornamehash}{43874d80d7ce68027102819f16c47df1}
- \strng{authorfullhash}{43874d80d7ce68027102819f16c47df1}
- \field{sortinit}{1}
-- \field{sortinithash}{2174f786c6195e7fe2ee1c229b416e29}
-+ \field{sortinithash}{50c6687d7fc80f50136d75228e3c59ba}
- \field{labeldatesource}{year}
- \field{labelnamesource}{author}
- \field{labeltitlesource}{title}
-diff --git a/t/skips.t b/t/skips.t
-index 7c80d39..caa835f 100644
---- a/t/skips.t
-+++ b/t/skips.t
-@@ -50,7 +50,7 @@ my $set1 = q| \entry{seta}{set}{}
- \field{labelalpha}{Doe10}
- \field{extraalpha}{1}
- \field{sortinit}{D}
-- \field{sortinithash}{2ef1bd9a78cc71eb74d7231c635177b8}
-+ \field{sortinithash}{c438b3d5d027251ba63f5ed538d98af5}
- \endentry
- |;
-
-@@ -70,7 +70,7 @@ my $set2 = q| \entry{set:membera}{book}{}
- \strng{authornamehash}{bd051a2f7a5f377e3a62581b0e0f8577}
- \strng{authorfullhash}{bd051a2f7a5f377e3a62581b0e0f8577}
- \field{sortinit}{D}
-- \field{sortinithash}{2ef1bd9a78cc71eb74d7231c635177b8}
-+ \field{sortinithash}{c438b3d5d027251ba63f5ed538d98af5}
- \field{labeldatesource}{}
- \field{labelnamesource}{author}
- \field{labeltitlesource}{title}
-@@ -97,7 +97,7 @@ my $set3 = q| \entry{set:memberb}{book}{}
- \strng{authornamehash}{bd051a2f7a5f377e3a62581b0e0f8577}
- \strng{authorfullhash}{bd051a2f7a5f377e3a62581b0e0f8577}
- \field{sortinit}{D}
-- \field{sortinithash}{2ef1bd9a78cc71eb74d7231c635177b8}
-+ \field{sortinithash}{c438b3d5d027251ba63f5ed538d98af5}
- \field{labeldatesource}{}
- \field{labelnamesource}{author}
- \field{labeltitlesource}{title}
-@@ -123,7 +123,7 @@ my $set4 = q| \entry{set:memberc}{book}{}
- \strng{authornamehash}{bd051a2f7a5f377e3a62581b0e0f8577}
- \strng{authorfullhash}{bd051a2f7a5f377e3a62581b0e0f8577}
- \field{sortinit}{D}
-- \field{sortinithash}{2ef1bd9a78cc71eb74d7231c635177b8}
-+ \field{sortinithash}{c438b3d5d027251ba63f5ed538d98af5}
- \field{labeldatesource}{}
- \field{labelnamesource}{author}
- \field{labeltitlesource}{title}
-@@ -150,7 +150,7 @@ my $noset1 = q| \entry{noseta}{book}{}
- \field{extraname}{3}
- \field{labelalpha}{Doe10}
- \field{sortinit}{D}
-- \field{sortinithash}{2ef1bd9a78cc71eb74d7231c635177b8}
-+ \field{sortinithash}{c438b3d5d027251ba63f5ed538d98af5}
- \field{extradate}{2}
- \field{extradatescope}{labelyear}
- \field{labeldatesource}{}
-@@ -180,7 +180,7 @@ my $noset2 = q| \entry{nosetb}{book}{}
- \field{extraname}{4}
- \field{labelalpha}{Doe10}
- \field{sortinit}{D}
-- \field{sortinithash}{2ef1bd9a78cc71eb74d7231c635177b8}
-+ \field{sortinithash}{c438b3d5d027251ba63f5ed538d98af5}
- \field{extradate}{3}
- \field{extradatescope}{labelyear}
- \field{labeldatesource}{}
-@@ -210,7 +210,7 @@ my $noset3 = q| \entry{nosetc}{book}{}
- \field{extraname}{5}
- \field{labelalpha}{Doe10}
- \field{sortinit}{D}
-- \field{sortinithash}{2ef1bd9a78cc71eb74d7231c635177b8}
-+ \field{sortinithash}{c438b3d5d027251ba63f5ed538d98af5}
- \field{extradate}{4}
- \field{extradatescope}{labelyear}
- \field{labeldatesource}{}
-@@ -244,7 +244,7 @@ my $sk4 = q| \entry{skip4}{article}{dataonly}
- \strng{authornamehash}{bd051a2f7a5f377e3a62581b0e0f8577}
- \strng{authorfullhash}{bd051a2f7a5f377e3a62581b0e0f8577}
- \field{sortinit}{D}
-- \field{sortinithash}{2ef1bd9a78cc71eb74d7231c635177b8}
-+ \field{sortinithash}{c438b3d5d027251ba63f5ed538d98af5}
- \field{labeldatesource}{year}
- \field{labelnamesource}{author}
- \field{labeltitlesource}{title}
-diff --git a/t/sort-complex.t b/t/sort-complex.t
-index aa3e564..d52db08 100644
---- a/t/sort-complex.t
-+++ b/t/sort-complex.t
-@@ -123,7 +123,7 @@ my $l4 = q| \entry{L4}{book}{}
- \field{extraname}{2}
- \field{labelalpha}{Doe\textbf{+}95}
- \field{sortinit}{D}
-- \field{sortinithash}{2ef1bd9a78cc71eb74d7231c635177b8}
-+ \field{sortinithash}{c438b3d5d027251ba63f5ed538d98af5}
- \field{extraalpha}{2}
- \field{labelnamesource}{author}
- \field{labeltitlesource}{title}
-@@ -155,7 +155,7 @@ my $l1 = q| \entry{L1}{book}{}
- \field{extraname}{1}
- \field{labelalpha}{Doe95}
- \field{sortinit}{D}
-- \field{sortinithash}{2ef1bd9a78cc71eb74d7231c635177b8}
-+ \field{sortinithash}{c438b3d5d027251ba63f5ed538d98af5}
- \field{extraalpha}{1}
- \field{labelnamesource}{author}
- \field{labeltitlesource}{title}
-@@ -187,7 +187,7 @@ my $l2 = q| \entry{L2}{book}{}
- \field{extraname}{3}
- \field{labelalpha}{Doe95}
- \field{sortinit}{D}
-- \field{sortinithash}{2ef1bd9a78cc71eb74d7231c635177b8}
-+ \field{sortinithash}{c438b3d5d027251ba63f5ed538d98af5}
- \field{extraalpha}{3}
- \field{labelnamesource}{author}
- \field{labeltitlesource}{title}
-@@ -219,7 +219,7 @@ my $l3 = q| \entry{L3}{book}{}
- \field{extraname}{2}
- \field{labelalpha}{Doe95}
- \field{sortinit}{D}
-- \field{sortinithash}{2ef1bd9a78cc71eb74d7231c635177b8}
-+ \field{sortinithash}{c438b3d5d027251ba63f5ed538d98af5}
- \field{extraalpha}{2}
- \field{labelnamesource}{author}
- \field{labeltitlesource}{title}
-@@ -253,7 +253,7 @@ my $l5 = q| \entry{L5}{book}{}
- \field{extraname}{1}
- \field{labelalpha}{Doe\textbf{+}95}
- \field{sortinit}{D}
-- \field{sortinithash}{2ef1bd9a78cc71eb74d7231c635177b8}
-+ \field{sortinithash}{c438b3d5d027251ba63f5ed538d98af5}
- \field{extraalpha}{1}
- \field{labelnamesource}{author}
- \field{labeltitlesource}{title}
-diff --git a/t/tdata/full-bbl.bbl b/t/tdata/full-bbl.bbl
-index 4f168de..07c2fab 100644
---- a/t/tdata/full-bbl.bbl
-+++ b/t/tdata/full-bbl.bbl
-@@ -36,7 +36,7 @@
- \strng{authorfullhash}{bd051a2f7a5f377e3a62581b0e0f8577}
- \field{labelalpha}{\emph{A}}
- \field{sortinit}{A}
-- \field{sortinithash}{d77c7cdd82ff690d4c3ef13216f92f0b}
-+ \field{sortinithash}{a3dcedd53b04d1adfd5ac303ecd5e6fa}
- \true{singletitle}
- \field{labelnamesource}{author}
- \field{labeltitlesource}{title}
-@@ -63,7 +63,7 @@
- \strng{authorfullhash}{bd051a2f7a5f377e3a62581b0e0f8577}
- \field{labelalpha}{\emph{A}}
- \field{sortinit}{A}
-- \field{sortinithash}{d77c7cdd82ff690d4c3ef13216f92f0b}
-+ \field{sortinithash}{a3dcedd53b04d1adfd5ac303ecd5e6fa}
- \true{singletitle}
- \field{labelnamesource}{author}
- \field{labeltitlesource}{title}
-@@ -90,7 +90,7 @@
- \strng{authorfullhash}{bd051a2f7a5f377e3a62581b0e0f8577}
- \field{labelalpha}{\emph{A}}
- \field{sortinit}{D}
-- \field{sortinithash}{2ef1bd9a78cc71eb74d7231c635177b8}
-+ \field{sortinithash}{c438b3d5d027251ba63f5ed538d98af5}
- \true{singletitle}
- \field{labelnamesource}{author}
- \field{labeltitlesource}{title}
-diff --git a/t/tdata/full-bblxml.bblxml b/t/tdata/full-bblxml.bblxml
-index 9eea7d1..a39a787 100644
---- a/t/tdata/full-bblxml.bblxml
-+++ b/t/tdata/full-bblxml.bblxml
-@@ -47,7 +47,7 @@
- <bbl:field name="authorbibnamehash">860705eb8ffac6e40507746c7ede79ca</bbl:field>
- <bbl:field name="labelalpha">Aks\textbf{+}06</bbl:field>
- <bbl:field name="sortinit">A</bbl:field>
-- <bbl:field name="sortinithash">d77c7cdd82ff690d4c3ef13216f92f0b</bbl:field>
-+ <bbl:field name="sortinithash">a3dcedd53b04d1adfd5ac303ecd5e6fa</bbl:field>
- <bbl:field name="labelnamesource">author</bbl:field>
- <bbl:field name="labeltitlesource">title</bbl:field>
- <bbl:field name="indextitle">Effect of immobilization on catalytic characteristics</bbl:field>
-@@ -79,7 +79,7 @@
- <bbl:field name="authorbibnamehash">9717d2d959a4b18727868ca7928c34b4</bbl:field>
- <bbl:field name="labelalpha">Ang02</bbl:field>
- <bbl:field name="sortinit">A</bbl:field>
-- <bbl:field name="sortinithash">d77c7cdd82ff690d4c3ef13216f92f0b</bbl:field>
-+ <bbl:field name="sortinithash">a3dcedd53b04d1adfd5ac303ecd5e6fa</bbl:field>
- <bbl:field name="labelnamesource">author</bbl:field>
- <bbl:field name="labeltitlesource">shorttitle</bbl:field>
- <bbl:field name="annotation">A German article in a French journal. Apart from that, a typical article entry. Note the indextitle field</bbl:field>
-@@ -109,7 +109,7 @@
- </bbl:set>
- <bbl:field name="labelalpha">Gla61</bbl:field>
- <bbl:field name="sortinit">G</bbl:field>
-- <bbl:field name="sortinithash">5e8d2bf9d38de41b1528bd307546008f</bbl:field>
-+ <bbl:field name="sortinithash">62eb2aa29549e4fdbd3cb154ec5711cb</bbl:field>
- <bbl:field name="annotation">A set entry with three members discussing the standard model of particle physics.</bbl:field>
- </bbl:entry>
- <bbl:entry key="stdmodel:glashow" type="article">
-@@ -129,7 +129,7 @@
- <bbl:field name="authorfullhash">eb3f242602109f5bdbeb41fdd990fcc0</bbl:field>
- <bbl:field name="authorbibnamehash">eb3f242602109f5bdbeb41fdd990fcc0</bbl:field>
- <bbl:field name="sortinit">G</bbl:field>
-- <bbl:field name="sortinithash">5e8d2bf9d38de41b1528bd307546008f</bbl:field>
-+ <bbl:field name="sortinithash">62eb2aa29549e4fdbd3cb154ec5711cb</bbl:field>
- <bbl:field name="labelnamesource">author</bbl:field>
- <bbl:field name="labeltitlesource">title</bbl:field>
- <bbl:field name="journaltitle">Nucl. Phys.</bbl:field>
-@@ -168,7 +168,7 @@
- <bbl:field name="extraname">1</bbl:field>
- <bbl:field name="labelalpha">Knu86</bbl:field>
- <bbl:field name="sortinit">K</bbl:field>
-- <bbl:field name="sortinithash">9fd838a31ba64d981e8f44562bd33f89</bbl:field>
-+ <bbl:field name="sortinithash">d3edc18d54b9438a72c24c925bfb38f4</bbl:field>
- <bbl:field name="extraalpha">1</bbl:field>
- <bbl:field name="labelnamesource">author</bbl:field>
- <bbl:field name="labeltitlesource">shorttitle</bbl:field>
-@@ -207,7 +207,7 @@
- <bbl:field name="extraname">2</bbl:field>
- <bbl:field name="labelalpha">Knu86</bbl:field>
- <bbl:field name="sortinit">K</bbl:field>
-- <bbl:field name="sortinithash">9fd838a31ba64d981e8f44562bd33f89</bbl:field>
-+ <bbl:field name="sortinithash">d3edc18d54b9438a72c24c925bfb38f4</bbl:field>
- <bbl:field name="extraalpha">2</bbl:field>
- <bbl:field name="labelnamesource">author</bbl:field>
- <bbl:field name="labeltitlesource">shorttitle</bbl:field>
-@@ -236,7 +236,7 @@
- <bbl:field name="authorbibnamehash">d52f05e0199eae563725b4165f4b2520</bbl:field>
- <bbl:field name="labelalpha">Ree58</bbl:field>
- <bbl:field name="sortinit">R</bbl:field>
-- <bbl:field name="sortinithash">da6b42bd3ab22fee61abed031ee405f7</bbl:field>
-+ <bbl:field name="sortinithash">b9c68a358aea118dfa887b6e902414a7</bbl:field>
- <bbl:field name="labelnamesource">author</bbl:field>
- <bbl:field name="labeltitlesource">title</bbl:field>
- <bbl:field name="annotation">An article entry with a series and a volume field. Note the format of the series. If the value of the series field is an integer, this number is printed as an ordinal and the string *series is appended automatically</bbl:field>
-@@ -286,7 +286,7 @@
- <bbl:field name="editorfullhash">d0ec890e59163c24c111a08d2a4be982</bbl:field>
- <bbl:field name="editorbibnamehash">d0ec890e59163c24c111a08d2a4be982</bbl:field>
- <bbl:field name="sortinit">S</bbl:field>
-- <bbl:field name="sortinithash">322b1d5276f2f6c1bccdcd15920dbee6</bbl:field>
-+ <bbl:field name="sortinithash">c319cff79d99c853d775f88277d4e45f</bbl:field>
- <bbl:field name="labelnamesource">author</bbl:field>
- <bbl:field name="labeltitlesource">title</bbl:field>
- <bbl:field name="booksubtitle">Relativistic groups and analyticity</bbl:field>
-@@ -317,7 +317,7 @@
- <bbl:field name="authorbibnamehash">93f17724cbd884231ef39a73755ef5bb</bbl:field>
- <bbl:field name="labelalpha">Sho91</bbl:field>
- <bbl:field name="sortinit">S</bbl:field>
-- <bbl:field name="sortinithash">322b1d5276f2f6c1bccdcd15920dbee6</bbl:field>
-+ <bbl:field name="sortinithash">c319cff79d99c853d775f88277d4e45f</bbl:field>
- <bbl:field name="labelnamesource">author</bbl:field>
- <bbl:field name="labeltitlesource">title</bbl:field>
- <bbl:field name="annotation">An article entry with series, volume, and number fields. Note the format of the series which is a localization key</bbl:field>
-@@ -353,7 +353,7 @@
- <bbl:field name="authorfullhash">15e144c72b0b9d10db00ddc6d37a19e6</bbl:field>
- <bbl:field name="authorbibnamehash">15e144c72b0b9d10db00ddc6d37a19e6</bbl:field>
- <bbl:field name="sortinit">W</bbl:field>
-- <bbl:field name="sortinithash">ecb89ff85896a47dc313960773ac311d</bbl:field>
-+ <bbl:field name="sortinithash">1af34bd8c148ffb32de1494636b49713</bbl:field>
- <bbl:field name="labelnamesource">author</bbl:field>
- <bbl:field name="labeltitlesource">title</bbl:field>
- <bbl:field name="journaltitle">Phys. Rev. Lett.</bbl:field>
-@@ -411,7 +411,7 @@
- <bbl:field name="authorbibnamehash">860705eb8ffac6e40507746c7ede79ca</bbl:field>
- <bbl:field name="labelalpha">Aks\textbf{+}06</bbl:field>
- <bbl:field name="sortinit">A</bbl:field>
-- <bbl:field name="sortinithash">d77c7cdd82ff690d4c3ef13216f92f0b</bbl:field>
-+ <bbl:field name="sortinithash">a3dcedd53b04d1adfd5ac303ecd5e6fa</bbl:field>
- <bbl:field name="labelnamesource">author</bbl:field>
- <bbl:field name="labeltitlesource">title</bbl:field>
- <bbl:field name="indextitle">Effect of immobilization on catalytic characteristics</bbl:field>
-@@ -443,7 +443,7 @@
- <bbl:field name="authorbibnamehash">9717d2d959a4b18727868ca7928c34b4</bbl:field>
- <bbl:field name="labelalpha">Ang02</bbl:field>
- <bbl:field name="sortinit">A</bbl:field>
-- <bbl:field name="sortinithash">d77c7cdd82ff690d4c3ef13216f92f0b</bbl:field>
-+ <bbl:field name="sortinithash">a3dcedd53b04d1adfd5ac303ecd5e6fa</bbl:field>
- <bbl:field name="labelnamesource">author</bbl:field>
- <bbl:field name="labeltitlesource">shorttitle</bbl:field>
- <bbl:field name="annotation">A German article in a French journal. Apart from that, a typical article entry. Note the indextitle field</bbl:field>
-@@ -473,7 +473,7 @@
- </bbl:set>
- <bbl:field name="labelalpha">Gla61</bbl:field>
- <bbl:field name="sortinit">G</bbl:field>
-- <bbl:field name="sortinithash">5e8d2bf9d38de41b1528bd307546008f</bbl:field>
-+ <bbl:field name="sortinithash">62eb2aa29549e4fdbd3cb154ec5711cb</bbl:field>
- <bbl:field name="annotation">A set entry with three members discussing the standard model of particle physics.</bbl:field>
- </bbl:entry>
- <bbl:entry key="stdmodel:glashow" type="article">
-@@ -493,7 +493,7 @@
- <bbl:field name="authorfullhash">eb3f242602109f5bdbeb41fdd990fcc0</bbl:field>
- <bbl:field name="authorbibnamehash">eb3f242602109f5bdbeb41fdd990fcc0</bbl:field>
- <bbl:field name="sortinit">G</bbl:field>
-- <bbl:field name="sortinithash">5e8d2bf9d38de41b1528bd307546008f</bbl:field>
-+ <bbl:field name="sortinithash">62eb2aa29549e4fdbd3cb154ec5711cb</bbl:field>
- <bbl:field name="labelnamesource">author</bbl:field>
- <bbl:field name="labeltitlesource">title</bbl:field>
- <bbl:field name="journaltitle">Nucl. Phys.</bbl:field>
-@@ -532,7 +532,7 @@
- <bbl:field name="extraname">1</bbl:field>
- <bbl:field name="labelalpha">Knu86</bbl:field>
- <bbl:field name="sortinit">K</bbl:field>
-- <bbl:field name="sortinithash">9fd838a31ba64d981e8f44562bd33f89</bbl:field>
-+ <bbl:field name="sortinithash">d3edc18d54b9438a72c24c925bfb38f4</bbl:field>
- <bbl:field name="extraalpha">1</bbl:field>
- <bbl:field name="labelnamesource">author</bbl:field>
- <bbl:field name="labeltitlesource">shorttitle</bbl:field>
-@@ -571,7 +571,7 @@
- <bbl:field name="extraname">2</bbl:field>
- <bbl:field name="labelalpha">Knu86</bbl:field>
- <bbl:field name="sortinit">K</bbl:field>
-- <bbl:field name="sortinithash">9fd838a31ba64d981e8f44562bd33f89</bbl:field>
-+ <bbl:field name="sortinithash">d3edc18d54b9438a72c24c925bfb38f4</bbl:field>
- <bbl:field name="extraalpha">2</bbl:field>
- <bbl:field name="labelnamesource">author</bbl:field>
- <bbl:field name="labeltitlesource">shorttitle</bbl:field>
-@@ -600,7 +600,7 @@
- <bbl:field name="authorbibnamehash">d52f05e0199eae563725b4165f4b2520</bbl:field>
- <bbl:field name="labelalpha">Ree58</bbl:field>
- <bbl:field name="sortinit">R</bbl:field>
-- <bbl:field name="sortinithash">da6b42bd3ab22fee61abed031ee405f7</bbl:field>
-+ <bbl:field name="sortinithash">b9c68a358aea118dfa887b6e902414a7</bbl:field>
- <bbl:field name="labelnamesource">author</bbl:field>
- <bbl:field name="labeltitlesource">title</bbl:field>
- <bbl:field name="annotation">An article entry with a series and a volume field. Note the format of the series. If the value of the series field is an integer, this number is printed as an ordinal and the string *series is appended automatically</bbl:field>
-@@ -650,7 +650,7 @@
- <bbl:field name="editorfullhash">d0ec890e59163c24c111a08d2a4be982</bbl:field>
- <bbl:field name="editorbibnamehash">d0ec890e59163c24c111a08d2a4be982</bbl:field>
- <bbl:field name="sortinit">S</bbl:field>
-- <bbl:field name="sortinithash">322b1d5276f2f6c1bccdcd15920dbee6</bbl:field>
-+ <bbl:field name="sortinithash">c319cff79d99c853d775f88277d4e45f</bbl:field>
- <bbl:field name="labelnamesource">author</bbl:field>
- <bbl:field name="labeltitlesource">title</bbl:field>
- <bbl:field name="booksubtitle">Relativistic groups and analyticity</bbl:field>
-@@ -681,7 +681,7 @@
- <bbl:field name="authorbibnamehash">93f17724cbd884231ef39a73755ef5bb</bbl:field>
- <bbl:field name="labelalpha">Sho91</bbl:field>
- <bbl:field name="sortinit">S</bbl:field>
-- <bbl:field name="sortinithash">322b1d5276f2f6c1bccdcd15920dbee6</bbl:field>
-+ <bbl:field name="sortinithash">c319cff79d99c853d775f88277d4e45f</bbl:field>
- <bbl:field name="labelnamesource">author</bbl:field>
- <bbl:field name="labeltitlesource">title</bbl:field>
- <bbl:field name="annotation">An article entry with series, volume, and number fields. Note the format of the series which is a localization key</bbl:field>
-@@ -717,7 +717,7 @@
- <bbl:field name="authorfullhash">15e144c72b0b9d10db00ddc6d37a19e6</bbl:field>
- <bbl:field name="authorbibnamehash">15e144c72b0b9d10db00ddc6d37a19e6</bbl:field>
- <bbl:field name="sortinit">W</bbl:field>
-- <bbl:field name="sortinithash">ecb89ff85896a47dc313960773ac311d</bbl:field>
-+ <bbl:field name="sortinithash">1af34bd8c148ffb32de1494636b49713</bbl:field>
- <bbl:field name="labelnamesource">author</bbl:field>
- <bbl:field name="labeltitlesource">title</bbl:field>
- <bbl:field name="journaltitle">Phys. Rev. Lett.</bbl:field>
-diff --git a/t/tdata/remote-files.bcf b/t/tdata/remote-files.bcf
-index c2d784b..a2a1842 100644
---- a/t/tdata/remote-files.bcf
-+++ b/t/tdata/remote-files.bcf
-@@ -1853,12 +1853,12 @@
- <bcf:datasource type="file" datatype="bibtex">http://www.citeulike.org/bibtex/group/8082</bcf:datasource>
- <bcf:datasource type="file" datatype="bibtex">http://people.cs.uu.nl/hansb/graphs-bib/definitions.bib</bcf:datasource>
- <bcf:datasource type="file" datatype="bibtex">http://people.cs.uu.nl/hansb/graphs-bib/papers.bib</bcf:datasource>
-- <bcf:datasource type="file" datatype="bibtex">https://api.zotero.org/groups/9097/items/II22KQ7D?format=bibtex&amp;limit=1</bcf:datasource>
-+ <bcf:datasource type="file" datatype="bibtex">https://api.zotero.org/groups/9097/items/8VITAT46?format=bibtex&amp;limit=1</bcf:datasource>
- </bcf:bibdata>
- <bcf:section number="0">
- <bcf:citekey order="1">citeulike:8283461</bcf:citekey>
- <bcf:citekey order="2">AbdelbarH98</bcf:citekey>
-- <bcf:citekey order="3">merleau-ponty_philosophe_2010</bcf:citekey>
-+ <bcf:citekey order="3">crossley_politics_1994</bcf:citekey>
- </bcf:section>
- <!-- SORTING TEMPLATES -->
- <bcf:sortingtemplate name="nty">
-diff --git a/t/uniqueness-nameparts.t b/t/uniqueness-nameparts.t
-index beb2e39..1fb65a8 100644
---- a/t/uniqueness-nameparts.t
-+++ b/t/uniqueness-nameparts.t
-@@ -81,7 +81,7 @@ my $un1 = q| \entry{un1}{article}{}
- \strng{authorfullhash}{329d8f9192ea3349d700160c9ddb505d}
- \field{labelalpha}{SmiJohSim}
- \field{sortinit}{S}
-- \field{sortinithash}{322b1d5276f2f6c1bccdcd15920dbee6}
-+ \field{sortinithash}{c319cff79d99c853d775f88277d4e45f}
- \field{labelnamesource}{author}
- \endentry
- |;
-@@ -106,7 +106,7 @@ my $un2 = q| \entry{un2}{article}{}
- \strng{authorfullhash}{7551114aede4ef69e4b3683039801706}
- \field{labelalpha}{SmiJohAla}
- \field{sortinit}{S}
-- \field{sortinithash}{322b1d5276f2f6c1bccdcd15920dbee6}
-+ \field{sortinithash}{c319cff79d99c853d775f88277d4e45f}
- \field{labelnamesource}{author}
- \endentry
- |;
-@@ -131,7 +131,7 @@ my $un3 = q| \entry{un3}{article}{}
- \strng{authorfullhash}{401aebda288799a7c757526242d8c9fc}
- \field{labelalpha}{SmiJohArt}
- \field{sortinit}{S}
-- \field{sortinithash}{322b1d5276f2f6c1bccdcd15920dbee6}
-+ \field{sortinithash}{c319cff79d99c853d775f88277d4e45f}
- \field{labelnamesource}{author}
- \endentry
- |;
-@@ -156,7 +156,7 @@ my $un4 = q| \entry{un4}{article}{}
- \strng{authorfullhash}{f6038a264619efefd49c7daac56424ca}
- \field{labelalpha}{SmiAlaSim}
- \field{sortinit}{S}
-- \field{sortinithash}{322b1d5276f2f6c1bccdcd15920dbee6}
-+ \field{sortinithash}{c319cff79d99c853d775f88277d4e45f}
- \field{labelnamesource}{author}
- \endentry
- |;
-@@ -181,7 +181,7 @@ my $un1a = q| \entry{un1}{article}{}
- \strng{authorfullhash}{329d8f9192ea3349d700160c9ddb505d}
- \field{labelalpha}{SmiJohSim}
- \field{sortinit}{S}
-- \field{sortinithash}{322b1d5276f2f6c1bccdcd15920dbee6}
-+ \field{sortinithash}{c319cff79d99c853d775f88277d4e45f}
- \field{labelnamesource}{author}
- \endentry
- |;
-@@ -206,7 +206,7 @@ my $un2a = q| \entry{un2}{article}{}
- \strng{authorfullhash}{7551114aede4ef69e4b3683039801706}
- \field{labelalpha}{SmiJohAla}
- \field{sortinit}{S}
-- \field{sortinithash}{322b1d5276f2f6c1bccdcd15920dbee6}
-+ \field{sortinithash}{c319cff79d99c853d775f88277d4e45f}
- \field{labelnamesource}{author}
- \endentry
- |;
-@@ -231,7 +231,7 @@ my $un3a = q| \entry{un3}{article}{}
- \strng{authorfullhash}{401aebda288799a7c757526242d8c9fc}
- \field{labelalpha}{SmiJohArt}
- \field{sortinit}{S}
-- \field{sortinithash}{322b1d5276f2f6c1bccdcd15920dbee6}
-+ \field{sortinithash}{c319cff79d99c853d775f88277d4e45f}
- \field{labelnamesource}{author}
- \endentry
- |;
-@@ -257,7 +257,7 @@ my $un4a = q| \entry{un4}{article}{}
- \strng{authorfullhash}{f6038a264619efefd49c7daac56424ca}
- \field{labelalpha}{SmiAlaSim}
- \field{sortinit}{S}
-- \field{sortinithash}{322b1d5276f2f6c1bccdcd15920dbee6}
-+ \field{sortinithash}{c319cff79d99c853d775f88277d4e45f}
- \field{labelnamesource}{author}
- \endentry
- |;
-@@ -285,7 +285,7 @@ my $un1b = q| \entry{un1}{article}{}
- \field{extraname}{5}
- \field{labelalpha}{SmiJohSim}
- \field{sortinit}{S}
-- \field{sortinithash}{322b1d5276f2f6c1bccdcd15920dbee6}
-+ \field{sortinithash}{c319cff79d99c853d775f88277d4e45f}
- \field{extradate}{5}
- \field{labelnamesource}{author}
- \endentry
-@@ -311,7 +311,7 @@ my $un2b = q| \entry{un2}{article}{}
- \strng{authorfullhash}{7551114aede4ef69e4b3683039801706}
- \field{labelalpha}{SmiJohAla}
- \field{sortinit}{S}
-- \field{sortinithash}{322b1d5276f2f6c1bccdcd15920dbee6}
-+ \field{sortinithash}{c319cff79d99c853d775f88277d4e45f}
- \field{labelnamesource}{author}
- \endentry
- |;
-@@ -336,7 +336,7 @@ my $un3b = q| \entry{un3}{article}{}
- \strng{authorfullhash}{401aebda288799a7c757526242d8c9fc}
- \field{labelalpha}{SmiJohArt}
- \field{sortinit}{S}
-- \field{sortinithash}{322b1d5276f2f6c1bccdcd15920dbee6}
-+ \field{sortinithash}{c319cff79d99c853d775f88277d4e45f}
- \field{labelnamesource}{author}
- \endentry
- |;
-@@ -364,7 +364,7 @@ my $un4b = q| \entry{un4}{article}{}
- \field{extraname}{1}
- \field{labelalpha}{SmiAlaSim}
- \field{sortinit}{S}
-- \field{sortinithash}{322b1d5276f2f6c1bccdcd15920dbee6}
-+ \field{sortinithash}{c319cff79d99c853d775f88277d4e45f}
- \field{extradate}{1}
- \field{labelnamesource}{author}
- \endentry
-@@ -393,7 +393,7 @@ my $un5 = q| \entry{un5}{article}{uniquenametemplatename=test3}
- \field{extraname}{2}
- \field{labelalpha}{SmiArtSim}
- \field{sortinit}{S}
-- \field{sortinithash}{322b1d5276f2f6c1bccdcd15920dbee6}
-+ \field{sortinithash}{c319cff79d99c853d775f88277d4e45f}
- \field{extradate}{2}
- \field{labelnamesource}{author}
- \endentry
-@@ -422,7 +422,7 @@ my $un6 = q| \entry{un6}{article}{}
- \field{extraname}{3}
- \field{labelalpha}{SmiArtSmy}
- \field{sortinit}{S}
-- \field{sortinithash}{322b1d5276f2f6c1bccdcd15920dbee6}
-+ \field{sortinithash}{c319cff79d99c853d775f88277d4e45f}
- \field{extradate}{3}
- \field{labelnamesource}{author}
- \\endentry
-@@ -451,7 +451,7 @@ my $un7 = q| \entry{un7}{article}{}
- \field{extraname}{4}
- \field{labelalpha}{SmiArtSme}
- \field{sortinit}{S}
-- \field{sortinithash}{322b1d5276f2f6c1bccdcd15920dbee6}
-+ \field{sortinithash}{c319cff79d99c853d775f88277d4e45f}
- \field{extradate}{4}
- \field{labelnamesource}{author}
- \endentry
-diff --git a/t/xdata.t b/t/xdata.t
-index 7411b1d..73dcb8b 100644
---- a/t/xdata.t
-+++ b/t/xdata.t
-@@ -75,7 +75,7 @@ my $xd1 = q| \entry{xd1}{book}{}
- \strng{authorfullhash}{51db4bfd331cba22959ce2d224c517cd}
- \field{extraname}{2}
- \field{sortinit}{E}
-- \field{sortinithash}{f615fb9c6fba11c6f962fb3fd599810e}
-+ \field{sortinithash}{c554bd1a0b76ea92b9f105fe36d9c7b0}
- \field{extradatescope}{labelyear}
- \field{labeldatesource}{}
- \field{labelnamesource}{author}
-@@ -107,7 +107,7 @@ my $xd2 = q| \entry{xd2}{book}{}
- \strng{authornamehash}{68539e0ce4922cc4957c6cabf35e6fc8}
- \strng{authorfullhash}{68539e0ce4922cc4957c6cabf35e6fc8}
- \field{sortinit}{P}
-- \field{sortinithash}{8d51b3d5b78d75b54308d706b9bbe285}
-+ \field{sortinithash}{bb5b15f2db90f7aef79bb9e83defefcb}
- \field{extradatescope}{labelyear}
- \field{labeldatesource}{}
- \field{labelnamesource}{author}
diff --git a/gnu/packages/patches/binutils-2.37-file-descriptor-leak.patch b/gnu/packages/patches/binutils-2.37-file-descriptor-leak.patch
new file mode 100644
index 0000000000..1fd3d3d9b7
--- /dev/null
+++ b/gnu/packages/patches/binutils-2.37-file-descriptor-leak.patch
@@ -0,0 +1,231 @@
+From 1c611b40e6bfc8029bff7696814330b5bc0ee5c0 Mon Sep 17 00:00:00 2001
+From: "H.J. Lu" <hjl.tools@gmail.com>
+Date: Mon, 26 Jul 2021 05:59:55 -0700
+Subject: [PATCH] bfd: Close the file descriptor if there is no archive fd
+
+Close the file descriptor if there is no archive plugin file descriptor
+to avoid running out of file descriptors on thin archives with many
+archive members.
+
+bfd/
+
+ PR ld/28138
+ * plugin.c (bfd_plugin_close_file_descriptor): Close the file
+ descriptor there is no archive plugin file descriptor.
+
+ld/
+
+ PR ld/28138
+ * testsuite/ld-plugin/lto.exp: Run tmpdir/pr28138 only for
+ native build.
+
+ PR ld/28138
+ * testsuite/ld-plugin/lto.exp: Run ld/28138 tests.
+ * testsuite/ld-plugin/pr28138.c: New file.
+ * testsuite/ld-plugin/pr28138-1.c: Likewise.
+ * testsuite/ld-plugin/pr28138-2.c: Likewise.
+ * testsuite/ld-plugin/pr28138-3.c: Likewise.
+ * testsuite/ld-plugin/pr28138-4.c: Likewise.
+ * testsuite/ld-plugin/pr28138-5.c: Likewise.
+ * testsuite/ld-plugin/pr28138-6.c: Likewise.
+ * testsuite/ld-plugin/pr28138-7.c: Likewise.
+
+(cherry picked from commit 5a98fb7513b559e20dfebdbaa2a471afda3b4742)
+(cherry picked from commit 7dc37e1e1209c80e0bab784df6b6bac335e836f2)
+---
+ bfd/plugin.c | 8 +++++++
+ ld/testsuite/ld-plugin/lto.exp | 34 ++++++++++++++++++++++++++++++
+ ld/testsuite/ld-plugin/pr28138-1.c | 6 ++++++
+ ld/testsuite/ld-plugin/pr28138-2.c | 6 ++++++
+ ld/testsuite/ld-plugin/pr28138-3.c | 6 ++++++
+ ld/testsuite/ld-plugin/pr28138-4.c | 6 ++++++
+ ld/testsuite/ld-plugin/pr28138-5.c | 6 ++++++
+ ld/testsuite/ld-plugin/pr28138-6.c | 6 ++++++
+ ld/testsuite/ld-plugin/pr28138-7.c | 6 ++++++
+ ld/testsuite/ld-plugin/pr28138.c | 20 ++++++++++++++++++
+ 10 files changed, 104 insertions(+)
+ create mode 100644 ld/testsuite/ld-plugin/pr28138-1.c
+ create mode 100644 ld/testsuite/ld-plugin/pr28138-2.c
+ create mode 100644 ld/testsuite/ld-plugin/pr28138-3.c
+ create mode 100644 ld/testsuite/ld-plugin/pr28138-4.c
+ create mode 100644 ld/testsuite/ld-plugin/pr28138-5.c
+ create mode 100644 ld/testsuite/ld-plugin/pr28138-6.c
+ create mode 100644 ld/testsuite/ld-plugin/pr28138-7.c
+ create mode 100644 ld/testsuite/ld-plugin/pr28138.c
+
+diff --git a/bfd/plugin.c b/bfd/plugin.c
+index 6cfa2b66470..3bab8febe88 100644
+--- a/bfd/plugin.c
++++ b/bfd/plugin.c
+@@ -291,6 +291,14 @@ bfd_plugin_close_file_descriptor (bfd *abfd, int fd)
+ && !bfd_is_thin_archive (abfd->my_archive))
+ abfd = abfd->my_archive;
+
++ /* Close the file descriptor if there is no archive plugin file
++ descriptor. */
++ if (abfd->archive_plugin_fd == -1)
++ {
++ close (fd);
++ return;
++ }
++
+ abfd->archive_plugin_fd_open_count--;
+ /* Dup the archive plugin file descriptor for later use, which
+ will be closed by _bfd_archive_close_and_cleanup. */
+diff --git a/ld/testsuite/ld-plugin/lto.exp b/ld/testsuite/ld-plugin/lto.exp
+index def69e43ab3..999d911ce6a 100644
+--- a/ld/testsuite/ld-plugin/lto.exp
++++ b/ld/testsuite/ld-plugin/lto.exp
+@@ -687,6 +687,40 @@ if { [is_elf_format] && [check_lto_shared_available] } {
+ }
+ }
+
++run_cc_link_tests [list \
++ [list \
++ "Build pr28138.a" \
++ "-T" "" \
++ {pr28138-1.c pr28138-2.c pr28138-3.c pr28138-4.c pr28138-5.c \
++ pr28138-6.c pr28138-7.c} {} "pr28138.a" \
++ ] \
++ [list \
++ "Build pr28138.o" \
++ "" "" \
++ {pr28138.c} {} \
++ ] \
++]
++
++set exec_output [run_host_cmd "sh" \
++ "-c \"ulimit -n 20; \
++ $CC -Btmpdir/ld -o tmpdir/pr28138 \
++ tmpdir/pr28138.o tmpdir/pr28138.a\""]
++set exec_output [prune_warnings $exec_output]
++if [string match "" $exec_output] then {
++ if { [isnative] } {
++ set exec_output [run_host_cmd "tmpdir/pr28138" ""]
++ if [string match "PASS" $exec_output] then {
++ pass "PR ld/28138"
++ } else {
++ fail "PR ld/28138"
++ }
++ } else {
++ pass "PR ld/28138"
++ }
++} else {
++ fail "PR ld/28138"
++}
++
+ set testname "Build liblto-11.a"
+ remote_file host delete "tmpdir/liblto-11.a"
+ set catch_output [run_host_cmd "$ar" "rc $plug_opt tmpdir/liblto-11.a tmpdir/lto-11a.o tmpdir/lto-11b.o tmpdir/lto-11c.o"]
+diff --git a/ld/testsuite/ld-plugin/pr28138-1.c b/ld/testsuite/ld-plugin/pr28138-1.c
+new file mode 100644
+index 00000000000..51d119e1642
+--- /dev/null
++++ b/ld/testsuite/ld-plugin/pr28138-1.c
+@@ -0,0 +1,6 @@
++extern int a0(void);
++int
++a1(void)
++{
++ return 1 + a0();
++}
+diff --git a/ld/testsuite/ld-plugin/pr28138-2.c b/ld/testsuite/ld-plugin/pr28138-2.c
+new file mode 100644
+index 00000000000..1120cd797e9
+--- /dev/null
++++ b/ld/testsuite/ld-plugin/pr28138-2.c
+@@ -0,0 +1,6 @@
++extern int a1(void);
++int
++a2(void)
++{
++ return 1 + a1();
++}
+diff --git a/ld/testsuite/ld-plugin/pr28138-3.c b/ld/testsuite/ld-plugin/pr28138-3.c
+new file mode 100644
+index 00000000000..ec464947ee6
+--- /dev/null
++++ b/ld/testsuite/ld-plugin/pr28138-3.c
+@@ -0,0 +1,6 @@
++extern int a2(void);
++int
++a3(void)
++{
++ return 1 + a2();
++}
+diff --git a/ld/testsuite/ld-plugin/pr28138-4.c b/ld/testsuite/ld-plugin/pr28138-4.c
+new file mode 100644
+index 00000000000..475701b2c5c
+--- /dev/null
++++ b/ld/testsuite/ld-plugin/pr28138-4.c
+@@ -0,0 +1,6 @@
++extern int a3(void);
++int
++a4(void)
++{
++ return 1 + a3();
++}
+diff --git a/ld/testsuite/ld-plugin/pr28138-5.c b/ld/testsuite/ld-plugin/pr28138-5.c
+new file mode 100644
+index 00000000000..e24f86c363e
+--- /dev/null
++++ b/ld/testsuite/ld-plugin/pr28138-5.c
+@@ -0,0 +1,6 @@
++extern int a4(void);
++int
++a5(void)
++{
++ return 1 + a4();
++}
+diff --git a/ld/testsuite/ld-plugin/pr28138-6.c b/ld/testsuite/ld-plugin/pr28138-6.c
+new file mode 100644
+index 00000000000..b5b938bdb21
+--- /dev/null
++++ b/ld/testsuite/ld-plugin/pr28138-6.c
+@@ -0,0 +1,6 @@
++extern int a5(void);
++int
++a6(void)
++{
++ return 1 + a5();
++}
+diff --git a/ld/testsuite/ld-plugin/pr28138-7.c b/ld/testsuite/ld-plugin/pr28138-7.c
+new file mode 100644
+index 00000000000..4ef75bf0f0c
+--- /dev/null
++++ b/ld/testsuite/ld-plugin/pr28138-7.c
+@@ -0,0 +1,6 @@
++extern int a6(void);
++int
++a7(void)
++{
++ return 1 + a6();
++}
+diff --git a/ld/testsuite/ld-plugin/pr28138.c b/ld/testsuite/ld-plugin/pr28138.c
+new file mode 100644
+index 00000000000..68252c9f382
+--- /dev/null
++++ b/ld/testsuite/ld-plugin/pr28138.c
+@@ -0,0 +1,20 @@
++#include <stdio.h>
++
++extern int a7(void);
++
++int
++a0(void)
++{
++ return 0;
++}
++
++int
++main()
++{
++ if (a7() == 7)
++ {
++ printf ("PASS\n");
++ return 0;
++ }
++ return 1;
++}
+--
+2.27.0
diff --git a/gnu/packages/patches/binutils-loongson-workaround.patch b/gnu/packages/patches/binutils-loongson-workaround.patch
index f43572a53d..f05d6c3c96 100644
--- a/gnu/packages/patches/binutils-loongson-workaround.patch
+++ b/gnu/packages/patches/binutils-loongson-workaround.patch
@@ -4,22 +4,22 @@ Patch by Mark H Weaver <mhw@netris.org>.
--- binutils/gas/config/tc-mips.c.orig 2012-09-04 10:21:03.000000000 -0400
+++ binutils/gas/config/tc-mips.c 2013-10-06 02:23:21.651983768 -0400
-@@ -910,10 +910,10 @@
+@@ -934,10 +934,10 @@ enum fix_vr4120_class
};
/* ...likewise -mfix-loongson2f-jump. */
--static bfd_boolean mips_fix_loongson2f_jump;
-+static bfd_boolean mips_fix_loongson2f_jump = FALSE;
+-static bool mips_fix_loongson2f_jump;
++static bool mips_fix_loongson2f_jump = FALSE;
/* ...likewise -mfix-loongson2f-nop. */
--static bfd_boolean mips_fix_loongson2f_nop;
-+static bfd_boolean mips_fix_loongson2f_nop = TRUE;
+-static bool mips_fix_loongson2f_nop;
++static bool mips_fix_loongson2f_nop = TRUE;
/* True if -mfix-loongson2f-nop or -mfix-loongson2f-jump passed. */
- static bfd_boolean mips_fix_loongson2f;
+ static bool mips_fix_loongson2f;
--- binutils/gas/testsuite/gas/mips/mips.exp.orig 2012-09-04 10:17:13.000000000 -0400
+++ binutils/gas/testsuite/gas/mips/mips.exp 2013-10-06 02:23:21.663983768 -0400
-@@ -91,6 +91,12 @@
+@@ -110,6 +110,12 @@ proc mips_arch_init {} {
# Catch because the variable won't be set the first time through.
catch {unset mips_arches}
diff --git a/gnu/packages/patches/binutils-mingw-w64-timestamp.patch b/gnu/packages/patches/binutils-mingw-w64-timestamp.patch
index b785043b62..fcfe4a36aa 100644
--- a/gnu/packages/patches/binutils-mingw-w64-timestamp.patch
+++ b/gnu/packages/patches/binutils-mingw-w64-timestamp.patch
@@ -4,14 +4,14 @@ https://salsa.debian.org/mingw-w64-team/binutils-mingw-w64.git
Invoke the following in the aforementioned repo to see the original patch:
- $ git show da63f6b:debian/patches/specify-timestamp.patch
+ $ git show faf7c64:debian/patches/specify-timestamp.patch
Description: Allow the PE timestamp to be specified
Author: Stephen Kitt <skitt@debian.org>
--- a/bfd/peXXigen.c
+++ b/bfd/peXXigen.c
-@@ -70,6 +70,9 @@
+@@ -77,6 +77,9 @@
#include <wctype.h>
#endif
@@ -21,20 +21,20 @@ Author: Stephen Kitt <skitt@debian.org>
/* NOTE: it's strange to be including an architecture specific header
in what's supposed to be general (to PE/PEI) code. However, that's
where the definitions are, and they don't vary per architecture
-@@ -879,10 +882,38 @@
+@@ -876,9 +879,36 @@
/* Use a real timestamp by default, unless the no-insert-timestamp
option was chosen. */
-- if ((pe_data (abfd)->insert_timestamp))
+- if ((pe_data (abfd)->timestamp) == -1)
- H_PUT_32 (abfd, time (0), filehdr_out->f_timdat);
- else
-+ if (pe_data (abfd)->insert_timestamp) {
++ if ((pe_data (abfd)->timestamp) == -1) {
+ time_t now;
+ char *source_date_epoch;
+ unsigned long long epoch;
+ char *endptr;
+
-+ now = time(NULL);
++ now = time (NULL);
+ source_date_epoch = getenv("SOURCE_DATE_EPOCH");
+ if (source_date_epoch) {
+ errno = 0;
@@ -57,30 +57,29 @@ Author: Stephen Kitt <skitt@debian.org>
+ }
+ }
+ H_PUT_32 (abfd, now, filehdr_out->f_timdat);
-+ } else {
- H_PUT_32 (abfd, 0, filehdr_out->f_timdat);
-+ }
++ } else
+ H_PUT_32 (abfd, pe_data (abfd)->timestamp, filehdr_out->f_timdat);
PUT_FILEHDR_SYMPTR (abfd, filehdr_in->f_symptr,
- filehdr_out->f_symptr);
--- a/ld/pe-dll.c
+++ b/ld/pe-dll.c
-@@ -26,6 +26,8 @@
- #include "filenames.h"
+@@ -27,6 +27,8 @@
#include "safe-ctype.h"
+ #include "ctf-api.h"
+#include <errno.h>
+#include <limits.h>
#include <time.h>
#include "ld.h"
-@@ -1202,8 +1204,36 @@
+@@ -1218,9 +1220,36 @@
memset (edata_d, 0, edata_sz);
-- if (pe_data (abfd)->insert_timestamp)
+- if (pe_data (abfd)->timestamp == -1)
- H_PUT_32 (abfd, time (0), edata_d + 4);
-+ if (pe_data (abfd)->insert_timestamp) {
+- else
++ if (pe_data (abfd)->timestamp == -1) {
+ time_t now;
+ char *source_date_epoch;
+ unsigned long long epoch;
@@ -109,13 +108,13 @@ Author: Stephen Kitt <skitt@debian.org>
+ }
+ }
+ H_PUT_32 (abfd, now, edata_d + 4);
-+ }
++ } else
+ H_PUT_32 (abfd, pe_data (abfd)->timestamp, edata_d + 4);
if (pe_def_file->version_major != -1)
- {
--- a/ld/emultempl/pe.em
+++ b/ld/emultempl/pe.em
-@@ -303,7 +303,7 @@
+@@ -304,7 +304,7 @@
OPTION_USE_NUL_PREFIXED_IMPORT_TABLES},
{"no-leading-underscore", no_argument, NULL, OPTION_NO_LEADING_UNDERSCORE},
{"leading-underscore", no_argument, NULL, OPTION_LEADING_UNDERSCORE},
@@ -126,7 +125,7 @@ Author: Stephen Kitt <skitt@debian.org>
/* getopt allows abbreviations, so we do this to stop it
--- a/ld/emultempl/pep.em
+++ b/ld/emultempl/pep.em
-@@ -321,7 +321,7 @@
+@@ -323,7 +323,7 @@
{"no-bind", no_argument, NULL, OPTION_NO_BIND},
{"wdmdriver", no_argument, NULL, OPTION_WDM_DRIVER},
{"tsaware", no_argument, NULL, OPTION_TERMINAL_SERVER_AWARE},
@@ -134,4 +133,4 @@ Author: Stephen Kitt <skitt@debian.org>
+ {"insert-timestamp", optional_argument, NULL, OPTION_INSERT_TIMESTAMP},
{"no-insert-timestamp", no_argument, NULL, OPTION_NO_INSERT_TIMESTAMP},
{"build-id", optional_argument, NULL, OPTION_BUILD_ID},
- {NULL, no_argument, NULL, 0}
+ {"enable-reloc-section", no_argument, NULL, OPTION_ENABLE_RELOC_SECTION},
diff --git a/gnu/packages/patches/c++-gsl-move-array-bounds-tests.patch b/gnu/packages/patches/c++-gsl-move-array-bounds-tests.patch
new file mode 100644
index 0000000000..0629212688
--- /dev/null
+++ b/gnu/packages/patches/c++-gsl-move-array-bounds-tests.patch
@@ -0,0 +1,126 @@
+Description: Move tests that trigger -Warray-bounds to separate compilation unit
+ GCC 10 is now smart enough to detect violation of array boundaries that tests
+ are actually tested. Along with -Werror this led to tests failure, so I move
+ such tests to another compilation unit to have the warning deactivated for
+ only these tests.
+Bug-Debian: https://bugs.debian.org/966895
+Author: Nicholas Guriev <guriev-ns@ya.ru>
+Last-Modified: Wed, 19 Aug 2020 08:55:52 +0300
+
+--- a/tests/CMakeLists.txt
++++ b/tests/CMakeLists.txt
+@@ -179,6 +179,7 @@ add_gsl_test(owner_tests)
+ add_gsl_test(byte_tests)
+ add_gsl_test(algorithm_tests)
+ add_gsl_test(strict_notnull_tests)
++add_gsl_test(array_bounds)
+
+
+ # No exception tests
+--- /dev/null
++++ b/tests/array_bounds.cpp
+@@ -0,0 +1,68 @@
++///////////////////////////////////////////////////////////////////////////////
++//
++// Copyright (c) 2015 Microsoft Corporation. All rights reserved.
++//
++// This code is licensed under the MIT License (MIT).
++//
++// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
++// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
++// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
++// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
++// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
++// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
++// THE SOFTWARE.
++//
++///////////////////////////////////////////////////////////////////////////////
++
++#ifdef __GNUC__
++#pragma GCC diagnostic warning "-Warray-bounds"
++#endif // __GNUC__
++
++#include <gtest/gtest.h>
++
++#include <gsl/multi_span> // for gsl::multi_span
++
++namespace gsl
++{
++struct fail_fast;
++} // namespace gsl
++
++namespace
++{
++static constexpr char deathstring[] = "Expected Death";
++} // namespace
++
++TEST(array_bounds, subspan_from_multi_span_test)
++{
++ int arr[5] = {1, 2, 3, 4, 5};
++ gsl::multi_span<int> av = arr;
++
++ std::set_terminate([] {
++ std::cerr << "Expected Death. subspan";
++ std::abort();
++ });
++
++ EXPECT_DEATH(av.subspan(6).length(), deathstring);
++}
++
++TEST(array_bounds, strided_span_bounds_from_strided_span_tests)
++{
++ int arr[] = {0, 1, 2, 3};
++ gsl::multi_span<int> av(arr);
++
++ std::set_terminate([] {
++ std::cerr << "Expected Death. strided_span_bounds";
++ std::abort();
++ });
++
++ // incorrect sections
++ EXPECT_DEATH(av.section(0, 0)[0], deathstring);
++ EXPECT_DEATH(av.section(1, 0)[0], deathstring);
++ EXPECT_DEATH(av.section(1, 1)[1], deathstring);
++
++ EXPECT_DEATH(av.section(2, 5), deathstring);
++ EXPECT_DEATH(av.section(5, 2), deathstring);
++ EXPECT_DEATH(av.section(5, 0), deathstring);
++ EXPECT_DEATH(av.section(0, 5), deathstring);
++ EXPECT_DEATH(av.section(5, 5), deathstring);
++}
+--- a/tests/multi_span_tests.cpp
++++ b/tests/multi_span_tests.cpp
+@@ -1042,10 +1042,6 @@ TEST(multi_span_test, subspan)
+ EXPECT_TRUE(av.subspan(1).length() == 4);
+ EXPECT_TRUE(av.subspan(4).length() == 1);
+ EXPECT_TRUE(av.subspan(5).length() == 0);
+- // Disabled test instead of fixing since multi_span is deprecated. (PR#835)
+-#if !(defined(__GNUC__) && __GNUC__ == 8)
+- EXPECT_DEATH(av.subspan(6).length(), deathstring);
+-#endif
+ auto av2 = av.subspan(1);
+ for (int i = 0; i < 4; ++i) EXPECT_TRUE(av2[i] == i + 2);
+ }
+--- a/tests/strided_span_tests.cpp
++++ b/tests/strided_span_tests.cpp
+@@ -403,20 +403,6 @@ TEST(strided_span_tests, strided_span_bo
+ });
+
+ {
+- // incorrect sections
+-
+- EXPECT_DEATH(av.section(0, 0)[0], deathstring);
+- EXPECT_DEATH(av.section(1, 0)[0], deathstring);
+- EXPECT_DEATH(av.section(1, 1)[1], deathstring);
+-
+- EXPECT_DEATH(av.section(2, 5), deathstring);
+- EXPECT_DEATH(av.section(5, 2), deathstring);
+- EXPECT_DEATH(av.section(5, 0), deathstring);
+- EXPECT_DEATH(av.section(0, 5), deathstring);
+- EXPECT_DEATH(av.section(5, 5), deathstring);
+- }
+-
+- {
+ // zero stride
+ strided_span<int, 1> sav{av, {{4}, {}}};
+ EXPECT_TRUE(sav[0] == 0);
diff --git a/gnu/packages/patches/cdrkit-libre-cross-compile.patch b/gnu/packages/patches/cdrkit-libre-cross-compile.patch
new file mode 100644
index 0000000000..09c34b8c0a
--- /dev/null
+++ b/gnu/packages/patches/cdrkit-libre-cross-compile.patch
@@ -0,0 +1,32 @@
+Patch extracted from a set of patches to cross-compile ffmeg and dependencies for mingw-w64.
+https://github.com/Warblefly/MultimediaTools-mingw-w64/commit/01e30a17637b67afd65c1e24302f8daf94b19b32#diff-503bd595ad2a49840cc56acdb3432487a20a0acb7981ce83be51fe311216de8f
+
+diff --git a/include/CMakeLists.txt b/include/CMakeLists.txt
+index 99a69fd..e5ba8a7 100644
+--- a/include/CMakeLists.txt
++++ b/include/CMakeLists.txt
+@@ -35,8 +35,6 @@ endif(VA_LIST_IS_ARRAY)
+ INCLUDE(TestBigEndian)
+ TEST_BIG_ENDIAN(WORDS_BIGENDIAN)
+
+-TRY_RUN(BITFIELDS_HTOL TEST_DUMMY ${CMAKE_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/test_BITFIELDS_HTOL.c)
+-
+ INCLUDE(CheckIncludeFiles)
+
+ #SET(CMAKE_REQUIRED_INCLUDES "/usr/include;/usr/local/include")
+diff --git a/include/xconfig.h.in b/include/xconfig.h.in
+index c130600..476c00b 100644
+--- a/include/xconfig.h.in
++++ b/include/xconfig.h.in
+@@ -233,7 +233,11 @@
+ /* If using network byte order */
+ #cmakedefine WORDS_BIGENDIAN
+ /* If high bits come first in structures */
+-#cmakedefine BITFIELDS_HTOL
++#ifdef WORDS_BIGENDIAN
++#define BITFIELDS_HTOL
++#else
++#define BITFIELDS_LTOH
++#endif
+ #define HAVE_C_BIGENDIAN /* Flag that WORDS_BIGENDIAN test was done */
+ #define HAVE_C_BITFIELDS /* Flag that BITFIELDS_HTOL test was done */
diff --git a/gnu/packages/patches/ceph-boost-compat.patch b/gnu/packages/patches/ceph-boost-compat.patch
new file mode 100644
index 0000000000..1aecfbbed5
--- /dev/null
+++ b/gnu/packages/patches/ceph-boost-compat.patch
@@ -0,0 +1,18 @@
+Add extra includes required for Boost 1.75 and later.
+
+Taken from upstram:
+
+ https://github.com/ceph/ceph/commit/ebf3a0398f18eab67d2ba25e6a10b41ff140f6a4
+
+diff --git a/src/rgw/rgw_string.h b/src/rgw/rgw_string.h
+index 257daa9c1fe6e..90e64f98a2587 100644
+--- a/src/rgw/rgw_string.h
++++ b/src/rgw/rgw_string.h
+@@ -8,5 +8,7 @@
+ #include <stdlib.h>
+ #include <limits.h>
+ #include <string_view>
++#include <string>
++#include <stdexcept>
+
+ #include <boost/container/small_vector.hpp>
diff --git a/gnu/packages/patches/ceph-fix-snappy-breaking-change.patch b/gnu/packages/patches/ceph-fix-snappy-breaking-change.patch
deleted file mode 100644
index 7a10e2e4ae..0000000000
--- a/gnu/packages/patches/ceph-fix-snappy-breaking-change.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-Patch tracked upstream at https://tracker.ceph.com/issues/50934
-
---- a/src/compressor/snappy/SnappyCompressor.h
-+++ b/src/compressor/snappy/SnappyCompressor.h
-@@ -96,7 +96,7 @@ class SnappyCompressor : public Compressor {
- if (qat_enabled)
- return qat_accel.decompress(p, compressed_len, dst);
- #endif
-- snappy::uint32 res_len = 0;
-+ uint32_t res_len = 0;
- BufferlistSource source_1(p, compressed_len);
- if (!snappy::GetUncompressedLength(&source_1, &res_len)) {
- return -1;
diff --git a/gnu/packages/patches/ceph-rocksdb-compat.patch b/gnu/packages/patches/ceph-rocksdb-compat.patch
new file mode 100644
index 0000000000..9fb9b0caeb
--- /dev/null
+++ b/gnu/packages/patches/ceph-rocksdb-compat.patch
@@ -0,0 +1,303 @@
+Adjust for newer versions of RocksDB.
+
+Taken from upstream:
+
+ https://github.com/ceph/ceph/pull/42815
+ https://github.com/ceph/ceph/commit/ff7f192ea3cf88ca1098bcf9396ff4f8ed1e8792.diff
+
+diff --git a/src/kv/rocksdb_cache/BinnedLRUCache.cc b/src/kv/rocksdb_cache/BinnedLRUCache.cc
+index 0d657883e92de..47c56e2ddd769 100644
+--- a/src/kv/rocksdb_cache/BinnedLRUCache.cc
++++ b/src/kv/rocksdb_cache/BinnedLRUCache.cc
+@@ -151,13 +151,20 @@ void BinnedLRUCacheShard::EraseUnRefEntries() {
+ }
+ }
+
+-void BinnedLRUCacheShard::ApplyToAllCacheEntries(void (*callback)(void*, size_t),
+- bool thread_safe) {
++void BinnedLRUCacheShard::ApplyToAllCacheEntries(
++ const std::function<void(const rocksdb::Slice& key,
++ void* value,
++ size_t charge,
++ DeleterFn)>& callback,
++ bool thread_safe)
++{
+ if (thread_safe) {
+ mutex_.lock();
+ }
+ table_.ApplyToAllCacheEntries(
+- [callback](BinnedLRUHandle* h) { callback(h->value, h->charge); });
++ [callback](BinnedLRUHandle* h) {
++ callback(h->key(), h->value, h->charge, h->deleter);
++ });
+ if (thread_safe) {
+ mutex_.unlock();
+ }
+@@ -345,7 +352,7 @@ bool BinnedLRUCacheShard::Release(rocksdb::Cache::Handle* handle, bool force_era
+
+ rocksdb::Status BinnedLRUCacheShard::Insert(const rocksdb::Slice& key, uint32_t hash, void* value,
+ size_t charge,
+- void (*deleter)(const rocksdb::Slice& key, void* value),
++ DeleterFn deleter,
+ rocksdb::Cache::Handle** handle, rocksdb::Cache::Priority priority) {
+ auto e = new BinnedLRUHandle();
+ rocksdb::Status s;
+@@ -464,6 +471,12 @@ std::string BinnedLRUCacheShard::GetPrintableOptions() const {
+ return std::string(buffer);
+ }
+
++DeleterFn BinnedLRUCacheShard::GetDeleter(rocksdb::Cache::Handle* h) const
++{
++ auto* handle = reinterpret_cast<BinnedLRUHandle*>(h);
++ return handle->deleter;
++}
++
+ BinnedLRUCache::BinnedLRUCache(CephContext *c,
+ size_t capacity,
+ int num_shard_bits,
+@@ -519,6 +532,13 @@ void BinnedLRUCache::DisownData() {
+ #endif // !__SANITIZE_ADDRESS__
+ }
+
++#if (ROCKSDB_MAJOR >= 6 && ROCKSDB_MINOR >= 22)
++DeleterFn BinnedLRUCache::GetDeleter(Handle* handle) const
++{
++ return reinterpret_cast<const BinnedLRUHandle*>(handle)->deleter;
++}
++#endif
++
+ size_t BinnedLRUCache::TEST_GetLRUSize() {
+ size_t lru_size_of_all_shards = 0;
+ for (int i = 0; i < num_shards_; i++) {
+diff --git a/src/kv/rocksdb_cache/BinnedLRUCache.h b/src/kv/rocksdb_cache/BinnedLRUCache.h
+index 85608be0e5734..88bf4502e8927 100644
+--- a/src/kv/rocksdb_cache/BinnedLRUCache.h
++++ b/src/kv/rocksdb_cache/BinnedLRUCache.h
+@@ -56,7 +56,7 @@ std::shared_ptr<rocksdb::Cache> NewBinnedLRUCache(
+
+ struct BinnedLRUHandle {
+ void* value;
+- void (*deleter)(const rocksdb::Slice&, void* value);
++ DeleterFn deleter;
+ BinnedLRUHandle* next_hash;
+ BinnedLRUHandle* next;
+ BinnedLRUHandle* prev;
+@@ -189,7 +189,7 @@ class alignas(CACHE_LINE_SIZE) BinnedLRUCacheShard : public CacheShard {
+ // Like Cache methods, but with an extra "hash" parameter.
+ virtual rocksdb::Status Insert(const rocksdb::Slice& key, uint32_t hash, void* value,
+ size_t charge,
+- void (*deleter)(const rocksdb::Slice& key, void* value),
++ DeleterFn deleter,
+ rocksdb::Cache::Handle** handle,
+ rocksdb::Cache::Priority priority) override;
+ virtual rocksdb::Cache::Handle* Lookup(const rocksdb::Slice& key, uint32_t hash) override;
+@@ -205,13 +205,19 @@ class alignas(CACHE_LINE_SIZE) BinnedLRUCacheShard : public CacheShard {
+ virtual size_t GetUsage() const override;
+ virtual size_t GetPinnedUsage() const override;
+
+- virtual void ApplyToAllCacheEntries(void (*callback)(void*, size_t),
+- bool thread_safe) override;
++ virtual void ApplyToAllCacheEntries(
++ const std::function<void(const rocksdb::Slice& key,
++ void* value,
++ size_t charge,
++ DeleterFn)>& callback,
++ bool thread_safe) override;
+
+ virtual void EraseUnRefEntries() override;
+
+ virtual std::string GetPrintableOptions() const override;
+
++ virtual DeleterFn GetDeleter(rocksdb::Cache::Handle* handle) const override;
++
+ void TEST_GetLRUList(BinnedLRUHandle** lru, BinnedLRUHandle** lru_low_pri);
+
+ // Retrieves number of elements in LRU, for unit test purpose only
+@@ -304,7 +310,9 @@ class BinnedLRUCache : public ShardedCache {
+ virtual size_t GetCharge(Handle* handle) const override;
+ virtual uint32_t GetHash(Handle* handle) const override;
+ virtual void DisownData() override;
+-
++#if (ROCKSDB_MAJOR >= 6 && ROCKSDB_MINOR >= 22)
++ virtual DeleterFn GetDeleter(Handle* handle) const override;
++#endif
+ // Retrieves number of elements in LRU, for unit test purpose only
+ size_t TEST_GetLRUSize();
+ // Sets the high pri pool ratio
+diff --git a/src/kv/rocksdb_cache/ShardedCache.cc b/src/kv/rocksdb_cache/ShardedCache.cc
+index 367140a94d8be..6cbd89ad6472c 100644
+--- a/src/kv/rocksdb_cache/ShardedCache.cc
++++ b/src/kv/rocksdb_cache/ShardedCache.cc
+@@ -44,7 +44,7 @@ void ShardedCache::SetStrictCapacityLimit(bool strict_capacity_limit) {
+ }
+
+ rocksdb::Status ShardedCache::Insert(const rocksdb::Slice& key, void* value, size_t charge,
+- void (*deleter)(const rocksdb::Slice& key, void* value),
++ DeleterFn deleter,
+ rocksdb::Cache::Handle** handle, Priority priority) {
+ uint32_t hash = HashSlice(key);
+ return GetShard(Shard(hash))
+@@ -109,13 +109,36 @@ size_t ShardedCache::GetPinnedUsage() const {
+ return usage;
+ }
+
++#if (ROCKSDB_MAJOR >= 6 && ROCKSDB_MINOR >= 22)
++DeleterFn ShardedCache::GetDeleter(Handle* handle) const
++{
++ uint32_t hash = GetHash(handle);
++ return GetShard(Shard(hash))->GetDeleter(handle);
++}
++
++void ShardedCache::ApplyToAllEntries(
++ const std::function<void(const rocksdb::Slice& key, void* value, size_t charge,
++ DeleterFn deleter)>& callback,
++ const ApplyToAllEntriesOptions& opts)
++{
++ int num_shards = 1 << num_shard_bits_;
++ for (int s = 0; s < num_shards; s++) {
++ GetShard(s)->ApplyToAllCacheEntries(callback, true /* thread_safe */);
++ }
++}
++#else
+ void ShardedCache::ApplyToAllCacheEntries(void (*callback)(void*, size_t),
+ bool thread_safe) {
+ int num_shards = 1 << num_shard_bits_;
+ for (int s = 0; s < num_shards; s++) {
+- GetShard(s)->ApplyToAllCacheEntries(callback, thread_safe);
++ GetShard(s)->ApplyToAllCacheEntries(
++ [callback](const rocksdb::Slice&, void* value, size_t charge, DeleterFn) {
++ callback(value, charge);
++ },
++ thread_safe);
+ }
+ }
++#endif
+
+ void ShardedCache::EraseUnRefEntries() {
+ int num_shards = 1 << num_shard_bits_;
+@@ -131,7 +154,7 @@ std::string ShardedCache::GetPrintableOptions() const {
+ char buffer[kBufferSize];
+ {
+ std::lock_guard<std::mutex> l(capacity_mutex_);
+- snprintf(buffer, kBufferSize, " capacity : %" ROCKSDB_PRIszt "\n",
++ snprintf(buffer, kBufferSize, " capacity : %zu\n",
+ capacity_);
+ ret.append(buffer);
+ snprintf(buffer, kBufferSize, " num_shard_bits : %d\n", num_shard_bits_);
+diff --git a/src/kv/rocksdb_cache/ShardedCache.h b/src/kv/rocksdb_cache/ShardedCache.h
+index 4d64893ab1c7b..f98421a09a33a 100644
+--- a/src/kv/rocksdb_cache/ShardedCache.h
++++ b/src/kv/rocksdb_cache/ShardedCache.h
+@@ -14,6 +14,7 @@
+ #include <string>
+ #include <mutex>
+
++#include "rocksdb/version.h"
+ #include "rocksdb/cache.h"
+ #include "include/ceph_hash.h"
+ #include "common/PriorityCache.h"
+@@ -22,10 +23,11 @@
+ #ifndef CACHE_LINE_SIZE
+ #define CACHE_LINE_SIZE 64 // XXX arch-specific define
+ #endif
+-#define ROCKSDB_PRIszt "zu"
+
+ namespace rocksdb_cache {
+
++using DeleterFn = void (*)(const rocksdb::Slice& key, void* value);
++
+ // Single cache shard interface.
+ class CacheShard {
+ public:
+@@ -34,7 +36,7 @@ class CacheShard {
+
+ virtual rocksdb::Status Insert(const rocksdb::Slice& key, uint32_t hash, void* value,
+ size_t charge,
+- void (*deleter)(const rocksdb::Slice& key, void* value),
++ DeleterFn deleter,
+ rocksdb::Cache::Handle** handle, rocksdb::Cache::Priority priority) = 0;
+ virtual rocksdb::Cache::Handle* Lookup(const rocksdb::Slice& key, uint32_t hash) = 0;
+ virtual bool Ref(rocksdb::Cache::Handle* handle) = 0;
+@@ -44,10 +46,15 @@ class CacheShard {
+ virtual void SetStrictCapacityLimit(bool strict_capacity_limit) = 0;
+ virtual size_t GetUsage() const = 0;
+ virtual size_t GetPinnedUsage() const = 0;
+- virtual void ApplyToAllCacheEntries(void (*callback)(void*, size_t),
+- bool thread_safe) = 0;
++ virtual void ApplyToAllCacheEntries(
++ const std::function<void(const rocksdb::Slice& key,
++ void* value,
++ size_t charge,
++ DeleterFn)>& callback,
++ bool thread_safe) = 0;
+ virtual void EraseUnRefEntries() = 0;
+ virtual std::string GetPrintableOptions() const { return ""; }
++ virtual DeleterFn GetDeleter(rocksdb::Cache::Handle* handle) const = 0;
+ };
+
+ // Generic cache interface which shards cache by hash of keys. 2^num_shard_bits
+@@ -57,34 +64,43 @@ class ShardedCache : public rocksdb::Cache, public PriorityCache::PriCache {
+ public:
+ ShardedCache(size_t capacity, int num_shard_bits, bool strict_capacity_limit);
+ virtual ~ShardedCache() = default;
++ // rocksdb::Cache
+ virtual const char* Name() const override = 0;
+- virtual CacheShard* GetShard(int shard) = 0;
+- virtual const CacheShard* GetShard(int shard) const = 0;
+- virtual void* Value(Handle* handle) override = 0;
+- virtual size_t GetCharge(Handle* handle) const = 0;
+- virtual uint32_t GetHash(Handle* handle) const = 0;
+- virtual void DisownData() override = 0;
+-
+- virtual void SetCapacity(size_t capacity) override;
+- virtual void SetStrictCapacityLimit(bool strict_capacity_limit) override;
+-
+ virtual rocksdb::Status Insert(const rocksdb::Slice& key, void* value, size_t charge,
+- void (*deleter)(const rocksdb::Slice& key, void* value),
++ DeleterFn,
+ rocksdb::Cache::Handle** handle, Priority priority) override;
+ virtual rocksdb::Cache::Handle* Lookup(const rocksdb::Slice& key, rocksdb::Statistics* stats) override;
+ virtual bool Ref(rocksdb::Cache::Handle* handle) override;
+ virtual bool Release(rocksdb::Cache::Handle* handle, bool force_erase = false) override;
++ virtual void* Value(Handle* handle) override = 0;
+ virtual void Erase(const rocksdb::Slice& key) override;
+ virtual uint64_t NewId() override;
+- virtual size_t GetCapacity() const override;
++ virtual void SetCapacity(size_t capacity) override;
++ virtual void SetStrictCapacityLimit(bool strict_capacity_limit) override;
+ virtual bool HasStrictCapacityLimit() const override;
++ virtual size_t GetCapacity() const override;
+ virtual size_t GetUsage() const override;
+ virtual size_t GetUsage(rocksdb::Cache::Handle* handle) const override;
+ virtual size_t GetPinnedUsage() const override;
++ virtual size_t GetCharge(Handle* handle) const = 0;
++#if (ROCKSDB_MAJOR >= 6 && ROCKSDB_MINOR >= 22)
++ virtual DeleterFn GetDeleter(Handle* handle) const override;
++#endif
++ virtual void DisownData() override = 0;
++#if (ROCKSDB_MAJOR >= 6 && ROCKSDB_MINOR >= 22)
++ virtual void ApplyToAllEntries(
++ const std::function<void(const rocksdb::Slice& key, void* value, size_t charge,
++ DeleterFn deleter)>& callback,
++ const ApplyToAllEntriesOptions& opts) override;
++#else
+ virtual void ApplyToAllCacheEntries(void (*callback)(void*, size_t),
+ bool thread_safe) override;
++#endif
+ virtual void EraseUnRefEntries() override;
+ virtual std::string GetPrintableOptions() const override;
++ virtual CacheShard* GetShard(int shard) = 0;
++ virtual const CacheShard* GetShard(int shard) const = 0;
++ virtual uint32_t GetHash(Handle* handle) const = 0;
+
+ int GetNumShardBits() const { return num_shard_bits_; }
+
+@@ -120,7 +136,7 @@ class ShardedCache : public rocksdb::Cache, public PriorityCache::PriCache {
+ // return Hash(s.data(), s.size(), 0);
+ }
+
+- uint32_t Shard(uint32_t hash) {
++ uint32_t Shard(uint32_t hash) const {
+ // Note, hash >> 32 yields hash in gcc, not the zero we expect!
+ return (num_shard_bits_ > 0) ? (hash >> (32 - num_shard_bits_)) : 0;
+ }
diff --git a/gnu/packages/patches/cheese-vala-update.patch b/gnu/packages/patches/cheese-vala-update.patch
new file mode 100644
index 0000000000..cb18952ce4
--- /dev/null
+++ b/gnu/packages/patches/cheese-vala-update.patch
@@ -0,0 +1,180 @@
+Taken from upstream:
+https://gitlab.gnome.org/GNOME/cheese/-/commit/7cf6268e54620bbbe5e6e61800c50fb0cb4bea57.patch.
+
+From 7cf6268e54620bbbe5e6e61800c50fb0cb4bea57 Mon Sep 17 00:00:00 2001 From:
+=?UTF-8?q?Corentin=20No=C3=ABl?= <corentin@elementary.io> Date: Fri, 16 Oct
+2020 19:56:26 +0200 Subject: [PATCH] Change GLib.PtrArray into
+GLib.GenericArray
+
+This is the vala-friendly way of handling GPtrArray.
+Fix several memory leaks on the go and unnecessary reference increase.
+---
+ src/cheese-preferences.vala | 26 ++++++++++++--------------
+ src/cheese-window.vala | 22 +++++++++++-----------
+ src/vapi/cheese-common.vapi | 2 +-
+ 3 files changed, 24 insertions(+), 26 deletions(-)
+
+diff --git a/src/cheese-preferences.vala b/src/cheese-preferences.vala
+index f56af7e0..80a92431 100644
+--- a/src/cheese-preferences.vala
++++ b/src/cheese-preferences.vala
+@@ -100,7 +100,7 @@ public PreferencesDialog (Cheese.Camera camera)
+ */
+ private void initialize_camera_devices ()
+ {
+- unowned GLib.PtrArray devices = camera.get_camera_devices ();
++ GLib.GenericArray<unowned Cheese.CameraDevice> devices = camera.get_camera_devices ();
+ camera_model = new Gtk.ListStore (2, typeof (string), typeof (Cheese.CameraDevice));
+
+ source_combo.model = camera_model;
+@@ -357,13 +357,13 @@ public PreferencesDialog (Cheese.Camera camera)
+ */
+ private void on_camera_update_num_camera_devices ()
+ {
+- unowned GLib.PtrArray devices = camera.get_camera_devices ();
+- Cheese.CameraDevice dev;
++ GLib.GenericArray<unowned Cheese.CameraDevice> devices = camera.get_camera_devices ();
++ unowned Cheese.CameraDevice dev;
+
+ // Add (if) / Remove (else) a camera device.
+- if (devices.len > camera_model.iter_n_children (null))
++ if (devices.length > camera_model.iter_n_children (null))
+ {
+- dev = (Cheese.CameraDevice) devices.index (devices.len - 1);
++ dev = devices.get (devices.length - 1);
+ add_camera_device(dev);
+ }
+ else
+@@ -382,12 +382,11 @@ public PreferencesDialog (Cheese.Camera camera)
+ bool device_removed = false;
+ devices.foreach ((device) =>
+ {
+- var old_device = (Cheese.CameraDevice) device;
+ Cheese.CameraDevice new_device;
+ camera_model.get (iter, 1, out new_device, -1);
+
+ // Found the device that was removed.
+- if (old_device != new_device)
++ if (device != new_device)
+ {
+ remove_camera_device (iter, new_device, active_device);
+ device_removed = true;
+@@ -418,17 +417,16 @@ public PreferencesDialog (Cheese.Camera camera)
+ *
+ * @param device a Cheese.CameraDevice to add to the device combo box model
+ */
+- private void add_camera_device (void *device)
++ private void add_camera_device (Cheese.CameraDevice device)
+ {
+ TreeIter iter;
+- Cheese.CameraDevice dev = (Cheese.CameraDevice) device;
+
+ camera_model.append (out iter);
+ camera_model.set (iter,
+- 0, dev.get_name (),
+- 1, dev);
++ 0, device.get_name (),
++ 1, device);
+
+- if (camera.get_selected_device () == dev)
++ if (camera.get_selected_device () == device)
+ source_combo.set_active_iter (iter);
+
+ if (camera_model.iter_n_children (null) > 1)
+@@ -445,12 +443,12 @@ public PreferencesDialog (Cheese.Camera camera)
+ private void remove_camera_device (TreeIter iter, Cheese.CameraDevice device_node,
+ Cheese.CameraDevice active_device_node)
+ {
+- unowned GLib.PtrArray devices = camera.get_camera_devices ();
++ GLib.GenericArray<unowned Cheese.CameraDevice> devices = camera.get_camera_devices ();
+
+ // Check if the camera that we want to remove, is the active one
+ if (device_node == active_device_node)
+ {
+- if (devices.len > 0)
++ if (devices.length > 0)
+ set_new_available_camera_device (iter);
+ else
+ this.hide ();
+diff --git a/src/cheese-window.vala b/src/cheese-window.vala
+index ff069808..cc119b68 100644
+--- a/src/cheese-window.vala
++++ b/src/cheese-window.vala
+@@ -1216,9 +1216,9 @@ public class Cheese.MainWindow : Gtk.ApplicationWindow
+ */
+ public void on_switch_camera_clicked ()
+ {
+- Cheese.CameraDevice selected;
+- Cheese.CameraDevice next = null;
+- GLib.PtrArray cameras;
++ unowned Cheese.CameraDevice selected;
++ unowned Cheese.CameraDevice next = null;
++ GLib.GenericArray<unowned Cheese.CameraDevice> cameras;
+ uint i;
+
+ if (camera == null)
+@@ -1235,9 +1235,9 @@ public class Cheese.MainWindow : Gtk.ApplicationWindow
+
+ cameras = camera.get_camera_devices ();
+
+- for (i = 0; i < cameras.len; i++)
++ for (i = 0; i < cameras.length; i++)
+ {
+- next = (Cheese.CameraDevice )cameras.index (i);
++ next = cameras.get (i);
+
+ if (next == selected)
+ {
+@@ -1245,13 +1245,13 @@ public class Cheese.MainWindow : Gtk.ApplicationWindow
+ }
+ }
+
+- if (i + 1 < cameras.len)
++ if (i + 1 < cameras.length)
+ {
+- next = (Cheese.CameraDevice )cameras.index (i + 1);
++ next = cameras.get (i + 1);
+ }
+ else
+ {
+- next = (Cheese.CameraDevice )cameras.index (0);
++ next = cameras.get (0);
+ }
+
+ if (next == selected)
+@@ -1269,8 +1269,8 @@ public class Cheese.MainWindow : Gtk.ApplicationWindow
+ */
+ public void set_switch_camera_button_state ()
+ {
+- Cheese.CameraDevice selected;
+- GLib.PtrArray cameras;
++ unowned Cheese.CameraDevice selected;
++ GLib.GenericArray<unowned Cheese.CameraDevice> cameras;
+
+ if (camera == null)
+ {
+@@ -1288,7 +1288,7 @@ public class Cheese.MainWindow : Gtk.ApplicationWindow
+
+ cameras = camera.get_camera_devices ();
+
+- if (cameras.len > 1)
++ if (cameras.length > 1)
+ {
+ switch_camera_button.set_visible (true);
+ return;
+diff --git a/src/vapi/cheese-common.vapi b/src/vapi/cheese-common.vapi
+index 6517cdfc..e4ae7ad3 100644
+--- a/src/vapi/cheese-common.vapi
++++ b/src/vapi/cheese-common.vapi
+@@ -35,7 +35,7 @@ namespace Cheese
+ [CCode (has_construct_function = false)]
+ public Camera (Clutter.Actor video_texture, string camera_device_node, int x_resolution, int y_resolution);
+ public bool get_balance_property_range (string property, double min, double max, double def);
+- public unowned GLib.PtrArray get_camera_devices ();
++ public GLib.GenericArray<unowned Cheese.CameraDevice> get_camera_devices ();
+ public unowned Cheese.VideoFormat get_current_video_format ();
+ public int get_num_camera_devices ();
+ public unowned Cheese.CameraDevice get_selected_device ();
+--
+GitLab
+
diff --git a/gnu/packages/patches/classpath-miscompilation.patch b/gnu/packages/patches/classpath-miscompilation.patch
new file mode 100644
index 0000000000..c3a569ea4f
--- /dev/null
+++ b/gnu/packages/patches/classpath-miscompilation.patch
@@ -0,0 +1,71 @@
+For some reason, the original code gets miscompiled on x86_64, leading
+'Java_java_io_VMFile_isFile' to return true when the return value of
+'cpio_checkType' is ENOENT (= 2).
+
+See <https://issues.guix.gnu.org/issue/36685>
+and <https://issues.guix.gnu.org/49990>.
+
+diff --git a/native/jni/java-io/java_io_VMFile.c b/native/jni/java-io/java_io_VMFile.c
+index de1320b..6695e1f 100644
+--- a/native/jni/java-io/java_io_VMFile.c
++++ b/native/jni/java-io/java_io_VMFile.c
+@@ -240,6 +240,7 @@ Java_java_io_VMFile_exists (JNIEnv * env,
+ #ifndef WITHOUT_FILESYSTEM
+ const char *filename;
+ int result;
++ jboolean exists;
+
+ /* Don't use the JCL convert function because it throws an exception
+ on failure */
+@@ -250,9 +251,10 @@ Java_java_io_VMFile_exists (JNIEnv * env,
+ }
+
+ result = cpio_isFileExists (filename);
++ exists = (result == CPNATIVE_OK ? 1 : 0);
+ (*env)->ReleaseStringUTFChars (env, name, filename);
+
+- return result == CPNATIVE_OK ? 1 : 0;
++ return exists;
+ #else /* not WITHOUT_FILESYSTEM */
+ return 0;
+ #endif /* not WITHOUT_FILESYSTEM */
+@@ -278,6 +280,7 @@ Java_java_io_VMFile_isFile (JNIEnv * env,
+ const char *filename;
+ int result;
+ jint entryType;
++ jboolean isfile;
+
+ /* Don't use the JCL convert function because it throws an exception
+ on failure */
+@@ -288,9 +291,10 @@ Java_java_io_VMFile_isFile (JNIEnv * env,
+ }
+
+ result = cpio_checkType (filename, &entryType);
++ isfile = (result == CPNATIVE_OK && entryType == CPFILE_FILE ? 1 : 0);
+ (*env)->ReleaseStringUTFChars (env, name, filename);
+
+- return result == CPNATIVE_OK && entryType == CPFILE_FILE ? 1 : 0;
++ return isfile;
+ #else /* not WITHOUT_FILESYSTEM */
+ return 0;
+ #endif /* not WITHOUT_FILESYSTEM */
+@@ -315,6 +319,7 @@ Java_java_io_VMFile_isDirectory (JNIEnv * env,
+ const char *filename;
+ int result;
+ jint entryType;
++ jboolean isdirectory;
+
+ /* Don't use the JCL convert function because it throws an exception
+ on failure */
+@@ -325,9 +330,10 @@ Java_java_io_VMFile_isDirectory (JNIEnv * env,
+ }
+
+ result = cpio_checkType (filename, &entryType);
++ isdirectory = (result == CPNATIVE_OK && entryType == CPFILE_DIRECTORY ? 1 : 0);
+ (*env)->ReleaseStringUTFChars (env, name, filename);
+
+- return result == CPNATIVE_OK && entryType == CPFILE_DIRECTORY ? 1 : 0;
++ return isdirectory;
+ #else /* not WITHOUT_FILESYSTEM */
+ return 0;
+ #endif /* not WITHOUT_FILESYSTEM */
diff --git a/gnu/packages/patches/cling-use-shared-library.patch b/gnu/packages/patches/cling-use-shared-library.patch
new file mode 100644
index 0000000000..6385b307b3
--- /dev/null
+++ b/gnu/packages/patches/cling-use-shared-library.patch
@@ -0,0 +1,329 @@
+From 811f0a575231496318b5e9c9a0ff0ed195b16dc0 Mon Sep 17 00:00:00 2001
+From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
+Date: Tue, 7 Sep 2021 16:35:07 -0400
+Subject: [PATCH] build: Allow building Cling using the Clang shared library.
+
+The officially supported way to build LLVM/Clang as a shared library
+is via the LLVM_BUILD_LLVM_DYLIB and LLVM_LINK_LLVM_DYLIB CMake
+options (see: https://llvm.org/docs/BuildingADistribution.html). When
+built this way, the whole of Clang API is exposed as a shared
+library (libclang-cpp.so).
+
+* CMakeLists.txt: Query if we're in shared mode via llvm-config, and
+register the result as LLVM_LIB_IS_SHARED.
+[LLVM_LIB_IS_SHARED] <target_link_libraries>: Use the PUBLIC interface of the
+LLVM shared library.
+* lib/Interpreter/CMakeLists.txt [LLVM_LIB_IS_SHARED]: When defined, replace the
+individual Clang components by clang-cpp.
+* lib/MetaProcessor/CMakeLists.txt: Likewise.
+* lib/Utils/CMakeLists.txt: Likewise.
+* tools/Jupyter/CMakeLists.txt: Likewise.
+* tools/driver/CMakeLists.txt: Likewise.
+* tools/libcling/CMakeLists.txt: Likewise.
+---
+ CMakeLists.txt | 10 ++++++--
+ lib/Interpreter/CMakeLists.txt | 40 ++++++++++++++++++--------------
+ lib/MetaProcessor/CMakeLists.txt | 16 +++++++++----
+ lib/Utils/CMakeLists.txt | 34 +++++++++++++++------------
+ tools/Jupyter/CMakeLists.txt | 11 ++++++++-
+ tools/driver/CMakeLists.txt | 16 +++----------
+ tools/libcling/CMakeLists.txt | 38 +++++++++++++++---------------
+ 7 files changed, 93 insertions(+), 72 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 65b14b27..888f7ee9 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -23,6 +23,7 @@ if( CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR )
+ "--libdir"
+ "--includedir"
+ "--prefix"
++ "--shared-mode"
+ "--src-root")
+ execute_process(
+ COMMAND ${CONFIG_COMMAND}
+@@ -47,7 +48,8 @@ if( CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR )
+ list(GET CONFIG_OUTPUT 2 LIBRARY_DIR)
+ list(GET CONFIG_OUTPUT 3 INCLUDE_DIR)
+ list(GET CONFIG_OUTPUT 4 LLVM_OBJ_ROOT)
+- list(GET CONFIG_OUTPUT 5 MAIN_SRC_DIR)
++ list(GET CONFIG_OUTPUT 5 LLVM_LIB_IS_SHARED)
++ list(GET CONFIG_OUTPUT 6 MAIN_SRC_DIR)
+
+ if(NOT MSVC_IDE)
+ set(LLVM_ENABLE_ASSERTIONS ${ENABLE_ASSERTIONS}
+@@ -427,7 +429,11 @@ macro(add_cling_library name)
+ endif()
+
+ if(TARGET ${name})
+- target_link_libraries(${name} INTERFACE ${LLVM_COMMON_LIBS})
++ if(LLVM_LIB_IS_SHARED)
++ target_link_libraries(${name} PUBLIC LLVM)
++ else()
++ target_link_libraries(${name} INTERFACE ${LLVM_COMMON_LIBS})
++ endif()
+
+ if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY OR ${name} STREQUAL "libcling")
+ install(TARGETS ${name}
+diff --git a/lib/Interpreter/CMakeLists.txt b/lib/Interpreter/CMakeLists.txt
+index 921c773c..af65c020 100644
+--- a/lib/Interpreter/CMakeLists.txt
++++ b/lib/Interpreter/CMakeLists.txt
+@@ -6,22 +6,28 @@
+ # LICENSE.TXT for details.
+ #------------------------------------------------------------------------------
+
+-set(LIBS
+- clingUtils
+- clangCodeGen
+- clangDriver
+- clangFrontend
+- clangParse
+- clangSema
+- clangAnalysis
+- clangEdit
+- clangRewrite
+- clangRewriteFrontend
+- clangSerialization
+- clangAST
+- clangBasic
+- clangLex
+-)
++if (LLVM_LIB_IS_SHARED)
++ set(LIBS
++ clang-cpp
++ clingUtils)
++else()
++ set(LIBS
++ clingUtils
++ clangCodeGen
++ clangDriver
++ clangFrontend
++ clangParse
++ clangSema
++ clangAnalysis
++ clangEdit
++ clangRewrite
++ clangRewriteFrontend
++ clangSerialization
++ clangAST
++ clangBasic
++ clangLex
++ )
++endif()
+
+ set(LLVM_LINK_COMPONENTS
+ analysis
+@@ -369,4 +375,4 @@ if ((NOT builtin_llvm) AND builtin_clang)
+ get_property(P SOURCE TransactionUnloader.cpp PROPERTY INCLUDE_DIRECTORIES)
+ list(INSERT P 0 ${FixInclude})
+ set_property(SOURCE TransactionUnloader.cpp PROPERTY INCLUDE_DIRECTORIES "${P}")
+-endif()
+\ No newline at end of file
++endif()
+diff --git a/lib/MetaProcessor/CMakeLists.txt b/lib/MetaProcessor/CMakeLists.txt
+index e753dca3..5f4641bb 100644
+--- a/lib/MetaProcessor/CMakeLists.txt
++++ b/lib/MetaProcessor/CMakeLists.txt
+@@ -10,7 +10,16 @@ set( LLVM_LINK_COMPONENTS
+ core
+ support
+ binaryformat
+-)
++ )
++
++if (LLVM_LIB_IS_SHARED)
++ set(LIBS clang-cpp)
++else()
++ set(LIBS
++ clangLex
++ clangAST
++ clangBasic)
++endif()
+
+ add_cling_library(clingMetaProcessor OBJECT
+ Display.cpp
+@@ -21,10 +30,7 @@ add_cling_library(clingMetaProcessor OBJECT
+ MetaSema.cpp
+
+ LINK_LIBS
+- clangLex
+- clangAST
+- clangBasic
+-
++ ${LIBS}
+ clingInterpreter
+ clingUtils
+ )
+diff --git a/lib/Utils/CMakeLists.txt b/lib/Utils/CMakeLists.txt
+index 327c9fff..fbe4bd87 100644
+--- a/lib/Utils/CMakeLists.txt
++++ b/lib/Utils/CMakeLists.txt
+@@ -26,21 +26,25 @@ set(LLVM_LINK_COMPONENTS
+ ${LLVM_TARGETS_TO_BUILD}
+ )
+
+-set(LIBS
+- clangCodeGen
+- clangDriver
+- clangFrontend
+- clangParse
+- clangSema
+- clangAnalysis
+- clangEdit
+- clangRewrite
+- clangRewriteFrontend
+- clangSerialization
+- clangAST
+- clangBasic
+- clangLex
+-)
++if (LLVM_LIB_IS_SHARED)
++ set(LIBS clang-cpp)
++else()
++ set(LIBS
++ clangCodeGen
++ clangDriver
++ clangFrontend
++ clangParse
++ clangSema
++ clangAnalysis
++ clangEdit
++ clangRewrite
++ clangRewriteFrontend
++ clangSerialization
++ clangAST
++ clangBasic
++ clangLex
++ )
++endif()
+
+ find_library(DL_LIBRARY_PATH dl)
+ if (DL_LIBRARY_PATH)
+diff --git a/tools/Jupyter/CMakeLists.txt b/tools/Jupyter/CMakeLists.txt
+index aad5f3f7..8b4ac36f 100644
+--- a/tools/Jupyter/CMakeLists.txt
++++ b/tools/Jupyter/CMakeLists.txt
+@@ -39,6 +39,14 @@ else()
+ endif()
+ endif()
+
++if (LLVM_LIB_IS_SHARED)
++ set(LIBS
++ clang-cpp
++ clingUserInterface
++ clingMetaProcessor
++ ${INTERPRETER}
++ clingUtils)
++else()
+ set(LIBS
+ clangAST
+ clangBasic
+@@ -54,7 +62,8 @@ set(LIBS
+ clingMetaProcessor
+ ${INTERPRETER}
+ clingUtils
+- )
++ )
++endif()
+
+ if( LLVM_ENABLE_PIC )
+ set(ENABLE_SHARED SHARED)
+diff --git a/tools/driver/CMakeLists.txt b/tools/driver/CMakeLists.txt
+index 1968b97f..5ed53fb7 100644
+--- a/tools/driver/CMakeLists.txt
++++ b/tools/driver/CMakeLists.txt
+@@ -9,23 +9,13 @@
+ # Keep symbols for JIT resolution
+ set(LLVM_NO_DEAD_STRIP 1)
+
+-if(BUILD_SHARED_LIBS)
+- set(LIBS
+- LLVMSupport
+-
+- clangFrontendTool
+-
+- clingInterpreter
+- clingMetaProcessor
+- clingUserInterface
+- clingUtils
+- )
++if(LLVM_LIB_IS_SHARED)
++ set(LIBS clang-cpp clingUserInterface)
+ add_cling_executable(cling
+ cling.cpp
+ )
+ else()
+ set(LIBS
+- LLVMSupport
+
+ clangASTMatchers
+ clangFrontendTool
+@@ -38,7 +28,7 @@ else()
+ $<TARGET_OBJECTS:obj.clingMetaProcessor>
+ $<TARGET_OBJECTS:obj.clingUtils>
+ )
+-endif(BUILD_SHARED_LIBS)
++endif(LLVM_LIB_IS_SHARED)
+
+ set_target_properties(cling
+ PROPERTIES ENABLE_EXPORTS 1)
+diff --git a/tools/libcling/CMakeLists.txt b/tools/libcling/CMakeLists.txt
+index 143d3bdb..ba000d44 100644
+--- a/tools/libcling/CMakeLists.txt
++++ b/tools/libcling/CMakeLists.txt
+@@ -10,21 +10,25 @@ set(SOURCES
+ ADDITIONAL_HEADERS
+ )
+
+-set(LIBS
+- clangAnalysis
+- clangDriver
+- clangFrontend
+- clangParse
+- clangSema
+- clangAST
+- clangLex
+- clangSerialization
+- clangCodeGen
+- clangBasic
+- clangEdit
+-
+- clingUtils
+-)
++if (LLVM_LIB_IS_SHARED)
++ set(LIBS clang-cpp)
++else()
++ set(LIBS
++ clangAnalysis
++ clangDriver
++ clangFrontend
++ clangParse
++ clangSema
++ clangAST
++ clangLex
++ clangSerialization
++ clangCodeGen
++ clangBasic
++ clangEdit
++
++ clingUtils
++ )
++endif()
+
+ set( LLVM_LINK_COMPONENTS
+ analysis
+@@ -63,10 +67,6 @@ option(LIBCLING_BUILD_STATIC
+ # set(LLVM_EXPORTED_SYMBOL_FILE)
+ #endif()
+
+-if( LLVM_ENABLE_PIC )
+- set(ENABLE_SHARED SHARED)
+-endif()
+-
+ if((NOT LLVM_ENABLE_PIC OR LIBCLING_BUILD_STATIC) AND NOT WIN32)
+ set(ENABLE_STATIC STATIC)
+ endif()
+--
+2.33.0
+
diff --git a/gnu/packages/patches/coreutils-gnulib-tests.patch b/gnu/packages/patches/coreutils-gnulib-tests.patch
new file mode 100644
index 0000000000..7142401202
--- /dev/null
+++ b/gnu/packages/patches/coreutils-gnulib-tests.patch
@@ -0,0 +1,45 @@
+Fix Gnulib test failures showing up on ARMv7:
+
+ https://issues.guix.gnu.org/49459
+
+This is a backport of this Gnulib commit:
+
+ commit 175e0bc72808d564074c4adcc72aeadb74adfcc6
+ Author: Paul Eggert <eggert@cs.ucla.edu>
+ Date: Thu Aug 27 17:52:58 2020 -0700
+
+ perror, strerror_r: remove unportable tests
+
+ Problem reported by Florian Weimer in:
+ https://lists.gnu.org/r/bug-gnulib/2020-08/msg00220.html
+ * tests/test-perror2.c (main):
+ * tests/test-strerror_r.c (main): Omit unportable tests.
+
+diff --git a/tests/test-perror2.c b/tests/test-perror2.c
+index 1d14eda7be..c6214dd25c 100644
+--- a/gnulib-tests/test-perror2.c
++++ b/gnulib-tests/test-perror2.c
+@@ -79,9 +79,6 @@ main (void)
+ errno = -5;
+ perror ("");
+ ASSERT (!ferror (stderr));
+- ASSERT (msg1 == msg2 || msg1 == msg4 || STREQ (msg1, str1));
+- ASSERT (msg2 == msg4 || STREQ (msg2, str2));
+- ASSERT (msg3 == msg4 || STREQ (msg3, str3));
+ ASSERT (STREQ (msg4, str4));
+
+ free (str1);
+diff --git a/tests/test-strerror_r.c b/tests/test-strerror_r.c
+index b11d6fd9f6..c1dbcf837b 100644
+--- a/gnulib-tests/test-strerror_r.c
++++ b/gnulib-tests/test-strerror_r.c
+@@ -165,9 +165,6 @@ main (void)
+
+ strerror_r (EACCES, buf, sizeof buf);
+ strerror_r (-5, buf, sizeof buf);
+- ASSERT (msg1 == msg2 || msg1 == msg4 || STREQ (msg1, str1));
+- ASSERT (msg2 == msg4 || STREQ (msg2, str2));
+- ASSERT (msg3 == msg4 || STREQ (msg3, str3));
+ ASSERT (STREQ (msg4, str4));
+
+ free (str1);
diff --git a/gnu/packages/patches/cups-CVE-2020-10001.patch b/gnu/packages/patches/cups-CVE-2020-10001.patch
deleted file mode 100644
index 1b16c7d97c..0000000000
--- a/gnu/packages/patches/cups-CVE-2020-10001.patch
+++ /dev/null
@@ -1,47 +0,0 @@
-From efbea1742bd30f842fbbfb87a473e5c84f4162f9 Mon Sep 17 00:00:00 2001
-From: Michael R Sweet <msweet@msweet.org>
-Date: Mon, 1 Feb 2021 15:02:32 -0500
-Subject: [PATCH] Fix a buffer (read) overflow in ippReadIO (CVE-2020-10001)
-
----
-
-diff --git a/cups/ipp.c b/cups/ipp.c
-index 3d529346c..adbb26fba 100644
---- a/cups/ipp.c
-+++ b/cups/ipp.c
-@@ -2866,7 +2866,8 @@ ippReadIO(void *src, /* I - Data source */
- unsigned char *buffer, /* Data buffer */
- string[IPP_MAX_TEXT],
- /* Small string buffer */
-- *bufptr; /* Pointer into buffer */
-+ *bufptr, /* Pointer into buffer */
-+ *bufend; /* End of buffer */
- ipp_attribute_t *attr; /* Current attribute */
- ipp_tag_t tag; /* Current tag */
- ipp_tag_t value_tag; /* Current value tag */
-@@ -3441,6 +3442,7 @@ ippReadIO(void *src, /* I - Data source */
- }
-
- bufptr = buffer;
-+ bufend = buffer + n;
-
- /*
- * text-with-language and name-with-language are composite
-@@ -3454,7 +3456,7 @@ ippReadIO(void *src, /* I - Data source */
-
- n = (bufptr[0] << 8) | bufptr[1];
-
-- if ((bufptr + 2 + n) >= (buffer + IPP_BUF_SIZE) || n >= (int)sizeof(string))
-+ if ((bufptr + 2 + n + 2) > bufend || n >= (int)sizeof(string))
- {
- _cupsSetError(IPP_STATUS_ERROR_INTERNAL,
- _("IPP language length overflows value."), 1);
-@@ -3481,7 +3483,7 @@ ippReadIO(void *src, /* I - Data source */
- bufptr += 2 + n;
- n = (bufptr[0] << 8) | bufptr[1];
-
-- if ((bufptr + 2 + n) >= (buffer + IPP_BUF_SIZE))
-+ if ((bufptr + 2 + n) > bufend)
- {
- _cupsSetError(IPP_STATUS_ERROR_INTERNAL,
- _("IPP string length overflows value."), 1);
diff --git a/gnu/packages/patches/curl-7.76-use-ssl-cert-env.patch b/gnu/packages/patches/curl-7.76-use-ssl-cert-env.patch
deleted file mode 100644
index 24be6e31d9..0000000000
--- a/gnu/packages/patches/curl-7.76-use-ssl-cert-env.patch
+++ /dev/null
@@ -1,64 +0,0 @@
-Make libcurl respect the SSL_CERT_{DIR,FILE} variables by default. The variables
-are fetched during initialization to preserve thread-safety (curl_global_init(3)
-must be called when no other threads exist).
-
-This fixes network functionality in rust:cargo, and probably removes the need
-for other future workarounds.
-===================================================================
---- curl-7.66.0.orig/lib/easy.c 2020-01-02 15:43:11.883921171 +0100
-+++ curl-7.66.0/lib/easy.c 2020-01-02 16:18:54.691882797 +0100
-@@ -134,6 +134,9 @@
- # pragma warning(default:4232) /* MSVC extension, dllimport identity */
- #endif
-
-+char * Curl_ssl_cert_dir = NULL;
-+char * Curl_ssl_cert_file = NULL;
-+
- /**
- * curl_global_init() globally initializes curl given a bitwise set of the
- * different features of what to initialize.
-@@ -155,6 +158,9 @@
- #endif
- }
-
-+ Curl_ssl_cert_dir = curl_getenv("SSL_CERT_DIR");
-+ Curl_ssl_cert_file = curl_getenv("SSL_CERT_FILE");
-+
- if(!Curl_ssl_init()) {
- DEBUGF(fprintf(stderr, "Error: Curl_ssl_init failed\n"));
- return CURLE_FAILED_INIT;
-@@ -260,6 +266,9 @@
- Curl_ssl_cleanup();
- Curl_resolver_global_cleanup();
-
-+ free(Curl_ssl_cert_dir);
-+ free(Curl_ssl_cert_file);
-+
- #ifdef WIN32
- Curl_win32_cleanup(init_flags);
- #endif
-diff -ur curl-7.66.0.orig/lib/url.c curl-7.66.0/lib/url.c
---- curl-7.66.0.orig/lib/url.c 2020-01-02 15:43:11.883921171 +0100
-+++ curl-7.66.0/lib/url.c 2020-01-02 16:21:11.563880346 +0100
-@@ -524,6 +524,21 @@
- if(result)
- return result;
- #endif
-+ extern char * Curl_ssl_cert_dir;
-+ extern char * Curl_ssl_cert_file;
-+ if(Curl_ssl_cert_dir) {
-+ if(result = Curl_setstropt(&set->str[STRING_SSL_CAPATH], Curl_ssl_cert_dir))
-+ return result;
-+ if(result = Curl_setstropt(&set->str[STRING_SSL_CAPATH_PROXY], Curl_ssl_cert_dir))
-+ return result;
-+ }
-+
-+ if(Curl_ssl_cert_file) {
-+ if(result = Curl_setstropt(&set->str[STRING_SSL_CAFILE], Curl_ssl_cert_file))
-+ return result;
-+ if(result = Curl_setstropt(&set->str[STRING_SSL_CAFILE_PROXY], Curl_ssl_cert_file))
-+ return result;
-+ }
- }
-
- set->wildcard_enabled = FALSE;
diff --git a/gnu/packages/patches/curl-7.77-tls-priority-string.patch b/gnu/packages/patches/curl-7.77-tls-priority-string.patch
deleted file mode 100644
index bf1bfa8aaa..0000000000
--- a/gnu/packages/patches/curl-7.77-tls-priority-string.patch
+++ /dev/null
@@ -1,98 +0,0 @@
-cURL 7.77.0 would use a bogus TLS priority string favoring older TLS
-protocol versions, which in turn would prevent access to bitbucket.org:
-
- https://issues.guix.gnu.org/49035
- https://github.com/curl/curl/pull/7278
-
-This patch fixes it.
-From <https://github.com/curl/curl/pull/7278/commits/b98f79f6ecdb708c67f9a0cec56ce48952a54556>.
-
-From b98f79f6ecdb708c67f9a0cec56ce48952a54556 Mon Sep 17 00:00:00 2001
-From: Daniel Stenberg <daniel@haxx.se>
-Date: Fri, 18 Jun 2021 14:54:07 +0200
-Subject: [PATCH] gnutls: set the prefer ciphers in correct order
-
-Reported-by: civodul on github
-Assisted-by: Nikos Mavrogiannopoulos
-Fixes #7277
----
- lib/vtls/gtls.c | 30 +++++++++++++-----------------
- 1 file changed, 13 insertions(+), 17 deletions(-)
-
-diff --git a/lib/vtls/gtls.c b/lib/vtls/gtls.c
-index d9bc5611e8f9..da2af64955c3 100644
---- a/lib/vtls/gtls.c
-+++ b/lib/vtls/gtls.c
-@@ -330,6 +330,9 @@ set_ssl_version_min_max(struct Curl_easy *data,
- ssl_version_max = CURL_SSLVERSION_MAX_TLSv1_2;
- }
- }
-+ else if(ssl_version_max == CURL_SSLVERSION_MAX_DEFAULT) {
-+ ssl_version_max = CURL_SSLVERSION_MAX_TLSv1_3;
-+ }
-
- switch(ssl_version | ssl_version_max) {
- case CURL_SSLVERSION_TLSv1_0 | CURL_SSLVERSION_MAX_TLSv1_0:
-@@ -338,11 +341,11 @@ set_ssl_version_min_max(struct Curl_easy *data,
- return CURLE_OK;
- case CURL_SSLVERSION_TLSv1_0 | CURL_SSLVERSION_MAX_TLSv1_1:
- *prioritylist = GNUTLS_CIPHERS ":-VERS-SSL3.0:-VERS-TLS-ALL:"
-- "+VERS-TLS1.0:+VERS-TLS1.1";
-+ "+VERS-TLS1.1:+VERS-TLS1.0";
- return CURLE_OK;
- case CURL_SSLVERSION_TLSv1_0 | CURL_SSLVERSION_MAX_TLSv1_2:
- *prioritylist = GNUTLS_CIPHERS ":-VERS-SSL3.0:-VERS-TLS-ALL:"
-- "+VERS-TLS1.0:+VERS-TLS1.1:+VERS-TLS1.2";
-+ "+VERS-TLS1.2:+VERS-TLS1.1:+VERS-TLS1.0";
- return CURLE_OK;
- case CURL_SSLVERSION_TLSv1_1 | CURL_SSLVERSION_MAX_TLSv1_1:
- *prioritylist = GNUTLS_CIPHERS ":-VERS-SSL3.0:-VERS-TLS-ALL:"
-@@ -350,7 +353,7 @@ set_ssl_version_min_max(struct Curl_easy *data,
- return CURLE_OK;
- case CURL_SSLVERSION_TLSv1_1 | CURL_SSLVERSION_MAX_TLSv1_2:
- *prioritylist = GNUTLS_CIPHERS ":-VERS-SSL3.0:-VERS-TLS-ALL:"
-- "+VERS-TLS1.1:+VERS-TLS1.2";
-+ "+VERS-TLS1.2:+VERS-TLS1.1";
- return CURLE_OK;
- case CURL_SSLVERSION_TLSv1_2 | CURL_SSLVERSION_MAX_TLSv1_2:
- *prioritylist = GNUTLS_CIPHERS ":-VERS-SSL3.0:-VERS-TLS-ALL:"
-@@ -360,25 +363,17 @@ set_ssl_version_min_max(struct Curl_easy *data,
- *prioritylist = GNUTLS_CIPHERS ":-VERS-SSL3.0:-VERS-TLS-ALL:"
- "+VERS-TLS1.3";
- return CURLE_OK;
-- case CURL_SSLVERSION_TLSv1_0 | CURL_SSLVERSION_MAX_DEFAULT:
-- *prioritylist = GNUTLS_CIPHERS ":-VERS-SSL3.0:-VERS-TLS-ALL:"
-- "+VERS-TLS1.0:+VERS-TLS1.1:+VERS-TLS1.2"
-- ":+VERS-TLS1.3";
-+ case CURL_SSLVERSION_TLSv1_0 | CURL_SSLVERSION_MAX_TLSv1_3:
-+ *prioritylist = GNUTLS_CIPHERS ":-VERS-SSL3.0";
- return CURLE_OK;
-- case CURL_SSLVERSION_TLSv1_1 | CURL_SSLVERSION_MAX_DEFAULT:
-+ case CURL_SSLVERSION_TLSv1_1 | CURL_SSLVERSION_MAX_TLSv1_3:
- *prioritylist = GNUTLS_CIPHERS ":-VERS-SSL3.0:-VERS-TLS-ALL:"
-- "+VERS-TLS1.1:+VERS-TLS1.2"
-- ":+VERS-TLS1.3";
-+ "+VERS-TLS1.3:+VERS-TLS1.2:+VERS-TLS1.1";
- return CURLE_OK;
-- case CURL_SSLVERSION_TLSv1_2 | CURL_SSLVERSION_MAX_DEFAULT:
-+ case CURL_SSLVERSION_TLSv1_2 | CURL_SSLVERSION_MAX_TLSv1_3:
- *prioritylist = GNUTLS_CIPHERS ":-VERS-SSL3.0:-VERS-TLS-ALL:"
-- "+VERS-TLS1.2"
-- ":+VERS-TLS1.3";
-+ "+VERS-TLS1.3:+VERS-TLS1.2";
- return CURLE_OK;
-- case CURL_SSLVERSION_TLSv1_3 | CURL_SSLVERSION_MAX_DEFAULT:
-- *prioritylist = GNUTLS_CIPHERS ":-VERS-SSL3.0:-VERS-TLS-ALL:"
-- "+VERS-TLS1.2"
-- ":+VERS-TLS1.3";
- return CURLE_OK;
- }
-
-@@ -608,6 +603,7 @@ gtls_connect_step1(struct Curl_easy *data,
- }
- else {
- #endif
-+ infof(data, "GnuTLS ciphers: %s\n", prioritylist);
- rc = gnutls_priority_set_direct(session, prioritylist, &err);
- #ifdef HAVE_GNUTLS_SRP
- }
diff --git a/gnu/packages/patches/curl-use-ssl-cert-env.patch b/gnu/packages/patches/curl-use-ssl-cert-env.patch
index c8e80b4445..24be6e31d9 100644
--- a/gnu/packages/patches/curl-use-ssl-cert-env.patch
+++ b/gnu/packages/patches/curl-use-ssl-cert-env.patch
@@ -47,14 +47,14 @@ diff -ur curl-7.66.0.orig/lib/url.c curl-7.66.0/lib/url.c
+ extern char * Curl_ssl_cert_dir;
+ extern char * Curl_ssl_cert_file;
+ if(Curl_ssl_cert_dir) {
-+ if(result = Curl_setstropt(&set->str[STRING_SSL_CAPATH_ORIG], Curl_ssl_cert_dir))
++ if(result = Curl_setstropt(&set->str[STRING_SSL_CAPATH], Curl_ssl_cert_dir))
+ return result;
+ if(result = Curl_setstropt(&set->str[STRING_SSL_CAPATH_PROXY], Curl_ssl_cert_dir))
+ return result;
+ }
+
+ if(Curl_ssl_cert_file) {
-+ if(result = Curl_setstropt(&set->str[STRING_SSL_CAFILE_ORIG], Curl_ssl_cert_file))
++ if(result = Curl_setstropt(&set->str[STRING_SSL_CAFILE], Curl_ssl_cert_file))
+ return result;
+ if(result = Curl_setstropt(&set->str[STRING_SSL_CAFILE_PROXY], Curl_ssl_cert_file))
+ return result;
diff --git a/gnu/packages/patches/dbus-CVE-2020-12049.patch b/gnu/packages/patches/dbus-CVE-2020-12049.patch
deleted file mode 100644
index 71280144a1..0000000000
--- a/gnu/packages/patches/dbus-CVE-2020-12049.patch
+++ /dev/null
@@ -1,58 +0,0 @@
-Fix CVE-2020-12049:
-
-https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-12049
-https://lists.freedesktop.org/archives/ftp-release/2020-June/000753.html
-
-Taken from upstream:
-
-https://gitlab.freedesktop.org/dbus/dbus/-/commit/272d484283883fa9ff95b69d924fff6cd34842f5
-
-diff --git a/dbus/dbus-sysdeps-unix.c b/dbus/dbus-sysdeps-unix.c
---- a/dbus/dbus-sysdeps-unix.c
-+++ b/dbus/dbus-sysdeps-unix.c
-@@ -435,18 +435,6 @@ _dbus_read_socket_with_unix_fds (DBusSocket fd,
- struct cmsghdr *cm;
- dbus_bool_t found = FALSE;
-
-- if (m.msg_flags & MSG_CTRUNC)
-- {
-- /* Hmm, apparently the control data was truncated. The bad
-- thing is that we might have completely lost a couple of fds
-- without chance to recover them. Hence let's treat this as a
-- serious error. */
--
-- errno = ENOSPC;
-- _dbus_string_set_length (buffer, start);
-- return -1;
-- }
--
- for (cm = CMSG_FIRSTHDR(&m); cm; cm = CMSG_NXTHDR(&m, cm))
- if (cm->cmsg_level == SOL_SOCKET && cm->cmsg_type == SCM_RIGHTS)
- {
-@@ -501,6 +489,26 @@ _dbus_read_socket_with_unix_fds (DBusSocket fd,
- if (!found)
- *n_fds = 0;
-
-+ if (m.msg_flags & MSG_CTRUNC)
-+ {
-+ unsigned int i;
-+
-+ /* Hmm, apparently the control data was truncated. The bad
-+ thing is that we might have completely lost a couple of fds
-+ without chance to recover them. Hence let's treat this as a
-+ serious error. */
-+
-+ /* We still need to close whatever fds we *did* receive,
-+ * otherwise they'll never get closed. (CVE-2020-12049) */
-+ for (i = 0; i < *n_fds; i++)
-+ close (fds[i]);
-+
-+ *n_fds = 0;
-+ errno = ENOSPC;
-+ _dbus_string_set_length (buffer, start);
-+ return -1;
-+ }
-+
- /* put length back (doesn't actually realloc) */
- _dbus_string_set_length (buffer, start + bytes_read);
-
diff --git a/gnu/packages/patches/diffutils-fix-signal-processing.patch b/gnu/packages/patches/diffutils-fix-signal-processing.patch
new file mode 100644
index 0000000000..134dd3f718
--- /dev/null
+++ b/gnu/packages/patches/diffutils-fix-signal-processing.patch
@@ -0,0 +1,58 @@
+Author: Frédéric Bonnard <frediz@debian.org>
+
+Obtained from:
+
+https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=922552#19
+
+Fixes bug reported upstream at:
+
+https://debbugs.gnu.org/cgi/bugreport.cgi?bug=34519
+
+diff --git a/src/diff.c b/src/diff.c
+index e2eb32437353..b574e8282dc9 100644
+--- a/src/diff.c
++++ b/src/diff.c
+@@ -1451,6 +1451,8 @@ compare_files (struct comparison const *parent,
+ }
+ }
+
++ final_process_signals ();
++
+ /* Now the comparison has been done, if no error prevented it,
+ and STATUS is the value this function will return. */
+
+diff --git a/src/diff.h b/src/diff.h
+index 03daaa4a0530..e177fe600a25 100644
+--- a/src/diff.h
++++ b/src/diff.h
+@@ -390,6 +390,7 @@ extern enum changes analyze_hunk (struct change *, lin *, lin *, lin *, lin *);
+ extern void begin_output (void);
+ extern void debug_script (struct change *);
+ extern void fatal (char const *) __attribute__((noreturn));
++extern void final_process_signals (void);
+ extern void finish_output (void);
+ extern void message (char const *, char const *, char const *);
+ extern void message5 (char const *, char const *, char const *,
+diff --git a/src/util.c b/src/util.c
+index 4f4d9bb285eb..56d292de2927 100644
+--- a/src/util.c
++++ b/src/util.c
+@@ -237,6 +237,18 @@ process_signals (void)
+ }
+ }
+
++/* Process remaining signals once before exit */
++void
++final_process_signals (void)
++{
++ static int last = 1;
++
++ if (last) {
++ process_signals ();
++ last = 0;
++ }
++}
++
+ static void
+ install_signal_handlers (void)
+ {
diff --git a/gnu/packages/patches/diffutils-gets-undeclared.patch b/gnu/packages/patches/diffutils-gets-undeclared.patch
deleted file mode 100644
index b6cdc77caa..0000000000
--- a/gnu/packages/patches/diffutils-gets-undeclared.patch
+++ /dev/null
@@ -1,71 +0,0 @@
-This patch is needed to allow builds with newer versions of
-the GNU libc (2.16+).
-
-
-commit 66712c23388e93e5c518ebc8515140fa0c807348
-Author: Eric Blake <eblake@redhat.com>
-Date: Thu Mar 29 13:30:41 2012 -0600
-
- stdio: don't assume gets any more
-
- Gnulib intentionally does not have a gets module, and now that C11
- and glibc have dropped it, we should be more proactive about warning
- any user on a platform that still has a declaration of this dangerous
- interface.
-
- * m4/stdio_h.m4 (gl_STDIO_H, gl_STDIO_H_DEFAULTS): Drop gets
- support.
- * modules/stdio (Makefile.am): Likewise.
- * lib/stdio-read.c (gets): Likewise.
- * tests/test-stdio-c++.cc: Likewise.
- * m4/warn-on-use.m4 (gl_WARN_ON_USE_PREPARE): Fix comment.
- * lib/stdio.in.h (gets): Make warning occur in more places.
- * doc/posix-functions/gets.texi (gets): Update documentation.
- Reported by Christer Solskogen.
-
- Signed-off-by: Eric Blake <eblake@redhat.com>
-
-diff --git a/lib/stdio.in.h b/lib/stdio.in.h
-index aa7b599..c377b6e 100644
---- a/lib/stdio.in.h
-+++ b/lib/stdio.in.h
-@@ -698,22 +698,11 @@ _GL_WARN_ON_USE (getline, "getline is unportable - "
- # endif
- #endif
-
--#if @GNULIB_GETS@
--# if @REPLACE_STDIO_READ_FUNCS@ && @GNULIB_STDIO_H_NONBLOCKING@
--# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
--# undef gets
--# define gets rpl_gets
--# endif
--_GL_FUNCDECL_RPL (gets, char *, (char *s) _GL_ARG_NONNULL ((1)));
--_GL_CXXALIAS_RPL (gets, char *, (char *s));
--# else
--_GL_CXXALIAS_SYS (gets, char *, (char *s));
--# undef gets
--# endif
--_GL_CXXALIASWARN (gets);
- /* It is very rare that the developer ever has full control of stdin,
-- so any use of gets warrants an unconditional warning. Assume it is
-- always declared, since it is required by C89. */
-+ so any use of gets warrants an unconditional warning; besides, C11
-+ removed it. */
-+#undef gets
-+#if HAVE_RAW_DECL_GETS
- _GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
- #endif
-
-@@ -1053,9 +1042,9 @@ _GL_WARN_ON_USE (snprintf, "snprintf is unportable - "
- # endif
- #endif
-
--/* Some people would argue that sprintf should be handled like gets
-- (for example, OpenBSD issues a link warning for both functions),
-- since both can cause security holes due to buffer overruns.
-+/* Some people would argue that all sprintf uses should be warned about
-+ (for example, OpenBSD issues a link warning for it),
-+ since it can cause security holes due to buffer overruns.
- However, we believe that sprintf can be used safely, and is more
- efficient than snprintf in those safe cases; and as proof of our
- belief, we use sprintf in several gnulib modules. So this header
diff --git a/gnu/packages/patches/docbook-xsl-nonrecursive-string-subst.patch b/gnu/packages/patches/docbook-xsl-nonrecursive-string-subst.patch
index 4199dd18a5..fed4b76429 100644
--- a/gnu/packages/patches/docbook-xsl-nonrecursive-string-subst.patch
+++ b/gnu/packages/patches/docbook-xsl-nonrecursive-string-subst.patch
@@ -5,7 +5,7 @@ https://bugzilla.samba.org/show_bug.cgi?id=9515
https://bugzilla.gnome.org/show_bug.cgi?id=736077 (for xsltproc)
Patch copied from Debian:
-https://anonscm.debian.org/cgit/collab-maint/docbook-xsl.git/tree/debian/patches/765567_non-recursive_string_subst.patch
+https://salsa.debian.org/debian/docbook-xsl/-/blob/master/debian/patches/765567_non-recursive_string_subst.patch
Description: use EXSLT "replace" function when available
A recursive implementation of string.subst is problematic,
@@ -15,11 +15,12 @@ Bug-Debian: https://bugs.debian.org/750593
--- a/lib/lib.xsl
+++ b/lib/lib.xsl
-@@ -10,7 +10,10 @@
+@@ -6,7 +6,11 @@
+
This module implements DTD-independent functions
- ******************************************************************** -->
--<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+- ******************************************************************** --><xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
++ ******************************************************************** -->
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:str="http://exslt.org/strings"
+ exclude-result-prefixes="str"
@@ -27,7 +28,7 @@ Bug-Debian: https://bugs.debian.org/750593
<xsl:template name="dot.count">
<!-- Returns the number of "." characters in a string -->
-@@ -56,6 +59,9 @@
+@@ -52,6 +56,9 @@
<xsl:param name="replacement"/>
<xsl:choose>
diff --git a/gnu/packages/patches/docbook-xsl-support-old-url.patch b/gnu/packages/patches/docbook-xsl-support-old-url.patch
new file mode 100644
index 0000000000..5b7dda458f
--- /dev/null
+++ b/gnu/packages/patches/docbook-xsl-support-old-url.patch
@@ -0,0 +1,17 @@
+Docbook 1.79.2 makes very few changes apart from changing the canonical URL
+to cdn.docbook.org. This patch adds support for the previous URL to avoid
+breaking packages that still use that.
+
+Adapted from Debian:
+https://salsa.debian.org/debian/docbook-xsl/-/blob/master/debian/patches/0005-catalog.xml-Compatibility-with-1.79.1-or-earlier.patch
+
+--- a/catalog.xml
++++ b/catalog.xml
+@@ -5,4 +5,7 @@
+ <rewriteSystem systemIdStartString="http://cdn.docbook.org/release/xsl/current/" rewritePrefix="./"/>
+ <rewriteURI uriStartString="http://cdn.docbook.org/release/xsl/1.79.2/" rewritePrefix="./"/>
+ <rewriteSystem systemIdStartString="http://cdn.docbook.org/release/xsl/1.79.2/" rewritePrefix="./"/>
++ <!-- Also support old URI of v1.79.1 or earlier -->
++ <rewriteURI uriStartString="http://docbook.sourceforge.net/release/xsl/current/" rewritePrefix="./"/>
++ <rewriteSystem systemIdStartString="http://docbook.sourceforge.net/release/xsl/current/" rewritePrefix="./"/>
+ </catalog>
diff --git a/gnu/packages/patches/doxygen-1.8.17-runtests.patch b/gnu/packages/patches/doxygen-1.8.17-runtests.patch
deleted file mode 100644
index 0340c72448..0000000000
--- a/gnu/packages/patches/doxygen-1.8.17-runtests.patch
+++ /dev/null
@@ -1,73 +0,0 @@
-1.8.17 was released with a broken test runner.
-
-https://github.com/doxygen/doxygen/issues/7464
-
-Taken from upstream:
-https://github.com/doxygen/doxygen/commit/cd9dee013dc749a10bbe019c350e0e62b6635795
-
-diff --git a/testing/runtests.py b/testing/runtests.py
-index a4118b865..10fe50214 100755
---- a/testing/runtests.py
-+++ b/testing/runtests.py
-@@ -3,6 +3,7 @@
- from __future__ import print_function
- import argparse, glob, itertools, re, shutil, os, sys
- import subprocess
-+import shlex
-
- config_reg = re.compile('.*\/\/\s*(?P<name>\S+):\s*(?P<value>.*)$')
-
-@@ -28,10 +29,10 @@ def xpopen(cmd, cmd1="",encoding='utf-8-sig', getStderr=False):
- return os.popen(cmd).read() # Python 2 without encoding
- else:
- if (getStderr):
-- proc = subprocess.run(cmd1,encoding=encoding,capture_output=True) # Python 3 with encoding
-- return proc.stderr
-+ proc = subprocess.Popen(shlex.split(cmd1),stdout=subprocess.PIPE,stderr=subprocess.PIPE,encoding=encoding) # Python 3 with encoding
-+ return proc.stderr.read()
- else:
-- proc = subprocess.Popen(cmd,stdout=subprocess.PIPE,stderr=subprocess.PIPE,encoding=encoding) # Python 3 with encoding
-+ proc = subprocess.Popen(shlex.split(cmd),stdout=subprocess.PIPE,stderr=subprocess.PIPE,encoding=encoding) # Python 3 with encoding
- return proc.stdout.read()
-
- class Tester:
-@@ -137,7 +138,7 @@ def prepare_test(self):
- print('GENERATE_DOCBOOK=NO', file=f)
- if (self.args.xhtml):
- print('GENERATE_HTML=YES', file=f)
-- # HTML_OUTPUT can also be set locally
-+ # HTML_OUTPUT can also have been set locally
- print('HTML_OUTPUT=%s/html' % self.test_out, file=f)
- print('HTML_FILE_EXTENSION=.xhtml', file=f)
- if (self.args.pdf):
-@@ -184,7 +185,7 @@ def update_test(self,testmgr):
- print('Non-existing file %s after \'check:\' statement' % check_file)
- return
- # convert output to canonical form
-- data = xpopen('%s --format --noblanks --nowarning %s' % (self.args.xmllint,check_file)).read()
-+ data = xpopen('%s --format --noblanks --nowarning %s' % (self.args.xmllint,check_file))
- if data:
- # strip version
- data = re.sub(r'xsd" version="[0-9.-]+"','xsd" version=""',data).rstrip('\n')
-@@ -326,7 +327,7 @@ def perform_test(self,testmgr):
- tests.append(glob.glob('%s/*.xml' % (docbook_output)))
- tests.append(glob.glob('%s/*/*/*.xml' % (docbook_output)))
- tests = ' '.join(list(itertools.chain.from_iterable(tests))).replace(self.args.outputdir +'/','').replace('\\','/')
-- exe_string = '%s --nonet --postvalid %s' % (self.args.xmllint,tests)
-+ exe_string = '%s --noout --nonet --postvalid %s' % (self.args.xmllint,tests)
- exe_string1 = exe_string
- exe_string += ' %s' % (redirx)
- exe_string += ' %s more "%s/temp"' % (separ,docbook_output)
-@@ -346,7 +347,11 @@ def perform_test(self,testmgr):
- redirx=' 2> %s/temp >nul:'%html_output
- else:
- redirx='2>%s/temp >/dev/null'%html_output
-- exe_string = '%s --path dtd --nonet --postvalid %s/*xhtml' % (self.args.xmllint,html_output)
-+ check_file = []
-+ check_file.append(glob.glob('%s/*.xhtml' % (html_output)))
-+ check_file.append(glob.glob('%s/*/*/*.xhtml' % (html_output)))
-+ check_file = ' '.join(list(itertools.chain.from_iterable(check_file))).replace(self.args.outputdir +'/','').replace('\\','/')
-+ exe_string = '%s --noout --path dtd --nonet --postvalid %s' % (self.args.xmllint,check_file)
- exe_string1 = exe_string
- exe_string += ' %s' % (redirx)
- exe_string += ' %s more "%s/temp"' % (separ,html_output)
diff --git a/gnu/packages/patches/doxygen-test.patch b/gnu/packages/patches/doxygen-test.patch
deleted file mode 100644
index 1c0d4eb946..0000000000
--- a/gnu/packages/patches/doxygen-test.patch
+++ /dev/null
@@ -1,60 +0,0 @@
-Modify the expected outcome of test 012 so that it passes when bibtex is
-not in the path, as we do not wish to add texlive as an input just for this
-test.
-
-diff -u -r doxygen-1.8.7.orig/testing/012/citelist.xml doxygen-1.8.7/testing/012/citelist.xml
---- doxygen-1.8.7.orig/testing/012/citelist.xml 2014-04-24 23:43:34.000000000 +0200
-+++ doxygen-1.8.7/testing/012/citelist.xml 2014-04-24 23:49:43.000000000 +0200
-@@ -6,38 +6,6 @@
- <briefdescription>
- </briefdescription>
- <detaileddescription>
-- <para>
-- <variablelist>
-- <varlistentry>
-- <term><anchor id="citelist_1CITEREF_Be09"/>[1]</term>
-- </varlistentry>
-- <listitem>
-- <para>P.<nonbreakablespace/>Belotti. <ulink url="http://doi.org/10.1007/978-1-4614-1927-3_5">Disjunctive cuts for non-convex MINLP</ulink>. In <ulink url="#CITEREF_LeLe12">Lee and Leyffer</ulink> <ulink url="#CITEREF_LeLe12">[4]</ulink>, pages 117<ndash/>144.</para>
-- <para/>
-- </listitem>
-- <varlistentry>
-- <term><anchor id="citelist_1CITEREF_BertholdHeinzVigerske2009"/>[2]</term>
-- </varlistentry>
-- <listitem>
-- <para>T.<nonbreakablespace/>Berthold, S.<nonbreakablespace/>Heinz, and S.<nonbreakablespace/>Vigerske. <ulink url="http://doi.org/10.1007/978-1-4614-1927-3_15">Extending a CIP framework to solve MIQCPs</ulink>. In <ulink url="#CITEREF_LeLe12">Lee and Leyffer</ulink> <ulink url="#CITEREF_LeLe12">[4]</ulink>, pages 427<ndash/>444.</para>
-- <para/>
-- </listitem>
-- <varlistentry>
-- <term><anchor id="citelist_1CITEREF_knuth79"/>[3]</term>
-- </varlistentry>
-- <listitem>
-- <para>Donald<nonbreakablespace/>E. Knuth. <emphasis>Tex and Metafont, New Directions in Typesetting</emphasis>. American Mathematical Society and Digital Press, Stanford, 1979.</para>
-- <para/>
-- </listitem>
-- <varlistentry>
-- <term><anchor id="citelist_1CITEREF_LeLe12"/>[4]</term>
-- </varlistentry>
-- <listitem>
-- <para>Jon Lee and Sven Leyffer, editors. <ulink url="http://doi.org/10.1007/978-1-4614-1927-3"><emphasis>Mixed Integer Nonlinear Programming</emphasis></ulink>, volume 154 of <emphasis>The IMA Volumes in Mathematics and its Applications</emphasis>. Springer, 2012.</para>
-- <para/>
-- </listitem>
-- </variablelist>
-- </para>
- </detaileddescription>
- </compounddef>
- </doxygen>
-diff -u -r doxygen-1.8.7.orig/testing/012/indexpage.xml doxygen-1.8.7/testing/012/indexpage.xml
---- doxygen-1.8.7.orig/testing/012/indexpage.xml 2014-04-24 23:43:34.000000000 +0200
-+++ doxygen-1.8.7/testing/012/indexpage.xml 2014-04-24 23:44:05.000000000 +0200
-@@ -6,8 +6,8 @@
- <briefdescription>
- </briefdescription>
- <detaileddescription>
-- <para>See <ref refid="citelist_1CITEREF_knuth79" kindref="member">[3]</ref> for more info.</para>
-- <para>Other references with cross references see <ref refid="citelist_1CITEREF_Be09" kindref="member">[1]</ref> and <ref refid="citelist_1CITEREF_BertholdHeinzVigerske2009" kindref="member">[2]</ref> for more info. </para>
-+ <para>See knuth79 for more info.</para>
-+ <para>Other references with cross references see Be09 and BertholdHeinzVigerske2009 for more info. </para>
- </detaileddescription>
- </compounddef>
- </doxygen>
diff --git a/gnu/packages/patches/elogind-revert-polkit-detection.patch b/gnu/packages/patches/elogind-revert-polkit-detection.patch
new file mode 100644
index 0000000000..43dd1684b6
--- /dev/null
+++ b/gnu/packages/patches/elogind-revert-polkit-detection.patch
@@ -0,0 +1,41 @@
+From 715ce0a6459e418f92e74c7ce52df3244c18f383 Mon Sep 17 00:00:00 2001
+From: Sven Eden <sven.eden@prydeworx.com>
+Date: Mon, 8 Mar 2021 08:40:08 +0100
+Subject: [PATCH] Revert "Disable polkit support if libpolkit is not installed"
+
+This reverts commit 1194dec4f8f2d1b8bd14e1625f34418ecfce817e.
+
+Removing polkit support with -Dpolkit=auto when libpolkit is not
+installed, removes the whole interface. This makes it impossible to
+add polkit support as a runtime dependency.
+
+Bug: #167
+Closes: #206
+Signed-off-by: Sven Eden <sven.eden@prydeworx.com>
+---
+ meson.build | 9 ---------
+ 1 file changed, 9 deletions(-)
+
+diff --git a/meson.build b/meson.build
+index 2dd05db3c..f38551f55 100644
+--- a/meson.build
++++ b/meson.build
+@@ -1157,15 +1157,6 @@ if want_polkit != 'false' and not skip_deps
+ message('Old polkit detected, will install pkla files')
+ install_polkit_pkla = true
+ endif
+-#if 1 /// Disable polkit completely if libpolkit is not there. See elogind issue #167
+- if not libpolkit.found()
+- if want_polkit != 'auto'
+- error('Polkit requested but libpolkit was not found.')
+- endif
+- install_polkit = false
+- want_polkit = false
+- endif
+-#endif // 1
+ endif
+ conf.set10('ENABLE_POLKIT', install_polkit)
+
+--
+2.33.1
+
diff --git a/gnu/packages/patches/evolution-CVE-2020-11879.patch b/gnu/packages/patches/evolution-CVE-2020-11879.patch
deleted file mode 100644
index 8c85895aab..0000000000
--- a/gnu/packages/patches/evolution-CVE-2020-11879.patch
+++ /dev/null
@@ -1,122 +0,0 @@
-From 6489f20d6905cc797e2b2581c415e558c457caa7 Mon Sep 17 00:00:00 2001
-From: Milan Crha <mcrha@redhat.com>
-Date: Wed, 12 Feb 2020 18:59:52 +0100
-Subject: [PATCH] I#784 - Warn about and limit what can be attached using
- mailto: URI
-
-Closes https://gitlab.gnome.org/GNOME/evolution/issues/784
----
- src/composer/e-msg-composer.c | 58 +++++++++++++++++++++++++++++------
- src/e-util/e-system.error.xml | 7 ++++-
- 2 files changed, 54 insertions(+), 11 deletions(-)
-
-diff --git a/src/composer/e-msg-composer.c b/src/composer/e-msg-composer.c
-index e4c9ac095e..cd3168d882 100644
---- a/src/composer/e-msg-composer.c
-+++ b/src/composer/e-msg-composer.c
-@@ -4761,7 +4761,8 @@ handle_mailto (EMsgComposer *composer,
- gchar *header, *content, *buf;
- gsize nread, nwritten;
- const gchar *p;
-- gint len, clen;
-+ gint len, clen, has_attachments = 0;
-+ gboolean has_blacklisted_attachment = FALSE;
-
- table = e_msg_composer_get_header_table (composer);
- view = e_msg_composer_get_attachment_view (composer);
-@@ -4844,22 +4845,36 @@ handle_mailto (EMsgComposer *composer,
- } else if (!g_ascii_strcasecmp (header, "attach") ||
- !g_ascii_strcasecmp (header, "attachment")) {
- EAttachment *attachment;
-+ GFile *file;
-
- camel_url_decode (content);
-- if (file_is_blacklisted (content))
-- e_alert_submit (
-- E_ALERT_SINK (e_msg_composer_get_editor (composer)),
-- "mail:blacklisted-file",
-- content, NULL);
- if (g_ascii_strncasecmp (content, "file:", 5) == 0)
- attachment = e_attachment_new_for_uri (content);
- else
- attachment = e_attachment_new_for_path (content);
-- e_attachment_store_add_attachment (store, attachment);
-- e_attachment_load_async (
-- attachment, (GAsyncReadyCallback)
-- e_attachment_load_handle_error, composer);
-+ file = e_attachment_ref_file (attachment);
-+ if (!file || !g_file_peek_path (file) ||
-+ !g_file_test (g_file_peek_path (file), G_FILE_TEST_EXISTS) ||
-+ g_file_test (g_file_peek_path (file), G_FILE_TEST_IS_DIR)) {
-+ /* Do nothing, simply ignore the attachment request */
-+ } else {
-+ has_attachments++;
-+
-+ if (file_is_blacklisted (content)) {
-+ has_blacklisted_attachment = TRUE;
-+ e_alert_submit (
-+ E_ALERT_SINK (e_msg_composer_get_editor (composer)),
-+ "mail:blacklisted-file",
-+ content, NULL);
-+ }
-+
-+ e_attachment_store_add_attachment (store, attachment);
-+ e_attachment_load_async (
-+ attachment, (GAsyncReadyCallback)
-+ e_attachment_load_handle_error, composer);
-+ }
- g_object_unref (attachment);
-+ g_clear_object (&file);
- } else if (!g_ascii_strcasecmp (header, "from")) {
- /* Ignore */
- } else if (!g_ascii_strcasecmp (header, "reply-to")) {
-@@ -4883,6 +4898,29 @@ handle_mailto (EMsgComposer *composer,
-
- g_free (buf);
-
-+ if (has_attachments && !has_blacklisted_attachment) {
-+ const gchar *primary;
-+ gchar *secondary;
-+
-+ primary = g_dngettext (GETTEXT_PACKAGE,
-+ "Review attachment before sending.",
-+ "Review attachments before sending.",
-+ has_attachments);
-+
-+ secondary = g_strdup_printf (g_dngettext (GETTEXT_PACKAGE,
-+ "There had been added %d attachment. Make sure it does not contain any sensitive information before sending the message.",
-+ "There had been added %d attachments. Make sure they do not contain any sensitive information before sending the message.",
-+ has_attachments),
-+ has_attachments);
-+
-+ e_alert_submit (
-+ E_ALERT_SINK (e_msg_composer_get_editor (composer)),
-+ "system:generic-warning",
-+ primary, secondary, NULL);
-+
-+ g_free (secondary);
-+ }
-+
- merge_always_cc_and_bcc (table, to, &cc, &bcc);
-
- tov = destination_list_to_vector (to);
-diff --git a/src/e-util/e-system.error.xml b/src/e-util/e-system.error.xml
-index ddcf989fda..02facb7d26 100644
---- a/src/e-util/e-system.error.xml
-+++ b/src/e-util/e-system.error.xml
-@@ -1,6 +1,11 @@
- <?xml version="1.0"?>
- <error-list domain="system">
-- <error type="error" id="generic-error">
-+ <error id="generic-error" type="error">
-+ <primary>{0}</primary>
-+ <secondary>{1}</secondary>
-+ </error>
-+
-+ <error id="generic-warning" type="warning">
- <primary>{0}</primary>
- <secondary>{1}</secondary>
- </error>
---
-GitLab
-
diff --git a/gnu/packages/patches/evolution-data-server-CVE-2020-14928.patch b/gnu/packages/patches/evolution-data-server-CVE-2020-14928.patch
deleted file mode 100644
index 421f292c9d..0000000000
--- a/gnu/packages/patches/evolution-data-server-CVE-2020-14928.patch
+++ /dev/null
@@ -1,115 +0,0 @@
-From ba82be72cfd427b5d72ff21f929b3a6d8529c4df Mon Sep 17 00:00:00 2001
-From: Milan Crha <mcrha@redhat.com>
-Date: Mon, 22 Jun 2020 13:40:17 +0200
-Subject: [PATCH] I#226 - CVE-2020-14928: Response Injection via STARTTLS in
- SMTP and POP3
-
-Closes https://gitlab.gnome.org/GNOME/evolution-data-server/-/issues/226
----
- src/camel/camel-stream-buffer.c | 19 +++++++++++++++++++
- src/camel/camel-stream-buffer.h | 1 +
- src/camel/providers/pop3/camel-pop3-store.c | 2 ++
- src/camel/providers/pop3/camel-pop3-stream.c | 11 +++++++++++
- src/camel/providers/pop3/camel-pop3-stream.h | 1 +
- .../providers/smtp/camel-smtp-transport.c | 2 ++
- 6 files changed, 36 insertions(+)
-
-diff --git a/src/camel/camel-stream-buffer.c b/src/camel/camel-stream-buffer.c
-index 3e2e0dd36..a6f605ae5 100644
---- a/src/camel/camel-stream-buffer.c
-+++ b/src/camel/camel-stream-buffer.c
-@@ -518,3 +518,22 @@ camel_stream_buffer_read_line (CamelStreamBuffer *sbf,
-
- return g_strdup ((gchar *) sbf->priv->linebuf);
- }
-+
-+/**
-+ * camel_stream_buffer_discard_cache:
-+ * @sbf: a #CamelStreamBuffer
-+ *
-+ * Discards any cached data in the @sbf. The next read reads
-+ * from the stream.
-+ *
-+ * Since: 3.38
-+ **/
-+void
-+camel_stream_buffer_discard_cache (CamelStreamBuffer *sbf)
-+{
-+ g_return_if_fail (CAMEL_IS_STREAM_BUFFER (sbf));
-+
-+ sbf->priv->ptr = sbf->priv->buf;
-+ sbf->priv->end = sbf->priv->buf;
-+ sbf->priv->ptr[0] = '\0';
-+}
-diff --git a/src/camel/camel-stream-buffer.h b/src/camel/camel-stream-buffer.h
-index ef92cfd8e..094e9926b 100644
---- a/src/camel/camel-stream-buffer.h
-+++ b/src/camel/camel-stream-buffer.h
-@@ -93,6 +93,7 @@ gint camel_stream_buffer_gets (CamelStreamBuffer *sbf,
- gchar * camel_stream_buffer_read_line (CamelStreamBuffer *sbf,
- GCancellable *cancellable,
- GError **error);
-+void camel_stream_buffer_discard_cache (CamelStreamBuffer *sbf);
-
- G_END_DECLS
-
-diff --git a/src/camel/providers/pop3/camel-pop3-store.c b/src/camel/providers/pop3/camel-pop3-store.c
-index 81c370f0a..5c9eb1eaa 100644
---- a/src/camel/providers/pop3/camel-pop3-store.c
-+++ b/src/camel/providers/pop3/camel-pop3-store.c
-@@ -205,6 +205,8 @@ connect_to_server (CamelService *service,
-
- if (tls_stream != NULL) {
- camel_stream_set_base_stream (stream, tls_stream);
-+ /* Truncate any left cached input from the insecure part of the session */
-+ camel_pop3_stream_discard_cache (pop3_engine->stream);
- g_object_unref (tls_stream);
- } else {
- g_prefix_error (
-diff --git a/src/camel/providers/pop3/camel-pop3-stream.c b/src/camel/providers/pop3/camel-pop3-stream.c
-index 74bb11e61..c485b9bd6 100644
---- a/src/camel/providers/pop3/camel-pop3-stream.c
-+++ b/src/camel/providers/pop3/camel-pop3-stream.c
-@@ -457,3 +457,14 @@ camel_pop3_stream_getd (CamelPOP3Stream *is,
-
- return 1;
- }
-+
-+void
-+camel_pop3_stream_discard_cache (CamelPOP3Stream *is)
-+{
-+ if (is) {
-+ is->ptr = is->end = is->buf;
-+ is->lineptr = is->linebuf;
-+ is->lineend = is->linebuf + CAMEL_POP3_STREAM_LINE_SIZE;
-+ is->ptr[0] = '\n';
-+ }
-+}
-diff --git a/src/camel/providers/pop3/camel-pop3-stream.h b/src/camel/providers/pop3/camel-pop3-stream.h
-index bb6dbb903..128c8c45a 100644
---- a/src/camel/providers/pop3/camel-pop3-stream.h
-+++ b/src/camel/providers/pop3/camel-pop3-stream.h
-@@ -87,6 +87,7 @@ gint camel_pop3_stream_getd (CamelPOP3Stream *is,
- guint *len,
- GCancellable *cancellable,
- GError **error);
-+void camel_pop3_stream_discard_cache (CamelPOP3Stream *is);
-
- G_END_DECLS
-
-diff --git a/src/camel/providers/smtp/camel-smtp-transport.c b/src/camel/providers/smtp/camel-smtp-transport.c
-index 035baf367..1fc0f3206 100644
---- a/src/camel/providers/smtp/camel-smtp-transport.c
-+++ b/src/camel/providers/smtp/camel-smtp-transport.c
-@@ -323,6 +323,8 @@ connect_to_server (CamelService *service,
-
- if (tls_stream != NULL) {
- camel_stream_set_base_stream (stream, tls_stream);
-+ /* Truncate any left cached input from the insecure part of the session */
-+ camel_stream_buffer_discard_cache (transport->istream);
- g_object_unref (tls_stream);
- } else {
- g_prefix_error (
---
-GitLab
-
diff --git a/gnu/packages/patches/evolution-data-server-CVE-2020-16117.patch b/gnu/packages/patches/evolution-data-server-CVE-2020-16117.patch
deleted file mode 100644
index b2c0622a90..0000000000
--- a/gnu/packages/patches/evolution-data-server-CVE-2020-16117.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From 2cc39592b532cf0dc994fd3694b8e6bf924c9ab5 Mon Sep 17 00:00:00 2001
-From: Milan Crha <mcrha@redhat.com>
-Date: Mon, 10 Feb 2020 10:00:32 +0100
-Subject: [PATCH] I#189 - Crash on malformed server response with minimal
- capabilities
-
-Closes https://gitlab.gnome.org/GNOME/evolution-data-server/issues/189
----
- src/camel/providers/imapx/camel-imapx-server.c | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
-diff --git a/src/camel/providers/imapx/camel-imapx-server.c b/src/camel/providers/imapx/camel-imapx-server.c
-index 3c38fb1e9..3883321ec 100644
---- a/src/camel/providers/imapx/camel-imapx-server.c
-+++ b/src/camel/providers/imapx/camel-imapx-server.c
-@@ -3045,7 +3045,8 @@ connected:
-
- /* See if we got new capabilities
- * in the STARTTLS response. */
-- imapx_free_capability (is->priv->cinfo);
-+ if (is->priv->cinfo)
-+ imapx_free_capability (is->priv->cinfo);
- is->priv->cinfo = NULL;
- if (ic->status->condition == IMAPX_CAPABILITY) {
- is->priv->cinfo = ic->status->u.cinfo;
---
-GitLab
-
diff --git a/gnu/packages/patches/evolution-data-server-libical-compat.patch b/gnu/packages/patches/evolution-data-server-libical-compat.patch
deleted file mode 100644
index da4302d42e..0000000000
--- a/gnu/packages/patches/evolution-data-server-libical-compat.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-Prevent test failure and possible data loss due to API change in libical 3.0.7.
-
-https://gitlab.gnome.org/GNOME/evolution-data-server/issues/185
-https://lists.infradead.org/pipermail/libical-devel/2020-January/000907.html
-
-Adapted from upstream:
-
-https://gitlab.gnome.org/GNOME/evolution-data-server/commit/77384ab552c19bf374dbeda53dc37f98d07bd4ec
-
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index e16b8b225..b3c881967 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -111,7 +111,7 @@ add_definitions(-DSOUP_VERSION_MIN_REQUIRED=${soup_encoded_version})
-
- set(gcr_minimum_version 3.4)
- set(libgdata_minimum_version 0.15.1)
--set(libical_glib_minimum_version 3.0.5)
-+set(libical_glib_minimum_version 3.0.7)
- set(libsecret_minimum_version 0.5)
- set(libxml_minimum_version 2.0.0)
- set(sqlite_minimum_version 3.7.17)
-diff --git a/src/calendar/libedata-cal/e-cal-meta-backend.c b/src/calendar/libedata-cal/e-cal-meta-backend.c
-index 7501f2a43..93f4806ba 100644
---- a/src/calendar/libedata-cal/e-cal-meta-backend.c
-+++ b/src/calendar/libedata-cal/e-cal-meta-backend.c
-@@ -4067,8 +4067,7 @@ e_cal_meta_backend_inline_local_attachments_sync (ECalMetaBackend *meta_backend,
- gchar *base64;
-
- base64 = g_base64_encode ((const guchar *) content, len);
-- new_attach = i_cal_attach_new_from_data (base64, NULL, NULL);
-+ new_attach = i_cal_attach_new_from_data (base64, (GFunc) g_free, NULL);
- g_free (content);
-- g_free (base64);
-
- ecmb_remove_all_but_filename_parameter (prop);
diff --git a/gnu/packages/patches/evolution-data-server-locales.patch b/gnu/packages/patches/evolution-data-server-locales.patch
deleted file mode 100644
index 48baefb0d8..0000000000
--- a/gnu/packages/patches/evolution-data-server-locales.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-This patch fixes locale canonicalization when using newer versions of
-ICU. It comes from the upstream repo, and should appear starting in
-version 3.33.5.
-
-From fe4ac94ce3c14f200e049a5d102fc0e4b811c71e Mon Sep 17 00:00:00 2001
-From: Milan Crha <mcrha@redhat.com>
-Date: Tue, 16 Jul 2019 07:22:07 +0200
-Subject: [PATCH] I#137 - POSIX locale tests fail with ICU 64.x
-
-Closes https://gitlab.gnome.org/GNOME/evolution-data-server/issues/137
----
- src/libedataserver/e-collator.c | 5 +++++
- 1 file changed, 5 insertions(+)
-
-diff --git a/src/libedataserver/e-collator.c b/src/libedataserver/e-collator.c
-index 718eac5da..ec2cf7951 100644
---- a/src/libedataserver/e-collator.c
-+++ b/src/libedataserver/e-collator.c
-@@ -132,6 +132,11 @@ canonicalize_locale (const gchar *posix_locale,
- gint len;
- const gchar *collation_type = NULL;
-
-+ if (posix_locale && (
-+ g_ascii_strcasecmp (posix_locale, "C") == 0 ||
-+ g_ascii_strcasecmp (posix_locale, "POSIX") == 0))
-+ posix_locale = "en_US_POSIX";
-+
- len = uloc_canonicalize (posix_locale, locale_buffer, LOCALE_BUFFER_LEN, &status);
-
- if (U_FAILURE (status)) {
---
-2.22.0
-
diff --git a/gnu/packages/patches/farstream-gupnp.patch b/gnu/packages/patches/farstream-gupnp.patch
new file mode 100644
index 0000000000..f46170ab26
--- /dev/null
+++ b/gnu/packages/patches/farstream-gupnp.patch
@@ -0,0 +1,140 @@
+From e70dcd0a9f89efbdaa011c20737ad550635ea580 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Olivier=20Cr=C3=AAte?= <olivier.crete@collabora.com>
+Date: Tue, 20 Oct 2020 19:51:22 -0400
+Subject: [PATCH] rawudp-upnp test: Also build against new GUPnP 1.2 library if
+ present
+
+Update the configure test to match
+---
+ configure.ac | 17 +++++++++++++++++
+ tests/check/Makefile.am | 7 +++----
+ tests/check/transmitter/rawudp-upnp.c | 16 ++++++++++++++--
+ tests/check/transmitter/rawudp.c | 4 ++--
+ 4 files changed, 36 insertions(+), 8 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 03afc96b..1efed132 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -370,8 +370,25 @@ fi
+
+ if test "x$HAVE_GUPNP" = "xyes"; then
+ AC_DEFINE(HAVE_GUPNP,,[Have the GUPnP IGD library])
++
++ PKG_CHECK_MODULES(GUPNP_CORE, [ gupnp-1.2 ],
++ [ HAVE_GUPNP_CORE_12=yes ],
++ [ HAVE_GUPNP_CORE_12=no
++ PKG_CHECK_MODULES(GUPNP_CORE, [ gupnp-1.0 ],
++ [ HAVE_GUPNP_CORE_10=yes ],
++ [ HAVE_GUPNP_CORE_10=no ])
++ ])
++
++ if test "x$HAVE_GUPNP_CORE_10" = "xyes"; then
++ AC_DEFINE(HAVE_GUPNP_CORE_10,,[Have the GUPnP 1.0 library])
++ fi
++
++ if test "x$HAVE_GUPNP_CORE_12" = "xyes"; then
++ AC_DEFINE(HAVE_GUPNP_CORE_12,,[Have the GUPnP 1.2 library])
++ fi
+ fi
+
++
+ dnl build static plugins or not
+ AC_MSG_CHECKING([whether to build static plugins or not])
+ AC_ARG_ENABLE(
+diff --git a/tests/check/Makefile.am b/tests/check/Makefile.am
+index d50fc264..d21687d7 100644
+--- a/tests/check/Makefile.am
++++ b/tests/check/Makefile.am
+@@ -76,9 +76,9 @@ base_fscodec_SOURCES = \
+
+
+ transmitter_rawudp_CFLAGS = $(AM_CFLAGS) \
+- $(GUPNP_CFLAGS) $(GIO_CFLAGS) $(NICE_CFLAGS)
++ $(GUPNP_CORE_CFLAGS) $(GIO_CFLAGS) $(NICE_CFLAGS)
+ transmitter_rawudp_LDADD = $(LDADD) \
+- $(GUPNP_LIBS) \
++ $(GUPNP_CORE_LIBS) \
+ $(GIO_LIBS) \
+ $(NICE_LIBS)
+ transmitter_rawudp_SOURCES = \
+@@ -113,9 +113,8 @@ transmitter_nice_SOURCES = \
+ transmitter_nice_LDADD = $(LDADD) $(GST_BASE_LIBS)
+
+
+-transmitter_shm_CFLAGS = $(AM_CFLAGS) $(GUPNP_CFLAGS) $(NICE_CFLAGS)
++transmitter_shm_CFLAGS = $(AM_CFLAGS) $(NICE_CFLAGS)
+ transmitter_shm_LDADD = $(LDADD) \
+- $(GUPNP_LIBS) \
+ $(NICE_LIBS)
+ transmitter_shm_SOURCES = \
+ check-threadsafe.h \
+diff --git a/tests/check/transmitter/rawudp-upnp.c b/tests/check/transmitter/rawudp-upnp.c
+index 4818cd28..9ccf85d8 100644
+--- a/tests/check/transmitter/rawudp-upnp.c
++++ b/tests/check/transmitter/rawudp-upnp.c
+@@ -37,7 +37,7 @@ get_vars (gboolean *out_got_address,
+ }
+
+
+-#ifdef HAVE_GUPNP
++#if defined(HAVE_GUPNP_CORE_10) || defined(HAVE_GUPNP_CORE_12)
+
+ #include <libgupnp/gupnp.h>
+
+@@ -126,8 +126,14 @@ start_upnp_server (void)
+ GUPnPDeviceInfo *subdev1;
+ GUPnPDeviceInfo *subdev2;
+ const gchar *upnp_xml_path;
++ GError *gerr = NULL;
+
+- context = gupnp_context_new (NULL, NULL, 0, NULL);
++#ifdef HAVE_GUPNP_CORE_12
++ context = gupnp_context_new (NULL, 0, &gerr);
++#else
++ context = gupnp_context_new (NULL, NULL, 0, &gerr);
++#endif
++ g_assert_no_error (gerr);
+ ts_fail_if (context == NULL, "Can't get gupnp context");
+
+ if (g_getenv ("UPNP_XML_PATH"))
+@@ -137,8 +143,14 @@ start_upnp_server (void)
+
+ gupnp_context_host_path (context, upnp_xml_path, "");
+
++#ifdef HAVE_GUPNP_CORE_12
++ dev = gupnp_root_device_new (context, "InternetGatewayDevice.xml",
++ upnp_xml_path, &gerr);
++ g_assert_no_error (gerr);
++#else
+ dev = gupnp_root_device_new (context, "InternetGatewayDevice.xml",
+ upnp_xml_path);
++#endif
+ ts_fail_if (dev == NULL, "could not get root dev");
+
+ subdev1 = gupnp_device_info_get_device (GUPNP_DEVICE_INFO (dev),
+diff --git a/tests/check/transmitter/rawudp.c b/tests/check/transmitter/rawudp.c
+index e1936ac0..d803f347 100644
+--- a/tests/check/transmitter/rawudp.c
++++ b/tests/check/transmitter/rawudp.c
+@@ -637,7 +637,7 @@ GST_START_TEST (test_rawudptransmitter_stop_stream)
+ }
+ GST_END_TEST;
+
+-#ifdef HAVE_GUPNP
++#if defined(HAVE_GUPNP_CORE_10) || defined (HAVE_GUPNP_CORE_12)
+
+ GST_START_TEST (test_rawudptransmitter_run_upnp_discovery)
+ {
+@@ -967,7 +967,7 @@ rawudptransmitter_suite (void)
+ tcase_add_test (tc_chain, test_rawudptransmitter_stop_stream);
+ suite_add_tcase (s, tc_chain);
+
+-#ifdef HAVE_GUPNP
++#if defined(HAVE_GUPNP_CORE_10) || defined (HAVE_GUPNP_CORE_12)
+ if (g_getenv ("UPNP")) {
+ gchar *multicast_addr;
+
+--
+GitLab
+
diff --git a/gnu/packages/patches/findutils-test-rwlock-threads.patch b/gnu/packages/patches/findutils-test-rwlock-threads.patch
deleted file mode 100644
index 3062577c21..0000000000
--- a/gnu/packages/patches/findutils-test-rwlock-threads.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-Skip "test-rwlock1" when multithreading is disabled, which is the case
-during bootstrapping on architectures not supported by GNU Mes.
-
-Taken from upstream gnulib:
-https://git.savannah.gnu.org/cgit/gnulib.git/commit/?id=fdff8bd09a7f053381f8bdb107ab5280b7c95959
-
-diff --git a/gnulib-tests/test-rwlock1.c b/gnulib-tests/test-rwlock1.c
---- a/gnulib-tests/test-rwlock1.c
-+++ b/gnulib-tests/test-rwlock1.c
-@@ -21,6 +21,8 @@
-
- #include <config.h>
-
-+#if USE_ISOC_THREADS || USE_POSIX_THREADS || USE_ISOC_AND_POSIX_THREADS || USE_WINDOWS_THREADS
-+
- #include "glthread/lock.h"
-
- #include <errno.h>
-@@ -151,3 +153,18 @@ main ()
- sleep (1);
- }
- }
-+
-+#else
-+
-+/* No multithreading available. */
-+
-+#include <stdio.h>
-+
-+int
-+main ()
-+{
-+ fputs ("Skipping test: multithreading not enabled\n", stderr);
-+ return 77;
-+}
-+
-+#endif
-
diff --git a/gnu/packages/patches/fontconfig-cache-ignore-mtime.patch b/gnu/packages/patches/fontconfig-cache-ignore-mtime.patch
new file mode 100644
index 0000000000..b6e942ee10
--- /dev/null
+++ b/gnu/packages/patches/fontconfig-cache-ignore-mtime.patch
@@ -0,0 +1,15 @@
+Pretend that stat's mtime is broken, so that the fontconfig cache does not
+depend upon modification time to determine if a cache is stale.
+
+diff --git a/src/fcstat.c b/src/fcstat.c
+index 5a2bd7c..d603a96 100644
+--- a/src/fcstat.c
++++ b/src/fcstat.c
+@@ -431,6 +431,7 @@ FcIsFsMmapSafe (int fd)
+ FcBool
+ FcIsFsMtimeBroken (const FcChar8 *dir)
+ {
++ return FcTrue;
+ int fd = FcOpen ((const char *) dir, O_RDONLY);
+
+ if (fd != -1)
diff --git a/gnu/packages/patches/fontconfig-hurd-path-max.patch b/gnu/packages/patches/fontconfig-hurd-path-max.patch
deleted file mode 100644
index f804e6801f..0000000000
--- a/gnu/packages/patches/fontconfig-hurd-path-max.patch
+++ /dev/null
@@ -1,17 +0,0 @@
-Avoid usage of PATH_MAX.
-
-Taken from https://salsa.debian.org/freedesktop-team/fontconfig/-/blob/master/debian/patches/path_max.patch
-
-Index: fontconfig-2.13.1/src/fccfg.c
-===================================================================
---- fontconfig-2.13.1.orig/src/fccfg.c
-+++ fontconfig-2.13.1/src/fccfg.c
-@@ -2231,7 +2231,7 @@ FcConfigRealFilename (FcConfig *config,
-
- if (n)
- {
-- FcChar8 buf[PATH_MAX];
-+ FcChar8 buf[FC_PATH_MAX];
- ssize_t len;
-
- if (sysroot)
diff --git a/gnu/packages/patches/freecad-boost-serialization.patch b/gnu/packages/patches/freecad-boost-serialization.patch
new file mode 100644
index 0000000000..374eabc966
--- /dev/null
+++ b/gnu/packages/patches/freecad-boost-serialization.patch
@@ -0,0 +1,27 @@
+Taken from: https://github.com/archlinux/svntogit-community/blob/packages/freecad/trunk/freecad-boost.patch.
+
+Index: FreeCAD-0.19.2/CMakeLists.txt
+===================================================================
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -46,6 +46,7 @@ if(NOT FREECAD_LIBPACK_USE OR FREECAD_LI
+ SetupPCL()
+ SetupPybind11()
+ SetupBoost()
++ set(Boost_LIBRARIES_App ${Boost_LIBRARIES})
+ SetupXercesC()
+ find_package(ZLIB REQUIRED)
+ find_package(PyCXX REQUIRED)
+Index: FreeCAD-0.19.2/src/App/CMakeLists.txt
+===================================================================
+--- a/src/App/CMakeLists.txt
++++ b/src/App/CMakeLists.txt
+@@ -59,7 +59,7 @@ include_directories(
+
+ set(FreeCADApp_LIBS
+ FreeCADBase
+- ${Boost_LIBRARIES}
++ ${Boost_LIBRARIES_App}
+ )
+
+ if (BUILD_QT5)
diff --git a/gnu/packages/patches/freecad-vtk9.patch b/gnu/packages/patches/freecad-vtk9.patch
new file mode 100644
index 0000000000..74568f4318
--- /dev/null
+++ b/gnu/packages/patches/freecad-vtk9.patch
@@ -0,0 +1,827 @@
+From bb9bcbd51df7c3cb76c5823038e4ea0f7e25a9ff Mon Sep 17 00:00:00 2001
+From: wmayer <wmayer@users.sourceforge.net>
+Date: Mon, 12 Oct 2020 17:56:03 +0200
+Subject: [PATCH] Make smesh compile with vtk9
+
+---
+ .../salomesmesh/inc/SMDS_MeshElement.hxx | 9 +++-
+ .../salomesmesh/inc/SMDS_UnstructuredGrid.hxx | 4 ++
+ .../salomesmesh/src/SMDS/SMDS_BallElement.cpp | 9 +++-
+ .../salomesmesh/src/SMDS/SMDS_Downward.cpp | 44 +++++++++----------
+ .../salomesmesh/src/SMDS/SMDS_Mesh.cpp | 6 ++-
+ .../src/SMDS/SMDS_Mesh0DElement.cpp | 12 +++++
+ .../salomesmesh/src/SMDS/SMDS_MeshNode.cpp | 10 ++---
+ .../src/SMDS/SMDS_UnstructuredGrid.cpp | 35 +++++++++++++--
+ .../src/SMDS/SMDS_VtkCellIterator.cpp | 7 +--
+ .../salomesmesh/src/SMDS/SMDS_VtkEdge.cpp | 19 +++++++-
+ .../salomesmesh/src/SMDS/SMDS_VtkFace.cpp | 29 ++++++++++--
+ .../salomesmesh/src/SMDS/SMDS_VtkVolume.cpp | 38 +++++++++++-----
+ .../src/SMESH/SMESH_MeshEditor.cpp | 8 ++--
+ src/Mod/Fem/Gui/ViewProviderFemPostObject.cpp | 7 ++-
+ 14 files changed, 179 insertions(+), 58 deletions(-)
+
+Index: FreeCAD-0.19.2/src/3rdParty/salomesmesh/inc/SMDS_MeshElement.hxx
+===================================================================
+--- FreeCAD-0.19.2.orig/src/3rdParty/salomesmesh/inc/SMDS_MeshElement.hxx
++++ FreeCAD-0.19.2/src/3rdParty/salomesmesh/inc/SMDS_MeshElement.hxx
+@@ -40,11 +40,16 @@
+
+ #include <vtkType.h>
+ #include <vtkCellType.h>
++#include <vtkCellArray.h>
+
+ //typedef unsigned short UShortType;
+ typedef short ShortType;
+ typedef int LongType;
+-
++#ifdef VTK_CELL_ARRAY_V2
++typedef const vtkIdType* vtkIdTypePtr;
++#else
++typedef vtkIdType* vtkIdTypePtr;
++#endif
+ class SMDS_MeshNode;
+ class SMDS_MeshEdge;
+ class SMDS_MeshFace;
+@@ -192,7 +197,7 @@ protected:
+ //! Element index in vector SMDS_Mesh::myNodes or SMDS_Mesh::myCells
+ int myID;
+ //! index in vtkUnstructuredGrid
+- int myVtkID;
++ vtkIdType myVtkID;
+ //! SMDS_Mesh identification in SMESH
+ ShortType myMeshId;
+ //! SubShape and SubMesh identification in SMESHDS
+Index: FreeCAD-0.19.2/src/3rdParty/salomesmesh/inc/SMDS_UnstructuredGrid.hxx
+===================================================================
+--- FreeCAD-0.19.2.orig/src/3rdParty/salomesmesh/inc/SMDS_UnstructuredGrid.hxx
++++ FreeCAD-0.19.2/src/3rdParty/salomesmesh/inc/SMDS_UnstructuredGrid.hxx
+@@ -95,7 +95,11 @@ public:
+ std::map<int, std::map<long,int> >& nodeQuadDomains);
+ vtkCellLinks* GetLinks()
+ {
++#ifdef VTK_CELL_ARRAY_V2
++ return static_cast<vtkCellLinks*>(GetCellLinks());
++#else
+ return Links;
++#endif
+ }
+ SMDS_Downward* getDownArray(unsigned char vtkType)
+ {
+Index: FreeCAD-0.19.2/src/3rdParty/salomesmesh/src/SMDS/SMDS_BallElement.cpp
+===================================================================
+--- FreeCAD-0.19.2.orig/src/3rdParty/salomesmesh/src/SMDS/SMDS_BallElement.cpp
++++ FreeCAD-0.19.2/src/3rdParty/salomesmesh/src/SMDS/SMDS_BallElement.cpp
+@@ -67,10 +67,16 @@ void SMDS_BallElement::SetDiameter(doubl
+ bool SMDS_BallElement::ChangeNode (const SMDS_MeshNode * node)
+ {
+ vtkUnstructuredGrid* grid = SMDS_Mesh::_meshList[myMeshId]->getGrid();
++#ifdef VTK_CELL_ARRAY_V2
++ vtkNew<vtkIdList> cellPoints;
++ grid->GetCellPoints(myVtkID, cellPoints.GetPointer());
++ cellPoints->SetId(0, node->getVtkId());
++#else
+ vtkIdType npts = 0;
+ vtkIdType* pts = 0;
+ grid->GetCellPoints(myVtkID, npts, pts);
+ pts[0] = node->getVtkId();
++#endif
+ SMDS_Mesh::_meshList[myMeshId]->setMyModified();
+ return true;
+ }
+@@ -83,7 +89,8 @@ void SMDS_BallElement::Print (std::ostre
+ const SMDS_MeshNode* SMDS_BallElement::GetNode (const int ind) const
+ {
+ vtkUnstructuredGrid* grid = SMDS_Mesh::_meshList[myMeshId]->getGrid();
+- vtkIdType npts, *pts;
++ vtkIdType npts;
++ vtkIdTypePtr pts;
+ grid->GetCellPoints( myVtkID, npts, pts );
+ return SMDS_Mesh::_meshList[myMeshId]->FindNodeVtk( pts[ 0 ]);
+ }
+Index: FreeCAD-0.19.2/src/3rdParty/salomesmesh/src/SMDS/SMDS_Downward.cpp
+===================================================================
+--- FreeCAD-0.19.2.orig/src/3rdParty/salomesmesh/src/SMDS/SMDS_Downward.cpp
++++ FreeCAD-0.19.2/src/3rdParty/salomesmesh/src/SMDS/SMDS_Downward.cpp
+@@ -303,7 +303,7 @@ int SMDS_Down1D::getNodeSet(int cellId,
+ void SMDS_Down1D::setNodes(int cellId, int vtkId)
+ {
+ vtkIdType npts = 0;
+- vtkIdType *pts; // will refer to the point id's of the face
++ vtkIdTypePtr pts; // will refer to the point id's of the face
+ _grid->GetCellPoints(vtkId, npts, pts);
+ // MESSAGE(vtkId << " " << npts << " " << _nbDownCells);
+ //ASSERT(npts == _nbDownCells);
+@@ -357,7 +357,7 @@ int SMDS_Down1D::computeVtkCells(int *pt
+ {
+ vtkIdType point = pts[i];
+ int numCells = _grid->GetLinks()->GetNcells(point);
+- vtkIdType *cells = _grid->GetLinks()->GetCells(point);
++ vtkIdTypePtr cells = _grid->GetLinks()->GetCells(point);
+ for (int j = 0; j < numCells; j++)
+ {
+ int vtkCellId = cells[j];
+@@ -532,7 +532,7 @@ int SMDS_Down2D::computeVolumeIds(int ce
+ // --- find point id's of the face
+
+ vtkIdType npts = 0;
+- vtkIdType *pts; // will refer to the point id's of the face
++ vtkIdTypePtr pts; // will refer to the point id's of the face
+ _grid->GetCellPoints(cellId, npts, pts);
+ vector<int> nodes;
+ for (int i = 0; i < npts; i++)
+@@ -577,7 +577,7 @@ int SMDS_Down2D::computeVolumeIdsFromNod
+ vtkIdType point = pts[i];
+ int numCells = _grid->GetLinks()->GetNcells(point);
+ //MESSAGE("cells pour " << i << " " << numCells);
+- vtkIdType *cells = _grid->GetLinks()->GetCells(point);
++ vtkIdTypePtr cells = _grid->GetLinks()->GetCells(point);
+ for (int j = 0; j < numCells; j++)
+ {
+ int vtkCellId = cells[j];
+@@ -627,7 +627,7 @@ int SMDS_Down2D::computeVolumeIdsFromNod
+ void SMDS_Down2D::setTempNodes(int cellId, int vtkId)
+ {
+ vtkIdType npts = 0;
+- vtkIdType *pts; // will refer to the point id's of the face
++ vtkIdTypePtr pts; // will refer to the point id's of the face
+ _grid->GetCellPoints(vtkId, npts, pts);
+ // MESSAGE(vtkId << " " << npts << " " << _nbNodes);
+ //ASSERT(npts == _nbNodes);
+@@ -795,7 +795,7 @@ void SMDS_Down3D::getNodeIds(int cellId,
+ {
+ int vtkId = this->_vtkCellIds[cellId];
+ vtkIdType npts = 0;
+- vtkIdType *nodes; // will refer to the point id's of the volume
++ vtkIdTypePtr nodes; // will refer to the point id's of the volume
+ _grid->GetCellPoints(vtkId, npts, nodes);
+ for (int i = 0; i < npts; i++)
+ nodeSet.insert(nodes[i]);
+@@ -1126,7 +1126,7 @@ void SMDS_DownTetra::getOrderedNodesOfFa
+ //MESSAGE("cellId = " << cellId);
+
+ vtkIdType npts = 0;
+- vtkIdType *nodes; // will refer to the point id's of the volume
++ vtkIdTypePtr nodes; // will refer to the point id's of the volume
+ _grid->GetCellPoints(this->_vtkCellIds[cellId], npts, nodes);
+
+ set<int> tofind;
+@@ -1178,7 +1178,7 @@ void SMDS_DownTetra::computeFacesWithNod
+ // --- find point id's of the volume
+
+ vtkIdType npts = 0;
+- vtkIdType *nodes; // will refer to the point id's of the volume
++ vtkIdTypePtr nodes; // will refer to the point id's of the volume
+ _grid->GetCellPoints(cellId, npts, nodes);
+
+ // --- create all the ordered list of node id's for each face
+@@ -1234,7 +1234,7 @@ void SMDS_DownQuadTetra::getOrderedNodes
+ //MESSAGE("cellId = " << cellId);
+
+ vtkIdType npts = 0;
+- vtkIdType *nodes; // will refer to the point id's of the volume
++ vtkIdTypePtr nodes; // will refer to the point id's of the volume
+ _grid->GetCellPoints(this->_vtkCellIds[cellId], npts, nodes);
+
+ set<int> tofind;
+@@ -1288,7 +1288,7 @@ void SMDS_DownQuadTetra::computeFacesWit
+ // --- find point id's of the volume
+
+ vtkIdType npts = 0;
+- vtkIdType *nodes; // will refer to the point id's of the volume
++ vtkIdTypePtr nodes; // will refer to the point id's of the volume
+ _grid->GetCellPoints(cellId, npts, nodes);
+
+ // --- create all the ordered list of node id's for each face
+@@ -1357,7 +1357,7 @@ void SMDS_DownPyramid::getOrderedNodesOf
+ //MESSAGE("cellId = " << cellId);
+
+ vtkIdType npts = 0;
+- vtkIdType *nodes; // will refer to the point id's of the volume
++ vtkIdTypePtr nodes; // will refer to the point id's of the volume
+ _grid->GetCellPoints(this->_vtkCellIds[cellId], npts, nodes);
+
+ set<int> tofind;
+@@ -1435,7 +1435,7 @@ void SMDS_DownPyramid::computeFacesWithN
+ // --- find point id's of the volume
+
+ vtkIdType npts = 0;
+- vtkIdType *nodes; // will refer to the point id's of the volume
++ vtkIdTypePtr nodes; // will refer to the point id's of the volume
+ _grid->GetCellPoints(cellId, npts, nodes);
+
+ // --- create all the ordered list of node id's for each face
+@@ -1500,7 +1500,7 @@ void SMDS_DownQuadPyramid::getOrderedNod
+ //MESSAGE("cellId = " << cellId);
+
+ vtkIdType npts = 0;
+- vtkIdType *nodes; // will refer to the point id's of the volume
++ vtkIdTypePtr nodes; // will refer to the point id's of the volume
+ _grid->GetCellPoints(this->_vtkCellIds[cellId], npts, nodes);
+
+ set<int> tofind;
+@@ -1580,7 +1580,7 @@ void SMDS_DownQuadPyramid::computeFacesW
+ // --- find point id's of the volume
+
+ vtkIdType npts = 0;
+- vtkIdType *nodes; // will refer to the point id's of the volume
++ vtkIdTypePtr nodes; // will refer to the point id's of the volume
+ _grid->GetCellPoints(cellId, npts, nodes);
+
+ // --- create all the ordered list of node id's for each face
+@@ -1660,7 +1660,7 @@ void SMDS_DownPenta::getOrderedNodesOfFa
+ //MESSAGE("cellId = " << cellId);
+
+ vtkIdType npts = 0;
+- vtkIdType *nodes; // will refer to the point id's of the volume
++ vtkIdTypePtr nodes; // will refer to the point id's of the volume
+ _grid->GetCellPoints(this->_vtkCellIds[cellId], npts, nodes);
+
+ set<int> tofind;
+@@ -1744,7 +1744,7 @@ void SMDS_DownPenta::computeFacesWithNod
+ // --- find point id's of the volume
+
+ vtkIdType npts = 0;
+- vtkIdType *nodes; // will refer to the point id's of the volume
++ vtkIdTypePtr nodes; // will refer to the point id's of the volume
+ _grid->GetCellPoints(cellId, npts, nodes);
+
+ // --- create all the ordered list of node id's for each face
+@@ -1810,7 +1810,7 @@ void SMDS_DownQuadPenta::getOrderedNodes
+ //MESSAGE("cellId = " << cellId);
+
+ vtkIdType npts = 0;
+- vtkIdType *nodes; // will refer to the point id's of the volume
++ vtkIdTypePtr nodes; // will refer to the point id's of the volume
+ _grid->GetCellPoints(this->_vtkCellIds[cellId], npts, nodes);
+
+ set<int> tofind;
+@@ -1896,7 +1896,7 @@ void SMDS_DownQuadPenta::computeFacesWit
+ // --- find point id's of the volume
+
+ vtkIdType npts = 0;
+- vtkIdType *nodes; // will refer to the point id's of the volume
++ vtkIdTypePtr nodes; // will refer to the point id's of the volume
+ _grid->GetCellPoints(cellId, npts, nodes);
+
+ // --- create all the ordered list of node id's for each face
+@@ -1981,7 +1981,7 @@ void SMDS_DownHexa::getOrderedNodesOfFac
+ //MESSAGE("cellId = " << cellId);
+
+ vtkIdType npts = 0;
+- vtkIdType *nodes; // will refer to the point id's of the volume
++ vtkIdTypePtr nodes; // will refer to the point id's of the volume
+ _grid->GetCellPoints(this->_vtkCellIds[cellId], npts, nodes);
+
+ set<int> tofind;
+@@ -2036,7 +2036,7 @@ void SMDS_DownHexa::computeFacesWithNode
+ // --- find point id's of the volume
+
+ vtkIdType npts = 0;
+- vtkIdType *nodes; // will refer to the point id's of the volume
++ vtkIdTypePtr nodes; // will refer to the point id's of the volume
+ _grid->GetCellPoints(cellId, npts, nodes);
+
+ // --- create all the ordered list of node id's for each face
+@@ -2112,7 +2112,7 @@ void SMDS_DownQuadHexa::getOrderedNodesO
+ //MESSAGE("cellId = " << cellId);
+
+ vtkIdType npts = 0;
+- vtkIdType *nodes; // will refer to the point id's of the volume
++ vtkIdTypePtr nodes; // will refer to the point id's of the volume
+ _grid->GetCellPoints(this->_vtkCellIds[cellId], npts, nodes);
+
+ set<int> tofind;
+@@ -2167,7 +2167,7 @@ void SMDS_DownQuadHexa::computeFacesWith
+ // --- find point id's of the volume
+
+ vtkIdType npts = 0;
+- vtkIdType *nodes; // will refer to the point id's of the volume
++ vtkIdTypePtr nodes; // will refer to the point id's of the volume
+ _grid->GetCellPoints(cellId, npts, nodes);
+
+ // --- create all the ordered list of node id's for each face
+Index: FreeCAD-0.19.2/src/3rdParty/salomesmesh/src/SMDS/SMDS_Mesh.cpp
+===================================================================
+--- FreeCAD-0.19.2.orig/src/3rdParty/salomesmesh/src/SMDS/SMDS_Mesh.cpp
++++ FreeCAD-0.19.2/src/3rdParty/salomesmesh/src/SMDS/SMDS_Mesh.cpp
+@@ -4768,7 +4768,11 @@ void SMDS_Mesh::dumpGrid(string ficdump)
+ ficcon << endl;
+ }
+ ficcon << "-------------------------------- connectivity " << nbPoints << endl;
+- vtkCellLinks *links = myGrid->GetCellLinks();
++#ifdef VTK_CELL_ARRAY_V2
++ vtkCellLinks *links = static_cast<vtkCellLinks*>(myGrid->GetCellLinks());
++#else
++ vtkCellLinks *links = myGrid->GetCellLinks();
++#endif
+ for (int i=0; i<nbPoints; i++)
+ {
+ int ncells = links->GetNcells(i);
+Index: FreeCAD-0.19.2/src/3rdParty/salomesmesh/src/SMDS/SMDS_Mesh0DElement.cpp
+===================================================================
+--- FreeCAD-0.19.2.orig/src/3rdParty/salomesmesh/src/SMDS/SMDS_Mesh0DElement.cpp
++++ FreeCAD-0.19.2/src/3rdParty/salomesmesh/src/SMDS/SMDS_Mesh0DElement.cpp
+@@ -146,6 +146,17 @@ bool SMDS_Mesh0DElement::ChangeNodes(con
+ if ( nbNodes == 1 )
+ {
+ vtkUnstructuredGrid* grid = SMDS_Mesh::_meshList[myMeshId]->getGrid();
++#ifdef VTK_CELL_ARRAY_V2
++ vtkNew<vtkIdList> cellPoints;
++ grid->GetCellPoints(myVtkID, cellPoints.GetPointer());
++ if (nbNodes != cellPoints->GetNumberOfIds())
++ {
++ MESSAGE("ChangeNodes problem: not the same number of nodes " << cellPoints->GetNumberOfIds() << " -> " << nbNodes);
++ return false;
++ }
++ myNode = nodes[0];
++ cellPoints->SetId(0, myNode->getVtkId());
++#else
+ vtkIdType npts = 0;
+ vtkIdType* pts = 0;
+ grid->GetCellPoints(myVtkID, npts, pts);
+@@ -156,6 +167,7 @@ bool SMDS_Mesh0DElement::ChangeNodes(con
+ }
+ myNode = nodes[0];
+ pts[0] = myNode->getVtkId();
++#endif
+
+ SMDS_Mesh::_meshList[myMeshId]->setMyModified();
+ return true;
+Index: FreeCAD-0.19.2/src/3rdParty/salomesmesh/src/SMDS/SMDS_MeshNode.cpp
+===================================================================
+--- FreeCAD-0.19.2.orig/src/3rdParty/salomesmesh/src/SMDS/SMDS_MeshNode.cpp
++++ FreeCAD-0.19.2/src/3rdParty/salomesmesh/src/SMDS/SMDS_MeshNode.cpp
+@@ -191,7 +191,7 @@ public:
+ SMDS_ElemIteratorPtr SMDS_MeshNode::
+ GetInverseElementIterator(SMDSAbs_ElementType type) const
+ {
+- vtkCellLinks::Link l = SMDS_Mesh::_meshList[myMeshId]->getGrid()->GetCellLinks()->GetLink(myVtkID);
++ vtkCellLinks::Link l = static_cast<vtkCellLinks*>(SMDS_Mesh::_meshList[myMeshId]->getGrid()->GetCellLinks())->GetLink(myVtkID);
+ //MESSAGE("myID " << myID << " ncells " << l.ncells);
+ return SMDS_ElemIteratorPtr(new SMDS_MeshNode_MyInvIterator(SMDS_Mesh::_meshList[myMeshId], l.cells, l.ncells, type));
+ }
+@@ -251,7 +251,7 @@ elementsIterator(SMDSAbs_ElementType typ
+ return SMDS_MeshElement::elementsIterator(SMDSAbs_Node);
+ else
+ {
+- vtkCellLinks::Link l = SMDS_Mesh::_meshList[myMeshId]->getGrid()->GetCellLinks()->GetLink(myVtkID);
++ vtkCellLinks::Link l = static_cast<vtkCellLinks*>(SMDS_Mesh::_meshList[myMeshId]->getGrid()->GetCellLinks())->GetLink(myVtkID);
+ return SMDS_ElemIteratorPtr(new SMDS_MeshNode_MyIterator(SMDS_Mesh::_meshList[myMeshId], l.cells, l.ncells, type));
+ }
+ }
+@@ -350,7 +350,7 @@ void SMDS_MeshNode::AddInverseElement(co
+ const SMDS_MeshCell *cell = dynamic_cast<const SMDS_MeshCell*> (ME);
+ assert(cell);
+ SMDS_UnstructuredGrid* grid = SMDS_Mesh::_meshList[myMeshId]->getGrid();
+- vtkCellLinks *Links = grid->GetCellLinks();
++ vtkCellLinks *Links = static_cast<vtkCellLinks*>(grid->GetCellLinks());
+ Links->ResizeCellList(myVtkID, 1);
+ Links->AddCellReference(cell->getVtkId(), myVtkID);
+ }
+@@ -366,7 +366,7 @@ void SMDS_MeshNode::ClearInverseElements
+
+ bool SMDS_MeshNode::emptyInverseElements()
+ {
+- vtkCellLinks::Link l = SMDS_Mesh::_meshList[myMeshId]->getGrid()->GetCellLinks()->GetLink(myVtkID);
++ vtkCellLinks::Link l = static_cast<vtkCellLinks*>(SMDS_Mesh::_meshList[myMeshId]->getGrid()->GetCellLinks())->GetLink(myVtkID);
+ return (l.ncells == 0);
+ }
+
+@@ -378,7 +378,7 @@ bool SMDS_MeshNode::emptyInverseElements
+
+ int SMDS_MeshNode::NbInverseElements(SMDSAbs_ElementType type) const
+ {
+- vtkCellLinks::Link l = SMDS_Mesh::_meshList[myMeshId]->getGrid()->GetCellLinks()->GetLink(myVtkID);
++ vtkCellLinks::Link l = static_cast<vtkCellLinks*>(SMDS_Mesh::_meshList[myMeshId]->getGrid()->GetCellLinks())->GetLink(myVtkID);
+
+ if ( type == SMDSAbs_All )
+ return l.ncells;
+Index: FreeCAD-0.19.2/src/3rdParty/salomesmesh/src/SMDS/SMDS_UnstructuredGrid.cpp
+===================================================================
+--- FreeCAD-0.19.2.orig/src/3rdParty/salomesmesh/src/SMDS/SMDS_UnstructuredGrid.cpp
++++ FreeCAD-0.19.2/src/3rdParty/salomesmesh/src/SMDS/SMDS_UnstructuredGrid.cpp
+@@ -139,8 +139,8 @@ int SMDS_UnstructuredGrid::InsertNextLin
+ for (; it != setOfNodes.end(); ++it)
+ {
+ //MESSAGE("reverse link for node " << *it << " cell " << cellid);
+- this->Links->ResizeCellList(*it, 1);
+- this->Links->AddCellReference(cellid, *it);
++ this->GetLinks()->ResizeCellList(*it, 1);
++ this->GetLinks()->AddCellReference(cellid, *it);
+ }
+
+ return cellid;
+@@ -332,9 +332,13 @@ void SMDS_UnstructuredGrid::copyBloc(vtk
+ {
+ newTypes->SetValue(alreadyCopied, this->Types->GetValue(j));
+ idCellsOldToNew[j] = alreadyCopied; // old vtkId --> new vtkId
++#ifdef VTK_CELL_ARRAY_V2
++ vtkIdType oldLoc = this->GetCellLocationsArray()->GetValue(j);
++#else
+ vtkIdType oldLoc = this->Locations->GetValue(j);
++#endif
+ vtkIdType nbpts;
+- vtkIdType *oldPtsCell = 0;
++ vtkIdTypePtr oldPtsCell = 0;
+ this->Connectivity->GetCell(oldLoc, nbpts, oldPtsCell);
+ assert(nbpts < NBMAXNODESINCELL);
+ //MESSAGE(j << " " << alreadyCopied << " " << (int)this->Types->GetValue(j) << " " << oldLoc << " " << nbpts );
+@@ -952,6 +956,21 @@ void SMDS_UnstructuredGrid::GetNodeIds(s
+ */
+ void SMDS_UnstructuredGrid::ModifyCellNodes(int vtkVolId, std::map<int, int> localClonedNodeIds)
+ {
++#ifdef VTK_CELL_ARRAY_V2
++ vtkNew<vtkIdList> cellPoints;
++ this->GetCellPoints(vtkVolId, cellPoints.GetPointer());
++ for (vtkIdType i = 0; i < cellPoints->GetNumberOfIds(); i++)
++ {
++ if (localClonedNodeIds.count(cellPoints->GetId(i)))
++ {
++ vtkIdType oldpt = cellPoints->GetId(i);
++ cellPoints->SetId(i, localClonedNodeIds[oldpt]);
++ //MESSAGE(oldpt << " --> " << pts[i]);
++ //this->RemoveReferenceToCell(oldpt, vtkVolId);
++ //this->AddReferenceToCell(pts[i], vtkVolId);
++ }
++ }
++#else
+ vtkIdType npts = 0;
+ vtkIdType *pts; // will refer to the point id's of the face
+ this->GetCellPoints(vtkVolId, npts, pts);
+@@ -966,6 +985,7 @@ void SMDS_UnstructuredGrid::ModifyCellNo
+ //this->AddReferenceToCell(pts[i], vtkVolId);
+ }
+ }
++#endif
+ }
+
+ /*! reorder the nodes of a face
+@@ -995,11 +1015,20 @@ void SMDS_UnstructuredGrid::BuildLinks()
+ this->Links->UnRegister(this);
+ }
+
++#ifdef VTK_CELL_ARRAY_V2
++ this->Links = SMDS_CellLinks::New();
++ GetLinks()->Allocate(this->GetNumberOfPoints());
++ GetLinks()->Register(this);
++//FIXME: vtk9
++ GetLinks()->BuildLinks(this);
++ GetLinks()->Delete();
++#else
+ this->Links = SMDS_CellLinks::New();
+ this->Links->Allocate(this->GetNumberOfPoints());
+ this->Links->Register(this);
+ this->Links->BuildLinks(this, this->Connectivity);
+ this->Links->Delete();
++#endif
+ }
+
+ /*! Create a volume (prism or hexahedron) by duplication of a face.
+Index: FreeCAD-0.19.2/src/3rdParty/salomesmesh/src/SMDS/SMDS_VtkCellIterator.cpp
+===================================================================
+--- FreeCAD-0.19.2.orig/src/3rdParty/salomesmesh/src/SMDS/SMDS_VtkCellIterator.cpp
++++ FreeCAD-0.19.2/src/3rdParty/salomesmesh/src/SMDS/SMDS_VtkCellIterator.cpp
+@@ -33,7 +33,8 @@ SMDS_VtkCellIterator::SMDS_VtkCellIterat
+ }
+ else
+ {
+- vtkIdType npts, *pts;
++ vtkIdType npts;
++ vtkIdTypePtr pts;
+ grid->GetCellPoints( _cellId, npts, pts );
+ _vtkIdList->SetNumberOfIds( _nbNodes = npts );
+ for (int i = 0; i < _nbNodes; i++)
+@@ -67,7 +68,7 @@ SMDS_VtkCellIteratorToUNV::SMDS_VtkCellI
+ //MESSAGE("SMDS_VtkCellInterlacedIterator (UNV)" << _type);
+
+ _vtkIdList = vtkIdList::New();
+- vtkIdType* pts;
++ vtkIdTypePtr pts;
+ vtkIdType npts;
+ vtkUnstructuredGrid* grid = _mesh->getGrid();
+ grid->GetCellPoints((vtkIdType)_cellId, npts, pts);
+@@ -182,7 +183,7 @@ SMDS_VtkCellIteratorPolyH::SMDS_VtkCellI
+ {
+ //MESSAGE("SMDS_VtkCellIterator Polyhedra");
+ vtkIdType nFaces = 0;
+- vtkIdType* ptIds = 0;
++ vtkIdTypePtr ptIds = 0;
+ grid->GetFaceStream(_cellId, nFaces, ptIds);
+ int id = 0;
+ _nbNodesInFaces = 0;
+Index: FreeCAD-0.19.2/src/3rdParty/salomesmesh/src/SMDS/SMDS_VtkEdge.cpp
+===================================================================
+--- FreeCAD-0.19.2.orig/src/3rdParty/salomesmesh/src/SMDS/SMDS_VtkEdge.cpp
++++ FreeCAD-0.19.2/src/3rdParty/salomesmesh/src/SMDS/SMDS_VtkEdge.cpp
+@@ -67,6 +67,19 @@ bool SMDS_VtkEdge::ChangeNodes(const SMD
+ bool SMDS_VtkEdge::ChangeNodes(const SMDS_MeshNode* nodes[], const int nbNodes)
+ {
+ vtkUnstructuredGrid* grid = SMDS_Mesh::_meshList[myMeshId]->getGrid();
++#ifdef VTK_CELL_ARRAY_V2
++ vtkNew<vtkIdList> cellPoints;
++ grid->GetCellPoints(myVtkID, cellPoints.GetPointer());
++ if (nbNodes != cellPoints->GetNumberOfIds())
++ {
++ MESSAGE("ChangeNodes problem: not the same number of nodes " << cellPoints->GetNumberOfIds() << " -> " << nbNodes);
++ return false;
++ }
++ for (int i = 0; i < nbNodes; i++)
++ {
++ cellPoints->SetId(i, nodes[i]->getVtkId());
++ }
++#else
+ vtkIdType npts = 0;
+ vtkIdType* pts = 0;
+ grid->GetCellPoints(myVtkID, npts, pts);
+@@ -79,6 +92,7 @@ bool SMDS_VtkEdge::ChangeNodes(const SMD
+ {
+ pts[i] = nodes[i]->getVtkId();
+ }
++#endif
+ SMDS_Mesh::_meshList[myMeshId]->setMyModified();
+ return true;
+ }
+@@ -87,7 +101,7 @@ bool SMDS_VtkEdge::IsMediumNode(const SM
+ {
+ vtkUnstructuredGrid* grid = SMDS_Mesh::_meshList[myMeshId]->getGrid();
+ vtkIdType npts = 0;
+- vtkIdType* pts = 0;
++ vtkIdTypePtr pts = 0;
+ grid->GetCellPoints(myVtkID, npts, pts);
+ //MESSAGE("IsMediumNode " << npts << " " << (node->getVtkId() == pts[npts-1]));
+ return ((npts == 3) && (node->getVtkId() == pts[2]));
+@@ -137,7 +151,8 @@ const SMDS_MeshNode*
+ SMDS_VtkEdge::GetNode(const int ind) const
+ {
+ vtkUnstructuredGrid* grid = SMDS_Mesh::_meshList[myMeshId]->getGrid();
+- vtkIdType npts, *pts;
++ vtkIdType npts;
++ vtkIdTypePtr pts;
+ grid->GetCellPoints( this->myVtkID, npts, pts );
+ return SMDS_Mesh::_meshList[myMeshId]->FindNodeVtk( pts[ ind ]);
+ }
+Index: FreeCAD-0.19.2/src/3rdParty/salomesmesh/src/SMDS/SMDS_VtkFace.cpp
+===================================================================
+--- FreeCAD-0.19.2.orig/src/3rdParty/salomesmesh/src/SMDS/SMDS_VtkFace.cpp
++++ FreeCAD-0.19.2/src/3rdParty/salomesmesh/src/SMDS/SMDS_VtkFace.cpp
+@@ -101,6 +101,19 @@ void SMDS_VtkFace::initQuadPoly(const st
+ bool SMDS_VtkFace::ChangeNodes(const SMDS_MeshNode* nodes[], const int nbNodes)
+ {
+ vtkUnstructuredGrid* grid = SMDS_Mesh::_meshList[myMeshId]->getGrid();
++#ifdef VTK_CELL_ARRAY_V2
++ vtkNew<vtkIdList> cellPoints;
++ grid->GetCellPoints(myVtkID, cellPoints.GetPointer());
++ if (nbNodes != cellPoints->GetNumberOfIds())
++ {
++ MESSAGE("ChangeNodes problem: not the same number of nodes " << cellPoints->GetNumberOfIds() << " -> " << nbNodes);
++ return false;
++ }
++ for (int i = 0; i < nbNodes; i++)
++ {
++ cellPoints->SetId(i, nodes[i]->getVtkId());
++ }
++#else
+ vtkIdType npts = 0;
+ vtkIdType* pts = 0;
+ grid->GetCellPoints(myVtkID, npts, pts);
+@@ -113,6 +126,7 @@ bool SMDS_VtkFace::ChangeNodes(const SMD
+ {
+ pts[i] = nodes[i]->getVtkId();
+ }
++#endif
+ SMDS_Mesh::_meshList[myMeshId]->setMyModified();
+ return true;
+ }
+@@ -173,7 +187,8 @@ const SMDS_MeshNode*
+ SMDS_VtkFace::GetNode(const int ind) const
+ {
+ vtkUnstructuredGrid* grid = SMDS_Mesh::_meshList[myMeshId]->getGrid();
+- vtkIdType npts, *pts;
++ vtkIdType npts;
++ vtkIdTypePtr pts;
+ grid->GetCellPoints( this->myVtkID, npts, pts );
+ return SMDS_Mesh::_meshList[myMeshId]->FindNodeVtk( pts[ ind ]);
+ }
+@@ -186,7 +201,8 @@ SMDS_VtkFace::GetNode(const int ind) con
+ int SMDS_VtkFace::GetNodeIndex( const SMDS_MeshNode* node ) const
+ {
+ vtkUnstructuredGrid* grid = SMDS_Mesh::_meshList[myMeshId]->getGrid();
+- vtkIdType npts, *pts;
++ vtkIdType npts;
++ vtkIdTypePtr pts;
+ grid->GetCellPoints( this->myVtkID, npts, pts );
+ for ( vtkIdType i = 0; i < npts; ++i )
+ if ( pts[i] == node->getVtkId() )
+@@ -251,7 +267,7 @@ bool SMDS_VtkFace::IsMediumNode(const SM
+ return false;
+ }
+ vtkIdType npts = 0;
+- vtkIdType* pts = 0;
++ vtkIdTypePtr pts = 0;
+ grid->GetCellPoints(myVtkID, npts, pts);
+ vtkIdType nodeId = node->getVtkId();
+ for (int rank = 0; rank < npts; rank++)
+@@ -356,11 +372,18 @@ SMDS_NodeIteratorPtr SMDS_VtkFace::inter
+ void SMDS_VtkFace::ChangeApex(SMDS_MeshNode* node)
+ {
+ vtkUnstructuredGrid* grid = SMDS_Mesh::_meshList[myMeshId]->getGrid();
++#ifdef VTK_CELL_ARRAY_V2
++ vtkNew<vtkIdList> cellPoints;
++ grid->GetCellPoints(myVtkID, cellPoints.GetPointer());
++ grid->RemoveReferenceToCell(cellPoints->GetId(0), myVtkID);
++ cellPoints->SetId(0, node->getVtkId());
++#else
+ vtkIdType npts = 0;
+ vtkIdType* pts = 0;
+ grid->GetCellPoints(myVtkID, npts, pts);
+ grid->RemoveReferenceToCell(pts[0], myVtkID);
+ pts[0] = node->getVtkId();
++#endif
+ node->AddInverseElement(this),
+ SMDS_Mesh::_meshList[myMeshId]->setMyModified();
+ }
+Index: FreeCAD-0.19.2/src/3rdParty/salomesmesh/src/SMDS/SMDS_VtkVolume.cpp
+===================================================================
+--- FreeCAD-0.19.2.orig/src/3rdParty/salomesmesh/src/SMDS/SMDS_VtkVolume.cpp
++++ FreeCAD-0.19.2/src/3rdParty/salomesmesh/src/SMDS/SMDS_VtkVolume.cpp
+@@ -133,6 +133,19 @@ void SMDS_VtkVolume::initPoly(const std:
+ bool SMDS_VtkVolume::ChangeNodes(const SMDS_MeshNode* nodes[], const int nbNodes)
+ {
+ vtkUnstructuredGrid* grid = SMDS_Mesh::_meshList[myMeshId]->getGrid();
++#ifdef VTK_CELL_ARRAY_V2
++ vtkNew<vtkIdList> cellPoints;
++ grid->GetCellPoints(myVtkID, cellPoints.GetPointer());
++ if (nbNodes != cellPoints->GetNumberOfIds())
++ {
++ MESSAGE("ChangeNodes problem: not the same number of nodes " << cellPoints->GetNumberOfIds() << " -> " << nbNodes);
++ return false;
++ }
++ for (int i = 0; i < nbNodes; i++)
++ {
++ cellPoints->SetId(i, nodes[i]->getVtkId());
++ }
++#else
+ vtkIdType npts = 0;
+ vtkIdType* pts = 0;
+ grid->GetCellPoints(myVtkID, npts, pts);
+@@ -145,6 +158,7 @@ bool SMDS_VtkVolume::ChangeNodes(const S
+ {
+ pts[i] = nodes[i]->getVtkId();
+ }
++#endif
+ SMDS_Mesh::_meshList[myMeshId]->setMyModified();
+ return true;
+ }
+@@ -207,7 +221,7 @@ int SMDS_VtkVolume::NbFaces() const
+ case VTK_POLYHEDRON:
+ {
+ vtkIdType nFaces = 0;
+- vtkIdType* ptIds = 0;
++ vtkIdTypePtr ptIds = 0;
+ grid->GetFaceStream(this->myVtkID, nFaces, ptIds);
+ nbFaces = nFaces;
+ break;
+@@ -236,7 +250,7 @@ int SMDS_VtkVolume::NbNodes() const
+ else
+ {
+ vtkIdType nFaces = 0;
+- vtkIdType* ptIds = 0;
++ vtkIdTypePtr ptIds = 0;
+ grid->GetFaceStream(this->myVtkID, nFaces, ptIds);
+ int id = 0;
+ for (int i = 0; i < nFaces; i++)
+@@ -276,7 +290,7 @@ int SMDS_VtkVolume::NbEdges() const
+ case VTK_POLYHEDRON:
+ {
+ vtkIdType nFaces = 0;
+- vtkIdType* ptIds = 0;
++ vtkIdTypePtr ptIds = 0;
+ grid->GetFaceStream(this->myVtkID, nFaces, ptIds);
+ nbEdges = 0;
+ int id = 0;
+@@ -312,7 +326,7 @@ int SMDS_VtkVolume::NbFaceNodes(const in
+ if (aVtkType == VTK_POLYHEDRON)
+ {
+ vtkIdType nFaces = 0;
+- vtkIdType* ptIds = 0;
++ vtkIdTypePtr ptIds = 0;
+ grid->GetFaceStream(this->myVtkID, nFaces, ptIds);
+ int id = 0;
+ for (int i = 0; i < nFaces; i++)
+@@ -342,7 +356,7 @@ const SMDS_MeshNode* SMDS_VtkVolume::Get
+ if (aVtkType == VTK_POLYHEDRON)
+ {
+ vtkIdType nFaces = 0;
+- vtkIdType* ptIds = 0;
++ vtkIdTypePtr ptIds = 0;
+ grid->GetFaceStream(this->myVtkID, nFaces, ptIds);
+ int id = 0;
+ for (int i = 0; i < nFaces; i++)
+@@ -372,7 +386,7 @@ std::vector<int> SMDS_VtkVolume::GetQuan
+ if (aVtkType == VTK_POLYHEDRON)
+ {
+ vtkIdType nFaces = 0;
+- vtkIdType* ptIds = 0;
++ vtkIdTypePtr ptIds = 0;
+ grid->GetFaceStream(this->myVtkID, nFaces, ptIds);
+ int id = 0;
+ for (int i = 0; i < nFaces; i++)
+@@ -430,7 +444,7 @@ const SMDS_MeshNode* SMDS_VtkVolume::Get
+ if ( aVtkType == VTK_POLYHEDRON)
+ {
+ vtkIdType nFaces = 0;
+- vtkIdType* ptIds = 0;
++ vtkIdTypePtr ptIds = 0;
+ grid->GetFaceStream(this->myVtkID, nFaces, ptIds);
+ int id = 0, nbPoints = 0;
+ for (int i = 0; i < nFaces; i++)
+@@ -443,7 +457,8 @@ const SMDS_MeshNode* SMDS_VtkVolume::Get
+ }
+ return 0;
+ }
+- vtkIdType npts, *pts;
++ vtkIdType npts;
++ vtkIdTypePtr pts;
+ grid->GetCellPoints( this->myVtkID, npts, pts );
+ const std::vector<int>& interlace = SMDS_MeshCell::fromVtkOrder( VTKCellType( aVtkType ));
+ return SMDS_Mesh::_meshList[myMeshId]->FindNodeVtk( pts[ interlace.empty() ? ind : interlace[ind]] );
+@@ -460,7 +475,7 @@ int SMDS_VtkVolume::GetNodeIndex( const
+ if ( aVtkType == VTK_POLYHEDRON)
+ {
+ vtkIdType nFaces = 0;
+- vtkIdType* ptIds = 0;
++ vtkIdTypePtr ptIds = 0;
+ grid->GetFaceStream(this->myVtkID, nFaces, ptIds);
+ int id = 0;
+ for (int iF = 0; iF < nFaces; iF++)
+@@ -473,7 +488,8 @@ int SMDS_VtkVolume::GetNodeIndex( const
+ }
+ return -1;
+ }
+- vtkIdType npts, *pts;
++ vtkIdType npts;
++ vtkIdTypePtr pts;
+ grid->GetCellPoints( this->myVtkID, npts, pts );
+ for ( vtkIdType i = 0; i < npts; ++i )
+ if ( pts[i] == node->getVtkId() )
+@@ -534,7 +550,7 @@ bool SMDS_VtkVolume::IsMediumNode(const
+ return false;
+ }
+ vtkIdType npts = 0;
+- vtkIdType* pts = 0;
++ vtkIdTypePtr pts = 0;
+ grid->GetCellPoints(myVtkID, npts, pts);
+ vtkIdType nodeId = node->getVtkId();
+ for (int rank = 0; rank < npts; rank++)
+Index: FreeCAD-0.19.2/src/3rdParty/salomesmesh/src/SMESH/SMESH_MeshEditor.cpp
+===================================================================
+--- FreeCAD-0.19.2.orig/src/3rdParty/salomesmesh/src/SMESH/SMESH_MeshEditor.cpp
++++ FreeCAD-0.19.2/src/3rdParty/salomesmesh/src/SMESH/SMESH_MeshEditor.cpp
+@@ -11348,7 +11348,7 @@ bool SMESH_MeshEditor::DoubleNodesOnGrou
+ {
+ int oldId = *itn;
+ //MESSAGE(" node " << oldId);
+- vtkCellLinks::Link l = grid->GetCellLinks()->GetLink(oldId);
++ vtkCellLinks::Link l = static_cast<vtkCellLinks*>(grid->GetCellLinks())->GetLink(oldId);
+ for (int i=0; i<l.ncells; i++)
+ {
+ int vtkId = l.cells[i];
+@@ -11527,7 +11527,7 @@ bool SMESH_MeshEditor::DoubleNodesOnGrou
+ //MESSAGE(" domain " << idom << " volume " << elem->GetID());
+ double values[3];
+ vtkIdType npts = 0;
+- vtkIdType* pts = 0;
++ vtkIdTypePtr pts = 0;
+ grid->GetCellPoints(vtkVolIds[ivol], npts, pts);
+ SMDS_VtkVolume::gravityCenter(grid, pts, npts, values);
+ if (id ==0)
+@@ -11708,7 +11708,7 @@ bool SMESH_MeshEditor::DoubleNodesOnGrou
+ {
+ int oldId = itnod->first;
+ //MESSAGE(" node " << oldId);
+- vtkCellLinks::Link l = grid->GetCellLinks()->GetLink(oldId);
++ vtkCellLinks::Link l = static_cast<vtkCellLinks*>(grid->GetCellLinks())->GetLink(oldId);
+ for (int i = 0; i < l.ncells; i++)
+ {
+ int vtkId = l.cells[i];
+@@ -12165,7 +12165,7 @@ void SMESH_MeshEditor::CreateHoleSkin(do
+ MESSAGE("volume to check, vtkId " << vtkId << " smdsId " << meshDS->fromVtkToSmds(vtkId));
+ bool volInside = false;
+ vtkIdType npts = 0;
+- vtkIdType* pts = 0;
++ vtkIdTypePtr pts = 0;
+ grid->GetCellPoints(vtkId, npts, pts);
+ for (int i=0; i<npts; i++)
+ {
+Index: FreeCAD-0.19.2/src/Mod/Fem/Gui/ViewProviderFemPostObject.cpp
+===================================================================
+--- FreeCAD-0.19.2.orig/src/Mod/Fem/Gui/ViewProviderFemPostObject.cpp
++++ FreeCAD-0.19.2/src/Mod/Fem/Gui/ViewProviderFemPostObject.cpp
+@@ -20,7 +20,6 @@
+ * *
+ ***************************************************************************/
+
+-
+ #include "PreCompiled.h"
+
+ #ifndef _PreComp_
diff --git a/gnu/packages/patches/freeglut-gcc-compat.patch b/gnu/packages/patches/freeglut-gcc-compat.patch
new file mode 100644
index 0000000000..126bbd89f4
--- /dev/null
+++ b/gnu/packages/patches/freeglut-gcc-compat.patch
@@ -0,0 +1,53 @@
+Fix build failure with GCC 10.
+
+Taken from upstream:
+https://github.com/dcnieho/FreeGLUT/commit/b9998bbc1e1c329f6bf69c24606a2be7a4973b8c
+
+diff --git a/src/fg_gl2.c b/src/fg_gl2.c
+--- a/src/fg_gl2.c
++++ b/src/fg_gl2.c
+@@ -27,6 +27,20 @@
+ #include "fg_internal.h"
+ #include "fg_gl2.h"
+
++#ifndef GL_ES_VERSION_2_0
++/* GLES2 has the corresponding entry points built-in, and these fgh-prefixed
++ * names are defined in fg_gl2.h header to reference them, for any other case,
++ * define them as function pointers here.
++ */
++FGH_PFNGLGENBUFFERSPROC fghGenBuffers;
++FGH_PFNGLDELETEBUFFERSPROC fghDeleteBuffers;
++FGH_PFNGLBINDBUFFERPROC fghBindBuffer;
++FGH_PFNGLBUFFERDATAPROC fghBufferData;
++FGH_PFNGLENABLEVERTEXATTRIBARRAYPROC fghEnableVertexAttribArray;
++FGH_PFNGLDISABLEVERTEXATTRIBARRAYPROC fghDisableVertexAttribArray;
++FGH_PFNGLVERTEXATTRIBPOINTERPROC fghVertexAttribPointer;
++#endif
++
+ void FGAPIENTRY glutSetVertexAttribCoord3(GLint attrib) {
+ if (fgStructure.CurrentWindow != NULL)
+ fgStructure.CurrentWindow->Window.attribute_v_coord = attrib;
+diff --git a/src/fg_gl2.h b/src/fg_gl2.h
+--- a/src/fg_gl2.h
++++ b/src/fg_gl2.h
+@@ -67,13 +67,13 @@ typedef void (APIENTRY *FGH_PFNGLENABLEVERTEXATTRIBARRAYPROC) (GLuint index);
+ typedef void (APIENTRY *FGH_PFNGLDISABLEVERTEXATTRIBARRAYPROC) (GLuint);
+ typedef void (APIENTRY *FGH_PFNGLVERTEXATTRIBPOINTERPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid *pointer);
+
+-FGH_PFNGLGENBUFFERSPROC fghGenBuffers;
+-FGH_PFNGLDELETEBUFFERSPROC fghDeleteBuffers;
+-FGH_PFNGLBINDBUFFERPROC fghBindBuffer;
+-FGH_PFNGLBUFFERDATAPROC fghBufferData;
+-FGH_PFNGLENABLEVERTEXATTRIBARRAYPROC fghEnableVertexAttribArray;
+-FGH_PFNGLDISABLEVERTEXATTRIBARRAYPROC fghDisableVertexAttribArray;
+-FGH_PFNGLVERTEXATTRIBPOINTERPROC fghVertexAttribPointer;
++extern FGH_PFNGLGENBUFFERSPROC fghGenBuffers;
++extern FGH_PFNGLDELETEBUFFERSPROC fghDeleteBuffers;
++extern FGH_PFNGLBINDBUFFERPROC fghBindBuffer;
++extern FGH_PFNGLBUFFERDATAPROC fghBufferData;
++extern FGH_PFNGLENABLEVERTEXATTRIBARRAYPROC fghEnableVertexAttribArray;
++extern FGH_PFNGLDISABLEVERTEXATTRIBARRAYPROC fghDisableVertexAttribArray;
++extern FGH_PFNGLVERTEXATTRIBPOINTERPROC fghVertexAttribPointer;
+
+ # endif
+
diff --git a/gnu/packages/patches/ganeti-preserve-PYTHONPATH.patch b/gnu/packages/patches/ganeti-preserve-PYTHONPATH.patch
deleted file mode 100644
index 1358e30633..0000000000
--- a/gnu/packages/patches/ganeti-preserve-PYTHONPATH.patch
+++ /dev/null
@@ -1,21 +0,0 @@
-Do not override PYTHONPATH when calling Python code from the Haskell
-daemons. This is necessary because the Python library dependencies are
-only available through PYTHONPATH.
-
-diff --git a/src/Ganeti/Query/Exec.hs b/src/Ganeti/Query/Exec.hs
---- a/src/Ganeti/Query/Exec.hs
-+++ b/src/Ganeti/Query/Exec.hs
-@@ -99,12 +99,10 @@ spawnJobProcess jid = withErrorLogAt CRITICAL (show jid) $
- do
- use_debug <- isDebugMode
- env_ <- (M.toList . M.insert "GNT_DEBUG" (if use_debug then "1" else "0")
-- . M.insert "PYTHONPATH" AC.pythondir
- . M.fromList)
- `liftM` getEnvironment
- execPy <- P.jqueueExecutorPy
- logDebug $ "Executing " ++ AC.pythonPath ++ " " ++ execPy
-- ++ " with PYTHONPATH=" ++ AC.pythondir
-
- (master, child) <- pipeClient connectConfig
- let (rh, wh) = clientToHandle child
-
diff --git a/gnu/packages/patches/gcc-10-cross-environment-variables.patch b/gnu/packages/patches/gcc-10-cross-environment-variables.patch
new file mode 100644
index 0000000000..414198657d
--- /dev/null
+++ b/gnu/packages/patches/gcc-10-cross-environment-variables.patch
@@ -0,0 +1,51 @@
+Search path environment variables for cross-compilers. See the discussion
+at <http://gcc.gnu.org/ml/gcc/2013-02/msg00124.html>.
+
+Note: Touch 'C_INCLUDE_PATH' et al. rather than 'CPATH', as discussed
+at <http://bugs.gnu.org/22186>.
+
+diff --git a/gcc/gcc.c b/gcc/gcc.c
+--- a/gcc/gcc.c
++++ b/gcc/gcc.c
+@@ -4474,7 +4474,7 @@ process_command (unsigned int decoded_options_count,
+ }
+
+ temp = env.get (LIBRARY_PATH_ENV);
+- if (temp && *cross_compile == '0')
++ if (temp)
+ {
+ const char *startp, *endp;
+ char *nstore = (char *) alloca (strlen (temp) + 3);
+diff --git a/gcc/incpath.c b/gcc/incpath.c
+--- a/gcc/incpath.c
++++ b/gcc/incpath.c
+@@ -472,8 +472,8 @@ register_include_chains (cpp_reader *pfile, const char *sysroot,
+ int stdinc, int cxx_stdinc, int verbose)
+ {
+ static const char *const lang_env_vars[] =
+- { "C_INCLUDE_PATH", "CPLUS_INCLUDE_PATH",
+- "OBJC_INCLUDE_PATH", "OBJCPLUS_INCLUDE_PATH" };
++ { "CROSS_C_INCLUDE_PATH", "CROSS_CPLUS_INCLUDE_PATH",
++ "CROSS_OBJC_INCLUDE_PATH", "CROSS_OBJCPLUS_INCLUDE_PATH" };
+ cpp_options *cpp_opts = cpp_get_options (pfile);
+ size_t idx = (cpp_opts->objc ? 2: 0);
+
+@@ -484,7 +484,7 @@ register_include_chains (cpp_reader *pfile, const char *sysroot,
+
+ /* CPATH and language-dependent environment variables may add to the
+ include chain. */
+- add_env_var_paths ("CPATH", INC_BRACKET);
++ add_env_var_paths ("CROSS_CPATH", INC_BRACKET);
+ add_env_var_paths (lang_env_vars[idx], INC_SYSTEM);
+
+ target_c_incpath.extra_pre_includes (sysroot, iprefix, stdinc);
+diff --git a/gcc/system.h b/gcc/system.h
+--- a/gcc/system.h
++++ b/gcc/system.h
+@@ -1244,4 +1244,6 @@ void gcc_stablesort (void *, size_t, size_t,
+ of the number. */
+ #define PRsa(n) "%" #n PRIu64 "%c"
+
++#define LIBRARY_PATH_ENV "CROSS_LIBRARY_PATH"
++
+ #endif /* ! GCC_SYSTEM_H */
diff --git a/gnu/packages/patches/gcc-5-fix-powerpc64le-build.patch b/gnu/packages/patches/gcc-5-fix-powerpc64le-build.patch
new file mode 100644
index 0000000000..289d648875
--- /dev/null
+++ b/gnu/packages/patches/gcc-5-fix-powerpc64le-build.patch
@@ -0,0 +1,64 @@
+From ee6c0081c03330045b3d4cde8421cd1d3a459609 Mon Sep 17 00:00:00 2001
+From: Martin Liska <mliska@suse.cz>
+Date: Fri, 15 Jun 2018 10:51:28 +0200
+Subject: [PATCH] Partial backport r256656
+
+2018-06-15 Martin Liska <mliska@suse.cz>
+
+ Backport from mainline
+ 2018-01-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
+
+ * lex.c (search_line_fast): Remove illegal coercion of an
+ unaligned pointer value to vector pointer type and replace with
+ use of __builtin_vec_vsx_ld () built-in function, which operates
+ on unaligned pointer values.
+
+From-SVN: r261621
+---
+
+Obtained from:
+
+https://gcc.gnu.org/git/?p=gcc.git;a=patch;h=ee6c0081c03330045b3d4cde8421cd1d3a459609
+
+The libcpp/ChangeLog hunk was modified to apply on top of gcc-5's libcpp/ChangeLog.
+
+ libcpp/ChangeLog | 12 ++++++++++++
+ libcpp/lex.c | 2 +-
+ 2 files changed, 13 insertions(+), 1 deletion(-)
+
+diff --git a/libcpp/ChangeLog b/libcpp/ChangeLog
+index c920a05d438..a63abb04f5e 100644
+--- a/libcpp/ChangeLog
++++ b/libcpp/ChangeLog
+@@ -1,3 +1,15 @@
++2018-06-15 Martin Liska <mliska@suse.cz>
++
++ PR bootstrap/86162
++
++ Backport from mainline
++ 2018-01-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
++
++ * lex.c (search_line_fast): Remove illegal coercion of an
++ unaligned pointer value to vector pointer type and replace with
++ use of __builtin_vec_vsx_ld () built-in function, which operates
++ on unaligned pointer values.
++
+ 2017-10-10 Release Manager
+
+ * GCC 5.5.0 released.
+diff --git a/libcpp/lex.c b/libcpp/lex.c
+index e5a0397f309..b789686f1c4 100644
+--- a/libcpp/lex.c
++++ b/libcpp/lex.c
+@@ -568,7 +568,7 @@ search_line_fast (const uchar *s, const uchar *end ATTRIBUTE_UNUSED)
+ {
+ vc m_nl, m_cr, m_bs, m_qm;
+
+- data = *((const vc *)s);
++ data = __builtin_vec_vsx_ld (0, s);
+ s += 16;
+
+ m_nl = (vc) __builtin_vec_cmpeq(data, repl_nl);
+--
+2.27.0
+
diff --git a/gnu/packages/patches/gcc-cross-gxx-include-dir.patch b/gnu/packages/patches/gcc-cross-gxx-include-dir.patch
new file mode 100644
index 0000000000..d6c4ffddc4
--- /dev/null
+++ b/gnu/packages/patches/gcc-cross-gxx-include-dir.patch
@@ -0,0 +1,73 @@
+This patch reverts upstream commit b4d3485e4fc1d:
+
+ https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff;h=b4d3485e4fc1d029e620a59deb54b3f4f3f6b209
+
+Otherwise, GCC ends up searching the wrong target directory for cross-headers.
+
+diff --git a/gcc/configure b/gcc/configure
+--- a/gcc/configure
++++ b/gcc/configure
+@@ -3689,11 +3689,6 @@ esac
+ fi
+
+
+-# If both --with-sysroot and --with-gxx-include-dir are passed, we interpolate
+-# the former in the latter and, upon success, compute gcc_gxx_include_dir as
+-# relative to the sysroot.
+-gcc_gxx_include_dir_add_sysroot=0
+-
+ # This logic must match libstdc++-v3/acinclude.m4:GLIBCXX_EXPORT_INSTALL_INFO.
+ if test x${gcc_gxx_include_dir} = x; then
+ if test x${enable_version_specific_runtime_libs} = xyes; then
+@@ -3705,10 +3700,15 @@ if test x${gcc_gxx_include_dir} = x; then
+ fi
+ gcc_gxx_include_dir="\$(libsubdir)/\$(libsubdir_to_prefix)$libstdcxx_incdir"
+ fi
+-elif test "${with_sysroot+set}" = set; then
++fi
++
++gcc_gxx_include_dir_add_sysroot=0
++if test "${with_sysroot+set}" = set; then
+ gcc_gxx_without_sysroot=`expr "${gcc_gxx_include_dir}" : "${with_sysroot}"'\(.*\)'`
+ if test "${gcc_gxx_without_sysroot}"; then
+- gcc_gxx_include_dir="${gcc_gxx_without_sysroot}"
++ if test x${with_sysroot} != x/; then
++ gcc_gxx_include_dir="${gcc_gxx_without_sysroot}"
++ fi
+ gcc_gxx_include_dir_add_sysroot=1
+ fi
+ fi
+diff --git a/gcc/configure.ac b/gcc/configure.ac
+index 715fcba0482..88136e232df 100644
+--- a/gcc/configure.ac
++++ b/gcc/configure.ac
+@@ -204,11 +204,6 @@ no) ;;
+ *) gcc_gxx_include_dir=$with_gxx_include_dir ;;
+ esac])
+
+-# If both --with-sysroot and --with-gxx-include-dir are passed, we interpolate
+-# the former in the latter and, upon success, compute gcc_gxx_include_dir as
+-# relative to the sysroot.
+-gcc_gxx_include_dir_add_sysroot=0
+-
+ # This logic must match libstdc++-v3/acinclude.m4:GLIBCXX_EXPORT_INSTALL_INFO.
+ if test x${gcc_gxx_include_dir} = x; then
+ if test x${enable_version_specific_runtime_libs} = xyes; then
+@@ -220,10 +215,15 @@ if test x${gcc_gxx_include_dir} = x; then
+ fi
+ gcc_gxx_include_dir="\$(libsubdir)/\$(libsubdir_to_prefix)$libstdcxx_incdir"
+ fi
+-elif test "${with_sysroot+set}" = set; then
++fi
++
++gcc_gxx_include_dir_add_sysroot=0
++if test "${with_sysroot+set}" = set; then
+ gcc_gxx_without_sysroot=`expr "${gcc_gxx_include_dir}" : "${with_sysroot}"'\(.*\)'`
+ if test "${gcc_gxx_without_sysroot}"; then
+- gcc_gxx_include_dir="${gcc_gxx_without_sysroot}"
++ if test x${with_sysroot} != x/; then
++ gcc_gxx_include_dir="${gcc_gxx_without_sysroot}"
++ fi
+ gcc_gxx_include_dir_add_sysroot=1
+ fi
+ fi
diff --git a/gnu/packages/patches/gd-Revert-fix-303-gdlib.pc.patch b/gnu/packages/patches/gd-Revert-fix-303-gdlib.pc.patch
new file mode 100644
index 0000000000..6329b129d3
--- /dev/null
+++ b/gnu/packages/patches/gd-Revert-fix-303-gdlib.pc.patch
@@ -0,0 +1,179 @@
+From 9b31dfda73ee2d1b56b3f0dcfd3246c2faa592fe Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?L=C3=A9o=20Le=20Bouter?= <lle-bout@zaclys.net>
+Date: Sun, 28 Mar 2021 19:47:25 +0200
+Subject: [PATCH] Revert "fix #303: gdlib.pc: use Requires instead of Libs
+ (#537)"
+
+This reverts commit 28ecfe77c817aff8ce56422d3e4e8533a281bc76.
+---
+ CMakeLists.txt | 12 ------------
+ config/gdlib.pc.cmake | 4 +---
+ config/gdlib.pc.in | 4 +---
+ configure.ac | 11 +----------
+ src/CMakeLists.txt | 6 ------
+ 5 files changed, 3 insertions(+), 34 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 57cd95d..6bd0c73 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -53,8 +53,6 @@ SET (CMAKE_ARCHIVE_OUTPUT_DIRECTORY
+ "Single Directory for all static libraries."
+ )
+
+-SET(PKG_REQUIRES_PRIVATES "")
+-
+ if (USE_EXT_GD)
+ message("Using GD at: ${USE_EXT_GD}")
+ INCLUDE_DIRECTORIES(BEFORE ${GD_INCLUDE_DIR})
+@@ -170,13 +168,11 @@ else (USE_EXT_GD)
+ INCLUDE_DIRECTORIES(${FREETYPE_INCLUDE_DIRS})
+ SET(HAVE_FT2BUILD_H 1)
+ SET(HAVE_LIBFREETYPE 1)
+- LIST(APPEND PKG_REQUIRES_PRIVATES freetype2)
+ ENDIF(FREETYPE_FOUND)
+
+ IF(ZLIB_FOUND)
+ INCLUDE_DIRECTORIES(${ZLIB_INCLUDE_DIR})
+ SET(HAVE_LIBZ 1)
+- LIST(APPEND PKG_REQUIRES_PRIVATES zlib)
+ ENDIF(ZLIB_FOUND)
+
+ IF(WEBP_FOUND)
+@@ -192,7 +188,6 @@ else (USE_EXT_GD)
+ IF(PNG_FOUND)
+ INCLUDE_DIRECTORIES(${PNG_INCLUDE_DIR})
+ SET(HAVE_LIBPNG 1)
+- LIST(APPEND PKG_REQUIRES_PRIVATES libpng)
+ ENDIF(PNG_FOUND)
+
+ IF(ICONV_FOUND)
+@@ -209,25 +204,21 @@ else (USE_EXT_GD)
+ IF(XPM_FOUND)
+ INCLUDE_DIRECTORIES(${XPM_INCLUDE_DIR})
+ SET(HAVE_LIBXPM 1)
+- LIST(APPEND PKG_REQUIRES_PRIVATES xpm)
+ ENDIF(XPM_FOUND)
+
+ IF(JPEG_FOUND)
+ INCLUDE_DIRECTORIES(${JPEG_INCLUDE_DIR})
+ SET(HAVE_LIBJPEG 1)
+- LIST(APPEND PKG_REQUIRES_PRIVATES libjpeg)
+ ENDIF(JPEG_FOUND)
+
+ IF(TIFF_FOUND)
+ INCLUDE_DIRECTORIES(${TIFF_INCLUDE_DIR})
+ SET(HAVE_LIBTIFF 1)
+- LIST(APPEND PKG_REQUIRES_PRIVATES libtiff-4)
+ ENDIF(TIFF_FOUND)
+
+ IF(FONTCONFIG_FOUND)
+ INCLUDE_DIRECTORIES(${FONTCONFIG_INCLUDE_DIR})
+ SET(HAVE_LIBFONTCONFIG 1)
+- LIST(APPEND PKG_REQUIRES_PRIVATES fontconfig)
+ ELSE (FONTCONFIG_FOUND)
+ SET(FONTCONFIG_LIBRARY "")
+ SET(FONTCONFIG_INCLUDE_DIR "")
+@@ -236,11 +227,8 @@ else (USE_EXT_GD)
+
+ IF(RAQM_FOUND)
+ INCLUDE_DIRECTORIES(${RAQM_INCLUDE_DIR})
+- SET(HAVE_RAQM 1)
+- LIST(APPEND PKG_REQUIRES_PRIVAES raqm)
+ ENDIF(RAQM_FOUND)
+
+- string(REPLACE ";" ", " PKG_REQUIRES_PRIVATES "${PKG_REQUIRES_PRIVATES}")
+ SET(HAVE_CONFIG_H 1)
+
+ ADD_DEFINITIONS(-DHAVE_CONFIG_H)
+diff --git a/config/gdlib.pc.cmake b/config/gdlib.pc.cmake
+index 5fc8af4..d1a0dda 100644
+--- a/config/gdlib.pc.cmake
++++ b/config/gdlib.pc.cmake
+@@ -6,8 +6,6 @@ includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@
+ Name: gd
+ Description: GD graphics library
+ Version: @GDLIB_VERSION@
+-Requires:
+-Requires.private: @PKG_REQUIRES_PRIVATES@
+ Cflags: -I${includedir}
+-Libs.private: @LIBS_PRIVATES@
++Libs.private: @LIBGD_DEP_LIBS@
+ Libs: -L${libdir} -lgd
+diff --git a/config/gdlib.pc.in b/config/gdlib.pc.in
+index d6bc375..b980a60 100644
+--- a/config/gdlib.pc.in
++++ b/config/gdlib.pc.in
+@@ -6,8 +6,6 @@ includedir=@includedir@
+ Name: gd
+ Description: GD graphics library
+ Version: @VERSION@
+-Requires:
+-Requires.private: @PKG_REQUIRES_PRIVATES@
+ Cflags: -I${includedir}
+-Libs.private: @LIBS_PRIVATES@ @LIBICONV@
++Libs.private: @LIBS@ @LIBICONV@
+ Libs: -L${libdir} -lgd
+diff --git a/configure.ac b/configure.ac
+index 535db68..329c99c 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -33,9 +33,6 @@ AC_SUBST(GDLIB_LT_CURRENT)
+ AC_SUBST(GDLIB_LT_REVISION)
+ AC_SUBST(GDLIB_LT_AGE)
+
+-AC_SUBST(LIBS_PRIVATES)
+-AC_SUBST(PKG_REQUIRES_PRIVATES)
+-
+ AM_INIT_AUTOMAKE([1.11 foreign dist-xz -Wall -Werror subdir-objects])
+ AC_CONFIG_HEADERS([src/config.h:src/config.hin])
+
+@@ -133,7 +130,6 @@ m4_define([GD_LIB_CHECK], [dnl
+ AC_MSG_RESULT([$gd_with_lib])
+
+ gd_found_lib=no
+- gd_require_pkg_name=""
+ if test "$gd_with_lib" != "no"; then
+ save_CPPFLAGS=$CPPFLAGS
+ save_LDFLAGS=$LDFLAGS
+@@ -165,11 +161,6 @@ m4_define([GD_LIB_CHECK], [dnl
+ $1][_CFLAGS="$gd_lib_cflags $][$1][_CFLAGS"
+ AS_VAR_APPEND([LIBS], [" $][$1][_LIBS"])
+ AS_VAR_APPEND([CPPFLAGS], [" $][$1][_CFLAGS"])
+- if test -z "$gd_require_pkg_name"; then
+- AS_VAR_APPEND([LIBS_PRIVATES], [" $][$1][_LIBS"])
+- else
+- AS_VAR_APPEND([PKG_REQUIRES_PRIVATES], [" $gd_require_pkg_name"])
+- fi
+ elif test "$gd_with_lib" = "yes"; then
+ AC_MSG_ERROR([$3 requested but not found])
+ else
+@@ -189,7 +180,7 @@ dnl $4 - pkg-config module to look for
+ dnl $5 - fallback test for the feature
+ m4_define([GD_LIB_PKG_CHECK], [dnl
+ GD_LIB_CHECK([$1], [$2], [$3], [dnl
+- PKG_CHECK_MODULES([$1], [$4], [gd_found_lib=yes gd_require_pkg_name="$4"], [$5])
++ PKG_CHECK_MODULES([$1], [$4], [gd_found_lib=yes], [$5])
+ ])
+ ])
+
+diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
+index 509c422..49adbd6 100644
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -142,12 +142,6 @@ if (BUILD_STATIC_LIBS)
+ target_link_libraries(${GD_LIB_STATIC} ${LIBGD_DEP_LIBS})
+ endif()
+
+-SET(LIBS_PRIVATES
+- ${ICONV_LIBRARIES}
+- ${LIQ_LIBRARIES}
+- ${WEBP_LIBRARIES}
+-)
+-
+ set(GD_PROGRAMS gdcmpgif)
+
+ if (PNG_FOUND)
+--
+2.31.1
+
diff --git a/gnu/packages/patches/gdb-fix-gnu-nat-build.patch b/gnu/packages/patches/gdb-fix-gnu-nat-build.patch
new file mode 100644
index 0000000000..b0249d9cec
--- /dev/null
+++ b/gnu/packages/patches/gdb-fix-gnu-nat-build.patch
@@ -0,0 +1,254 @@
+Fix build on the Hurd.
+
+Patch #1 taken from upstream
+
+ https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=a1700a3199d31910b87cd7db3c394ddd091cfcde
+
+Patch #2 taken from upstream mailing list
+
+ https://sourceware.org/pipermail/gdb/2021-November/049777.html
+
+Patch #3 sent to upstream
+
+ https://sourceware.org/pipermail/gdb/2021-November/049788.html
+
+From 30d89407ad6bb62fafc72fa9c547c2d7ff371401 Mon Sep 17 00:00:00 2001
+From: Simon Marchi <simon.marchi@polymtl.ca>
+Date: Wed, 3 Nov 2021 15:09:19 -0400
+Subject: [PATCH 1/3] gdb: fix gnu-nat build
+Content-Transfer-Encoding: 8bit
+Content-Type: text/plain; charset=UTF-8
+
+When building gnu-nat.c, we get:
+
+ CXX gnu-nat.o
+ gnu-nat.c: In member function 'virtual void gnu_nat_target::create_inferior(const char*, const string&, char**, int)':
+ gnu-nat.c:2117:13: error: 'struct inf' has no member named 'target_is_pushed'
+ 2117 | if (!inf->target_is_pushed (this))
+ | ^~~~~~~~~~~~~~~~
+ gnu-nat.c:2118:10: error: 'struct inf' has no member named 'push_target'
+ 2118 | inf->push_target (this);
+ | ^~~~~~~~~~~
+
+This is because of a confusion between the generic `struct inferior`
+variable and the gnu-nat-specific `struct inf` variable. Fix by
+referring to `inferior`, not `inf`.
+
+Adjust the comment on top of `struct inf` to clarify the purpose of that
+type.
+
+Co-Authored-By: Andrea Monaco <andrea.monaco@autistici.org>
+Change-Id: I2fe2f7f6ef61a38d79860fd262b08835c963fc77
+---
+ gdb/gnu-nat.c | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/gdb/gnu-nat.c b/gdb/gnu-nat.c
+index 67ce00e9c30..ab539b4d8b4 100644
+--- a/gdb/gnu-nat.c
++++ b/gdb/gnu-nat.c
+@@ -149,7 +149,7 @@ struct inf_wait
+ int suppress; /* Something trivial happened. */
+ };
+
+-/* The state of an inferior. */
++/* Further Hurd-specific state of an inferior. */
+ struct inf
+ {
+ /* Fields describing the current inferior. */
+@@ -2114,8 +2114,8 @@ gnu_nat_target::create_inferior (const char *exec_file,
+
+ inf_debug (inf, "creating inferior");
+
+- if (!inf->target_is_pushed (this))
+- inf->push_target (this);
++ if (!inferior->target_is_pushed (this))
++ inferior->push_target (this);
+
+ pid = fork_inferior (exec_file, allargs, env, gnu_ptrace_me,
+ NULL, NULL, NULL, NULL);
+From ebc0837f4693232f74eb2cc3033515b18a8f0900 Mon Sep 17 00:00:00 2001
+From: "Jan (janneke) Nieuwenhuizen" <janneke@gnu.org>
+Date: Mon, 22 Nov 2021 07:47:28 +0100
+Subject: [PATCH 2/3] gdb: gnu-nat.c: port-rights.
+Content-Transfer-Encoding: 8bit
+Content-Type: text/plain; charset=UTF-8
+
+Taken from:
+
+ https://sourceware.org/pipermail/gdb/2021-November/049777.html
+---
+ gdb/gnu-nat.c | 18 ++++++++++--------
+ 1 file changed, 10 insertions(+), 8 deletions(-)
+
+diff --git a/gdb/gnu-nat.c b/gdb/gnu-nat.c
+index ab539b4d8b4..8cd876b21d0 100644
+--- a/gdb/gnu-nat.c
++++ b/gdb/gnu-nat.c
+@@ -3292,15 +3292,17 @@ This is the same as setting `task pause', `exceptions', and\n\
+ _("Show information about the task's send rights."));
+ add_info ("receive-rights", info_recv_rights_cmd,
+ _("Show information about the task's receive rights."));
+- add_info ("port-rights", info_port_rights_cmd,
+- _("Show information about the task's port rights."));
+- add_info ("port-sets", info_port_sets_cmd,
+- _("Show information about the task's port sets."));
++ cmd_list_element *port_rights_cmd =
++ add_info ("port-rights", info_port_rights_cmd,
++ _("Show information about the task's port rights."));
++ cmd_list_element *port_sets_cmd =
++ add_info ("port-sets", info_port_sets_cmd,
++ _("Show information about the task's port sets."));
+ add_info ("dead-names", info_dead_names_cmd,
+- _("Show information about the task's dead names."));
+- add_info_alias ("ports", "port-rights", 1);
+- add_info_alias ("port", "port-rights", 1);
+- add_info_alias ("psets", "port-sets", 1);
++ _("Show information about the task's dead names."));
++ add_info_alias ("ports", port_rights_cmd, 1);
++ add_info_alias ("port", port_rights_cmd, 1);
++ add_info_alias ("psets", port_sets_cmd, 1);
+ }
+
+
+From e8df985cdd95e4808c390e226a0e852d23c502f9 Mon Sep 17 00:00:00 2001
+From: "Jan (janneke) Nieuwenhuizen" <janneke@gnu.org>
+Date: Mon, 22 Nov 2021 08:22:15 +0100
+Subject: [PATCH 3/3] gdb: More compile fixes for gnu-nat.c.
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+Content-Transfer-Encoding: 8bit
+Content-Type: text/plain; charset=UTF-8
+
+This fixes compile errors like
+
+ ../../gdb-11.1/gdb/gnu-nat.c: In function ‘void add_task_commands()’:
+ ../../gdb-11.1/gdb/gnu-nat.c:3204:17: error: no matching function for call to ‘add_cmd(const char [8], command_class, cmd_list_element*&, char*, cmd_list_element**)’
+ 3204 | &setlist);
+ | ^
+ In file included from ../../gdb-11.1/gdb/completer.h:21,
+ from ../../gdb-11.1/gdb/symtab.h:36,
+ from ../../gdb-11.1/gdb/infrun.h:21,
+ from ../../gdb-11.1/gdb/target.h:42,
+ from ../../gdb-11.1/gdb/inf-child.h:23,
+ from ../../gdb-11.1/gdb/gnu-nat.h:38,
+ from ../../gdb-11.1/gdb/gnu-nat.c:24:
+ ../../gdb-11.1/gdb/command.h:160:33: note: candidate: ‘cmd_list_element* add_cmd(const char*, command_class, void (*)(const char*, int), const char*, cmd_list_element**)’
+ 160 | extern struct cmd_list_element *add_cmd (const char *, enum command_class,
+ | ^~~~~~~
+ ../../gdb-11.1/gdb/command.h:161:30: note: no known conversion for argument 3 from ‘cmd_list_element*’ to ‘void (*)(const char*, int)’
+ 161 | cmd_const_cfunc_ftype *fun,
+ | ~~~~~~~~~~~~~~~~~~~~~~~^~~
+ ../../gdb-11.1/gdb/command.h:167:33: note: candidate: ‘cmd_list_element* add_cmd(const char*, command_class, const char*, cmd_list_element**)’
+ 167 | extern struct cmd_list_element *add_cmd (const char *, enum command_class,
+ | ^~~~~~~
+ ../../gdb-11.1/gdb/command.h:167:33: note: candidate expects 4 arguments, 5 provided
+ ../../gdb-11.1/gdb/gnu-nat.c:3210:18: error: no matching function for call to ‘add_cmd(const char [8], command_class, cmd_list_element*&, char*, cmd_list_element**)’
+ 3210 | &showlist);
+ | ^
+
+* gdb/gnu-nat.c (add_task_commands): Use a fresh variable instead of
+shadowing set_signals_cmd etc.
+(add_thread_commands): Likewise.
+---
+ gdb/gnu-nat.c | 33 +++++++++++++++++----------------
+ 1 file changed, 17 insertions(+), 16 deletions(-)
+
+diff --git a/gdb/gnu-nat.c b/gdb/gnu-nat.c
+index 8cd876b21d0..7aecc2295f8 100644
+--- a/gdb/gnu-nat.c
++++ b/gdb/gnu-nat.c
+@@ -3197,31 +3197,31 @@ Show whether new threads are allowed to run (once gdb has noticed them)."),
+ _("Show the default detach-suspend-count value for new threads."),
+ &show_thread_default_cmd_list);
+
+- cmd_list_element *set_signals_cmd
++ cmd_list_element *set_signals_cmd_
+ = add_cmd ("signals", class_run, set_signals_cmd, _("\
+ Set whether the inferior process's signals will be intercepted.\n\
+ Mach exceptions (such as breakpoint traps) are not affected."),
+ &setlist);
+- add_alias_cmd ("sigs", set_signals_cmd, class_run, 1, &setlist);
++ add_alias_cmd ("sigs", set_signals_cmd_, class_run, 1, &setlist);
+
+- cmd_list_element *show_signals_cmd
++ cmd_list_element *show_signals_cmd_
+ = add_cmd ("signals", no_class, show_signals_cmd, _("\
+ Show whether the inferior process's signals will be intercepted."),
+ &showlist);
+- add_alias_cmd ("sigs", show_signals_cmd, no_class, 1, &showlist);
++ add_alias_cmd ("sigs", show_signals_cmd_, no_class, 1, &showlist);
+
+- cmd_list_element *set_signal_thread_cmd
++ cmd_list_element *set_signal_thread_cmd_
+ = add_cmd ("signal-thread", class_run, set_sig_thread_cmd, _("\
+ Set the thread that gdb thinks is the libc signal thread.\n\
+ This thread is run when delivering a signal to a non-stopped process."),
+ &setlist);
+- add_alias_cmd ("sigthread", set_signal_thread_cmd, class_run, 1, &setlist);
++ add_alias_cmd ("sigthread", set_signal_thread_cmd_, class_run, 1, &setlist);
+
+- cmd_list_element *show_signal_thread_cmd
++ cmd_list_element *show_signal_thread_cmd_
+ = add_cmd ("signal-thread", no_class, show_sig_thread_cmd, _("\
+ Set the thread that gdb thinks is the libc signal thread."),
+ &showlist);
+- add_alias_cmd ("sigthread", show_signal_thread_cmd, no_class, 1, &showlist);
++ add_alias_cmd ("sigthread", show_signal_thread_cmd_, no_class, 1, &showlist);
+
+ add_cmd ("stopped", class_run, set_stopped_cmd, _("\
+ Set whether gdb thinks the inferior process is stopped as with SIGSTOP.\n\
+@@ -3231,13 +3231,13 @@ Stopped process will be continued by sending them a signal."),
+ Show whether gdb thinks the inferior process is stopped as with SIGSTOP."),
+ &showlist);
+
+- cmd_list_element *set_exceptions_cmd
++ cmd_list_element *set_exceptions_cmd_
+ = add_cmd ("exceptions", class_run, set_exceptions_cmd, _("\
+ Set whether exceptions in the inferior process will be trapped.\n\
+ When exceptions are turned off, neither breakpoints nor single-stepping\n\
+ will work."), &setlist);
+ /* Allow `set exc' despite conflict with `set exception-port'. */
+- add_alias_cmd ("exc", set_exceptions_cmd, class_run, 1, &setlist);
++ add_alias_cmd ("exc", set_exceptions_cmd_, class_run, 1, &setlist);
+
+ add_cmd ("exceptions", no_class, show_exceptions_cmd, _("\
+ Show whether exceptions in the inferior process will be trapped."),
+@@ -3269,14 +3269,14 @@ used to pause individual threads by default instead."),
+ "on the thread when detaching."),
+ &show_task_cmd_list);
+
+- cmd_list_element *set_task_exception_port_cmd
++ cmd_list_element *set_task_exception_port_cmd_
+ = add_cmd ("exception-port", no_class, set_task_exc_port_cmd, _("\
+ Set the task exception port to which we forward exceptions.\n\
+ The argument should be the value of the send right in the task."),
+ &set_task_cmd_list);
+- add_alias_cmd ("excp", set_task_exception_port_cmd, no_class, 1,
++ add_alias_cmd ("excp", set_task_exception_port_cmd_, no_class, 1,
+ &set_task_cmd_list);
+- add_alias_cmd ("exc-port", set_task_exception_port_cmd, no_class, 1,
++ add_alias_cmd ("exc-port", set_task_exception_port_cmd_, no_class, 1,
+ &set_task_cmd_list);
+
+ /* A convenient way of turning on all options require to noninvasively
+@@ -3464,14 +3464,15 @@ Note that this is relative to suspend count when gdb noticed the thread;\n\
+ use the `thread takeover-suspend-count' to force it to an absolute value."),
+ &show_thread_cmd_list);
+
+- add_cmd ("exception-port", no_class, set_thread_exc_port_cmd, _("\
++ cmd_list_element *set_thread_exception_port_cmd_
++ = add_cmd ("exception-port", no_class, set_thread_exc_port_cmd, _("\
+ Set the thread exception port to which we forward exceptions.\n\
+ This overrides the task exception port.\n\
+ The argument should be the value of the send right in the task."),
+ &set_thread_cmd_list);
+- add_alias_cmd ("excp", set_thread_exception_port_cmd, no_class, 1,
++ add_alias_cmd ("excp", set_thread_exception_port_cmd_, no_class, 1,
+ &set_thread_cmd_list);
+- add_alias_cmd ("exc-port", set_thread_exception_port_cmd, no_class, 1,
++ add_alias_cmd ("exc-port", set_thread_exception_port_cmd_, no_class, 1,
+ &set_thread_cmd_list);
+
+ add_cmd ("takeover-suspend-count", no_class, thread_takeover_sc_cmd, _("\
diff --git a/gnu/packages/patches/gdb-hurd.patch b/gnu/packages/patches/gdb-hurd.patch
deleted file mode 100644
index 0af8d4dc28..0000000000
--- a/gnu/packages/patches/gdb-hurd.patch
+++ /dev/null
@@ -1,69 +0,0 @@
-Taken from upstream, removed ChangeLog.
-
-From 6930bffe3373690b3431d6291f9f7c116d6a1ec4 Mon Sep 17 00:00:00 2001
-From: Samuel Thibault <samuel.thibault@ens-lyon.org>
-Date: Sat, 30 May 2020 18:35:59 +0000
-Subject: [PATCH] hurd: fix gnu_debug_flag type
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Fixes
-
-../../gdb/gnu-nat.c:96:6: error: conflicting declaration ‘bool gnu_debug_flag’
- 96 | bool gnu_debug_flag = false;
-../../gdb/gnu-nat.c: In function ‘void _initialize_gnu_nat()’:
-../../gdb/gnu-nat.c:3511:7: error: cannot
-
-gdb/ChangeLog:
-
- * gnu-nat.h (gnu_debug_flag): Set type to bool.
----
- gdb/ChangeLog | 4 ++++
- gdb/gnu-nat.h | 2 +-
- 2 files changed, 5 insertions(+), 1 deletion(-)
-
-diff --git a/gdb/gnu-nat.h b/gdb/gnu-nat.h
-index 77c57817b2..766f716587 100644
---- a/gdb/gnu-nat.h
-+++ b/gdb/gnu-nat.h
-@@ -111,7 +111,7 @@ extern char *proc_string (struct proc *proc);
- __proc_pid (__proc), __proc->tid, \
- host_address_to_string (__proc) , ##args); } while (0)
-
--extern int gnu_debug_flag;
-+extern bool gnu_debug_flag;
-
- #define debug(msg, args...) \
- do { if (gnu_debug_flag) \
---
-Jan Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond http://lilypond.org
-Freelance IT http://JoyofSource.com | Avatar® http://AvatarAcademy.com
-
-commit 366f550a593c7e6bae3699a4b6d65fe937af5603
-Author: Samuel Thibault <samuel.thibault@ens-lyon.org>
-Date: Sat May 30 18:41:30 2020 +0000
-
- hurd: add missing include
-
- Fixes
-
- ../../gdb/gnu-nat.c:2522:14: error: ‘target_gdbarch’ was not declared in this scope; did you mean ‘target_detach’?
- 2522 | paddress (target_gdbarch (), memaddr), pulongest (len),
-
- gdb/Changelog:
-
- * gnu-nat.c: Include "gdbarch.h".
-
-diff --git a/gdb/gnu-nat.c b/gdb/gnu-nat.c
-index 3b438a9a43..9b93488b41 100644
---- a/gdb/gnu-nat.c
-+++ b/gdb/gnu-nat.c
-@@ -64,6 +64,7 @@ extern "C"
- #include "language.h"
- #include "target.h"
- #include "gdbsupport/gdb_wait.h"
-+#include "gdbarch.h"
- #include "gdbcmd.h"
- #include "gdbcore.h"
- #include "gdbthread.h"
diff --git a/gnu/packages/patches/gdk-pixbuf-CVE-2020-29385.patch b/gnu/packages/patches/gdk-pixbuf-CVE-2020-29385.patch
deleted file mode 100644
index e6ac4de00b..0000000000
--- a/gnu/packages/patches/gdk-pixbuf-CVE-2020-29385.patch
+++ /dev/null
@@ -1,53 +0,0 @@
-Fix CVE-2020-29385. Note that we omit the binary test file
-tests/test-images/fail/hang_114.gif from the following commit, to avoid
-requiring 'git' to apply the patch.
-
-
-From bdd3acbd48a575d418ba6bf1b32d7bda2fae1c81 Mon Sep 17 00:00:00 2001
-From: Robert Ancell <robert.ancell@canonical.com>
-Date: Mon, 30 Nov 2020 12:26:12 +1300
-Subject: [PATCH] gif: Fix LZW decoder accepting invalid LZW code.
-
-The code value after a reset wasn't being validated, which means we would
-accept invalid codes. This could cause an infinite loop in the decoder.
-
-Fixes CVE-2020-29385
-
-Fixes https://gitlab.gnome.org/GNOME/gdk-pixbuf/-/issues/164
----
- gdk-pixbuf/lzw.c | 13 +++++++------
- tests/test-images/fail/hang_114.gif | Bin 0 -> 5561 bytes
- 2 files changed, 7 insertions(+), 6 deletions(-)
- create mode 100644 tests/test-images/fail/hang_114.gif
-
-diff --git a/gdk-pixbuf/lzw.c b/gdk-pixbuf/lzw.c
-index 9e052a6f7..105daf2b1 100644
---- a/gdk-pixbuf/lzw.c
-+++ b/gdk-pixbuf/lzw.c
-@@ -195,19 +195,20 @@ lzw_decoder_feed (LZWDecoder *self,
- if (self->last_code != self->clear_code && self->code_table_size < MAX_CODES) {
- if (self->code < self->code_table_size)
- add_code (self, self->code);
-- else if (self->code == self->code_table_size)
-+ else
- add_code (self, self->last_code);
-- else {
-- /* Invalid code received - just stop here */
-- self->last_code = self->eoi_code;
-- return output_length;
-- }
-
- /* When table is full increase code size */
- if (self->code_table_size == (1 << self->code_size) && self->code_size < LZW_CODE_MAX)
- self->code_size++;
- }
-
-+ /* Invalid code received - just stop here */
-+ if (self->code >= self->code_table_size) {
-+ self->last_code = self->eoi_code;
-+ return output_length;
-+ }
-+
- /* Convert codeword into indexes */
- n_written += write_indexes (self, output + n_written, output_length - n_written);
- }
diff --git a/gnu/packages/patches/gdm-default-session.patch b/gnu/packages/patches/gdm-default-session.patch
index 9ab2829cdb..3ff8d0da7c 100644
--- a/gnu/packages/patches/gdm-default-session.patch
+++ b/gnu/packages/patches/gdm-default-session.patch
@@ -4,11 +4,9 @@ and not in the directories listed in $XDG_DATA_DIRS. The latter includes
/run/current-system/profile, and only then.
Fixes <https://bugs.gnu.org/37831>.
-
-diff -ur a/daemon/gdm-session.c b/daemon/gdm-session.c
---- a/daemon/gdm-session.c 2019-09-25 10:40:24.000000000 -0400
-+++ b/daemon/gdm-session.c 2020-04-18 18:30:02.671856808 -0400
-@@ -348,24 +348,18 @@
+--- a/daemon/gdm-session.c 2021-07-23 15:16:15.164201000 +0000
++++ b/daemon/gdm-session.c 2021-09-26 08:18:58.730134555 +0000
+@@ -354,13 +354,12 @@
GArray *search_array = NULL;
char **search_dirs;
int i;
@@ -19,22 +17,23 @@ diff -ur a/daemon/gdm-session.c b/daemon/gdm-session.c
DMCONFDIR "/Sessions/",
DATADIR "/gdm/BuiltInSessions/",
- DATADIR "/xsessions/",
-+ "/run/current-system/profile/share/xsessions/"
++ "/run/current-system/profile/share/xsessions/",
};
static const char *wayland_search_dir = DATADIR "/wayland-sessions/";
-
+@@ -368,11 +367,6 @@
search_array = g_array_new (TRUE, TRUE, sizeof (char *));
-- for (i = 0; system_data_dirs[i]; i++) {
-- gchar *dir = g_build_filename (system_data_dirs[i], "xsessions", NULL);
-- g_array_append_val (search_array, dir);
-- }
+ if (type == NULL || g_str_equal (type, "x11")) {
+- for (i = 0; system_data_dirs[i]; i++) {
+- gchar *dir = g_build_filename (system_data_dirs[i], "xsessions", NULL);
+- g_array_append_val (search_array, dir);
+- }
-
- g_array_append_vals (search_array, x_search_dirs, G_N_ELEMENTS (x_search_dirs));
+ g_array_append_vals (search_array, x_search_dirs, G_N_ELEMENTS (x_search_dirs));
+ }
- #ifdef ENABLE_WAYLAND_SUPPORT
-@@ -373,16 +367,7 @@
+@@ -382,16 +376,7 @@
#ifdef ENABLE_USER_DISPLAY_SERVER
g_array_prepend_val (search_array, wayland_search_dir);
diff --git a/gnu/packages/patches/gdm-elogind-support.patch b/gnu/packages/patches/gdm-elogind-support.patch
new file mode 100644
index 0000000000..39cd12dd22
--- /dev/null
+++ b/gnu/packages/patches/gdm-elogind-support.patch
@@ -0,0 +1,211 @@
+https://gitlab.gnome.org/GNOME/gdm/-/merge_requests/113
+
+From 462cc0f5346f5913cf7151044f1c232c5d21c1c3 Mon Sep 17 00:00:00 2001
+From: Dudemanguy <random342@airmail.cc>
+Date: Mon, 5 Oct 2020 18:41:55 -0500
+Subject: [PATCH] meson: allow building with elogind
+
+Currently, the GDM meson build has a hard dependency on systemd.
+However, GDM can function just fine if one is using elogind. This allows
+a user to build GDM against libelogind and also disable the systemd
+system and user units.
+---
+ common/meson.build | 2 +-
+ data/meson.build | 62 ++++++++++++++----------
+ data/pam-arch/gdm-launch-environment.pam | 1 +
+ libgdm/meson.build | 2 +-
+ meson.build | 36 +++++++++-----
+ meson_options.txt | 5 +-
+ 6 files changed, 66 insertions(+), 42 deletions(-)
+
+diff --git a/common/meson.build b/common/meson.build
+index 074dd92e1..bca58f7c4 100644
+--- a/common/meson.build
++++ b/common/meson.build
+@@ -11,7 +11,7 @@ libgdmcommon_src = files(
+ )
+
+ libgdmcommon_deps = [
+- libsystemd_dep,
++ logind_dep,
+ gobject_dep,
+ gio_dep,
+ gio_unix_dep,
+diff --git a/data/meson.build b/data/meson.build
+index 7c5222eaf..403336c31 100644
+--- a/data/meson.build
++++ b/data/meson.build
+@@ -168,41 +168,53 @@ else
+ service_config.set('PLYMOUTH_QUIT_SERVICE', '')
+ endif
+
+-if get_option('systemdsystemunitdir') != ''
+- systemd_systemunitdir = get_option('systemdsystemunitdir')
+-else
+- systemd_systemunitdir = systemd_dep.get_pkgconfig_variable('systemdsystemunitdir')
++systemdsystemunitdir = get_option('systemdsystemunitdir')
++if systemdsystemunitdir != 'no'
++ assert(systemd_dep.found(), 'systemd required but not found, please provide a valid systemd system unit dir or disable it')
++ if get_option('systemdsystemunitdir') != ''
++ systemd_systemunitdir = get_option('systemdsystemunitdir')
++ else
++ systemd_systemunitdir = systemd_dep.get_pkgconfig_variable('systemdsystemunitdir')
++ endif
+ endif
+
+-if get_option('systemduserunitdir') != ''
+- systemd_userunitdir = get_option('systemduserunitdir')
+-else
+- systemd_userunitdir = systemd_dep.get_pkgconfig_variable('systemduserunitdir',
+- define_variable: ['prefix', get_option('prefix')])
++systemduserunitdir = get_option('systemduserunitdir')
++if systemduserunitdir != 'no'
++ assert(systemd_dep.found(), 'systemd required but not found, please provide a valid systemd user unit dir or disable it')
++ if get_option('systemduserunitdir') != ''
++ systemd_userunitdir = get_option('systemduserunitdir')
++ else
++ systemd_userunitdir = systemd_dep.get_pkgconfig_variable('systemduserunitdir',
++ define_variable: ['prefix', get_option('prefix')])
++ endif
+ endif
+
+-configure_file(
+- input: 'gdm.service.in',
+- output: '@BASENAME@',
+- configuration: service_config,
+- install_dir: systemd_systemunitdir,
+- format: 'cmake'
+-)
++if systemdsystemunitdir != 'no'
++ configure_file(
++ input: 'gdm.service.in',
++ output: '@BASENAME@',
++ configuration: service_config,
++ install_dir: systemd_systemunitdir,
++ format: 'cmake'
++ )
++endif
+
+ gdm_gnome_session_wanted_targets = []
+ foreach component: gdm_gnome_user_session_wanted_components
+ gdm_gnome_session_wanted_targets += 'Wants=@0@.target'.format(component)
+ endforeach
+
+-configure_file(
+- input: 'session.conf.in',
+- output: 'session.conf',
+- configuration: {
+- 'requires_component': gdm_gnome_shell_component,
+- 'wants_required_components': '\n'.join(gdm_gnome_session_wanted_targets),
+- },
+- install_dir: systemd_userunitdir / 'gnome-session@gnome-login.target.d',
+-)
++if systemduserunitdir != 'no'
++ configure_file(
++ input: 'session.conf.in',
++ output: 'session.conf',
++ configuration: {
++ 'requires_component': gdm_gnome_shell_component,
++ 'wants_required_components': '\n'.join(gdm_gnome_session_wanted_targets),
++ },
++ install_dir: systemd_userunitdir / 'gnome-session@gnome-login.target.d',
++ )
++endif
+
+ # XSession
+ if get_option('gdm-xsession')
+diff --git a/libgdm/meson.build b/libgdm/meson.build
+index 3f8cafbb7..83e95151b 100644
+--- a/libgdm/meson.build
++++ b/libgdm/meson.build
+@@ -56,7 +56,7 @@ libgdm_deps = [
+ glib_dep,
+ gio_dep,
+ gio_unix_dep,
+- libsystemd_dep,
++ logind_dep,
+ libgdmcommon_dep,
+ ]
+
+diff --git a/meson.build b/meson.build
+index e6fcf4b8b..a86a486b7 100644
+--- a/meson.build
++++ b/meson.build
+@@ -92,21 +92,30 @@ xdmcp_dep = cc.find_library('Xdmcp', required: get_option('xdmcp'))
+ if xdmcp_dep.found() and get_option('tcp-wrappers')
+ libwrap_dep = cc.find_library('libwrap')
+ endif
+-# systemd
+-systemd_dep = dependency('systemd')
+-libsystemd_dep = dependency('libsystemd')
+-if meson.version().version_compare('>= 0.53')
+- systemd_multiseat_x = find_program('systemd-multi-seat-x',
+- required: false,
+- dirs: [
+- systemd_dep.get_pkgconfig_variable('systemdutildir'),
+- '/lib/systemd',
+- '/usr/lib/systemd',
+- ])
++
++logind_provider = get_option('logind-provider')
++systemd_dep = dependency('systemd', required: false)
++if logind_provider == 'systemd'
++ libsystemd_dep = dependency('libsystemd')
++ logind_dep = libsystemd_dep
++ if meson.version().version_compare('>= 0.53')
++ systemd_multiseat_x = find_program('systemd-multi-seat-x',
++ required: false,
++ dirs: [
++ systemd_dep.get_pkgconfig_variable('systemdutildir'),
++ '/lib/systemd',
++ '/usr/lib/systemd',
++ ])
++ else
++ systemd_multiseat_x = find_program('systemd-multi-seat-x', required: false)
++ endif
++ systemd_x_server = systemd_multiseat_x.found()? systemd_multiseat_x.path() : '/lib/systemd/systemd-multi-seat-x'
+ else
+- systemd_multiseat_x = find_program('systemd-multi-seat-x', required: false)
++ elogind_dep = dependency('libelogind')
++ logind_dep = elogind_dep
++ systemd_x_server = 'disabled'
+ endif
+-systemd_x_server = systemd_multiseat_x.found()? systemd_multiseat_x.path() : '/lib/systemd/systemd-multi-seat-x'
++
+ # Plymouth
+ plymouth_dep = dependency('ply-boot-client', required: get_option('plymouth'))
+ # Check for Solaris auditing API (ADT)
+@@ -313,6 +322,7 @@ summary({
+ 'PAM Syslog': have_pam_syslog,
+ 'Supports PAM Extensions': pam_extensions_supported,
+ 'SeLinux': libselinux_dep.found(),
++ 'Logind Provider': get_option('logind-provider'),
+ 'Use GDM Xsession': get_option('gdm-xsession'),
+ 'Use UserDisplayServer': get_option('user-display-server'),
+ 'Use SystemdJournal': get_option('systemd-journal'),
+diff --git a/meson_options.txt b/meson_options.txt
+index 14e0b908b..5135d7d66 100644
+--- a/meson_options.txt
++++ b/meson_options.txt
+@@ -12,6 +12,7 @@ option('initial-vt', type: 'integer', value: 1, description: 'Initial virtual te
+ option('ipv6', type: 'boolean', value: false, description: 'Enables compilation of IPv6 code.')
+ option('lang-file', type: 'string', value: '', description: 'File containing default language settings.')
+ option('libaudit', type: 'feature', value: 'auto', description: 'Add Linux audit support.')
++option('logind-provider', type: 'combo', choices: ['systemd', 'elogind'], value: 'systemd', description: 'Which logind library to use.')
+ option('log-dir', type: 'string', value: '/var/log/gdm', description: 'Log directory.')
+ option('pam-mod-dir', type: 'string', value: '', description: 'Directory to install PAM modules in.')
+ option('pam-prefix', type: 'string', value: '', description: 'Specify where PAM files go.')
+@@ -27,8 +28,8 @@ option('solaris', type: 'boolean', value: false, description: 'Build for Solaris
+ option('split-authentication', type: 'boolean', value: true, description: 'Enable multiple simultaneous PAM conversations during login.')
+ option('sysconfsubdir', type: 'string', value: 'gdm', description: 'Directory name used under sysconfdir.')
+ option('systemd-journal', type: 'boolean', value: true, description: 'Use journald support.')
+-option('systemdsystemunitdir', type: 'string', value: '', description: 'Directory for systemd service files.')
+-option('systemduserunitdir', type: 'string', value: '', description: 'Directory for systemd user service files.')
++option('systemdsystemunitdir', type: 'string', value: '', description: 'Directory for systemd service files, or \'no\' to disable.')
++option('systemduserunitdir', type: 'string', value: '', description: 'Directory for systemd user service files, or \'no\' to disable.')
+ option('tcp-wrappers', type: 'boolean', value: false, description: 'Use TCP wrappers.')
+ option('udev-dir', type: 'string', value: '', description: 'Directory for udev rules file.')
+ option('user', type: 'string', value: 'gdm', description: 'GDM\'s username.')
+--
+GitLab
+
diff --git a/gnu/packages/patches/gdm-pass-gdk-pixbuf-loader-env.patch b/gnu/packages/patches/gdm-pass-gdk-pixbuf-loader-env.patch
new file mode 100644
index 0000000000..4341e3fc30
--- /dev/null
+++ b/gnu/packages/patches/gdm-pass-gdk-pixbuf-loader-env.patch
@@ -0,0 +1,24 @@
+From 444250fce55f916af993bc855930c6809686e4bd Mon Sep 17 00:00:00 2001
+From: Josselin Poiret <dev@jpoiret.xyz>
+Date: Tue, 23 Nov 2021 18:39:39 +0000
+Subject: [PATCH] Make GDM pass GDK_PIXBUF_MODULE_FILE to sessions
+
+---
+ daemon/gdm-launch-environment.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/daemon/gdm-launch-environment.c b/daemon/gdm-launch-environment.c
+index 14ecfac2..3e618321 100644
+--- a/daemon/gdm-launch-environment.c
++++ b/daemon/gdm-launch-environment.c
+@@ -158,6 +158,7 @@ build_launch_environment (GdmLaunchEnvironment *launch_environment,
+ "WINDOWPATH",
+ "XCURSOR_PATH",
+ "XDG_CONFIG_DIRS",
++ "GDK_PIXBUF_MODULE_FILE",
+ NULL
+ };
+ char *system_data_dirs;
+--
+2.33.1
+
diff --git a/gnu/packages/patches/gdm-remove-hardcoded-xwayland-path.patch b/gnu/packages/patches/gdm-remove-hardcoded-xwayland-path.patch
new file mode 100644
index 0000000000..366fb91668
--- /dev/null
+++ b/gnu/packages/patches/gdm-remove-hardcoded-xwayland-path.patch
@@ -0,0 +1,22 @@
+Remove check for hardcoded Xwayland path in gdm.
+
+---
+ daemon/gdm-local-display-factory.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/daemon/gdm-local-display-factory.c b/daemon/gdm-local-display-factory.c
+index da1093bb..37355c06 100644
+--- a/daemon/gdm-local-display-factory.c
++++ b/daemon/gdm-local-display-factory.c
+@@ -203,7 +203,7 @@ gdm_local_display_factory_use_wayland (void)
+ #ifdef ENABLE_WAYLAND_SUPPORT
+ gboolean wayland_enabled = FALSE;
+ if (gdm_settings_direct_get_boolean (GDM_KEY_WAYLAND_ENABLE, &wayland_enabled)) {
+- if (wayland_enabled && g_file_test ("/usr/bin/Xwayland", G_FILE_TEST_IS_EXECUTABLE) )
++ if (wayland_enabled)
+ return TRUE;
+ }
+ #endif
+--
+2.33.0
+
diff --git a/gnu/packages/patches/gdm-wayland-session-wrapper-from-env.patch b/gnu/packages/patches/gdm-wayland-session-wrapper-from-env.patch
new file mode 100644
index 0000000000..44ab6a9471
--- /dev/null
+++ b/gnu/packages/patches/gdm-wayland-session-wrapper-from-env.patch
@@ -0,0 +1,35 @@
+Get wayland-session wrapper from environment.
+
+---
+ daemon/gdm-session.c | 6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/daemon/gdm-session.c b/daemon/gdm-session.c
+index 4e303e70..1deca4e9 100644
+--- a/daemon/gdm-session.c
++++ b/daemon/gdm-session.c
+@@ -2888,8 +2888,9 @@ gdm_session_start_session (GdmSession *self,
+ allow_remote_connections? "--allow-remote-connections " : "",
+ command);
+ } else {
+- program = g_strdup_printf (LIBEXECDIR "/gdm-wayland-session %s\"%s\"",
++ program = g_strdup_printf (LIBEXECDIR "/gdm-wayland-session %s\"%s %s\"",
+ register_session ? "--register-session " : "",
++ g_getenv ("GDM_WAYLAND_SESSION"),
+ command);
+ }
+ } else if (run_xsession_script) {
+@@ -2942,8 +2942,9 @@
+ register_session ? "--register-session " : "",
+ self->selected_program);
+ } else {
+- program = g_strdup_printf (LIBEXECDIR "/gdm-wayland-session %s\"dbus-run-session -- %s\"",
++ program = g_strdup_printf (LIBEXECDIR "/gdm-wayland-session %s\"dbus-run-session -- %s %s\"",
+ register_session ? "--register-session " : "",
++ g_getenv ("GDM_WAYLAND_SESSION"),
+ self->selected_program);
+ }
+ } else {
+--
+2.33.0
+
diff --git a/gnu/packages/patches/geary-CVE-2020-24661.patch b/gnu/packages/patches/geary-CVE-2020-24661.patch
deleted file mode 100644
index 6cbc224786..0000000000
--- a/gnu/packages/patches/geary-CVE-2020-24661.patch
+++ /dev/null
@@ -1,133 +0,0 @@
-From d4e86dc91e1d8a940dc40872fe94ef9ac0fed1b5 Mon Sep 17 00:00:00 2001
-From: Michael Gratton <mike@vee.net>
-Date: Tue, 25 Aug 2020 03:54:09 +0000
-Subject: [PATCH] Merge branch 'mjog/866-self-signed-certificates' into
- 'mainline'
-
-Fix invalid certificate pinning when GCR support is unavailable
-
-Closes #866
-
-See merge request GNOME/geary!529
-
-(cherry picked from commit 423a55b00f1dc6bee9dc17e67c0aea6f42387a77)
-
-5088adfe Application.CertificateManager: Rename some methods for clarity
-0d957559 Application.CertificateManager: Check locally pinned certs for equality
----
- .../application-certificate-manager.vala | 44 +++++++++----------
- 1 file changed, 22 insertions(+), 22 deletions(-)
-
-diff --git a/src/client/application/application-certificate-manager.vala b/src/client/application/application-certificate-manager.vala
-index 4881d73c0..65f6af4fa 100644
---- a/src/client/application/application-certificate-manager.vala
-+++ b/src/client/application/application-certificate-manager.vala
-@@ -381,8 +381,8 @@ private class Application.TlsDatabase : GLib.TlsDatabase {
- GLib.TlsCertificateFlags ret = this.parent.verify_chain(
- chain, purpose, identity, interaction, flags, cancellable
- );
-- if (should_verify(ret, purpose, identity) &&
-- verify(chain, identity, cancellable)) {
-+ if (check_pinned(ret, purpose, identity) &&
-+ is_pinned(chain, identity, cancellable)) {
- ret = 0;
- }
- return ret;
-@@ -399,16 +399,16 @@ private class Application.TlsDatabase : GLib.TlsDatabase {
- GLib.TlsCertificateFlags ret = yield this.parent.verify_chain_async(
- chain, purpose, identity, interaction, flags, cancellable
- );
-- if (should_verify(ret, purpose, identity) &&
-- yield verify_async(chain, identity, cancellable)) {
-+ if (check_pinned(ret, purpose, identity) &&
-+ yield is_pinned_async(chain, identity, cancellable)) {
- ret = 0;
- }
- return ret;
- }
-
-- private inline bool should_verify(GLib.TlsCertificateFlags parent_ret,
-- string purpose,
-- GLib.SocketConnectable? identity) {
-+ private inline bool check_pinned(GLib.TlsCertificateFlags parent_ret,
-+ string purpose,
-+ GLib.SocketConnectable? identity) {
- // If the parent didn't verify, check for a locally pinned
- // cert if it looks like we should, but always reject revoked
- // certs
-@@ -420,22 +420,22 @@ private class Application.TlsDatabase : GLib.TlsDatabase {
- );
- }
-
-- private bool verify(GLib.TlsCertificate chain,
-- GLib.SocketConnectable identity,
-- GLib.Cancellable? cancellable)
-+ private bool is_pinned(GLib.TlsCertificate chain,
-+ GLib.SocketConnectable identity,
-+ GLib.Cancellable? cancellable)
- throws GLib.Error {
-- bool is_verified = false;
-+ bool is_pinned = false;
- string id = to_name(identity);
- TrustContext? context = null;
- lock (this.pinned_certs) {
- context = this.pinned_certs.get(id);
- if (context != null) {
-- is_verified = true;
-+ is_pinned = context.certificate.is_same(chain);
- } else {
- // Cert not found in memory, check with GCR if
- // enabled.
- if (this.use_gcr) {
-- is_verified = gcr_trust_is_certificate_pinned(
-+ is_pinned = gcr_trust_is_certificate_pinned(
- new Gcr.SimpleCertificate(chain.certificate.data),
- GLib.TlsDatabase.PURPOSE_AUTHENTICATE_SERVER,
- id,
-@@ -443,7 +443,7 @@ private class Application.TlsDatabase : GLib.TlsDatabase {
- );
- }
-
-- if (!is_verified) {
-+ if (!is_pinned) {
- // Cert is not pinned in memory or in GCR, so look
- // for it on disk. Do this even if GCR support is
- // enabled, since if the cert was previously saved
-@@ -453,7 +453,7 @@ private class Application.TlsDatabase : GLib.TlsDatabase {
- this.store_dir, id, cancellable
- );
- this.pinned_certs.set(id, context);
-- is_verified = true;
-+ is_pinned = context.certificate.is_same(chain);
- } catch (GLib.IOError.NOT_FOUND err) {
- // Cert was not found saved, so it not pinned
- } catch (GLib.Error err) {
-@@ -465,18 +465,18 @@ private class Application.TlsDatabase : GLib.TlsDatabase {
- }
- }
- }
-- return is_verified;
-+ return is_pinned;
- }
-
-- private async bool verify_async(GLib.TlsCertificate chain,
-- GLib.SocketConnectable identity,
-- GLib.Cancellable? cancellable)
-+ private async bool is_pinned_async(GLib.TlsCertificate chain,
-+ GLib.SocketConnectable identity,
-+ GLib.Cancellable? cancellable)
- throws GLib.Error {
-- bool is_valid = false;
-+ bool pinned = false;
- yield Geary.Nonblocking.Concurrent.global.schedule_async(() => {
-- is_valid = verify(chain, identity, cancellable);
-+ pinned = is_pinned(chain, identity, cancellable);
- }, cancellable);
-- return is_valid;
-+ return pinned;
- }
-
- private TrustContext? lookup_id(string id) {
---
-GitLab
-
diff --git a/gnu/packages/patches/geeqie-clutter.patch b/gnu/packages/patches/geeqie-clutter.patch
new file mode 100644
index 0000000000..ab7cc957d8
--- /dev/null
+++ b/gnu/packages/patches/geeqie-clutter.patch
@@ -0,0 +1,35 @@
+From c99084ac5fc2fb854ff8e8abd4bd3298fb08fb43 Mon Sep 17 00:00:00 2001
+From: Colin Clark <colin.clark@cclark.uk>
+Date: Sat, 9 Jan 2021 11:35:41 +0000
+Subject: [PATCH] Fix #829: segfault with clutter-gtk
+
+https://github.com/BestImageViewer/geeqie/issues/829
+
+This fix might cause other problems which might be cured by calling:
+LIBGL_ALWAYS_INDIRECT=1 geeqie
+
+or, worst case:
+geeqie --disable-clutter
+---
+ src/main.c | 5 -----
+ 1 file changed, 5 deletions(-)
+
+diff --git a/src/main.c b/src/main.c
+index f497240d..4af654fe 100644
+--- a/src/main.c
++++ b/src/main.c
+@@ -904,11 +904,6 @@ gint main(gint argc, gchar *argv[])
+ #ifdef HAVE_GTHREAD
+ #if !GLIB_CHECK_VERSION(2,32,0)
+ g_thread_init(NULL);
+-#endif
+-#ifdef HAVE_CLUTTER
+-/* FIXME: see below */
+- putenv("LIBGL_ALWAYS_INDIRECT=1");
+- XInitThreads();
+ #endif
+ gdk_threads_init();
+ gdk_threads_enter();
+--
+2.34.0
+
diff --git a/gnu/packages/patches/genimage-mke2fs-test.patch b/gnu/packages/patches/genimage-mke2fs-test.patch
index c4a17590f2..5d4fbcfe44 100644
--- a/gnu/packages/patches/genimage-mke2fs-test.patch
+++ b/gnu/packages/patches/genimage-mke2fs-test.patch
@@ -1,8 +1,8 @@
diff --git a/test/mke2fs.dump b/test/mke2fs.dump
index 8e63662..0c25798 100644
---- a/test/mke2fs.dump
-+++ b/test/mke2fs.dump
-@@ -11,7 +11,7 @@ Filesystem OS type: Linux
+--- a/test/mke2fs.0.dump
++++ b/test/mke2fs.0.dump
+@@ -11,7 +11,7 @@
Inode count: 8192
Block count: 32768
Reserved block count: 1638
@@ -11,7 +11,7 @@ index 8e63662..0c25798 100644
Free inodes: 8141
First block: 1
Block size: 1024
-@@ -29,7 +29,7 @@ Mount count: 0
+@@ -29,7 +29,7 @@
Maximum mount count: -1
Last checked: Sat Jan 1 00:00:00 2000
Check interval: 0 (<none>)
@@ -20,7 +20,7 @@ index 8e63662..0c25798 100644
Reserved blocks uid: 0 (user root)
Reserved blocks gid: 0 (group root)
First inode: 11
-@@ -49,13 +49,13 @@ Journal sequence: 0x00000001
+@@ -51,13 +51,13 @@
Journal start: 0
diff --git a/gnu/packages/patches/ghostscript-CVE-2020-15900.patch b/gnu/packages/patches/ghostscript-CVE-2020-15900.patch
deleted file mode 100644
index b6658d7c7f..0000000000
--- a/gnu/packages/patches/ghostscript-CVE-2020-15900.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-Fix CVE-2020-15900.
-
-https://cve.circl.lu/cve/CVE-2020-15900
-https://artifex.com/security-advisories/CVE-2020-15900
-
-Taken from upstream:
-https://git.ghostscript.com/?p=ghostpdl.git;a=commitdiff;h=5d499272b95a6b890a1397e11d20937de000d31b
-
-diff --git a/psi/zstring.c b/psi/zstring.c
---- a/psi/zstring.c
-+++ b/psi/zstring.c
-@@ -142,13 +142,18 @@ search_impl(i_ctx_t *i_ctx_p, bool forward)
- return 0;
- found:
- op->tas.type_attrs = op1->tas.type_attrs;
-- op->value.bytes = ptr;
-- r_set_size(op, size);
-+ op->value.bytes = ptr; /* match */
-+ op->tas.rsize = size; /* match */
- push(2);
-- op[-1] = *op1;
-- r_set_size(op - 1, ptr - op[-1].value.bytes);
-- op1->value.bytes = ptr + size;
-- r_set_size(op1, count + (!forward ? (size - 1) : 0));
-+ op[-1] = *op1; /* pre */
-+ op[-3].value.bytes = ptr + size; /* post */
-+ if (forward) {
-+ op[-1].tas.rsize = ptr - op[-1].value.bytes; /* pre */
-+ op[-3].tas.rsize = count; /* post */
-+ } else {
-+ op[-1].tas.rsize = count; /* pre */
-+ op[-3].tas.rsize -= count + size; /* post */
-+ }
- make_true(op);
- return 0;
- }
diff --git a/gnu/packages/patches/ghostscript-freetype-compat.patch b/gnu/packages/patches/ghostscript-freetype-compat.patch
deleted file mode 100644
index cc225b5ad6..0000000000
--- a/gnu/packages/patches/ghostscript-freetype-compat.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-Fix build with FreeType 2.10.3 and newer.
-
-Taken from upstream:
-https://git.ghostscript.com/?p=ghostpdl.git;a=commitdiff;h=41ef9a0bc36b9db7115fbe9623f989bfb47bbade
-
-diff --git a/base/fapi_ft.c b/base/fapi_ft.c
---- a/base/fapi_ft.c
-+++ b/base/fapi_ft.c
-@@ -125,7 +125,7 @@ static void
- delete_inc_int_info(gs_fapi_server * a_server,
- FT_IncrementalRec * a_inc_int_info);
-
--FT_CALLBACK_DEF(void *)
-+static void *
- FF_alloc(FT_Memory memory, long size)
- {
- gs_memory_t *mem = (gs_memory_t *) memory->user;
-@@ -133,7 +133,7 @@ FF_alloc(FT_Memory memory, long size)
- return (gs_malloc(mem, size, 1, "FF_alloc"));
- }
-
--FT_CALLBACK_DEF(void *)
-+static void *
- FF_realloc(FT_Memory memory, long cur_size, long new_size, void *block)
- {
- gs_memory_t *mem = (gs_memory_t *) memory->user;
-@@ -153,7 +153,7 @@ FT_CALLBACK_DEF(void *)
- return (tmp);
- }
-
--FT_CALLBACK_DEF(void)
-+static void
- FF_free(FT_Memory memory, void *block)
- {
- gs_memory_t *mem = (gs_memory_t *) memory->user;
diff --git a/gnu/packages/patches/ghostscript-no-header-creationdate.patch b/gnu/packages/patches/ghostscript-no-header-creationdate.patch
index 92ddbdade0..b19f3ab5d9 100644
--- a/gnu/packages/patches/ghostscript-no-header-creationdate.patch
+++ b/gnu/packages/patches/ghostscript-no-header-creationdate.patch
@@ -20,3 +20,25 @@ index 0fb067e..b342e2c 100644
{
struct tm tms;
time_t t;
+--- orig/gnu-ghostscript-9.14.0/devices/vector/gdevpdfe.c
++++ gnu-ghostscript-9.14.0/devices/vector/gdevpdfe.c
+@@ -692,6 +692,9 @@
+ pdf_xml_attribute_name(s, "xmlns:xmp");
+ pdf_xml_attribute_value(s, "http://ns.adobe.com/xap/1.0/");
+ pdf_xml_tag_end(s);
++ if (!getenv("GS_GENERATE_UUIDS") ||
++ (strcasecmp(getenv("GS_GENERATE_UUIDS"), "0") != 0 &&
++ strcasecmp(getenv("GS_GENERATE_UUIDS"), "no") != 0))
+ {
+ pdf_xml_tag_open_beg(s, "xmp:ModifyDate");
+ pdf_xml_tag_end(s);
+@@ -700,6 +701,9 @@
+ pdf_xml_tag_close(s, "xmp:ModifyDate");
+ pdf_xml_newline(s);
+ }
++ if (!getenv("GS_GENERATE_UUIDS") ||
++ (strcasecmp(getenv("GS_GENERATE_UUIDS"), "0") != 0 &&
++ strcasecmp(getenv("GS_GENERATE_UUIDS"), "no") != 0))
+ {
+ pdf_xml_tag_open_beg(s, "xmp:CreateDate");
+ pdf_xml_tag_end(s);
diff --git a/gnu/packages/patches/glade-gls-set-script-name.patch b/gnu/packages/patches/glade-gls-set-script-name.patch
new file mode 100644
index 0000000000..61fbdf3914
--- /dev/null
+++ b/gnu/packages/patches/glade-gls-set-script-name.patch
@@ -0,0 +1,32 @@
+Taken from upstream:
+https://gitlab.gnome.org/GNOME/glade/-/commit/eb0429d318c017b57b9e59de1d5b3f142a0f455e.
+
+From 6cf1d3e11d4f8035f33c3003d33f6465896025a5 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= <mail@3v1n0.net>
+Date: Tue, 18 May 2021 19:54:50 +0200
+Subject: [PATCH] plugins: Define an invalid but non-null file path as script
+ path
+
+This is following the gjs applications behaviors, setting a valid string
+as the script path that will be shown in JS stack traces, even though
+won't load a real file through g_file_new_for_commandline_arg()
+---
+ plugins/gjs/glade-gjs.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/plugins/gjs/glade-gjs.c b/plugins/gjs/glade-gjs.c
+index e1779665..aeae9906 100644
+--- a/plugins/gjs/glade-gjs.c
++++ b/plugins/gjs/glade-gjs.c
+@@ -93,7 +93,7 @@ glade_gjs_init (const gchar *name)
+
+ /* Importing the module will create all the GTypes so that glade can use them at runtime */
+ retval = gjs_context_eval (gjs_context_get_current (),
+- import_sentence, -1, NULL,
++ import_sentence, -1, "<glade-gjs>",
+ &exit_status,
+ &error);
+ if (!retval && error)
+--
+GitLab
+
diff --git a/gnu/packages/patches/glade-test-widget-null-icon.patch b/gnu/packages/patches/glade-test-widget-null-icon.patch
new file mode 100644
index 0000000000..75668a2f68
--- /dev/null
+++ b/gnu/packages/patches/glade-test-widget-null-icon.patch
@@ -0,0 +1,30 @@
+Taken from upstream:
+https://gitlab.gnome.org/GNOME/glade/-/commit/6cf1d3e11d4f8035f33c3003d33f6465896025a5.
+
+From eb0429d318c017b57b9e59de1d5b3f142a0f455e Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= <mail@3v1n0.net>
+Date: Wed, 19 May 2021 00:10:29 +0200
+Subject: [PATCH] tests: Do not create a file icon when no filename is provided
+
+This would fail otherwise as GFileIcon requires a GFile parameter on
+construction.
+---
+ tests/create-widgets.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/tests/create-widgets.c b/tests/create-widgets.c
+index 2094059d..db8311f8 100644
+--- a/tests/create-widgets.c
++++ b/tests/create-widgets.c
+@@ -106,6 +106,8 @@ main (int argc,
+ if (G_TYPE_IS_INSTANTIATABLE (adaptor_type) && !G_TYPE_IS_ABSTRACT (adaptor_type) &&
+ /* FIXME: can not create a themed icon without a name */
+ !g_type_is_a (adaptor_type, G_TYPE_THEMED_ICON) &&
++ /* FIXME: can not create a file icon without a file name */
++ !g_type_is_a (adaptor_type, G_TYPE_FILE_ICON) &&
+ /* FIXME: GtkPopoverMenu gives a few warnings */
+ !g_type_is_a (adaptor_type, GTK_TYPE_POPOVER_MENU) &&
+ /* FIXME: GtkFileChooserNative is hard to test here */
+--
+GitLab
+
diff --git a/gnu/packages/patches/glib-CVE-2021-27218.patch b/gnu/packages/patches/glib-CVE-2021-27218.patch
deleted file mode 100644
index 00fa5ebf79..0000000000
--- a/gnu/packages/patches/glib-CVE-2021-27218.patch
+++ /dev/null
@@ -1,132 +0,0 @@
-Backport of:
-
-From 0f384c88a241bbbd884487b1c40b7b75f1e638d3 Mon Sep 17 00:00:00 2001
-From: Krzesimir Nowak <qdlacz@gmail.com>
-Date: Wed, 10 Feb 2021 23:51:07 +0100
-Subject: [PATCH] gbytearray: Do not accept too large byte arrays
-
-GByteArray uses guint for storing the length of the byte array, but it
-also has a constructor (g_byte_array_new_take) that takes length as a
-gsize. gsize may be larger than guint (64 bits for gsize vs 32 bits
-for guint). It is possible to call the function with a value greater
-than G_MAXUINT, which will result in silent length truncation. This
-may happen as a result of unreffing GBytes into GByteArray, so rather
-be loud about it.
-
-(Test case tweaked by Philip Withnall.)
-
-(Backport 2.66: Add #include gstrfuncsprivate.h in the test case for
-`g_memdup2()`.)
----
- glib/garray.c | 6 ++++++
- glib/gbytes.c | 4 ++++
- glib/tests/bytes.c | 35 ++++++++++++++++++++++++++++++++++-
- 3 files changed, 44 insertions(+), 1 deletion(-)
-
-diff --git a/glib/garray.c b/glib/garray.c
-index 942e74c9f..fb1a42aaf 100644
---- a/glib/garray.c
-+++ b/glib/garray.c
-@@ -2013,6 +2013,10 @@ g_byte_array_new (void)
- * Create byte array containing the data. The data will be owned by the array
- * and will be freed with g_free(), i.e. it could be allocated using g_strdup().
- *
-+ * Do not use it if @len is greater than %G_MAXUINT. #GByteArray
-+ * stores the length of its data in #guint, which may be shorter than
-+ * #gsize.
-+ *
- * Since: 2.32
- *
- * Returns: (transfer full): a new #GByteArray
-@@ -2024,6 +2028,8 @@ g_byte_array_new_take (guint8 *data,
- GByteArray *array;
- GRealArray *real;
-
-+ g_return_val_if_fail (len <= G_MAXUINT, NULL);
-+
- array = g_byte_array_new ();
- real = (GRealArray *)array;
- g_assert (real->data == NULL);
-diff --git a/glib/gbytes.c b/glib/gbytes.c
-index 7b72886e5..d56abe6c3 100644
---- a/glib/gbytes.c
-+++ b/glib/gbytes.c
-@@ -519,6 +519,10 @@ g_bytes_unref_to_data (GBytes *bytes,
- * g_bytes_new(), g_bytes_new_take() or g_byte_array_free_to_bytes(). In all
- * other cases the data is copied.
- *
-+ * Do not use it if @bytes contains more than %G_MAXUINT
-+ * bytes. #GByteArray stores the length of its data in #guint, which
-+ * may be shorter than #gsize, that @bytes is using.
-+ *
- * Returns: (transfer full): a new mutable #GByteArray containing the same byte data
- *
- * Since: 2.32
-diff --git a/glib/tests/bytes.c b/glib/tests/bytes.c
-index 5ea5c2b35..15a6aaad6 100644
---- a/glib/tests/bytes.c
-+++ b/glib/tests/bytes.c
-@@ -10,12 +10,12 @@
- */
-
- #undef G_DISABLE_ASSERT
--#undef G_LOG_DOMAIN
-
- #include <stdio.h>
- #include <stdlib.h>
- #include <string.h>
- #include "glib.h"
-+#include "glib/gstrfuncsprivate.h"
-
- /* Keep in sync with glib/gbytes.c */
- struct _GBytes
-@@ -333,6 +333,38 @@ test_to_array_transferred (void)
- g_byte_array_unref (array);
- }
-
-+static void
-+test_to_array_transferred_oversize (void)
-+{
-+ g_test_message ("g_bytes_unref_to_array() can only take GBytes up to "
-+ "G_MAXUINT in length; test that longer ones are rejected");
-+
-+ if (sizeof (guint) >= sizeof (gsize))
-+ {
-+ g_test_skip ("Skipping test as guint is not smaller than gsize");
-+ }
-+ else if (g_test_undefined ())
-+ {
-+ GByteArray *array = NULL;
-+ GBytes *bytes = NULL;
-+ gpointer data = g_memdup2 (NYAN, N_NYAN);
-+ gsize len = ((gsize) G_MAXUINT) + 1;
-+
-+ bytes = g_bytes_new_take (data, len);
-+ g_test_expect_message (G_LOG_DOMAIN, G_LOG_LEVEL_CRITICAL,
-+ "g_byte_array_new_take: assertion 'len <= G_MAXUINT' failed");
-+ array = g_bytes_unref_to_array (g_steal_pointer (&bytes));
-+ g_test_assert_expected_messages ();
-+ g_assert_null (array);
-+
-+ g_free (data);
-+ }
-+ else
-+ {
-+ g_test_skip ("Skipping test as testing undefined behaviour is disabled");
-+ }
-+}
-+
- static void
- test_to_array_two_refs (void)
- {
-@@ -410,6 +442,7 @@ main (int argc, char *argv[])
- g_test_add_func ("/bytes/to-array/transfered", test_to_array_transferred);
- g_test_add_func ("/bytes/to-array/two-refs", test_to_array_two_refs);
- g_test_add_func ("/bytes/to-array/non-malloc", test_to_array_non_malloc);
-+ g_test_add_func ("/bytes/to-array/transferred/oversize", test_to_array_transferred_oversize);
- g_test_add_func ("/bytes/null", test_null);
-
- return g_test_run ();
---
-2.30.1
-
diff --git a/gnu/packages/patches/glib-CVE-2021-27219-01.patch b/gnu/packages/patches/glib-CVE-2021-27219-01.patch
deleted file mode 100644
index 5db360d468..0000000000
--- a/gnu/packages/patches/glib-CVE-2021-27219-01.patch
+++ /dev/null
@@ -1,176 +0,0 @@
-Backport of:
-
-From 5e5f75a77e399c638be66d74e5daa8caeb433e00 Mon Sep 17 00:00:00 2001
-From: Philip Withnall <pwithnall@endlessos.org>
-Date: Thu, 4 Feb 2021 13:30:52 +0000
-Subject: [PATCH 01/11] gstrfuncs: Add internal g_memdup2() function
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-This will replace the existing `g_memdup()` function for use within
-GLib. It has an unavoidable security flaw of taking its `byte_size`
-argument as a `guint` rather than as a `gsize`. Most callers will
-expect it to be a `gsize`, and may pass in large values which could
-silently be truncated, resulting in an undersize allocation compared
-to what the caller expects.
-
-This could lead to a classic buffer overflow vulnerability for many
-callers of `g_memdup()`.
-
-`g_memdup2()`, in comparison, takes its `byte_size` as a `gsize`.
-
-Spotted by Kevin Backhouse of GHSL.
-
-In GLib 2.68, `g_memdup2()` will be a new public API. In this version
-for backport to older stable releases, it’s a new `static inline` API
-in a private header, so that use of `g_memdup()` within GLib can be
-fixed without adding a new API in a stable release series.
-
-Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
-Helps: GHSL-2021-045
-Helps: #2319
----
- docs/reference/glib/meson.build | 1 +
- glib/gstrfuncsprivate.h | 55 +++++++++++++++++++++++++++++++++
- glib/meson.build | 1 +
- glib/tests/strfuncs.c | 23 ++++++++++++++
- 4 files changed, 80 insertions(+)
- create mode 100644 glib/gstrfuncsprivate.h
-
-diff --git a/docs/reference/glib/meson.build b/docs/reference/glib/meson.build
-index bba7649f0..ee39f6d04 100644
---- a/docs/reference/glib/meson.build
-+++ b/docs/reference/glib/meson.build
-@@ -22,6 +22,7 @@ if get_option('gtk_doc')
- 'gprintfint.h',
- 'gmirroringtable.h',
- 'gscripttable.h',
-+ 'gstrfuncsprivate.h',
- 'glib-mirroring-tab',
- 'gnulib',
- 'pcre',
-diff --git a/glib/gstrfuncsprivate.h b/glib/gstrfuncsprivate.h
-new file mode 100644
-index 000000000..85c88328a
---- /dev/null
-+++ b/glib/gstrfuncsprivate.h
-@@ -0,0 +1,55 @@
-+/* GLIB - Library of useful routines for C programming
-+ * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
-+ *
-+ * This library is free software; you can redistribute it and/or
-+ * modify it under the terms of the GNU Lesser General Public
-+ * License as published by the Free Software Foundation; either
-+ * version 2.1 of the License, or (at your option) any later version.
-+ *
-+ * This library is distributed in the hope that it will be useful,
-+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-+ * Lesser General Public License for more details.
-+ *
-+ * You should have received a copy of the GNU Lesser General Public
-+ * License along with this library; if not, see <http://www.gnu.org/licenses/>.
-+ */
-+
-+#include <glib.h>
-+#include <string.h>
-+
-+/*
-+ * g_memdup2:
-+ * @mem: (nullable): the memory to copy.
-+ * @byte_size: the number of bytes to copy.
-+ *
-+ * Allocates @byte_size bytes of memory, and copies @byte_size bytes into it
-+ * from @mem. If @mem is %NULL it returns %NULL.
-+ *
-+ * This replaces g_memdup(), which was prone to integer overflows when
-+ * converting the argument from a #gsize to a #guint.
-+ *
-+ * This static inline version is a backport of the new public API from
-+ * GLib 2.68, kept internal to GLib for backport to older stable releases.
-+ * See https://gitlab.gnome.org/GNOME/glib/-/issues/2319.
-+ *
-+ * Returns: (nullable): a pointer to the newly-allocated copy of the memory,
-+ * or %NULL if @mem is %NULL.
-+ * Since: 2.68
-+ */
-+static inline gpointer
-+g_memdup2 (gconstpointer mem,
-+ gsize byte_size)
-+{
-+ gpointer new_mem;
-+
-+ if (mem && byte_size != 0)
-+ {
-+ new_mem = g_malloc (byte_size);
-+ memcpy (new_mem, mem, byte_size);
-+ }
-+ else
-+ new_mem = NULL;
-+
-+ return new_mem;
-+}
-diff --git a/glib/meson.build b/glib/meson.build
-index aaf5f00f5..5a6eea397 100644
---- a/glib/meson.build
-+++ b/glib/meson.build
-@@ -268,6 +268,7 @@ glib_sources = files(
- 'gslist.c',
- 'gstdio.c',
- 'gstrfuncs.c',
-+ 'gstrfuncsprivate.h',
- 'gstring.c',
- 'gstringchunk.c',
- 'gtestutils.c',
-diff --git a/glib/tests/strfuncs.c b/glib/tests/strfuncs.c
-index e1f9619c7..d968afff9 100644
---- a/glib/tests/strfuncs.c
-+++ b/glib/tests/strfuncs.c
-@@ -32,6 +32,8 @@
- #include <string.h>
- #include "glib.h"
-
-+#include "gstrfuncsprivate.h"
-+
- #if defined (_MSC_VER) && (_MSC_VER <= 1800)
- #define isnan(x) _isnan(x)
-
-@@ -219,6 +221,26 @@ test_memdup (void)
- g_free (str_dup);
- }
-
-+/* Testing g_memdup2() function with various positive and negative cases */
-+static void
-+test_memdup2 (void)
-+{
-+ gchar *str_dup = NULL;
-+ const gchar *str = "The quick brown fox jumps over the lazy dog";
-+
-+ /* Testing negative cases */
-+ g_assert_null (g_memdup2 (NULL, 1024));
-+ g_assert_null (g_memdup2 (str, 0));
-+ g_assert_null (g_memdup2 (NULL, 0));
-+
-+ /* Testing normal usage cases */
-+ str_dup = g_memdup2 (str, strlen (str) + 1);
-+ g_assert_nonnull (str_dup);
-+ g_assert_cmpstr (str, ==, str_dup);
-+
-+ g_free (str_dup);
-+}
-+
- /* Testing g_strpcpy() function with various positive and negative cases */
- static void
- test_stpcpy (void)
-@@ -2523,6 +2545,7 @@ main (int argc,
- g_test_add_func ("/strfuncs/has-prefix", test_has_prefix);
- g_test_add_func ("/strfuncs/has-suffix", test_has_suffix);
- g_test_add_func ("/strfuncs/memdup", test_memdup);
-+ g_test_add_func ("/strfuncs/memdup2", test_memdup2);
- g_test_add_func ("/strfuncs/stpcpy", test_stpcpy);
- g_test_add_func ("/strfuncs/str_match_string", test_str_match_string);
- g_test_add_func ("/strfuncs/str_tokenize_and_fold", test_str_tokenize_and_fold);
---
-2.30.1
-
diff --git a/gnu/packages/patches/glib-CVE-2021-27219-02.patch b/gnu/packages/patches/glib-CVE-2021-27219-02.patch
deleted file mode 100644
index 431959fa8f..0000000000
--- a/gnu/packages/patches/glib-CVE-2021-27219-02.patch
+++ /dev/null
@@ -1,264 +0,0 @@
-Backport of:
-
-From be8834340a2d928ece82025463ae23dee2c333d0 Mon Sep 17 00:00:00 2001
-From: Philip Withnall <pwithnall@endlessos.org>
-Date: Thu, 4 Feb 2021 13:37:56 +0000
-Subject: [PATCH 02/11] gio: Use g_memdup2() instead of g_memdup() in obvious
- places
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Convert all the call sites which use `g_memdup()`’s length argument
-trivially (for example, by passing a `sizeof()`), so that they use
-`g_memdup2()` instead.
-
-In almost all of these cases the use of `g_memdup()` would not have
-caused problems, but it will soon be deprecated, so best port away from
-it.
-
-Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
-Helps: #2319
----
- gio/gdbusconnection.c | 5 +++--
- gio/gdbusinterfaceskeleton.c | 3 ++-
- gio/gfile.c | 7 ++++---
- gio/gsettingsschema.c | 5 +++--
- gio/gwin32registrykey.c | 8 +++++---
- gio/tests/async-close-output-stream.c | 6 ++++--
- gio/tests/gdbus-export.c | 5 +++--
- gio/win32/gwinhttpfile.c | 9 +++++----
- 8 files changed, 29 insertions(+), 19 deletions(-)
-
-diff --git a/gio/gdbusconnection.c b/gio/gdbusconnection.c
-index f1f0921d4..d56453486 100644
---- a/gio/gdbusconnection.c
-+++ b/gio/gdbusconnection.c
-@@ -110,6 +110,7 @@
- #include "gasyncinitable.h"
- #include "giostream.h"
- #include "gasyncresult.h"
-+#include "gstrfuncsprivate.h"
- #include "gtask.h"
- #include "gmarshal-internal.h"
-
-@@ -3997,7 +3998,7 @@ _g_dbus_interface_vtable_copy (const GDBusInterfaceVTable *vtable)
- /* Don't waste memory by copying padding - remember to update this
- * when changing struct _GDBusInterfaceVTable in gdbusconnection.h
- */
-- return g_memdup ((gconstpointer) vtable, 3 * sizeof (gpointer));
-+ return g_memdup2 ((gconstpointer) vtable, 3 * sizeof (gpointer));
- }
-
- static void
-@@ -4014,7 +4015,7 @@ _g_dbus_subtree_vtable_copy (const GDBusSubtreeVTable *vtable)
- /* Don't waste memory by copying padding - remember to update this
- * when changing struct _GDBusSubtreeVTable in gdbusconnection.h
- */
-- return g_memdup ((gconstpointer) vtable, 3 * sizeof (gpointer));
-+ return g_memdup2 ((gconstpointer) vtable, 3 * sizeof (gpointer));
- }
-
- static void
-diff --git a/gio/gdbusinterfaceskeleton.c b/gio/gdbusinterfaceskeleton.c
-index 4a06516c1..4a4b719a5 100644
---- a/gio/gdbusinterfaceskeleton.c
-+++ b/gio/gdbusinterfaceskeleton.c
-@@ -28,6 +28,7 @@
- #include "gdbusmethodinvocation.h"
- #include "gdbusconnection.h"
- #include "gmarshal-internal.h"
-+#include "gstrfuncsprivate.h"
- #include "gtask.h"
- #include "gioerror.h"
-
-@@ -701,7 +702,7 @@ add_connection_locked (GDBusInterfaceSkeleton *interface_,
- * properly before building the hooked_vtable, so we create it
- * once at the last minute.
- */
-- interface_->priv->hooked_vtable = g_memdup (g_dbus_interface_skeleton_get_vtable (interface_), sizeof (GDBusInterfaceVTable));
-+ interface_->priv->hooked_vtable = g_memdup2 (g_dbus_interface_skeleton_get_vtable (interface_), sizeof (GDBusInterfaceVTable));
- interface_->priv->hooked_vtable->method_call = skeleton_intercept_handle_method_call;
- }
-
-diff --git a/gio/gfile.c b/gio/gfile.c
-index ba93f7c75..88b341e7d 100644
---- a/gio/gfile.c
-+++ b/gio/gfile.c
-@@ -60,6 +60,7 @@
- #include "gasyncresult.h"
- #include "gioerror.h"
- #include "glibintl.h"
-+#include "gstrfuncsprivate.h"
-
-
- /**
-@@ -7884,7 +7885,7 @@ measure_disk_usage_progress (gboolean reporting,
- g_main_context_invoke_full (g_task_get_context (task),
- g_task_get_priority (task),
- measure_disk_usage_invoke_progress,
-- g_memdup (&progress, sizeof progress),
-+ g_memdup2 (&progress, sizeof progress),
- g_free);
- }
-
-@@ -7902,7 +7903,7 @@ measure_disk_usage_thread (GTask *task,
- data->progress_callback ? measure_disk_usage_progress : NULL, task,
- &result.disk_usage, &result.num_dirs, &result.num_files,
- &error))
-- g_task_return_pointer (task, g_memdup (&result, sizeof result), g_free);
-+ g_task_return_pointer (task, g_memdup2 (&result, sizeof result), g_free);
- else
- g_task_return_error (task, error);
- }
-@@ -7926,7 +7927,7 @@ g_file_real_measure_disk_usage_async (GFile *file,
-
- task = g_task_new (file, cancellable, callback, user_data);
- g_task_set_source_tag (task, g_file_real_measure_disk_usage_async);
-- g_task_set_task_data (task, g_memdup (&data, sizeof data), g_free);
-+ g_task_set_task_data (task, g_memdup2 (&data, sizeof data), g_free);
- g_task_set_priority (task, io_priority);
-
- g_task_run_in_thread (task, measure_disk_usage_thread);
-diff --git a/gio/gsettingsschema.c b/gio/gsettingsschema.c
-index 3a60b8c64..dded9b1ca 100644
---- a/gio/gsettingsschema.c
-+++ b/gio/gsettingsschema.c
-@@ -20,6 +20,7 @@
-
- #include "gsettingsschema-internal.h"
- #include "gsettings.h"
-+#include "gstrfuncsprivate.h"
-
- #include "gvdb/gvdb-reader.h"
- #include "strinfo.c"
-@@ -1058,9 +1059,9 @@ g_settings_schema_list_children (GSettingsSchema *schema)
-
- if (g_str_has_suffix (key, "/"))
- {
-- gint length = strlen (key);
-+ gsize length = strlen (key);
-
-- strv[j] = g_memdup (key, length);
-+ strv[j] = g_memdup2 (key, length);
- strv[j][length - 1] = '\0';
- j++;
- }
-diff --git a/gio/gwin32registrykey.c b/gio/gwin32registrykey.c
-index c19fede4e..619fd48af 100644
---- a/gio/gwin32registrykey.c
-+++ b/gio/gwin32registrykey.c
-@@ -28,6 +28,8 @@
- #include <ntstatus.h>
- #include <winternl.h>
-
-+#include "gstrfuncsprivate.h"
-+
- #ifndef _WDMDDK_
- typedef enum _KEY_INFORMATION_CLASS {
- KeyBasicInformation,
-@@ -247,7 +249,7 @@ g_win32_registry_value_iter_copy (const GWin32RegistryValueIter *iter)
- new_iter->value_name_size = iter->value_name_size;
-
- if (iter->value_data != NULL)
-- new_iter->value_data = g_memdup (iter->value_data, iter->value_data_size);
-+ new_iter->value_data = g_memdup2 (iter->value_data, iter->value_data_size);
-
- new_iter->value_data_size = iter->value_data_size;
-
-@@ -268,8 +270,8 @@ g_win32_registry_value_iter_copy (const GWin32RegistryValueIter *iter)
- new_iter->value_data_expanded_charsize = iter->value_data_expanded_charsize;
-
- if (iter->value_data_expanded_u8 != NULL)
-- new_iter->value_data_expanded_u8 = g_memdup (iter->value_data_expanded_u8,
-- iter->value_data_expanded_charsize);
-+ new_iter->value_data_expanded_u8 = g_memdup2 (iter->value_data_expanded_u8,
-+ iter->value_data_expanded_charsize);
-
- new_iter->value_data_expanded_u8_size = iter->value_data_expanded_charsize;
-
-diff --git a/gio/tests/async-close-output-stream.c b/gio/tests/async-close-output-stream.c
-index 5f6620275..d3f97a119 100644
---- a/gio/tests/async-close-output-stream.c
-+++ b/gio/tests/async-close-output-stream.c
-@@ -24,6 +24,8 @@
- #include <stdlib.h>
- #include <string.h>
-
-+#include "gstrfuncsprivate.h"
-+
- #define DATA_TO_WRITE "Hello world\n"
-
- typedef struct
-@@ -147,9 +149,9 @@ prepare_data (SetupData *data,
-
- data->expected_size = g_memory_output_stream_get_data_size (G_MEMORY_OUTPUT_STREAM (data->data_stream));
-
-- g_assert_cmpint (data->expected_size, >, 0);
-+ g_assert_cmpuint (data->expected_size, >, 0);
-
-- data->expected_output = g_memdup (written, (guint)data->expected_size);
-+ data->expected_output = g_memdup2 (written, data->expected_size);
-
- /* then recreate the streams and prepare them for the asynchronous close */
- destroy_streams (data);
-diff --git a/gio/tests/gdbus-export.c b/gio/tests/gdbus-export.c
-index 506c7458a..5513306f8 100644
---- a/gio/tests/gdbus-export.c
-+++ b/gio/tests/gdbus-export.c
-@@ -23,6 +23,7 @@
- #include <string.h>
-
- #include "gdbus-tests.h"
-+#include "gstrfuncsprivate.h"
-
- /* all tests rely on a shared mainloop */
- static GMainLoop *loop = NULL;
-@@ -671,7 +672,7 @@ subtree_introspect (GDBusConnection *connection,
- g_assert_not_reached ();
- }
-
-- return g_memdup (interfaces, 2 * sizeof (void *));
-+ return g_memdup2 (interfaces, 2 * sizeof (void *));
- }
-
- static const GDBusInterfaceVTable *
-@@ -727,7 +728,7 @@ dynamic_subtree_introspect (GDBusConnection *connection,
- {
- const GDBusInterfaceInfo *interfaces[2] = { &dyna_interface_info, NULL };
-
-- return g_memdup (interfaces, 2 * sizeof (void *));
-+ return g_memdup2 (interfaces, 2 * sizeof (void *));
- }
-
- static const GDBusInterfaceVTable *
-diff --git a/gio/win32/gwinhttpfile.c b/gio/win32/gwinhttpfile.c
-index cf5eed31d..040ee8564 100644
---- a/gio/win32/gwinhttpfile.c
-+++ b/gio/win32/gwinhttpfile.c
-@@ -29,6 +29,7 @@
- #include "gio/gfile.h"
- #include "gio/gfileattribute.h"
- #include "gio/gfileinfo.h"
-+#include "gstrfuncsprivate.h"
- #include "gwinhttpfile.h"
- #include "gwinhttpfileinputstream.h"
- #include "gwinhttpfileoutputstream.h"
-@@ -393,10 +394,10 @@ g_winhttp_file_resolve_relative_path (GFile *file,
- child = g_object_new (G_TYPE_WINHTTP_FILE, NULL);
- child->vfs = winhttp_file->vfs;
- child->url = winhttp_file->url;
-- child->url.lpszScheme = g_memdup (winhttp_file->url.lpszScheme, (winhttp_file->url.dwSchemeLength+1)*2);
-- child->url.lpszHostName = g_memdup (winhttp_file->url.lpszHostName, (winhttp_file->url.dwHostNameLength+1)*2);
-- child->url.lpszUserName = g_memdup (winhttp_file->url.lpszUserName, (winhttp_file->url.dwUserNameLength+1)*2);
-- child->url.lpszPassword = g_memdup (winhttp_file->url.lpszPassword, (winhttp_file->url.dwPasswordLength+1)*2);
-+ child->url.lpszScheme = g_memdup2 (winhttp_file->url.lpszScheme, (winhttp_file->url.dwSchemeLength+1)*2);
-+ child->url.lpszHostName = g_memdup2 (winhttp_file->url.lpszHostName, (winhttp_file->url.dwHostNameLength+1)*2);
-+ child->url.lpszUserName = g_memdup2 (winhttp_file->url.lpszUserName, (winhttp_file->url.dwUserNameLength+1)*2);
-+ child->url.lpszPassword = g_memdup2 (winhttp_file->url.lpszPassword, (winhttp_file->url.dwPasswordLength+1)*2);
- child->url.lpszUrlPath = wnew_path;
- child->url.dwUrlPathLength = wcslen (wnew_path);
- child->url.lpszExtraInfo = NULL;
---
-2.30.1
-
diff --git a/gnu/packages/patches/glib-CVE-2021-27219-03.patch b/gnu/packages/patches/glib-CVE-2021-27219-03.patch
deleted file mode 100644
index 99e849c43c..0000000000
--- a/gnu/packages/patches/glib-CVE-2021-27219-03.patch
+++ /dev/null
@@ -1,136 +0,0 @@
-From 6110caea45b235420b98cd41d845cc92238f6781 Mon Sep 17 00:00:00 2001
-From: Philip Withnall <pwithnall@endlessos.org>
-Date: Thu, 4 Feb 2021 13:39:25 +0000
-Subject: [PATCH 03/11] gobject: Use g_memdup2() instead of g_memdup() in
- obvious places
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Convert all the call sites which use `g_memdup()`’s length argument
-trivially (for example, by passing a `sizeof()`), so that they use
-`g_memdup2()` instead.
-
-In almost all of these cases the use of `g_memdup()` would not have
-caused problems, but it will soon be deprecated, so best port away from
-it.
-
-Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
-Helps: #2319
----
- gobject/gsignal.c | 3 ++-
- gobject/gtype.c | 9 +++++----
- gobject/gtypemodule.c | 3 ++-
- gobject/tests/param.c | 4 +++-
- 4 files changed, 12 insertions(+), 7 deletions(-)
-
-diff --git a/gobject/gsignal.c b/gobject/gsignal.c
-index 77d8f211e..41c54ab57 100644
---- a/gobject/gsignal.c
-+++ b/gobject/gsignal.c
-@@ -28,6 +28,7 @@
- #include <signal.h>
-
- #include "gsignal.h"
-+#include "gstrfuncsprivate.h"
- #include "gtype-private.h"
- #include "gbsearcharray.h"
- #include "gvaluecollector.h"
-@@ -1730,7 +1731,7 @@ g_signal_newv (const gchar *signal_name,
- node->single_va_closure_is_valid = FALSE;
- node->flags = signal_flags & G_SIGNAL_FLAGS_MASK;
- node->n_params = n_params;
-- node->param_types = g_memdup (param_types, sizeof (GType) * n_params);
-+ node->param_types = g_memdup2 (param_types, sizeof (GType) * n_params);
- node->return_type = return_type;
- node->class_closure_bsa = NULL;
- if (accumulator)
-diff --git a/gobject/gtype.c b/gobject/gtype.c
-index 7d3789400..8441b90e9 100644
---- a/gobject/gtype.c
-+++ b/gobject/gtype.c
-@@ -33,6 +33,7 @@
-
- #include "glib-private.h"
- #include "gconstructor.h"
-+#include "gstrfuncsprivate.h"
-
- #ifdef G_OS_WIN32
- #include <windows.h>
-@@ -1470,7 +1471,7 @@ type_add_interface_Wm (TypeNode *node,
- iholder->next = iface_node_get_holders_L (iface);
- iface_node_set_holders_W (iface, iholder);
- iholder->instance_type = NODE_TYPE (node);
-- iholder->info = info ? g_memdup (info, sizeof (*info)) : NULL;
-+ iholder->info = info ? g_memdup2 (info, sizeof (*info)) : NULL;
- iholder->plugin = plugin;
-
- /* create an iface entry for this type */
-@@ -1731,7 +1732,7 @@ type_iface_retrieve_holder_info_Wm (TypeNode *iface,
- INVALID_RECURSION ("g_type_plugin_*", iholder->plugin, NODE_NAME (iface));
-
- check_interface_info_I (iface, instance_type, &tmp_info);
-- iholder->info = g_memdup (&tmp_info, sizeof (tmp_info));
-+ iholder->info = g_memdup2 (&tmp_info, sizeof (tmp_info));
- }
-
- return iholder; /* we don't modify write lock upon returning NULL */
-@@ -2016,10 +2017,10 @@ type_iface_vtable_base_init_Wm (TypeNode *iface,
- IFaceEntry *pentry = type_lookup_iface_entry_L (pnode, iface);
-
- if (pentry)
-- vtable = g_memdup (pentry->vtable, iface->data->iface.vtable_size);
-+ vtable = g_memdup2 (pentry->vtable, iface->data->iface.vtable_size);
- }
- if (!vtable)
-- vtable = g_memdup (iface->data->iface.dflt_vtable, iface->data->iface.vtable_size);
-+ vtable = g_memdup2 (iface->data->iface.dflt_vtable, iface->data->iface.vtable_size);
- entry->vtable = vtable;
- vtable->g_type = NODE_TYPE (iface);
- vtable->g_instance_type = NODE_TYPE (node);
-diff --git a/gobject/gtypemodule.c b/gobject/gtypemodule.c
-index 4ecaf8c88..20911fafd 100644
---- a/gobject/gtypemodule.c
-+++ b/gobject/gtypemodule.c
-@@ -19,6 +19,7 @@
-
- #include <stdlib.h>
-
-+#include "gstrfuncsprivate.h"
- #include "gtypeplugin.h"
- #include "gtypemodule.h"
-
-@@ -436,7 +437,7 @@ g_type_module_register_type (GTypeModule *module,
- module_type_info->loaded = TRUE;
- module_type_info->info = *type_info;
- if (type_info->value_table)
-- module_type_info->info.value_table = g_memdup (type_info->value_table,
-+ module_type_info->info.value_table = g_memdup2 (type_info->value_table,
- sizeof (GTypeValueTable));
-
- return module_type_info->type;
-diff --git a/gobject/tests/param.c b/gobject/tests/param.c
-index 758289bf8..971cff162 100644
---- a/gobject/tests/param.c
-+++ b/gobject/tests/param.c
-@@ -2,6 +2,8 @@
- #include <glib-object.h>
- #include <stdlib.h>
-
-+#include "gstrfuncsprivate.h"
-+
- static void
- test_param_value (void)
- {
-@@ -851,7 +853,7 @@ main (int argc, char *argv[])
- test_path = g_strdup_printf ("/param/implement/subprocess/%d-%d-%d-%d",
- data.change_this_flag, data.change_this_type,
- data.use_this_flag, data.use_this_type);
-- test_data = g_memdup (&data, sizeof (TestParamImplementData));
-+ test_data = g_memdup2 (&data, sizeof (TestParamImplementData));
- g_test_add_data_func_full (test_path, test_data, test_param_implement_child, g_free);
- g_free (test_path);
- }
---
-2.30.1
-
diff --git a/gnu/packages/patches/glib-CVE-2021-27219-04.patch b/gnu/packages/patches/glib-CVE-2021-27219-04.patch
deleted file mode 100644
index 3ae01f34b1..0000000000
--- a/gnu/packages/patches/glib-CVE-2021-27219-04.patch
+++ /dev/null
@@ -1,308 +0,0 @@
-Backport of:
-
-From 0736b7c1e7cf4232c5d7eb2b0fbfe9be81bd3baa Mon Sep 17 00:00:00 2001
-From: Philip Withnall <pwithnall@endlessos.org>
-Date: Thu, 4 Feb 2021 13:41:21 +0000
-Subject: [PATCH 04/11] glib: Use g_memdup2() instead of g_memdup() in obvious
- places
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Convert all the call sites which use `g_memdup()`’s length argument
-trivially (for example, by passing a `sizeof()` or an existing `gsize`
-variable), so that they use `g_memdup2()` instead.
-
-In almost all of these cases the use of `g_memdup()` would not have
-caused problems, but it will soon be deprecated, so best port away from
-it
-
-In particular, this fixes an overflow within `g_bytes_new()`, identified
-as GHSL-2021-045 by GHSL team member Kevin Backhouse.
-
-Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
-Fixes: GHSL-2021-045
-Helps: #2319
----
- glib/gbytes.c | 6 ++++--
- glib/gdir.c | 3 ++-
- glib/ghash.c | 7 ++++---
- glib/giochannel.c | 3 ++-
- glib/gslice.c | 3 ++-
- glib/gtestutils.c | 3 ++-
- glib/gvariant.c | 7 ++++---
- glib/gvarianttype.c | 3 ++-
- glib/tests/array-test.c | 4 +++-
- glib/tests/option-context.c | 6 ++++--
- 10 files changed, 29 insertions(+), 16 deletions(-)
-
-diff --git a/glib/gbytes.c b/glib/gbytes.c
-index d56abe6c3..dee494820 100644
---- a/glib/gbytes.c
-+++ b/glib/gbytes.c
-@@ -34,6 +34,8 @@
-
- #include <string.h>
-
-+#include "gstrfuncsprivate.h"
-+
- /**
- * GBytes:
- *
-@@ -95,7 +97,7 @@ g_bytes_new (gconstpointer data,
- {
- g_return_val_if_fail (data != NULL || size == 0, NULL);
-
-- return g_bytes_new_take (g_memdup (data, size), size);
-+ return g_bytes_new_take (g_memdup2 (data, size), size);
- }
-
- /**
-@@ -499,7 +501,7 @@ g_bytes_unref_to_data (GBytes *bytes,
- * Copy: Non g_malloc (or compatible) allocator, or static memory,
- * so we have to copy, and then unref.
- */
-- result = g_memdup (bytes->data, bytes->size);
-+ result = g_memdup2 (bytes->data, bytes->size);
- *size = bytes->size;
- g_bytes_unref (bytes);
- }
-diff --git a/glib/gdir.c b/glib/gdir.c
-index 6b85e99c8..6747a8c6f 100644
---- a/glib/gdir.c
-+++ b/glib/gdir.c
-@@ -37,6 +37,7 @@
- #include "gconvert.h"
- #include "gfileutils.h"
- #include "gstrfuncs.h"
-+#include "gstrfuncsprivate.h"
- #include "gtestutils.h"
- #include "glibintl.h"
-
-@@ -112,7 +113,7 @@ g_dir_open_with_errno (const gchar *path,
- return NULL;
- #endif
-
-- return g_memdup (&dir, sizeof dir);
-+ return g_memdup2 (&dir, sizeof dir);
- }
-
- /**
-diff --git a/glib/ghash.c b/glib/ghash.c
-index e61b03788..26f26062b 100644
---- a/glib/ghash.c
-+++ b/glib/ghash.c
-@@ -34,6 +34,7 @@
- #include "gmacros.h"
- #include "glib-private.h"
- #include "gstrfuncs.h"
-+#include "gstrfuncsprivate.h"
- #include "gatomic.h"
- #include "gtestutils.h"
- #include "gslice.h"
-@@ -964,7 +965,7 @@ g_hash_table_ensure_keyval_fits (GHashTable *hash_table, gpointer key, gpointer
- if (hash_table->have_big_keys)
- {
- if (key != value)
-- hash_table->values = g_memdup (hash_table->keys, sizeof (gpointer) * hash_table->size);
-+ hash_table->values = g_memdup2 (hash_table->keys, sizeof (gpointer) * hash_table->size);
- /* Keys and values are both big now, so no need for further checks */
- return;
- }
-@@ -972,7 +973,7 @@ g_hash_table_ensure_keyval_fits (GHashTable *hash_table, gpointer key, gpointer
- {
- if (key != value)
- {
-- hash_table->values = g_memdup (hash_table->keys, sizeof (guint) * hash_table->size);
-+ hash_table->values = g_memdup2 (hash_table->keys, sizeof (guint) * hash_table->size);
- is_a_set = FALSE;
- }
- }
-@@ -1000,7 +1001,7 @@ g_hash_table_ensure_keyval_fits (GHashTable *hash_table, gpointer key, gpointer
-
- /* Just split if necessary */
- if (is_a_set && key != value)
-- hash_table->values = g_memdup (hash_table->keys, sizeof (gpointer) * hash_table->size);
-+ hash_table->values = g_memdup2 (hash_table->keys, sizeof (gpointer) * hash_table->size);
-
- #endif
- }
-diff --git a/glib/giochannel.c b/glib/giochannel.c
-index 1956e9dc6..15927c391 100644
---- a/glib/giochannel.c
-+++ b/glib/giochannel.c
-@@ -37,6 +37,7 @@
- #include "giochannel.h"
-
- #include "gstrfuncs.h"
-+#include "gstrfuncsprivate.h"
- #include "gtestutils.h"
- #include "glibintl.h"
-
-@@ -892,7 +893,7 @@ g_io_channel_set_line_term (GIOChannel *channel,
- length = strlen (line_term);
-
- g_free (channel->line_term);
-- channel->line_term = line_term ? g_memdup (line_term, length) : NULL;
-+ channel->line_term = line_term ? g_memdup2 (line_term, length) : NULL;
- channel->line_term_len = length;
- }
-
-diff --git a/glib/gslice.c b/glib/gslice.c
-index 4c758c3be..bcdbb8853 100644
---- a/glib/gslice.c
-+++ b/glib/gslice.c
-@@ -41,6 +41,7 @@
- #include "gmain.h"
- #include "gmem.h" /* gslice.h */
- #include "gstrfuncs.h"
-+#include "gstrfuncsprivate.h"
- #include "gutils.h"
- #include "gtrashstack.h"
- #include "gtestutils.h"
-@@ -350,7 +351,7 @@ g_slice_get_config_state (GSliceConfig ckey,
- array[i++] = allocator->contention_counters[address];
- array[i++] = allocator_get_magazine_threshold (allocator, address);
- *n_values = i;
-- return g_memdup (array, sizeof (array[0]) * *n_values);
-+ return g_memdup2 (array, sizeof (array[0]) * *n_values);
- default:
- return NULL;
- }
-diff --git a/glib/gtestutils.c b/glib/gtestutils.c
-index dd789482f..5887ecc36 100644
---- a/glib/gtestutils.c
-+++ b/glib/gtestutils.c
-@@ -49,6 +49,7 @@
- #include "gpattern.h"
- #include "grand.h"
- #include "gstrfuncs.h"
-+#include "gstrfuncsprivate.h"
- #include "gtimer.h"
- #include "gslice.h"
- #include "gspawn.h"
-@@ -3798,7 +3799,7 @@ g_test_log_extract (GTestLogBuffer *tbuffer)
- if (p <= tbuffer->data->str + mlength)
- {
- g_string_erase (tbuffer->data, 0, mlength);
-- tbuffer->msgs = g_slist_prepend (tbuffer->msgs, g_memdup (&msg, sizeof (msg)));
-+ tbuffer->msgs = g_slist_prepend (tbuffer->msgs, g_memdup2 (&msg, sizeof (msg)));
- return TRUE;
- }
-
-diff --git a/glib/gvariant.c b/glib/gvariant.c
-index b61bf7278..d6f68a9ea 100644
---- a/glib/gvariant.c
-+++ b/glib/gvariant.c
-@@ -33,6 +33,7 @@
-
- #include <string.h>
-
-+#include "gstrfuncsprivate.h"
-
- /**
- * SECTION:gvariant
-@@ -725,7 +726,7 @@ g_variant_new_variant (GVariant *value)
- g_variant_ref_sink (value);
-
- return g_variant_new_from_children (G_VARIANT_TYPE_VARIANT,
-- g_memdup (&value, sizeof value),
-+ g_memdup2 (&value, sizeof value),
- 1, g_variant_is_trusted (value));
- }
-
-@@ -1229,7 +1230,7 @@ g_variant_new_fixed_array (const GVariantType *element_type,
- return NULL;
- }
-
-- data = g_memdup (elements, n_elements * element_size);
-+ data = g_memdup2 (elements, n_elements * element_size);
- value = g_variant_new_from_data (array_type, data,
- n_elements * element_size,
- FALSE, g_free, data);
-@@ -1908,7 +1909,7 @@ g_variant_dup_bytestring (GVariant *value,
- if (length)
- *length = size;
-
-- return g_memdup (original, size + 1);
-+ return g_memdup2 (original, size + 1);
- }
-
- /**
-diff --git a/glib/gvarianttype.c b/glib/gvarianttype.c
-index 1a228f73b..07659ff12 100644
---- a/glib/gvarianttype.c
-+++ b/glib/gvarianttype.c
-@@ -28,6 +28,7 @@
-
- #include <string.h>
-
-+#include "gstrfuncsprivate.h"
-
- /**
- * SECTION:gvarianttype
-@@ -1181,7 +1182,7 @@ g_variant_type_new_tuple (const GVariantType * const *items,
- g_assert (offset < sizeof buffer);
- buffer[offset++] = ')';
-
-- return (GVariantType *) g_memdup (buffer, offset);
-+ return (GVariantType *) g_memdup2 (buffer, offset);
- }
-
- /**
-diff --git a/glib/tests/array-test.c b/glib/tests/array-test.c
-index 3fcf1136a..11982f822 100644
---- a/glib/tests/array-test.c
-+++ b/glib/tests/array-test.c
-@@ -29,6 +29,8 @@
- #include <string.h>
- #include "glib.h"
-
-+#include "gstrfuncsprivate.h"
-+
- /* Test data to be passed to any function which calls g_array_new(), providing
- * the parameters for that call. Most #GArray tests should be repeated for all
- * possible values of #ArrayTestData. */
-@@ -1642,7 +1644,7 @@ byte_array_new_take (void)
- GByteArray *gbarray;
- guint8 *data;
-
-- data = g_memdup ("woooweeewow", 11);
-+ data = g_memdup2 ("woooweeewow", 11);
- gbarray = g_byte_array_new_take (data, 11);
- g_assert (gbarray->data == data);
- g_assert_cmpuint (gbarray->len, ==, 11);
-diff --git a/glib/tests/option-context.c b/glib/tests/option-context.c
-index 149d22353..88d2b80d1 100644
---- a/glib/tests/option-context.c
-+++ b/glib/tests/option-context.c
-@@ -27,6 +27,8 @@
- #include <string.h>
- #include <locale.h>
-
-+#include "gstrfuncsprivate.h"
-+
- static GOptionEntry main_entries[] = {
- { "main-switch", 0, 0,
- G_OPTION_ARG_NONE, NULL,
-@@ -256,7 +258,7 @@ join_stringv (int argc, char **argv)
- static char **
- copy_stringv (char **argv, int argc)
- {
-- return g_memdup (argv, sizeof (char *) * (argc + 1));
-+ return g_memdup2 (argv, sizeof (char *) * (argc + 1));
- }
-
- static void
-@@ -2323,7 +2325,7 @@ test_group_parse (void)
- g_option_context_add_group (context, group);
-
- argv = split_string ("program --test arg1 -f arg2 --group-test arg3 --frob arg4 -z arg5", &argc);
-- orig_argv = g_memdup (argv, (argc + 1) * sizeof (char *));
-+ orig_argv = g_memdup2 (argv, (argc + 1) * sizeof (char *));
-
- retval = g_option_context_parse (context, &argc, &argv, &error);
-
---
-2.30.1
-
diff --git a/gnu/packages/patches/glib-CVE-2021-27219-05.patch b/gnu/packages/patches/glib-CVE-2021-27219-05.patch
deleted file mode 100644
index 62bce1b188..0000000000
--- a/gnu/packages/patches/glib-CVE-2021-27219-05.patch
+++ /dev/null
@@ -1,47 +0,0 @@
-From 0cbad673215ec8a049b7fe2ff44b0beed31b376e Mon Sep 17 00:00:00 2001
-From: Philip Withnall <pwithnall@endlessos.org>
-Date: Thu, 4 Feb 2021 16:12:24 +0000
-Subject: [PATCH 05/11] gwinhttpfile: Avoid arithmetic overflow when
- calculating a size
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-The members of `URL_COMPONENTS` (`winhttp_file->url`) are `DWORD`s, i.e.
-32-bit unsigned integers. Adding to and multiplying them may cause them
-to overflow the unsigned integer bounds, even if the result is passed to
-`g_memdup2()` which accepts a `gsize`.
-
-Cast the `URL_COMPONENTS` members to `gsize` first to ensure that the
-arithmetic is done in terms of `gsize`s rather than unsigned integers.
-
-Spotted by Sebastian Dröge.
-
-Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
-Helps: #2319
----
- gio/win32/gwinhttpfile.c | 8 ++++----
- 1 file changed, 4 insertions(+), 4 deletions(-)
-
-diff --git a/gio/win32/gwinhttpfile.c b/gio/win32/gwinhttpfile.c
-index 040ee8564..246ec0578 100644
---- a/gio/win32/gwinhttpfile.c
-+++ b/gio/win32/gwinhttpfile.c
-@@ -394,10 +394,10 @@ g_winhttp_file_resolve_relative_path (GFile *file,
- child = g_object_new (G_TYPE_WINHTTP_FILE, NULL);
- child->vfs = winhttp_file->vfs;
- child->url = winhttp_file->url;
-- child->url.lpszScheme = g_memdup2 (winhttp_file->url.lpszScheme, (winhttp_file->url.dwSchemeLength+1)*2);
-- child->url.lpszHostName = g_memdup2 (winhttp_file->url.lpszHostName, (winhttp_file->url.dwHostNameLength+1)*2);
-- child->url.lpszUserName = g_memdup2 (winhttp_file->url.lpszUserName, (winhttp_file->url.dwUserNameLength+1)*2);
-- child->url.lpszPassword = g_memdup2 (winhttp_file->url.lpszPassword, (winhttp_file->url.dwPasswordLength+1)*2);
-+ child->url.lpszScheme = g_memdup2 (winhttp_file->url.lpszScheme, ((gsize) winhttp_file->url.dwSchemeLength + 1) * 2);
-+ child->url.lpszHostName = g_memdup2 (winhttp_file->url.lpszHostName, ((gsize) winhttp_file->url.dwHostNameLength + 1) * 2);
-+ child->url.lpszUserName = g_memdup2 (winhttp_file->url.lpszUserName, ((gsize) winhttp_file->url.dwUserNameLength + 1) * 2);
-+ child->url.lpszPassword = g_memdup2 (winhttp_file->url.lpszPassword, ((gsize) winhttp_file->url.dwPasswordLength + 1) * 2);
- child->url.lpszUrlPath = wnew_path;
- child->url.dwUrlPathLength = wcslen (wnew_path);
- child->url.lpszExtraInfo = NULL;
---
-2.30.1
-
diff --git a/gnu/packages/patches/glib-CVE-2021-27219-06.patch b/gnu/packages/patches/glib-CVE-2021-27219-06.patch
deleted file mode 100644
index 4e2435f5fd..0000000000
--- a/gnu/packages/patches/glib-CVE-2021-27219-06.patch
+++ /dev/null
@@ -1,94 +0,0 @@
-From f9ee2275cbc312c0b4cdbc338a4fbb76eb36fb9a Mon Sep 17 00:00:00 2001
-From: Philip Withnall <pwithnall@endlessos.org>
-Date: Thu, 4 Feb 2021 13:49:00 +0000
-Subject: [PATCH 06/11] gdatainputstream: Handle stop_chars_len internally as
- gsize
-
-Previously it was handled as a `gssize`, which meant that if the
-`stop_chars` string was longer than `G_MAXSSIZE` there would be an
-overflow.
-
-Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
-Helps: #2319
----
- gio/gdatainputstream.c | 25 +++++++++++++++++--------
- 1 file changed, 17 insertions(+), 8 deletions(-)
-
-diff --git a/gio/gdatainputstream.c b/gio/gdatainputstream.c
-index 2e7750cb5..2cdcbda19 100644
---- a/gio/gdatainputstream.c
-+++ b/gio/gdatainputstream.c
-@@ -27,6 +27,7 @@
- #include "gioenumtypes.h"
- #include "gioerror.h"
- #include "glibintl.h"
-+#include "gstrfuncsprivate.h"
-
- #include <string.h>
-
-@@ -856,7 +857,7 @@ static gssize
- scan_for_chars (GDataInputStream *stream,
- gsize *checked_out,
- const char *stop_chars,
-- gssize stop_chars_len)
-+ gsize stop_chars_len)
- {
- GBufferedInputStream *bstream;
- const char *buffer;
-@@ -952,7 +953,7 @@ typedef struct
- gsize checked;
-
- gchar *stop_chars;
-- gssize stop_chars_len;
-+ gsize stop_chars_len;
- gsize length;
- } GDataInputStreamReadData;
-
-@@ -1078,12 +1079,17 @@ g_data_input_stream_read_async (GDataInputStream *stream,
- {
- GDataInputStreamReadData *data;
- GTask *task;
-+ gsize stop_chars_len_unsigned;
-
- data = g_slice_new0 (GDataInputStreamReadData);
-- if (stop_chars_len == -1)
-- stop_chars_len = strlen (stop_chars);
-- data->stop_chars = g_memdup (stop_chars, stop_chars_len);
-- data->stop_chars_len = stop_chars_len;
-+
-+ if (stop_chars_len < 0)
-+ stop_chars_len_unsigned = strlen (stop_chars);
-+ else
-+ stop_chars_len_unsigned = (gsize) stop_chars_len;
-+
-+ data->stop_chars = g_memdup2 (stop_chars, stop_chars_len_unsigned);
-+ data->stop_chars_len = stop_chars_len_unsigned;
- data->last_saw_cr = FALSE;
-
- task = g_task_new (stream, cancellable, callback, user_data);
-@@ -1338,17 +1344,20 @@ g_data_input_stream_read_upto (GDataInputStream *stream,
- gssize found_pos;
- gssize res;
- char *data_until;
-+ gsize stop_chars_len_unsigned;
-
- g_return_val_if_fail (G_IS_DATA_INPUT_STREAM (stream), NULL);
-
- if (stop_chars_len < 0)
-- stop_chars_len = strlen (stop_chars);
-+ stop_chars_len_unsigned = strlen (stop_chars);
-+ else
-+ stop_chars_len_unsigned = (gsize) stop_chars_len;
-
- bstream = G_BUFFERED_INPUT_STREAM (stream);
-
- checked = 0;
-
-- while ((found_pos = scan_for_chars (stream, &checked, stop_chars, stop_chars_len)) == -1)
-+ while ((found_pos = scan_for_chars (stream, &checked, stop_chars, stop_chars_len_unsigned)) == -1)
- {
- if (g_buffered_input_stream_get_available (bstream) ==
- g_buffered_input_stream_get_buffer_size (bstream))
---
-2.30.1
-
diff --git a/gnu/packages/patches/glib-CVE-2021-27219-07.patch b/gnu/packages/patches/glib-CVE-2021-27219-07.patch
deleted file mode 100644
index dad3d285f4..0000000000
--- a/gnu/packages/patches/glib-CVE-2021-27219-07.patch
+++ /dev/null
@@ -1,118 +0,0 @@
-Backport of:
-
-From 2aaf593a9eb96d84fe3be740aca2810a97d95592 Mon Sep 17 00:00:00 2001
-From: Philip Withnall <pwithnall@endlessos.org>
-Date: Thu, 4 Feb 2021 13:50:37 +0000
-Subject: [PATCH 07/11] gwin32: Use gsize internally in g_wcsdup()
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-This allows it to handle strings up to length `G_MAXSIZE` — previously
-it would overflow with such strings.
-
-Update the several copies of it identically.
-
-Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
-Helps: #2319
----
- gio/gwin32appinfo.c | 33 ++++++++++++++++++++++++++-------
- gio/gwin32registrykey.c | 34 ++++++++++++++++++++++++++--------
- 2 files changed, 52 insertions(+), 15 deletions(-)
-
-diff --git a/gio/gwin32appinfo.c b/gio/gwin32appinfo.c
-index 9f335b370..dd7a96a4a 100644
---- a/gio/gwin32appinfo.c
-+++ b/gio/gwin32appinfo.c
-@@ -464,15 +464,34 @@ static GWin32RegistryKey *applications_key;
- /* Watch this key */
- static GWin32RegistryKey *classes_root_key;
-
-+static gsize
-+g_utf16_len (const gunichar2 *str)
-+{
-+ gsize result;
-+
-+ for (result = 0; str[0] != 0; str++, result++)
-+ ;
-+
-+ return result;
-+}
-+
- static gunichar2 *
--g_wcsdup (const gunichar2 *str, gssize str_size)
-+g_wcsdup (const gunichar2 *str, gssize str_len)
- {
-- if (str_size == -1)
-- {
-- str_size = wcslen (str) + 1;
-- str_size *= sizeof (gunichar2);
-- }
-- return g_memdup (str, str_size);
-+ gsize str_len_unsigned;
-+ gsize str_size;
-+
-+ g_return_val_if_fail (str != NULL, NULL);
-+
-+ if (str_len < 0)
-+ str_len_unsigned = g_utf16_len (str);
-+ else
-+ str_len_unsigned = (gsize) str_len;
-+
-+ g_assert (str_len_unsigned <= G_MAXSIZE / sizeof (gunichar2) - 1);
-+ str_size = (str_len_unsigned + 1) * sizeof (gunichar2);
-+
-+ return g_memdup2 (str, str_size);
- }
-
- #define URL_ASSOCIATIONS L"HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\Shell\\Associations\\UrlAssociations\\"
-diff --git a/gio/gwin32registrykey.c b/gio/gwin32registrykey.c
-index 619fd48af..fbd65311a 100644
---- a/gio/gwin32registrykey.c
-+++ b/gio/gwin32registrykey.c
-@@ -127,16 +127,34 @@ typedef enum
- G_WIN32_REGISTRY_UPDATED_PATH = 1,
- } GWin32RegistryKeyUpdateFlag;
-
-+static gsize
-+g_utf16_len (const gunichar2 *str)
-+{
-+ gsize result;
-+
-+ for (result = 0; str[0] != 0; str++, result++)
-+ ;
-+
-+ return result;
-+}
-+
- static gunichar2 *
--g_wcsdup (const gunichar2 *str,
-- gssize str_size)
-+g_wcsdup (const gunichar2 *str, gssize str_len)
- {
-- if (str_size == -1)
-- {
-- str_size = wcslen (str) + 1;
-- str_size *= sizeof (gunichar2);
-- }
-- return g_memdup (str, str_size);
-+ gsize str_len_unsigned;
-+ gsize str_size;
-+
-+ g_return_val_if_fail (str != NULL, NULL);
-+
-+ if (str_len < 0)
-+ str_len_unsigned = g_utf16_len (str);
-+ else
-+ str_len_unsigned = (gsize) str_len;
-+
-+ g_assert (str_len_unsigned <= G_MAXSIZE / sizeof (gunichar2) - 1);
-+ str_size = (str_len_unsigned + 1) * sizeof (gunichar2);
-+
-+ return g_memdup2 (str, str_size);
- }
-
- /**
---
-2.30.1
-
diff --git a/gnu/packages/patches/glib-CVE-2021-27219-08.patch b/gnu/packages/patches/glib-CVE-2021-27219-08.patch
deleted file mode 100644
index 2c021ad317..0000000000
--- a/gnu/packages/patches/glib-CVE-2021-27219-08.patch
+++ /dev/null
@@ -1,94 +0,0 @@
-From ba8ca443051f93a74c0d03d62e70402036f967a5 Mon Sep 17 00:00:00 2001
-From: Philip Withnall <pwithnall@endlessos.org>
-Date: Thu, 4 Feb 2021 13:58:32 +0000
-Subject: [PATCH 08/11] gkeyfilesettingsbackend: Handle long keys when
- converting paths
-
-Previously, the code in `convert_path()` could not handle keys longer
-than `G_MAXINT`, and would overflow if that was exceeded.
-
-Convert the code to use `gsize` and `g_memdup2()` throughout, and
-change from identifying the position of the final slash in the string
-using a signed offset `i`, to using a pointer to the character (and
-`strrchr()`). This allows the slash to be at any position in a
-`G_MAXSIZE`-long string, without sacrificing a bit of the offset for
-indicating whether a slash was found.
-
-Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
-Helps: #2319
----
- gio/gkeyfilesettingsbackend.c | 21 ++++++++++-----------
- 1 file changed, 10 insertions(+), 11 deletions(-)
-
-diff --git a/gio/gkeyfilesettingsbackend.c b/gio/gkeyfilesettingsbackend.c
-index cd5765afd..25b057672 100644
---- a/gio/gkeyfilesettingsbackend.c
-+++ b/gio/gkeyfilesettingsbackend.c
-@@ -33,6 +33,7 @@
- #include "gfilemonitor.h"
- #include "gsimplepermission.h"
- #include "gsettingsbackendinternal.h"
-+#include "gstrfuncsprivate.h"
- #include "giomodule-priv.h"
- #include "gportalsupport.h"
-
-@@ -145,8 +146,8 @@ convert_path (GKeyfileSettingsBackend *kfsb,
- gchar **group,
- gchar **basename)
- {
-- gint key_len = strlen (key);
-- gint i;
-+ gsize key_len = strlen (key);
-+ const gchar *last_slash;
-
- if (key_len < kfsb->prefix_len ||
- memcmp (key, kfsb->prefix, kfsb->prefix_len) != 0)
-@@ -155,38 +156,36 @@ convert_path (GKeyfileSettingsBackend *kfsb,
- key_len -= kfsb->prefix_len;
- key += kfsb->prefix_len;
-
-- for (i = key_len; i >= 0; i--)
-- if (key[i] == '/')
-- break;
-+ last_slash = strrchr (key, '/');
-
- if (kfsb->root_group)
- {
- /* if a root_group was specified, make sure the user hasn't given
- * a path that ghosts that group name
- */
-- if (i == kfsb->root_group_len && memcmp (key, kfsb->root_group, i) == 0)
-+ if (last_slash != NULL && (last_slash - key) == kfsb->root_group_len && memcmp (key, kfsb->root_group, last_slash - key) == 0)
- return FALSE;
- }
- else
- {
- /* if no root_group was given, ensure that the user gave a path */
-- if (i == -1)
-+ if (last_slash == NULL)
- return FALSE;
- }
-
- if (group)
- {
-- if (i >= 0)
-+ if (last_slash != NULL)
- {
-- *group = g_memdup (key, i + 1);
-- (*group)[i] = '\0';
-+ *group = g_memdup2 (key, (last_slash - key) + 1);
-+ (*group)[(last_slash - key)] = '\0';
- }
- else
- *group = g_strdup (kfsb->root_group);
- }
-
- if (basename)
-- *basename = g_memdup (key + i + 1, key_len - i);
-+ *basename = g_memdup2 (last_slash + 1, key_len - (last_slash - key));
-
- return TRUE;
- }
---
-2.30.1
-
diff --git a/gnu/packages/patches/glib-CVE-2021-27219-09.patch b/gnu/packages/patches/glib-CVE-2021-27219-09.patch
deleted file mode 100644
index 4de0c1b349..0000000000
--- a/gnu/packages/patches/glib-CVE-2021-27219-09.patch
+++ /dev/null
@@ -1,98 +0,0 @@
-From 65ec7f4d6e8832c481f6e00e2eb007b9a60024ce Mon Sep 17 00:00:00 2001
-From: Philip Withnall <pwithnall@endlessos.org>
-Date: Thu, 4 Feb 2021 14:00:53 +0000
-Subject: [PATCH 09/11] gsocket: Use gsize to track native sockaddr's size
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Don’t use an `int`, that’s potentially too small. In practical terms,
-this is not a problem, since no socket address is going to be that big.
-
-By making these changes we can use `g_memdup2()` without warnings,
-though. Fewer warnings is good.
-
-Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
-Helps: #2319
----
- gio/gsocket.c | 16 ++++++++++------
- 1 file changed, 10 insertions(+), 6 deletions(-)
-
-diff --git a/gio/gsocket.c b/gio/gsocket.c
-index 66073af83..a3af149e8 100644
---- a/gio/gsocket.c
-+++ b/gio/gsocket.c
-@@ -75,6 +75,7 @@
- #include "gcredentialsprivate.h"
- #include "glibintl.h"
- #include "gioprivate.h"
-+#include "gstrfuncsprivate.h"
-
- #ifdef G_OS_WIN32
- /* For Windows XP runtime compatibility, but use the system's if_nametoindex() if available */
-@@ -174,7 +175,7 @@ static gboolean g_socket_datagram_based_condition_wait (GDatagramBased
- GError **error);
-
- static GSocketAddress *
--cache_recv_address (GSocket *socket, struct sockaddr *native, int native_len);
-+cache_recv_address (GSocket *socket, struct sockaddr *native, size_t native_len);
-
- static gssize
- g_socket_receive_message_with_timeout (GSocket *socket,
-@@ -260,7 +261,7 @@ struct _GSocketPrivate
- struct {
- GSocketAddress *addr;
- struct sockaddr *native;
-- gint native_len;
-+ gsize native_len;
- guint64 last_used;
- } recv_addr_cache[RECV_ADDR_CACHE_SIZE];
- };
-@@ -5211,14 +5212,14 @@ g_socket_send_messages_with_timeout (GSocket *socket,
- }
-
- static GSocketAddress *
--cache_recv_address (GSocket *socket, struct sockaddr *native, int native_len)
-+cache_recv_address (GSocket *socket, struct sockaddr *native, size_t native_len)
- {
- GSocketAddress *saddr;
- gint i;
- guint64 oldest_time = G_MAXUINT64;
- gint oldest_index = 0;
-
-- if (native_len <= 0)
-+ if (native_len == 0)
- return NULL;
-
- saddr = NULL;
-@@ -5226,7 +5227,7 @@ cache_recv_address (GSocket *socket, struct sockaddr *native, int native_len)
- {
- GSocketAddress *tmp = socket->priv->recv_addr_cache[i].addr;
- gpointer tmp_native = socket->priv->recv_addr_cache[i].native;
-- gint tmp_native_len = socket->priv->recv_addr_cache[i].native_len;
-+ gsize tmp_native_len = socket->priv->recv_addr_cache[i].native_len;
-
- if (!tmp)
- continue;
-@@ -5256,7 +5257,7 @@ cache_recv_address (GSocket *socket, struct sockaddr *native, int native_len)
- g_free (socket->priv->recv_addr_cache[oldest_index].native);
- }
-
-- socket->priv->recv_addr_cache[oldest_index].native = g_memdup (native, native_len);
-+ socket->priv->recv_addr_cache[oldest_index].native = g_memdup2 (native, native_len);
- socket->priv->recv_addr_cache[oldest_index].native_len = native_len;
- socket->priv->recv_addr_cache[oldest_index].addr = g_object_ref (saddr);
- socket->priv->recv_addr_cache[oldest_index].last_used = g_get_monotonic_time ();
-@@ -5404,6 +5405,9 @@ g_socket_receive_message_with_timeout (GSocket *socket,
- /* do it */
- while (1)
- {
-+ /* addrlen has to be of type int because that’s how WSARecvFrom() is defined */
-+ G_STATIC_ASSERT (sizeof addr <= G_MAXINT);
-+
- addrlen = sizeof addr;
- if (address)
- result = WSARecvFrom (socket->priv->fd,
---
-2.30.1
-
diff --git a/gnu/packages/patches/glib-CVE-2021-27219-10.patch b/gnu/packages/patches/glib-CVE-2021-27219-10.patch
deleted file mode 100644
index 36198b8eef..0000000000
--- a/gnu/packages/patches/glib-CVE-2021-27219-10.patch
+++ /dev/null
@@ -1,52 +0,0 @@
-From 777b95a88f006d39d9fe6d3321db17e7b0d4b9a4 Mon Sep 17 00:00:00 2001
-From: Philip Withnall <pwithnall@endlessos.org>
-Date: Thu, 4 Feb 2021 14:07:39 +0000
-Subject: [PATCH 10/11] gtlspassword: Forbid very long TLS passwords
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-The public API `g_tls_password_set_value_full()` (and the vfunc it
-invokes) can only accept a `gssize` length. Ensure that nul-terminated
-strings passed to `g_tls_password_set_value()` can’t exceed that length.
-Use `g_memdup2()` to avoid an overflow if they’re longer than
-`G_MAXUINT` similarly.
-
-Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
-Helps: #2319
----
- gio/gtlspassword.c | 10 ++++++++--
- 1 file changed, 8 insertions(+), 2 deletions(-)
-
-diff --git a/gio/gtlspassword.c b/gio/gtlspassword.c
-index 1e437a7b6..dbcec41a8 100644
---- a/gio/gtlspassword.c
-+++ b/gio/gtlspassword.c
-@@ -23,6 +23,7 @@
- #include "glibintl.h"
-
- #include "gioenumtypes.h"
-+#include "gstrfuncsprivate.h"
- #include "gtlspassword.h"
-
- #include <string.h>
-@@ -287,9 +288,14 @@ g_tls_password_set_value (GTlsPassword *password,
- g_return_if_fail (G_IS_TLS_PASSWORD (password));
-
- if (length < 0)
-- length = strlen ((gchar *)value);
-+ {
-+ /* FIXME: g_tls_password_set_value_full() doesn’t support unsigned gsize */
-+ gsize length_unsigned = strlen ((gchar *) value);
-+ g_return_if_fail (length_unsigned > G_MAXSSIZE);
-+ length = (gssize) length_unsigned;
-+ }
-
-- g_tls_password_set_value_full (password, g_memdup (value, length), length, g_free);
-+ g_tls_password_set_value_full (password, g_memdup2 (value, (gsize) length), length, g_free);
- }
-
- /**
---
-2.30.1
-
diff --git a/gnu/packages/patches/glib-CVE-2021-27219-11.patch b/gnu/packages/patches/glib-CVE-2021-27219-11.patch
deleted file mode 100644
index 4413cb9827..0000000000
--- a/gnu/packages/patches/glib-CVE-2021-27219-11.patch
+++ /dev/null
@@ -1,57 +0,0 @@
-From ecdf91400e9a538695a0895b95ad7e8abcdf1749 Mon Sep 17 00:00:00 2001
-From: Philip Withnall <pwithnall@endlessos.org>
-Date: Thu, 4 Feb 2021 14:09:40 +0000
-Subject: [PATCH 11/11] giochannel: Forbid very long line terminator strings
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-The public API `GIOChannel.line_term_len` is only a `guint`. Ensure that
-nul-terminated strings passed to `g_io_channel_set_line_term()` can’t
-exceed that length. Use `g_memdup2()` to avoid a warning (`g_memdup()`
-is due to be deprecated), but not to avoid a bug, since it’s also
-limited to `G_MAXUINT`.
-
-Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
-Helps: #2319
----
- glib/giochannel.c | 17 +++++++++++++----
- 1 file changed, 13 insertions(+), 4 deletions(-)
-
-diff --git a/glib/giochannel.c b/glib/giochannel.c
-index 15927c391..66c6591f0 100644
---- a/glib/giochannel.c
-+++ b/glib/giochannel.c
-@@ -884,16 +884,25 @@ g_io_channel_set_line_term (GIOChannel *channel,
- const gchar *line_term,
- gint length)
- {
-+ guint length_unsigned;
-+
- g_return_if_fail (channel != NULL);
- g_return_if_fail (line_term == NULL || length != 0); /* Disallow "" */
-
- if (line_term == NULL)
-- length = 0;
-- else if (length < 0)
-- length = strlen (line_term);
-+ length_unsigned = 0;
-+ else if (length >= 0)
-+ length_unsigned = (guint) length;
-+ else
-+ {
-+ /* FIXME: We’re constrained by line_term_len being a guint here */
-+ gsize length_size = strlen (line_term);
-+ g_return_if_fail (length_size > G_MAXUINT);
-+ length_unsigned = (guint) length_size;
-+ }
-
- g_free (channel->line_term);
-- channel->line_term = line_term ? g_memdup2 (line_term, length) : NULL;
-+ channel->line_term = line_term ? g_memdup2 (line_term, length_unsigned) : NULL;
- channel->line_term_len = length;
- }
-
---
-2.30.1
-
diff --git a/gnu/packages/patches/glib-CVE-2021-27219-12.patch b/gnu/packages/patches/glib-CVE-2021-27219-12.patch
deleted file mode 100644
index 4fdbb81750..0000000000
--- a/gnu/packages/patches/glib-CVE-2021-27219-12.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From f8273b9aded135fe07094faebd527e43851aaf6e Mon Sep 17 00:00:00 2001
-From: "Jan Alexander Steffens (heftig)" <jan.steffens@gmail.com>
-Date: Sun, 7 Feb 2021 23:32:40 +0100
-Subject: [PATCH 1/5] giochannel: Fix length_size bounds check
-
-The inverted condition is an obvious error introduced by ecdf91400e9a.
-
-Fixes https://gitlab.gnome.org/GNOME/glib/-/issues/2323
-
-(cherry picked from commit a149bf2f9030168051942124536e303af8ba6176)
----
- glib/giochannel.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/glib/giochannel.c b/glib/giochannel.c
-index 66c6591f0..0d9d5f223 100644
---- a/glib/giochannel.c
-+++ b/glib/giochannel.c
-@@ -897,7 +897,7 @@ g_io_channel_set_line_term (GIOChannel *channel,
- {
- /* FIXME: We’re constrained by line_term_len being a guint here */
- gsize length_size = strlen (line_term);
-- g_return_if_fail (length_size > G_MAXUINT);
-+ g_return_if_fail (length_size <= G_MAXUINT);
- length_unsigned = (guint) length_size;
- }
-
---
-2.30.1
-
diff --git a/gnu/packages/patches/glib-CVE-2021-27219-13.patch b/gnu/packages/patches/glib-CVE-2021-27219-13.patch
deleted file mode 100644
index 6a287cc3a2..0000000000
--- a/gnu/packages/patches/glib-CVE-2021-27219-13.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From e069c50467712e6d607822afd6b6c15c2c343dff Mon Sep 17 00:00:00 2001
-From: Simon McVittie <smcv@collabora.com>
-Date: Mon, 8 Feb 2021 10:34:50 +0000
-Subject: [PATCH 2/5] giochannel: Don't store negative line_term_len in
- GIOChannel struct
-
-Adding test coverage indicated that this was another bug in 0cc11f74.
-
-Fixes: 0cc11f74 "giochannel: Forbid very long line terminator strings"
-Resolves: https://gitlab.gnome.org/GNOME/glib/-/issues/2323
-Signed-off-by: Simon McVittie <smcv@collabora.com>
-(cherry picked from commit 5dc8b0014c03e7491d93b90275ab442e888a9628)
----
- glib/giochannel.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/glib/giochannel.c b/glib/giochannel.c
-index 0d9d5f223..4c39b9dc0 100644
---- a/glib/giochannel.c
-+++ b/glib/giochannel.c
-@@ -903,7 +903,7 @@ g_io_channel_set_line_term (GIOChannel *channel,
-
- g_free (channel->line_term);
- channel->line_term = line_term ? g_memdup2 (line_term, length_unsigned) : NULL;
-- channel->line_term_len = length;
-+ channel->line_term_len = length_unsigned;
- }
-
- /**
---
-2.30.1
-
diff --git a/gnu/packages/patches/glib-CVE-2021-27219-14.patch b/gnu/packages/patches/glib-CVE-2021-27219-14.patch
deleted file mode 100644
index 78de2846da..0000000000
--- a/gnu/packages/patches/glib-CVE-2021-27219-14.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From 4506d1859a863087598c8d122740bae25b65b099 Mon Sep 17 00:00:00 2001
-From: Simon McVittie <smcv@collabora.com>
-Date: Mon, 8 Feb 2021 10:04:48 +0000
-Subject: [PATCH 4/5] gtlspassword: Fix inverted assertion
-
-The intention here was to assert that the length of the password fits
-in a gssize. Passwords more than half the size of virtual memory are
-probably excessive.
-
-Fixes: a8b204ff "gtlspassword: Forbid very long TLS passwords"
-Signed-off-by: Simon McVittie <smcv@collabora.com>
-(cherry picked from commit 61bb52ec42de1082bfb06ce1c737fc295bfe60b8)
----
- gio/gtlspassword.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/gio/gtlspassword.c b/gio/gtlspassword.c
-index dbcec41a8..bd86a6dfe 100644
---- a/gio/gtlspassword.c
-+++ b/gio/gtlspassword.c
-@@ -291,7 +291,7 @@ g_tls_password_set_value (GTlsPassword *password,
- {
- /* FIXME: g_tls_password_set_value_full() doesn’t support unsigned gsize */
- gsize length_unsigned = strlen ((gchar *) value);
-- g_return_if_fail (length_unsigned > G_MAXSSIZE);
-+ g_return_if_fail (length_unsigned <= G_MAXSSIZE);
- length = (gssize) length_unsigned;
- }
-
---
-2.30.1
-
diff --git a/gnu/packages/patches/glib-CVE-2021-27219-15.patch b/gnu/packages/patches/glib-CVE-2021-27219-15.patch
deleted file mode 100644
index 37ef85b4fa..0000000000
--- a/gnu/packages/patches/glib-CVE-2021-27219-15.patch
+++ /dev/null
@@ -1,95 +0,0 @@
-From 3d1550354c3c6a8491c39881752d51cb7515f2c2 Mon Sep 17 00:00:00 2001
-From: Simon McVittie <smcv@collabora.com>
-Date: Mon, 8 Feb 2021 10:22:39 +0000
-Subject: [PATCH 5/5] tls-interaction: Add test coverage for various ways to
- set the password
-
-Signed-off-by: Simon McVittie <smcv@collabora.com>
-(cherry picked from commit df4501316ca3903072400504a5ea76498db19538)
----
- gio/tests/tls-interaction.c | 55 +++++++++++++++++++++++++++++++++++++
- 1 file changed, 55 insertions(+)
-
-diff --git a/gio/tests/tls-interaction.c b/gio/tests/tls-interaction.c
-index 4f0737d7e..5661e8e0d 100644
---- a/gio/tests/tls-interaction.c
-+++ b/gio/tests/tls-interaction.c
-@@ -174,6 +174,38 @@ test_interaction_ask_password_finish_failure (GTlsInteraction *interaction,
- }
-
-
-+/* Return a copy of @str that is allocated in a silly way, to exercise
-+ * custom free-functions. The returned pointer points to a copy of @str
-+ * in a buffer of the form "BEFORE \0 str \0 AFTER". */
-+static guchar *
-+special_dup (const char *str)
-+{
-+ GString *buf = g_string_new ("BEFORE");
-+ guchar *ret;
-+
-+ g_string_append_c (buf, '\0');
-+ g_string_append (buf, str);
-+ g_string_append_c (buf, '\0');
-+ g_string_append (buf, "AFTER");
-+ ret = (guchar *) g_string_free (buf, FALSE);
-+ return ret + strlen ("BEFORE") + 1;
-+}
-+
-+
-+/* Free a copy of @str that was made with special_dup(), after asserting
-+ * that it has not been corrupted. */
-+static void
-+special_free (gpointer p)
-+{
-+ gchar *s = p;
-+ gchar *buf = s - strlen ("BEFORE") - 1;
-+
-+ g_assert_cmpstr (buf, ==, "BEFORE");
-+ g_assert_cmpstr (s + strlen (s) + 1, ==, "AFTER");
-+ g_free (buf);
-+}
-+
-+
- static GTlsInteractionResult
- test_interaction_ask_password_sync_success (GTlsInteraction *interaction,
- GTlsPassword *password,
-@@ -181,6 +213,8 @@ test_interaction_ask_password_sync_success (GTlsInteraction *interaction,
- GError **error)
- {
- TestInteraction *self;
-+ const guchar *value;
-+ gsize len;
-
- g_assert (TEST_IS_INTERACTION (interaction));
- self = TEST_INTERACTION (interaction);
-@@ -192,6 +226,27 @@ test_interaction_ask_password_sync_success (GTlsInteraction *interaction,
- g_assert (error != NULL);
- g_assert (*error == NULL);
-
-+ /* Exercise different ways to set the value */
-+ g_tls_password_set_value (password, (const guchar *) "foo", 4);
-+ len = 0;
-+ value = g_tls_password_get_value (password, &len);
-+ g_assert_cmpmem (value, len, "foo", 4);
-+
-+ g_tls_password_set_value (password, (const guchar *) "bar", -1);
-+ len = 0;
-+ value = g_tls_password_get_value (password, &len);
-+ g_assert_cmpmem (value, len, "bar", 3);
-+
-+ g_tls_password_set_value_full (password, special_dup ("baa"), 4, special_free);
-+ len = 0;
-+ value = g_tls_password_get_value (password, &len);
-+ g_assert_cmpmem (value, len, "baa", 4);
-+
-+ g_tls_password_set_value_full (password, special_dup ("baz"), -1, special_free);
-+ len = 0;
-+ value = g_tls_password_get_value (password, &len);
-+ g_assert_cmpmem (value, len, "baz", 3);
-+
- /* Don't do this in real life. Include a null terminator for testing */
- g_tls_password_set_value (password, (const guchar *)"the password", 13);
- return G_TLS_INTERACTION_HANDLED;
---
-2.30.1
-
diff --git a/gnu/packages/patches/glib-CVE-2021-27219-16.patch b/gnu/packages/patches/glib-CVE-2021-27219-16.patch
deleted file mode 100644
index 43635e72ed..0000000000
--- a/gnu/packages/patches/glib-CVE-2021-27219-16.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-From cb9ee701ef46c1819eed4e2a4dc181682bdfc176 Mon Sep 17 00:00:00 2001
-From: Philip Withnall <pwithnall@endlessos.org>
-Date: Wed, 10 Feb 2021 21:16:39 +0000
-Subject: [PATCH 1/3] gkeyfilesettingsbackend: Fix basename handling when group
- is unset
-
-Fix an effective regression in commit
-7781a9cbd2fd0aa84bee0f4eee88470640ff6706, which happens when
-`convert_path()` is called with a `key` which contains no slashes. In
-that case, the `key` is entirely the `basename`.
-
-Prior to commit 7781a9cb, the code worked through a fluke of `i == -1`
-cancelling out with the various additions in the `g_memdup()` call, and
-effectively resulting in `g_strdup (key)`.
-
-Spotted by Guido Berhoerster.
-
-Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
----
- gio/gkeyfilesettingsbackend.c | 7 ++++++-
- 1 file changed, 6 insertions(+), 1 deletion(-)
-
-diff --git a/gio/gkeyfilesettingsbackend.c b/gio/gkeyfilesettingsbackend.c
-index 25b057672..861c3a661 100644
---- a/gio/gkeyfilesettingsbackend.c
-+++ b/gio/gkeyfilesettingsbackend.c
-@@ -185,7 +185,12 @@ convert_path (GKeyfileSettingsBackend *kfsb,
- }
-
- if (basename)
-- *basename = g_memdup2 (last_slash + 1, key_len - (last_slash - key));
-+ {
-+ if (last_slash != NULL)
-+ *basename = g_memdup2 (last_slash + 1, key_len - (last_slash - key));
-+ else
-+ *basename = g_strdup (key);
-+ }
-
- return TRUE;
- }
---
-2.30.1
-
diff --git a/gnu/packages/patches/glib-CVE-2021-27219-17.patch b/gnu/packages/patches/glib-CVE-2021-27219-17.patch
deleted file mode 100644
index 3153979071..0000000000
--- a/gnu/packages/patches/glib-CVE-2021-27219-17.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-From 31e0d403ba635dbbacbfbff74295e5db02558d76 Mon Sep 17 00:00:00 2001
-From: Philip Withnall <pwithnall@endlessos.org>
-Date: Wed, 10 Feb 2021 21:19:30 +0000
-Subject: [PATCH 2/3] gkeyfilesettingsbackend: Disallow empty key or group
- names
-
-These should never have been allowed; they will result in precondition
-failures from the `GKeyFile` later on in the code.
-
-A test will be added for this shortly.
-
-Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
----
- gio/gkeyfilesettingsbackend.c | 7 +++++++
- 1 file changed, 7 insertions(+)
-
-diff --git a/gio/gkeyfilesettingsbackend.c b/gio/gkeyfilesettingsbackend.c
-index 861c3a661..de216e615 100644
---- a/gio/gkeyfilesettingsbackend.c
-+++ b/gio/gkeyfilesettingsbackend.c
-@@ -158,6 +158,13 @@ convert_path (GKeyfileSettingsBackend *kfsb,
-
- last_slash = strrchr (key, '/');
-
-+ /* Disallow empty group names or key names */
-+ if (key_len == 0 ||
-+ (last_slash != NULL &&
-+ (*(last_slash + 1) == '\0' ||
-+ last_slash == key)))
-+ return FALSE;
-+
- if (kfsb->root_group)
- {
- /* if a root_group was specified, make sure the user hasn't given
---
-2.30.1
-
diff --git a/gnu/packages/patches/glib-CVE-2021-27219-18.patch b/gnu/packages/patches/glib-CVE-2021-27219-18.patch
deleted file mode 100644
index c18d44ddeb..0000000000
--- a/gnu/packages/patches/glib-CVE-2021-27219-18.patch
+++ /dev/null
@@ -1,232 +0,0 @@
-Backport of:
-
-From 221c26685354dea2b2732df94404e8e5e77a1591 Mon Sep 17 00:00:00 2001
-From: Philip Withnall <pwithnall@endlessos.org>
-Date: Wed, 10 Feb 2021 21:21:36 +0000
-Subject: [PATCH 3/3] tests: Add tests for key name handling in the keyfile
- backend
-
-This tests the two recent commits.
-
-Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
----
- gio/tests/gsettings.c | 171 +++++++++++++++++++++++++++++++++++++++++-
- 1 file changed, 170 insertions(+), 1 deletion(-)
-
-diff --git a/gio/tests/gsettings.c b/gio/tests/gsettings.c
-index baadca8f5..afe594a23 100644
---- a/gio/tests/gsettings.c
-+++ b/gio/tests/gsettings.c
-@@ -1,3 +1,4 @@
-+#include <errno.h>
- #include <stdlib.h>
- #include <locale.h>
- #include <libintl.h>
-@@ -1740,6 +1741,14 @@ key_changed_cb (GSettings *settings, const gchar *key, gpointer data)
- (*b) = TRUE;
- }
-
-+typedef struct
-+{
-+ const gchar *path;
-+ const gchar *root_group;
-+ const gchar *keyfile_group;
-+ const gchar *root_path;
-+} KeyfileTestData;
-+
- /*
- * Test that using a keyfile works
- */
-@@ -1834,7 +1843,11 @@ test_keyfile (Fixture *fixture,
- g_free (str);
-
- g_settings_set (settings, "farewell", "s", "cheerio");
--
-+
-+ /* Check that empty keys/groups are not allowed. */
-+ g_assert_false (g_settings_is_writable (settings, ""));
-+ g_assert_false (g_settings_is_writable (settings, "/"));
-+
- /* When executing as root, changing the mode of the keyfile will have
- * no effect on the writability of the settings.
- */
-@@ -1866,6 +1879,149 @@ test_keyfile (Fixture *fixture,
- g_free (keyfile_path);
- }
-
-+/*
-+ * Test that using a keyfile works with a schema with no path set.
-+ */
-+static void
-+test_keyfile_no_path (Fixture *fixture,
-+ gconstpointer user_data)
-+{
-+ const KeyfileTestData *test_data = user_data;
-+ GSettingsBackend *kf_backend;
-+ GSettings *settings;
-+ GKeyFile *keyfile;
-+ gboolean writable;
-+ gchar *key = NULL;
-+ GError *error = NULL;
-+ gchar *keyfile_path = NULL, *store_path = NULL;
-+
-+ keyfile_path = g_build_filename (fixture->tmp_dir, "keyfile", NULL);
-+ store_path = g_build_filename (keyfile_path, "gsettings.store", NULL);
-+ kf_backend = g_keyfile_settings_backend_new (store_path, test_data->root_path, test_data->root_group);
-+ settings = g_settings_new_with_backend_and_path ("org.gtk.test.no-path", kf_backend, test_data->path);
-+ g_object_unref (kf_backend);
-+
-+ g_settings_reset (settings, "test-boolean");
-+ g_assert_true (g_settings_get_boolean (settings, "test-boolean"));
-+
-+ writable = g_settings_is_writable (settings, "test-boolean");
-+ g_assert_true (writable);
-+ g_settings_set (settings, "test-boolean", "b", FALSE);
-+
-+ g_assert_false (g_settings_get_boolean (settings, "test-boolean"));
-+
-+ g_settings_delay (settings);
-+ g_settings_set (settings, "test-boolean", "b", TRUE);
-+ g_settings_apply (settings);
-+
-+ keyfile = g_key_file_new ();
-+ g_assert_true (g_key_file_load_from_file (keyfile, store_path, 0, NULL));
-+
-+ g_assert_true (g_key_file_get_boolean (keyfile, test_data->keyfile_group, "test-boolean", NULL));
-+
-+ g_key_file_free (keyfile);
-+
-+ g_settings_reset (settings, "test-boolean");
-+ g_settings_apply (settings);
-+ keyfile = g_key_file_new ();
-+ g_assert_true (g_key_file_load_from_file (keyfile, store_path, 0, NULL));
-+
-+ g_assert_false (g_key_file_get_string (keyfile, test_data->keyfile_group, "test-boolean", &error));
-+ g_assert_error (error, G_KEY_FILE_ERROR, G_KEY_FILE_ERROR_KEY_NOT_FOUND);
-+ g_clear_error (&error);
-+
-+ /* Check that empty keys/groups are not allowed. */
-+ g_assert_false (g_settings_is_writable (settings, ""));
-+ g_assert_false (g_settings_is_writable (settings, "/"));
-+
-+ /* Keys which ghost the root group name are not allowed. This can only be
-+ * tested when the path is `/` as otherwise it acts as a prefix and prevents
-+ * any ghosting. */
-+ if (g_str_equal (test_data->path, "/"))
-+ {
-+ key = g_strdup_printf ("%s/%s", test_data->root_group, "");
-+ g_assert_false (g_settings_is_writable (settings, key));
-+ g_free (key);
-+
-+ key = g_strdup_printf ("%s/%s", test_data->root_group, "/");
-+ g_assert_false (g_settings_is_writable (settings, key));
-+ g_free (key);
-+
-+ key = g_strdup_printf ("%s/%s", test_data->root_group, "test-boolean");
-+ g_assert_false (g_settings_is_writable (settings, key));
-+ g_free (key);
-+ }
-+
-+ g_key_file_free (keyfile);
-+ g_object_unref (settings);
-+
-+ /* Clean up the temporary directory. */
-+ g_assert_cmpint (g_chmod (keyfile_path, 0777) == 0 ? 0 : errno, ==, 0);
-+ g_assert_cmpint (g_remove (store_path) == 0 ? 0 : errno, ==, 0);
-+ g_assert_cmpint (g_rmdir (keyfile_path) == 0 ? 0 : errno, ==, 0);
-+ g_free (store_path);
-+ g_free (keyfile_path);
-+}
-+
-+/*
-+ * Test that a keyfile rejects writes to keys outside its root path.
-+ */
-+static void
-+test_keyfile_outside_root_path (Fixture *fixture,
-+ gconstpointer user_data)
-+{
-+ GSettingsBackend *kf_backend;
-+ GSettings *settings;
-+ gchar *keyfile_path = NULL, *store_path = NULL;
-+
-+ keyfile_path = g_build_filename (fixture->tmp_dir, "keyfile", NULL);
-+ store_path = g_build_filename (keyfile_path, "gsettings.store", NULL);
-+ kf_backend = g_keyfile_settings_backend_new (store_path, "/tests/basic-types/", "root");
-+ settings = g_settings_new_with_backend_and_path ("org.gtk.test.no-path", kf_backend, "/tests/");
-+ g_object_unref (kf_backend);
-+
-+ g_assert_false (g_settings_is_writable (settings, "test-boolean"));
-+
-+ g_object_unref (settings);
-+
-+ /* Clean up the temporary directory. The keyfile probably doesn’t exist, so
-+ * don’t error on failure. */
-+ g_remove (store_path);
-+ g_assert_cmpint (g_rmdir (keyfile_path) == 0 ? 0 : errno, ==, 0);
-+ g_free (store_path);
-+ g_free (keyfile_path);
-+}
-+
-+/*
-+ * Test that a keyfile rejects writes to keys in the root if no root group is set.
-+ */
-+static void
-+test_keyfile_no_root_group (Fixture *fixture,
-+ gconstpointer user_data)
-+{
-+ GSettingsBackend *kf_backend;
-+ GSettings *settings;
-+ gchar *keyfile_path = NULL, *store_path = NULL;
-+
-+ keyfile_path = g_build_filename (fixture->tmp_dir, "keyfile", NULL);
-+ store_path = g_build_filename (keyfile_path, "gsettings.store", NULL);
-+ kf_backend = g_keyfile_settings_backend_new (store_path, "/", NULL);
-+ settings = g_settings_new_with_backend_and_path ("org.gtk.test.no-path", kf_backend, "/");
-+ g_object_unref (kf_backend);
-+
-+ g_assert_false (g_settings_is_writable (settings, "test-boolean"));
-+ g_assert_true (g_settings_is_writable (settings, "child/test-boolean"));
-+
-+ g_object_unref (settings);
-+
-+ /* Clean up the temporary directory. The keyfile probably doesn’t exist, so
-+ * don’t error on failure. */
-+ g_remove (store_path);
-+ g_assert_cmpint (g_rmdir (keyfile_path) == 0 ? 0 : errno, ==, 0);
-+ g_free (store_path);
-+ g_free (keyfile_path);
-+}
-+
- /* Test that getting child schemas works
- */
- static void
-@@ -2844,6 +3000,14 @@ main (int argc, char *argv[])
- gchar *override_text;
- gchar *enums;
- gint result;
-+ const KeyfileTestData keyfile_test_data_explicit_path = { "/tests/", "root", "tests", "/" };
-+ const KeyfileTestData keyfile_test_data_empty_path = { "/", "root", "root", "/" };
-+ const KeyfileTestData keyfile_test_data_long_path = {
-+ "/tests/path/is/very/long/and/this/makes/some/comparisons/take/a/different/branch/",
-+ "root",
-+ "tests/path/is/very/long/and/this/makes/some/comparisons/take/a/different/branch",
-+ "/"
-+ };
-
- /* Meson build sets this */
- #ifdef TEST_LOCALE_PATH
-@@ -2967,6 +3131,11 @@ main (int argc, char *argv[])
- }
-
- g_test_add ("/gsettings/keyfile", Fixture, NULL, setup, test_keyfile, teardown);
-+ g_test_add ("/gsettings/keyfile/explicit-path", Fixture, &keyfile_test_data_explicit_path, setup, test_keyfile_no_path, teardown);
-+ g_test_add ("/gsettings/keyfile/empty-path", Fixture, &keyfile_test_data_empty_path, setup, test_keyfile_no_path, teardown);
-+ g_test_add ("/gsettings/keyfile/long-path", Fixture, &keyfile_test_data_long_path, setup, test_keyfile_no_path, teardown);
-+ g_test_add ("/gsettings/keyfile/outside-root-path", Fixture, NULL, setup, test_keyfile_outside_root_path, teardown);
-+ g_test_add ("/gsettings/keyfile/no-root-group", Fixture, NULL, setup, test_keyfile_no_root_group, teardown);
- g_test_add_func ("/gsettings/child-schema", test_child_schema);
- g_test_add_func ("/gsettings/strinfo", test_strinfo);
- g_test_add_func ("/gsettings/enums", test_enums);
---
-2.30.1
-
diff --git a/gnu/packages/patches/glib-CVE-2021-28153.patch b/gnu/packages/patches/glib-CVE-2021-28153.patch
deleted file mode 100644
index 54443186d9..0000000000
--- a/gnu/packages/patches/glib-CVE-2021-28153.patch
+++ /dev/null
@@ -1,283 +0,0 @@
-Backport of:
-
-From 317b3b587058a05dca95d56dac26568c5b098d33 Mon Sep 17 00:00:00 2001
-From: Philip Withnall <pwithnall@endlessos.org>
-Date: Wed, 24 Feb 2021 17:35:40 +0000
-Subject: [PATCH] glocalfileoutputstream: Fix CREATE_REPLACE_DESTINATION
- with symlinks
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-The `G_FILE_CREATE_REPLACE_DESTINATION` flag is equivalent to unlinking
-the destination file and re-creating it from scratch. That did
-previously work, but in the process the code would call `open(O_CREAT)`
-on the file. If the file was a dangling symlink, this would create the
-destination file (empty). That’s not an intended side-effect, and has
-security implications if the symlink is controlled by a lower-privileged
-process.
-
-Fix that by not opening the destination file if it’s a symlink, and
-adjusting the rest of the code to cope with
- - the fact that `fd == -1` is not an error iff `is_symlink` is true,
- - and that `original_stat` will contain the `lstat()` results for the
- symlink now, rather than the `stat()` results for its target (again,
- iff `is_symlink` is true).
-
-This means that the target of the dangling symlink is no longer created,
-which was the bug. The symlink itself continues to be replaced (as
-before) with the new file — this is the intended behaviour of
-`g_file_replace()`.
-
-The behaviour for non-symlink cases, or cases where the symlink was not
-dangling, should be unchanged.
-
-Includes a unit test.
-
-Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
-
-Fixes: #2325
----
- gio/glocalfileoutputstream.c | 70 ++++++++++++++++-------
- gio/tests/file.c | 108 +++++++++++++++++++++++++++++++++++
- 2 files changed, 158 insertions(+), 20 deletions(-)
-
-diff --git a/gio/glocalfileoutputstream.c b/gio/glocalfileoutputstream.c
-index a3dd62172..553fcbbae 100644
---- a/gio/glocalfileoutputstream.c
-+++ b/gio/glocalfileoutputstream.c
-@@ -874,16 +874,22 @@ handle_overwrite_open (const char *filename,
- /* Could be a symlink, or it could be a regular ELOOP error,
- * but then the next open will fail too. */
- is_symlink = TRUE;
-- fd = g_open (filename, open_flags, mode);
-+ if (!(flags & G_FILE_CREATE_REPLACE_DESTINATION))
-+ fd = g_open (filename, open_flags, mode);
- }
--#else
-- fd = g_open (filename, open_flags, mode);
-- errsv = errno;
-+#else /* if !O_NOFOLLOW */
- /* This is racy, but we do it as soon as possible to minimize the race */
- is_symlink = g_file_test (filename, G_FILE_TEST_IS_SYMLINK);
-+
-+ if (!is_symlink || !(flags & G_FILE_CREATE_REPLACE_DESTINATION))
-+ {
-+ fd = g_open (filename, open_flags, mode);
-+ errsv = errno;
-+ }
- #endif
-
-- if (fd == -1)
-+ if (fd == -1 &&
-+ (!is_symlink || !(flags & G_FILE_CREATE_REPLACE_DESTINATION)))
- {
- char *display_name = g_filename_display_name (filename);
- g_set_error (error, G_IO_ERROR,
-@@ -893,13 +899,25 @@ handle_overwrite_open (const char *filename,
- g_free (display_name);
- return -1;
- }
--
-+
-+ if (!is_symlink)
-+ {
- #ifdef G_OS_WIN32
-- res = GLIB_PRIVATE_CALL (g_win32_fstat) (fd, &original_stat);
-+ res = GLIB_PRIVATE_CALL (g_win32_fstat) (fd, &original_stat);
- #else
-- res = fstat (fd, &original_stat);
-+ res = fstat (fd, &original_stat);
- #endif
-- errsv = errno;
-+ errsv = errno;
-+ }
-+ else
-+ {
-+#ifdef G_OS_WIN32
-+ res = GLIB_PRIVATE_CALL (g_win32_lstat_utf8) (filename, &original_stat);
-+#else
-+ res = g_lstat (filename, &original_stat);
-+#endif
-+ errsv = errno;
-+ }
-
- if (res != 0)
- {
-@@ -916,16 +934,27 @@ handle_overwrite_open (const char *filename,
- if (!S_ISREG (original_stat.st_mode))
- {
- if (S_ISDIR (original_stat.st_mode))
-- g_set_error_literal (error,
-- G_IO_ERROR,
-- G_IO_ERROR_IS_DIRECTORY,
-- _("Target file is a directory"));
-- else
-- g_set_error_literal (error,
-- G_IO_ERROR,
-- G_IO_ERROR_NOT_REGULAR_FILE,
-- _("Target file is not a regular file"));
-- goto err_out;
-+ {
-+ g_set_error_literal (error,
-+ G_IO_ERROR,
-+ G_IO_ERROR_IS_DIRECTORY,
-+ _("Target file is a directory"));
-+ goto err_out;
-+ }
-+ else if (!is_symlink ||
-+#ifdef S_ISLNK
-+ !S_ISLNK (original_stat.st_mode)
-+#else
-+ FALSE
-+#endif
-+ )
-+ {
-+ g_set_error_literal (error,
-+ G_IO_ERROR,
-+ G_IO_ERROR_NOT_REGULAR_FILE,
-+ _("Target file is not a regular file"));
-+ goto err_out;
-+ }
- }
-
- if (etag != NULL)
-@@ -1006,7 +1035,8 @@ handle_overwrite_open (const char *filename,
- }
- }
-
-- g_close (fd, NULL);
-+ if (fd >= 0)
-+ g_close (fd, NULL);
- *temp_filename = tmp_filename;
- return tmpfd;
- }
-diff --git a/gio/tests/file.c b/gio/tests/file.c
-index efb2eaadd..bc55f3af4 100644
---- a/gio/tests/file.c
-+++ b/gio/tests/file.c
-@@ -804,6 +804,113 @@ test_replace_cancel (void)
- g_object_unref (tmpdir);
- }
-
-+static void
-+test_replace_symlink (void)
-+{
-+#ifdef G_OS_UNIX
-+ gchar *tmpdir_path = NULL;
-+ GFile *tmpdir = NULL, *source_file = NULL, *target_file = NULL;
-+ GFileOutputStream *stream = NULL;
-+ const gchar *new_contents = "this is a test message which should be written to source and not target";
-+ gsize n_written;
-+ GFileEnumerator *enumerator = NULL;
-+ GFileInfo *info = NULL;
-+ gchar *contents = NULL;
-+ gsize length = 0;
-+ GError *local_error = NULL;
-+
-+ g_test_bug ("https://gitlab.gnome.org/GNOME/glib/-/issues/2325");
-+ g_test_summary ("Test that G_FILE_CREATE_REPLACE_DESTINATION doesn’t follow symlinks");
-+
-+ /* Create a fresh, empty working directory. */
-+ tmpdir_path = g_dir_make_tmp ("g_file_replace_symlink_XXXXXX", &local_error);
-+ g_assert_no_error (local_error);
-+ tmpdir = g_file_new_for_path (tmpdir_path);
-+
-+ g_test_message ("Using temporary directory %s", tmpdir_path);
-+ g_free (tmpdir_path);
-+
-+ /* Create symlink `source` which points to `target`. */
-+ source_file = g_file_get_child (tmpdir, "source");
-+ target_file = g_file_get_child (tmpdir, "target");
-+ g_file_make_symbolic_link (source_file, "target", NULL, &local_error);
-+ g_assert_no_error (local_error);
-+
-+ /* Ensure that `target` doesn’t exist */
-+ g_assert_false (g_file_query_exists (target_file, NULL));
-+
-+ /* Replace the `source` symlink with a regular file using
-+ * %G_FILE_CREATE_REPLACE_DESTINATION, which should replace it *without*
-+ * following the symlink */
-+ stream = g_file_replace (source_file, NULL, FALSE /* no backup */,
-+ G_FILE_CREATE_REPLACE_DESTINATION, NULL, &local_error);
-+ g_assert_no_error (local_error);
-+
-+ g_output_stream_write_all (G_OUTPUT_STREAM (stream), new_contents, strlen (new_contents),
-+ &n_written, NULL, &local_error);
-+ g_assert_no_error (local_error);
-+ g_assert_cmpint (n_written, ==, strlen (new_contents));
-+
-+ g_output_stream_close (G_OUTPUT_STREAM (stream), NULL, &local_error);
-+ g_assert_no_error (local_error);
-+
-+ g_clear_object (&stream);
-+
-+ /* At this point, there should still only be one file: `source`. It should
-+ * now be a regular file. `target` should not exist. */
-+ enumerator = g_file_enumerate_children (tmpdir,
-+ G_FILE_ATTRIBUTE_STANDARD_NAME ","
-+ G_FILE_ATTRIBUTE_STANDARD_TYPE,
-+ G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS, NULL, &local_error);
-+ g_assert_no_error (local_error);
-+
-+ info = g_file_enumerator_next_file (enumerator, NULL, &local_error);
-+ g_assert_no_error (local_error);
-+ g_assert_nonnull (info);
-+
-+ g_assert_cmpstr (g_file_info_get_name (info), ==, "source");
-+ g_assert_cmpint (g_file_info_get_file_type (info), ==, G_FILE_TYPE_REGULAR);
-+
-+ g_clear_object (&info);
-+
-+ info = g_file_enumerator_next_file (enumerator, NULL, &local_error);
-+ g_assert_no_error (local_error);
-+ g_assert_null (info);
-+
-+ g_file_enumerator_close (enumerator, NULL, &local_error);
-+ g_assert_no_error (local_error);
-+ g_clear_object (&enumerator);
-+
-+ /* Double-check that `target` doesn’t exist */
-+ g_assert_false (g_file_query_exists (target_file, NULL));
-+
-+ /* Check the content of `source`. */
-+ g_file_load_contents (source_file,
-+ NULL,
-+ &contents,
-+ &length,
-+ NULL,
-+ &local_error);
-+ g_assert_no_error (local_error);
-+ g_assert_cmpstr (contents, ==, new_contents);
-+ g_assert_cmpuint (length, ==, strlen (new_contents));
-+ g_free (contents);
-+
-+ /* Tidy up. */
-+ g_file_delete (source_file, NULL, &local_error);
-+ g_assert_no_error (local_error);
-+
-+ g_file_delete (tmpdir, NULL, &local_error);
-+ g_assert_no_error (local_error);
-+
-+ g_clear_object (&target_file);
-+ g_clear_object (&source_file);
-+ g_clear_object (&tmpdir);
-+#else /* if !G_OS_UNIX */
-+ g_test_skip ("Symlink replacement tests can only be run on Unix")
-+#endif
-+}
-+
- static void
- on_file_deleted (GObject *object,
- GAsyncResult *result,
-@@ -1754,6 +1861,7 @@ main (int argc, char *argv[])
- g_test_add_data_func ("/file/async-create-delete/4096", GINT_TO_POINTER (4096), test_create_delete);
- g_test_add_func ("/file/replace-load", test_replace_load);
- g_test_add_func ("/file/replace-cancel", test_replace_cancel);
-+ g_test_add_func ("/file/replace-symlink", test_replace_symlink);
- g_test_add_func ("/file/async-delete", test_async_delete);
- #ifdef G_OS_UNIX
- g_test_add_func ("/file/copy-preserve-mode", test_copy_preserve_mode);
---
-2.30.1
-
diff --git a/gnu/packages/patches/glib-networking-32-bit-time.patch b/gnu/packages/patches/glib-networking-32-bit-time.patch
new file mode 100644
index 0000000000..a437310270
--- /dev/null
+++ b/gnu/packages/patches/glib-networking-32-bit-time.patch
@@ -0,0 +1,61 @@
+Work around a year-2038 issue when building with a 32-bit 'time_t'
+on 32-bit platforms:
+
+ https://gitlab.gnome.org/GNOME/glib-networking/-/issues/172
+
+From 4f8ca86a0e460794188c3355f0c7cc11fdbe4229 Mon Sep 17 00:00:00 2001
+From: Simon McVittie <simon.mcvittie@collabora.co.uk>
+Date: Tue, 21 Sep 2021 17:07:44 +0000
+Subject: [PATCH] tests: Accept GNUTLS' workaround for limited size of time_t
+
+---
+ tls/tests/certificate.c | 15 +++++++++++++++
+ tls/tests/meson.build | 1 +
+ 2 files changed, 16 insertions(+)
+
+diff --git a/tls/tests/certificate.c b/tls/tests/certificate.c
+index c0100d30..d216c710 100644
+--- a/tls/tests/certificate.c
++++ b/tls/tests/certificate.c
+@@ -672,6 +672,12 @@ test_certificate_not_valid_before (void)
+ g_object_unref (cert);
+ }
+
++/* On 32-bit, GNUTLS caps expiry times at 2037-12-31 23:23:23 to avoid
++ * overflowing time_t. Hopefully by 2037, either 32-bit will finally have
++ * died out, or GNUTLS will rethink its approach to
++ * https://gitlab.com/gnutls/gnutls/-/issues/370 */
++#define GNUTLS_32_BIT_NOT_VALID_AFTER_MAX 2145914603
++
+ static void
+ test_certificate_not_valid_after (void)
+ {
+@@ -686,7 +692,16 @@ test_certificate_not_valid_after (void)
+ actual = g_tls_certificate_get_not_valid_after (cert);
+ g_assert_nonnull (actual);
+ actual_str = g_date_time_format_iso8601 (actual);
++
++#if SIZEOF_TIME_T <= 4
++ if (g_date_time_to_unix (actual) == GNUTLS_32_BIT_NOT_VALID_AFTER_MAX)
++ g_test_incomplete ("not-valid-after date not representable on 32-bit");
++ else
++ g_assert_cmpstr (actual_str, ==, EXPECTED_NOT_VALID_AFTER);
++#else
+ g_assert_cmpstr (actual_str, ==, EXPECTED_NOT_VALID_AFTER);
++#endif
++
+ g_free (actual_str);
+ g_date_time_unref (actual);
+ g_object_unref (cert);
+diff --git a/tls/tests/meson.build b/tls/tests/meson.build
+index e9c7d8c6..7415f913 100644
+--- a/tls/tests/meson.build
++++ b/tls/tests/meson.build
+@@ -69,6 +69,7 @@ foreach backend: backends
+ test_cflags = cflags + [
+ '-DBACKEND="@0@"'.format(backend),
+ '-DBACKEND_IS_' + backend.to_upper(),
++ '-DSIZEOF_TIME_T=@0@'.format(cc.sizeof('time_t', prefix: '#include <time.h>')),
+ ]
+
+ if backend == 'openssl'
diff --git a/gnu/packages/patches/glib-networking-gnutls-binding.patch b/gnu/packages/patches/glib-networking-gnutls-binding.patch
new file mode 100644
index 0000000000..91d0743056
--- /dev/null
+++ b/gnu/packages/patches/glib-networking-gnutls-binding.patch
@@ -0,0 +1,21 @@
+Skip failing test in 'test_connection_binding_match_tls_unique'
+in 'tls/tests/connection.c' when building glib-networking against
+GnuTLS 3.7.2. The failure stems from the fact that
+'gnutls_session_channel_binding' returns GNUTLS_E_INVALID_REQUEST
+is known upstream:
+
+ https://gitlab.gnome.org/GNOME/glib-networking/-/issues/164
+
+diff --git a/tls/tests/connection.c b/tls/tests/connection.c
+index 036df04..347c7a4 100644
+--- a/tls/tests/connection.c
++++ b/tls/tests/connection.c
+@@ -3037,8 +3037,6 @@ main (int argc,
+ setup_connection, test_connection_missing_server_identity, teardown_connection);
+ g_test_add ("/tls/" BACKEND "/connection/peer-certificate-notify", TestConnection, NULL,
+ setup_connection, test_peer_certificate_notify, teardown_connection);
+- g_test_add ("/tls/" BACKEND "/connection/binding/match-tls-unique", TestConnection, NULL,
+- setup_connection, test_connection_binding_match_tls_unique, teardown_connection);
+ g_test_add ("/tls/" BACKEND "/connection/binding/match-tls-server-end-point", TestConnection, NULL,
+ setup_connection, test_connection_binding_match_tls_server_end_point, teardown_connection);
+ g_test_add ("/tls/" BACKEND "/connection/binding/match-tls-exporter", TestConnection, NULL,
diff --git a/gnu/packages/patches/glib-skip-failing-test.patch b/gnu/packages/patches/glib-skip-failing-test.patch
new file mode 100644
index 0000000000..c7706aaa74
--- /dev/null
+++ b/gnu/packages/patches/glib-skip-failing-test.patch
@@ -0,0 +1,27 @@
+This test timed out on powerpc-linux even after extending the
+test_timeout_slow to 1800 seconds. Previously we tried to work around
+this test by extending test_timeout_slow by 1.5 its previous value.
+
+---
+ gio/tests/meson.build | 4 ----
+ 1 file changed, 4 deletions(-)
+
+diff --git a/gio/tests/meson.build b/gio/tests/meson.build
+index a926ae0..4fdbe7a 100644
+--- a/gio/tests/meson.build
++++ b/gio/tests/meson.build
+@@ -317,10 +317,6 @@ if host_machine.system() != 'windows'
+ 'extra_sources' : [extra_sources, gdbus_test_codegen_generated, gdbus_test_codegen_generated_interface_info],
+ 'c_args' : ['-DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_32'],
+ },
+- 'gdbus-threading' : {
+- 'extra_sources' : extra_sources,
+- 'suite' : ['slow'],
+- },
+ 'gmenumodel' : {
+ 'extra_sources' : extra_sources,
+ 'suite' : ['slow'],
+
+--
+2.31.1
+
diff --git a/gnu/packages/patches/glib-tests-timer.patch b/gnu/packages/patches/glib-tests-timer.patch
deleted file mode 100644
index e37425c0c8..0000000000
--- a/gnu/packages/patches/glib-tests-timer.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-* On i686 floating-point roundoff errors could sometimes cause this check to
- fail depending on the elapsed microseconds. Improve rounding by adding a
- fractional bit.
-
---- glib-2.40.0/glib/tests/timer.c 2014-03-05 08:05:42.000000000 -0600
-+++ glib-2.40.0/glib/tests/timer.c 2014-07-10 16:33:12.746862822 -0500
-@@ -35,7 +35,7 @@
- elapsed = g_timer_elapsed (timer, &micros);
-
- g_assert_cmpfloat (elapsed, <, 1.0);
-- g_assert_cmpuint (micros, ==, ((guint64)(elapsed * 1e6)) % 1000000);
-+ g_assert_cmpuint (micros, ==, ((guint64)(elapsed * 1e6 + 0.5)) % 1000000);
-
- g_timer_destroy (timer);
- }
diff --git a/gnu/packages/patches/glibc-2.27-git-fixes.patch b/gnu/packages/patches/glibc-2.27-git-fixes.patch
deleted file mode 100644
index 4ed67c7c25..0000000000
--- a/gnu/packages/patches/glibc-2.27-git-fixes.patch
+++ /dev/null
@@ -1,702 +0,0 @@
-These commits are cherry-picked from the "release/2.27/master" branch.
-
-https://sourceware.org/git/?p=glibc.git;a=shortlog;h=refs/heads/release/2.27/master
-
-Currently, we have the following (with NEWS and ChangeLog entries omitted).
-
-56170e064e2b21ce204f0817733e92f1730541ea
-516fa6080481a1433c173320b1c1432868e1e38a
-f36553bf6a4f69070f99badbdab5802b43e6e211
-7c6304182b9f422b782ace1cdd3efbde056aec36
-78a90c2f74a2012dd3eff302189e47ff6779a757
-1e52d8e65a58c49a48549053a1b89c06240e0c6c
-55ad82e45c313454de657931898e974a7a036cad
-
-From 56170e064e2b21ce204f0817733e92f1730541ea Mon Sep 17 00:00:00 2001
-From: Igor Gnatenko <ignatenko@redhat.com>
-Date: Wed, 7 Feb 2018 13:53:10 +0100
-Subject: [PATCH] Linux: use reserved name __key in pkey_get [BZ #22797]
-
-_key is not reserved name and we should avoid using that. It seems that
-it was simple typo when pkey_* was implemented.
-
-(cherry picked from commit 388ff7bd0d57d7061fdd39a2f26f65687e8058da)
-
-diff --git a/sysdeps/unix/sysv/linux/bits/mman-shared.h b/sysdeps/unix/sysv/linux/bits/mman-shared.h
-index 7715e680ca..d15ba95c9d 100644
---- a/sysdeps/unix/sysv/linux/bits/mman-shared.h
-+++ b/sysdeps/unix/sysv/linux/bits/mman-shared.h
-@@ -61,7 +61,7 @@ int pkey_set (int __key, unsigned int __access_rights) __THROW;
-
- /* Return the access rights for the current thread for KEY, which must
- have been allocated using pkey_alloc. */
--int pkey_get (int _key) __THROW;
-+int pkey_get (int __key) __THROW;
-
- /* Free an allocated protection key, which must have been allocated
- using pkey_alloc. */
-
-From 516fa6080481a1433c173320b1c1432868e1e38a Mon Sep 17 00:00:00 2001
-From: "Dmitry V. Levin" <ldv@altlinux.org>
-Date: Fri, 29 Dec 2017 23:19:32 +0000
-Subject: [PATCH] linux/aarch64: sync sys/ptrace.h with Linux 4.15 [BZ #22433]
-
-Remove compat-specific constants that were never exported by kernel
-headers under these names. Before linux commit v3.7-rc1~16^2~1 they
-were exported with COMPAT_ prefix, and since that commit they are not
-exported at all.
-
-* sysdeps/unix/sysv/linux/aarch64/sys/ptrace.h (__ptrace_request):
-Remove arm-specific PTRACE_GET_THREAD_AREA, PTRACE_GETHBPREGS,
-and PTRACE_SETHBPREGS.
-
-(cherry picked from commit 2fd4bbaa1446f1be700e10c526cf585a796c4991)
-
-diff --git a/sysdeps/unix/sysv/linux/aarch64/sys/ptrace.h b/sysdeps/unix/sysv/linux/aarch64/sys/ptrace.h
-index 4be45b95ff..444edbb702 100644
---- a/sysdeps/unix/sysv/linux/aarch64/sys/ptrace.h
-+++ b/sysdeps/unix/sysv/linux/aarch64/sys/ptrace.h
-@@ -78,18 +78,10 @@ enum __ptrace_request
- PTRACE_DETACH = 17,
- #define PT_DETACH PTRACE_DETACH
-
-- PTRACE_GET_THREAD_AREA = 22,
--
- /* Continue and stop at the next entry to or return from syscall. */
- PTRACE_SYSCALL = 24,
- #define PT_SYSCALL PTRACE_SYSCALL
-
-- /* Get all hardware breakpoint registers. */
-- PTRACE_GETHBPREGS = 29,
--
-- /* Set all hardware breakpoint registers. */
-- PTRACE_SETHBPREGS = 30,
--
- /* Set ptrace filter options. */
- PTRACE_SETOPTIONS = 0x4200,
- #define PT_SETOPTIONS PTRACE_SETOPTIONS
-
-From f36553bf6a4f69070f99badbdab5802b43e6e211 Mon Sep 17 00:00:00 2001
-From: Mike FABIAN <mfabian@redhat.com>
-Date: Mon, 19 Feb 2018 21:59:30 +0100
-Subject: [PATCH] =?UTF-8?q?Add=20missing=20=E2=80=9Creorder-end=E2=80=9D?=
- =?UTF-8?q?=20in=20LC=5FCOLLATE=20of=20et=5FEE=20[BZ=20#22517]?=
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
- [BZ #22517]
- * localedata/locales/et_EE (LC_COLLATE): add missing “reorder-end”
-
-(cherry picked from commit 7ec5f9465e732e668d0dc94ac078ba68056d6d0a)
-
-diff --git a/localedata/locales/et_EE b/localedata/locales/et_EE
-index 9cb55b568f..bab7493c98 100644
---- a/localedata/locales/et_EE
-+++ b/localedata/locales/et_EE
-@@ -103,6 +103,8 @@ reorder-after <w>
- <U00FC> <u-diaresis>;<BAS>;<MIN>;IGNORE % ü
- <U00DC> <u-diaresis>;<BAS>;<CAP>;IGNORE % Ü
-
-+reorder-end
-+
- END LC_COLLATE
-
- LC_CTYPE
-
-From 7c6304182b9f422b782ace1cdd3efbde056aec36 Mon Sep 17 00:00:00 2001
-From: DJ Delorie <dj@redhat.com>
-Date: Thu, 1 Mar 2018 23:20:45 -0500
-Subject: [PATCH] [BZ #22342] Fix netgroup cache keys.
-
-Unlike other nscd caches, the netgroup cache contains two types of
-records - those for "iterate through a netgroup" (i.e. setnetgrent())
-and those for "is this user in this netgroup" (i.e. innetgr()),
-i.e. full and partial records. The timeout code assumes these records
-have the same key for the group name, so that the collection of records
-that is "this netgroup" can be expired as a unit.
-
-However, the keys are not the same, as the in-netgroup key is generated
-by nscd rather than being passed to it from elsewhere, and is generated
-without the trailing NUL. All other keys have the trailing NUL, and as
-noted in the linked BZ, debug statements confirm that two keys for the
-same netgroup are added to the cache with two different lengths.
-
-The result of this is that as records in the cache expire, the purge
-code only cleans out one of the two types of entries, resulting in
-stale, possibly incorrect, and possibly inconsistent cache data.
-
-The patch simply includes the existing NUL in the computation for the
-key length ('key' points to the char after the NUL, and 'group' to the
-first char of the group, so 'key-group' includes the first char to the
-NUL, inclusive).
-
- [BZ #22342]
- * nscd/netgroupcache.c (addinnetgrX): Include trailing NUL in
- key value.
-
-Reviewed-by: Carlos O'Donell <carlos@redhat.com>
-(cherry picked from commit 1c81d55fc4b07b51adf68558ba74ce975153e580)
-
-diff --git a/nscd/netgroupcache.c b/nscd/netgroupcache.c
-index b832c9315f..2f187b208c 100644
---- a/nscd/netgroupcache.c
-+++ b/nscd/netgroupcache.c
-@@ -480,7 +480,7 @@ addinnetgrX (struct database_dyn *db, int fd, request_header *req,
- {
- const char *group = key;
- key = (char *) rawmemchr (key, '\0') + 1;
-- size_t group_len = key - group - 1;
-+ size_t group_len = key - group;
- const char *host = *key++ ? key : NULL;
- if (host != NULL)
- key = (char *) rawmemchr (key, '\0') + 1;
-
-From 78a90c2f74a2012dd3eff302189e47ff6779a757 Mon Sep 17 00:00:00 2001
-From: Andreas Schwab <schwab@linux-m68k.org>
-Date: Fri, 2 Mar 2018 23:07:14 +0100
-Subject: [PATCH] Fix multiple definitions of __nss_*_database (bug 22918)
-
-(cherry picked from commit eaf6753f8aac33a36deb98c1031d1bad7b593d2d)
-
-diff --git a/nscd/gai.c b/nscd/gai.c
-index d081747797..576fd0045b 100644
---- a/nscd/gai.c
-+++ b/nscd/gai.c
-@@ -45,3 +45,6 @@
- #ifdef HAVE_LIBIDN
- # include <libidn/idn-stub.c>
- #endif
-+
-+/* Some variables normally defined in libc. */
-+service_user *__nss_hosts_database attribute_hidden;
-diff --git a/nss/nsswitch.c b/nss/nsswitch.c
-index d5e655974f..b0f0c11a3e 100644
---- a/nss/nsswitch.c
-+++ b/nss/nsswitch.c
-@@ -62,7 +62,7 @@ static service_library *nss_new_service (name_database *database,
-
- /* Declare external database variables. */
- #define DEFINE_DATABASE(name) \
-- extern service_user *__nss_##name##_database attribute_hidden; \
-+ service_user *__nss_##name##_database attribute_hidden; \
- weak_extern (__nss_##name##_database)
- #include "databases.def"
- #undef DEFINE_DATABASE
-diff --git a/nss/nsswitch.h b/nss/nsswitch.h
-index eccb535ef5..63573b9ebc 100644
---- a/nss/nsswitch.h
-+++ b/nss/nsswitch.h
-@@ -226,10 +226,10 @@ libc_hidden_proto (__nss_hostname_digits_dots)
- #define MAX_NR_ADDRS 48
-
- /* Prototypes for __nss_*_lookup2 functions. */
--#define DEFINE_DATABASE(arg) \
-- service_user *__nss_##arg##_database attribute_hidden; \
-- int __nss_##arg##_lookup2 (service_user **, const char *, \
-- const char *, void **); \
-+#define DEFINE_DATABASE(arg) \
-+ extern service_user *__nss_##arg##_database attribute_hidden; \
-+ int __nss_##arg##_lookup2 (service_user **, const char *, \
-+ const char *, void **); \
- libc_hidden_proto (__nss_##arg##_lookup2)
- #include "databases.def"
- #undef DEFINE_DATABASE
-diff --git a/posix/tst-rfc3484-2.c b/posix/tst-rfc3484-2.c
-index f509534ca9..8c64ac59ff 100644
---- a/posix/tst-rfc3484-2.c
-+++ b/posix/tst-rfc3484-2.c
-@@ -58,6 +58,7 @@ _res_hconf_init (void)
- #undef USE_NSCD
- #include "../sysdeps/posix/getaddrinfo.c"
-
-+service_user *__nss_hosts_database attribute_hidden;
-
- /* This is the beginning of the real test code. The above defines
- (among other things) the function rfc3484_sort. */
-diff --git a/posix/tst-rfc3484-3.c b/posix/tst-rfc3484-3.c
-index ae44087a10..1c61aaf844 100644
---- a/posix/tst-rfc3484-3.c
-+++ b/posix/tst-rfc3484-3.c
-@@ -58,6 +58,7 @@ _res_hconf_init (void)
- #undef USE_NSCD
- #include "../sysdeps/posix/getaddrinfo.c"
-
-+service_user *__nss_hosts_database attribute_hidden;
-
- /* This is the beginning of the real test code. The above defines
- (among other things) the function rfc3484_sort. */
-diff --git a/posix/tst-rfc3484.c b/posix/tst-rfc3484.c
-index 7f191abbbc..8f45848e44 100644
---- a/posix/tst-rfc3484.c
-+++ b/posix/tst-rfc3484.c
-@@ -58,6 +58,7 @@ _res_hconf_init (void)
- #undef USE_NSCD
- #include "../sysdeps/posix/getaddrinfo.c"
-
-+service_user *__nss_hosts_database attribute_hidden;
-
- /* This is the beginning of the real test code. The above defines
- (among other things) the function rfc3484_sort. */
-
-From 1e52d8e65a58c49a48549053a1b89c06240e0c6c Mon Sep 17 00:00:00 2001
-From: Adhemerval Zanella <adhemerval.zanella@linaro.org>
-Date: Fri, 17 Nov 2017 16:04:29 -0200
-Subject: [PATCH] i386: Fix i386 sigaction sa_restorer initialization
- (BZ#21269)
-
-This patch fixes the i386 sa_restorer field initialization for sigaction
-syscall for kernel with vDSO. As described in bug report, i386 Linux
-(and compat on x86_64) interprets SA_RESTORER clear with nonzero
-sa_restorer as a request for stack switching if the SS segment is 'funny'.
-This means that anything that tries to mix glibc's signal handling with
-segmentation (for instance through modify_ldt syscall) is randomly broken
-depending on what values lands in sa_restorer.
-
-The testcase added is based on Linux test tools/testing/selftests/x86/ldt_gdt.c,
-more specifically in do_multicpu_tests function. The main changes are:
-
- - C11 atomics instead of plain access.
-
- - Remove x86_64 support which simplifies the syscall handling and fallbacks.
-
- - Replicate only the test required to trigger the issue.
-
-Checked on i686-linux-gnu.
-
- [BZ #21269]
- * sysdeps/unix/sysv/linux/i386/Makefile (tests): Add tst-bz21269.
- * sysdeps/unix/sysv/linux/i386/sigaction.c (SET_SA_RESTORER): Clear
- sa_restorer for vDSO case.
- * sysdeps/unix/sysv/linux/i386/tst-bz21269.c: New file.
-
-(cherry picked from commit 68448be208ee06e76665918b37b0a57e3e00c8b4)
-
-diff --git a/sysdeps/unix/sysv/linux/i386/Makefile b/sysdeps/unix/sysv/linux/i386/Makefile
-index 4080b8c966..da716e2c1b 100644
---- a/sysdeps/unix/sysv/linux/i386/Makefile
-+++ b/sysdeps/unix/sysv/linux/i386/Makefile
-@@ -3,6 +3,9 @@ default-abi := 32
-
- ifeq ($(subdir),misc)
- sysdep_routines += ioperm iopl vm86
-+
-+tests += tst-bz21269
-+$(objpfx)tst-bz21269: $(shared-thread-library)
- endif
-
- ifeq ($(subdir),elf)
-diff --git a/sysdeps/unix/sysv/linux/i386/sigaction.c b/sysdeps/unix/sysv/linux/i386/sigaction.c
-index a5eb9e0d3e..177ff60ee6 100644
---- a/sysdeps/unix/sysv/linux/i386/sigaction.c
-+++ b/sysdeps/unix/sysv/linux/i386/sigaction.c
-@@ -42,7 +42,6 @@ extern void restore_rt (void) asm ("__restore_rt") attribute_hidden;
- #endif
- extern void restore (void) asm ("__restore") attribute_hidden;
-
--
- /* If ACT is not NULL, change the action for SIG to *ACT.
- If OACT is not NULL, put the old action for SIG in *OACT. */
- int
-@@ -65,6 +64,8 @@ __libc_sigaction (int sig, const struct sigaction *act, struct sigaction *oact)
- kact.sa_restorer = ((act->sa_flags & SA_SIGINFO)
- ? &restore_rt : &restore);
- }
-+ else
-+ kact.sa_restorer = NULL;
- }
-
- /* XXX The size argument hopefully will have to be changed to the
-diff --git a/sysdeps/unix/sysv/linux/i386/tst-bz21269.c b/sysdeps/unix/sysv/linux/i386/tst-bz21269.c
-new file mode 100644
-index 0000000000..353e36507d
---- /dev/null
-+++ b/sysdeps/unix/sysv/linux/i386/tst-bz21269.c
-@@ -0,0 +1,233 @@
-+/* Test for i386 sigaction sa_restorer handling (BZ#21269)
-+ Copyright (C) 2017 Free Software Foundation, Inc.
-+ This file is part of the GNU C Library.
-+
-+ The GNU C Library is free software; you can redistribute it and/or
-+ modify it under the terms of the GNU Lesser General Public
-+ License as published by the Free Software Foundation; either
-+ version 2.1 of the License, or (at your option) any later version.
-+
-+ The GNU C Library is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-+ Lesser General Public License for more details.
-+
-+ You should have received a copy of the GNU Lesser General Public
-+ License along with the GNU C Library; if not, see
-+ <http://www.gnu.org/licenses/>. */
-+
-+/* This is based on Linux test tools/testing/selftests/x86/ldt_gdt.c,
-+ more specifically in do_multicpu_tests function. The main changes
-+ are:
-+
-+ - C11 atomics instead of plain access.
-+ - Remove x86_64 support which simplifies the syscall handling
-+ and fallbacks.
-+ - Replicate only the test required to trigger the issue for the
-+ BZ#21269. */
-+
-+#include <stdatomic.h>
-+
-+#include <asm/ldt.h>
-+#include <linux/futex.h>
-+
-+#include <setjmp.h>
-+#include <signal.h>
-+#include <errno.h>
-+#include <sys/syscall.h>
-+#include <sys/mman.h>
-+
-+#include <support/xunistd.h>
-+#include <support/check.h>
-+#include <support/xthread.h>
-+
-+static int
-+xset_thread_area (struct user_desc *u_info)
-+{
-+ long ret = syscall (SYS_set_thread_area, u_info);
-+ TEST_VERIFY_EXIT (ret == 0);
-+ return ret;
-+}
-+
-+static void
-+xmodify_ldt (int func, const void *ptr, unsigned long bytecount)
-+{
-+ TEST_VERIFY_EXIT (syscall (SYS_modify_ldt, 1, ptr, bytecount) == 0);
-+}
-+
-+static int
-+futex (int *uaddr, int futex_op, int val, void *timeout, int *uaddr2,
-+ int val3)
-+{
-+ return syscall (SYS_futex, uaddr, futex_op, val, timeout, uaddr2, val3);
-+}
-+
-+static void
-+xsethandler (int sig, void (*handler)(int, siginfo_t *, void *), int flags)
-+{
-+ struct sigaction sa = { 0 };
-+ sa.sa_sigaction = handler;
-+ sa.sa_flags = SA_SIGINFO | flags;
-+ TEST_VERIFY_EXIT (sigemptyset (&sa.sa_mask) == 0);
-+ TEST_VERIFY_EXIT (sigaction (sig, &sa, 0) == 0);
-+}
-+
-+static jmp_buf jmpbuf;
-+
-+static void
-+sigsegv_handler (int sig, siginfo_t *info, void *ctx_void)
-+{
-+ siglongjmp (jmpbuf, 1);
-+}
-+
-+/* Points to an array of 1024 ints, each holding its own index. */
-+static const unsigned int *counter_page;
-+static struct user_desc *low_user_desc;
-+static struct user_desc *low_user_desc_clear; /* Used to delete GDT entry. */
-+static int gdt_entry_num;
-+
-+static void
-+setup_counter_page (void)
-+{
-+ long page_size = sysconf (_SC_PAGE_SIZE);
-+ TEST_VERIFY_EXIT (page_size > 0);
-+ unsigned int *page = xmmap (NULL, page_size, PROT_READ | PROT_WRITE,
-+ MAP_ANONYMOUS | MAP_PRIVATE | MAP_32BIT, -1);
-+ for (int i = 0; i < (page_size / sizeof (unsigned int)); i++)
-+ page[i] = i;
-+ counter_page = page;
-+}
-+
-+static void
-+setup_low_user_desc (void)
-+{
-+ low_user_desc = xmmap (NULL, 2 * sizeof (struct user_desc),
-+ PROT_READ | PROT_WRITE,
-+ MAP_ANONYMOUS | MAP_PRIVATE | MAP_32BIT, -1);
-+
-+ low_user_desc->entry_number = -1;
-+ low_user_desc->base_addr = (unsigned long) &counter_page[1];
-+ low_user_desc->limit = 0xffff;
-+ low_user_desc->seg_32bit = 1;
-+ low_user_desc->contents = 0;
-+ low_user_desc->read_exec_only = 0;
-+ low_user_desc->limit_in_pages = 1;
-+ low_user_desc->seg_not_present = 0;
-+ low_user_desc->useable = 0;
-+
-+ xset_thread_area (low_user_desc);
-+
-+ low_user_desc_clear = low_user_desc + 1;
-+ low_user_desc_clear->entry_number = gdt_entry_num;
-+ low_user_desc_clear->read_exec_only = 1;
-+ low_user_desc_clear->seg_not_present = 1;
-+}
-+
-+/* Possible values of futex:
-+ 0: thread is idle.
-+ 1: thread armed.
-+ 2: thread should clear LDT entry 0.
-+ 3: thread should exit. */
-+static atomic_uint ftx;
-+
-+static void *
-+threadproc (void *ctx)
-+{
-+ while (1)
-+ {
-+ futex ((int *) &ftx, FUTEX_WAIT, 1, NULL, NULL, 0);
-+ while (atomic_load (&ftx) != 2)
-+ {
-+ if (atomic_load (&ftx) >= 3)
-+ return NULL;
-+ }
-+
-+ /* clear LDT entry 0. */
-+ const struct user_desc desc = { 0 };
-+ xmodify_ldt (1, &desc, sizeof (desc));
-+
-+ /* If ftx == 2, set it to zero, If ftx == 100, quit. */
-+ if (atomic_fetch_add (&ftx, -2) != 2)
-+ return NULL;
-+ }
-+}
-+
-+
-+/* As described in testcase, for historical reasons x86_32 Linux (and compat
-+ on x86_64) interprets SA_RESTORER clear with nonzero sa_restorer as a
-+ request for stack switching if the SS segment is 'funny' (this is default
-+ scenario for vDSO system). This means that anything that tries to mix
-+ signal handling with segmentation should explicit clear the sa_restorer.
-+
-+ This testcase check if sigaction in fact does it by changing the local
-+ descriptor table (LDT) through the modify_ldt syscall and triggering
-+ a synchronous segfault on iret fault by trying to install an invalid
-+ segment. With a correct zeroed sa_restorer it should not trigger an
-+ 'real' SEGSEGV and allows the siglongjmp in signal handler. */
-+
-+static int
-+do_test (void)
-+{
-+ setup_counter_page ();
-+ setup_low_user_desc ();
-+
-+ pthread_t thread;
-+ unsigned short orig_ss;
-+
-+ xsethandler (SIGSEGV, sigsegv_handler, 0);
-+ /* 32-bit kernels send SIGILL instead of SIGSEGV on IRET faults. */
-+ xsethandler (SIGILL, sigsegv_handler, 0);
-+
-+ thread = xpthread_create (0, threadproc, 0);
-+
-+ asm volatile ("mov %%ss, %0" : "=rm" (orig_ss));
-+
-+ for (int i = 0; i < 5; i++)
-+ {
-+ if (sigsetjmp (jmpbuf, 1) != 0)
-+ continue;
-+
-+ /* Make sure the thread is ready after the last test. */
-+ while (atomic_load (&ftx) != 0)
-+ ;
-+
-+ struct user_desc desc = {
-+ .entry_number = 0,
-+ .base_addr = 0,
-+ .limit = 0xffff,
-+ .seg_32bit = 1,
-+ .contents = 0,
-+ .read_exec_only = 0,
-+ .limit_in_pages = 1,
-+ .seg_not_present = 0,
-+ .useable = 0
-+ };
-+
-+ xmodify_ldt (0x11, &desc, sizeof (desc));
-+
-+ /* Arm the thread. */
-+ ftx = 1;
-+ futex ((int*) &ftx, FUTEX_WAKE, 0, NULL, NULL, 0);
-+
-+ asm volatile ("mov %0, %%ss" : : "r" (0x7));
-+
-+ /* Fire up thread modify_ldt call. */
-+ atomic_store (&ftx, 2);
-+
-+ while (atomic_load (&ftx) != 0)
-+ ;
-+
-+ /* On success, modify_ldt will segfault us synchronously and we will
-+ escape via siglongjmp. */
-+ support_record_failure ();
-+ }
-+
-+ atomic_store (&ftx, 100);
-+ futex ((int*) &ftx, FUTEX_WAKE, 0, NULL, NULL, 0);
-+
-+ xpthread_join (thread);
-+
-+ return 0;
-+}
-+
-+#include <support/test-driver.c>
-
-From 55ad82e45c313454de657931898e974a7a036cad Mon Sep 17 00:00:00 2001
-From: Andrew Senkevich <andrew.n.senkevich@gmail.com>
-Date: Fri, 23 Mar 2018 16:19:45 +0100
-Subject: [PATCH] Fix i386 memmove issue (bug 22644).
-
- [BZ #22644]
- * sysdeps/i386/i686/multiarch/memcpy-sse2-unaligned.S: Fixed
- branch conditions.
- * string/test-memmove.c (do_test2): New testcase.
-
-(cherry picked from commit cd66c0e584c6d692bc8347b5e72723d02b8a8ada)
-
-diff --git a/string/test-memmove.c b/string/test-memmove.c
-index edc7a4c3bf..64e3651ba4 100644
---- a/string/test-memmove.c
-+++ b/string/test-memmove.c
-@@ -24,6 +24,7 @@
- # define TEST_NAME "memmove"
- #endif
- #include "test-string.h"
-+#include <support/test-driver.h>
-
- char *simple_memmove (char *, const char *, size_t);
-
-@@ -245,6 +246,60 @@ do_random_tests (void)
- }
- }
-
-+static void
-+do_test2 (void)
-+{
-+ size_t size = 0x20000000;
-+ uint32_t * large_buf;
-+
-+ large_buf = mmap ((void*) 0x70000000, size, PROT_READ | PROT_WRITE,
-+ MAP_PRIVATE | MAP_ANON, -1, 0);
-+
-+ if (large_buf == MAP_FAILED)
-+ error (EXIT_UNSUPPORTED, errno, "Large mmap failed");
-+
-+ if ((uintptr_t) large_buf > 0x80000000 - 128
-+ || 0x80000000 - (uintptr_t) large_buf > 0x20000000)
-+ {
-+ error (0, 0, "Large mmap allocated improperly");
-+ ret = EXIT_UNSUPPORTED;
-+ munmap ((void *) large_buf, size);
-+ return;
-+ }
-+
-+ size_t bytes_move = 0x80000000 - (uintptr_t) large_buf;
-+ size_t arr_size = bytes_move / sizeof (uint32_t);
-+ size_t i;
-+
-+ FOR_EACH_IMPL (impl, 0)
-+ {
-+ for (i = 0; i < arr_size; i++)
-+ large_buf[i] = (uint32_t) i;
-+
-+ uint32_t * dst = &large_buf[33];
-+
-+#ifdef TEST_BCOPY
-+ CALL (impl, (char *) large_buf, (char *) dst, bytes_move);
-+#else
-+ CALL (impl, (char *) dst, (char *) large_buf, bytes_move);
-+#endif
-+
-+ for (i = 0; i < arr_size; i++)
-+ {
-+ if (dst[i] != (uint32_t) i)
-+ {
-+ error (0, 0,
-+ "Wrong result in function %s dst \"%p\" src \"%p\" offset \"%zd\"",
-+ impl->name, dst, large_buf, i);
-+ ret = 1;
-+ break;
-+ }
-+ }
-+ }
-+
-+ munmap ((void *) large_buf, size);
-+}
-+
- int
- test_main (void)
- {
-@@ -284,6 +339,9 @@ test_main (void)
- }
-
- do_random_tests ();
-+
-+ do_test2 ();
-+
- return ret;
- }
-
-diff --git a/sysdeps/i386/i686/multiarch/memcpy-sse2-unaligned.S b/sysdeps/i386/i686/multiarch/memcpy-sse2-unaligned.S
-index 9c3bbe7e17..9aa17de99c 100644
---- a/sysdeps/i386/i686/multiarch/memcpy-sse2-unaligned.S
-+++ b/sysdeps/i386/i686/multiarch/memcpy-sse2-unaligned.S
-@@ -72,7 +72,7 @@ ENTRY (MEMCPY)
- cmp %edx, %eax
-
- # ifdef USE_AS_MEMMOVE
-- jg L(check_forward)
-+ ja L(check_forward)
-
- L(mm_len_0_or_more_backward):
- /* Now do checks for lengths. We do [0..16], [16..32], [32..64], [64..128]
-@@ -81,7 +81,7 @@ L(mm_len_0_or_more_backward):
- jbe L(mm_len_0_16_bytes_backward)
-
- cmpl $32, %ecx
-- jg L(mm_len_32_or_more_backward)
-+ ja L(mm_len_32_or_more_backward)
-
- /* Copy [0..32] and return. */
- movdqu (%eax), %xmm0
-@@ -92,7 +92,7 @@ L(mm_len_0_or_more_backward):
-
- L(mm_len_32_or_more_backward):
- cmpl $64, %ecx
-- jg L(mm_len_64_or_more_backward)
-+ ja L(mm_len_64_or_more_backward)
-
- /* Copy [0..64] and return. */
- movdqu (%eax), %xmm0
-@@ -107,7 +107,7 @@ L(mm_len_32_or_more_backward):
-
- L(mm_len_64_or_more_backward):
- cmpl $128, %ecx
-- jg L(mm_len_128_or_more_backward)
-+ ja L(mm_len_128_or_more_backward)
-
- /* Copy [0..128] and return. */
- movdqu (%eax), %xmm0
-@@ -132,7 +132,7 @@ L(mm_len_128_or_more_backward):
- add %ecx, %eax
- cmp %edx, %eax
- movl SRC(%esp), %eax
-- jle L(forward)
-+ jbe L(forward)
- PUSH (%esi)
- PUSH (%edi)
- PUSH (%ebx)
-@@ -269,7 +269,7 @@ L(check_forward):
- add %edx, %ecx
- cmp %eax, %ecx
- movl LEN(%esp), %ecx
-- jle L(forward)
-+ jbe L(forward)
-
- /* Now do checks for lengths. We do [0..16], [0..32], [0..64], [0..128]
- separately. */
diff --git a/gnu/packages/patches/glibc-2.27-supported-locales.patch b/gnu/packages/patches/glibc-2.27-supported-locales.patch
deleted file mode 100644
index 2888052bb8..0000000000
--- a/gnu/packages/patches/glibc-2.27-supported-locales.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-This patch is taken from debian's glibc package (generate-supported.mk).
-It install the localedata/SUPPORTED file of the glibc. This file lists
-all the supported locales of the glibc.
-
-diff --git a/localedata/Makefile.old b/localedata/Makefile
-index 34877c0..a61d9b9 100644
---- a/localedata/Makefile.old
-+++ b/localedata/Makefile
-@@ -91,7 +91,8 @@ endif
- # Files to install.
- install-others := $(addprefix $(inst_i18ndir)/, \
- $(addsuffix .gz, $(charmaps)) \
-- $(locales))
-+ $(locales)) \
-+ $(inst_i18ndir)/SUPPORTED
-
- tests: $(objdir)/iconvdata/gconv-modules
-
-@@ -195,6 +196,14 @@ endif
-
- include SUPPORTED
-
-+$(inst_i18ndir)/SUPPORTED: SUPPORTED $(+force)
-+ for locale in $(SUPPORTED-LOCALES); do \
-+ [ $$locale = true ] && continue; \
-+ echo $$locale | sed 's,/, ,' >> LOCALES; \
-+ done
-+ $(make-target-directory)
-+ $(INSTALL_DATA) LOCALES $@
-+
- INSTALL-SUPPORTED-LOCALES=$(addprefix install-, $(SUPPORTED-LOCALES))
-
- # Sometimes the whole collection of locale files should be installed.
diff --git a/gnu/packages/patches/glibc-2.28-git-fixes.patch b/gnu/packages/patches/glibc-2.28-git-fixes.patch
deleted file mode 100644
index 7e370ef0b1..0000000000
--- a/gnu/packages/patches/glibc-2.28-git-fixes.patch
+++ /dev/null
@@ -1,248 +0,0 @@
-This file contains fixes from the "release/2.28/master" branch:
-https://sourceware.org/git/?p=glibc.git;a=shortlog;h=refs/heads/release/2.28/master
-
-Currently we have these commits (sans tests and ChangeLog updates):
-7f11842e7483da7aa9fa3031be122021978ef600
-726e1554ce4db5e35af41cb0110c54c5e1232054
-4b25485f03158959cff45379eecc1d73c7dcdd11
-d05b05d1570ba3ae354a2f5a3cfeefb373b09979
-bfcfa22589f2b4277a65e60c6b736b6bbfbd87d0
-2f498f3d140ab5152bd784df2be7af7d9c5e63ed
-
-diff --git a/htl/Versions b/htl/Versions
-index 6a63a1b8a1..c5a616da10 100644
---- a/htl/Versions
-+++ b/htl/Versions
-@@ -150,6 +150,8 @@ libpthread {
- __cthread_keycreate;
- __cthread_getspecific;
- __cthread_setspecific;
-+ __pthread_getspecific;
-+ __pthread_setspecific;
- __pthread_getattr_np;
- __pthread_attr_getstack;
- }
-
-diff --git a/sysdeps/htl/pt-getspecific.c b/sysdeps/htl/pt-getspecific.c
-index a0227a67f6..64ddf9551a 100644
---- a/sysdeps/htl/pt-getspecific.c
-+++ b/sysdeps/htl/pt-getspecific.c
-@@ -36,3 +36,4 @@ __pthread_getspecific (pthread_key_t key)
- return self->thread_specifics[key];
- }
- strong_alias (__pthread_getspecific, pthread_getspecific);
-+hidden_def (__pthread_getspecific)
-diff --git a/sysdeps/htl/pt-setspecific.c b/sysdeps/htl/pt-setspecific.c
-index a46a12f157..02aff417ef 100644
---- a/sysdeps/htl/pt-setspecific.c
-+++ b/sysdeps/htl/pt-setspecific.c
-@@ -48,3 +48,4 @@ __pthread_setspecific (pthread_key_t key, const void *value)
- return 0;
- }
- strong_alias (__pthread_setspecific, pthread_setspecific);
-+hidden_def (__pthread_setspecific)
-diff --git a/sysdeps/htl/pthreadP.h b/sysdeps/htl/pthreadP.h
-index 132ac1718e..71c2fcd9c6 100644
---- a/sysdeps/htl/pthreadP.h
-+++ b/sysdeps/htl/pthreadP.h
-@@ -68,6 +68,8 @@ struct __pthread_cancelation_handler **___pthread_get_cleanup_stack (void) attri
-
- #if IS_IN (libpthread)
- hidden_proto (__pthread_key_create)
-+hidden_proto (__pthread_getspecific)
-+hidden_proto (__pthread_setspecific)
- hidden_proto (_pthread_mutex_init)
- #endif
-
-diff --git a/sysdeps/unix/sysv/linux/getdents64.c b/sysdeps/unix/sysv/linux/getdents64.c
-index 3bde0cf4f0..bc140b5a7f 100644
---- a/sysdeps/unix/sysv/linux/getdents64.c
-+++ b/sysdeps/unix/sysv/linux/getdents64.c
-@@ -33,41 +33,80 @@ strong_alias (__getdents64, __getdents)
- # include <shlib-compat.h>
-
- # if SHLIB_COMPAT(libc, GLIBC_2_1, GLIBC_2_2)
--# include <olddirent.h>
-+# include <olddirent.h>
-+# include <unistd.h>
-
--/* kernel definition of as of 3.2. */
--struct compat_linux_dirent
-+static ssize_t
-+handle_overflow (int fd, __off64_t offset, ssize_t count)
- {
-- /* Both d_ino and d_off are compat_ulong_t which are defined in all
-- architectures as 'u32'. */
-- uint32_t d_ino;
-- uint32_t d_off;
-- unsigned short d_reclen;
-- char d_name[1];
--};
-+ /* If this is the first entry in the buffer, we can report the
-+ error. */
-+ if (count == 0)
-+ {
-+ __set_errno (EOVERFLOW);
-+ return -1;
-+ }
-+
-+ /* Otherwise, seek to the overflowing entry, so that the next call
-+ will report the error, and return the data read so far.. */
-+ if (__lseek64 (fd, offset, SEEK_SET) != 0)
-+ return -1;
-+ return count;
-+}
-
- ssize_t
- __old_getdents64 (int fd, char *buf, size_t nbytes)
- {
-- ssize_t retval = INLINE_SYSCALL_CALL (getdents, fd, buf, nbytes);
-+ /* We do not move the individual directory entries. This is only
-+ possible if the target type (struct __old_dirent64) is smaller
-+ than the source type. */
-+ _Static_assert (offsetof (struct __old_dirent64, d_name)
-+ <= offsetof (struct dirent64, d_name),
-+ "__old_dirent64 is larger than dirent64");
-+ _Static_assert (__alignof__ (struct __old_dirent64)
-+ <= __alignof__ (struct dirent64),
-+ "alignment of __old_dirent64 is larger than dirent64");
-
-- /* The kernel added the d_type value after the name. Change this now. */
-- if (retval != -1)
-+ ssize_t retval = INLINE_SYSCALL_CALL (getdents64, fd, buf, nbytes);
-+ if (retval > 0)
- {
-- union
-- {
-- struct compat_linux_dirent k;
-- struct dirent u;
-- } *kbuf = (void *) buf;
--
-- while ((char *) kbuf < buf + retval)
-+ char *p = buf;
-+ char *end = buf + retval;
-+ while (p < end)
- {
-- char d_type = *((char *) kbuf + kbuf->k.d_reclen - 1);
-- memmove (kbuf->u.d_name, kbuf->k.d_name,
-- strlen (kbuf->k.d_name) + 1);
-- kbuf->u.d_type = d_type;
-+ struct dirent64 *source = (struct dirent64 *) p;
-+
-+ /* Copy out the fixed-size data. */
-+ __ino_t ino = source->d_ino;
-+ __off64_t offset = source->d_off;
-+ unsigned int reclen = source->d_reclen;
-+ unsigned char type = source->d_type;
-+
-+ /* Check for ino_t overflow. */
-+ if (__glibc_unlikely (ino != source->d_ino))
-+ return handle_overflow (fd, offset, p - buf);
-+
-+ /* Convert to the target layout. Use a separate struct and
-+ memcpy to side-step aliasing issues. */
-+ struct __old_dirent64 result;
-+ result.d_ino = ino;
-+ result.d_off = offset;
-+ result.d_reclen = reclen;
-+ result.d_type = type;
-+
-+ /* Write the fixed-sized part of the result to the
-+ buffer. */
-+ size_t result_name_offset = offsetof (struct __old_dirent64, d_name);
-+ memcpy (p, &result, result_name_offset);
-+
-+ /* Adjust the position of the name if necessary. Copy
-+ everything until the end of the record, including the
-+ terminating NUL byte. */
-+ if (result_name_offset != offsetof (struct dirent64, d_name))
-+ memmove (p + result_name_offset, source->d_name,
-+ reclen - offsetof (struct dirent64, d_name));
-
-- kbuf = (void *) ((char *) kbuf + kbuf->k.d_reclen);
-+ p += reclen;
- }
- }
- return retval;
-
-diff --git a/misc/error.c b/misc/error.c
-index b4e8b6c938..03378e2f2a 100644
---- a/misc/error.c
-+++ b/misc/error.c
-@@ -319,6 +319,7 @@ error (int status, int errnum, const char *message, ...)
-
- va_start (args, message);
- error_tail (status, errnum, message, args);
-+ va_end (args);
-
- #ifdef _LIBC
- _IO_funlockfile (stderr);
-@@ -390,6 +391,7 @@ error_at_line (int status, int errnum, const char *file_name,
-
- va_start (args, message);
- error_tail (status, errnum, message, args);
-+ va_end (args);
-
- #ifdef _LIBC
- _IO_funlockfile (stderr);
-
-diff --git a/nscd/nscd_conf.c b/nscd/nscd_conf.c
-index 265a02434d..7293b795b6 100644
---- a/nscd/nscd_conf.c
-+++ b/nscd/nscd_conf.c
-@@ -190,7 +190,10 @@ nscd_parse_file (const char *fname, struct database_dyn dbs[lastdb])
- if (!arg1)
- error (0, 0, _("Must specify user name for server-user option"));
- else
-- server_user = xstrdup (arg1);
-+ {
-+ free ((char *) server_user);
-+ server_user = xstrdup (arg1);
-+ }
- }
- else if (strcmp (entry, "stat-user") == 0)
- {
-@@ -198,6 +201,7 @@ nscd_parse_file (const char *fname, struct database_dyn dbs[lastdb])
- error (0, 0, _("Must specify user name for stat-user option"));
- else
- {
-+ free ((char *) stat_user);
- stat_user = xstrdup (arg1);
-
- struct passwd *pw = getpwnam (stat_user);
-
-diff --git a/nss/nss_files/files-alias.c b/nss/nss_files/files-alias.c
-index cfd34b66b9..35b0bfc5d2 100644
---- a/nss/nss_files/files-alias.c
-+++ b/nss/nss_files/files-alias.c
-@@ -221,6 +221,13 @@ get_next_alias (FILE *stream, const char *match, struct aliasent *result,
- {
- while (! feof_unlocked (listfile))
- {
-+ if (room_left < 2)
-+ {
-+ free (old_line);
-+ fclose (listfile);
-+ goto no_more_room;
-+ }
-+
- first_unused[room_left - 1] = '\xff';
- line = fgets_unlocked (first_unused, room_left,
- listfile);
-@@ -229,6 +236,7 @@ get_next_alias (FILE *stream, const char *match, struct aliasent *result,
- if (first_unused[room_left - 1] != '\xff')
- {
- free (old_line);
-+ fclose (listfile);
- goto no_more_room;
- }
-
-@@ -256,6 +264,7 @@ get_next_alias (FILE *stream, const char *match, struct aliasent *result,
- + __alignof__ (char *)))
- {
- free (old_line);
-+ fclose (listfile);
- goto no_more_room;
- }
- room_left -= ((first_unused - cp)
-
diff --git a/gnu/packages/patches/glibc-2.28-supported-locales.patch b/gnu/packages/patches/glibc-2.28-supported-locales.patch
deleted file mode 100644
index 2888052bb8..0000000000
--- a/gnu/packages/patches/glibc-2.28-supported-locales.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-This patch is taken from debian's glibc package (generate-supported.mk).
-It install the localedata/SUPPORTED file of the glibc. This file lists
-all the supported locales of the glibc.
-
-diff --git a/localedata/Makefile.old b/localedata/Makefile
-index 34877c0..a61d9b9 100644
---- a/localedata/Makefile.old
-+++ b/localedata/Makefile
-@@ -91,7 +91,8 @@ endif
- # Files to install.
- install-others := $(addprefix $(inst_i18ndir)/, \
- $(addsuffix .gz, $(charmaps)) \
-- $(locales))
-+ $(locales)) \
-+ $(inst_i18ndir)/SUPPORTED
-
- tests: $(objdir)/iconvdata/gconv-modules
-
-@@ -195,6 +196,14 @@ endif
-
- include SUPPORTED
-
-+$(inst_i18ndir)/SUPPORTED: SUPPORTED $(+force)
-+ for locale in $(SUPPORTED-LOCALES); do \
-+ [ $$locale = true ] && continue; \
-+ echo $$locale | sed 's,/, ,' >> LOCALES; \
-+ done
-+ $(make-target-directory)
-+ $(INSTALL_DATA) LOCALES $@
-+
- INSTALL-SUPPORTED-LOCALES=$(addprefix install-, $(SUPPORTED-LOCALES))
-
- # Sometimes the whole collection of locale files should be installed.
diff --git a/gnu/packages/patches/glibc-2.31-hurd-clock_gettime_monotonic.patch b/gnu/packages/patches/glibc-2.31-hurd-clock_gettime_monotonic.patch
new file mode 100644
index 0000000000..1c3fe427f9
--- /dev/null
+++ b/gnu/packages/patches/glibc-2.31-hurd-clock_gettime_monotonic.patch
@@ -0,0 +1,84 @@
+This is needed to run Python on the Hurd, especially during the build of
+python-boot0.
+
+Adapted from https://salsa.debian.org/glibc-team/glibc/-/blob/glibc-2.31/debian/patches/hurd-i386/unsubmitted-clock_t_centiseconds.diff
+
+Use the realtime clock for the monotonic clock. This is of course not a proper
+implementation (which is being done in Mach), but will permit to fix at least
+the iceweasel stack.
+
+vlc however doesn't build when _POSIX_CLOCK_SELECTION is enabled but
+_POSIX_TIMERS is not, and they refuse to fix that (see #765578), so disable the
+former.
+
+From 0aa1dfd580cf9ad7b812c307b128decb782b825f Mon Sep 17 00:00:00 2001
+From: Jan Nieuwenhuizen <janneke@gnu.org>
+Date: Mon, 2 Mar 2020 18:59:04 +0100
+Subject: [PATCH 2/2] Use realtime clock for the monotonic clock.
+
+---
+ sysdeps/mach/clock_gettime.c | 2 +-
+ sysdeps/mach/hurd/bits/posix_opt.h | 6 +++---
+ sysdeps/posix/clock_getres.c | 1 +
+ sysdeps/pthread/timer_create.c | 2 +-
+ 4 files changed, 6 insertions(+), 5 deletions(-)
+
+diff --git a/sysdeps/mach/clock_gettime.c b/sysdeps/mach/clock_gettime.c
+index ac3547df3c..af8681ba4e 100644
+--- a/sysdeps/mach/clock_gettime.c
++++ b/sysdeps/mach/clock_gettime.c
+@@ -25,7 +25,7 @@
+ int
+ __clock_gettime (clockid_t clock_id, struct timespec *ts)
+ {
+- if (clock_id != CLOCK_REALTIME)
++ if (clock_id != CLOCK_MONOTONIC && clock_id != CLOCK_REALTIME)
+ {
+ errno = EINVAL;
+ return -1;
+diff --git a/sysdeps/mach/hurd/bits/posix_opt.h b/sysdeps/mach/hurd/bits/posix_opt.h
+index 0050151332..27b3a28ab7 100644
+--- a/sysdeps/mach/hurd/bits/posix_opt.h
++++ b/sysdeps/mach/hurd/bits/posix_opt.h
+@@ -163,10 +163,10 @@
+ #define _POSIX_THREAD_PROCESS_SHARED -1
+
+ /* The monotonic clock might be available. */
+-#define _POSIX_MONOTONIC_CLOCK 0
++#define _POSIX_MONOTONIC_CLOCK 200809L
+
+-/* The clock selection interfaces are available. */
+-#define _POSIX_CLOCK_SELECTION 200809L
++/* The clock selection interfaces are not really available yet. */
++#define _POSIX_CLOCK_SELECTION -1
+
+ /* Advisory information interfaces could be available in future. */
+ #define _POSIX_ADVISORY_INFO 0
+diff --git a/sysdeps/posix/clock_getres.c b/sysdeps/posix/clock_getres.c
+index fcd79fd554..1dd02aa449 100644
+--- a/sysdeps/posix/clock_getres.c
++++ b/sysdeps/posix/clock_getres.c
+@@ -52,6 +52,7 @@ __clock_getres (clockid_t clock_id, struct timespec *res)
+ switch (clock_id)
+ {
+ case CLOCK_REALTIME:
++ case CLOCK_MONOTONIC:
+ retval = realtime_getres (res);
+ break;
+
+diff --git a/sysdeps/pthread/timer_create.c b/sysdeps/pthread/timer_create.c
+index 9d8a9ea8ae..3430582c09 100644
+--- a/sysdeps/pthread/timer_create.c
++++ b/sysdeps/pthread/timer_create.c
+@@ -48,7 +48,7 @@ timer_create (clockid_t clock_id, struct sigevent *evp, timer_t *timerid)
+ return -1;
+ }
+
+- if (clock_id != CLOCK_REALTIME)
++ if (clock_id != CLOCK_REALTIME && clock_id != CLOCK_MONOTONIC)
+ {
+ __set_errno (EINVAL);
+ return -1;
+--
+2.24.0
+
diff --git a/gnu/packages/patches/glibc-bootstrap-system.patch b/gnu/packages/patches/glibc-bootstrap-system.patch
index db6457e939..9c0fac3ff5 100644
--- a/gnu/packages/patches/glibc-bootstrap-system.patch
+++ b/gnu/packages/patches/glibc-bootstrap-system.patch
@@ -3,17 +3,10 @@ and popen(3) need to be tweaked to use the right shell. For the bootstrap
glibc, we just use whatever `sh' can be found in $PATH. The final glibc
instead uses the hard-coded absolute file name of `bash'.
---- a/sysdeps/posix/system.c
-+++ b/sysdeps/posix/system.c
-@@ -140,7 +140,7 @@ do_system (const char *line)
- __posix_spawnattr_setflags (&spawn_attr,
- POSIX_SPAWN_SETSIGDEF | POSIX_SPAWN_SETSIGMASK);
-
-- status = __posix_spawn (&pid, SHELL_PATH, 0, &spawn_attr,
-+ status = __posix_spawnp (&pid, SHELL_NAME, 0, &spawn_attr,
- (char *const[]){ (char*) SHELL_NAME,
- (char*) "-c",
- (char *) line, NULL },
+In addition, status should be initialized to 0 and not -1.
+
+diff --git a/libio/iopopen.c b/libio/iopopen.c
+index ebc381ed7c..e0d3ed1bc3 100644
--- a/libio/iopopen.c
+++ b/libio/iopopen.c
@@ -85,7 +85,7 @@ spawn_process (posix_spawn_file_actions_t *fa, FILE *fp, const char *command,
@@ -25,6 +18,28 @@ instead uses the hard-coded absolute file name of `bash'.
(char *const[]){ (char*) "sh", (char*) "-c",
(char *) command, NULL }, __environ) != 0)
return false;
+diff --git a/sysdeps/posix/system.c b/sysdeps/posix/system.c
+index a03f478fc7..94da6facf3 100644
+--- a/sysdeps/posix/system.c
++++ b/sysdeps/posix/system.c
+@@ -101,7 +101,7 @@ cancel_handler (void *arg)
+ static int
+ do_system (const char *line)
+ {
+- int status = -1;
++ int status = 0;
+ int ret;
+ pid_t pid;
+ struct sigaction sa;
+@@ -145,7 +145,7 @@ do_system (const char *line)
+ __posix_spawnattr_setflags (&spawn_attr,
+ POSIX_SPAWN_SETSIGDEF | POSIX_SPAWN_SETSIGMASK);
+
+- ret = __posix_spawn (&pid, SHELL_PATH, 0, &spawn_attr,
++ ret = __posix_spawnp (&pid, SHELL_NAME, 0, &spawn_attr,
+ (char *const[]){ (char *) SHELL_NAME,
+ (char *) "-c",
+ (char *) line, NULL },
--- a/include/spawn.h
+++ b/include/spawn.h
diff --git a/gnu/packages/patches/glibc-cross-objcopy.patch b/gnu/packages/patches/glibc-cross-objcopy.patch
new file mode 100644
index 0000000000..e4c693aa44
--- /dev/null
+++ b/gnu/packages/patches/glibc-cross-objcopy.patch
@@ -0,0 +1,159 @@
+Use 'powerpc64le-linux-gnu-objcopy' rather than 'objcopy' when cross-compiling
+to powerpc64le-linux-gnu: <https://issues.guix.gnu.org/49417>.
+
+Patch submitted:
+ <https://sourceware.org/pipermail/libc-alpha/2021-July/128333.html>
+
+diff --git a/aclocal.m4 b/aclocal.m4
+index 13a791ffde..5b370c07a2 100644
+--- a/aclocal.m4
++++ b/aclocal.m4
+@@ -118,8 +118,6 @@ AS=`$CC -print-prog-name=as`
+ LD=`$CC -print-prog-name=ld`
+ AR=`$CC -print-prog-name=ar`
+ AC_SUBST(AR)
+-OBJCOPY=`$CC -print-prog-name=objcopy`
+-AC_SUBST(OBJCOPY)
+ GPROF=`$CC -print-prog-name=gprof`
+ AC_SUBST(GPROF)
+
+diff --git a/configure b/configure
+index fe0eda1cd5..3a08270734 100755
+--- a/configure
++++ b/configure
+@@ -654,7 +654,6 @@ MAKE
+ LD
+ AS
+ GPROF
+-OBJCOPY
+ AR
+ LN_S
+ INSTALL_DATA
+@@ -689,6 +688,7 @@ sysheaders
+ ac_ct_CXX
+ CXXFLAGS
+ CXX
++OBJCOPY
+ OBJDUMP
+ READELF
+ CPP
+@@ -3054,6 +3054,98 @@ else
+ OBJDUMP="$ac_cv_prog_OBJDUMP"
+ fi
+
++if test -n "$ac_tool_prefix"; then
++ # Extract the first word of "${ac_tool_prefix}objcopy", so it can be a program name with args.
++set dummy ${ac_tool_prefix}objcopy; ac_word=$2
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
++$as_echo_n "checking for $ac_word... " >&6; }
++if ${ac_cv_prog_OBJCOPY+:} false; then :
++ $as_echo_n "(cached) " >&6
++else
++ if test -n "$OBJCOPY"; then
++ ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
++else
++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++for as_dir in $PATH
++do
++ IFS=$as_save_IFS
++ test -z "$as_dir" && as_dir=.
++ for ac_exec_ext in '' $ac_executable_extensions; do
++ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
++ ac_cv_prog_OBJCOPY="${ac_tool_prefix}objcopy"
++ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
++ break 2
++ fi
++done
++ done
++IFS=$as_save_IFS
++
++fi
++fi
++OBJCOPY=$ac_cv_prog_OBJCOPY
++if test -n "$OBJCOPY"; then
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
++$as_echo "$OBJCOPY" >&6; }
++else
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++fi
++
++
++fi
++if test -z "$ac_cv_prog_OBJCOPY"; then
++ ac_ct_OBJCOPY=$OBJCOPY
++ # Extract the first word of "objcopy", so it can be a program name with args.
++set dummy objcopy; ac_word=$2
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
++$as_echo_n "checking for $ac_word... " >&6; }
++if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
++ $as_echo_n "(cached) " >&6
++else
++ if test -n "$ac_ct_OBJCOPY"; then
++ ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
++else
++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++for as_dir in $PATH
++do
++ IFS=$as_save_IFS
++ test -z "$as_dir" && as_dir=.
++ for ac_exec_ext in '' $ac_executable_extensions; do
++ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
++ ac_cv_prog_ac_ct_OBJCOPY="objcopy"
++ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
++ break 2
++ fi
++done
++ done
++IFS=$as_save_IFS
++
++fi
++fi
++ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
++if test -n "$ac_ct_OBJCOPY"; then
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
++$as_echo "$ac_ct_OBJCOPY" >&6; }
++else
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++fi
++
++ if test "x$ac_ct_OBJCOPY" = x; then
++ OBJCOPY="false"
++ else
++ case $cross_compiling:$ac_tool_warned in
++yes:)
++{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
++$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
++ac_tool_warned=yes ;;
++esac
++ OBJCOPY=$ac_ct_OBJCOPY
++ fi
++else
++ OBJCOPY="$ac_cv_prog_OBJCOPY"
++fi
++
+
+ # We need the C++ compiler only for testing.
+ ac_ext=cpp
+@@ -4645,8 +4737,6 @@ AS=`$CC -print-prog-name=as`
+ LD=`$CC -print-prog-name=ld`
+ AR=`$CC -print-prog-name=ar`
+
+-OBJCOPY=`$CC -print-prog-name=objcopy`
+-
+ GPROF=`$CC -print-prog-name=gprof`
+
+
+diff --git a/configure.ac b/configure.ac
+index 924af12738..2148cd2ec8 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -53,6 +53,7 @@ AC_SUBST(cross_compiling)
+ AC_PROG_CPP
+ AC_CHECK_TOOL(READELF, readelf, false)
+ AC_CHECK_TOOL(OBJDUMP, objdump, false)
++AC_CHECK_TOOL(OBJCOPY, objcopy, false)
+
+ # We need the C++ compiler only for testing.
+ AC_PROG_CXX
diff --git a/gnu/packages/patches/glibc-cross-objdump.patch b/gnu/packages/patches/glibc-cross-objdump.patch
new file mode 100644
index 0000000000..1660d915f7
--- /dev/null
+++ b/gnu/packages/patches/glibc-cross-objdump.patch
@@ -0,0 +1,159 @@
+Arrange so that glibc uses 'TRIPLET-objdump -f' rather than 'objdump -f'
+to determine the 'OUTPUT_FORMAT' value in libc.so when cross-compiling.
+
+Patch submitted upstream:
+ <https://sourceware.org/pipermail/libc-alpha/2021-July/128333.html>.
+
+diff --git a/aclocal.m4 b/aclocal.m4
+index c195c4db56..13a791ffde 100644
+--- a/aclocal.m4
++++ b/aclocal.m4
+@@ -118,8 +118,6 @@ AS=`$CC -print-prog-name=as`
+ LD=`$CC -print-prog-name=ld`
+ AR=`$CC -print-prog-name=ar`
+ AC_SUBST(AR)
+-OBJDUMP=`$CC -print-prog-name=objdump`
+-AC_SUBST(OBJDUMP)
+ OBJCOPY=`$CC -print-prog-name=objcopy`
+ AC_SUBST(OBJCOPY)
+ GPROF=`$CC -print-prog-name=gprof`
+diff --git a/configure b/configure
+index 9619c10991..fe0eda1cd5 100755
+--- a/configure
++++ b/configure
+@@ -655,7 +655,6 @@ LD
+ AS
+ GPROF
+ OBJCOPY
+-OBJDUMP
+ AR
+ LN_S
+ INSTALL_DATA
+@@ -690,6 +689,7 @@ sysheaders
+ ac_ct_CXX
+ CXXFLAGS
+ CXX
++OBJDUMP
+ READELF
+ CPP
+ cross_compiling
+@@ -2962,6 +2962,98 @@ else
+ READELF="$ac_cv_prog_READELF"
+ fi
+
++if test -n "$ac_tool_prefix"; then
++ # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
++set dummy ${ac_tool_prefix}objdump; ac_word=$2
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
++$as_echo_n "checking for $ac_word... " >&6; }
++if ${ac_cv_prog_OBJDUMP+:} false; then :
++ $as_echo_n "(cached) " >&6
++else
++ if test -n "$OBJDUMP"; then
++ ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
++else
++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++for as_dir in $PATH
++do
++ IFS=$as_save_IFS
++ test -z "$as_dir" && as_dir=.
++ for ac_exec_ext in '' $ac_executable_extensions; do
++ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
++ ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
++ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
++ break 2
++ fi
++done
++ done
++IFS=$as_save_IFS
++
++fi
++fi
++OBJDUMP=$ac_cv_prog_OBJDUMP
++if test -n "$OBJDUMP"; then
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
++$as_echo "$OBJDUMP" >&6; }
++else
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++fi
++
++
++fi
++if test -z "$ac_cv_prog_OBJDUMP"; then
++ ac_ct_OBJDUMP=$OBJDUMP
++ # Extract the first word of "objdump", so it can be a program name with args.
++set dummy objdump; ac_word=$2
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
++$as_echo_n "checking for $ac_word... " >&6; }
++if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
++ $as_echo_n "(cached) " >&6
++else
++ if test -n "$ac_ct_OBJDUMP"; then
++ ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
++else
++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++for as_dir in $PATH
++do
++ IFS=$as_save_IFS
++ test -z "$as_dir" && as_dir=.
++ for ac_exec_ext in '' $ac_executable_extensions; do
++ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
++ ac_cv_prog_ac_ct_OBJDUMP="objdump"
++ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
++ break 2
++ fi
++done
++ done
++IFS=$as_save_IFS
++
++fi
++fi
++ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
++if test -n "$ac_ct_OBJDUMP"; then
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
++$as_echo "$ac_ct_OBJDUMP" >&6; }
++else
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++fi
++
++ if test "x$ac_ct_OBJDUMP" = x; then
++ OBJDUMP="false"
++ else
++ case $cross_compiling:$ac_tool_warned in
++yes:)
++{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
++$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
++ac_tool_warned=yes ;;
++esac
++ OBJDUMP=$ac_ct_OBJDUMP
++ fi
++else
++ OBJDUMP="$ac_cv_prog_OBJDUMP"
++fi
++
+
+ # We need the C++ compiler only for testing.
+ ac_ext=cpp
+@@ -4553,8 +4645,6 @@ AS=`$CC -print-prog-name=as`
+ LD=`$CC -print-prog-name=ld`
+ AR=`$CC -print-prog-name=ar`
+
+-OBJDUMP=`$CC -print-prog-name=objdump`
+-
+ OBJCOPY=`$CC -print-prog-name=objcopy`
+
+ GPROF=`$CC -print-prog-name=gprof`
+diff --git a/configure.ac b/configure.ac
+index 34ecbba540..924af12738 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -52,6 +52,7 @@ fi
+ AC_SUBST(cross_compiling)
+ AC_PROG_CPP
+ AC_CHECK_TOOL(READELF, readelf, false)
++AC_CHECK_TOOL(OBJDUMP, objdump, false)
+
+ # We need the C++ compiler only for testing.
+ AC_PROG_CXX
diff --git a/gnu/packages/patches/glibc-dl-cache.patch b/gnu/packages/patches/glibc-dl-cache.patch
new file mode 100644
index 0000000000..68c3a94846
--- /dev/null
+++ b/gnu/packages/patches/glibc-dl-cache.patch
@@ -0,0 +1,140 @@
+Read the shared library cache relative to $ORIGIN instead of reading
+from /etc/ld.so.cache. Also arrange so that this cache takes
+precedence over RUNPATH.
+
+diff --git a/elf/dl-cache.c b/elf/dl-cache.c
+index 93d185e788..e0760a1f40 100644
+--- a/elf/dl-cache.c
++++ b/elf/dl-cache.c
+@@ -171,6 +171,51 @@ _dl_cache_libcmp (const char *p1, const char *p2)
+ return *p1 - *p2;
+ }
+
++/* Special value representing the lack of an ld.so cache. */
++static const char ld_so_cache_lacking[] = "/ld.so cache is lacking";
++
++/* Return the per-application ld.so cache, relative to $ORIGIN, or NULL if
++ that fails for some reason. Do not return the system-wide LD_SO_CACHE
++ since on a foreign distro it would contain invalid information. */
++static const char *
++ld_so_cache (void)
++{
++ static const char *loader_cache;
++
++ if (loader_cache == NULL)
++ {
++ static const char store[] = @STORE_DIRECTORY@;
++ const char *origin = _dl_get_origin ();
++
++ /* Check whether ORIGIN is something like "/gnu/store/…-foo/bin". */
++ if (strncmp (store, origin, strlen (store)) == 0
++ && origin[sizeof store - 1] == '/')
++ {
++ char *store_item_end = strchr (origin + sizeof store, '/');
++
++ if (store_item_end != NULL)
++ {
++ static const char suffix[] = "/etc/ld.so.cache";
++ size_t store_item_len = store_item_end - origin;
++
++ /* Note: We can't use 'malloc' because it can be interposed.
++ Likewise, 'strncpy' is not available. */
++ char *cache = alloca (strlen (origin) + sizeof suffix);
++
++ strcpy (cache, origin);
++ strcpy (cache + store_item_len, suffix);
++
++ loader_cache = __strdup (cache) ?: ld_so_cache_lacking;
++ }
++ else
++ loader_cache = ld_so_cache_lacking;
++ }
++ else
++ loader_cache = ld_so_cache_lacking;
++ }
++
++ return loader_cache;
++}
+
+ /* Look up NAME in ld.so.cache and return the file name stored there, or null
+ if none is found. The cache is loaded if it was not already. If loading
+@@ -190,12 +235,15 @@ _dl_load_cache_lookup (const char *name)
+
+ /* Print a message if the loading of libs is traced. */
+ if (__glibc_unlikely (GLRO(dl_debug_mask) & DL_DEBUG_LIBS))
+- _dl_debug_printf (" search cache=%s\n", LD_SO_CACHE);
++ _dl_debug_printf (" search cache=%s\n", ld_so_cache ());
++
++ if (__glibc_unlikely (ld_so_cache () == ld_so_cache_lacking))
++ return NULL;
+
+ if (cache == NULL)
+ {
+ /* Read the contents of the file. */
+- void *file = _dl_sysdep_read_whole_file (LD_SO_CACHE, &cachesize,
++ void *file = _dl_sysdep_read_whole_file (ld_so_cache (), &cachesize,
+ PROT_READ);
+
+ /* We can handle three different cache file formats here:
+diff --git a/elf/dl-load.c b/elf/dl-load.c
+index f3201e7c14..a69aec3428 100644
+--- a/elf/dl-load.c
++++ b/elf/dl-load.c
+@@ -2152,28 +2152,6 @@ _dl_map_object (struct link_map *loader, const char *name,
+ loader ?: GL(dl_ns)[LM_ID_BASE]._ns_loaded,
+ LA_SER_LIBPATH, &found_other_class);
+
+- /* Look at the RUNPATH information for this binary. */
+- if (fd == -1 && loader != NULL
+- && cache_rpath (loader, &loader->l_runpath_dirs,
+- DT_RUNPATH, "RUNPATH"))
+- fd = open_path (name, namelen, mode,
+- &loader->l_runpath_dirs, &realname, &fb, loader,
+- LA_SER_RUNPATH, &found_other_class);
+-
+- if (fd == -1)
+- {
+- realname = _dl_sysdep_open_object (name, namelen, &fd);
+- if (realname != NULL)
+- {
+- fd = open_verify (realname, fd,
+- &fb, loader ?: GL(dl_ns)[nsid]._ns_loaded,
+- LA_SER_CONFIG, mode, &found_other_class,
+- false);
+- if (fd == -1)
+- free (realname);
+- }
+- }
+-
+ #ifdef USE_LDCONFIG
+ if (fd == -1
+ && (__glibc_likely ((mode & __RTLD_SECURE) == 0)
+@@ -2232,6 +2210,28 @@ _dl_map_object (struct link_map *loader, const char *name,
+ }
+ #endif
+
++ /* Look at the RUNPATH information for this binary. */
++ if (fd == -1 && loader != NULL
++ && cache_rpath (loader, &loader->l_runpath_dirs,
++ DT_RUNPATH, "RUNPATH"))
++ fd = open_path (name, namelen, mode,
++ &loader->l_runpath_dirs, &realname, &fb, loader,
++ LA_SER_RUNPATH, &found_other_class);
++
++ if (fd == -1)
++ {
++ realname = _dl_sysdep_open_object (name, namelen, &fd);
++ if (realname != NULL)
++ {
++ fd = open_verify (realname, fd,
++ &fb, loader ?: GL(dl_ns)[nsid]._ns_loaded,
++ LA_SER_CONFIG, mode, &found_other_class,
++ false);
++ if (fd == -1)
++ free (realname);
++ }
++ }
++
+ /* Finally, try the default path. */
+ if (fd == -1
+ && ((l = loader ?: GL(dl_ns)[nsid]._ns_loaded) == NULL
diff --git a/gnu/packages/patches/glibc-hurd-clock_gettime_monotonic.patch b/gnu/packages/patches/glibc-hurd-clock_gettime_monotonic.patch
index 1c3fe427f9..e31f99a1ce 100644
--- a/gnu/packages/patches/glibc-hurd-clock_gettime_monotonic.patch
+++ b/gnu/packages/patches/glibc-hurd-clock_gettime_monotonic.patch
@@ -24,18 +24,17 @@ Subject: [PATCH 2/2] Use realtime clock for the monotonic clock.
4 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/sysdeps/mach/clock_gettime.c b/sysdeps/mach/clock_gettime.c
-index ac3547df3c..af8681ba4e 100644
+index 6862fc8c..be1449bf 100644
--- a/sysdeps/mach/clock_gettime.c
+++ b/sysdeps/mach/clock_gettime.c
-@@ -25,7 +25,7 @@
- int
- __clock_gettime (clockid_t clock_id, struct timespec *ts)
- {
-- if (clock_id != CLOCK_REALTIME)
-+ if (clock_id != CLOCK_MONOTONIC && clock_id != CLOCK_REALTIME)
- {
- errno = EINVAL;
- return -1;
+@@ -32,6 +32,7 @@ __clock_gettime (clockid_t clock_id, struct timespec *ts)
+ switch (clock_id) {
+
+ case CLOCK_REALTIME:
++ case CLOCK_MONOTONIC:
+ {
+ /* __host_get_time can only fail if passed an invalid host_t.
+ __mach_host_self could theoretically fail (producing an
diff --git a/sysdeps/mach/hurd/bits/posix_opt.h b/sysdeps/mach/hurd/bits/posix_opt.h
index 0050151332..27b3a28ab7 100644
--- a/sysdeps/mach/hurd/bits/posix_opt.h
diff --git a/gnu/packages/patches/glibc-skip-c++.patch b/gnu/packages/patches/glibc-skip-c++.patch
new file mode 100644
index 0000000000..b2cbe76d3b
--- /dev/null
+++ b/gnu/packages/patches/glibc-skip-c++.patch
@@ -0,0 +1,31 @@
+When building, say, glibc 2.31 using a compiler that's itself linked
+against 2.33, linking fails with:
+
+ gcc -Wl,-rpath-link=/tmp/guix-build-glibc-2.31.drv-0/build:/tmp/guix-build-glibc-2.31.drv-0/build/math:/tmp/guix-build-glibc-2.31.drv-0/build/elf:/tmp/guix-build-glibc-2.31.drv-0/build/dlfcn:/tmp/guix-build-glibc-2.31.drv-0/build/nss:/tmp/guix-build-glibc-2.31.drv-0/build/nis:/tmp/guix-build-glibc-2.31.drv-0/build/rt:/tmp/guix-build-glibc-2.31.drv-0/build/resolv:/tmp/guix-build-glibc-2.31.drv-0/build/mathvec:/tmp/guix-build-glibc-2.31.drv-0/build/support:/tmp/guix-build-glibc-2.31.drv-0/build/crypt:/tmp/guix-build-glibc-2.31.drv-0/build/nptl -nostdlib -nostartfiles -o /tmp/guix-build-glibc-2.31.drv-0/build/support/links-dso-program -Wl,-z,combreloc -Wl,-z,relro -Wl,--hash-style=both /tmp/guix-build-glibc-2.31.drv-0/build/csu/crt1.o /tmp/guix-build-glibc-2.31.drv-0/build/csu/crti.o `gcc --print-file-name=crtbegin.o` /tmp/guix-build-glibc-2.31.drv-0/build/support/links-dso-program.o -lstdc++ -lgcc -lgcc_s -Wl,-dynamic-linker=/gnu/store/...-glibc-2.31/lib/ld-linux-x86-64.so.2 /tmp/guix-build-glibc-2.31.drv-0/build/libc.so.6 /tmp/guix-build-glibc-2.31.drv-0/build/libc_nonshared.a -Wl,--as-needed /tmp/guix-build-glibc-2.31.drv-0/build/elf/ld.so -Wl,--no-as-needed -lgcc `gcc --print-file-name=crtend.o` /tmp/guix-build-glibc-2.31.drv-0/build/csu/crtn.o
+ ld: /gnu/store/...-gcc-10.3.0-lib/lib/gcc/x86_64-unknown-linux-gnu/10.3.0/../../../libstdc++.so: undefined reference to `fstat64@GLIBC_2.33'
+ ld: /gnu/store/...-gcc-10.3.0-lib/lib/gcc/x86_64-unknown-linux-gnu/10.3.0/../../../libstdc++.so: undefined reference to `lstat@GLIBC_2.33'
+ ld: /gnu/store/...-gcc-10.3.0-lib/lib/gcc/x86_64-unknown-linux-gnu/10.3.0/../../../libstdc++.so: undefined reference to `stat@GLIBC_2.33'
+ collect2: error: ld returned 1 exit status
+
+This is unsurprising given that libstdc++.so here is linked against 2.33,
+whereas libc.so.6 here is 2.31.
+
+This patch works around it by not building the offending program.
+
+diff --git a/support/Makefile b/support/Makefile
+index bb9889ef..6614943b 100644
+--- a/support/Makefile
++++ b/support/Makefile
+@@ -210,12 +210,7 @@ CFLAGS-support_paths.c = \
+ # -fexcess-precision=standard.
+ CFLAGS-timespec.c += -fexcess-precision=standard
+
+-ifeq (,$(CXX))
+ LINKS_DSO_PROGRAM = links-dso-program-c
+-else
+-LINKS_DSO_PROGRAM = links-dso-program
+-LDLIBS-links-dso-program = -lstdc++ -lgcc -lgcc_s $(libunwind)
+-endif
+
+ ifeq (yes,$(have-selinux))
+ LDLIBS-$(LINKS_DSO_PROGRAM) += -lselinux
diff --git a/gnu/packages/patches/glibc-static-nss.patch b/gnu/packages/patches/glibc-static-nss.patch
new file mode 100644
index 0000000000..1a9db616cc
--- /dev/null
+++ b/gnu/packages/patches/glibc-static-nss.patch
@@ -0,0 +1,1244 @@
+This patch reinstates support for static NSS, which glibc 2.33 broke:
+
+ https://sourceware.org/bugzilla/show_bug.cgi?id=27959
+
+Patch obtained by running:
+
+ git diff f0c28504a9877be5da3ed1215f2da2d5914bbb0b..f9c8b11ed7726b858cd7b7cea0d3d7c5233d78cf
+ git diff 5e1ce61e3e71fb7ffe53f58fe96e67cb15f94854{^,}
+ git diff 135425a1dd50cbe2b9db0628d6c2b36c7889f30b{^,}
+
+It corresponds to these changes:
+
+ f9c8b11ed7 * nss: Access nss_files through direct references
+ 6212bb67f4 * nss_files: Move into libc
+ 36861a968a * nss_files: Add generic code for set*ent, end*ent and file open
+ f0c28504a9 * nss_files: Allocate nscd file registration data on the heap
+ 5e1ce61e3e * nss: Fix NSS_DECLARE_MODULE_FUNCTIONS handling of _nss_*_endnetgrent
+ 135425a1dd * nss: Fix build error with --disable-nscd
+
+... plus a manual fix in 'files-network.c' to address this compilation error:
+
+ nss_files/files-network.c: In function ‘_nss_files_parse_netent’:
+ nss_files/files-network.c:72:20: error: implicit declaration of function ‘__inet_network’; did you mean ‘inet_network’? [-Werror=implicit-function-declaration]
+ 72 | result->n_net = __inet_network (addr);
+ | ^~~~~~~~~~~~~~
+ nss_files/files-parse.c:106:3: note: in definition of macro ‘LINE_PARSER’
+ 106 | BODY; \
+ | ^~~~
+
+diff --git a/include/libc-symbols.h b/include/libc-symbols.h
+index 127ea656c2..d41ecf4384 100644
+--- a/include/libc-symbols.h
++++ b/include/libc-symbols.h
+@@ -798,29 +798,6 @@ for linking")
+ # define libdl_hidden_data_ver(local, name)
+ #endif
+
+-#if IS_IN (libnss_files)
+-# define libnss_files_hidden_proto(name, attrs...) hidden_proto (name, ##attrs)
+-# define libnss_files_hidden_tls_proto(name, attrs...) \
+- hidden_tls_proto (name, ##attrs)
+-# define libnss_files_hidden_def(name) hidden_def (name)
+-# define libnss_files_hidden_weak(name) hidden_weak (name)
+-# define libnss_files_hidden_ver(local, name) hidden_ver (local, name)
+-# define libnss_files_hidden_data_def(name) hidden_data_def (name)
+-# define libnss_files_hidden_tls_def(name) hidden_tls_def (name)
+-# define libnss_files_hidden_data_weak(name) hidden_data_weak (name)
+-# define libnss_files_hidden_data_ver(local, name) hidden_data_ver(local, name)
+-#else
+-# define libnss_files_hidden_proto(name, attrs...)
+-# define libnss_files_hidden_tls_proto(name, attrs...)
+-# define libnss_files_hidden_def(name)
+-# define libnss_files_hidden_weak(name)
+-# define libnss_files_hidden_ver(local, name)
+-# define libnss_files_hidden_data_def(name)
+-# define libnss_files_hidden_tls_def(name)
+-# define libnss_files_hidden_data_weak(name)
+-# define libnss_files_hidden_data_ver(local, name)
+-#endif
+-
+ #if IS_IN (libnsl)
+ # define libnsl_hidden_proto(name, attrs...) hidden_proto (name, ##attrs)
+ # define libnsl_hidden_tls_proto(name, attrs...) \
+diff --git a/include/netdb.h b/include/netdb.h
+index 82e102ff76..4dcdbb8cd4 100644
+--- a/include/netdb.h
++++ b/include/netdb.h
+@@ -217,7 +217,7 @@ extern enum nss_status _nss_netgroup_parseline (char **cursor,
+ struct __netgrent *result,
+ char *buffer, size_t buflen,
+ int *errnop);
+-libnss_files_hidden_proto (_nss_netgroup_parseline)
++libc_hidden_proto (_nss_netgroup_parseline)
+
+ #define DECLARE_NSS_PROTOTYPES(service) \
+ extern enum nss_status _nss_ ## service ## _setprotoent (int); \
+diff --git a/include/nss_files.h b/include/nss_files.h
+index 6a0dcdb85b..6190cac6be 100644
+--- a/include/nss_files.h
++++ b/include/nss_files.h
+@@ -19,7 +19,11 @@
+ #ifndef _NSS_FILES_H
+ #define _NSS_FILES_H
+
++#include <nss.h>
+ #include <stdio.h>
++#if IS_IN (libc)
++#include <libc-lock.h>
++#endif
+
+ /* Open PATH for reading, as a data source for nss_files. */
+ FILE *__nss_files_fopen (const char *path);
+@@ -47,6 +51,63 @@ int __nss_readline_seek (FILE *fp, off64_t offset) attribute_hidden;
+ int __nss_parse_line_result (FILE *fp, off64_t offset, int parse_line_result);
+ libc_hidden_proto (__nss_parse_line_result)
+
++/* Per-file data. Used by the *ent functions that need to preserve
++ state across calls. */
++struct nss_files_per_file_data
++{
++ FILE *stream;
++#if IS_IN (libc)
++ /* The size of locks changes between libc and nss_files, so this
++ member must be last and is only available in libc. */
++ __libc_lock_define (, lock);
++#endif
++};
++
++/* File index for __nss_files_data_get. */
++enum nss_files_file
++ {
++ nss_file_aliasent,
++ nss_file_etherent,
++ nss_file_grent,
++ nss_file_hostent,
++ nss_file_netent,
++ nss_file_protoent,
++ nss_file_pwent,
++ nss_file_rpcent,
++ nss_file_servent,
++ nss_file_sgent,
++ nss_file_spent,
++
++ nss_file_count
++ };
++
++/* Obtains a pointer to the per-file data for FILE, which is written
++ to *PDATA, and tries to open the file at PATH for it. On success,
++ returns NSS_STATUS_SUCCESS, and the caller must later call
++ __nss_files_data_put. On failure, NSS_STATUS_TRYAGAIN is returned,
++ and *ERRNOP and *HERRNOP are updated if these pointers are not
++ null. */
++enum nss_status __nss_files_data_open (struct nss_files_per_file_data **pdata,
++ enum nss_files_file file,
++ const char *path,
++ int *errnop, int *herrnop);
++libc_hidden_proto (__nss_files_data_open)
++
++/* Unlock the per-file data, previously obtained by
++ __nss_files_data_open. */
++void __nss_files_data_put (struct nss_files_per_file_data *data);
++libc_hidden_proto (__nss_files_data_put)
++
++/* Performs the set*ent operation for FILE. PATH is the file to
++ open. */
++enum nss_status __nss_files_data_setent (enum nss_files_file file,
++ const char *path);
++libc_hidden_proto (__nss_files_data_setent)
++
++/* Performs the end*ent operation for FILE. */
++enum nss_status __nss_files_data_endent (enum nss_files_file file);
++libc_hidden_proto (__nss_files_data_endent)
++
+ struct parser_data;
+
+ /* Instances of the parse_line function from
+@@ -64,16 +125,25 @@ extern nss_files_parse_line _nss_files_parse_servent;
+ extern nss_files_parse_line _nss_files_parse_sgent;
+ extern nss_files_parse_line _nss_files_parse_spent;
+
+-libnss_files_hidden_proto (_nss_files_parse_etherent)
++libc_hidden_proto (_nss_files_parse_etherent)
+ libc_hidden_proto (_nss_files_parse_grent)
+-libnss_files_hidden_proto (_nss_files_parse_netent)
+-libnss_files_hidden_proto (_nss_files_parse_protoent)
++libc_hidden_proto (_nss_files_parse_netent)
++libc_hidden_proto (_nss_files_parse_protoent)
+ libc_hidden_proto (_nss_files_parse_pwent)
+-libnss_files_hidden_proto (_nss_files_parse_rpcent)
+-libnss_files_hidden_proto (_nss_files_parse_servent)
++libc_hidden_proto (_nss_files_parse_rpcent)
++libc_hidden_proto (_nss_files_parse_servent)
+ libc_hidden_proto (_nss_files_parse_sgent)
+ libc_hidden_proto (_nss_files_parse_spent)
+
++NSS_DECLARE_MODULE_FUNCTIONS (files)
++#undef DEFINE_NSS_FUNCTION
++#define DEFINE_NSS_FUNCTION(x) libc_hidden_proto (_nss_files_##x)
++#include <nss/function.def>
++#undef DEFINE_NSS_FUNCTION
++
++void _nss_files_init (void (*cb) (size_t, struct traced_file *));
++libc_hidden_proto (_nss_files_init)
++
+ /* Generic implementation of fget*ent_r. Reads lines from FP until
+ EOF or a successful parse into *RESULT using PARSER. Returns 0 on
+ success, ENOENT on EOF, ERANGE on too-small buffer. */
+diff --git a/nss/Makefile b/nss/Makefile
+index 9682a31e20..63a386af18 100644
+--- a/nss/Makefile
++++ b/nss/Makefile
+@@ -31,7 +31,8 @@ routines = nsswitch getnssent getnssent_r digits_dots \
+ compat-lookup nss_hash nss_files_fopen \
+ nss_readline nss_parse_line_result \
+ nss_fgetent_r nss_module nss_action \
+- nss_action_parse nss_database
++ nss_action_parse nss_database nss_files_data \
++ nss_files_functions
+
+ # These are the databases that go through nss dispatch.
+ # Caution: if you add a database here, you must add its real name
+@@ -98,9 +99,11 @@ subdir-dirs = $(services:%=nss_%)
+ vpath %.c $(subdir-dirs) ../locale/programs ../intl
+
+
+-libnss_files-routines := $(addprefix files-, \
+- $(filter-out key, $(databases))) \
+- files-initgroups files-init
++routines += \
++ $(addprefix files-, $(filter-out key, $(databases))) \
++ files-init \
++ files-initgroups \
++ # routines
+
+ libnss_db-dbs := $(addprefix db-,\
+ $(filter-out hosts network key alias,\
+@@ -116,12 +119,9 @@ libnss_compat-routines := $(addprefix compat-,grp pwd spwd initgroups) \
+ install-others += $(inst_vardbdir)/Makefile
+
+ # Build static module into libc if requested
+-libnss_files-inhibit-o = $(filter-out .os,$(object-suffixes))
+ libnss_db-inhibit-o = $(filter-out .os,$(object-suffixes))
+ libnss_compat-inhibit-o = $(filter-out .os,$(object-suffixes))
+ ifeq ($(build-static-nss),yes)
+-routines += $(libnss_files-routines)
+-static-only-routines += $(libnss_files-routines)
+ tests-static += tst-nss-static
+ endif
+ extra-test-objs += nss_test1.os nss_test2.os
+@@ -138,8 +138,6 @@ libnss-libc = $(common-objpfx)linkobj/libc.so
+ # for new links:
+ $(services:%=$(objpfx)libnss_%.so): libc-for-link = $(libnss-libc)
+
+-$(objpfx)libnss_db.so: $(objpfx)libnss_files.so
+-
+ $(libnss_db-dbs:%=$(objpfx)%.c): $(objpfx)db-%.c: nss_files/files-%.c
+ @rm -f $@.new
+ (echo '#define EXTERN_PARSER';\
+diff --git a/nss/Versions b/nss/Versions
+index fdddea104c..e551524aa9 100644
+--- a/nss/Versions
++++ b/nss/Versions
+@@ -19,11 +19,12 @@ libc {
+ __nss_services_lookup2; __nss_next2; __nss_lookup;
+ __nss_hash; __nss_database_get;
+ __nss_files_fopen; __nss_readline; __nss_parse_line_result;
+- }
+-}
++ __nss_files_data_endent;
++ __nss_files_data_open;
++ __nss_files_data_put;
++ __nss_files_data_setent;
+
+-libnss_files {
+- GLIBC_PRIVATE {
++ # Routines formerly in libnss_files.so.2.
+ _nss_files_setaliasent;
+ _nss_files_endaliasent;
+ _nss_files_getaliasbyname_r;
+@@ -109,6 +110,14 @@ libnss_files {
+ }
+ }
+
++libnss_files {
++ GLIBC_PRIVATE {
++ # Keep a version node (with a synthesized local: * directive) so that
++ # __bss_* symbols are hidden on targets that need it.
++ __libnss_files_version_placeholder;
++ }
++}
++
+ libnss_db {
+ GLIBC_PRIVATE {
+ _nss_db_setetherent;
+diff --git a/nss/nss_files/files-XXX.c b/nss/nss_files/files-XXX.c
+index b4b989d9bb..c158a891bd 100644
+--- a/nss/nss_files/files-XXX.c
++++ b/nss/nss_files/files-XXX.c
+@@ -45,10 +45,12 @@
+ # include <netdb.h>
+ # define H_ERRNO_PROTO , int *herrnop
+ # define H_ERRNO_ARG , herrnop
++# define H_ERRNO_ARG_OR_NULL herrnop
+ # define H_ERRNO_SET(val) (*herrnop = (val))
+ #else
+ # define H_ERRNO_PROTO
+ # define H_ERRNO_ARG
++# define H_ERRNO_ARG_OR_NULL NULL
+ # define H_ERRNO_SET(val) ((void) 0)
+ #endif
+
+@@ -58,15 +60,11 @@
+ # define EXTRA_ARGS_VALUE
+ #endif
+
+-/* Locks the static variables in this file. */
+-__libc_lock_define_initialized (static, lock)
+
+ /* Maintenance of the stream open on the database file. For getXXent
+ operations the stream needs to be held open across calls, the other
+ getXXbyYY operations all use their own stream. */
+
+-static FILE *stream;
+-
+ /* Open database file if not already opened. */
+ static enum nss_status
+ internal_setent (FILE **stream)
+@@ -91,42 +89,16 @@ internal_setent (FILE **stream)
+ enum nss_status
+ CONCAT(_nss_files_set,ENTNAME) (int stayopen)
+ {
+- enum nss_status status;
+-
+- __libc_lock_lock (lock);
+-
+- status = internal_setent (&stream);
+-
+- __libc_lock_unlock (lock);
+-
+- return status;
++ return __nss_files_data_setent (CONCAT (nss_file_, ENTNAME), DATAFILE);
+ }
++libc_hidden_def (CONCAT (_nss_files_set,ENTNAME))
+
+-
+-/* Close the database file. */
+-static void
+-internal_endent (FILE **stream)
+-{
+- if (*stream != NULL)
+- {
+- fclose (*stream);
+- *stream = NULL;
+- }
+-}
+-
+-
+-/* Thread-safe, exported version of that. */
+ enum nss_status
+ CONCAT(_nss_files_end,ENTNAME) (void)
+ {
+- __libc_lock_lock (lock);
+-
+- internal_endent (&stream);
+-
+- __libc_lock_unlock (lock);
+-
+- return NSS_STATUS_SUCCESS;
++ return __nss_files_data_endent (CONCAT (nss_file_, ENTNAME));
+ }
++libc_hidden_def (CONCAT (_nss_files_end,ENTNAME))
+
+
+ /* Parsing the database file into `struct STRUCTURE' data structures. */
+@@ -194,28 +166,22 @@ CONCAT(_nss_files_get,ENTNAME_r) (struct STRUCTURE *result, char *buffer,
+ size_t buflen, int *errnop H_ERRNO_PROTO)
+ {
+ /* Return next entry in host file. */
+- enum nss_status status = NSS_STATUS_SUCCESS;
+-
+- __libc_lock_lock (lock);
+
+- /* Be prepared that the set*ent function was not called before. */
+- if (stream == NULL)
+- {
+- int save_errno = errno;
+-
+- status = internal_setent (&stream);
+-
+- __set_errno (save_errno);
+- }
+-
+- if (status == NSS_STATUS_SUCCESS)
+- status = internal_getent (stream, result, buffer, buflen, errnop
+- H_ERRNO_ARG EXTRA_ARGS_VALUE);
++ struct nss_files_per_file_data *data;
++ enum nss_status status = __nss_files_data_open (&data,
++ CONCAT (nss_file_, ENTNAME),
++ DATAFILE,
++ errnop, H_ERRNO_ARG_OR_NULL);
++ if (status != NSS_STATUS_SUCCESS)
++ return status;
+
+- __libc_lock_unlock (lock);
++ status = internal_getent (data->stream, result, buffer, buflen, errnop
++ H_ERRNO_ARG EXTRA_ARGS_VALUE);
+
++ __nss_files_data_put (data);
+ return status;
+ }
++libc_hidden_def (CONCAT (_nss_files_get,ENTNAME_r))
+
+ /* Macro for defining lookup functions for this file-based database.
+
+@@ -248,8 +214,9 @@ _nss_files_get##name##_r (proto, \
+ == NSS_STATUS_SUCCESS) \
+ { break_if_match } \
+ \
+- internal_endent (&stream); \
++ fclose (stream); \
+ } \
+ \
+ return status; \
+-}
++} \
++libc_hidden_def (_nss_files_get##name##_r)
+diff --git a/nss/nss_files/files-alias.c b/nss/nss_files/files-alias.c
+index 30971bfe56..8c6e176ff6 100644
+--- a/nss/nss_files/files-alias.c
++++ b/nss/nss_files/files-alias.c
+@@ -31,18 +31,11 @@
+ #include "nsswitch.h"
+ #include <nss_files.h>
+
+-NSS_DECLARE_MODULE_FUNCTIONS (files)
+-
+-/* Locks the static variables in this file. */
+-__libc_lock_define_initialized (static, lock)
+
+ /* Maintenance of the stream open on the database file. For getXXent
+ operations the stream needs to be held open across calls, the other
+ getXXbyYY operations all use their own stream. */
+
+-static FILE *stream;
+-
+-
+ static enum nss_status
+ internal_setent (FILE **stream)
+ {
+@@ -66,42 +59,16 @@ internal_setent (FILE **stream)
+ enum nss_status
+ _nss_files_setaliasent (void)
+ {
+- enum nss_status status;
+-
+- __libc_lock_lock (lock);
+-
+- status = internal_setent (&stream);
+-
+- __libc_lock_unlock (lock);
+-
+- return status;
++ return __nss_files_data_setent (nss_file_aliasent, "/etc/aliases");
+ }
++libc_hidden_def (_nss_files_setaliasent)
+
+-
+-/* Close the database file. */
+-static void
+-internal_endent (FILE **stream)
+-{
+- if (*stream != NULL)
+- {
+- fclose (*stream);
+- *stream = NULL;
+- }
+-}
+-
+-
+-/* Thread-safe, exported version of that. */
+ enum nss_status
+ _nss_files_endaliasent (void)
+ {
+- __libc_lock_lock (lock);
+-
+- internal_endent (&stream);
+-
+- __libc_lock_unlock (lock);
+-
+- return NSS_STATUS_SUCCESS;
++ return __nss_files_data_endent (nss_file_aliasent);
+ }
++libc_hidden_def (_nss_files_endaliasent)
+
+ /* Parsing the database file into `struct aliasent' data structures. */
+ static enum nss_status
+@@ -131,7 +98,7 @@ get_next_alias (FILE *stream, const char *match, struct aliasent *result,
+ /* Read the first line. It must contain the alias name and
+ possibly some alias names. */
+ first_unused[room_left - 1] = '\xff';
+- line = fgets_unlocked (first_unused, room_left, stream);
++ line = __fgets_unlocked (first_unused, room_left, stream);
+ if (line == NULL)
+ /* Nothing to read. */
+ break;
+@@ -220,7 +187,7 @@ get_next_alias (FILE *stream, const char *match, struct aliasent *result,
+ /* If the file does not exist we simply ignore
+ the statement. */
+ if (listfile != NULL
+- && (old_line = strdup (line)) != NULL)
++ && (old_line = __strdup (line)) != NULL)
+ {
+ while (! feof_unlocked (listfile))
+ {
+@@ -232,8 +199,8 @@ get_next_alias (FILE *stream, const char *match, struct aliasent *result,
+ }
+
+ first_unused[room_left - 1] = '\xff';
+- line = fgets_unlocked (first_unused, room_left,
+- listfile);
++ line = __fgets_unlocked (first_unused, room_left,
++ listfile);
+ if (line == NULL)
+ break;
+ if (first_unused[room_left - 1] != '\xff')
+@@ -335,7 +302,7 @@ get_next_alias (FILE *stream, const char *match, struct aliasent *result,
+ /* The just read character is a white space and so
+ can be ignored. */
+ first_unused[room_left - 1] = '\xff';
+- line = fgets_unlocked (first_unused, room_left, stream);
++ line = __fgets_unlocked (first_unused, room_left, stream);
+ if (line == NULL)
+ {
+ /* Continuation line without any data and
+@@ -369,29 +336,25 @@ _nss_files_getaliasent_r (struct aliasent *result, char *buffer, size_t buflen,
+ int *errnop)
+ {
+ /* Return next entry in host file. */
+- enum nss_status status = NSS_STATUS_SUCCESS;
+
+- __libc_lock_lock (lock);
+-
+- /* Be prepared that the set*ent function was not called before. */
+- if (stream == NULL)
+- status = internal_setent (&stream);
+-
+- if (status == NSS_STATUS_SUCCESS)
+- {
+- result->alias_local = 1;
++ struct nss_files_per_file_data *data;
++ enum nss_status status = __nss_files_data_open (&data, nss_file_aliasent,
++ "/etc/aliases", errnop, NULL);
++ if (status != NSS_STATUS_SUCCESS)
++ return status;
+
+- /* Read lines until we get a definite result. */
+- do
+- status = get_next_alias (stream, NULL, result, buffer, buflen, errnop);
+- while (status == NSS_STATUS_RETURN);
+- }
++ result->alias_local = 1;
+
+- __libc_lock_unlock (lock);
++ /* Read lines until we get a definite result. */
++ do
++ status = get_next_alias (data->stream, NULL, result, buffer, buflen,
++ errnop);
++ while (status == NSS_STATUS_RETURN);
+
++ __nss_files_data_put (data);
+ return status;
+ }
+-
++libc_hidden_def (_nss_files_getaliasent_r)
+
+ enum nss_status
+ _nss_files_getaliasbyname_r (const char *name, struct aliasent *result,
+@@ -418,9 +381,10 @@ _nss_files_getaliasbyname_r (const char *name, struct aliasent *result,
+ do
+ status = get_next_alias (stream, name, result, buffer, buflen, errnop);
+ while (status == NSS_STATUS_RETURN);
+- }
+
+- internal_endent (&stream);
++ fclose (stream);
++ }
+
+ return status;
+ }
++libc_hidden_def (_nss_files_getaliasbyname_r)
+diff --git a/nss/nss_files/files-ethers.c b/nss/nss_files/files-ethers.c
+index 2fe7f81e4b..7c2c2b9833 100644
+--- a/nss/nss_files/files-ethers.c
++++ b/nss/nss_files/files-ethers.c
+@@ -20,8 +20,6 @@
+ #include <netinet/if_ether.h>
+ #include <nss.h>
+
+-NSS_DECLARE_MODULE_FUNCTIONS (files)
+-
+ struct etherent_data {};
+
+ #define ENTNAME etherent
+diff --git a/nss/nss_files/files-grp.c b/nss/nss_files/files-grp.c
+index 49be38e8b1..a716d948e2 100644
+--- a/nss/nss_files/files-grp.c
++++ b/nss/nss_files/files-grp.c
+@@ -19,8 +19,6 @@
+ #include <grp.h>
+ #include <nss.h>
+
+-NSS_DECLARE_MODULE_FUNCTIONS (files)
+-
+ #define STRUCTURE group
+ #define ENTNAME grent
+ #define DATABASE "group"
+diff --git a/nss/nss_files/files-hosts.c b/nss/nss_files/files-hosts.c
+index 2b47ec3e53..d54d91d038 100644
+--- a/nss/nss_files/files-hosts.c
++++ b/nss/nss_files/files-hosts.c
+@@ -26,8 +26,6 @@
+ #include <alloc_buffer.h>
+ #include <nss.h>
+
+-NSS_DECLARE_MODULE_FUNCTIONS (files)
+-
+ /* Get implementation for some internal functions. */
+ #include "../resolv/res_hconf.h"
+
+@@ -57,12 +55,13 @@ LINE_PARSER
+ STRING_FIELD (addr, isspace, 1);
+
+ /* Parse address. */
+- if (inet_pton (af == AF_UNSPEC ? AF_INET : af, addr, entdata->host_addr)
++ if (__inet_pton (af == AF_UNSPEC ? AF_INET : af, addr, entdata->host_addr)
+ > 0)
+ af = af == AF_UNSPEC ? AF_INET : af;
+ else
+ {
+- if (af == AF_INET && inet_pton (AF_INET6, addr, entdata->host_addr) > 0)
++ if (af == AF_INET
++ && __inet_pton (AF_INET6, addr, entdata->host_addr) > 0)
+ {
+ if (IN6_IS_ADDR_V4MAPPED (entdata->host_addr))
+ memcpy (entdata->host_addr, entdata->host_addr + 12, INADDRSZ);
+@@ -76,7 +75,7 @@ LINE_PARSER
+ return 0;
+ }
+ else if (af == AF_UNSPEC
+- && inet_pton (AF_INET6, addr, entdata->host_addr) > 0)
++ && __inet_pton (AF_INET6, addr, entdata->host_addr) > 0)
+ af = AF_INET6;
+ else
+ /* Illegal address: ignore line. */
+@@ -349,7 +348,7 @@ _nss_files_gethostbyname3_r (const char *name, int af, struct hostent *result,
+ status = gethostbyname3_multi
+ (stream, name, af, result, buffer, buflen, errnop, herrnop);
+
+- internal_endent (&stream);
++ fclose (stream);
+ }
+
+ if (canonp && status == NSS_STATUS_SUCCESS)
+@@ -357,6 +356,7 @@ _nss_files_gethostbyname3_r (const char *name, int af, struct hostent *result,
+
+ return status;
+ }
++libc_hidden_def (_nss_files_gethostbyname3_r)
+
+ enum nss_status
+ _nss_files_gethostbyname_r (const char *name, struct hostent *result,
+@@ -366,6 +366,7 @@ _nss_files_gethostbyname_r (const char *name, struct hostent *result,
+ return _nss_files_gethostbyname3_r (name, AF_INET, result, buffer, buflen,
+ errnop, herrnop, NULL, NULL);
+ }
++libc_hidden_def (_nss_files_gethostbyname_r)
+
+ enum nss_status
+ _nss_files_gethostbyname2_r (const char *name, int af, struct hostent *result,
+@@ -375,6 +376,7 @@ _nss_files_gethostbyname2_r (const char *name, int af, struct hostent *result,
+ return _nss_files_gethostbyname3_r (name, af, result, buffer, buflen,
+ errnop, herrnop, NULL, NULL);
+ }
++libc_hidden_def (_nss_files_gethostbyname2_r)
+
+ enum nss_status
+ _nss_files_gethostbyname4_r (const char *name, struct gaih_addrtuple **pat,
+@@ -475,7 +477,7 @@ _nss_files_gethostbyname4_r (const char *name, struct gaih_addrtuple **pat,
+ status = NSS_STATUS_SUCCESS;
+ }
+
+- internal_endent (&stream);
++ fclose (stream);
+ }
+ else if (status == NSS_STATUS_TRYAGAIN)
+ {
+@@ -490,3 +492,4 @@ _nss_files_gethostbyname4_r (const char *name, struct gaih_addrtuple **pat,
+
+ return status;
+ }
++libc_hidden_def (_nss_files_gethostbyname4_r)
+diff --git a/nss/nss_files/files-init.c b/nss/nss_files/files-init.c
+index 717c9fd334..18ed288d04 100644
+--- a/nss/nss_files/files-init.c
++++ b/nss/nss_files/files-init.c
+@@ -21,8 +21,7 @@
+ #include <string.h>
+ #include <nscd/nscd.h>
+ #include <nss.h>
+-
+-NSS_DECLARE_MODULE_FUNCTIONS (files)
++#include <nss_files.h>
+
+ static void
+ register_file (void (*cb) (size_t, struct traced_file *),
+@@ -49,5 +48,6 @@ _nss_files_init (void (*cb) (size_t, struct traced_file *))
+ register_file (cb, servdb, "/etc/services", 0);
+ register_file (cb, netgrdb, "/etc/netgroup", 0);
+ }
++libc_hidden_def (_nss_files_init)
+
+ #endif
+diff --git a/nss/nss_files/files-initgroups.c b/nss/nss_files/files-initgroups.c
+index 6fcea40b55..b44211e50b 100644
+--- a/nss/nss_files/files-initgroups.c
++++ b/nss/nss_files/files-initgroups.c
+@@ -28,8 +28,6 @@
+ #include <nss.h>
+ #include <nss_files.h>
+
+-NSS_DECLARE_MODULE_FUNCTIONS (files)
+-
+ enum nss_status
+ _nss_files_initgroups_dyn (const char *user, gid_t group, long int *start,
+ long int *size, gid_t **groupsp, long int limit,
+@@ -129,3 +127,4 @@ _nss_files_initgroups_dyn (const char *user, gid_t group, long int *start,
+
+ return status == NSS_STATUS_SUCCESS && !any ? NSS_STATUS_NOTFOUND : status;
+ }
++libc_hidden_def (_nss_files_initgroups_dyn)
+diff --git a/nss/nss_files/files-netgrp.c b/nss/nss_files/files-netgrp.c
+index f8c821c2f0..75bfbd9e44 100644
+--- a/nss/nss_files/files-netgrp.c
++++ b/nss/nss_files/files-netgrp.c
+@@ -28,11 +28,9 @@
+ #include "netgroup.h"
+ #include <nss_files.h>
+
+-NSS_DECLARE_MODULE_FUNCTIONS (files)
+-
+ #define DATAFILE "/etc/netgroup"
+
+-libnss_files_hidden_proto (_nss_files_endnetgrent)
++libc_hidden_proto (_nss_files_endnetgrent)
+
+ #define EXPAND(needed) \
+ do \
+@@ -152,7 +150,7 @@ _nss_files_setnetgrent (const char *group, struct __netgrent *result)
+
+ return status;
+ }
+-
++libc_hidden_def (_nss_files_setnetgrent)
+
+ enum nss_status
+ _nss_files_endnetgrent (struct __netgrent *result)
+@@ -164,7 +162,7 @@ _nss_files_endnetgrent (struct __netgrent *result)
+ result->cursor = NULL;
+ return NSS_STATUS_SUCCESS;
+ }
+-libnss_files_hidden_def (_nss_files_endnetgrent)
++libc_hidden_def (_nss_files_endnetgrent)
+
+ static char *
+ strip_whitespace (char *str)
+@@ -279,7 +277,7 @@ _nss_netgroup_parseline (char **cursor, struct __netgrent *result,
+
+ return status;
+ }
+-libnss_files_hidden_def (_nss_netgroup_parseline)
++libc_hidden_def (_nss_netgroup_parseline)
+
+
+ enum nss_status
+@@ -293,3 +291,4 @@ _nss_files_getnetgrent_r (struct __netgrent *result, char *buffer,
+
+ return status;
+ }
++libc_hidden_def (_nss_files_getnetgrent_r)
+diff --git a/nss/nss_files/files-network.c b/nss/nss_files/files-network.c
+index 9cd7d7dc79..217ed78609 100644
+--- a/nss/nss_files/files-network.c
++++ b/nss/nss_files/files-network.c
+@@ -22,8 +22,6 @@
+ #include <stdint.h>
+ #include <nss.h>
+
+-NSS_DECLARE_MODULE_FUNCTIONS (files)
+-
+ #define ENTNAME netent
+ #define DATABASE "networks"
+ #define NEED_H_ERRNO
+@@ -71,7 +69,7 @@ LINE_PARSER
+ *cp = '\0';
+ addr = newp;
+ }
+- result->n_net = inet_network (addr);
++ result->n_net = inet_network (addr);
+ result->n_addrtype = AF_INET;
+
+ })
+diff --git a/nss/nss_files/files-parse.c b/nss/nss_files/files-parse.c
+index 68c51c7cbf..997eac573a 100644
+--- a/nss/nss_files/files-parse.c
++++ b/nss/nss_files/files-parse.c
+@@ -74,13 +74,7 @@ struct parser_data
+ /* Export the line parser function so it can be used in nss_db. */
+ # define parser_stclass /* Global */
+ # define parse_line CONCAT(_nss_files_parse_,ENTNAME)
+-# if IS_IN (libc)
+-/* We are defining one of the functions that actually lives in libc
+- because it is used to implement fget*ent and suchlike. */
+-# define nss_files_parse_hidden_def(name) libc_hidden_def (name)
+-# else
+-# define nss_files_parse_hidden_def(name) libnss_files_hidden_def (name)
+-# endif
++# define nss_files_parse_hidden_def(name) libc_hidden_def (name)
+ #endif
+
+
+diff --git a/nss/nss_files/files-proto.c b/nss/nss_files/files-proto.c
+index 98d082c642..13072692c1 100644
+--- a/nss/nss_files/files-proto.c
++++ b/nss/nss_files/files-proto.c
+@@ -19,8 +19,6 @@
+ #include <netdb.h>
+ #include <nss.h>
+
+-NSS_DECLARE_MODULE_FUNCTIONS (files)
+-
+ #define ENTNAME protoent
+ #define DATABASE "protocols"
+
+diff --git a/nss/nss_files/files-pwd.c b/nss/nss_files/files-pwd.c
+index b04165ddde..5c74c6da9b 100644
+--- a/nss/nss_files/files-pwd.c
++++ b/nss/nss_files/files-pwd.c
+@@ -19,8 +19,6 @@
+ #include <pwd.h>
+ #include <nss.h>
+
+-NSS_DECLARE_MODULE_FUNCTIONS (files)
+-
+ #define STRUCTURE passwd
+ #define ENTNAME pwent
+ #define DATABASE "passwd"
+diff --git a/nss/nss_files/files-rpc.c b/nss/nss_files/files-rpc.c
+index eeb2725d2c..3dea8f18f2 100644
+--- a/nss/nss_files/files-rpc.c
++++ b/nss/nss_files/files-rpc.c
+@@ -19,8 +19,6 @@
+ #include <rpc/netdb.h>
+ #include <nss.h>
+
+-NSS_DECLARE_MODULE_FUNCTIONS (files)
+-
+ #define ENTNAME rpcent
+ #define DATABASE "rpc"
+
+diff --git a/nss/nss_files/files-service.c b/nss/nss_files/files-service.c
+index f4f0985377..a8d83e094e 100644
+--- a/nss/nss_files/files-service.c
++++ b/nss/nss_files/files-service.c
+@@ -20,8 +20,6 @@
+ #include <netdb.h>
+ #include <nss.h>
+
+-NSS_DECLARE_MODULE_FUNCTIONS (files)
+-
+ #define ENTNAME servent
+ #define DATABASE "services"
+
+diff --git a/nss/nss_files/files-sgrp.c b/nss/nss_files/files-sgrp.c
+index 6b1c9eac02..213a408e7b 100644
+--- a/nss/nss_files/files-sgrp.c
++++ b/nss/nss_files/files-sgrp.c
+@@ -19,8 +19,6 @@
+ #include <gshadow.h>
+ #include <nss.h>
+
+-NSS_DECLARE_MODULE_FUNCTIONS (files)
+-
+ #define STRUCTURE sgrp
+ #define ENTNAME sgent
+ #define DATABASE "gshadow"
+diff --git a/nss/nss_files/files-spwd.c b/nss/nss_files/files-spwd.c
+index 976deaf918..d031257a20 100644
+--- a/nss/nss_files/files-spwd.c
++++ b/nss/nss_files/files-spwd.c
+@@ -19,8 +19,6 @@
+ #include <shadow.h>
+ #include <nss.h>
+
+-NSS_DECLARE_MODULE_FUNCTIONS (files)
+-
+ #define STRUCTURE spwd
+ #define ENTNAME spent
+ #define DATABASE "shadow"
+diff --git a/nss/nss_files_data.c b/nss/nss_files_data.c
+new file mode 100644
+index 0000000000..80fbfe5fff
+--- /dev/null
++++ b/nss/nss_files_data.c
+@@ -0,0 +1,161 @@
++/* Returns a pointer to the global nss_files data structure.
++ Copyright (C) 2021 Free Software Foundation, Inc.
++ This file is part of the GNU C Library.
++
++ The GNU C Library is free software; you can redistribute it and/or
++ modify it under the terms of the GNU Lesser General Public
++ License as published by the Free Software Foundation; either
++ version 2.1 of the License, or (at your option) any later version.
++
++ The GNU C Library is distributed in the hope that it will be useful,
++ but WITHOUT ANY WARRANTY; without even the implied warranty of
++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ Lesser General Public License for more details.
++
++ You should have received a copy of the GNU Lesser General Public
++ License along with the GNU C Library; if not, see
++ <https://www.gnu.org/licenses/>. */
++
++#include <nss_files.h>
++
++#include <allocate_once.h>
++#include <errno.h>
++#include <netdb.h>
++#include <nss.h>
++#include <stdlib.h>
++
++/* This collects all per file-data. */
++struct nss_files_data
++{
++ struct nss_files_per_file_data files[nss_file_count];
++};
++
++/* For use with allocate_once. */
++static void *nss_files_global;
++static void *
++nss_files_global_allocate (void *closure)
++{
++ struct nss_files_data *result = malloc (sizeof (*result));
++ if (result != NULL)
++ {
++ for (int i = 0; i < nss_file_count; ++i)
++ {
++ result->files[i].stream = NULL;
++ __libc_lock_init (result->files[i].lock);
++ }
++ }
++ return result;
++}
++/* Like __nss_files_data_open, but does not perform the open call. */
++static enum nss_status
++__nss_files_data_get (struct nss_files_per_file_data **pdata,
++ enum nss_files_file file, int *errnop, int *herrnop)
++{
++ struct nss_files_data *data = allocate_once (&nss_files_global,
++ nss_files_global_allocate,
++ NULL, NULL);
++ if (data == NULL)
++ {
++ if (errnop != NULL)
++ *errnop = errno;
++ if (herrnop != NULL)
++ {
++ __set_h_errno (NETDB_INTERNAL);
++ *herrnop = NETDB_INTERNAL;
++ }
++ return NSS_STATUS_TRYAGAIN;
++ }
++
++ *pdata = &data->files[file];
++ __libc_lock_lock ((*pdata)->lock);
++ return NSS_STATUS_SUCCESS;
++}
++
++/* Helper function for opening the backing file at PATH. */
++static enum nss_status
++__nss_files_data_internal_open (struct nss_files_per_file_data *data,
++ const char *path)
++{
++ enum nss_status status = NSS_STATUS_SUCCESS;
++
++ if (data->stream == NULL)
++ {
++ data->stream = __nss_files_fopen (path);
++
++ if (data->stream == NULL)
++ status = errno == EAGAIN ? NSS_STATUS_TRYAGAIN : NSS_STATUS_UNAVAIL;
++ }
++
++ return status;
++}
++
++
++enum nss_status
++__nss_files_data_open (struct nss_files_per_file_data **pdata,
++ enum nss_files_file file, const char *path,
++ int *errnop, int *herrnop)
++{
++ enum nss_status status = __nss_files_data_get (pdata, file, errnop, herrnop);
++ if (status != NSS_STATUS_SUCCESS)
++ return status;
++
++ /* Be prepared that the set*ent function was not called before. */
++ if ((*pdata)->stream == NULL)
++ {
++ int saved_errno = errno;
++ status = __nss_files_data_internal_open (*pdata, path);
++ __set_errno (saved_errno);
++ if (status != NSS_STATUS_SUCCESS)
++ __nss_files_data_put (*pdata);
++ }
++
++ return status;
++}
++
++libc_hidden_def (__nss_files_data_open)
++
++void
++__nss_files_data_put (struct nss_files_per_file_data *data)
++{
++ __libc_lock_unlock (data->lock);
++}
++libc_hidden_def (__nss_files_data_put)
++
++enum nss_status
++__nss_files_data_setent (enum nss_files_file file, const char *path)
++{
++ struct nss_files_per_file_data *data;
++ enum nss_status status = __nss_files_data_get (&data, file, NULL, NULL);
++ if (status != NSS_STATUS_SUCCESS)
++ return status;
++
++ if (data->stream == NULL)
++ status = __nss_files_data_internal_open (data, path);
++ else
++ rewind (data->stream);
++
++ __nss_files_data_put (data);
++ return status;
++}
++libc_hidden_def (__nss_files_data_setent)
++
++enum nss_status
++__nss_files_data_endent (enum nss_files_file file)
++{
++ /* No cleanup is necessary if not initialized. */
++ struct nss_files_data *data = atomic_load_acquire (&nss_files_global);
++ if (data == NULL)
++ return NSS_STATUS_SUCCESS;
++
++ struct nss_files_per_file_data *fdata = &data->files[file];
++ __libc_lock_lock (fdata->lock);
++ if (fdata->stream != NULL)
++ {
++ fclose (fdata->stream);
++ fdata->stream = NULL;
++ }
++ __libc_lock_unlock (fdata->lock);
++
++ return NSS_STATUS_SUCCESS;
++}
++libc_hidden_def (__nss_files_data_endent)
+diff --git a/nss/nss_files_functions.c b/nss/nss_files_functions.c
+new file mode 100644
+index 0000000000..85720b4311
+--- /dev/null
++++ b/nss/nss_files_functions.c
+@@ -0,0 +1,43 @@
++/* Direct access for nss_files functions for NSS module loading.
++ Copyright (C) 2021 Free Software Foundation, Inc.
++ This file is part of the GNU C Library.
++
++ The GNU C Library is free software; you can redistribute it and/or
++ modify it under the terms of the GNU Lesser General Public
++ License as published by the Free Software Foundation; either
++ version 2.1 of the License, or (at your option) any later version.
++
++ The GNU C Library is distributed in the hope that it will be useful,
++ but WITHOUT ANY WARRANTY; without even the implied warranty of
++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ Lesser General Public License for more details.
++
++ You should have received a copy of the GNU Lesser General Public
++ License along with the GNU C Library; if not, see
++ <https://www.gnu.org/licenses/>. */
++
++#include <nss_module.h>
++#include <nss_files.h>
++
++void
++__nss_files_functions (nss_module_functions_untyped pointers)
++{
++ void **fptr = pointers;
++
++ /* Functions which are not implemented. */
++#define _nss_files_getcanonname_r NULL
++#define _nss_files_gethostbyaddr2_r NULL
++#define _nss_files_getpublickey NULL
++#define _nss_files_getsecretkey NULL
++#define _nss_files_netname2user NULL
++
++#undef DEFINE_NSS_FUNCTION
++#define DEFINE_NSS_FUNCTION(x) *fptr++ = _nss_files_##x;
++#include "function.def"
++
++#ifdef PTR_MANGLE
++ void **end = fptr;
++ for (fptr = pointers; fptr != end; ++fptr)
++ PTR_MANGLE (*fptr);
++#endif
++}
+diff --git a/nss/nss_module.c b/nss/nss_module.c
+index 60c070c851..7b42c585a4 100644
+--- a/nss/nss_module.c
++++ b/nss/nss_module.c
+@@ -30,6 +30,7 @@
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <string.h>
++#include <nss_files.h>
+
+ /* Suffix after .so of NSS service modules. This is a bit of magic,
+ but we assume LIBNSS_FILES_SO looks like "libnss_files.so.2" and we
+@@ -110,10 +111,45 @@ static const function_name nss_function_name_array[] =
+ #include "function.def"
+ };
+
++static bool
++module_load_nss_files (struct nss_module *module)
++{
++ if (is_nscd)
++ {
++ void (*cb) (size_t, struct traced_file *) = nscd_init_cb;
++# ifdef PTR_DEMANGLE
++ PTR_DEMANGLE (cb);
++# endif
++ _nss_files_init (cb);
++ }
++
++ /* Initialize the function pointers, following the double-checked
++ locking idiom. */
++ __libc_lock_lock (nss_module_list_lock);
++ switch ((enum nss_module_state) atomic_load_acquire (&module->state))
++ {
++ case nss_module_uninitialized:
++ case nss_module_failed:
++ __nss_files_functions (module->functions.untyped);
++ module->handle = NULL;
++ /* Synchronizes with unlocked __nss_module_load atomic_load_acquire. */
++ atomic_store_release (&module->state, nss_module_loaded);
++ break;
++ case nss_module_loaded:
++ /* Nothing to clean up. */
++ break;
++ }
++ __libc_lock_unlock (nss_module_list_lock);
++ return true;
++}
++
+ /* Internal implementation of __nss_module_load. */
+ static bool
+ module_load (struct nss_module *module)
+ {
++ if (strcmp (module->name, "files") == 0)
++ return module_load_nss_files (module);
++
+ void *handle;
+ {
+ char *shlib_name;
+@@ -360,7 +396,7 @@ __nss_module_freeres (void)
+ struct nss_module *current = nss_module_list;
+ while (current != NULL)
+ {
+- if (current->state == nss_module_loaded)
++ if (current->state == nss_module_loaded && current->handle != NULL)
+ __libc_dlclose (current->handle);
+
+ struct nss_module *next = current->next;
+diff --git a/nss/nss_module.h b/nss/nss_module.h
+index 05c4791d11..c1a1d90b60 100644
+--- a/nss/nss_module.h
++++ b/nss/nss_module.h
+@@ -38,6 +38,10 @@ struct nss_module_functions
+ typedef void *nss_module_functions_untyped[sizeof (struct nss_module_functions)
+ / sizeof (void *)];
+
++/* Locate the nss_files functions, as if by dlopen/dlsym. */
++void __nss_files_functions (nss_module_functions_untyped pointers)
++ attribute_hidden;
++
+ /* Initialization state of a NSS module. */
+ enum nss_module_state
+ {
+diff --git a/nss/nss_readline.c b/nss/nss_readline.c
+index 4b3ecbccc8..a2f397a11f 100644
+--- a/nss/nss_readline.c
++++ b/nss/nss_readline.c
+@@ -40,7 +40,7 @@ __nss_readline (FILE *fp, char *buf, size_t len, off64_t *poffset)
+ *poffset = __ftello64 (fp);
+
+ buf[len - 1] = '\xff'; /* Marker to recognize truncation. */
+- if (fgets_unlocked (buf, len, fp) == NULL)
++ if (__fgets_unlocked (buf, len, fp) == NULL)
+ {
+ if (feof_unlocked (fp))
+ {
+@@ -61,7 +61,7 @@ __nss_readline (FILE *fp, char *buf, size_t len, off64_t *poffset)
+ line on the next call. */
+ return __nss_readline_seek (fp, *poffset);
+
+- /* fgets_unlocked succeeded. */
++ /* __fgets_unlocked succeeded. */
+
+ /* Remove leading whitespace. */
+ char *p = buf;
+diff --git a/nss/nss.h b/nss/nss.h
+index ae213f9a6c..c6d62adc0f 100644
+--- a/nss/nss.h
++++ b/nss/nss.h
+@@ -196,7 +196,7 @@ typedef enum nss_status nss_setspent (int);
+ extern nss_endgrent _nss_##module##_endgrent; \
+ extern nss_endhostent _nss_##module##_endhostent; \
+ extern nss_endnetent _nss_##module##_endnetent; \
+- extern nss_endnetgrent _nss_##module##__endnetgrent; \
++ extern nss_endnetgrent _nss_##module##_endnetgrent; \
+ extern nss_endprotoent _nss_##module##_endprotoent; \
+ extern nss_endpwent _nss_##module##_endpwent; \
+ extern nss_endrpcent _nss_##module##_endrpcent; \
+diff --git a/nss/nss_module.c b/nss/nss_module.c
+index 7b42c585a4..7ea5ad9887 100644
+--- a/nss/nss_module.c
++++ b/nss/nss_module.c
+@@ -114,14 +114,16 @@ static const function_name nss_function_name_array[] =
+ static bool
+ module_load_nss_files (struct nss_module *module)
+ {
++#ifdef USE_NSCD
+ if (is_nscd)
+ {
+ void (*cb) (size_t, struct traced_file *) = nscd_init_cb;
+-# ifdef PTR_DEMANGLE
++# ifdef PTR_DEMANGLE
+ PTR_DEMANGLE (cb);
+-# endif
++# endif
+ _nss_files_init (cb);
+ }
++#endif
+
+ /* Initialize the function pointers, following the double-checked
+ locking idiom. */
diff --git a/gnu/packages/patches/gnome-boxes-add-guix-logo.patch b/gnu/packages/patches/gnome-boxes-add-guix-logo.patch
new file mode 100644
index 0000000000..e570675083
--- /dev/null
+++ b/gnu/packages/patches/gnome-boxes-add-guix-logo.patch
@@ -0,0 +1,32 @@
+Taken from upstream commit: 9091c6849652fa083297bc12645d8c57a962874a.
+
+diff --git a/data/osinfo/guix-1.3.xml b/data/osinfo/guix-1.3.xml
+new file mode 100644
+index 00000000..d4e1c167
+--- /dev/null
++++ b/data/osinfo/guix-1.3.xml
+@@ -0,0 +1,9 @@
++<libosinfo version="0.0.1">
++
++ <!-- Please read README.logos for any questions about usage of product logos in Boxes. !-->
++
++ <os id="http://guix.gnu.org/guix/1.3">
++ <logo>https://gitlab.gnome.org/GNOME/gnome-boxes-logos/-/raw/master/logos/guix.svg</logo>
++ </os>
++
++</libosinfo>
+diff --git a/data/osinfo/meson.build b/data/osinfo/meson.build
+index 46ff1570..d5531e60 100644
+--- a/data/osinfo/meson.build
++++ b/data/osinfo/meson.build
+@@ -7,6 +7,7 @@ osinfo_db = [
+ ['freedos-1.2.xml', 'gnome-boxes/osinfo/os/freedos.org'],
+ ['gnome-nightly.xml', 'gnome-boxes/osinfo/os/gnome.org'],
+ ['gnome-3.38.xml', 'gnome-boxes/osinfo/os/gnome.org'],
++ ['guix-1.3.xml', 'gnome-boxes/osinfo/os/guix.gnu.org'],
+ ['manjaro-19.0.xml', 'gnome-boxes/osinfo/os/manjaro.org'],
+ ['nixos-20.03.xml', 'gnome-boxes/osinfo/os/nixos.org'],
+ ['opensuse-10.2.xml', 'gnome-boxes/osinfo/os/opensuse.org'],
+--
+2.34.0
+
diff --git a/gnu/packages/patches/gnome-online-miners-tracker-3.patch b/gnu/packages/patches/gnome-online-miners-tracker-3.patch
new file mode 100644
index 0000000000..0f89c56695
--- /dev/null
+++ b/gnu/packages/patches/gnome-online-miners-tracker-3.patch
@@ -0,0 +1,1505 @@
+Apply the following merge requests:
+
+https://gitlab.gnome.org/GNOME/gnome-online-miners/-/merge_requests/3
+https://gitlab.gnome.org/GNOME/gnome-online-miners/-/merge_requests/4
+
+to add tracker 3 support and fix a use after free error.
+
+diff --git a/src/gom-miner.c b/src/gom-miner.c
+index 7147b33..4fb4d80 100644
+--- a/src/gom-miner.c
++++ b/src/gom-miner.c
+@@ -221,6 +221,7 @@ gom_miner_check_pending_jobs (GTask *task)
+ return;
+
+ g_task_return_boolean (task, TRUE);
++ g_clear_object (&cleanup_job->self);
+ g_slice_free (CleanupJob, cleanup_job);
+ }
+
+@@ -461,7 +462,9 @@ miner_job_process_ready_cb (GObject *source,
+ cleanup_job->pending_jobs = g_list_remove (cleanup_job->pending_jobs,
+ account_miner_job);
+
++ /* This will free the cleanup job data if there are no more pending jobs. */
+ gom_miner_check_pending_jobs (account_miner_job->parent_task);
++
+ gom_account_miner_job_free (account_miner_job);
+ }
+
+@@ -520,10 +523,9 @@ cleanup_old_accounts_done (gpointer data)
+ job->old_datasources = NULL;
+ }
+
++ /* This will free the task data if there are no more pending jobs */
+ gom_miner_check_pending_jobs (task);
+
+- g_clear_object (&job->self);
+-
+ return FALSE;
+ }
+
+@@ -690,6 +692,8 @@ gom_miner_cleanup_old_accounts (GomMiner *self,
+ {
+ CleanupJob *job = g_slice_new0 (CleanupJob);
+
++ g_return_if_fail (GOM_IS_MINER (self));
++
+ job->self = g_object_ref (self);
+ job->content_objects = content_objects;
+ job->acc_objects = acc_objects;
+
+diff --git a/src/gom-application.c b/src/gom-application.c
+index fadd388..9e558f5 100644
+--- a/src/gom-application.c
++++ b/src/gom-application.c
+@@ -229,10 +229,16 @@ gom_application_constructed (GObject *object)
+ {
+ GomApplication *self = GOM_APPLICATION (object);
+ const gchar *display_name;
++ GError *error = NULL;
+
+ G_OBJECT_CLASS (gom_application_parent_class)->constructed (object);
+
+- self->miner = g_object_new (self->miner_type, NULL);
++ self->miner = g_initable_new (self->miner_type, NULL, &error, NULL);
++
++ if (self->miner == NULL) {
++ g_error (error->message);
++ }
++
+ display_name = gom_miner_get_display_name (self->miner);
+ gom_dbus_set_display_name (self->skeleton, display_name);
+ }
+diff --git a/src/gom-miner.c b/src/gom-miner.c
+index 7147b33..1dd9bb8 100644
+--- a/src/gom-miner.c
++++ b/src/gom-miner.c
+@@ -28,7 +28,11 @@
+
+ #include "gom-miner.h"
+
+-G_DEFINE_TYPE (GomMiner, gom_miner, G_TYPE_OBJECT)
++static void gom_miner_initable_interface_init (GInitableIface *iface);
++
++G_DEFINE_TYPE_WITH_CODE (GomMiner, gom_miner, G_TYPE_OBJECT,
++ G_IMPLEMENT_INTERFACE (G_TYPE_INITABLE, gom_miner_initable_interface_init))
++
+
+ struct _GomMinerPrivate {
+ GoaClient *client;
+@@ -132,20 +136,21 @@ gom_miner_dispose (GObject *object)
+ }
+
+ static void
+-gom_miner_init_goa (GomMiner *self)
++gom_miner_init_goa (GomMiner *self,
++ GError **error)
+ {
+ GoaAccount *account;
+ GoaObject *object;
+ const gchar *provider_type;
+ GList *accounts, *l;
+ GomMinerClass *miner_class = GOM_MINER_GET_CLASS (self);
++ GError *inner_error = NULL;
+
+- self->priv->client = goa_client_new_sync (NULL, &self->priv->client_error);
++ self->priv->client = goa_client_new_sync (NULL, &inner_error);
+
+- if (self->priv->client_error != NULL)
++ if (inner_error)
+ {
+- g_critical ("Unable to create GoaClient: %s - indexing for %s will not work",
+- self->priv->client_error->message, miner_class->goa_provider_type);
++ g_propagate_error (error, inner_error);
+ return;
+ }
+
+@@ -170,16 +175,34 @@ gom_miner_init_goa (GomMiner *self)
+ g_list_free_full (accounts, g_object_unref);
+ }
+
+-static void
+-gom_miner_constructed (GObject *obj)
++static gboolean
++gom_miner_initable_init (GInitable *initable,
++ GCancellable *cancellable,
++ GError **error)
+ {
+- GomMiner *self = GOM_MINER (obj);
++ GError *inner_error = NULL;
++ GomMiner *self;
+
+- G_OBJECT_CLASS (gom_miner_parent_class)->constructed (obj);
++ self = GOM_MINER (initable);
+
+- gom_miner_init_goa (self);
++ self->priv->connection = tracker_sparql_connection_get (cancellable, &inner_error);
++ if (inner_error)
++ {
++ g_propagate_prefixed_error (error, inner_error, "Unable to connect to Tracker store: ");
++ return FALSE;
++ }
++
++ gom_miner_init_goa (self, &inner_error);
++ if (inner_error)
++ {
++ g_propagate_prefixed_error (error, inner_error, "Unable to connect to GNOME Online Accounts: ");
++ return FALSE;
++ }
++
++ return TRUE;
+ }
+
++
+ static void
+ gom_miner_init (GomMiner *self)
+ {
+@@ -187,14 +210,12 @@ gom_miner_init (GomMiner *self)
+
+ self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, GOM_TYPE_MINER, GomMinerPrivate);
+ self->priv->display_name = g_strdup ("");
++}
+
+- self->priv->connection = tracker_sparql_connection_get (NULL, &self->priv->connection_error);
+- if (self->priv->connection_error != NULL)
+- {
+- g_critical ("Unable to create TrackerSparqlConnection: %s - indexing for %s will not work",
+- self->priv->connection_error->message,
+- klass->goa_provider_type);
+- }
++static void
++gom_miner_initable_interface_init (GInitableIface *iface)
++{
++ iface->init = gom_miner_initable_init;
+ }
+
+ static void
+@@ -202,7 +223,6 @@ gom_miner_class_init (GomMinerClass *klass)
+ {
+ GObjectClass *oclass = G_OBJECT_CLASS (klass);
+
+- oclass->constructed = gom_miner_constructed;
+ oclass->dispose = gom_miner_dispose;
+
+ cleanup_pool = g_thread_pool_new (cleanup_job, NULL, 1, FALSE, NULL);
+diff --git a/configure.ac b/configure.ac
+index 06cba71..6c61247 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -21,7 +21,7 @@ AC_HEADER_STDC
+
+ GDATA_MIN_VERSION=0.15.2
+ GFBGRAPH_MIN_VERSION=0.2.2
+-GLIB_MIN_VERSION=2.35.1
++GLIB_MIN_VERSION=2.56.0
+ GOA_MIN_VERSION=3.13.3
+ GRILO_MIN_VERSION=0.3.0
+ ZAPOJIT_MIN_VERSION=0.0.2
+@@ -36,7 +36,7 @@ PKG_CHECK_MODULES(GIO, [gio-2.0 gio-unix-2.0])
+ PKG_CHECK_MODULES(GOA, [goa-1.0 >= $GOA_MIN_VERSION])
+ AC_DEFINE([GOA_API_IS_SUBJECT_TO_CHANGE], [], [We are aware that GOA's API can change])
+
+-PKG_CHECK_MODULES(TRACKER, [tracker-miner-2.0 tracker-sparql-2.0])
++PKG_CHECK_MODULES(TRACKER, [tracker-sparql-3.0])
+
+ # Facebook
+ AC_ARG_ENABLE([facebook], [AS_HELP_STRING([--enable-facebook], [Enable Facebook miner])], [], [enable_facebook=yes])
+diff --git a/src/gom-application.c b/src/gom-application.c
+index 9e558f5..b435e26 100644
+--- a/src/gom-application.c
++++ b/src/gom-application.c
+@@ -233,7 +233,9 @@ gom_application_constructed (GObject *object)
+
+ G_OBJECT_CLASS (gom_application_parent_class)->constructed (object);
+
+- self->miner = g_initable_new (self->miner_type, NULL, &error, NULL);
++ self->miner = g_initable_new (self->miner_type, NULL, &error,
++ "bus-name", g_application_get_application_id (G_APPLICATION (self)),
++ NULL);
+
+ if (self->miner == NULL) {
+ g_error (error->message);
+diff --git a/src/gom-miner.c b/src/gom-miner.c
+index 1dd9bb8..ba76ebb 100644
+--- a/src/gom-miner.c
++++ b/src/gom-miner.c
+@@ -33,12 +33,13 @@ static void gom_miner_initable_interface_init (GInitableIface *iface);
+ G_DEFINE_TYPE_WITH_CODE (GomMiner, gom_miner, G_TYPE_OBJECT,
+ G_IMPLEMENT_INTERFACE (G_TYPE_INITABLE, gom_miner_initable_interface_init))
+
+-
+ struct _GomMinerPrivate {
+ GoaClient *client;
+ GError *client_error;
+
++ gchar *bus_name;
+ TrackerSparqlConnection *connection;
++ TrackerEndpointDBus *endpoint;
+ GError *connection_error;
+
+ gchar *display_name;
+@@ -62,6 +63,14 @@ typedef struct {
+ gpointer service;
+ } InsertSharedContentData;
+
++typedef enum
++{
++ PROP_BUS_NAME = 1,
++ N_PROPERTIES
++} GomMinerProperty;
++
++static GParamSpec *obj_properties[N_PROPERTIES] = { NULL, };
++
+ static GThreadPool *cleanup_pool;
+
+ static void cleanup_job (gpointer data, gpointer user_data);
+@@ -135,6 +144,58 @@ gom_miner_dispose (GObject *object)
+ G_OBJECT_CLASS (gom_miner_parent_class)->dispose (object);
+ }
+
++static void
++gom_miner_init_database (GomMiner *self,
++ GCancellable *cancellable,
++ GError **error)
++{
++ TrackerSparqlConnectionFlags flags;
++ g_autoptr (GFile) store_path = NULL;
++ g_autoptr (GDBusConnection) bus = NULL;
++ GError *inner_error = NULL;
++
++ flags = TRACKER_SPARQL_CONNECTION_FLAGS_FTS_ENABLE_STEMMER |
++ TRACKER_SPARQL_CONNECTION_FLAGS_FTS_ENABLE_UNACCENT |
++ TRACKER_SPARQL_CONNECTION_FLAGS_FTS_ENABLE_STOP_WORDS |
++ TRACKER_SPARQL_CONNECTION_FLAGS_FTS_IGNORE_NUMBERS;
++
++ store_path = g_file_new_build_filename (g_get_user_cache_dir (),
++ "gnome-online-miners",
++ self->priv->bus_name,
++ NULL);
++
++ self->priv->connection = tracker_sparql_connection_new (flags,
++ store_path,
++ tracker_sparql_get_ontology_nepomuk (),
++ cancellable,
++ &inner_error);
++
++ if (inner_error)
++ {
++ g_propagate_error (error, inner_error);
++ return;
++ }
++
++ bus = g_bus_get_sync (G_BUS_TYPE_SESSION, NULL, &inner_error);
++
++ if (inner_error)
++ {
++ g_propagate_error (error, inner_error);
++ return;
++ }
++
++ self->priv->endpoint = tracker_endpoint_dbus_new (self->priv->connection,
++ bus,
++ NULL, /* object path */
++ cancellable,
++ &inner_error);
++ if (inner_error)
++ {
++ g_propagate_error (error, inner_error);
++ return;
++ }
++}
++
+ static void
+ gom_miner_init_goa (GomMiner *self,
+ GError **error)
+@@ -185,10 +246,10 @@ gom_miner_initable_init (GInitable *initable,
+
+ self = GOM_MINER (initable);
+
+- self->priv->connection = tracker_sparql_connection_get (cancellable, &inner_error);
++ gom_miner_init_database (self, cancellable, &inner_error);
+ if (inner_error)
+ {
+- g_propagate_prefixed_error (error, inner_error, "Unable to connect to Tracker store: ");
++ g_propagate_prefixed_error (error, inner_error, "Unable to set up Tracker database: ");
+ return FALSE;
+ }
+
+@@ -212,6 +273,47 @@ gom_miner_init (GomMiner *self)
+ self->priv->display_name = g_strdup ("");
+ }
+
++static void
++gom_miner_set_property (GObject *object,
++ guint property_id,
++ const GValue *value,
++ GParamSpec *pspec)
++{
++ GomMiner *self = GOM_MINER (object);
++
++ switch ((GomMinerProperty) property_id)
++ {
++ case PROP_BUS_NAME:
++ g_free (self->priv->bus_name);
++ self->priv->bus_name = g_value_dup_string (value);
++ break;
++
++ default:
++ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
++ break;
++ }
++}
++
++static void
++gom_miner_get_property (GObject *object,
++ guint property_id,
++ GValue *value,
++ GParamSpec *pspec)
++{
++ GomMiner *self = GOM_MINER (object);
++
++ switch ((GomMinerProperty) property_id)
++ {
++ case PROP_BUS_NAME:
++ g_value_set_string (value, self->priv->bus_name);
++ break;
++
++ default:
++ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
++ break;
++ }
++}
++
+ static void
+ gom_miner_initable_interface_init (GInitableIface *iface)
+ {
+@@ -224,6 +326,19 @@ gom_miner_class_init (GomMinerClass *klass)
+ GObjectClass *oclass = G_OBJECT_CLASS (klass);
+
+ oclass->dispose = gom_miner_dispose;
++ oclass->set_property = gom_miner_set_property;
++ oclass->get_property = gom_miner_get_property;
++
++ obj_properties[PROP_BUS_NAME] = g_param_spec_string ("bus-name",
++ "Bus Name",
++ "D-Bus name of the miner",
++ NULL /* default value */,
++ G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE |
++ G_PARAM_STATIC_STRINGS);
++
++ g_object_class_install_properties (oclass,
++ N_PROPERTIES,
++ obj_properties);
+
+ cleanup_pool = g_thread_pool_new (cleanup_job, NULL, 1, FALSE, NULL);
+
+diff --git a/src/gom-miner.h b/src/gom-miner.h
+index 8f83139..5dcfc8d 100644
+--- a/src/gom-miner.h
++++ b/src/gom-miner.h
+@@ -61,6 +61,7 @@ typedef struct _GomMinerPrivate GomMinerPrivate;
+ typedef struct {
+ GomMiner *miner;
+ TrackerSparqlConnection *connection;
++ gchar *bus_name;
+
+ GoaAccount *account;
+ GHashTable *services;
+diff --git a/src/gom-tracker.c b/src/gom-tracker.c
+index 68818c4..5666c16 100644
+--- a/src/gom-tracker.c
++++ b/src/gom-tracker.c
+@@ -408,7 +408,7 @@ gom_tracker_utils_ensure_equipment_resource (TrackerSparqlConnection *connection
+ gchar *retval = NULL;
+ gchar *select = NULL;
+
+- g_return_val_if_fail (TRACKER_SPARQL_IS_CONNECTION (connection), NULL);
++ g_return_val_if_fail (TRACKER_IS_SPARQL_CONNECTION (connection), NULL);
+ g_return_val_if_fail (cancellable == NULL || G_IS_CANCELLABLE (cancellable), NULL);
+ g_return_val_if_fail (error == NULL || *error == NULL, NULL);
+ g_return_val_if_fail (make != NULL || model != NULL, NULL);
+
+diff --git a/src/gom-tracker.c b/src/gom-tracker.c
+index 5666c16..63a4c29 100644
+--- a/src/gom-tracker.c
++++ b/src/gom-tracker.c
+@@ -208,6 +208,6 @@ gom_tracker_sparql_connection_insert_or_replace_triple (TrackerSparqlConnection
+ insert = g_string_new (NULL);
+ g_string_append_printf
+ (insert,
+- "INSERT OR REPLACE %s { <%s> a nie:InformationElement ; %s %s }",
++ "INSERT OR REPLACE %s { <%s> a nie:InformationElement, nie:DataObject ; %s %s }",
+ graph_str, resource, property_name, quoted);
+ g_free (quoted);
+
+diff --git a/src/gom-facebook-miner.c b/src/gom-facebook-miner.c
+index ff42ca5..fc89096 100644
+--- a/src/gom-facebook-miner.c
++++ b/src/gom-facebook-miner.c
+@@ -70,7 +70,7 @@ account_miner_job_process_photo (GomAccountMinerJob *job,
+ (connection,
+ cancellable, error,
+ &resource_exists,
+- datasource_urn, identifier,
++ TRACKER_PICTURES_GRAPH, identifier,
+ "nfo:RemoteDataObject", class, NULL);
+
+ if (*error != NULL)
+@@ -239,7 +239,7 @@ account_miner_job_process_album (GomAccountMinerJob *job,
+ gom_tracker_sparql_connection_insert_or_replace_triple
+ (connection,
+ cancellable, error,
+- datasource_urn, resource,
++ TRACKER_PICTURES_GRAPH, resource,
+ "nie:url", album_link);
+
+ if (*error != NULL)
+@@ -248,7 +248,7 @@ account_miner_job_process_album (GomAccountMinerJob *job,
+ gom_tracker_sparql_connection_insert_or_replace_triple
+ (connection,
+ cancellable, error,
+- datasource_urn, resource,
++ TRACKER_PICTURES_GRAPH, resource,
+ "nie:description", album_description);
+
+ if (*error != NULL)
+@@ -257,7 +257,7 @@ account_miner_job_process_album (GomAccountMinerJob *job,
+ gom_tracker_sparql_connection_insert_or_replace_triple
+ (connection,
+ cancellable, error,
+- datasource_urn, resource,
++ TRACKER_PICTURES_GRAPH, resource,
+ "nie:title", album_name);
+
+ if (*error != NULL)
+@@ -274,7 +274,7 @@ account_miner_job_process_album (GomAccountMinerJob *job,
+ gom_tracker_sparql_connection_insert_or_replace_triple
+ (connection,
+ cancellable, error,
+- datasource_urn, resource,
++ TRACKER_PICTURES_GRAPH, resource,
+ "nco:creator", contact_resource);
+ g_free (contact_resource);
+
+@@ -284,7 +284,7 @@ account_miner_job_process_album (GomAccountMinerJob *job,
+ gom_tracker_sparql_connection_insert_or_replace_triple
+ (connection,
+ cancellable, error,
+- datasource_urn, resource,
++ TRACKER_PICTURES_GRAPH, resource,
+ "nie:contentCreated", album_created_time);
+
+ if (*error != NULL)
+
+diff --git a/src/gom-flickr-miner.c b/src/gom-flickr-miner.c
+index 9ac338e..dc7349e 100644
+--- a/src/gom-flickr-miner.c
++++ b/src/gom-flickr-miner.c
+@@ -143,14 +143,14 @@ account_miner_job_process_entry (GomAccountMinerJob *job,
+ (connection,
+ cancellable, error,
+ &resource_exists,
+- datasource_urn, identifier,
++ TRACKER_PICTURES_GRAPH, identifier,
+ "nfo:RemoteDataObject", class, NULL);
+
+ if (*error != NULL)
+ goto out;
+
+ gom_tracker_update_datasource (connection, datasource_urn,
+- resource_exists, identifier, resource,
++ resource_exists, TRACKER_PICTURES_GRAPH, resource,
+ cancellable, error);
+
+ if (*error != NULL)
+@@ -166,7 +166,7 @@ account_miner_job_process_entry (GomAccountMinerJob *job,
+ parent_resource_urn = gom_tracker_sparql_connection_ensure_resource
+ (connection, cancellable, error,
+ NULL,
+- datasource_urn, parent_identifier,
++ TRACKER_PICTURES_GRAPH, parent_identifier,
+ "nfo:RemoteDataObject", "nfo:DataContainer", NULL);
+ g_free (parent_identifier);
+
+@@ -176,7 +176,7 @@ account_miner_job_process_entry (GomAccountMinerJob *job,
+ gom_tracker_sparql_connection_insert_or_replace_triple
+ (connection,
+ cancellable, error,
+- datasource_urn, resource,
++ TRACKER_PICTURES_GRAPH, resource,
+ "nie:isPartOf", parent_resource_urn);
+ g_free (parent_resource_urn);
+
+@@ -187,7 +187,7 @@ account_miner_job_process_entry (GomAccountMinerJob *job,
+ gom_tracker_sparql_connection_insert_or_replace_triple
+ (connection,
+ cancellable, error,
+- datasource_urn, resource,
++ TRACKER_PICTURES_GRAPH, resource,
+ "nie:title", grl_media_get_title (entry->media));
+
+ if (*error != NULL)
+@@ -202,7 +202,7 @@ account_miner_job_process_entry (GomAccountMinerJob *job,
+ created_time = modification_date = grl_media_get_creation_date (entry->media);
+ new_mtime = g_date_time_to_unix (modification_date);
+ mtime_changed = gom_tracker_update_mtime (connection, new_mtime,
+- resource_exists, identifier, resource,
++ resource_exists, TRACKER_PICTURES_GRAPH, resource,
+ cancellable, error);
+
+ if (*error != NULL)
+@@ -221,7 +221,7 @@ account_miner_job_process_entry (GomAccountMinerJob *job,
+ gom_tracker_sparql_connection_insert_or_replace_triple
+ (connection,
+ cancellable, error,
+- datasource_urn, resource,
++ TRACKER_PICTURES_GRAPH, resource,
+ "nie:contentCreated", date);
+ g_free (date);
+ }
+@@ -233,7 +233,7 @@ account_miner_job_process_entry (GomAccountMinerJob *job,
+ gom_tracker_sparql_connection_insert_or_replace_triple
+ (connection,
+ cancellable, error,
+- datasource_urn, resource,
++ TRACKER_PICTURES_GRAPH, resource,
+ "nie:url", url);
+
+ if (*error != NULL)
+@@ -242,7 +242,7 @@ account_miner_job_process_entry (GomAccountMinerJob *job,
+ gom_tracker_sparql_connection_insert_or_replace_triple
+ (connection,
+ cancellable, error,
+- datasource_urn, resource,
++ TRACKER_PICTURES_GRAPH, resource,
+ "nie:description", grl_media_get_description (entry->media));
+
+ if (*error != NULL)
+@@ -254,7 +254,7 @@ account_miner_job_process_entry (GomAccountMinerJob *job,
+ gom_tracker_sparql_connection_insert_or_replace_triple
+ (connection,
+ cancellable, error,
+- datasource_urn, resource,
++ TRACKER_PICTURES_GRAPH, resource,
+ "nie:mimeType", mime);
+ g_free (mime);
+
+@@ -265,7 +265,7 @@ account_miner_job_process_entry (GomAccountMinerJob *job,
+ contact_resource = gom_tracker_utils_ensure_contact_resource
+ (connection,
+ cancellable, error,
+- datasource_urn, grl_media_get_author (entry->media));
++ TRACKER_PICTURES_GRAPH, grl_media_get_author (entry->media));
+
+ if (*error != NULL)
+ goto out;
+@@ -273,7 +273,7 @@ account_miner_job_process_entry (GomAccountMinerJob *job,
+ gom_tracker_sparql_connection_insert_or_replace_triple
+ (connection,
+ cancellable, error,
+- datasource_urn, resource,
++ TRACKER_PICTURES_GRAPH, resource,
+ "nco:creator", contact_resource);
+ g_free (contact_resource);
+
+diff --git a/src/gom-gdata-miner.c b/src/gom-gdata-miner.c
+index 7872431..d0deb80 100644
+--- a/src/gom-gdata-miner.c
++++ b/src/gom-gdata-miner.c
+@@ -120,7 +120,7 @@ account_miner_job_process_entry (TrackerSparqlConnection *connection,
+ (connection,
+ cancellable, error,
+ &resource_exists,
+- datasource_urn, identifier,
++ TRACKER_DOCUMENTS_GRAPH, identifier,
+ "nfo:RemoteDataObject", class, NULL);
+
+ if (*error != NULL)
+@@ -187,7 +187,7 @@ account_miner_job_process_entry (TrackerSparqlConnection *connection,
+ parent_resource_urn = gom_tracker_sparql_connection_ensure_resource
+ (connection, cancellable, error,
+ NULL,
+- datasource_urn, parent_resource_id,
++ GOM_GRAPH, parent_resource_id,
+ "nfo:RemoteDataObject", "nfo:DataContainer", NULL);
+ g_free (parent_resource_id);
+
+@@ -219,7 +219,7 @@ account_miner_job_process_entry (TrackerSparqlConnection *connection,
+ gom_tracker_sparql_connection_toggle_favorite
+ (connection,
+ cancellable, error,
+- resource, starred);
++ TRACKER_PICTURES_GRAPH, resource, starred);
+
+ if (*error != NULL)
+ goto out;
+@@ -400,14 +400,14 @@ account_miner_job_process_photo (TrackerSparqlConnection *connection,
+ (connection,
+ cancellable, error,
+ &resource_exists,
+- datasource_urn, identifier,
++ TRACKER_PICTURES_GRAPH, identifier,
+ "nfo:RemoteDataObject", "nmm:Photo", NULL);
+
+ if (*error != NULL)
+ goto out;
+
+ gom_tracker_update_datasource (connection, datasource_urn,
+- resource_exists, identifier, resource,
++ resource_exists, TRACKER_PICTURES_GRAPH, resource,
+ cancellable, error);
+ if (*error != NULL)
+ goto out;
+@@ -566,6 +566,7 @@ account_miner_job_process_photo (TrackerSparqlConnection *connection,
+ equipment_resource = gom_tracker_utils_ensure_equipment_resource (connection,
+ cancellable,
+ error,
++ TRACKER_PICTURES_GRAPH,
+ make,
+ model);
+
+@@ -665,7 +666,7 @@ account_miner_job_process_album (TrackerSparqlConnection *connection,
+ (connection,
+ cancellable, error,
+ &resource_exists,
+- datasource_urn, identifier,
++ TRACKER_PICTURES_GRAPH, identifier,
+ "nfo:RemoteDataObject", "nfo:DataContainer",
+ NULL);
+
+@@ -674,7 +675,7 @@ account_miner_job_process_album (TrackerSparqlConnection *connection,
+
+ gom_tracker_update_datasource
+ (connection, datasource_urn,
+- resource_exists, identifier, resource,
++ resource_exists, TRACKER_PICTURES_GRAPH, resource,
+ cancellable, error);
+
+ if (*error != NULL)
+@@ -685,7 +686,7 @@ account_miner_job_process_album (TrackerSparqlConnection *connection,
+ */
+ new_mtime = gdata_entry_get_updated (GDATA_ENTRY (album));
+ mtime_changed = gom_tracker_update_mtime (connection, new_mtime,
+- resource_exists, identifier, resource,
++ resource_exists, TRACKER_PICTURES_GRAPH, resource,
+ cancellable, error);
+
+ if (*error != NULL)
+@@ -703,7 +704,7 @@ account_miner_job_process_album (TrackerSparqlConnection *connection,
+ gom_tracker_sparql_connection_insert_or_replace_triple
+ (connection,
+ cancellable, error,
+- datasource_urn, resource,
++ TRACKER_PICTURES_GRAPH, resource,
+ "nie:url", alternate_uri);
+
+ if (*error != NULL)
+@@ -713,7 +714,7 @@ account_miner_job_process_album (TrackerSparqlConnection *connection,
+ gom_tracker_sparql_connection_insert_or_replace_triple
+ (connection,
+ cancellable, error,
+- datasource_urn, resource,
++ TRACKER_PICTURES_GRAPH, resource,
+ "nie:description", summary);
+
+ if (*error != NULL)
+@@ -723,7 +724,7 @@ account_miner_job_process_album (TrackerSparqlConnection *connection,
+ gom_tracker_sparql_connection_insert_or_replace_triple
+ (connection,
+ cancellable, error,
+- datasource_urn, resource,
++ TRACKER_PICTURES_GRAPH, resource,
+ "nie:title", title);
+
+ if (*error != NULL)
+@@ -743,7 +744,7 @@ account_miner_job_process_album (TrackerSparqlConnection *connection,
+ gom_tracker_sparql_connection_insert_or_replace_triple
+ (connection,
+ cancellable, error,
+- datasource_urn, resource,
++ TRACKER_PICTURES_GRAPH, resource,
+ "nco:creator", contact_resource);
+ g_free (contact_resource);
+
+@@ -755,7 +756,7 @@ account_miner_job_process_album (TrackerSparqlConnection *connection,
+ gom_tracker_sparql_connection_insert_or_replace_triple
+ (connection,
+ cancellable, error,
+- datasource_urn, resource,
++ TRACKER_PICTURES_GRAPH, resource,
+ "nie:contentCreated", date);
+ g_free (date);
+
+@@ -865,7 +866,7 @@ insert_shared_content_photos (TrackerSparqlConnection *connection,
+ if (!gom_tracker_sparql_connection_insert_or_replace_triple (connection,
+ cancellable,
+ &local_error,
+- datasource_urn,
++ TRACKER_PICTURES_GRAPH,
+ source_urn,
+ "nie:relatedTo",
+ photo_resource_urn))
+@@ -878,7 +879,7 @@ insert_shared_content_photos (TrackerSparqlConnection *connection,
+ if (!gom_tracker_sparql_connection_insert_or_replace_triple (connection,
+ cancellable,
+ &local_error,
+- datasource_urn,
++ TRACKER_PICTURES_GRAPH,
+ photo_resource_urn,
+ "nie:links",
+ source_urn))
+
+diff --git a/src/gom-media-server-miner.c b/src/gom-media-server-miner.c
+index 490869e..32e08c6 100644
+--- a/src/gom-media-server-miner.c
++++ b/src/gom-media-server-miner.c
+@@ -65,14 +65,14 @@ account_miner_job_process_photo (GomAccountMinerJob *job,
+ (connection,
+ cancellable, error,
+ &resource_exists,
+- datasource_urn, identifier,
++ TRACKER_PICTURES_GRAPH, identifier,
+ "nfo:RemoteDataObject", class, NULL);
+
+ if (*error != NULL)
+ goto out;
+
+ gom_tracker_update_datasource (connection, datasource_urn,
+- resource_exists, identifier, resource,
++ resource_exists, TRACKER_PICTURES_GRAPH, resource,
+ cancellable, error);
+ if (*error != NULL)
+ goto out;
+@@ -81,7 +81,7 @@ account_miner_job_process_photo (GomAccountMinerJob *job,
+ gom_tracker_sparql_connection_insert_or_replace_triple
+ (connection,
+ cancellable, error,
+- datasource_urn, resource,
++ TRACKER_PICTURES_GRAPH, resource,
+ "nie:url", photo->url);
+
+ if (*error != NULL)
+@@ -90,7 +90,7 @@ account_miner_job_process_photo (GomAccountMinerJob *job,
+ gom_tracker_sparql_connection_insert_or_replace_triple
+ (connection,
+ cancellable, error,
+- datasource_urn, resource,
++ TRACKER_PICTURES_GRAPH, resource,
+ "nie:mimeType", photo->mimetype);
+
+ if (*error != NULL)
+@@ -99,7 +99,7 @@ account_miner_job_process_photo (GomAccountMinerJob *job,
+ gom_tracker_sparql_connection_insert_or_replace_triple
+ (connection,
+ cancellable, error,
+- datasource_urn, resource,
++ TRACKER_PICTURES_GRAPH, resource,
+ "nie:title", photo->name);
+
+ if (*error != NULL)
+
+diff --git a/src/gom-miner.c b/src/gom-miner.c
+index ba76ebb..40b111d 100644
+--- a/src/gom-miner.c
++++ b/src/gom-miner.c
+@@ -375,7 +375,7 @@ gom_miner_ensure_datasource (GomMiner *self,
+ " <%s> a nie:DataSource ; nao:identifier \"%s\" . "
+ " <%s> a nie:InformationElement ; nie:rootElementOf <%s> ; nie:version \"%d\""
+ "}",
+- datasource_urn,
++ GOM_GRAPH,
+ datasource_urn, klass->miner_identifier,
+ root_element_urn, datasource_urn, klass->version);
+
+@@ -400,8 +400,8 @@ gom_account_miner_job_query_existing (GomAccountMinerJob *job,
+
+ select = g_string_new (NULL);
+ g_string_append_printf (select,
+- "SELECT ?urn nao:identifier(?urn) WHERE { ?urn nie:dataSource <%s> }",
+- job->datasource_urn);
++ "SELECT ?urn ?id WHERE { GRAPH <%s> { ?urn nie:dataSource <%s> ; nao:identifier ?id . } }",
++ GOM_GRAPH, job->datasource_urn);
+
+ cursor = tracker_sparql_connection_query (job->connection,
+ select->str,
+@@ -414,9 +414,21 @@ gom_account_miner_job_query_existing (GomAccountMinerJob *job,
+
+ while (tracker_sparql_cursor_next (cursor, cancellable, error))
+ {
+- g_hash_table_insert (job->previous_resources,
+- g_strdup (tracker_sparql_cursor_get_string (cursor, 1, NULL)),
+- g_strdup (tracker_sparql_cursor_get_string (cursor, 0, NULL)));
++ const gchar *urn, *identifier;
++
++ urn = tracker_sparql_cursor_get_string (cursor, 0, NULL);
++ identifier = tracker_sparql_cursor_get_string (cursor, 1, NULL);
++
++ if (identifier != NULL)
++ {
++ g_hash_table_insert (job->previous_resources,
++ g_strdup (identifier),
++ g_strdup (urn));
++ }
++ else
++ {
++ g_warning ("Missing identifier for urn %s", urn);
++ }
+ }
+
+ g_object_unref (cursor);
+@@ -488,16 +500,19 @@ gom_account_miner_job (GTask *task,
+ if (error != NULL)
+ goto out;
+
++ g_debug ("account miner: Querying existing accounts stored in database");
+ gom_account_miner_job_query_existing (job, &error);
+
+ if (error != NULL)
+ goto out;
+
++ g_debug ("account miner: Querying remote server");
+ gom_account_miner_job_query (job, &error);
+
+ if (error != NULL)
+ goto out;
+
++ g_debug ("account miner: Removing stale accounts");
+ gom_account_miner_job_cleanup_previous (job, &error);
+
+ if (error != NULL)
+@@ -751,10 +766,15 @@ cleanup_job (gpointer data,
+
+ /* find all our datasources in the tracker DB */
+ select = g_string_new (NULL);
+- g_string_append_printf (select, "SELECT ?datasource nie:version(?root) WHERE { "
+- "?datasource a nie:DataSource . "
+- "?datasource nao:identifier \"%s\" . "
+- "OPTIONAL { ?root nie:rootElementOf ?datasource } }",
++ g_string_append_printf (select,
++ "SELECT ?datasource nie:version(?root) WHERE { "
++ " GRAPH <%s> { "
++ " ?datasource a nie:DataSource . "
++ " ?datasource nao:identifier \"%s\" . "
++ " OPTIONAL { ?root nie:rootElementOf ?datasource } "
++ " }"
++ "}",
++ GOM_GRAPH,
+ klass->miner_identifier);
+
+ cursor = tracker_sparql_connection_query (self->priv->connection,
+
+diff --git a/src/gom-miner.h b/src/gom-miner.h
+index 5dcfc8d..8f83139 100644
+--- a/src/gom-miner.h
++++ b/src/gom-miner.h
+@@ -61,7 +61,6 @@ typedef struct _GomMinerPrivate GomMinerPrivate;
+ typedef struct {
+ GomMiner *miner;
+ TrackerSparqlConnection *connection;
+- gchar *bus_name;
+
+ GoaAccount *account;
+ GHashTable *services;
+
+diff --git a/src/gom-owncloud-miner.c b/src/gom-owncloud-miner.c
+index 34d303b..623f2e1 100644
+--- a/src/gom-owncloud-miner.c
++++ b/src/gom-owncloud-miner.c
+@@ -100,14 +100,14 @@ account_miner_job_process_file (GomAccountMinerJob *job,
+ (connection,
+ cancellable, error,
+ &resource_exists,
+- datasource_urn, identifier,
++ TRACKER_DOCUMENTS_GRAPH, identifier,
+ "nfo:RemoteDataObject", class, NULL);
+
+ if (*error != NULL)
+ goto out;
+
+ gom_tracker_update_datasource (connection, datasource_urn,
+- resource_exists, identifier, resource,
++ resource_exists, TRACKER_DOCUMENTS_GRAPH, resource,
+ cancellable, error);
+
+ if (*error != NULL)
+@@ -117,7 +117,7 @@ account_miner_job_process_file (GomAccountMinerJob *job,
+ modification_time = g_date_time_new_from_timeval_local (&tv);
+ new_mtime = g_date_time_to_unix (modification_time);
+ mtime_changed = gom_tracker_update_mtime (connection, new_mtime,
+- resource_exists, identifier, resource,
++ resource_exists, TRACKER_DOCUMENTS_GRAPH, resource,
+ cancellable, error);
+
+ if (*error != NULL)
+@@ -133,7 +133,7 @@ account_miner_job_process_file (GomAccountMinerJob *job,
+ gom_tracker_sparql_connection_insert_or_replace_triple
+ (connection,
+ cancellable, error,
+- datasource_urn, resource,
++ TRACKER_DOCUMENTS_GRAPH, resource,
+ "nie:url", uri);
+
+ if (*error != NULL)
+@@ -156,7 +156,7 @@ account_miner_job_process_file (GomAccountMinerJob *job,
+ parent_resource_urn = gom_tracker_sparql_connection_ensure_resource
+ (connection, cancellable, error,
+ NULL,
+- datasource_urn, parent_identifier,
++ GOM_GRAPH, parent_identifier,
+ "nfo:RemoteDataObject", "nfo:DataContainer", NULL);
+ g_checksum_reset (checksum);
+ g_free (parent_identifier);
+@@ -168,7 +168,7 @@ account_miner_job_process_file (GomAccountMinerJob *job,
+ gom_tracker_sparql_connection_insert_or_replace_triple
+ (connection,
+ cancellable, error,
+- datasource_urn, resource,
++ TRACKER_DOCUMENTS_GRAPH, resource,
+ "nie:isPartOf", parent_resource_urn);
+ g_free (parent_resource_urn);
+
+@@ -182,7 +182,7 @@ account_miner_job_process_file (GomAccountMinerJob *job,
+ gom_tracker_sparql_connection_insert_or_replace_triple
+ (connection,
+ cancellable, error,
+- datasource_urn, resource,
++ TRACKER_DOCUMENTS_GRAPH, resource,
+ "nie:mimeType", mime);
+
+ if (*error != NULL)
+@@ -194,7 +194,7 @@ account_miner_job_process_file (GomAccountMinerJob *job,
+ gom_tracker_sparql_connection_insert_or_replace_triple
+ (connection,
+ cancellable, error,
+- datasource_urn, resource,
++ TRACKER_DOCUMENTS_GRAPH, resource,
+ "nfo:fileName", display_name);
+
+ if (*error != NULL)
+@@ -416,6 +416,11 @@ query_owncloud (GomAccountMinerJob *job,
+ mount = g_volume_get_mount (volume);
+ if (mount == NULL)
+ {
++ g_autofree gchar *volume_name;
++
++ volume_name = g_volume_get_name (volume);
++ g_debug ("Mounting Online Account volume %s", volume_name);
++
+ data.error = error;
+
+ context = g_main_context_new ();
+@@ -436,6 +441,7 @@ query_owncloud (GomAccountMinerJob *job,
+ }
+
+ root = g_mount_get_root (mount);
++ g_debug ("Got volume from gnome-online-accounts: root is %s", g_file_peek_path (root));
+ account_miner_job_traverse_dir (job, connection, previous_resources, datasource_urn, root, TRUE, cancellable, error);
+
+ g_object_unref (root);
+
+diff --git a/src/gom-tracker.c b/src/gom-tracker.c
+index 63a4c29..469583e 100644
+--- a/src/gom-tracker.c
++++ b/src/gom-tracker.c
+@@ -26,16 +26,11 @@
+ #include "gom-tracker.h"
+ #include "gom-utils.h"
+
+-static gchar *
+-_tracker_utils_format_into_graph (const gchar *graph)
+-{
+- return (graph != NULL) ? g_strdup_printf ("INTO <%s> ", graph) : g_strdup ("");
+-}
+-
+ static gboolean
+ gom_tracker_sparql_connection_get_string_attribute (TrackerSparqlConnection *connection,
+ GCancellable *cancellable,
+ GError **error,
++ const gchar *graph,
+ const gchar *resource,
+ const gchar *attribute,
+ gchar **value)
+@@ -45,8 +40,8 @@ gom_tracker_sparql_connection_get_string_attribute (TrackerSparqlConnection *con
+ const gchar *string_value = NULL;
+ gboolean res;
+
+- g_string_append_printf (select, "SELECT ?val { <%s> %s ?val }",
+- resource, attribute);
++ g_string_append_printf (select, "SELECT ?val { GRAPH <%s> { <%s> %s ?val } }",
++ graph, resource, attribute);
+ cursor = tracker_sparql_connection_query (connection,
+ select->str,
+ cancellable, error);
+@@ -86,7 +81,8 @@ gom_tracker_sparql_connection_ensure_resource (TrackerSparqlConnection *connecti
+ const gchar *class,
+ ...)
+ {
+- GString *select, *insert, *inner;
++ GString *select, *inner;
++ gchar *insert;
+ va_list args;
+ const gchar *arg;
+ TrackerSparqlCursor *cursor;
+@@ -98,6 +94,8 @@ gom_tracker_sparql_connection_ensure_resource (TrackerSparqlConnection *connecti
+ gchar *key = NULL, *val = NULL;
+ gboolean exists = FALSE;
+
++ g_return_val_if_fail (graph != NULL, NULL);
++
+ /* build the inner query with all the classes */
+ va_start (args, class);
+ inner = g_string_new (NULL);
+@@ -112,7 +110,7 @@ gom_tracker_sparql_connection_ensure_resource (TrackerSparqlConnection *connecti
+ /* query if such a resource is already in the DB */
+ select = g_string_new (NULL);
+ g_string_append_printf (select,
+- "SELECT ?urn WHERE { ?urn %s }", inner->str);
++ "SELECT ?urn WHERE { GRAPH <%s> { ?urn %s } }", graph, inner->str);
+
+ cursor = tracker_sparql_connection_query (connection,
+ select->str,
+@@ -138,19 +136,12 @@ gom_tracker_sparql_connection_ensure_resource (TrackerSparqlConnection *connecti
+ }
+
+ /* not found, create the resource */
+- insert = g_string_new (NULL);
+- graph_str = _tracker_utils_format_into_graph (graph);
+-
+- g_string_append_printf (insert, "INSERT %s { _:res %s }",
+- graph_str, inner->str);
+- g_free (graph_str);
+- g_string_free (inner, TRUE);
+-
++ insert = g_strdup_printf ("INSERT INTO <%s> { _:res %s }",
++ graph, inner->str);
+ insert_res =
+- tracker_sparql_connection_update_blank (connection, insert->str,
++ tracker_sparql_connection_update_blank (connection, insert,
+ G_PRIORITY_DEFAULT, NULL, error);
+-
+- g_string_free (insert, TRUE);
++ g_free (insert);
+
+ if (*error != NULL)
+ goto out;
+@@ -194,10 +185,10 @@ gom_tracker_sparql_connection_insert_or_replace_triple (TrackerSparqlConnection
+ const gchar *property_value)
+ {
+ GString *insert;
+- gchar *graph_str, *quoted;
++ gchar *quoted;
+ gboolean retval = TRUE;
+
+- graph_str = _tracker_utils_format_into_graph (graph);
++ g_return_val_if_fail (graph != NULL, FALSE);
+
+ /* the "null" value must not be quoted */
+ if (property_value == NULL)
+@@ -208,8 +199,8 @@ gom_tracker_sparql_connection_insert_or_replace_triple (TrackerSparqlConnection
+ insert = g_string_new (NULL);
+ g_string_append_printf
+ (insert,
+- "INSERT OR REPLACE %s { <%s> a nie:InformationElement, nie:DataObject ; %s %s }",
+- graph_str, resource, property_name, quoted);
++ "INSERT OR REPLACE INTO <%s> { <%s> a nie:InformationElement, nie:DataObject ; %s %s }",
++ graph, resource, property_name, quoted);
+ g_free (quoted);
+
+ g_debug ("Insert or replace triple: query %s", insert->str);
+@@ -223,8 +214,6 @@ gom_tracker_sparql_connection_insert_or_replace_triple (TrackerSparqlConnection
+ if (*error != NULL)
+ retval = FALSE;
+
+- g_free (graph_str);
+-
+ return retval;
+ }
+
+@@ -271,6 +260,7 @@ gboolean
+ gom_tracker_sparql_connection_toggle_favorite (TrackerSparqlConnection *connection,
+ GCancellable *cancellable,
+ GError **error,
++ const gchar *graph,
+ const gchar *resource,
+ gboolean favorite)
+ {
+@@ -279,15 +269,15 @@ gom_tracker_sparql_connection_toggle_favorite (TrackerSparqlConnection *connecti
+ gboolean retval = TRUE;
+
+ if (favorite)
+- op_str = "INSERT OR REPLACE";
++ op_str = "INSERT OR REPLACE INTO";
+ else
+- op_str = "DELETE";
++ op_str = "DELETE FROM";
+
+ update = g_string_new (NULL);
+ g_string_append_printf
+ (update,
+- "%s { <%s> nao:hasTag nao:predefined-tag-favorite }",
+- op_str, resource);
++ "%s <%s> { <%s> nao:hasTag nao:predefined-tag-favorite }",
++ op_str, graph, resource);
+
+ g_debug ("Toggle favorite: query %s", update->str);
+
+@@ -321,9 +311,13 @@ gom_tracker_utils_ensure_contact_resource (TrackerSparqlConnection *connection,
+ mail_uri = g_strconcat ("mailto:", email, NULL);
+ select = g_string_new (NULL);
+ g_string_append_printf (select,
+- "SELECT ?urn WHERE { ?urn a nco:Contact . "
+- "?urn nco:hasEmailAddress ?mail . "
+- "FILTER (fn:contains(?mail, \"%s\" )) }", mail_uri);
++ "SELECT ?urn WHERE { "
++ " GRAPH <%s> { "
++ " ?urn a nco:Contact . "
++ " ?urn nco:hasEmailAddress ?mail . "
++ " FILTER (fn:contains(?mail, \"%s\" )) "
++ " }"
++ "}", TRACKER_CONTACTS_GRAPH, mail_uri);
+
+ cursor = tracker_sparql_connection_query (connection,
+ select->str,
+@@ -351,8 +345,9 @@ gom_tracker_utils_ensure_contact_resource (TrackerSparqlConnection *connection,
+ insert = g_string_new (NULL);
+
+ g_string_append_printf (insert,
+- "INSERT { <%s> a nco:EmailAddress ; nco:emailAddress \"%s\" . "
++ "INSERT INTO <%s> { <%s> a nco:EmailAddress ; nco:emailAddress \"%s\" . "
+ "_:res a nco:Contact ; nco:hasEmailAddress <%s> ; nco:fullname \"%s\" . }",
++ TRACKER_CONTACTS_GRAPH,
+ mail_uri, email,
+ mail_uri, fullname);
+
+@@ -397,6 +392,7 @@ gchar *
+ gom_tracker_utils_ensure_equipment_resource (TrackerSparqlConnection *connection,
+ GCancellable *cancellable,
+ GError **error,
++ const gchar *graph,
+ const gchar *make,
+ const gchar *model)
+ {
+@@ -416,7 +412,7 @@ gom_tracker_utils_ensure_equipment_resource (TrackerSparqlConnection *connection
+ equip_uri = tracker_sparql_escape_uri_printf ("urn:equipment:%s:%s:",
+ make != NULL ? make : "",
+ model != NULL ? model : "");
+- select = g_strdup_printf ("SELECT <%s> WHERE { }", equip_uri);
++ select = g_strdup_printf ("SELECT <%s> WHERE { GRAPH <%s> { } }", equip_uri, graph);
+
+ local_error = NULL;
+ cursor = tracker_sparql_connection_query (connection, select, cancellable, &local_error);
+@@ -449,7 +445,8 @@ gom_tracker_utils_ensure_equipment_resource (TrackerSparqlConnection *connection
+ }
+
+ /* not found, create the resource */
+- insert = g_strdup_printf ("INSERT { <%s> a nfo:Equipment ; nfo:manufacturer \"%s\" ; nfo:model \"%s\" }",
++ insert = g_strdup_printf ("INSERT INTO <%s> { <%s> a nfo:Equipment ; nfo:manufacturer \"%s\" ; nfo:model \"%s\" }",
++ graph,
+ equip_uri,
+ make,
+ model);
+@@ -480,7 +477,7 @@ void
+ gom_tracker_update_datasource (TrackerSparqlConnection *connection,
+ const gchar *datasource_urn,
+ gboolean resource_exists,
+- const gchar *identifier,
++ const gchar *graph,
+ const gchar *resource,
+ GCancellable *cancellable,
+ GError **error)
+@@ -498,7 +495,7 @@ gom_tracker_update_datasource (TrackerSparqlConnection *connection,
+
+ res = gom_tracker_sparql_connection_get_string_attribute
+ (connection, cancellable, error,
+- resource, "nie:dataSource", &old_value);
++ graph, resource, "nie:dataSource", &old_value);
+ g_clear_error (error);
+
+ if (res)
+@@ -514,7 +511,7 @@ gom_tracker_update_datasource (TrackerSparqlConnection *connection,
+ if (set_datasource)
+ gom_tracker_sparql_connection_set_triple
+ (connection, cancellable, error,
+- identifier, resource,
++ graph, resource,
+ "nie:dataSource", datasource_urn);
+ }
+
+@@ -522,7 +519,7 @@ gboolean
+ gom_tracker_update_mtime (TrackerSparqlConnection *connection,
+ gint64 new_mtime,
+ gboolean resource_exists,
+- const gchar *identifier,
++ const gchar *graph,
+ const gchar *resource,
+ GCancellable *cancellable,
+ GError **error)
+@@ -536,7 +533,7 @@ gom_tracker_update_mtime (TrackerSparqlConnection *connection,
+ {
+ res = gom_tracker_sparql_connection_get_string_attribute
+ (connection, cancellable, error,
+- resource, "nie:contentLastModified", &old_value);
++ graph, resource, "nie:contentLastModified", &old_value);
+ g_clear_error (error);
+
+ if (res)
+@@ -552,7 +549,7 @@ gom_tracker_update_mtime (TrackerSparqlConnection *connection,
+ date = gom_iso8601_from_timestamp (new_mtime);
+ gom_tracker_sparql_connection_insert_or_replace_triple
+ (connection, cancellable, error,
+- identifier, resource,
++ graph, resource,
+ "nie:contentLastModified", date);
+ g_free (date);
+
+diff --git a/src/gom-tracker.h b/src/gom-tracker.h
+index 94a39e8..a5ae6fd 100644
+--- a/src/gom-tracker.h
++++ b/src/gom-tracker.h
+@@ -29,6 +29,14 @@
+
+ G_BEGIN_DECLS
+
++/* The graph where we store account meta information */
++#define GOM_GRAPH "tracker.api.gnome.org/ontology/v3/gnome-online-miners"
++
++/* Graphs where we store content information */
++#define TRACKER_CONTACTS_GRAPH "http://tracker.api.gnome.org/ontology/v3/tracker#Contacts"
++#define TRACKER_DOCUMENTS_GRAPH "http://tracker.api.gnome.org/ontology/v3/tracker#Documents"
++#define TRACKER_PICTURES_GRAPH "http://tracker.api.gnome.org/ontology/v3/tracker#Pictures"
++
+ gchar *gom_tracker_sparql_connection_ensure_resource (TrackerSparqlConnection *connection,
+ GCancellable *cancellable,
+ GError **error,
+@@ -57,6 +65,7 @@ gboolean gom_tracker_sparql_connection_set_triple (TrackerSparqlConnection *conn
+ gboolean gom_tracker_sparql_connection_toggle_favorite (TrackerSparqlConnection *connection,
+ GCancellable *cancellable,
+ GError **error,
++ const gchar *graph,
+ const gchar *resource,
+ gboolean favorite);
+
+@@ -69,20 +78,21 @@ gchar* gom_tracker_utils_ensure_contact_resource (TrackerSparqlConnection *conne
+ gchar *gom_tracker_utils_ensure_equipment_resource (TrackerSparqlConnection *connection,
+ GCancellable *cancellable,
+ GError **error,
++ const gchar *graph,
+ const gchar *make,
+ const gchar *model);
+
+ void gom_tracker_update_datasource (TrackerSparqlConnection *connection,
+ const gchar *datasource_urn,
+ gboolean resource_exists,
+- const gchar *identifier,
++ const gchar *graph,
+ const gchar *resource,
+ GCancellable *cancellable,
+ GError **error);
+ gboolean gom_tracker_update_mtime (TrackerSparqlConnection *connection,
+ gint64 new_mtime,
+ gboolean resource_exists,
+- const gchar *identifier,
++ const gchar *graph,
+ const gchar *resource,
+ GCancellable *cancellable,
+ GError **error);
+diff --git a/src/gom-zpj-miner.c b/src/gom-zpj-miner.c
+index 6dff947..1372de5 100644
+--- a/src/gom-zpj-miner.c
++++ b/src/gom-zpj-miner.c
+@@ -70,14 +70,14 @@ account_miner_job_process_entry (GomAccountMinerJob *job,
+ (connection,
+ cancellable, error,
+ &resource_exists,
+- datasource_urn, identifier,
++ TRACKER_PICTURES_GRAPH, identifier,
+ "nfo:RemoteDataObject", class, NULL);
+
+ if (*error != NULL)
+ goto out;
+
+ gom_tracker_update_datasource (connection, datasource_urn,
+- resource_exists, identifier, resource,
++ resource_exists, TRACKER_PICTURES_GRAPH, resource,
+ cancellable, error);
+
+ if (*error != NULL)
+@@ -86,7 +86,7 @@ account_miner_job_process_entry (GomAccountMinerJob *job,
+ updated_time = zpj_skydrive_entry_get_updated_time (entry);
+ new_mtime = g_date_time_to_unix (updated_time);
+ mtime_changed = gom_tracker_update_mtime (connection, new_mtime,
+- resource_exists, identifier, resource,
++ resource_exists, TRACKER_PICTURES_GRAPH, resource,
+ cancellable, error);
+
+ if (*error != NULL)
+@@ -102,7 +102,7 @@ account_miner_job_process_entry (GomAccountMinerJob *job,
+ gom_tracker_sparql_connection_insert_or_replace_triple
+ (connection,
+ cancellable, error,
+- datasource_urn, resource,
++ TRACKER_PICTURES_GRAPH, resource,
+ "nie:url", identifier);
+
+ if (*error != NULL)
+@@ -119,7 +119,7 @@ account_miner_job_process_entry (GomAccountMinerJob *job,
+ parent_resource_urn = gom_tracker_sparql_connection_ensure_resource
+ (connection, cancellable, error,
+ NULL,
+- datasource_urn, parent_identifier,
++ TRACKER_PICTURES_GRAPH, parent_identifier,
+ "nfo:RemoteDataObject", "nfo:DataContainer", NULL);
+ g_free (parent_identifier);
+
+@@ -129,7 +129,7 @@ account_miner_job_process_entry (GomAccountMinerJob *job,
+ gom_tracker_sparql_connection_insert_or_replace_triple
+ (connection,
+ cancellable, error,
+- datasource_urn, resource,
++ TRACKER_PICTURES_GRAPH, resource,
+ "nie:isPartOf", parent_resource_urn);
+ g_free (parent_resource_urn);
+
+@@ -142,7 +142,7 @@ account_miner_job_process_entry (GomAccountMinerJob *job,
+ gom_tracker_sparql_connection_insert_or_replace_triple
+ (connection,
+ cancellable, error,
+- datasource_urn, resource,
++ TRACKER_PICTURES_GRAPH, resource,
+ "nie:mimeType", mime);
+ g_free (mime);
+
+@@ -154,7 +154,7 @@ account_miner_job_process_entry (GomAccountMinerJob *job,
+ gom_tracker_sparql_connection_insert_or_replace_triple
+ (connection,
+ cancellable, error,
+- datasource_urn, resource,
++ TRACKER_PICTURES_GRAPH, resource,
+ "nie:description", zpj_skydrive_entry_get_description (entry));
+
+ if (*error != NULL)
+@@ -163,7 +163,7 @@ account_miner_job_process_entry (GomAccountMinerJob *job,
+ gom_tracker_sparql_connection_insert_or_replace_triple
+ (connection,
+ cancellable, error,
+- datasource_urn, resource,
++ TRACKER_PICTURES_GRAPH, resource,
+ "nfo:fileName", name);
+
+ if (*error != NULL)
+@@ -180,7 +180,7 @@ account_miner_job_process_entry (GomAccountMinerJob *job,
+ gom_tracker_sparql_connection_insert_or_replace_triple
+ (connection,
+ cancellable, error,
+- datasource_urn, resource,
++ TRACKER_PICTURES_GRAPH, resource,
+ "nco:creator", contact_resource);
+ g_free (contact_resource);
+
+@@ -192,6 +192,6 @@ account_miner_job_process_entry (GomAccountMinerJob *job,
+ gom_tracker_sparql_connection_insert_or_replace_triple
+ (connection,
+ cancellable, error,
+- datasource_urn, resource,
++ TRACKER_PICTURES_GRAPH, resource,
+ "nie:contentCreated", date);
+ g_free (date);
+
+diff --git a/src/gom-miner.c b/src/gom-miner.c
+index 40b111d..f9e4be0 100644
+--- a/src/gom-miner.c
++++ b/src/gom-miner.c
+@@ -381,7 +381,6 @@ gom_miner_ensure_datasource (GomMiner *self,
+
+ tracker_sparql_connection_update (self->priv->connection,
+ datasource_insert->str,
+- G_PRIORITY_DEFAULT,
+ cancellable,
+ error);
+
+@@ -468,7 +467,6 @@ gom_account_miner_job_cleanup_previous (GomAccountMinerJob *job,
+
+ tracker_sparql_connection_update (job->connection,
+ delete->str,
+- G_PRIORITY_DEFAULT,
+ cancellable,
+ error);
+
+@@ -708,7 +706,6 @@ cleanup_job_do_cleanup (CleanupJob *job, GCancellable *cancellable)
+
+ tracker_sparql_connection_update (self->priv->connection,
+ update->str,
+- G_PRIORITY_DEFAULT,
+ cancellable,
+ &error);
+ g_string_free (update, TRUE);
+
+diff --git a/src/gom-tracker.c b/src/gom-tracker.c
+index 469583e..716fc14 100644
+--- a/src/gom-tracker.c
++++ b/src/gom-tracker.c
+@@ -138,9 +138,7 @@ gom_tracker_sparql_connection_ensure_resource (TrackerSparqlConnection *connecti
+ /* not found, create the resource */
+ insert = g_strdup_printf ("INSERT INTO <%s> { _:res %s }",
+ graph, inner->str);
+- insert_res =
+- tracker_sparql_connection_update_blank (connection, insert,
+- G_PRIORITY_DEFAULT, NULL, error);
++ insert_res = tracker_sparql_connection_update_blank (connection, insert, NULL, error);
+ g_free (insert);
+
+ if (*error != NULL)
+@@ -205,9 +203,7 @@ gom_tracker_sparql_connection_insert_or_replace_triple (TrackerSparqlConnection
+
+ g_debug ("Insert or replace triple: query %s", insert->str);
+
+- tracker_sparql_connection_update (connection, insert->str,
+- G_PRIORITY_DEFAULT, cancellable,
+- error);
++ tracker_sparql_connection_update (connection, insert->str, cancellable, error);
+
+ g_string_free (insert, TRUE);
+
+@@ -235,9 +231,7 @@ gom_tracker_sparql_connection_set_triple (TrackerSparqlConnection *connection,
+ "DELETE { <%s> %s ?val } WHERE { <%s> %s ?val }", resource,
+ property_name, resource, property_name);
+
+- tracker_sparql_connection_update (connection, delete->str,
+- G_PRIORITY_DEFAULT, cancellable,
+- error);
++ tracker_sparql_connection_update (connection, delete->str, cancellable, error);
+
+ g_string_free (delete, TRUE);
+ if (*error != NULL)
+@@ -281,9 +275,7 @@ gom_tracker_sparql_connection_toggle_favorite (TrackerSparqlConnection *connecti
+
+ g_debug ("Toggle favorite: query %s", update->str);
+
+- tracker_sparql_connection_update (connection, update->str,
+- G_PRIORITY_DEFAULT, cancellable,
+- error);
++ tracker_sparql_connection_update (connection, update->str, cancellable, error);
+
+ g_string_free (update, TRUE);
+
+@@ -351,9 +343,7 @@ gom_tracker_utils_ensure_contact_resource (TrackerSparqlConnection *connection,
+ mail_uri, email,
+ mail_uri, fullname);
+
+- insert_res =
+- tracker_sparql_connection_update_blank (connection, insert->str,
+- G_PRIORITY_DEFAULT, cancellable, error);
++ insert_res = tracker_sparql_connection_update_blank (connection, insert->str, cancellable, error);
+
+ g_string_free (insert, TRUE);
+
+@@ -452,7 +442,7 @@ gom_tracker_utils_ensure_equipment_resource (TrackerSparqlConnection *connection
+ model);
+
+ local_error = NULL;
+- tracker_sparql_connection_update (connection, insert, G_PRIORITY_DEFAULT, cancellable, &local_error);
++ tracker_sparql_connection_update (connection, insert, cancellable, &local_error);
+ if (local_error != NULL)
+ {
+ g_propagate_error (error, local_error);
diff --git a/gnu/packages/patches/gnome-screenshot-meson-0.60.patch b/gnu/packages/patches/gnome-screenshot-meson-0.60.patch
new file mode 100644
index 0000000000..c80ce9d6a3
--- /dev/null
+++ b/gnu/packages/patches/gnome-screenshot-meson-0.60.patch
@@ -0,0 +1,39 @@
+Fixes build issue with Meson 0.60.0. Taken from upstream
+https://gitlab.gnome.org/GNOME/gnome-screenshot/-/merge_requests/57
+
+From b60dad3c2536c17bd201f74ad8e40eb74385ed9f Mon Sep 17 00:00:00 2001
+From: Jack Hill <jackhill@jackhill.us>
+Date: Thu, 18 Nov 2021 00:46:58 -0500
+Subject: [PATCH] meson: remove extraneous positional argument
+
+* data/meson.build (desktop_file)
+ (metainfo_file): Remove extraneous positional argument.
+
+Closes #186
+---
+ data/meson.build | 2 --
+ 1 file changed, 2 deletions(-)
+
+diff --git a/data/meson.build b/data/meson.build
+index fd570b3..4e2e2e8 100644
+--- a/data/meson.build
++++ b/data/meson.build
+@@ -1,7 +1,6 @@
+ gnome = import('gnome')
+
+ desktop_file = i18n.merge_file(
+- 'desktop',
+ type: 'desktop',
+ input: 'org.gnome.Screenshot.desktop.in',
+ output: 'org.gnome.Screenshot.desktop',
+@@ -23,7 +22,6 @@ if desktop_file_validate.found()
+ endif
+
+ metainfo_file = i18n.merge_file(
+- 'appdata',
+ input: 'org.gnome.Screenshot.metainfo.xml.in',
+ output: 'org.gnome.Screenshot.metainfo.xml',
+ po_dir: join_paths(meson.current_source_dir(), '../po'),
+--
+2.33.1
+
diff --git a/gnu/packages/patches/gnome-session-support-elogind.patch b/gnu/packages/patches/gnome-session-support-elogind.patch
new file mode 100644
index 0000000000..b52b4c6855
--- /dev/null
+++ b/gnu/packages/patches/gnome-session-support-elogind.patch
@@ -0,0 +1,73 @@
+This patch, borrowed from Gentoo, allows configuring gnome-sesssion with
+elogind support.
+
+https://gitweb.gentoo.org/repo/gentoo.git/plain/gnome-base/gnome-session/files/gnome-session-3.38.0-meson-Support-elogind.patch?id=5f7fe88af5f888aff58fa0c069c3fe07973c7cd2
+
+From 4454f2a63394b69fba2c900151165ad8b5742f31 Mon Sep 17 00:00:00 2001
+From: Mart Raudsepp <leio@gentoo.org>
+Date: Sun, 15 Mar 2020 14:34:39 +0200
+Subject: [PATCH] meson: Support elogind
+
+---
+ meson.build | 12 +++++++++---
+ meson_options.txt | 1 +
+ 2 files changed, 10 insertions(+), 3 deletions(-)
+
+diff --git a/meson.build b/meson.build
+index ef5132c6..7f68aaae 100644
+--- a/meson.build
++++ b/meson.build
+@@ -124,8 +124,10 @@ enable_systemd = get_option('systemd')
+ enable_systemd_session = get_option('systemd_session') != 'disable'
+ use_systemd_session = get_option('systemd_session') == 'default'
+ enable_systemd_journal = get_option('systemd_journal')
++enable_elogind = get_option('elogind')
+ enable_consolekit = get_option('consolekit')
+-if enable_systemd or enable_consolekit
++assert(not (enable_systemd and enable_elogind), 'Can not support systemd and elogind at once')
++if enable_systemd or enable_elogind or enable_consolekit
+ session_bin_deps += dependency('gio-unix-2.0', version: glib_req_version)
+
+ # Check for systemd
+@@ -152,6 +154,10 @@ if enable_systemd or enable_consolekit
+ endif
+
+ session_tracking = 'systemd'
++ elif enable_elogind
++ libelogind_dep = dependency('libelogind', version: '>= 239.4')
++ session_bin_deps += libelogind_dep
++ session_tracking = 'elogind'
+ endif
+
+ # Check for ConsoleKit
+@@ -161,7 +167,7 @@ if enable_systemd or enable_consolekit
+
+ session_bin_deps += dbus_glib_dep
+
+- if enable_systemd
++ if enable_systemd or enable_elogind
+ session_tracking += ' (with fallback to ConsoleKit)'
+ else
+ session_tracking = 'ConsoleKit'
+@@ -171,7 +177,7 @@ endif
+ if enable_systemd_session
+ assert(enable_systemd, 'Systemd support must be enabled when using systemd session management')
+ endif
+-config_h.set('HAVE_SYSTEMD', enable_systemd)
++config_h.set('HAVE_SYSTEMD', enable_systemd or enable_elogind)
+ config_h.set('ENABLE_SYSTEMD_SESSION', enable_systemd_session)
+ config_h.set('ENABLE_SYSTEMD_JOURNAL', enable_systemd_journal)
+ config_h.set('HAVE_CONSOLEKIT', enable_consolekit)
+diff --git a/meson_options.txt b/meson_options.txt
+index 4c05dc6e..512d1528 100644
+--- a/meson_options.txt
++++ b/meson_options.txt
+@@ -1,4 +1,5 @@
+ option('deprecation_flags', type: 'boolean', value: false, description: 'use *_DISABLE_DEPRECATED flags')
++option('elogind', type: 'boolean', value: true, description: 'Use elogind')
+ option('session_selector', type: 'boolean', value: false, description: 'enable building a custom session selector dialog')
+ option('systemd', type: 'boolean', value: true, description: 'Use systemd')
+ option('systemd_session', type: 'combo', choices: ['disable', 'enable', 'default'], value: 'default', description: 'Whether to include systemd session support and use it by default')
+--
+2.26.2
+
diff --git a/gnu/packages/patches/gnome-shell-CVE-2020-17489.patch b/gnu/packages/patches/gnome-shell-CVE-2020-17489.patch
deleted file mode 100644
index 4b7748950e..0000000000
--- a/gnu/packages/patches/gnome-shell-CVE-2020-17489.patch
+++ /dev/null
@@ -1,46 +0,0 @@
-From 05b7aec747282f62212b605249d518280ff80059 Mon Sep 17 00:00:00 2001
-From: Ray Strode <rstrode@redhat.com>
-Date: Mon, 27 Jul 2020 10:58:22 -0400
-Subject: [PATCH] loginDialog: Reset auth prompt on vt switch before fade in
-
-At the moment, if a user switches to the login screen vt,
-the login screen fades in whatever was on screen prior, and
-then does a reset.
-
-It makes more sense to reset first, so we fade in what the
-user is going to interact with instead of what they interacted
-with before.
-
-Fixes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/2997
----
- js/gdm/loginDialog.js | 9 ++++-----
- 1 file changed, 4 insertions(+), 5 deletions(-)
-
-diff --git a/js/gdm/loginDialog.js b/js/gdm/loginDialog.js
-index c3f90dc58..6b35ebb16 100644
---- a/js/gdm/loginDialog.js
-+++ b/js/gdm/loginDialog.js
-@@ -920,16 +920,15 @@ var LoginDialog = GObject.registerClass({
- if (this.opacity == 255 && this._authPrompt.verificationStatus == AuthPrompt.AuthPromptStatus.NOT_VERIFYING)
- return;
-
-+ if (this._authPrompt.verificationStatus !== AuthPrompt.AuthPromptStatus.NOT_VERIFYING)
-+ this._authPrompt.reset();
-+
- this._bindOpacity();
- this.ease({
- opacity: 255,
- duration: _FADE_ANIMATION_TIME,
- mode: Clutter.AnimationMode.EASE_OUT_QUAD,
-- onComplete: () => {
-- if (this._authPrompt.verificationStatus != AuthPrompt.AuthPromptStatus.NOT_VERIFYING)
-- this._authPrompt.reset();
-- this._unbindOpacity();
-- }
-+ onComplete: () => this._unbindOpacity(),
- });
- }
-
---
-2.30.1
-
diff --git a/gnu/packages/patches/gnome-shell-disable-test.patch b/gnu/packages/patches/gnome-shell-disable-test.patch
deleted file mode 100644
index b4c7e73cd7..0000000000
--- a/gnu/packages/patches/gnome-shell-disable-test.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-This test seems to require a D-Bus connection not available in the build
-environment.
-
-diff -ur /tmp/guix-build-gnome-shell-3.34.2.drv-0/gnome-shell-3.34.2/src/st/meson.build b/src/st/meson.build
---- /tmp/guix-build-gnome-shell-3.34.2.drv-0/gnome-shell-3.34.2/src/st/meson.build 1969-12-31 19:00:00.000000000 -0500
-+++ b/src/st/meson.build 2019-12-23 00:46:14.721198022 -0500
-@@ -132,18 +132,6 @@
- sources: st_enums[1]
- )
-
--test_theme = executable('test-theme',
-- sources: 'test-theme.c',
-- c_args: st_cflags,
-- dependencies: [mutter_dep, gtk_dep],
-- build_rpath: mutter_typelibdir,
-- link_with: libst
--)
--
--test('CSS styling support', test_theme,
-- workdir: meson.current_source_dir()
--)
--
- libst_gir = gnome.generate_gir(libst,
- sources: st_gir_sources,
- nsversion: '1.0',
diff --git a/gnu/packages/patches/gnome-shell-theme.patch b/gnu/packages/patches/gnome-shell-theme.patch
deleted file mode 100644
index 3fa0670c43..0000000000
--- a/gnu/packages/patches/gnome-shell-theme.patch
+++ /dev/null
@@ -1,51 +0,0 @@
-Adjust GNOME-Shell so that it uses a Guix theme by default.
-
-Patch by Ludovic Courtès <ludo@gnu.org>.
-
-diff -ur a/data/gnome-shell-theme.gresource.xml b/data/gnome-shell-theme.gresource.xml
---- a/data/gnome-shell-theme.gresource.xml 2019-12-11 15:06:31.000000000 -0500
-+++ b/data/gnome-shell-theme.gresource.xml 2019-12-21 00:31:55.895866241 -0500
-@@ -19,6 +19,8 @@
- <file>no-events.svg</file>
- <file>no-notifications.svg</file>
- <file>noise-texture.png</file>
-+ <file>guix-background.png</file>
-+ <file>guix-logo.png</file>
- <file>pad-osd.css</file>
- <file alias="icons/pointer-double-click-symbolic.svg">pointer-double-click-symbolic.svg</file>
- <file alias="icons/pointer-drag-symbolic.svg">pointer-drag-symbolic.svg</file>
-diff -ur a/data/theme/gnome-shell-sass/_common.scss b/data/theme/gnome-shell-sass/_common.scss
---- a/data/theme/gnome-shell-sass/_common.scss 2019-12-11 15:06:31.000000000 -0500
-+++ b/data/theme/gnome-shell-sass/_common.scss 2019-12-21 00:33:49.495832135 -0500
-@@ -1994,7 +1994,16 @@
- }
- }
-
-- .login-dialog-logo-bin { padding: 24px 0px; }
-+ .login-dialog-logo-bin {
-+ /* Make it a bit narrower than .login-dialog-user-list. */
-+ width: 12em;
-+ height: 8em;
-+ background: url(resource:///org/gnome/shell/theme/guix-logo.png);
-+ background-color: transparent;
-+ background-repeat: no-repeat;
-+ background-size: contain;
-+ background-position: center; }
-+
- .login-dialog-banner { color: darken($osd_fg_color,10%); }
- .login-dialog-button-box { spacing: 5px; }
- .login-dialog-message-warning { color: $warning_color; }
-@@ -2143,9 +2152,10 @@
- }
-
- #lockDialogGroup {
-- background: lighten(#2e3436, 8%) url(resource:///org/gnome/shell/theme/noise-texture.png);
-- background-repeat: repeat;
--}
-+ background: lighten(#2e3436, 8%) url(resource:///org/gnome/shell/theme/guix-background.png);
-+ background-repeat: no-repeat;
-+ background-size: cover;
-+ background-position: center; }
-
- #screenShieldNotifications {
- StButton#vhandle, StButton#hhandle {
diff --git a/gnu/packages/patches/gnome-todo-delete-esource-duplicate.patch b/gnu/packages/patches/gnome-todo-delete-esource-duplicate.patch
deleted file mode 100644
index c680e86495..0000000000
--- a/gnu/packages/patches/gnome-todo-delete-esource-duplicate.patch
+++ /dev/null
@@ -1,10 +0,0 @@
-From: Emmanuele Bassi <ebassi@gnome.org>
-
-See also: https://gitlab.gnome.org/GNOME/gnome-todo/commit/6cdabc4dd0c6c804a093b94c269461ce376fed4f
---- gnome-todo-3.28.1/plugins/eds/gtd-eds-autoptr.h.orig 2020-05-06 14:20:49.589902539 +0200
-+++ gnome-todo-3.28.1/plugins/eds/gtd-eds-autoptr.h 2020-05-06 14:20:54.593919721 +0200
-@@ -25,4 +25,3 @@
- G_DEFINE_AUTOPTR_CLEANUP_FUNC (ECalComponent, g_object_unref);
- G_DEFINE_AUTOPTR_CLEANUP_FUNC (ECalComponentId, e_cal_component_free_id);
- G_DEFINE_AUTOPTR_CLEANUP_FUNC (ECalClient, g_object_unref);
--G_DEFINE_AUTOPTR_CLEANUP_FUNC (ESource, g_object_unref);
diff --git a/gnu/packages/patches/gnupg-1-build-with-gcc10.patch b/gnu/packages/patches/gnupg-1-build-with-gcc10.patch
new file mode 100644
index 0000000000..40b2aff98e
--- /dev/null
+++ b/gnu/packages/patches/gnupg-1-build-with-gcc10.patch
@@ -0,0 +1,64 @@
+Borrowed from Debian
+https://sources.debian.org/src/gnupg1/1.4.23-1.1/debian/patches/0006-fix-for-gcc10.patch/
+
+Subject: Fix build with gcc-10
+Author: Christoph Biedl <debian.axhn@manchmal.in-ulm.de>
+Date: 2021-01-04
+Bug: https://dev.gnupg.org/T5215
+Bug-Debian: https://bugs.debian.org/957293
+
+--- a/g10/options.h
++++ b/g10/options.h
+@@ -29,6 +29,8 @@
+ /* Norcraft can't cope with common symbols */
+ #if defined (__riscos__) && !defined (INCLUDED_BY_MAIN_MODULE)
+ #define EXTERN_UNLESS_MAIN_MODULE extern
++#elif defined (__GNUC__) && __GNUC__ >= 10
++#define EXTERN_UNLESS_MAIN_MODULE __attribute__((__common__))
+ #else
+ #define EXTERN_UNLESS_MAIN_MODULE
+ #endif
+--- a/include/cipher.h
++++ b/include/cipher.h
+@@ -117,6 +117,8 @@
+ #ifndef EXTERN_UNLESS_MAIN_MODULE
+ #if defined (__riscos__) && !defined (INCLUDED_BY_MAIN_MODULE)
+ #define EXTERN_UNLESS_MAIN_MODULE extern
++#elif defined (__GNUC__) && __GNUC__ >= 10
++#define EXTERN_UNLESS_MAIN_MODULE __attribute__((__common__))
+ #else
+ #define EXTERN_UNLESS_MAIN_MODULE
+ #endif
+--- a/include/iobuf.h
++++ b/include/iobuf.h
+@@ -72,6 +72,8 @@
+ #ifndef EXTERN_UNLESS_MAIN_MODULE
+ #if defined (__riscos__) && !defined (INCLUDED_BY_MAIN_MODULE)
+ #define EXTERN_UNLESS_MAIN_MODULE extern
++#elif defined (__GNUC__) && __GNUC__ >= 10
++#define EXTERN_UNLESS_MAIN_MODULE __attribute__((__common__))
+ #else
+ #define EXTERN_UNLESS_MAIN_MODULE
+ #endif
+--- a/include/memory.h
++++ b/include/memory.h
+@@ -93,6 +93,8 @@
+ #ifndef EXTERN_UNLESS_MAIN_MODULE
+ #if defined (__riscos__) && !defined (INCLUDED_BY_MAIN_MODULE)
+ #define EXTERN_UNLESS_MAIN_MODULE extern
++#elif defined (__GNUC__) && __GNUC__ >= 10
++#define EXTERN_UNLESS_MAIN_MODULE __attribute__((__common__))
+ #else
+ #define EXTERN_UNLESS_MAIN_MODULE
+ #endif
+--- a/include/mpi.h
++++ b/include/mpi.h
+@@ -38,6 +38,8 @@
+ #ifndef EXTERN_UNLESS_MAIN_MODULE
+ #if defined (__riscos__) && !defined (INCLUDED_BY_MAIN_MODULE)
+ #define EXTERN_UNLESS_MAIN_MODULE extern
++#elif defined (__GNUC__) && __GNUC__ >= 10
++#define EXTERN_UNLESS_MAIN_MODULE __attribute__((__common__))
+ #else
+ #define EXTERN_UNLESS_MAIN_MODULE
+ #endif
diff --git a/gnu/packages/patches/gnutls-CVE-2021-20231.patch b/gnu/packages/patches/gnutls-CVE-2021-20231.patch
deleted file mode 100644
index 5186522eee..0000000000
--- a/gnu/packages/patches/gnutls-CVE-2021-20231.patch
+++ /dev/null
@@ -1,62 +0,0 @@
-From 15beb4b193b2714d88107e7dffca781798684e7e Mon Sep 17 00:00:00 2001
-From: Daiki Ueno <ueno@gnu.org>
-Date: Fri, 29 Jan 2021 14:06:05 +0100
-Subject: [PATCH 1/2] key_share: avoid use-after-free around realloc
-
-Signed-off-by: Daiki Ueno <ueno@gnu.org>
----
- lib/ext/key_share.c | 12 +++++-------
- 1 file changed, 5 insertions(+), 7 deletions(-)
-
-diff --git a/lib/ext/key_share.c b/lib/ext/key_share.c
-index ab8abf8fe..a8c4bb5cf 100644
---- a/lib/ext/key_share.c
-+++ b/lib/ext/key_share.c
-@@ -664,14 +664,14 @@ key_share_send_params(gnutls_session_t session,
- {
- unsigned i;
- int ret;
-- unsigned char *lengthp;
-- unsigned int cur_length;
- unsigned int generated = 0;
- const gnutls_group_entry_st *group;
- const version_entry_st *ver;
-
- /* this extension is only being sent on client side */
- if (session->security_parameters.entity == GNUTLS_CLIENT) {
-+ unsigned int length_pos;
-+
- ver = _gnutls_version_max(session);
- if (unlikely(ver == NULL || ver->key_shares == 0))
- return 0;
-@@ -679,16 +679,13 @@ key_share_send_params(gnutls_session_t session,
- if (!have_creds_for_tls13(session))
- return 0;
-
-- /* write the total length later */
-- lengthp = &extdata->data[extdata->length];
-+ length_pos = extdata->length;
-
- ret =
- _gnutls_buffer_append_prefix(extdata, 16, 0);
- if (ret < 0)
- return gnutls_assert_val(ret);
-
-- cur_length = extdata->length;
--
- if (session->internals.hsk_flags & HSK_HRR_RECEIVED) { /* we know the group */
- group = get_group(session);
- if (unlikely(group == NULL))
-@@ -736,7 +733,8 @@ key_share_send_params(gnutls_session_t session,
- }
-
- /* copy actual length */
-- _gnutls_write_uint16(extdata->length - cur_length, lengthp);
-+ _gnutls_write_uint16(extdata->length - length_pos - 2,
-+ &extdata->data[length_pos]);
-
- } else { /* server */
- ver = get_version(session);
---
-2.30.2
-
diff --git a/gnu/packages/patches/gnutls-CVE-2021-20232.patch b/gnu/packages/patches/gnutls-CVE-2021-20232.patch
deleted file mode 100644
index dc3a0be690..0000000000
--- a/gnu/packages/patches/gnutls-CVE-2021-20232.patch
+++ /dev/null
@@ -1,60 +0,0 @@
-From 75a937d97f4fefc6f9b08e3791f151445f551cb3 Mon Sep 17 00:00:00 2001
-From: Daiki Ueno <ueno@gnu.org>
-Date: Fri, 29 Jan 2021 14:06:23 +0100
-Subject: [PATCH 2/2] pre_shared_key: avoid use-after-free around realloc
-
-Signed-off-by: Daiki Ueno <ueno@gnu.org>
----
- lib/ext/pre_shared_key.c | 15 ++++++++++++---
- 1 file changed, 12 insertions(+), 3 deletions(-)
-
-diff --git a/lib/ext/pre_shared_key.c b/lib/ext/pre_shared_key.c
-index a042c6488..380bf39ed 100644
---- a/lib/ext/pre_shared_key.c
-+++ b/lib/ext/pre_shared_key.c
-@@ -267,7 +267,7 @@ client_send_params(gnutls_session_t session,
- size_t spos;
- gnutls_datum_t username = {NULL, 0};
- gnutls_datum_t user_key = {NULL, 0}, rkey = {NULL, 0};
-- gnutls_datum_t client_hello;
-+ unsigned client_hello_len;
- unsigned next_idx;
- const mac_entry_st *prf_res = NULL;
- const mac_entry_st *prf_psk = NULL;
-@@ -428,8 +428,7 @@ client_send_params(gnutls_session_t session,
- assert(extdata->length >= sizeof(mbuffer_st));
- assert(ext_offset >= (ssize_t)sizeof(mbuffer_st));
- ext_offset -= sizeof(mbuffer_st);
-- client_hello.data = extdata->data+sizeof(mbuffer_st);
-- client_hello.size = extdata->length-sizeof(mbuffer_st);
-+ client_hello_len = extdata->length-sizeof(mbuffer_st);
-
- next_idx = 0;
-
-@@ -440,6 +439,11 @@ client_send_params(gnutls_session_t session,
- }
-
- if (prf_res && rkey.size > 0) {
-+ gnutls_datum_t client_hello;
-+
-+ client_hello.data = extdata->data+sizeof(mbuffer_st);
-+ client_hello.size = client_hello_len;
-+
- ret = compute_psk_binder(session, prf_res,
- binders_len, binders_pos,
- ext_offset, &rkey, &client_hello, 1,
-@@ -474,6 +478,11 @@ client_send_params(gnutls_session_t session,
- }
-
- if (prf_psk && user_key.size > 0 && info) {
-+ gnutls_datum_t client_hello;
-+
-+ client_hello.data = extdata->data+sizeof(mbuffer_st);
-+ client_hello.size = client_hello_len;
-+
- ret = compute_psk_binder(session, prf_psk,
- binders_len, binders_pos,
- ext_offset, &user_key, &client_hello, 0,
---
-2.30.2
-
diff --git a/gnu/packages/patches/gnutls-guile-eintr-eagain.patch b/gnu/packages/patches/gnutls-guile-eintr-eagain.patch
new file mode 100644
index 0000000000..e04c945158
--- /dev/null
+++ b/gnu/packages/patches/gnutls-guile-eintr-eagain.patch
@@ -0,0 +1,56 @@
+Fixes <https://issues.guix.gnu.org/47867>.
+
+This fix was merged upstream
+in <https://gitlab.com/gnutls/gnutls/-/merge_requests/1417> and will
+be in GnuTLS 3.7.3. Upstream commit:
+
+commit 110e2172dbef1fbdf7399dab1e80780847b61c0c
+Author: Ludovic Courtès <ludo@gnu.org>
+Date: Sat Apr 24 22:02:14 2021 +0200
+
+ guile: Writes to record ports handle EAGAIN/EINTR transparently.
+
+diff --git a/guile/src/core.c b/guile/src/core.c
+index a13670fc7b..0926dc8a97 100644
+--- a/guile/src/core.c
++++ b/guile/src/core.c
+@@ -985,7 +985,10 @@ write_to_session_record_port (SCM port, const void *data, size_t size)
+ c_result = gnutls_record_send (c_session, (char *) data + c_sent,
+ size - c_sent);
+ if (EXPECT_FALSE (c_result < 0))
+- scm_gnutls_error (c_result, FUNC_NAME);
++ {
++ if (c_result != GNUTLS_E_AGAIN && c_result != GNUTLS_E_INTERRUPTED)
++ scm_gnutls_error (c_result, FUNC_NAME);
++ }
+ else
+ c_sent += c_result;
+ }
+@@ -1069,7 +1072,8 @@ read_from_session_record_port (SCM port, SCM dst, size_t start, size_t count)
+ #undef FUNC_NAME
+
+ /* Return the file descriptor that backs PORT. This function is called upon a
+- blocking read--i.e., 'read_from_session_record_port' returned -1. */
++ blocking read--i.e., 'read_from_session_record_port' or
++ 'write_to_session_record_port' returned -1. */
+ static int
+ session_record_port_fd (SCM port)
+ {
+@@ -1097,7 +1101,16 @@ write_to_session_record_port (SCM port, SCM src, size_t start, size_t count)
+ c_session = scm_to_gnutls_session (session, 1, FUNC_NAME);
+ data = (char *) SCM_BYTEVECTOR_CONTENTS (src) + start;
+
+- result = gnutls_record_send (c_session, data, count);
++ do
++ result = gnutls_record_send (c_session, data, count);
++ while (result == GNUTLS_E_INTERRUPTED
++ || (result == GNUTLS_E_AGAIN
++ && !SCM_GNUTLS_SESSION_TRANSPORT_IS_FD (c_session)));
++
++ if (result == GNUTLS_E_AGAIN
++ && SCM_GNUTLS_SESSION_TRANSPORT_IS_FD (c_session))
++ /* Tell Guile that reading would block. */
++ return (size_t) -1;
+
+ if (EXPECT_FALSE (result < 0))
+ scm_gnutls_error (result, FUNC_NAME);
diff --git a/gnu/packages/patches/graphviz-CVE-2020-18032.patch b/gnu/packages/patches/graphviz-CVE-2020-18032.patch
deleted file mode 100644
index 4cf94a9a36..0000000000
--- a/gnu/packages/patches/graphviz-CVE-2020-18032.patch
+++ /dev/null
@@ -1,49 +0,0 @@
-Fix CVE-2020-18032:
-
-https://cve.mitre.org/cgi-bin/cvename.cgi?name=2020-18032
-https://gitlab.com/graphviz/graphviz/-/issues/1700
-
-Patch copied from upstream source repository:
-
-https://gitlab.com/graphviz/graphviz/-/commit/784411ca3655c80da0f6025ab20634b2a6ff696b
-
-From 784411ca3655c80da0f6025ab20634b2a6ff696b Mon Sep 17 00:00:00 2001
-From: Matthew Fernandez <matthew.fernandez@gmail.com>
-Date: Sat, 25 Jul 2020 19:31:01 -0700
-Subject: [PATCH] fix: out-of-bounds write on invalid label
-
-When the label for a node cannot be parsed (due to it being malformed), it falls
-back on the symbol name of the node itself. I.e. the default label the node
-would have had if it had no label attribute at all. However, this is applied by
-dynamically altering the node's label to "\N", a shortcut for the symbol name of
-the node. All of this is fine, however if the hand written label itself is
-shorter than the literal string "\N", not enough memory would have been
-allocated to write "\N" into the label text.
-
-Here we account for the possibility of error during label parsing, and assume
-that the label text may need to be overwritten with "\N" after the fact. Fixes
-issue #1700.
----
- lib/common/shapes.c | 5 +++--
- 1 file changed, 3 insertions(+), 2 deletions(-)
-
-diff --git a/lib/common/shapes.c b/lib/common/shapes.c
-index 0a0635fc3..9dca9ba6e 100644
---- a/lib/common/shapes.c
-+++ b/lib/common/shapes.c
-@@ -3546,9 +3546,10 @@ static void record_init(node_t * n)
- reclblp = ND_label(n)->text;
- len = strlen(reclblp);
- /* For some forgotten reason, an empty label is parsed into a space, so
-- * we need at least two bytes in textbuf.
-+ * we need at least two bytes in textbuf, as well as accounting for the
-+ * error path involving "\\N" below.
- */
-- len = MAX(len, 1);
-+ len = MAX(MAX(len, 1), (int)strlen("\\N"));
- textbuf = N_NEW(len + 1, char);
- if (!(info = parse_reclbl(n, flip, TRUE, textbuf))) {
- agerr(AGERR, "bad label format %s\n", ND_label(n)->text);
---
-2.31.1
-
diff --git a/gnu/packages/patches/gst-libav-64channels-stack-corruption.patch b/gnu/packages/patches/gst-libav-64channels-stack-corruption.patch
deleted file mode 100644
index cc174e618d..0000000000
--- a/gnu/packages/patches/gst-libav-64channels-stack-corruption.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-Fix a stack corruption when handling files with more than 64 audio
-channels:
-
-https://gstreamer.freedesktop.org/security/sa-2021-0005.html
-
-Patch copied from upstream source repository:
-
-https://gitlab.freedesktop.org/gstreamer/gst-libav/-/commit/dcea8baa14a5fc3b796d876baaf2f238546ba2b1
-
-diff --git a/ext/libav/gstavcodecmap.c b/ext/libav/gstavcodecmap.c
-index b5be4bb7a5f2712f78383da9319754a8849e3307..be22f22cf5c7c7b22b13e44b10999adaacbcca2b 100644
---- a/ext/libav/gstavcodecmap.c
-+++ b/ext/libav/gstavcodecmap.c
-@@ -102,7 +102,7 @@ gst_ffmpeg_channel_layout_to_gst (guint64 channel_layout, gint channels,
- guint nchannels = 0;
- gboolean none_layout = FALSE;
-
-- if (channel_layout == 0) {
-+ if (channel_layout == 0 || channels > 64) {
- nchannels = channels;
- none_layout = TRUE;
- } else {
-@@ -163,7 +163,7 @@ gst_ffmpeg_channel_layout_to_gst (guint64 channel_layout, gint channels,
- } else {
- guint i;
-
-- for (i = 0; i < nchannels; i++)
-+ for (i = 0; i < nchannels && i < 64; i++)
- pos[i] = GST_AUDIO_CHANNEL_POSITION_NONE;
- }
- }
diff --git a/gnu/packages/patches/gst-plugins-bad-fix-overflow.patch b/gnu/packages/patches/gst-plugins-bad-fix-overflow.patch
deleted file mode 100644
index 95ab13db51..0000000000
--- a/gnu/packages/patches/gst-plugins-bad-fix-overflow.patch
+++ /dev/null
@@ -1,263 +0,0 @@
-Fix an overflow when calculating something for AVC/HEVC videos:
-
-https://security-tracker.debian.org/tracker/TEMP-0000000-C6AAE1
-
-Patch copied from upstream source repository:
-
-https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/commit/0cfbf7ad91c7f121192c8ce135769f8eb276c41d
-From 0cfbf7ad91c7f121192c8ce135769f8eb276c41d Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= <sebastian@centricular.com>
-Date: Tue, 23 Mar 2021 19:19:14 +0200
-Subject: [PATCH] h2645parser: Catch overflows in AVC/HEVC NAL unit length
- calculations
-
-Offset and size are stored as 32 bit guint and might overflow when
-adding the nal_length_size, so let's avoid that.
-
-For the size this would happen if the AVC/HEVC NAL unit size happens to
-be stored in 4 bytes and is 4294967292 or higher, which is likely
-corrupted data anyway.
-
-For the offset this is something for the caller of these functions to
-take care of but is unlikely to happen as it would require parsing on a
->4GB buffer.
-
-Allowing these overflows causes all kinds of follow-up bugs in the
-h2645parse elements, ranging from infinite loops and memory leaks to
-potential memory corruptions.
-
-Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2107>
----
- gst-libs/gst/codecparsers/gsth264parser.c | 16 +++++-
- gst-libs/gst/codecparsers/gsth265parser.c | 16 +++++-
- tests/check/libs/h264parser.c | 60 +++++++++++++++++++++++
- tests/check/libs/h265parser.c | 60 +++++++++++++++++++++++
- 4 files changed, 150 insertions(+), 2 deletions(-)
-
-diff --git a/gst-libs/gst/codecparsers/gsth264parser.c b/gst-libs/gst/codecparsers/gsth264parser.c
-index 012f1d0d7..68aa25068 100644
---- a/gst-libs/gst/codecparsers/gsth264parser.c
-+++ b/gst-libs/gst/codecparsers/gsth264parser.c
-@@ -1556,6 +1556,14 @@ gst_h264_parser_identify_nalu_avc (GstH264NalParser * nalparser,
-
- memset (nalu, 0, sizeof (*nalu));
-
-+ /* Would overflow guint below otherwise: the callers needs to ensure that
-+ * this never happens */
-+ if (offset > G_MAXUINT32 - nal_length_size) {
-+ GST_WARNING ("offset + nal_length_size overflow");
-+ nalu->size = 0;
-+ return GST_H264_PARSER_BROKEN_DATA;
-+ }
-+
- if (size < offset + nal_length_size) {
- GST_DEBUG ("Can't parse, buffer has too small size %" G_GSIZE_FORMAT
- ", offset %u", size, offset);
-@@ -1570,7 +1578,13 @@ gst_h264_parser_identify_nalu_avc (GstH264NalParser * nalparser,
- nalu->sc_offset = offset;
- nalu->offset = offset + nal_length_size;
-
-- if (size < nalu->size + nal_length_size) {
-+ if (nalu->size > G_MAXUINT32 - nal_length_size) {
-+ GST_WARNING ("NALU size + nal_length_size overflow");
-+ nalu->size = 0;
-+ return GST_H264_PARSER_BROKEN_DATA;
-+ }
-+
-+ if (size < (gsize) nalu->size + nal_length_size) {
- nalu->size = 0;
-
- return GST_H264_PARSER_NO_NAL_END;
-diff --git a/gst-libs/gst/codecparsers/gsth265parser.c b/gst-libs/gst/codecparsers/gsth265parser.c
-index 26e68b276..dc7f27aa9 100644
---- a/gst-libs/gst/codecparsers/gsth265parser.c
-+++ b/gst-libs/gst/codecparsers/gsth265parser.c
-@@ -1531,6 +1531,14 @@ gst_h265_parser_identify_nalu_hevc (GstH265Parser * parser,
-
- memset (nalu, 0, sizeof (*nalu));
-
-+ /* Would overflow guint below otherwise: the callers needs to ensure that
-+ * this never happens */
-+ if (offset > G_MAXUINT32 - nal_length_size) {
-+ GST_WARNING ("offset + nal_length_size overflow");
-+ nalu->size = 0;
-+ return GST_H265_PARSER_BROKEN_DATA;
-+ }
-+
- if (size < offset + nal_length_size) {
- GST_DEBUG ("Can't parse, buffer has too small size %" G_GSIZE_FORMAT
- ", offset %u", size, offset);
-@@ -1545,7 +1553,13 @@ gst_h265_parser_identify_nalu_hevc (GstH265Parser * parser,
- nalu->sc_offset = offset;
- nalu->offset = offset + nal_length_size;
-
-- if (size < nalu->size + nal_length_size) {
-+ if (nalu->size > G_MAXUINT32 - nal_length_size) {
-+ GST_WARNING ("NALU size + nal_length_size overflow");
-+ nalu->size = 0;
-+ return GST_H265_PARSER_BROKEN_DATA;
-+ }
-+
-+ if (size < (gsize) nalu->size + nal_length_size) {
- nalu->size = 0;
-
- return GST_H265_PARSER_NO_NAL_END;
-diff --git a/tests/check/libs/h264parser.c b/tests/check/libs/h264parser.c
-index c7c46d9a2..d322dd8db 100644
---- a/tests/check/libs/h264parser.c
-+++ b/tests/check/libs/h264parser.c
-@@ -229,6 +229,65 @@ GST_START_TEST (test_h264_parse_slice_5bytes)
-
- GST_END_TEST;
-
-+GST_START_TEST (test_h264_parse_identify_nalu_avc)
-+{
-+ GstH264ParserResult res;
-+ GstH264NalUnit nalu;
-+ GstH264NalParser *const parser = gst_h264_nal_parser_new ();
-+ /* Skip 3 bytes for the start code */
-+ const gsize nal_size = sizeof (slice_dpa) - 3;
-+ const gsize buf_size = 4 + nal_size;
-+ guint8 *buf = g_new (guint8, buf_size);
-+
-+ memcpy (buf + 4, slice_dpa + 3, nal_size);
-+
-+ GST_WRITE_UINT16_BE (buf + 2, nal_size);
-+ res = gst_h264_parser_identify_nalu_avc (parser, buf, 2, buf_size, 2, &nalu);
-+
-+ assert_equals_int (res, GST_H264_PARSER_OK);
-+ assert_equals_int (nalu.type, GST_H264_NAL_SLICE_DPA);
-+ assert_equals_int (nalu.offset, 4);
-+ assert_equals_int (nalu.size, nal_size);
-+
-+ GST_WRITE_UINT32_BE (buf, nal_size);
-+ res = gst_h264_parser_identify_nalu_avc (parser, buf, 0, buf_size, 4, &nalu);
-+
-+ assert_equals_int (res, GST_H264_PARSER_OK);
-+ assert_equals_int (nalu.type, GST_H264_NAL_SLICE_DPA);
-+ assert_equals_int (nalu.offset, 4);
-+ assert_equals_int (nalu.size, nal_size);
-+
-+ GST_WRITE_UINT32_BE (buf, G_MAXUINT32);
-+ res = gst_h264_parser_identify_nalu_avc (parser, buf, 0, buf_size, 4, &nalu);
-+
-+ assert_equals_int (res, GST_H264_PARSER_BROKEN_DATA);
-+
-+ GST_WRITE_UINT32_BE (buf, G_MAXUINT32 - 2);
-+ res = gst_h264_parser_identify_nalu_avc (parser, buf, 0, buf_size, 4, &nalu);
-+
-+ assert_equals_int (res, GST_H264_PARSER_BROKEN_DATA);
-+
-+ GST_WRITE_UINT32_BE (buf, G_MAXUINT32 - 3);
-+ res = gst_h264_parser_identify_nalu_avc (parser, buf, 0, buf_size, 4, &nalu);
-+
-+ assert_equals_int (res, GST_H264_PARSER_BROKEN_DATA);
-+
-+ GST_WRITE_UINT32_BE (buf, G_MAXUINT32 - 4);
-+ res = gst_h264_parser_identify_nalu_avc (parser, buf, 0, buf_size, 4, &nalu);
-+
-+ assert_equals_int (res, GST_H264_PARSER_NO_NAL_END);
-+
-+ GST_WRITE_UINT32_BE (buf, G_MAXUINT32 - 6);
-+ res = gst_h264_parser_identify_nalu_avc (parser, buf, 0, buf_size, 4, &nalu);
-+
-+ assert_equals_int (res, GST_H264_PARSER_NO_NAL_END);
-+
-+ g_free (buf);
-+ gst_h264_nal_parser_free (parser);
-+}
-+
-+GST_END_TEST;
-+
- static guint8 nalu_sps_with_vui[] = {
- 0x00, 0x00, 0x00, 0x01, 0x67, 0x64, 0x00, 0x28,
- 0xac, 0xd9, 0x40, 0x78, 0x04, 0x4f, 0xde, 0x03,
-@@ -666,6 +725,7 @@ h264parser_suite (void)
- tcase_add_test (tc_chain, test_h264_parse_slice_dpa);
- tcase_add_test (tc_chain, test_h264_parse_slice_eoseq_slice);
- tcase_add_test (tc_chain, test_h264_parse_slice_5bytes);
-+ tcase_add_test (tc_chain, test_h264_parse_identify_nalu_avc);
- tcase_add_test (tc_chain, test_h264_parse_invalid_sei);
- tcase_add_test (tc_chain, test_h264_create_sei);
-
-diff --git a/tests/check/libs/h265parser.c b/tests/check/libs/h265parser.c
-index 0a0e4db97..5b6a215ec 100644
---- a/tests/check/libs/h265parser.c
-+++ b/tests/check/libs/h265parser.c
-@@ -255,6 +255,65 @@ GST_START_TEST (test_h265_parse_slice_6bytes)
-
- GST_END_TEST;
-
-+GST_START_TEST (test_h265_parse_identify_nalu_hevc)
-+{
-+ GstH265ParserResult res;
-+ GstH265NalUnit nalu;
-+ GstH265Parser *parser = gst_h265_parser_new ();
-+ /* Skip 4 bytes for the start code */
-+ const gsize nal_size = sizeof (slice_eos_slice_eob) - 4;
-+ const gsize buf_size = 4 + nal_size;
-+ guint8 *buf = g_new (guint8, buf_size);
-+
-+ memcpy (buf + 4, slice_eos_slice_eob + 4, nal_size);
-+
-+ GST_WRITE_UINT16_BE (buf + 2, nal_size);
-+ res = gst_h265_parser_identify_nalu_hevc (parser, buf, 2, buf_size, 2, &nalu);
-+
-+ assert_equals_int (res, GST_H265_PARSER_OK);
-+ assert_equals_int (nalu.type, GST_H265_NAL_SLICE_IDR_W_RADL);
-+ assert_equals_int (nalu.offset, 4);
-+ assert_equals_int (nalu.size, nal_size);
-+
-+ GST_WRITE_UINT32_BE (buf, nal_size);
-+ res = gst_h265_parser_identify_nalu_hevc (parser, buf, 0, buf_size, 4, &nalu);
-+
-+ assert_equals_int (res, GST_H265_PARSER_OK);
-+ assert_equals_int (nalu.type, GST_H265_NAL_SLICE_IDR_W_RADL);
-+ assert_equals_int (nalu.offset, 4);
-+ assert_equals_int (nalu.size, nal_size);
-+
-+ GST_WRITE_UINT32_BE (buf, G_MAXUINT32);
-+ res = gst_h265_parser_identify_nalu_hevc (parser, buf, 0, buf_size, 4, &nalu);
-+
-+ assert_equals_int (res, GST_H265_PARSER_BROKEN_DATA);
-+
-+ GST_WRITE_UINT32_BE (buf, G_MAXUINT32 - 2);
-+ res = gst_h265_parser_identify_nalu_hevc (parser, buf, 0, buf_size, 4, &nalu);
-+
-+ assert_equals_int (res, GST_H265_PARSER_BROKEN_DATA);
-+
-+ GST_WRITE_UINT32_BE (buf, G_MAXUINT32 - 3);
-+ res = gst_h265_parser_identify_nalu_hevc (parser, buf, 0, buf_size, 4, &nalu);
-+
-+ assert_equals_int (res, GST_H265_PARSER_BROKEN_DATA);
-+
-+ GST_WRITE_UINT32_BE (buf, G_MAXUINT32 - 4);
-+ res = gst_h265_parser_identify_nalu_hevc (parser, buf, 0, buf_size, 4, &nalu);
-+
-+ assert_equals_int (res, GST_H265_PARSER_NO_NAL_END);
-+
-+ GST_WRITE_UINT32_BE (buf, G_MAXUINT32 - 6);
-+ res = gst_h265_parser_identify_nalu_hevc (parser, buf, 0, buf_size, 4, &nalu);
-+
-+ assert_equals_int (res, GST_H265_PARSER_NO_NAL_END);
-+
-+ g_free (buf);
-+ gst_h265_parser_free (parser);
-+}
-+
-+GST_END_TEST;
-+
- GST_START_TEST (test_h265_base_profiles)
- {
- GstH265ProfileTierLevel ptl;
-@@ -1101,6 +1160,7 @@ h265parser_suite (void)
- tcase_add_test (tc_chain, test_h265_parse_slice_eos_slice_eob);
- tcase_add_test (tc_chain, test_h265_parse_pic_timing);
- tcase_add_test (tc_chain, test_h265_parse_slice_6bytes);
-+ tcase_add_test (tc_chain, test_h265_parse_identify_nalu_hevc);
- tcase_add_test (tc_chain, test_h265_base_profiles);
- tcase_add_test (tc_chain, test_h265_base_profiles_compat);
- tcase_add_test (tc_chain, test_h265_format_range_profiles_exact_match);
---
-2.31.1
-
diff --git a/gnu/packages/patches/gst-plugins-base-fix-id3v2-invalid-read.patch b/gnu/packages/patches/gst-plugins-base-fix-id3v2-invalid-read.patch
deleted file mode 100644
index b2dfef0118..0000000000
--- a/gnu/packages/patches/gst-plugins-base-fix-id3v2-invalid-read.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-Fix an "invalid read during ID3v2 tag parsing".
-
-https://security-tracker.debian.org/tracker/TEMP-0000000-57E7C1
-https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/issues/876
-
-Patch copied from upstream source repository:
-
-https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/commit/f4a1428a6997658625d529b9db60fde812fbf1ee
-
-From f4a1428a6997658625d529b9db60fde812fbf1ee Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= <tim@centricular.com>
-Date: Wed, 3 Mar 2021 01:08:25 +0000
-Subject: [PATCH] tag: id3v2: fix frame size check and potential invalid reads
-
-Check the right variable when checking if there's
-enough data left to read the frame size.
-
-Closes https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/issues/876
-
-Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1065>
----
- gst-libs/gst/tag/id3v2frames.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/gst-libs/gst/tag/id3v2frames.c b/gst-libs/gst/tag/id3v2frames.c
-index 8e9f78254..f39659bf7 100644
---- a/gst-libs/gst/tag/id3v2frames.c
-+++ b/gst-libs/gst/tag/id3v2frames.c
-@@ -109,7 +109,7 @@ id3v2_parse_frame (ID3TagsWorking * work)
-
- if (work->frame_flags & (ID3V2_FRAME_FORMAT_COMPRESSION |
- ID3V2_FRAME_FORMAT_DATA_LENGTH_INDICATOR)) {
-- if (work->hdr.frame_data_size <= 4)
-+ if (frame_data_size <= 4)
- return FALSE;
- if (ID3V2_VER_MAJOR (work->hdr.version) == 3) {
- work->parse_size = GST_READ_UINT32_BE (frame_data);
---
-2.31.1
-
diff --git a/gnu/packages/patches/gst-plugins-good-CVE-2021-3497.patch b/gnu/packages/patches/gst-plugins-good-CVE-2021-3497.patch
deleted file mode 100644
index c8c3ee6cf1..0000000000
--- a/gnu/packages/patches/gst-plugins-good-CVE-2021-3497.patch
+++ /dev/null
@@ -1,174 +0,0 @@
-Fix CVE-2021-3497:
-
-https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-3497
-https://gstreamer.freedesktop.org/security/sa-2021-0002.html
-
-Patch copied from upstream source repository:
-
-https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/commit/9181191511f9c0be6a89c98b311f49d66bd46dc3?merge_request_iid=903
-
-diff --git a/gst/matroska/matroska-demux.c b/gst/matroska/matroska-demux.c
-index 467815986c8c3d86fd8906a0d539b34f67d6693e..0e47ee7b5e25ac3331f30439710ae755235f2a22 100644
---- a/gst/matroska/matroska-demux.c
-+++ b/gst/matroska/matroska-demux.c
-@@ -3851,6 +3851,12 @@ gst_matroska_demux_add_wvpk_header (GstElement * element,
- guint32 block_samples, tmp;
- gsize size = gst_buffer_get_size (*buf);
-
-+ if (size < 4) {
-+ GST_ERROR_OBJECT (element, "Too small wavpack buffer");
-+ gst_buffer_unmap (*buf, &map);
-+ return GST_FLOW_ERROR;
-+ }
-+
- gst_buffer_extract (*buf, 0, &tmp, sizeof (guint32));
- block_samples = GUINT32_FROM_LE (tmp);
- /* we need to reconstruct the header of the wavpack block */
-@@ -3858,10 +3864,10 @@ gst_matroska_demux_add_wvpk_header (GstElement * element,
- /* -20 because ck_size is the size of the wavpack block -8
- * and lace_size is the size of the wavpack block + 12
- * (the three guint32 of the header that already are in the buffer) */
-- wvh.ck_size = size + sizeof (Wavpack4Header) - 20;
-+ wvh.ck_size = size + WAVPACK4_HEADER_SIZE - 20;
-
- /* block_samples, flags and crc are already in the buffer */
-- newbuf = gst_buffer_new_allocate (NULL, sizeof (Wavpack4Header) - 12, NULL);
-+ newbuf = gst_buffer_new_allocate (NULL, WAVPACK4_HEADER_SIZE - 12, NULL);
-
- gst_buffer_map (newbuf, &outmap, GST_MAP_WRITE);
- data = outmap.data;
-@@ -3886,9 +3892,11 @@ gst_matroska_demux_add_wvpk_header (GstElement * element,
- audiocontext->wvpk_block_index += block_samples;
- } else {
- guint8 *outdata = NULL;
-- guint outpos = 0;
-- gsize buf_size, size, out_size = 0;
-+ gsize buf_size, size;
- guint32 block_samples, flags, crc, blocksize;
-+ GstAdapter *adapter;
-+
-+ adapter = gst_adapter_new ();
-
- gst_buffer_map (*buf, &map, GST_MAP_READ);
- buf_data = map.data;
-@@ -3897,6 +3905,7 @@ gst_matroska_demux_add_wvpk_header (GstElement * element,
- if (buf_size < 4) {
- GST_ERROR_OBJECT (element, "Too small wavpack buffer");
- gst_buffer_unmap (*buf, &map);
-+ g_object_unref (adapter);
- return GST_FLOW_ERROR;
- }
-
-@@ -3918,59 +3927,57 @@ gst_matroska_demux_add_wvpk_header (GstElement * element,
- data += 4;
- size -= 4;
-
-- if (blocksize == 0 || size < blocksize)
-- break;
--
-- g_assert ((newbuf == NULL) == (outdata == NULL));
-+ if (blocksize == 0 || size < blocksize) {
-+ GST_ERROR_OBJECT (element, "Too small wavpack buffer");
-+ gst_buffer_unmap (*buf, &map);
-+ g_object_unref (adapter);
-+ return GST_FLOW_ERROR;
-+ }
-
-- if (newbuf == NULL) {
-- out_size = sizeof (Wavpack4Header) + blocksize;
-- newbuf = gst_buffer_new_allocate (NULL, out_size, NULL);
-+ g_assert (newbuf == NULL);
-
-- gst_buffer_copy_into (newbuf, *buf,
-- GST_BUFFER_COPY_TIMESTAMPS | GST_BUFFER_COPY_FLAGS, 0, -1);
-+ newbuf =
-+ gst_buffer_new_allocate (NULL, WAVPACK4_HEADER_SIZE + blocksize,
-+ NULL);
-+ gst_buffer_map (newbuf, &outmap, GST_MAP_WRITE);
-+ outdata = outmap.data;
-+
-+ outdata[0] = 'w';
-+ outdata[1] = 'v';
-+ outdata[2] = 'p';
-+ outdata[3] = 'k';
-+ outdata += 4;
-+
-+ GST_WRITE_UINT32_LE (outdata, blocksize + WAVPACK4_HEADER_SIZE - 8);
-+ GST_WRITE_UINT16_LE (outdata + 4, wvh.version);
-+ GST_WRITE_UINT8 (outdata + 6, wvh.track_no);
-+ GST_WRITE_UINT8 (outdata + 7, wvh.index_no);
-+ GST_WRITE_UINT32_LE (outdata + 8, wvh.total_samples);
-+ GST_WRITE_UINT32_LE (outdata + 12, wvh.block_index);
-+ GST_WRITE_UINT32_LE (outdata + 16, block_samples);
-+ GST_WRITE_UINT32_LE (outdata + 20, flags);
-+ GST_WRITE_UINT32_LE (outdata + 24, crc);
-+ outdata += 28;
-+
-+ memcpy (outdata, data, blocksize);
-
-- outpos = 0;
-- gst_buffer_map (newbuf, &outmap, GST_MAP_WRITE);
-- outdata = outmap.data;
-- } else {
-- gst_buffer_unmap (newbuf, &outmap);
-- out_size += sizeof (Wavpack4Header) + blocksize;
-- gst_buffer_set_size (newbuf, out_size);
-- gst_buffer_map (newbuf, &outmap, GST_MAP_WRITE);
-- outdata = outmap.data;
-- }
-+ gst_buffer_unmap (newbuf, &outmap);
-+ gst_adapter_push (adapter, newbuf);
-+ newbuf = NULL;
-
-- outdata[outpos] = 'w';
-- outdata[outpos + 1] = 'v';
-- outdata[outpos + 2] = 'p';
-- outdata[outpos + 3] = 'k';
-- outpos += 4;
--
-- GST_WRITE_UINT32_LE (outdata + outpos,
-- blocksize + sizeof (Wavpack4Header) - 8);
-- GST_WRITE_UINT16_LE (outdata + outpos + 4, wvh.version);
-- GST_WRITE_UINT8 (outdata + outpos + 6, wvh.track_no);
-- GST_WRITE_UINT8 (outdata + outpos + 7, wvh.index_no);
-- GST_WRITE_UINT32_LE (outdata + outpos + 8, wvh.total_samples);
-- GST_WRITE_UINT32_LE (outdata + outpos + 12, wvh.block_index);
-- GST_WRITE_UINT32_LE (outdata + outpos + 16, block_samples);
-- GST_WRITE_UINT32_LE (outdata + outpos + 20, flags);
-- GST_WRITE_UINT32_LE (outdata + outpos + 24, crc);
-- outpos += 28;
--
-- memmove (outdata + outpos, data, blocksize);
-- outpos += blocksize;
- data += blocksize;
- size -= blocksize;
- }
- gst_buffer_unmap (*buf, &map);
-- gst_buffer_unref (*buf);
-
-- if (newbuf)
-- gst_buffer_unmap (newbuf, &outmap);
-+ newbuf = gst_adapter_take_buffer (adapter, gst_adapter_available (adapter));
-+ g_object_unref (adapter);
-
-+ gst_buffer_copy_into (newbuf, *buf,
-+ GST_BUFFER_COPY_TIMESTAMPS | GST_BUFFER_COPY_FLAGS, 0, -1);
-+ gst_buffer_unref (*buf);
- *buf = newbuf;
-+
- audiocontext->wvpk_block_index += block_samples;
- }
-
-diff --git a/gst/matroska/matroska-ids.h b/gst/matroska/matroska-ids.h
-index 429213f778063ba0063944ab64ad60373bbce5ee..8d4a685a910ec13100a3c3d156b2412d28ec0522 100644
---- a/gst/matroska/matroska-ids.h
-+++ b/gst/matroska/matroska-ids.h
-@@ -688,6 +688,8 @@ typedef struct _Wavpack4Header {
- guint32 crc; /* crc for actual decoded data */
- } Wavpack4Header;
-
-+#define WAVPACK4_HEADER_SIZE (32)
-+
- typedef enum {
- GST_MATROSKA_TRACK_ENCODING_SCOPE_FRAME = (1<<0),
- GST_MATROSKA_TRACK_ENCODING_SCOPE_CODEC_DATA = (1<<1),
diff --git a/gnu/packages/patches/gst-plugins-good-CVE-2021-3498.patch b/gnu/packages/patches/gst-plugins-good-CVE-2021-3498.patch
deleted file mode 100644
index 50eb42f126..0000000000
--- a/gnu/packages/patches/gst-plugins-good-CVE-2021-3498.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-Fix CVE-2021-3498:
-
-https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-3498
-https://gstreamer.freedesktop.org/security/sa-2021-0003.html
-
-Patch copied from upstream source repository:
-
-https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/commit/02174790726dd20a5c73ce2002189bf240ad4fe0?merge_request_iid=903
-
-diff --git a/gst/matroska/matroska-demux.c b/gst/matroska/matroska-demux.c
-index 4d0234743b8cf243b4521e56ef9027ba23b1b5d0..467815986c8c3d86fd8906a0d539b34f67d6693e 100644
---- a/gst/matroska/matroska-demux.c
-+++ b/gst/matroska/matroska-demux.c
-@@ -692,6 +692,8 @@ gst_matroska_demux_parse_stream (GstMatroskaDemux * demux, GstEbmlRead * ebml,
-
- DEBUG_ELEMENT_START (demux, ebml, "TrackEntry");
-
-+ *dest_context = NULL;
-+
- /* start with the master */
- if ((ret = gst_ebml_read_master (ebml, &id)) != GST_FLOW_OK) {
- DEBUG_ELEMENT_STOP (demux, ebml, "TrackEntry", ret);
diff --git a/gnu/packages/patches/gst-plugins-ugly-fix-out-of-bound-reads.patch b/gnu/packages/patches/gst-plugins-ugly-fix-out-of-bound-reads.patch
deleted file mode 100644
index 3c6a96f45d..0000000000
--- a/gnu/packages/patches/gst-plugins-ugly-fix-out-of-bound-reads.patch
+++ /dev/null
@@ -1,119 +0,0 @@
-Fix out of bounds reads when parsing audio and video packets:
-
-https://security-tracker.debian.org/tracker/TEMP-0000000-4DAA44
-https://gitlab.freedesktop.org/gstreamer/gst-plugins-ugly/-/issues/37
-
-Patch copied from upstream source repository:
-
-https://gitlab.freedesktop.org/gstreamer/gst-plugins-ugly/-/commit/3aba7d1e625554b2407bc77b3d09b4928b937d5f
-From 3aba7d1e625554b2407bc77b3d09b4928b937d5f Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= <sebastian@centricular.com>
-Date: Wed, 3 Mar 2021 11:05:14 +0200
-Subject: [PATCH] rmdemux: Make sure we have enough data available when parsing
- audio/video packets
-
-Otherwise there will be out-of-bounds reads and potential crashes.
-
-Thanks to Natalie Silvanovich for reporting.
-
-Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-ugly/-/issues/37
-
-Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-ugly/-/merge_requests/74>
----
- gst/realmedia/rmdemux.c | 35 +++++++++++++++++++++++++++++++++++
- 1 file changed, 35 insertions(+)
-
-diff --git a/gst/realmedia/rmdemux.c b/gst/realmedia/rmdemux.c
-index 6cc659a1..68b0736b 100644
---- a/gst/realmedia/rmdemux.c
-+++ b/gst/realmedia/rmdemux.c
-@@ -2223,6 +2223,9 @@ gst_rmdemux_parse_video_packet (GstRMDemux * rmdemux, GstRMDemuxStream * stream,
-
- gst_buffer_map (in, &map, GST_MAP_READ);
-
-+ if (map.size < offset)
-+ goto not_enough_data;
-+
- data = map.data + offset;
- size = map.size - offset;
-
-@@ -2289,6 +2292,9 @@ gst_rmdemux_parse_video_packet (GstRMDemux * rmdemux, GstRMDemuxStream * stream,
- }
- GST_DEBUG_OBJECT (rmdemux, "fragment size %d", fragment_size);
-
-+ if (map.size < (data - map.data) + fragment_size)
-+ goto not_enough_data;
-+
- /* get the fragment */
- fragment =
- gst_buffer_copy_region (in, GST_BUFFER_COPY_ALL, data - map.data,
-@@ -2437,6 +2443,9 @@ gst_rmdemux_parse_audio_packet (GstRMDemux * rmdemux, GstRMDemuxStream * stream,
- GstFlowReturn ret;
- GstBuffer *buffer;
-
-+ if (gst_buffer_get_size (in) < offset)
-+ goto not_enough_data;
-+
- buffer = gst_buffer_copy_region (in, GST_BUFFER_COPY_MEMORY, offset, -1);
-
- if (rmdemux->first_ts != -1 && timestamp > rmdemux->first_ts)
-@@ -2467,9 +2476,19 @@ gst_rmdemux_parse_audio_packet (GstRMDemux * rmdemux, GstRMDemuxStream * stream,
- ret = gst_pad_push (stream->pad, buffer);
- }
-
-+done:
- gst_buffer_unref (in);
-
- return ret;
-+
-+ /* ERRORS */
-+not_enough_data:
-+ {
-+ GST_ELEMENT_WARNING (rmdemux, STREAM, DECODE, ("Skipping bad packet."),
-+ (NULL));
-+ ret = GST_FLOW_OK;
-+ goto done;
-+ }
- }
-
- static GstFlowReturn
-@@ -2490,6 +2509,9 @@ gst_rmdemux_parse_packet (GstRMDemux * rmdemux, GstBuffer * in, guint16 version)
- data = map.data;
- size = map.size;
-
-+ if (size < 4 + 6 + 1 + 2)
-+ goto not_enough_data;
-+
- /* stream number */
- id = RMDEMUX_GUINT16_GET (data);
-
-@@ -2525,6 +2547,9 @@ gst_rmdemux_parse_packet (GstRMDemux * rmdemux, GstBuffer * in, guint16 version)
-
- /* version 1 has an extra byte */
- if (version == 1) {
-+ if (size < 1)
-+ goto not_enough_data;
-+
- data += 1;
- size -= 1;
- }
-@@ -2596,6 +2621,16 @@ unknown_stream:
- gst_buffer_unref (in);
- return GST_FLOW_OK;
- }
-+
-+ /* ERRORS */
-+not_enough_data:
-+ {
-+ GST_ELEMENT_WARNING (rmdemux, STREAM, DECODE, ("Skipping bad packet."),
-+ (NULL));
-+ gst_buffer_unmap (in, &map);
-+ gst_buffer_unref (in);
-+ return GST_FLOW_OK;
-+ }
- }
-
- gboolean
---
-2.31.1
-
diff --git a/gnu/packages/patches/gtk-doc-respect-xml-catalog.patch b/gnu/packages/patches/gtk-doc-respect-xml-catalog.patch
new file mode 100644
index 0000000000..710f208285
--- /dev/null
+++ b/gnu/packages/patches/gtk-doc-respect-xml-catalog.patch
@@ -0,0 +1,16 @@
+Taken from here:
+https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/tools/documentation/gtk-doc/respect-xml-catalog-files-var.patch.
+
+--- a/m4/gtkdoc_jh_check_xml_catalog.m4
++++ b/m4/gtkdoc_jh_check_xml_catalog.m4
+@@ -5,8 +5,8 @@
+ [
+ AC_REQUIRE([JH_PATH_XML_CATALOG],[JH_PATH_XML_CATALOG(,[:])])dnl
+ AC_MSG_CHECKING([for ifelse([$2],,[$1],[$2]) in XML catalog])
+- if $jh_found_xmlcatalog && \
+- AC_RUN_LOG([$XMLCATALOG --noout "$XML_CATALOG_FILE" "$1" >&2]); then
++ # empty argument forces libxml to use XML_CATALOG_FILES variable
++ if AC_RUN_LOG([$XMLCATALOG --noout "" "$1" >&2]); then
+ AC_MSG_RESULT([found])
+ ifelse([$3],,,[$3])
+ else
diff --git a/gnu/packages/patches/gtk2-fix-builder-test.patch b/gnu/packages/patches/gtk2-fix-builder-test.patch
new file mode 100644
index 0000000000..8c41e596fe
--- /dev/null
+++ b/gnu/packages/patches/gtk2-fix-builder-test.patch
@@ -0,0 +1,94 @@
+From e45e11238036e06c8fe78bea1691b256ca41837b Mon Sep 17 00:00:00 2001
+From: Steve Langasek <steve.langasek@ubuntu.com>
+Date: Tue, 7 Jan 2014 13:55:28 +0100
+Subject: [PATCH] fix prototypes of signal callbacks in the test suite
+
+The signal callbacks are defined to take pointers as their arguments, but the
+callbacks found in testsuite/gtk/builder.c are passing a GParamSpec by value
+as the second argument. This confuses and angers the compiler on ppc64el,
+resulting in segfaults after return from the function due to stack-smashing
+by the (completely-unused) argument.
+
+https://bugzilla.gnome.org/show_bug.cgi?id=721700
+---
+
+This is a backport to v2.24.33 of upstream commit:
+
+https://gitlab.gnome.org/GNOME/gtk/-/commit/256561db2f0b34e01047f8882b3e0cb8c6d9dbab
+
+ gtk/tests/builder.c | 16 ++++++++--------
+ 1 file changed, 8 insertions(+), 8 deletions(-)
+
+diff --git a/gtk/tests/builder.c b/gtk/tests/builder.c
+index 8529dacc2f6e..23d5096062fa 100644
+--- a/gtk/tests/builder.c
++++ b/gtk/tests/builder.c
+@@ -132,7 +132,7 @@ static int object = 0;
+ static int object_after = 0;
+
+ void /* exported for GtkBuilder */
+-signal_normal (GtkWindow *window, GParamSpec spec)
++signal_normal (GtkWindow *window, GParamSpec *spec)
+ {
+ g_assert (GTK_IS_WINDOW (window));
+ g_assert (normal == 0);
+@@ -142,7 +142,7 @@ signal_normal (GtkWindow *window, GParamSpec spec)
+ }
+
+ void /* exported for GtkBuilder */
+-signal_after (GtkWindow *window, GParamSpec spec)
++signal_after (GtkWindow *window, GParamSpec *spec)
+ {
+ g_assert (GTK_IS_WINDOW (window));
+ g_assert (normal == 1);
+@@ -152,7 +152,7 @@ signal_after (GtkWindow *window, GParamSpec spec)
+ }
+
+ void /* exported for GtkBuilder */
+-signal_object (GtkButton *button, GParamSpec spec)
++signal_object (GtkButton *button, GParamSpec *spec)
+ {
+ g_assert (GTK_IS_BUTTON (button));
+ g_assert (object == 0);
+@@ -162,7 +162,7 @@ signal_object (GtkButton *button, GParamSpec spec)
+ }
+
+ void /* exported for GtkBuilder */
+-signal_object_after (GtkButton *button, GParamSpec spec)
++signal_object_after (GtkButton *button, GParamSpec *spec)
+ {
+ g_assert (GTK_IS_BUTTON (button));
+ g_assert (object == 1);
+@@ -172,28 +172,28 @@ signal_object_after (GtkButton *button, GParamSpec spec)
+ }
+
+ void /* exported for GtkBuilder */
+-signal_first (GtkButton *button, GParamSpec spec)
++signal_first (GtkButton *button, GParamSpec *spec)
+ {
+ g_assert (normal == 0);
+ normal = 10;
+ }
+
+ void /* exported for GtkBuilder */
+-signal_second (GtkButton *button, GParamSpec spec)
++signal_second (GtkButton *button, GParamSpec *spec)
+ {
+ g_assert (normal == 10);
+ normal = 20;
+ }
+
+ void /* exported for GtkBuilder */
+-signal_extra (GtkButton *button, GParamSpec spec)
++signal_extra (GtkButton *button, GParamSpec *spec)
+ {
+ g_assert (normal == 20);
+ normal = 30;
+ }
+
+ void /* exported for GtkBuilder */
+-signal_extra2 (GtkButton *button, GParamSpec spec)
++signal_extra2 (GtkButton *button, GParamSpec *spec)
+ {
+ g_assert (normal == 30);
+ normal = 40;
diff --git a/gnu/packages/patches/gtk4-respect-GUIX_GTK4_PATH.patch b/gnu/packages/patches/gtk4-respect-GUIX_GTK4_PATH.patch
new file mode 100644
index 0000000000..4a60023bf7
--- /dev/null
+++ b/gnu/packages/patches/gtk4-respect-GUIX_GTK4_PATH.patch
@@ -0,0 +1,51 @@
+From 889294a93fc6464c2c2919bc47f6fd85ec823363 Mon Sep 17 00:00:00 2001
+From: Raghav Gururajan <rg@raghavgururajan.name>
+Date: Tue, 18 May 2021 19:57:00 -0400
+Subject: [PATCH] [PATCH]: Honor GUIX_GTK4_PATH.
+
+This patch makes GTK look for additional modules in a list of directories
+specified by the environment variable "GUIX_GTK4_PATH". This can be used
+instead of "GTK_PATH" to make GTK find modules that are incompatible with
+other major versions of GTK.
+---
+ gtk/gtkmodules.c | 10 +++++++++-
+ 1 file changed, 9 insertions(+), 1 deletion(-)
+
+diff --git a/gtk/gtkmodules.c b/gtk/gtkmodules.c
+index aace5dcbc9..193b6a02e9 100644
+--- a/gtk/gtkmodules.c
++++ b/gtk/gtkmodules.c
+@@ -105,6 +105,7 @@ static char **
+ get_module_path (void)
+ {
+ const char *module_path_env;
++ const gchar *module_guix_gtk4_path_env;
+ const char *exe_prefix;
+ char *module_path;
+ char *default_dir;
+@@ -114,6 +115,7 @@ get_module_path (void)
+ return result;
+
+ module_path_env = g_getenv ("GTK_PATH");
++ module_guix_gtk4_path_env = g_getenv ("GUIX_GTK4_PATH");
+ exe_prefix = g_getenv ("GTK_EXE_PREFIX");
+
+ if (exe_prefix)
+@@ -121,7 +123,13 @@ get_module_path (void)
+ else
+ default_dir = g_build_filename (_gtk_get_libdir (), "gtk-4.0", NULL);
+
+- if (module_path_env)
++ if (module_guix_gtk4_path_env && module_path_env)
++ module_path = g_build_path (G_SEARCHPATH_SEPARATOR_S,
++ module_guix_gtk4_path_env, module_path_env, default_dir, NULL);
++ else if (module_guix_gtk4_path_env)
++ module_path = g_build_path (G_SEARCHPATH_SEPARATOR_S,
++ module_guix_gtk4_path_env, default_dir, NULL);
++ else if (module_path_env)
+ module_path = g_build_path (G_SEARCHPATH_SEPARATOR_S,
+ module_path_env, default_dir, NULL);
+ else
+--
+2.31.1
+
diff --git a/gnu/packages/patches/guile-email-fix-tests.patch b/gnu/packages/patches/guile-email-fix-tests.patch
new file mode 100644
index 0000000000..8621aaea02
--- /dev/null
+++ b/gnu/packages/patches/guile-email-fix-tests.patch
@@ -0,0 +1,35 @@
+This patch has been proposed upstream:
+https://lists.systemreboot.net/guile-email/87mtnv1r2p.fsf@gnu.org/T/#u.
+
+From c21fe0f0e28b80b606973d3e372e2bc8528c9766 Mon Sep 17 00:00:00 2001
+From: Mathieu Othacehe <othacehe@gnu.org>
+Date: Wed, 29 Sep 2021 12:47:35 +0000
+Subject: [PATCH 1/1] email: Do not use an empty bytevector to test the
+ charset.
+
+Using an empty bytevector no longer throws an exception since this Guile
+commit: 5ea8c69e9153a970952bf6f0b32c4fad6a28e839.
+
+* email/email.scm (post-process-content-transfer-encoding): Use a bytevector
+containg the 'e' character to test the charset validity.
+---
+ email/email.scm | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/email/email.scm b/email/email.scm
+index 3f4e194..ac70463 100644
+--- a/email/email.scm
++++ b/email/email.scm
+@@ -832,7 +832,8 @@ values. The returned headers is a string and body is a bytevector."
+ (define (valid-charset? charset)
+ (catch #t
+ (lambda ()
+- (bytevector->string (make-bytevector 0 0) charset)
++ ;; Try to convert a bytevector containg the 'e' character.
++ (bytevector->string (make-bytevector 1 48) charset)
+ #t)
+ (const #f)))
+
+--
+2.33.0
+
diff --git a/gnu/packages/patches/guile-git-adjust-for-libgit2-1.2.0.patch b/gnu/packages/patches/guile-git-adjust-for-libgit2-1.2.0.patch
new file mode 100644
index 0000000000..436a11ad19
--- /dev/null
+++ b/gnu/packages/patches/guile-git-adjust-for-libgit2-1.2.0.patch
@@ -0,0 +1,78 @@
+diff --git a/configure.ac b/configure.ac
+index 107e6ca..20e9019 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -2,6 +2,7 @@ dnl Guile-Git --- GNU Guile bindings of libgit2
+ dnl Copyright © 2016-2018 Erik Edrosa <erik.edrosa@gmail.com>
+ dnl Copyright © 2017, 2019, 2020, 2021 Ludovic Courtès <ludo@gnu.org>
+ dnl Copyright © 2019 Mathieu Othacehe <m.othacehe@gmail.com>
++dnl Copyright © 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
+ dnl
+ dnl This file is part of Guile-Git.
+ dnl
+@@ -43,15 +44,20 @@ AS_IF([test "x$LIBGIT2_LIBDIR" = "x"], [
+ ])
+ AC_SUBST([LIBGIT2_LIBDIR])
+
++dnl Does the 'git_remote_callbacks' struct have a 'remote_ready' field?
++dnl It was added in 1.2.0, obsoleting 'resolve_url'.
++AC_CHECK_MEMBER([git_remote_callbacks.remote_ready],
++ [HAVE_REMOTE_CALLBACKS_REMOTE_READY="#true"],
++ [HAVE_REMOTE_CALLBACKS_REMOTE_READY="#false"],
++ [[#include <git2.h>]])
++AC_SUBST([HAVE_REMOTE_CALLBACKS_REMOTE_READY])
++
+ dnl Does the 'git_remote_callbacks' struct have a 'resolve_url' field?
+ dnl It's missing in libgit2 0.28.5, added in 1.0.
+-AC_CHECK_MEMBER([git_remote_callbacks.resolve_url], [], [],
++AC_CHECK_MEMBER([git_remote_callbacks.resolve_url],
++ [HAVE_REMOTE_CALLBACKS_RESOLVE_URL="#true"],
++ [HAVE_REMOTE_CALLBACKS_RESOLVE_URL="#false"],
+ [[#include <git2.h>]])
+-if test "x$ac_cv_member_git_remote_callbacks_resolve_url" = "xyes"; then
+- HAVE_REMOTE_CALLBACKS_RESOLVE_URL="#true"
+-else
+- HAVE_REMOTE_CALLBACKS_RESOLVE_URL="#false"
+-fi
+ AC_SUBST([HAVE_REMOTE_CALLBACKS_RESOLVE_URL])
+
+ dnl Those binaries are required for ssh authentication tests.
+diff --git a/git/configuration.scm.in b/git/configuration.scm.in
+index c45f698..64c4360 100644
+--- a/git/configuration.scm.in
++++ b/git/configuration.scm.in
+@@ -19,11 +19,17 @@
+
+ (define-module (git configuration)
+ #:export (%libgit2
++ %have-remote-callbacks-remote-ready?
+ %have-remote-callbacks-resolve-url?))
+
+ (define %libgit2
+ "@LIBGIT2_LIBDIR@/libgit2")
+
++(define %have-remote-callbacks-remote-ready?
++ ;; True if the 'git_remote_callbacks' struct has a
++ ;; 'remote_ready' field.
++ @HAVE_REMOTE_CALLBACKS_REMOTE_READY@)
++
+ (define %have-remote-callbacks-resolve-url?
+ ;; True if the 'git_remote_callbacks' struct has a 'resolve_url' field.
+ @HAVE_REMOTE_CALLBACKS_RESOLVE_URL@)
+diff --git a/git/structs.scm b/git/structs.scm
+index ca51728..be3d050 100644
+--- a/git/structs.scm
++++ b/git/structs.scm
+@@ -637,6 +637,12 @@ type to 'specified for this to take effect."
+ (push-update-reference ,(bs:pointer uint8))
+ (push-negotiation ,(bs:pointer uint8))
+ (transport ,(bs:pointer uint8))
++
++ ;; Added in libgit2 1.2.0.
++ ,@(if %have-remote-callbacks-remote-ready?
++ `((remote-ready ,(bs:pointer uint8)))
++ '())
++
+ (payload ,(bs:pointer uint8))
+
+ ;; libgit2 1.0 added this field, which is missing from 0.28.5,
diff --git a/gnu/packages/patches/guile-ssh-fix-test-suite.patch b/gnu/packages/patches/guile-ssh-fix-test-suite.patch
new file mode 100644
index 0000000000..dc10e08b0f
--- /dev/null
+++ b/gnu/packages/patches/guile-ssh-fix-test-suite.patch
@@ -0,0 +1,217 @@
+From f7942cded8b65341916a555186e2219efe174cd0 Mon Sep 17 00:00:00 2001
+From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
+Date: Thu, 4 Feb 2021 14:38:25 -0500
+Subject: [PATCH] tests: Fix test suite for Guile 3.0.5.
+
+The test-runner object is now reset to #f when calling the 'test-end'
+procedure. See the commit de5d1a7f99b8e952b115237ebc29633062f99bb9 in
+Guile (srfi-64: Reset test-runner-current if done) which introduced this
+change.
+
+* tests/client-server.scm (exit-status): New variable. Use it when calling
+exit.
+* tests/dist.scm: Likewise.
+* tests/key.scm: Likewise.
+* tests/log.scm: Likewise.
+* tests/popen.scm: Likewise.
+* tests/server-client.scm: Likewise.
+* tests/server.scm: Likewise.
+* tests/session.scm: Likewise.
+* tests/shell.scm: Likewise.
+* tests/sssh-ssshd.scm: Likewise.
+* tests/tunnel.scm: Likewise.
+---
+ tests/client-server.scm | 4 +++-
+ tests/dist.scm | 4 +++-
+ tests/key.scm | 3 ++-
+ tests/log.scm | 5 ++++-
+ tests/popen.scm | 4 +++-
+ tests/server-client.scm | 4 +++-
+ tests/server.scm | 4 +++-
+ tests/session.scm | 4 +++-
+ tests/shell.scm | 3 ++-
+ tests/sssh-ssshd.scm | 4 +++-
+ tests/tunnel.scm | 4 +++-
+ 11 files changed, 32 insertions(+), 11 deletions(-)
+
+diff --git a/tests/client-server.scm b/tests/client-server.scm
+index 432a48c..fc46140 100644
+--- a/tests/client-server.scm
++++ b/tests/client-server.scm
+@@ -743,8 +743,10 @@
+
+ ;;;
+
++(define exit-status (test-runner-fail-count (test-runner-current)))
++
+ (test-end "client-server")
+
+-(exit (= (test-runner-fail-count (test-runner-current)) 0))
++(exit (= 0 exit-status))
+
+ ;;; client-server.scm ends here.
+diff --git a/tests/dist.scm b/tests/dist.scm
+index 2a3a75f..79f9e23 100644
+--- a/tests/dist.scm
++++ b/tests/dist.scm
+@@ -269,8 +269,10 @@ $4 = #<session #<undefined>@#<undefined>:22 (disconnected) 453fff>"
+ ;;;
+
+
++(define exit-status (test-runner-fail-count (test-runner-current)))
++
+ (test-end "dist")
+
+-(exit (= (test-runner-fail-count (test-runner-current)) 0))
++(exit (= 0 exit-status))
+
+ ;;; dist.scm ends here.
+diff --git a/tests/key.scm b/tests/key.scm
+index be31378..e1678f4 100644
+--- a/tests/key.scm
++++ b/tests/key.scm
+@@ -170,9 +170,10 @@
+ (eq? (get-key-type key) 'ecdsa-p256)))))))
+
+ ;;;
++(define exit-status (test-runner-fail-count (test-runner-current)))
+
+ (test-end "key")
+
+-(exit (= (test-runner-fail-count (test-runner-current)) 0))
++(exit (= 0 exit-status))
+
+ ;;; key.scm ends here.
+diff --git a/tests/log.scm b/tests/log.scm
+index f547202..d528251 100644
+--- a/tests/log.scm
++++ b/tests/log.scm
+@@ -64,8 +64,11 @@
+ (get-log-verbosity))
+
+
++(define exit-status (test-runner-fail-count (test-runner-current)))
++
+ (test-end "log")
+
+-(exit (= (test-runner-fail-count (test-runner-current)) 0))
++(exit (= 0 exit-status))
++
+
+ ;;; log.scm ends here
+diff --git a/tests/popen.scm b/tests/popen.scm
+index e063e0b..fe77108 100644
+--- a/tests/popen.scm
++++ b/tests/popen.scm
+@@ -129,8 +129,10 @@
+ (format-log/scm 'nolog "open-remote-output-pipe" "channel: ~A" channel)
+ (output-only? channel)))))))
+
++(define exit-status (test-runner-fail-count (test-runner-current)))
++
+ (test-end "popen")
+
+-(exit (= (test-runner-fail-count (test-runner-current)) 0))
++(exit (= 0 exit-status))
+
+ ;;; popen.scm ends here.
+diff --git a/tests/server-client.scm b/tests/server-client.scm
+index 920aa22..b6ed3eb 100644
+--- a/tests/server-client.scm
++++ b/tests/server-client.scm
+@@ -148,8 +148,10 @@
+ (equal? x session))))))
+
+
++(define exit-status (test-runner-fail-count (test-runner-current)))
++
+ (test-end "server-client")
+
+-(exit (= (test-runner-fail-count (test-runner-current)) 0))
++(exit (= 0 exit-status))
+
+ ;;; server-client.scm ends here.
+diff --git a/tests/server.scm b/tests/server.scm
+index c7f8b6c..1a6daea 100644
+--- a/tests/server.scm
++++ b/tests/server.scm
+@@ -157,9 +157,11 @@
+ (server-listen server)
+ #t))
+
++(define exit-status (test-runner-fail-count (test-runner-current)))
++
+ (test-end "server")
+
+-(exit (= (test-runner-fail-count (test-runner-current)) 0))
++(exit (= 0 exit-status))
+
+ ;;; server.scm ends here.
+
+diff --git a/tests/session.scm b/tests/session.scm
+index 8caa039..7310647 100644
+--- a/tests/session.scm
++++ b/tests/session.scm
+@@ -210,8 +210,10 @@
+ (let ((session (%make-session)))
+ (not (connected? session))))
+
++(define exit-status (test-runner-fail-count (test-runner-current)))
++
+ (test-end "session")
+
+-(exit (= (test-runner-fail-count (test-runner-current)) 0))
++(exit (= 0 exit-status))
+
+ ;;; session.scm ends here.
+diff --git a/tests/shell.scm b/tests/shell.scm
+index 7d613fb..e36e661 100644
+--- a/tests/shell.scm
++++ b/tests/shell.scm
+@@ -113,9 +113,10 @@
+
+
+ ;;;
++(define exit-status (test-runner-fail-count (test-runner-current)))
+
+ (test-end "shell")
+
+-(exit (= (test-runner-fail-count (test-runner-current)) 0))
++(exit (= 0 exit-status))
+
+ ;;; shell.scm ends here.
+diff --git a/tests/sssh-ssshd.scm b/tests/sssh-ssshd.scm
+index 2fe23db..edb53fc 100644
+--- a/tests/sssh-ssshd.scm
++++ b/tests/sssh-ssshd.scm
+@@ -118,8 +118,10 @@
+ result)))
+
+
++(define exit-status (test-runner-fail-count (test-runner-current)))
++
+ (test-end "sssh-ssshd")
+
+-(exit (= (test-runner-fail-count (test-runner-current)) 0))
++(exit (= 0 exit-status))
+
+ ;;; sssh-ssshd.scm ends here.
+diff --git a/tests/tunnel.scm b/tests/tunnel.scm
+index ef5a568..d6453b7 100644
+--- a/tests/tunnel.scm
++++ b/tests/tunnel.scm
+@@ -191,8 +191,10 @@
+ (= pnum portnum)))
+ (eq? (channel-cancel-forward session "localhost" portnum) 'ok))))))))
+
++(define exit-status (test-runner-fail-count (test-runner-current)))
++
+ (test-end "tunnel")
+
+-(exit (= (test-runner-fail-count (test-runner-current)) 0))
++(exit (= 0 exit-status))
+
+ ;;; tunnel.scm ends here.
+--
+2.30.0
+
diff --git a/gnu/packages/patches/guile-ssh-read-error.patch b/gnu/packages/patches/guile-ssh-read-error.patch
new file mode 100644
index 0000000000..9cc6b048a0
--- /dev/null
+++ b/gnu/packages/patches/guile-ssh-read-error.patch
@@ -0,0 +1,18 @@
+This patch adjusts to slightly different 'read-error' in Guile 3.0.6
+compared to earlier versions:
+
+ https://github.com/artyom-poptsov/guile-ssh/issues/28
+
+--- a/tests/dist.scm
++++ b/tests/dist.scm
+@@ -183,8 +183,8 @@ Unbound variable: e"
+ rrepl-get-result))
+
+ (test-error-with-log/= "rrepl-get-result, unknown # object error"
+- 'node-repl-error "Reader error: scm_lreadr: #<unknown port>:1:3: \
+-Unknown # object: (#\\<): scheme@(guile-user)> \
++ 'node-repl-error "Reader error: #f: #<unknown port>:1:3: \
++Unknown # object: (\"#<\"): scheme@(guile-user)> \
+ $4 = #<session #<undefined>@#<undefined>:22 (disconnected) 453fff>"
+ (call-with-input-string
+ (string-append "scheme@(guile-user)> $4 = "
diff --git a/gnu/packages/patches/gvfs-add-support-for-libplist-2.2.patch b/gnu/packages/patches/gvfs-add-support-for-libplist-2.2.patch
deleted file mode 100644
index 250eef2c8b..0000000000
--- a/gnu/packages/patches/gvfs-add-support-for-libplist-2.2.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-Source: https://gitlab.gnome.org/GNOME/gvfs/-/commit/13551f3f40d41f1357126ac5a26d0fa012cd8123
-
-Note: This change should be incorporated into stable version 1.46.x of gvfs.
-
-From 13551f3f40d41f1357126ac5a26d0fa012cd8123 Mon Sep 17 00:00:00 2001
-From: Bastien Nocera <hadess@hadess.net>
-Date: Tue, 16 Jun 2020 13:28:35 +0200
-Subject: [PATCH] afc: Add support for libplist-2.2
-
-Which changed name from libplist to libplist-2.0 to embed its API
-version number in the library name.
----
- meson.build | 5 ++++-
- 1 file changed, 4 insertions(+), 1 deletion(-)
-
-diff --git a/meson.build b/meson.build
-index 1750f65ca..187bfd55f 100644
---- a/meson.build
-+++ b/meson.build
-@@ -357,7 +357,10 @@ config_h.set('HAVE_LOGIND', enable_logind)
- enable_afc = get_option('afc')
- if enable_afc
- libimobiledevice_dep = dependency('libimobiledevice-1.0', version: '>= 1.2')
-- libplist_dep = dependency('libplist', version: '>= 0.15')
-+ libplist_dep = dependency('libplist-2.0', required: false)
-+ if not libplist_dep.found()
-+ libplist_dep = dependency('libplist', version: '>= 0.15')
-+ endif
- endif
-
- # *** Check if we should build with GOA volume monitor ***
---
-GitLab
-
diff --git a/gnu/packages/patches/helm-fix-gcc-9-build.patch b/gnu/packages/patches/helm-fix-gcc-9-build.patch
new file mode 100644
index 0000000000..f623fef203
--- /dev/null
+++ b/gnu/packages/patches/helm-fix-gcc-9-build.patch
@@ -0,0 +1,140 @@
+From cb611a80bd5a36d31bfc31212ebbf79aa86c6f08 Mon Sep 17 00:00:00 2001
+From: jikstra <jikstra@disroot.org>
+Date: Tue, 20 Aug 2019 03:00:51 +0200
+Subject: [PATCH] Backport
+ https://github.com/WeAreROLI/JUCE/commit/4e0adb2af8b424c43d22bd431011c9a6c57d36b6
+ to the bundled JUCE framework to make helm compile on gcc 9.1 again
+
+---
+ .../juce_graphics/colour/juce_PixelFormats.h | 25 +---------
+ .../native/juce_RenderingHelpers.h | 48 +------------------
+ 2 files changed, 4 insertions(+), 69 deletions(-)
+
+diff --git a/JUCE/modules/juce_graphics/colour/juce_PixelFormats.h b/JUCE/modules/juce_graphics/colour/juce_PixelFormats.h
+index 9be9ba09c..3535eab80 100644
+--- a/JUCE/modules/juce_graphics/colour/juce_PixelFormats.h
++++ b/JUCE/modules/juce_graphics/colour/juce_PixelFormats.h
+@@ -105,23 +105,9 @@ class JUCE_API PixelARGB
+
+ //==============================================================================
+ forcedinline uint8 getAlpha() const noexcept { return components.a; }
+- forcedinline uint8 getRed() const noexcept { return components.r; }
++ forcedinline uint8 getRed() const noexcept { return components.r; }
+ forcedinline uint8 getGreen() const noexcept { return components.g; }
+- forcedinline uint8 getBlue() const noexcept { return components.b; }
+-
+- #if JUCE_GCC
+- // NB these are here as a workaround because GCC refuses to bind to packed values.
+- forcedinline uint8& getAlpha() noexcept { return comps [indexA]; }
+- forcedinline uint8& getRed() noexcept { return comps [indexR]; }
+- forcedinline uint8& getGreen() noexcept { return comps [indexG]; }
+- forcedinline uint8& getBlue() noexcept { return comps [indexB]; }
+- #else
+- forcedinline uint8& getAlpha() noexcept { return components.a; }
+- forcedinline uint8& getRed() noexcept { return components.r; }
+- forcedinline uint8& getGreen() noexcept { return components.g; }
+- forcedinline uint8& getBlue() noexcept { return components.b; }
+- #endif
+-
++ forcedinline uint8 getBlue() const noexcept { return components.b; }
+ //==============================================================================
+ /** Copies another pixel colour over this one.
+
+@@ -340,9 +326,6 @@ class JUCE_API PixelARGB
+ {
+ uint32 internal;
+ Components components;
+- #if JUCE_GCC
+- uint8 comps[4]; // helper struct needed because gcc does not allow references to packed union members
+- #endif
+ };
+ }
+ #ifndef DOXYGEN
+@@ -429,10 +412,6 @@ class JUCE_API PixelRGB
+ forcedinline uint8 getGreen() const noexcept { return g; }
+ forcedinline uint8 getBlue() const noexcept { return b; }
+
+- forcedinline uint8& getRed() noexcept { return r; }
+- forcedinline uint8& getGreen() noexcept { return g; }
+- forcedinline uint8& getBlue() noexcept { return b; }
+-
+ //==============================================================================
+ /** Copies another pixel colour over this one.
+
+diff --git a/JUCE/modules/juce_graphics/native/juce_RenderingHelpers.h b/JUCE/modules/juce_graphics/native/juce_RenderingHelpers.h
+index 1c4cd31ef..29519cb5a 100644
+--- a/JUCE/modules/juce_graphics/native/juce_RenderingHelpers.h
++++ b/JUCE/modules/juce_graphics/native/juce_RenderingHelpers.h
+@@ -581,18 +581,10 @@ namespace EdgeTableFillers
+ : destData (image), sourceColour (colour)
+ {
+ if (sizeof (PixelType) == 3 && destData.pixelStride == sizeof (PixelType))
+- {
+ areRGBComponentsEqual = sourceColour.getRed() == sourceColour.getGreen()
+ && sourceColour.getGreen() == sourceColour.getBlue();
+- filler[0].set (sourceColour);
+- filler[1].set (sourceColour);
+- filler[2].set (sourceColour);
+- filler[3].set (sourceColour);
+- }
+ else
+- {
+ areRGBComponentsEqual = false;
+- }
+ }
+
+ forcedinline void setEdgeTableYPos (const int y) noexcept
+@@ -643,7 +635,6 @@ namespace EdgeTableFillers
+ const Image::BitmapData& destData;
+ PixelType* linePixels;
+ PixelARGB sourceColour;
+- PixelRGB filler [4];
+ bool areRGBComponentsEqual;
+
+ forcedinline PixelType* getPixel (const int x) const noexcept
+@@ -658,43 +649,8 @@ namespace EdgeTableFillers
+
+ forcedinline void replaceLine (PixelRGB* dest, const PixelARGB colour, int width) const noexcept
+ {
+- if (destData.pixelStride == sizeof (*dest))
+- {
+- if (areRGBComponentsEqual) // if all the component values are the same, we can cheat..
+- {
+- memset (dest, colour.getRed(), (size_t) width * 3);
+- }
+- else
+- {
+- if (width >> 5)
+- {
+- const int* const intFiller = reinterpret_cast<const int*> (filler);
+-
+- while (width > 8 && (((pointer_sized_int) dest) & 7) != 0)
+- {
+- dest->set (colour);
+- ++dest;
+- --width;
+- }
+-
+- while (width > 4)
+- {
+- int* d = reinterpret_cast<int*> (dest);
+- *d++ = intFiller[0];
+- *d++ = intFiller[1];
+- *d++ = intFiller[2];
+- dest = reinterpret_cast<PixelRGB*> (d);
+- width -= 4;
+- }
+- }
+-
+- while (--width >= 0)
+- {
+- dest->set (colour);
+- ++dest;
+- }
+- }
+- }
++ if ((size_t) destData.pixelStride == sizeof (*dest) && areRGBComponentsEqual)
++ memset ((void*) dest, colour.getRed(), (size_t) width * 3); // if all the component values are the same, we can cheat..
+ else
+ {
+ JUCE_PERFORM_PIXEL_OP_LOOP (set (colour))
diff --git a/gnu/packages/patches/icu4c-CVE-2020-10531.patch b/gnu/packages/patches/icu4c-CVE-2020-10531.patch
deleted file mode 100644
index c2ab923bdc..0000000000
--- a/gnu/packages/patches/icu4c-CVE-2020-10531.patch
+++ /dev/null
@@ -1,127 +0,0 @@
-Fix CVE-2020-10531:
-
-https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-10531
-
-Patch copied from upstream source repository (changes to the test suite
-are commented out):
-
-https://github.com/unicode-org/icu/commit/b7d08bc04a4296982fcef8b6b8a354a9e4e7afca
-
-From b7d08bc04a4296982fcef8b6b8a354a9e4e7afca Mon Sep 17 00:00:00 2001
-From: Frank Tang <ftang@chromium.org>
-Date: Sat, 1 Feb 2020 02:39:04 +0000
-Subject: [PATCH] ICU-20958 Prevent SEGV_MAPERR in append
-
-See #971
----
- icu4c/source/common/unistr.cpp | 6 ++-
- icu4c/source/test/intltest/ustrtest.cpp | 62 +++++++++++++++++++++++++
- icu4c/source/test/intltest/ustrtest.h | 1 +
- 3 files changed, 68 insertions(+), 1 deletion(-)
-
-diff --git a/icu4c/source/common/unistr.cpp b/icu4c/source/common/unistr.cpp
-index 901bb3358ba..077b4d6ef20 100644
---- a/icu4c/source/common/unistr.cpp
-+++ b/icu4c/source/common/unistr.cpp
-@@ -1563,7 +1563,11 @@ UnicodeString::doAppend(const UChar *srcChars, int32_t srcStart, int32_t srcLeng
- }
-
- int32_t oldLength = length();
-- int32_t newLength = oldLength + srcLength;
-+ int32_t newLength;
-+ if (uprv_add32_overflow(oldLength, srcLength, &newLength)) {
-+ setToBogus();
-+ return *this;
-+ }
-
- // Check for append onto ourself
- const UChar* oldArray = getArrayStart();
-#diff --git a/icu4c/source/test/intltest/ustrtest.cpp b/icu4c/source/test/intltest/ustrtest.cpp
-#index b6515ea813c..ad38bdf53a3 100644
-#--- a/icu4c/source/test/intltest/ustrtest.cpp
-#+++ b/icu4c/source/test/intltest/ustrtest.cpp
-#@@ -67,6 +67,7 @@ void UnicodeStringTest::runIndexedTest( int32_t index, UBool exec, const char* &
-# TESTCASE_AUTO(TestWCharPointers);
-# TESTCASE_AUTO(TestNullPointers);
-# TESTCASE_AUTO(TestUnicodeStringInsertAppendToSelf);
-#+ TESTCASE_AUTO(TestLargeAppend);
-# TESTCASE_AUTO_END;
-# }
-#
-#@@ -2310,3 +2311,64 @@ void UnicodeStringTest::TestUnicodeStringInsertAppendToSelf() {
-# str.insert(2, sub);
-# assertEquals("", u"abbcdcde", str);
-# }
-#+
-#+void UnicodeStringTest::TestLargeAppend() {
-#+ if(quick) return;
-#+
-#+ IcuTestErrorCode status(*this, "TestLargeAppend");
-#+ // Make a large UnicodeString
-#+ int32_t len = 0xAFFFFFF;
-#+ UnicodeString str;
-#+ char16_t *buf = str.getBuffer(len);
-#+ // A fast way to set buffer to valid Unicode.
-#+ // 4E4E is a valid unicode character
-#+ uprv_memset(buf, 0x4e, len * 2);
-#+ str.releaseBuffer(len);
-#+ UnicodeString dest;
-#+ // Append it 16 times
-#+ // 0xAFFFFFF times 16 is 0xA4FFFFF1,
-#+ // which is greater than INT32_MAX, which is 0x7FFFFFFF.
-#+ int64_t total = 0;
-#+ for (int32_t i = 0; i < 16; i++) {
-#+ dest.append(str);
-#+ total += len;
-#+ if (total <= INT32_MAX) {
-#+ assertFalse("dest is not bogus", dest.isBogus());
-#+ } else {
-#+ assertTrue("dest should be bogus", dest.isBogus());
-#+ }
-#+ }
-#+ dest.remove();
-#+ total = 0;
-#+ for (int32_t i = 0; i < 16; i++) {
-#+ dest.append(str);
-#+ total += len;
-#+ if (total + len <= INT32_MAX) {
-#+ assertFalse("dest is not bogus", dest.isBogus());
-#+ } else if (total <= INT32_MAX) {
-#+ // Check that a string of exactly the maximum size works
-#+ UnicodeString str2;
-#+ int32_t remain = INT32_MAX - total;
-#+ char16_t *buf2 = str2.getBuffer(remain);
-#+ if (buf2 == nullptr) {
-#+ // if somehow memory allocation fail, return the test
-#+ return;
-#+ }
-#+ uprv_memset(buf2, 0x4e, remain * 2);
-#+ str2.releaseBuffer(remain);
-#+ dest.append(str2);
-#+ total += remain;
-#+ assertEquals("When a string of exactly the maximum size works", (int64_t)INT32_MAX, total);
-#+ assertEquals("When a string of exactly the maximum size works", INT32_MAX, dest.length());
-#+ assertFalse("dest is not bogus", dest.isBogus());
-#+
-#+ // Check that a string size+1 goes bogus
-#+ str2.truncate(1);
-#+ dest.append(str2);
-#+ total++;
-#+ assertTrue("dest should be bogus", dest.isBogus());
-#+ } else {
-#+ assertTrue("dest should be bogus", dest.isBogus());
-#+ }
-#+ }
-#+}
-#diff --git a/icu4c/source/test/intltest/ustrtest.h b/icu4c/source/test/intltest/ustrtest.h
-#index 218befdcc68..4a356a92c7a 100644
-#--- a/icu4c/source/test/intltest/ustrtest.h
-#+++ b/icu4c/source/test/intltest/ustrtest.h
-#@@ -97,6 +97,7 @@ class UnicodeStringTest: public IntlTest {
-# void TestWCharPointers();
-# void TestNullPointers();
-# void TestUnicodeStringInsertAppendToSelf();
-#+ void TestLargeAppend();
-# };
-#
-# #endif
diff --git a/gnu/packages/patches/inetutils-hurd.patch b/gnu/packages/patches/inetutils-hurd.patch
deleted file mode 100644
index bd65c4feb1..0000000000
--- a/gnu/packages/patches/inetutils-hurd.patch
+++ /dev/null
@@ -1,583 +0,0 @@
-Support compiling on the Hurd.
-
-Taken from https://git.hadrons.org/cgit/debian/pkgs/inetutils.git/tree/debian/patches/0002-ifconfig-Improve-the-support-for-GNU-Hurd.patch
-
-From 9a90d9b9119906df23cb2db1503cb0f099942dd9 Mon Sep 17 00:00:00 2001
-From: Mats Erik Andersson <gnu@gisladisker.se>
-Date: Sat, 18 Jul 2015 01:12:41 +0200
-Subject: [PATCH 02/35] ifconfig: Improve the support for GNU/Hurd.
-
-Use system specific code instead of generic code.
-This provides abilities similar to other systems.
----
- ChangeLog | 17 +++
- ifconfig/system.c | 10 +-
- ifconfig/system.h | 2 +
- ifconfig/system/Makefile.am | 4 +-
- ifconfig/system/generic.c | 14 +-
- ifconfig/system/hurd.c | 292 ++++++++++++++++++++++++++++++++++++
- ifconfig/system/hurd.h | 50 ++++++
- 7 files changed, 381 insertions(+), 8 deletions(-)
- create mode 100644 ifconfig/system/hurd.c
- create mode 100644 ifconfig/system/hurd.h
-
-diff --git a/ifconfig/system.c b/ifconfig/system.c
-index 30677e41..e108dc2e 100644
---- a/ifconfig/system.c
-+++ b/ifconfig/system.c
-@@ -25,10 +25,12 @@
- # include "system/solaris.c"
- #elif defined __QNX__
- # include "system/qnx.c"
--# elif defined __DragonFly__ || defined __FreeBSD__ || \
-- defined __FreeBSD_kernel__ || \
-- defined __NetBSD__ || defined __OpenBSD__
--# include "system/bsd.c"
-+#elif defined __DragonFly__ || defined __FreeBSD__ || \
-+ defined __FreeBSD_kernel__ || \
-+ defined __NetBSD__ || defined __OpenBSD__
-+# include "system/bsd.c"
-+#elif defined __GNU__
-+# include "system/hurd.c"
- #else
- # include "system/generic.c"
- #endif
-diff --git a/ifconfig/system.h b/ifconfig/system.h
-index 8521ad95..66878d3a 100644
---- a/ifconfig/system.h
-+++ b/ifconfig/system.h
-@@ -97,6 +97,8 @@ extern struct if_nameindex* (*system_if_nameindex) (void);
- defined __FreeBSD_kernel__ || \
- defined __NetBSD__ || defined __OpenBSD__
- # include "system/bsd.h"
-+# elif defined __GNU__
-+# include "system/hurd.h"
- # else
- # include "system/generic.h"
- # endif
-diff --git a/ifconfig/system/Makefile.am b/ifconfig/system/Makefile.am
-index 954c6774..62a9f1c4 100644
---- a/ifconfig/system/Makefile.am
-+++ b/ifconfig/system/Makefile.am
-@@ -26,8 +26,10 @@ noinst_HEADERS = \
- linux.h \
- solaris.h \
- qnx.h \
-+ hurd.h \
- bsd.c \
- generic.c \
- linux.c \
- solaris.c \
-- qnx.c
-+ qnx.c \
-+ hurd.c
-diff --git a/ifconfig/system/generic.c b/ifconfig/system/generic.c
-index 9a2bda55..20a78bde 100644
---- a/ifconfig/system/generic.c
-+++ b/ifconfig/system/generic.c
-@@ -22,6 +22,8 @@
- #include <config.h>
-
- #include "../ifconfig.h"
-+
-+#include <unused-parameter.h>
-
-
- /* Output format stuff. */
-@@ -36,19 +38,25 @@ const char *system_help;
- struct argp_child system_argp_child;
-
- int
--system_parse_opt (struct ifconfig **ifp, char option, char *optarg)
-+system_parse_opt (struct ifconfig **ifp _GL_UNUSED_PARAMETER,
-+ char option _GL_UNUSED_PARAMETER,
-+ char *optarg _GL_UNUSED_PARAMETER)
- {
- return 0;
- }
-
- int
--system_parse_opt_rest (struct ifconfig **ifp, int argc, char *argv[])
-+system_parse_opt_rest (struct ifconfig **ifp _GL_UNUSED_PARAMETER,
-+ int argc _GL_UNUSED_PARAMETER,
-+ char *argv[] _GL_UNUSED_PARAMETER)
- {
- return 0;
- }
-
- int
--system_configure (int sfd, struct ifreq *ifr, struct system_ifconfig *ifs)
-+system_configure (int sfd _GL_UNUSED_PARAMETER,
-+ struct ifreq *ifr _GL_UNUSED_PARAMETER,
-+ struct system_ifconfig *ifs _GL_UNUSED_PARAMETER)
- {
- return 0;
- }
-diff --git a/ifconfig/system/hurd.c b/ifconfig/system/hurd.c
-new file mode 100644
-index 00000000..3bd19775
---- /dev/null
-+++ b/ifconfig/system/hurd.c
-@@ -0,0 +1,292 @@
-+/* hurd.c -- Code for ifconfig specific to GNU/Hurd.
-+ Copyright (C) 2015 Free Software Foundation, Inc.
-+
-+ This file is part of GNU Inetutils.
-+
-+ GNU Inetutils is free software: you can redistribute it and/or modify
-+ it under the terms of the GNU General Public License as published by
-+ the Free Software Foundation, either version 3 of the License, or (at
-+ your option) any later version.
-+
-+ GNU Inetutils is distributed in the hope that it will be useful, but
-+ WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-+ General Public License for more details.
-+
-+ You should have received a copy of the GNU General Public License
-+ along with this program. If not, see `http://www.gnu.org/licenses/'. */
-+
-+/* Mostly written by Marcus Brinkmann.
-+ Adaptions to GNU/Hurd by Mats Erik Andersson. */
-+
-+#include <config.h>
-+
-+#include <stdlib.h>
-+#include <sys/ioctl.h>
-+#include <net/if_arp.h>
-+#include "../ifconfig.h"
-+
-+#include <unused-parameter.h>
-+
-+
-+/* Output format stuff. */
-+
-+const char *system_default_format = "gnu";
-+
-+
-+/* Argument parsing stuff. */
-+
-+const char *system_help = "NAME [ADDR]\
-+ [broadcast BRDADDR] [netmask MASK]\
-+ [mtu N] [up|down] [FLAGS]";
-+
-+struct argp_child system_argp_child;
-+
-+int
-+system_parse_opt (struct ifconfig **ifp _GL_UNUSED_PARAMETER,
-+ char option _GL_UNUSED_PARAMETER,
-+ char *optarg _GL_UNUSED_PARAMETER)
-+{
-+ return 0;
-+}
-+
-+int
-+system_parse_opt_rest (struct ifconfig **ifp, int argc, char *argv[])
-+{
-+ int i = 0, mask, rev;
-+ enum {
-+ EXPECT_NOTHING,
-+ EXPECT_AF,
-+ EXPECT_BROADCAST,
-+ EXPECT_NETMASK,
-+ EXPECT_METRIC,
-+ EXPECT_MTU
-+ } expect = EXPECT_AF;
-+
-+ *ifp = parse_opt_new_ifs (argv[0]);
-+
-+ while (++i < argc)
-+ {
-+ switch (expect)
-+ {
-+ case EXPECT_BROADCAST:
-+ parse_opt_set_brdaddr (*ifp, argv[i]);
-+ break;
-+
-+ case EXPECT_NETMASK:
-+ parse_opt_set_netmask (*ifp, argv[i]);
-+ break;
-+
-+ case EXPECT_MTU:
-+ parse_opt_set_mtu (*ifp, argv[i]);
-+ break;
-+
-+ /* XXX: 2015-07-18, GNU/Hurd does not yet support
-+ ioctl(SIOCSIFMETRIC), but we let the code
-+ handle this standard ability anyway!
-+ */
-+ case EXPECT_METRIC:
-+ parse_opt_set_metric (*ifp, argv[i]);
-+ break;
-+
-+ case EXPECT_AF:
-+ expect = EXPECT_NOTHING;
-+ if (!strcmp (argv[i], "inet"))
-+ continue;
-+ else if (!strcmp (argv[i], "inet6"))
-+ {
-+ error (0, 0, "%s is not a supported address family", argv[i]);
-+ return 0;
-+ }
-+ break;
-+
-+ case EXPECT_NOTHING:
-+ break;
-+ }
-+
-+ if (expect != EXPECT_NOTHING)
-+ expect = EXPECT_NOTHING;
-+ else if (!strcmp (argv[i], "broadcast"))
-+ expect = EXPECT_BROADCAST;
-+ else if (!strcmp (argv[i], "netmask"))
-+ expect = EXPECT_NETMASK;
-+ else if (!strcmp (argv[i], "metric"))
-+ expect = EXPECT_METRIC;
-+ else if (!strcmp (argv[i], "mtu"))
-+ expect = EXPECT_MTU;
-+ else if (!strcmp (argv[i], "up"))
-+ parse_opt_set_flag (*ifp, IFF_UP | IFF_RUNNING, 0);
-+ else if (!strcmp (argv[i], "down"))
-+ parse_opt_set_flag (*ifp, IFF_UP, 1);
-+ else if (((mask = if_nameztoflag (argv[i], &rev))
-+ & ~IU_IFF_CANTCHANGE) != 0)
-+ parse_opt_set_flag (*ifp, mask, rev);
-+ else
-+ {
-+ if (!((*ifp)->valid & IF_VALID_ADDR))
-+ parse_opt_set_address (*ifp, argv[i]);
-+ else if (!((*ifp)->valid & IF_VALID_DSTADDR))
-+ parse_opt_set_dstaddr (*ifp, argv[i]);
-+ }
-+ }
-+
-+ switch (expect)
-+ {
-+ case EXPECT_BROADCAST:
-+ error (0, 0, "option `broadcast' requires an argument");
-+ break;
-+
-+ case EXPECT_NETMASK:
-+ error (0, 0, "option `netmask' requires an argument");
-+ break;
-+
-+ case EXPECT_METRIC:
-+ error (0, 0, "option `metric' requires an argument");
-+ break;
-+
-+ case EXPECT_MTU:
-+ error (0, 0, "option `mtu' requires an argument");
-+ break;
-+
-+ case EXPECT_AF:
-+ case EXPECT_NOTHING:
-+ return 1;
-+ }
-+
-+ return 0;
-+}
-+
-+int
-+system_configure (int sfd _GL_UNUSED_PARAMETER,
-+ struct ifreq *ifr _GL_UNUSED_PARAMETER,
-+ struct system_ifconfig *ifs _GL_UNUSED_PARAMETER)
-+{
-+ return 0;
-+}
-+
-+struct if_nameindex* (*system_if_nameindex) (void) = if_nameindex;
-+
-+static void
-+print_hwaddr_ether (format_data_t form _GL_UNUSED_PARAMETER,
-+ unsigned char *data)
-+{
-+ *column += printf ("%02X:%02X:%02X:%02X:%02X:%02X",
-+ data[0], data[1], data[2], data[3], data[4], data[5]);
-+ had_output = 1;
-+}
-+
-+struct arphrd_symbol
-+{
-+ const char *name;
-+ const char *title;
-+ int value;
-+ void (*print_hwaddr) (format_data_t form, unsigned char *data);
-+} arphrd_symbols[] =
-+ {
-+#ifdef ARPHRD_ETHER /* Ethernet 10/100Mbps. */
-+ { "ETHER", "Ethernet", ARPHRD_ETHER, print_hwaddr_ether},
-+#endif
-+#ifdef ARPHRD_LOOPBACK /* Loopback device. */
-+ { "LOOPBACK", "Local Loopback", ARPHRD_LOOPBACK, NULL},
-+#endif
-+ /* XXX: The image debian-hurd-20150424 returns the value 4
-+ instead of expected ARPHRD_LOOPBACK. This has been
-+ discussed in the list debian-hurd, where I was asked
-+ to resist the temptation of a work around!
-+ */
-+ { NULL, NULL, 0, NULL}
-+ };
-+
-+struct arphrd_symbol *
-+arphrd_findvalue (int value)
-+{
-+ struct arphrd_symbol *arp = arphrd_symbols;
-+ while (arp->name != NULL)
-+ {
-+ if (arp->value == value)
-+ break;
-+ arp++;
-+ }
-+ if (arp->name)
-+ return arp;
-+ else
-+ return NULL;
-+}
-+
-+void
-+system_fh_hwaddr_query (format_data_t form, int argc, char *argv[])
-+{
-+#ifdef SIOCGIFHWADDR
-+ struct arphrd_symbol *arp;
-+
-+ if (ioctl (form->sfd, SIOCGIFHWADDR, form->ifr) < 0)
-+ select_arg (form, argc, argv, 1);
-+
-+ arp = arphrd_findvalue (form->ifr->ifr_hwaddr.sa_family);
-+ select_arg (form, argc, argv, (arp && arp->print_hwaddr) ? 0 : 1);
-+#else
-+ select_arg (form, argc, argv, 1);
-+#endif
-+}
-+
-+void
-+system_fh_hwaddr (format_data_t form, int argc _GL_UNUSED_PARAMETER,
-+ char *argv[] _GL_UNUSED_PARAMETER)
-+{
-+#ifdef SIOCGIFHWADDR
-+ if (ioctl (form->sfd, SIOCGIFHWADDR, form->ifr) < 0)
-+ error (EXIT_FAILURE, errno,
-+ "SIOCGIFHWADDR failed for interface `%s'",
-+ form->ifr->ifr_name);
-+ else
-+ {
-+ struct arphrd_symbol *arp;
-+
-+ arp = arphrd_findvalue (form->ifr->ifr_hwaddr.sa_family);
-+ if (arp && arp->print_hwaddr)
-+ arp->print_hwaddr (form,
-+ (unsigned char *) form->ifr->ifr_hwaddr.sa_data);
-+ else
-+ put_string (form, "(hwaddr unknown)");
-+ }
-+#else
-+ *column += printf ("(not available)");
-+ had_output = 1;
-+#endif
-+}
-+
-+void
-+system_fh_hwtype_query (format_data_t form, int argc, char *argv[])
-+{
-+#ifdef SIOCGIFHWADDR
-+ if (ioctl (form->sfd, SIOCGIFHWADDR, form->ifr) >= 0)
-+ select_arg (form, argc, argv, 0);
-+ else
-+#endif
-+ select_arg (form, argc, argv, 1);
-+}
-+
-+void
-+system_fh_hwtype (format_data_t form, int argc _GL_UNUSED_PARAMETER,
-+ char *argv[] _GL_UNUSED_PARAMETER)
-+{
-+#ifdef SIOCGIFHWADDR
-+ if (ioctl (form->sfd, SIOCGIFHWADDR, form->ifr) < 0)
-+ error (EXIT_FAILURE, errno,
-+ "SIOCGIFHWADDR failed for interface `%s'",
-+ form->ifr->ifr_name);
-+ else
-+ {
-+ struct arphrd_symbol *arp;
-+
-+ arp = arphrd_findvalue (form->ifr->ifr_hwaddr.sa_family);
-+ if (arp)
-+ put_string (form, arp->title);
-+ else
-+ put_string (form, "(hwtype unknown)");
-+ }
-+#else
-+ *column += printf ("(not available)");
-+ had_output = 1;
-+#endif
-+}
-diff --git a/ifconfig/system/hurd.h b/ifconfig/system/hurd.h
-new file mode 100644
-index 00000000..bab14565
---- /dev/null
-+++ b/ifconfig/system/hurd.h
-@@ -0,0 +1,50 @@
-+/*
-+ Copyright (C) 2015 Free Software Foundation, Inc.
-+
-+ This file is part of GNU Inetutils.
-+
-+ GNU Inetutils is free software: you can redistribute it and/or modify
-+ it under the terms of the GNU General Public License as published by
-+ the Free Software Foundation, either version 3 of the License, or (at
-+ your option) any later version.
-+
-+ GNU Inetutils is distributed in the hope that it will be useful, but
-+ WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-+ General Public License for more details.
-+
-+ You should have received a copy of the GNU General Public License
-+ along with this program. If not, see `http://www.gnu.org/licenses/'. */
-+
-+/* Written by Mats Erik Andersson. */
-+
-+#ifndef IFCONFIG_SYSTEM_HURD_H
-+# define IFCONFIG_SYSTEM_HURD_H
-+
-+# include "../printif.h"
-+# include "../options.h"
-+
-+
-+/* Option support. */
-+
-+struct system_ifconfig
-+{
-+ int valid;
-+};
-+
-+
-+/* Output format support. */
-+
-+# define SYSTEM_FORMAT_HANDLER \
-+ { "hurd", fh_nothing}, \
-+ { "hwaddr?", system_fh_hwaddr_query}, \
-+ { "hwaddr", system_fh_hwaddr}, \
-+ { "hwtype?", system_fh_hwtype_query}, \
-+ { "hwtype", system_fh_hwtype},
-+
-+void system_fh_hwaddr_query (format_data_t form, int argc, char *argv[]);
-+void system_fh_hwaddr (format_data_t form, int argc, char *argv[]);
-+void system_fh_hwtype_query (format_data_t form, int argc, char *argv[]);
-+void system_fh_hwtype (format_data_t form, int argc, char *argv[]);
-+
-+#endif /* !IFCONFIG_SYSTEM_HURD_H */
---
-2.23.0.rc1.170.gbd704faa3e
-
-From 589dab9c7d3119da82837dabae34c8a3d16cbe49 Mon Sep 17 00:00:00 2001
-From: Mats Erik Andersson <gnu@gisladisker.se>
-Date: Thu, 30 Jul 2015 01:06:42 +0200
-Subject: [PATCH 07/35] ifconfig: Hardware detection in GNU/Hurd.
-
-A work-around needed to distinguish hardware type.
----
- ChangeLog | 10 ++++++++++
- ifconfig/system/hurd.c | 19 ++++++++++++-------
- 2 files changed, 22 insertions(+), 7 deletions(-)
-
-diff --git a/ifconfig/system/hurd.c b/ifconfig/system/hurd.c
-index 3bd19775..b6261a00 100644
---- a/ifconfig/system/hurd.c
-+++ b/ifconfig/system/hurd.c
-@@ -175,6 +175,16 @@ print_hwaddr_ether (format_data_t form _GL_UNUSED_PARAMETER,
- had_output = 1;
- }
-
-+/* GNU/Hurd and Mach are using a mixture of BSD definitions
-+ * and GNU/Linux interface headers, which in this situation
-+ * means that sa_family_t is an unsigned char, from BSD, while
-+ * all ARPHRD_* come from GNU/Linux and are thus 16 bits wide.
-+ * We must account for this. The following bitmask will
-+ * adapt to any future change!
-+ */
-+
-+#define _ARP_MASK ((sizeof (sa_family_t) == 1) ? 0xff : 0xffff)
-+
- struct arphrd_symbol
- {
- const char *name;
-@@ -184,16 +194,11 @@ struct arphrd_symbol
- } arphrd_symbols[] =
- {
- #ifdef ARPHRD_ETHER /* Ethernet 10/100Mbps. */
-- { "ETHER", "Ethernet", ARPHRD_ETHER, print_hwaddr_ether},
-+ { "ETHER", "Ethernet", ARPHRD_ETHER & _ARP_MASK, print_hwaddr_ether},
- #endif
- #ifdef ARPHRD_LOOPBACK /* Loopback device. */
-- { "LOOPBACK", "Local Loopback", ARPHRD_LOOPBACK, NULL},
-+ { "LOOPBACK", "Local Loopback", ARPHRD_LOOPBACK & _ARP_MASK, NULL},
- #endif
-- /* XXX: The image debian-hurd-20150424 returns the value 4
-- instead of expected ARPHRD_LOOPBACK. This has been
-- discussed in the list debian-hurd, where I was asked
-- to resist the temptation of a work around!
-- */
- { NULL, NULL, 0, NULL}
- };
-
---
-2.23.0.rc1.170.gbd704faa3e
-
-From d379784b4461d17b2536effd1b52bae21cd28a32 Mon Sep 17 00:00:00 2001
-From: Guillem Jover <guillem@hadrons.org>
-Date: Fri, 16 Aug 2019 00:34:03 +0200
-Subject: [PATCH 35/35] telnet: Several ioctls have been disabled in the Hurd's
- glibc
-
-But not the related option macros. inetutils uses those macros to decide
-whether the ioctls are available, so it is FTBFS now. The Hurd's glibc
-is being fixed, but we'll use this for now to get the builds going.
----
- telnet/sys_bsd.c | 7 ++++++-
- 1 file changed, 6 insertions(+), 1 deletion(-)
-
-diff --git a/telnet/sys_bsd.c b/telnet/sys_bsd.c
-index 662536ab..5eb35cb5 100644
---- a/telnet/sys_bsd.c
-+++ b/telnet/sys_bsd.c
-@@ -63,6 +63,7 @@
- #include <errno.h>
- #include <arpa/telnet.h>
- #include <sys/select.h>
-+#include <sys/ioctl.h>
- #include <unused-parameter.h>
-
- #include "ring.h"
-@@ -157,7 +158,7 @@ TerminalRead (char *buf, int n)
- int
- TerminalAutoFlush (void)
- {
--#if defined LNOFLSH
-+#if defined TIOCLGET && defined LNOFLSH
- int flush;
-
- ioctl (0, TIOCLGET, (char *) &flush);
-@@ -260,7 +261,9 @@ TerminalSaveState (void)
- ioctl (0, TIOCGETP, (char *) &ottyb);
- ioctl (0, TIOCGETC, (char *) &otc);
- ioctl (0, TIOCGLTC, (char *) &oltc);
-+#ifdef TIOCLGET
- ioctl (0, TIOCLGET, (char *) &olmode);
-+#endif
-
- ntc = otc;
- nltc = oltc;
-@@ -755,7 +758,9 @@ TerminalNewMode (register int f)
- #endif
- }
- #ifndef USE_TERMIO
-+#ifdef TIOCLSET
- ioctl (tin, TIOCLSET, (char *) &lmode);
-+#endif
- ioctl (tin, TIOCSLTC, (char *) &ltc);
- ioctl (tin, TIOCSETC, (char *) &tc);
- ioctl (tin, TIOCSETN, (char *) &sb);
---
-2.23.0.rc1.170.gbd704faa3e
-
diff --git a/gnu/packages/patches/json-c-CVE-2020-12762.patch b/gnu/packages/patches/json-c-CVE-2020-12762.patch
deleted file mode 100644
index 80daa475e9..0000000000
--- a/gnu/packages/patches/json-c-CVE-2020-12762.patch
+++ /dev/null
@@ -1,193 +0,0 @@
-https://github.com/json-c/json-c/pull/608
-https://github.com/json-c/json-c/commit/5d6fa331418d49f1bd488553fd1cfa9ab023fabb.patch
-
-From 5d6fa331418d49f1bd488553fd1cfa9ab023fabb Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Bj=C3=B6rn=20Esser?= <besser82@fedoraproject.org>
-Date: Thu, 14 May 2020 12:32:30 +0200
-Subject: [PATCH] Fix CVE-2020-12762.
-
-This commit is a squashed backport of the following commits
-on the master branch:
-
- * 099016b7e8d70a6d5dd814e788bba08d33d48426
- * 77d935b7ae7871a1940cd827e850e6063044ec45
- * d07b91014986900a3a75f306d302e13e005e9d67
- * 519dfe1591d85432986f9762d41d1a883198c157
- * a59d5acfab4485d5133114df61785b1fc633e0c6
- * 26f080997d41cfdb17beab65e90c82217d0ac43b
----
- arraylist.c | 3 +++
- linkhash.c | 9 ++++++++-
- printbuf.c | 18 ++++++++++++++++--
- tests/test4.c | 29 +++++++++++++++++++++++++++++
- tests/test4.expected | 1 +
- 5 files changed, 57 insertions(+), 3 deletions(-)
-
-diff --git a/arraylist.c b/arraylist.c
-index 12ad8af6d3..e5524aca75 100644
---- a/arraylist.c
-+++ b/arraylist.c
-@@ -136,6 +136,9 @@ int array_list_del_idx(struct array_list *arr, size_t idx, size_t count)
- {
- size_t i, stop;
-
-+ /* Avoid overflow in calculation with large indices. */
-+ if (idx > SIZE_T_MAX - count)
-+ return -1;
- stop = idx + count;
- if (idx >= arr->length || stop > arr->length)
- return -1;
-diff --git a/linkhash.c b/linkhash.c
-index 7ea58c0abf..b021ef10b0 100644
---- a/linkhash.c
-+++ b/linkhash.c
-@@ -12,6 +12,7 @@
-
- #include "config.h"
-
-+#include <assert.h>
- #include <limits.h>
- #include <stdarg.h>
- #include <stddef.h>
-@@ -499,6 +500,8 @@ struct lh_table *lh_table_new(int size, lh_entry_free_fn *free_fn, lh_hash_fn *h
- int i;
- struct lh_table *t;
-
-+ /* Allocate space for elements to avoid divisions by zero. */
-+ assert(size > 0);
- t = (struct lh_table *)calloc(1, sizeof(struct lh_table));
- if (!t)
- return NULL;
-@@ -578,8 +581,12 @@ int lh_table_insert_w_hash(struct lh_table *t, const void *k, const void *v, con
- unsigned long n;
-
- if (t->count >= t->size * LH_LOAD_FACTOR)
-- if (lh_table_resize(t, t->size * 2) != 0)
-+ {
-+ /* Avoid signed integer overflow with large tables. */
-+ int new_size = (t->size > INT_MAX / 2) ? INT_MAX : (t->size * 2);
-+ if (t->size == INT_MAX || lh_table_resize(t, new_size) != 0)
- return -1;
-+ }
-
- n = h % t->size;
-
-diff --git a/printbuf.c b/printbuf.c
-index 976c12dde5..f9b15b1191 100644
---- a/printbuf.c
-+++ b/printbuf.c
-@@ -15,6 +15,7 @@
-
- #include "config.h"
-
-+#include <limits.h>
- #include <stdio.h>
- #include <stdlib.h>
- #include <string.h>
-@@ -66,9 +67,16 @@ static int printbuf_extend(struct printbuf *p, int min_size)
- if (p->size >= min_size)
- return 0;
-
-- new_size = p->size * 2;
-- if (new_size < min_size + 8)
-+ /* Prevent signed integer overflows with large buffers. */
-+ if (min_size > INT_MAX - 8)
-+ return -1;
-+ if (p->size > INT_MAX / 2)
- new_size = min_size + 8;
-+ else {
-+ new_size = p->size * 2;
-+ if (new_size < min_size + 8)
-+ new_size = min_size + 8;
-+ }
- #ifdef PRINTBUF_DEBUG
- MC_DEBUG("printbuf_memappend: realloc "
- "bpos=%d min_size=%d old_size=%d new_size=%d\n",
-@@ -83,6 +91,9 @@ static int printbuf_extend(struct printbuf *p, int min_size)
-
- int printbuf_memappend(struct printbuf *p, const char *buf, int size)
- {
-+ /* Prevent signed integer overflows with large buffers. */
-+ if (size > INT_MAX - p->bpos - 1)
-+ return -1;
- if (p->size <= p->bpos + size + 1)
- {
- if (printbuf_extend(p, p->bpos + size + 1) < 0)
-@@ -100,6 +111,9 @@ int printbuf_memset(struct printbuf *pb, int offset, int charvalue, int len)
-
- if (offset == -1)
- offset = pb->bpos;
-+ /* Prevent signed integer overflows with large buffers. */
-+ if (len > INT_MAX - offset)
-+ return -1;
- size_needed = offset + len;
- if (pb->size < size_needed)
- {
-diff --git a/tests/test4.c b/tests/test4.c
-index bd964ec789..288cec1792 100644
---- a/tests/test4.c
-+++ b/tests/test4.c
-@@ -3,12 +3,15 @@
- */
-
- #include "config.h"
-+#include <assert.h>
- #include <stdio.h>
-+#include <stdlib.h>
- #include <string.h>
-
- #include "json_inttypes.h"
- #include "json_object.h"
- #include "json_tokener.h"
-+#include "snprintf_compat.h"
-
- void print_hex(const char *s)
- {
-@@ -24,6 +27,29 @@ void print_hex(const char *s)
- putchar('\n');
- }
-
-+static void test_lot_of_adds(void);
-+static void test_lot_of_adds()
-+{
-+ int ii;
-+ char key[50];
-+ json_object *jobj = json_object_new_object();
-+ assert(jobj != NULL);
-+ for (ii = 0; ii < 500; ii++)
-+ {
-+ snprintf(key, sizeof(key), "k%d", ii);
-+ json_object *iobj = json_object_new_int(ii);
-+ assert(iobj != NULL);
-+ if (json_object_object_add(jobj, key, iobj))
-+ {
-+ fprintf(stderr, "FAILED to add object #%d\n", ii);
-+ abort();
-+ }
-+ }
-+ printf("%s\n", json_object_to_json_string(jobj));
-+ assert(json_object_object_length(jobj) == 500);
-+ json_object_put(jobj);
-+}
-+
- int main(void)
- {
- const char *input = "\"\\ud840\\udd26,\\ud840\\udd27,\\ud800\\udd26,\\ud800\\udd27\"";
-@@ -52,5 +78,8 @@ int main(void)
- retval = 1;
- }
- json_object_put(parse_result);
-+
-+ test_lot_of_adds();
-+
- return retval;
- }
-diff --git a/tests/test4.expected b/tests/test4.expected
-index 68d4336d90..cb2744012b 100644
---- a/tests/test4.expected
-+++ b/tests/test4.expected
-@@ -1,3 +1,4 @@
- input: "\ud840\udd26,\ud840\udd27,\ud800\udd26,\ud800\udd27"
- JSON parse result is correct: 𠄦,𠄧,𐄦,𐄧
- PASS
-+{ "k0": 0, "k1": 1, "k2": 2, "k3": 3, "k4": 4, "k5": 5, "k6": 6, "k7": 7, "k8": 8, "k9": 9, "k10": 10, "k11": 11, "k12": 12, "k13": 13, "k14": 14, "k15": 15, "k16": 16, "k17": 17, "k18": 18, "k19": 19, "k20": 20, "k21": 21, "k22": 22, "k23": 23, "k24": 24, "k25": 25, "k26": 26, "k27": 27, "k28": 28, "k29": 29, "k30": 30, "k31": 31, "k32": 32, "k33": 33, "k34": 34, "k35": 35, "k36": 36, "k37": 37, "k38": 38, "k39": 39, "k40": 40, "k41": 41, "k42": 42, "k43": 43, "k44": 44, "k45": 45, "k46": 46, "k47": 47, "k48": 48, "k49": 49, "k50": 50, "k51": 51, "k52": 52, "k53": 53, "k54": 54, "k55": 55, "k56": 56, "k57": 57, "k58": 58, "k59": 59, "k60": 60, "k61": 61, "k62": 62, "k63": 63, "k64": 64, "k65": 65, "k66": 66, "k67": 67, "k68": 68, "k69": 69, "k70": 70, "k71": 71, "k72": 72, "k73": 73, "k74": 74, "k75": 75, "k76": 76, "k77": 77, "k78": 78, "k79": 79, "k80": 80, "k81": 81, "k82": 82, "k83": 83, "k84": 84, "k85": 85, "k86": 86, "k87": 87, "k88": 88, "k89": 89, "k90": 90, "k91": 91, "k92": 92, "k93": 93, "k94": 94, "k95": 95, "k96": 96, "k97": 97, "k98": 98, "k99": 99, "k100": 100, "k101": 101, "k102": 102, "k103": 103, "k104": 104, "k105": 105, "k106": 106, "k107": 107, "k108": 108, "k109": 109, "k110": 110, "k111": 111, "k112": 112, "k113": 113, "k114": 114, "k115": 115, "k116": 116, "k117": 117, "k118": 118, "k119": 119, "k120": 120, "k121": 121, "k122": 122, "k123": 123, "k124": 124, "k125": 125, "k126": 126, "k127": 127, "k128": 128, "k129": 129, "k130": 130, "k131": 131, "k132": 132, "k133": 133, "k134": 134, "k135": 135, "k136": 136, "k137": 137, "k138": 138, "k139": 139, "k140": 140, "k141": 141, "k142": 142, "k143": 143, "k144": 144, "k145": 145, "k146": 146, "k147": 147, "k148": 148, "k149": 149, "k150": 150, "k151": 151, "k152": 152, "k153": 153, "k154": 154, "k155": 155, "k156": 156, "k157": 157, "k158": 158, "k159": 159, "k160": 160, "k161": 161, "k162": 162, "k163": 163, "k164": 164, "k165": 165, "k166": 166, "k167": 167, "k168": 168, "k169": 169, "k170": 170, "k171": 171, "k172": 172, "k173": 173, "k174": 174, "k175": 175, "k176": 176, "k177": 177, "k178": 178, "k179": 179, "k180": 180, "k181": 181, "k182": 182, "k183": 183, "k184": 184, "k185": 185, "k186": 186, "k187": 187, "k188": 188, "k189": 189, "k190": 190, "k191": 191, "k192": 192, "k193": 193, "k194": 194, "k195": 195, "k196": 196, "k197": 197, "k198": 198, "k199": 199, "k200": 200, "k201": 201, "k202": 202, "k203": 203, "k204": 204, "k205": 205, "k206": 206, "k207": 207, "k208": 208, "k209": 209, "k210": 210, "k211": 211, "k212": 212, "k213": 213, "k214": 214, "k215": 215, "k216": 216, "k217": 217, "k218": 218, "k219": 219, "k220": 220, "k221": 221, "k222": 222, "k223": 223, "k224": 224, "k225": 225, "k226": 226, "k227": 227, "k228": 228, "k229": 229, "k230": 230, "k231": 231, "k232": 232, "k233": 233, "k234": 234, "k235": 235, "k236": 236, "k237": 237, "k238": 238, "k239": 239, "k240": 240, "k241": 241, "k242": 242, "k243": 243, "k244": 244, "k245": 245, "k246": 246, "k247": 247, "k248": 248, "k249": 249, "k250": 250, "k251": 251, "k252": 252, "k253": 253, "k254": 254, "k255": 255, "k256": 256, "k257": 257, "k258": 258, "k259": 259, "k260": 260, "k261": 261, "k262": 262, "k263": 263, "k264": 264, "k265": 265, "k266": 266, "k267": 267, "k268": 268, "k269": 269, "k270": 270, "k271": 271, "k272": 272, "k273": 273, "k274": 274, "k275": 275, "k276": 276, "k277": 277, "k278": 278, "k279": 279, "k280": 280, "k281": 281, "k282": 282, "k283": 283, "k284": 284, "k285": 285, "k286": 286, "k287": 287, "k288": 288, "k289": 289, "k290": 290, "k291": 291, "k292": 292, "k293": 293, "k294": 294, "k295": 295, "k296": 296, "k297": 297, "k298": 298, "k299": 299, "k300": 300, "k301": 301, "k302": 302, "k303": 303, "k304": 304, "k305": 305, "k306": 306, "k307": 307, "k308": 308, "k309": 309, "k310": 310, "k311": 311, "k312": 312, "k313": 313, "k314": 314, "k315": 315, "k316": 316, "k317": 317, "k318": 318, "k319": 319, "k320": 320, "k321": 321, "k322": 322, "k323": 323, "k324": 324, "k325": 325, "k326": 326, "k327": 327, "k328": 328, "k329": 329, "k330": 330, "k331": 331, "k332": 332, "k333": 333, "k334": 334, "k335": 335, "k336": 336, "k337": 337, "k338": 338, "k339": 339, "k340": 340, "k341": 341, "k342": 342, "k343": 343, "k344": 344, "k345": 345, "k346": 346, "k347": 347, "k348": 348, "k349": 349, "k350": 350, "k351": 351, "k352": 352, "k353": 353, "k354": 354, "k355": 355, "k356": 356, "k357": 357, "k358": 358, "k359": 359, "k360": 360, "k361": 361, "k362": 362, "k363": 363, "k364": 364, "k365": 365, "k366": 366, "k367": 367, "k368": 368, "k369": 369, "k370": 370, "k371": 371, "k372": 372, "k373": 373, "k374": 374, "k375": 375, "k376": 376, "k377": 377, "k378": 378, "k379": 379, "k380": 380, "k381": 381, "k382": 382, "k383": 383, "k384": 384, "k385": 385, "k386": 386, "k387": 387, "k388": 388, "k389": 389, "k390": 390, "k391": 391, "k392": 392, "k393": 393, "k394": 394, "k395": 395, "k396": 396, "k397": 397, "k398": 398, "k399": 399, "k400": 400, "k401": 401, "k402": 402, "k403": 403, "k404": 404, "k405": 405, "k406": 406, "k407": 407, "k408": 408, "k409": 409, "k410": 410, "k411": 411, "k412": 412, "k413": 413, "k414": 414, "k415": 415, "k416": 416, "k417": 417, "k418": 418, "k419": 419, "k420": 420, "k421": 421, "k422": 422, "k423": 423, "k424": 424, "k425": 425, "k426": 426, "k427": 427, "k428": 428, "k429": 429, "k430": 430, "k431": 431, "k432": 432, "k433": 433, "k434": 434, "k435": 435, "k436": 436, "k437": 437, "k438": 438, "k439": 439, "k440": 440, "k441": 441, "k442": 442, "k443": 443, "k444": 444, "k445": 445, "k446": 446, "k447": 447, "k448": 448, "k449": 449, "k450": 450, "k451": 451, "k452": 452, "k453": 453, "k454": 454, "k455": 455, "k456": 456, "k457": 457, "k458": 458, "k459": 459, "k460": 460, "k461": 461, "k462": 462, "k463": 463, "k464": 464, "k465": 465, "k466": 466, "k467": 467, "k468": 468, "k469": 469, "k470": 470, "k471": 471, "k472": 472, "k473": 473, "k474": 474, "k475": 475, "k476": 476, "k477": 477, "k478": 478, "k479": 479, "k480": 480, "k481": 481, "k482": 482, "k483": 483, "k484": 484, "k485": 485, "k486": 486, "k487": 487, "k488": 488, "k489": 489, "k490": 490, "k491": 491, "k492": 492, "k493": 493, "k494": 494, "k495": 495, "k496": 496, "k497": 497, "k498": 498, "k499": 499 }
diff --git a/gnu/packages/patches/jsoncpp-fix-inverted-case.patch b/gnu/packages/patches/jsoncpp-fix-inverted-case.patch
deleted file mode 100644
index e4897de1b8..0000000000
--- a/gnu/packages/patches/jsoncpp-fix-inverted-case.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-This patch fixes a bug and related test failure on platforms where 'char'
-is unsigned.
-
-Taken from upstream:
-https://github.com/open-source-parsers/jsoncpp/commit/f11611c8785082ead760494cba06196f14a06dcb
-
-diff --git a/src/lib_json/json_writer.cpp b/src/lib_json/json_writer.cpp
-index 8e06cca2..56195dc1 100644
---- a/src/lib_json/json_writer.cpp
-+++ b/src/lib_json/json_writer.cpp
-@@ -178,8 +178,9 @@ static bool isAnyCharRequiredQuoting(char const* s, size_t n) {
-
- char const* const end = s + n;
- for (char const* cur = s; cur < end; ++cur) {
-- if (*cur == '\\' || *cur == '\"' || *cur < ' ' ||
-- static_cast<unsigned char>(*cur) < 0x80)
-+ if (*cur == '\\' || *cur == '\"' ||
-+ static_cast<unsigned char>(*cur) < ' ' ||
-+ static_cast<unsigned char>(*cur) >= 0x80)
- return true;
- }
- return false;
diff --git a/gnu/packages/patches/jsoncpp-pkg-config-version.patch b/gnu/packages/patches/jsoncpp-pkg-config-version.patch
new file mode 100644
index 0000000000..3983cc300c
--- /dev/null
+++ b/gnu/packages/patches/jsoncpp-pkg-config-version.patch
@@ -0,0 +1,24 @@
+Taken from upstream: https://github.com/open-source-parsers/jsoncpp/issues/1235.
+
+From ac2870298ed5b5a96a688d9df07461b31f83e906 Mon Sep 17 00:00:00 2001
+From: Derick Vigne <derickvigne@me.com>
+Date: Tue, 26 Jan 2021 14:59:12 -0500
+Subject: [PATCH] Fixed pkg-config Version
+
+---
+ pkg-config/jsoncpp.pc.in | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/pkg-config/jsoncpp.pc.in b/pkg-config/jsoncpp.pc.in
+index 632a377f5..2a2221069 100644
+--- a/pkg-config/jsoncpp.pc.in
++++ b/pkg-config/jsoncpp.pc.in
+@@ -5,7 +5,7 @@ includedir=@includedir_for_pc_file@
+
+ Name: jsoncpp
+ Description: A C++ library for interacting with JSON
+-Version: @JSONCPP_VERSION@
++Version: @PROJECT_VERSION@
+ URL: https://github.com/open-source-parsers/jsoncpp
+ Libs: -L${libdir} -ljsoncpp
+ Cflags: -I${includedir}
diff --git a/gnu/packages/patches/julia-allow-parallel-build.patch b/gnu/packages/patches/julia-allow-parallel-build.patch
new file mode 100644
index 0000000000..cc1d42fee4
--- /dev/null
+++ b/gnu/packages/patches/julia-allow-parallel-build.patch
@@ -0,0 +1,32 @@
+Allow parallel tests with isolated environment.
+
+See https://github.com/JuliaLang/julia/issues/43205 and
+https://github.com/JuliaLang/julia/pull/43211.
+
+diff --git a/test/runtests.jl b/test/runtests.jl
+index 2f9cd058bb..150395e78c 100644
+--- a/test/runtests.jl
++++ b/test/runtests.jl
+@@ -4,7 +4,7 @@ using Test
+ using Distributed
+ using Dates
+ import REPL
+-using Printf: @sprintf
++using Printf: @sprintf, @printf
+ using Base: Experimental
+
+ include("choosetests.jl")
+@@ -83,11 +83,12 @@ prepend!(tests, linalg_tests)
+ import LinearAlgebra
+ cd(@__DIR__) do
+ n = 1
+- if net_on
++ if net_on || haskey(ENV, "JULIA_CPU_THREADS")
+ n = min(Sys.CPU_THREADS, length(tests))
+ n > 1 && addprocs_with_testenv(n)
+ LinearAlgebra.BLAS.set_num_threads(1)
+ end
++ @printf("Number of threads: %i\n", n)
+ skipped = 0
+
+ @everywhere include("testdefs.jl")
diff --git a/gnu/packages/patches/lcms-CVE-2018-16435.patch b/gnu/packages/patches/lcms-CVE-2018-16435.patch
deleted file mode 100644
index 60228e73af..0000000000
--- a/gnu/packages/patches/lcms-CVE-2018-16435.patch
+++ /dev/null
@@ -1,171 +0,0 @@
-https://github.com/mm2/Little-CMS/commit/768f70ca405cd3159d990e962d54456773bb8cf8.patch
-
-From 768f70ca405cd3159d990e962d54456773bb8cf8 Mon Sep 17 00:00:00 2001
-From: Marti Maria <info@littlecms.com>
-Date: Wed, 15 Aug 2018 20:07:56 +0200
-Subject: [PATCH] Upgrade Visual studio 2017 15.8
-
-- Upgrade to 15.8
-- Add check on CGATS memory allocation (thanks to Quang Nguyen for
-pointing out this)
----
- Projects/VC2017/jpegicc/jpegicc.vcxproj | 1 +
- Projects/VC2017/lcms2_DLL/lcms2_DLL.vcxproj | 2 +-
- Projects/VC2017/lcms2_static/lcms2_static.vcxproj | 2 +-
- Projects/VC2017/linkicc/linkicc.vcxproj | 2 +-
- Projects/VC2017/psicc/psicc.vcxproj | 2 +-
- Projects/VC2017/testbed/testbed.vcxproj | 2 +-
- Projects/VC2017/tiffdiff/tiffdiff.vcxproj | 2 +-
- Projects/VC2017/tifficc/tifficc.vcxproj | 2 +-
- Projects/VC2017/transicc/transicc.vcxproj | 1 +
- src/cmscgats.c | 14 ++++++++++----
- 10 files changed, 19 insertions(+), 11 deletions(-)
-
-diff --git a/Projects/VC2017/jpegicc/jpegicc.vcxproj b/Projects/VC2017/jpegicc/jpegicc.vcxproj
-index ab26a53..39cfd00 100644
---- a/Projects/VC2017/jpegicc/jpegicc.vcxproj
-+++ b/Projects/VC2017/jpegicc/jpegicc.vcxproj
-@@ -22,6 +22,7 @@
- <ProjectGuid>{62812507-F926-4968-96A9-17678460AD90}</ProjectGuid>
- <RootNamespace>jpegicc</RootNamespace>
- <Keyword>Win32Proj</Keyword>
-+ <WindowsTargetPlatformVersion>10.0.17134.0</WindowsTargetPlatformVersion>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
-diff --git a/Projects/VC2017/lcms2_DLL/lcms2_DLL.vcxproj b/Projects/VC2017/lcms2_DLL/lcms2_DLL.vcxproj
-index 4c8aa3f..d1bf3eb 100644
---- a/Projects/VC2017/lcms2_DLL/lcms2_DLL.vcxproj
-+++ b/Projects/VC2017/lcms2_DLL/lcms2_DLL.vcxproj
-@@ -22,7 +22,7 @@
- <ProjectGuid>{8C51BE48-ADB8-4089-A9EC-F6BF993A0548}</ProjectGuid>
- <RootNamespace>lcms2_DLL</RootNamespace>
- <Keyword>Win32Proj</Keyword>
-- <WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
-+ <WindowsTargetPlatformVersion>10.0.17134.0</WindowsTargetPlatformVersion>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
-diff --git a/Projects/VC2017/lcms2_static/lcms2_static.vcxproj b/Projects/VC2017/lcms2_static/lcms2_static.vcxproj
-index 2a9988a..9fc05ce 100644
---- a/Projects/VC2017/lcms2_static/lcms2_static.vcxproj
-+++ b/Projects/VC2017/lcms2_static/lcms2_static.vcxproj
-@@ -22,7 +22,7 @@
- <ProjectGuid>{71DEDE59-3F1E-486B-A899-4283000F76B5}</ProjectGuid>
- <RootNamespace>lcms2_static</RootNamespace>
- <Keyword>Win32Proj</Keyword>
-- <WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
-+ <WindowsTargetPlatformVersion>10.0.17134.0</WindowsTargetPlatformVersion>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
-diff --git a/Projects/VC2017/linkicc/linkicc.vcxproj b/Projects/VC2017/linkicc/linkicc.vcxproj
-index 30c2b4e..51586dd 100644
---- a/Projects/VC2017/linkicc/linkicc.vcxproj
-+++ b/Projects/VC2017/linkicc/linkicc.vcxproj
-@@ -22,7 +22,7 @@
- <ProjectGuid>{FBFBE1DC-DB84-4BA1-9552-B4780F457849}</ProjectGuid>
- <RootNamespace>linkicc</RootNamespace>
- <Keyword>Win32Proj</Keyword>
-- <WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
-+ <WindowsTargetPlatformVersion>10.0.17134.0</WindowsTargetPlatformVersion>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
-diff --git a/Projects/VC2017/psicc/psicc.vcxproj b/Projects/VC2017/psicc/psicc.vcxproj
-index 9dcf89a..8f26e12 100644
---- a/Projects/VC2017/psicc/psicc.vcxproj
-+++ b/Projects/VC2017/psicc/psicc.vcxproj
-@@ -22,7 +22,7 @@
- <ProjectGuid>{EF6A8851-65FE-46F5-B9EF-14F0B671F693}</ProjectGuid>
- <RootNamespace>psicc</RootNamespace>
- <Keyword>Win32Proj</Keyword>
-- <WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
-+ <WindowsTargetPlatformVersion>10.0.17134.0</WindowsTargetPlatformVersion>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
-diff --git a/Projects/VC2017/testbed/testbed.vcxproj b/Projects/VC2017/testbed/testbed.vcxproj
-index 0af3762..3f6aea3 100644
---- a/Projects/VC2017/testbed/testbed.vcxproj
-+++ b/Projects/VC2017/testbed/testbed.vcxproj
-@@ -22,7 +22,7 @@
- <ProjectGuid>{928A3A2B-46EF-4279-959C-513B3652FF0E}</ProjectGuid>
- <RootNamespace>testbed</RootNamespace>
- <Keyword>Win32Proj</Keyword>
-- <WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
-+ <WindowsTargetPlatformVersion>10.0.17134.0</WindowsTargetPlatformVersion>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
-diff --git a/Projects/VC2017/tiffdiff/tiffdiff.vcxproj b/Projects/VC2017/tiffdiff/tiffdiff.vcxproj
-index 7edfe28..3a6d837 100644
---- a/Projects/VC2017/tiffdiff/tiffdiff.vcxproj
-+++ b/Projects/VC2017/tiffdiff/tiffdiff.vcxproj
-@@ -22,7 +22,7 @@
- <ProjectGuid>{75B91835-CCD7-48BE-A606-A9C997D5DBEE}</ProjectGuid>
- <RootNamespace>tiffdiff</RootNamespace>
- <Keyword>Win32Proj</Keyword>
-- <WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
-+ <WindowsTargetPlatformVersion>10.0.17134.0</WindowsTargetPlatformVersion>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
-diff --git a/Projects/VC2017/tifficc/tifficc.vcxproj b/Projects/VC2017/tifficc/tifficc.vcxproj
-index cd9f04c..5ef954f 100644
---- a/Projects/VC2017/tifficc/tifficc.vcxproj
-+++ b/Projects/VC2017/tifficc/tifficc.vcxproj
-@@ -22,7 +22,7 @@
- <ProjectGuid>{2256DE16-ED92-4A6F-9C54-F65BB61E64A2}</ProjectGuid>
- <RootNamespace>tifficc</RootNamespace>
- <Keyword>Win32Proj</Keyword>
-- <WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
-+ <WindowsTargetPlatformVersion>10.0.17134.0</WindowsTargetPlatformVersion>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
-diff --git a/Projects/VC2017/transicc/transicc.vcxproj b/Projects/VC2017/transicc/transicc.vcxproj
-index d9b77c6..b3173d8 100644
---- a/Projects/VC2017/transicc/transicc.vcxproj
-+++ b/Projects/VC2017/transicc/transicc.vcxproj
-@@ -22,6 +22,7 @@
- <ProjectGuid>{9EE22D66-C849-474C-9ED5-C3E141DAB160}</ProjectGuid>
- <RootNamespace>transicc</RootNamespace>
- <Keyword>Win32Proj</Keyword>
-+ <WindowsTargetPlatformVersion>10.0.17134.0</WindowsTargetPlatformVersion>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
-diff --git a/src/cmscgats.c b/src/cmscgats.c
-index 1a87613..8c3e96d 100644
---- a/src/cmscgats.c
-+++ b/src/cmscgats.c
-@@ -1,7 +1,7 @@
- //---------------------------------------------------------------------------------
- //
- // Little Color Management System
--// Copyright (c) 1998-2017 Marti Maria Saguer
-+// Copyright (c) 1998-2018 Marti Maria Saguer
- //
- // Permission is hereby granted, free of charge, to any person obtaining
- // a copy of this software and associated documentation files (the "Software"),
-@@ -1506,10 +1506,16 @@ void AllocateDataSet(cmsIT8* it8)
- t-> nSamples = atoi(cmsIT8GetProperty(it8, "NUMBER_OF_FIELDS"));
- t-> nPatches = atoi(cmsIT8GetProperty(it8, "NUMBER_OF_SETS"));
-
-- t-> Data = (char**)AllocChunk (it8, ((cmsUInt32Number) t->nSamples + 1) * ((cmsUInt32Number) t->nPatches + 1) *sizeof (char*));
-- if (t->Data == NULL) {
-+ if (t -> nSamples < 0 || t->nSamples > 0x7ffe || t->nPatches < 0 || t->nPatches > 0x7ffe)
-+ {
-+ SynError(it8, "AllocateDataSet: too much data");
-+ }
-+ else {
-+ t->Data = (char**)AllocChunk(it8, ((cmsUInt32Number)t->nSamples + 1) * ((cmsUInt32Number)t->nPatches + 1) * sizeof(char*));
-+ if (t->Data == NULL) {
-
-- SynError(it8, "AllocateDataSet: Unable to allocate data array");
-+ SynError(it8, "AllocateDataSet: Unable to allocate data array");
-+ }
- }
-
- }
diff --git a/gnu/packages/patches/ldc-bootstrap-disable-tests.patch b/gnu/packages/patches/ldc-bootstrap-disable-tests.patch
deleted file mode 100644
index d2e40b8016..0000000000
--- a/gnu/packages/patches/ldc-bootstrap-disable-tests.patch
+++ /dev/null
@@ -1,72 +0,0 @@
-This patch fixes a failing unit test by feeding buildNormalizedPath to the
-tzdata properly. Three other tests are disabled, one assumes /root and the
-two others use networking. Not bad out of almost 700 tests!
-
-by Pjotr Prins <pjotr.guix@thebird.nl>
-
---- a/std/datetime.d.orig 2016-11-24 01:13:52.584495545 +0100
-+++ b/std/datetime.d 2016-11-24 01:17:09.655306728 +0100
-@@ -28081,22 +28081,24 @@
- import std.range : retro;
- import std.format : format;
-
-- name = strip(name);
--
- enforce(tzDatabaseDir.exists(), new DateTimeException(format("Directory %s does not exist.", tzDatabaseDir)));
- enforce(tzDatabaseDir.isDir, new DateTimeException(format("%s is not a directory.", tzDatabaseDir)));
-
- version(Android)
- {
-+ name = strip(name);
- auto tzfileOffset = name in tzdataIndex(tzDatabaseDir);
- enforce(tzfileOffset, new DateTimeException(format("The time zone %s is not listed.", name)));
- string tzFilename = separate_index ? "zoneinfo.dat" : "tzdata";
- immutable file = buildNormalizedPath(tzDatabaseDir, tzFilename);
- }
- else
-- immutable file = buildNormalizedPath(tzDatabaseDir, name);
-+ {
-+ auto filename = "./" ~ strip(name); // make sure the prefix is not stripped
-+ immutable file = buildNormalizedPath(tzDatabaseDir, filename);
-+ }
-
-- enforce(file.exists(), new DateTimeException(format("File %s does not exist.", file)));
-+ enforce(file.exists(), new DateTimeException(format("File %s does not exist in %s.", file, tzDatabaseDir)));
- enforce(file.isFile, new DateTimeException(format("%s is not a file.", file)));
-
- auto tzFile = File(file);
-diff --git a/std/path.d b/std/path.d
-index 254d8f0..b0fc04d 100644
---- a/std/path.d
-+++ b/std/path.d
-@@ -3080,8 +3080,11 @@ unittest
- }
- else
- {
-+ pragma(msg, "test disabled on GNU Guix");
-+/*
- assert(expandTilde("~root") == "/root", expandTilde("~root"));
- assert(expandTilde("~root/") == "/root/", expandTilde("~root/"));
-+*/
- }
- assert(expandTilde("~Idontexist/hey") == "~Idontexist/hey");
- }
-diff --git a/std/socket.d b/std/socket.d
-index b85d1c9..7fbf346 100644
---- a/std/socket.d
-+++ b/std/socket.d
-@@ -859,6 +862,8 @@ class InternetHost
-
- unittest
- {
-+ pragma(msg, "test disabled on GNU Guix");
-+ /*
- InternetHost ih = new InternetHost;
-
- ih.getHostByAddr(0x7F_00_00_01);
-@@ -889,6 +894,7 @@ unittest
- // writefln("aliases[%d] = %s", i, s);
- // }
- });
-+ */
- }
diff --git a/gnu/packages/patches/ldc-disable-phobos-tests.patch b/gnu/packages/patches/ldc-disable-phobos-tests.patch
deleted file mode 100644
index f8a9743d59..0000000000
--- a/gnu/packages/patches/ldc-disable-phobos-tests.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-diff --git a/std/socket.d b/std/socket.d
-index 111cd17..6d23da9 100644
---- a/std/socket.d
-+++ b/std/socket.d
-@@ -448,7 +448,7 @@ class Protocol
- // Skip this test on Android because getprotobyname/number are
- // unimplemented in bionic.
- version(CRuntime_Bionic) {} else
--@safe unittest
-+@safe version(hasNetwork) unittest
- {
- // import std.stdio : writefln;
- softUnittest({
-@@ -770,7 +770,7 @@ class InternetHost
- }
-
- ///
--@safe unittest
-+@safe version(hasNetwork) unittest
- {
- InternetHost ih = new InternetHost;
-
diff --git a/gnu/packages/patches/lib2geom-fix-tests.patch b/gnu/packages/patches/lib2geom-fix-tests.patch
deleted file mode 100644
index 47e8f6e2ec..0000000000
--- a/gnu/packages/patches/lib2geom-fix-tests.patch
+++ /dev/null
@@ -1,192 +0,0 @@
-From 3e858cc87f2f8b7dc514a8ad7709c1f47f1f4cde Mon Sep 17 00:00:00 2001
-From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
-Date: Wed, 17 Jun 2020 23:20:53 -0400
-Subject: [PATCH] tests: Fix tests on non-x86_64 platforms.
-
-On platform other than x86_64 such as aarch64-linux or i686-linux,
-some double comparisons would fail.
-
-See <http://issues.guix.gnu.org/41827>.
-
-* tests/bezier-test.cpp: (Casteljau): Replace EXPECT_EQ by
-EXPECT_near.
-(Subdivide): Replace EXPECT_EQ by EXPECT_DOUBLE_EQ.
-(Portion): Replace EXPECT_EQ by EXPECT_near.
-* tests/ellipse-test.cpp (BezierIntersection): Lower error tolerance
-from 6e-13 to 6e-12.
-(LineIntersection): Replace EXPECT_DOUBLE_EQ by EXPECT_NEAR.
-* tests/line-test.cpp (Reflection): Replace EXPECT_FLOAT_EQ BY
-EXPECT_near.
-(Coefficients): Skip test.
-* tests/parallelogram-test.cpp (area): Replace EXPECT_EQ by
-EXPECT_DOUBLE_EQ.
----
- tests/bezier-test.cpp | 31 +++++++++++++++++--------------
- tests/ellipse-test.cpp | 11 ++++++-----
- tests/line-test.cpp | 11 +++++++----
- tests/parallelogram-test.cpp | 8 ++++----
- 4 files changed, 34 insertions(+), 27 deletions(-)
-
-diff --git a/tests/bezier-test.cpp b/tests/bezier-test.cpp
-index 4054a654..46209f40 100644
---- a/tests/bezier-test.cpp
-+++ b/tests/bezier-test.cpp
-@@ -152,11 +152,13 @@ TEST_F(BezierTest, Casteljau) {
- EXPECT_vector_equal(right2, right);
-
- double vnone = casteljau_subdivision<double>(t, &wiggle[0], NULL, NULL, wiggle.order());
-- EXPECT_EQ(vnone, vok);
-+ EXPECT_near(vnone, vok, 1e-12);
- }
- }
-
- TEST_F(BezierTest, Portion) {
-+ constexpr Coord eps{1e-12};
-+
- for (unsigned i = 0; i < 10000; ++i) {
- double from = g_random_double_range(0, 1);
- double to = g_random_double_range(0, 1);
-@@ -165,8 +167,8 @@ TEST_F(BezierTest, Portion) {
- Bezier result = portion(input, from, to);
-
- // the endpoints must correspond exactly
-- EXPECT_EQ(result.at0(), input.valueAt(from));
-- EXPECT_EQ(result.at1(), input.valueAt(to));
-+ EXPECT_near(result.at0(), input.valueAt(from), eps);
-+ EXPECT_near(result.at1(), input.valueAt(to), eps);
- }
- }
- }
-@@ -181,16 +183,16 @@ TEST_F(BezierTest, Subdivide) {
-
- // the endpoints must correspond exactly
- // moreover, the subdivision point must be exactly equal to valueAt(t)
-- EXPECT_EQ(result.first.at0(), input.at0());
-- EXPECT_EQ(result.first.at1(), result.second.at0());
-- EXPECT_EQ(result.second.at0(), input.valueAt(t));
-- EXPECT_EQ(result.second.at1(), input.at1());
-+ EXPECT_DOUBLE_EQ(result.first.at0(), input.at0());
-+ EXPECT_DOUBLE_EQ(result.first.at1(), result.second.at0());
-+ EXPECT_DOUBLE_EQ(result.second.at0(), input.valueAt(t));
-+ EXPECT_DOUBLE_EQ(result.second.at1(), input.at1());
-
- // ditto for valueAt
-- EXPECT_EQ(result.first.valueAt(0), input.valueAt(0));
-- EXPECT_EQ(result.first.valueAt(1), result.second.valueAt(0));
-- EXPECT_EQ(result.second.valueAt(0), input.valueAt(t));
-- EXPECT_EQ(result.second.valueAt(1), input.valueAt(1));
-+ EXPECT_DOUBLE_EQ(result.first.valueAt(0), input.valueAt(0));
-+ EXPECT_DOUBLE_EQ(result.first.valueAt(1), result.second.valueAt(0));
-+ EXPECT_DOUBLE_EQ(result.second.valueAt(0), input.valueAt(t));
-+ EXPECT_DOUBLE_EQ(result.second.valueAt(1), input.valueAt(1));
-
- if (result.first.at1() != result.second.at0()) {
- errors.push_back(std::pair<Bezier,double>(input, t));
-@@ -271,9 +273,10 @@ TEST_F(BezierTest, Deflate) {
- EXPECT_FLOAT_EQ(0, b.at0());
- b = b.deflate();
- const double rootposition = (0.5-0.25) / (1-0.25);
-- EXPECT_FLOAT_EQ(0, b.valueAt(rootposition));
-+ constexpr Coord eps{1e-12};
-+ EXPECT_near(0.0, b.valueAt(rootposition), eps);
- b = b.subdivide(rootposition).second;
-- EXPECT_FLOAT_EQ(0, b.at0());
-+ EXPECT_near(0.0, b.at0(), eps);
- }
-
- TEST_F(BezierTest, Roots) {
-@@ -364,7 +367,7 @@ TEST_F(BezierTest, Operators) {
- for(int i = 0; i <= 16; i++) {
- double t = i/16.0;
- double b = B.valueAt(t);
-- EXPECT_FLOAT_EQ(b*b, product.valueAt(t));
-+ EXPECT_near(b*b, product.valueAt(t), 1e-12);
- }
- }
- }
-diff --git a/tests/ellipse-test.cpp b/tests/ellipse-test.cpp
-index 561c285a..8e4de12c 100644
---- a/tests/ellipse-test.cpp
-+++ b/tests/ellipse-test.cpp
-@@ -158,13 +158,14 @@ TEST(EllipseTest, LineIntersection) {
- std::vector<ShapeIntersection> xs = e.intersect(l);
-
- ASSERT_EQ(xs.size(), 2ul);
-- EXPECT_FLOAT_EQ(xs[0].point()[X], 0);
-- EXPECT_FLOAT_EQ(xs[0].point()[Y], -2);
-- EXPECT_FLOAT_EQ(xs[1].point()[X], 9./5);
-- EXPECT_FLOAT_EQ(xs[1].point()[Y], 8./5);
-
- // due to numeric imprecision when evaluating Ellipse,
- // the points may deviate by around 2e-16
-+ EXPECT_NEAR(xs[0].point()[X], 0, 1e-15);
-+ EXPECT_NEAR(xs[0].point()[Y], -2, 1e-15);
-+ EXPECT_NEAR(xs[1].point()[X], 9./5, 1e-15);
-+ EXPECT_NEAR(xs[1].point()[Y], 8./5, 1e-15);
-+
- EXPECT_intersections_valid(e, l, xs, 1e-15);
- }
-
-@@ -199,7 +200,7 @@ TEST(EllipseTest, BezierIntersection) {
- std::vector<ShapeIntersection> xs = e.intersect(b);
-
- EXPECT_EQ(xs.size(), 2ul);
-- EXPECT_intersections_valid(e, b, xs, 6e-13);
-+ EXPECT_intersections_valid(e, b, xs, 6e-12);
- }
-
- TEST(EllipseTest, Coefficients) {
-diff --git a/tests/line-test.cpp b/tests/line-test.cpp
-index 99546ddc..23991300 100644
---- a/tests/line-test.cpp
-+++ b/tests/line-test.cpp
-@@ -91,10 +91,12 @@ TEST(LineTest, Reflection) {
-
- Point testra = pa * reflecta;
- Point testrb = pb * reflectb;
-- EXPECT_FLOAT_EQ(testra[X], ra[X]);
-- EXPECT_FLOAT_EQ(testra[Y], ra[Y]);
-- EXPECT_FLOAT_EQ(testrb[X], rb[X]);
-- EXPECT_FLOAT_EQ(testrb[Y], rb[Y]);
-+
-+ constexpr Coord eps{1e-12};
-+ EXPECT_near(testra[X], ra[X], eps);
-+ EXPECT_near(testra[Y], ra[Y], eps);
-+ EXPECT_near(testrb[X], rb[X], eps);
-+ EXPECT_near(testrb[Y], rb[Y], eps);
- }
-
- TEST(LineTest, RotationToZero) {
-@@ -115,6 +117,7 @@ TEST(LineTest, RotationToZero) {
- }
-
- TEST(LineTest, Coefficients) {
-+ GTEST_SKIP() << "This test fails on i686-linux and aarch64-linux";
- std::vector<Line> lines;
- lines.push_back(Line(Point(1e9,1e9), Point(1,1)));
- //the case below will never work without normalizing the line
-diff --git a/tests/parallelogram-test.cpp b/tests/parallelogram-test.cpp
-index 8109eadd..70ccea13 100644
---- a/tests/parallelogram-test.cpp
-+++ b/tests/parallelogram-test.cpp
-@@ -106,13 +106,13 @@ TEST(ParallelogramTest, area)
- {
- Rect r(2, 4, 7, 8);
- Parallelogram p(r);
-- EXPECT_EQ(p.area(), r.area());
-+ EXPECT_DOUBLE_EQ(p.area(), r.area());
- p *= Rotate(M_PI / 4.0); // 45°
-- EXPECT_EQ(p.area(), r.area());
-+ EXPECT_DOUBLE_EQ(p.area(), r.area());
- p *= HShear(2);
-- EXPECT_EQ(p.area(), r.area());
-+ EXPECT_DOUBLE_EQ(p.area(), r.area());
- p *= Scale(2);
-- EXPECT_EQ(p.area(), r.area() * 4);
-+ EXPECT_DOUBLE_EQ(p.area(), r.area() * 4);
- }
-
- class ParallelogramTest
---
-2.27.0
-
diff --git a/gnu/packages/patches/libmicrohttpd-0.9.73-test-ssl3.patch b/gnu/packages/patches/libmicrohttpd-0.9.73-test-ssl3.patch
new file mode 100644
index 0000000000..e8d5dce0ed
--- /dev/null
+++ b/gnu/packages/patches/libmicrohttpd-0.9.73-test-ssl3.patch
@@ -0,0 +1,35 @@
+ Disable usage of SSLv3 in testing
+
+ Integrated uptream version 0.9.74
+
+
+diff --git a/src/testcurl/https/test_tls_options.c b/src/testcurl/https/test_tls_options.c
+
+--- a/src/testcurl/https/test_tls_options.c
++++ b/src/testcurl/https/test_tls_options.c
+@@ -119,11 +119,6 @@ main (int argc, char *const *argv)
+ fprintf (stderr, "Curl does not support SSL. Cannot run the test.\n");
+ return 77;
+ }
+- if (0 != strncmp (ssl_version, "GnuTLS", 6))
+- {
+- fprintf (stderr, "This test can be run only with libcurl-gnutls.\n");
+- return 77;
+- }
+
+ if (! testsuite_curl_global_init ())
+ return 99;
+@@ -152,10 +147,10 @@ main (int argc, char *const *argv)
+ fprintf (stderr,
+ "The following handshake should fail (and print an error message)...\n");
+ if (0 !=
+- test_wrap ("TLS1.0 vs SSL3",
++ test_wrap ("TLS1.1 vs TLS1.0",
+ &test_unmatching_ssl_version, NULL, port, daemon_flags,
+ aes256_sha,
+- CURL_SSLVERSION_SSLv3,
++ CURL_SSLVERSION_TLSv1_1,
+ MHD_OPTION_HTTPS_MEM_KEY, srv_key_pem,
+ MHD_OPTION_HTTPS_MEM_CERT, srv_self_signed_cert_pem,
+ MHD_OPTION_HTTPS_PRIORITIES,
+
diff --git a/gnu/packages/patches/librime-fix-build-with-gcc10.patch b/gnu/packages/patches/librime-fix-build-with-gcc10.patch
new file mode 100644
index 0000000000..49ad011b57
--- /dev/null
+++ b/gnu/packages/patches/librime-fix-build-with-gcc10.patch
@@ -0,0 +1,41 @@
+From: Felix Gruber <felgru@posteo.net>
+Date: Mon, 6 Sep 2021 19:38:17 +0200
+Subject: [PATCH] Add missing <cmath> includes
+
+Fix a build failure with GCC 10 that manifests like this:
+
+------
+/tmp/guix-build-librime-1.7.3.drv-0/source/src/rime/gear/script_translator.cc: In member function ‘void rime::ScriptTranslation::PrepareCandidate()’:
+/tmp/guix-build-librime-1.7.3.drv-0/source/src/rime/gear/script_translator.cc:490:23: error: ‘exp’ was not declared in this scope
+ 490 | cand->set_quality(exp(entry->weight) +
+ | ^~~
+/tmp/guix-build-librime-1.7.3.drv-0/source/src/rime/gear/script_translator.cc:504:23: error: ‘exp’ was not declared in this scope
+ 504 | cand->set_quality(exp(entry->weight) +
+ | ^~~
+make[2]: *** [src/CMakeFiles/rime.dir/build.make:1241: src/CMakeFiles/rime.dir/rime/gear/script_translator.cc.o] Error 1
+------
+
+diff --git a/src/rime/gear/script_translator.cc b/src/rime/gear/script_translator.cc
+index 4a45f05..515c8db 100644
+--- a/src/rime/gear/script_translator.cc
++++ b/src/rime/gear/script_translator.cc
+@@ -7,6 +7,7 @@
+ // 2011-07-10 GONG Chen <chen.sst@gmail.com>
+ //
+ #include <algorithm>
++#include <cmath>
+ #include <stack>
+ #include <boost/algorithm/string/join.hpp>
+ #include <boost/range/adaptor/reversed.hpp>
+diff --git a/src/rime/gear/table_translator.cc b/src/rime/gear/table_translator.cc
+index 162ac02..dbea76a 100644
+--- a/src/rime/gear/table_translator.cc
++++ b/src/rime/gear/table_translator.cc
+@@ -4,6 +4,7 @@
+ //
+ // 2011-07-10 GONG Chen <chen.sst@gmail.com>
+ //
++#include <cmath>
+ #include <boost/algorithm/string.hpp>
+ #include <boost/range/adaptor/reversed.hpp>
+ #include <utf8.h>
diff --git a/gnu/packages/patches/libtirpc-hurd-client.patch b/gnu/packages/patches/libtirpc-hurd-client.patch
deleted file mode 100644
index 526ad262d2..0000000000
--- a/gnu/packages/patches/libtirpc-hurd-client.patch
+++ /dev/null
@@ -1,50 +0,0 @@
-Taken from https://salsa.debian.org/debian/libtirpc/-/raw/master/debian/patches/06-hurd-client-port.diff
-
-Description: Fix client code for hurd, avoiding malloc overflow
- When trying to setup a inet connection, it happens the following:
- - in libtirp, src/clnt_vc.c, clnt_vc_create gets called
- - when trying to allocate vc_fd_locks, __rpc_dtbsize() is used as size
- for that array of fd locks
- - __rpc_dtbsize(), in src/rpc_generic.c, queries using rlimit the
- maximum (rlim_max) number of file descriptors (RLIMIT_NOFILE):
- - on Linux, the default is { rlim_cur = 1024, rlim_max = 4096 }
- - on kFreeBSD, the default is { rlim_cur = 1024, rlim_max = 1024 }
- - on Hurd, the default is { rlim_cur = 1024, rlim_max = RLIM_INFINITY }
- meaning that on Hurd the memory allocation fails (as
- __rpc_dtbsize() * sizeof(int) overflows and is negative)
-
- Change libtiprc so __rpc_dtbsize falls back on rlim_cur if rlim_max
- is unlimited.
-
- This patch fixes the client connection using inet sockets; local unix
- sockets are not working, for two reasons so far:
- - getpeername on them gives EOPNOTSUPP
- - SO_REUSEADDR is not implemented for them
-Author: Pino Toscano <pino@debian.org>
-
-Bug-Debian: http://bugs.debian.org/739674
-Forwarded: no
-Reviewed-By: Petter Reinholdtsen
-Last-Update: 2014-03-03
-
---- a/src/rpc_generic.c
-+++ b/src/rpc_generic.c
-@@ -107,12 +107,17 @@
- {
- static int tbsize;
- struct rlimit rl;
-+ rlim_t lim;
-
- if (tbsize) {
- return (tbsize);
- }
- if (getrlimit(RLIMIT_NOFILE, &rl) == 0) {
-- return (tbsize = (int)rl.rlim_max);
-+ lim = rl.rlim_max;
-+ if (lim == RLIM_INFINITY) {
-+ lim = rl.rlim_cur;
-+ }
-+ return (tbsize = (int)lim);
- }
- /*
- * Something wrong. I'll try to save face by returning a
diff --git a/gnu/packages/patches/libunwind-julia-fix-GCC10-fno-common.patch b/gnu/packages/patches/libunwind-julia-fix-GCC10-fno-common.patch
new file mode 100644
index 0000000000..8ef4b111e4
--- /dev/null
+++ b/gnu/packages/patches/libunwind-julia-fix-GCC10-fno-common.patch
@@ -0,0 +1,40 @@
+Fix compilation with -fno-common.
+
+Borrowed from upstream 29e17d8d2ccbca07c423e3089a6d5ae8a1c9cb6e.
+Author: Yichao Yu <yyc1992@gmail.com>
+AuthorDate: Tue Mar 31 00:43:32 2020 -0400
+Commit: Dave Watson <dade.watson@gmail.com>
+CommitDate: Tue Mar 31 08:06:29 2020 -0700
+
+diff --git a/src/x86/Ginit.c b/src/x86/Ginit.c
+index f6b8dc2..9550efa 100644
+--- a/src/x86/Ginit.c
++++ b/src/x86/Ginit.c
+@@ -54,13 +54,6 @@ tdep_uc_addr (ucontext_t *uc, int reg)
+
+ # endif /* UNW_LOCAL_ONLY */
+
+-HIDDEN unw_dyn_info_list_t _U_dyn_info_list;
+-
+-/* XXX fix me: there is currently no way to locate the dyn-info list
+- by a remote unwinder. On ia64, this is done via a special
+- unwind-table entry. Perhaps something similar can be done with
+- DWARF2 unwind info. */
+-
+ static void
+ put_unwind_info (unw_addr_space_t as, unw_proc_info_t *proc_info, void *arg)
+ {
+@@ -71,7 +64,12 @@ static int
+ get_dyn_info_list_addr (unw_addr_space_t as, unw_word_t *dyn_info_list_addr,
+ void *arg)
+ {
+- *dyn_info_list_addr = (unw_word_t) &_U_dyn_info_list;
++#ifndef UNW_LOCAL_ONLY
++# pragma weak _U_dyn_info_list_addr
++ if (!_U_dyn_info_list_addr)
++ return -UNW_ENOINFO;
++#endif
++ *dyn_info_list_addr = _U_dyn_info_list_addr ();
+ return 0;
+ }
+
diff --git a/gnu/packages/patches/libxml2-parent-pointers.patch b/gnu/packages/patches/libxml2-parent-pointers.patch
new file mode 100644
index 0000000000..1f0615c512
--- /dev/null
+++ b/gnu/packages/patches/libxml2-parent-pointers.patch
@@ -0,0 +1,228 @@
+Fix a regression in 2.9.12 where some corrupt XML structures were handled
+incorrectly:
+
+ https://gitlab.gnome.org/GNOME/libxml2/-/issues/255
+
+This is an amalgamation of these upstream commits:
+
+ https://gitlab.gnome.org/GNOME/libxml2/-/commit/85b1792e37b131e7a51af98a37f92472e8de5f3f
+ https://gitlab.gnome.org/GNOME/libxml2/-/commit/13ad8736d294536da4cbcd70a96b0a2fbf47070c
+
+diff --git a/HTMLtree.c b/HTMLtree.c
+--- a/HTMLtree.c
++++ b/HTMLtree.c
+@@ -744,7 +744,7 @@ void
+ htmlNodeDumpFormatOutput(xmlOutputBufferPtr buf, xmlDocPtr doc,
+ xmlNodePtr cur, const char *encoding ATTRIBUTE_UNUSED,
+ int format) {
+- xmlNodePtr root;
++ xmlNodePtr root, parent;
+ xmlAttrPtr attr;
+ const htmlElemDesc * info;
+
+@@ -755,6 +755,7 @@ htmlNodeDumpFormatOutput(xmlOutputBufferPtr buf, xmlDocPtr doc,
+ }
+
+ root = cur;
++ parent = cur->parent;
+ while (1) {
+ switch (cur->type) {
+ case XML_HTML_DOCUMENT_NODE:
+@@ -762,13 +763,25 @@ htmlNodeDumpFormatOutput(xmlOutputBufferPtr buf, xmlDocPtr doc,
+ if (((xmlDocPtr) cur)->intSubset != NULL) {
+ htmlDtdDumpOutput(buf, (xmlDocPtr) cur, NULL);
+ }
+- if (cur->children != NULL) {
++ /* Always validate cur->parent when descending. */
++ if ((cur->parent == parent) && (cur->children != NULL)) {
++ parent = cur;
+ cur = cur->children;
+ continue;
+ }
+ break;
+
+ case XML_ELEMENT_NODE:
++ /*
++ * Some users like lxml are known to pass nodes with a corrupted
++ * tree structure. Fall back to a recursive call to handle this
++ * case.
++ */
++ if ((cur->parent != parent) && (cur->children != NULL)) {
++ htmlNodeDumpFormatOutput(buf, doc, cur, encoding, format);
++ break;
++ }
++
+ /*
+ * Get specific HTML info for that node.
+ */
+@@ -817,6 +830,7 @@ htmlNodeDumpFormatOutput(xmlOutputBufferPtr buf, xmlDocPtr doc,
+ (cur->name != NULL) &&
+ (cur->name[0] != 'p')) /* p, pre, param */
+ xmlOutputBufferWriteString(buf, "\n");
++ parent = cur;
+ cur = cur->children;
+ continue;
+ }
+@@ -825,9 +839,9 @@ htmlNodeDumpFormatOutput(xmlOutputBufferPtr buf, xmlDocPtr doc,
+ (info != NULL) && (!info->isinline)) {
+ if ((cur->next->type != HTML_TEXT_NODE) &&
+ (cur->next->type != HTML_ENTITY_REF_NODE) &&
+- (cur->parent != NULL) &&
+- (cur->parent->name != NULL) &&
+- (cur->parent->name[0] != 'p')) /* p, pre, param */
++ (parent != NULL) &&
++ (parent->name != NULL) &&
++ (parent->name[0] != 'p')) /* p, pre, param */
+ xmlOutputBufferWriteString(buf, "\n");
+ }
+
+@@ -842,9 +856,9 @@ htmlNodeDumpFormatOutput(xmlOutputBufferPtr buf, xmlDocPtr doc,
+ break;
+ if (((cur->name == (const xmlChar *)xmlStringText) ||
+ (cur->name != (const xmlChar *)xmlStringTextNoenc)) &&
+- ((cur->parent == NULL) ||
+- ((xmlStrcasecmp(cur->parent->name, BAD_CAST "script")) &&
+- (xmlStrcasecmp(cur->parent->name, BAD_CAST "style"))))) {
++ ((parent == NULL) ||
++ ((xmlStrcasecmp(parent->name, BAD_CAST "script")) &&
++ (xmlStrcasecmp(parent->name, BAD_CAST "style"))))) {
+ xmlChar *buffer;
+
+ buffer = xmlEncodeEntitiesReentrant(doc, cur->content);
+@@ -902,13 +916,9 @@ htmlNodeDumpFormatOutput(xmlOutputBufferPtr buf, xmlDocPtr doc,
+ break;
+ }
+
+- /*
+- * The parent should never be NULL here but we want to handle
+- * corrupted documents gracefully.
+- */
+- if (cur->parent == NULL)
+- return;
+- cur = cur->parent;
++ cur = parent;
++ /* cur->parent was validated when descending. */
++ parent = cur->parent;
+
+ if ((cur->type == XML_HTML_DOCUMENT_NODE) ||
+ (cur->type == XML_DOCUMENT_NODE)) {
+@@ -939,9 +949,9 @@ htmlNodeDumpFormatOutput(xmlOutputBufferPtr buf, xmlDocPtr doc,
+ (cur->next != NULL)) {
+ if ((cur->next->type != HTML_TEXT_NODE) &&
+ (cur->next->type != HTML_ENTITY_REF_NODE) &&
+- (cur->parent != NULL) &&
+- (cur->parent->name != NULL) &&
+- (cur->parent->name[0] != 'p')) /* p, pre, param */
++ (parent != NULL) &&
++ (parent->name != NULL) &&
++ (parent->name[0] != 'p')) /* p, pre, param */
+ xmlOutputBufferWriteString(buf, "\n");
+ }
+ }
+diff --git a/xmlsave.c b/xmlsave.c
+--- a/xmlsave.c
++++ b/xmlsave.c
+@@ -847,7 +847,7 @@ htmlNodeDumpOutputInternal(xmlSaveCtxtPtr ctxt, xmlNodePtr cur) {
+ static void
+ xmlNodeDumpOutputInternal(xmlSaveCtxtPtr ctxt, xmlNodePtr cur) {
+ int format = ctxt->format;
+- xmlNodePtr tmp, root, unformattedNode = NULL;
++ xmlNodePtr tmp, root, unformattedNode = NULL, parent;
+ xmlAttrPtr attr;
+ xmlChar *start, *end;
+ xmlOutputBufferPtr buf;
+@@ -856,6 +856,7 @@ xmlNodeDumpOutputInternal(xmlSaveCtxtPtr ctxt, xmlNodePtr cur) {
+ buf = ctxt->buf;
+
+ root = cur;
++ parent = cur->parent;
+ while (1) {
+ switch (cur->type) {
+ case XML_DOCUMENT_NODE:
+@@ -868,7 +869,9 @@ xmlNodeDumpOutputInternal(xmlSaveCtxtPtr ctxt, xmlNodePtr cur) {
+ break;
+
+ case XML_DOCUMENT_FRAG_NODE:
+- if (cur->children != NULL) {
++ /* Always validate cur->parent when descending. */
++ if ((cur->parent == parent) && (cur->children != NULL)) {
++ parent = cur;
+ cur = cur->children;
+ continue;
+ }
+@@ -887,7 +890,18 @@ xmlNodeDumpOutputInternal(xmlSaveCtxtPtr ctxt, xmlNodePtr cur) {
+ break;
+
+ case XML_ELEMENT_NODE:
+- if ((cur != root) && (ctxt->format == 1) && (xmlIndentTreeOutput))
++ /*
++ * Some users like lxml are known to pass nodes with a corrupted
++ * tree structure. Fall back to a recursive call to handle this
++ * case.
++ */
++ if ((cur->parent != parent) && (cur->children != NULL)) {
++ xmlNodeDumpOutputInternal(ctxt, cur);
++ break;
++ }
++
++ if ((ctxt->level > 0) && (ctxt->format == 1) &&
++ (xmlIndentTreeOutput))
+ xmlOutputBufferWrite(buf, ctxt->indent_size *
+ (ctxt->level > ctxt->indent_nr ?
+ ctxt->indent_nr : ctxt->level),
+@@ -942,6 +956,7 @@ xmlNodeDumpOutputInternal(xmlSaveCtxtPtr ctxt, xmlNodePtr cur) {
+ xmlOutputBufferWrite(buf, 1, ">");
+ if (ctxt->format == 1) xmlOutputBufferWrite(buf, 1, "\n");
+ if (ctxt->level >= 0) ctxt->level++;
++ parent = cur;
+ cur = cur->children;
+ continue;
+ }
+@@ -1058,13 +1073,9 @@ xmlNodeDumpOutputInternal(xmlSaveCtxtPtr ctxt, xmlNodePtr cur) {
+ break;
+ }
+
+- /*
+- * The parent should never be NULL here but we want to handle
+- * corrupted documents gracefully.
+- */
+- if (cur->parent == NULL)
+- return;
+- cur = cur->parent;
++ cur = parent;
++ /* cur->parent was validated when descending. */
++ parent = cur->parent;
+
+ if (cur->type == XML_ELEMENT_NODE) {
+ if (ctxt->level > 0) ctxt->level--;
+diff --git a/xmlsave.c b/xmlsave.c
+--- a/xmlsave.c
++++ b/xmlsave.c
+@@ -890,6 +890,13 @@ xmlNodeDumpOutputInternal(xmlSaveCtxtPtr ctxt, xmlNodePtr cur) {
+ break;
+
+ case XML_ELEMENT_NODE:
++ if ((cur != root) && (ctxt->format == 1) &&
++ (xmlIndentTreeOutput))
++ xmlOutputBufferWrite(buf, ctxt->indent_size *
++ (ctxt->level > ctxt->indent_nr ?
++ ctxt->indent_nr : ctxt->level),
++ ctxt->indent);
++
+ /*
+ * Some users like lxml are known to pass nodes with a corrupted
+ * tree structure. Fall back to a recursive call to handle this
+@@ -900,13 +907,6 @@ xmlNodeDumpOutputInternal(xmlSaveCtxtPtr ctxt, xmlNodePtr cur) {
+ break;
+ }
+
+- if ((ctxt->level > 0) && (ctxt->format == 1) &&
+- (xmlIndentTreeOutput))
+- xmlOutputBufferWrite(buf, ctxt->indent_size *
+- (ctxt->level > ctxt->indent_nr ?
+- ctxt->indent_nr : ctxt->level),
+- ctxt->indent);
+-
+ xmlOutputBufferWrite(buf, 1, "<");
+ if ((cur->ns != NULL) && (cur->ns->prefix != NULL)) {
+ xmlOutputBufferWriteString(buf, (const char *)cur->ns->prefix);
diff --git a/gnu/packages/patches/libxml2-terminating-newline.patch b/gnu/packages/patches/libxml2-terminating-newline.patch
new file mode 100644
index 0000000000..3f5c88dd4e
--- /dev/null
+++ b/gnu/packages/patches/libxml2-terminating-newline.patch
@@ -0,0 +1,33 @@
+Fix a regression in 2.9.12 where serializing empty HTML documents would
+not add a terminating newline.
+
+ https://gitlab.gnome.org/GNOME/libxml2/-/issues/266
+
+Taken from upstream:
+
+ https://gitlab.gnome.org/GNOME/libxml2/-/commit/92d9ab4c28842a09ca2b76d3ff2f933e01b6cd6f
+
+diff --git a/HTMLtree.c b/HTMLtree.c
+--- a/HTMLtree.c
++++ b/HTMLtree.c
+@@ -763,11 +763,15 @@ htmlNodeDumpFormatOutput(xmlOutputBufferPtr buf, xmlDocPtr doc,
+ if (((xmlDocPtr) cur)->intSubset != NULL) {
+ htmlDtdDumpOutput(buf, (xmlDocPtr) cur, NULL);
+ }
+- /* Always validate cur->parent when descending. */
+- if ((cur->parent == parent) && (cur->children != NULL)) {
+- parent = cur;
+- cur = cur->children;
+- continue;
++ if (cur->children != NULL) {
++ /* Always validate cur->parent when descending. */
++ if (cur->parent == parent) {
++ parent = cur;
++ cur = cur->children;
++ continue;
++ }
++ } else {
++ xmlOutputBufferWriteString(buf, "\n");
+ }
+ break;
+
diff --git a/gnu/packages/patches/libxml2-xpath-recursion-limit.patch b/gnu/packages/patches/libxml2-xpath-recursion-limit.patch
new file mode 100644
index 0000000000..051196c635
--- /dev/null
+++ b/gnu/packages/patches/libxml2-xpath-recursion-limit.patch
@@ -0,0 +1,20 @@
+Fix recursion accounting in XPath expressions:
+
+ https://gitlab.gnome.org/GNOME/libxml2/-/issues/264
+
+Taken from upstream:
+
+ https://gitlab.gnome.org/GNOME/libxml2/-/commit/3e1aad4fe584747fd7d17cc7b2863a78e2d21a77
+
+diff --git a/xpath.c b/xpath.c
+--- a/xpath.c
++++ b/xpath.c
+@@ -10983,7 +10983,7 @@ xmlXPathCompileExpr(xmlXPathParserContextPtr ctxt, int sort) {
+ }
+
+ if (xpctxt != NULL)
+- xpctxt->depth -= 1;
++ xpctxt->depth -= 10;
+ }
+
+ /**
diff --git a/gnu/packages/patches/libxt-guix-search-paths.patch b/gnu/packages/patches/libxt-guix-search-paths.patch
index 5419edd1bd..61022d232a 100644
--- a/gnu/packages/patches/libxt-guix-search-paths.patch
+++ b/gnu/packages/patches/libxt-guix-search-paths.patch
@@ -1,13 +1,9 @@
diff --git a/src/Intrinsic.c b/src/Intrinsic.c
-index c9624ec..addcdba 100644
--- a/src/Intrinsic.c
+++ b/src/Intrinsic.c
-@@ -1312,21 +1312,101 @@ static void FillInLangSubs(
- } else (void) strcpy(*rest, string);
+@@ -1345,21 +1345,99 @@ FillInLangSubs(Substitution subs, XtPerDisplay pd)
}
-+
-+
/*
- * default path used if environment variable XFILESEARCHPATH
- * is not defined. Also substitued for %D.
@@ -24,8 +20,9 @@ index c9624ec..addcdba 100644
+ These values provide the default paths where Guix/GuixSD can expect
+ to find resources for installed packages.
*/
--static const char *implementation_default_path(void)
-+static const char *guix_default_path(void)
+ static const char *
+-implementation_default_path(void)
++guix_default_path(void)
{
-#if defined(WIN32)
- static char xfilesearchpath[] = "";
@@ -115,7 +112,7 @@ index c9624ec..addcdba 100644
}
-@@ -1354,7 +1434,7 @@ _XtString XtResolvePathname(
+@@ -1388,7 +1466,7 @@ XtResolvePathname(Display *dpy,
{
XtPerDisplay pd;
static const char *defaultPath = NULL;
diff --git a/gnu/packages/patches/llvm-3.6-fix-build-with-gcc-10.patch b/gnu/packages/patches/llvm-3.6-fix-build-with-gcc-10.patch
new file mode 100644
index 0000000000..4982587d15
--- /dev/null
+++ b/gnu/packages/patches/llvm-3.6-fix-build-with-gcc-10.patch
@@ -0,0 +1,13 @@
+Adapted from https://github.com/digego/extempore/pull/322/files
+
+--- a/include/llvm/IR/ValueMap.h 2015-08-04 00:30:24.000000000 +0200
++++ b/include/llvm/IR/ValueMap.h 2018-07-14 21:09:09.769502736 +0200
+@@ -99,7 +99,7 @@
+ explicit ValueMap(const ExtraData &Data, unsigned NumInitBuckets = 64)
+ : Map(NumInitBuckets), Data(Data) {}
+
+- bool hasMD() const { return MDMap; }
++ bool hasMD() const { return static_cast<bool>(MDMap); }
+ MDMapT &MD() {
+ if (!MDMap)
+ MDMap.reset(new MDMapT);
diff --git a/gnu/packages/patches/mariadb-CVE-2021-27928.patch b/gnu/packages/patches/mariadb-CVE-2021-27928.patch
deleted file mode 100644
index 39a023c159..0000000000
--- a/gnu/packages/patches/mariadb-CVE-2021-27928.patch
+++ /dev/null
@@ -1,642 +0,0 @@
-From 7580701e6279900fec40822952a3b874732289cf Mon Sep 17 00:00:00 2001
-From: Sergei Golubchik <serg@mariadb.org>
-Date: Thu, 18 Feb 2021 14:20:48 +0100
-Subject: [PATCH] make @@wsrep_provider and @@wsrep_notify_cmd read-only
-
-this should simplify run-time cluster management
----
- mysql-test/suite/galera/disabled.def | 2 +
- .../galera/include/galera_load_provider.inc | 19 --------
- .../galera/include/galera_unload_provider.inc | 3 +-
- .../suite/galera/r/galera_ist_rsync.result | 2 +-
- .../galera/r/galera_sst_mysqldump.result | 2 +-
- .../suite/galera/r/mysql-wsrep#33.result | 2 +-
- .../suite/sys_vars/r/sysvars_wsrep.result | 4 +-
- .../sys_vars/r/wsrep_notify_cmd_basic.result | 47 -------------------
- .../sys_vars/r/wsrep_provider_basic.result | 40 ----------------
- .../r/wsrep_provider_options_basic.result | 46 ------------------
- .../sys_vars/t/wsrep_notify_cmd_basic.test | 43 -----------------
- .../sys_vars/t/wsrep_provider_basic.test | 39 ---------------
- .../t/wsrep_provider_options_basic.test | 41 ----------------
- mysql-test/suite/wsrep/disabled.def | 2 +
- mysql-test/suite/wsrep/r/variables.result | 12 ++---
- mysql-test/suite/wsrep/t/variables.test | 32 +++----------
- sql/sys_vars.cc | 8 ++--
- 17 files changed, 25 insertions(+), 319 deletions(-)
- delete mode 100644 mysql-test/suite/sys_vars/r/wsrep_notify_cmd_basic.result
- delete mode 100644 mysql-test/suite/sys_vars/r/wsrep_provider_basic.result
- delete mode 100644 mysql-test/suite/sys_vars/r/wsrep_provider_options_basic.result
- delete mode 100644 mysql-test/suite/sys_vars/t/wsrep_notify_cmd_basic.test
- delete mode 100644 mysql-test/suite/sys_vars/t/wsrep_provider_basic.test
- delete mode 100644 mysql-test/suite/sys_vars/t/wsrep_provider_options_basic.test
-
-diff --git a/mysql-test/suite/galera/disabled.def b/mysql-test/suite/galera/disabled.def
-index d940c702d54..83f26e81636 100644
---- a/mysql-test/suite/galera/disabled.def
-+++ b/mysql-test/suite/galera/disabled.def
-@@ -49,3 +49,5 @@ partition : MDEV-19958 Galera test failure on galera.partition
- query_cache: MDEV-15805 Test failure on galera.query_cache
- sql_log_bin : MDEV-21491 galera.sql_log_bin
- versioning_trx_id : MDEV-18590 galera.versioning_trx_id
-+galera_wsrep_provider_unset_set: wsrep_provider is read-only for security reasons
-+pxc-421: wsrep_provider is read-only for security reasons
-diff --git a/mysql-test/suite/galera/include/galera_load_provider.inc b/mysql-test/suite/galera/include/galera_load_provider.inc
-index 0f843597d9c..28010cc5b71 100644
---- a/mysql-test/suite/galera/include/galera_load_provider.inc
-+++ b/mysql-test/suite/galera/include/galera_load_provider.inc
-@@ -1,25 +1,6 @@
- --echo Loading wsrep provider ...
-
- --disable_query_log
----eval SET GLOBAL wsrep_provider = '$wsrep_provider_orig';
--
--#
--# count occurences of successful node starts in error log
--#
--perl;
-- use strict;
-- my $test_log=$ENV{'LOG_FILE'} or die "LOG_FILE not set";
-- my $test_log_copy=$test_log . '.copy';
-- if (-e $test_log_copy) {
-- unlink $test_log_copy;
-- }
--
--EOF
----copy_file $LOG_FILE $LOG_FILE.copy
--
--#
--# now join to the cluster
--#
- --eval SET GLOBAL wsrep_cluster_address = '$wsrep_cluster_address_orig';
-
- --enable_query_log
-diff --git a/mysql-test/suite/galera/include/galera_unload_provider.inc b/mysql-test/suite/galera/include/galera_unload_provider.inc
-index cd841f51fbc..ed7e9bc41f0 100644
---- a/mysql-test/suite/galera/include/galera_unload_provider.inc
-+++ b/mysql-test/suite/galera/include/galera_unload_provider.inc
-@@ -1,7 +1,6 @@
- --echo Unloading wsrep provider ...
-
- --let $wsrep_cluster_address_orig = `SELECT @@wsrep_cluster_address`
----let $wsrep_provider_orig = `SELECT @@wsrep_provider`
- --let $wsrep_provider_options_orig = `SELECT @@wsrep_provider_options`
- --let $wsrep_error_log_orig = `SELECT @@log_error`
- if(!$wsrep_log_error_orig)
-@@ -12,4 +11,4 @@ if(!$wsrep_log_error_orig)
- }
- --let LOG_FILE= $wsrep_log_error_orig
-
--SET GLOBAL wsrep_provider = 'none';
-+SET GLOBAL wsrep_cluster_address = '';
-diff --git a/mysql-test/suite/galera/r/galera_ist_rsync.result b/mysql-test/suite/galera/r/galera_ist_rsync.result
-index 13f7d898a59..70a87c73df7 100644
---- a/mysql-test/suite/galera/r/galera_ist_rsync.result
-+++ b/mysql-test/suite/galera/r/galera_ist_rsync.result
-@@ -23,7 +23,7 @@ INSERT INTO t1 VALUES ('node2_committed_before');
- INSERT INTO t1 VALUES ('node2_committed_before');
- COMMIT;
- Unloading wsrep provider ...
--SET GLOBAL wsrep_provider = 'none';
-+SET GLOBAL wsrep_cluster_address = '';
- connection node_1;
- SET AUTOCOMMIT=OFF;
- START TRANSACTION;
-diff --git a/mysql-test/suite/galera/r/galera_sst_mysqldump.result b/mysql-test/suite/galera/r/galera_sst_mysqldump.result
-index 4ed679ba477..145b3a94775 100644
---- a/mysql-test/suite/galera/r/galera_sst_mysqldump.result
-+++ b/mysql-test/suite/galera/r/galera_sst_mysqldump.result
-@@ -30,7 +30,7 @@ INSERT INTO t1 VALUES ('node2_committed_before');
- INSERT INTO t1 VALUES ('node2_committed_before');
- COMMIT;
- Unloading wsrep provider ...
--SET GLOBAL wsrep_provider = 'none';
-+SET GLOBAL wsrep_cluster_address = '';
- connection node_1;
- SET AUTOCOMMIT=OFF;
- START TRANSACTION;
-diff --git a/mysql-test/suite/galera/r/mysql-wsrep#33.result b/mysql-test/suite/galera/r/mysql-wsrep#33.result
-index fb0b593cc96..45c6a3f660a 100644
---- a/mysql-test/suite/galera/r/mysql-wsrep#33.result
-+++ b/mysql-test/suite/galera/r/mysql-wsrep#33.result
-@@ -32,7 +32,7 @@ INSERT INTO t1 VALUES ('node2_committed_before');
- INSERT INTO t1 VALUES ('node2_committed_before');
- COMMIT;
- Unloading wsrep provider ...
--SET GLOBAL wsrep_provider = 'none';
-+SET GLOBAL wsrep_cluster_address = '';
- connection node_1;
- SET AUTOCOMMIT=OFF;
- START TRANSACTION;
-diff --git a/mysql-test/suite/sys_vars/r/sysvars_wsrep.result b/mysql-test/suite/sys_vars/r/sysvars_wsrep.result
-index 4b6abf85434..f73bfbd13e7 100644
---- a/mysql-test/suite/sys_vars/r/sysvars_wsrep.result
-+++ b/mysql-test/suite/sys_vars/r/sysvars_wsrep.result
-@@ -403,7 +403,7 @@ NUMERIC_MIN_VALUE NULL
- NUMERIC_MAX_VALUE NULL
- NUMERIC_BLOCK_SIZE NULL
- ENUM_VALUE_LIST NULL
--READ_ONLY NO
-+READ_ONLY YES
- COMMAND_LINE_ARGUMENT REQUIRED
- GLOBAL_VALUE_PATH NULL
- VARIABLE_NAME WSREP_ON
-@@ -463,7 +463,7 @@ NUMERIC_MIN_VALUE NULL
- NUMERIC_MAX_VALUE NULL
- NUMERIC_BLOCK_SIZE NULL
- ENUM_VALUE_LIST NULL
--READ_ONLY NO
-+READ_ONLY YES
- COMMAND_LINE_ARGUMENT REQUIRED
- GLOBAL_VALUE_PATH NULL
- VARIABLE_NAME WSREP_PROVIDER_OPTIONS
-diff --git a/mysql-test/suite/sys_vars/r/wsrep_notify_cmd_basic.result b/mysql-test/suite/sys_vars/r/wsrep_notify_cmd_basic.result
-deleted file mode 100644
-index 056ff8c817b..00000000000
---- a/mysql-test/suite/sys_vars/r/wsrep_notify_cmd_basic.result
-+++ /dev/null
-@@ -1,47 +0,0 @@
--#
--# wsrep_notify_cmd
--#
--call mtr.add_suppression("WSREP: Failed to get provider options");
--# save the initial value
--SET @wsrep_notify_cmd_global_saved = @@global.wsrep_notify_cmd;
--# default
--SELECT @@global.wsrep_notify_cmd;
--@@global.wsrep_notify_cmd
--
--
--# scope
--SELECT @@session.wsrep_notify_cmd;
--ERROR HY000: Variable 'wsrep_notify_cmd' is a GLOBAL variable
--SET @@global.wsrep_notify_cmd='notify_cmd';
--SELECT @@global.wsrep_notify_cmd;
--@@global.wsrep_notify_cmd
--notify_cmd
--
--# valid values
--SET @@global.wsrep_notify_cmd='command';
--SELECT @@global.wsrep_notify_cmd;
--@@global.wsrep_notify_cmd
--command
--SET @@global.wsrep_notify_cmd='hyphenated-command';
--SELECT @@global.wsrep_notify_cmd;
--@@global.wsrep_notify_cmd
--hyphenated-command
--SET @@global.wsrep_notify_cmd=default;
--SELECT @@global.wsrep_notify_cmd;
--@@global.wsrep_notify_cmd
--
--SET @@global.wsrep_notify_cmd=NULL;
--SELECT @@global.wsrep_notify_cmd;
--@@global.wsrep_notify_cmd
--NULL
--
--# invalid values
--SET @@global.wsrep_notify_cmd=1;
--ERROR 42000: Incorrect argument type to variable 'wsrep_notify_cmd'
--SELECT @@global.wsrep_notify_cmd;
--@@global.wsrep_notify_cmd
--NULL
--
--# restore the initial value
--SET @@global.wsrep_notify_cmd = @wsrep_notify_cmd_global_saved;
--# End of test
-diff --git a/mysql-test/suite/sys_vars/r/wsrep_provider_basic.result b/mysql-test/suite/sys_vars/r/wsrep_provider_basic.result
-deleted file mode 100644
-index 3e4ac8ca883..00000000000
---- a/mysql-test/suite/sys_vars/r/wsrep_provider_basic.result
-+++ /dev/null
-@@ -1,40 +0,0 @@
--#
--# wsrep_provider
--#
--# save the initial value
--SET @wsrep_provider_global_saved = @@global.wsrep_provider;
--# default
--SELECT @@global.wsrep_provider;
--@@global.wsrep_provider
--none
--
--# scope
--SELECT @@session.wsrep_provider;
--ERROR HY000: Variable 'wsrep_provider' is a GLOBAL variable
--SELECT @@global.wsrep_provider;
--@@global.wsrep_provider
--none
--
--# valid values
--SET @@global.wsrep_provider=default;
--SELECT @@global.wsrep_provider;
--@@global.wsrep_provider
--none
--
--# invalid values
--SET @@global.wsrep_provider='/invalid/libgalera_smm.so';
--ERROR 42000: Variable 'wsrep_provider' can't be set to the value of '/invalid/libgalera_smm.so'
--SET @@global.wsrep_provider=NULL;
--ERROR 42000: Variable 'wsrep_provider' can't be set to the value of 'NULL'
--SELECT @@global.wsrep_provider;
--@@global.wsrep_provider
--none
--SET @@global.wsrep_provider=1;
--ERROR 42000: Incorrect argument type to variable 'wsrep_provider'
--SELECT @@global.wsrep_provider;
--@@global.wsrep_provider
--none
--
--# restore the initial value
--SET @@global.wsrep_provider = @wsrep_provider_global_saved;
--# End of test
-diff --git a/mysql-test/suite/sys_vars/r/wsrep_provider_options_basic.result b/mysql-test/suite/sys_vars/r/wsrep_provider_options_basic.result
-deleted file mode 100644
-index 15949a14e39..00000000000
---- a/mysql-test/suite/sys_vars/r/wsrep_provider_options_basic.result
-+++ /dev/null
-@@ -1,46 +0,0 @@
--#
--# wsrep_provider_options
--#
--call mtr.add_suppression("WSREP: Failed to get provider options");
--# default
--SELECT @@global.wsrep_provider_options;
--@@global.wsrep_provider_options
--
--
--# scope
--SELECT @@session.wsrep_provider_options;
--ERROR HY000: Variable 'wsrep_provider_options' is a GLOBAL variable
--SET @@global.wsrep_provider_options='option1';
--SELECT @@global.wsrep_provider_options;
--@@global.wsrep_provider_options
--
--
--# valid values
--SET @@global.wsrep_provider_options='name1=value1;name2=value2';
--ERROR HY000: WSREP (galera) not started
--SELECT @@global.wsrep_provider_options;
--@@global.wsrep_provider_options
--
--SET @@global.wsrep_provider_options='hyphenated-name:value';
--ERROR HY000: WSREP (galera) not started
--SELECT @@global.wsrep_provider_options;
--@@global.wsrep_provider_options
--
--SET @@global.wsrep_provider_options=default;
--ERROR HY000: WSREP (galera) not started
--SELECT @@global.wsrep_provider_options;
--@@global.wsrep_provider_options
--
--
--# invalid values
--SET @@global.wsrep_provider_options=1;
--ERROR 42000: Incorrect argument type to variable 'wsrep_provider_options'
--SELECT @@global.wsrep_provider_options;
--@@global.wsrep_provider_options
--
--SET @@global.wsrep_provider_options=NULL;
--Got one of the listed errors
--SELECT @@global.wsrep_provider_options;
--@@global.wsrep_provider_options
--
--# End of test
-diff --git a/mysql-test/suite/sys_vars/t/wsrep_notify_cmd_basic.test b/mysql-test/suite/sys_vars/t/wsrep_notify_cmd_basic.test
-deleted file mode 100644
-index 6d1535ba148..00000000000
---- a/mysql-test/suite/sys_vars/t/wsrep_notify_cmd_basic.test
-+++ /dev/null
-@@ -1,43 +0,0 @@
----source include/have_wsrep.inc
--
----echo #
----echo # wsrep_notify_cmd
----echo #
--
--call mtr.add_suppression("WSREP: Failed to get provider options");
--
----echo # save the initial value
--SET @wsrep_notify_cmd_global_saved = @@global.wsrep_notify_cmd;
--
----echo # default
--SELECT @@global.wsrep_notify_cmd;
--
----echo
----echo # scope
----error ER_INCORRECT_GLOBAL_LOCAL_VAR
--SELECT @@session.wsrep_notify_cmd;
--SET @@global.wsrep_notify_cmd='notify_cmd';
--SELECT @@global.wsrep_notify_cmd;
--
----echo
----echo # valid values
--SET @@global.wsrep_notify_cmd='command';
--SELECT @@global.wsrep_notify_cmd;
--SET @@global.wsrep_notify_cmd='hyphenated-command';
--SELECT @@global.wsrep_notify_cmd;
--SET @@global.wsrep_notify_cmd=default;
--SELECT @@global.wsrep_notify_cmd;
--SET @@global.wsrep_notify_cmd=NULL;
--SELECT @@global.wsrep_notify_cmd;
--
----echo
----echo # invalid values
----error ER_WRONG_TYPE_FOR_VAR
--SET @@global.wsrep_notify_cmd=1;
--SELECT @@global.wsrep_notify_cmd;
--
----echo
----echo # restore the initial value
--SET @@global.wsrep_notify_cmd = @wsrep_notify_cmd_global_saved;
--
----echo # End of test
-diff --git a/mysql-test/suite/sys_vars/t/wsrep_provider_basic.test b/mysql-test/suite/sys_vars/t/wsrep_provider_basic.test
-deleted file mode 100644
-index 1190ab41bb0..00000000000
---- a/mysql-test/suite/sys_vars/t/wsrep_provider_basic.test
-+++ /dev/null
-@@ -1,39 +0,0 @@
----source include/have_wsrep.inc
--
----echo #
----echo # wsrep_provider
----echo #
--
----echo # save the initial value
--SET @wsrep_provider_global_saved = @@global.wsrep_provider;
--
----echo # default
--SELECT @@global.wsrep_provider;
--
----echo
----echo # scope
----error ER_INCORRECT_GLOBAL_LOCAL_VAR
--SELECT @@session.wsrep_provider;
--SELECT @@global.wsrep_provider;
--
----echo
----echo # valid values
--SET @@global.wsrep_provider=default;
--SELECT @@global.wsrep_provider;
--
----echo
----echo # invalid values
----error ER_WRONG_VALUE_FOR_VAR
--SET @@global.wsrep_provider='/invalid/libgalera_smm.so';
----error ER_WRONG_VALUE_FOR_VAR
--SET @@global.wsrep_provider=NULL;
--SELECT @@global.wsrep_provider;
----error ER_WRONG_TYPE_FOR_VAR
--SET @@global.wsrep_provider=1;
--SELECT @@global.wsrep_provider;
--
----echo
----echo # restore the initial value
--SET @@global.wsrep_provider = @wsrep_provider_global_saved;
--
----echo # End of test
-diff --git a/mysql-test/suite/sys_vars/t/wsrep_provider_options_basic.test b/mysql-test/suite/sys_vars/t/wsrep_provider_options_basic.test
-deleted file mode 100644
-index 6eb3a94b6a4..00000000000
---- a/mysql-test/suite/sys_vars/t/wsrep_provider_options_basic.test
-+++ /dev/null
-@@ -1,41 +0,0 @@
----source include/have_wsrep.inc
--
----echo #
----echo # wsrep_provider_options
----echo #
--
--call mtr.add_suppression("WSREP: Failed to get provider options");
--
----echo # default
--SELECT @@global.wsrep_provider_options;
--
----echo
----echo # scope
----error ER_INCORRECT_GLOBAL_LOCAL_VAR
--SELECT @@session.wsrep_provider_options;
----error 0,ER_WRONG_ARGUMENTS
--SET @@global.wsrep_provider_options='option1';
--SELECT @@global.wsrep_provider_options;
--
----echo
----echo # valid values
----error ER_WRONG_ARGUMENTS
--SET @@global.wsrep_provider_options='name1=value1;name2=value2';
--SELECT @@global.wsrep_provider_options;
----error ER_WRONG_ARGUMENTS
--SET @@global.wsrep_provider_options='hyphenated-name:value';
--SELECT @@global.wsrep_provider_options;
----error ER_WRONG_ARGUMENTS
--SET @@global.wsrep_provider_options=default;
--SELECT @@global.wsrep_provider_options;
--
----echo
----echo # invalid values
----error ER_WRONG_TYPE_FOR_VAR
--SET @@global.wsrep_provider_options=1;
--SELECT @@global.wsrep_provider_options;
----error ER_WRONG_ARGUMENTS,ER_WRONG_ARGUMENTS
--SET @@global.wsrep_provider_options=NULL;
--SELECT @@global.wsrep_provider_options;
--
----echo # End of test
-diff --git a/mysql-test/suite/wsrep/disabled.def b/mysql-test/suite/wsrep/disabled.def
-index 11577bfe8b0..3d204db6945 100644
---- a/mysql-test/suite/wsrep/disabled.def
-+++ b/mysql-test/suite/wsrep/disabled.def
-@@ -10,3 +10,5 @@
- #
- ##############################################################################
-
-+
-+mdev_6832: wsrep_provider is read-only for security reasons
-diff --git a/mysql-test/suite/wsrep/r/variables.result b/mysql-test/suite/wsrep/r/variables.result
-index a9988fd1628..e57440125ee 100644
---- a/mysql-test/suite/wsrep/r/variables.result
-+++ b/mysql-test/suite/wsrep/r/variables.result
-@@ -14,7 +14,6 @@ SET SESSION wsrep_replicate_myisam= ON;
- ERROR HY000: Variable 'wsrep_replicate_myisam' is a GLOBAL variable and should be set with SET GLOBAL
- SET GLOBAL wsrep_replicate_myisam= ON;
- SET GLOBAL wsrep_replicate_myisam= OFF;
--SET GLOBAL wsrep_provider=none;
- #
- # MDEV#5790: SHOW GLOBAL STATUS LIKE does not show the correct list of
- # variables when using "_"
-@@ -151,7 +150,6 @@ wsrep_local_state_comment #
- # Should show nothing.
- SHOW STATUS LIKE 'x';
- Variable_name Value
--SET GLOBAL wsrep_provider=none;
-
- SHOW STATUS LIKE 'wsrep_local_state_uuid';
- Variable_name Value
-@@ -160,7 +158,6 @@ wsrep_local_state_uuid #
- SHOW STATUS LIKE 'wsrep_last_committed';
- Variable_name Value
- wsrep_last_committed #
--SET GLOBAL wsrep_provider=none;
-
- #
- # MDEV#6206: wsrep_slave_threads subtracts from max_connections
-@@ -174,7 +171,7 @@ SELECT @@global.wsrep_slave_threads;
- 1
- SELECT @@global.wsrep_cluster_address;
- @@global.wsrep_cluster_address
--
-+gcomm://
- SELECT @@global.wsrep_on;
- @@global.wsrep_on
- 1
-@@ -183,14 +180,14 @@ Variable_name Value
- Threads_connected 1
- SHOW STATUS LIKE 'wsrep_thread_count';
- Variable_name Value
--wsrep_thread_count 0
-+wsrep_thread_count 2
-
- SELECT @@global.wsrep_provider;
- @@global.wsrep_provider
- libgalera_smm.so
- SELECT @@global.wsrep_cluster_address;
- @@global.wsrep_cluster_address
--
-+gcomm://
- SELECT @@global.wsrep_on;
- @@global.wsrep_on
- 1
-@@ -199,11 +196,10 @@ Variable_name Value
- Threads_connected 1
- SHOW STATUS LIKE 'wsrep_thread_count';
- Variable_name Value
--wsrep_thread_count 0
-+wsrep_thread_count 2
-
- # Setting wsrep_cluster_address triggers the creation of
- # applier/rollbacker threads.
--SET GLOBAL wsrep_cluster_address= 'gcomm://';
- # Wait for applier thread to get created 1.
- # Wait for applier thread to get created 2.
- SELECT VARIABLE_VALUE AS EXPECT_1 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_applier_thread_count';
-diff --git a/mysql-test/suite/wsrep/t/variables.test b/mysql-test/suite/wsrep/t/variables.test
-index f2c3a0a3b78..fd352b61a3a 100644
---- a/mysql-test/suite/wsrep/t/variables.test
-+++ b/mysql-test/suite/wsrep/t/variables.test
-@@ -23,7 +23,7 @@ SET GLOBAL wsrep_replicate_myisam= ON;
-
- # Reset it back.
- SET GLOBAL wsrep_replicate_myisam= OFF;
--SET GLOBAL wsrep_provider=none;
-+#SET GLOBAL wsrep_provider=none;
-
- --echo #
- --echo # MDEV#5790: SHOW GLOBAL STATUS LIKE does not show the correct list of
-@@ -32,9 +32,6 @@ SET GLOBAL wsrep_provider=none;
-
- CALL mtr.add_suppression("WSREP: Could not open saved state file for reading.*");
-
----disable_query_log
--eval SET GLOBAL wsrep_provider= '$WSREP_PROVIDER';
----enable_query_log
-
- --replace_column 2 #
- SHOW GLOBAL STATUS LIKE 'wsrep%';
-@@ -50,11 +47,9 @@ SHOW GLOBAL STATUS LIKE 'wsrep_local_state_comment';
- SHOW STATUS LIKE 'x';
-
- # Reset it back.
--SET GLOBAL wsrep_provider=none;
-+#SET GLOBAL wsrep_provider=none;
-
----disable_query_log
--eval SET GLOBAL wsrep_provider= '$WSREP_PROVIDER';
----enable_query_log
-+#evalp SET GLOBAL wsrep_provider= '$WSREP_PROVIDER';
-
- # The following 2 variables are used by mariabackup
- # SST.
-@@ -66,7 +61,7 @@ SHOW STATUS LIKE 'wsrep_local_state_uuid';
- SHOW STATUS LIKE 'wsrep_last_committed';
-
- # Reset it back.
--SET GLOBAL wsrep_provider=none;
-+#SET GLOBAL wsrep_provider=none;
-
- --echo
- --echo #
-@@ -74,9 +69,7 @@ SET GLOBAL wsrep_provider=none;
- --echo #
- call mtr.add_suppression("WSREP: Failed to get provider options");
-
----disable_query_log
--eval SET GLOBAL wsrep_provider= '$WSREP_PROVIDER';
----enable_query_log
-+#evalp SET GLOBAL wsrep_provider= '$WSREP_PROVIDER';
-
- --replace_regex /.*libgalera_smm.*/libgalera_smm.so/
- SELECT @@global.wsrep_provider;
-@@ -87,9 +80,7 @@ SHOW STATUS LIKE 'threads_connected';
- SHOW STATUS LIKE 'wsrep_thread_count';
- --echo
-
----disable_query_log
--eval SET GLOBAL wsrep_provider= '$WSREP_PROVIDER';
----enable_query_log
-+#evalp SET GLOBAL wsrep_provider= '$WSREP_PROVIDER';
-
- --replace_regex /.*libgalera_smm.*/libgalera_smm.so/
- SELECT @@global.wsrep_provider;
-@@ -101,7 +92,7 @@ SHOW STATUS LIKE 'wsrep_thread_count';
-
- --echo # Setting wsrep_cluster_address triggers the creation of
- --echo # applier/rollbacker threads.
--SET GLOBAL wsrep_cluster_address= 'gcomm://';
-+#SET GLOBAL wsrep_cluster_address= 'gcomm://';
-
- --echo # Wait for applier thread to get created 1.
- --let $wait_condition = SELECT VARIABLE_VALUE = 1 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_applier_thread_count';
-@@ -162,15 +153,6 @@ SET @@global.wsrep_sst_auth= NULL;
- SELECT @@global.wsrep_sst_auth;
- SET @@global.wsrep_sst_auth= @wsrep_sst_auth_saved;
-
--# Reset (for mtr internal checks)
--
----disable_query_log
--SET GLOBAL wsrep_slave_threads= @wsrep_slave_threads_saved;
--eval SET GLOBAL wsrep_provider= '$WSREP_PROVIDER';
--SET GLOBAL wsrep_cluster_address= @wsrep_cluster_address_saved;
--SET GLOBAL wsrep_provider_options= @wsrep_provider_options_saved;
----enable_query_log
--
- --source include/galera_wait_ready.inc
-
- --echo # End of test.
-diff --git a/sql/sys_vars.cc b/sql/sys_vars.cc
-index 64040243df0..8c67a4d432a 100644
---- a/sql/sys_vars.cc
-+++ b/sql/sys_vars.cc
-@@ -5669,8 +5669,8 @@ static Sys_var_tz Sys_time_zone(
-
- static Sys_var_charptr_fscs Sys_wsrep_provider(
- "wsrep_provider", "Path to replication provider library",
-- PREALLOCATED GLOBAL_VAR(wsrep_provider), CMD_LINE(REQUIRED_ARG),
-- DEFAULT(WSREP_NONE),
-+ PREALLOCATED READ_ONLY GLOBAL_VAR(wsrep_provider), CMD_LINE(REQUIRED_ARG),
-+ DEFAULT(WSREP_NONE),
- NO_MUTEX_GUARD, NOT_IN_BINLOG,
- ON_CHECK(wsrep_provider_check), ON_UPDATE(wsrep_provider_update));
-
-@@ -5886,8 +5886,8 @@ static Sys_var_ulong Sys_wsrep_max_ws_rows (
-
- static Sys_var_charptr Sys_wsrep_notify_cmd(
- "wsrep_notify_cmd", "",
-- GLOBAL_VAR(wsrep_notify_cmd),CMD_LINE(REQUIRED_ARG),
-- DEFAULT(""));
-+ READ_ONLY GLOBAL_VAR(wsrep_notify_cmd), CMD_LINE(REQUIRED_ARG),
-+ DEFAULT(""));
-
- static Sys_var_mybool Sys_wsrep_certify_nonPK(
- "wsrep_certify_nonPK", "Certify tables with no primary key",
---
-2.31.0
-
diff --git a/gnu/packages/patches/mesa-opencl-all-targets.patch b/gnu/packages/patches/mesa-opencl-all-targets.patch
new file mode 100644
index 0000000000..99d4abcea4
--- /dev/null
+++ b/gnu/packages/patches/mesa-opencl-all-targets.patch
@@ -0,0 +1,25 @@
+This patch restores LLVM targets needed for OpenCL, *reverting* this
+upstream commit:
+
+ From 80817b6e344258ac9b955f824ebf9019a0fc1610 Mon Sep 17 00:00:00 2001
+ From: Jesse Natalie <jenatali@microsoft.com>
+ Date: Wed, 18 Nov 2020 18:30:30 -0800
+ Subject: [PATCH] meson: Adjust Clover's required LLVM modules
+
+diff --git a/meson.build b/meson.build
+index 6d1607c35a3..f828eb80faa 100644
+--- b/meson.build
++++ a/meson.build
+@@ -1479,10 +1479,9 @@
+ endif
+ if with_gallium_opencl
+ llvm_modules += [
+- 'linker', 'coverage', 'instrumentation', 'ipo', 'irreader',
+- 'lto', 'option', 'objcarcopts', 'profiledata'
++ 'all-targets', 'linker', 'coverage', 'instrumentation', 'ipo', 'irreader',
++ 'lto', 'option', 'objcarcopts', 'profiledata',
+ ]
+- llvm_optional_modules += ['frontendopenmp']
+ endif
+ if with_microsoft_clc
+ llvm_modules += ['target', 'linker', 'irreader', 'option', 'libdriver']
diff --git a/gnu/packages/patches/mesa-skip-tests.patch b/gnu/packages/patches/mesa-skip-tests.patch
index 2622d5d312..7ff571dcf5 100644
--- a/gnu/packages/patches/mesa-skip-tests.patch
+++ b/gnu/packages/patches/mesa-skip-tests.patch
@@ -1,23 +1,3 @@
-disk_cache_create() here looks up the users home directory from <pwd.h>
-which resolves to "/" in the build environment. I could not find an easy
-way to set the home directory to something else, so we disable this test
-for now.
-
---- a/src/compiler/glsl/tests/cache_test.c
-+++ b/src/compiler/glsl/tests/cache_test.c
-@@ -170,11 +170,6 @@
- unsetenv("MESA_GLSL_CACHE_DIR");
- unsetenv("XDG_CACHE_HOME");
-
-- cache = disk_cache_create("test", "make_check", 0);
-- expect_non_null(cache, "disk_cache_create with no environment variables");
--
-- disk_cache_destroy(cache);
--
- /* Test with XDG_CACHE_HOME set */
- setenv("XDG_CACHE_HOME", CACHE_TEST_TMP "/xdg-cache-home", 1);
- cache = disk_cache_create("test", "make_check", 0);
-
This test fails on i686-linux. I couldn't come up with a regex that
could be used to disable it just on i686-linux, so we disable it
completely with this patch:
@@ -25,25 +5,15 @@ completely with this patch:
https://gitlab.freedesktop.org/mesa/mesa/-/issues/4091
diff --git a/src/util/meson.build b/src/util/meson.build
-index 0893f64..909b3e0 100644
+index 319b22d9bf7..93790c72675 100644
--- a/src/util/meson.build
+++ b/src/util/meson.build
-@@ -289,18 +289,6 @@ if with_tests
- suite : ['util'],
- )
+@@ -344,7 +344,7 @@ if with_tests
+ )
+ endif
-- test(
-- 'u_debug_stack',
-- executable(
-- 'u_debug_stack_test',
-- files('u_debug_stack_test.cpp'),
-- include_directories : [inc_include, inc_src, inc_mapi, inc_mesa, inc_gallium, inc_gallium_aux],
-- dependencies : [idep_mesautil, idep_gtest],
-- c_args : [c_msvc_compat_args],
-- ),
-- suite : ['util'],
-- )
--
- process_test_exe = executable(
- 'process_test',
- files('process_test.c'),
+- foreach t: ['bitset', 'register_allocate', 'u_debug_stack', 'u_qsort']
++ foreach t: ['bitset', 'register_allocate', 'u_qsort']
+ test(
+ t,
+ executable(
diff --git a/gnu/packages/patches/meson-allow-dirs-outside-of-prefix.patch b/gnu/packages/patches/meson-allow-dirs-outside-of-prefix.patch
new file mode 100644
index 0000000000..f16daa8009
--- /dev/null
+++ b/gnu/packages/patches/meson-allow-dirs-outside-of-prefix.patch
@@ -0,0 +1,20 @@
+Source: https://raw.githubusercontent.com/NixOS/nixpkgs/master/pkgs/development/tools/build-managers/meson/allow-dirs-outside-of-prefix.patch
+--- a/mesonbuild/coredata.py
++++ b/mesonbuild/coredata.py
+@@ -506,7 +506,6 @@ class CoreData:
+ return value
+ if option.name.endswith('dir') and value.is_absolute() and \
+ option not in BULITIN_DIR_NOPREFIX_OPTIONS:
+- # Value must be a subdir of the prefix
+ # commonpath will always return a path in the native format, so we
+ # must use pathlib.PurePath to do the same conversion before
+ # comparing.
+@@ -518,7 +517,7 @@ class CoreData:
+ try:
+ value = value.relative_to(prefix)
+ except ValueError:
+- raise MesonException(msg.format(option, value, prefix))
++ pass
+ if '..' in str(value):
+ raise MesonException(msg.format(option, value, prefix))
+ return value.as_posix()
diff --git a/gnu/packages/patches/meson-for-build-rpath.patch b/gnu/packages/patches/meson-for-build-rpath.patch
deleted file mode 100644
index ef9a73f07c..0000000000
--- a/gnu/packages/patches/meson-for-build-rpath.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-This patch removes a part of meson that clears the rpath upon installation.
-This will only be applied to a special version of meson, used for the
-meson-build-system.
-
-Original patch for Meson 0.42.0 by Peter Mikkelsen <petermikkelsen10@gmail.com>
-
---- meson-0.47.1/mesonbuild/minstall.py.old 2018-08-10 11:01:27.812327013 +0200
-+++ meson-0.47.1/mesonbuild/minstall.py 2018-08-10 11:01:51.940368505 +0200
-@@ -436,15 +436,6 @@
- print("Symlink creation does not work on this platform. "
- "Skipping all symlinking.")
- printed_symlink_error = True
-- if os.path.isfile(outname):
-- try:
-- depfixer.fix_rpath(outname, install_rpath, final_path,
-- install_name_mappings, verbose=False)
-- except SystemExit as e:
-- if isinstance(e.code, int) and e.code == 0:
-- pass
-- else:
-- raise
-
- def run(args):
- parser = buildparser()
diff --git a/gnu/packages/patches/metabat-fix-compilation.patch b/gnu/packages/patches/metabat-fix-compilation.patch
deleted file mode 100644
index 7086a96e86..0000000000
--- a/gnu/packages/patches/metabat-fix-compilation.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-This patch changes metabat so that (1) it is not build statically, (2) it uses
-shared libraries rather than static libraries where possible.
-
-diff --git a/SConstruct b/SConstruct
-index 69cdc0a..ac99bcb 100644
---- a/SConstruct
-+++ b/SConstruct
-@@ -26,8 +26,6 @@ debug = ARGUMENTS.get('DEBUG', None)
- build_flags = ['-Wall', '-g', '-std=c++11', '-fopenmp']
- link_flags = ['-lstdc++', '-lm', '-fopenmp']
-
--if platform.platform(True, True).find('Darwin') == -1:
-- link_flags.extend(['-static', '-static-libgcc', '-static-libstdc++'])
-
- if debug is None:
- build_flags.extend(['-O3', '-DNDEBUG', '-Wno-unknown-pragmas', '-Wno-deprecated-declarations', '-Wno-overflow', '-Wno-unused-variable'])
-@@ -110,17 +108,17 @@ def findStaticOrShared( lib, testPaths, static_source_list, link_flag_list, stat
- for path in testPaths:
- if not os.path.isdir(path):
- continue
-+ for testfile in ('%s/lib%s.so' % (path, lib), '%s/lib%s.dylib' % (path, lib)):
-+ if os.path.isfile(testfile):
-+ print "Found shared library %s as %s" % (lib, testfile)
-+ link_flag_list.extend( ["-L%s" % (path), "-l%s" % (lib) ] )
-+ return
- for suffix in staticSuffixes:
- testfile = '%s/lib%s%s' % (path, lib, suffix)
- if os.path.isfile(testfile):
- static_source_list.append(testfile)
- print "Found static library %s as %s" % (lib, testfile)
- return
-- for testfile in ('%s/lib%s.so' % (path, lib), '%s/lib%s.dylib' % (path, lib)):
-- if os.path.isfile(testfile):
-- print "Found shared library %s as %s" % (lib, testfile)
-- link_flag_list.extend( ["-L%s" % (path), "-l%s" % (lib) ] )
-- return
- print "Could not find library for %s!!! Looked in %s" % (lib, testPaths)
- return
-
diff --git a/gnu/packages/patches/mit-krb5-hurd.patch b/gnu/packages/patches/mit-krb5-hurd.patch
index d4962b1e60..449320cea4 100644
--- a/gnu/packages/patches/mit-krb5-hurd.patch
+++ b/gnu/packages/patches/mit-krb5-hurd.patch
@@ -148,18 +148,3 @@ index 7e981d4..d83b3b6 100644
+# define MAXPATHLEN 4096
+#endif
#endif /* _DB_INT_H_ */
-diff --git a/src/tests/resolve/resolve.c b/src/tests/resolve/resolve.c
-index 7339d21..38f7253 100644
---- a/src/tests/resolve/resolve.c
-+++ b/src/tests/resolve/resolve.c
-@@ -73,6 +73,10 @@ char *strchr();
- #include <netinet/in.h>
- #include <netdb.h>
-
-+#ifndef MAXHOSTNAMELEN
-+# define MAXHOSTNAMELEN 256
-+#endif
-+
- int
- main(argc, argv)
- int argc;
diff --git a/gnu/packages/patches/mit-krb5-qualify-short-hostnames.patch b/gnu/packages/patches/mit-krb5-qualify-short-hostnames.patch
deleted file mode 100644
index 491a358731..0000000000
--- a/gnu/packages/patches/mit-krb5-qualify-short-hostnames.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-Fix a null pointer dereference when no DNS search path is configured.
-This showed up as a segfault while running the gsasl test suite.
-
-Taken from upstream:
-https://github.com/krb5/krb5/commit/cd82bf377e7fad2409c76bf8b241920692f34fda
-
-diff --git a/src/lib/krb5/os/dnsglue.c b/src/lib/krb5/os/dnsglue.c
-index e35ca9d76c..0cd213fdd7 100644
---- a/src/lib/krb5/os/dnsglue.c
-+++ b/src/lib/krb5/os/dnsglue.c
-@@ -91,7 +91,7 @@ static int initparse(struct krb5int_dns_state *);
- #define DECLARE_HANDLE(h) struct __res_state h
- #define INIT_HANDLE(h) (memset(&h, 0, sizeof(h)), res_ninit(&h) == 0)
- #define SEARCH(h, n, c, t, a, l) res_nsearch(&h, n, c, t, a, l)
--#define PRIMARY_DOMAIN(h) strdup(h.dnsrch[0])
-+#define PRIMARY_DOMAIN(h) ((h.dnsrch[0] == NULL) ? NULL : strdup(h.dnsrch[0]))
- #if HAVE_RES_NDESTROY
- #define DESTROY_HANDLE(h) res_ndestroy(&h)
- #else
-@@ -104,7 +104,8 @@ static int initparse(struct krb5int_dns_state *);
- #define DECLARE_HANDLE(h)
- #define INIT_HANDLE(h) (res_init() == 0)
- #define SEARCH(h, n, c, t, a, l) res_search(n, c, t, a, l)
--#define PRIMARY_DOMAIN(h) strdup(_res.defdname)
-+#define PRIMARY_DOMAIN(h) \
-+ ((_res.defdname == NULL) ? NULL : strdup(_res.defdname))
- #define DESTROY_HANDLE(h)
-
- #endif
diff --git a/gnu/packages/patches/mpg321-gcc-10.patch b/gnu/packages/patches/mpg321-gcc-10.patch
new file mode 100644
index 0000000000..8966d9f7c8
--- /dev/null
+++ b/gnu/packages/patches/mpg321-gcc-10.patch
@@ -0,0 +1,83 @@
+From f930c3b81bdf9c05152fb005562b3869f6e36f34 Mon Sep 17 00:00:00 2001
+From: "Azamat H. Hackimov" <azamat.hackimov@gmail.com>
+Date: Thu, 4 Jun 2020 20:41:25 +0300
+Subject: [PATCH] Fix GCC10 compilation
+
+---
+ mpg321.c | 8 ++++++++
+ mpg321.h | 16 ++++++++--------
+ 2 files changed, 16 insertions(+), 8 deletions(-)
+
+diff --git a/mpg321.c b/mpg321.c
+index 19282bb..663882e 100644
+--- a/mpg321.c
++++ b/mpg321.c
+@@ -63,6 +63,14 @@
+ #include <pthread.h>
+ #include <semaphore.h>
+
++output_frame *Output_Queue;
++decoded_frames *Decoded_Frames;
++int semarray;
++int mad_decoder_position;
++int output_buffer_position;
++double real[FFT_BUFFER_SIZE];
++double imag[FFT_BUFFER_SIZE];
++int loop_remaining;
+
+ int pflag = 0;
+ int volume = 0;
+diff --git a/mpg321.h b/mpg321.h
+index 798bff0..235cf4a 100644
+--- a/mpg321.h
++++ b/mpg321.h
+@@ -116,7 +116,7 @@ extern char *playlist_file;
+ extern int quit_now;
+ extern char remote_input_buf[PATH_MAX + 5];
+ extern int file_change;
+-int loop_remaining;
++extern int loop_remaining;
+
+ extern int status;
+ extern int scrobbler_time;
+@@ -233,8 +233,8 @@ RETSIGTYPE handle_sigchld(int sig);
+ #define FFT_BUFFER_SIZE_LOG 9
+ #define FFT_BUFFER_SIZE (1 << FFT_BUFFER_SIZE_LOG) /* 512 */
+ /*Temporary data stores to perform FFT in */
+-double real[FFT_BUFFER_SIZE];
+-double imag[FFT_BUFFER_SIZE];
++extern double real[FFT_BUFFER_SIZE];
++extern double imag[FFT_BUFFER_SIZE];
+
+ typedef struct {
+ double real[FFT_BUFFER_SIZE];
+@@ -258,10 +258,10 @@ fft_state *fft_init(void);
+ /* Output buffer process */
+ void frame_buffer_p();
+ /* Semaphore array */
+-int semarray;
++extern int semarray;
+ /* Input/Output buffer position */
+-int mad_decoder_position;
+-int output_buffer_position;
++extern int mad_decoder_position;
++extern int output_buffer_position;
+ /* Output Frame including needed information */
+ typedef struct {
+ unsigned char data[4*1152];
+@@ -285,10 +285,10 @@ typedef struct {
+ } decoded_frames;
+
+ /* Output frame queue pointer */
+-output_frame *Output_Queue;
++extern output_frame *Output_Queue;
+
+ /* Shared total decoded frames */
+-decoded_frames *Decoded_Frames;
++extern decoded_frames *Decoded_Frames;
+
+ #if defined(__GNU_LIBRARY__) && !defined(_SEM_SEMUN_UNDEFINED)
+ /* */
+--
+2.26.2
+
diff --git a/gnu/packages/patches/network-manager-meson.patch b/gnu/packages/patches/network-manager-meson.patch
new file mode 100644
index 0000000000..1056d40ede
--- /dev/null
+++ b/gnu/packages/patches/network-manager-meson.patch
@@ -0,0 +1,21 @@
+Since libnm-wwan.so is not just a loadable module but also a shared library
+that some plugin links against, build it as a shared library while avoiding
+'-Wl,--no-undefined':
+
+ https://github.com/mesonbuild/meson/issues/9492#issuecomment-973117289
+
+diff --git a/src/core/devices/wwan/meson.build b/src/core/devices/wwan/meson.build
+index 37ef738..18ac54f 100644
+--- a/src/core/devices/wwan/meson.build
++++ b/src/core/devices/wwan/meson.build
+@@ -4,8 +4,9 @@ wwan_inc = include_directories('.')
+
+ linker_script = join_paths(meson.current_source_dir(), 'libnm-wwan.ver')
+
+-libnm_wwan = shared_module(
++libnm_wwan = shared_library(
+ 'nm-wwan',
++ override_options: ['b_lundef=false'],
+ sources: files(
+ 'nm-service-providers.c',
+ 'nm-modem-broadband.c',
diff --git a/gnu/packages/patches/network-manager-plugin-path.patch b/gnu/packages/patches/network-manager-plugin-path.patch
index 505ae31534..ec6767aaac 100644
--- a/gnu/packages/patches/network-manager-plugin-path.patch
+++ b/gnu/packages/patches/network-manager-plugin-path.patch
@@ -3,49 +3,40 @@ From: =?UTF-8?q?Tom=C3=A1=C5=A1=20=C4=8Cech?= <sleep_walker@gnu.org>
Date: Wed, 3 Jul 2019 13:31:54 +0200
Subject: [PATCH] respect NM_VPN_PLUGIN_DIR
----
- src/vpn/nm-vpn-manager.c | 14 ++++++++++++++
- 1 file changed, 14 insertions(+)
-
-diff --git a/src/vpn/nm-vpn-manager.c b/src/vpn/nm-vpn-manager.c
-index d063916..d779166 100644
---- a/src/vpn/nm-vpn-manager.c
-+++ b/src/vpn/nm-vpn-manager.c
-@@ -223,6 +223,7 @@ nm_vpn_manager_init (NMVpnManager *self)
- GSList *infos, *info;
- const char *conf_dir_etc = _nm_vpn_plugin_info_get_default_dir_etc ();
- const char *conf_dir_lib = _nm_vpn_plugin_info_get_default_dir_lib ();
-+ const char *conf_dir_user = _nm_vpn_plugin_info_get_default_dir_user ();
+--- a/src/core/vpn/nm-vpn-manager.c 2021-10-29 13:20:01.062917840 -0400
++++ b/src/core/vpn/nm-vpn-manager.c 2021-10-29 13:26:46.094397018 -0400
+@@ -211,6 +211,7 @@
+ GSList * infos, *info;
+ const char * conf_dir_etc = _nm_vpn_plugin_info_get_default_dir_etc();
+ const char * conf_dir_lib = _nm_vpn_plugin_info_get_default_dir_lib();
++ const char * conf_dir_user = _nm_vpn_plugin_info_get_default_dir_user ();
- /* Watch the VPN directory for changes */
- file = g_file_new_for_path (conf_dir_lib);
-@@ -241,6 +242,14 @@ nm_vpn_manager_init (NMVpnManager *self)
- G_CALLBACK (vpn_dir_changed), self);
- }
+ /* Watch the VPN directory for changes */
+ file = g_file_new_for_path(conf_dir_lib);
+@@ -229,6 +230,14 @@
+ g_signal_connect(priv->monitor_etc, "changed", G_CALLBACK(vpn_dir_changed), self);
+ }
-+ file = g_file_new_for_path (conf_dir_user);
-+ priv->monitor_etc = g_file_monitor_directory (file, G_FILE_MONITOR_NONE, NULL, NULL);
-+ g_object_unref (file);
-+ if (priv->monitor_etc) {
-+ priv->monitor_id_etc = g_signal_connect (priv->monitor_etc, "changed",
-+ G_CALLBACK (vpn_dir_changed), self);
-+ }
++ file = g_file_new_for_path (conf_dir_user);
++ priv->monitor_etc = g_file_monitor_directory (file, G_FILE_MONITOR_NONE, NULL, NULL);
++ g_object_unref (file);
++ if (priv->monitor_etc) {
++ priv->monitor_id_etc =
++ g_signal_connect (priv->monitor_etc, "changed", G_CALLBACK (vpn_dir_changed), self);
++ }
+
- /* first read conf_dir_lib. The name files are not really user configuration, but
- * plugin configuration. Hence we expect ~newer~ plugins to install their files
- * in /usr/lib/NetworkManager. We want to prefer those files.
-@@ -255,6 +264,11 @@ nm_vpn_manager_init (NMVpnManager *self)
- try_add_plugin (self, info->data);
- g_slist_free_full (infos, g_object_unref);
+ /* first read conf_dir_lib. The name files are not really user configuration, but
+ * plugin configuration. Hence we expect ~newer~ plugins to install their files
+ * in /usr/lib/NetworkManager. We want to prefer those files.
+@@ -243,6 +252,11 @@
+ try_add_plugin(self, info->data);
+ g_slist_free_full(infos, g_object_unref);
-+ infos = _nm_vpn_plugin_info_list_load_dir (conf_dir_user, TRUE, 0, NULL, NULL);
-+ for (info = infos; info; info = info->next)
-+ try_add_plugin (self, info->data);
-+ g_slist_free_full (infos, g_object_unref);
++ infos = _nm_vpn_plugin_info_list_load_dir(conf_dir_user, TRUE, 0, NULL, NULL);
++ for (info = infos; info; info = info->next)
++ try_add_plugin (self, info->data);
++ g_slist_free_full (infos, g_object_unref);
+
- priv->active_services = g_hash_table_new_full (nm_str_hash, g_str_equal, g_free, NULL);
+ priv->active_services = g_hash_table_new_full(nm_str_hash, g_str_equal, g_free, NULL);
}
---
-2.22.0
-
diff --git a/gnu/packages/patches/nss-getcwd-nonnull.patch b/gnu/packages/patches/nss-getcwd-nonnull.patch
new file mode 100644
index 0000000000..37c1b1c539
--- /dev/null
+++ b/gnu/packages/patches/nss-getcwd-nonnull.patch
@@ -0,0 +1,30 @@
+Disable -Werror=nonnull on getcwd(0, 4096) because GCC incorrectly warns that
+the second argument should be NULL with recent glibc. See:
+
+https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96832
+https://sourceware.org/bugzilla/show_bug.cgi?id=26545
+
+diff --git a/nss/coreconf/nsinstall/nsinstall.c b/nss/coreconf/nsinstall/nsinstall.c
+--- a/nss/coreconf/nsinstall/nsinstall.c
++++ b/nss/coreconf/nsinstall/nsinstall.c
+@@ -236,14 +236,20 @@ main(int argc, char **argv)
+ return 0;
+
+ if (!cwd) {
++#pragma GCC diagnostic push
++#pragma GCC diagnostic ignored "-Wnonnull"
+ cwd = GETCWD(0, PATH_MAX);
++#pragma GCC diagnostic pop
+ if (!cwd)
+ fail("could not get CWD");
+ }
+
+ /* make sure we can get into todir. */
+ xchdir(todir);
++#pragma GCC diagnostic push
++#pragma GCC diagnostic ignored "-Wnonnull"
+ todir = GETCWD(0, PATH_MAX);
++#pragma GCC diagnostic pop
+ if (!todir)
+ fail("could not get CWD in todir");
+ tdlen = strlen(todir);
diff --git a/gnu/packages/patches/ocaml-4.09-multiple-definitions.patch b/gnu/packages/patches/ocaml-4.09-multiple-definitions.patch
new file mode 100644
index 0000000000..b2661f822c
--- /dev/null
+++ b/gnu/packages/patches/ocaml-4.09-multiple-definitions.patch
@@ -0,0 +1,41 @@
+Avoid multiply-defined symbols that lead to link errors such as:
+
+ ld: libcamlrund.a(backtrace_bd.o):/tmp/guix-build-ocaml-4.09.0.drv-0/ocaml-4.09.0/runtime/backtrace.c:31: multiple definition of `caml_debug_info'; libcamlrund.a(backtrace_byt_bd.o):/tmp/guix-build-ocaml-4.09.0.drv-0/ocaml-4.09.0/runtime/backtrace_byt.c:47: first defined here
+
+diff --git a/runtime/backtrace.c b/runtime/backtrace.c
+index a3c2c08..f57c81c 100644
+--- a/runtime/backtrace.c
++++ b/runtime/backtrace.c
+@@ -28,7 +28,7 @@
+ #include "caml/fail.h"
+
+ /* The table of debug information fragments */
+-struct ext_table caml_debug_info;
++static struct ext_table caml_debug_info;
+
+ CAMLexport int32_t caml_backtrace_active = 0;
+ CAMLexport int32_t caml_backtrace_pos = 0;
+diff --git a/runtime/backtrace_byt.c b/runtime/backtrace_byt.c
+index b913dac..b5ec926 100644
+--- a/runtime/backtrace_byt.c
++++ b/runtime/backtrace_byt.c
+@@ -44,7 +44,7 @@
+ #include "caml/backtrace_prim.h"
+
+ /* The table of debug information fragments */
+-struct ext_table caml_debug_info;
++static struct ext_table caml_debug_info;
+
+ CAMLexport char_os * caml_cds_file = NULL;
+
+diff --git a/runtime/startup_nat.c b/runtime/startup_nat.c
+index b4e6bc4..7eca5fa 100644
+--- a/runtime/startup_nat.c
++++ b/runtime/startup_nat.c
+@@ -44,6 +44,5 @@
+ #endif
+
+ extern int caml_parser_trace;
+-CAMLexport header_t caml_atom_table[256];
+ char * caml_code_area_start, * caml_code_area_end;
+ struct ext_table caml_code_fragments_table;
diff --git a/gnu/packages/patches/ocaml-multiple-definitions.patch b/gnu/packages/patches/ocaml-multiple-definitions.patch
new file mode 100644
index 0000000000..e8678f4f64
--- /dev/null
+++ b/gnu/packages/patches/ocaml-multiple-definitions.patch
@@ -0,0 +1,43 @@
+Avoid multiply-defined symbols that lead to link errors such as:
+
+ gcc -O2 -fno-strict-aliasing -fwrapv -Wall -fno-tree-vrp -g -D_FILE_OFFSET_BITS=64 -D_REENTRANT -DCAML_NAME_SPACE -Wl,-E -o ocamlruni prims.o libcamlruni.a -lm -ldl -lpthread
+ ld: libcamlruni.a(backtrace.i.o):/tmp/guix-build-ocaml-4.07.1.drv-0/ocaml-4.07.1/byterun/backtrace.c:31: multiple definition of `caml_debug_info'; libcamlruni.a(backtrace_prim.i.o):/tmp/guix-build-ocaml-4.07.1.drv-0/ocaml-4.07.1/byterun/backtrace_prim.c:47: first defined here
+
+diff --git a/asmrun/startup.c b/asmrun/startup.c
+index 070f0c6..cf8a56f 100644
+--- a/asmrun/startup.c
++++ b/asmrun/startup.c
+@@ -44,7 +44,6 @@
+ #endif
+
+ extern int caml_parser_trace;
+-CAMLexport header_t caml_atom_table[256];
+ char * caml_code_area_start, * caml_code_area_end;
+ struct ext_table caml_code_fragments_table;
+
+diff --git a/byterun/backtrace.c b/byterun/backtrace.c
+index 8dfe9b7..9cc9e72 100644
+--- a/byterun/backtrace.c
++++ b/byterun/backtrace.c
+@@ -28,7 +28,7 @@
+ #include "caml/fail.h"
+
+ /* The table of debug information fragments */
+-struct ext_table caml_debug_info;
++static struct ext_table caml_debug_info;
+
+ CAMLexport int32_t caml_backtrace_active = 0;
+ CAMLexport int32_t caml_backtrace_pos = 0;
+diff --git a/byterun/backtrace_prim.c b/byterun/backtrace_prim.c
+index e69b256..d794f73 100644
+--- a/byterun/backtrace_prim.c
++++ b/byterun/backtrace_prim.c
+@@ -44,7 +44,7 @@
+ #include "caml/backtrace_prim.h"
+
+ /* The table of debug information fragments */
+-struct ext_table caml_debug_info;
++static struct ext_table caml_debug_info;
+
+ CAMLexport char_os * caml_cds_file = NULL;
+
diff --git a/gnu/packages/patches/p11-kit-hurd.patch b/gnu/packages/patches/p11-kit-hurd.patch
new file mode 100644
index 0000000000..01699882c4
--- /dev/null
+++ b/gnu/packages/patches/p11-kit-hurd.patch
@@ -0,0 +1,46 @@
+Taken from: https://groups.google.com/g/linux.debian.bugs.dist/c/mX4GpUJih4k.
+
+--- a/configure.ac
++++ b/configure.ac
+@@ -132,6 +132,16 @@ if test "$os_unix" = "yes"; then
+ AC_CHECK_FUNCS([getpeereid])
+ AC_CHECK_FUNCS([getpeerucred])
+ AC_CHECK_FUNCS([issetugid])
++ case "$host_os" in
++ kfreebsd*-gnu | gnu*)
++ have_getpeereid=no
++ AC_CHECK_LIB(bsd, getpeereid, have_getpeereid=yes)
++ if test "x$have_getpeereid" = "xyes"; then
++ AC_DEFINE([HAVE_GETPEEREID], [1], [have getpeereid])
++ AC_SEARCH_LIBS([getpeereid], [bsd])
++ fi
++ ;;
++ esac
+
+ AC_CACHE_CHECK([for thread-local storage class],
+ [ac_cv_tls_keyword],
+
+--- a/common/unix-peer.c
++++ b/common/unix-peer.c
+@@ -47,6 +47,11 @@
+ # include <ucred.h>
+ #endif
+
++#ifdef HAVE_GETPEEREID
++/* Declare getpeereid from /usr/include/bsd/unistd.h */
++extern int getpeereid(int s, uid_t *euid, gid_t *egid);
++#endif
++
+ /* Returns the unix domain socket peer information.
+ * Returns zero on success.
+ */
+@@ -73,7 +78,8 @@ p11_get_upeer_id (int cfd, uid_t *uid, u
+ *pid = cr.pid;
+
+ #elif defined(HAVE_GETPEEREID)
+- /* *BSD/MacOSX */
++ /* *BSD/MacOSX/kFreeBSD/Hurd */
++
+ uid_t euid;
+ gid_t egid;
+ \ No newline at end of file
diff --git a/gnu/packages/patches/perl-cross.patch b/gnu/packages/patches/perl-cross.patch
deleted file mode 100644
index a7d10b4e1f..0000000000
--- a/gnu/packages/patches/perl-cross.patch
+++ /dev/null
@@ -1,60 +0,0 @@
-Submitted upstream.
-
-From 4c3eb19a11dfe5c88c902481a8294c4f675fcd03 Mon Sep 17 00:00:00 2001
-From: "Jan (janneke) Nieuwenhuizen" <janneke@gnu.org>
-Date: Sun, 19 Apr 2020 23:33:28 +0200
-Subject: [PATCH] Support cross-compiling to the Hurd.
-
-* cnf/hints/gnu: New file.
-* cnf/configure_tool.sh: Guess it.
----
- cnf/configure_tool.sh | 4 ++++
- cnf/hints/gnu | 21 +++++++++++++++++++++
- 2 files changed, 25 insertions(+)
- create mode 100644 cnf/hints/gnu
-
-diff --git a/cnf/configure_tool.sh b/cnf/configure_tool.sh
-index 32201c0..7b0baa4 100644
---- a/cnf/configure_tool.sh
-+++ b/cnf/configure_tool.sh
-@@ -266,6 +266,10 @@ if not hinted 'osname'; then
- define osname "bsd"
- result "BSD"
- ;;
-+ *-gnu*)
-+ define osname "gnu"
-+ result "GNU"
-+ ;;
- *)
- result "no"
- ;;
-diff --git a/cnf/hints/gnu b/cnf/hints/gnu
-new file mode 100644
-index 0000000..a0583a2
---- /dev/null
-+++ b/cnf/hints/gnu
-@@ -0,0 +1,21 @@
-+# Hurd syscalls
-+d_voidsig='define'
-+d_nanosleep='undef'
-+d_clock_gettime='define'
-+d_clock_getres='define'
-+d_clock_nanosleep='define'
-+d_clock='define'
-+
-+# From the original linux.sh
-+usemallocwrap='define'
-+
-+# libraries to test
-+libswanted='m crypt pthread nm ndbm gdbm dbm db dl gdbm_compat'
-+
-+d_procselfexe='undef'
-+procselfexe='"undef"'
-+
-+st_ino_sign=1
-+st_ino_size=8
-+
-+d_fcntl_can_lock='define'
---
-2.26.0
-
diff --git a/gnu/packages/patches/perl-deterministic-ordering.patch b/gnu/packages/patches/perl-deterministic-ordering.patch
deleted file mode 100644
index be63d5cde3..0000000000
--- a/gnu/packages/patches/perl-deterministic-ordering.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From <https://bugs.debian.org/801523>.
-
-From c01f602d1926b0671fd2c8d91f7e52c4e4c9fb24 Mon Sep 17 00:00:00 2001
-From: Niko Tyni <ntyni@debian.org>
-Date: Sun, 11 Oct 2015 19:27:56 +0300
-Subject: [PATCH] Sort the list of XS code files when generating RealPPPort.xs
-
-all_files_in_dir() uses readdir() ordering to make the list of
-input files. This can vary between build systems, breaking build
-reproducibility.
----
- cpan/Devel-PPPort/PPPort_xs.PL | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/dist/Devel-PPPort/PPPort_xs.PL b/dist/Devel-PPPort/PPPort_xs.PL
-index 5f18940..149f2fe 100644
---- a/dist/Devel-PPPort/PPPort_xs.PL
-+++ b/dist/Devel-PPPort/PPPort_xs.PL
-@@ -38,7 +38,7 @@ END
- my $file;
- my $sec;
-
--for $file (all_files_in_dir('parts/inc')) {
-+for $file (sort(all_files_in_dir('parts/inc'))) {
- my $spec = parse_partspec($file);
-
- my $msg = 0;
---
-2.5.1
diff --git a/gnu/packages/patches/perl-io-socket-ssl-openssl-1.0.2f-fix.patch b/gnu/packages/patches/perl-io-socket-ssl-openssl-1.0.2f-fix.patch
deleted file mode 100644
index f2166aebfd..0000000000
--- a/gnu/packages/patches/perl-io-socket-ssl-openssl-1.0.2f-fix.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-Work around a problem arising from the update to OpenSSL 1.0.2f, based on the
-following upstream commit:
-
- https://github.com/noxxi/p5-io-socket-ssl/commit/6e23ee4a433f83f1065bd2467255eba5ee9b1ddd
-
-Attempting to update to IO-Socket-SSL-2.023, which includes this commit,
-caused other test failures. See:
-
- https://lists.gnu.org/archive/html/guix-devel/2016-01/msg01032.html
-
-Description from the upstream commit:
-
- OpenSSL 1.0.2f changed the behavior of SSL shutdown in case the TLS connection
- was not fully established (commit: f73c737c7ac908c5d6407c419769123392a3b0a9).
- This somehow resulted in Net::SSLeay::shutdown returning 0 (i.e. keep trying)
- which caused an endless loop. It will now ignore this result in case the TLS
- connection was not yet established and consider the TLS connection closed
- instead.
-
---- IO-Socket-SSL-2.002/lib/IO/Socket/SSL.pm.orig 2014-10-21 16:51:16.000000000 -0400
-+++ IO-Socket-SSL-2.002/lib/IO/Socket/SSL.pm 2016-01-31 15:07:14.971099894 -0500
-@@ -1213,6 +1213,11 @@
- # shutdown complete
- last;
- }
-+ if ((${*$self}{'_SSL_opened'}||0) <= 0) {
-+ # not really open, thus don't expect shutdown to return
-+ # something meaningful
-+ last;
-+ }
-
- # initiate or complete shutdown
- local $SIG{PIPE} = 'IGNORE';
diff --git a/gnu/packages/patches/perl-no-sys-dirs.patch b/gnu/packages/patches/perl-no-sys-dirs.patch
index 2269d715c7..14d634cac9 100644
--- a/gnu/packages/patches/perl-no-sys-dirs.patch
+++ b/gnu/packages/patches/perl-no-sys-dirs.patch
@@ -6,7 +6,7 @@ Patch adapted from Nixpkgs, originally by Eelco Dolstra
diff -ru -x '*~' -x '*.rej' perl-5.20.0-orig/Configure perl-5.20.0/Configure
--- perl-5.20.0-orig/Configure 2014-05-26 15:34:18.000000000 +0200
+++ perl-5.20.0/Configure 2014-06-25 10:43:35.368285986 +0200
-@@ -106,15 +106,7 @@
+@@ -108,15 +108,7 @@
fi
: Proper PATH setting
@@ -23,8 +23,8 @@ diff -ru -x '*~' -x '*.rej' perl-5.20.0-orig/Configure perl-5.20.0/Configure
for p in $paths
do
-@@ -1337,8 +1329,7 @@
- archname=''
+@@ -1435,8 +1427,7 @@
+ i_whoami=''
: Possible local include directories to search.
: Set locincpth to "" in a hint file to defeat local include searches.
-locincpth="/usr/local/include /opt/local/include /usr/gnu/include"
@@ -33,8 +33,8 @@ diff -ru -x '*~' -x '*.rej' perl-5.20.0-orig/Configure perl-5.20.0/Configure
:
: no include file wanted by default
inclwanted=''
-@@ -1349,17 +1340,12 @@
-
+@@ -1450,17 +1441,12 @@
+ archobjs=''
libnames=''
: change the next line if compiling for Xenix/286 on Xenix/386
-xlibpth='/usr/lib/386 /lib/386'
@@ -54,8 +54,8 @@ diff -ru -x '*~' -x '*.rej' perl-5.20.0-orig/Configure perl-5.20.0/Configure
: Private path used by Configure to find libraries. Its value
: is prepended to libpth. This variable takes care of special
-@@ -1391,8 +1377,6 @@
- libswanted="$libswanted m crypt sec util c cposix posix ucb bsd BSD"
+@@ -1495,8 +1481,6 @@
+ libswanted="$libswanted sun m crypt sec util c cposix posix ucb bsd BSD"
: We probably want to search /usr/shlib before most other libraries.
: This is only used by the lib/ExtUtils/MakeMaker.pm routine extliblist.
-glibpth=`echo " $glibpth " | sed -e 's! /usr/shlib ! !'`
@@ -63,7 +63,7 @@ diff -ru -x '*~' -x '*.rej' perl-5.20.0-orig/Configure perl-5.20.0/Configure
: Do not use vfork unless overridden by a hint file.
usevfork=false
-@@ -2446,7 +2430,6 @@
+@@ -2553,7 +2537,6 @@
zip
"
pth=`echo $PATH | sed -e "s/$p_/ /g"`
@@ -71,7 +71,7 @@ diff -ru -x '*~' -x '*.rej' perl-5.20.0-orig/Configure perl-5.20.0/Configure
for file in $loclist; do
eval xxx=\$$file
case "$xxx" in
-@@ -4936,7 +4919,7 @@
+@@ -5049,7 +5033,7 @@
: Set private lib path
case "$plibpth" in
'') if ./mips; then
@@ -80,7 +80,7 @@ diff -ru -x '*~' -x '*.rej' perl-5.20.0-orig/Configure perl-5.20.0/Configure
fi;;
esac
case "$libpth" in
-@@ -8600,13 +8583,8 @@
+@@ -8877,13 +8861,8 @@
echo " "
case "$sysman" in
'')
@@ -96,7 +96,7 @@ diff -ru -x '*~' -x '*.rej' perl-5.20.0-orig/Configure perl-5.20.0/Configure
;;
esac
if $test -d "$sysman"; then
-@@ -19900,9 +19878,10 @@
+@@ -21027,9 +21006,10 @@
case "$full_ar" in
'') full_ar=$ar ;;
esac
@@ -169,7 +169,7 @@ diff -ru -x '*~' -x '*.rej' perl-5.20.0-orig/hints/freebsd.sh perl-5.20.0/hints/
diff -ru -x '*~' -x '*.rej' perl-5.20.0-orig/hints/linux.sh perl-5.20.0/hints/linux.sh
--- perl-5.20.0-orig/hints/linux.sh 2014-05-26 15:34:20.000000000 +0200
+++ perl-5.20.0/hints/linux.sh 2014-06-25 10:33:47.354883843 +0200
-@@ -150,25 +150,6 @@
+@@ -150,28 +150,6 @@
;;
esac
@@ -188,6 +188,9 @@ diff -ru -x '*~' -x '*.rej' perl-5.20.0-orig/hints/linux.sh perl-5.20.0/hints/li
-# plibpth to bypass this check.
-if [ -x /usr/bin/gcc ] ; then
- gcc=/usr/bin/gcc
+-# clang also provides -print-search-dirs
+-elif ${cc:-cc} --version 2>/dev/null | grep -q '^clang ' ; then
+- gcc=${cc:-cc}
-else
- gcc=gcc
-fi
@@ -195,7 +198,40 @@ diff -ru -x '*~' -x '*.rej' perl-5.20.0-orig/hints/linux.sh perl-5.20.0/hints/li
case "$plibpth" in
'') plibpth=`LANG=C LC_ALL=C $gcc $ccflags $ldflags -print-search-dirs | grep libraries |
cut -f2- -d= | tr ':' $trnl | grep -v 'gcc' | sed -e 's:/$::'`
-@@ -367,33 +322,6 @@
+@@ -208,32 +186,6 @@
+ ;;
+ esac
+
+-case "$libc" in
+-'')
+-# If you have glibc, then report the version for ./myconfig bug reporting.
+-# (Configure doesn't need to know the specific version since it just uses
+-# gcc to load the library for all tests.)
+-# We don't use __GLIBC__ and __GLIBC_MINOR__ because they
+-# are insufficiently precise to distinguish things like
+-# libc-2.0.6 and libc-2.0.7.
+- for p in $plibpth
+- do
+- for trylib in libc.so.6 libc.so
+- do
+- if $test -e $p/$trylib; then
+- libc=`ls -l $p/$trylib | awk '{print $NF}'`
+- if $test "X$libc" != X; then
+- break
+- fi
+- fi
+- done
+- if $test "X$libc" != X; then
+- break
+- fi
+- done
+- ;;
+-esac
+-
+ if ${sh:-/bin/sh} -c exit; then
+ echo ''
+ echo 'You appear to have a working bash. Good.'
+@@ -311,33 +263,6 @@
;;
esac
@@ -229,40 +265,3 @@ diff -ru -x '*~' -x '*.rej' perl-5.20.0-orig/hints/linux.sh perl-5.20.0/hints/li
# Linux on Synology.
if [ -f /etc/synoinfo.conf -a -d /usr/syno ]; then
# Tested on Synology DS213 and DS413
-diff --git a/hints/linux.sh b/hints/linux.sh
-index 3f38ea0..97aed11 100644
---- a/hints/linux.sh
-+++ b/hints/linux.sh
-@@ -195,32 +195,6 @@ case "$usequadmath" in
- ;;
- esac
-
--case "$libc" in
--'')
--# If you have glibc, then report the version for ./myconfig bug reporting.
--# (Configure doesn't need to know the specific version since it just uses
--# gcc to load the library for all tests.)
--# We don't use __GLIBC__ and __GLIBC_MINOR__ because they
--# are insufficiently precise to distinguish things like
--# libc-2.0.6 and libc-2.0.7.
-- for p in $plibpth
-- do
-- for trylib in libc.so.6 libc.so
-- do
-- if $test -e $p/$trylib; then
-- libc=`ls -l $p/$trylib | awk '{print $NF}'`
-- if $test "X$libc" != X; then
-- break
-- fi
-- fi
-- done
-- if $test "X$libc" != X; then
-- break
-- fi
-- done
-- ;;
--esac
--
- if ${sh:-/bin/sh} -c exit; then
- echo ''
- echo 'You appear to have a working bash. Good.'
diff --git a/gnu/packages/patches/pipewire-0.2.7-fno-common.patch b/gnu/packages/patches/pipewire-0.2.7-fno-common.patch
new file mode 100644
index 0000000000..f7d9b25932
--- /dev/null
+++ b/gnu/packages/patches/pipewire-0.2.7-fno-common.patch
@@ -0,0 +1,51 @@
+Fixes 'multiple definition errors' when building with GCC 10+
+
+From: https://bugs.gentoo.org/710796
+Originally from: https://gitlab.freedesktop.org/pipewire/pipewire/-/commit/a62e41e
+and https://gitlab.freedesktop.org/pipewire/pipewire/-/commit/7a976c7
+
+--- a/spa/plugins/bluez5/a2dp-codecs.h
++++ b/spa/plugins/bluez5/a2dp-codecs.h
+@@ -284,15 +284,15 @@
+ }
+ }
+
+-const a2dp_sbc_t bluez_a2dp_sbc;
++extern const a2dp_sbc_t bluez_a2dp_sbc;
+ #if ENABLE_MP3
+-const a2dp_mpeg_t bluez_a2dp_mpeg;
++extern const a2dp_mpeg_t bluez_a2dp_mpeg;
+ #endif
+ #if ENABLE_AAC
+-const a2dp_aac_t bluez_a2dp_aac;
++extern const a2dp_aac_t bluez_a2dp_aac;
+ #endif
+ #if ENABLE_APTX
+-const a2dp_aptx_t bluez_a2dp_aptx;
++extern const a2dp_aptx_t bluez_a2dp_aptx;
+ #endif
+
+ #endif
+--- a/spa/plugins/bluez5/bluez5-monitor.c
++++ b/spa/plugins/bluez5/bluez5-monitor.c
+@@ -75,7 +75,7 @@
+ struct spa_list transport_list;
+ };
+
+-struct spa_handle_factory spa_a2dp_sink_factory;
++extern struct spa_handle_factory spa_a2dp_sink_factory;
+
+ static void fill_item(struct spa_bt_monitor *this, struct spa_bt_transport *transport,
+ struct spa_pod **result, struct spa_pod_builder *builder)
+--- a/spa/plugins/bluez5/meson.build
++++ b/spa/plugins/bluez5/meson.build
+@@ -1,7 +1,8 @@
+
+ bluez5_sources = ['plugin.c',
+ 'a2dp-sink.c',
+- 'bluez5-monitor.c']
++ 'a2dp-codecs.c',
++ 'bluez5-monitor.c']
+
+ bluez5lib = shared_library('spa-bluez5',
+ bluez5_sources,
diff --git a/gnu/packages/patches/pitivi-fix-build-with-meson-0.60.patch b/gnu/packages/patches/pitivi-fix-build-with-meson-0.60.patch
new file mode 100644
index 0000000000..652a86bff7
--- /dev/null
+++ b/gnu/packages/patches/pitivi-fix-build-with-meson-0.60.patch
@@ -0,0 +1,46 @@
+From b54da52289f9578d7021f466d731cfd48330e5fe Mon Sep 17 00:00:00 2001
+From: Leo Famulari <leo@famulari.name>
+Date: Thu, 25 Nov 2021 18:56:44 -0500
+Subject: [PATCH] Fix build with Meson 0.60.
+
+https://gitlab.gnome.org/GNOME/pitivi/-/issues/2593
+
+* data/meson.build: Adjust to changes in Meson 0.60.
+---
+ data/meson.build | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/data/meson.build b/data/meson.build
+index 2ea82cf..60d2316 100644
+--- a/data/meson.build
++++ b/data/meson.build
+@@ -6,7 +6,7 @@ install_subdir('audiopresets', install_dir: pkgdatadir)
+ install_subdir('videopresets', install_dir: pkgdatadir)
+ install_subdir('gstpresets', install_dir: pkgdatadir)
+
+-desktop_file = i18n.merge_file('org.pitivi.Pitivi.desktop',
++desktop_file = i18n.merge_file(
+ type: 'desktop',
+ output : 'org.pitivi.Pitivi.desktop',
+ input : 'org.pitivi.Pitivi.desktop.in',
+@@ -25,7 +25,7 @@ if desktop_file_validate.found()
+ )
+ endif
+
+-appdata_file = i18n.merge_file('org.pitivi.Pitivi.appdata.xml',
++appdata_file = i18n.merge_file(
+ type: 'xml',
+ output : 'org.pitivi.Pitivi.appdata.xml',
+ input : 'org.pitivi.Pitivi.appdata.xml.in',
+@@ -43,7 +43,7 @@ if appstream_util.found()
+ )
+ endif
+
+-i18n.merge_file('org.pitivi.Pitivi-mime.xml',
++i18n.merge_file(
+ output : 'org.pitivi.Pitivi-mime.xml',
+ input : 'org.pitivi.Pitivi-mime.xml.in',
+ po_dir: podir,
+--
+2.33.1
+
diff --git a/gnu/packages/patches/polkit-CVE-2021-3560.patch b/gnu/packages/patches/polkit-CVE-2021-3560.patch
deleted file mode 100644
index 9aa0373fda..0000000000
--- a/gnu/packages/patches/polkit-CVE-2021-3560.patch
+++ /dev/null
@@ -1,21 +0,0 @@
-This patch fixes CVE-2021-3560, "local privilege escalation using
-polkit_system_bus_name_get_creds_sync()":
-
- https://www.openwall.com/lists/oss-security/2021/06/03/1
-
-Patch from <https://gitlab.freedesktop.org/polkit/polkit/-/commit/a04d13a>.
-
-diff --git a/src/polkit/polkitsystembusname.c b/src/polkit/polkitsystembusname.c
-index 8daa12cb9093c1d765c7b83654a2b8d0d382378e..8ed13631508dd96624898df90ee2ece4dcf3e1e5 100644
---- a/src/polkit/polkitsystembusname.c
-+++ b/src/polkit/polkitsystembusname.c
-@@ -435,6 +435,9 @@ polkit_system_bus_name_get_creds_sync (PolkitSystemBusName *system_bus
- while (!((data.retrieved_uid && data.retrieved_pid) || data.caught_error))
- g_main_context_iteration (tmp_context, TRUE);
-
-+ if (data.caught_error)
-+ goto out;
-+
- if (out_uid)
- *out_uid = data.uid;
- if (out_pid)
diff --git a/gnu/packages/patches/polkit-configure-elogind.patch b/gnu/packages/patches/polkit-configure-elogind.patch
new file mode 100644
index 0000000000..8fefb7a0c2
--- /dev/null
+++ b/gnu/packages/patches/polkit-configure-elogind.patch
@@ -0,0 +1,15 @@
+Even when the polkit configure script detects elogind, it does not use
+it. This patch ensures that elogind is used when it is detected.
+
+diff -ruN a/configure b/configure
+--- a/configure 1969-12-31 19:00:01.000000000 -0500
++++ b/configure 2021-11-19 00:04:55.581385020 -0500
+@@ -20390,7 +20390,7 @@
+
+
+
+- if test "$have_libsystemd" = "yes"; then
++ if test "$have_libsystemd" = "yes" || test "$have_libelogind" = "yes"; then
+ HAVE_LIBSYSTEMD_TRUE=
+ HAVE_LIBSYSTEMD_FALSE='#'
+ else
diff --git a/gnu/packages/patches/polkit-use-duktape.patch b/gnu/packages/patches/polkit-use-duktape.patch
new file mode 100644
index 0000000000..4eaa7963c2
--- /dev/null
+++ b/gnu/packages/patches/polkit-use-duktape.patch
@@ -0,0 +1,5030 @@
+From 4f66a9549a393e4d74b93eb85301a04ea94bc750 Mon Sep 17 00:00:00 2001
+From: Wu Xiaotian <yetist@gmail.com>
+Date: Wed, 24 Jul 2019 15:55:17 +0800
+Subject: [PATCH 01/16] Add duktape as javascript engine.
+
+Signed-off-by: Gustavo Lima Chaves <gustavo.chaves@microsoft.com>
+---
+ configure.ac | 28 +-
+ src/polkitbackend/Makefile.am | 14 +-
+ .../polkitbackendduktapeauthority.c | 1402 +++++++++++++++++
+ 3 files changed, 1436 insertions(+), 8 deletions(-)
+ create mode 100644 src/polkitbackend/polkitbackendduktapeauthority.c
+
+diff --git a/configure.ac b/configure.ac
+index e434ca2..5a03593 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -80,11 +80,22 @@ PKG_CHECK_MODULES(GLIB, [gmodule-2.0 gio-unix-2.0 >= 2.30.0])
+ AC_SUBST(GLIB_CFLAGS)
+ AC_SUBST(GLIB_LIBS)
+
+-PKG_CHECK_MODULES(LIBJS, [mozjs-78])
+-
+-AC_SUBST(LIBJS_CFLAGS)
+-AC_SUBST(LIBJS_CXXFLAGS)
+-AC_SUBST(LIBJS_LIBS)
++dnl ---------------------------------------------------------------------------
++dnl - Check javascript backend
++dnl ---------------------------------------------------------------------------
++AC_ARG_WITH(duktape, AS_HELP_STRING([--with-duktape],[Use Duktape as javascript backend]),with_duktape=yes,with_duktape=no)
++AS_IF([test x${with_duktape} == xyes], [
++ PKG_CHECK_MODULES(LIBJS, [duktape >= 2.0.0 ])
++ AC_SUBST(LIBJS_CFLAGS)
++ AC_SUBST(LIBJS_LIBS)
++], [
++ PKG_CHECK_MODULES(LIBJS, [mozjs-78])
++
++ AC_SUBST(LIBJS_CFLAGS)
++ AC_SUBST(LIBJS_CXXFLAGS)
++ AC_SUBST(LIBJS_LIBS)
++])
++AM_CONDITIONAL(USE_DUKTAPE, [test x$with_duktape == xyes], [Using duktape as javascript engine library])
+
+ EXPAT_LIB=""
+ AC_ARG_WITH(expat, [ --with-expat=<dir> Use expat from here],
+@@ -585,6 +596,13 @@ echo "
+ PAM support: ${have_pam}
+ systemdsystemunitdir: ${systemdsystemunitdir}
+ polkitd user: ${POLKITD_USER}"
++if test "x${with_duktape}" = xyes; then
++echo "
++ Javascript engine: Duktape"
++else
++echo "
++ Javascript engine: Mozjs"
++fi
+
+ if test "$have_pam" = yes ; then
+ echo "
+diff --git a/src/polkitbackend/Makefile.am b/src/polkitbackend/Makefile.am
+index 7e3c080..abcbc6f 100644
+--- a/src/polkitbackend/Makefile.am
++++ b/src/polkitbackend/Makefile.am
+@@ -33,7 +33,7 @@ libpolkit_backend_1_la_SOURCES = \
+ polkitbackendprivate.h \
+ polkitbackendauthority.h polkitbackendauthority.c \
+ polkitbackendinteractiveauthority.h polkitbackendinteractiveauthority.c \
+- polkitbackendjsauthority.h polkitbackendjsauthority.cpp \
++ polkitbackendjsauthority.h \
+ polkitbackendactionpool.h polkitbackendactionpool.c \
+ polkitbackendactionlookup.h polkitbackendactionlookup.c \
+ $(NULL)
+@@ -51,19 +51,27 @@ libpolkit_backend_1_la_CFLAGS = \
+ -D_POLKIT_BACKEND_COMPILATION \
+ $(GLIB_CFLAGS) \
+ $(LIBSYSTEMD_CFLAGS) \
+- $(LIBJS_CFLAGS) \
++ $(LIBJS_CFLAGS) \
+ $(NULL)
+
+ libpolkit_backend_1_la_CXXFLAGS = $(libpolkit_backend_1_la_CFLAGS)
+
+ libpolkit_backend_1_la_LIBADD = \
+ $(GLIB_LIBS) \
++ $(DUKTAPE_LIBS) \
+ $(LIBSYSTEMD_LIBS) \
+ $(top_builddir)/src/polkit/libpolkit-gobject-1.la \
+ $(EXPAT_LIBS) \
+- $(LIBJS_LIBS) \
++ $(LIBJS_LIBS) \
+ $(NULL)
+
++if USE_DUKTAPE
++libpolkit_backend_1_la_SOURCES += polkitbackendduktapeauthority.c
++libpolkit_backend_1_la_LIBADD += -lm
++else
++libpolkit_backend_1_la_SOURCES += polkitbackendjsauthority.cpp
++endif
++
+ rulesdir = $(sysconfdir)/polkit-1/rules.d
+ rules_DATA = 50-default.rules
+
+diff --git a/src/polkitbackend/polkitbackendduktapeauthority.c b/src/polkitbackend/polkitbackendduktapeauthority.c
+new file mode 100644
+index 0000000..ae98453
+--- /dev/null
++++ b/src/polkitbackend/polkitbackendduktapeauthority.c
+@@ -0,0 +1,1402 @@
++/*
++ * Copyright (C) 2008-2012 Red Hat, Inc.
++ * Copyright (C) 2015 Tangent Space <jstpierre@mecheye.net>
++ * Copyright (C) 2019 Wu Xiaotian <yetist@gmail.com>
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General
++ * Public License along with this library; if not, write to the
++ * Free Software Foundation, Inc., 59 Temple Place, Suite 330,
++ * Boston, MA 02111-1307, USA.
++ *
++ * Author: David Zeuthen <davidz@redhat.com>
++ */
++
++#include "config.h"
++#include <sys/wait.h>
++#include <errno.h>
++#include <pwd.h>
++#include <grp.h>
++#include <netdb.h>
++#include <string.h>
++#include <glib/gstdio.h>
++#include <locale.h>
++#include <glib/gi18n-lib.h>
++
++#include <polkit/polkit.h>
++#include "polkitbackendjsauthority.h"
++
++#include <polkit/polkitprivate.h>
++
++#ifdef HAVE_LIBSYSTEMD
++#include <systemd/sd-login.h>
++#endif /* HAVE_LIBSYSTEMD */
++
++#include "initjs.h" /* init.js */
++#include "duktape.h"
++
++/**
++ * SECTION:polkitbackendjsauthority
++ * @title: PolkitBackendJsAuthority
++ * @short_description: JS Authority
++ * @stability: Unstable
++ *
++ * An implementation of #PolkitBackendAuthority that reads and
++ * evalates Javascript files and supports interaction with
++ * authentication agents (virtue of being based on
++ * #PolkitBackendInteractiveAuthority).
++ */
++
++/* ---------------------------------------------------------------------------------------------------- */
++
++struct _PolkitBackendJsAuthorityPrivate
++{
++ gchar **rules_dirs;
++ GFileMonitor **dir_monitors; /* NULL-terminated array of GFileMonitor instances */
++ duk_context *cx;
++};
++
++#define WATCHDOG_TIMEOUT (15 * G_TIME_SPAN_SECOND)
++
++static void utils_spawn (const gchar *const *argv,
++ guint timeout_seconds,
++ GCancellable *cancellable,
++ GAsyncReadyCallback callback,
++ gpointer user_data);
++
++gboolean utils_spawn_finish (GAsyncResult *res,
++ gint *out_exit_status,
++ gchar **out_standard_output,
++ gchar **out_standard_error,
++ GError **error);
++
++static void on_dir_monitor_changed (GFileMonitor *monitor,
++ GFile *file,
++ GFile *other_file,
++ GFileMonitorEvent event_type,
++ gpointer user_data);
++
++/* ---------------------------------------------------------------------------------------------------- */
++
++enum
++{
++ PROP_0,
++ PROP_RULES_DIRS,
++};
++
++/* ---------------------------------------------------------------------------------------------------- */
++
++static GList *polkit_backend_js_authority_get_admin_auth_identities (PolkitBackendInteractiveAuthority *authority,
++ PolkitSubject *caller,
++ PolkitSubject *subject,
++ PolkitIdentity *user_for_subject,
++ gboolean subject_is_local,
++ gboolean subject_is_active,
++ const gchar *action_id,
++ PolkitDetails *details);
++
++static PolkitImplicitAuthorization polkit_backend_js_authority_check_authorization_sync (
++ PolkitBackendInteractiveAuthority *authority,
++ PolkitSubject *caller,
++ PolkitSubject *subject,
++ PolkitIdentity *user_for_subject,
++ gboolean subject_is_local,
++ gboolean subject_is_active,
++ const gchar *action_id,
++ PolkitDetails *details,
++ PolkitImplicitAuthorization implicit);
++
++G_DEFINE_TYPE (PolkitBackendJsAuthority, polkit_backend_js_authority, POLKIT_BACKEND_TYPE_INTERACTIVE_AUTHORITY);
++
++/* ---------------------------------------------------------------------------------------------------- */
++
++/* ---------------------------------------------------------------------------------------------------- */
++
++static void
++polkit_backend_js_authority_init (PolkitBackendJsAuthority *authority)
++{
++ authority->priv = G_TYPE_INSTANCE_GET_PRIVATE (authority,
++ POLKIT_BACKEND_TYPE_JS_AUTHORITY,
++ PolkitBackendJsAuthorityPrivate);
++}
++
++static gint
++rules_file_name_cmp (const gchar *a,
++ const gchar *b)
++{
++ gint ret;
++ const gchar *a_base;
++ const gchar *b_base;
++
++ a_base = strrchr (a, '/');
++ b_base = strrchr (b, '/');
++
++ g_assert (a_base != NULL);
++ g_assert (b_base != NULL);
++ a_base += 1;
++ b_base += 1;
++
++ ret = g_strcmp0 (a_base, b_base);
++ if (ret == 0)
++ {
++ /* /etc wins over /usr */
++ ret = g_strcmp0 (a, b);
++ g_assert (ret != 0);
++ }
++
++ return ret;
++}
++
++static void
++load_scripts (PolkitBackendJsAuthority *authority)
++{
++ duk_context *cx = authority->priv->cx;
++ GList *files = NULL;
++ GList *l;
++ guint num_scripts = 0;
++ GError *error = NULL;
++ guint n;
++
++ files = NULL;
++
++ for (n = 0; authority->priv->rules_dirs != NULL && authority->priv->rules_dirs[n] != NULL; n++)
++ {
++ const gchar *dir_name = authority->priv->rules_dirs[n];
++ GDir *dir = NULL;
++
++ polkit_backend_authority_log (POLKIT_BACKEND_AUTHORITY (authority),
++ "Loading rules from directory %s",
++ dir_name);
++
++ dir = g_dir_open (dir_name,
++ 0,
++ &error);
++ if (dir == NULL)
++ {
++ polkit_backend_authority_log (POLKIT_BACKEND_AUTHORITY (authority),
++ "Error opening rules directory: %s (%s, %d)",
++ error->message, g_quark_to_string (error->domain), error->code);
++ g_clear_error (&error);
++ }
++ else
++ {
++ const gchar *name;
++ while ((name = g_dir_read_name (dir)) != NULL)
++ {
++ if (g_str_has_suffix (name, ".rules"))
++ files = g_list_prepend (files, g_strdup_printf ("%s/%s", dir_name, name));
++ }
++ g_dir_close (dir);
++ }
++ }
++
++ files = g_list_sort (files, (GCompareFunc) rules_file_name_cmp);
++
++ for (l = files; l != NULL; l = l->next)
++ {
++ const gchar *filename = l->data;
++
++#if (DUK_VERSION >= 20000)
++ gchar *contents;
++ gsize length;
++ GError *error = NULL;
++ if (!g_file_get_contents (filename, &contents, &length, &error)){
++ g_warning("Error when file contents of %s: %s\n", filename, error->message);
++ g_error_free (error);
++ continue;
++ }
++ if (duk_peval_lstring_noresult(cx, contents,length) != 0)
++#else
++ if (duk_peval_file_noresult (cx, filename) != 0)
++#endif
++ {
++ polkit_backend_authority_log (POLKIT_BACKEND_AUTHORITY (authority),
++ "Error compiling script %s: %s",
++ filename, duk_safe_to_string (authority->priv->cx, -1));
++#if (DUK_VERSION >= 20000)
++ g_free (contents);
++#endif
++ continue;
++ }
++#if (DUK_VERSION >= 20000)
++ g_free (contents);
++#endif
++ num_scripts++;
++ }
++
++ polkit_backend_authority_log (POLKIT_BACKEND_AUTHORITY (authority),
++ "Finished loading, compiling and executing %d rules",
++ num_scripts);
++ g_list_free_full (files, g_free);
++}
++
++static void
++reload_scripts (PolkitBackendJsAuthority *authority)
++{
++ duk_context *cx = authority->priv->cx;
++
++ duk_set_top (cx, 0);
++ duk_get_global_string (cx, "polkit");
++ duk_push_string (cx, "_deleteRules");
++
++ duk_call_prop (cx, 0, 0);
++
++ polkit_backend_authority_log (POLKIT_BACKEND_AUTHORITY (authority),
++ "Collecting garbage unconditionally...");
++
++ load_scripts (authority);
++
++ /* Let applications know we have new rules... */
++ g_signal_emit_by_name (authority, "changed");
++}
++
++static void
++on_dir_monitor_changed (GFileMonitor *monitor,
++ GFile *file,
++ GFile *other_file,
++ GFileMonitorEvent event_type,
++ gpointer user_data)
++{
++ PolkitBackendJsAuthority *authority = POLKIT_BACKEND_JS_AUTHORITY (user_data);
++
++ /* TODO: maybe rate-limit so storms of events are collapsed into one with a 500ms resolution?
++ * Because when editing a file with emacs we get 4-8 events..
++ */
++
++ if (file != NULL)
++ {
++ gchar *name;
++
++ name = g_file_get_basename (file);
++
++ /* g_print ("event_type=%d file=%p name=%s\n", event_type, file, name); */
++ if (!g_str_has_prefix (name, ".") &&
++ !g_str_has_prefix (name, "#") &&
++ g_str_has_suffix (name, ".rules") &&
++ (event_type == G_FILE_MONITOR_EVENT_CREATED ||
++ event_type == G_FILE_MONITOR_EVENT_DELETED ||
++ event_type == G_FILE_MONITOR_EVENT_CHANGES_DONE_HINT))
++ {
++ polkit_backend_authority_log (POLKIT_BACKEND_AUTHORITY (authority),
++ "Reloading rules");
++ reload_scripts (authority);
++ }
++ g_free (name);
++ }
++}
++
++
++static void
++setup_file_monitors (PolkitBackendJsAuthority *authority)
++{
++ guint n;
++ GPtrArray *p;
++
++ p = g_ptr_array_new ();
++ for (n = 0; authority->priv->rules_dirs != NULL && authority->priv->rules_dirs[n] != NULL; n++)
++ {
++ GFile *file;
++ GError *error;
++ GFileMonitor *monitor;
++
++ file = g_file_new_for_path (authority->priv->rules_dirs[n]);
++ error = NULL;
++ monitor = g_file_monitor_directory (file,
++ G_FILE_MONITOR_NONE,
++ NULL,
++ &error);
++ g_object_unref (file);
++ if (monitor == NULL)
++ {
++ g_warning ("Error monitoring directory %s: %s",
++ authority->priv->rules_dirs[n],
++ error->message);
++ g_clear_error (&error);
++ }
++ else
++ {
++ g_signal_connect (monitor,
++ "changed",
++ G_CALLBACK (on_dir_monitor_changed),
++ authority);
++ g_ptr_array_add (p, monitor);
++ }
++ }
++ g_ptr_array_add (p, NULL);
++ authority->priv->dir_monitors = (GFileMonitor**) g_ptr_array_free (p, FALSE);
++}
++
++static duk_ret_t js_polkit_log (duk_context *cx);
++static duk_ret_t js_polkit_spawn (duk_context *cx);
++static duk_ret_t js_polkit_user_is_in_netgroup (duk_context *cx);
++
++static const duk_function_list_entry js_polkit_functions[] =
++{
++ { "log", js_polkit_log, 1 },
++ { "spawn", js_polkit_spawn, 1 },
++ { "_userIsInNetGroup", js_polkit_user_is_in_netgroup, 2 },
++ { NULL, NULL, 0 },
++};
++
++static void
++polkit_backend_js_authority_constructed (GObject *object)
++{
++ PolkitBackendJsAuthority *authority = POLKIT_BACKEND_JS_AUTHORITY (object);
++ duk_context *cx;
++
++ cx = duk_create_heap (NULL, NULL, NULL, authority, NULL);
++ if (cx == NULL)
++ goto fail;
++
++ authority->priv->cx = cx;
++
++ duk_push_global_object (cx);
++ duk_push_object (cx);
++ duk_put_function_list (cx, -1, js_polkit_functions);
++ duk_put_prop_string (cx, -2, "polkit");
++
++ duk_eval_string (cx, init_js);
++
++ if (authority->priv->rules_dirs == NULL)
++ {
++ authority->priv->rules_dirs = g_new0 (gchar *, 3);
++ authority->priv->rules_dirs[0] = g_strdup (PACKAGE_SYSCONF_DIR "/polkit-1/rules.d");
++ authority->priv->rules_dirs[1] = g_strdup (PACKAGE_DATA_DIR "/polkit-1/rules.d");
++ }
++
++ setup_file_monitors (authority);
++ load_scripts (authority);
++
++ G_OBJECT_CLASS (polkit_backend_js_authority_parent_class)->constructed (object);
++ return;
++
++ fail:
++ g_critical ("Error initializing JavaScript environment");
++ g_assert_not_reached ();
++}
++
++static void
++polkit_backend_js_authority_finalize (GObject *object)
++{
++ PolkitBackendJsAuthority *authority = POLKIT_BACKEND_JS_AUTHORITY (object);
++ guint n;
++
++ for (n = 0; authority->priv->dir_monitors != NULL && authority->priv->dir_monitors[n] != NULL; n++)
++ {
++ GFileMonitor *monitor = authority->priv->dir_monitors[n];
++ g_signal_handlers_disconnect_by_func (monitor,
++ G_CALLBACK (on_dir_monitor_changed),
++ authority);
++ g_object_unref (monitor);
++ }
++ g_free (authority->priv->dir_monitors);
++ g_strfreev (authority->priv->rules_dirs);
++
++ duk_destroy_heap (authority->priv->cx);
++
++ G_OBJECT_CLASS (polkit_backend_js_authority_parent_class)->finalize (object);
++}
++
++static void
++polkit_backend_js_authority_set_property (GObject *object,
++ guint property_id,
++ const GValue *value,
++ GParamSpec *pspec)
++{
++ PolkitBackendJsAuthority *authority = POLKIT_BACKEND_JS_AUTHORITY (object);
++
++ switch (property_id)
++ {
++ case PROP_RULES_DIRS:
++ g_assert (authority->priv->rules_dirs == NULL);
++ authority->priv->rules_dirs = (gchar **) g_value_dup_boxed (value);
++ break;
++
++ default:
++ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
++ break;
++ }
++}
++
++static const gchar *
++polkit_backend_js_authority_get_name (PolkitBackendAuthority *authority)
++{
++ return "js";
++}
++
++static const gchar *
++polkit_backend_js_authority_get_version (PolkitBackendAuthority *authority)
++{
++ return PACKAGE_VERSION;
++}
++
++static PolkitAuthorityFeatures
++polkit_backend_js_authority_get_features (PolkitBackendAuthority *authority)
++{
++ return POLKIT_AUTHORITY_FEATURES_TEMPORARY_AUTHORIZATION;
++}
++
++static void
++polkit_backend_js_authority_class_init (PolkitBackendJsAuthorityClass *klass)
++{
++ GObjectClass *gobject_class;
++ PolkitBackendAuthorityClass *authority_class;
++ PolkitBackendInteractiveAuthorityClass *interactive_authority_class;
++
++
++ gobject_class = G_OBJECT_CLASS (klass);
++ gobject_class->finalize = polkit_backend_js_authority_finalize;
++ gobject_class->set_property = polkit_backend_js_authority_set_property;
++ gobject_class->constructed = polkit_backend_js_authority_constructed;
++
++ authority_class = POLKIT_BACKEND_AUTHORITY_CLASS (klass);
++ authority_class->get_name = polkit_backend_js_authority_get_name;
++ authority_class->get_version = polkit_backend_js_authority_get_version;
++ authority_class->get_features = polkit_backend_js_authority_get_features;
++
++ interactive_authority_class = POLKIT_BACKEND_INTERACTIVE_AUTHORITY_CLASS (klass);
++ interactive_authority_class->get_admin_identities = polkit_backend_js_authority_get_admin_auth_identities;
++ interactive_authority_class->check_authorization_sync = polkit_backend_js_authority_check_authorization_sync;
++
++ g_object_class_install_property (gobject_class,
++ PROP_RULES_DIRS,
++ g_param_spec_boxed ("rules-dirs",
++ NULL,
++ NULL,
++ G_TYPE_STRV,
++ G_PARAM_CONSTRUCT_ONLY | G_PARAM_WRITABLE));
++
++
++ g_type_class_add_private (klass, sizeof (PolkitBackendJsAuthorityPrivate));
++}
++
++/* ---------------------------------------------------------------------------------------------------- */
++
++static void
++set_property_str (duk_context *cx,
++ const gchar *name,
++ const gchar *value)
++{
++ duk_push_string (cx, value);
++ duk_put_prop_string (cx, -2, name);
++}
++
++static void
++set_property_strv (duk_context *cx,
++ const gchar *name,
++ GPtrArray *value)
++{
++ guint n;
++ duk_push_array (cx);
++ for (n = 0; n < value->len; n++)
++ {
++ duk_push_string (cx, g_ptr_array_index (value, n));
++ duk_put_prop_index (cx, -2, n);
++ }
++ duk_put_prop_string (cx, -2, name);
++}
++
++static void
++set_property_int32 (duk_context *cx,
++ const gchar *name,
++ gint32 value)
++{
++ duk_push_int (cx, value);
++ duk_put_prop_string (cx, -2, name);
++}
++
++static void
++set_property_bool (duk_context *cx,
++ const char *name,
++ gboolean value)
++{
++ duk_push_boolean (cx, value);
++ duk_put_prop_string (cx, -2, name);
++}
++
++/* ---------------------------------------------------------------------------------------------------- */
++
++static gboolean
++push_subject (duk_context *cx,
++ PolkitSubject *subject,
++ PolkitIdentity *user_for_subject,
++ gboolean subject_is_local,
++ gboolean subject_is_active,
++ GError **error)
++{
++ gboolean ret = FALSE;
++ pid_t pid;
++ uid_t uid;
++ gchar *user_name = NULL;
++ GPtrArray *groups = NULL;
++ struct passwd *passwd;
++ char *seat_str = NULL;
++ char *session_str = NULL;
++
++ duk_get_global_string (cx, "Subject");
++ duk_new (cx, 0);
++
++ if (POLKIT_IS_UNIX_PROCESS (subject))
++ {
++ pid = polkit_unix_process_get_pid (POLKIT_UNIX_PROCESS (subject));
++ }
++ else if (POLKIT_IS_SYSTEM_BUS_NAME (subject))
++ {
++ PolkitSubject *process;
++ process = polkit_system_bus_name_get_process_sync (POLKIT_SYSTEM_BUS_NAME (subject), NULL, error);
++ if (process == NULL)
++ goto out;
++ pid = polkit_unix_process_get_pid (POLKIT_UNIX_PROCESS (process));
++ g_object_unref (process);
++ }
++ else
++ {
++ g_assert_not_reached ();
++ }
++
++#ifdef HAVE_LIBSYSTEMD
++ if (sd_pid_get_session (pid, &session_str) == 0)
++ {
++ if (sd_session_get_seat (session_str, &seat_str) == 0)
++ {
++ /* do nothing */
++ }
++ }
++#endif /* HAVE_LIBSYSTEMD */
++
++ g_assert (POLKIT_IS_UNIX_USER (user_for_subject));
++ uid = polkit_unix_user_get_uid (POLKIT_UNIX_USER (user_for_subject));
++
++ groups = g_ptr_array_new_with_free_func (g_free);
++
++ passwd = getpwuid (uid);
++ if (passwd == NULL)
++ {
++ user_name = g_strdup_printf ("%d", (gint) uid);
++ g_warning ("Error looking up info for uid %d: %m", (gint) uid);
++ }
++ else
++ {
++ gid_t gids[512];
++ int num_gids = 512;
++
++ user_name = g_strdup (passwd->pw_name);
++
++ if (getgrouplist (passwd->pw_name,
++ passwd->pw_gid,
++ gids,
++ &num_gids) < 0)
++ {
++ g_warning ("Error looking up groups for uid %d: %m", (gint) uid);
++ }
++ else
++ {
++ gint n;
++ for (n = 0; n < num_gids; n++)
++ {
++ struct group *group;
++ group = getgrgid (gids[n]);
++ if (group == NULL)
++ {
++ g_ptr_array_add (groups, g_strdup_printf ("%d", (gint) gids[n]));
++ }
++ else
++ {
++ g_ptr_array_add (groups, g_strdup (group->gr_name));
++ }
++ }
++ }
++ }
++
++ set_property_int32 (cx, "pid", pid);
++ set_property_str (cx, "user", user_name);
++ set_property_strv (cx, "groups", groups);
++ set_property_str (cx, "seat", seat_str);
++ set_property_str (cx, "session", session_str);
++ set_property_bool (cx, "local", subject_is_local);
++ set_property_bool (cx, "active", subject_is_active);
++
++ ret = TRUE;
++
++ out:
++ free (session_str);
++ free (seat_str);
++ g_free (user_name);
++ if (groups != NULL)
++ g_ptr_array_unref (groups);
++
++ return ret;
++}
++
++/* ---------------------------------------------------------------------------------------------------- */
++
++static gboolean
++push_action_and_details (duk_context *cx,
++ const gchar *action_id,
++ PolkitDetails *details,
++ GError **error)
++{
++ gchar **keys;
++ guint n;
++
++ duk_get_global_string (cx, "Action");
++ duk_new (cx, 0);
++
++ set_property_str (cx, "id", action_id);
++
++ keys = polkit_details_get_keys (details);
++ for (n = 0; keys != NULL && keys[n] != NULL; n++)
++ {
++ gchar *key;
++ const gchar *value;
++ key = g_strdup_printf ("_detail_%s", keys[n]);
++ value = polkit_details_lookup (details, keys[n]);
++ set_property_str (cx, key, value);
++ g_free (key);
++ }
++ g_strfreev (keys);
++
++ return TRUE;
++}
++
++/* ---------------------------------------------------------------------------------------------------- */
++
++/* ---------------------------------------------------------------------------------------------------- */
++
++static GList *
++polkit_backend_js_authority_get_admin_auth_identities (PolkitBackendInteractiveAuthority *_authority,
++ PolkitSubject *caller,
++ PolkitSubject *subject,
++ PolkitIdentity *user_for_subject,
++ gboolean subject_is_local,
++ gboolean subject_is_active,
++ const gchar *action_id,
++ PolkitDetails *details)
++{
++ PolkitBackendJsAuthority *authority = POLKIT_BACKEND_JS_AUTHORITY (_authority);
++ GList *ret = NULL;
++ guint n;
++ GError *error = NULL;
++ const char *ret_str = NULL;
++ gchar **ret_strs = NULL;
++ duk_context *cx = authority->priv->cx;
++
++ duk_set_top (cx, 0);
++ duk_get_global_string (cx, "polkit");
++ duk_push_string (cx, "_runAdminRules");
++
++ if (!push_action_and_details (cx, action_id, details, &error))
++ {
++ polkit_backend_authority_log (POLKIT_BACKEND_AUTHORITY (authority),
++ "Error converting action and details to JS object: %s",
++ error->message);
++ g_clear_error (&error);
++ goto out;
++ }
++
++ if (!push_subject (cx, subject, user_for_subject, subject_is_local, subject_is_active, &error))
++ {
++ polkit_backend_authority_log (POLKIT_BACKEND_AUTHORITY (authority),
++ "Error converting subject to JS object: %s",
++ error->message);
++ g_clear_error (&error);
++ goto out;
++ }
++
++ if (duk_pcall_prop (cx, 0, 2) != DUK_ERR_NONE)
++ {
++ polkit_backend_authority_log (POLKIT_BACKEND_AUTHORITY (authority),
++ "Error evaluating admin rules: ",
++ duk_safe_to_string (cx, -1));
++ goto out;
++ }
++
++ ret_str = duk_require_string (cx, -1);
++
++ ret_strs = g_strsplit (ret_str, ",", -1);
++ for (n = 0; ret_strs != NULL && ret_strs[n] != NULL; n++)
++ {
++ const gchar *identity_str = ret_strs[n];
++ PolkitIdentity *identity;
++
++ error = NULL;
++ identity = polkit_identity_from_string (identity_str, &error);
++ if (identity == NULL)
++ {
++ polkit_backend_authority_log (POLKIT_BACKEND_AUTHORITY (authority),
++ "Identity `%s' is not valid, ignoring: %s",
++ identity_str, error->message);
++ g_clear_error (&error);
++ }
++ else
++ {
++ ret = g_list_prepend (ret, identity);
++ }
++ }
++ ret = g_list_reverse (ret);
++
++ out:
++ g_strfreev (ret_strs);
++ /* fallback to root password auth */
++ if (ret == NULL)
++ ret = g_list_prepend (ret, polkit_unix_user_new (0));
++
++ return ret;
++}
++
++/* ---------------------------------------------------------------------------------------------------- */
++
++static PolkitImplicitAuthorization
++polkit_backend_js_authority_check_authorization_sync (PolkitBackendInteractiveAuthority *_authority,
++ PolkitSubject *caller,
++ PolkitSubject *subject,
++ PolkitIdentity *user_for_subject,
++ gboolean subject_is_local,
++ gboolean subject_is_active,
++ const gchar *action_id,
++ PolkitDetails *details,
++ PolkitImplicitAuthorization implicit)
++{
++ PolkitBackendJsAuthority *authority = POLKIT_BACKEND_JS_AUTHORITY (_authority);
++ PolkitImplicitAuthorization ret = implicit;
++ GError *error = NULL;
++ gchar *ret_str = NULL;
++ gboolean good = FALSE;
++ duk_context *cx = authority->priv->cx;
++
++ duk_set_top (cx, 0);
++ duk_get_global_string (cx, "polkit");
++ duk_push_string (cx, "_runRules");
++
++ if (!push_action_and_details (cx, action_id, details, &error))
++ {
++ polkit_backend_authority_log (POLKIT_BACKEND_AUTHORITY (authority),
++ "Error converting action and details to JS object: %s",
++ error->message);
++ g_clear_error (&error);
++ goto out;
++ }
++
++ if (!push_subject (cx, subject, user_for_subject, subject_is_local, subject_is_active, &error))
++ {
++ polkit_backend_authority_log (POLKIT_BACKEND_AUTHORITY (authority),
++ "Error converting subject to JS object: %s",
++ error->message);
++ g_clear_error (&error);
++ goto out;
++ }
++
++ if (duk_pcall_prop (cx, 0, 2) != DUK_ERR_NONE)
++ {
++ polkit_backend_authority_log (POLKIT_BACKEND_AUTHORITY (authority),
++ "Error evaluating authorization rules: ",
++ duk_safe_to_string (cx, -1));
++ goto out;
++ }
++
++ if (duk_is_null(cx, -1)) {
++ good = TRUE;
++ goto out;
++ }
++ ret_str = g_strdup (duk_require_string (cx, -1));
++ if (!polkit_implicit_authorization_from_string (ret_str, &ret))
++ {
++ polkit_backend_authority_log (POLKIT_BACKEND_AUTHORITY (authority),
++ "Returned result `%s' is not valid",
++ ret_str);
++ goto out;
++ }
++
++ good = TRUE;
++
++ out:
++ if (!good)
++ ret = POLKIT_IMPLICIT_AUTHORIZATION_NOT_AUTHORIZED;
++ g_free (ret_str);
++
++ return ret;
++}
++
++/* ---------------------------------------------------------------------------------------------------- */
++
++static duk_ret_t
++js_polkit_log (duk_context *cx)
++{
++ const char *str = duk_require_string (cx, 0);
++ fprintf (stderr, "%s\n", str);
++ return 0;
++}
++
++/* ---------------------------------------------------------------------------------------------------- */
++
++static const gchar *
++get_signal_name (gint signal_number)
++{
++ switch (signal_number)
++ {
++#define _HANDLE_SIG(sig) case sig: return #sig;
++ _HANDLE_SIG (SIGHUP);
++ _HANDLE_SIG (SIGINT);
++ _HANDLE_SIG (SIGQUIT);
++ _HANDLE_SIG (SIGILL);
++ _HANDLE_SIG (SIGABRT);
++ _HANDLE_SIG (SIGFPE);
++ _HANDLE_SIG (SIGKILL);
++ _HANDLE_SIG (SIGSEGV);
++ _HANDLE_SIG (SIGPIPE);
++ _HANDLE_SIG (SIGALRM);
++ _HANDLE_SIG (SIGTERM);
++ _HANDLE_SIG (SIGUSR1);
++ _HANDLE_SIG (SIGUSR2);
++ _HANDLE_SIG (SIGCHLD);
++ _HANDLE_SIG (SIGCONT);
++ _HANDLE_SIG (SIGSTOP);
++ _HANDLE_SIG (SIGTSTP);
++ _HANDLE_SIG (SIGTTIN);
++ _HANDLE_SIG (SIGTTOU);
++ _HANDLE_SIG (SIGBUS);
++#ifdef SIGPOLL
++ _HANDLE_SIG (SIGPOLL);
++#endif
++ _HANDLE_SIG (SIGPROF);
++ _HANDLE_SIG (SIGSYS);
++ _HANDLE_SIG (SIGTRAP);
++ _HANDLE_SIG (SIGURG);
++ _HANDLE_SIG (SIGVTALRM);
++ _HANDLE_SIG (SIGXCPU);
++ _HANDLE_SIG (SIGXFSZ);
++#undef _HANDLE_SIG
++ default:
++ break;
++ }
++ return "UNKNOWN_SIGNAL";
++}
++
++typedef struct
++{
++ GMainLoop *loop;
++ GAsyncResult *res;
++} SpawnData;
++
++static void
++spawn_cb (GObject *source_object,
++ GAsyncResult *res,
++ gpointer user_data)
++{
++ SpawnData *data = user_data;
++ data->res = g_object_ref (res);
++ g_main_loop_quit (data->loop);
++}
++
++static duk_ret_t
++js_polkit_spawn (duk_context *cx)
++{
++#if (DUK_VERSION >= 20000)
++ duk_ret_t ret = DUK_RET_ERROR;
++#else
++ duk_ret_t ret = DUK_RET_INTERNAL_ERROR;
++#endif
++ gchar *standard_output = NULL;
++ gchar *standard_error = NULL;
++ gint exit_status;
++ GError *error = NULL;
++ guint32 array_len;
++ gchar **argv = NULL;
++ GMainContext *context = NULL;
++ GMainLoop *loop = NULL;
++ SpawnData data = {0};
++ char *err_str = NULL;
++ guint n;
++
++ if (!duk_is_array (cx, 0))
++ goto out;
++
++ array_len = duk_get_length (cx, 0);
++
++ argv = g_new0 (gchar*, array_len + 1);
++ for (n = 0; n < array_len; n++)
++ {
++ duk_get_prop_index (cx, 0, n);
++ argv[n] = g_strdup (duk_to_string (cx, -1));
++ duk_pop (cx);
++ }
++
++ context = g_main_context_new ();
++ loop = g_main_loop_new (context, FALSE);
++
++ g_main_context_push_thread_default (context);
++
++ data.loop = loop;
++ utils_spawn ((const gchar *const *) argv,
++ 10, /* timeout_seconds */
++ NULL, /* cancellable */
++ spawn_cb,
++ &data);
++
++ g_main_loop_run (loop);
++
++ g_main_context_pop_thread_default (context);
++
++ if (!utils_spawn_finish (data.res,
++ &exit_status,
++ &standard_output,
++ &standard_error,
++ &error))
++ {
++ err_str = g_strdup_printf ("Error spawning helper: %s (%s, %d)",
++ error->message, g_quark_to_string (error->domain), error->code);
++ g_clear_error (&error);
++ goto out;
++ }
++
++ if (!(WIFEXITED (exit_status) && WEXITSTATUS (exit_status) == 0))
++ {
++ GString *gstr;
++ gstr = g_string_new (NULL);
++ if (WIFEXITED (exit_status))
++ {
++ g_string_append_printf (gstr,
++ "Helper exited with non-zero exit status %d",
++ WEXITSTATUS (exit_status));
++ }
++ else if (WIFSIGNALED (exit_status))
++ {
++ g_string_append_printf (gstr,
++ "Helper was signaled with signal %s (%d)",
++ get_signal_name (WTERMSIG (exit_status)),
++ WTERMSIG (exit_status));
++ }
++ g_string_append_printf (gstr, ", stdout=`%s', stderr=`%s'",
++ standard_output, standard_error);
++ err_str = g_string_free (gstr, FALSE);
++ goto out;
++ }
++
++ duk_push_string (cx, standard_output);
++ ret = 1;
++
++ out:
++ g_strfreev (argv);
++ g_free (standard_output);
++ g_free (standard_error);
++ g_clear_object (&data.res);
++ if (loop != NULL)
++ g_main_loop_unref (loop);
++ if (context != NULL)
++ g_main_context_unref (context);
++
++ if (err_str)
++ duk_error (cx, DUK_ERR_ERROR, err_str);
++
++ return ret;
++}
++
++/* ---------------------------------------------------------------------------------------------------- */
++
++
++static duk_ret_t
++js_polkit_user_is_in_netgroup (duk_context *cx)
++{
++ const char *user;
++ const char *netgroup;
++ gboolean is_in_netgroup = FALSE;
++
++ user = duk_require_string (cx, 0);
++ netgroup = duk_require_string (cx, 1);
++
++ if (innetgr (netgroup,
++ NULL, /* host */
++ user,
++ NULL)) /* domain */
++ {
++ is_in_netgroup = TRUE;
++ }
++
++ duk_push_boolean (cx, is_in_netgroup);
++ return 1;
++}
++
++/* ---------------------------------------------------------------------------------------------------- */
++
++typedef struct
++{
++ GSimpleAsyncResult *simple; /* borrowed reference */
++ GMainContext *main_context; /* may be NULL */
++
++ GCancellable *cancellable; /* may be NULL */
++ gulong cancellable_handler_id;
++
++ GPid child_pid;
++ gint child_stdout_fd;
++ gint child_stderr_fd;
++
++ GIOChannel *child_stdout_channel;
++ GIOChannel *child_stderr_channel;
++
++ GSource *child_watch_source;
++ GSource *child_stdout_source;
++ GSource *child_stderr_source;
++
++ guint timeout_seconds;
++ gboolean timed_out;
++ GSource *timeout_source;
++
++ GString *child_stdout;
++ GString *child_stderr;
++
++ gint exit_status;
++} UtilsSpawnData;
++
++static void
++utils_child_watch_from_release_cb (GPid pid,
++ gint status,
++ gpointer user_data)
++{
++}
++
++static void
++utils_spawn_data_free (UtilsSpawnData *data)
++{
++ if (data->timeout_source != NULL)
++ {
++ g_source_destroy (data->timeout_source);
++ data->timeout_source = NULL;
++ }
++
++ /* Nuke the child, if necessary */
++ if (data->child_watch_source != NULL)
++ {
++ g_source_destroy (data->child_watch_source);
++ data->child_watch_source = NULL;
++ }
++
++ if (data->child_pid != 0)
++ {
++ GSource *source;
++ kill (data->child_pid, SIGTERM);
++ /* OK, we need to reap for the child ourselves - we don't want
++ * to use waitpid() because that might block the calling
++ * thread (the child might handle SIGTERM and use several
++ * seconds for cleanup/rollback).
++ *
++ * So we use GChildWatch instead.
++ *
++ * Avoid taking a references to ourselves. but note that we need
++ * to pass the GSource so we can nuke it once handled.
++ */
++ source = g_child_watch_source_new (data->child_pid);
++ g_source_set_callback (source,
++ (GSourceFunc) utils_child_watch_from_release_cb,
++ source,
++ (GDestroyNotify) g_source_destroy);
++ g_source_attach (source, data->main_context);
++ g_source_unref (source);
++ data->child_pid = 0;
++ }
++
++ if (data->child_stdout != NULL)
++ {
++ g_string_free (data->child_stdout, TRUE);
++ data->child_stdout = NULL;
++ }
++
++ if (data->child_stderr != NULL)
++ {
++ g_string_free (data->child_stderr, TRUE);
++ data->child_stderr = NULL;
++ }
++
++ if (data->child_stdout_channel != NULL)
++ {
++ g_io_channel_unref (data->child_stdout_channel);
++ data->child_stdout_channel = NULL;
++ }
++ if (data->child_stderr_channel != NULL)
++ {
++ g_io_channel_unref (data->child_stderr_channel);
++ data->child_stderr_channel = NULL;
++ }
++
++ if (data->child_stdout_source != NULL)
++ {
++ g_source_destroy (data->child_stdout_source);
++ data->child_stdout_source = NULL;
++ }
++ if (data->child_stderr_source != NULL)
++ {
++ g_source_destroy (data->child_stderr_source);
++ data->child_stderr_source = NULL;
++ }
++
++ if (data->child_stdout_fd != -1)
++ {
++ g_warn_if_fail (close (data->child_stdout_fd) == 0);
++ data->child_stdout_fd = -1;
++ }
++ if (data->child_stderr_fd != -1)
++ {
++ g_warn_if_fail (close (data->child_stderr_fd) == 0);
++ data->child_stderr_fd = -1;
++ }
++
++ if (data->cancellable_handler_id > 0)
++ {
++ g_cancellable_disconnect (data->cancellable, data->cancellable_handler_id);
++ data->cancellable_handler_id = 0;
++ }
++
++ if (data->main_context != NULL)
++ g_main_context_unref (data->main_context);
++
++ if (data->cancellable != NULL)
++ g_object_unref (data->cancellable);
++
++ g_slice_free (UtilsSpawnData, data);
++}
++
++/* called in the thread where @cancellable was cancelled */
++static void
++utils_on_cancelled (GCancellable *cancellable,
++ gpointer user_data)
++{
++ UtilsSpawnData *data = user_data;
++ GError *error;
++
++ error = NULL;
++ g_warn_if_fail (g_cancellable_set_error_if_cancelled (cancellable, &error));
++ g_simple_async_result_take_error (data->simple, error);
++ g_simple_async_result_complete_in_idle (data->simple);
++ g_object_unref (data->simple);
++}
++
++static gboolean
++utils_read_child_stderr (GIOChannel *channel,
++ GIOCondition condition,
++ gpointer user_data)
++{
++ UtilsSpawnData *data = user_data;
++ gchar buf[1024];
++ gsize bytes_read;
++
++ g_io_channel_read_chars (channel, buf, sizeof buf, &bytes_read, NULL);
++ g_string_append_len (data->child_stderr, buf, bytes_read);
++ return TRUE;
++}
++
++static gboolean
++utils_read_child_stdout (GIOChannel *channel,
++ GIOCondition condition,
++ gpointer user_data)
++{
++ UtilsSpawnData *data = user_data;
++ gchar buf[1024];
++ gsize bytes_read;
++
++ g_io_channel_read_chars (channel, buf, sizeof buf, &bytes_read, NULL);
++ g_string_append_len (data->child_stdout, buf, bytes_read);
++ return TRUE;
++}
++
++static void
++utils_child_watch_cb (GPid pid,
++ gint status,
++ gpointer user_data)
++{
++ UtilsSpawnData *data = user_data;
++ gchar *buf;
++ gsize buf_size;
++
++ if (g_io_channel_read_to_end (data->child_stdout_channel, &buf, &buf_size, NULL) == G_IO_STATUS_NORMAL)
++ {
++ g_string_append_len (data->child_stdout, buf, buf_size);
++ g_free (buf);
++ }
++ if (g_io_channel_read_to_end (data->child_stderr_channel, &buf, &buf_size, NULL) == G_IO_STATUS_NORMAL)
++ {
++ g_string_append_len (data->child_stderr, buf, buf_size);
++ g_free (buf);
++ }
++
++ data->exit_status = status;
++
++ /* ok, child watch is history, make sure we don't free it in spawn_data_free() */
++ data->child_pid = 0;
++ data->child_watch_source = NULL;
++
++ /* we're done */
++ g_simple_async_result_complete_in_idle (data->simple);
++ g_object_unref (data->simple);
++}
++
++static gboolean
++utils_timeout_cb (gpointer user_data)
++{
++ UtilsSpawnData *data = user_data;
++
++ data->timed_out = TRUE;
++
++ /* ok, timeout is history, make sure we don't free it in spawn_data_free() */
++ data->timeout_source = NULL;
++
++ /* we're done */
++ g_simple_async_result_complete_in_idle (data->simple);
++ g_object_unref (data->simple);
++
++ return FALSE; /* remove source */
++}
++
++static void
++utils_spawn (const gchar *const *argv,
++ guint timeout_seconds,
++ GCancellable *cancellable,
++ GAsyncReadyCallback callback,
++ gpointer user_data)
++{
++ UtilsSpawnData *data;
++ GError *error;
++
++ data = g_slice_new0 (UtilsSpawnData);
++ data->timeout_seconds = timeout_seconds;
++ data->simple = g_simple_async_result_new (NULL,
++ callback,
++ user_data,
++ utils_spawn);
++ data->main_context = g_main_context_get_thread_default ();
++ if (data->main_context != NULL)
++ g_main_context_ref (data->main_context);
++
++ data->cancellable = cancellable != NULL ? g_object_ref (cancellable) : NULL;
++
++ data->child_stdout = g_string_new (NULL);
++ data->child_stderr = g_string_new (NULL);
++ data->child_stdout_fd = -1;
++ data->child_stderr_fd = -1;
++
++ /* the life-cycle of UtilsSpawnData is tied to its GSimpleAsyncResult */
++ g_simple_async_result_set_op_res_gpointer (data->simple, data, (GDestroyNotify) utils_spawn_data_free);
++
++ error = NULL;
++ if (data->cancellable != NULL)
++ {
++ /* could already be cancelled */
++ error = NULL;
++ if (g_cancellable_set_error_if_cancelled (data->cancellable, &error))
++ {
++ g_simple_async_result_take_error (data->simple, error);
++ g_simple_async_result_complete_in_idle (data->simple);
++ g_object_unref (data->simple);
++ goto out;
++ }
++
++ data->cancellable_handler_id = g_cancellable_connect (data->cancellable,
++ G_CALLBACK (utils_on_cancelled),
++ data,
++ NULL);
++ }
++
++ error = NULL;
++ if (!g_spawn_async_with_pipes (NULL, /* working directory */
++ (gchar **) argv,
++ NULL, /* envp */
++ G_SPAWN_SEARCH_PATH | G_SPAWN_DO_NOT_REAP_CHILD,
++ NULL, /* child_setup */
++ NULL, /* child_setup's user_data */
++ &(data->child_pid),
++ NULL, /* gint *stdin_fd */
++ &(data->child_stdout_fd),
++ &(data->child_stderr_fd),
++ &error))
++ {
++ g_prefix_error (&error, "Error spawning: ");
++ g_simple_async_result_take_error (data->simple, error);
++ g_simple_async_result_complete_in_idle (data->simple);
++ g_object_unref (data->simple);
++ goto out;
++ }
++
++ if (timeout_seconds > 0)
++ {
++ data->timeout_source = g_timeout_source_new_seconds (timeout_seconds);
++ g_source_set_priority (data->timeout_source, G_PRIORITY_DEFAULT);
++ g_source_set_callback (data->timeout_source, utils_timeout_cb, data, NULL);
++ g_source_attach (data->timeout_source, data->main_context);
++ g_source_unref (data->timeout_source);
++ }
++
++ data->child_watch_source = g_child_watch_source_new (data->child_pid);
++ g_source_set_callback (data->child_watch_source, (GSourceFunc) utils_child_watch_cb, data, NULL);
++ g_source_attach (data->child_watch_source, data->main_context);
++ g_source_unref (data->child_watch_source);
++
++ data->child_stdout_channel = g_io_channel_unix_new (data->child_stdout_fd);
++ g_io_channel_set_flags (data->child_stdout_channel, G_IO_FLAG_NONBLOCK, NULL);
++ data->child_stdout_source = g_io_create_watch (data->child_stdout_channel, G_IO_IN);
++ g_source_set_callback (data->child_stdout_source, (GSourceFunc) utils_read_child_stdout, data, NULL);
++ g_source_attach (data->child_stdout_source, data->main_context);
++ g_source_unref (data->child_stdout_source);
++
++ data->child_stderr_channel = g_io_channel_unix_new (data->child_stderr_fd);
++ g_io_channel_set_flags (data->child_stderr_channel, G_IO_FLAG_NONBLOCK, NULL);
++ data->child_stderr_source = g_io_create_watch (data->child_stderr_channel, G_IO_IN);
++ g_source_set_callback (data->child_stderr_source, (GSourceFunc) utils_read_child_stderr, data, NULL);
++ g_source_attach (data->child_stderr_source, data->main_context);
++ g_source_unref (data->child_stderr_source);
++
++ out:
++ ;
++}
++
++gboolean
++utils_spawn_finish (GAsyncResult *res,
++ gint *out_exit_status,
++ gchar **out_standard_output,
++ gchar **out_standard_error,
++ GError **error)
++{
++ GSimpleAsyncResult *simple = G_SIMPLE_ASYNC_RESULT (res);
++ UtilsSpawnData *data;
++ gboolean ret = FALSE;
++
++ g_return_val_if_fail (G_IS_ASYNC_RESULT (res), FALSE);
++ g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
++
++ g_warn_if_fail (g_simple_async_result_get_source_tag (simple) == utils_spawn);
++
++ if (g_simple_async_result_propagate_error (simple, error))
++ goto out;
++
++ data = g_simple_async_result_get_op_res_gpointer (simple);
++
++ if (data->timed_out)
++ {
++ g_set_error (error,
++ G_IO_ERROR,
++ G_IO_ERROR_TIMED_OUT,
++ "Timed out after %d seconds",
++ data->timeout_seconds);
++ goto out;
++ }
++
++ if (out_exit_status != NULL)
++ *out_exit_status = data->exit_status;
++
++ if (out_standard_output != NULL)
++ *out_standard_output = g_strdup (data->child_stdout->str);
++
++ if (out_standard_error != NULL)
++ *out_standard_error = g_strdup (data->child_stderr->str);
++
++ ret = TRUE;
++
++ out:
++ return ret;
++}
+--
+GitLab
+
+
+From d74aad8152a7c51999fffa9abe28e4306a052399 Mon Sep 17 00:00:00 2001
+From: Wu Xiaotian <yetist@gmail.com>
+Date: Sun, 22 Nov 2020 13:15:17 +0800
+Subject: [PATCH 02/16] check netgroup.h header file
+
+Signed-off-by: Gustavo Lima Chaves <gustavo.chaves@microsoft.com>
+---
+ src/polkitbackend/polkitbackendduktapeauthority.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/src/polkitbackend/polkitbackendduktapeauthority.c b/src/polkitbackend/polkitbackendduktapeauthority.c
+index ae98453..543d6fd 100644
+--- a/src/polkitbackend/polkitbackendduktapeauthority.c
++++ b/src/polkitbackend/polkitbackendduktapeauthority.c
+@@ -26,7 +26,11 @@
+ #include <errno.h>
+ #include <pwd.h>
+ #include <grp.h>
++#ifdef HAVE_NETGROUP_H
++#include <netgroup.h>
++#else
+ #include <netdb.h>
++#endif
+ #include <string.h>
+ #include <glib/gstdio.h>
+ #include <locale.h>
+--
+GitLab
+
+
+From 69c761506cbe458807e4ae2742c9e05bc60dad3d Mon Sep 17 00:00:00 2001
+From: Wu Xiaotian <yetist@gmail.com>
+Date: Sun, 22 Nov 2020 10:59:03 +0800
+Subject: [PATCH 03/16] check return value
+
+Signed-off-by: Gustavo Lima Chaves <gustavo.chaves@microsoft.com>
+---
+ src/polkitbackend/polkitbackendduktapeauthority.c | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/src/polkitbackend/polkitbackendduktapeauthority.c b/src/polkitbackend/polkitbackendduktapeauthority.c
+index 543d6fd..a54ed5b 100644
+--- a/src/polkitbackend/polkitbackendduktapeauthority.c
++++ b/src/polkitbackend/polkitbackendduktapeauthority.c
+@@ -249,7 +249,11 @@ reload_scripts (PolkitBackendJsAuthority *authority)
+ duk_context *cx = authority->priv->cx;
+
+ duk_set_top (cx, 0);
+- duk_get_global_string (cx, "polkit");
++ if (!duk_get_global_string (cx, "polkit")) {
++ polkit_backend_authority_log (POLKIT_BACKEND_AUTHORITY (authority),
++ "Error deleting old rules, not loading new ones");
++ return;
++ }
+ duk_push_string (cx, "_deleteRules");
+
+ duk_call_prop (cx, 0, 0);
+--
+GitLab
+
+
+From f1536c4899934fd3c8243fda2d084a472fe57d2e Mon Sep 17 00:00:00 2001
+From: Wu Xiaotian <yetist@gmail.com>
+Date: Sun, 22 Nov 2020 11:22:39 +0800
+Subject: [PATCH 04/16] check return value
+
+Signed-off-by: Gustavo Lima Chaves <gustavo.chaves@microsoft.com>
+---
+ src/polkitbackend/polkitbackendduktapeauthority.c | 12 ++++++++++--
+ 1 file changed, 10 insertions(+), 2 deletions(-)
+
+diff --git a/src/polkitbackend/polkitbackendduktapeauthority.c b/src/polkitbackend/polkitbackendduktapeauthority.c
+index a54ed5b..1a7e6d3 100644
+--- a/src/polkitbackend/polkitbackendduktapeauthority.c
++++ b/src/polkitbackend/polkitbackendduktapeauthority.c
+@@ -656,7 +656,10 @@ push_action_and_details (duk_context *cx,
+ gchar **keys;
+ guint n;
+
+- duk_get_global_string (cx, "Action");
++ if (!duk_get_global_string (cx, "Action")) {
++ return FALSE;
++ }
++
+ duk_new (cx, 0);
+
+ set_property_str (cx, "id", action_id);
+@@ -699,7 +702,12 @@ polkit_backend_js_authority_get_admin_auth_identities (PolkitBackendInteractiveA
+ duk_context *cx = authority->priv->cx;
+
+ duk_set_top (cx, 0);
+- duk_get_global_string (cx, "polkit");
++ if (!duk_get_global_string (cx, "polkit")) {
++ polkit_backend_authority_log (POLKIT_BACKEND_AUTHORITY (authority),
++ "Error deleting old rules, not loading new ones");
++ goto out;
++ }
++
+ duk_push_string (cx, "_runAdminRules");
+
+ if (!push_action_and_details (cx, action_id, details, &error))
+--
+GitLab
+
+
+From ca15eecf5dc7755947515c1bfc651fd8770aaf8f Mon Sep 17 00:00:00 2001
+From: Wu Xiaotian <yetist@gmail.com>
+Date: Sun, 22 Nov 2020 13:17:16 +0800
+Subject: [PATCH 05/16] check return value
+
+Signed-off-by: Gustavo Lima Chaves <gustavo.chaves@microsoft.com>
+---
+ src/polkitbackend/polkitbackendduktapeauthority.c | 10 ++++++++--
+ 1 file changed, 8 insertions(+), 2 deletions(-)
+
+diff --git a/src/polkitbackend/polkitbackendduktapeauthority.c b/src/polkitbackend/polkitbackendduktapeauthority.c
+index 1a7e6d3..3f1b32d 100644
+--- a/src/polkitbackend/polkitbackendduktapeauthority.c
++++ b/src/polkitbackend/polkitbackendduktapeauthority.c
+@@ -550,7 +550,10 @@ push_subject (duk_context *cx,
+ char *seat_str = NULL;
+ char *session_str = NULL;
+
+- duk_get_global_string (cx, "Subject");
++ if (!duk_get_global_string (cx, "Subject")) {
++ return FALSE;
++ }
++
+ duk_new (cx, 0);
+
+ if (POLKIT_IS_UNIX_PROCESS (subject))
+@@ -789,8 +792,11 @@ polkit_backend_js_authority_check_authorization_sync (PolkitBackendInteractiveAu
+ gboolean good = FALSE;
+ duk_context *cx = authority->priv->cx;
+
++ if (!duk_get_global_string (cx, "polkit")) {
++ goto out;
++ }
++
+ duk_set_top (cx, 0);
+- duk_get_global_string (cx, "polkit");
+ duk_push_string (cx, "_runRules");
+
+ if (!push_action_and_details (cx, action_id, details, &error))
+--
+GitLab
+
+
+From 870348365cc0166e14f28e0d144ed552bba4d794 Mon Sep 17 00:00:00 2001
+From: Wu Xiaotian <yetist@gmail.com>
+Date: Sun, 22 Nov 2020 13:18:13 +0800
+Subject: [PATCH 06/16] check return value
+
+Signed-off-by: Gustavo Lima Chaves <gustavo.chaves@microsoft.com>
+---
+ src/polkitbackend/polkitbackendduktapeauthority.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/src/polkitbackend/polkitbackendduktapeauthority.c b/src/polkitbackend/polkitbackendduktapeauthority.c
+index 3f1b32d..6294ad9 100644
+--- a/src/polkitbackend/polkitbackendduktapeauthority.c
++++ b/src/polkitbackend/polkitbackendduktapeauthority.c
+@@ -843,7 +843,8 @@ polkit_backend_js_authority_check_authorization_sync (PolkitBackendInteractiveAu
+ out:
+ if (!good)
+ ret = POLKIT_IMPLICIT_AUTHORIZATION_NOT_AUTHORIZED;
+- g_free (ret_str);
++ if (ret_str != NULL)
++ g_free (ret_str);
+
+ return ret;
+ }
+--
+GitLab
+
+
+From 81c916ff08fdcee3c7340c4b2d4632086b89666c Mon Sep 17 00:00:00 2001
+From: Wu Xiaotian <yetist@gmail.com>
+Date: Sun, 22 Nov 2020 11:23:04 +0800
+Subject: [PATCH 07/16] fix typecase
+
+Signed-off-by: Gustavo Lima Chaves <gustavo.chaves@microsoft.com>
+---
+ src/polkitbackend/polkitbackendduktapeauthority.c | 10 +++++-----
+ 1 file changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/src/polkitbackend/polkitbackendduktapeauthority.c b/src/polkitbackend/polkitbackendduktapeauthority.c
+index 6294ad9..d466c9d 100644
+--- a/src/polkitbackend/polkitbackendduktapeauthority.c
++++ b/src/polkitbackend/polkitbackendduktapeauthority.c
+@@ -1191,7 +1191,7 @@ static void
+ utils_on_cancelled (GCancellable *cancellable,
+ gpointer user_data)
+ {
+- UtilsSpawnData *data = user_data;
++ UtilsSpawnData *data = (UtilsSpawnData *)user_data;
+ GError *error;
+
+ error = NULL;
+@@ -1206,7 +1206,7 @@ utils_read_child_stderr (GIOChannel *channel,
+ GIOCondition condition,
+ gpointer user_data)
+ {
+- UtilsSpawnData *data = user_data;
++ UtilsSpawnData *data = (UtilsSpawnData *)user_data;
+ gchar buf[1024];
+ gsize bytes_read;
+
+@@ -1220,7 +1220,7 @@ utils_read_child_stdout (GIOChannel *channel,
+ GIOCondition condition,
+ gpointer user_data)
+ {
+- UtilsSpawnData *data = user_data;
++ UtilsSpawnData *data = (UtilsSpawnData *)user_data;
+ gchar buf[1024];
+ gsize bytes_read;
+
+@@ -1234,7 +1234,7 @@ utils_child_watch_cb (GPid pid,
+ gint status,
+ gpointer user_data)
+ {
+- UtilsSpawnData *data = user_data;
++ UtilsSpawnData *data = (UtilsSpawnData *)user_data;
+ gchar *buf;
+ gsize buf_size;
+
+@@ -1263,7 +1263,7 @@ utils_child_watch_cb (GPid pid,
+ static gboolean
+ utils_timeout_cb (gpointer user_data)
+ {
+- UtilsSpawnData *data = user_data;
++ UtilsSpawnData *data = (UtilsSpawnData *)user_data;
+
+ data->timed_out = TRUE;
+
+--
+GitLab
+
+
+From acb956bf52f0a78bf7aaf925876f96e97a146995 Mon Sep 17 00:00:00 2001
+From: Wu Xiaotian <yetist@gmail.com>
+Date: Sun, 22 Nov 2020 18:04:27 +0800
+Subject: [PATCH 08/16] typecase
+
+Signed-off-by: Gustavo Lima Chaves <gustavo.chaves@microsoft.com>
+---
+ src/polkitbackend/polkitbackendduktapeauthority.c | 10 +++++-----
+ 1 file changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/src/polkitbackend/polkitbackendduktapeauthority.c b/src/polkitbackend/polkitbackendduktapeauthority.c
+index d466c9d..237b1ad 100644
+--- a/src/polkitbackend/polkitbackendduktapeauthority.c
++++ b/src/polkitbackend/polkitbackendduktapeauthority.c
+@@ -915,8 +915,8 @@ spawn_cb (GObject *source_object,
+ GAsyncResult *res,
+ gpointer user_data)
+ {
+- SpawnData *data = user_data;
+- data->res = g_object_ref (res);
++ SpawnData *data = (SpawnData *)user_data;
++ data->res = (GAsyncResult*)g_object_ref (res);
+ g_main_loop_quit (data->loop);
+ }
+
+@@ -1292,12 +1292,12 @@ utils_spawn (const gchar *const *argv,
+ data->simple = g_simple_async_result_new (NULL,
+ callback,
+ user_data,
+- utils_spawn);
++ (gpointer*)utils_spawn);
+ data->main_context = g_main_context_get_thread_default ();
+ if (data->main_context != NULL)
+ g_main_context_ref (data->main_context);
+
+- data->cancellable = cancellable != NULL ? g_object_ref (cancellable) : NULL;
++ data->cancellable = cancellable != NULL ? (GCancellable*)g_object_ref (cancellable) : NULL;
+
+ data->child_stdout = g_string_new (NULL);
+ data->child_stderr = g_string_new (NULL);
+@@ -1397,7 +1397,7 @@ utils_spawn_finish (GAsyncResult *res,
+ if (g_simple_async_result_propagate_error (simple, error))
+ goto out;
+
+- data = g_simple_async_result_get_op_res_gpointer (simple);
++ data = (UtilsSpawnData*)g_simple_async_result_get_op_res_gpointer (simple);
+
+ if (data->timed_out)
+ {
+--
+GitLab
+
+
+From be060e4d48aceb09af34868b555b6c73c7afdabb Mon Sep 17 00:00:00 2001
+From: Wu Xiaotian <yetist@gmail.com>
+Date: Sun, 22 Nov 2020 13:53:23 +0800
+Subject: [PATCH 09/16] some change
+
+Signed-off-by: Gustavo Lima Chaves <gustavo.chaves@microsoft.com>
+---
+ .../polkitbackendduktapeauthority.c | 26 +++++++++++--------
+ 1 file changed, 15 insertions(+), 11 deletions(-)
+
+diff --git a/src/polkitbackend/polkitbackendduktapeauthority.c b/src/polkitbackend/polkitbackendduktapeauthority.c
+index 237b1ad..fad9017 100644
+--- a/src/polkitbackend/polkitbackendduktapeauthority.c
++++ b/src/polkitbackend/polkitbackendduktapeauthority.c
+@@ -207,18 +207,22 @@ load_scripts (PolkitBackendJsAuthority *authority)
+
+ for (l = files; l != NULL; l = l->next)
+ {
+- const gchar *filename = l->data;
+-
++ const gchar *filename = (gchar *)l->data;
+ #if (DUK_VERSION >= 20000)
+- gchar *contents;
+- gsize length;
+- GError *error = NULL;
+- if (!g_file_get_contents (filename, &contents, &length, &error)){
+- g_warning("Error when file contents of %s: %s\n", filename, error->message);
+- g_error_free (error);
+- continue;
+- }
+- if (duk_peval_lstring_noresult(cx, contents,length) != 0)
++ GFile *file = g_file_new_for_path (filename);
++ char *contents;
++ gsize len;
++ if (!g_file_load_contents (file, NULL, &contents, &len, NULL, NULL))
++ {
++ polkit_backend_authority_log (POLKIT_BACKEND_AUTHORITY (authority),
++ "Error compiling script %s",
++ filename);
++ g_object_unref (file);
++ continue;
++ }
++
++ g_object_unref (file);
++ if (duk_peval_lstring_noresult(cx, contents,len) != 0)
+ #else
+ if (duk_peval_file_noresult (cx, filename) != 0)
+ #endif
+--
+GitLab
+
+
+From 2ffb62048a5ebedfe3bb053feb7385c7270ede28 Mon Sep 17 00:00:00 2001
+From: Wu Xiaotian <yetist@gmail.com>
+Date: Sun, 22 Nov 2020 15:25:45 +0800
+Subject: [PATCH 10/16] some change
+
+Signed-off-by: Gustavo Lima Chaves <gustavo.chaves@microsoft.com>
+---
+ .../polkitbackendduktapeauthority.c | 24 +++++++++----------
+ 1 file changed, 12 insertions(+), 12 deletions(-)
+
+diff --git a/src/polkitbackend/polkitbackendduktapeauthority.c b/src/polkitbackend/polkitbackendduktapeauthority.c
+index fad9017..6fac3be 100644
+--- a/src/polkitbackend/polkitbackendduktapeauthority.c
++++ b/src/polkitbackend/polkitbackendduktapeauthority.c
+@@ -125,6 +125,18 @@ G_DEFINE_TYPE (PolkitBackendJsAuthority, polkit_backend_js_authority, POLKIT_BAC
+
+ /* ---------------------------------------------------------------------------------------------------- */
+
++static duk_ret_t js_polkit_log (duk_context *cx);
++static duk_ret_t js_polkit_spawn (duk_context *cx);
++static duk_ret_t js_polkit_user_is_in_netgroup (duk_context *cx);
++
++static const duk_function_list_entry js_polkit_functions[] =
++{
++ { "log", js_polkit_log, 1 },
++ { "spawn", js_polkit_spawn, 1 },
++ { "_userIsInNetGroup", js_polkit_user_is_in_netgroup, 2 },
++ { NULL, NULL, 0 },
++};
++
+ static void
+ polkit_backend_js_authority_init (PolkitBackendJsAuthority *authority)
+ {
+@@ -347,18 +359,6 @@ setup_file_monitors (PolkitBackendJsAuthority *authority)
+ authority->priv->dir_monitors = (GFileMonitor**) g_ptr_array_free (p, FALSE);
+ }
+
+-static duk_ret_t js_polkit_log (duk_context *cx);
+-static duk_ret_t js_polkit_spawn (duk_context *cx);
+-static duk_ret_t js_polkit_user_is_in_netgroup (duk_context *cx);
+-
+-static const duk_function_list_entry js_polkit_functions[] =
+-{
+- { "log", js_polkit_log, 1 },
+- { "spawn", js_polkit_spawn, 1 },
+- { "_userIsInNetGroup", js_polkit_user_is_in_netgroup, 2 },
+- { NULL, NULL, 0 },
+-};
+-
+ static void
+ polkit_backend_js_authority_constructed (GObject *object)
+ {
+--
+GitLab
+
+
+From edb70ef69eed3275f5654510d135e680eb46c85d Mon Sep 17 00:00:00 2001
+From: Wu Xiaotian <yetist@gmail.com>
+Date: Sun, 22 Nov 2020 15:25:35 +0800
+Subject: [PATCH 11/16] remove WATCHDOG_TIMEOUT define
+
+Signed-off-by: Gustavo Lima Chaves <gustavo.chaves@microsoft.com>
+---
+ src/polkitbackend/polkitbackendduktapeauthority.c | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/src/polkitbackend/polkitbackendduktapeauthority.c b/src/polkitbackend/polkitbackendduktapeauthority.c
+index 6fac3be..51e03fd 100644
+--- a/src/polkitbackend/polkitbackendduktapeauthority.c
++++ b/src/polkitbackend/polkitbackendduktapeauthority.c
+@@ -69,7 +69,6 @@ struct _PolkitBackendJsAuthorityPrivate
+ duk_context *cx;
+ };
+
+-#define WATCHDOG_TIMEOUT (15 * G_TIME_SPAN_SECOND)
+
+ static void utils_spawn (const gchar *const *argv,
+ guint timeout_seconds,
+--
+GitLab
+
+
+From 906ae404f29f15ef8c529b999bf091b5d18ed7ac Mon Sep 17 00:00:00 2001
+From: Wu Xiaotian <yetist@gmail.com>
+Date: Sun, 22 Nov 2020 12:46:40 +0800
+Subject: [PATCH 12/16] add meson build system support
+
+Signed-off-by: Gustavo Lima Chaves <gustavo.chaves@microsoft.com>
+---
+ meson.build | 11 ++++++++++-
+ meson_options.txt | 1 +
+ src/polkitbackend/meson.build | 10 ++++++++--
+ 3 files changed, 19 insertions(+), 3 deletions(-)
+
+diff --git a/meson.build b/meson.build
+index 858078d..4e44723 100644
+--- a/meson.build
++++ b/meson.build
+@@ -133,7 +133,13 @@ expat_dep = dependency('expat')
+ assert(cc.has_header('expat.h', dependencies: expat_dep), 'Can\'t find expat.h. Please install expat.')
+ assert(cc.has_function('XML_ParserCreate', dependencies: expat_dep), 'Can\'t find expat library. Please install expat.')
+
+-mozjs_dep = dependency('mozjs-78')
++js_engine = get_option('js_engine')
++if js_engine == 'duktape'
++ js_dep = dependency('duktape')
++ libm_dep = cc.find_library('m')
++elif js_engine == 'mozjs'
++ js_dep = dependency('mozjs-78')
++endif
+
+ dbus_dep = dependency('dbus-1', required: false)
+ dbus_policydir = pk_prefix / pk_datadir / 'dbus-1/system.d'
+@@ -361,6 +367,9 @@ if enable_logind
+ output += ' systemdsystemunitdir: ' + systemd_systemdsystemunitdir + '\n'
+ endif
+ output += ' polkitd user: ' + polkitd_user + ' \n'
++output += ' Javascript engine: ' + js_engine + '\n'
++if enable_logind
++endif
+ output += ' PAM support: ' + enable_pam.to_string() + '\n\n'
+ if enable_pam
+ output += ' PAM file auth: ' + pam_conf['PAM_FILE_INCLUDE_AUTH'] + '\n'
+diff --git a/meson_options.txt b/meson_options.txt
+index 25e3e77..76aa311 100644
+--- a/meson_options.txt
++++ b/meson_options.txt
+@@ -16,3 +16,4 @@ option('introspection', type: 'boolean', value: true, description: 'Enable intro
+
+ option('gtk_doc', type: 'boolean', value: false, description: 'use gtk-doc to build documentation')
+ option('man', type: 'boolean', value: false, description: 'build manual pages')
++option('js_engine', type: 'combo', choices: ['mozjs', 'duktape'], value: 'duktape', description: 'javascript engine')
+diff --git a/src/polkitbackend/meson.build b/src/polkitbackend/meson.build
+index 64f0e4a..489897d 100644
+--- a/src/polkitbackend/meson.build
++++ b/src/polkitbackend/meson.build
+@@ -5,7 +5,6 @@ sources = files(
+ 'polkitbackendactionpool.c',
+ 'polkitbackendauthority.c',
+ 'polkitbackendinteractiveauthority.c',
+- 'polkitbackendjsauthority.cpp',
+ )
+
+ output = 'initjs.h'
+@@ -21,7 +20,7 @@ sources += custom_target(
+ deps = [
+ expat_dep,
+ libpolkit_gobject_dep,
+- mozjs_dep,
++ js_dep,
+ ]
+
+ c_flags = [
+@@ -31,6 +30,13 @@ c_flags = [
+ '-DPACKAGE_SYSCONF_DIR="@0@"'.format(pk_prefix / pk_sysconfdir),
+ ]
+
++if js_engine == 'duktape'
++ sources += files('polkitbackendduktapeauthority.c')
++ deps += libm_dep
++elif js_engine == 'mozjs'
++ sources += files('polkitbackendjsauthority.cpp')
++endif
++
+ if enable_logind
+ sources += files('polkitbackendsessionmonitor-systemd.c')
+
+--
+GitLab
+
+
+From 1380b505c25be4aebe54b1b4223a570d64af83cc Mon Sep 17 00:00:00 2001
+From: Wu Xiaotian <yetist@gmail.com>
+Date: Sun, 22 Nov 2020 18:49:14 +0800
+Subject: [PATCH 13/16] fix run error
+
+Signed-off-by: Gustavo Lima Chaves <gustavo.chaves@microsoft.com>
+---
+ src/polkitbackend/polkitbackendduktapeauthority.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/polkitbackend/polkitbackendduktapeauthority.c b/src/polkitbackend/polkitbackendduktapeauthority.c
+index 51e03fd..4b4f8fd 100644
+--- a/src/polkitbackend/polkitbackendduktapeauthority.c
++++ b/src/polkitbackend/polkitbackendduktapeauthority.c
+@@ -795,11 +795,11 @@ polkit_backend_js_authority_check_authorization_sync (PolkitBackendInteractiveAu
+ gboolean good = FALSE;
+ duk_context *cx = authority->priv->cx;
+
++ duk_set_top (cx, 0);
+ if (!duk_get_global_string (cx, "polkit")) {
+ goto out;
+ }
+
+- duk_set_top (cx, 0);
+ duk_push_string (cx, "_runRules");
+
+ if (!push_action_and_details (cx, action_id, details, &error))
+--
+GitLab
+
+
+From 6856a704b70378948ef5f66e9b09555d97d4070b Mon Sep 17 00:00:00 2001
+From: Gustavo Lima Chaves <gustavo.chaves@microsoft.com>
+Date: Fri, 10 Sep 2021 15:17:58 -0700
+Subject: [PATCH 14/16] Deduplicate code for "Add duktape as JS engine backend"
+ effort/MR
+
+This leverages Wu Xiaotian (@yetist)'s original MR
+(https://gitlab.freedesktop.org/polkit/polkit/-/merge_requests/35), in
+an effort to complete said work.
+
+This is the first of the requests from maintainers--to reduce
+eliminate code duplication.
+
+The runaway-killer missing functionality will come in the sequence.
+
+Signed-off-by: Gustavo Lima Chaves <gustavo.chaves@microsoft.com>
+---
+ src/polkitbackend/Makefile.am | 1 +
+ src/polkitbackend/meson.build | 1 +
+ src/polkitbackend/polkitbackendcommon.c | 530 +++++++++++++
+ src/polkitbackend/polkitbackendcommon.h | 156 ++++
+ .../polkitbackendduktapeauthority.c | 714 ++----------------
+ .../polkitbackendjsauthority.cpp | 711 ++---------------
+ 6 files changed, 790 insertions(+), 1323 deletions(-)
+ create mode 100644 src/polkitbackend/polkitbackendcommon.c
+ create mode 100644 src/polkitbackend/polkitbackendcommon.h
+
+diff --git a/src/polkitbackend/Makefile.am b/src/polkitbackend/Makefile.am
+index abcbc6f..6a8b4ae 100644
+--- a/src/polkitbackend/Makefile.am
++++ b/src/polkitbackend/Makefile.am
+@@ -31,6 +31,7 @@ libpolkit_backend_1_la_SOURCES = \
+ polkitbackend.h \
+ polkitbackendtypes.h \
+ polkitbackendprivate.h \
++ polkitbackendcommon.h polkitbackendcommon.c \
+ polkitbackendauthority.h polkitbackendauthority.c \
+ polkitbackendinteractiveauthority.h polkitbackendinteractiveauthority.c \
+ polkitbackendjsauthority.h \
+diff --git a/src/polkitbackend/meson.build b/src/polkitbackend/meson.build
+index 489897d..9ec01b2 100644
+--- a/src/polkitbackend/meson.build
++++ b/src/polkitbackend/meson.build
+@@ -4,6 +4,7 @@ sources = files(
+ 'polkitbackendactionlookup.c',
+ 'polkitbackendactionpool.c',
+ 'polkitbackendauthority.c',
++ 'polkitbackendcommon.c',
+ 'polkitbackendinteractiveauthority.c',
+ )
+
+diff --git a/src/polkitbackend/polkitbackendcommon.c b/src/polkitbackend/polkitbackendcommon.c
+new file mode 100644
+index 0000000..6783dff
+--- /dev/null
++++ b/src/polkitbackend/polkitbackendcommon.c
+@@ -0,0 +1,530 @@
++/*
++ * Copyright (C) 2008 Red Hat, Inc.
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General
++ * Public License along with this library; if not, write to the
++ * Free Software Foundation, Inc., 59 Temple Place, Suite 330,
++ * Boston, MA 02111-1307, USA.
++ *
++ * Author: David Zeuthen <davidz@redhat.com>
++ */
++
++#include "polkitbackendcommon.h"
++
++static void
++utils_child_watch_from_release_cb (GPid pid,
++ gint status,
++ gpointer user_data)
++{
++}
++
++static void
++utils_spawn_data_free (UtilsSpawnData *data)
++{
++ if (data->timeout_source != NULL)
++ {
++ g_source_destroy (data->timeout_source);
++ data->timeout_source = NULL;
++ }
++
++ /* Nuke the child, if necessary */
++ if (data->child_watch_source != NULL)
++ {
++ g_source_destroy (data->child_watch_source);
++ data->child_watch_source = NULL;
++ }
++
++ if (data->child_pid != 0)
++ {
++ GSource *source;
++ kill (data->child_pid, SIGTERM);
++ /* OK, we need to reap for the child ourselves - we don't want
++ * to use waitpid() because that might block the calling
++ * thread (the child might handle SIGTERM and use several
++ * seconds for cleanup/rollback).
++ *
++ * So we use GChildWatch instead.
++ *
++ * Avoid taking a references to ourselves. but note that we need
++ * to pass the GSource so we can nuke it once handled.
++ */
++ source = g_child_watch_source_new (data->child_pid);
++ g_source_set_callback (source,
++ (GSourceFunc) utils_child_watch_from_release_cb,
++ source,
++ (GDestroyNotify) g_source_destroy);
++ g_source_attach (source, data->main_context);
++ g_source_unref (source);
++ data->child_pid = 0;
++ }
++
++ if (data->child_stdout != NULL)
++ {
++ g_string_free (data->child_stdout, TRUE);
++ data->child_stdout = NULL;
++ }
++
++ if (data->child_stderr != NULL)
++ {
++ g_string_free (data->child_stderr, TRUE);
++ data->child_stderr = NULL;
++ }
++
++ if (data->child_stdout_channel != NULL)
++ {
++ g_io_channel_unref (data->child_stdout_channel);
++ data->child_stdout_channel = NULL;
++ }
++ if (data->child_stderr_channel != NULL)
++ {
++ g_io_channel_unref (data->child_stderr_channel);
++ data->child_stderr_channel = NULL;
++ }
++
++ if (data->child_stdout_source != NULL)
++ {
++ g_source_destroy (data->child_stdout_source);
++ data->child_stdout_source = NULL;
++ }
++ if (data->child_stderr_source != NULL)
++ {
++ g_source_destroy (data->child_stderr_source);
++ data->child_stderr_source = NULL;
++ }
++
++ if (data->child_stdout_fd != -1)
++ {
++ g_warn_if_fail (close (data->child_stdout_fd) == 0);
++ data->child_stdout_fd = -1;
++ }
++ if (data->child_stderr_fd != -1)
++ {
++ g_warn_if_fail (close (data->child_stderr_fd) == 0);
++ data->child_stderr_fd = -1;
++ }
++
++ if (data->cancellable_handler_id > 0)
++ {
++ g_cancellable_disconnect (data->cancellable, data->cancellable_handler_id);
++ data->cancellable_handler_id = 0;
++ }
++
++ if (data->main_context != NULL)
++ g_main_context_unref (data->main_context);
++
++ if (data->cancellable != NULL)
++ g_object_unref (data->cancellable);
++
++ g_slice_free (UtilsSpawnData, data);
++}
++
++/* called in the thread where @cancellable was cancelled */
++static void
++utils_on_cancelled (GCancellable *cancellable,
++ gpointer user_data)
++{
++ UtilsSpawnData *data = (UtilsSpawnData *)user_data;
++ GError *error;
++
++ error = NULL;
++ g_warn_if_fail (g_cancellable_set_error_if_cancelled (cancellable, &error));
++ g_simple_async_result_take_error (data->simple, error);
++ g_simple_async_result_complete_in_idle (data->simple);
++ g_object_unref (data->simple);
++}
++
++static gboolean
++utils_timeout_cb (gpointer user_data)
++{
++ UtilsSpawnData *data = (UtilsSpawnData *)user_data;
++
++ data->timed_out = TRUE;
++
++ /* ok, timeout is history, make sure we don't free it in spawn_data_free() */
++ data->timeout_source = NULL;
++
++ /* we're done */
++ g_simple_async_result_complete_in_idle (data->simple);
++ g_object_unref (data->simple);
++
++ return FALSE; /* remove source */
++}
++
++static void
++utils_child_watch_cb (GPid pid,
++ gint status,
++ gpointer user_data)
++{
++ UtilsSpawnData *data = (UtilsSpawnData *)user_data;
++ gchar *buf;
++ gsize buf_size;
++
++ if (g_io_channel_read_to_end (data->child_stdout_channel, &buf, &buf_size, NULL) == G_IO_STATUS_NORMAL)
++ {
++ g_string_append_len (data->child_stdout, buf, buf_size);
++ g_free (buf);
++ }
++ if (g_io_channel_read_to_end (data->child_stderr_channel, &buf, &buf_size, NULL) == G_IO_STATUS_NORMAL)
++ {
++ g_string_append_len (data->child_stderr, buf, buf_size);
++ g_free (buf);
++ }
++
++ data->exit_status = status;
++
++ /* ok, child watch is history, make sure we don't free it in spawn_data_free() */
++ data->child_pid = 0;
++ data->child_watch_source = NULL;
++
++ /* we're done */
++ g_simple_async_result_complete_in_idle (data->simple);
++ g_object_unref (data->simple);
++}
++
++static gboolean
++utils_read_child_stderr (GIOChannel *channel,
++ GIOCondition condition,
++ gpointer user_data)
++{
++ UtilsSpawnData *data = (UtilsSpawnData *)user_data;
++ gchar buf[1024];
++ gsize bytes_read;
++
++ g_io_channel_read_chars (channel, buf, sizeof buf, &bytes_read, NULL);
++ g_string_append_len (data->child_stderr, buf, bytes_read);
++ return TRUE;
++}
++
++static gboolean
++utils_read_child_stdout (GIOChannel *channel,
++ GIOCondition condition,
++ gpointer user_data)
++{
++ UtilsSpawnData *data = (UtilsSpawnData *)user_data;
++ gchar buf[1024];
++ gsize bytes_read;
++
++ g_io_channel_read_chars (channel, buf, sizeof buf, &bytes_read, NULL);
++ g_string_append_len (data->child_stdout, buf, bytes_read);
++ return TRUE;
++}
++
++void
++polkit_backend_common_spawn (const gchar *const *argv,
++ guint timeout_seconds,
++ GCancellable *cancellable,
++ GAsyncReadyCallback callback,
++ gpointer user_data)
++{
++ UtilsSpawnData *data;
++ GError *error;
++
++ data = g_slice_new0 (UtilsSpawnData);
++ data->timeout_seconds = timeout_seconds;
++ data->simple = g_simple_async_result_new (NULL,
++ callback,
++ user_data,
++ (gpointer*)polkit_backend_common_spawn);
++ data->main_context = g_main_context_get_thread_default ();
++ if (data->main_context != NULL)
++ g_main_context_ref (data->main_context);
++
++ data->cancellable = cancellable != NULL ? (GCancellable*)g_object_ref (cancellable) : NULL;
++
++ data->child_stdout = g_string_new (NULL);
++ data->child_stderr = g_string_new (NULL);
++ data->child_stdout_fd = -1;
++ data->child_stderr_fd = -1;
++
++ /* the life-cycle of UtilsSpawnData is tied to its GSimpleAsyncResult */
++ g_simple_async_result_set_op_res_gpointer (data->simple, data, (GDestroyNotify) utils_spawn_data_free);
++
++ error = NULL;
++ if (data->cancellable != NULL)
++ {
++ /* could already be cancelled */
++ error = NULL;
++ if (g_cancellable_set_error_if_cancelled (data->cancellable, &error))
++ {
++ g_simple_async_result_take_error (data->simple, error);
++ g_simple_async_result_complete_in_idle (data->simple);
++ g_object_unref (data->simple);
++ goto out;
++ }
++
++ data->cancellable_handler_id = g_cancellable_connect (data->cancellable,
++ G_CALLBACK (utils_on_cancelled),
++ data,
++ NULL);
++ }
++
++ error = NULL;
++ if (!g_spawn_async_with_pipes (NULL, /* working directory */
++ (gchar **) argv,
++ NULL, /* envp */
++ G_SPAWN_SEARCH_PATH | G_SPAWN_DO_NOT_REAP_CHILD,
++ NULL, /* child_setup */
++ NULL, /* child_setup's user_data */
++ &(data->child_pid),
++ NULL, /* gint *stdin_fd */
++ &(data->child_stdout_fd),
++ &(data->child_stderr_fd),
++ &error))
++ {
++ g_prefix_error (&error, "Error spawning: ");
++ g_simple_async_result_take_error (data->simple, error);
++ g_simple_async_result_complete_in_idle (data->simple);
++ g_object_unref (data->simple);
++ goto out;
++ }
++
++ if (timeout_seconds > 0)
++ {
++ data->timeout_source = g_timeout_source_new_seconds (timeout_seconds);
++ g_source_set_priority (data->timeout_source, G_PRIORITY_DEFAULT);
++ g_source_set_callback (data->timeout_source, utils_timeout_cb, data, NULL);
++ g_source_attach (data->timeout_source, data->main_context);
++ g_source_unref (data->timeout_source);
++ }
++
++ data->child_watch_source = g_child_watch_source_new (data->child_pid);
++ g_source_set_callback (data->child_watch_source, (GSourceFunc) utils_child_watch_cb, data, NULL);
++ g_source_attach (data->child_watch_source, data->main_context);
++ g_source_unref (data->child_watch_source);
++
++ data->child_stdout_channel = g_io_channel_unix_new (data->child_stdout_fd);
++ g_io_channel_set_flags (data->child_stdout_channel, G_IO_FLAG_NONBLOCK, NULL);
++ data->child_stdout_source = g_io_create_watch (data->child_stdout_channel, G_IO_IN);
++ g_source_set_callback (data->child_stdout_source, (GSourceFunc) utils_read_child_stdout, data, NULL);
++ g_source_attach (data->child_stdout_source, data->main_context);
++ g_source_unref (data->child_stdout_source);
++
++ data->child_stderr_channel = g_io_channel_unix_new (data->child_stderr_fd);
++ g_io_channel_set_flags (data->child_stderr_channel, G_IO_FLAG_NONBLOCK, NULL);
++ data->child_stderr_source = g_io_create_watch (data->child_stderr_channel, G_IO_IN);
++ g_source_set_callback (data->child_stderr_source, (GSourceFunc) utils_read_child_stderr, data, NULL);
++ g_source_attach (data->child_stderr_source, data->main_context);
++ g_source_unref (data->child_stderr_source);
++
++ out:
++ ;
++}
++
++void
++polkit_backend_common_on_dir_monitor_changed (GFileMonitor *monitor,
++ GFile *file,
++ GFile *other_file,
++ GFileMonitorEvent event_type,
++ gpointer user_data)
++{
++ PolkitBackendJsAuthority *authority = POLKIT_BACKEND_JS_AUTHORITY (user_data);
++
++ /* TODO: maybe rate-limit so storms of events are collapsed into one with a 500ms resolution?
++ * Because when editing a file with emacs we get 4-8 events..
++ */
++
++ if (file != NULL)
++ {
++ gchar *name;
++
++ name = g_file_get_basename (file);
++
++ /* g_print ("event_type=%d file=%p name=%s\n", event_type, file, name); */
++ if (!g_str_has_prefix (name, ".") &&
++ !g_str_has_prefix (name, "#") &&
++ g_str_has_suffix (name, ".rules") &&
++ (event_type == G_FILE_MONITOR_EVENT_CREATED ||
++ event_type == G_FILE_MONITOR_EVENT_DELETED ||
++ event_type == G_FILE_MONITOR_EVENT_CHANGES_DONE_HINT))
++ {
++ polkit_backend_authority_log (POLKIT_BACKEND_AUTHORITY (authority),
++ "Reloading rules");
++ polkit_backend_common_reload_scripts (authority);
++ }
++ g_free (name);
++ }
++}
++
++gboolean
++polkit_backend_common_spawn_finish (GAsyncResult *res,
++ gint *out_exit_status,
++ gchar **out_standard_output,
++ gchar **out_standard_error,
++ GError **error)
++{
++ GSimpleAsyncResult *simple = G_SIMPLE_ASYNC_RESULT (res);
++ UtilsSpawnData *data;
++ gboolean ret = FALSE;
++
++ g_return_val_if_fail (G_IS_ASYNC_RESULT (res), FALSE);
++ g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
++
++ g_warn_if_fail (g_simple_async_result_get_source_tag (simple) == polkit_backend_common_spawn);
++
++ if (g_simple_async_result_propagate_error (simple, error))
++ goto out;
++
++ data = (UtilsSpawnData*)g_simple_async_result_get_op_res_gpointer (simple);
++
++ if (data->timed_out)
++ {
++ g_set_error (error,
++ G_IO_ERROR,
++ G_IO_ERROR_TIMED_OUT,
++ "Timed out after %d seconds",
++ data->timeout_seconds);
++ goto out;
++ }
++
++ if (out_exit_status != NULL)
++ *out_exit_status = data->exit_status;
++
++ if (out_standard_output != NULL)
++ *out_standard_output = g_strdup (data->child_stdout->str);
++
++ if (out_standard_error != NULL)
++ *out_standard_error = g_strdup (data->child_stderr->str);
++
++ ret = TRUE;
++
++ out:
++ return ret;
++}
++
++static const gchar *
++polkit_backend_js_authority_get_name (PolkitBackendAuthority *authority)
++{
++ return "js";
++}
++
++static const gchar *
++polkit_backend_js_authority_get_version (PolkitBackendAuthority *authority)
++{
++ return PACKAGE_VERSION;
++}
++
++static PolkitAuthorityFeatures
++polkit_backend_js_authority_get_features (PolkitBackendAuthority *authority)
++{
++ return POLKIT_AUTHORITY_FEATURES_TEMPORARY_AUTHORIZATION;
++}
++
++void
++polkit_backend_common_js_authority_class_init_common (PolkitBackendJsAuthorityClass *klass)
++{
++ GObjectClass *gobject_class;
++ PolkitBackendAuthorityClass *authority_class;
++ PolkitBackendInteractiveAuthorityClass *interactive_authority_class;
++
++ gobject_class = G_OBJECT_CLASS (klass);
++ gobject_class->finalize = polkit_backend_common_js_authority_finalize;
++ gobject_class->set_property = polkit_backend_common_js_authority_set_property;
++ gobject_class->constructed = polkit_backend_common_js_authority_constructed;
++
++ authority_class = POLKIT_BACKEND_AUTHORITY_CLASS (klass);
++ authority_class->get_name = polkit_backend_js_authority_get_name;
++ authority_class->get_version = polkit_backend_js_authority_get_version;
++ authority_class->get_features = polkit_backend_js_authority_get_features;
++
++ interactive_authority_class = POLKIT_BACKEND_INTERACTIVE_AUTHORITY_CLASS (klass);
++ interactive_authority_class->get_admin_identities = polkit_backend_common_js_authority_get_admin_auth_identities;
++ interactive_authority_class->check_authorization_sync = polkit_backend_common_js_authority_check_authorization_sync;
++
++ g_object_class_install_property (gobject_class,
++ PROP_RULES_DIRS,
++ g_param_spec_boxed ("rules-dirs",
++ NULL,
++ NULL,
++ G_TYPE_STRV,
++ G_PARAM_CONSTRUCT_ONLY | G_PARAM_WRITABLE));
++}
++
++gint
++polkit_backend_common_rules_file_name_cmp (const gchar *a,
++ const gchar *b)
++{
++ gint ret;
++ const gchar *a_base;
++ const gchar *b_base;
++
++ a_base = strrchr (a, '/');
++ b_base = strrchr (b, '/');
++
++ g_assert (a_base != NULL);
++ g_assert (b_base != NULL);
++ a_base += 1;
++ b_base += 1;
++
++ ret = g_strcmp0 (a_base, b_base);
++ if (ret == 0)
++ {
++ /* /etc wins over /usr */
++ ret = g_strcmp0 (a, b);
++ g_assert (ret != 0);
++ }
++
++ return ret;
++}
++
++const gchar *
++polkit_backend_common_get_signal_name (gint signal_number)
++{
++ switch (signal_number)
++ {
++#define _HANDLE_SIG(sig) case sig: return #sig;
++ _HANDLE_SIG (SIGHUP);
++ _HANDLE_SIG (SIGINT);
++ _HANDLE_SIG (SIGQUIT);
++ _HANDLE_SIG (SIGILL);
++ _HANDLE_SIG (SIGABRT);
++ _HANDLE_SIG (SIGFPE);
++ _HANDLE_SIG (SIGKILL);
++ _HANDLE_SIG (SIGSEGV);
++ _HANDLE_SIG (SIGPIPE);
++ _HANDLE_SIG (SIGALRM);
++ _HANDLE_SIG (SIGTERM);
++ _HANDLE_SIG (SIGUSR1);
++ _HANDLE_SIG (SIGUSR2);
++ _HANDLE_SIG (SIGCHLD);
++ _HANDLE_SIG (SIGCONT);
++ _HANDLE_SIG (SIGSTOP);
++ _HANDLE_SIG (SIGTSTP);
++ _HANDLE_SIG (SIGTTIN);
++ _HANDLE_SIG (SIGTTOU);
++ _HANDLE_SIG (SIGBUS);
++#ifdef SIGPOLL
++ _HANDLE_SIG (SIGPOLL);
++#endif
++ _HANDLE_SIG (SIGPROF);
++ _HANDLE_SIG (SIGSYS);
++ _HANDLE_SIG (SIGTRAP);
++ _HANDLE_SIG (SIGURG);
++ _HANDLE_SIG (SIGVTALRM);
++ _HANDLE_SIG (SIGXCPU);
++ _HANDLE_SIG (SIGXFSZ);
++#undef _HANDLE_SIG
++ default:
++ break;
++ }
++ return "UNKNOWN_SIGNAL";
++}
++
++void
++polkit_backend_common_spawn_cb (GObject *source_object,
++ GAsyncResult *res,
++ gpointer user_data)
++{
++ SpawnData *data = (SpawnData *)user_data;
++ data->res = (GAsyncResult*)g_object_ref (res);
++ g_main_loop_quit (data->loop);
++}
+diff --git a/src/polkitbackend/polkitbackendcommon.h b/src/polkitbackend/polkitbackendcommon.h
+new file mode 100644
+index 0000000..6d0d267
+--- /dev/null
++++ b/src/polkitbackend/polkitbackendcommon.h
+@@ -0,0 +1,156 @@
++/*
++ * Copyright (C) 2008 Red Hat, Inc.
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General
++ * Public License along with this library; if not, write to the
++ * Free Software Foundation, Inc., 59 Temple Place, Suite 330,
++ * Boston, MA 02111-1307, USA.
++ *
++ * Author: David Zeuthen <davidz@redhat.com>
++ */
++
++#if !defined (_POLKIT_BACKEND_COMPILATION) && !defined(_POLKIT_BACKEND_INSIDE_POLKIT_BACKEND_H)
++#error "Only <polkitbackend/polkitbackend.h> can be included directly, this file may disappear or change contents."
++#endif
++
++#ifndef __POLKIT_BACKEND_COMMON_H
++#define __POLKIT_BACKEND_COMMON_H
++
++#include "config.h"
++#include <sys/wait.h>
++#include <errno.h>
++#include <pwd.h>
++#include <grp.h>
++#ifdef HAVE_NETGROUP_H
++#include <netgroup.h>
++#else
++#include <netdb.h>
++#endif
++#include <string.h>
++#include <glib/gstdio.h>
++#include <locale.h>
++#include <glib/gi18n-lib.h> //here, all things glib via glib.h (including -> gspawn.h)
++
++#include <polkit/polkit.h>
++#include "polkitbackendjsauthority.h"
++
++#include <polkit/polkitprivate.h>
++
++#ifdef HAVE_LIBSYSTEMD
++#include <systemd/sd-login.h>
++#endif /* HAVE_LIBSYSTEMD */
++
++#ifdef __cplusplus
++extern "C" {
++#endif
++
++enum
++{
++ PROP_0,
++ PROP_RULES_DIRS,
++};
++
++typedef struct
++{
++ GSimpleAsyncResult *simple; /* borrowed reference */
++ GMainContext *main_context; /* may be NULL */
++
++ GCancellable *cancellable; /* may be NULL */
++ gulong cancellable_handler_id;
++
++ GPid child_pid;
++ gint child_stdout_fd;
++ gint child_stderr_fd;
++
++ GIOChannel *child_stdout_channel;
++ GIOChannel *child_stderr_channel;
++
++ GSource *child_watch_source;
++ GSource *child_stdout_source;
++ GSource *child_stderr_source;
++
++ guint timeout_seconds;
++ gboolean timed_out;
++ GSource *timeout_source;
++
++ GString *child_stdout;
++ GString *child_stderr;
++
++ gint exit_status;
++} UtilsSpawnData;
++
++typedef struct
++{
++ GMainLoop *loop;
++ GAsyncResult *res;
++} SpawnData;
++
++void polkit_backend_common_spawn (const gchar *const *argv,
++ guint timeout_seconds,
++ GCancellable *cancellable,
++ GAsyncReadyCallback callback,
++ gpointer user_data);
++void polkit_backend_common_spawn_cb (GObject *source_object,
++ GAsyncResult *res,
++ gpointer user_data);
++gboolean polkit_backend_common_spawn_finish (GAsyncResult *res,
++ gint *out_exit_status,
++ gchar **out_standard_output,
++ gchar **out_standard_error,
++ GError **error);
++
++void polkit_backend_common_on_dir_monitor_changed (GFileMonitor *monitor,
++ GFile *file,
++ GFile *other_file,
++ GFileMonitorEvent event_type,
++ gpointer user_data);
++
++void polkit_backend_common_js_authority_class_init_common (PolkitBackendJsAuthorityClass *klass);
++
++gint polkit_backend_common_rules_file_name_cmp (const gchar *a,
++ const gchar *b);
++
++const gchar *polkit_backend_common_get_signal_name (gint signal_number);
++
++/* To be provided by each JS backend, from here onwards ---------------------------------------------- */
++
++void polkit_backend_common_reload_scripts (PolkitBackendJsAuthority *authority);
++void polkit_backend_common_js_authority_finalize (GObject *object);
++void polkit_backend_common_js_authority_constructed (GObject *object);
++GList *polkit_backend_common_js_authority_get_admin_auth_identities (PolkitBackendInteractiveAuthority *_authority,
++ PolkitSubject *caller,
++ PolkitSubject *subject,
++ PolkitIdentity *user_for_subject,
++ gboolean subject_is_local,
++ gboolean subject_is_active,
++ const gchar *action_id,
++ PolkitDetails *details);
++void polkit_backend_common_js_authority_set_property (GObject *object,
++ guint property_id,
++ const GValue *value,
++ GParamSpec *pspec);
++PolkitImplicitAuthorization polkit_backend_common_js_authority_check_authorization_sync (PolkitBackendInteractiveAuthority *_authority,
++ PolkitSubject *caller,
++ PolkitSubject *subject,
++ PolkitIdentity *user_for_subject,
++ gboolean subject_is_local,
++ gboolean subject_is_active,
++ const gchar *action_id,
++ PolkitDetails *details,
++ PolkitImplicitAuthorization implicit);
++#ifdef __cplusplus
++}
++#endif
++
++#endif /* __POLKIT_BACKEND_COMMON_H */
++
+diff --git a/src/polkitbackend/polkitbackendduktapeauthority.c b/src/polkitbackend/polkitbackendduktapeauthority.c
+index 4b4f8fd..a2b4420 100644
+--- a/src/polkitbackend/polkitbackendduktapeauthority.c
++++ b/src/polkitbackend/polkitbackendduktapeauthority.c
+@@ -21,32 +21,12 @@
+ * Author: David Zeuthen <davidz@redhat.com>
+ */
+
+-#include "config.h"
+-#include <sys/wait.h>
+-#include <errno.h>
+-#include <pwd.h>
+-#include <grp.h>
+-#ifdef HAVE_NETGROUP_H
+-#include <netgroup.h>
+-#else
+-#include <netdb.h>
+-#endif
+-#include <string.h>
+-#include <glib/gstdio.h>
+-#include <locale.h>
+-#include <glib/gi18n-lib.h>
+-
+-#include <polkit/polkit.h>
+-#include "polkitbackendjsauthority.h"
+-
+-#include <polkit/polkitprivate.h>
++#include "polkitbackendcommon.h"
+
+-#ifdef HAVE_LIBSYSTEMD
+-#include <systemd/sd-login.h>
+-#endif /* HAVE_LIBSYSTEMD */
++#include "duktape.h"
+
++/* Built source and not too big to worry about deduplication */
+ #include "initjs.h" /* init.js */
+-#include "duktape.h"
+
+ /**
+ * SECTION:polkitbackendjsauthority
+@@ -54,10 +34,9 @@
+ * @short_description: JS Authority
+ * @stability: Unstable
+ *
+- * An implementation of #PolkitBackendAuthority that reads and
+- * evalates Javascript files and supports interaction with
+- * authentication agents (virtue of being based on
+- * #PolkitBackendInteractiveAuthority).
++ * An (Duktape-based) implementation of #PolkitBackendAuthority that reads and
++ * evaluates Javascript files and supports interaction with authentication
++ * agents (virtue of being based on #PolkitBackendInteractiveAuthority).
+ */
+
+ /* ---------------------------------------------------------------------------------------------------- */
+@@ -66,64 +45,16 @@ struct _PolkitBackendJsAuthorityPrivate
+ {
+ gchar **rules_dirs;
+ GFileMonitor **dir_monitors; /* NULL-terminated array of GFileMonitor instances */
+- duk_context *cx;
+-};
+-
+-
+-static void utils_spawn (const gchar *const *argv,
+- guint timeout_seconds,
+- GCancellable *cancellable,
+- GAsyncReadyCallback callback,
+- gpointer user_data);
+-
+-gboolean utils_spawn_finish (GAsyncResult *res,
+- gint *out_exit_status,
+- gchar **out_standard_output,
+- gchar **out_standard_error,
+- GError **error);
+
+-static void on_dir_monitor_changed (GFileMonitor *monitor,
+- GFile *file,
+- GFile *other_file,
+- GFileMonitorEvent event_type,
+- gpointer user_data);
+-
+-/* ---------------------------------------------------------------------------------------------------- */
+-
+-enum
+-{
+- PROP_0,
+- PROP_RULES_DIRS,
++ duk_context *cx;
+ };
+
+ /* ---------------------------------------------------------------------------------------------------- */
+
+-static GList *polkit_backend_js_authority_get_admin_auth_identities (PolkitBackendInteractiveAuthority *authority,
+- PolkitSubject *caller,
+- PolkitSubject *subject,
+- PolkitIdentity *user_for_subject,
+- gboolean subject_is_local,
+- gboolean subject_is_active,
+- const gchar *action_id,
+- PolkitDetails *details);
+-
+-static PolkitImplicitAuthorization polkit_backend_js_authority_check_authorization_sync (
+- PolkitBackendInteractiveAuthority *authority,
+- PolkitSubject *caller,
+- PolkitSubject *subject,
+- PolkitIdentity *user_for_subject,
+- gboolean subject_is_local,
+- gboolean subject_is_active,
+- const gchar *action_id,
+- PolkitDetails *details,
+- PolkitImplicitAuthorization implicit);
+-
+ G_DEFINE_TYPE (PolkitBackendJsAuthority, polkit_backend_js_authority, POLKIT_BACKEND_TYPE_INTERACTIVE_AUTHORITY);
+
+ /* ---------------------------------------------------------------------------------------------------- */
+
+-/* ---------------------------------------------------------------------------------------------------- */
+-
+ static duk_ret_t js_polkit_log (duk_context *cx);
+ static duk_ret_t js_polkit_spawn (duk_context *cx);
+ static duk_ret_t js_polkit_user_is_in_netgroup (duk_context *cx);
+@@ -144,33 +75,6 @@ polkit_backend_js_authority_init (PolkitBackendJsAuthority *authority)
+ PolkitBackendJsAuthorityPrivate);
+ }
+
+-static gint
+-rules_file_name_cmp (const gchar *a,
+- const gchar *b)
+-{
+- gint ret;
+- const gchar *a_base;
+- const gchar *b_base;
+-
+- a_base = strrchr (a, '/');
+- b_base = strrchr (b, '/');
+-
+- g_assert (a_base != NULL);
+- g_assert (b_base != NULL);
+- a_base += 1;
+- b_base += 1;
+-
+- ret = g_strcmp0 (a_base, b_base);
+- if (ret == 0)
+- {
+- /* /etc wins over /usr */
+- ret = g_strcmp0 (a, b);
+- g_assert (ret != 0);
+- }
+-
+- return ret;
+-}
+-
+ static void
+ load_scripts (PolkitBackendJsAuthority *authority)
+ {
+@@ -214,7 +118,7 @@ load_scripts (PolkitBackendJsAuthority *authority)
+ }
+ }
+
+- files = g_list_sort (files, (GCompareFunc) rules_file_name_cmp);
++ files = g_list_sort (files, (GCompareFunc) polkit_backend_common_rules_file_name_cmp);
+
+ for (l = files; l != NULL; l = l->next)
+ {
+@@ -258,8 +162,8 @@ load_scripts (PolkitBackendJsAuthority *authority)
+ g_list_free_full (files, g_free);
+ }
+
+-static void
+-reload_scripts (PolkitBackendJsAuthority *authority)
++void
++polkit_backend_common_reload_scripts (PolkitBackendJsAuthority *authority)
+ {
+ duk_context *cx = authority->priv->cx;
+
+@@ -282,42 +186,6 @@ reload_scripts (PolkitBackendJsAuthority *authority)
+ g_signal_emit_by_name (authority, "changed");
+ }
+
+-static void
+-on_dir_monitor_changed (GFileMonitor *monitor,
+- GFile *file,
+- GFile *other_file,
+- GFileMonitorEvent event_type,
+- gpointer user_data)
+-{
+- PolkitBackendJsAuthority *authority = POLKIT_BACKEND_JS_AUTHORITY (user_data);
+-
+- /* TODO: maybe rate-limit so storms of events are collapsed into one with a 500ms resolution?
+- * Because when editing a file with emacs we get 4-8 events..
+- */
+-
+- if (file != NULL)
+- {
+- gchar *name;
+-
+- name = g_file_get_basename (file);
+-
+- /* g_print ("event_type=%d file=%p name=%s\n", event_type, file, name); */
+- if (!g_str_has_prefix (name, ".") &&
+- !g_str_has_prefix (name, "#") &&
+- g_str_has_suffix (name, ".rules") &&
+- (event_type == G_FILE_MONITOR_EVENT_CREATED ||
+- event_type == G_FILE_MONITOR_EVENT_DELETED ||
+- event_type == G_FILE_MONITOR_EVENT_CHANGES_DONE_HINT))
+- {
+- polkit_backend_authority_log (POLKIT_BACKEND_AUTHORITY (authority),
+- "Reloading rules");
+- reload_scripts (authority);
+- }
+- g_free (name);
+- }
+-}
+-
+-
+ static void
+ setup_file_monitors (PolkitBackendJsAuthority *authority)
+ {
+@@ -349,7 +217,7 @@ setup_file_monitors (PolkitBackendJsAuthority *authority)
+ {
+ g_signal_connect (monitor,
+ "changed",
+- G_CALLBACK (on_dir_monitor_changed),
++ G_CALLBACK (polkit_backend_common_on_dir_monitor_changed),
+ authority);
+ g_ptr_array_add (p, monitor);
+ }
+@@ -358,8 +226,8 @@ setup_file_monitors (PolkitBackendJsAuthority *authority)
+ authority->priv->dir_monitors = (GFileMonitor**) g_ptr_array_free (p, FALSE);
+ }
+
+-static void
+-polkit_backend_js_authority_constructed (GObject *object)
++void
++polkit_backend_common_js_authority_constructed (GObject *object)
+ {
+ PolkitBackendJsAuthority *authority = POLKIT_BACKEND_JS_AUTHORITY (object);
+ duk_context *cx;
+@@ -395,8 +263,8 @@ polkit_backend_js_authority_constructed (GObject *object)
+ g_assert_not_reached ();
+ }
+
+-static void
+-polkit_backend_js_authority_finalize (GObject *object)
++void
++polkit_backend_common_js_authority_finalize (GObject *object)
+ {
+ PolkitBackendJsAuthority *authority = POLKIT_BACKEND_JS_AUTHORITY (object);
+ guint n;
+@@ -405,7 +273,7 @@ polkit_backend_js_authority_finalize (GObject *object)
+ {
+ GFileMonitor *monitor = authority->priv->dir_monitors[n];
+ g_signal_handlers_disconnect_by_func (monitor,
+- G_CALLBACK (on_dir_monitor_changed),
++ G_CALLBACK (polkit_backend_common_on_dir_monitor_changed),
+ authority);
+ g_object_unref (monitor);
+ }
+@@ -417,11 +285,11 @@ polkit_backend_js_authority_finalize (GObject *object)
+ G_OBJECT_CLASS (polkit_backend_js_authority_parent_class)->finalize (object);
+ }
+
+-static void
+-polkit_backend_js_authority_set_property (GObject *object,
+- guint property_id,
+- const GValue *value,
+- GParamSpec *pspec)
++void
++polkit_backend_common_js_authority_set_property (GObject *object,
++ guint property_id,
++ const GValue *value,
++ GParamSpec *pspec)
+ {
+ PolkitBackendJsAuthority *authority = POLKIT_BACKEND_JS_AUTHORITY (object);
+
+@@ -438,55 +306,10 @@ polkit_backend_js_authority_set_property (GObject *object,
+ }
+ }
+
+-static const gchar *
+-polkit_backend_js_authority_get_name (PolkitBackendAuthority *authority)
+-{
+- return "js";
+-}
+-
+-static const gchar *
+-polkit_backend_js_authority_get_version (PolkitBackendAuthority *authority)
+-{
+- return PACKAGE_VERSION;
+-}
+-
+-static PolkitAuthorityFeatures
+-polkit_backend_js_authority_get_features (PolkitBackendAuthority *authority)
+-{
+- return POLKIT_AUTHORITY_FEATURES_TEMPORARY_AUTHORIZATION;
+-}
+-
+ static void
+ polkit_backend_js_authority_class_init (PolkitBackendJsAuthorityClass *klass)
+ {
+- GObjectClass *gobject_class;
+- PolkitBackendAuthorityClass *authority_class;
+- PolkitBackendInteractiveAuthorityClass *interactive_authority_class;
+-
+-
+- gobject_class = G_OBJECT_CLASS (klass);
+- gobject_class->finalize = polkit_backend_js_authority_finalize;
+- gobject_class->set_property = polkit_backend_js_authority_set_property;
+- gobject_class->constructed = polkit_backend_js_authority_constructed;
+-
+- authority_class = POLKIT_BACKEND_AUTHORITY_CLASS (klass);
+- authority_class->get_name = polkit_backend_js_authority_get_name;
+- authority_class->get_version = polkit_backend_js_authority_get_version;
+- authority_class->get_features = polkit_backend_js_authority_get_features;
+-
+- interactive_authority_class = POLKIT_BACKEND_INTERACTIVE_AUTHORITY_CLASS (klass);
+- interactive_authority_class->get_admin_identities = polkit_backend_js_authority_get_admin_auth_identities;
+- interactive_authority_class->check_authorization_sync = polkit_backend_js_authority_check_authorization_sync;
+-
+- g_object_class_install_property (gobject_class,
+- PROP_RULES_DIRS,
+- g_param_spec_boxed ("rules-dirs",
+- NULL,
+- NULL,
+- G_TYPE_STRV,
+- G_PARAM_CONSTRUCT_ONLY | G_PARAM_WRITABLE));
+-
+-
++ polkit_backend_common_js_authority_class_init_common (klass);
+ g_type_class_add_private (klass, sizeof (PolkitBackendJsAuthorityPrivate));
+ }
+
+@@ -689,15 +512,15 @@ push_action_and_details (duk_context *cx,
+
+ /* ---------------------------------------------------------------------------------------------------- */
+
+-static GList *
+-polkit_backend_js_authority_get_admin_auth_identities (PolkitBackendInteractiveAuthority *_authority,
+- PolkitSubject *caller,
+- PolkitSubject *subject,
+- PolkitIdentity *user_for_subject,
+- gboolean subject_is_local,
+- gboolean subject_is_active,
+- const gchar *action_id,
+- PolkitDetails *details)
++GList *
++polkit_backend_common_js_authority_get_admin_auth_identities (PolkitBackendInteractiveAuthority *_authority,
++ PolkitSubject *caller,
++ PolkitSubject *subject,
++ PolkitIdentity *user_for_subject,
++ gboolean subject_is_local,
++ gboolean subject_is_active,
++ const gchar *action_id,
++ PolkitDetails *details)
+ {
+ PolkitBackendJsAuthority *authority = POLKIT_BACKEND_JS_AUTHORITY (_authority);
+ GList *ret = NULL;
+@@ -777,16 +600,16 @@ polkit_backend_js_authority_get_admin_auth_identities (PolkitBackendInteractiveA
+
+ /* ---------------------------------------------------------------------------------------------------- */
+
+-static PolkitImplicitAuthorization
+-polkit_backend_js_authority_check_authorization_sync (PolkitBackendInteractiveAuthority *_authority,
+- PolkitSubject *caller,
+- PolkitSubject *subject,
+- PolkitIdentity *user_for_subject,
+- gboolean subject_is_local,
+- gboolean subject_is_active,
+- const gchar *action_id,
+- PolkitDetails *details,
+- PolkitImplicitAuthorization implicit)
++PolkitImplicitAuthorization
++polkit_backend_common_js_authority_check_authorization_sync (PolkitBackendInteractiveAuthority *_authority,
++ PolkitSubject *caller,
++ PolkitSubject *subject,
++ PolkitIdentity *user_for_subject,
++ gboolean subject_is_local,
++ gboolean subject_is_active,
++ const gchar *action_id,
++ PolkitDetails *details,
++ PolkitImplicitAuthorization implicit)
+ {
+ PolkitBackendJsAuthority *authority = POLKIT_BACKEND_JS_AUTHORITY (_authority);
+ PolkitImplicitAuthorization ret = implicit;
+@@ -864,65 +687,6 @@ js_polkit_log (duk_context *cx)
+
+ /* ---------------------------------------------------------------------------------------------------- */
+
+-static const gchar *
+-get_signal_name (gint signal_number)
+-{
+- switch (signal_number)
+- {
+-#define _HANDLE_SIG(sig) case sig: return #sig;
+- _HANDLE_SIG (SIGHUP);
+- _HANDLE_SIG (SIGINT);
+- _HANDLE_SIG (SIGQUIT);
+- _HANDLE_SIG (SIGILL);
+- _HANDLE_SIG (SIGABRT);
+- _HANDLE_SIG (SIGFPE);
+- _HANDLE_SIG (SIGKILL);
+- _HANDLE_SIG (SIGSEGV);
+- _HANDLE_SIG (SIGPIPE);
+- _HANDLE_SIG (SIGALRM);
+- _HANDLE_SIG (SIGTERM);
+- _HANDLE_SIG (SIGUSR1);
+- _HANDLE_SIG (SIGUSR2);
+- _HANDLE_SIG (SIGCHLD);
+- _HANDLE_SIG (SIGCONT);
+- _HANDLE_SIG (SIGSTOP);
+- _HANDLE_SIG (SIGTSTP);
+- _HANDLE_SIG (SIGTTIN);
+- _HANDLE_SIG (SIGTTOU);
+- _HANDLE_SIG (SIGBUS);
+-#ifdef SIGPOLL
+- _HANDLE_SIG (SIGPOLL);
+-#endif
+- _HANDLE_SIG (SIGPROF);
+- _HANDLE_SIG (SIGSYS);
+- _HANDLE_SIG (SIGTRAP);
+- _HANDLE_SIG (SIGURG);
+- _HANDLE_SIG (SIGVTALRM);
+- _HANDLE_SIG (SIGXCPU);
+- _HANDLE_SIG (SIGXFSZ);
+-#undef _HANDLE_SIG
+- default:
+- break;
+- }
+- return "UNKNOWN_SIGNAL";
+-}
+-
+-typedef struct
+-{
+- GMainLoop *loop;
+- GAsyncResult *res;
+-} SpawnData;
+-
+-static void
+-spawn_cb (GObject *source_object,
+- GAsyncResult *res,
+- gpointer user_data)
+-{
+- SpawnData *data = (SpawnData *)user_data;
+- data->res = (GAsyncResult*)g_object_ref (res);
+- g_main_loop_quit (data->loop);
+-}
+-
+ static duk_ret_t
+ js_polkit_spawn (duk_context *cx)
+ {
+@@ -962,21 +726,21 @@ js_polkit_spawn (duk_context *cx)
+ g_main_context_push_thread_default (context);
+
+ data.loop = loop;
+- utils_spawn ((const gchar *const *) argv,
+- 10, /* timeout_seconds */
+- NULL, /* cancellable */
+- spawn_cb,
+- &data);
++ polkit_backend_common_spawn ((const gchar *const *) argv,
++ 10, /* timeout_seconds */
++ NULL, /* cancellable */
++ polkit_backend_common_spawn_cb,
++ &data);
+
+ g_main_loop_run (loop);
+
+ g_main_context_pop_thread_default (context);
+
+- if (!utils_spawn_finish (data.res,
+- &exit_status,
+- &standard_output,
+- &standard_error,
+- &error))
++ if (!polkit_backend_common_spawn_finish (data.res,
++ &exit_status,
++ &standard_output,
++ &standard_error,
++ &error))
+ {
+ err_str = g_strdup_printf ("Error spawning helper: %s (%s, %d)",
+ error->message, g_quark_to_string (error->domain), error->code);
+@@ -998,7 +762,7 @@ js_polkit_spawn (duk_context *cx)
+ {
+ g_string_append_printf (gstr,
+ "Helper was signaled with signal %s (%d)",
+- get_signal_name (WTERMSIG (exit_status)),
++ polkit_backend_common_get_signal_name (WTERMSIG (exit_status)),
+ WTERMSIG (exit_status));
+ }
+ g_string_append_printf (gstr, ", stdout=`%s', stderr=`%s'",
+@@ -1052,377 +816,3 @@ js_polkit_user_is_in_netgroup (duk_context *cx)
+ }
+
+ /* ---------------------------------------------------------------------------------------------------- */
+-
+-typedef struct
+-{
+- GSimpleAsyncResult *simple; /* borrowed reference */
+- GMainContext *main_context; /* may be NULL */
+-
+- GCancellable *cancellable; /* may be NULL */
+- gulong cancellable_handler_id;
+-
+- GPid child_pid;
+- gint child_stdout_fd;
+- gint child_stderr_fd;
+-
+- GIOChannel *child_stdout_channel;
+- GIOChannel *child_stderr_channel;
+-
+- GSource *child_watch_source;
+- GSource *child_stdout_source;
+- GSource *child_stderr_source;
+-
+- guint timeout_seconds;
+- gboolean timed_out;
+- GSource *timeout_source;
+-
+- GString *child_stdout;
+- GString *child_stderr;
+-
+- gint exit_status;
+-} UtilsSpawnData;
+-
+-static void
+-utils_child_watch_from_release_cb (GPid pid,
+- gint status,
+- gpointer user_data)
+-{
+-}
+-
+-static void
+-utils_spawn_data_free (UtilsSpawnData *data)
+-{
+- if (data->timeout_source != NULL)
+- {
+- g_source_destroy (data->timeout_source);
+- data->timeout_source = NULL;
+- }
+-
+- /* Nuke the child, if necessary */
+- if (data->child_watch_source != NULL)
+- {
+- g_source_destroy (data->child_watch_source);
+- data->child_watch_source = NULL;
+- }
+-
+- if (data->child_pid != 0)
+- {
+- GSource *source;
+- kill (data->child_pid, SIGTERM);
+- /* OK, we need to reap for the child ourselves - we don't want
+- * to use waitpid() because that might block the calling
+- * thread (the child might handle SIGTERM and use several
+- * seconds for cleanup/rollback).
+- *
+- * So we use GChildWatch instead.
+- *
+- * Avoid taking a references to ourselves. but note that we need
+- * to pass the GSource so we can nuke it once handled.
+- */
+- source = g_child_watch_source_new (data->child_pid);
+- g_source_set_callback (source,
+- (GSourceFunc) utils_child_watch_from_release_cb,
+- source,
+- (GDestroyNotify) g_source_destroy);
+- g_source_attach (source, data->main_context);
+- g_source_unref (source);
+- data->child_pid = 0;
+- }
+-
+- if (data->child_stdout != NULL)
+- {
+- g_string_free (data->child_stdout, TRUE);
+- data->child_stdout = NULL;
+- }
+-
+- if (data->child_stderr != NULL)
+- {
+- g_string_free (data->child_stderr, TRUE);
+- data->child_stderr = NULL;
+- }
+-
+- if (data->child_stdout_channel != NULL)
+- {
+- g_io_channel_unref (data->child_stdout_channel);
+- data->child_stdout_channel = NULL;
+- }
+- if (data->child_stderr_channel != NULL)
+- {
+- g_io_channel_unref (data->child_stderr_channel);
+- data->child_stderr_channel = NULL;
+- }
+-
+- if (data->child_stdout_source != NULL)
+- {
+- g_source_destroy (data->child_stdout_source);
+- data->child_stdout_source = NULL;
+- }
+- if (data->child_stderr_source != NULL)
+- {
+- g_source_destroy (data->child_stderr_source);
+- data->child_stderr_source = NULL;
+- }
+-
+- if (data->child_stdout_fd != -1)
+- {
+- g_warn_if_fail (close (data->child_stdout_fd) == 0);
+- data->child_stdout_fd = -1;
+- }
+- if (data->child_stderr_fd != -1)
+- {
+- g_warn_if_fail (close (data->child_stderr_fd) == 0);
+- data->child_stderr_fd = -1;
+- }
+-
+- if (data->cancellable_handler_id > 0)
+- {
+- g_cancellable_disconnect (data->cancellable, data->cancellable_handler_id);
+- data->cancellable_handler_id = 0;
+- }
+-
+- if (data->main_context != NULL)
+- g_main_context_unref (data->main_context);
+-
+- if (data->cancellable != NULL)
+- g_object_unref (data->cancellable);
+-
+- g_slice_free (UtilsSpawnData, data);
+-}
+-
+-/* called in the thread where @cancellable was cancelled */
+-static void
+-utils_on_cancelled (GCancellable *cancellable,
+- gpointer user_data)
+-{
+- UtilsSpawnData *data = (UtilsSpawnData *)user_data;
+- GError *error;
+-
+- error = NULL;
+- g_warn_if_fail (g_cancellable_set_error_if_cancelled (cancellable, &error));
+- g_simple_async_result_take_error (data->simple, error);
+- g_simple_async_result_complete_in_idle (data->simple);
+- g_object_unref (data->simple);
+-}
+-
+-static gboolean
+-utils_read_child_stderr (GIOChannel *channel,
+- GIOCondition condition,
+- gpointer user_data)
+-{
+- UtilsSpawnData *data = (UtilsSpawnData *)user_data;
+- gchar buf[1024];
+- gsize bytes_read;
+-
+- g_io_channel_read_chars (channel, buf, sizeof buf, &bytes_read, NULL);
+- g_string_append_len (data->child_stderr, buf, bytes_read);
+- return TRUE;
+-}
+-
+-static gboolean
+-utils_read_child_stdout (GIOChannel *channel,
+- GIOCondition condition,
+- gpointer user_data)
+-{
+- UtilsSpawnData *data = (UtilsSpawnData *)user_data;
+- gchar buf[1024];
+- gsize bytes_read;
+-
+- g_io_channel_read_chars (channel, buf, sizeof buf, &bytes_read, NULL);
+- g_string_append_len (data->child_stdout, buf, bytes_read);
+- return TRUE;
+-}
+-
+-static void
+-utils_child_watch_cb (GPid pid,
+- gint status,
+- gpointer user_data)
+-{
+- UtilsSpawnData *data = (UtilsSpawnData *)user_data;
+- gchar *buf;
+- gsize buf_size;
+-
+- if (g_io_channel_read_to_end (data->child_stdout_channel, &buf, &buf_size, NULL) == G_IO_STATUS_NORMAL)
+- {
+- g_string_append_len (data->child_stdout, buf, buf_size);
+- g_free (buf);
+- }
+- if (g_io_channel_read_to_end (data->child_stderr_channel, &buf, &buf_size, NULL) == G_IO_STATUS_NORMAL)
+- {
+- g_string_append_len (data->child_stderr, buf, buf_size);
+- g_free (buf);
+- }
+-
+- data->exit_status = status;
+-
+- /* ok, child watch is history, make sure we don't free it in spawn_data_free() */
+- data->child_pid = 0;
+- data->child_watch_source = NULL;
+-
+- /* we're done */
+- g_simple_async_result_complete_in_idle (data->simple);
+- g_object_unref (data->simple);
+-}
+-
+-static gboolean
+-utils_timeout_cb (gpointer user_data)
+-{
+- UtilsSpawnData *data = (UtilsSpawnData *)user_data;
+-
+- data->timed_out = TRUE;
+-
+- /* ok, timeout is history, make sure we don't free it in spawn_data_free() */
+- data->timeout_source = NULL;
+-
+- /* we're done */
+- g_simple_async_result_complete_in_idle (data->simple);
+- g_object_unref (data->simple);
+-
+- return FALSE; /* remove source */
+-}
+-
+-static void
+-utils_spawn (const gchar *const *argv,
+- guint timeout_seconds,
+- GCancellable *cancellable,
+- GAsyncReadyCallback callback,
+- gpointer user_data)
+-{
+- UtilsSpawnData *data;
+- GError *error;
+-
+- data = g_slice_new0 (UtilsSpawnData);
+- data->timeout_seconds = timeout_seconds;
+- data->simple = g_simple_async_result_new (NULL,
+- callback,
+- user_data,
+- (gpointer*)utils_spawn);
+- data->main_context = g_main_context_get_thread_default ();
+- if (data->main_context != NULL)
+- g_main_context_ref (data->main_context);
+-
+- data->cancellable = cancellable != NULL ? (GCancellable*)g_object_ref (cancellable) : NULL;
+-
+- data->child_stdout = g_string_new (NULL);
+- data->child_stderr = g_string_new (NULL);
+- data->child_stdout_fd = -1;
+- data->child_stderr_fd = -1;
+-
+- /* the life-cycle of UtilsSpawnData is tied to its GSimpleAsyncResult */
+- g_simple_async_result_set_op_res_gpointer (data->simple, data, (GDestroyNotify) utils_spawn_data_free);
+-
+- error = NULL;
+- if (data->cancellable != NULL)
+- {
+- /* could already be cancelled */
+- error = NULL;
+- if (g_cancellable_set_error_if_cancelled (data->cancellable, &error))
+- {
+- g_simple_async_result_take_error (data->simple, error);
+- g_simple_async_result_complete_in_idle (data->simple);
+- g_object_unref (data->simple);
+- goto out;
+- }
+-
+- data->cancellable_handler_id = g_cancellable_connect (data->cancellable,
+- G_CALLBACK (utils_on_cancelled),
+- data,
+- NULL);
+- }
+-
+- error = NULL;
+- if (!g_spawn_async_with_pipes (NULL, /* working directory */
+- (gchar **) argv,
+- NULL, /* envp */
+- G_SPAWN_SEARCH_PATH | G_SPAWN_DO_NOT_REAP_CHILD,
+- NULL, /* child_setup */
+- NULL, /* child_setup's user_data */
+- &(data->child_pid),
+- NULL, /* gint *stdin_fd */
+- &(data->child_stdout_fd),
+- &(data->child_stderr_fd),
+- &error))
+- {
+- g_prefix_error (&error, "Error spawning: ");
+- g_simple_async_result_take_error (data->simple, error);
+- g_simple_async_result_complete_in_idle (data->simple);
+- g_object_unref (data->simple);
+- goto out;
+- }
+-
+- if (timeout_seconds > 0)
+- {
+- data->timeout_source = g_timeout_source_new_seconds (timeout_seconds);
+- g_source_set_priority (data->timeout_source, G_PRIORITY_DEFAULT);
+- g_source_set_callback (data->timeout_source, utils_timeout_cb, data, NULL);
+- g_source_attach (data->timeout_source, data->main_context);
+- g_source_unref (data->timeout_source);
+- }
+-
+- data->child_watch_source = g_child_watch_source_new (data->child_pid);
+- g_source_set_callback (data->child_watch_source, (GSourceFunc) utils_child_watch_cb, data, NULL);
+- g_source_attach (data->child_watch_source, data->main_context);
+- g_source_unref (data->child_watch_source);
+-
+- data->child_stdout_channel = g_io_channel_unix_new (data->child_stdout_fd);
+- g_io_channel_set_flags (data->child_stdout_channel, G_IO_FLAG_NONBLOCK, NULL);
+- data->child_stdout_source = g_io_create_watch (data->child_stdout_channel, G_IO_IN);
+- g_source_set_callback (data->child_stdout_source, (GSourceFunc) utils_read_child_stdout, data, NULL);
+- g_source_attach (data->child_stdout_source, data->main_context);
+- g_source_unref (data->child_stdout_source);
+-
+- data->child_stderr_channel = g_io_channel_unix_new (data->child_stderr_fd);
+- g_io_channel_set_flags (data->child_stderr_channel, G_IO_FLAG_NONBLOCK, NULL);
+- data->child_stderr_source = g_io_create_watch (data->child_stderr_channel, G_IO_IN);
+- g_source_set_callback (data->child_stderr_source, (GSourceFunc) utils_read_child_stderr, data, NULL);
+- g_source_attach (data->child_stderr_source, data->main_context);
+- g_source_unref (data->child_stderr_source);
+-
+- out:
+- ;
+-}
+-
+-gboolean
+-utils_spawn_finish (GAsyncResult *res,
+- gint *out_exit_status,
+- gchar **out_standard_output,
+- gchar **out_standard_error,
+- GError **error)
+-{
+- GSimpleAsyncResult *simple = G_SIMPLE_ASYNC_RESULT (res);
+- UtilsSpawnData *data;
+- gboolean ret = FALSE;
+-
+- g_return_val_if_fail (G_IS_ASYNC_RESULT (res), FALSE);
+- g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
+-
+- g_warn_if_fail (g_simple_async_result_get_source_tag (simple) == utils_spawn);
+-
+- if (g_simple_async_result_propagate_error (simple, error))
+- goto out;
+-
+- data = (UtilsSpawnData*)g_simple_async_result_get_op_res_gpointer (simple);
+-
+- if (data->timed_out)
+- {
+- g_set_error (error,
+- G_IO_ERROR,
+- G_IO_ERROR_TIMED_OUT,
+- "Timed out after %d seconds",
+- data->timeout_seconds);
+- goto out;
+- }
+-
+- if (out_exit_status != NULL)
+- *out_exit_status = data->exit_status;
+-
+- if (out_standard_output != NULL)
+- *out_standard_output = g_strdup (data->child_stdout->str);
+-
+- if (out_standard_error != NULL)
+- *out_standard_error = g_strdup (data->child_stderr->str);
+-
+- ret = TRUE;
+-
+- out:
+- return ret;
+-}
+diff --git a/src/polkitbackend/polkitbackendjsauthority.cpp b/src/polkitbackend/polkitbackendjsauthority.cpp
+index ca17108..e28091d 100644
+--- a/src/polkitbackend/polkitbackendjsauthority.cpp
++++ b/src/polkitbackend/polkitbackendjsauthority.cpp
+@@ -19,29 +19,7 @@
+ * Author: David Zeuthen <davidz@redhat.com>
+ */
+
+-#include "config.h"
+-#include <sys/wait.h>
+-#include <errno.h>
+-#include <pwd.h>
+-#include <grp.h>
+-#ifdef HAVE_NETGROUP_H
+-#include <netgroup.h>
+-#else
+-#include <netdb.h>
+-#endif
+-#include <string.h>
+-#include <glib/gstdio.h>
+-#include <locale.h>
+-#include <glib/gi18n-lib.h>
+-
+-#include <polkit/polkit.h>
+-#include "polkitbackendjsauthority.h"
+-
+-#include <polkit/polkitprivate.h>
+-
+-#ifdef HAVE_LIBSYSTEMD
+-#include <systemd/sd-login.h>
+-#endif /* HAVE_LIBSYSTEMD */
++#include "polkitbackendcommon.h"
+
+ #include <js/CompilationAndEvaluation.h>
+ #include <js/ContextOptions.h>
+@@ -52,6 +30,7 @@
+ #include <js/Array.h>
+ #include <jsapi.h>
+
++/* Built source and not too big to worry about deduplication */
+ #include "initjs.h" /* init.js */
+
+ #ifdef JSGC_USE_EXACT_ROOTING
+@@ -67,10 +46,9 @@
+ * @short_description: JS Authority
+ * @stability: Unstable
+ *
+- * An implementation of #PolkitBackendAuthority that reads and
+- * evalates Javascript files and supports interaction with
+- * authentication agents (virtue of being based on
+- * #PolkitBackendInteractiveAuthority).
++ * An (SpiderMonkey-based) implementation of #PolkitBackendAuthority that reads
++ * and evaluates Javascript files and supports interaction with authentication
++ * agents (virtue of being based on #PolkitBackendInteractiveAuthority).
+ */
+
+ /* ---------------------------------------------------------------------------------------------------- */
+@@ -100,57 +78,11 @@ static bool execute_script_with_runaway_killer (PolkitBackendJsAuthority *author
+ JS::HandleScript script,
+ JS::MutableHandleValue rval);
+
+-static void utils_spawn (const gchar *const *argv,
+- guint timeout_seconds,
+- GCancellable *cancellable,
+- GAsyncReadyCallback callback,
+- gpointer user_data);
+-
+-gboolean utils_spawn_finish (GAsyncResult *res,
+- gint *out_exit_status,
+- gchar **out_standard_output,
+- gchar **out_standard_error,
+- GError **error);
+-
+-static void on_dir_monitor_changed (GFileMonitor *monitor,
+- GFile *file,
+- GFile *other_file,
+- GFileMonitorEvent event_type,
+- gpointer user_data);
+-
+-/* ---------------------------------------------------------------------------------------------------- */
+-
+-enum
+-{
+- PROP_0,
+- PROP_RULES_DIRS,
+-};
+-
+ /* ---------------------------------------------------------------------------------------------------- */
+
+ static gpointer runaway_killer_thread_func (gpointer user_data);
+ static void runaway_killer_terminate (PolkitBackendJsAuthority *authority);
+
+-static GList *polkit_backend_js_authority_get_admin_auth_identities (PolkitBackendInteractiveAuthority *authority,
+- PolkitSubject *caller,
+- PolkitSubject *subject,
+- PolkitIdentity *user_for_subject,
+- gboolean subject_is_local,
+- gboolean subject_is_active,
+- const gchar *action_id,
+- PolkitDetails *details);
+-
+-static PolkitImplicitAuthorization polkit_backend_js_authority_check_authorization_sync (
+- PolkitBackendInteractiveAuthority *authority,
+- PolkitSubject *caller,
+- PolkitSubject *subject,
+- PolkitIdentity *user_for_subject,
+- gboolean subject_is_local,
+- gboolean subject_is_active,
+- const gchar *action_id,
+- PolkitDetails *details,
+- PolkitImplicitAuthorization implicit);
+-
+ G_DEFINE_TYPE (PolkitBackendJsAuthority, polkit_backend_js_authority, POLKIT_BACKEND_TYPE_INTERACTIVE_AUTHORITY);
+
+ /* ---------------------------------------------------------------------------------------------------- */
+@@ -229,33 +161,6 @@ polkit_backend_js_authority_init (PolkitBackendJsAuthority *authority)
+ PolkitBackendJsAuthorityPrivate);
+ }
+
+-static gint
+-rules_file_name_cmp (const gchar *a,
+- const gchar *b)
+-{
+- gint ret;
+- const gchar *a_base;
+- const gchar *b_base;
+-
+- a_base = strrchr (a, '/');
+- b_base = strrchr (b, '/');
+-
+- g_assert (a_base != NULL);
+- g_assert (b_base != NULL);
+- a_base += 1;
+- b_base += 1;
+-
+- ret = g_strcmp0 (a_base, b_base);
+- if (ret == 0)
+- {
+- /* /etc wins over /usr */
+- ret = g_strcmp0 (a, b);
+- g_assert (ret != 0);
+- }
+-
+- return ret;
+-}
+-
+ /* authority->priv->cx must be within a request */
+ static void
+ load_scripts (PolkitBackendJsAuthority *authority)
+@@ -299,7 +204,7 @@ load_scripts (PolkitBackendJsAuthority *authority)
+ }
+ }
+
+- files = g_list_sort (files, (GCompareFunc) rules_file_name_cmp);
++ files = g_list_sort (files, (GCompareFunc) polkit_backend_common_rules_file_name_cmp);
+
+ for (l = files; l != NULL; l = l->next)
+ {
+@@ -365,8 +270,8 @@ load_scripts (PolkitBackendJsAuthority *authority)
+ g_list_free_full (files, g_free);
+ }
+
+-static void
+-reload_scripts (PolkitBackendJsAuthority *authority)
++void
++polkit_backend_common_reload_scripts (PolkitBackendJsAuthority *authority)
+ {
+ JS::RootedValueArray<1> args(authority->priv->cx);
+ JS::RootedValue rval(authority->priv->cx);
+@@ -395,42 +300,6 @@ reload_scripts (PolkitBackendJsAuthority *authority)
+ g_signal_emit_by_name (authority, "changed");
+ }
+
+-static void
+-on_dir_monitor_changed (GFileMonitor *monitor,
+- GFile *file,
+- GFile *other_file,
+- GFileMonitorEvent event_type,
+- gpointer user_data)
+-{
+- PolkitBackendJsAuthority *authority = POLKIT_BACKEND_JS_AUTHORITY (user_data);
+-
+- /* TODO: maybe rate-limit so storms of events are collapsed into one with a 500ms resolution?
+- * Because when editing a file with emacs we get 4-8 events..
+- */
+-
+- if (file != NULL)
+- {
+- gchar *name;
+-
+- name = g_file_get_basename (file);
+-
+- /* g_print ("event_type=%d file=%p name=%s\n", event_type, file, name); */
+- if (!g_str_has_prefix (name, ".") &&
+- !g_str_has_prefix (name, "#") &&
+- g_str_has_suffix (name, ".rules") &&
+- (event_type == G_FILE_MONITOR_EVENT_CREATED ||
+- event_type == G_FILE_MONITOR_EVENT_DELETED ||
+- event_type == G_FILE_MONITOR_EVENT_CHANGES_DONE_HINT))
+- {
+- polkit_backend_authority_log (POLKIT_BACKEND_AUTHORITY (authority),
+- "Reloading rules");
+- reload_scripts (authority);
+- }
+- g_free (name);
+- }
+-}
+-
+-
+ static void
+ setup_file_monitors (PolkitBackendJsAuthority *authority)
+ {
+@@ -462,7 +331,7 @@ setup_file_monitors (PolkitBackendJsAuthority *authority)
+ {
+ g_signal_connect (monitor,
+ "changed",
+- G_CALLBACK (on_dir_monitor_changed),
++ G_CALLBACK (polkit_backend_common_on_dir_monitor_changed),
+ authority);
+ g_ptr_array_add (p, monitor);
+ }
+@@ -471,8 +340,8 @@ setup_file_monitors (PolkitBackendJsAuthority *authority)
+ authority->priv->dir_monitors = (GFileMonitor**) g_ptr_array_free (p, FALSE);
+ }
+
+-static void
+-polkit_backend_js_authority_constructed (GObject *object)
++void
++polkit_backend_common_js_authority_constructed (GObject *object)
+ {
+ PolkitBackendJsAuthority *authority = POLKIT_BACKEND_JS_AUTHORITY (object);
+
+@@ -561,8 +430,8 @@ polkit_backend_js_authority_constructed (GObject *object)
+ g_assert_not_reached ();
+ }
+
+-static void
+-polkit_backend_js_authority_finalize (GObject *object)
++void
++polkit_backend_common_js_authority_finalize (GObject *object)
+ {
+ PolkitBackendJsAuthority *authority = POLKIT_BACKEND_JS_AUTHORITY (object);
+ guint n;
+@@ -577,7 +446,7 @@ polkit_backend_js_authority_finalize (GObject *object)
+ {
+ GFileMonitor *monitor = authority->priv->dir_monitors[n];
+ g_signal_handlers_disconnect_by_func (monitor,
+- (gpointer*)G_CALLBACK (on_dir_monitor_changed),
++ (gpointer*)G_CALLBACK (polkit_backend_common_on_dir_monitor_changed),
+ authority);
+ g_object_unref (monitor);
+ }
+@@ -594,11 +463,11 @@ polkit_backend_js_authority_finalize (GObject *object)
+ G_OBJECT_CLASS (polkit_backend_js_authority_parent_class)->finalize (object);
+ }
+
+-static void
+-polkit_backend_js_authority_set_property (GObject *object,
+- guint property_id,
+- const GValue *value,
+- GParamSpec *pspec)
++void
++polkit_backend_common_js_authority_set_property (GObject *object,
++ guint property_id,
++ const GValue *value,
++ GParamSpec *pspec)
+ {
+ PolkitBackendJsAuthority *authority = POLKIT_BACKEND_JS_AUTHORITY (object);
+
+@@ -615,57 +484,12 @@ polkit_backend_js_authority_set_property (GObject *object,
+ }
+ }
+
+-static const gchar *
+-polkit_backend_js_authority_get_name (PolkitBackendAuthority *authority)
+-{
+- return "js";
+-}
+-
+-static const gchar *
+-polkit_backend_js_authority_get_version (PolkitBackendAuthority *authority)
+-{
+- return PACKAGE_VERSION;
+-}
+-
+-static PolkitAuthorityFeatures
+-polkit_backend_js_authority_get_features (PolkitBackendAuthority *authority)
+-{
+- return POLKIT_AUTHORITY_FEATURES_TEMPORARY_AUTHORIZATION;
+-}
+-
+ static void
+ polkit_backend_js_authority_class_init (PolkitBackendJsAuthorityClass *klass)
+ {
+- GObjectClass *gobject_class;
+- PolkitBackendAuthorityClass *authority_class;
+- PolkitBackendInteractiveAuthorityClass *interactive_authority_class;
+-
+-
+- gobject_class = G_OBJECT_CLASS (klass);
+- gobject_class->finalize = polkit_backend_js_authority_finalize;
+- gobject_class->set_property = polkit_backend_js_authority_set_property;
+- gobject_class->constructed = polkit_backend_js_authority_constructed;
+-
+- authority_class = POLKIT_BACKEND_AUTHORITY_CLASS (klass);
+- authority_class->get_name = polkit_backend_js_authority_get_name;
+- authority_class->get_version = polkit_backend_js_authority_get_version;
+- authority_class->get_features = polkit_backend_js_authority_get_features;
+-
+- interactive_authority_class = POLKIT_BACKEND_INTERACTIVE_AUTHORITY_CLASS (klass);
+- interactive_authority_class->get_admin_identities = polkit_backend_js_authority_get_admin_auth_identities;
+- interactive_authority_class->check_authorization_sync = polkit_backend_js_authority_check_authorization_sync;
+-
+- g_object_class_install_property (gobject_class,
+- PROP_RULES_DIRS,
+- g_param_spec_boxed ("rules-dirs",
+- NULL,
+- NULL,
+- G_TYPE_STRV,
+- GParamFlags(G_PARAM_CONSTRUCT_ONLY | G_PARAM_WRITABLE)));
+-
++ polkit_backend_common_js_authority_class_init_common (klass);
+
+ g_type_class_add_private (klass, sizeof (PolkitBackendJsAuthorityPrivate));
+-
+ JS_Init ();
+ }
+
+@@ -1099,15 +923,15 @@ call_js_function_with_runaway_killer (PolkitBackendJsAuthority *authority,
+
+ /* ---------------------------------------------------------------------------------------------------- */
+
+-static GList *
+-polkit_backend_js_authority_get_admin_auth_identities (PolkitBackendInteractiveAuthority *_authority,
+- PolkitSubject *caller,
+- PolkitSubject *subject,
+- PolkitIdentity *user_for_subject,
+- gboolean subject_is_local,
+- gboolean subject_is_active,
+- const gchar *action_id,
+- PolkitDetails *details)
++GList *
++polkit_backend_common_js_authority_get_admin_auth_identities (PolkitBackendInteractiveAuthority *_authority,
++ PolkitSubject *caller,
++ PolkitSubject *subject,
++ PolkitIdentity *user_for_subject,
++ gboolean subject_is_local,
++ gboolean subject_is_active,
++ const gchar *action_id,
++ PolkitDetails *details)
+ {
+ PolkitBackendJsAuthority *authority = POLKIT_BACKEND_JS_AUTHORITY (_authority);
+ GList *ret = NULL;
+@@ -1202,16 +1026,16 @@ polkit_backend_js_authority_get_admin_auth_identities (PolkitBackendInteractiveA
+
+ /* ---------------------------------------------------------------------------------------------------- */
+
+-static PolkitImplicitAuthorization
+-polkit_backend_js_authority_check_authorization_sync (PolkitBackendInteractiveAuthority *_authority,
+- PolkitSubject *caller,
+- PolkitSubject *subject,
+- PolkitIdentity *user_for_subject,
+- gboolean subject_is_local,
+- gboolean subject_is_active,
+- const gchar *action_id,
+- PolkitDetails *details,
+- PolkitImplicitAuthorization implicit)
++PolkitImplicitAuthorization
++polkit_backend_common_js_authority_check_authorization_sync (PolkitBackendInteractiveAuthority *_authority,
++ PolkitSubject *caller,
++ PolkitSubject *subject,
++ PolkitIdentity *user_for_subject,
++ gboolean subject_is_local,
++ gboolean subject_is_active,
++ const gchar *action_id,
++ PolkitDetails *details,
++ PolkitImplicitAuthorization implicit)
+ {
+ PolkitBackendJsAuthority *authority = POLKIT_BACKEND_JS_AUTHORITY (_authority);
+ PolkitImplicitAuthorization ret = implicit;
+@@ -1324,65 +1148,6 @@ js_polkit_log (JSContext *cx,
+
+ /* ---------------------------------------------------------------------------------------------------- */
+
+-static const gchar *
+-get_signal_name (gint signal_number)
+-{
+- switch (signal_number)
+- {
+-#define _HANDLE_SIG(sig) case sig: return #sig;
+- _HANDLE_SIG (SIGHUP);
+- _HANDLE_SIG (SIGINT);
+- _HANDLE_SIG (SIGQUIT);
+- _HANDLE_SIG (SIGILL);
+- _HANDLE_SIG (SIGABRT);
+- _HANDLE_SIG (SIGFPE);
+- _HANDLE_SIG (SIGKILL);
+- _HANDLE_SIG (SIGSEGV);
+- _HANDLE_SIG (SIGPIPE);
+- _HANDLE_SIG (SIGALRM);
+- _HANDLE_SIG (SIGTERM);
+- _HANDLE_SIG (SIGUSR1);
+- _HANDLE_SIG (SIGUSR2);
+- _HANDLE_SIG (SIGCHLD);
+- _HANDLE_SIG (SIGCONT);
+- _HANDLE_SIG (SIGSTOP);
+- _HANDLE_SIG (SIGTSTP);
+- _HANDLE_SIG (SIGTTIN);
+- _HANDLE_SIG (SIGTTOU);
+- _HANDLE_SIG (SIGBUS);
+-#ifdef SIGPOLL
+- _HANDLE_SIG (SIGPOLL);
+-#endif
+- _HANDLE_SIG (SIGPROF);
+- _HANDLE_SIG (SIGSYS);
+- _HANDLE_SIG (SIGTRAP);
+- _HANDLE_SIG (SIGURG);
+- _HANDLE_SIG (SIGVTALRM);
+- _HANDLE_SIG (SIGXCPU);
+- _HANDLE_SIG (SIGXFSZ);
+-#undef _HANDLE_SIG
+- default:
+- break;
+- }
+- return "UNKNOWN_SIGNAL";
+-}
+-
+-typedef struct
+-{
+- GMainLoop *loop;
+- GAsyncResult *res;
+-} SpawnData;
+-
+-static void
+-spawn_cb (GObject *source_object,
+- GAsyncResult *res,
+- gpointer user_data)
+-{
+- SpawnData *data = (SpawnData *)user_data;
+- data->res = (GAsyncResult*)g_object_ref (res);
+- g_main_loop_quit (data->loop);
+-}
+-
+ static bool
+ js_polkit_spawn (JSContext *cx,
+ unsigned js_argc,
+@@ -1440,21 +1205,21 @@ js_polkit_spawn (JSContext *cx,
+ g_main_context_push_thread_default (context);
+
+ data.loop = loop;
+- utils_spawn ((const gchar *const *) argv,
+- 10, /* timeout_seconds */
+- NULL, /* cancellable */
+- spawn_cb,
+- &data);
++ polkit_backend_common_spawn ((const gchar *const *) argv,
++ 10, /* timeout_seconds */
++ NULL, /* cancellable */
++ polkit_backend_common_spawn_cb,
++ &data);
+
+ g_main_loop_run (loop);
+
+ g_main_context_pop_thread_default (context);
+
+- if (!utils_spawn_finish (data.res,
+- &exit_status,
+- &standard_output,
+- &standard_error,
+- &error))
++ if (!polkit_backend_common_spawn_finish (data.res,
++ &exit_status,
++ &standard_output,
++ &standard_error,
++ &error))
+ {
+ JS_ReportErrorUTF8 (cx,
+ "Error spawning helper: %s (%s, %d)",
+@@ -1477,7 +1242,7 @@ js_polkit_spawn (JSContext *cx,
+ {
+ g_string_append_printf (gstr,
+ "Helper was signaled with signal %s (%d)",
+- get_signal_name (WTERMSIG (exit_status)),
++ polkit_backend_common_get_signal_name (WTERMSIG (exit_status)),
+ WTERMSIG (exit_status));
+ }
+ g_string_append_printf (gstr, ", stdout=`%s', stderr=`%s'",
+@@ -1542,381 +1307,5 @@ js_polkit_user_is_in_netgroup (JSContext *cx,
+ return ret;
+ }
+
+-
+-
+ /* ---------------------------------------------------------------------------------------------------- */
+
+-typedef struct
+-{
+- GSimpleAsyncResult *simple; /* borrowed reference */
+- GMainContext *main_context; /* may be NULL */
+-
+- GCancellable *cancellable; /* may be NULL */
+- gulong cancellable_handler_id;
+-
+- GPid child_pid;
+- gint child_stdout_fd;
+- gint child_stderr_fd;
+-
+- GIOChannel *child_stdout_channel;
+- GIOChannel *child_stderr_channel;
+-
+- GSource *child_watch_source;
+- GSource *child_stdout_source;
+- GSource *child_stderr_source;
+-
+- guint timeout_seconds;
+- gboolean timed_out;
+- GSource *timeout_source;
+-
+- GString *child_stdout;
+- GString *child_stderr;
+-
+- gint exit_status;
+-} UtilsSpawnData;
+-
+-static void
+-utils_child_watch_from_release_cb (GPid pid,
+- gint status,
+- gpointer user_data)
+-{
+-}
+-
+-static void
+-utils_spawn_data_free (UtilsSpawnData *data)
+-{
+- if (data->timeout_source != NULL)
+- {
+- g_source_destroy (data->timeout_source);
+- data->timeout_source = NULL;
+- }
+-
+- /* Nuke the child, if necessary */
+- if (data->child_watch_source != NULL)
+- {
+- g_source_destroy (data->child_watch_source);
+- data->child_watch_source = NULL;
+- }
+-
+- if (data->child_pid != 0)
+- {
+- GSource *source;
+- kill (data->child_pid, SIGTERM);
+- /* OK, we need to reap for the child ourselves - we don't want
+- * to use waitpid() because that might block the calling
+- * thread (the child might handle SIGTERM and use several
+- * seconds for cleanup/rollback).
+- *
+- * So we use GChildWatch instead.
+- *
+- * Avoid taking a references to ourselves. but note that we need
+- * to pass the GSource so we can nuke it once handled.
+- */
+- source = g_child_watch_source_new (data->child_pid);
+- g_source_set_callback (source,
+- (GSourceFunc) utils_child_watch_from_release_cb,
+- source,
+- (GDestroyNotify) g_source_destroy);
+- /* attach source to the global default main context */
+- g_source_attach (source, NULL);
+- g_source_unref (source);
+- data->child_pid = 0;
+- }
+-
+- if (data->child_stdout != NULL)
+- {
+- g_string_free (data->child_stdout, TRUE);
+- data->child_stdout = NULL;
+- }
+-
+- if (data->child_stderr != NULL)
+- {
+- g_string_free (data->child_stderr, TRUE);
+- data->child_stderr = NULL;
+- }
+-
+- if (data->child_stdout_channel != NULL)
+- {
+- g_io_channel_unref (data->child_stdout_channel);
+- data->child_stdout_channel = NULL;
+- }
+- if (data->child_stderr_channel != NULL)
+- {
+- g_io_channel_unref (data->child_stderr_channel);
+- data->child_stderr_channel = NULL;
+- }
+-
+- if (data->child_stdout_source != NULL)
+- {
+- g_source_destroy (data->child_stdout_source);
+- data->child_stdout_source = NULL;
+- }
+- if (data->child_stderr_source != NULL)
+- {
+- g_source_destroy (data->child_stderr_source);
+- data->child_stderr_source = NULL;
+- }
+-
+- if (data->child_stdout_fd != -1)
+- {
+- g_warn_if_fail (close (data->child_stdout_fd) == 0);
+- data->child_stdout_fd = -1;
+- }
+- if (data->child_stderr_fd != -1)
+- {
+- g_warn_if_fail (close (data->child_stderr_fd) == 0);
+- data->child_stderr_fd = -1;
+- }
+-
+- if (data->cancellable_handler_id > 0)
+- {
+- g_cancellable_disconnect (data->cancellable, data->cancellable_handler_id);
+- data->cancellable_handler_id = 0;
+- }
+-
+- if (data->main_context != NULL)
+- g_main_context_unref (data->main_context);
+-
+- if (data->cancellable != NULL)
+- g_object_unref (data->cancellable);
+-
+- g_slice_free (UtilsSpawnData, data);
+-}
+-
+-/* called in the thread where @cancellable was cancelled */
+-static void
+-utils_on_cancelled (GCancellable *cancellable,
+- gpointer user_data)
+-{
+- UtilsSpawnData *data = (UtilsSpawnData *)user_data;
+- GError *error;
+-
+- error = NULL;
+- g_warn_if_fail (g_cancellable_set_error_if_cancelled (cancellable, &error));
+- g_simple_async_result_take_error (data->simple, error);
+- g_simple_async_result_complete_in_idle (data->simple);
+- g_object_unref (data->simple);
+-}
+-
+-static gboolean
+-utils_read_child_stderr (GIOChannel *channel,
+- GIOCondition condition,
+- gpointer user_data)
+-{
+- UtilsSpawnData *data = (UtilsSpawnData *)user_data;
+- gchar buf[1024];
+- gsize bytes_read;
+-
+- g_io_channel_read_chars (channel, buf, sizeof buf, &bytes_read, NULL);
+- g_string_append_len (data->child_stderr, buf, bytes_read);
+- return TRUE;
+-}
+-
+-static gboolean
+-utils_read_child_stdout (GIOChannel *channel,
+- GIOCondition condition,
+- gpointer user_data)
+-{
+- UtilsSpawnData *data = (UtilsSpawnData *)user_data;
+- gchar buf[1024];
+- gsize bytes_read;
+-
+- g_io_channel_read_chars (channel, buf, sizeof buf, &bytes_read, NULL);
+- g_string_append_len (data->child_stdout, buf, bytes_read);
+- return TRUE;
+-}
+-
+-static void
+-utils_child_watch_cb (GPid pid,
+- gint status,
+- gpointer user_data)
+-{
+- UtilsSpawnData *data = (UtilsSpawnData *)user_data;
+- gchar *buf;
+- gsize buf_size;
+-
+- if (g_io_channel_read_to_end (data->child_stdout_channel, &buf, &buf_size, NULL) == G_IO_STATUS_NORMAL)
+- {
+- g_string_append_len (data->child_stdout, buf, buf_size);
+- g_free (buf);
+- }
+- if (g_io_channel_read_to_end (data->child_stderr_channel, &buf, &buf_size, NULL) == G_IO_STATUS_NORMAL)
+- {
+- g_string_append_len (data->child_stderr, buf, buf_size);
+- g_free (buf);
+- }
+-
+- data->exit_status = status;
+-
+- /* ok, child watch is history, make sure we don't free it in spawn_data_free() */
+- data->child_pid = 0;
+- data->child_watch_source = NULL;
+-
+- /* we're done */
+- g_simple_async_result_complete_in_idle (data->simple);
+- g_object_unref (data->simple);
+-}
+-
+-static gboolean
+-utils_timeout_cb (gpointer user_data)
+-{
+- UtilsSpawnData *data = (UtilsSpawnData *)user_data;
+-
+- data->timed_out = TRUE;
+-
+- /* ok, timeout is history, make sure we don't free it in spawn_data_free() */
+- data->timeout_source = NULL;
+-
+- /* we're done */
+- g_simple_async_result_complete_in_idle (data->simple);
+- g_object_unref (data->simple);
+-
+- return FALSE; /* remove source */
+-}
+-
+-static void
+-utils_spawn (const gchar *const *argv,
+- guint timeout_seconds,
+- GCancellable *cancellable,
+- GAsyncReadyCallback callback,
+- gpointer user_data)
+-{
+- UtilsSpawnData *data;
+- GError *error;
+-
+- data = g_slice_new0 (UtilsSpawnData);
+- data->timeout_seconds = timeout_seconds;
+- data->simple = g_simple_async_result_new (NULL,
+- callback,
+- user_data,
+- (gpointer*)utils_spawn);
+- data->main_context = g_main_context_get_thread_default ();
+- if (data->main_context != NULL)
+- g_main_context_ref (data->main_context);
+-
+- data->cancellable = cancellable != NULL ? (GCancellable*)g_object_ref (cancellable) : NULL;
+-
+- data->child_stdout = g_string_new (NULL);
+- data->child_stderr = g_string_new (NULL);
+- data->child_stdout_fd = -1;
+- data->child_stderr_fd = -1;
+-
+- /* the life-cycle of UtilsSpawnData is tied to its GSimpleAsyncResult */
+- g_simple_async_result_set_op_res_gpointer (data->simple, data, (GDestroyNotify) utils_spawn_data_free);
+-
+- error = NULL;
+- if (data->cancellable != NULL)
+- {
+- /* could already be cancelled */
+- error = NULL;
+- if (g_cancellable_set_error_if_cancelled (data->cancellable, &error))
+- {
+- g_simple_async_result_take_error (data->simple, error);
+- g_simple_async_result_complete_in_idle (data->simple);
+- g_object_unref (data->simple);
+- goto out;
+- }
+-
+- data->cancellable_handler_id = g_cancellable_connect (data->cancellable,
+- G_CALLBACK (utils_on_cancelled),
+- data,
+- NULL);
+- }
+-
+- error = NULL;
+- if (!g_spawn_async_with_pipes (NULL, /* working directory */
+- (gchar **) argv,
+- NULL, /* envp */
+- GSpawnFlags(G_SPAWN_SEARCH_PATH | G_SPAWN_DO_NOT_REAP_CHILD),
+- NULL, /* child_setup */
+- NULL, /* child_setup's user_data */
+- &(data->child_pid),
+- NULL, /* gint *stdin_fd */
+- &(data->child_stdout_fd),
+- &(data->child_stderr_fd),
+- &error))
+- {
+- g_prefix_error (&error, "Error spawning: ");
+- g_simple_async_result_take_error (data->simple, error);
+- g_simple_async_result_complete_in_idle (data->simple);
+- g_object_unref (data->simple);
+- goto out;
+- }
+-
+- if (timeout_seconds > 0)
+- {
+- data->timeout_source = g_timeout_source_new_seconds (timeout_seconds);
+- g_source_set_priority (data->timeout_source, G_PRIORITY_DEFAULT);
+- g_source_set_callback (data->timeout_source, utils_timeout_cb, data, NULL);
+- g_source_attach (data->timeout_source, data->main_context);
+- g_source_unref (data->timeout_source);
+- }
+-
+- data->child_watch_source = g_child_watch_source_new (data->child_pid);
+- g_source_set_callback (data->child_watch_source, (GSourceFunc) utils_child_watch_cb, data, NULL);
+- g_source_attach (data->child_watch_source, data->main_context);
+- g_source_unref (data->child_watch_source);
+-
+- data->child_stdout_channel = g_io_channel_unix_new (data->child_stdout_fd);
+- g_io_channel_set_flags (data->child_stdout_channel, G_IO_FLAG_NONBLOCK, NULL);
+- data->child_stdout_source = g_io_create_watch (data->child_stdout_channel, G_IO_IN);
+- g_source_set_callback (data->child_stdout_source, (GSourceFunc) utils_read_child_stdout, data, NULL);
+- g_source_attach (data->child_stdout_source, data->main_context);
+- g_source_unref (data->child_stdout_source);
+-
+- data->child_stderr_channel = g_io_channel_unix_new (data->child_stderr_fd);
+- g_io_channel_set_flags (data->child_stderr_channel, G_IO_FLAG_NONBLOCK, NULL);
+- data->child_stderr_source = g_io_create_watch (data->child_stderr_channel, G_IO_IN);
+- g_source_set_callback (data->child_stderr_source, (GSourceFunc) utils_read_child_stderr, data, NULL);
+- g_source_attach (data->child_stderr_source, data->main_context);
+- g_source_unref (data->child_stderr_source);
+-
+- out:
+- ;
+-}
+-
+-gboolean
+-utils_spawn_finish (GAsyncResult *res,
+- gint *out_exit_status,
+- gchar **out_standard_output,
+- gchar **out_standard_error,
+- GError **error)
+-{
+- GSimpleAsyncResult *simple = G_SIMPLE_ASYNC_RESULT (res);
+- UtilsSpawnData *data;
+- gboolean ret = FALSE;
+-
+- g_return_val_if_fail (G_IS_ASYNC_RESULT (res), FALSE);
+- g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
+-
+- g_warn_if_fail (g_simple_async_result_get_source_tag (simple) == utils_spawn);
+-
+- if (g_simple_async_result_propagate_error (simple, error))
+- goto out;
+-
+- data = (UtilsSpawnData*)g_simple_async_result_get_op_res_gpointer (simple);
+-
+- if (data->timed_out)
+- {
+- g_set_error (error,
+- G_IO_ERROR,
+- G_IO_ERROR_TIMED_OUT,
+- "Timed out after %d seconds",
+- data->timeout_seconds);
+- goto out;
+- }
+-
+- if (out_exit_status != NULL)
+- *out_exit_status = data->exit_status;
+-
+- if (out_standard_output != NULL)
+- *out_standard_output = g_strdup (data->child_stdout->str);
+-
+- if (out_standard_error != NULL)
+- *out_standard_error = g_strdup (data->child_stderr->str);
+-
+- ret = TRUE;
+-
+- out:
+- return ret;
+-}
+--
+GitLab
+
+
+From 4858128107be9c3ab11828ee8f35c5e26efd36ce Mon Sep 17 00:00:00 2001
+From: Gustavo Lima Chaves <gustavo.chaves@microsoft.com>
+Date: Tue, 14 Sep 2021 14:38:15 -0700
+Subject: [PATCH 15/16] Gitlab CI: add duktape pkgconfig dependency
+
+Make way for the CI to be able to build with duktape too
+
+Signed-off-by: Gustavo Lima Chaves <gustavo.chaves@microsoft.com>
+---
+ .gitlab-ci.yml | 1 +
+ 1 file changed, 1 insertion(+)
+
+GitLab
+
+
+From cd5d6da837fce95f8831a355dad88c83347c7337 Mon Sep 17 00:00:00 2001
+From: Gustavo Lima Chaves <gustavo.chaves@microsoft.com>
+Date: Mon, 20 Sep 2021 17:17:26 -0700
+Subject: [PATCH 16/16] duktape: implement runaway scripts killer timeout
+
+This was missing on Duktape's JS backend proposal, now in. As
+discussed in
+https://gitlab.freedesktop.org/polkit/polkit/-/merge_requests/35 and
+verified by the commit author, Duktape has no interrupt injection
+mechanism (it has no thread-safe API entry whatsoever, even). Using
+DUK_USE_EXEC_TIMEOUT_CHECK is also not feasible, because:
+
+ i) It must be enabled at build time and shared object builds of the
+ lib on distros go with the default options, something we cannot
+ change/control
+
+ ii) That does not account for non-ECMAScript explicit execution
+ contexts, like regex execution, native C calls, etc.
+
+It has been agreed, on that thread, that pthread_cond_timedwait()-ing
+and having proper Duktape evaluation/execution calls take place in a
+separate thread, to be killed after the runaway script killer's
+accorded timeout value, a reasonable approach. We have considered
+using glib wrappers for direct pthread usage, but that way would make
+it impossible to issue
+pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, ...) and we want to
+be paranoid in that regard.
+
+On Duktape, we don't get to err from the JS context (to be captured by
+the offending script), but to be forcibly killed on timeout scenarios,
+leading to null returns, thus polkit negation, by definition. It's a
+reasonable design/compromise.
+
+A fatal error handler routine, for the Duktape context, has also been
+added, using the polkit_backend_authority_log() logging infra to
+better assist users on what went wrong.
+
+Finally, the script evaluation routine has been made to use
+duk_peval_lstring() (previously using _noresult variant), so to able
+to present the user with proper error messages, should any occur.
+
+The original runaway script killer test has been adjusted to please
+both JS backends.
+
+Signed-off-by: Gustavo Lima Chaves <gustavo.chaves@microsoft.com>
+---
+ meson.build | 1 +
+ src/polkitbackend/meson.build | 1 +
+ src/polkitbackend/polkitbackendcommon.h | 2 +
+ .../polkitbackendduktapeauthority.c | 236 ++++++++++++++----
+ .../polkitbackendjsauthority.cpp | 10 +-
+ .../etc/polkit-1/rules.d/10-testing.rules | 6 +-
+ .../test-polkitbackendjsauthority.c | 2 +-
+ 7 files changed, 209 insertions(+), 49 deletions(-)
+
+diff --git a/meson.build b/meson.build
+index 4e44723..46956e3 100644
+--- a/meson.build
++++ b/meson.build
+@@ -137,6 +137,7 @@ js_engine = get_option('js_engine')
+ if js_engine == 'duktape'
+ js_dep = dependency('duktape')
+ libm_dep = cc.find_library('m')
++ libpthread_dep = cc.find_library('pthread')
+ elif js_engine == 'mozjs'
+ js_dep = dependency('mozjs-78')
+ endif
+diff --git a/src/polkitbackend/meson.build b/src/polkitbackend/meson.build
+index 9ec01b2..4dfea39 100644
+--- a/src/polkitbackend/meson.build
++++ b/src/polkitbackend/meson.build
+@@ -34,6 +34,7 @@ c_flags = [
+ if js_engine == 'duktape'
+ sources += files('polkitbackendduktapeauthority.c')
+ deps += libm_dep
++ deps += libpthread_dep
+ elif js_engine == 'mozjs'
+ sources += files('polkitbackendjsauthority.cpp')
+ endif
+diff --git a/src/polkitbackend/polkitbackendcommon.h b/src/polkitbackend/polkitbackendcommon.h
+index 6d0d267..dd700fc 100644
+--- a/src/polkitbackend/polkitbackendcommon.h
++++ b/src/polkitbackend/polkitbackendcommon.h
+@@ -50,6 +50,8 @@
+ #include <systemd/sd-login.h>
+ #endif /* HAVE_LIBSYSTEMD */
+
++#define RUNAWAY_KILLER_TIMEOUT (15)
++
+ #ifdef __cplusplus
+ extern "C" {
+ #endif
+diff --git a/src/polkitbackend/polkitbackendduktapeauthority.c b/src/polkitbackend/polkitbackendduktapeauthority.c
+index a2b4420..80f1976 100644
+--- a/src/polkitbackend/polkitbackendduktapeauthority.c
++++ b/src/polkitbackend/polkitbackendduktapeauthority.c
+@@ -47,8 +47,20 @@ struct _PolkitBackendJsAuthorityPrivate
+ GFileMonitor **dir_monitors; /* NULL-terminated array of GFileMonitor instances */
+
+ duk_context *cx;
++
++ pthread_t runaway_killer_thread;
++};
++
++enum
++{
++ RUNAWAY_KILLER_THREAD_EXIT_STATUS_UNSET,
++ RUNAWAY_KILLER_THREAD_EXIT_STATUS_SUCCESS,
++ RUNAWAY_KILLER_THREAD_EXIT_STATUS_FAILURE,
+ };
+
++static gboolean execute_script_with_runaway_killer(PolkitBackendJsAuthority *authority,
++ const gchar *filename);
++
+ /* ---------------------------------------------------------------------------------------------------- */
+
+ G_DEFINE_TYPE (PolkitBackendJsAuthority, polkit_backend_js_authority, POLKIT_BACKEND_TYPE_INTERACTIVE_AUTHORITY);
+@@ -67,6 +79,15 @@ static const duk_function_list_entry js_polkit_functions[] =
+ { NULL, NULL, 0 },
+ };
+
++static void report_error (void *udata,
++ const char *msg)
++{
++ PolkitBackendJsAuthority *authority = udata;
++ polkit_backend_authority_log (POLKIT_BACKEND_AUTHORITY (authority),
++ "fatal Duktape JS backend error: %s",
++ (msg ? msg : "no message"));
++}
++
+ static void
+ polkit_backend_js_authority_init (PolkitBackendJsAuthority *authority)
+ {
+@@ -78,7 +99,6 @@ polkit_backend_js_authority_init (PolkitBackendJsAuthority *authority)
+ static void
+ load_scripts (PolkitBackendJsAuthority *authority)
+ {
+- duk_context *cx = authority->priv->cx;
+ GList *files = NULL;
+ GList *l;
+ guint num_scripts = 0;
+@@ -123,36 +143,9 @@ load_scripts (PolkitBackendJsAuthority *authority)
+ for (l = files; l != NULL; l = l->next)
+ {
+ const gchar *filename = (gchar *)l->data;
+-#if (DUK_VERSION >= 20000)
+- GFile *file = g_file_new_for_path (filename);
+- char *contents;
+- gsize len;
+- if (!g_file_load_contents (file, NULL, &contents, &len, NULL, NULL))
+- {
+- polkit_backend_authority_log (POLKIT_BACKEND_AUTHORITY (authority),
+- "Error compiling script %s",
+- filename);
+- g_object_unref (file);
+- continue;
+- }
+
+- g_object_unref (file);
+- if (duk_peval_lstring_noresult(cx, contents,len) != 0)
+-#else
+- if (duk_peval_file_noresult (cx, filename) != 0)
+-#endif
+- {
+- polkit_backend_authority_log (POLKIT_BACKEND_AUTHORITY (authority),
+- "Error compiling script %s: %s",
+- filename, duk_safe_to_string (authority->priv->cx, -1));
+-#if (DUK_VERSION >= 20000)
+- g_free (contents);
+-#endif
++ if (!execute_script_with_runaway_killer(authority, filename))
+ continue;
+- }
+-#if (DUK_VERSION >= 20000)
+- g_free (contents);
+-#endif
+ num_scripts++;
+ }
+
+@@ -232,7 +225,7 @@ polkit_backend_common_js_authority_constructed (GObject *object)
+ PolkitBackendJsAuthority *authority = POLKIT_BACKEND_JS_AUTHORITY (object);
+ duk_context *cx;
+
+- cx = duk_create_heap (NULL, NULL, NULL, authority, NULL);
++ cx = duk_create_heap (NULL, NULL, NULL, authority, report_error);
+ if (cx == NULL)
+ goto fail;
+
+@@ -243,6 +236,9 @@ polkit_backend_common_js_authority_constructed (GObject *object)
+ duk_put_function_list (cx, -1, js_polkit_functions);
+ duk_put_prop_string (cx, -2, "polkit");
+
++ /* load polkit objects/functions into JS context (e.g. addRule(),
++ * _deleteRules(), _runRules() et al)
++ */
+ duk_eval_string (cx, init_js);
+
+ if (authority->priv->rules_dirs == NULL)
+@@ -510,6 +506,167 @@ push_action_and_details (duk_context *cx,
+
+ /* ---------------------------------------------------------------------------------------------------- */
+
++typedef struct {
++ PolkitBackendJsAuthority *authority;
++ const gchar *filename;
++ pthread_cond_t cond;
++ pthread_mutex_t mutex;
++ gint ret;
++} RunawayKillerCtx;
++
++static gpointer
++runaway_killer_thread_execute_js (gpointer user_data)
++{
++ RunawayKillerCtx *ctx = user_data;
++ duk_context *cx = ctx->authority->priv->cx;
++
++ int oldtype;
++
++ pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, &oldtype);
++
++#if (DUK_VERSION >= 20000)
++ GFile *file = g_file_new_for_path(ctx->filename);
++ char *contents;
++ gsize len;
++
++ if (!g_file_load_contents(file, NULL, &contents, &len, NULL, NULL)) {
++ polkit_backend_authority_log(POLKIT_BACKEND_AUTHORITY(ctx->authority),
++ "Error compiling script %s", ctx->filename);
++ g_object_unref(file);
++ goto err;
++ }
++
++ g_object_unref(file);
++
++ /* evaluate the script, trying to print context in any syntax errors
++ found */
++ if (duk_peval_lstring(cx, contents, len) != 0)
++#else
++ if (duk_peval_file(cx, ctx->filename) != 0)
++#endif
++ {
++ polkit_backend_authority_log(POLKIT_BACKEND_AUTHORITY(ctx->authority),
++ "Error compiling script %s: %s", ctx->filename,
++ duk_safe_to_string(cx, -1));
++ duk_pop(cx);
++ goto free_err;
++ }
++#if (DUK_VERSION >= 20000)
++ g_free(contents);
++#endif
++
++ ctx->ret = RUNAWAY_KILLER_THREAD_EXIT_STATUS_SUCCESS;
++ goto end;
++
++free_err:
++#if (DUK_VERSION >= 20000)
++ g_free(contents);
++#endif
++err:
++ ctx->ret = RUNAWAY_KILLER_THREAD_EXIT_STATUS_FAILURE;
++end:
++ pthread_cond_signal(&ctx->cond);
++ return NULL;
++}
++
++static gpointer
++runaway_killer_thread_call_js (gpointer user_data)
++{
++ RunawayKillerCtx *ctx = user_data;
++ duk_context *cx = ctx->authority->priv->cx;
++ int oldtype;
++
++ pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, &oldtype);
++
++ if (duk_pcall_prop (cx, 0, 2) != DUK_EXEC_SUCCESS)
++ {
++ polkit_backend_authority_log (POLKIT_BACKEND_AUTHORITY (ctx->authority),
++ "Error evaluating admin rules: ",
++ duk_safe_to_string (cx, -1));
++ goto err;
++ }
++
++ ctx->ret = RUNAWAY_KILLER_THREAD_EXIT_STATUS_SUCCESS;
++ goto end;
++
++err:
++ ctx->ret = RUNAWAY_KILLER_THREAD_EXIT_STATUS_FAILURE;
++end:
++ pthread_cond_signal(&ctx->cond);
++ return NULL;
++}
++
++/* Blocking for at most for RUNAWAY_KILLER_TIMEOUT */
++static gboolean
++execute_script_with_runaway_killer(PolkitBackendJsAuthority *authority,
++ const gchar *filename)
++{
++ gint64 end_time;
++ gboolean cancel = FALSE;
++ RunawayKillerCtx ctx = {.authority = authority, .filename = filename,
++ .ret = RUNAWAY_KILLER_THREAD_EXIT_STATUS_UNSET,
++ .mutex = PTHREAD_MUTEX_INITIALIZER,
++ .cond = PTHREAD_COND_INITIALIZER};
++ struct timespec abs_time;
++
++ pthread_mutex_lock(&ctx.mutex);
++
++ clock_gettime(CLOCK_REALTIME, &abs_time);
++ abs_time.tv_sec += RUNAWAY_KILLER_TIMEOUT;
++
++ pthread_create(&authority->priv->runaway_killer_thread, NULL, runaway_killer_thread_execute_js, &ctx);
++
++ while (ctx.ret == RUNAWAY_KILLER_THREAD_EXIT_STATUS_UNSET) /* loop to treat spurious wakeups */
++ if (pthread_cond_timedwait(&ctx.cond, &ctx.mutex, &abs_time) == ETIMEDOUT) {
++ cancel = TRUE;
++ break;
++ }
++
++ pthread_mutex_unlock(&ctx.mutex);
++
++ if (cancel)
++ pthread_cancel (authority->priv->runaway_killer_thread);
++ pthread_join (authority->priv->runaway_killer_thread, NULL);
++
++ return ctx.ret == RUNAWAY_KILLER_THREAD_EXIT_STATUS_SUCCESS;
++}
++
++/* Calls already stacked function and args. Blocking for at most for
++ * RUNAWAY_KILLER_TIMEOUT
++ */
++static gboolean
++call_js_function_with_runaway_killer(PolkitBackendJsAuthority *authority)
++{
++ gint64 end_time;
++ gboolean cancel = FALSE;
++ RunawayKillerCtx ctx = {.authority = authority,
++ .ret = RUNAWAY_KILLER_THREAD_EXIT_STATUS_UNSET,
++ .mutex = PTHREAD_MUTEX_INITIALIZER,
++ .cond = PTHREAD_COND_INITIALIZER};
++ struct timespec abs_time;
++
++ pthread_mutex_lock(&ctx.mutex);
++
++ clock_gettime(CLOCK_REALTIME, &abs_time);
++ abs_time.tv_sec += RUNAWAY_KILLER_TIMEOUT;
++
++ pthread_create(&authority->priv->runaway_killer_thread, NULL, runaway_killer_thread_call_js, &ctx);
++
++ while (ctx.ret == RUNAWAY_KILLER_THREAD_EXIT_STATUS_UNSET) /* loop to treat spurious wakeups */
++ if (pthread_cond_timedwait(&ctx.cond, &ctx.mutex, &abs_time) == ETIMEDOUT) {
++ cancel = TRUE;
++ break;
++ }
++
++ pthread_mutex_unlock(&ctx.mutex);
++
++ if (cancel)
++ pthread_cancel (authority->priv->runaway_killer_thread);
++ pthread_join (authority->priv->runaway_killer_thread, NULL);
++
++ return ctx.ret == RUNAWAY_KILLER_THREAD_EXIT_STATUS_SUCCESS;
++}
++
+ /* ---------------------------------------------------------------------------------------------------- */
+
+ GList *
+@@ -557,13 +714,8 @@ polkit_backend_common_js_authority_get_admin_auth_identities (PolkitBackendInter
+ goto out;
+ }
+
+- if (duk_pcall_prop (cx, 0, 2) != DUK_ERR_NONE)
+- {
+- polkit_backend_authority_log (POLKIT_BACKEND_AUTHORITY (authority),
+- "Error evaluating admin rules: ",
+- duk_safe_to_string (cx, -1));
+- goto out;
+- }
++ if (!call_js_function_with_runaway_killer (authority))
++ goto out;
+
+ ret_str = duk_require_string (cx, -1);
+
+@@ -643,15 +795,11 @@ polkit_backend_common_js_authority_check_authorization_sync (PolkitBackendIntera
+ goto out;
+ }
+
+- if (duk_pcall_prop (cx, 0, 2) != DUK_ERR_NONE)
+- {
+- polkit_backend_authority_log (POLKIT_BACKEND_AUTHORITY (authority),
+- "Error evaluating authorization rules: ",
+- duk_safe_to_string (cx, -1));
+- goto out;
+- }
++ if (!call_js_function_with_runaway_killer (authority))
++ goto out;
+
+ if (duk_is_null(cx, -1)) {
++ /* this fine, means there was no match, use implicit authorizations */
+ good = TRUE;
+ goto out;
+ }
+diff --git a/src/polkitbackend/polkitbackendjsauthority.cpp b/src/polkitbackend/polkitbackendjsauthority.cpp
+index e28091d..11e91c0 100644
+--- a/src/polkitbackend/polkitbackendjsauthority.cpp
++++ b/src/polkitbackend/polkitbackendjsauthority.cpp
+@@ -829,11 +829,14 @@ runaway_killer_setup (PolkitBackendJsAuthority *authority)
+ {
+ g_assert (authority->priv->rkt_source == NULL);
+
+- /* set-up timer for runaway scripts, will be executed in runaway_killer_thread */
++ /* set-up timer for runaway scripts, will be executed in
++ runaway_killer_thread, that is one, permanent thread running a glib
++ mainloop (rkt_loop) whose context (rkt_context) has a timeout source
++ (rkt_source) */
+ g_mutex_lock (&authority->priv->rkt_timeout_pending_mutex);
+ authority->priv->rkt_timeout_pending = FALSE;
+ g_mutex_unlock (&authority->priv->rkt_timeout_pending_mutex);
+- authority->priv->rkt_source = g_timeout_source_new_seconds (15);
++ authority->priv->rkt_source = g_timeout_source_new_seconds (RUNAWAY_KILLER_TIMEOUT);
+ g_source_set_callback (authority->priv->rkt_source, rkt_on_timeout, authority, NULL);
+ g_source_attach (authority->priv->rkt_source, authority->priv->rkt_context);
+
+@@ -893,6 +896,9 @@ execute_script_with_runaway_killer (PolkitBackendJsAuthority *authority,
+ {
+ bool ret;
+
++ // tries to JS_ExecuteScript(), may hang for > RUNAWAY_KILLER_TIMEOUT,
++ // runaway_killer_thread makes sure the call returns, due to exception
++ // injection
+ runaway_killer_setup (authority);
+ ret = JS_ExecuteScript (authority->priv->cx,
+ script,
+diff --git a/test/data/etc/polkit-1/rules.d/10-testing.rules b/test/data/etc/polkit-1/rules.d/10-testing.rules
+index 98bf062..e346b5d 100644
+--- a/test/data/etc/polkit-1/rules.d/10-testing.rules
++++ b/test/data/etc/polkit-1/rules.d/10-testing.rules
+@@ -189,8 +189,10 @@ polkit.addRule(function(action, subject) {
+ ;
+ } catch (error) {
+ if (error == "Terminating runaway script")
+- return polkit.Result.YES;
+- return polkit.Result.NO;
++ // Inverted logic to accomodate Duktape's model as well, which
++ // will always fail with negation, on timeouts
++ return polkit.Result.NO;
++ return polkit.Result.YES;
+ }
+ }
+ });
+diff --git a/test/polkitbackend/test-polkitbackendjsauthority.c b/test/polkitbackend/test-polkitbackendjsauthority.c
+index f97e0e0..2103b17 100644
+--- a/test/polkitbackend/test-polkitbackendjsauthority.c
++++ b/test/polkitbackend/test-polkitbackendjsauthority.c
+@@ -328,7 +328,7 @@ static const RulesTestCase rules_test_cases[] = {
+ "net.company.run_away_script",
+ "unix-user:root",
+ NULL,
+- POLKIT_IMPLICIT_AUTHORIZATION_AUTHORIZED,
++ POLKIT_IMPLICIT_AUTHORIZATION_NOT_AUTHORIZED,
+ },
+
+ {
+--
+GitLab
+
diff --git a/gnu/packages/patches/python-2.7-no-static-lib.patch b/gnu/packages/patches/python-2.7-no-static-lib.patch
new file mode 100644
index 0000000000..02529989be
--- /dev/null
+++ b/gnu/packages/patches/python-2.7-no-static-lib.patch
@@ -0,0 +1,70 @@
+From 92e2dcace7a3c02289b314238c5f18caec659ff1 Mon Sep 17 00:00:00 2001
+From: Julien Lepiller <julien@lepiller.eu>
+Date: Sat, 5 Jun 2021 12:41:47 +0200
+Subject: [PATCH] No static lib.
+
+This patch is adapted from Fedora. The original patch did not apply
+because of whitespace changes.
+
+00111 #
+Patch the Makefile.pre.in so that the generated Makefile doesn't try to build
+a libpythonMAJOR.MINOR.a (bug 550692):
+Downstream only: not appropriate for upstream
+---
+ Makefile.pre.in | 26 +-------------------------
+ 1 file changed, 1 insertion(+), 25 deletions(-)
+
+diff --git a/Makefile.pre.in b/Makefile.pre.in
+index 6239fc3..948f196 100644
+--- a/Makefile.pre.in
++++ b/Makefile.pre.in
+@@ -486,7 +486,7 @@ coverage-report: regen-grammar
+
+
+ # Build the interpreter
+-$(BUILDPYTHON): Modules/python.o $(LIBRARY) $(LDLIBRARY)
++$(BUILDPYTHON): Modules/python.o $(LDLIBRARY)
+ $(LINKCC) $(LDFLAGS) $(LINKFORSHARED) -o $@ \
+ Modules/python.o \
+ $(BLDLIBRARY) $(LIBS) $(MODLIBS) $(SYSLIBS) $(LDLAST)
+@@ -527,18 +527,6 @@ sharedmods: $(BUILDPYTHON) pybuilddir.txt Modules/_math.o
+ _TCLTK_INCLUDES='$(TCLTK_INCLUDES)' _TCLTK_LIBS='$(TCLTK_LIBS)' \
+ $(PY_BUILD_ENVIRON) $(PYTHON_FOR_BUILD) $(srcdir)/setup.py $$quiet build
+
+-# Build static library
+-# avoid long command lines, same as LIBRARY_OBJS
+-$(LIBRARY): $(LIBRARY_OBJS)
+- -rm -f $@
+- $(AR) $(ARFLAGS) $@ Modules/getbuildinfo.o
+- $(AR) $(ARFLAGS) $@ $(PARSER_OBJS)
+- $(AR) $(ARFLAGS) $@ $(OBJECT_OBJS)
+- $(AR) $(ARFLAGS) $@ $(PYTHON_OBJS)
+- $(AR) $(ARFLAGS) $@ $(MODULE_OBJS) $(SIGNAL_OBJS)
+- $(AR) $(ARFLAGS) $@ $(MODOBJS)
+- $(RANLIB) $@
+-
+ libpython$(VERSION).so: $(LIBRARY_OBJS)
+ if test $(INSTSONAME) != $(LDLIBRARY); then \
+ $(BLDSHARED) -Wl,-h$(INSTSONAME) -o $(INSTSONAME) $(LIBRARY_OBJS) $(MODLIBS) $(SHLIBS) $(LIBC) $(LIBM) $(LDLAST); \
+@@ -1216,18 +1204,6 @@ libainstall: @DEF_MAKE_RULE@ python-config
+ else true; \
+ fi; \
+ done
+- @if test -d $(LIBRARY); then :; else \
+- if test "$(PYTHONFRAMEWORKDIR)" = no-framework; then \
+- if test "$(SO)" = .dll; then \
+- $(INSTALL_DATA) $(LDLIBRARY) $(DESTDIR)$(LIBPL) ; \
+- else \
+- $(INSTALL_DATA) $(LIBRARY) $(DESTDIR)$(LIBPL)/$(LIBRARY) ; \
+- $(RANLIB) $(DESTDIR)$(LIBPL)/$(LIBRARY) ; \
+- fi; \
+- else \
+- echo Skip install of $(LIBRARY) - use make frameworkinstall; \
+- fi; \
+- fi
+ $(INSTALL_DATA) Modules/config.c $(DESTDIR)$(LIBPL)/config.c
+ $(INSTALL_DATA) Modules/python.o $(DESTDIR)$(LIBPL)/python.o
+ $(INSTALL_DATA) $(srcdir)/Modules/config.c.in $(DESTDIR)$(LIBPL)/config.c.in
+--
+2.31.1
+
diff --git a/gnu/packages/patches/python-3-fix-tests.patch b/gnu/packages/patches/python-3-fix-tests.patch
index e13790bd41..b44e743c71 100644
--- a/gnu/packages/patches/python-3-fix-tests.patch
+++ b/gnu/packages/patches/python-3-fix-tests.patch
@@ -1,10 +1,39 @@
-See the discussion about the issues fixed here at:
-http://bugs.python.org/issue20868 .
+From f0698133e7d6c353a3e6ae0fc62e57ba558a9bc0 Mon Sep 17 00:00:00 2001
+From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
+Date: Wed, 28 Oct 2020 22:55:05 -0400
+Subject: [PATCH] Skip problematic Python 3 tests in Guix.
+
+A subset of the hunks in this patch is tracked upstream at
+https://bugs.python.org/issue38845, which was contributed by Tanguy Le
+Carrour <tanguy@bioneland.org>.
+---
+ Lib/ctypes/test/test_callbacks.py | 3 +++
+ Lib/ctypes/test/test_find.py | 1 +
+ Lib/ctypes/test/test_libc.py | 3 +++
+ Lib/distutils/tests/test_archive_util.py | 2 ++
+ Lib/distutils/tests/test_sdist.py | 1 +
+ Lib/test/_test_multiprocessing.py | 2 ++
+ Lib/test/test_asyncio/test_base_events.py | 2 ++
+ Lib/test/test_generators.py | 1 +
+ Lib/test/test_pathlib.py | 3 +--
+ Lib/test/test_pdb.py | 4 ++--
+ Lib/test/test_regrtest.py | 2 ++
+ Lib/test/test_resource.py | 1 +
+ Lib/test/test_shutil.py | 2 ++
+ Lib/test/test_signal.py | 4 ++++
+ Lib/test/test_socket.py | 8 ++++++++
+ Lib/test/test_spwd.py | 6 ++----
+ Lib/test/test_tarfile.py | 9 ++++++---
+ Lib/test/test_threading.py | 3 +++
+ Lib/test/test_unicodedata.py | 1 +
+ Tools/scripts/run_tests.py | 2 +-
+ 20 files changed, 48 insertions(+), 12 deletions(-)
diff --git a/Lib/ctypes/test/test_callbacks.py b/Lib/ctypes/test/test_callbacks.py
+index d8e9c5a760..94fc5929c9 100644
--- a/Lib/ctypes/test/test_callbacks.py
+++ b/Lib/ctypes/test/test_callbacks.py
-@@ -3,6 +3,7 @@ import unittest
+@@ -5,6 +5,7 @@ from test import support
from ctypes import *
from ctypes.test import need_symbol
import _ctypes_test
@@ -12,7 +41,7 @@ diff --git a/Lib/ctypes/test/test_callbacks.py b/Lib/ctypes/test/test_callbacks.
class Callbacks(unittest.TestCase):
functype = CFUNCTYPE
-@@ -176,6 +177,8 @@ class SampleCallbacksTestCase(unittest.TestCase):
+@@ -178,6 +179,8 @@ class SampleCallbacksTestCase(unittest.TestCase):
self.assertLess(diff, 0.01, "%s not less than 0.01" % diff)
@@ -21,7 +50,20 @@ diff --git a/Lib/ctypes/test/test_callbacks.py b/Lib/ctypes/test/test_callbacks.
def test_issue_8959_a(self):
from ctypes.util import find_library
libc_path = find_library("c")
+diff --git a/Lib/ctypes/test/test_find.py b/Lib/ctypes/test/test_find.py
+index 92ac1840ad..c8eb75dedd 100644
+--- a/Lib/ctypes/test/test_find.py
++++ b/Lib/ctypes/test/test_find.py
+@@ -116,6 +116,7 @@ class FindLibraryLinux(unittest.TestCase):
+ with unittest.mock.patch("ctypes.util._findSoname_ldconfig", lambda *args: None):
+ self.assertNotEqual(find_library('c'), None)
+
++ @unittest.skipIf(True, "ldconfig is not used on Guix")
+ def test_find_library_with_ld(self):
+ with unittest.mock.patch("ctypes.util._findSoname_ldconfig", lambda *args: None), \
+ unittest.mock.patch("ctypes.util._findLib_gcc", lambda *args: None):
diff --git a/Lib/ctypes/test/test_libc.py b/Lib/ctypes/test/test_libc.py
+index 56285b5ff8..c088ab3db8 100644
--- a/Lib/ctypes/test/test_libc.py
+++ b/Lib/ctypes/test/test_libc.py
@@ -2,6 +2,7 @@ import unittest
@@ -42,6 +84,7 @@ diff --git a/Lib/ctypes/test/test_libc.py b/Lib/ctypes/test/test_libc.py
comparefunc = CFUNCTYPE(c_int, POINTER(c_char), POINTER(c_char))
lib.my_qsort.argtypes = c_void_p, c_size_t, c_size_t, comparefunc
diff --git a/Lib/distutils/tests/test_archive_util.py b/Lib/distutils/tests/test_archive_util.py
+index e9aad0e40f..8bbaa51ee5 100644
--- a/Lib/distutils/tests/test_archive_util.py
+++ b/Lib/distutils/tests/test_archive_util.py
@@ -333,6 +333,7 @@ class ArchiveUtilTestCase(support.TempdirManager,
@@ -61,6 +104,7 @@ diff --git a/Lib/distutils/tests/test_archive_util.py b/Lib/distutils/tests/test
tmpdir = self._create_files()
base_name = os.path.join(self.mkdtemp(), 'archive')
diff --git a/Lib/distutils/tests/test_sdist.py b/Lib/distutils/tests/test_sdist.py
+index 23db126959..6e2329df7d 100644
--- a/Lib/distutils/tests/test_sdist.py
+++ b/Lib/distutils/tests/test_sdist.py
@@ -443,6 +443,7 @@ class SDistTestCase(BasePyPIRCCommandTestCase):
@@ -72,9 +116,10 @@ diff --git a/Lib/distutils/tests/test_sdist.py b/Lib/distutils/tests/test_sdist.
# now building a sdist
dist, cmd = self.get_cmd()
diff --git a/Lib/test/_test_multiprocessing.py b/Lib/test/_test_multiprocessing.py
+index e47905c863..31a5a9c308 100644
--- a/Lib/test/_test_multiprocessing.py
+++ b/Lib/test/_test_multiprocessing.py
-@@ -1473,6 +1473,7 @@ class _TestCondition(BaseTestCase):
+@@ -1577,6 +1577,7 @@ class _TestCondition(BaseTestCase):
if pid is not None:
os.kill(pid, signal.SIGINT)
@@ -82,10 +127,19 @@ diff --git a/Lib/test/_test_multiprocessing.py b/Lib/test/_test_multiprocessing.
def test_wait_result(self):
if isinstance(self, ProcessesMixin) and sys.platform != 'win32':
pid = os.getpid()
+@@ -3905,6 +3906,7 @@ class _TestSharedMemory(BaseTestCase):
+ sms.close()
+
+ @unittest.skipIf(os.name != "posix", "not feasible in non-posix platforms")
++ @unittest.skipUnless(sys.stdin.isatty(), "KeyboardInterrupts require a TTY device")
+ def test_shared_memory_SharedMemoryServer_ignores_sigint(self):
+ # bpo-36368: protect SharedMemoryManager server process from
+ # KeyboardInterrupt signals.
diff --git a/Lib/test/test_asyncio/test_base_events.py b/Lib/test/test_asyncio/test_base_events.py
+index 533d5cc7f5..c4f860cc3b 100644
--- a/Lib/test/test_asyncio/test_base_events.py
+++ b/Lib/test/test_asyncio/test_base_events.py
-@@ -1323,6 +1323,8 @@ class BaseEventLoopWithSelectorTests(test_utils.TestCase):
+@@ -1341,6 +1341,8 @@ class BaseEventLoopWithSelectorTests(test_utils.TestCase):
self._test_create_connection_ip_addr(m_socket, False)
@patch_socket
@@ -95,9 +149,10 @@ diff --git a/Lib/test/test_asyncio/test_base_events.py b/Lib/test/test_asyncio/t
m_socket.getaddrinfo = socket.getaddrinfo
sock = m_socket.socket.return_value
diff --git a/Lib/test/test_generators.py b/Lib/test/test_generators.py
+index 3bf1522808..04bac8a7db 100644
--- a/Lib/test/test_generators.py
+++ b/Lib/test/test_generators.py
-@@ -34,6 +34,7 @@ class SignalAndYieldFromTest(unittest.TestCase):
+@@ -33,6 +33,7 @@ class SignalAndYieldFromTest(unittest.TestCase):
else:
return "FAILED"
@@ -105,30 +160,11 @@ diff --git a/Lib/test/test_generators.py b/Lib/test/test_generators.py
def test_raise_and_yield_from(self):
gen = self.generator1()
gen.send(None)
-diff --git a/Lib/test/test_normalization.py b/Lib/test/test_normalization.py
---- a/Lib/test/test_normalization.py
-+++ b/Lib/test/test_normalization.py
-@@ -2,6 +2,7 @@ from test.support import open_urlresource
- import unittest
-
- from http.client import HTTPException
-+from urllib.error import URLError
- import sys
- from unicodedata import normalize, unidata_version
-
-@@ -43,6 +44,8 @@ class NormalizationTest(unittest.TestCase):
- except PermissionError:
- self.skipTest(f"Permission error when downloading {TESTDATAURL} "
- f"into the test data directory")
-+ except URLError:
-+ self.skipTest("DNS lookups are not enabled.")
- except (OSError, HTTPException):
- self.fail(f"Could not retrieve {TESTDATAURL}")
-
diff --git a/Lib/test/test_pathlib.py b/Lib/test/test_pathlib.py
+index 3da35710b9..5404f9193d 100644
--- a/Lib/test/test_pathlib.py
+++ b/Lib/test/test_pathlib.py
-@@ -2134,8 +2134,7 @@ class PosixPathTest(_BasePathTest, unittest.TestCase):
+@@ -2408,8 +2408,7 @@ class PosixPathTest(_BasePathTest, unittest.TestCase):
self.assertEqual(given, expect)
self.assertEqual(set(p.rglob("FILEd*")), set())
@@ -139,9 +175,10 @@ diff --git a/Lib/test/test_pathlib.py b/Lib/test/test_pathlib.py
P = self.cls
support.import_module('pwd')
diff --git a/Lib/test/test_pdb.py b/Lib/test/test_pdb.py
+index 8016f81e5a..10190486b4 100644
--- a/Lib/test/test_pdb.py
+++ b/Lib/test/test_pdb.py
-@@ -1150,11 +1150,11 @@ def test_pdb_issue_20766():
+@@ -1219,11 +1219,11 @@ def test_pdb_issue_20766():
> <doctest test.test_pdb.test_pdb_issue_20766[0]>(6)test_function()
-> print('pdb %d: %s' % (i, sess._previous_sigint_handler))
(Pdb) continue
@@ -156,9 +193,10 @@ diff --git a/Lib/test/test_pdb.py b/Lib/test/test_pdb.py
diff --git a/Lib/test/test_regrtest.py b/Lib/test/test_regrtest.py
+index a77638b10a..2069b349a8 100644
--- a/Lib/test/test_regrtest.py
+++ b/Lib/test/test_regrtest.py
-@@ -762,6 +762,7 @@ class ArgsTestCase(BaseTestCase):
+@@ -811,6 +811,7 @@ class ArgsTestCase(BaseTestCase):
output = self.run_tests('--fromfile', filename)
self.check_executed_tests(output, tests)
@@ -166,7 +204,7 @@ diff --git a/Lib/test/test_regrtest.py b/Lib/test/test_regrtest.py
def test_interrupted(self):
code = TEST_INTERRUPTED
test = self.create_test('sigint', code=code)
-@@ -779,6 +780,7 @@ class ArgsTestCase(BaseTestCase):
+@@ -828,6 +829,7 @@ class ArgsTestCase(BaseTestCase):
% (self.TESTNAME_REGEX, len(tests)))
self.check_line(output, regex)
@@ -175,9 +213,10 @@ diff --git a/Lib/test/test_regrtest.py b/Lib/test/test_regrtest.py
# Issue #25373: test --slowest with an interrupted test
code = TEST_INTERRUPTED
diff --git a/Lib/test/test_resource.py b/Lib/test/test_resource.py
+index e5ece5284c..5299e54507 100644
--- a/Lib/test/test_resource.py
+++ b/Lib/test/test_resource.py
-@@ -145,6 +145,7 @@ class ResourceTest(unittest.TestCase):
+@@ -148,6 +148,7 @@ class ResourceTest(unittest.TestCase):
@unittest.skipUnless(hasattr(resource, 'prlimit'), 'no prlimit')
@support.requires_linux_version(2, 6, 36)
@@ -186,37 +225,75 @@ diff --git a/Lib/test/test_resource.py b/Lib/test/test_resource.py
self.assertRaises(TypeError, resource.prlimit)
self.assertRaises(ProcessLookupError, resource.prlimit,
diff --git a/Lib/test/test_shutil.py b/Lib/test/test_shutil.py
+index e19af64be0..1b893df6fa 100644
--- a/Lib/test/test_shutil.py
+++ b/Lib/test/test_shutil.py
-@@ -1143,6 +1143,7 @@ class TestShutil(unittest.TestCase):
+@@ -1427,6 +1427,7 @@ class TestArchives(BaseTest, unittest.TestCase):
+ base_name = os.path.join(tmpdir, 'archive')
self.assertRaises(ValueError, make_archive, base_name, 'xxx')
- @support.requires_zlib
-+ @unittest.skipIf(True, "getgrgid(0)[0] raises a KeyError on Guix")
++ @unittest.skipIf(True, "The Guix build container has no root user")
+ @support.requires_zlib()
def test_make_archive_owner_group(self):
# testing make_archive with owner and group, with various combinations
- # this works even if there's not gid/uid support
-@@ -1171,6 +1172,7 @@ class TestShutil(unittest.TestCase):
+@@ -1455,6 +1456,7 @@ class TestArchives(BaseTest, unittest.TestCase):
+ self.assertTrue(os.path.isfile(res))
- @support.requires_zlib
-+ @unittest.skipIf(True, "getgrgid(0)[0] raises a KeyError on Guix")
++ @unittest.skipIf(True, "The Guix build container has no root user")
+ @support.requires_zlib()
@unittest.skipUnless(UID_GID_SUPPORT, "Requires grp and pwd support")
def test_tarfile_root_owner(self):
- root_dir, base_dir = self._create_files()
+diff --git a/Lib/test/test_signal.py b/Lib/test/test_signal.py
+index 45553a6a42..55623f01a3 100644
+--- a/Lib/test/test_signal.py
++++ b/Lib/test/test_signal.py
+@@ -78,6 +78,7 @@ class PosixTests(unittest.TestCase):
+ self.assertLess(len(s), signal.NSIG)
+
+ @unittest.skipUnless(sys.executable, "sys.executable required.")
++ @unittest.skipUnless(sys.stdin.isatty(), "KeyboardInterrupts require a TTY device")
+ def test_keyboard_interrupt_exit_code(self):
+ """KeyboardInterrupt triggers exit via SIGINT."""
+ process = subprocess.run(
+@@ -128,6 +129,7 @@ class WindowsSignalTests(unittest.TestCase):
+ signal.signal(7, handler)
+
+ @unittest.skipUnless(sys.executable, "sys.executable required.")
++ @unittest.skipUnless(sys.stdin.isatty(), "KeyboardInterrupts require a TTY device")
+ def test_keyboard_interrupt_exit_code(self):
+ """KeyboardInterrupt triggers an exit using STATUS_CONTROL_C_EXIT."""
+ # We don't test via os.kill(os.getpid(), signal.CTRL_C_EVENT) here
+@@ -1245,6 +1247,7 @@ class StressTest(unittest.TestCase):
+
+ class RaiseSignalTest(unittest.TestCase):
+
++ @unittest.skipUnless(sys.stdin.isatty(), "KeyboardInterrupts require a TTY device")
+ def test_sigint(self):
+ with self.assertRaises(KeyboardInterrupt):
+ signal.raise_signal(signal.SIGINT)
+@@ -1275,6 +1278,7 @@ class RaiseSignalTest(unittest.TestCase):
+
+ class PidfdSignalTest(unittest.TestCase):
+
++ @unittest.skipUnless(sys.stdin.isatty(), "KeyboardInterrupts require a TTY device")
+ @unittest.skipUnless(
+ hasattr(signal, "pidfd_send_signal"),
+ "pidfd support not built in",
diff --git a/Lib/test/test_socket.py b/Lib/test/test_socket.py
+index aefba4f397..6c89f558d5 100755
--- a/Lib/test/test_socket.py
+++ b/Lib/test/test_socket.py
-@@ -875,6 +875,8 @@ class GeneralModuleTests(unittest.TestCase):
+@@ -1009,6 +1009,8 @@ class GeneralModuleTests(unittest.TestCase):
if not fqhn in all_host_names:
self.fail("Error testing host resolution mechanisms. (fqdn: %s, all: %s)" % (fqhn, repr(all_host_names)))
+ @unittest.skipUnless(support.is_resource_enabled('network'),
+ 'network is not enabled')
def test_host_resolution(self):
- for addr in [support.HOSTv4, '10.0.0.1', '255.255.255.255']:
+ for addr in [socket_helper.HOSTv4, '10.0.0.1', '255.255.255.255']:
self.assertEqual(socket.gethostbyname(addr), addr)
-@@ -1004,6 +1006,8 @@ class GeneralModuleTests(unittest.TestCase):
+@@ -1140,6 +1142,8 @@ class GeneralModuleTests(unittest.TestCase):
self.assertWarns(DeprecationWarning, socket.ntohs, k)
self.assertWarns(DeprecationWarning, socket.htons, k)
@@ -225,7 +302,7 @@ diff --git a/Lib/test/test_socket.py b/Lib/test/test_socket.py
def testGetServBy(self):
eq = self.assertEqual
# Find one service that exists, then check all the related interfaces.
-@@ -1358,6 +1362,8 @@ class GeneralModuleTests(unittest.TestCase):
+@@ -1489,6 +1493,8 @@ class GeneralModuleTests(unittest.TestCase):
raise
self.assertRaises(TypeError, s.ioctl, socket.SIO_LOOPBACK_FAST_PATH, None)
@@ -234,7 +311,7 @@ diff --git a/Lib/test/test_socket.py b/Lib/test/test_socket.py
def testGetaddrinfo(self):
try:
socket.getaddrinfo('localhost', 80)
-@@ -1440,6 +1446,8 @@ class GeneralModuleTests(unittest.TestCase):
+@@ -1571,6 +1577,8 @@ class GeneralModuleTests(unittest.TestCase):
# only IP addresses are allowed
self.assertRaises(OSError, socket.getnameinfo, ('mail.python.org',0), 0)
@@ -244,6 +321,7 @@ diff --git a/Lib/test/test_socket.py b/Lib/test/test_socket.py
'network is not enabled')
def test_idna(self):
diff --git a/Lib/test/test_spwd.py b/Lib/test/test_spwd.py
+index 07793c84c8..fec672bcbe 100644
--- a/Lib/test/test_spwd.py
+++ b/Lib/test/test_spwd.py
@@ -5,8 +5,7 @@ from test import support
@@ -267,9 +345,10 @@ diff --git a/Lib/test/test_spwd.py b/Lib/test/test_spwd.py
def test_getspnam_exception(self):
diff --git a/Lib/test/test_tarfile.py b/Lib/test/test_tarfile.py
+index 29cde91bf7..8d0f20e8bf 100644
--- a/Lib/test/test_tarfile.py
+++ b/Lib/test/test_tarfile.py
-@@ -2509,9 +2509,12 @@ def root_is_uid_gid_0():
+@@ -2607,9 +2607,12 @@ def root_is_uid_gid_0():
import pwd, grp
except ImportError:
return False
@@ -286,9 +365,10 @@ diff --git a/Lib/test/test_tarfile.py b/Lib/test/test_tarfile.py
return True
diff --git a/Lib/test/test_threading.py b/Lib/test/test_threading.py
+index c21cdf8eb7..6c9d575032 100644
--- a/Lib/test/test_threading.py
+++ b/Lib/test/test_threading.py
-@@ -1249,6 +1249,7 @@ class MiscTestCase(unittest.TestCase):
+@@ -1398,6 +1398,7 @@ class MiscTestCase(unittest.TestCase):
class InterruptMainTests(unittest.TestCase):
@@ -296,7 +376,7 @@ diff --git a/Lib/test/test_threading.py b/Lib/test/test_threading.py
def test_interrupt_main_subthread(self):
# Calling start_new_thread with a function that executes interrupt_main
# should raise KeyboardInterrupt upon completion.
-@@ -1260,6 +1261,8 @@ class InterruptMainTests(unittest.TestCase):
+@@ -1409,6 +1410,8 @@ class InterruptMainTests(unittest.TestCase):
t.join()
t.join()
@@ -305,10 +385,23 @@ diff --git a/Lib/test/test_threading.py b/Lib/test/test_threading.py
def test_interrupt_main_mainthread(self):
# Make sure that if interrupt_main is called in main thread that
# KeyboardInterrupt is raised instantly.
+diff --git a/Lib/test/test_unicodedata.py b/Lib/test/test_unicodedata.py
+index b552d2bd17..28b1144e15 100644
+--- a/Lib/test/test_unicodedata.py
++++ b/Lib/test/test_unicodedata.py
+@@ -309,6 +309,7 @@ class UnicodeMiscTest(UnicodeDatabaseTest):
+ self.assertEqual(len(lines), 1,
+ r"\u%.4x should not be a linebreak" % i)
+
++@requires_resource('network')
+ class NormalizationTest(unittest.TestCase):
+ @staticmethod
+ def check_version(testfile):
diff --git a/Tools/scripts/run_tests.py b/Tools/scripts/run_tests.py
+index bcfa5e943b..1f2484971b 100644
--- a/Tools/scripts/run_tests.py
+++ b/Tools/scripts/run_tests.py
-@@ -39,7 +39,7 @@ def main(regrtest_args):
+@@ -41,7 +41,7 @@ def main(regrtest_args):
if not any(is_multiprocess_flag(arg) for arg in regrtest_args):
args.extend(['-j', '0']) # Use all CPU cores
if not any(is_resource_use_flag(arg) for arg in regrtest_args):
@@ -317,3 +410,6 @@ diff --git a/Tools/scripts/run_tests.py b/Tools/scripts/run_tests.py
args.extend(regrtest_args)
print(' '.join(args))
if sys.platform == 'win32':
+--
+2.29.2
+
diff --git a/gnu/packages/patches/python-3-hurd-configure.patch b/gnu/packages/patches/python-3-hurd-configure.patch
new file mode 100644
index 0000000000..aa25a401c5
--- /dev/null
+++ b/gnu/packages/patches/python-3-hurd-configure.patch
@@ -0,0 +1,27 @@
+Upstream status: Not upstreamed.
+
+The build system refuses to cross-compile for unknown targets
+even though it works fine. Add GNU/Hurd target.
+
+--- Python-3.8.5/configure.orig 2020-10-26 14:06:09.665423525 +0100
++++ Python-3.8.5/configure 2020-10-26 14:08:30.987765738 +0100
+@@ -3278,6 +3278,9 @@
+ *-*-vxworks*)
+ ac_sys_system=VxWorks
+ ;;
++ *-*-gnu)
++ ac_sys_system=GNU
++ ;;
+ *)
+ # for now, limit cross builds to known configurations
+ MACHDEP="unknown"
+@@ -3328,6 +3331,9 @@
+ *-*-vxworks*)
+ _host_cpu=$host_cpu
+ ;;
++ *-*-gnu)
++ _host_cpu=$host_cpu
++ ;;
+ *)
+ # for now, limit cross builds to known configurations
+ MACHDEP="unknown"
diff --git a/gnu/packages/patches/python-3-no-static-lib.patch b/gnu/packages/patches/python-3-no-static-lib.patch
new file mode 100644
index 0000000000..b44dbc976c
--- /dev/null
+++ b/gnu/packages/patches/python-3-no-static-lib.patch
@@ -0,0 +1,75 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: David Malcolm <dmalcolm@redhat.com>
+Date: Mon, 18 Jan 2010 17:59:07 +0000
+Subject: [PATCH] 00111: Don't try to build a libpythonMAJOR.MINOR.a
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Downstream only: not appropriate for upstream.
+
+See https://bugzilla.redhat.com/show_bug.cgi?id=556092
+
+Co-authored-by: David Malcolm <dmalcolm@redhat.com>
+Co-authored-by: Bohuslav Kabrda <bkabrda@redhat.com>
+Co-authored-by: Matej Stuchlik <mstuchli@redhat.com>
+Co-authored-by: Robert Kuska <rkuska@redhat.com>
+Co-authored-by: Charalampos Stratakis <cstratak@redhat.com>
+Co-authored-by: Miro Hrončok <miro@hroncok.cz>
+---
+ Makefile.pre.in | 21 ++-------------------
+ 1 file changed, 2 insertions(+), 19 deletions(-)
+
+diff --git a/Makefile.pre.in b/Makefile.pre.in
+index 0c3981c132..5587422ec7 100644
+--- a/Makefile.pre.in
++++ b/Makefile.pre.in
+@@ -589,7 +589,7 @@ clinic: check-clean-src $(srcdir)/Modules/_blake2/blake2s_impl.c
+ $(PYTHON_FOR_REGEN) $(srcdir)/Tools/clinic/clinic.py --make --srcdir $(srcdir)
+
+ # Build the interpreter
+-$(BUILDPYTHON): Programs/python.o $(LIBRARY) $(LDLIBRARY) $(PY3LIBRARY) $(EXPORTSYMS)
++$(BUILDPYTHON): Programs/python.o $(LDLIBRARY) $(PY3LIBRARY) $(EXPORTSYMS)
+ $(LINKCC) $(PY_CORE_LDFLAGS) $(LINKFORSHARED) -o $@ Programs/python.o $(BLDLIBRARY) $(LIBS) $(MODLIBS) $(SYSLIBS)
+
+ platform: $(BUILDPYTHON) pybuilddir.txt
+@@ -637,12 +637,6 @@ sharedmods: $(BUILDPYTHON) pybuilddir.txt Modules/_math.o
+ _TCLTK_INCLUDES='$(TCLTK_INCLUDES)' _TCLTK_LIBS='$(TCLTK_LIBS)' \
+ $(PYTHON_FOR_BUILD) $(srcdir)/setup.py $$quiet build
+
+-
+-# Build static library
+-$(LIBRARY): $(LIBRARY_OBJS)
+- -rm -f $@
+- $(AR) $(ARFLAGS) $@ $(LIBRARY_OBJS)
+-
+ libpython$(LDVERSION).so: $(LIBRARY_OBJS) $(DTRACE_OBJS)
+ if test $(INSTSONAME) != $(LDLIBRARY); then \
+ $(BLDSHARED) -Wl,-h$(INSTSONAME) -o $(INSTSONAME) $(LIBRARY_OBJS) $(MODLIBS) $(SHLIBS) $(LIBC) $(LIBM); \
+@@ -724,7 +718,7 @@ Makefile Modules/config.c: Makefile.pre \
+ @echo "The Makefile was updated, you may need to re-run make."
+
+
+-Programs/_testembed: Programs/_testembed.o $(LIBRARY) $(LDLIBRARY) $(PY3LIBRARY) $(EXPORTSYMS)
++Programs/_testembed: Programs/_testembed.o $(LDLIBRARY) $(PY3LIBRARY) $(EXPORTSYMS)
+ $(LINKCC) $(PY_CORE_LDFLAGS) $(LINKFORSHARED) -o $@ Programs/_testembed.o $(BLDLIBRARY) $(LIBS) $(MODLIBS) $(SYSLIBS)
+
+ ############################################################################
+@@ -1652,17 +1646,6 @@ libainstall: @DEF_MAKE_RULE@ python-config
+ else true; \
+ fi; \
+ done
+- @if test -d $(LIBRARY); then :; else \
+- if test "$(PYTHONFRAMEWORKDIR)" = no-framework; then \
+- if test "$(SHLIB_SUFFIX)" = .dll; then \
+- $(INSTALL_DATA) $(LDLIBRARY) $(DESTDIR)$(LIBPL) ; \
+- else \
+- $(INSTALL_DATA) $(LIBRARY) $(DESTDIR)$(LIBPL)/$(LIBRARY) ; \
+- fi; \
+- else \
+- echo Skip install of $(LIBRARY) - use make frameworkinstall; \
+- fi; \
+- fi
+ $(INSTALL_DATA) Modules/config.c $(DESTDIR)$(LIBPL)/config.c
+ $(INSTALL_DATA) Programs/python.o $(DESTDIR)$(LIBPL)/python.o
+ $(INSTALL_DATA) $(srcdir)/Modules/config.c.in $(DESTDIR)$(LIBPL)/config.c.in
diff --git a/gnu/packages/patches/python-3.8-CVE-2021-3177.patch b/gnu/packages/patches/python-3.8-CVE-2021-3177.patch
deleted file mode 100644
index 01f6b52865..0000000000
--- a/gnu/packages/patches/python-3.8-CVE-2021-3177.patch
+++ /dev/null
@@ -1,194 +0,0 @@
-Fix CVE-2021-3177 for Python 3.8:
-
-https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-3177
-
-Patch copied from upstream source repository:
-
-https://github.com/python/cpython/commit/ece5dfd403dac211f8d3c72701fe7ba7b7aa5b5f
-
-From ece5dfd403dac211f8d3c72701fe7ba7b7aa5b5f Mon Sep 17 00:00:00 2001
-From: "Miss Islington (bot)"
- <31488909+miss-islington@users.noreply.github.com>
-Date: Mon, 18 Jan 2021 13:28:52 -0800
-Subject: [PATCH] closes bpo-42938: Replace snprintf with Python unicode
- formatting in ctypes param reprs. (GH-24248)
-
-(cherry picked from commit 916610ef90a0d0761f08747f7b0905541f0977c7)
-
-Co-authored-by: Benjamin Peterson <benjamin@python.org>
-
-Co-authored-by: Benjamin Peterson <benjamin@python.org>
----
- Lib/ctypes/test/test_parameters.py | 43 ++++++++++++++++
- .../2021-01-18-09-27-31.bpo-42938.4Zn4Mp.rst | 2 +
- Modules/_ctypes/callproc.c | 51 +++++++------------
- 3 files changed, 64 insertions(+), 32 deletions(-)
- create mode 100644 Misc/NEWS.d/next/Security/2021-01-18-09-27-31.bpo-42938.4Zn4Mp.rst
-
-diff --git a/Lib/ctypes/test/test_parameters.py b/Lib/ctypes/test/test_parameters.py
-index e4c25fd880cef..531894fdec838 100644
---- a/Lib/ctypes/test/test_parameters.py
-+++ b/Lib/ctypes/test/test_parameters.py
-@@ -201,6 +201,49 @@ def __dict__(self):
- with self.assertRaises(ZeroDivisionError):
- WorseStruct().__setstate__({}, b'foo')
-
-+ def test_parameter_repr(self):
-+ from ctypes import (
-+ c_bool,
-+ c_char,
-+ c_wchar,
-+ c_byte,
-+ c_ubyte,
-+ c_short,
-+ c_ushort,
-+ c_int,
-+ c_uint,
-+ c_long,
-+ c_ulong,
-+ c_longlong,
-+ c_ulonglong,
-+ c_float,
-+ c_double,
-+ c_longdouble,
-+ c_char_p,
-+ c_wchar_p,
-+ c_void_p,
-+ )
-+ self.assertRegex(repr(c_bool.from_param(True)), r"^<cparam '\?' at 0x[A-Fa-f0-9]+>$")
-+ self.assertEqual(repr(c_char.from_param(97)), "<cparam 'c' ('a')>")
-+ self.assertRegex(repr(c_wchar.from_param('a')), r"^<cparam 'u' at 0x[A-Fa-f0-9]+>$")
-+ self.assertEqual(repr(c_byte.from_param(98)), "<cparam 'b' (98)>")
-+ self.assertEqual(repr(c_ubyte.from_param(98)), "<cparam 'B' (98)>")
-+ self.assertEqual(repr(c_short.from_param(511)), "<cparam 'h' (511)>")
-+ self.assertEqual(repr(c_ushort.from_param(511)), "<cparam 'H' (511)>")
-+ self.assertRegex(repr(c_int.from_param(20000)), r"^<cparam '[li]' \(20000\)>$")
-+ self.assertRegex(repr(c_uint.from_param(20000)), r"^<cparam '[LI]' \(20000\)>$")
-+ self.assertRegex(repr(c_long.from_param(20000)), r"^<cparam '[li]' \(20000\)>$")
-+ self.assertRegex(repr(c_ulong.from_param(20000)), r"^<cparam '[LI]' \(20000\)>$")
-+ self.assertRegex(repr(c_longlong.from_param(20000)), r"^<cparam '[liq]' \(20000\)>$")
-+ self.assertRegex(repr(c_ulonglong.from_param(20000)), r"^<cparam '[LIQ]' \(20000\)>$")
-+ self.assertEqual(repr(c_float.from_param(1.5)), "<cparam 'f' (1.5)>")
-+ self.assertEqual(repr(c_double.from_param(1.5)), "<cparam 'd' (1.5)>")
-+ self.assertEqual(repr(c_double.from_param(1e300)), "<cparam 'd' (1e+300)>")
-+ self.assertRegex(repr(c_longdouble.from_param(1.5)), r"^<cparam ('d' \(1.5\)|'g' at 0x[A-Fa-f0-9]+)>$")
-+ self.assertRegex(repr(c_char_p.from_param(b'hihi')), "^<cparam 'z' \(0x[A-Fa-f0-9]+\)>$")
-+ self.assertRegex(repr(c_wchar_p.from_param('hihi')), "^<cparam 'Z' \(0x[A-Fa-f0-9]+\)>$")
-+ self.assertRegex(repr(c_void_p.from_param(0x12)), r"^<cparam 'P' \(0x0*12\)>$")
-+
- ################################################################
-
- if __name__ == '__main__':
-#diff --git a/Misc/NEWS.d/next/Security/2021-01-18-09-27-31.bpo-42938.4Zn4Mp.rst b/Misc/NEWS.d/next/Security/2021-01-18-09-27-31.bpo-42938.4Zn4Mp.rst
-#new file mode 100644
-#index 0000000000000..7df65a156feab
-#--- /dev/null
-#+++ b/Misc/NEWS.d/next/Security/2021-01-18-09-27-31.bpo-42938.4Zn4Mp.rst
-#@@ -0,0 +1,2 @@
-#+Avoid static buffers when computing the repr of :class:`ctypes.c_double` and
-#+:class:`ctypes.c_longdouble` values.
-diff --git a/Modules/_ctypes/callproc.c b/Modules/_ctypes/callproc.c
-index a9b8675cd951b..de75918d49f37 100644
---- a/Modules/_ctypes/callproc.c
-+++ b/Modules/_ctypes/callproc.c
-@@ -484,58 +484,47 @@ is_literal_char(unsigned char c)
- static PyObject *
- PyCArg_repr(PyCArgObject *self)
- {
-- char buffer[256];
- switch(self->tag) {
- case 'b':
- case 'B':
-- sprintf(buffer, "<cparam '%c' (%d)>",
-+ return PyUnicode_FromFormat("<cparam '%c' (%d)>",
- self->tag, self->value.b);
-- break;
- case 'h':
- case 'H':
-- sprintf(buffer, "<cparam '%c' (%d)>",
-+ return PyUnicode_FromFormat("<cparam '%c' (%d)>",
- self->tag, self->value.h);
-- break;
- case 'i':
- case 'I':
-- sprintf(buffer, "<cparam '%c' (%d)>",
-+ return PyUnicode_FromFormat("<cparam '%c' (%d)>",
- self->tag, self->value.i);
-- break;
- case 'l':
- case 'L':
-- sprintf(buffer, "<cparam '%c' (%ld)>",
-+ return PyUnicode_FromFormat("<cparam '%c' (%ld)>",
- self->tag, self->value.l);
-- break;
-
- case 'q':
- case 'Q':
-- sprintf(buffer,
--#ifdef MS_WIN32
-- "<cparam '%c' (%I64d)>",
--#else
-- "<cparam '%c' (%lld)>",
--#endif
-+ return PyUnicode_FromFormat("<cparam '%c' (%lld)>",
- self->tag, self->value.q);
-- break;
- case 'd':
-- sprintf(buffer, "<cparam '%c' (%f)>",
-- self->tag, self->value.d);
-- break;
-- case 'f':
-- sprintf(buffer, "<cparam '%c' (%f)>",
-- self->tag, self->value.f);
-- break;
--
-+ case 'f': {
-+ PyObject *f = PyFloat_FromDouble((self->tag == 'f') ? self->value.f : self->value.d);
-+ if (f == NULL) {
-+ return NULL;
-+ }
-+ PyObject *result = PyUnicode_FromFormat("<cparam '%c' (%R)>", self->tag, f);
-+ Py_DECREF(f);
-+ return result;
-+ }
- case 'c':
- if (is_literal_char((unsigned char)self->value.c)) {
-- sprintf(buffer, "<cparam '%c' ('%c')>",
-+ return PyUnicode_FromFormat("<cparam '%c' ('%c')>",
- self->tag, self->value.c);
- }
- else {
-- sprintf(buffer, "<cparam '%c' ('\\x%02x')>",
-+ return PyUnicode_FromFormat("<cparam '%c' ('\\x%02x')>",
- self->tag, (unsigned char)self->value.c);
- }
-- break;
-
- /* Hm, are these 'z' and 'Z' codes useful at all?
- Shouldn't they be replaced by the functionality of c_string
-@@ -544,22 +533,20 @@ PyCArg_repr(PyCArgObject *self)
- case 'z':
- case 'Z':
- case 'P':
-- sprintf(buffer, "<cparam '%c' (%p)>",
-+ return PyUnicode_FromFormat("<cparam '%c' (%p)>",
- self->tag, self->value.p);
- break;
-
- default:
- if (is_literal_char((unsigned char)self->tag)) {
-- sprintf(buffer, "<cparam '%c' at %p>",
-+ return PyUnicode_FromFormat("<cparam '%c' at %p>",
- (unsigned char)self->tag, (void *)self);
- }
- else {
-- sprintf(buffer, "<cparam 0x%02x at %p>",
-+ return PyUnicode_FromFormat("<cparam 0x%02x at %p>",
- (unsigned char)self->tag, (void *)self);
- }
-- break;
- }
-- return PyUnicode_FromString(buffer);
- }
-
- static PyMemberDef PyCArgType_members[] = {
diff --git a/gnu/packages/patches/python-3.8-fix-tests.patch b/gnu/packages/patches/python-3.8-fix-tests.patch
deleted file mode 100644
index 4fbdd444c7..0000000000
--- a/gnu/packages/patches/python-3.8-fix-tests.patch
+++ /dev/null
@@ -1,42 +0,0 @@
-diff --git a/Lib/test/_test_multiprocessing.py b/Lib/test/_test_multiprocessing.py
-index 1474624..887f8ee 100644
---- a/Lib/test/_test_multiprocessing.py
-+++ b/Lib/test/_test_multiprocessing.py
-@@ -3801,6 +3801,7 @@ class _TestSharedMemory(BaseTestCase):
- sms.close()
-
- @unittest.skipIf(os.name != "posix", "not feasible in non-posix platforms")
-+ @unittest.skipUnless(sys.stdin.isatty(), "KeyboardInterrupts require a TTY device")
- def test_shared_memory_SharedMemoryServer_ignores_sigint(self):
- # bpo-36368: protect SharedMemoryManager server process from
- # KeyboardInterrupt signals.
-diff --git a/Lib/test/test_signal.py b/Lib/test/test_signal.py
-index d41e94b..a1c15e7 100644
---- a/Lib/test/test_signal.py
-+++ b/Lib/test/test_signal.py
-@@ -78,6 +78,7 @@ class PosixTests(unittest.TestCase):
- self.assertLess(len(s), signal.NSIG)
-
- @unittest.skipUnless(sys.executable, "sys.executable required.")
-+ @unittest.skipUnless(sys.stdin.isatty(), "KeyboardInterrupts require a TTY device")
- def test_keyboard_interrupt_exit_code(self):
- """KeyboardInterrupt triggers exit via SIGINT."""
- process = subprocess.run(
-@@ -128,6 +129,7 @@ class WindowsSignalTests(unittest.TestCase):
- signal.signal(7, handler)
-
- @unittest.skipUnless(sys.executable, "sys.executable required.")
-+ @unittest.skipUnless(sys.stdin.isatty(), "KeyboardInterrupts require a TTY device")
- def test_keyboard_interrupt_exit_code(self):
- """KeyboardInterrupt triggers an exit using STATUS_CONTROL_C_EXIT."""
- # We don't test via os.kill(os.getpid(), signal.CTRL_C_EVENT) here
-@@ -1245,6 +1247,7 @@ class StressTest(unittest.TestCase):
-
- class RaiseSignalTest(unittest.TestCase):
-
-+ @unittest.skipUnless(sys.stdin.isatty(), "KeyboardInterrupts require a TTY device")
- def test_sigint(self):
- with self.assertRaises(KeyboardInterrupt):
- signal.raise_signal(signal.SIGINT)
---
-2.23.0
diff --git a/gnu/packages/patches/python-3.9-fix-tests.patch b/gnu/packages/patches/python-3.9-fix-tests.patch
deleted file mode 100644
index dc6b8c4cc8..0000000000
--- a/gnu/packages/patches/python-3.9-fix-tests.patch
+++ /dev/null
@@ -1,370 +0,0 @@
-See the discussion about the issues fixed here at:
-http://bugs.python.org/issue20868 .
-
-diff --git a/Lib/ctypes/test/test_callbacks.py b/Lib/ctypes/test/test_callbacks.py
---- a/Lib/ctypes/test/test_callbacks.py
-+++ b/Lib/ctypes/test/test_callbacks.py
-@@ -3,6 +3,7 @@ import unittest
- from ctypes import *
- from ctypes.test import need_symbol
- import _ctypes_test
-+import platform
-
- class Callbacks(unittest.TestCase):
- functype = CFUNCTYPE
-@@ -176,6 +177,8 @@ class SampleCallbacksTestCase(unittest.TestCase):
-
- self.assertLess(diff, 0.01, "%s not less than 0.01" % diff)
-
-+ @unittest.skipIf(platform.machine() in ['mips64'],
-+ "This test fails on this platform")
- def test_issue_8959_a(self):
- from ctypes.util import find_library
- libc_path = find_library("c")
-diff --git a/Lib/ctypes/test/test_libc.py b/Lib/ctypes/test/test_libc.py
---- a/Lib/ctypes/test/test_libc.py
-+++ b/Lib/ctypes/test/test_libc.py
-@@ -2,6 +2,7 @@ import unittest
-
- from ctypes import *
- import _ctypes_test
-+import platform
-
- lib = CDLL(_ctypes_test.__file__)
-
-@@ -17,6 +18,8 @@ class LibTest(unittest.TestCase):
- import math
- self.assertEqual(lib.my_sqrt(2.0), math.sqrt(2.0))
-
-+ @unittest.skipIf(platform.machine() in ['mips64'],
-+ "This test fails on this platform")
- def test_qsort(self):
- comparefunc = CFUNCTYPE(c_int, POINTER(c_char), POINTER(c_char))
- lib.my_qsort.argtypes = c_void_p, c_size_t, c_size_t, comparefunc
-diff --git a/Lib/distutils/tests/test_archive_util.py b/Lib/distutils/tests/test_archive_util.py
---- a/Lib/distutils/tests/test_archive_util.py
-+++ b/Lib/distutils/tests/test_archive_util.py
-@@ -333,6 +333,7 @@ class ArchiveUtilTestCase(support.TempdirManager,
- self.assertEqual(os.path.basename(res), 'archive.tar.xz')
- self.assertEqual(self._tarinfo(res), self._created_files)
-
-+ @unittest.skipIf(True, "getgrgid(0)[0] raises a KeyError on Guix")
- def test_make_archive_owner_group(self):
- # testing make_archive with owner and group, with various combinations
- # this works even if there's not gid/uid support
-@@ -362,6 +363,7 @@ class ArchiveUtilTestCase(support.TempdirManager,
-
- @unittest.skipUnless(ZLIB_SUPPORT, "Requires zlib")
- @unittest.skipUnless(UID_GID_SUPPORT, "Requires grp and pwd support")
-+ @unittest.skipIf(True, "getgrgid(0)[0] raises a KeyError on Guix")
- def test_tarfile_root_owner(self):
- tmpdir = self._create_files()
- base_name = os.path.join(self.mkdtemp(), 'archive')
-diff --git a/Lib/distutils/tests/test_sdist.py b/Lib/distutils/tests/test_sdist.py
---- a/Lib/distutils/tests/test_sdist.py
-+++ b/Lib/distutils/tests/test_sdist.py
-@@ -443,6 +443,7 @@ class SDistTestCase(BasePyPIRCCommandTestCase):
- "The tar command is not found")
- @unittest.skipIf(find_executable('gzip') is None,
- "The gzip command is not found")
-+ @unittest.skipIf(True, "getgrgid(0)[0] raises a KeyError on Guix")
- def test_make_distribution_owner_group(self):
- # now building a sdist
- dist, cmd = self.get_cmd()
-diff --git a/Lib/test/_test_multiprocessing.py b/Lib/test/_test_multiprocessing.py
---- a/Lib/test/_test_multiprocessing.py
-+++ b/Lib/test/_test_multiprocessing.py
-@@ -1473,6 +1473,7 @@ class _TestCondition(BaseTestCase):
- if pid is not None:
- os.kill(pid, signal.SIGINT)
-
-+ @unittest.skipIf(True, "This fails for unknown reasons on Guix")
- def test_wait_result(self):
- if isinstance(self, ProcessesMixin) and sys.platform != 'win32':
- pid = os.getpid()
-diff --git a/Lib/test/test_asyncio/test_base_events.py b/Lib/test/test_asyncio/test_base_events.py
---- a/Lib/test/test_asyncio/test_base_events.py
-+++ b/Lib/test/test_asyncio/test_base_events.py
-@@ -1323,6 +1323,8 @@ class BaseEventLoopWithSelectorTests(test_utils.TestCase):
- self._test_create_connection_ip_addr(m_socket, False)
-
- @patch_socket
-+ @unittest.skipUnless(support.is_resource_enabled('network'),
-+ 'network is not enabled')
- def test_create_connection_service_name(self, m_socket):
- m_socket.getaddrinfo = socket.getaddrinfo
- sock = m_socket.socket.return_value
-diff --git a/Lib/test/test_generators.py b/Lib/test/test_generators.py
---- a/Lib/test/test_generators.py
-+++ b/Lib/test/test_generators.py
-@@ -34,6 +34,7 @@ class SignalAndYieldFromTest(unittest.TestCase):
- else:
- return "FAILED"
-
-+ @unittest.skipIf(True, 'Keyboard interrupts do not work in the Guix build environment')
- def test_raise_and_yield_from(self):
- gen = self.generator1()
- gen.send(None)
-diff --git a/Lib/test/test_pathlib.py b/Lib/test/test_pathlib.py
---- a/Lib/test/test_pathlib.py
-+++ b/Lib/test/test_pathlib.py
-@@ -2134,8 +2134,7 @@ class PosixPathTest(_BasePathTest, unittest.TestCase):
- self.assertEqual(given, expect)
- self.assertEqual(set(p.rglob("FILEd*")), set())
-
-- @unittest.skipUnless(hasattr(pwd, 'getpwall'),
-- 'pwd module does not expose getpwall()')
-+ @unittest.skipIf(True, "Guix builder home is '/' which causes trouble for these tests")
- def test_expanduser(self):
- P = self.cls
- support.import_module('pwd')
-diff --git a/Lib/test/test_pdb.py b/Lib/test/test_pdb.py
---- a/Lib/test/test_pdb.py
-+++ b/Lib/test/test_pdb.py
-@@ -1150,11 +1150,11 @@ def test_pdb_issue_20766():
- > <doctest test.test_pdb.test_pdb_issue_20766[0]>(6)test_function()
- -> print('pdb %d: %s' % (i, sess._previous_sigint_handler))
- (Pdb) continue
-- pdb 1: <built-in function default_int_handler>
-+ pdb 1: Handlers.SIG_IGN
- > <doctest test.test_pdb.test_pdb_issue_20766[0]>(5)test_function()
- -> sess.set_trace(sys._getframe())
- (Pdb) continue
-- pdb 2: <built-in function default_int_handler>
-+ pdb 2: Handlers.SIG_IGN
- """
-
-
-diff --git a/Lib/test/test_regrtest.py b/Lib/test/test_regrtest.py
---- a/Lib/test/test_regrtest.py
-+++ b/Lib/test/test_regrtest.py
-@@ -762,6 +762,7 @@ class ArgsTestCase(BaseTestCase):
- output = self.run_tests('--fromfile', filename)
- self.check_executed_tests(output, tests)
-
-+ @unittest.skipIf(True, 'Keyboard interrupts do not work in the Guix build environment.')
- def test_interrupted(self):
- code = TEST_INTERRUPTED
- test = self.create_test('sigint', code=code)
-@@ -779,6 +780,7 @@ class ArgsTestCase(BaseTestCase):
- % (self.TESTNAME_REGEX, len(tests)))
- self.check_line(output, regex)
-
-+ @unittest.skipIf(True, 'Keyboard interrupts do not work in the Guix build environment.')
- def test_slowest_interrupted(self):
- # Issue #25373: test --slowest with an interrupted test
- code = TEST_INTERRUPTED
-diff --git a/Lib/test/test_resource.py b/Lib/test/test_resource.py
---- a/Lib/test/test_resource.py
-+++ b/Lib/test/test_resource.py
-@@ -145,6 +145,7 @@ class ResourceTest(unittest.TestCase):
-
- @unittest.skipUnless(hasattr(resource, 'prlimit'), 'no prlimit')
- @support.requires_linux_version(2, 6, 36)
-+ @unittest.skipIf(True, "Bug: the PermissionError is not raised")
- def test_prlimit(self):
- self.assertRaises(TypeError, resource.prlimit)
- self.assertRaises(ProcessLookupError, resource.prlimit,
-diff --git a/Lib/test/test_shutil.py b/Lib/test/test_shutil.py
---- a/Lib/test/test_shutil.py
-+++ b/Lib/test/test_shutil.py
-@@ -1428,6 +1428,7 @@ class TestArchives(BaseTest, unittest.TestCase):
- self.assertRaises(ValueError, make_archive, base_name, 'xxx')
-
- @support.requires_zlib()
-+ @unittest.skipIf(True, "getgrgid(0)[0] raises a KeyError on Guix")
- def test_make_archive_owner_group(self):
- # testing make_archive with owner and group, with various combinations
- # this works even if there's not gid/uid support
-@@ -1456,6 +1457,7 @@ class TestArchives(BaseTest, unittest.TestCase):
-
-
- @support.requires_zlib()
-+ @unittest.skipIf(True, "getgrgid(0)[0] raises a KeyError on Guix")
- @unittest.skipUnless(UID_GID_SUPPORT, "Requires grp and pwd support")
- def test_tarfile_root_owner(self):
- root_dir, base_dir = self._create_files()
-diff --git a/Lib/test/test_unicodedata.py b/Lib/test/test_unicodedata.py
---- a/Lib/test/test_unicodedata.py
-+++ b/Lib/test/test_unicodedata.py
-@@ -320,6 +320,7 @@ class NormalizationTest(unittest.TestCase):
- data = [int(x, 16) for x in data.split(" ")]
- return "".join([chr(x) for x in data])
-
-+ @unittest.skipIf(True, 'Network is not available in the Guix build environment')
- def test_normalization(self):
- TESTDATAFILE = "NormalizationTest.txt"
- TESTDATAURL = f"http://www.pythontest.net/unicode/{unicodedata.unidata_version}/{TESTDATAFILE}"
-diff --git a/Lib/test/test_socket.py b/Lib/test/test_socket.py
---- a/Lib/test/test_socket.py
-+++ b/Lib/test/test_socket.py
-@@ -875,6 +875,8 @@ class GeneralModuleTests(unittest.TestCase):
- if not fqhn in all_host_names:
- self.fail("Error testing host resolution mechanisms. (fqdn: %s, all: %s)" % (fqhn, repr(all_host_names)))
-
-+ @unittest.skipUnless(support.is_resource_enabled('network'),
-+ 'network is not enabled')
- def test_host_resolution(self):
- for addr in [support.HOSTv4, '10.0.0.1', '255.255.255.255']:
- self.assertEqual(socket.gethostbyname(addr), addr)
-@@ -1004,6 +1006,8 @@ class GeneralModuleTests(unittest.TestCase):
- self.assertWarns(DeprecationWarning, socket.ntohs, k)
- self.assertWarns(DeprecationWarning, socket.htons, k)
-
-+ @unittest.skipUnless(os.path.exists("/etc/services"),
-+ "getservbyname uses /etc/services, which is not in the chroot")
- def testGetServBy(self):
- eq = self.assertEqual
- # Find one service that exists, then check all the related interfaces.
-@@ -1358,6 +1362,8 @@ class GeneralModuleTests(unittest.TestCase):
- raise
- self.assertRaises(TypeError, s.ioctl, socket.SIO_LOOPBACK_FAST_PATH, None)
-
-+ @unittest.skipUnless(os.path.exists("/etc/gai.conf"),
-+ "getaddrinfo() will fail")
- def testGetaddrinfo(self):
- try:
- socket.getaddrinfo('localhost', 80)
-@@ -1440,6 +1446,8 @@ class GeneralModuleTests(unittest.TestCase):
- # only IP addresses are allowed
- self.assertRaises(OSError, socket.getnameinfo, ('mail.python.org',0), 0)
-
-+ @unittest.skipUnless(os.path.exists("/etc/gai.conf"),
-+ "getaddrinfo() will fail")
- @unittest.skipUnless(support.is_resource_enabled('network'),
- 'network is not enabled')
- def test_idna(self):
-diff --git a/Lib/test/test_spwd.py b/Lib/test/test_spwd.py
---- a/Lib/test/test_spwd.py
-+++ b/Lib/test/test_spwd.py
-@@ -5,8 +5,7 @@ from test import support
- spwd = support.import_module('spwd')
-
-
--@unittest.skipUnless(hasattr(os, 'geteuid') and os.geteuid() == 0,
-- 'root privileges required')
-+@unittest.skipUnless(os.path.exists("/etc/shadow"), 'spwd tests require /etc/shadow')
- class TestSpwdRoot(unittest.TestCase):
-
- def test_getspall(self):
-@@ -56,8 +55,7 @@ class TestSpwdRoot(unittest.TestCase):
- self.assertRaises(TypeError, spwd.getspnam, bytes_name)
-
-
--@unittest.skipUnless(hasattr(os, 'geteuid') and os.geteuid() != 0,
-- 'non-root user required')
-+@unittest.skipUnless(os.path.exists("/etc/shadow"), 'spwd tests require /etc/shadow')
- class TestSpwdNonRoot(unittest.TestCase):
-
- def test_getspnam_exception(self):
-diff --git a/Lib/test/test_tarfile.py b/Lib/test/test_tarfile.py
---- a/Lib/test/test_tarfile.py
-+++ b/Lib/test/test_tarfile.py
-@@ -2509,9 +2509,12 @@ def root_is_uid_gid_0():
- import pwd, grp
- except ImportError:
- return False
-- if pwd.getpwuid(0)[0] != 'root':
-- return False
-- if grp.getgrgid(0)[0] != 'root':
-+ try:
-+ if pwd.getpwuid(0)[0] != 'root':
-+ return False
-+ if grp.getgrgid(0)[0] != 'root':
-+ return False
-+ except KeyError:
- return False
- return True
-
-diff --git a/Lib/test/test_threading.py b/Lib/test/test_threading.py
---- a/Lib/test/test_threading.py
-+++ b/Lib/test/test_threading.py
-@@ -1249,6 +1249,7 @@ class MiscTestCase(unittest.TestCase):
-
-
- class InterruptMainTests(unittest.TestCase):
-+ @unittest.skipIf(True, 'Keyboard interrupts do not work in the Guix build container.')
- def test_interrupt_main_subthread(self):
- # Calling start_new_thread with a function that executes interrupt_main
- # should raise KeyboardInterrupt upon completion.
-@@ -1260,6 +1261,8 @@ class InterruptMainTests(unittest.TestCase):
- t.join()
- t.join()
-
-+
-+ @unittest.skipIf(True, 'Keyboard interrupts do not work in the Guix build container.')
- def test_interrupt_main_mainthread(self):
- # Make sure that if interrupt_main is called in main thread that
- # KeyboardInterrupt is raised instantly.
-diff --git a/Tools/scripts/run_tests.py b/Tools/scripts/run_tests.py
---- a/Tools/scripts/run_tests.py
-+++ b/Tools/scripts/run_tests.py
-@@ -39,7 +39,7 @@ def main(regrtest_args):
- if not any(is_multiprocess_flag(arg) for arg in regrtest_args):
- args.extend(['-j', '0']) # Use all CPU cores
- if not any(is_resource_use_flag(arg) for arg in regrtest_args):
-- args.extend(['-u', 'all,-largefile,-audio,-gui'])
-+ args.extend(['-u', 'all,-largefile,-audio,-gui,-network'])
- args.extend(regrtest_args)
- print(' '.join(args))
- if sys.platform == 'win32':
-diff --git a/Lib/test/_test_multiprocessing.py b/Lib/test/_test_multiprocessing.py
-index 1474624..887f8ee 100644
---- a/Lib/test/_test_multiprocessing.py
-+++ b/Lib/test/_test_multiprocessing.py
-@@ -3801,6 +3801,7 @@ class _TestSharedMemory(BaseTestCase):
- sms.close()
-
- @unittest.skipIf(os.name != "posix", "not feasible in non-posix platforms")
-+ @unittest.skipUnless(sys.stdin.isatty(), "KeyboardInterrupts require a TTY device")
- def test_shared_memory_SharedMemoryServer_ignores_sigint(self):
- # bpo-36368: protect SharedMemoryManager server process from
- # KeyboardInterrupt signals.
-diff --git a/Lib/test/test_signal.py b/Lib/test/test_signal.py
-index d41e94b..a1c15e7 100644
---- a/Lib/test/test_signal.py
-+++ b/Lib/test/test_signal.py
-@@ -78,6 +78,7 @@ class PosixTests(unittest.TestCase):
- self.assertLess(len(s), signal.NSIG)
-
- @unittest.skipUnless(sys.executable, "sys.executable required.")
-+ @unittest.skipUnless(sys.stdin.isatty(), "KeyboardInterrupts require a TTY device")
- def test_keyboard_interrupt_exit_code(self):
- """KeyboardInterrupt triggers exit via SIGINT."""
- process = subprocess.run(
-@@ -128,6 +129,7 @@ class WindowsSignalTests(unittest.TestCase):
- signal.signal(7, handler)
-
- @unittest.skipUnless(sys.executable, "sys.executable required.")
-+ @unittest.skipUnless(sys.stdin.isatty(), "KeyboardInterrupts require a TTY device")
- def test_keyboard_interrupt_exit_code(self):
- """KeyboardInterrupt triggers an exit using STATUS_CONTROL_C_EXIT."""
- # We don't test via os.kill(os.getpid(), signal.CTRL_C_EVENT) here
-@@ -1245,6 +1247,7 @@ class StressTest(unittest.TestCase):
-
- class RaiseSignalTest(unittest.TestCase):
-
-+ @unittest.skipUnless(sys.stdin.isatty(), "KeyboardInterrupts require a TTY device")
- def test_sigint(self):
- with self.assertRaises(KeyboardInterrupt):
- signal.raise_signal(signal.SIGINT)
-@@ -1279,6 +1279,7 @@ class PidfdSignalTest(unittest.TestCase):
- hasattr(signal, "pidfd_send_signal"),
- "pidfd support not built in",
- )
-+ @unittest.skipUnless(sys.stdin.isatty(), "KeyboardInterrupts require a TTY device")
- def test_pidfd_send_signal(self):
- with self.assertRaises(OSError) as cm:
- signal.pidfd_send_signal(0, signal.SIGINT)
-diff --git a/Lib/ctypes/test/test_find.py b/Lib/ctypes/test/test_find.py
-index 92ac184..49eec2c 100644
---- a/Lib/ctypes/test/test_find.py
-+++ b/Lib/ctypes/test/test_find.py
-@@ -116,6 +116,7 @@ class FindLibraryLinux(unittest.TestCase):
- with unittest.mock.patch("ctypes.util._findSoname_ldconfig", lambda *args: None):
- self.assertNotEqual(find_library('c'), None)
-
-+ @unittest.skipIf(True, "This fails for unknown reasons on Guix")
- def test_find_library_with_ld(self):
- with unittest.mock.patch("ctypes.util._findSoname_ldconfig", lambda *args: None), \
- unittest.mock.patch("ctypes.util._findLib_gcc", lambda *args: None):
diff --git a/gnu/packages/patches/python-babel-fix-parse-future-test.patch b/gnu/packages/patches/python-babel-fix-parse-future-test.patch
new file mode 100644
index 0000000000..8a90166ec5
--- /dev/null
+++ b/gnu/packages/patches/python-babel-fix-parse-future-test.patch
@@ -0,0 +1,68 @@
+From 7bdaa28a55e8d8228d5434effa4b1473ab7b3669 Mon Sep 17 00:00:00 2001
+From: Felix Schwarz <felix.schwarz@oss.schwarz.eu>
+Date: Tue, 5 May 2020 08:05:56 +0000
+Subject: [PATCH] fix tests when using Python 3.9a6
+
+In Python 3.9a6 integer values for future flags were changed to prevent
+collision with compiler flags. We need to retrieve these at runtime so
+the test suite works with Python <= 3.8 as well as Python 3.9.
+---
+ tests/test_util.py | 17 ++++++++++++-----
+ 1 file changed, 12 insertions(+), 5 deletions(-)
+
+diff --git a/tests/test_util.py b/tests/test_util.py
+index a6a4450c..b9343aaa 100644
+--- a/tests/test_util.py
++++ b/tests/test_util.py
+@@ -11,6 +11,7 @@
+ # individuals. For the exact contribution history, see the revision
+ # history and logs, available at http://babel.edgewall.org/log/.
+
++import __future__
+ import unittest
+
+ import pytest
+@@ -20,6 +21,12 @@
+ from babel.util import parse_future_flags
+
+
++class _FF:
++ division = __future__.division.compiler_flag
++ print_function = __future__.print_function.compiler_flag
++ with_statement = __future__.with_statement.compiler_flag
++ unicode_literals = __future__.unicode_literals.compiler_flag
++
+ def test_distinct():
+ assert list(util.distinct([1, 2, 1, 3, 4, 4])) == [1, 2, 3, 4]
+ assert list(util.distinct('foobar')) == ['f', 'o', 'b', 'a', 'r']
+@@ -70,25 +77,25 @@ def test_parse_encoding_non_ascii():
+ from __future__ import print_function,
+ division, with_statement,
+ unicode_literals
+-''', 0x10000 | 0x2000 | 0x8000 | 0x20000),
++''', _FF.print_function | _FF.division | _FF.with_statement | _FF.unicode_literals),
+ ('''
+ from __future__ import print_function, division
+ print('hello')
+-''', 0x10000 | 0x2000),
++''', _FF.print_function | _FF.division),
+ ('''
+ from __future__ import print_function, division, unknown,,,,,
+ print 'hello'
+-''', 0x10000 | 0x2000),
++''', _FF.print_function | _FF.division),
+ ('''
+ from __future__ import (
+ print_function,
+ division)
+-''', 0x10000 | 0x2000),
++''', _FF.print_function | _FF.division),
+ ('''
+ from __future__ import \\
+ print_function, \\
+ division
+-''', 0x10000 | 0x2000),
++''', _FF.print_function | _FF.division),
+ ])
+ def test_parse_future(source, result):
+ fp = BytesIO(source.encode('latin-1'))
diff --git a/gnu/packages/patches/python-chai-drop-python2.patch b/gnu/packages/patches/python-chai-drop-python2.patch
new file mode 100644
index 0000000000..0eb980e5db
--- /dev/null
+++ b/gnu/packages/patches/python-chai-drop-python2.patch
@@ -0,0 +1,32 @@
+Patch copied from Gentoo removing obsolete Python2 code.
+
+--- a/chai/chai.py
++++ b/chai/chai.py
+@@ -62,11 +62,6 @@
+ try:
+ func(self, *args, **kwargs)
+ except UnexpectedCall as e:
+- # if this is not python3, use python2 syntax
+- if not hasattr(e, '__traceback__'):
+- from .python2 import reraise
+- reraise(
+- AssertionError, '\n\n' + str(e), sys.exc_info()[-1])
+ exc = AssertionError('\n\n' + str(e))
+ setattr(exc, '__traceback__', sys.exc_info()[-1])
+ raise exc
+--- a/chai/python2.py
++++ b/chai/python2.py
+@@ -1,3 +0,0 @@
+-
+-def reraise(exc, msg, traceback):
+- raise exc, msg, traceback
+--- a/chai.egg-info/SOURCES.txt
++++ b/chai.egg-info/SOURCES.txt
+@@ -10,7 +10,6 @@
+ chai/exception.py
+ chai/expectation.py
+ chai/mock.py
+-chai/python2.py
+ chai/spy.py
+ chai/stub.py
+ chai.egg-info/PKG-INFO
diff --git a/gnu/packages/patches/python-docopt-pytest6-compat.patch b/gnu/packages/patches/python-docopt-pytest6-compat.patch
new file mode 100644
index 0000000000..acd4955778
--- /dev/null
+++ b/gnu/packages/patches/python-docopt-pytest6-compat.patch
@@ -0,0 +1,29 @@
+https://sources.debian.org/data/main/d/docopt/0.6.2-3/debian/patches/pytest6
+
+From: Michael R. Crusoe <crusoe@debian.org>
+Subject: fix for pytest 6.x comptability
+Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=979285
+
+--- docopt.orig/conftest.py
++++ docopt/conftest.py
+@@ -11,6 +11,8 @@
+
+ def pytest_collect_file(path, parent):
+ if path.ext == ".docopt" and path.basename.startswith("test"):
++ if hasattr(DocoptTestFile, "from_parent"):
++ return DocoptTestFile.from_parent(parent, fspath=path)
+ return DocoptTestFile(path, parent)
+
+
+@@ -41,7 +43,10 @@
+ for name, doc, cases in parse_test(raw):
+ name = self.fspath.purebasename
+ for case in cases:
+- yield DocoptTestItem("%s(%d)" % (name, index), self, doc, case)
++ if hasattr(DocoptTestItem, "from_parent"):
++ yield DocoptTestItem.from_parent(self, name="%s(%d)" % (name, index), doc=doc, case=case)
++ else:
++ yield DocoptTestItem("%s(%d)" % (name, index), self, doc, case)
+ index += 1
+
+
diff --git a/gnu/packages/patches/python-fixtures-remove-monkeypatch-test.patch b/gnu/packages/patches/python-fixtures-remove-monkeypatch-test.patch
new file mode 100644
index 0000000000..4ffe9b373d
--- /dev/null
+++ b/gnu/packages/patches/python-fixtures-remove-monkeypatch-test.patch
@@ -0,0 +1,59 @@
+https://sources.debian.org/data/main/p/python-fixtures/3.0.0-4/debian/patches/remove-broken-monkey-patch-test.patch
+
+The last release was May 2016. This can be removed when the next release happens.
+
+Description: Remove broken monkey patch tests
+Author: Thomas Goirand <zigo@debian.org>
+Bug-Debian: https://bugs.debian.org/973239
+Forwarded: no
+Last-Update: 2020-11-12
+
+--- python-fixtures-3.0.0.orig/fixtures/tests/_fixtures/test_monkeypatch.py
++++ python-fixtures-3.0.0/fixtures/tests/_fixtures/test_monkeypatch.py
+@@ -181,22 +181,6 @@ class TestMonkeyPatch(testtools.TestCase
+ self._check_restored_static_or_class_method(oldmethod, oldmethod_inst,
+ C, 'foo_cls')
+
+- def test_patch_classmethod_with_classmethod(self):
+- oldmethod = C.foo_cls
+- oldmethod_inst = C().foo_cls
+- fixture = MonkeyPatch(
+- 'fixtures.tests._fixtures.test_monkeypatch.C.foo_cls',
+- D.bar_cls_args)
+- with fixture:
+- cls, target_class = C.foo_cls()
+- self.expectThat(cls, Is(D))
+- self.expectThat(target_class, Is(C))
+- cls, target_class = C().foo_cls()
+- self.expectThat(cls, Is(D))
+- self.expectThat(target_class, Is(C))
+- self._check_restored_static_or_class_method(oldmethod, oldmethod_inst,
+- C, 'foo_cls')
+-
+ def test_patch_classmethod_with_function(self):
+ oldmethod = C.foo_cls
+ oldmethod_inst = C().foo_cls
+@@ -212,23 +196,6 @@ class TestMonkeyPatch(testtools.TestCase
+ self._check_restored_static_or_class_method(oldmethod, oldmethod_inst,
+ C, 'foo_cls')
+
+- def test_patch_classmethod_with_boundmethod(self):
+- oldmethod = C.foo_cls
+- oldmethod_inst = C().foo_cls
+- d = D()
+- fixture = MonkeyPatch(
+- 'fixtures.tests._fixtures.test_monkeypatch.C.foo_cls',
+- d.bar_two_args)
+- with fixture:
+- slf, cls = C.foo_cls()
+- self.expectThat(slf, Is(d))
+- self.expectThat(cls, Is(C))
+- slf, cls = C().foo_cls()
+- self.expectThat(slf, Is(d))
+- self.expectThat(cls, Is(C))
+- self._check_restored_static_or_class_method(oldmethod, oldmethod_inst,
+- C, 'foo_cls')
+-
+ def test_patch_function_with_staticmethod(self):
+ oldmethod = fake_no_args
+ fixture = MonkeyPatch(
diff --git a/gnu/packages/patches/python-poppler-qt5-fix-build.patch b/gnu/packages/patches/python-poppler-qt5-fix-build.patch
new file mode 100644
index 0000000000..099bb86d2f
--- /dev/null
+++ b/gnu/packages/patches/python-poppler-qt5-fix-build.patch
@@ -0,0 +1,116 @@
+Patch taken from the upstream repository
+https://github.com/frescobaldi/python-poppler-qt5/issues/43
+
+From 92e5962ec3751ab051d0b655fd61afc7a1cf709e Mon Sep 17 00:00:00 2001
+From: Ben Greiner <code@bnavigator.de>
+Date: Thu, 4 Mar 2021 17:02:51 +0100
+Subject: [PATCH] map type QVector< QPair<TYPE, TYPE> > for
+ FormFieldChoice::choicesWithExportValues() (#45)
+
+---
+ types.sip | 93 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ 1 file changed, 93 insertions(+)
+
+diff --git a/types.sip b/types.sip
+index 239b8c9..81cb283 100644
+--- a/types.sip
++++ b/types.sip
+@@ -331,5 +331,98 @@ template <TYPE>
+ };
+
+
++/**
++ * Convert QVector< QPair<TYPE, TYPE> >
++ * from and to a Python list of a 2-item tuple
++ */
++
++template<TYPE>
++%MappedType QVector< QPair<TYPE, TYPE> >
++{
++%TypeHeaderCode
++#include <qvector.h>
++#include <qpair.h>
++%End
++
++%ConvertFromTypeCode
++ // Create the list.
++ PyObject *l;
++
++ if ((l = PyList_New(sipCpp->size())) == NULL)
++ return NULL;
++
++ // Set the list elements.
++ for (int i = 0; i < sipCpp->size(); ++i)
++ {
++ QPair<TYPE, TYPE>* p = new QPair<TYPE, TYPE>(sipCpp->at(i));
++ PyObject *ptuple = PyTuple_New(2);
++ PyObject *pfirst;
++ PyObject *psecond;
++
++ TYPE *sfirst = new TYPE(p->first);
++ if ((pfirst = sipConvertFromType(sfirst, sipType_TYPE, sipTransferObj)) == NULL)
++ {
++ Py_DECREF(l);
++ Py_DECREF(ptuple);
++ return NULL;
++ }
++ PyTuple_SET_ITEM(ptuple, 0, pfirst);
++
++ TYPE *ssecond = new TYPE(p->second);
++ if ((psecond = sipConvertFromType(ssecond, sipType_TYPE, sipTransferObj)) == NULL)
++ {
++ Py_DECREF(l);
++ Py_DECREF(ptuple);
++ Py_DECREF(pfirst);
++ return NULL;
++ }
++ PyTuple_SET_ITEM(ptuple, 1, psecond);
++
++ PyList_SET_ITEM(l, i, ptuple);
++ }
++
++ return l;
++%End
++
++%ConvertToTypeCode
++ const sipTypeDef* qpair_type = sipFindType("QPair<TYPE, TYPE>");
++
++ // Check the type if that is all that is required.
++ if (sipIsErr == NULL)
++ {
++ if (!PySequence_Check(sipPy))
++ return 0;
++
++ for (int i = 0; i < PySequence_Size(sipPy); ++i)
++ if (!sipCanConvertToType(PySequence_ITEM(sipPy, i), qpair_type, SIP_NOT_NONE))
++ return 0;
++
++ return 1;
++ }
++
++
++ QVector< QPair<TYPE, TYPE> > *qv = new QVector< QPair<TYPE, TYPE> >;
++
++ for (int i = 0; i < PySequence_Size(sipPy); ++i)
++ {
++ int state;
++ QPair<TYPE, TYPE> * p = reinterpret_cast< QPair<TYPE, TYPE> * >(sipConvertToType(PySequence_ITEM(sipPy, i), qpair_type, sipTransferObj, SIP_NOT_NONE, &state, sipIsErr));
++
++ if (*sipIsErr)
++ {
++ sipReleaseType(p, qpair_type, state);
++ delete qv;
++ return 0;
++ }
++ qv->append(*p);
++ sipReleaseType(p, qpair_type, state);
++ }
++
++ *sipCppPtr = qv;
++ return sipGetState(sipTransferObj);
++%End
++
++};
++
+
+ /* kate: indent-width 4; space-indent on; hl c++; indent-mode cstyle; */
diff --git a/gnu/packages/patches/python-pyflakes-test-location.patch b/gnu/packages/patches/python-pyflakes-test-location.patch
new file mode 100644
index 0000000000..ea2c50c82e
--- /dev/null
+++ b/gnu/packages/patches/python-pyflakes-test-location.patch
@@ -0,0 +1,42 @@
+This patch fixes test failure related to reported source code locations.
+It is a backport of this patch:
+
+ commit 6a5f38b5ab12260fde8a0463acd433bc2d34dbcf
+ Author: Louis Sautier <sautier.louis@gmail.com>
+ Date: Sat Oct 3 02:37:53 2020 +0200
+
+ Fix tests with Python 3.9, closes #549 (#586)
+
+ Stop allowing failures on Python nightly.
+
+diff --git a/pyflakes/test/test_api.py b/pyflakes/test/test_api.py
+index 128aa69..b728e65 100644
+--- a/pyflakes/test/test_api.py
++++ b/pyflakes/test/test_api.py
+@@ -515,6 +515,8 @@ def foo(bar=baz, bax):
+ if ERROR_HAS_LAST_LINE:
+ if PYPY and sys.version_info >= (3,):
+ column = 7
++ elif sys.version_info >= (3, 9):
++ column = 21
+ elif sys.version_info >= (3, 8):
+ column = 9
+ else:
+@@ -543,6 +545,8 @@ foo(bar=baz, bax)
+ if ERROR_HAS_LAST_LINE:
+ if PYPY and sys.version_info >= (3,):
+ column = 12
++ elif sys.version_info >= (3, 9):
++ column = 17
+ elif sys.version_info >= (3, 8):
+ column = 14
+ else:
+@@ -577,6 +581,8 @@ foo(bar=baz, bax)
+ position_end = 1
+ if PYPY:
+ column = 6
++ elif ver >= (3, 9):
++ column = 13
+ else:
+ column = 7
+ # Column has been "fixed" since 3.2.4 and 3.3.1
diff --git a/gnu/packages/patches/python-random2-getrandbits-test.patch b/gnu/packages/patches/python-random2-getrandbits-test.patch
new file mode 100644
index 0000000000..4f6c56027a
--- /dev/null
+++ b/gnu/packages/patches/python-random2-getrandbits-test.patch
@@ -0,0 +1,23 @@
+From 1bac6355d9c65de847cc445d782c466778b94fbd Mon Sep 17 00:00:00 2001
+From: "Robert T. McGibbon" <rmcgibbo@gmail.com>
+Date: Sun, 9 May 2021 11:18:23 -0400
+Subject: [PATCH] Update tests for python3.9
+
+---
+ src/tests.py | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/src/tests.py b/src/tests.py
+index d918891..4f2c3de 100644
+--- a/src/tests.py
++++ b/src/tests.py
+@@ -448,7 +448,8 @@ def test_genrandbits(self):
+ self.assertRaises(TypeError, self.gen.getrandbits)
+ self.assertRaises(TypeError, self.gen.getrandbits, 'a')
+ self.assertRaises(TypeError, self.gen.getrandbits, 1, 2)
+- self.assertRaises(ValueError, self.gen.getrandbits, 0)
++ if sys.version_info < (3, 9):
++ self.assertRaises(ValueError, self.gen.getrandbits, 0)
+ self.assertRaises(ValueError, self.gen.getrandbits, -1)
+
+ def test_randbelow_logic(self, _log=log, int=int):
diff --git a/gnu/packages/patches/python-testtools.patch b/gnu/packages/patches/python-testtools.patch
deleted file mode 100644
index 42536e50f9..0000000000
--- a/gnu/packages/patches/python-testtools.patch
+++ /dev/null
@@ -1,57 +0,0 @@
-https://github.com/testing-cabal/testtools/commit/29004731f9c480b7c44a9c2605513d50d372898f.patch
-Should be fixed in the next release
-
-From 29004731f9c480b7c44a9c2605513d50d372898f Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= <miro@hroncok.cz>
-Date: Thu, 17 May 2018 17:52:26 +0200
-Subject: [PATCH] Fix the tests on Python 3.7
-
-Exception's repr got changed not to include trailing comma
-
-Fixes https://github.com/testing-cabal/testtools/issues/270
----
- .travis.yml | 1 +
- testtools/tests/matchers/test_exception.py | 11 +++++++++--
- 2 files changed, 10 insertions(+), 2 deletions(-)
-
-diff --git a/.travis.yml b/.travis.yml
-index 7f1f4db7..784608e0 100644
---- a/.travis.yml
-+++ b/.travis.yml
-@@ -5,6 +5,7 @@ python:
- - "3.4"
- - "3.5"
- - "3.6"
-+ - "3.7-dev"
- - "pypy"
-
- install:
-diff --git a/testtools/tests/matchers/test_exception.py b/testtools/tests/matchers/test_exception.py
-index 6cd80af1..acd39252 100644
---- a/testtools/tests/matchers/test_exception.py
-+++ b/testtools/tests/matchers/test_exception.py
-@@ -32,15 +32,22 @@ class TestMatchesExceptionInstanceInterface(TestCase, TestMatchersInterface):
- matches_matches = [error_foo]
- matches_mismatches = [error_bar, error_base_foo]
-
-+ if sys.version_info >= (3, 7):
-+ # exception's repr has changed
-+ _e = ''
-+ else:
-+ _e = ','
-+
- str_examples = [
-- ("MatchesException(Exception('foo',))",
-+ ("MatchesException(Exception('foo'%s))" % _e,
- MatchesException(Exception('foo')))
- ]
- describe_examples = [
- ("%r is not a %r" % (Exception, ValueError),
- error_base_foo,
- MatchesException(ValueError("foo"))),
-- ("ValueError('bar',) has different arguments to ValueError('foo',).",
-+ ("ValueError('bar'%s) has different arguments to ValueError('foo'%s)."
-+ % (_e, _e),
- error_bar,
- MatchesException(ValueError("foo"))),
- ]
diff --git a/gnu/packages/patches/python-typing-inspect-fix.patch b/gnu/packages/patches/python-typing-inspect-fix.patch
new file mode 100644
index 0000000000..e6e28981b7
--- /dev/null
+++ b/gnu/packages/patches/python-typing-inspect-fix.patch
@@ -0,0 +1,38 @@
+From 16919e21936179e53df2f376c8b59b5fc44bd2dd Mon Sep 17 00:00:00 2001
+From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
+Date: Fri, 15 Jan 2021 09:22:52 -0500
+Subject: [PATCH] Fix for Python 3.9+.
+
+Fixes <https://github.com/ilevkivskyi/typing_inspect/issues/60>.
+
+Based on an idea in
+https://github.com/ilevkivskyi/typing_inspect/issues/60#issuecomment-683187584.
+---
+ typing_inspect.py | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/typing_inspect.py b/typing_inspect.py
+index 1ca68ed..31d05ee 100644
+--- a/typing_inspect.py
++++ b/typing_inspect.py
+@@ -21,7 +21,7 @@ LEGACY_TYPING = False
+
+ if NEW_TYPING:
+ from typing import (
+- Generic, Callable, Union, TypeVar, ClassVar, Tuple, _GenericAlias, ForwardRef
++ Generic, Callable, Union, TypeVar, ClassVar, Tuple, _GenericAlias, _SpecialGenericAlias, ForwardRef
+ )
+ from typing_extensions import Literal
+ else:
+@@ -75,7 +75,7 @@ def is_generic_type(tp):
+ """
+ if NEW_TYPING:
+ return (isinstance(tp, type) and issubclass(tp, Generic) or
+- isinstance(tp, _GenericAlias) and
++ (isinstance(tp, _GenericAlias) or isinstance(tp, _SpecialGenericAlias)) and
+ tp.__origin__ not in (Union, tuple, ClassVar, collections.abc.Callable))
+ return (isinstance(tp, GenericMeta) and not
+ isinstance(tp, (CallableMeta, TupleMeta)))
+--
+2.29.2
+
diff --git a/gnu/packages/patches/python-werkzeug-tests.patch b/gnu/packages/patches/python-werkzeug-tests.patch
new file mode 100644
index 0000000000..4eca53f30c
--- /dev/null
+++ b/gnu/packages/patches/python-werkzeug-tests.patch
@@ -0,0 +1,58 @@
+Do not leave open files behind as this triggers 'ResourceWarning' and leads
+these tests to fail.
+
+--- Werkzeug-1.0.1/tests/test_datastructures.py 2020-03-31 19:48:06.000000000 +0200
++++ Werkzeug-1.0.1/tests/test_datastructures.py 2021-11-21 18:19:11.304369878 +0100
+@@ -1238,9 +1238,10 @@
+ def test_save_to_pathlib_dst(self, tmp_path):
+ src = tmp_path / "src.txt"
+ src.write_text(u"test")
+- storage = self.storage_class(src.open("rb"))
+- dst = tmp_path / "dst.txt"
+- storage.save(dst)
++ with src.open("rb") as input:
++ storage = self.storage_class(input)
++ dst = tmp_path / "dst.txt"
++ storage.save(dst)
+ assert dst.read_text() == "test"
+
+ def test_save_to_bytes_io(self):
+@@ -1251,11 +1252,12 @@
+
+ def test_save_to_file(self, tmp_path):
+ path = tmp_path / "file.data"
+- storage = self.storage_class(io.BytesIO(b"one\ntwo"))
+- with path.open("wb") as dst:
+- storage.save(dst)
+- with path.open("rb") as src:
+- assert src.read() == b"one\ntwo"
++ with io.BytesIO(b"one\ntwo") as input:
++ storage = self.storage_class(input)
++ with path.open("wb") as dst:
++ storage.save(dst)
++ with path.open("rb") as src:
++ assert src.read() == b"one\ntwo"
+
+
+ @pytest.mark.parametrize("ranges", ([(0, 1), (-5, None)], [(5, None)]))
+--- Werkzeug-1.0.1/tests/test_formparser.py 2020-03-31 19:48:06.000000000 +0200
++++ Werkzeug-1.0.1/tests/test_formparser.py 2021-11-21 22:11:43.654622751 +0100
+@@ -27,7 +27,7 @@
+ from werkzeug.test import create_environ
+ from werkzeug.wrappers import Request
+ from werkzeug.wrappers import Response
+-
++import warnings
+
+ @Request.application
+ def form_data_consumer(request):
+@@ -242,6 +244,9 @@
+
+ class TestMultiPart(object):
+ def test_basic(self):
++ # Ignore leaked file descriptor of unknown origin.
++ warnings.filterwarnings(action="ignore", message="unclosed", category=ResourceWarning)
++
+ resources = join(dirname(__file__), "multipart")
+ client = Client(form_data_consumer, Response)
+
diff --git a/gnu/packages/patches/qtwebkit-fix-building-with-bison-3.7.patch b/gnu/packages/patches/qtwebkit-fix-building-with-bison-3.7.patch
new file mode 100644
index 0000000000..ddaf8e2849
--- /dev/null
+++ b/gnu/packages/patches/qtwebkit-fix-building-with-bison-3.7.patch
@@ -0,0 +1,54 @@
+Fix build with Bison 3.7
+
+https://bugs.gentoo.org/736499
+
+Patch copied from upstream source repository:
+
+https://github.com/qtwebkit/qtwebkit/commit/d92b11fea65364fefa700249bd3340e0cd4c5b31
+
+From d92b11fea65364fefa700249bd3340e0cd4c5b31 Mon Sep 17 00:00:00 2001
+From: Dmitry Shachnev <mitya57@gmail.com>
+Date: Tue, 4 Aug 2020 21:04:06 +0300
+Subject: [PATCH] Let Bison generate the header directly, to fix build with
+ Bison 3.7
+
+Starting with Bison 3.7, the generated C++ file #include's the header
+by default, instead of duplicating it. So we should not delete it.
+
+Remove the code to add #ifdef guards to the header, since Bison adds
+them itself since version 2.6.3.
+---
+ Source/WebCore/css/makegrammar.pl | 21 +--------------------
+ 1 file changed, 1 insertion(+), 20 deletions(-)
+
+diff --git a/Source/WebCore/css/makegrammar.pl b/Source/WebCore/css/makegrammar.pl
+index 5d63b08102eb5..9435701c70612 100644
+--- a/Source/WebCore/css/makegrammar.pl
++++ b/Source/WebCore/css/makegrammar.pl
+@@ -73,25 +73,6 @@
+ }
+
+ my $fileBase = File::Spec->join($outputDir, $filename);
+-my @bisonCommand = ($bison, "-d", "-p", $symbolsPrefix, $grammarFilePath, "-o", "$fileBase.cpp");
++my @bisonCommand = ($bison, "--defines=$fileBase.h", "-p", $symbolsPrefix, $grammarFilePath, "-o", "$fileBase.cpp");
+ push @bisonCommand, "--no-lines" if $^O eq "MSWin32"; # Work around bug in bison >= 3.0 on Windows where it puts backslashes into #line directives.
+ system(@bisonCommand) == 0 or die;
+-
+-open HEADER, ">$fileBase.h" or die;
+-print HEADER << "EOF";
+-#ifndef CSSGRAMMAR_H
+-#define CSSGRAMMAR_H
+-EOF
+-
+-open HPP, "<$fileBase.cpp.h" or open HPP, "<$fileBase.hpp" or die;
+-while (<HPP>) {
+- print HEADER;
+-}
+-close HPP;
+-
+-print HEADER "#endif\n";
+-close HEADER;
+-
+-unlink("$fileBase.cpp.h");
+-unlink("$fileBase.hpp");
+-
diff --git a/gnu/packages/patches/qtwebkit-fix-building-with-glib-2.68.patch b/gnu/packages/patches/qtwebkit-fix-building-with-glib-2.68.patch
new file mode 100644
index 0000000000..63840f4bbc
--- /dev/null
+++ b/gnu/packages/patches/qtwebkit-fix-building-with-glib-2.68.patch
@@ -0,0 +1,21 @@
+Fix building with glib 2.68:
+
+https://github.com/qtwebkit/qtwebkit/issues/1057
+
+Patch copied from upstream pull request:
+
+https://github.com/qtwebkit/qtwebkit/pull/1058/commits/5b698ba3faffd4e198a45be9fe74f53307395e4b
+
+diff -aurN qtwebkit-5.212.0-alpha4/Source/WTF/wtf/glib/GRefPtr.h qtwebkit-5.212.0-alpha4-mod/Source/WTF/wtf/glib/GRefPtr.h
+--- qtwebkit-5.212.0-alpha4/Source/WTF/wtf/glib/GRefPtr.h 2020-03-04 18:16:37.000000000 +0100
++++ qtwebkit-5.212.0-alpha4-mod/Source/WTF/wtf/glib/GRefPtr.h 2021-04-05 06:58:44.763328636 +0200
+@@ -29,9 +29,6 @@
+ #include <wtf/RefPtr.h>
+ #include <algorithm>
+
+-extern "C" void g_object_unref(gpointer);
+-extern "C" gpointer g_object_ref_sink(gpointer);
+-
+ namespace WTF {
+
+ enum GRefPtrAdoptType { GRefPtrAdopt };
diff --git a/gnu/packages/patches/qtwebkit-fix-building-with-icu-68.patch b/gnu/packages/patches/qtwebkit-fix-building-with-icu-68.patch
new file mode 100644
index 0000000000..acbfc4c4c8
--- /dev/null
+++ b/gnu/packages/patches/qtwebkit-fix-building-with-icu-68.patch
@@ -0,0 +1,152 @@
+Fix building with ICU > 68.
+
+https://bugs.gentoo.org/753260
+
+Patch adapted from Gentoo:
+
+https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=335f29d266c5b169ff1e781f9851a3a203f3198c
+
+From 335f29d266c5b169ff1e781f9851a3a203f3198c Mon Sep 17 00:00:00 2001
+From: Andreas Sturmlechner <asturm@gentoo.org>
+Date: Fri, 6 Nov 2020 09:22:15 +0100
+Subject: dev-qt/qtwebkit: Fix build with ICU-68
+
+Thanks-to: Lars Wendler <polynomial-c@gentoo.org>
+Closes: https://bugs.gentoo.org/753260
+Package-Manager: Portage-3.0.9, Repoman-3.0.2
+Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
+---
+ .../qtwebkit-5.212.0_pre20200309-icu-68.patch | 120 +++++++++++++++++++++
+ 1 file changed, 120 insertions(+)
+ create mode 100644 dev-qt/qtwebkit/files/qtwebkit-5.212.0_pre20200309-icu-68.patch
+
+(limited to 'dev-qt/qtwebkit/files/qtwebkit-5.212.0_pre20200309-icu-68.patch')
+
+diff --git a/Source/WebCore/platform/text/TextCodecICU.cpp b/Source/WebCore/platform/text/TextCodecICU.cpp
+index dd6ff06..e0f4bd7 100644
+--- a/Source/WebCore/platform/text/TextCodecICU.cpp
++++ b/Source/WebCore/platform/text/TextCodecICU.cpp
+@@ -308,7 +308,7 @@ void TextCodecICU::createICUConverter() const
+ m_converterICU = ucnv_open(m_canonicalConverterName, &err);
+ ASSERT(U_SUCCESS(err));
+ if (m_converterICU)
+- ucnv_setFallback(m_converterICU, TRUE);
++ ucnv_setFallback(m_converterICU, true);
+ }
+
+ int TextCodecICU::decodeToBuffer(UChar* target, UChar* targetLimit, const char*& source, const char* sourceLimit, int32_t* offsets, bool flush, UErrorCode& err)
+diff --git a/Source/WebCore/platform/text/icu/UTextProvider.h b/Source/WebCore/platform/text/icu/UTextProvider.h
+index c254fc4..6d1e1cb 100644
+--- a/Source/WebCore/platform/text/icu/UTextProvider.h
++++ b/Source/WebCore/platform/text/icu/UTextProvider.h
+@@ -80,12 +80,12 @@ inline bool uTextAccessInChunkOrOutOfRange(UText* text, int64_t nativeIndex, int
+ // Ensure chunk offset is well formed if computed offset exceeds int32_t range.
+ ASSERT(offset < std::numeric_limits<int32_t>::max());
+ text->chunkOffset = offset < std::numeric_limits<int32_t>::max() ? static_cast<int32_t>(offset) : 0;
+- isAccessible = TRUE;
++ isAccessible = true;
+ return true;
+ }
+ if (nativeIndex >= nativeLength && text->chunkNativeLimit == nativeLength) {
+ text->chunkOffset = text->chunkLength;
+- isAccessible = FALSE;
++ isAccessible = false;
+ return true;
+ }
+ } else {
+@@ -94,12 +94,12 @@ inline bool uTextAccessInChunkOrOutOfRange(UText* text, int64_t nativeIndex, int
+ // Ensure chunk offset is well formed if computed offset exceeds int32_t range.
+ ASSERT(offset < std::numeric_limits<int32_t>::max());
+ text->chunkOffset = offset < std::numeric_limits<int32_t>::max() ? static_cast<int32_t>(offset) : 0;
+- isAccessible = TRUE;
++ isAccessible = true;
+ return true;
+ }
+ if (nativeIndex <= 0 && !text->chunkNativeStart) {
+ text->chunkOffset = 0;
+- isAccessible = FALSE;
++ isAccessible = false;
+ return true;
+ }
+ }
+diff --git a/Source/WebCore/platform/text/icu/UTextProviderLatin1.cpp b/Source/WebCore/platform/text/icu/UTextProviderLatin1.cpp
+index cd6852c..6a864b1 100644
+--- a/Source/WebCore/platform/text/icu/UTextProviderLatin1.cpp
++++ b/Source/WebCore/platform/text/icu/UTextProviderLatin1.cpp
+@@ -100,23 +100,23 @@ static UBool uTextLatin1Access(UText* uText, int64_t index, UBool forward)
+ if (index < uText->chunkNativeLimit && index >= uText->chunkNativeStart) {
+ // Already inside the buffer. Set the new offset.
+ uText->chunkOffset = static_cast<int32_t>(index - uText->chunkNativeStart);
+- return TRUE;
++ return true;
+ }
+ if (index >= length && uText->chunkNativeLimit == length) {
+ // Off the end of the buffer, but we can't get it.
+ uText->chunkOffset = static_cast<int32_t>(index - uText->chunkNativeStart);
+- return FALSE;
++ return false;
+ }
+ } else {
+ if (index <= uText->chunkNativeLimit && index > uText->chunkNativeStart) {
+ // Already inside the buffer. Set the new offset.
+ uText->chunkOffset = static_cast<int32_t>(index - uText->chunkNativeStart);
+- return TRUE;
++ return true;
+ }
+ if (!index && !uText->chunkNativeStart) {
+ // Already at the beginning; can't go any farther.
+ uText->chunkOffset = 0;
+- return FALSE;
++ return false;
+ }
+ }
+
+@@ -144,7 +144,7 @@ static UBool uTextLatin1Access(UText* uText, int64_t index, UBool forward)
+
+ uText->nativeIndexingLimit = uText->chunkLength;
+
+- return TRUE;
++ return true;
+ }
+
+ static int32_t uTextLatin1Extract(UText* uText, int64_t start, int64_t limit, UChar* dest, int32_t destCapacity, UErrorCode* status)
+@@ -336,7 +336,7 @@ static int64_t uTextLatin1ContextAwareNativeLength(UText* text)
+ static UBool uTextLatin1ContextAwareAccess(UText* text, int64_t nativeIndex, UBool forward)
+ {
+ if (!text->context)
+- return FALSE;
++ return false;
+ int64_t nativeLength = uTextLatin1ContextAwareNativeLength(text);
+ UBool isAccessible;
+ if (uTextAccessInChunkOrOutOfRange(text, nativeIndex, nativeLength, forward, isAccessible))
+@@ -356,7 +356,7 @@ static UBool uTextLatin1ContextAwareAccess(UText* text, int64_t nativeIndex, UBo
+ ASSERT(newContext == UTextProviderContext::PriorContext);
+ textLatin1ContextAwareSwitchToPriorContext(text, nativeIndex, nativeLength, forward);
+ }
+- return TRUE;
++ return true;
+ }
+
+ static int32_t uTextLatin1ContextAwareExtract(UText*, int64_t, int64_t, UChar*, int32_t, UErrorCode* errorCode)
+diff --git a/Source/WebCore/platform/text/icu/UTextProviderUTF16.cpp b/Source/WebCore/platform/text/icu/UTextProviderUTF16.cpp
+index 7aaac48..9ae0d36 100644
+--- a/Source/WebCore/platform/text/icu/UTextProviderUTF16.cpp
++++ b/Source/WebCore/platform/text/icu/UTextProviderUTF16.cpp
+@@ -125,7 +125,7 @@ static inline int64_t uTextUTF16ContextAwareNativeLength(UText* text)
+ static UBool uTextUTF16ContextAwareAccess(UText* text, int64_t nativeIndex, UBool forward)
+ {
+ if (!text->context)
+- return FALSE;
++ return false;
+ int64_t nativeLength = uTextUTF16ContextAwareNativeLength(text);
+ UBool isAccessible;
+ if (uTextAccessInChunkOrOutOfRange(text, nativeIndex, nativeLength, forward, isAccessible))
+@@ -145,7 +145,7 @@ static UBool uTextUTF16ContextAwareAccess(UText* text, int64_t nativeIndex, UBoo
+ ASSERT(newContext == UTextProviderContext::PriorContext);
+ textUTF16ContextAwareSwitchToPriorContext(text, nativeIndex, nativeLength, forward);
+ }
+- return TRUE;
++ return true;
+ }
+
+ static int32_t uTextUTF16ContextAwareExtract(UText*, int64_t, int64_t, UChar*, int32_t, UErrorCode* errorCode)
diff --git a/gnu/packages/patches/qtwebkit-fix-building-with-python-3.9.patch b/gnu/packages/patches/qtwebkit-fix-building-with-python-3.9.patch
new file mode 100644
index 0000000000..9f9674de33
--- /dev/null
+++ b/gnu/packages/patches/qtwebkit-fix-building-with-python-3.9.patch
@@ -0,0 +1,35 @@
+Fix building with Python 3.9:
+
+https://github.com/qtwebkit/qtwebkit/issues/993
+
+Patch copied from upstream source repository:
+
+https://github.com/qtwebkit/qtwebkit/commit/78360c01c796b6260bf828bc9c8a0ef73c5132fd
+
+From 78360c01c796b6260bf828bc9c8a0ef73c5132fd Mon Sep 17 00:00:00 2001
+From: Konstantin Tokarev <annulen@yandex.ru>
+Date: Wed, 3 Jun 2020 15:01:42 +0300
+Subject: [PATCH] Fix compilation with Python 3.9: avoid passing encoding to
+ json.load()
+
+In Python 2.7 UTF-8 is assumed by default, while in Python 3 this argument
+is not supported.
+
+Change-Id: Ic459d60a6b20bc1838d8771bc36ac41614fe61a9
+---
+ Source/JavaScriptCore/generate-bytecode-files | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Source/JavaScriptCore/generate-bytecode-files b/Source/JavaScriptCore/generate-bytecode-files
+index c5dab429c7b0f..af3431275ecf9 100644
+--- a/Source/JavaScriptCore/generate-bytecode-files
++++ b/Source/JavaScriptCore/generate-bytecode-files
+@@ -163,7 +163,7 @@ if __name__ == "__main__":
+ initBytecodesFile = openOrExit(initASMFileName, "w")
+
+ try:
+- bytecodeSections = json.load(bytecodeFile, encoding = "utf-8")
++ bytecodeSections = json.load(bytecodeFile)
+ except:
+ print("Unexpected error parsing {0}: {1}".format(bytecodeJSONFile, sys.exc_info()))
+
diff --git a/gnu/packages/patches/range-v3-build-with-gcc10.patch b/gnu/packages/patches/range-v3-build-with-gcc10.patch
new file mode 100644
index 0000000000..a5d5b33523
--- /dev/null
+++ b/gnu/packages/patches/range-v3-build-with-gcc10.patch
@@ -0,0 +1,122 @@
+From 0487cca29e352e8f16bbd91fda38e76e39a0ed28 Mon Sep 17 00:00:00 2001
+From: Louis Dionne <ldionne.2@gmail.com>
+Date: Tue, 15 Jun 2021 14:40:01 -0400
+Subject: [PATCH] Work around broken integration with latest libc++. (#1635)
+
+* Work around broken integration with latest libc++.
+
+In newer versions of libc++, the base template of std::iterator_traits
+provides a member typedef called __primary_template which is an alias
+to the std::iterator_traits specialization itself. This fix works with
+both the old version of libc++ and the new one.
+
+Fixes issue #1633.
+
+* Fix is_std_iterator_traits_specialized_v on MSVC
+
+It used to pretend that std::iterator_traits<T*> is a user-defined
+specialization, which isn't the case. This is due to MSVC's
+iterator_traits<T*> specialization not posing as the base template.
+---
+ include/std/detail/associated_types.hpp | 22 +++++++++++-----
+ test/CMakeLists.txt | 1 +
+ test/bug1633.cpp | 34 +++++++++++++++++++++++++
+ 3 files changed, 51 insertions(+), 6 deletions(-)
+ create mode 100644 test/bug1633.cpp
+
+diff --git a/include/std/detail/associated_types.hpp b/include/std/detail/associated_types.hpp
+index b642166d4..449a3f91c 100644
+--- a/include/std/detail/associated_types.hpp
++++ b/include/std/detail/associated_types.hpp
+@@ -265,11 +265,22 @@ namespace ranges
+ template<typename I>
+ char is_std_iterator_traits_specialized_impl_(void *);
+ #elif defined(_LIBCPP_VERSION)
+- template<typename I, bool B>
+- char (
+- &is_std_iterator_traits_specialized_impl_(std::__iterator_traits<I, B> *))[2];
++ // In older versions of libc++, the base template inherits from std::__iterator_traits<typename, bool>.
++ template<template<typename, bool> class IteratorTraitsBase, typename I, bool B>
++ char (&libcpp_iterator_traits_base_impl(IteratorTraitsBase<I, B> *))[2];
++ template<template<typename, bool> class IteratorTraitsBase, typename I>
++ char libcpp_iterator_traits_base_impl(void *);
++
++ // In newer versions, the base template has only one template parameter and provides the
++ // __primary_template typedef which aliases the iterator_traits specialization.
++ template<template<typename> class, typename I>
++ char (&libcpp_iterator_traits_base_impl(typename std::iterator_traits<I>::__primary_template *))[2];
++ template<template<typename> class, typename I>
++ char libcpp_iterator_traits_base_impl(void *);
++
+ template<typename I>
+- char is_std_iterator_traits_specialized_impl_(void *);
++ auto is_std_iterator_traits_specialized_impl_(std::iterator_traits<I>* traits)
++ -> decltype(libcpp_iterator_traits_base_impl<std::__iterator_traits, I>(traits));
+ #elif defined(_MSVC_STL_VERSION)
+ template<typename I>
+ char (&is_std_iterator_traits_specialized_impl_(
+@@ -287,14 +298,13 @@ namespace ranges
+ RANGES_INLINE_VAR constexpr bool is_std_iterator_traits_specialized_v =
+ 1 == sizeof(is_std_iterator_traits_specialized_impl_<I>(
+ static_cast<std::iterator_traits<I> *>(nullptr)));
+-
++#endif
+ // The standard iterator_traits<T *> specialization(s) do not count
+ // as user-specialized. This will no longer be necessary in C++20.
+ // This helps with `T volatile*` and `void *`.
+ template<typename T>
+ RANGES_INLINE_VAR constexpr bool is_std_iterator_traits_specialized_v<T *> =
+ false;
+-#endif
+ } // namespace detail
+ /// \endcond
+ } // namespace ranges
+diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
+index 889f314af..2c2b7c09c 100644
+--- a/test/CMakeLists.txt
++++ b/test/CMakeLists.txt
+@@ -19,3 +19,4 @@ rv3_add_test(test.bug474 bug474 bug474.cpp)
+ rv3_add_test(test.bug566 bug566 bug566.cpp)
+ rv3_add_test(test.bug1322 bug1322 bug1322.cpp)
+ rv3_add_test(test.bug1335 bug1335 bug1335.cpp)
++rv3_add_test(test.bug1633 bug1633 bug1633.cpp)
+diff --git a/test/bug1633.cpp b/test/bug1633.cpp
+new file mode 100644
+index 000000000..be52420ad
+--- /dev/null
++++ b/test/bug1633.cpp
+@@ -0,0 +1,34 @@
++// Range v3 library
++//
++// Use, modification and distribution is subject to the
++// Boost Software License, Version 1.0. (See accompanying
++// file LICENSE_1_0.txt or copy at
++// http://www.boost.org/LICENSE_1_0.txt)
++//
++// Project home: https://github.com/ericniebler/range-v3
++
++#include <cstddef>
++#include <iterator>
++#include <range/v3/iterator.hpp>
++
++struct X { };
++
++namespace std {
++ template<> struct iterator_traits<X> { };
++}
++
++struct Y {
++ using difference_type = std::ptrdiff_t;
++ using value_type = int;
++ using pointer = int*;
++ using reference = int&;
++ using iterator_category = std::forward_iterator_tag;
++};
++
++static_assert(ranges::detail::is_std_iterator_traits_specialized_v<X>, "");
++static_assert(!ranges::detail::is_std_iterator_traits_specialized_v<Y>, "");
++static_assert(!ranges::detail::is_std_iterator_traits_specialized_v<int*>, "");
++
++int main()
++{
++}
diff --git a/gnu/packages/patches/rust-1.19-mrustc.patch b/gnu/packages/patches/rust-1.19-mrustc.patch
deleted file mode 100644
index 261162172e..0000000000
--- a/gnu/packages/patches/rust-1.19-mrustc.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-See https://github.com/thepowersgang/mrustc/archive/v0.8.0.tar.gz
-
---- rustc-1.19.0-src-orig/src/libcore/intrinsics.rs
-+++ rustc-1.19.0-src/src/libcore/intrinsics.rs
-@@ -678,5 +678,9 @@
- pub fn min_align_of_val<T: ?Sized>(_: &T) -> usize;
-
-+ /// Obtain the length of a slice pointer
-+ #[cfg(rust_compiler="mrustc")]
-+ pub fn mrustc_slice_len<T>(pointer: *const [T]) -> usize;
-+
- /// Gets a static string slice containing the name of a type.
- pub fn type_name<T: ?Sized>() -> &'static str;
-
---- rustc-1.19.0-src-orig/src/libcore/slice/mod.rs
-+++ rustc-1.19.0-src/src/libcore/slice/mod.rs
-@@ -413,6 +413,8 @@
- #[inline]
- fn len(&self) -> usize {
-- unsafe {
-- mem::transmute::<&[T], Repr<T>>(self).len
-- }
-+ #[cfg(not(rust_compiler="mrustc"))]
-+ let rv = unsafe { mem::transmute::<&[T], Repr<T>>(self).len };
-+ #[cfg(rust_compiler="mrustc")]
-+ let rv = unsafe { ::intrinsics::mrustc_slice_len(self) };
-+ rv
- }
diff --git a/gnu/packages/patches/rust-1.25-accept-more-detailed-gdb-lines.patch b/gnu/packages/patches/rust-1.25-accept-more-detailed-gdb-lines.patch
deleted file mode 100644
index a2bad55117..0000000000
--- a/gnu/packages/patches/rust-1.25-accept-more-detailed-gdb-lines.patch
+++ /dev/null
@@ -1,111 +0,0 @@
-GDB responds with some overly detailed lines - which makes the tests fail.
-Patch rust to accept those instead.
-See <https://github.com/rust-lang/rust/issues/54178>.
-diff -ur orig/rustc-1.25.0-src/src/test/debuginfo/generic-enum-with-different-disr-sizes.rs rustc-1.25.0-src/src/test/debuginfo/generic-enum-with-different-disr-sizes.rs
---- orig/rustc-1.25.0-src/src/test/debuginfo/generic-enum-with-different-disr-sizes.rs 2018-09-13 10:24:33.775565159 +0200
-+++ rustc-1.25.0-src/src/test/debuginfo/generic-enum-with-different-disr-sizes.rs 2018-09-13 10:25:56.322513658 +0200
-@@ -19,36 +19,36 @@
-
- // gdb-command:print eight_bytes1
- // gdbg-check:$1 = {{RUST$ENUM$DISR = Variant1, __0 = 100}, {RUST$ENUM$DISR = Variant1, __0 = 100}}
--// gdbr-check:$1 = generic_enum_with_different_disr_sizes::Enum::Variant1(100)
-+// gdbr-check:$1 = generic_enum_with_different_disr_sizes::Enum<f64>::Variant1(100)
-
- // gdb-command:print four_bytes1
- // gdbg-check:$2 = {{RUST$ENUM$DISR = Variant1, __0 = 101}, {RUST$ENUM$DISR = Variant1, __0 = 101}}
--// gdbr-check:$2 = generic_enum_with_different_disr_sizes::Enum::Variant1(101)
-+// gdbr-check:$2 = generic_enum_with_different_disr_sizes::Enum<i32>::Variant1(101)
-
- // gdb-command:print two_bytes1
- // gdbg-check:$3 = {{RUST$ENUM$DISR = Variant1, __0 = 102}, {RUST$ENUM$DISR = Variant1, __0 = 102}}
--// gdbr-check:$3 = generic_enum_with_different_disr_sizes::Enum::Variant1(102)
-+// gdbr-check:$3 = generic_enum_with_different_disr_sizes::Enum<i16>::Variant1(102)
-
- // gdb-command:print one_byte1
- // gdbg-check:$4 = {{RUST$ENUM$DISR = Variant1, __0 = 65 'A'}, {RUST$ENUM$DISR = Variant1, __0 = 65 'A'}}
--// gdbr-check:$4 = generic_enum_with_different_disr_sizes::Enum::Variant1(65)
-+// gdbr-check:$4 = generic_enum_with_different_disr_sizes::Enum<u8>::Variant1(65)
-
-
- // gdb-command:print eight_bytes2
- // gdbg-check:$5 = {{RUST$ENUM$DISR = Variant2, __0 = 100}, {RUST$ENUM$DISR = Variant2, __0 = 100}}
--// gdbr-check:$5 = generic_enum_with_different_disr_sizes::Enum::Variant2(100)
-+// gdbr-check:$5 = generic_enum_with_different_disr_sizes::Enum<f64>::Variant2(100)
-
- // gdb-command:print four_bytes2
- // gdbg-check:$6 = {{RUST$ENUM$DISR = Variant2, __0 = 101}, {RUST$ENUM$DISR = Variant2, __0 = 101}}
--// gdbr-check:$6 = generic_enum_with_different_disr_sizes::Enum::Variant2(101)
-+// gdbr-check:$6 = generic_enum_with_different_disr_sizes::Enum<i32>::Variant2(101)
-
- // gdb-command:print two_bytes2
- // gdbg-check:$7 = {{RUST$ENUM$DISR = Variant2, __0 = 102}, {RUST$ENUM$DISR = Variant2, __0 = 102}}
--// gdbr-check:$7 = generic_enum_with_different_disr_sizes::Enum::Variant2(102)
-+// gdbr-check:$7 = generic_enum_with_different_disr_sizes::Enum<i16>::Variant2(102)
-
- // gdb-command:print one_byte2
- // gdbg-check:$8 = {{RUST$ENUM$DISR = Variant2, __0 = 65 'A'}, {RUST$ENUM$DISR = Variant2, __0 = 65 'A'}}
--// gdbr-check:$8 = generic_enum_with_different_disr_sizes::Enum::Variant2(65)
-+// gdbr-check:$8 = generic_enum_with_different_disr_sizes::Enum<u8>::Variant2(65)
-
- // gdb-command:continue
-
-diff -ur orig/rustc-1.25.0-src/src/test/debuginfo/generic-struct-style-enum.rs rustc-1.25.0-src/src/test/debuginfo/generic-struct-style-enum.rs
---- orig/rustc-1.25.0-src/src/test/debuginfo/generic-struct-style-enum.rs 2018-09-13 10:24:33.775565159 +0200
-+++ rustc-1.25.0-src/src/test/debuginfo/generic-struct-style-enum.rs 2018-09-13 10:27:43.353108111 +0200
-@@ -19,15 +19,15 @@
-
- // gdb-command:print case1
- // gdbg-check:$1 = {{RUST$ENUM$DISR = Case1, a = 0, b = 31868, c = 31868, d = 31868, e = 31868}, {RUST$ENUM$DISR = Case1, [...]}, {RUST$ENUM$DISR = Case1, [...]}}
--// gdbr-check:$1 = generic_struct_style_enum::Regular::Case1{a: 0, b: 31868, c: 31868, d: 31868, e: 31868}
-+// gdbr-check:$1 = generic_struct_style_enum::Regular<u16, u32, i64>::Case1{a: 0, b: 31868, c: 31868, d: 31868, e: 31868}
-
- // gdb-command:print case2
- // gdbg-check:$2 = {{RUST$ENUM$DISR = Case2, [...]}, {RUST$ENUM$DISR = Case2, a = 0, b = 286331153, c = 286331153}, {RUST$ENUM$DISR = Case2, [...]}}
--// gdbr-check:$2 = generic_struct_style_enum::Regular::Case2{a: 0, b: 286331153, c: 286331153}
-+// gdbr-check:$2 = generic_struct_style_enum::Regular<i16, u32, i64>::Case2{a: 0, b: 286331153, c: 286331153}
-
- // gdb-command:print case3
- // gdbg-check:$3 = {{RUST$ENUM$DISR = Case3, [...]}, {RUST$ENUM$DISR = Case3, [...]}, {RUST$ENUM$DISR = Case3, a = 0, b = 6438275382588823897}}
--// gdbr-check:$3 = generic_struct_style_enum::Regular::Case3{a: 0, b: 6438275382588823897}
-+// gdbr-check:$3 = generic_struct_style_enum::Regular<u16, i32, u64>::Case3{a: 0, b: 6438275382588823897}
-
- // gdb-command:print univariant
- // gdbg-check:$4 = {{a = -1}}
-diff -ur orig/rustc-1.25.0-src/src/test/debuginfo/generic-tuple-style-enum.rs rustc-1.25.0-src/src/test/debuginfo/generic-tuple-style-enum.rs
---- orig/rustc-1.25.0-src/src/test/debuginfo/generic-tuple-style-enum.rs 2018-09-13 10:24:33.775565159 +0200
-+++ rustc-1.25.0-src/src/test/debuginfo/generic-tuple-style-enum.rs 2018-09-13 10:28:26.328546298 +0200
-@@ -21,15 +21,15 @@
-
- // gdb-command:print case1
- // gdbg-check:$1 = {{RUST$ENUM$DISR = Case1, __0 = 0, __1 = 31868, __2 = 31868, __3 = 31868, __4 = 31868}, {RUST$ENUM$DISR = Case1, [...]}, {RUST$ENUM$DISR = Case1, [...]}}
--// gdbr-check:$1 = generic_tuple_style_enum::Regular::Case1(0, 31868, 31868, 31868, 31868)
-+// gdbr-check:$1 = generic_tuple_style_enum::Regular<u16, u32, u64>::Case1(0, 31868, 31868, 31868, 31868)
-
- // gdb-command:print case2
- // gdbg-check:$2 = {{RUST$ENUM$DISR = Case2, [...]}, {RUST$ENUM$DISR = Case2, __0 = 0, __1 = 286331153, __2 = 286331153}, {RUST$ENUM$DISR = Case2, [...]}}
--// gdbr-check:$2 = generic_tuple_style_enum::Regular::Case2(0, 286331153, 286331153)
-+// gdbr-check:$2 = generic_tuple_style_enum::Regular<i16, i32, i64>::Case2(0, 286331153, 286331153)
-
- // gdb-command:print case3
- // gdbg-check:$3 = {{RUST$ENUM$DISR = Case3, [...]}, {RUST$ENUM$DISR = Case3, [...]}, {RUST$ENUM$DISR = Case3, __0 = 0, __1 = 6438275382588823897}}
--// gdbr-check:$3 = generic_tuple_style_enum::Regular::Case3(0, 6438275382588823897)
-+// gdbr-check:$3 = generic_tuple_style_enum::Regular<i16, i32, i64>::Case3(0, 6438275382588823897)
-
- // gdb-command:print univariant
- // gdbg-check:$4 = {{__0 = -1}}
---- orig/rustc-1.25.0-src/src/test/debuginfo/nil-enum.rs 2018-09-13 10:24:33.783565071 +0200
-+++ rustc-1.25.0-src/src/test/debuginfo/nil-enum.rs 2018-10-26 18:19:20.404564587 +0200
-@@ -17,11 +17,11 @@
-
- // gdb-command:print first
- // gdbg-check:$1 = {<No data fields>}
--// gdbr-check:$1 = <error reading variable>
-+// gdbr-check:$1 = nil_enum::ANilEnum
-
- // gdb-command:print second
- // gdbg-check:$2 = {<No data fields>}
--// gdbr-check:$2 = <error reading variable>
-+// gdbr-check:$2 = nil_enum::AnotherNilEnum
-
- #![allow(unused_variables)]
- #![feature(omit_gdb_pretty_printer_section)]
diff --git a/gnu/packages/patches/rust-1.30-gdb-llvm.patch b/gnu/packages/patches/rust-1.30-gdb-llvm.patch
deleted file mode 100644
index e8f0acc8b4..0000000000
--- a/gnu/packages/patches/rust-1.30-gdb-llvm.patch
+++ /dev/null
@@ -1,89 +0,0 @@
-Tweak some gdb tests which were broken during LLVM upgrades.
-This has been subsequently fixed upstream in later rustc versions,
-but still needed to bootstrap some earlier versions of the compiler.
-
-diff -r -u rustc-1.30.1-src-orig/src/test/debuginfo/borrowed-c-style-enum.rs rustc-1.30.1-src/src/test/debuginfo/borrowed-c-style-enum.rs
---- rustc-1.30.1-src-orig/src/test/debuginfo/borrowed-c-style-enum.rs 2019-02-04 12:49:34.055483896 -0800
-+++ rustc-1.30.1-src/src/test/debuginfo/borrowed-c-style-enum.rs 2019-02-04 13:01:10.915950356 -0800
-@@ -18,15 +18,15 @@
-
- // gdb-command:print *the_a_ref
- // gdbg-check:$1 = TheA
--// gdbr-check:$1 = borrowed_c_style_enum::ABC::TheA
-+// gdbr-check:$1 = borrowed_c_style_enum::TheA
-
- // gdb-command:print *the_b_ref
- // gdbg-check:$2 = TheB
--// gdbr-check:$2 = borrowed_c_style_enum::ABC::TheB
-+// gdbr-check:$2 = borrowed_c_style_enum::TheB
-
- // gdb-command:print *the_c_ref
- // gdbg-check:$3 = TheC
--// gdbr-check:$3 = borrowed_c_style_enum::ABC::TheC
-+// gdbr-check:$3 = borrowed_c_style_enum::TheC
-
-
- // === LLDB TESTS ==================================================================================
-diff -r -u rustc-1.30.1-src-orig/src/test/debuginfo/c-style-enum-in-composite.rs rustc-1.30.1-src/src/test/debuginfo/c-style-enum-in-composite.rs
---- rustc-1.30.1-src-orig/src/test/debuginfo/c-style-enum-in-composite.rs 2019-02-04 12:49:34.051483727 -0800
-+++ rustc-1.30.1-src/src/test/debuginfo/c-style-enum-in-composite.rs 2019-02-04 13:02:00.981997525 -0800
-@@ -19,31 +19,31 @@
-
- // gdb-command:print tuple_interior_padding
- // gdbg-check:$1 = {__0 = 0, __1 = OneHundred}
--// gdbr-check:$1 = (0, c_style_enum_in_composite::AnEnum::OneHundred)
-+// gdbr-check:$1 = (0, c_style_enum_in_composite::OneHundred)
-
- // gdb-command:print tuple_padding_at_end
- // gdbg-check:$2 = {__0 = {__0 = 1, __1 = OneThousand}, __1 = 2}
--// gdbr-check:$2 = ((1, c_style_enum_in_composite::AnEnum::OneThousand), 2)
-+// gdbr-check:$2 = ((1, c_style_enum_in_composite::OneThousand), 2)
-
- // gdb-command:print tuple_different_enums
- // gdbg-check:$3 = {__0 = OneThousand, __1 = MountainView, __2 = OneMillion, __3 = Vienna}
--// gdbr-check:$3 = (c_style_enum_in_composite::AnEnum::OneThousand, c_style_enum_in_composite::AnotherEnum::MountainView, c_style_enum_in_composite::AnEnum::OneMillion, c_style_enum_in_composite::AnotherEnum::Vienna)
-+// gdbr-check:$3 = (c_style_enum_in_composite::OneThousand, c_style_enum_in_composite::MountainView, c_style_enum_in_composite::OneMillion, c_style_enum_in_composite::Vienna)
-
- // gdb-command:print padded_struct
- // gdbg-check:$4 = {a = 3, b = OneMillion, c = 4, d = Toronto, e = 5}
--// gdbr-check:$4 = c_style_enum_in_composite::PaddedStruct {a: 3, b: c_style_enum_in_composite::AnEnum::OneMillion, c: 4, d: c_style_enum_in_composite::AnotherEnum::Toronto, e: 5}
-+// gdbr-check:$4 = c_style_enum_in_composite::PaddedStruct {a: 3, b: c_style_enum_in_composite::OneMillion, c: 4, d: c_style_enum_in_composite::Toronto, e: 5}
-
- // gdb-command:print packed_struct
- // gdbg-check:$5 = {a = 6, b = OneHundred, c = 7, d = Vienna, e = 8}
--// gdbr-check:$5 = c_style_enum_in_composite::PackedStruct {a: 6, b: c_style_enum_in_composite::AnEnum::OneHundred, c: 7, d: c_style_enum_in_composite::AnotherEnum::Vienna, e: 8}
-+// gdbr-check:$5 = c_style_enum_in_composite::PackedStruct {a: 6, b: c_style_enum_in_composite::OneHundred, c: 7, d: c_style_enum_in_composite::Vienna, e: 8}
-
- // gdb-command:print non_padded_struct
- // gdbg-check:$6 = {a = OneMillion, b = MountainView, c = OneThousand, d = Toronto}
--// gdbr-check:$6 = c_style_enum_in_composite::NonPaddedStruct {a: c_style_enum_in_composite::AnEnum::OneMillion, b: c_style_enum_in_composite::AnotherEnum::MountainView, c: c_style_enum_in_composite::AnEnum::OneThousand, d: c_style_enum_in_composite::AnotherEnum::Toronto}
-+// gdbr-check:$6 = c_style_enum_in_composite::NonPaddedStruct {a: c_style_enum_in_composite::OneMillion, b: c_style_enum_in_composite::MountainView, c: c_style_enum_in_composite::OneThousand, d: c_style_enum_in_composite::Toronto}
-
- // gdb-command:print struct_with_drop
- // gdbg-check:$7 = {__0 = {a = OneHundred, b = Vienna}, __1 = 9}
--// gdbr-check:$7 = (c_style_enum_in_composite::StructWithDrop {a: c_style_enum_in_composite::AnEnum::OneHundred, b: c_style_enum_in_composite::AnotherEnum::Vienna}, 9)
-+// gdbr-check:$7 = (c_style_enum_in_composite::StructWithDrop {a: c_style_enum_in_composite::OneHundred, b: c_style_enum_in_composite::Vienna}, 9)
-
- // === LLDB TESTS ==================================================================================
-
-diff -r -u rustc-1.30.1-src-orig/src/test/debuginfo/gdb-pretty-struct-and-enums-pre-gdb-7-7.rs rustc-1.30.1-src/src/test/debuginfo/gdb-pretty-struct-and-enums-pre-gdb-7-7.rs
---- rustc-1.30.1-src-orig/src/test/debuginfo/gdb-pretty-struct-and-enums-pre-gdb-7-7.rs 2019-02-04 12:49:34.043483393 -0800
-+++ rustc-1.30.1-src/src/test/debuginfo/gdb-pretty-struct-and-enums-pre-gdb-7-7.rs 2019-02-04 13:02:17.954691634 -0800
-@@ -27,15 +27,15 @@
-
- // gdb-command: print c_style_enum1
- // gdbg-check:$3 = CStyleEnumVar1
--// gdbr-check:$3 = gdb_pretty_struct_and_enums_pre_gdb_7_7::CStyleEnum::CStyleEnumVar1
-+// gdbr-check:$3 = gdb_pretty_struct_and_enums_pre_gdb_7_7::CStyleEnumVar1
-
- // gdb-command: print c_style_enum2
- // gdbg-check:$4 = CStyleEnumVar2
--// gdbr-check:$4 = gdb_pretty_struct_and_enums_pre_gdb_7_7::CStyleEnum::CStyleEnumVar2
-+// gdbr-check:$4 = gdb_pretty_struct_and_enums_pre_gdb_7_7::CStyleEnumVar2
-
- // gdb-command: print c_style_enum3
- // gdbg-check:$5 = CStyleEnumVar3
--// gdbr-check:$5 = gdb_pretty_struct_and_enums_pre_gdb_7_7::CStyleEnum::CStyleEnumVar3
-+// gdbr-check:$5 = gdb_pretty_struct_and_enums_pre_gdb_7_7::CStyleEnumVar3
-
- #![allow(dead_code, unused_variables)]
diff --git a/gnu/packages/patches/rust-1.45-linker-locale.patch b/gnu/packages/patches/rust-1.45-linker-locale.patch
deleted file mode 100644
index 40220e8e77..0000000000
--- a/gnu/packages/patches/rust-1.45-linker-locale.patch
+++ /dev/null
@@ -1,14 +0,0 @@
-Patch will be included upstream in 1.47: https://github.com/rust-lang/rust/pull/74416
-diff --git a/src/librustc_codegen_ssa/back/linker.rs b/src/librustc_codegen_ssa/back/linker.rs
-index e64aafa599f..12575ac4358 100644
---- a/src/librustc_codegen_ssa/back/linker.rs
-+++ b/src/librustc_codegen_ssa/back/linker.rs
-@@ -28,7 +28,7 @@ use rustc_target::spec::{LinkOutputKind, LinkerFlavor, LldFlavor};
- pub fn disable_localization(linker: &mut Command) {
- // No harm in setting both env vars simultaneously.
- // Unix-style linkers.
-- linker.env("LC_ALL", "C");
-+ linker.env("LC_ALL", "en_US.UTF-8");
- // MSVC's `link.exe`.
- linker.env("VSLANG", "1033");
- }
diff --git a/gnu/packages/patches/rust-1.48-linker-locale.patch b/gnu/packages/patches/rust-1.48-linker-locale.patch
deleted file mode 100644
index d06dcbe682..0000000000
--- a/gnu/packages/patches/rust-1.48-linker-locale.patch
+++ /dev/null
@@ -1,14 +0,0 @@
-https://github.com/rust-lang/rust/pull/74416
-diff --git a/compiler/rustc_codegen_ssa/src/back/linker.rs b/compiler/rustc_codegen_ssa/src/back/linker.rs
-index 3df956c465e..f45fee45be4 100644
---- a/compiler/rustc_codegen_ssa/src/back/linker.rs
-+++ b/compiler/rustc_codegen_ssa/src/back/linker.rs
-@@ -28,7 +28,7 @@
- pub fn disable_localization(linker: &mut Command) {
- // No harm in setting both env vars simultaneously.
- // Unix-style linkers.
-- linker.env("LC_ALL", "C");
-+ linker.env("LC_ALL", "en_US.UTF-8");
- // MSVC's `link.exe`.
- linker.env("VSLANG", "1033");
- }
diff --git a/gnu/packages/patches/rust-bootstrap-stage0-test.patch b/gnu/packages/patches/rust-bootstrap-stage0-test.patch
deleted file mode 100644
index e8484903e5..0000000000
--- a/gnu/packages/patches/rust-bootstrap-stage0-test.patch
+++ /dev/null
@@ -1,55 +0,0 @@
-Bootstrap tests failed with local stage0 cargo and rustc
-Backported changes from https://github.com/rust-lang/rust/pull/51977
-
-From 0834d9d771e912f51deca6c25699e44734624546 Mon Sep 17 00:00:00 2001
-From: Nikolai Merinov <nikolai.merinov@member.fsf.org>
-Date: Mon, 2 Jul 2018 01:45:35 +0500
-Subject: [PATCH] bootstrap: tests should use rustc from config.toml
-
-Tests should always use "rustc" and "cargo" from config.toml instead
-of assuming that stage0 binaries was downloaded to build directory.
----
- src/bootstrap/bootstrap.py | 2 ++
- src/bootstrap/config.rs | 6 ++----
- 2 files changed, 4 insertions(+), 4 deletions(-)
-
-diff --git a/src/bootstrap/bootstrap.py b/src/bootstrap/bootstrap.py
-index 487440becf..1701f7b83a 100644
---- a/src/bootstrap/bootstrap.py
-+++ b/src/bootstrap/bootstrap.py
-@@ -788,6 +788,8 @@ def bootstrap(help_triggered):
- env["BOOTSTRAP_PARENT_ID"] = str(os.getpid())
- env["BOOTSTRAP_PYTHON"] = sys.executable
- env["BUILD_DIR"] = build.build_dir
-+ env["CARGO"] = build.cargo()
-+ env["RUSTC"] = build.rustc()
- run(args, env=env, verbose=build.verbose)
-
-
-diff --git a/src/bootstrap/config.rs b/src/bootstrap/config.rs
-index 6dd6291be2..d1a0deb583 100644
---- a/src/bootstrap/config.rs
-+++ b/src/bootstrap/config.rs
-@@ -23,7 +23,6 @@ use std::cmp;
-
- use num_cpus;
- use toml;
--use util::exe;
- use cache::{INTERNER, Interned};
- use flags::Flags;
- pub use flags::Subcommand;
-@@ -362,9 +361,8 @@ impl Config {
- config.src = Config::path_from_python("SRC");
- config.out = Config::path_from_python("BUILD_DIR");
-
-- let stage0_root = config.out.join(&config.build).join("stage0/bin");
-- config.initial_rustc = stage0_root.join(exe("rustc", &config.build));
-- config.initial_cargo = stage0_root.join(exe("cargo", &config.build));
-+ config.initial_rustc = Config::path_from_python("RUSTC");
-+ config.initial_cargo = Config::path_from_python("CARGO");
-
- config
- }
---
-2.17.1
-
diff --git a/gnu/packages/patches/rust-reproducible-builds.patch b/gnu/packages/patches/rust-reproducible-builds.patch
deleted file mode 100644
index ef7bf53b5d..0000000000
--- a/gnu/packages/patches/rust-reproducible-builds.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-From b9ca108fcae2b738ca3f0c88c84ae5dc5a6f843f Mon Sep 17 00:00:00 2001
-From: Tim Ryan <id@timryan.org>
-Date: Mon, 14 May 2018 06:22:21 -0400
-Subject: [PATCH] Support reproducible builds by forcing window.search to use
- stable key ordering. (#692)
-See <https://github.com/rust-lang-nursery/mdBook/pull/692>
----
- src/vendor/mdbook/src/renderer/html_handlebars/search.rs | 4 ++++
- 1 file changed, 4 insertions(+)
-
-diff --git a/src/vendor/mdbook/src/renderer/html_handlebars/search.rs b/src/vendor/mdbook/src/renderer/html_handlebars/search.rs
-index d49772f8b..1ee66a511 100644
---- a/src/vendor/mdbook/src/renderer/html_handlebars/search.rs
-+++ b/src/vendor/mdbook/src/renderer/html_handlebars/search.rs
-@@ -205,6 +205,10 @@ fn write_to_js(index: Index, search_config: &Search) -> Result<String> {
- searchoptions,
- index,
- };
-+
-+ // By converting to serde_json::Value as an intermediary, we use a
-+ // BTreeMap internally and can force a stable ordering of map keys.
-+ let json_contents = serde_json::to_value(&json_contents)?;
- let json_contents = serde_json::to_string(&json_contents)?;
-
- Ok(format!("window.search = {};", json_contents))
diff --git a/gnu/packages/patches/rustc-1.39.0-src.patch b/gnu/packages/patches/rustc-1.39.0-src.patch
new file mode 100644
index 0000000000..7859bd44d5
--- /dev/null
+++ b/gnu/packages/patches/rustc-1.39.0-src.patch
@@ -0,0 +1,99 @@
+# This modified patch is to disable the hunk applying to LLVM, unbundled in Guix.
+
+# Add mrustc slice length intrinsics
+--- src/libcore/intrinsics.rs
++++ src/libcore/intrinsics.rs
+@@ -685,4 +685,8 @@
+ pub fn min_align_of_val<T: ?Sized>(_: &T) -> usize;
+
++ /// Obtain the length of a slice pointer
++ #[cfg(rust_compiler="mrustc")]
++ pub fn mrustc_slice_len<T>(pointer: *const [T]) -> usize;
++
+ /// Gets a static string slice containing the name of a type.
+ pub fn type_name<T: ?Sized>() -> &'static str;
+
+--- src/libcore/slice/mod.rs
++++ src/libcore/slice/mod.rs
+@@ -68,5 +68,8 @@
+ pub const fn len(&self) -> usize {
+- unsafe {
+- crate::ptr::Repr { rust: self }.raw.len
+- }
++ #[cfg(not(rust_compiler="mrustc"))]
++ #[cfg_attr(not(bootstrap), allow_internal_unstable(const_fn_union))]
++ const fn len_inner<T>(s: &[T]) -> usize { unsafe { crate::ptr::Repr { rust: s }.raw.len } };
++ #[cfg(rust_compiler="mrustc")]
++ const fn len_inner<T>(s: &[T]) -> usize { unsafe { crate::intrinsics::mrustc_slice_len(s) } }
++ len_inner(self)
+ }
+#
+# Static-link rustc_codegen_llvm so the generated rustc is standalone
+# > Note: Interacts with `rustc-1.39.0-overrides.toml`
+#
+--- src/librustc_interface/util.rs
++++ src/librustc_interface/util.rs
+@@ -421,2 +421,4 @@
+ pub fn get_codegen_sysroot(backend_name: &str) -> fn() -> Box<dyn CodegenBackend> {
++ #[cfg(rust_compiler="mrustc")]
++ { if(backend_name == "llvm") { extern "Rust" { fn __rustc_codegen_backend() -> Box<dyn CodegenBackend>; } return || unsafe { __rustc_codegen_backend() } } }
+ // For now we only allow this function to be called once as it'll dlopen a
+# Disable most architecture intrinsics
+--- src/stdarch/crates/std_detect/src/detect/mod.rs
++++ src/stdarch/crates/std_detect/src/detect/mod.rs
+@@ -74,4 +74,7 @@
+ // this run-time detection logic is never called.
+ #[path = "os/other.rs"]
+ mod os;
++ } else if #[cfg(rust_compiler="mrustc")] {
++ #[path = "os/other.rs"]
++ mod os;
+ } else if #[cfg(any(target_arch = "x86", target_arch = "x86_64"))] {
+--- vendor/ppv-lite86/src/lib.rs
++++ vendor/ppv-lite86/src/lib.rs
+@@ -12,10 +12,10 @@
+-#[cfg(all(feature = "simd", target_arch = "x86_64", not(miri)))]
++#[cfg(all(feature = "simd", target_arch = "x86_64", not(miri), not(rust_compiler="mrustc")))]
+ pub mod x86_64;
+-#[cfg(all(feature = "simd", target_arch = "x86_64", not(miri)))]
++#[cfg(all(feature = "simd", target_arch = "x86_64", not(miri), not(rust_compiler="mrustc")))]
+ use self::x86_64 as arch;
+
+-#[cfg(any(miri, not(all(feature = "simd", any(target_arch = "x86_64")))))]
++#[cfg(any(miri, rust_compiler="mrustc", not(all(feature = "simd", any(target_arch = "x86_64")))))]
+ pub mod generic;
+-#[cfg(any(miri, not(all(feature = "simd", any(target_arch = "x86_64")))))]
++#[cfg(any(miri, rust_compiler="mrustc", not(all(feature = "simd", any(target_arch = "x86_64")))))]
+ use self::generic as arch;
+
+# diff --git a/llvm/include/llvm/Demangle/MicrosoftDemangleNodes.h b/llvm/include/llvm/Demangle/MicrosoftDemangleNodes.h
+# index da9d9d5bfdc0..3d47471f0ef0 100644
+# --- src/llvm-project/llvm/include/llvm/Demangle/MicrosoftDemangleNodes.h
+# +++ src/llvm-project/llvm/include/llvm/Demangle/MicrosoftDemangleNodes.h
+# @@ -16,6 +16,8 @@
+# #include "llvm/Demangle/DemangleConfig.h"
+# #include "llvm/Demangle/StringView.h"
+# #include <array>
+# +#include <cstdint>
+# +#include <string>
+
+# namespace llvm {
+# namespace itanium_demangle {
+##
+## gcc (used by mrustc) has 16-byte uint128_t alignment, while rustc uses 8
+##
+#--- src/libsyntax/ast.rs
+#+++ src/libsyntax/ast.rs
+#@@ -986,2 +986,2 @@
+#-#[cfg(target_arch = "x86_64")]
+#-static_assert_size!(Expr, 96);
+#+//#[cfg(target_arch = "x86_64")]
+#+//static_assert_size!(Expr, 96);
+#--- src/librustc/ty/sty.rs
+#+++ src/librustc/ty/sty.rs
+#@@ -2258,2 +2258,2 @@
+#-#[cfg(target_arch = "x86_64")]
+#-static_assert_size!(Const<'_>, 40);
+#+//#[cfg(target_arch = "x86_64")]
+#+//static_assert_size!(Const<'_>, 40);
+
diff --git a/gnu/packages/patches/scalapack-blacs-mpi-deprecations.patch b/gnu/packages/patches/scalapack-blacs-mpi-deprecations.patch
deleted file mode 100644
index 6ec1b8f21f..0000000000
--- a/gnu/packages/patches/scalapack-blacs-mpi-deprecations.patch
+++ /dev/null
@@ -1,170 +0,0 @@
-From f11c3f094ed5ca727ec819983425b6641db8227c Mon Sep 17 00:00:00 2001
-From: Eric Bavier <bavier@member.fsf.org>
-Date: Wed, 13 Feb 2019 09:32:11 -0600
-Subject: [PATCH] BLACS: Remove use of long-deprecated MPI1 functions.
-
-* BLACS/SRC/blacs_get_.c: 'MPI_Attr_get' -> 'MPI_Comm_get_attr'.
-* BLACS/SRC/cgamn2d_.c, BLACS/SRC/cgamx2d_.c, BLACS/SRC/dgamn2d_.c,
-BLACS/SRC/dgamx2d_.c, BLACS/SRC/igamn2d_.c, BLACS/SRC/igamx2d_.c,
-BLACS/SRC/sgamn2d_.c, BLACS/SRC/sgamx2d_.c, BLACS/SRC/zgamn2d_.c,
-BLACS/SRC/zgamx2d_.c: 'MPI_Type_struct' -> 'MPI_Type_create_struct'.
----
- BLACS/SRC/blacs_get_.c | 2 +-
- BLACS/SRC/cgamn2d_.c | 2 +-
- BLACS/SRC/cgamx2d_.c | 2 +-
- BLACS/SRC/dgamn2d_.c | 2 +-
- BLACS/SRC/dgamx2d_.c | 2 +-
- BLACS/SRC/igamn2d_.c | 2 +-
- BLACS/SRC/igamx2d_.c | 2 +-
- BLACS/SRC/sgamn2d_.c | 2 +-
- BLACS/SRC/sgamx2d_.c | 2 +-
- BLACS/SRC/zgamn2d_.c | 2 +-
- BLACS/SRC/zgamx2d_.c | 2 +-
- 11 files changed, 11 insertions(+), 11 deletions(-)
-
-diff --git a/BLACS/SRC/blacs_get_.c b/BLACS/SRC/blacs_get_.c
-index e979767..d4b04cf 100644
---- a/BLACS/SRC/blacs_get_.c
-+++ b/BLACS/SRC/blacs_get_.c
-@@ -23,7 +23,7 @@ F_VOID_FUNC blacs_get_(int *ConTxt, int *what, int *val)
- case SGET_MSGIDS:
- if (BI_COMM_WORLD == NULL) Cblacs_pinfo(val, &val[1]);
- iptr = &val[1];
-- ierr=MPI_Attr_get(MPI_COMM_WORLD, MPI_TAG_UB, (BVOID **) &iptr,val);
-+ ierr=MPI_Comm_get_attr(MPI_COMM_WORLD, MPI_TAG_UB, (BVOID **) &iptr,val);
- val[0] = 0;
- val[1] = *iptr;
- break;
-diff --git a/BLACS/SRC/cgamn2d_.c b/BLACS/SRC/cgamn2d_.c
-index 2db6ccb..6958f32 100644
---- a/BLACS/SRC/cgamn2d_.c
-+++ b/BLACS/SRC/cgamn2d_.c
-@@ -221,7 +221,7 @@ F_VOID_FUNC cgamn2d_(int *ConTxt, F_CHAR scope, F_CHAR top, int *m, int *n,
- {
- #endif
- i = 2;
-- ierr=MPI_Type_struct(i, len, disp, dtypes, &MyType);
-+ ierr=MPI_Type_create_struct(i, len, disp, dtypes, &MyType);
- ierr=MPI_Type_commit(&MyType);
- bp->N = bp2->N = 1;
- bp->dtype = bp2->dtype = MyType;
-diff --git a/BLACS/SRC/cgamx2d_.c b/BLACS/SRC/cgamx2d_.c
-index 707c0b6..f802d01 100644
---- a/BLACS/SRC/cgamx2d_.c
-+++ b/BLACS/SRC/cgamx2d_.c
-@@ -221,7 +221,7 @@ F_VOID_FUNC cgamx2d_(int *ConTxt, F_CHAR scope, F_CHAR top, int *m, int *n,
- {
- #endif
- i = 2;
-- ierr=MPI_Type_struct(i, len, disp, dtypes, &MyType);
-+ ierr=MPI_Type_create_struct(i, len, disp, dtypes, &MyType);
- ierr=MPI_Type_commit(&MyType);
- bp->N = bp2->N = 1;
- bp->dtype = bp2->dtype = MyType;
-diff --git a/BLACS/SRC/dgamn2d_.c b/BLACS/SRC/dgamn2d_.c
-index dff23b4..a2627ac 100644
---- a/BLACS/SRC/dgamn2d_.c
-+++ b/BLACS/SRC/dgamn2d_.c
-@@ -221,7 +221,7 @@ F_VOID_FUNC dgamn2d_(int *ConTxt, F_CHAR scope, F_CHAR top, int *m, int *n,
- {
- #endif
- i = 2;
-- ierr=MPI_Type_struct(i, len, disp, dtypes, &MyType);
-+ ierr=MPI_Type_create_struct(i, len, disp, dtypes, &MyType);
- ierr=MPI_Type_commit(&MyType);
- bp->N = bp2->N = 1;
- bp->dtype = bp2->dtype = MyType;
-diff --git a/BLACS/SRC/dgamx2d_.c b/BLACS/SRC/dgamx2d_.c
-index a51f731..2a644d0 100644
---- a/BLACS/SRC/dgamx2d_.c
-+++ b/BLACS/SRC/dgamx2d_.c
-@@ -221,7 +221,7 @@ F_VOID_FUNC dgamx2d_(int *ConTxt, F_CHAR scope, F_CHAR top, int *m, int *n,
- {
- #endif
- i = 2;
-- ierr=MPI_Type_struct(i, len, disp, dtypes, &MyType);
-+ ierr=MPI_Type_create_struct(i, len, disp, dtypes, &MyType);
- ierr=MPI_Type_commit(&MyType);
- bp->N = bp2->N = 1;
- bp->dtype = bp2->dtype = MyType;
-diff --git a/BLACS/SRC/igamn2d_.c b/BLACS/SRC/igamn2d_.c
-index 16bc003..f6a7859 100644
---- a/BLACS/SRC/igamn2d_.c
-+++ b/BLACS/SRC/igamn2d_.c
-@@ -218,7 +218,7 @@ F_VOID_FUNC igamn2d_(int *ConTxt, F_CHAR scope, F_CHAR top, int *m, int *n,
- {
- #endif
- i = 2;
-- ierr=MPI_Type_struct(i, len, disp, dtypes, &MyType);
-+ ierr=MPI_Type_create_struct(i, len, disp, dtypes, &MyType);
- ierr=MPI_Type_commit(&MyType);
- bp->N = bp2->N = 1;
- bp->dtype = bp2->dtype = MyType;
-diff --git a/BLACS/SRC/igamx2d_.c b/BLACS/SRC/igamx2d_.c
-index 8165cbe..a7cfcc6 100644
---- a/BLACS/SRC/igamx2d_.c
-+++ b/BLACS/SRC/igamx2d_.c
-@@ -218,7 +218,7 @@ F_VOID_FUNC igamx2d_(int *ConTxt, F_CHAR scope, F_CHAR top, int *m, int *n,
- {
- #endif
- i = 2;
-- ierr=MPI_Type_struct(i, len, disp, dtypes, &MyType);
-+ ierr=MPI_Type_create_struct(i, len, disp, dtypes, &MyType);
- ierr=MPI_Type_commit(&MyType);
- bp->N = bp2->N = 1;
- bp->dtype = bp2->dtype = MyType;
-diff --git a/BLACS/SRC/sgamn2d_.c b/BLACS/SRC/sgamn2d_.c
-index d6c95e5..569c797 100644
---- a/BLACS/SRC/sgamn2d_.c
-+++ b/BLACS/SRC/sgamn2d_.c
-@@ -221,7 +221,7 @@ F_VOID_FUNC sgamn2d_(int *ConTxt, F_CHAR scope, F_CHAR top, int *m, int *n,
- {
- #endif
- i = 2;
-- ierr=MPI_Type_struct(i, len, disp, dtypes, &MyType);
-+ ierr=MPI_Type_create_struct(i, len, disp, dtypes, &MyType);
- ierr=MPI_Type_commit(&MyType);
- bp->N = bp2->N = 1;
- bp->dtype = bp2->dtype = MyType;
-diff --git a/BLACS/SRC/sgamx2d_.c b/BLACS/SRC/sgamx2d_.c
-index 4b0af6f..8897ece 100644
---- a/BLACS/SRC/sgamx2d_.c
-+++ b/BLACS/SRC/sgamx2d_.c
-@@ -221,7 +221,7 @@ F_VOID_FUNC sgamx2d_(int *ConTxt, F_CHAR scope, F_CHAR top, int *m, int *n,
- {
- #endif
- i = 2;
-- ierr=MPI_Type_struct(i, len, disp, dtypes, &MyType);
-+ ierr=MPI_Type_create_struct(i, len, disp, dtypes, &MyType);
- ierr=MPI_Type_commit(&MyType);
- bp->N = bp2->N = 1;
- bp->dtype = bp2->dtype = MyType;
-diff --git a/BLACS/SRC/zgamn2d_.c b/BLACS/SRC/zgamn2d_.c
-index 9de2b23..37897df 100644
---- a/BLACS/SRC/zgamn2d_.c
-+++ b/BLACS/SRC/zgamn2d_.c
-@@ -221,7 +221,7 @@ F_VOID_FUNC zgamn2d_(int *ConTxt, F_CHAR scope, F_CHAR top, int *m, int *n,
- {
- #endif
- i = 2;
-- ierr=MPI_Type_struct(i, len, disp, dtypes, &MyType);
-+ ierr=MPI_Type_create_struct(i, len, disp, dtypes, &MyType);
- ierr=MPI_Type_commit(&MyType);
- bp->N = bp2->N = 1;
- bp->dtype = bp2->dtype = MyType;
-diff --git a/BLACS/SRC/zgamx2d_.c b/BLACS/SRC/zgamx2d_.c
-index 414c381..0e9d474 100644
---- a/BLACS/SRC/zgamx2d_.c
-+++ b/BLACS/SRC/zgamx2d_.c
-@@ -221,7 +221,7 @@ F_VOID_FUNC zgamx2d_(int *ConTxt, F_CHAR scope, F_CHAR top, int *m, int *n,
- {
- #endif
- i = 2;
-- ierr=MPI_Type_struct(i, len, disp, dtypes, &MyType);
-+ ierr=MPI_Type_create_struct(i, len, disp, dtypes, &MyType);
- ierr=MPI_Type_commit(&MyType);
- bp->N = bp2->N = 1;
- bp->dtype = bp2->dtype = MyType;
---
-2.20.1
-
diff --git a/gnu/packages/patches/scalapack-gcc-10-compilation.patch b/gnu/packages/patches/scalapack-gcc-10-compilation.patch
new file mode 100644
index 0000000000..cd6fb61cdf
--- /dev/null
+++ b/gnu/packages/patches/scalapack-gcc-10-compilation.patch
@@ -0,0 +1,5684 @@
+Fix Scalapack compilation with GCC 10+.
+
+Patches from <https://github.com/Reference-ScaLAPACK/scalapack/pull/26>.
+
+From 9c909f06cf51a3d00252323ce52aba46cc64ab41 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Tiziano=20M=C3=BCller?= <tiziano.mueller@chem.uzh.ch>
+Date: Thu, 25 Jun 2020 18:36:46 +0200
+Subject: [PATCH] fix argument mismatches in the SRC
+
+---
+ SRC/pclarf.f | 80 +++++++++++++++++-----------------
+ SRC/pclarfc.f | 88 ++++++++++++++++++-------------------
+ SRC/pclarz.f | 111 ++++++++++++++++++++++++-----------------------
+ SRC/pclarzc.f | 115 +++++++++++++++++++++++++------------------------
+ SRC/pclattrs.f | 55 +++++++++++------------
+ SRC/pclawil.f | 53 +++++++++++------------
+ SRC/pctrevc.f | 20 +++++----
+ SRC/pdhseqr.f | 36 ++++++++--------
+ SRC/pdlacon.f | 36 ++++++++--------
+ SRC/pdlarf.f | 80 +++++++++++++++++-----------------
+ SRC/pdlarz.f | 100 +++++++++++++++++++++---------------------
+ SRC/pdlawil.f | 48 ++++++++++-----------
+ SRC/pdstebz.f | 20 ++++-----
+ SRC/pdtrord.f | 43 +++++++++++-------
+ SRC/pdtrsen.f | 24 ++++++-----
+ SRC/pshseqr.f | 36 ++++++++--------
+ SRC/pslacon.f | 36 +++++++++-------
+ SRC/pslarf.f | 80 +++++++++++++++++-----------------
+ SRC/pslarz.f | 100 +++++++++++++++++++++---------------------
+ SRC/pslawil.f | 50 +++++++++++----------
+ SRC/psstebz.f | 20 ++++-----
+ SRC/pstrord.f | 45 +++++++++++--------
+ SRC/pstrsen.f | 22 ++++++----
+ SRC/pzlarf.f | 80 +++++++++++++++++-----------------
+ SRC/pzlarfc.f | 88 ++++++++++++++++++-------------------
+ SRC/pzlarz.f | 103 +++++++++++++++++++++----------------------
+ SRC/pzlarzc.f | 111 ++++++++++++++++++++++++-----------------------
+ SRC/pzlattrs.f | 55 +++++++++++------------
+ SRC/pzlawil.f | 49 +++++++++++----------
+ SRC/pztrevc.f | 20 +++++----
+ 30 files changed, 927 insertions(+), 877 deletions(-)
+
+diff --git a/SRC/pclarf.f b/SRC/pclarf.f
+index f941e46..371f710 100644
+--- a/SRC/pclarf.f
++++ b/SRC/pclarf.f
+@@ -242,7 +242,7 @@ SUBROUTINE PCLARF( SIDE, M, N, V, IV, JV, DESCV, INCV, TAU,
+ $ IOFFV, IPW, IROFF, IVCOL, IVROW, JJC, JJV, LDC,
+ $ LDV, MYCOL, MYROW, MP, NCC, NCV, NPCOL, NPROW,
+ $ NQ, RDEST
+- COMPLEX TAULOC
++ COMPLEX TAULOC( 1 )
+ * ..
+ * .. External Subroutines ..
+ EXTERNAL BLACS_GRIDINFO, CCOPY, CGEBR2D, CGEBS2D,
+@@ -336,7 +336,7 @@ SUBROUTINE PCLARF( SIDE, M, N, V, IV, JV, DESCV, INCV, TAU,
+ *
+ CALL CGEBS2D( ICTXT, 'Columnwise', ' ', 1, 1,
+ $ TAU( IIV ), 1 )
+- TAULOC = TAU( IIV )
++ TAULOC( 1 ) = TAU( IIV )
+ *
+ ELSE
+ *
+@@ -345,7 +345,7 @@ SUBROUTINE PCLARF( SIDE, M, N, V, IV, JV, DESCV, INCV, TAU,
+ *
+ END IF
+ *
+- IF( TAULOC.NE.ZERO ) THEN
++ IF( TAULOC( 1 ).NE.ZERO ) THEN
+ *
+ * w := sub( C )' * v
+ *
+@@ -363,8 +363,8 @@ SUBROUTINE PCLARF( SIDE, M, N, V, IV, JV, DESCV, INCV, TAU,
+ *
+ * sub( C ) := sub( C ) - v * w'
+ *
+- CALL CGERC( MP, NQ, -TAULOC, WORK, 1, WORK( IPW ),
+- $ 1, C( IOFFC ), LDC )
++ CALL CGERC( MP, NQ, -TAULOC( 1 ), WORK, 1,
++ $ WORK( IPW ), 1, C( IOFFC ), LDC )
+ END IF
+ *
+ END IF
+@@ -379,9 +379,9 @@ SUBROUTINE PCLARF( SIDE, M, N, V, IV, JV, DESCV, INCV, TAU,
+ *
+ IF( MYCOL.EQ.ICCOL ) THEN
+ *
+- TAULOC = TAU( JJV )
++ TAULOC( 1 ) = TAU( JJV )
+ *
+- IF( TAULOC.NE.ZERO ) THEN
++ IF( TAULOC( 1 ).NE.ZERO ) THEN
+ *
+ * w := sub( C )' * v
+ *
+@@ -398,7 +398,7 @@ SUBROUTINE PCLARF( SIDE, M, N, V, IV, JV, DESCV, INCV, TAU,
+ *
+ * sub( C ) := sub( C ) - v * w'
+ *
+- CALL CGERC( MP, NQ, -TAULOC, V( IOFFV ), 1,
++ CALL CGERC( MP, NQ, -TAULOC( 1 ), V( IOFFV ), 1,
+ $ WORK, 1, C( IOFFC ), LDC )
+ END IF
+ *
+@@ -421,9 +421,9 @@ SUBROUTINE PCLARF( SIDE, M, N, V, IV, JV, DESCV, INCV, TAU,
+ IPW = MP+1
+ CALL CGERV2D( ICTXT, IPW, 1, WORK, IPW, MYROW,
+ $ IVCOL )
+- TAULOC = WORK( IPW )
++ TAULOC( 1 ) = WORK( IPW )
+ *
+- IF( TAULOC.NE.ZERO ) THEN
++ IF( TAULOC( 1 ).NE.ZERO ) THEN
+ *
+ * w := sub( C )' * v
+ *
+@@ -441,7 +441,7 @@ SUBROUTINE PCLARF( SIDE, M, N, V, IV, JV, DESCV, INCV, TAU,
+ *
+ * sub( C ) := sub( C ) - v * w'
+ *
+- CALL CGERC( MP, NQ, -TAULOC, WORK, 1,
++ CALL CGERC( MP, NQ, -TAULOC( 1 ), WORK, 1,
+ $ WORK( IPW ), 1, C( IOFFC ), LDC )
+ END IF
+ *
+@@ -471,7 +471,7 @@ SUBROUTINE PCLARF( SIDE, M, N, V, IV, JV, DESCV, INCV, TAU,
+ *
+ CALL CGEBS2D( ICTXT, 'Columnwise', ' ', 1, 1,
+ $ TAU( IIV ), 1 )
+- TAULOC = TAU( IIV )
++ TAULOC( 1 ) = TAU( IIV )
+ *
+ ELSE
+ *
+@@ -480,7 +480,7 @@ SUBROUTINE PCLARF( SIDE, M, N, V, IV, JV, DESCV, INCV, TAU,
+ *
+ END IF
+ *
+- IF( TAULOC.NE.ZERO ) THEN
++ IF( TAULOC( 1 ).NE.ZERO ) THEN
+ *
+ * w := sub( C )' * v
+ *
+@@ -500,8 +500,8 @@ SUBROUTINE PCLARF( SIDE, M, N, V, IV, JV, DESCV, INCV, TAU,
+ * sub( C ) := sub( C ) - v * w'
+ *
+ IF( IOFFC.GT.0 )
+- $ CALL CGERC( MP, NQ, -TAULOC, WORK, 1, WORK( IPW ),
+- $ 1, C( IOFFC ), LDC )
++ $ CALL CGERC( MP, NQ, -TAULOC( 1 ), WORK, 1,
++ $ WORK( IPW ), 1, C( IOFFC ), LDC )
+ END IF
+ *
+ ELSE
+@@ -516,18 +516,18 @@ SUBROUTINE PCLARF( SIDE, M, N, V, IV, JV, DESCV, INCV, TAU,
+ WORK(IPW) = TAU( JJV )
+ CALL CGEBS2D( ICTXT, 'Rowwise', ROWBTOP, IPW, 1,
+ $ WORK, IPW )
+- TAULOC = TAU( JJV )
++ TAULOC( 1 ) = TAU( JJV )
+ *
+ ELSE
+ *
+ IPW = MP+1
+ CALL CGEBR2D( ICTXT, 'Rowwise', ROWBTOP, IPW, 1, WORK,
+ $ IPW, MYROW, IVCOL )
+- TAULOC = WORK( IPW )
++ TAULOC( 1 ) = WORK( IPW )
+ *
+ END IF
+ *
+- IF( TAULOC.NE.ZERO ) THEN
++ IF( TAULOC( 1 ).NE.ZERO ) THEN
+ *
+ * w := sub( C )' * v
+ *
+@@ -547,8 +547,8 @@ SUBROUTINE PCLARF( SIDE, M, N, V, IV, JV, DESCV, INCV, TAU,
+ * sub( C ) := sub( C ) - v * w'
+ *
+ IF( IOFFC.GT.0 )
+- $ CALL CGERC( MP, NQ, -TAULOC, WORK, 1, WORK( IPW ),
+- $ 1, C( IOFFC ), LDC )
++ $ CALL CGERC( MP, NQ, -TAULOC( 1 ), WORK, 1,
++ $ WORK( IPW ), 1, C( IOFFC ), LDC )
+ END IF
+ *
+ END IF
+@@ -577,9 +577,9 @@ SUBROUTINE PCLARF( SIDE, M, N, V, IV, JV, DESCV, INCV, TAU,
+ *
+ IF( MYROW.EQ.ICROW ) THEN
+ *
+- TAULOC = TAU( IIV )
++ TAULOC( 1 ) = TAU( IIV )
+ *
+- IF( TAULOC.NE.ZERO ) THEN
++ IF( TAULOC( 1 ).NE.ZERO ) THEN
+ *
+ * w := sub( C ) * v
+ *
+@@ -597,7 +597,7 @@ SUBROUTINE PCLARF( SIDE, M, N, V, IV, JV, DESCV, INCV, TAU,
+ * sub( C ) := sub( C ) - w * v'
+ *
+ IF( IOFFV.GT.0 .AND. IOFFC.GT.0 )
+- $ CALL CGERC( MP, NQ, -TAULOC, WORK, 1,
++ $ CALL CGERC( MP, NQ, -TAULOC( 1 ), WORK, 1,
+ $ V( IOFFV ), LDV, C( IOFFC ),
+ $ LDC )
+ END IF
+@@ -621,9 +621,9 @@ SUBROUTINE PCLARF( SIDE, M, N, V, IV, JV, DESCV, INCV, TAU,
+ IPW = NQ+1
+ CALL CGERV2D( ICTXT, IPW, 1, WORK, IPW, IVROW,
+ $ MYCOL )
+- TAULOC = WORK( IPW )
++ TAULOC( 1 ) = WORK( IPW )
+ *
+- IF( TAULOC.NE.ZERO ) THEN
++ IF( TAULOC( 1 ).NE.ZERO ) THEN
+ *
+ * w := sub( C ) * v
+ *
+@@ -641,8 +641,8 @@ SUBROUTINE PCLARF( SIDE, M, N, V, IV, JV, DESCV, INCV, TAU,
+ *
+ * sub( C ) := sub( C ) - w * v'
+ *
+- CALL CGERC( MP, NQ, -TAULOC, WORK( IPW ), 1,
+- $ WORK, 1, C( IOFFC ), LDC )
++ CALL CGERC( MP, NQ, -TAULOC( 1 ), WORK( IPW ),
++ $ 1, WORK, 1, C( IOFFC ), LDC )
+ END IF
+ *
+ END IF
+@@ -667,7 +667,7 @@ SUBROUTINE PCLARF( SIDE, M, N, V, IV, JV, DESCV, INCV, TAU,
+ *
+ CALL CGEBS2D( ICTXT, 'Rowwise', ' ', 1, 1,
+ $ TAU( JJV ), 1 )
+- TAULOC = TAU( JJV )
++ TAULOC( 1 ) = TAU( JJV )
+ *
+ ELSE
+ *
+@@ -676,7 +676,7 @@ SUBROUTINE PCLARF( SIDE, M, N, V, IV, JV, DESCV, INCV, TAU,
+ *
+ END IF
+ *
+- IF( TAULOC.NE.ZERO ) THEN
++ IF( TAULOC( 1 ).NE.ZERO ) THEN
+ *
+ * w := sub( C ) * v
+ *
+@@ -694,8 +694,8 @@ SUBROUTINE PCLARF( SIDE, M, N, V, IV, JV, DESCV, INCV, TAU,
+ *
+ * sub( C ) := sub( C ) - w * v'
+ *
+- CALL CGERC( MP, NQ, -TAULOC, WORK( IPW ), 1, WORK,
+- $ 1, C( IOFFC ), LDC )
++ CALL CGERC( MP, NQ, -TAULOC( 1 ), WORK( IPW ), 1,
++ $ WORK, 1, C( IOFFC ), LDC )
+ END IF
+ *
+ END IF
+@@ -720,18 +720,18 @@ SUBROUTINE PCLARF( SIDE, M, N, V, IV, JV, DESCV, INCV, TAU,
+ WORK(IPW) = TAU( IIV )
+ CALL CGEBS2D( ICTXT, 'Columnwise', COLBTOP, IPW, 1,
+ $ WORK, IPW )
+- TAULOC = TAU( IIV )
++ TAULOC( 1 ) = TAU( IIV )
+ *
+ ELSE
+ *
+ IPW = NQ+1
+ CALL CGEBR2D( ICTXT, 'Columnwise', COLBTOP, IPW, 1,
+ $ WORK, IPW, IVROW, MYCOL )
+- TAULOC = WORK( IPW )
++ TAULOC( 1 ) = WORK( IPW )
+ *
+ END IF
+ *
+- IF( TAULOC.NE.ZERO ) THEN
++ IF( TAULOC( 1 ).NE.ZERO ) THEN
+ *
+ * w := sub( C ) * v
+ *
+@@ -750,8 +750,8 @@ SUBROUTINE PCLARF( SIDE, M, N, V, IV, JV, DESCV, INCV, TAU,
+ * sub( C ) := sub( C ) - w * v'
+ *
+ IF( IOFFC.GT.0 )
+- $ CALL CGERC( MP, NQ, -TAULOC, WORK( IPW ), 1, WORK,
+- $ 1, C( IOFFC ), LDC )
++ $ CALL CGERC( MP, NQ, -TAULOC( 1 ), WORK( IPW ), 1,
++ $ WORK, 1, C( IOFFC ), LDC )
+ END IF
+ *
+ ELSE
+@@ -770,7 +770,7 @@ SUBROUTINE PCLARF( SIDE, M, N, V, IV, JV, DESCV, INCV, TAU,
+ *
+ CALL CGEBS2D( ICTXT, 'Rowwise', ' ', 1, 1, TAU( JJV ),
+ $ 1 )
+- TAULOC = TAU( JJV )
++ TAULOC( 1 ) = TAU( JJV )
+ *
+ ELSE
+ *
+@@ -779,7 +779,7 @@ SUBROUTINE PCLARF( SIDE, M, N, V, IV, JV, DESCV, INCV, TAU,
+ *
+ END IF
+ *
+- IF( TAULOC.NE.ZERO ) THEN
++ IF( TAULOC( 1 ).NE.ZERO ) THEN
+ *
+ * w := sub( C ) * v
+ *
+@@ -797,8 +797,8 @@ SUBROUTINE PCLARF( SIDE, M, N, V, IV, JV, DESCV, INCV, TAU,
+ *
+ * sub( C ) := sub( C ) - w * v'
+ *
+- CALL CGERC( MP, NQ, -TAULOC, WORK( IPW ), 1, WORK, 1,
+- $ C( IOFFC ), LDC )
++ CALL CGERC( MP, NQ, -TAULOC( 1 ), WORK( IPW ), 1,
++ $ WORK, 1, C( IOFFC ), LDC )
+ END IF
+ *
+ END IF
+diff --git a/SRC/pclarfc.f b/SRC/pclarfc.f
+index d6a2d3b..f84c493 100644
+--- a/SRC/pclarfc.f
++++ b/SRC/pclarfc.f
+@@ -242,7 +242,7 @@ SUBROUTINE PCLARFC( SIDE, M, N, V, IV, JV, DESCV, INCV, TAU,
+ $ IOFFV, IPW, IROFF, IVCOL, IVROW, JJC, JJV, LDC,
+ $ LDV, MYCOL, MYROW, MP, NCC, NCV, NPCOL, NPROW,
+ $ NQ, RDEST
+- COMPLEX TAULOC
++ COMPLEX TAULOC( 1 )
+ * ..
+ * .. External Subroutines ..
+ EXTERNAL BLACS_GRIDINFO, CCOPY, CGEBR2D, CGEBS2D,
+@@ -336,17 +336,17 @@ SUBROUTINE PCLARFC( SIDE, M, N, V, IV, JV, DESCV, INCV, TAU,
+ *
+ CALL CGEBS2D( ICTXT, 'Columnwise', ' ', 1, 1,
+ $ TAU( IIV ), 1 )
+- TAULOC = CONJG( TAU( IIV ) )
++ TAULOC( 1 ) = CONJG( TAU( IIV ) )
+ *
+ ELSE
+ *
+ CALL CGEBR2D( ICTXT, 'Columnwise', ' ', 1, 1,
+ $ TAULOC, 1, IVROW, MYCOL )
+- TAULOC = CONJG( TAULOC )
++ TAULOC( 1 ) = CONJG( TAULOC( 1 ) )
+ *
+ END IF
+ *
+- IF( TAULOC.NE.ZERO ) THEN
++ IF( TAULOC( 1 ).NE.ZERO ) THEN
+ *
+ * w := sub( C )' * v
+ *
+@@ -364,8 +364,8 @@ SUBROUTINE PCLARFC( SIDE, M, N, V, IV, JV, DESCV, INCV, TAU,
+ *
+ * sub( C ) := sub( C ) - v * w'
+ *
+- CALL CGERC( MP, NQ, -TAULOC, WORK, 1, WORK( IPW ),
+- $ 1, C( IOFFC ), LDC )
++ CALL CGERC( MP, NQ, -TAULOC( 1 ), WORK, 1,
++ $ WORK( IPW ), 1, C( IOFFC ), LDC )
+ END IF
+ *
+ END IF
+@@ -380,9 +380,9 @@ SUBROUTINE PCLARFC( SIDE, M, N, V, IV, JV, DESCV, INCV, TAU,
+ *
+ IF( MYCOL.EQ.ICCOL ) THEN
+ *
+- TAULOC = CONJG( TAU( JJV ) )
++ TAULOC( 1 ) = CONJG( TAU( JJV ) )
+ *
+- IF( TAULOC.NE.ZERO ) THEN
++ IF( TAULOC( 1 ).NE.ZERO ) THEN
+ *
+ * w := sub( C )' * v
+ *
+@@ -399,7 +399,7 @@ SUBROUTINE PCLARFC( SIDE, M, N, V, IV, JV, DESCV, INCV, TAU,
+ *
+ * sub( C ) := sub( C ) - v * w'
+ *
+- CALL CGERC( MP, NQ, -TAULOC, V( IOFFV ), 1,
++ CALL CGERC( MP, NQ, -TAULOC( 1 ), V( IOFFV ), 1,
+ $ WORK, 1, C( IOFFC ), LDC )
+ END IF
+ *
+@@ -422,9 +422,9 @@ SUBROUTINE PCLARFC( SIDE, M, N, V, IV, JV, DESCV, INCV, TAU,
+ IPW = MP+1
+ CALL CGERV2D( ICTXT, IPW, 1, WORK, IPW, MYROW,
+ $ IVCOL )
+- TAULOC = CONJG( WORK( IPW ) )
++ TAULOC( 1 ) = CONJG( WORK( IPW ) )
+ *
+- IF( TAULOC.NE.ZERO ) THEN
++ IF( TAULOC( 1 ).NE.ZERO ) THEN
+ *
+ * w := sub( C )' * v
+ *
+@@ -442,7 +442,7 @@ SUBROUTINE PCLARFC( SIDE, M, N, V, IV, JV, DESCV, INCV, TAU,
+ *
+ * sub( C ) := sub( C ) - v * w'
+ *
+- CALL CGERC( MP, NQ, -TAULOC, WORK, 1,
++ CALL CGERC( MP, NQ, -TAULOC( 1 ), WORK, 1,
+ $ WORK( IPW ), 1, C( IOFFC ), LDC )
+ END IF
+ *
+@@ -472,17 +472,17 @@ SUBROUTINE PCLARFC( SIDE, M, N, V, IV, JV, DESCV, INCV, TAU,
+ *
+ CALL CGEBS2D( ICTXT, 'Columnwise', ' ', 1, 1,
+ $ TAU( IIV ), 1 )
+- TAULOC = CONJG( TAU( IIV ) )
++ TAULOC( 1 ) = CONJG( TAU( IIV ) )
+ *
+ ELSE
+ *
+ CALL CGEBR2D( ICTXT, 'Columnwise', ' ', 1, 1, TAULOC,
+ $ 1, IVROW, MYCOL )
+- TAULOC = CONJG( TAULOC )
++ TAULOC( 1 ) = CONJG( TAULOC( 1 ) )
+ *
+ END IF
+ *
+- IF( TAULOC.NE.ZERO ) THEN
++ IF( TAULOC( 1 ).NE.ZERO ) THEN
+ *
+ * w := sub( C )' * v
+ *
+@@ -500,8 +500,8 @@ SUBROUTINE PCLARFC( SIDE, M, N, V, IV, JV, DESCV, INCV, TAU,
+ *
+ * sub( C ) := sub( C ) - v * w'
+ *
+- CALL CGERC( MP, NQ, -TAULOC, WORK, 1, WORK( IPW ), 1,
+- $ C( IOFFC ), LDC )
++ CALL CGERC( MP, NQ, -TAULOC( 1 ), WORK, 1,
++ $ WORK( IPW ), 1, C( IOFFC ), LDC )
+ END IF
+ *
+ ELSE
+@@ -516,18 +516,18 @@ SUBROUTINE PCLARFC( SIDE, M, N, V, IV, JV, DESCV, INCV, TAU,
+ WORK(IPW) = TAU( JJV )
+ CALL CGEBS2D( ICTXT, 'Rowwise', ROWBTOP, IPW, 1,
+ $ WORK, IPW )
+- TAULOC = CONJG( TAU( JJV ) )
++ TAULOC( 1 ) = CONJG( TAU( JJV ) )
+ *
+ ELSE
+ *
+ IPW = MP+1
+ CALL CGEBR2D( ICTXT, 'Rowwise', ROWBTOP, IPW, 1, WORK,
+ $ IPW, MYROW, IVCOL )
+- TAULOC = CONJG( WORK( IPW ) )
++ TAULOC( 1 ) = CONJG( WORK( IPW ) )
+ *
+ END IF
+ *
+- IF( TAULOC.NE.ZERO ) THEN
++ IF( TAULOC( 1 ).NE.ZERO ) THEN
+ *
+ * w := sub( C )' * v
+ *
+@@ -545,8 +545,8 @@ SUBROUTINE PCLARFC( SIDE, M, N, V, IV, JV, DESCV, INCV, TAU,
+ *
+ * sub( C ) := sub( C ) - v * w'
+ *
+- CALL CGERC( MP, NQ, -TAULOC, WORK, 1, WORK( IPW ), 1,
+- $ C( IOFFC ), LDC )
++ CALL CGERC( MP, NQ, -TAULOC( 1 ), WORK, 1,
++ $ WORK( IPW ), 1, C( IOFFC ), LDC )
+ END IF
+ *
+ END IF
+@@ -575,9 +575,9 @@ SUBROUTINE PCLARFC( SIDE, M, N, V, IV, JV, DESCV, INCV, TAU,
+ *
+ IF( MYROW.EQ.ICROW ) THEN
+ *
+- TAULOC = CONJG( TAU( IIV ) )
++ TAULOC( 1 ) = CONJG( TAU( IIV ) )
+ *
+- IF( TAULOC.NE.ZERO ) THEN
++ IF( TAULOC( 1 ).NE.ZERO ) THEN
+ *
+ * w := sub( C ) * v
+ *
+@@ -594,7 +594,7 @@ SUBROUTINE PCLARFC( SIDE, M, N, V, IV, JV, DESCV, INCV, TAU,
+ *
+ * sub( C ) := sub( C ) - w * v'
+ *
+- CALL CGERC( MP, NQ, -TAULOC, WORK, 1,
++ CALL CGERC( MP, NQ, -TAULOC( 1 ), WORK, 1,
+ $ V( IOFFV ), LDV, C( IOFFC ), LDC )
+ END IF
+ *
+@@ -617,9 +617,9 @@ SUBROUTINE PCLARFC( SIDE, M, N, V, IV, JV, DESCV, INCV, TAU,
+ IPW = NQ+1
+ CALL CGERV2D( ICTXT, IPW, 1, WORK, IPW, IVROW,
+ $ MYCOL )
+- TAULOC = CONJG( WORK( IPW ) )
++ TAULOC( 1 ) = CONJG( WORK( IPW ) )
+ *
+- IF( TAULOC.NE.ZERO ) THEN
++ IF( TAULOC( 1 ).NE.ZERO ) THEN
+ *
+ * w := sub( C ) * v
+ *
+@@ -637,8 +637,8 @@ SUBROUTINE PCLARFC( SIDE, M, N, V, IV, JV, DESCV, INCV, TAU,
+ *
+ * sub( C ) := sub( C ) - w * v'
+ *
+- CALL CGERC( MP, NQ, -TAULOC, WORK( IPW ), 1,
+- $ WORK, 1, C( IOFFC ), LDC )
++ CALL CGERC( MP, NQ, -TAULOC( 1 ), WORK( IPW ),
++ $ 1, WORK, 1, C( IOFFC ), LDC )
+ END IF
+ *
+ END IF
+@@ -663,17 +663,17 @@ SUBROUTINE PCLARFC( SIDE, M, N, V, IV, JV, DESCV, INCV, TAU,
+ *
+ CALL CGEBS2D( ICTXT, 'Rowwise', ' ', 1, 1,
+ $ TAU( JJV ), 1 )
+- TAULOC = CONJG( TAU( JJV ) )
++ TAULOC( 1 ) = CONJG( TAU( JJV ) )
+ *
+ ELSE
+ *
+ CALL CGEBR2D( ICTXT, 'Rowwise', ' ', 1, 1, TAULOC,
+ $ 1, MYROW, IVCOL )
+- TAULOC = CONJG( TAULOC )
++ TAULOC( 1 ) = CONJG( TAULOC( 1 ) )
+ *
+ END IF
+ *
+- IF( TAULOC.NE.ZERO ) THEN
++ IF( TAULOC( 1 ).NE.ZERO ) THEN
+ *
+ * w := sub( C ) * v
+ *
+@@ -691,8 +691,8 @@ SUBROUTINE PCLARFC( SIDE, M, N, V, IV, JV, DESCV, INCV, TAU,
+ *
+ * sub( C ) := sub( C ) - w * v'
+ *
+- CALL CGERC( MP, NQ, -TAULOC, WORK( IPW ), 1, WORK,
+- $ 1, C( IOFFC ), LDC )
++ CALL CGERC( MP, NQ, -TAULOC( 1 ), WORK( IPW ), 1,
++ $ WORK, 1, C( IOFFC ), LDC )
+ END IF
+ *
+ END IF
+@@ -716,18 +716,18 @@ SUBROUTINE PCLARFC( SIDE, M, N, V, IV, JV, DESCV, INCV, TAU,
+ WORK(IPW) = TAU( IIV )
+ CALL CGEBS2D( ICTXT, 'Columnwise', COLBTOP, IPW, 1,
+ $ WORK, IPW )
+- TAULOC = CONJG( TAU( IIV ) )
++ TAULOC( 1 ) = CONJG( TAU( IIV ) )
+ *
+ ELSE
+ *
+ IPW = NQ+1
+ CALL CGEBR2D( ICTXT, 'Columnwise', COLBTOP, IPW, 1,
+ $ WORK, IPW, IVROW, MYCOL )
+- TAULOC = CONJG( WORK( IPW ) )
++ TAULOC( 1 ) = CONJG( WORK( IPW ) )
+ *
+ END IF
+ *
+- IF( TAULOC.NE.ZERO ) THEN
++ IF( TAULOC( 1 ).NE.ZERO ) THEN
+ *
+ * w := sub( C ) * v
+ *
+@@ -745,8 +745,8 @@ SUBROUTINE PCLARFC( SIDE, M, N, V, IV, JV, DESCV, INCV, TAU,
+ *
+ * sub( C ) := sub( C ) - w * v'
+ *
+- CALL CGERC( MP, NQ, -TAULOC, WORK( IPW ), 1, WORK, 1,
+- $ C( IOFFC ), LDC )
++ CALL CGERC( MP, NQ, -TAULOC( 1 ), WORK( IPW ), 1,
++ $ WORK, 1, C( IOFFC ), LDC )
+ END IF
+ *
+ ELSE
+@@ -765,17 +765,17 @@ SUBROUTINE PCLARFC( SIDE, M, N, V, IV, JV, DESCV, INCV, TAU,
+ *
+ CALL CGEBS2D( ICTXT, 'Rowwise', ' ', 1, 1, TAU( JJV ),
+ $ 1 )
+- TAULOC = CONJG( TAU( JJV ) )
++ TAULOC( 1 ) = CONJG( TAU( JJV ) )
+ *
+ ELSE
+ *
+ CALL CGEBR2D( ICTXT, 'Rowwise', ' ', 1, 1, TAULOC, 1,
+ $ MYROW, IVCOL )
+- TAULOC = CONJG( TAULOC )
++ TAULOC( 1 ) = CONJG( TAULOC( 1 ) )
+ *
+ END IF
+ *
+- IF( TAULOC.NE.ZERO ) THEN
++ IF( TAULOC( 1 ).NE.ZERO ) THEN
+ *
+ * w := sub( C ) * v
+ *
+@@ -793,8 +793,8 @@ SUBROUTINE PCLARFC( SIDE, M, N, V, IV, JV, DESCV, INCV, TAU,
+ *
+ * sub( C ) := sub( C ) - w * v'
+ *
+- CALL CGERC( MP, NQ, -TAULOC, WORK( IPW ), 1, WORK, 1,
+- $ C( IOFFC ), LDC )
++ CALL CGERC( MP, NQ, -TAULOC( 1 ), WORK( IPW ), 1,
++ $ WORK, 1, C( IOFFC ), LDC )
+ END IF
+ *
+ END IF
+diff --git a/SRC/pclarz.f b/SRC/pclarz.f
+index 9ba730c..673860a 100644
+--- a/SRC/pclarz.f
++++ b/SRC/pclarz.f
+@@ -251,7 +251,7 @@ SUBROUTINE PCLARZ( SIDE, M, N, L, V, IV, JV, DESCV, INCV, TAU, C,
+ $ IVCOL, IVROW, JJC1, JJC2, JJV, LDC, LDV, MPC2,
+ $ MPV, MYCOL, MYROW, NCC, NCV, NPCOL, NPROW,
+ $ NQC2, NQV, RDEST
+- COMPLEX TAULOC
++ COMPLEX TAULOC( 1 )
+ * ..
+ * .. External Subroutines ..
+ EXTERNAL BLACS_GRIDINFO, CAXPY, CCOPY, CGEBR2D,
+@@ -370,7 +370,7 @@ SUBROUTINE PCLARZ( SIDE, M, N, L, V, IV, JV, DESCV, INCV, TAU, C,
+ *
+ CALL CGEBS2D( ICTXT, 'Columnwise', ' ', 1, 1,
+ $ TAU( IIV ), 1 )
+- TAULOC = TAU( IIV )
++ TAULOC( 1 ) = TAU( IIV )
+ *
+ ELSE
+ *
+@@ -379,7 +379,7 @@ SUBROUTINE PCLARZ( SIDE, M, N, L, V, IV, JV, DESCV, INCV, TAU, C,
+ *
+ END IF
+ *
+- IF( TAULOC.NE.ZERO ) THEN
++ IF( TAULOC( 1 ).NE.ZERO ) THEN
+ *
+ * w := sub( C )' * v
+ *
+@@ -402,9 +402,9 @@ SUBROUTINE PCLARZ( SIDE, M, N, L, V, IV, JV, DESCV, INCV, TAU, C,
+ * sub( C ) := sub( C ) - v * w'
+ *
+ IF( MYROW.EQ.ICROW1 )
+- $ CALL CAXPY( NQC2, -TAULOC, WORK( IPW ),
++ $ CALL CAXPY( NQC2, -TAULOC( 1 ), WORK( IPW ),
+ $ MAX( 1, NQC2 ), C( IOFFC1 ), LDC )
+- CALL CGERC( MPV, NQC2, -TAULOC, WORK, 1,
++ CALL CGERC( MPV, NQC2, -TAULOC( 1 ), WORK, 1,
+ $ WORK( IPW ), 1, C( IOFFC2 ), LDC )
+ END IF
+ *
+@@ -420,9 +420,9 @@ SUBROUTINE PCLARZ( SIDE, M, N, L, V, IV, JV, DESCV, INCV, TAU, C,
+ *
+ IF( MYCOL.EQ.ICCOL2 ) THEN
+ *
+- TAULOC = TAU( JJV )
++ TAULOC( 1 ) = TAU( JJV )
+ *
+- IF( TAULOC.NE.ZERO ) THEN
++ IF( TAULOC( 1 ).NE.ZERO ) THEN
+ *
+ * w := sub( C )' * v
+ *
+@@ -445,11 +445,11 @@ SUBROUTINE PCLARZ( SIDE, M, N, L, V, IV, JV, DESCV, INCV, TAU, C,
+ * sub( C ) := sub( C ) - v * w'
+ *
+ IF( MYROW.EQ.ICROW1 )
+- $ CALL CAXPY( NQC2, -TAULOC, WORK,
++ $ CALL CAXPY( NQC2, -TAULOC( 1 ), WORK,
+ $ MAX( 1, NQC2 ), C( IOFFC1 ),
+ $ LDC )
+- CALL CGERC( MPV, NQC2, -TAULOC, V( IOFFV ), 1,
+- $ WORK, 1, C( IOFFC2 ), LDC )
++ CALL CGERC( MPV, NQC2, -TAULOC( 1 ), V( IOFFV ),
++ $ 1, WORK, 1, C( IOFFC2 ), LDC )
+ END IF
+ *
+ END IF
+@@ -471,9 +471,9 @@ SUBROUTINE PCLARZ( SIDE, M, N, L, V, IV, JV, DESCV, INCV, TAU, C,
+ IPW = MPV+1
+ CALL CGERV2D( ICTXT, IPW, 1, WORK, IPW, MYROW,
+ $ IVCOL )
+- TAULOC = WORK( IPW )
++ TAULOC( 1 ) = WORK( IPW )
+ *
+- IF( TAULOC.NE.ZERO ) THEN
++ IF( TAULOC( 1 ).NE.ZERO ) THEN
+ *
+ * w := sub( C )' * v
+ *
+@@ -496,10 +496,10 @@ SUBROUTINE PCLARZ( SIDE, M, N, L, V, IV, JV, DESCV, INCV, TAU, C,
+ * sub( C ) := sub( C ) - v * w'
+ *
+ IF( MYROW.EQ.ICROW1 )
+- $ CALL CAXPY( NQC2, -TAULOC, WORK( IPW ),
++ $ CALL CAXPY( NQC2, -TAULOC( 1 ), WORK( IPW ),
+ $ MAX( 1, NQC2 ), C( IOFFC1 ),
+ $ LDC )
+- CALL CGERC( MPV, NQC2, -TAULOC, WORK, 1,
++ CALL CGERC( MPV, NQC2, -TAULOC( 1 ), WORK, 1,
+ $ WORK( IPW ), 1, C( IOFFC2 ), LDC )
+ END IF
+ *
+@@ -530,16 +530,16 @@ SUBROUTINE PCLARZ( SIDE, M, N, L, V, IV, JV, DESCV, INCV, TAU, C,
+ *
+ CALL CGEBS2D( ICTXT, 'Columnwise', ' ', 1, 1,
+ $ TAU( IIV ), 1 )
+- TAULOC = TAU( IIV )
++ TAULOC( 1 ) = TAU( IIV )
+ *
+ ELSE
+ *
+- CALL CGEBR2D( ICTXT, 'Columnwise', ' ', 1, 1, TAULOC,
+- $ 1, IVROW, MYCOL )
++ CALL CGEBR2D( ICTXT, 'Columnwise', ' ', 1, 1,
++ $ TAULOC( 1 ), 1, IVROW, MYCOL )
+ *
+ END IF
+ *
+- IF( TAULOC.NE.ZERO ) THEN
++ IF( TAULOC( 1 ).NE.ZERO ) THEN
+ *
+ * w := sub( C )' * v
+ *
+@@ -562,10 +562,10 @@ SUBROUTINE PCLARZ( SIDE, M, N, L, V, IV, JV, DESCV, INCV, TAU, C,
+ * sub( C ) := sub( C ) - v * w'
+ *
+ IF( MYROW.EQ.ICROW1 )
+- $ CALL CAXPY( NQC2, -TAULOC, WORK( IPW ),
++ $ CALL CAXPY( NQC2, -TAULOC( 1 ), WORK( IPW ),
+ $ MAX( 1, NQC2 ), C( IOFFC1 ), LDC )
+- CALL CGERC( MPV, NQC2, -TAULOC, WORK, 1, WORK( IPW ),
+- $ 1, C( IOFFC2 ), LDC )
++ CALL CGERC( MPV, NQC2, -TAULOC( 1 ), WORK, 1,
++ $ WORK( IPW ), 1, C( IOFFC2 ), LDC )
+ END IF
+ *
+ ELSE
+@@ -580,18 +580,18 @@ SUBROUTINE PCLARZ( SIDE, M, N, L, V, IV, JV, DESCV, INCV, TAU, C,
+ WORK( IPW ) = TAU( JJV )
+ CALL CGEBS2D( ICTXT, 'Rowwise', ROWBTOP, IPW, 1,
+ $ WORK, IPW )
+- TAULOC = TAU( JJV )
++ TAULOC( 1 ) = TAU( JJV )
+ *
+ ELSE
+ *
+ IPW = MPV+1
+ CALL CGEBR2D( ICTXT, 'Rowwise', ROWBTOP, IPW, 1, WORK,
+ $ IPW, MYROW, IVCOL )
+- TAULOC = WORK( IPW )
++ TAULOC( 1 ) = WORK( IPW )
+ *
+ END IF
+ *
+- IF( TAULOC.NE.ZERO ) THEN
++ IF( TAULOC( 1 ).NE.ZERO ) THEN
+ *
+ * w := sub( C )' * v
+ *
+@@ -614,10 +614,10 @@ SUBROUTINE PCLARZ( SIDE, M, N, L, V, IV, JV, DESCV, INCV, TAU, C,
+ * sub( C ) := sub( C ) - v * w'
+ *
+ IF( MYROW.EQ.ICROW1 )
+- $ CALL CAXPY( NQC2, -TAULOC, WORK( IPW ),
++ $ CALL CAXPY( NQC2, -TAULOC( 1 ), WORK( IPW ),
+ $ MAX( 1, NQC2 ), C( IOFFC1 ), LDC )
+- CALL CGERC( MPV, NQC2, -TAULOC, WORK, 1, WORK( IPW ),
+- $ 1, C( IOFFC2 ), LDC )
++ CALL CGERC( MPV, NQC2, -TAULOC( 1 ), WORK, 1,
++ $ WORK( IPW ), 1, C( IOFFC2 ), LDC )
+ END IF
+ *
+ END IF
+@@ -646,9 +646,9 @@ SUBROUTINE PCLARZ( SIDE, M, N, L, V, IV, JV, DESCV, INCV, TAU, C,
+ *
+ IF( MYROW.EQ.ICROW2 ) THEN
+ *
+- TAULOC = TAU( IIV )
++ TAULOC( 1 ) = TAU( IIV )
+ *
+- IF( TAULOC.NE.ZERO ) THEN
++ IF( TAULOC( 1 ).NE.ZERO ) THEN
+ *
+ * w := sub( C ) * v
+ *
+@@ -669,13 +669,13 @@ SUBROUTINE PCLARZ( SIDE, M, N, L, V, IV, JV, DESCV, INCV, TAU, C,
+ $ ICCOL2 )
+ *
+ IF( MYCOL.EQ.ICCOL1 )
+- $ CALL CAXPY( MPC2, -TAULOC, WORK, 1,
++ $ CALL CAXPY( MPC2, -TAULOC( 1 ), WORK, 1,
+ $ C( IOFFC1 ), 1 )
+ *
+ * sub( C ) := sub( C ) - w * v'
+ *
+ IF( MPC2.GT.0 .AND. NQV.GT.0 )
+- $ CALL CGERC( MPC2, NQV, -TAULOC, WORK, 1,
++ $ CALL CGERC( MPC2, NQV, -TAULOC( 1 ), WORK, 1,
+ $ V( IOFFV ), LDV, C( IOFFC2 ),
+ $ LDC )
+ END IF
+@@ -699,9 +699,9 @@ SUBROUTINE PCLARZ( SIDE, M, N, L, V, IV, JV, DESCV, INCV, TAU, C,
+ IPW = NQV+1
+ CALL CGERV2D( ICTXT, IPW, 1, WORK, IPW, IVROW,
+ $ MYCOL )
+- TAULOC = WORK( IPW )
++ TAULOC( 1 ) = WORK( IPW )
+ *
+- IF( TAULOC.NE.ZERO ) THEN
++ IF( TAULOC( 1 ).NE.ZERO ) THEN
+ *
+ * w := sub( C ) * v
+ *
+@@ -720,13 +720,14 @@ SUBROUTINE PCLARZ( SIDE, M, N, L, V, IV, JV, DESCV, INCV, TAU, C,
+ $ WORK( IPW ), MAX( 1, MPC2 ),
+ $ RDEST, ICCOL2 )
+ IF( MYCOL.EQ.ICCOL1 )
+- $ CALL CAXPY( MPC2, -TAULOC, WORK( IPW ), 1,
+- $ C( IOFFC1 ), 1 )
++ $ CALL CAXPY( MPC2, -TAULOC( 1 ), WORK( IPW ),
++ $ 1, C( IOFFC1 ), 1 )
+ *
+ * sub( C ) := sub( C ) - w * v'
+ *
+- CALL CGERC( MPC2, NQV, -TAULOC, WORK( IPW ), 1,
+- $ WORK, 1, C( IOFFC2 ), LDC )
++ CALL CGERC( MPC2, NQV, -TAULOC( 1 ),
++ $ WORK( IPW ), 1, WORK, 1,
++ $ C( IOFFC2 ), LDC )
+ END IF
+ *
+ END IF
+@@ -751,16 +752,16 @@ SUBROUTINE PCLARZ( SIDE, M, N, L, V, IV, JV, DESCV, INCV, TAU, C,
+ *
+ CALL CGEBS2D( ICTXT, 'Rowwise', ' ', 1, 1,
+ $ TAU( JJV ), 1 )
+- TAULOC = TAU( JJV )
++ TAULOC( 1 ) = TAU( JJV )
+ *
+ ELSE
+ *
+- CALL CGEBR2D( ICTXT, 'Rowwise', ' ', 1, 1, TAULOC,
+- $ 1, MYROW, IVCOL )
++ CALL CGEBR2D( ICTXT, 'Rowwise', ' ', 1, 1,
++ $ TAULOC( 1 ), 1, MYROW, IVCOL )
+ *
+ END IF
+ *
+- IF( TAULOC.NE.ZERO ) THEN
++ IF( TAULOC( 1 ).NE.ZERO ) THEN
+ *
+ * w := sub( C ) * v
+ *
+@@ -779,13 +780,13 @@ SUBROUTINE PCLARZ( SIDE, M, N, L, V, IV, JV, DESCV, INCV, TAU, C,
+ $ WORK( IPW ), MAX( 1, MPC2 ), RDEST,
+ $ ICCOL2 )
+ IF( MYCOL.EQ.ICCOL1 )
+- $ CALL CAXPY( MPC2, -TAULOC, WORK( IPW ), 1,
++ $ CALL CAXPY( MPC2, -TAULOC( 1 ), WORK( IPW ), 1,
+ $ C( IOFFC1 ), 1 )
+ *
+ * sub( C ) := sub( C ) - w * v'
+ *
+- CALL CGERC( MPC2, NQV, -TAULOC, WORK( IPW ), 1,
+- $ WORK, 1, C( IOFFC2 ), LDC )
++ CALL CGERC( MPC2, NQV, -TAULOC( 1 ), WORK( IPW ),
++ $ 1, WORK, 1, C( IOFFC2 ), LDC )
+ END IF
+ *
+ END IF
+@@ -809,18 +810,18 @@ SUBROUTINE PCLARZ( SIDE, M, N, L, V, IV, JV, DESCV, INCV, TAU, C,
+ WORK( IPW ) = TAU( IIV )
+ CALL CGEBS2D( ICTXT, 'Columnwise', COLBTOP, IPW, 1,
+ $ WORK, IPW )
+- TAULOC = TAU( IIV )
++ TAULOC( 1 ) = TAU( IIV )
+ *
+ ELSE
+ *
+ IPW = NQV+1
+ CALL CGEBR2D( ICTXT, 'Columnwise', COLBTOP, IPW, 1,
+ $ WORK, IPW, IVROW, MYCOL )
+- TAULOC = WORK( IPW )
++ TAULOC( 1 ) = WORK( IPW )
+ *
+ END IF
+ *
+- IF( TAULOC.NE.ZERO ) THEN
++ IF( TAULOC( 1 ).NE.ZERO ) THEN
+ *
+ * w := sub( C ) * v
+ *
+@@ -840,13 +841,13 @@ SUBROUTINE PCLARZ( SIDE, M, N, L, V, IV, JV, DESCV, INCV, TAU, C,
+ $ WORK( IPW ), MAX( 1, MPC2 ), RDEST,
+ $ ICCOL2 )
+ IF( MYCOL.EQ.ICCOL1 )
+- $ CALL CAXPY( MPC2, -TAULOC, WORK( IPW ), 1,
++ $ CALL CAXPY( MPC2, -TAULOC( 1 ), WORK( IPW ), 1,
+ $ C( IOFFC1 ), 1 )
+ *
+ * sub( C ) := sub( C ) - w * v'
+ *
+- CALL CGERC( MPC2, NQV, -TAULOC, WORK( IPW ), 1, WORK,
+- $ 1, C( IOFFC2 ), LDC )
++ CALL CGERC( MPC2, NQV, -TAULOC( 1 ), WORK( IPW ), 1,
++ $ WORK, 1, C( IOFFC2 ), LDC )
+ END IF
+ *
+ ELSE
+@@ -865,7 +866,7 @@ SUBROUTINE PCLARZ( SIDE, M, N, L, V, IV, JV, DESCV, INCV, TAU, C,
+ *
+ CALL CGEBS2D( ICTXT, 'Rowwise', ' ', 1, 1, TAU( JJV ),
+ $ 1 )
+- TAULOC = TAU( JJV )
++ TAULOC( 1 ) = TAU( JJV )
+ *
+ ELSE
+ *
+@@ -874,7 +875,7 @@ SUBROUTINE PCLARZ( SIDE, M, N, L, V, IV, JV, DESCV, INCV, TAU, C,
+ *
+ END IF
+ *
+- IF( TAULOC.NE.ZERO ) THEN
++ IF( TAULOC( 1 ).NE.ZERO ) THEN
+ *
+ * w := sub( C ) * v
+ *
+@@ -893,13 +894,13 @@ SUBROUTINE PCLARZ( SIDE, M, N, L, V, IV, JV, DESCV, INCV, TAU, C,
+ $ WORK( IPW ), MAX( 1, MPC2 ), RDEST,
+ $ ICCOL2 )
+ IF( MYCOL.EQ.ICCOL1 )
+- $ CALL CAXPY( MPC2, -TAULOC, WORK( IPW ), 1,
++ $ CALL CAXPY( MPC2, -TAULOC( 1 ), WORK( IPW ), 1,
+ $ C( IOFFC1 ), 1 )
+ *
+ * sub( C ) := sub( C ) - w * v'
+ *
+- CALL CGERC( MPC2, NQV, -TAULOC, WORK( IPW ), 1, WORK,
+- $ 1, C( IOFFC2 ), LDC )
++ CALL CGERC( MPC2, NQV, -TAULOC( 1 ), WORK( IPW ), 1,
++ $ WORK, 1, C( IOFFC2 ), LDC )
+ END IF
+ *
+ END IF
+diff --git a/SRC/pclarzc.f b/SRC/pclarzc.f
+index f1bc21e..b6d3b6d 100644
+--- a/SRC/pclarzc.f
++++ b/SRC/pclarzc.f
+@@ -251,7 +251,7 @@ SUBROUTINE PCLARZC( SIDE, M, N, L, V, IV, JV, DESCV, INCV, TAU, C,
+ $ IVCOL, IVROW, JJC1, JJC2, JJV, LDC, LDV, MPC2,
+ $ MPV, MYCOL, MYROW, NCC, NCV, NPCOL, NPROW,
+ $ NQC2, NQV, RDEST
+- COMPLEX TAULOC
++ COMPLEX TAULOC( 1 )
+ * ..
+ * .. External Subroutines ..
+ EXTERNAL BLACS_GRIDINFO, CAXPY, CCOPY, CGEBR2D,
+@@ -370,17 +370,17 @@ SUBROUTINE PCLARZC( SIDE, M, N, L, V, IV, JV, DESCV, INCV, TAU, C,
+ *
+ CALL CGEBS2D( ICTXT, 'Columnwise', ' ', 1, 1,
+ $ TAU( IIV ), 1 )
+- TAULOC = CONJG( TAU( IIV ) )
++ TAULOC( 1 ) = CONJG( TAU( IIV ) )
+ *
+ ELSE
+ *
+ CALL CGEBR2D( ICTXT, 'Columnwise', ' ', 1, 1,
+ $ TAULOC, 1, IVROW, MYCOL )
+- TAULOC = CONJG( TAULOC )
++ TAULOC( 1 ) = CONJG( TAULOC( 1 ) )
+ *
+ END IF
+ *
+- IF( TAULOC.NE.ZERO ) THEN
++ IF( TAULOC( 1 ).NE.ZERO ) THEN
+ *
+ * w := sub( C )' * v
+ *
+@@ -403,9 +403,9 @@ SUBROUTINE PCLARZC( SIDE, M, N, L, V, IV, JV, DESCV, INCV, TAU, C,
+ * sub( C ) := sub( C ) - v * w'
+ *
+ IF( MYROW.EQ.ICROW1 )
+- $ CALL CAXPY( NQC2, -TAULOC, WORK( IPW ),
++ $ CALL CAXPY( NQC2, -TAULOC( 1 ), WORK( IPW ),
+ $ MAX( 1, NQC2 ), C( IOFFC1 ), LDC )
+- CALL CGERC( MPV, NQC2, -TAULOC, WORK, 1,
++ CALL CGERC( MPV, NQC2, -TAULOC( 1 ), WORK, 1,
+ $ WORK( IPW ), 1, C( IOFFC2 ), LDC )
+ END IF
+ *
+@@ -421,9 +421,9 @@ SUBROUTINE PCLARZC( SIDE, M, N, L, V, IV, JV, DESCV, INCV, TAU, C,
+ *
+ IF( MYCOL.EQ.ICCOL2 ) THEN
+ *
+- TAULOC = CONJG( TAU( JJV ) )
++ TAULOC( 1 ) = CONJG( TAU( JJV ) )
+ *
+- IF( TAULOC.NE.ZERO ) THEN
++ IF( TAULOC( 1 ).NE.ZERO ) THEN
+ *
+ * w := sub( C )' * v
+ *
+@@ -446,11 +446,11 @@ SUBROUTINE PCLARZC( SIDE, M, N, L, V, IV, JV, DESCV, INCV, TAU, C,
+ * sub( C ) := sub( C ) - v * w'
+ *
+ IF( MYROW.EQ.ICROW1 )
+- $ CALL CAXPY( NQC2, -TAULOC, WORK,
++ $ CALL CAXPY( NQC2, -TAULOC( 1 ), WORK,
+ $ MAX( 1, NQC2 ), C( IOFFC1 ),
+ $ LDC )
+- CALL CGERC( MPV, NQC2, -TAULOC, V( IOFFV ), 1,
+- $ WORK, 1, C( IOFFC2 ), LDC )
++ CALL CGERC( MPV, NQC2, -TAULOC( 1 ), V( IOFFV ),
++ $ 1, WORK, 1, C( IOFFC2 ), LDC )
+ END IF
+ *
+ END IF
+@@ -472,9 +472,9 @@ SUBROUTINE PCLARZC( SIDE, M, N, L, V, IV, JV, DESCV, INCV, TAU, C,
+ IPW = MPV+1
+ CALL CGERV2D( ICTXT, IPW, 1, WORK, IPW, MYROW,
+ $ IVCOL )
+- TAULOC = CONJG( WORK( IPW ) )
++ TAULOC( 1 ) = CONJG( WORK( IPW ) )
+ *
+- IF( TAULOC.NE.ZERO ) THEN
++ IF( TAULOC( 1 ).NE.ZERO ) THEN
+ *
+ * w := sub( C )' * v
+ *
+@@ -497,10 +497,10 @@ SUBROUTINE PCLARZC( SIDE, M, N, L, V, IV, JV, DESCV, INCV, TAU, C,
+ * sub( C ) := sub( C ) - v * w'
+ *
+ IF( MYROW.EQ.ICROW1 )
+- $ CALL CAXPY( NQC2, -TAULOC, WORK( IPW ),
++ $ CALL CAXPY( NQC2, -TAULOC( 1 ), WORK( IPW ),
+ $ MAX( 1, NQC2 ), C( IOFFC1 ),
+ $ LDC )
+- CALL CGERC( MPV, NQC2, -TAULOC, WORK, 1,
++ CALL CGERC( MPV, NQC2, -TAULOC( 1 ), WORK, 1,
+ $ WORK( IPW ), 1, C( IOFFC2 ), LDC )
+ END IF
+ *
+@@ -531,17 +531,17 @@ SUBROUTINE PCLARZC( SIDE, M, N, L, V, IV, JV, DESCV, INCV, TAU, C,
+ *
+ CALL CGEBS2D( ICTXT, 'Columnwise', ' ', 1, 1,
+ $ TAU( IIV ), 1 )
+- TAULOC = CONJG( TAU( IIV ) )
++ TAULOC( 1 ) = CONJG( TAU( IIV ) )
+ *
+ ELSE
+ *
+ CALL CGEBR2D( ICTXT, 'Columnwise', ' ', 1, 1, TAULOC,
+ $ 1, IVROW, MYCOL )
+- TAULOC = CONJG( TAULOC )
++ TAULOC( 1 ) = CONJG( TAULOC( 1 ) )
+ *
+ END IF
+ *
+- IF( TAULOC.NE.ZERO ) THEN
++ IF( TAULOC( 1 ).NE.ZERO ) THEN
+ *
+ * w := sub( C )' * v
+ *
+@@ -564,10 +564,10 @@ SUBROUTINE PCLARZC( SIDE, M, N, L, V, IV, JV, DESCV, INCV, TAU, C,
+ * sub( C ) := sub( C ) - v * w'
+ *
+ IF( MYROW.EQ.ICROW1 )
+- $ CALL CAXPY( NQC2, -TAULOC, WORK( IPW ),
++ $ CALL CAXPY( NQC2, -TAULOC( 1 ), WORK( IPW ),
+ $ MAX( 1, NQC2 ), C( IOFFC1 ), LDC )
+- CALL CGERC( MPV, NQC2, -TAULOC, WORK, 1, WORK( IPW ),
+- $ 1, C( IOFFC2 ), LDC )
++ CALL CGERC( MPV, NQC2, -TAULOC( 1 ), WORK, 1,
++ $ WORK( IPW ), 1, C( IOFFC2 ), LDC )
+ END IF
+ *
+ ELSE
+@@ -582,18 +582,18 @@ SUBROUTINE PCLARZC( SIDE, M, N, L, V, IV, JV, DESCV, INCV, TAU, C,
+ WORK( IPW ) = TAU( JJV )
+ CALL CGEBS2D( ICTXT, 'Rowwise', ROWBTOP, IPW, 1,
+ $ WORK, IPW )
+- TAULOC = CONJG( TAU( JJV ) )
++ TAULOC( 1 ) = CONJG( TAU( JJV ) )
+ *
+ ELSE
+ *
+ IPW = MPV+1
+ CALL CGEBR2D( ICTXT, 'Rowwise', ROWBTOP, IPW, 1, WORK,
+ $ IPW, MYROW, IVCOL )
+- TAULOC = CONJG( WORK( IPW ) )
++ TAULOC( 1 ) = CONJG( WORK( IPW ) )
+ *
+ END IF
+ *
+- IF( TAULOC.NE.ZERO ) THEN
++ IF( TAULOC( 1 ).NE.ZERO ) THEN
+ *
+ * w := sub( C )' * v
+ *
+@@ -616,10 +616,10 @@ SUBROUTINE PCLARZC( SIDE, M, N, L, V, IV, JV, DESCV, INCV, TAU, C,
+ * sub( C ) := sub( C ) - v * w'
+ *
+ IF( MYROW.EQ.ICROW1 )
+- $ CALL CAXPY( NQC2, -TAULOC, WORK( IPW ),
++ $ CALL CAXPY( NQC2, -TAULOC( 1 ), WORK( IPW ),
+ $ MAX( 1, NQC2 ), C( IOFFC1 ), LDC )
+- CALL CGERC( MPV, NQC2, -TAULOC, WORK, 1, WORK( IPW ),
+- $ 1, C( IOFFC2 ), LDC )
++ CALL CGERC( MPV, NQC2, -TAULOC( 1 ), WORK, 1,
++ $ WORK( IPW ), 1, C( IOFFC2 ), LDC )
+ END IF
+ *
+ END IF
+@@ -648,9 +648,9 @@ SUBROUTINE PCLARZC( SIDE, M, N, L, V, IV, JV, DESCV, INCV, TAU, C,
+ *
+ IF( MYROW.EQ.ICROW2 ) THEN
+ *
+- TAULOC = CONJG( TAU( IIV ) )
++ TAULOC( 1 ) = CONJG( TAU( IIV ) )
+ *
+- IF( TAULOC.NE.ZERO ) THEN
++ IF( TAULOC( 1 ).NE.ZERO ) THEN
+ *
+ * w := sub( C ) * v
+ *
+@@ -671,12 +671,12 @@ SUBROUTINE PCLARZC( SIDE, M, N, L, V, IV, JV, DESCV, INCV, TAU, C,
+ $ ICCOL2 )
+ *
+ IF( MYCOL.EQ.ICCOL1 )
+- $ CALL CAXPY( MPC2, -TAULOC, WORK, 1,
++ $ CALL CAXPY( MPC2, -TAULOC( 1 ), WORK, 1,
+ $ C( IOFFC1 ), 1 )
+ *
+ * sub( C ) := sub( C ) - w * v'
+ *
+- CALL CGERC( MPC2, NQV, -TAULOC, WORK, 1,
++ CALL CGERC( MPC2, NQV, -TAULOC( 1 ), WORK, 1,
+ $ V( IOFFV ), LDV, C( IOFFC2 ), LDC )
+ END IF
+ *
+@@ -699,9 +699,9 @@ SUBROUTINE PCLARZC( SIDE, M, N, L, V, IV, JV, DESCV, INCV, TAU, C,
+ IPW = NQV+1
+ CALL CGERV2D( ICTXT, IPW, 1, WORK, IPW, IVROW,
+ $ MYCOL )
+- TAULOC = CONJG( WORK( IPW ) )
++ TAULOC( 1 ) = CONJG( WORK( IPW ) )
+ *
+- IF( TAULOC.NE.ZERO ) THEN
++ IF( TAULOC( 1 ).NE.ZERO ) THEN
+ *
+ * w := sub( C ) * v
+ *
+@@ -720,13 +720,14 @@ SUBROUTINE PCLARZC( SIDE, M, N, L, V, IV, JV, DESCV, INCV, TAU, C,
+ $ WORK( IPW ), MAX( 1, MPC2 ),
+ $ RDEST, ICCOL2 )
+ IF( MYCOL.EQ.ICCOL1 )
+- $ CALL CAXPY( MPC2, -TAULOC, WORK( IPW ), 1,
+- $ C( IOFFC1 ), 1 )
++ $ CALL CAXPY( MPC2, -TAULOC( 1 ), WORK( IPW ),
++ $ 1, C( IOFFC1 ), 1 )
+ *
+ * sub( C ) := sub( C ) - w * v'
+ *
+- CALL CGERC( MPC2, NQV, -TAULOC, WORK( IPW ), 1,
+- $ WORK, 1, C( IOFFC2 ), LDC )
++ CALL CGERC( MPC2, NQV, -TAULOC( 1 ),
++ $ WORK( IPW ), 1, WORK, 1,
++ $ C( IOFFC2 ), LDC )
+ END IF
+ *
+ END IF
+@@ -751,17 +752,17 @@ SUBROUTINE PCLARZC( SIDE, M, N, L, V, IV, JV, DESCV, INCV, TAU, C,
+ *
+ CALL CGEBS2D( ICTXT, 'Rowwise', ' ', 1, 1,
+ $ TAU( JJV ), 1 )
+- TAULOC = CONJG( TAU( JJV ) )
++ TAULOC( 1 ) = CONJG( TAU( JJV ) )
+ *
+ ELSE
+ *
+ CALL CGEBR2D( ICTXT, 'Rowwise', ' ', 1, 1, TAULOC,
+ $ 1, MYROW, IVCOL )
+- TAULOC = CONJG( TAULOC )
++ TAULOC( 1 ) = CONJG( TAULOC( 1 ) )
+ *
+ END IF
+ *
+- IF( TAULOC.NE.ZERO ) THEN
++ IF( TAULOC( 1 ).NE.ZERO ) THEN
+ *
+ * w := sub( C ) * v
+ *
+@@ -780,13 +781,13 @@ SUBROUTINE PCLARZC( SIDE, M, N, L, V, IV, JV, DESCV, INCV, TAU, C,
+ $ WORK( IPW ), MAX( 1, MPC2 ), RDEST,
+ $ ICCOL2 )
+ IF( MYCOL.EQ.ICCOL1 )
+- $ CALL CAXPY( MPC2, -TAULOC, WORK( IPW ), 1,
++ $ CALL CAXPY( MPC2, -TAULOC( 1 ), WORK( IPW ), 1,
+ $ C( IOFFC1 ), 1 )
+ *
+ * sub( C ) := sub( C ) - w * v'
+ *
+- CALL CGERC( MPC2, NQV, -TAULOC, WORK( IPW ), 1,
+- $ WORK, 1, C( IOFFC2 ), LDC )
++ CALL CGERC( MPC2, NQV, -TAULOC( 1 ), WORK( IPW ),
++ $ 1, WORK, 1, C( IOFFC2 ), LDC )
+ END IF
+ *
+ END IF
+@@ -810,18 +811,18 @@ SUBROUTINE PCLARZC( SIDE, M, N, L, V, IV, JV, DESCV, INCV, TAU, C,
+ WORK( IPW ) = TAU( IIV )
+ CALL CGEBS2D( ICTXT, 'Columnwise', COLBTOP, IPW, 1,
+ $ WORK, IPW )
+- TAULOC = CONJG( TAU( IIV ) )
++ TAULOC( 1 ) = CONJG( TAU( IIV ) )
+ *
+ ELSE
+ *
+ IPW = NQV+1
+ CALL CGEBR2D( ICTXT, 'Columnwise', COLBTOP, IPW, 1,
+ $ WORK, IPW, IVROW, MYCOL )
+- TAULOC = CONJG( WORK( IPW ) )
++ TAULOC( 1 ) = CONJG( WORK( IPW ) )
+ *
+ END IF
+ *
+- IF( TAULOC.NE.ZERO ) THEN
++ IF( TAULOC( 1 ).NE.ZERO ) THEN
+ *
+ * w := sub( C ) * v
+ *
+@@ -841,13 +842,13 @@ SUBROUTINE PCLARZC( SIDE, M, N, L, V, IV, JV, DESCV, INCV, TAU, C,
+ $ WORK( IPW ), MAX( 1, MPC2 ), RDEST,
+ $ ICCOL2 )
+ IF( MYCOL.EQ.ICCOL1 )
+- $ CALL CAXPY( MPC2, -TAULOC, WORK( IPW ), 1,
++ $ CALL CAXPY( MPC2, -TAULOC( 1 ), WORK( IPW ), 1,
+ $ C( IOFFC1 ), 1 )
+ *
+ * sub( C ) := sub( C ) - w * v'
+ *
+- CALL CGERC( MPC2, NQV, -TAULOC, WORK( IPW ), 1, WORK,
+- $ 1, C( IOFFC2 ), LDC )
++ CALL CGERC( MPC2, NQV, -TAULOC( 1 ), WORK( IPW ), 1,
++ $ WORK, 1, C( IOFFC2 ), LDC )
+ END IF
+ *
+ ELSE
+@@ -866,17 +867,17 @@ SUBROUTINE PCLARZC( SIDE, M, N, L, V, IV, JV, DESCV, INCV, TAU, C,
+ *
+ CALL CGEBS2D( ICTXT, 'Rowwise', ' ', 1, 1, TAU( JJV ),
+ $ 1 )
+- TAULOC = CONJG( TAU( JJV ) )
++ TAULOC( 1 ) = CONJG( TAU( JJV ) )
+ *
+ ELSE
+ *
+- CALL CGEBR2D( ICTXT, 'Rowwise', ' ', 1, 1, TAULOC, 1,
+- $ MYROW, IVCOL )
+- TAULOC = CONJG( TAULOC )
++ CALL CGEBR2D( ICTXT, 'Rowwise', ' ', 1, 1,
++ $ TAULOC( 1 ), 1, MYROW, IVCOL )
++ TAULOC( 1 ) = CONJG( TAULOC( 1 ) )
+ *
+ END IF
+ *
+- IF( TAULOC.NE.ZERO ) THEN
++ IF( TAULOC( 1 ).NE.ZERO ) THEN
+ *
+ * w := sub( C ) * v
+ *
+@@ -895,13 +896,13 @@ SUBROUTINE PCLARZC( SIDE, M, N, L, V, IV, JV, DESCV, INCV, TAU, C,
+ $ WORK( IPW ), MAX( 1, MPC2 ), RDEST,
+ $ ICCOL2 )
+ IF( MYCOL.EQ.ICCOL1 )
+- $ CALL CAXPY( MPC2, -TAULOC, WORK( IPW ), 1,
++ $ CALL CAXPY( MPC2, -TAULOC( 1 ), WORK( IPW ), 1,
+ $ C( IOFFC1 ), 1 )
+ *
+ * sub( C ) := sub( C ) - w * v'
+ *
+- CALL CGERC( MPC2, NQV, -TAULOC, WORK( IPW ), 1, WORK,
+- $ 1, C( IOFFC2 ), LDC )
++ CALL CGERC( MPC2, NQV, -TAULOC( 1 ), WORK( IPW ), 1,
++ $ WORK, 1, C( IOFFC2 ), LDC )
+ END IF
+ *
+ END IF
+diff --git a/SRC/pclattrs.f b/SRC/pclattrs.f
+index c744aea..0d12a8b 100644
+--- a/SRC/pclattrs.f
++++ b/SRC/pclattrs.f
+@@ -271,7 +271,8 @@ SUBROUTINE PCLATTRS( UPLO, TRANS, DIAG, NORMIN, N, A, IA, JA,
+ $ JINC, JLAST, LDA, LDX, MB, MYCOL, MYROW, NB,
+ $ NPCOL, NPROW, RSRC
+ REAL BIGNUM, GROW, REC, SMLNUM, TJJ, TMAX, TSCAL,
+- $ XBND, XJ, XMAX
++ $ XBND, XJ
++ REAL XMAX( 1 )
+ COMPLEX CSUMJ, TJJS, USCAL, XJTMP, ZDUM
+ * ..
+ * .. External Functions ..
+@@ -391,11 +392,11 @@ SUBROUTINE PCLATTRS( UPLO, TRANS, DIAG, NORMIN, N, A, IA, JA,
+ * Compute a bound on the computed solution vector to see if the
+ * Level 2 PBLAS routine PCTRSV can be used.
+ *
+- XMAX = ZERO
++ XMAX( 1 ) = ZERO
+ CALL PCAMAX( N, ZDUM, IMAX, X, IX, JX, DESCX, 1 )
+- XMAX = CABS2( ZDUM )
++ XMAX( 1 ) = CABS2( ZDUM )
+ CALL SGSUM2D( CONTXT, 'Row', ' ', 1, 1, XMAX, 1, -1, -1 )
+- XBND = XMAX
++ XBND = XMAX( 1 )
+ *
+ IF( NOTRAN ) THEN
+ *
+@@ -590,16 +591,16 @@ SUBROUTINE PCLATTRS( UPLO, TRANS, DIAG, NORMIN, N, A, IA, JA,
+ *
+ * Use a Level 1 PBLAS solve, scaling intermediate results.
+ *
+- IF( XMAX.GT.BIGNUM*HALF ) THEN
++ IF( XMAX( 1 ).GT.BIGNUM*HALF ) THEN
+ *
+ * Scale X so that its components are less than or equal to
+ * BIGNUM in absolute value.
+ *
+- SCALE = ( BIGNUM*HALF ) / XMAX
++ SCALE = ( BIGNUM*HALF ) / XMAX( 1 )
+ CALL PCSSCAL( N, SCALE, X, IX, JX, DESCX, 1 )
+- XMAX = BIGNUM
++ XMAX( 1 ) = BIGNUM
+ ELSE
+- XMAX = XMAX*TWO
++ XMAX( 1 ) = XMAX( 1 )*TWO
+ END IF
+ *
+ IF( NOTRAN ) THEN
+@@ -651,7 +652,7 @@ SUBROUTINE PCLATTRS( UPLO, TRANS, DIAG, NORMIN, N, A, IA, JA,
+ CALL PCSSCAL( N, REC, X, IX, JX, DESCX, 1 )
+ XJTMP = XJTMP*REC
+ SCALE = SCALE*REC
+- XMAX = XMAX*REC
++ XMAX( 1 ) = XMAX( 1 )*REC
+ END IF
+ END IF
+ * X( J ) = CLADIV( X( J ), TJJS )
+@@ -682,7 +683,7 @@ SUBROUTINE PCLATTRS( UPLO, TRANS, DIAG, NORMIN, N, A, IA, JA,
+ CALL PCSSCAL( N, REC, X, IX, JX, DESCX, 1 )
+ XJTMP = XJTMP*REC
+ SCALE = SCALE*REC
+- XMAX = XMAX*REC
++ XMAX( 1 ) = XMAX( 1 )*REC
+ END IF
+ * X( J ) = CLADIV( X( J ), TJJS )
+ * XJ = CABS1( X( J ) )
+@@ -706,7 +707,7 @@ SUBROUTINE PCLATTRS( UPLO, TRANS, DIAG, NORMIN, N, A, IA, JA,
+ XJTMP = CONE
+ XJ = ONE
+ SCALE = ZERO
+- XMAX = ZERO
++ XMAX( 1 ) = ZERO
+ END IF
+ 90 CONTINUE
+ *
+@@ -715,7 +716,7 @@ SUBROUTINE PCLATTRS( UPLO, TRANS, DIAG, NORMIN, N, A, IA, JA,
+ *
+ IF( XJ.GT.ONE ) THEN
+ REC = ONE / XJ
+- IF( CNORM( J ).GT.( BIGNUM-XMAX )*REC ) THEN
++ IF( CNORM( J ).GT.( BIGNUM-XMAX( 1 ) )*REC ) THEN
+ *
+ * Scale x by 1/(2*abs(x(j))).
+ *
+@@ -724,7 +725,7 @@ SUBROUTINE PCLATTRS( UPLO, TRANS, DIAG, NORMIN, N, A, IA, JA,
+ XJTMP = XJTMP*REC
+ SCALE = SCALE*REC
+ END IF
+- ELSE IF( XJ*CNORM( J ).GT.( BIGNUM-XMAX ) ) THEN
++ ELSE IF( XJ*CNORM( J ).GT.( BIGNUM-XMAX( 1 ) ) ) THEN
+ *
+ * Scale x by 1/2.
+ *
+@@ -743,7 +744,7 @@ SUBROUTINE PCLATTRS( UPLO, TRANS, DIAG, NORMIN, N, A, IA, JA,
+ CALL PCAXPY( J-1, ZDUM, A, IA, JA+J-1, DESCA, 1, X,
+ $ IX, JX, DESCX, 1 )
+ CALL PCAMAX( J-1, ZDUM, IMAX, X, IX, JX, DESCX, 1 )
+- XMAX = CABS1( ZDUM )
++ XMAX( 1 ) = CABS1( ZDUM )
+ CALL SGSUM2D( CONTXT, 'Row', ' ', 1, 1, XMAX, 1,
+ $ -1, -1 )
+ END IF
+@@ -757,7 +758,7 @@ SUBROUTINE PCLATTRS( UPLO, TRANS, DIAG, NORMIN, N, A, IA, JA,
+ CALL PCAXPY( N-J, ZDUM, A, IA+J, JA+J-1, DESCA, 1,
+ $ X, IX+J, JX, DESCX, 1 )
+ CALL PCAMAX( N-J, ZDUM, I, X, IX+J, JX, DESCX, 1 )
+- XMAX = CABS1( ZDUM )
++ XMAX( 1 ) = CABS1( ZDUM )
+ CALL SGSUM2D( CONTXT, 'Row', ' ', 1, 1, XMAX, 1,
+ $ -1, -1 )
+ END IF
+@@ -785,7 +786,7 @@ SUBROUTINE PCLATTRS( UPLO, TRANS, DIAG, NORMIN, N, A, IA, JA,
+ END IF
+ XJ = CABS1( XJTMP )
+ USCAL = CMPLX( TSCAL )
+- REC = ONE / MAX( XMAX, ONE )
++ REC = ONE / MAX( XMAX( 1 ), ONE )
+ IF( CNORM( J ).GT.( BIGNUM-XJ )*REC ) THEN
+ *
+ * If x(j) could overflow, scale x by 1/(2*XMAX).
+@@ -820,7 +821,7 @@ SUBROUTINE PCLATTRS( UPLO, TRANS, DIAG, NORMIN, N, A, IA, JA,
+ CALL PCSSCAL( N, REC, X, IX, JX, DESCX, 1 )
+ XJTMP = XJTMP*REC
+ SCALE = SCALE*REC
+- XMAX = XMAX*REC
++ XMAX( 1 ) = XMAX( 1 )*REC
+ END IF
+ END IF
+ *
+@@ -924,7 +925,7 @@ SUBROUTINE PCLATTRS( UPLO, TRANS, DIAG, NORMIN, N, A, IA, JA,
+ CALL PCSSCAL( N, REC, X, IX, JX, DESCX, 1 )
+ XJTMP = XJTMP*REC
+ SCALE = SCALE*REC
+- XMAX = XMAX*REC
++ XMAX( 1 ) = XMAX( 1 )*REC
+ END IF
+ END IF
+ * X( J ) = CLADIV( X( J ), TJJS )
+@@ -945,7 +946,7 @@ SUBROUTINE PCLATTRS( UPLO, TRANS, DIAG, NORMIN, N, A, IA, JA,
+ CALL PCSSCAL( N, REC, X, IX, JX, DESCX, 1 )
+ XJTMP = XJTMP*REC
+ SCALE = SCALE*REC
+- XMAX = XMAX*REC
++ XMAX( 1 ) = XMAX( 1 )*REC
+ END IF
+ * X( J ) = CLADIV( X( J ), TJJS )
+ XJTMP = CLADIV( XJTMP, TJJS )
+@@ -966,7 +967,7 @@ SUBROUTINE PCLATTRS( UPLO, TRANS, DIAG, NORMIN, N, A, IA, JA,
+ END IF
+ XJTMP = CONE
+ SCALE = ZERO
+- XMAX = ZERO
++ XMAX( 1 ) = ZERO
+ END IF
+ 110 CONTINUE
+ ELSE
+@@ -981,7 +982,7 @@ SUBROUTINE PCLATTRS( UPLO, TRANS, DIAG, NORMIN, N, A, IA, JA,
+ X( IROWX ) = XJTMP
+ END IF
+ END IF
+- XMAX = MAX( XMAX, CABS1( XJTMP ) )
++ XMAX( 1 ) = MAX( XMAX( 1 ), CABS1( XJTMP ) )
+ 120 CONTINUE
+ *
+ ELSE
+@@ -1004,7 +1005,7 @@ SUBROUTINE PCLATTRS( UPLO, TRANS, DIAG, NORMIN, N, A, IA, JA,
+ END IF
+ XJ = CABS1( XJTMP )
+ USCAL = TSCAL
+- REC = ONE / MAX( XMAX, ONE )
++ REC = ONE / MAX( XMAX( 1 ), ONE )
+ IF( CNORM( J ).GT.( BIGNUM-XJ )*REC ) THEN
+ *
+ * If x(j) could overflow, scale x by 1/(2*XMAX).
+@@ -1039,7 +1040,7 @@ SUBROUTINE PCLATTRS( UPLO, TRANS, DIAG, NORMIN, N, A, IA, JA,
+ CALL PCSSCAL( N, REC, X, IX, JX, DESCX, 1 )
+ XJTMP = XJTMP*REC
+ SCALE = SCALE*REC
+- XMAX = XMAX*REC
++ XMAX( 1 ) = XMAX( 1 )*REC
+ END IF
+ END IF
+ *
+@@ -1145,7 +1146,7 @@ SUBROUTINE PCLATTRS( UPLO, TRANS, DIAG, NORMIN, N, A, IA, JA,
+ CALL PCSSCAL( N, REC, X, IX, JX, DESCX, 1 )
+ XJTMP = XJTMP*REC
+ SCALE = SCALE*REC
+- XMAX = XMAX*REC
++ XMAX( 1 ) = XMAX( 1 )*REC
+ END IF
+ END IF
+ * X( J ) = CLADIV( X( J ), TJJS )
+@@ -1164,7 +1165,7 @@ SUBROUTINE PCLATTRS( UPLO, TRANS, DIAG, NORMIN, N, A, IA, JA,
+ CALL PCSSCAL( N, REC, X, IX, JX, DESCX, 1 )
+ XJTMP = XJTMP*REC
+ SCALE = SCALE*REC
+- XMAX = XMAX*REC
++ XMAX( 1 ) = XMAX( 1 )*REC
+ END IF
+ * X( J ) = CLADIV( X( J ), TJJS )
+ XJTMP = CLADIV( XJTMP, TJJS )
+@@ -1181,7 +1182,7 @@ SUBROUTINE PCLATTRS( UPLO, TRANS, DIAG, NORMIN, N, A, IA, JA,
+ $ X( IROWX ) = CONE
+ XJTMP = CONE
+ SCALE = ZERO
+- XMAX = ZERO
++ XMAX( 1 ) = ZERO
+ END IF
+ 130 CONTINUE
+ ELSE
+@@ -1194,7 +1195,7 @@ SUBROUTINE PCLATTRS( UPLO, TRANS, DIAG, NORMIN, N, A, IA, JA,
+ IF( ( MYROW.EQ.ITMP1X ) .AND. ( MYCOL.EQ.ITMP2X ) )
+ $ X( IROWX ) = XJTMP
+ END IF
+- XMAX = MAX( XMAX, CABS1( XJTMP ) )
++ XMAX( 1 ) = MAX( XMAX( 1 ), CABS1( XJTMP ) )
+ 140 CONTINUE
+ END IF
+ SCALE = SCALE / TSCAL
+diff --git a/SRC/pclawil.f b/SRC/pclawil.f
+index 24a49b9..b33b3b1 100644
+--- a/SRC/pclawil.f
++++ b/SRC/pclawil.f
+@@ -124,11 +124,10 @@ SUBROUTINE PCLAWIL( II, JJ, M, A, DESCA, H44, H33, H43H34, V )
+ $ MODKM1, MYCOL, MYROW, NPCOL, NPROW, NUM, RIGHT,
+ $ RSRC, UP
+ REAL S
+- COMPLEX CDUM, H11, H12, H21, H22, H33S, H44S, V1, V2,
+- $ V3
++ COMPLEX CDUM, H22, H33S, H44S, V1, V2
+ * ..
+ * .. Local Arrays ..
+- COMPLEX BUF( 4 )
++ COMPLEX BUF( 4 ), V3( 1 ), H11( 1 ), H12( 1 ), H21( 1 )
+ * ..
+ * .. External Subroutines ..
+ EXTERNAL BLACS_GRIDINFO, INFOG2L, CGERV2D, CGESD2D
+@@ -181,18 +180,18 @@ SUBROUTINE PCLAWIL( II, JJ, M, A, DESCA, H44, H33, H43H34, V )
+ IF( NPCOL.GT.1 ) THEN
+ CALL CGERV2D( CONTXT, 1, 1, V3, 1, MYROW, LEFT )
+ ELSE
+- V3 = A( ( ICOL-2 )*LDA+IROW )
++ V3( 1 ) = A( ( ICOL-2 )*LDA+IROW )
+ END IF
+ IF( NUM.GT.1 ) THEN
+ CALL CGERV2D( CONTXT, 4, 1, BUF, 4, UP, LEFT )
+- H11 = BUF( 1 )
+- H21 = BUF( 2 )
+- H12 = BUF( 3 )
++ H11( 1 ) = BUF( 1 )
++ H21( 1 ) = BUF( 2 )
++ H12( 1 ) = BUF( 3 )
+ H22 = BUF( 4 )
+ ELSE
+- H11 = A( ( ICOL-3 )*LDA+IROW-2 )
+- H21 = A( ( ICOL-3 )*LDA+IROW-1 )
+- H12 = A( ( ICOL-2 )*LDA+IROW-2 )
++ H11( 1 ) = A( ( ICOL-3 )*LDA+IROW-2 )
++ H21( 1 ) = A( ( ICOL-3 )*LDA+IROW-1 )
++ H12( 1 ) = A( ( ICOL-2 )*LDA+IROW-2 )
+ H22 = A( ( ICOL-2 )*LDA+IROW-1 )
+ END IF
+ END IF
+@@ -223,22 +222,22 @@ SUBROUTINE PCLAWIL( II, JJ, M, A, DESCA, H44, H33, H43H34, V )
+ CALL INFOG2L( M+2, M+2, DESCA, NPROW, NPCOL, MYROW, MYCOL,
+ $ IROW, ICOL, RSRC, JSRC )
+ IF( NUM.GT.1 ) THEN
+- CALL CGERV2D( CONTXT, 1, 1, H11, 1, UP, LEFT )
++ CALL CGERV2D( CONTXT, 1, 1, H11( 1 ), 1, UP, LEFT )
+ ELSE
+- H11 = A( ( ICOL-3 )*LDA+IROW-2 )
++ H11( 1 ) = A( ( ICOL-3 )*LDA+IROW-2 )
+ END IF
+ IF( NPROW.GT.1 ) THEN
+ CALL CGERV2D( CONTXT, 1, 1, H12, 1, UP, MYCOL )
+ ELSE
+- H12 = A( ( ICOL-2 )*LDA+IROW-2 )
++ H12( 1 ) = A( ( ICOL-2 )*LDA+IROW-2 )
+ END IF
+ IF( NPCOL.GT.1 ) THEN
+- CALL CGERV2D( CONTXT, 1, 1, H21, 1, MYROW, LEFT )
++ CALL CGERV2D( CONTXT, 1, 1, H21( 1 ), 1, MYROW, LEFT )
+ ELSE
+- H21 = A( ( ICOL-3 )*LDA+IROW-1 )
++ H21( 1 ) = A( ( ICOL-3 )*LDA+IROW-1 )
+ END IF
+ H22 = A( ( ICOL-2 )*LDA+IROW-1 )
+- V3 = A( ( ICOL-2 )*LDA+IROW )
++ V3( 1 ) = A( ( ICOL-2 )*LDA+IROW )
+ END IF
+ END IF
+ IF( ( MYROW.NE.II ) .OR. ( MYCOL.NE.JJ ) )
+@@ -247,24 +246,24 @@ SUBROUTINE PCLAWIL( II, JJ, M, A, DESCA, H44, H33, H43H34, V )
+ IF( MODKM1.GT.1 ) THEN
+ CALL INFOG2L( M+2, M+2, DESCA, NPROW, NPCOL, MYROW, MYCOL,
+ $ IROW, ICOL, RSRC, JSRC )
+- H11 = A( ( ICOL-3 )*LDA+IROW-2 )
+- H21 = A( ( ICOL-3 )*LDA+IROW-1 )
+- H12 = A( ( ICOL-2 )*LDA+IROW-2 )
++ H11( 1 ) = A( ( ICOL-3 )*LDA+IROW-2 )
++ H21( 1 ) = A( ( ICOL-3 )*LDA+IROW-1 )
++ H12( 1 ) = A( ( ICOL-2 )*LDA+IROW-2 )
+ H22 = A( ( ICOL-2 )*LDA+IROW-1 )
+- V3 = A( ( ICOL-2 )*LDA+IROW )
++ V3( 1 ) = A( ( ICOL-2 )*LDA+IROW )
+ END IF
+ *
+- H44S = H44 - H11
+- H33S = H33 - H11
+- V1 = ( H33S*H44S-H43H34 ) / H21 + H12
+- V2 = H22 - H11 - H33S - H44S
+- S = CABS1( V1 ) + CABS1( V2 ) + CABS1( V3 )
++ H44S = H44 - H11( 1 )
++ H33S = H33 - H11( 1 )
++ V1 = ( H33S*H44S-H43H34 ) / H21( 1 ) + H12( 1 )
++ V2 = H22 - H11( 1 ) - H33S - H44S
++ S = CABS1( V1 ) + CABS1( V2 ) + CABS1( V3( 1 ) )
+ V1 = V1 / S
+ V2 = V2 / S
+- V3 = V3 / S
++ V3( 1 ) = V3( 1 ) / S
+ V( 1 ) = V1
+ V( 2 ) = V2
+- V( 3 ) = V3
++ V( 3 ) = V3( 1 )
+ *
+ RETURN
+ *
+diff --git a/SRC/pctrevc.f b/SRC/pctrevc.f
+index d0a3043..bf6c52b 100644
+--- a/SRC/pctrevc.f
++++ b/SRC/pctrevc.f
+@@ -218,11 +218,12 @@ SUBROUTINE PCTREVC( SIDE, HOWMNY, SELECT, N, T, DESCT, VL, DESCVL,
+ $ ITMP2, J, K, KI, LDT, LDVL, LDVR, LDW, MB,
+ $ MYCOL, MYROW, NB, NPCOL, NPROW, RSRC
+ REAL SELF
+- REAL OVFL, REMAXD, SCALE, SMIN, SMLNUM, ULP, UNFL
++ REAL OVFL, REMAXD, SCALE, SMLNUM, ULP, UNFL
+ COMPLEX CDUM, REMAXC, SHIFT
+ * ..
+ * .. Local Arrays ..
+ INTEGER DESCW( DLEN_ )
++ REAL SMIN( 1 )
+ * ..
+ * .. External Functions ..
+ LOGICAL LSAME
+@@ -355,13 +356,13 @@ SUBROUTINE PCTREVC( SIDE, HOWMNY, SELECT, N, T, DESCT, VL, DESCVL,
+ $ GO TO 70
+ END IF
+ *
+- SMIN = ZERO
++ SMIN( 1 ) = ZERO
+ SHIFT = CZERO
+ CALL INFOG2L( KI, KI, DESCT, NPROW, NPCOL, MYROW, MYCOL,
+ $ IROW, ICOL, ITMP1, ITMP2 )
+ IF( ( MYROW.EQ.ITMP1 ) .AND. ( MYCOL.EQ.ITMP2 ) ) THEN
+ SHIFT = T( ( ICOL-1 )*LDT+IROW )
+- SMIN = MAX( ULP*( CABS1( SHIFT ) ), SMLNUM )
++ SMIN( 1 ) = MAX( ULP*( CABS1( SHIFT ) ), SMLNUM )
+ END IF
+ CALL SGSUM2D( CONTXT, 'ALL', ' ', 1, 1, SMIN, 1, -1, -1 )
+ CALL CGSUM2D( CONTXT, 'ALL', ' ', 1, 1, SHIFT, 1, -1, -1 )
+@@ -396,8 +397,9 @@ SUBROUTINE PCTREVC( SIDE, HOWMNY, SELECT, N, T, DESCT, VL, DESCVL,
+ IF( ( MYROW.EQ.ITMP1 ) .AND. ( MYCOL.EQ.ITMP2 ) ) THEN
+ T( ( ICOL-1 )*LDT+IROW ) = T( ( ICOL-1 )*LDT+IROW ) -
+ $ SHIFT
+- IF( CABS1( T( ( ICOL-1 )*LDT+IROW ) ).LT.SMIN ) THEN
+- T( ( ICOL-1 )*LDT+IROW ) = CMPLX( SMIN )
++ IF( CABS1( T( ( ICOL-1 )*LDT+IROW ) ).LT.SMIN( 1 ) )
++ $ THEN
++ T( ( ICOL-1 )*LDT+IROW ) = CMPLX( SMIN( 1 ) )
+ END IF
+ END IF
+ 50 CONTINUE
+@@ -467,13 +469,13 @@ SUBROUTINE PCTREVC( SIDE, HOWMNY, SELECT, N, T, DESCT, VL, DESCVL,
+ $ GO TO 110
+ END IF
+ *
+- SMIN = ZERO
++ SMIN( 1 ) = ZERO
+ SHIFT = CZERO
+ CALL INFOG2L( KI, KI, DESCT, NPROW, NPCOL, MYROW, MYCOL,
+ $ IROW, ICOL, ITMP1, ITMP2 )
+ IF( ( MYROW.EQ.ITMP1 ) .AND. ( MYCOL.EQ.ITMP2 ) ) THEN
+ SHIFT = T( ( ICOL-1 )*LDT+IROW )
+- SMIN = MAX( ULP*( CABS1( SHIFT ) ), SMLNUM )
++ SMIN( 1 ) = MAX( ULP*( CABS1( SHIFT ) ), SMLNUM )
+ END IF
+ CALL SGSUM2D( CONTXT, 'ALL', ' ', 1, 1, SMIN, 1, -1, -1 )
+ CALL CGSUM2D( CONTXT, 'ALL', ' ', 1, 1, SHIFT, 1, -1, -1 )
+@@ -507,8 +509,8 @@ SUBROUTINE PCTREVC( SIDE, HOWMNY, SELECT, N, T, DESCT, VL, DESCVL,
+ IF( ( MYROW.EQ.ITMP1 ) .AND. ( MYCOL.EQ.ITMP2 ) ) THEN
+ T( ( ICOL-1 )*LDT+IROW ) = T( ( ICOL-1 )*LDT+IROW ) -
+ $ SHIFT
+- IF( CABS1( T( ( ICOL-1 )*LDT+IROW ) ).LT.SMIN )
+- $ T( ( ICOL-1 )*LDT+IROW ) = CMPLX( SMIN )
++ IF( CABS1( T( ( ICOL-1 )*LDT+IROW ) ).LT.SMIN( 1 ) )
++ $ T( ( ICOL-1 )*LDT+IROW ) = CMPLX( SMIN( 1 ) )
+ END IF
+ 90 CONTINUE
+ *
+diff --git a/SRC/pdhseqr.f b/SRC/pdhseqr.f
+index ffc3652..6e0f751 100644
+--- a/SRC/pdhseqr.f
++++ b/SRC/pdhseqr.f
+@@ -259,11 +259,12 @@ SUBROUTINE PDHSEQR( JOB, COMPZ, N, ILO, IHI, H, DESCH, WR, WI, Z,
+ $ HRSRC4, HCSRC4, LIWKOPT
+ LOGICAL INITZ, LQUERY, WANTT, WANTZ, PAIR, BORDER
+ DOUBLE PRECISION TMP1, TMP2, TMP3, TMP4, DUM1, DUM2, DUM3,
+- $ DUM4, ELEM1, ELEM2, ELEM3, ELEM4,
++ $ DUM4, ELEM1, ELEM4,
+ $ CS, SN, ELEM5, TMP, LWKOPT
+ * ..
+ * .. Local Arrays ..
+ INTEGER DESCH2( DLEN_ )
++ DOUBLE PRECISION ELEM2( 1 ), ELEM3( 1 )
+ * ..
+ * .. External Functions ..
+ INTEGER PILAENVX, NUMROC, ICEIL
+@@ -566,28 +567,28 @@ SUBROUTINE PDHSEQR( JOB, COMPZ, N, ILO, IHI, H, DESCH, WR, WI, Z,
+ IF( MYROW.EQ.HRSRC1 .AND. MYCOL.EQ.HCSRC1 ) THEN
+ ELEM1 = H((JLOC1-1)*LLDH+ILOC1)
+ IF( K.LT.N ) THEN
+- ELEM3 = H((JLOC1-1)*LLDH+ILOC1+1)
++ ELEM3( 1 ) = H((JLOC1-1)*LLDH+ILOC1+1)
+ ELSE
+- ELEM3 = ZERO
++ ELEM3( 1 ) = ZERO
+ END IF
+- IF( ELEM3.NE.ZERO ) THEN
+- ELEM2 = H((JLOC1)*LLDH+ILOC1)
++ IF( ELEM3( 1 ).NE.ZERO ) THEN
++ ELEM2( 1 ) = H((JLOC1)*LLDH+ILOC1)
+ ELEM4 = H((JLOC1)*LLDH+ILOC1+1)
+- CALL DLANV2( ELEM1, ELEM2, ELEM3, ELEM4,
+- $ WR( K ), WI( K ), WR( K+1 ), WI( K+1 ),
+- $ SN, CS )
++ CALL DLANV2( ELEM1, ELEM2( 1 ), ELEM3( 1 ),
++ $ ELEM4, WR( K ), WI( K ), WR( K+1 ),
++ $ WI( K+1 ), SN, CS )
+ PAIR = .TRUE.
+ ELSE
+ IF( K.GT.1 ) THEN
+ TMP = H((JLOC1-2)*LLDH+ILOC1)
+ IF( TMP.NE.ZERO ) THEN
+ ELEM1 = H((JLOC1-2)*LLDH+ILOC1-1)
+- ELEM2 = H((JLOC1-1)*LLDH+ILOC1-1)
+- ELEM3 = H((JLOC1-2)*LLDH+ILOC1)
++ ELEM2( 1 ) = H((JLOC1-1)*LLDH+ILOC1-1)
++ ELEM3( 1 ) = H((JLOC1-2)*LLDH+ILOC1)
+ ELEM4 = H((JLOC1-1)*LLDH+ILOC1)
+- CALL DLANV2( ELEM1, ELEM2, ELEM3,
+- $ ELEM4, WR( K-1 ), WI( K-1 ),
+- $ WR( K ), WI( K ), SN, CS )
++ CALL DLANV2( ELEM1, ELEM2( 1 ),
++ $ ELEM3( 1 ), ELEM4, WR( K-1 ),
++ $ WI( K-1 ), WR( K ), WI( K ), SN, CS )
+ ELSE
+ WR( K ) = ELEM1
+ END IF
+@@ -620,12 +621,12 @@ SUBROUTINE PDHSEQR( JOB, COMPZ, N, ILO, IHI, H, DESCH, WR, WI, Z,
+ CALL INFOG2L( K+1, K+1, DESCH, NPROW, NPCOL, MYROW, MYCOL,
+ $ ILOC4, JLOC4, HRSRC4, HCSRC4 )
+ IF( MYROW.EQ.HRSRC2 .AND. MYCOL.EQ.HCSRC2 ) THEN
+- ELEM2 = H((JLOC2-1)*LLDH+ILOC2)
++ ELEM2( 1 ) = H((JLOC2-1)*LLDH+ILOC2)
+ IF( HRSRC1.NE.HRSRC2 .OR. HCSRC1.NE.HCSRC2 )
+ $ CALL DGESD2D( ICTXT, 1, 1, ELEM2, 1, HRSRC1, HCSRC1)
+ END IF
+ IF( MYROW.EQ.HRSRC3 .AND. MYCOL.EQ.HCSRC3 ) THEN
+- ELEM3 = H((JLOC3-1)*LLDH+ILOC3)
++ ELEM3( 1 ) = H((JLOC3-1)*LLDH+ILOC3)
+ IF( HRSRC1.NE.HRSRC3 .OR. HCSRC1.NE.HCSRC3 )
+ $ CALL DGESD2D( ICTXT, 1, 1, ELEM3, 1, HRSRC1, HCSRC1)
+ END IF
+@@ -651,8 +652,9 @@ SUBROUTINE PDHSEQR( JOB, COMPZ, N, ILO, IHI, H, DESCH, WR, WI, Z,
+ ELEM5 = WORK(2)
+ IF( ELEM5.EQ.ZERO ) THEN
+ IF( WR( K ).EQ.ZERO .AND. WI( K ).EQ.ZERO ) THEN
+- CALL DLANV2( ELEM1, ELEM2, ELEM3, ELEM4, WR( K ),
+- $ WI( K ), WR( K+1 ), WI( K+1 ), SN, CS )
++ CALL DLANV2( ELEM1, ELEM2( 1 ), ELEM3( 1 ), ELEM4,
++ $ WR( K ), WI( K ), WR( K+1 ), WI( K+1 ), SN,
++ $ CS )
+ ELSEIF( WR( K+1 ).EQ.ZERO .AND. WI( K+1 ).EQ.ZERO )
+ $ THEN
+ WR( K+1 ) = ELEM4
+diff --git a/SRC/pdlacon.f b/SRC/pdlacon.f
+index b625d97..74b9eab 100644
+--- a/SRC/pdlacon.f
++++ b/SRC/pdlacon.f
+@@ -160,10 +160,10 @@ SUBROUTINE PDLACON( N, V, IV, JV, DESCV, X, IX, JX, DESCX, ISGN,
+ INTEGER I, ICTXT, IFLAG, IIVX, IMAXROW, IOFFVX, IROFF,
+ $ ITER, IVXCOL, IVXROW, J, JLAST, JJVX, JUMP,
+ $ K, MYCOL, MYROW, NP, NPCOL, NPROW
+- DOUBLE PRECISION ALTSGN, ESTOLD, JLMAX, TEMP, XMAX
++ DOUBLE PRECISION ALTSGN, ESTOLD, JLMAX, XMAX
+ * ..
+ * .. Local Arrays ..
+- DOUBLE PRECISION WORK( 2 )
++ DOUBLE PRECISION ESTWORK( 1 ), TEMP( 1 ), WORK( 2 )
+ * ..
+ * .. External Subroutines ..
+ EXTERNAL BLACS_GRIDINFO, DCOPY, DGEBR2D, DGEBS2D,
+@@ -184,6 +184,7 @@ SUBROUTINE PDLACON( N, V, IV, JV, DESCV, X, IX, JX, DESCX, ISGN,
+ *
+ * Get grid parameters.
+ *
++ ESTWORK( 1 ) = EST
+ ICTXT = DESCX( CTXT_ )
+ CALL BLACS_GRIDINFO( ICTXT, NPROW, NPCOL, MYROW, MYCOL )
+ *
+@@ -215,21 +216,21 @@ SUBROUTINE PDLACON( N, V, IV, JV, DESCV, X, IX, JX, DESCX, ISGN,
+ IF( N.EQ.1 ) THEN
+ IF( MYROW.EQ.IVXROW ) THEN
+ V( IOFFVX ) = X( IOFFVX )
+- EST = ABS( V( IOFFVX ) )
+- CALL DGEBS2D( ICTXT, 'Columnwise', ' ', 1, 1, EST, 1 )
++ ESTWORK( 1 ) = ABS( V( IOFFVX ) )
++ CALL DGEBS2D( ICTXT, 'Columnwise', ' ', 1, 1, ESTWORK, 1 )
+ ELSE
+- CALL DGEBR2D( ICTXT, 'Columnwise', ' ', 1, 1, EST, 1,
++ CALL DGEBR2D( ICTXT, 'Columnwise', ' ', 1, 1, ESTWORK, 1,
+ $ IVXROW, MYCOL )
+ END IF
+ * ... QUIT
+ GO TO 150
+ END IF
+- CALL PDASUM( N, EST, X, IX, JX, DESCX, 1 )
++ CALL PDASUM( N, ESTWORK( 1 ), X, IX, JX, DESCX, 1 )
+ IF( DESCX( M_ ).EQ.1 .AND. N.EQ.1 ) THEN
+ IF( MYROW.EQ.IVXROW ) THEN
+- CALL DGEBS2D( ICTXT, 'Columnwise', ' ', 1, 1, EST, 1 )
++ CALL DGEBS2D( ICTXT, 'Columnwise', ' ', 1, 1, ESTWORK, 1 )
+ ELSE
+- CALL DGEBR2D( ICTXT, 'Columnwise', ' ', 1, 1, EST, 1,
++ CALL DGEBR2D( ICTXT, 'Columnwise', ' ', 1, 1, ESTWORK, 1,
+ $ IVXROW, MYCOL )
+ END IF
+ END IF
+@@ -281,13 +282,13 @@ SUBROUTINE PDLACON( N, V, IV, JV, DESCV, X, IX, JX, DESCX, ISGN,
+ *
+ 70 CONTINUE
+ CALL DCOPY( NP, X( IOFFVX ), 1, V( IOFFVX ), 1 )
+- ESTOLD = EST
+- CALL PDASUM( N, EST, V, IV, JV, DESCV, 1 )
++ ESTOLD = ESTWORK( 1 )
++ CALL PDASUM( N, ESTWORK( 1 ), V, IV, JV, DESCV, 1 )
+ IF( DESCV( M_ ).EQ.1 .AND. N.EQ.1 ) THEN
+ IF( MYROW.EQ.IVXROW ) THEN
+- CALL DGEBS2D( ICTXT, 'Columnwise', ' ', 1, 1, EST, 1 )
++ CALL DGEBS2D( ICTXT, 'Columnwise', ' ', 1, 1, ESTWORK, 1 )
+ ELSE
+- CALL DGEBR2D( ICTXT, 'Columnwise', ' ', 1, 1, EST, 1,
++ CALL DGEBR2D( ICTXT, 'Columnwise', ' ', 1, 1, ESTWORK, 1,
+ $ IVXROW, MYCOL )
+ END IF
+ END IF
+@@ -305,7 +306,7 @@ SUBROUTINE PDLACON( N, V, IV, JV, DESCV, X, IX, JX, DESCX, ISGN,
+ * REPEATED SIGN VECTOR DETECTED, HENCE ALGORITHM HAS CONVERGED.
+ * ALONG WITH IT, TEST FOR CYCLING.
+ *
+- IF( IFLAG.EQ.0 .OR. EST.LE.ESTOLD )
++ IF( IFLAG.EQ.0 .OR. ESTWORK( 1 ).LE.ESTOLD )
+ $ GO TO 120
+ *
+ DO 100 I = IOFFVX, IOFFVX+NP-1
+@@ -361,7 +362,7 @@ SUBROUTINE PDLACON( N, V, IV, JV, DESCV, X, IX, JX, DESCX, ISGN,
+ * X HAS BEEN OVERWRITTEN BY A*X
+ *
+ 140 CONTINUE
+- CALL PDASUM( N, TEMP, X, IX, JX, DESCX, 1 )
++ CALL PDASUM( N, TEMP( 1 ), X, IX, JX, DESCX, 1 )
+ IF( DESCX( M_ ).EQ.1 .AND. N.EQ.1 ) THEN
+ IF( MYROW.EQ.IVXROW ) THEN
+ CALL DGEBS2D( ICTXT, 'Columnwise', ' ', 1, 1, TEMP, 1 )
+@@ -370,15 +371,16 @@ SUBROUTINE PDLACON( N, V, IV, JV, DESCV, X, IX, JX, DESCX, ISGN,
+ $ IVXROW, MYCOL )
+ END IF
+ END IF
+- TEMP = TWO*( TEMP / DBLE( 3*N ) )
+- IF( TEMP.GT.EST ) THEN
++ TEMP( 1 ) = TWO*( TEMP( 1 ) / DBLE( 3*N ) )
++ IF( TEMP( 1 ).GT.ESTWORK( 1 ) ) THEN
+ CALL DCOPY( NP, X( IOFFVX ), 1, V( IOFFVX ), 1 )
+- EST = TEMP
++ ESTWORK( 1 ) = TEMP( 1 )
+ END IF
+ *
+ 150 CONTINUE
+ KASE = 0
+ *
++ EST = ESTWORK( 1 )
+ RETURN
+ *
+ * End of PDLACON
+diff --git a/SRC/pdlarf.f b/SRC/pdlarf.f
+index 29da1ac..41368d6 100644
+--- a/SRC/pdlarf.f
++++ b/SRC/pdlarf.f
+@@ -241,7 +241,7 @@ SUBROUTINE PDLARF( SIDE, M, N, V, IV, JV, DESCV, INCV, TAU,
+ $ IOFFV, IPW, IROFF, IVCOL, IVROW, JJC, JJV, LDC,
+ $ LDV, MYCOL, MYROW, MP, NCC, NCV, NPCOL, NPROW,
+ $ NQ, RDEST
+- DOUBLE PRECISION TAULOC
++ DOUBLE PRECISION TAULOC( 1 )
+ * ..
+ * .. External Subroutines ..
+ EXTERNAL BLACS_GRIDINFO, DCOPY, DGEBR2D, DGEBS2D,
+@@ -335,7 +335,7 @@ SUBROUTINE PDLARF( SIDE, M, N, V, IV, JV, DESCV, INCV, TAU,
+ *
+ CALL DGEBS2D( ICTXT, 'Columnwise', ' ', 1, 1,
+ $ TAU( IIV ), 1 )
+- TAULOC = TAU( IIV )
++ TAULOC( 1 ) = TAU( IIV )
+ *
+ ELSE
+ *
+@@ -344,7 +344,7 @@ SUBROUTINE PDLARF( SIDE, M, N, V, IV, JV, DESCV, INCV, TAU,
+ *
+ END IF
+ *
+- IF( TAULOC.NE.ZERO ) THEN
++ IF( TAULOC( 1 ).NE.ZERO ) THEN
+ *
+ * w := sub( C )' * v
+ *
+@@ -362,8 +362,8 @@ SUBROUTINE PDLARF( SIDE, M, N, V, IV, JV, DESCV, INCV, TAU,
+ *
+ * sub( C ) := sub( C ) - v * w'
+ *
+- CALL DGER( MP, NQ, -TAULOC, WORK, 1, WORK( IPW ),
+- $ 1, C( IOFFC ), LDC )
++ CALL DGER( MP, NQ, -TAULOC( 1 ), WORK, 1,
++ $ WORK( IPW ), 1, C( IOFFC ), LDC )
+ END IF
+ *
+ END IF
+@@ -378,9 +378,9 @@ SUBROUTINE PDLARF( SIDE, M, N, V, IV, JV, DESCV, INCV, TAU,
+ *
+ IF( MYCOL.EQ.ICCOL ) THEN
+ *
+- TAULOC = TAU( JJV )
++ TAULOC( 1 ) = TAU( JJV )
+ *
+- IF( TAULOC.NE.ZERO ) THEN
++ IF( TAULOC( 1 ).NE.ZERO ) THEN
+ *
+ * w := sub( C )' * v
+ *
+@@ -397,8 +397,8 @@ SUBROUTINE PDLARF( SIDE, M, N, V, IV, JV, DESCV, INCV, TAU,
+ *
+ * sub( C ) := sub( C ) - v * w'
+ *
+- CALL DGER( MP, NQ, -TAULOC, V( IOFFV ), 1, WORK,
+- $ 1, C( IOFFC ), LDC )
++ CALL DGER( MP, NQ, -TAULOC( 1 ), V( IOFFV ), 1,
++ $ WORK, 1, C( IOFFC ), LDC )
+ END IF
+ *
+ END IF
+@@ -420,9 +420,9 @@ SUBROUTINE PDLARF( SIDE, M, N, V, IV, JV, DESCV, INCV, TAU,
+ IPW = MP+1
+ CALL DGERV2D( ICTXT, IPW, 1, WORK, IPW, MYROW,
+ $ IVCOL )
+- TAULOC = WORK( IPW )
++ TAULOC( 1 ) = WORK( IPW )
+ *
+- IF( TAULOC.NE.ZERO ) THEN
++ IF( TAULOC( 1 ).NE.ZERO ) THEN
+ *
+ * w := sub( C )' * v
+ *
+@@ -440,7 +440,7 @@ SUBROUTINE PDLARF( SIDE, M, N, V, IV, JV, DESCV, INCV, TAU,
+ *
+ * sub( C ) := sub( C ) - v * w'
+ *
+- CALL DGER( MP, NQ, -TAULOC, WORK, 1,
++ CALL DGER( MP, NQ, -TAULOC( 1 ), WORK, 1,
+ $ WORK( IPW ), 1, C( IOFFC ), LDC )
+ END IF
+ *
+@@ -470,7 +470,7 @@ SUBROUTINE PDLARF( SIDE, M, N, V, IV, JV, DESCV, INCV, TAU,
+ *
+ CALL DGEBS2D( ICTXT, 'Columnwise', ' ', 1, 1,
+ $ TAU( IIV ), 1 )
+- TAULOC = TAU( IIV )
++ TAULOC( 1 ) = TAU( IIV )
+ *
+ ELSE
+ *
+@@ -479,7 +479,7 @@ SUBROUTINE PDLARF( SIDE, M, N, V, IV, JV, DESCV, INCV, TAU,
+ *
+ END IF
+ *
+- IF( TAULOC.NE.ZERO ) THEN
++ IF( TAULOC( 1 ).NE.ZERO ) THEN
+ *
+ * w := sub( C )' * v
+ *
+@@ -499,8 +499,8 @@ SUBROUTINE PDLARF( SIDE, M, N, V, IV, JV, DESCV, INCV, TAU,
+ * sub( C ) := sub( C ) - v * w'
+ *
+ IF( IOFFC.GT.0 )
+- $ CALL DGER( MP, NQ, -TAULOC, WORK, 1, WORK( IPW ),
+- $ 1, C( IOFFC ), LDC )
++ $ CALL DGER( MP, NQ, -TAULOC( 1 ), WORK, 1,
++ $ WORK( IPW ), 1, C( IOFFC ), LDC )
+ END IF
+ *
+ ELSE
+@@ -515,18 +515,18 @@ SUBROUTINE PDLARF( SIDE, M, N, V, IV, JV, DESCV, INCV, TAU,
+ WORK(IPW) = TAU( JJV )
+ CALL DGEBS2D( ICTXT, 'Rowwise', ROWBTOP, IPW, 1,
+ $ WORK, IPW )
+- TAULOC = TAU( JJV )
++ TAULOC( 1 ) = TAU( JJV )
+ *
+ ELSE
+ *
+ IPW = MP+1
+ CALL DGEBR2D( ICTXT, 'Rowwise', ROWBTOP, IPW, 1, WORK,
+ $ IPW, MYROW, IVCOL )
+- TAULOC = WORK( IPW )
++ TAULOC( 1 ) = WORK( IPW )
+ *
+ END IF
+ *
+- IF( TAULOC.NE.ZERO ) THEN
++ IF( TAULOC( 1 ).NE.ZERO ) THEN
+ *
+ * w := sub( C )' * v
+ *
+@@ -546,8 +546,8 @@ SUBROUTINE PDLARF( SIDE, M, N, V, IV, JV, DESCV, INCV, TAU,
+ * sub( C ) := sub( C ) - v * w'
+ *
+ IF( IOFFC.GT.0 )
+- $ CALL DGER( MP, NQ, -TAULOC, WORK, 1, WORK( IPW ),
+- $ 1, C( IOFFC ), LDC )
++ $ CALL DGER( MP, NQ, -TAULOC( 1 ), WORK, 1,
++ $ WORK( IPW ), 1, C( IOFFC ), LDC )
+ END IF
+ *
+ END IF
+@@ -576,9 +576,9 @@ SUBROUTINE PDLARF( SIDE, M, N, V, IV, JV, DESCV, INCV, TAU,
+ *
+ IF( MYROW.EQ.ICROW ) THEN
+ *
+- TAULOC = TAU( IIV )
++ TAULOC( 1 ) = TAU( IIV )
+ *
+- IF( TAULOC.NE.ZERO ) THEN
++ IF( TAULOC( 1 ).NE.ZERO ) THEN
+ *
+ * w := sub( C ) * v
+ *
+@@ -596,7 +596,7 @@ SUBROUTINE PDLARF( SIDE, M, N, V, IV, JV, DESCV, INCV, TAU,
+ * sub( C ) := sub( C ) - w * v'
+ *
+ IF( IOFFV.GT.0 .AND. IOFFC.GT.0 )
+- $ CALL DGER( MP, NQ, -TAULOC, WORK, 1,
++ $ CALL DGER( MP, NQ, -TAULOC( 1 ), WORK, 1,
+ $ V( IOFFV ), LDV, C( IOFFC ), LDC )
+ END IF
+ *
+@@ -619,9 +619,9 @@ SUBROUTINE PDLARF( SIDE, M, N, V, IV, JV, DESCV, INCV, TAU,
+ IPW = NQ+1
+ CALL DGERV2D( ICTXT, IPW, 1, WORK, IPW, IVROW,
+ $ MYCOL )
+- TAULOC = WORK( IPW )
++ TAULOC( 1 ) = WORK( IPW )
+ *
+- IF( TAULOC.NE.ZERO ) THEN
++ IF( TAULOC( 1 ).NE.ZERO ) THEN
+ *
+ * w := sub( C ) * v
+ *
+@@ -639,7 +639,7 @@ SUBROUTINE PDLARF( SIDE, M, N, V, IV, JV, DESCV, INCV, TAU,
+ *
+ * sub( C ) := sub( C ) - w * v'
+ *
+- CALL DGER( MP, NQ, -TAULOC, WORK( IPW ), 1,
++ CALL DGER( MP, NQ, -TAULOC( 1 ), WORK( IPW ), 1,
+ $ WORK, 1, C( IOFFC ), LDC )
+ END IF
+ *
+@@ -665,7 +665,7 @@ SUBROUTINE PDLARF( SIDE, M, N, V, IV, JV, DESCV, INCV, TAU,
+ *
+ CALL DGEBS2D( ICTXT, 'Rowwise', ' ', 1, 1,
+ $ TAU( JJV ), 1 )
+- TAULOC = TAU( JJV )
++ TAULOC( 1 ) = TAU( JJV )
+ *
+ ELSE
+ *
+@@ -674,7 +674,7 @@ SUBROUTINE PDLARF( SIDE, M, N, V, IV, JV, DESCV, INCV, TAU,
+ *
+ END IF
+ *
+- IF( TAULOC.NE.ZERO ) THEN
++ IF( TAULOC( 1 ).NE.ZERO ) THEN
+ *
+ * w := sub( C ) * v
+ *
+@@ -692,8 +692,8 @@ SUBROUTINE PDLARF( SIDE, M, N, V, IV, JV, DESCV, INCV, TAU,
+ *
+ * sub( C ) := sub( C ) - w * v'
+ *
+- CALL DGER( MP, NQ, -TAULOC, WORK( IPW ), 1, WORK,
+- $ 1, C( IOFFC ), LDC )
++ CALL DGER( MP, NQ, -TAULOC( 1 ), WORK( IPW ), 1,
++ $ WORK, 1, C( IOFFC ), LDC )
+ END IF
+ *
+ END IF
+@@ -718,18 +718,18 @@ SUBROUTINE PDLARF( SIDE, M, N, V, IV, JV, DESCV, INCV, TAU,
+ WORK(IPW) = TAU( IIV )
+ CALL DGEBS2D( ICTXT, 'Columnwise', COLBTOP, IPW, 1,
+ $ WORK, IPW )
+- TAULOC = TAU( IIV )
++ TAULOC( 1 ) = TAU( IIV )
+ *
+ ELSE
+ *
+ IPW = NQ+1
+ CALL DGEBR2D( ICTXT, 'Columnwise', COLBTOP, IPW, 1,
+ $ WORK, IPW, IVROW, MYCOL )
+- TAULOC = WORK( IPW )
++ TAULOC( 1 ) = WORK( IPW )
+ *
+ END IF
+ *
+- IF( TAULOC.NE.ZERO ) THEN
++ IF( TAULOC( 1 ).NE.ZERO ) THEN
+ *
+ * w := sub( C ) * v
+ *
+@@ -748,8 +748,8 @@ SUBROUTINE PDLARF( SIDE, M, N, V, IV, JV, DESCV, INCV, TAU,
+ * sub( C ) := sub( C ) - w * v'
+ *
+ IF( IOFFC.GT.0 )
+- $ CALL DGER( MP, NQ, -TAULOC, WORK( IPW ), 1, WORK,
+- $ 1, C( IOFFC ), LDC )
++ $ CALL DGER( MP, NQ, -TAULOC( 1 ), WORK( IPW ), 1,
++ $ WORK, 1, C( IOFFC ), LDC )
+ END IF
+ *
+ ELSE
+@@ -768,7 +768,7 @@ SUBROUTINE PDLARF( SIDE, M, N, V, IV, JV, DESCV, INCV, TAU,
+ *
+ CALL DGEBS2D( ICTXT, 'Rowwise', ' ', 1, 1, TAU( JJV ),
+ $ 1 )
+- TAULOC = TAU( JJV )
++ TAULOC( 1 ) = TAU( JJV )
+ *
+ ELSE
+ *
+@@ -777,7 +777,7 @@ SUBROUTINE PDLARF( SIDE, M, N, V, IV, JV, DESCV, INCV, TAU,
+ *
+ END IF
+ *
+- IF( TAULOC.NE.ZERO ) THEN
++ IF( TAULOC( 1 ).NE.ZERO ) THEN
+ *
+ * w := sub( C ) * v
+ *
+@@ -795,8 +795,8 @@ SUBROUTINE PDLARF( SIDE, M, N, V, IV, JV, DESCV, INCV, TAU,
+ *
+ * sub( C ) := sub( C ) - w * v'
+ *
+- CALL DGER( MP, NQ, -TAULOC, WORK( IPW ), 1, WORK, 1,
+- $ C( IOFFC ), LDC )
++ CALL DGER( MP, NQ, -TAULOC( 1 ), WORK( IPW ), 1, WORK,
++ $ 1, C( IOFFC ), LDC )
+ END IF
+ *
+ END IF
+diff --git a/SRC/pdlarz.f b/SRC/pdlarz.f
+index b91282c..f45c137 100644
+--- a/SRC/pdlarz.f
++++ b/SRC/pdlarz.f
+@@ -250,7 +250,7 @@ SUBROUTINE PDLARZ( SIDE, M, N, L, V, IV, JV, DESCV, INCV, TAU, C,
+ $ IVCOL, IVROW, JJC1, JJC2, JJV, LDC, LDV, MPC2,
+ $ MPV, MYCOL, MYROW, NCC, NCV, NPCOL, NPROW,
+ $ NQC2, NQV, RDEST
+- DOUBLE PRECISION TAULOC
++ DOUBLE PRECISION TAULOC( 1 )
+ * ..
+ * .. External Subroutines ..
+ EXTERNAL BLACS_GRIDINFO, DAXPY, DCOPY, DGEBR2D,
+@@ -369,7 +369,7 @@ SUBROUTINE PDLARZ( SIDE, M, N, L, V, IV, JV, DESCV, INCV, TAU, C,
+ *
+ CALL DGEBS2D( ICTXT, 'Columnwise', ' ', 1, 1,
+ $ TAU( IIV ), 1 )
+- TAULOC = TAU( IIV )
++ TAULOC( 1 ) = TAU( IIV )
+ *
+ ELSE
+ *
+@@ -378,7 +378,7 @@ SUBROUTINE PDLARZ( SIDE, M, N, L, V, IV, JV, DESCV, INCV, TAU, C,
+ *
+ END IF
+ *
+- IF( TAULOC.NE.ZERO ) THEN
++ IF( TAULOC( 1 ).NE.ZERO ) THEN
+ *
+ * w := sub( C )' * v
+ *
+@@ -401,9 +401,9 @@ SUBROUTINE PDLARZ( SIDE, M, N, L, V, IV, JV, DESCV, INCV, TAU, C,
+ * sub( C ) := sub( C ) - v * w'
+ *
+ IF( MYROW.EQ.ICROW1 )
+- $ CALL DAXPY( NQC2, -TAULOC, WORK( IPW ),
++ $ CALL DAXPY( NQC2, -TAULOC( 1 ), WORK( IPW ),
+ $ MAX( 1, NQC2 ), C( IOFFC1 ), LDC )
+- CALL DGER( MPV, NQC2, -TAULOC, WORK, 1,
++ CALL DGER( MPV, NQC2, -TAULOC( 1 ), WORK, 1,
+ $ WORK( IPW ), 1, C( IOFFC2 ), LDC )
+ END IF
+ *
+@@ -419,9 +419,9 @@ SUBROUTINE PDLARZ( SIDE, M, N, L, V, IV, JV, DESCV, INCV, TAU, C,
+ *
+ IF( MYCOL.EQ.ICCOL2 ) THEN
+ *
+- TAULOC = TAU( JJV )
++ TAULOC( 1 ) = TAU( JJV )
+ *
+- IF( TAULOC.NE.ZERO ) THEN
++ IF( TAULOC( 1 ).NE.ZERO ) THEN
+ *
+ * w := sub( C )' * v
+ *
+@@ -444,11 +444,11 @@ SUBROUTINE PDLARZ( SIDE, M, N, L, V, IV, JV, DESCV, INCV, TAU, C,
+ * sub( C ) := sub( C ) - v * w'
+ *
+ IF( MYROW.EQ.ICROW1 )
+- $ CALL DAXPY( NQC2, -TAULOC, WORK,
++ $ CALL DAXPY( NQC2, -TAULOC( 1 ), WORK,
+ $ MAX( 1, NQC2 ), C( IOFFC1 ),
+ $ LDC )
+- CALL DGER( MPV, NQC2, -TAULOC, V( IOFFV ), 1,
+- $ WORK, 1, C( IOFFC2 ), LDC )
++ CALL DGER( MPV, NQC2, -TAULOC( 1 ), V( IOFFV ),
++ $ 1, WORK, 1, C( IOFFC2 ), LDC )
+ END IF
+ *
+ END IF
+@@ -470,9 +470,9 @@ SUBROUTINE PDLARZ( SIDE, M, N, L, V, IV, JV, DESCV, INCV, TAU, C,
+ IPW = MPV+1
+ CALL DGERV2D( ICTXT, IPW, 1, WORK, IPW, MYROW,
+ $ IVCOL )
+- TAULOC = WORK( IPW )
++ TAULOC( 1 ) = WORK( IPW )
+ *
+- IF( TAULOC.NE.ZERO ) THEN
++ IF( TAULOC( 1 ).NE.ZERO ) THEN
+ *
+ * w := sub( C )' * v
+ *
+@@ -495,10 +495,10 @@ SUBROUTINE PDLARZ( SIDE, M, N, L, V, IV, JV, DESCV, INCV, TAU, C,
+ * sub( C ) := sub( C ) - v * w'
+ *
+ IF( MYROW.EQ.ICROW1 )
+- $ CALL DAXPY( NQC2, -TAULOC, WORK( IPW ),
++ $ CALL DAXPY( NQC2, -TAULOC( 1 ), WORK( IPW ),
+ $ MAX( 1, NQC2 ), C( IOFFC1 ),
+ $ LDC )
+- CALL DGER( MPV, NQC2, -TAULOC, WORK, 1,
++ CALL DGER( MPV, NQC2, -TAULOC( 1 ), WORK, 1,
+ $ WORK( IPW ), 1, C( IOFFC2 ), LDC )
+ END IF
+ *
+@@ -529,7 +529,7 @@ SUBROUTINE PDLARZ( SIDE, M, N, L, V, IV, JV, DESCV, INCV, TAU, C,
+ *
+ CALL DGEBS2D( ICTXT, 'Columnwise', ' ', 1, 1,
+ $ TAU( IIV ), 1 )
+- TAULOC = TAU( IIV )
++ TAULOC( 1 ) = TAU( IIV )
+ *
+ ELSE
+ *
+@@ -538,7 +538,7 @@ SUBROUTINE PDLARZ( SIDE, M, N, L, V, IV, JV, DESCV, INCV, TAU, C,
+ *
+ END IF
+ *
+- IF( TAULOC.NE.ZERO ) THEN
++ IF( TAULOC( 1 ).NE.ZERO ) THEN
+ *
+ * w := sub( C )' * v
+ *
+@@ -561,10 +561,10 @@ SUBROUTINE PDLARZ( SIDE, M, N, L, V, IV, JV, DESCV, INCV, TAU, C,
+ * sub( C ) := sub( C ) - v * w'
+ *
+ IF( MYROW.EQ.ICROW1 )
+- $ CALL DAXPY( NQC2, -TAULOC, WORK( IPW ),
++ $ CALL DAXPY( NQC2, -TAULOC( 1 ), WORK( IPW ),
+ $ MAX( 1, NQC2 ), C( IOFFC1 ), LDC )
+- CALL DGER( MPV, NQC2, -TAULOC, WORK, 1, WORK( IPW ),
+- $ 1, C( IOFFC2 ), LDC )
++ CALL DGER( MPV, NQC2, -TAULOC( 1 ), WORK, 1,
++ $ WORK( IPW ), 1, C( IOFFC2 ), LDC )
+ END IF
+ *
+ ELSE
+@@ -579,18 +579,18 @@ SUBROUTINE PDLARZ( SIDE, M, N, L, V, IV, JV, DESCV, INCV, TAU, C,
+ WORK( IPW ) = TAU( JJV )
+ CALL DGEBS2D( ICTXT, 'Rowwise', ROWBTOP, IPW, 1,
+ $ WORK, IPW )
+- TAULOC = TAU( JJV )
++ TAULOC( 1 ) = TAU( JJV )
+ *
+ ELSE
+ *
+ IPW = MPV+1
+ CALL DGEBR2D( ICTXT, 'Rowwise', ROWBTOP, IPW, 1, WORK,
+ $ IPW, MYROW, IVCOL )
+- TAULOC = WORK( IPW )
++ TAULOC( 1 ) = WORK( IPW )
+ *
+ END IF
+ *
+- IF( TAULOC.NE.ZERO ) THEN
++ IF( TAULOC( 1 ).NE.ZERO ) THEN
+ *
+ * w := sub( C )' * v
+ *
+@@ -613,10 +613,10 @@ SUBROUTINE PDLARZ( SIDE, M, N, L, V, IV, JV, DESCV, INCV, TAU, C,
+ * sub( C ) := sub( C ) - v * w'
+ *
+ IF( MYROW.EQ.ICROW1 )
+- $ CALL DAXPY( NQC2, -TAULOC, WORK( IPW ),
++ $ CALL DAXPY( NQC2, -TAULOC( 1 ), WORK( IPW ),
+ $ MAX( 1, NQC2 ), C( IOFFC1 ), LDC )
+- CALL DGER( MPV, NQC2, -TAULOC, WORK, 1, WORK( IPW ),
+- $ 1, C( IOFFC2 ), LDC )
++ CALL DGER( MPV, NQC2, -TAULOC( 1 ), WORK, 1,
++ $ WORK( IPW ), 1, C( IOFFC2 ), LDC )
+ END IF
+ *
+ END IF
+@@ -645,9 +645,9 @@ SUBROUTINE PDLARZ( SIDE, M, N, L, V, IV, JV, DESCV, INCV, TAU, C,
+ *
+ IF( MYROW.EQ.ICROW2 ) THEN
+ *
+- TAULOC = TAU( IIV )
++ TAULOC( 1 ) = TAU( IIV )
+ *
+- IF( TAULOC.NE.ZERO ) THEN
++ IF( TAULOC( 1 ).NE.ZERO ) THEN
+ *
+ * w := sub( C ) * v
+ *
+@@ -668,13 +668,13 @@ SUBROUTINE PDLARZ( SIDE, M, N, L, V, IV, JV, DESCV, INCV, TAU, C,
+ $ ICCOL2 )
+ *
+ IF( MYCOL.EQ.ICCOL1 )
+- $ CALL DAXPY( MPC2, -TAULOC, WORK, 1,
++ $ CALL DAXPY( MPC2, -TAULOC( 1 ), WORK, 1,
+ $ C( IOFFC1 ), 1 )
+ *
+ * sub( C ) := sub( C ) - w * v'
+ *
+ IF( MPC2.GT.0 .AND. NQV.GT.0 )
+- $ CALL DGER( MPC2, NQV, -TAULOC, WORK, 1,
++ $ CALL DGER( MPC2, NQV, -TAULOC( 1 ), WORK, 1,
+ $ V( IOFFV ), LDV, C( IOFFC2 ),
+ $ LDC )
+ END IF
+@@ -698,9 +698,9 @@ SUBROUTINE PDLARZ( SIDE, M, N, L, V, IV, JV, DESCV, INCV, TAU, C,
+ IPW = NQV+1
+ CALL DGERV2D( ICTXT, IPW, 1, WORK, IPW, IVROW,
+ $ MYCOL )
+- TAULOC = WORK( IPW )
++ TAULOC( 1 ) = WORK( IPW )
+ *
+- IF( TAULOC.NE.ZERO ) THEN
++ IF( TAULOC( 1 ).NE.ZERO ) THEN
+ *
+ * w := sub( C ) * v
+ *
+@@ -719,13 +719,13 @@ SUBROUTINE PDLARZ( SIDE, M, N, L, V, IV, JV, DESCV, INCV, TAU, C,
+ $ WORK( IPW ), MAX( 1, MPC2 ),
+ $ RDEST, ICCOL2 )
+ IF( MYCOL.EQ.ICCOL1 )
+- $ CALL DAXPY( MPC2, -TAULOC, WORK( IPW ), 1,
+- $ C( IOFFC1 ), 1 )
++ $ CALL DAXPY( MPC2, -TAULOC( 1 ), WORK( IPW ),
++ $ 1, C( IOFFC1 ), 1 )
+ *
+ * sub( C ) := sub( C ) - w * v'
+ *
+- CALL DGER( MPC2, NQV, -TAULOC, WORK( IPW ), 1,
+- $ WORK, 1, C( IOFFC2 ), LDC )
++ CALL DGER( MPC2, NQV, -TAULOC( 1 ), WORK( IPW ),
++ $ 1, WORK, 1, C( IOFFC2 ), LDC )
+ END IF
+ *
+ END IF
+@@ -750,7 +750,7 @@ SUBROUTINE PDLARZ( SIDE, M, N, L, V, IV, JV, DESCV, INCV, TAU, C,
+ *
+ CALL DGEBS2D( ICTXT, 'Rowwise', ' ', 1, 1,
+ $ TAU( JJV ), 1 )
+- TAULOC = TAU( JJV )
++ TAULOC( 1 ) = TAU( JJV )
+ *
+ ELSE
+ *
+@@ -759,7 +759,7 @@ SUBROUTINE PDLARZ( SIDE, M, N, L, V, IV, JV, DESCV, INCV, TAU, C,
+ *
+ END IF
+ *
+- IF( TAULOC.NE.ZERO ) THEN
++ IF( TAULOC( 1 ).NE.ZERO ) THEN
+ *
+ * w := sub( C ) * v
+ *
+@@ -778,12 +778,12 @@ SUBROUTINE PDLARZ( SIDE, M, N, L, V, IV, JV, DESCV, INCV, TAU, C,
+ $ WORK( IPW ), MAX( 1, MPC2 ), RDEST,
+ $ ICCOL2 )
+ IF( MYCOL.EQ.ICCOL1 )
+- $ CALL DAXPY( MPC2, -TAULOC, WORK( IPW ), 1,
++ $ CALL DAXPY( MPC2, -TAULOC( 1 ), WORK( IPW ), 1,
+ $ C( IOFFC1 ), 1 )
+ *
+ * sub( C ) := sub( C ) - w * v'
+ *
+- CALL DGER( MPC2, NQV, -TAULOC, WORK( IPW ), 1,
++ CALL DGER( MPC2, NQV, -TAULOC( 1 ), WORK( IPW ), 1,
+ $ WORK, 1, C( IOFFC2 ), LDC )
+ END IF
+ *
+@@ -808,18 +808,18 @@ SUBROUTINE PDLARZ( SIDE, M, N, L, V, IV, JV, DESCV, INCV, TAU, C,
+ WORK( IPW ) = TAU( IIV )
+ CALL DGEBS2D( ICTXT, 'Columnwise', COLBTOP, IPW, 1,
+ $ WORK, IPW )
+- TAULOC = TAU( IIV )
++ TAULOC( 1 ) = TAU( IIV )
+ *
+ ELSE
+ *
+ IPW = NQV+1
+ CALL DGEBR2D( ICTXT, 'Columnwise', COLBTOP, IPW, 1,
+ $ WORK, IPW, IVROW, MYCOL )
+- TAULOC = WORK( IPW )
++ TAULOC( 1 ) = WORK( IPW )
+ *
+ END IF
+ *
+- IF( TAULOC.NE.ZERO ) THEN
++ IF( TAULOC( 1 ).NE.ZERO ) THEN
+ *
+ * w := sub( C ) * v
+ *
+@@ -839,13 +839,13 @@ SUBROUTINE PDLARZ( SIDE, M, N, L, V, IV, JV, DESCV, INCV, TAU, C,
+ $ WORK( IPW ), MAX( 1, MPC2 ), RDEST,
+ $ ICCOL2 )
+ IF( MYCOL.EQ.ICCOL1 )
+- $ CALL DAXPY( MPC2, -TAULOC, WORK( IPW ), 1,
++ $ CALL DAXPY( MPC2, -TAULOC( 1 ), WORK( IPW ), 1,
+ $ C( IOFFC1 ), 1 )
+ *
+ * sub( C ) := sub( C ) - w * v'
+ *
+- CALL DGER( MPC2, NQV, -TAULOC, WORK( IPW ), 1, WORK,
+- $ 1, C( IOFFC2 ), LDC )
++ CALL DGER( MPC2, NQV, -TAULOC( 1 ), WORK( IPW ), 1,
++ $ WORK, 1, C( IOFFC2 ), LDC )
+ END IF
+ *
+ ELSE
+@@ -864,7 +864,7 @@ SUBROUTINE PDLARZ( SIDE, M, N, L, V, IV, JV, DESCV, INCV, TAU, C,
+ *
+ CALL DGEBS2D( ICTXT, 'Rowwise', ' ', 1, 1, TAU( JJV ),
+ $ 1 )
+- TAULOC = TAU( JJV )
++ TAULOC( 1 ) = TAU( JJV )
+ *
+ ELSE
+ *
+@@ -873,7 +873,7 @@ SUBROUTINE PDLARZ( SIDE, M, N, L, V, IV, JV, DESCV, INCV, TAU, C,
+ *
+ END IF
+ *
+- IF( TAULOC.NE.ZERO ) THEN
++ IF( TAULOC( 1 ).NE.ZERO ) THEN
+ *
+ * w := sub( C ) * v
+ *
+@@ -892,13 +892,13 @@ SUBROUTINE PDLARZ( SIDE, M, N, L, V, IV, JV, DESCV, INCV, TAU, C,
+ $ WORK( IPW ), MAX( 1, MPC2 ), RDEST,
+ $ ICCOL2 )
+ IF( MYCOL.EQ.ICCOL1 )
+- $ CALL DAXPY( MPC2, -TAULOC, WORK( IPW ), 1,
++ $ CALL DAXPY( MPC2, -TAULOC( 1 ), WORK( IPW ), 1,
+ $ C( IOFFC1 ), 1 )
+ *
+ * sub( C ) := sub( C ) - w * v'
+ *
+- CALL DGER( MPC2, NQV, -TAULOC, WORK( IPW ), 1, WORK,
+- $ 1, C( IOFFC2 ), LDC )
++ CALL DGER( MPC2, NQV, -TAULOC( 1 ), WORK( IPW ), 1,
++ $ WORK, 1, C( IOFFC2 ), LDC )
+ END IF
+ *
+ END IF
+diff --git a/SRC/pdlawil.f b/SRC/pdlawil.f
+index 90a4d74..e8bc3a0 100644
+--- a/SRC/pdlawil.f
++++ b/SRC/pdlawil.f
+@@ -120,10 +120,10 @@ SUBROUTINE PDLAWIL( II, JJ, M, A, DESCA, H44, H33, H43H34, V )
+ INTEGER CONTXT, DOWN, HBL, ICOL, IROW, JSRC, LDA, LEFT,
+ $ MODKM1, MYCOL, MYROW, NPCOL, NPROW, NUM, RIGHT,
+ $ RSRC, UP
+- DOUBLE PRECISION H11, H12, H21, H22, H33S, H44S, S, V1, V2, V3
++ DOUBLE PRECISION H22, H33S, H44S, S, V1, V2
+ * ..
+ * .. Local Arrays ..
+- DOUBLE PRECISION BUF( 4 )
++ DOUBLE PRECISION BUF( 4 ), H11( 1 ), H12( 1 ), H21( 1 ), V3( 1 )
+ * ..
+ * .. External Subroutines ..
+ EXTERNAL BLACS_GRIDINFO, DGERV2D, DGESD2D, INFOG2L
+@@ -170,18 +170,18 @@ SUBROUTINE PDLAWIL( II, JJ, M, A, DESCA, H44, H33, H43H34, V )
+ IF( NPCOL.GT.1 ) THEN
+ CALL DGERV2D( CONTXT, 1, 1, V3, 1, MYROW, LEFT )
+ ELSE
+- V3 = A( ( ICOL-2 )*LDA+IROW )
++ V3( 1 ) = A( ( ICOL-2 )*LDA+IROW )
+ END IF
+ IF( NUM.GT.1 ) THEN
+ CALL DGERV2D( CONTXT, 4, 1, BUF, 4, UP, LEFT )
+- H11 = BUF( 1 )
+- H21 = BUF( 2 )
+- H12 = BUF( 3 )
++ H11( 1 ) = BUF( 1 )
++ H21( 1 ) = BUF( 2 )
++ H12( 1 ) = BUF( 3 )
+ H22 = BUF( 4 )
+ ELSE
+- H11 = A( ( ICOL-3 )*LDA+IROW-2 )
+- H21 = A( ( ICOL-3 )*LDA+IROW-1 )
+- H12 = A( ( ICOL-2 )*LDA+IROW-2 )
++ H11( 1 ) = A( ( ICOL-3 )*LDA+IROW-2 )
++ H21( 1 ) = A( ( ICOL-3 )*LDA+IROW-1 )
++ H12( 1 ) = A( ( ICOL-2 )*LDA+IROW-2 )
+ H22 = A( ( ICOL-2 )*LDA+IROW-1 )
+ END IF
+ END IF
+@@ -214,20 +214,20 @@ SUBROUTINE PDLAWIL( II, JJ, M, A, DESCA, H44, H33, H43H34, V )
+ IF( NUM.GT.1 ) THEN
+ CALL DGERV2D( CONTXT, 1, 1, H11, 1, UP, LEFT )
+ ELSE
+- H11 = A( ( ICOL-3 )*LDA+IROW-2 )
++ H11( 1 ) = A( ( ICOL-3 )*LDA+IROW-2 )
+ END IF
+ IF( NPROW.GT.1 ) THEN
+ CALL DGERV2D( CONTXT, 1, 1, H12, 1, UP, MYCOL )
+ ELSE
+- H12 = A( ( ICOL-2 )*LDA+IROW-2 )
++ H12( 1 ) = A( ( ICOL-2 )*LDA+IROW-2 )
+ END IF
+ IF( NPCOL.GT.1 ) THEN
+ CALL DGERV2D( CONTXT, 1, 1, H21, 1, MYROW, LEFT )
+ ELSE
+- H21 = A( ( ICOL-3 )*LDA+IROW-1 )
++ H21( 1 ) = A( ( ICOL-3 )*LDA+IROW-1 )
+ END IF
+ H22 = A( ( ICOL-2 )*LDA+IROW-1 )
+- V3 = A( ( ICOL-2 )*LDA+IROW )
++ V3( 1 ) = A( ( ICOL-2 )*LDA+IROW )
+ END IF
+ END IF
+ IF( ( MYROW.NE.II ) .OR. ( MYCOL.NE.JJ ) )
+@@ -236,24 +236,24 @@ SUBROUTINE PDLAWIL( II, JJ, M, A, DESCA, H44, H33, H43H34, V )
+ IF( MODKM1.GT.1 ) THEN
+ CALL INFOG2L( M+2, M+2, DESCA, NPROW, NPCOL, MYROW, MYCOL,
+ $ IROW, ICOL, RSRC, JSRC )
+- H11 = A( ( ICOL-3 )*LDA+IROW-2 )
+- H21 = A( ( ICOL-3 )*LDA+IROW-1 )
+- H12 = A( ( ICOL-2 )*LDA+IROW-2 )
++ H11( 1 ) = A( ( ICOL-3 )*LDA+IROW-2 )
++ H21( 1 ) = A( ( ICOL-3 )*LDA+IROW-1 )
++ H12( 1 ) = A( ( ICOL-2 )*LDA+IROW-2 )
+ H22 = A( ( ICOL-2 )*LDA+IROW-1 )
+- V3 = A( ( ICOL-2 )*LDA+IROW )
++ V3( 1 ) = A( ( ICOL-2 )*LDA+IROW )
+ END IF
+ *
+- H44S = H44 - H11
+- H33S = H33 - H11
+- V1 = ( H33S*H44S-H43H34 ) / H21 + H12
+- V2 = H22 - H11 - H33S - H44S
+- S = ABS( V1 ) + ABS( V2 ) + ABS( V3 )
++ H44S = H44 - H11( 1 )
++ H33S = H33 - H11( 1 )
++ V1 = ( H33S*H44S-H43H34 ) / H21( 1 ) + H12( 1 )
++ V2 = H22 - H11( 1 ) - H33S - H44S
++ S = ABS( V1 ) + ABS( V2 ) + ABS( V3( 1 ) )
+ V1 = V1 / S
+ V2 = V2 / S
+- V3 = V3 / S
++ V3( 1 ) = V3( 1 ) / S
+ V( 1 ) = V1
+ V( 2 ) = V2
+- V( 3 ) = V3
++ V( 3 ) = V3( 1 )
+ *
+ RETURN
+ *
+diff --git a/SRC/pdstebz.f b/SRC/pdstebz.f
+index e7006f9..bf4dacc 100644
+--- a/SRC/pdstebz.f
++++ b/SRC/pdstebz.f
+@@ -246,14 +246,14 @@ SUBROUTINE PDSTEBZ( ICTXT, RANGE, ORDER, N, VL, VU, IL, IU,
+ $ ITMP2, J, JB, K, LAST, LEXTRA, LREQ, MYCOL,
+ $ MYROW, NALPHA, NBETA, NCMP, NEIGINT, NEXT, NGL,
+ $ NGLOB, NGU, NINT, NPCOL, NPROW, OFFSET,
+- $ ONEDCONTEXT, P, PREV, REXTRA, RREQ, SELF,
+- $ TORECV
++ $ ONEDCONTEXT, P, PREV, REXTRA, RREQ, SELF
+ DOUBLE PRECISION ALPHA, ATOLI, BETA, BNORM, DRECV, DSEND, GL,
+ $ GU, INITVL, INITVU, LSAVE, MID, PIVMIN, RELTOL,
+ $ SAFEMN, TMP1, TMP2, TNORM, ULP
+ * ..
+ * .. Local Arrays ..
+ INTEGER IDUM( 5, 2 )
++ INTEGER TORECV( 1, 1 )
+ * ..
+ * .. Executable Statements ..
+ * This is just to keep ftnchek happy
+@@ -784,14 +784,14 @@ SUBROUTINE PDSTEBZ( ICTXT, RANGE, ORDER, N, VL, VU, IL, IU,
+ ELSE
+ CALL IGEBR2D( ONEDCONTEXT, 'ALL', ' ', 1, 1, TORECV, 1, 0,
+ $ I-1 )
+- IF( TORECV.NE.0 ) THEN
+- CALL IGEBR2D( ONEDCONTEXT, 'ALL', ' ', TORECV, 1, IWORK,
+- $ TORECV, 0, I-1 )
+- CALL DGEBR2D( ONEDCONTEXT, 'ALL', ' ', TORECV, 1, WORK,
+- $ TORECV, 0, I-1 )
+- CALL IGEBR2D( ONEDCONTEXT, 'ALL', ' ', TORECV, 1,
+- $ IWORK( N+1 ), TORECV, 0, I-1 )
+- DO 120 J = 1, TORECV
++ IF( TORECV( 1, 1 ).NE.0 ) THEN
++ CALL IGEBR2D( ONEDCONTEXT, 'ALL', ' ', TORECV( 1, 1 ), 1,
++ $ IWORK, TORECV( 1, 1 ), 0, I-1 )
++ CALL DGEBR2D( ONEDCONTEXT, 'ALL', ' ', TORECV( 1, 1 ), 1,
++ $ WORK, TORECV( 1, 1 ), 0, I-1 )
++ CALL IGEBR2D( ONEDCONTEXT, 'ALL', ' ', TORECV( 1, 1 ), 1,
++ $ IWORK( N+1 ), TORECV( 1, 1 ), 0, I-1 )
++ DO 120 J = 1, TORECV( 1, 1 )
+ W( IWORK( J ) ) = WORK( J )
+ IBLOCK( IWORK( J ) ) = IWORK( N+J )
+ 120 CONTINUE
+diff --git a/SRC/pdtrord.f b/SRC/pdtrord.f
+index 1f37d8e..3870574 100644
+--- a/SRC/pdtrord.f
++++ b/SRC/pdtrord.f
+@@ -328,12 +328,13 @@ SUBROUTINE PDTRORD( COMPQ, SELECT, PARA, N, T, IT, JT,
+ $ EAST, WEST, ILOC4, SOUTH, NORTH, INDXS,
+ $ ITT, JTT, ILEN, DLEN, INDXE, TRSRC1, TCSRC1,
+ $ TRSRC2, TCSRC2, ILOS, DIR, TLIHI, TLILO, TLSEL,
+- $ ROUND, LAST, WIN0S, WIN0E, WINE, MMAX, MMIN
++ $ ROUND, LAST, WIN0S, WIN0E, WINE
+ DOUBLE PRECISION ELEM, ELEM1, ELEM2, ELEM3, ELEM4, SN, CS, TMP,
+ $ ELEM5
+ * ..
+ * .. Local Arrays ..
+- INTEGER IBUFF( 8 ), IDUM1( 1 ), IDUM2( 1 )
++ INTEGER IBUFF( 8 ), IDUM1( 1 ), IDUM2( 1 ), MMAX( 1 ),
++ $ MMIN( 1 ), INFODUM( 1 )
+ * ..
+ * .. External Functions ..
+ LOGICAL LSAME
+@@ -483,16 +484,16 @@ SUBROUTINE PDTRORD( COMPQ, SELECT, PARA, N, T, IT, JT,
+ END IF
+ IF( SELECT(K).NE.0 ) M = M + 1
+ 10 CONTINUE
+- MMAX = M
+- MMIN = M
++ MMAX( 1 ) = M
++ MMIN( 1 ) = M
+ IF( NPROCS.GT.1 )
+ $ CALL IGAMX2D( ICTXT, 'All', TOP, 1, 1, MMAX, 1, -1,
+ $ -1, -1, -1, -1 )
+ IF( NPROCS.GT.1 )
+ $ CALL IGAMN2D( ICTXT, 'All', TOP, 1, 1, MMIN, 1, -1,
+ $ -1, -1, -1, -1 )
+- IF( MMAX.GT.MMIN ) THEN
+- M = MMAX
++ IF( MMAX( 1 ).GT.MMIN( 1 ) ) THEN
++ M = MMAX( 1 )
+ IF( NPROCS.GT.1 )
+ $ CALL IGAMX2D( ICTXT, 'All', TOP, N, 1, SELECT, N,
+ $ -1, -1, -1, -1, -1 )
+@@ -520,9 +521,11 @@ SUBROUTINE PDTRORD( COMPQ, SELECT, PARA, N, T, IT, JT,
+ *
+ * Global maximum on info.
+ *
+- IF( NPROCS.GT.1 )
+- $ CALL IGAMX2D( ICTXT, 'All', TOP, 1, 1, INFO, 1, -1, -1, -1,
++ IF( NPROCS.GT.1 ) THEN
++ CALL IGAMX2D( ICTXT, 'All', TOP, 1, 1, INFODUM, 1, -1, -1, -1,
+ $ -1, -1 )
++ INFO = INFODUM( 1 )
++ END IF
+ *
+ * Return if some argument is incorrect.
+ *
+@@ -1576,9 +1579,11 @@ SUBROUTINE PDTRORD( COMPQ, SELECT, PARA, N, T, IT, JT,
+ * experienced a failure in the reordering.
+ *
+ MYIERR = IERR
+- IF( NPROCS.GT.1 )
+- $ CALL IGAMX2D( ICTXT, 'All', TOP, 1, 1, IERR, 1, -1,
++ IF( NPROCS.GT.1 ) THEN
++ CALL IGAMX2D( ICTXT, 'All', TOP, 1, 1, INFODUM, 1, -1,
+ $ -1, -1, -1, -1 )
++ IERR = INFODUM( 1 )
++ END IF
+ *
+ IF( IERR.NE.0 ) THEN
+ *
+@@ -1586,9 +1591,11 @@ SUBROUTINE PDTRORD( COMPQ, SELECT, PARA, N, T, IT, JT,
+ * to swap.
+ *
+ IF( MYIERR.NE.0 ) INFO = MAX(1,I+KKS-1)
+- IF( NPROCS.GT.1 )
+- $ CALL IGAMX2D( ICTXT, 'All', TOP, 1, 1, INFO, 1, -1,
++ IF( NPROCS.GT.1 ) THEN
++ CALL IGAMX2D( ICTXT, 'All', TOP, 1, 1, INFODUM, 1, -1,
+ $ -1, -1, -1, -1 )
++ INFO = INFODUM( 1 )
++ END IF
+ GO TO 300
+ END IF
+ *
+@@ -3245,9 +3252,11 @@ SUBROUTINE PDTRORD( COMPQ, SELECT, PARA, N, T, IT, JT,
+ * experienced a failure in the reordering.
+ *
+ MYIERR = IERR
+- IF( NPROCS.GT.1 )
+- $ CALL IGAMX2D( ICTXT, 'All', TOP, 1, 1, IERR, 1, -1,
++ IF( NPROCS.GT.1 ) THEN
++ CALL IGAMX2D( ICTXT, 'All', TOP, 1, 1, INFODUM, 1, -1,
+ $ -1, -1, -1, -1 )
++ IERR = INFODUM( 1 )
++ END IF
+ *
+ IF( IERR.NE.0 ) THEN
+ *
+@@ -3255,9 +3264,11 @@ SUBROUTINE PDTRORD( COMPQ, SELECT, PARA, N, T, IT, JT,
+ * to swap.
+ *
+ IF( MYIERR.NE.0 ) INFO = MAX(1,I+KKS-1)
+- IF( NPROCS.GT.1 )
+- $ CALL IGAMX2D( ICTXT, 'All', TOP, 1, 1, INFO, 1, -1,
++ IF( NPROCS.GT.1 ) THEN
++ CALL IGAMX2D( ICTXT, 'All', TOP, 1, 1, INFODUM, 1, -1,
+ $ -1, -1, -1, -1 )
++ IERR = INFODUM( 1 )
++ END IF
+ GO TO 300
+ END IF
+ *
+diff --git a/SRC/pdtrsen.f b/SRC/pdtrsen.f
+index 78c5599..c65ea91 100644
+--- a/SRC/pdtrsen.f
++++ b/SRC/pdtrsen.f
+@@ -354,13 +354,15 @@ SUBROUTINE PDTRSEN( JOB, COMPQ, SELECT, PARA, N, T, IT, JT,
+ LOGICAL LQUERY, WANTBH, WANTQ, WANTS, WANTSP
+ INTEGER ICOFFT12, ICTXT, IDUM1, IDUM2, IERR, ILOC1,
+ $ IPW1, ITER, ITT, JLOC1, JTT, K, LIWMIN, LLDT,
+- $ LLDQ, LWMIN, MMAX, MMIN, MYROW, MYCOL, N1, N2,
++ $ LLDQ, LWMIN, MYROW, MYCOL, N1, N2,
+ $ NB, NOEXSY, NPCOL, NPROCS, NPROW, SPACE,
+ $ T12ROWS, T12COLS, TCOLS, TCSRC, TROWS, TRSRC,
+ $ WRK1, IWRK1, WRK2, IWRK2, WRK3, IWRK3
+- DOUBLE PRECISION DPDUM1, ELEM, EST, SCALE, RNORM
++ DOUBLE PRECISION ELEM, EST, SCALE, RNORM
+ * .. Local Arrays ..
+- INTEGER DESCT12( DLEN_ ), MBNB2( 2 )
++ INTEGER DESCT12( DLEN_ ), MBNB2( 2 ), MMAX( 1 ),
++ $ MMIN( 1 )
++ DOUBLE PRECISION DPDUM1( 1 )
+ * ..
+ * .. External Functions ..
+ LOGICAL LSAME
+@@ -521,16 +523,16 @@ SUBROUTINE PDTRSEN( JOB, COMPQ, SELECT, PARA, N, T, IT, JT,
+ END IF
+ IF( SELECT(K) ) M = M + 1
+ 10 CONTINUE
+- MMAX = M
+- MMIN = M
++ MMAX( 1 ) = M
++ MMIN( 1 ) = M
+ IF( NPROCS.GT.1 )
+- $ CALL IGAMX2D( ICTXT, 'All', TOP, 1, 1, MMAX, 1, -1,
+- $ -1, -1, -1, -1 )
++ $ CALL IGAMX2D( ICTXT, 'All', TOP, 1, 1, MMAX( 1 ), 1,
++ $ -1, -1, -1, -1, -1 )
+ IF( NPROCS.GT.1 )
+- $ CALL IGAMN2D( ICTXT, 'All', TOP, 1, 1, MMIN, 1, -1,
+- $ -1, -1, -1, -1 )
+- IF( MMAX.GT.MMIN ) THEN
+- M = MMAX
++ $ CALL IGAMN2D( ICTXT, 'All', TOP, 1, 1, MMIN( 1 ), 1,
++ $ -1, -1, -1, -1, -1 )
++ IF( MMAX( 1 ).GT.MMIN( 1 ) ) THEN
++ M = MMAX( 1 )
+ IF( NPROCS.GT.1 )
+ $ CALL IGAMX2D( ICTXT, 'All', TOP, N, 1, IWORK, N,
+ $ -1, -1, -1, -1, -1 )
+diff --git a/SRC/pshseqr.f b/SRC/pshseqr.f
+index 10eb24a..e8ecea9 100644
+--- a/SRC/pshseqr.f
++++ b/SRC/pshseqr.f
+@@ -259,11 +259,12 @@ SUBROUTINE PSHSEQR( JOB, COMPZ, N, ILO, IHI, H, DESCH, WR, WI, Z,
+ $ HRSRC4, HCSRC4, LIWKOPT
+ LOGICAL INITZ, LQUERY, WANTT, WANTZ, PAIR, BORDER
+ REAL TMP1, TMP2, TMP3, TMP4, DUM1, DUM2, DUM3,
+- $ DUM4, ELEM1, ELEM2, ELEM3, ELEM4,
++ $ DUM4, ELEM1, ELEM4,
+ $ CS, SN, ELEM5, TMP, LWKOPT
+ * ..
+ * .. Local Arrays ..
+ INTEGER DESCH2( DLEN_ )
++ REAL ELEM2( 1 ), ELEM3( 1 )
+ * ..
+ * .. External Functions ..
+ INTEGER PILAENVX, NUMROC, ICEIL
+@@ -566,28 +567,28 @@ SUBROUTINE PSHSEQR( JOB, COMPZ, N, ILO, IHI, H, DESCH, WR, WI, Z,
+ IF( MYROW.EQ.HRSRC1 .AND. MYCOL.EQ.HCSRC1 ) THEN
+ ELEM1 = H((JLOC1-1)*LLDH+ILOC1)
+ IF( K.LT.N ) THEN
+- ELEM3 = H((JLOC1-1)*LLDH+ILOC1+1)
++ ELEM3( 1 ) = H((JLOC1-1)*LLDH+ILOC1+1)
+ ELSE
+- ELEM3 = ZERO
++ ELEM3( 1 ) = ZERO
+ END IF
+- IF( ELEM3.NE.ZERO ) THEN
+- ELEM2 = H((JLOC1)*LLDH+ILOC1)
++ IF( ELEM3( 1 ).NE.ZERO ) THEN
++ ELEM2( 1 ) = H((JLOC1)*LLDH+ILOC1)
+ ELEM4 = H((JLOC1)*LLDH+ILOC1+1)
+- CALL SLANV2( ELEM1, ELEM2, ELEM3, ELEM4,
+- $ WR( K ), WI( K ), WR( K+1 ), WI( K+1 ),
+- $ SN, CS )
++ CALL SLANV2( ELEM1, ELEM2( 1 ), ELEM3( 1 ),
++ $ ELEM4, WR( K ), WI( K ), WR( K+1 ),
++ $ WI( K+1 ), SN, CS )
+ PAIR = .TRUE.
+ ELSE
+ IF( K.GT.1 ) THEN
+ TMP = H((JLOC1-2)*LLDH+ILOC1)
+ IF( TMP.NE.ZERO ) THEN
+ ELEM1 = H((JLOC1-2)*LLDH+ILOC1-1)
+- ELEM2 = H((JLOC1-1)*LLDH+ILOC1-1)
+- ELEM3 = H((JLOC1-2)*LLDH+ILOC1)
++ ELEM2( 1 ) = H((JLOC1-1)*LLDH+ILOC1-1)
++ ELEM3( 1 ) = H((JLOC1-2)*LLDH+ILOC1)
+ ELEM4 = H((JLOC1-1)*LLDH+ILOC1)
+- CALL SLANV2( ELEM1, ELEM2, ELEM3,
+- $ ELEM4, WR( K-1 ), WI( K-1 ),
+- $ WR( K ), WI( K ), SN, CS )
++ CALL SLANV2( ELEM1, ELEM2( 1 ),
++ $ ELEM3( 1 ), ELEM4, WR( K-1 ),
++ $ WI( K-1 ), WR( K ), WI( K ), SN, CS )
+ ELSE
+ WR( K ) = ELEM1
+ END IF
+@@ -620,12 +621,12 @@ SUBROUTINE PSHSEQR( JOB, COMPZ, N, ILO, IHI, H, DESCH, WR, WI, Z,
+ CALL INFOG2L( K+1, K+1, DESCH, NPROW, NPCOL, MYROW, MYCOL,
+ $ ILOC4, JLOC4, HRSRC4, HCSRC4 )
+ IF( MYROW.EQ.HRSRC2 .AND. MYCOL.EQ.HCSRC2 ) THEN
+- ELEM2 = H((JLOC2-1)*LLDH+ILOC2)
++ ELEM2( 1 ) = H((JLOC2-1)*LLDH+ILOC2)
+ IF( HRSRC1.NE.HRSRC2 .OR. HCSRC1.NE.HCSRC2 )
+ $ CALL SGESD2D( ICTXT, 1, 1, ELEM2, 1, HRSRC1, HCSRC1)
+ END IF
+ IF( MYROW.EQ.HRSRC3 .AND. MYCOL.EQ.HCSRC3 ) THEN
+- ELEM3 = H((JLOC3-1)*LLDH+ILOC3)
++ ELEM3( 1 ) = H((JLOC3-1)*LLDH+ILOC3)
+ IF( HRSRC1.NE.HRSRC3 .OR. HCSRC1.NE.HCSRC3 )
+ $ CALL SGESD2D( ICTXT, 1, 1, ELEM3, 1, HRSRC1, HCSRC1)
+ END IF
+@@ -651,8 +652,9 @@ SUBROUTINE PSHSEQR( JOB, COMPZ, N, ILO, IHI, H, DESCH, WR, WI, Z,
+ ELEM5 = WORK(2)
+ IF( ELEM5.EQ.ZERO ) THEN
+ IF( WR( K ).EQ.ZERO .AND. WI( K ).EQ.ZERO ) THEN
+- CALL SLANV2( ELEM1, ELEM2, ELEM3, ELEM4, WR( K ),
+- $ WI( K ), WR( K+1 ), WI( K+1 ), SN, CS )
++ CALL SLANV2( ELEM1, ELEM2( 1 ), ELEM3( 1 ), ELEM4,
++ $ WR( K ), WI( K ), WR( K+1 ), WI( K+1 ), SN,
++ $ CS )
+ ELSEIF( WR( K+1 ).EQ.ZERO .AND. WI( K+1 ).EQ.ZERO )
+ $ THEN
+ WR( K+1 ) = ELEM4
+diff --git a/SRC/pslacon.f b/SRC/pslacon.f
+index 20d27ff..673bf1a 100644
+--- a/SRC/pslacon.f
++++ b/SRC/pslacon.f
+@@ -160,10 +160,12 @@ SUBROUTINE PSLACON( N, V, IV, JV, DESCV, X, IX, JX, DESCX, ISGN,
+ INTEGER I, ICTXT, IFLAG, IIVX, IMAXROW, IOFFVX, IROFF,
+ $ ITER, IVXCOL, IVXROW, J, JLAST, JJVX, JUMP,
+ $ K, MYCOL, MYROW, NP, NPCOL, NPROW
+- REAL ALTSGN, ESTOLD, JLMAX, TEMP, XMAX
++ REAL ALTSGN, ESTOLD, JLMAX, XMAX
+ * ..
+ * .. Local Arrays ..
+ REAL WORK( 2 )
++ REAL ESTWORK( 1 )
++ REAL TEMP( 1 )
+ * ..
+ * .. External Subroutines ..
+ EXTERNAL BLACS_GRIDINFO, IGSUM2D, INFOG2L, PSAMAX,
+@@ -184,6 +186,7 @@ SUBROUTINE PSLACON( N, V, IV, JV, DESCV, X, IX, JX, DESCX, ISGN,
+ *
+ * Get grid parameters.
+ *
++ ESTWORK( 1 ) = EST
+ ICTXT = DESCX( CTXT_ )
+ CALL BLACS_GRIDINFO( ICTXT, NPROW, NPCOL, MYROW, MYCOL )
+ *
+@@ -215,21 +218,21 @@ SUBROUTINE PSLACON( N, V, IV, JV, DESCV, X, IX, JX, DESCX, ISGN,
+ IF( N.EQ.1 ) THEN
+ IF( MYROW.EQ.IVXROW ) THEN
+ V( IOFFVX ) = X( IOFFVX )
+- EST = ABS( V( IOFFVX ) )
+- CALL SGEBS2D( ICTXT, 'Columnwise', ' ', 1, 1, EST, 1 )
++ ESTWORK( 1 ) = ABS( V( IOFFVX ) )
++ CALL SGEBS2D( ICTXT, 'Columnwise', ' ', 1, 1, ESTWORK, 1 )
+ ELSE
+- CALL SGEBR2D( ICTXT, 'Columnwise', ' ', 1, 1, EST, 1,
++ CALL SGEBR2D( ICTXT, 'Columnwise', ' ', 1, 1, ESTWORK, 1,
+ $ IVXROW, MYCOL )
+ END IF
+ * ... QUIT
+ GO TO 150
+ END IF
+- CALL PSASUM( N, EST, X, IX, JX, DESCX, 1 )
++ CALL PSASUM( N, ESTWORK( 1 ), X, IX, JX, DESCX, 1 )
+ IF( DESCX( M_ ).EQ.1 .AND. N.EQ.1 ) THEN
+ IF( MYROW.EQ.IVXROW ) THEN
+- CALL SGEBS2D( ICTXT, 'Columnwise', ' ', 1, 1, EST, 1 )
++ CALL SGEBS2D( ICTXT, 'Columnwise', ' ', 1, 1, ESTWORK, 1 )
+ ELSE
+- CALL SGEBR2D( ICTXT, 'Columnwise', ' ', 1, 1, EST, 1,
++ CALL SGEBR2D( ICTXT, 'Columnwise', ' ', 1, 1, ESTWORK, 1,
+ $ IVXROW, MYCOL )
+ END IF
+ END IF
+@@ -281,13 +284,13 @@ SUBROUTINE PSLACON( N, V, IV, JV, DESCV, X, IX, JX, DESCX, ISGN,
+ *
+ 70 CONTINUE
+ CALL SCOPY( NP, X( IOFFVX ), 1, V( IOFFVX ), 1 )
+- ESTOLD = EST
+- CALL PSASUM( N, EST, V, IV, JV, DESCV, 1 )
++ ESTOLD = ESTWORK( 1 )
++ CALL PSASUM( N, ESTWORK( 1 ), V, IV, JV, DESCV, 1 )
+ IF( DESCV( M_ ).EQ.1 .AND. N.EQ.1 ) THEN
+ IF( MYROW.EQ.IVXROW ) THEN
+- CALL SGEBS2D( ICTXT, 'Columnwise', ' ', 1, 1, EST, 1 )
++ CALL SGEBS2D( ICTXT, 'Columnwise', ' ', 1, 1, ESTWORK, 1 )
+ ELSE
+- CALL SGEBR2D( ICTXT, 'Columnwise', ' ', 1, 1, EST, 1,
++ CALL SGEBR2D( ICTXT, 'Columnwise', ' ', 1, 1, ESTWORK, 1,
+ $ IVXROW, MYCOL )
+ END IF
+ END IF
+@@ -305,7 +308,7 @@ SUBROUTINE PSLACON( N, V, IV, JV, DESCV, X, IX, JX, DESCX, ISGN,
+ * REPEATED SIGN VECTOR DETECTED, HENCE ALGORITHM HAS CONVERGED.
+ * ALONG WITH IT, TEST FOR CYCLING.
+ *
+- IF( IFLAG.EQ.0 .OR. EST.LE.ESTOLD )
++ IF( IFLAG.EQ.0 .OR. ESTWORK( 1 ).LE.ESTOLD )
+ $ GO TO 120
+ *
+ DO 100 I = IOFFVX, IOFFVX+NP-1
+@@ -361,7 +364,7 @@ SUBROUTINE PSLACON( N, V, IV, JV, DESCV, X, IX, JX, DESCX, ISGN,
+ * X HAS BEEN OVERWRITTEN BY A*X
+ *
+ 140 CONTINUE
+- CALL PSASUM( N, TEMP, X, IX, JX, DESCX, 1 )
++ CALL PSASUM( N, TEMP( 1 ), X, IX, JX, DESCX, 1 )
+ IF( DESCX( M_ ).EQ.1 .AND. N.EQ.1 ) THEN
+ IF( MYROW.EQ.IVXROW ) THEN
+ CALL SGEBS2D( ICTXT, 'Columnwise', ' ', 1, 1, TEMP, 1 )
+@@ -370,15 +373,16 @@ SUBROUTINE PSLACON( N, V, IV, JV, DESCV, X, IX, JX, DESCX, ISGN,
+ $ IVXROW, MYCOL )
+ END IF
+ END IF
+- TEMP = TWO*( TEMP / REAL( 3*N ) )
+- IF( TEMP.GT.EST ) THEN
++ TEMP( 1 ) = TWO*( TEMP( 1 ) / REAL( 3*N ) )
++ IF( TEMP( 1 ).GT.ESTWORK( 1 ) ) THEN
+ CALL SCOPY( NP, X( IOFFVX ), 1, V( IOFFVX ), 1 )
+- EST = TEMP
++ ESTWORK( 1 ) = TEMP( 1 )
+ END IF
+ *
+ 150 CONTINUE
+ KASE = 0
+ *
++ EST = ESTWORK( 1 )
+ RETURN
+ *
+ * End of PSLACON
+diff --git a/SRC/pslarf.f b/SRC/pslarf.f
+index c1d3a15..39de0ed 100644
+--- a/SRC/pslarf.f
++++ b/SRC/pslarf.f
+@@ -241,7 +241,7 @@ SUBROUTINE PSLARF( SIDE, M, N, V, IV, JV, DESCV, INCV, TAU,
+ $ IOFFV, IPW, IROFF, IVCOL, IVROW, JJC, JJV, LDC,
+ $ LDV, MYCOL, MYROW, MP, NCC, NCV, NPCOL, NPROW,
+ $ NQ, RDEST
+- REAL TAULOC
++ REAL TAULOC( 1 )
+ * ..
+ * .. External Subroutines ..
+ EXTERNAL BLACS_GRIDINFO, INFOG2L, PB_TOPGET, PBSTRNV,
+@@ -335,7 +335,7 @@ SUBROUTINE PSLARF( SIDE, M, N, V, IV, JV, DESCV, INCV, TAU,
+ *
+ CALL SGEBS2D( ICTXT, 'Columnwise', ' ', 1, 1,
+ $ TAU( IIV ), 1 )
+- TAULOC = TAU( IIV )
++ TAULOC( 1 ) = TAU( IIV )
+ *
+ ELSE
+ *
+@@ -344,7 +344,7 @@ SUBROUTINE PSLARF( SIDE, M, N, V, IV, JV, DESCV, INCV, TAU,
+ *
+ END IF
+ *
+- IF( TAULOC.NE.ZERO ) THEN
++ IF( TAULOC( 1 ).NE.ZERO ) THEN
+ *
+ * w := sub( C )' * v
+ *
+@@ -362,8 +362,8 @@ SUBROUTINE PSLARF( SIDE, M, N, V, IV, JV, DESCV, INCV, TAU,
+ *
+ * sub( C ) := sub( C ) - v * w'
+ *
+- CALL SGER( MP, NQ, -TAULOC, WORK, 1, WORK( IPW ),
+- $ 1, C( IOFFC ), LDC )
++ CALL SGER( MP, NQ, -TAULOC( 1 ), WORK, 1,
++ $ WORK( IPW ), 1, C( IOFFC ), LDC )
+ END IF
+ *
+ END IF
+@@ -378,9 +378,9 @@ SUBROUTINE PSLARF( SIDE, M, N, V, IV, JV, DESCV, INCV, TAU,
+ *
+ IF( MYCOL.EQ.ICCOL ) THEN
+ *
+- TAULOC = TAU( JJV )
++ TAULOC( 1 ) = TAU( JJV )
+ *
+- IF( TAULOC.NE.ZERO ) THEN
++ IF( TAULOC( 1 ).NE.ZERO ) THEN
+ *
+ * w := sub( C )' * v
+ *
+@@ -397,8 +397,8 @@ SUBROUTINE PSLARF( SIDE, M, N, V, IV, JV, DESCV, INCV, TAU,
+ *
+ * sub( C ) := sub( C ) - v * w'
+ *
+- CALL SGER( MP, NQ, -TAULOC, V( IOFFV ), 1, WORK,
+- $ 1, C( IOFFC ), LDC )
++ CALL SGER( MP, NQ, -TAULOC( 1 ), V( IOFFV ), 1,
++ $ WORK, 1, C( IOFFC ), LDC )
+ END IF
+ *
+ END IF
+@@ -420,9 +420,9 @@ SUBROUTINE PSLARF( SIDE, M, N, V, IV, JV, DESCV, INCV, TAU,
+ IPW = MP+1
+ CALL SGERV2D( ICTXT, IPW, 1, WORK, IPW, MYROW,
+ $ IVCOL )
+- TAULOC = WORK( IPW )
++ TAULOC( 1 ) = WORK( IPW )
+ *
+- IF( TAULOC.NE.ZERO ) THEN
++ IF( TAULOC( 1 ).NE.ZERO ) THEN
+ *
+ * w := sub( C )' * v
+ *
+@@ -440,7 +440,7 @@ SUBROUTINE PSLARF( SIDE, M, N, V, IV, JV, DESCV, INCV, TAU,
+ *
+ * sub( C ) := sub( C ) - v * w'
+ *
+- CALL SGER( MP, NQ, -TAULOC, WORK, 1,
++ CALL SGER( MP, NQ, -TAULOC( 1 ), WORK, 1,
+ $ WORK( IPW ), 1, C( IOFFC ), LDC )
+ END IF
+ *
+@@ -470,7 +470,7 @@ SUBROUTINE PSLARF( SIDE, M, N, V, IV, JV, DESCV, INCV, TAU,
+ *
+ CALL SGEBS2D( ICTXT, 'Columnwise', ' ', 1, 1,
+ $ TAU( IIV ), 1 )
+- TAULOC = TAU( IIV )
++ TAULOC( 1 ) = TAU( IIV )
+ *
+ ELSE
+ *
+@@ -479,7 +479,7 @@ SUBROUTINE PSLARF( SIDE, M, N, V, IV, JV, DESCV, INCV, TAU,
+ *
+ END IF
+ *
+- IF( TAULOC.NE.ZERO ) THEN
++ IF( TAULOC( 1 ).NE.ZERO ) THEN
+ *
+ * w := sub( C )' * v
+ *
+@@ -499,8 +499,8 @@ SUBROUTINE PSLARF( SIDE, M, N, V, IV, JV, DESCV, INCV, TAU,
+ * sub( C ) := sub( C ) - v * w'
+ *
+ IF( IOFFC.GT.0 )
+- $ CALL SGER( MP, NQ, -TAULOC, WORK, 1, WORK( IPW ),
+- $ 1, C( IOFFC ), LDC )
++ $ CALL SGER( MP, NQ, -TAULOC( 1 ), WORK, 1,
++ $ WORK( IPW ), 1, C( IOFFC ), LDC )
+ END IF
+ *
+ ELSE
+@@ -515,18 +515,18 @@ SUBROUTINE PSLARF( SIDE, M, N, V, IV, JV, DESCV, INCV, TAU,
+ WORK(IPW) = TAU( JJV )
+ CALL SGEBS2D( ICTXT, 'Rowwise', ROWBTOP, IPW, 1,
+ $ WORK, IPW )
+- TAULOC = TAU( JJV )
++ TAULOC( 1 ) = TAU( JJV )
+ *
+ ELSE
+ *
+ IPW = MP+1
+ CALL SGEBR2D( ICTXT, 'Rowwise', ROWBTOP, IPW, 1, WORK,
+ $ IPW, MYROW, IVCOL )
+- TAULOC = WORK( IPW )
++ TAULOC( 1 ) = WORK( IPW )
+ *
+ END IF
+ *
+- IF( TAULOC.NE.ZERO ) THEN
++ IF( TAULOC( 1 ).NE.ZERO ) THEN
+ *
+ * w := sub( C )' * v
+ *
+@@ -546,8 +546,8 @@ SUBROUTINE PSLARF( SIDE, M, N, V, IV, JV, DESCV, INCV, TAU,
+ * sub( C ) := sub( C ) - v * w'
+ *
+ IF( IOFFC.GT.0 )
+- $ CALL SGER( MP, NQ, -TAULOC, WORK, 1, WORK( IPW ),
+- $ 1, C( IOFFC ), LDC )
++ $ CALL SGER( MP, NQ, -TAULOC( 1 ), WORK, 1,
++ $ WORK( IPW ), 1, C( IOFFC ), LDC )
+ END IF
+ *
+ END IF
+@@ -576,9 +576,9 @@ SUBROUTINE PSLARF( SIDE, M, N, V, IV, JV, DESCV, INCV, TAU,
+ *
+ IF( MYROW.EQ.ICROW ) THEN
+ *
+- TAULOC = TAU( IIV )
++ TAULOC( 1 ) = TAU( IIV )
+ *
+- IF( TAULOC.NE.ZERO ) THEN
++ IF( TAULOC( 1 ).NE.ZERO ) THEN
+ *
+ * w := sub( C ) * v
+ *
+@@ -596,7 +596,7 @@ SUBROUTINE PSLARF( SIDE, M, N, V, IV, JV, DESCV, INCV, TAU,
+ * sub( C ) := sub( C ) - w * v'
+ *
+ IF( IOFFV.GT.0 .AND. IOFFC.GT.0 )
+- $ CALL SGER( MP, NQ, -TAULOC, WORK, 1,
++ $ CALL SGER( MP, NQ, -TAULOC( 1 ), WORK, 1,
+ $ V( IOFFV ), LDV, C( IOFFC ), LDC )
+ END IF
+ *
+@@ -619,9 +619,9 @@ SUBROUTINE PSLARF( SIDE, M, N, V, IV, JV, DESCV, INCV, TAU,
+ IPW = NQ+1
+ CALL SGERV2D( ICTXT, IPW, 1, WORK, IPW, IVROW,
+ $ MYCOL )
+- TAULOC = WORK( IPW )
++ TAULOC( 1 ) = WORK( IPW )
+ *
+- IF( TAULOC.NE.ZERO ) THEN
++ IF( TAULOC( 1 ).NE.ZERO ) THEN
+ *
+ * w := sub( C ) * v
+ *
+@@ -639,7 +639,7 @@ SUBROUTINE PSLARF( SIDE, M, N, V, IV, JV, DESCV, INCV, TAU,
+ *
+ * sub( C ) := sub( C ) - w * v'
+ *
+- CALL SGER( MP, NQ, -TAULOC, WORK( IPW ), 1,
++ CALL SGER( MP, NQ, -TAULOC( 1 ), WORK( IPW ), 1,
+ $ WORK, 1, C( IOFFC ), LDC )
+ END IF
+ *
+@@ -665,7 +665,7 @@ SUBROUTINE PSLARF( SIDE, M, N, V, IV, JV, DESCV, INCV, TAU,
+ *
+ CALL SGEBS2D( ICTXT, 'Rowwise', ' ', 1, 1,
+ $ TAU( JJV ), 1 )
+- TAULOC = TAU( JJV )
++ TAULOC( 1 ) = TAU( JJV )
+ *
+ ELSE
+ *
+@@ -674,7 +674,7 @@ SUBROUTINE PSLARF( SIDE, M, N, V, IV, JV, DESCV, INCV, TAU,
+ *
+ END IF
+ *
+- IF( TAULOC.NE.ZERO ) THEN
++ IF( TAULOC( 1 ).NE.ZERO ) THEN
+ *
+ * w := sub( C ) * v
+ *
+@@ -692,8 +692,8 @@ SUBROUTINE PSLARF( SIDE, M, N, V, IV, JV, DESCV, INCV, TAU,
+ *
+ * sub( C ) := sub( C ) - w * v'
+ *
+- CALL SGER( MP, NQ, -TAULOC, WORK( IPW ), 1, WORK,
+- $ 1, C( IOFFC ), LDC )
++ CALL SGER( MP, NQ, -TAULOC( 1 ), WORK( IPW ), 1
++ $ , WORK, 1, C( IOFFC ), LDC )
+ END IF
+ *
+ END IF
+@@ -718,18 +718,18 @@ SUBROUTINE PSLARF( SIDE, M, N, V, IV, JV, DESCV, INCV, TAU,
+ WORK(IPW) = TAU( IIV )
+ CALL SGEBS2D( ICTXT, 'Columnwise', COLBTOP, IPW, 1,
+ $ WORK, IPW )
+- TAULOC = TAU( IIV )
++ TAULOC( 1 ) = TAU( IIV )
+ *
+ ELSE
+ *
+ IPW = NQ+1
+ CALL SGEBR2D( ICTXT, 'Columnwise', COLBTOP, IPW, 1,
+ $ WORK, IPW, IVROW, MYCOL )
+- TAULOC = WORK( IPW )
++ TAULOC( 1 ) = WORK( IPW )
+ *
+ END IF
+ *
+- IF( TAULOC.NE.ZERO ) THEN
++ IF( TAULOC( 1 ).NE.ZERO ) THEN
+ *
+ * w := sub( C ) * v
+ *
+@@ -748,8 +748,8 @@ SUBROUTINE PSLARF( SIDE, M, N, V, IV, JV, DESCV, INCV, TAU,
+ * sub( C ) := sub( C ) - w * v'
+ *
+ IF( IOFFC.GT.0 )
+- $ CALL SGER( MP, NQ, -TAULOC, WORK( IPW ), 1, WORK,
+- $ 1, C( IOFFC ), LDC )
++ $ CALL SGER( MP, NQ, -TAULOC( 1 ), WORK( IPW ), 1,
++ $ WORK, 1, C( IOFFC ), LDC )
+ END IF
+ *
+ ELSE
+@@ -768,7 +768,7 @@ SUBROUTINE PSLARF( SIDE, M, N, V, IV, JV, DESCV, INCV, TAU,
+ *
+ CALL SGEBS2D( ICTXT, 'Rowwise', ' ', 1, 1, TAU( JJV ),
+ $ 1 )
+- TAULOC = TAU( JJV )
++ TAULOC( 1 ) = TAU( JJV )
+ *
+ ELSE
+ *
+@@ -777,7 +777,7 @@ SUBROUTINE PSLARF( SIDE, M, N, V, IV, JV, DESCV, INCV, TAU,
+ *
+ END IF
+ *
+- IF( TAULOC.NE.ZERO ) THEN
++ IF( TAULOC( 1 ).NE.ZERO ) THEN
+ *
+ * w := sub( C ) * v
+ *
+@@ -795,8 +795,8 @@ SUBROUTINE PSLARF( SIDE, M, N, V, IV, JV, DESCV, INCV, TAU,
+ *
+ * sub( C ) := sub( C ) - w * v'
+ *
+- CALL SGER( MP, NQ, -TAULOC, WORK( IPW ), 1, WORK, 1,
+- $ C( IOFFC ), LDC )
++ CALL SGER( MP, NQ, -TAULOC( 1 ), WORK( IPW ), 1, WORK,
++ $ 1, C( IOFFC ), LDC )
+ END IF
+ *
+ END IF
+diff --git a/SRC/pslarz.f b/SRC/pslarz.f
+index aa70db7..8901530 100644
+--- a/SRC/pslarz.f
++++ b/SRC/pslarz.f
+@@ -250,7 +250,7 @@ SUBROUTINE PSLARZ( SIDE, M, N, L, V, IV, JV, DESCV, INCV, TAU, C,
+ $ IVCOL, IVROW, JJC1, JJC2, JJV, LDC, LDV, MPC2,
+ $ MPV, MYCOL, MYROW, NCC, NCV, NPCOL, NPROW,
+ $ NQC2, NQV, RDEST
+- REAL TAULOC
++ REAL TAULOC( 1 )
+ * ..
+ * .. External Subroutines ..
+ EXTERNAL BLACS_GRIDINFO, INFOG2L, PB_TOPGET, PBSTRNV,
+@@ -369,7 +369,7 @@ SUBROUTINE PSLARZ( SIDE, M, N, L, V, IV, JV, DESCV, INCV, TAU, C,
+ *
+ CALL SGEBS2D( ICTXT, 'Columnwise', ' ', 1, 1,
+ $ TAU( IIV ), 1 )
+- TAULOC = TAU( IIV )
++ TAULOC( 1 ) = TAU( IIV )
+ *
+ ELSE
+ *
+@@ -378,7 +378,7 @@ SUBROUTINE PSLARZ( SIDE, M, N, L, V, IV, JV, DESCV, INCV, TAU, C,
+ *
+ END IF
+ *
+- IF( TAULOC.NE.ZERO ) THEN
++ IF( TAULOC( 1 ).NE.ZERO ) THEN
+ *
+ * w := sub( C )' * v
+ *
+@@ -401,9 +401,9 @@ SUBROUTINE PSLARZ( SIDE, M, N, L, V, IV, JV, DESCV, INCV, TAU, C,
+ * sub( C ) := sub( C ) - v * w'
+ *
+ IF( MYROW.EQ.ICROW1 )
+- $ CALL SAXPY( NQC2, -TAULOC, WORK( IPW ),
++ $ CALL SAXPY( NQC2, -TAULOC( 1 ), WORK( IPW ),
+ $ MAX( 1, NQC2 ), C( IOFFC1 ), LDC )
+- CALL SGER( MPV, NQC2, -TAULOC, WORK, 1,
++ CALL SGER( MPV, NQC2, -TAULOC( 1 ), WORK, 1,
+ $ WORK( IPW ), 1, C( IOFFC2 ), LDC )
+ END IF
+ *
+@@ -419,9 +419,9 @@ SUBROUTINE PSLARZ( SIDE, M, N, L, V, IV, JV, DESCV, INCV, TAU, C,
+ *
+ IF( MYCOL.EQ.ICCOL2 ) THEN
+ *
+- TAULOC = TAU( JJV )
++ TAULOC( 1 ) = TAU( JJV )
+ *
+- IF( TAULOC.NE.ZERO ) THEN
++ IF( TAULOC( 1 ).NE.ZERO ) THEN
+ *
+ * w := sub( C )' * v
+ *
+@@ -444,11 +444,11 @@ SUBROUTINE PSLARZ( SIDE, M, N, L, V, IV, JV, DESCV, INCV, TAU, C,
+ * sub( C ) := sub( C ) - v * w'
+ *
+ IF( MYROW.EQ.ICROW1 )
+- $ CALL SAXPY( NQC2, -TAULOC, WORK,
++ $ CALL SAXPY( NQC2, -TAULOC( 1 ), WORK,
+ $ MAX( 1, NQC2 ), C( IOFFC1 ),
+ $ LDC )
+- CALL SGER( MPV, NQC2, -TAULOC, V( IOFFV ), 1,
+- $ WORK, 1, C( IOFFC2 ), LDC )
++ CALL SGER( MPV, NQC2, -TAULOC( 1 ), V( IOFFV ),
++ $ 1, WORK, 1, C( IOFFC2 ), LDC )
+ END IF
+ *
+ END IF
+@@ -470,9 +470,9 @@ SUBROUTINE PSLARZ( SIDE, M, N, L, V, IV, JV, DESCV, INCV, TAU, C,
+ IPW = MPV+1
+ CALL SGERV2D( ICTXT, IPW, 1, WORK, IPW, MYROW,
+ $ IVCOL )
+- TAULOC = WORK( IPW )
++ TAULOC( 1 ) = WORK( IPW )
+ *
+- IF( TAULOC.NE.ZERO ) THEN
++ IF( TAULOC( 1 ).NE.ZERO ) THEN
+ *
+ * w := sub( C )' * v
+ *
+@@ -495,10 +495,10 @@ SUBROUTINE PSLARZ( SIDE, M, N, L, V, IV, JV, DESCV, INCV, TAU, C,
+ * sub( C ) := sub( C ) - v * w'
+ *
+ IF( MYROW.EQ.ICROW1 )
+- $ CALL SAXPY( NQC2, -TAULOC, WORK( IPW ),
++ $ CALL SAXPY( NQC2, -TAULOC( 1 ), WORK( IPW ),
+ $ MAX( 1, NQC2 ), C( IOFFC1 ),
+ $ LDC )
+- CALL SGER( MPV, NQC2, -TAULOC, WORK, 1,
++ CALL SGER( MPV, NQC2, -TAULOC( 1 ), WORK, 1,
+ $ WORK( IPW ), 1, C( IOFFC2 ), LDC )
+ END IF
+ *
+@@ -529,7 +529,7 @@ SUBROUTINE PSLARZ( SIDE, M, N, L, V, IV, JV, DESCV, INCV, TAU, C,
+ *
+ CALL SGEBS2D( ICTXT, 'Columnwise', ' ', 1, 1,
+ $ TAU( IIV ), 1 )
+- TAULOC = TAU( IIV )
++ TAULOC( 1 ) = TAU( IIV )
+ *
+ ELSE
+ *
+@@ -538,7 +538,7 @@ SUBROUTINE PSLARZ( SIDE, M, N, L, V, IV, JV, DESCV, INCV, TAU, C,
+ *
+ END IF
+ *
+- IF( TAULOC.NE.ZERO ) THEN
++ IF( TAULOC( 1 ).NE.ZERO ) THEN
+ *
+ * w := sub( C )' * v
+ *
+@@ -561,10 +561,10 @@ SUBROUTINE PSLARZ( SIDE, M, N, L, V, IV, JV, DESCV, INCV, TAU, C,
+ * sub( C ) := sub( C ) - v * w'
+ *
+ IF( MYROW.EQ.ICROW1 )
+- $ CALL SAXPY( NQC2, -TAULOC, WORK( IPW ),
++ $ CALL SAXPY( NQC2, -TAULOC( 1 ), WORK( IPW ),
+ $ MAX( 1, NQC2 ), C( IOFFC1 ), LDC )
+- CALL SGER( MPV, NQC2, -TAULOC, WORK, 1, WORK( IPW ),
+- $ 1, C( IOFFC2 ), LDC )
++ CALL SGER( MPV, NQC2, -TAULOC( 1 ), WORK, 1,
++ $ WORK( IPW ), 1, C( IOFFC2 ), LDC )
+ END IF
+ *
+ ELSE
+@@ -579,18 +579,18 @@ SUBROUTINE PSLARZ( SIDE, M, N, L, V, IV, JV, DESCV, INCV, TAU, C,
+ WORK( IPW ) = TAU( JJV )
+ CALL SGEBS2D( ICTXT, 'Rowwise', ROWBTOP, IPW, 1,
+ $ WORK, IPW )
+- TAULOC = TAU( JJV )
++ TAULOC( 1 ) = TAU( JJV )
+ *
+ ELSE
+ *
+ IPW = MPV+1
+ CALL SGEBR2D( ICTXT, 'Rowwise', ROWBTOP, IPW, 1, WORK,
+ $ IPW, MYROW, IVCOL )
+- TAULOC = WORK( IPW )
++ TAULOC( 1 ) = WORK( IPW )
+ *
+ END IF
+ *
+- IF( TAULOC.NE.ZERO ) THEN
++ IF( TAULOC( 1 ).NE.ZERO ) THEN
+ *
+ * w := sub( C )' * v
+ *
+@@ -613,10 +613,10 @@ SUBROUTINE PSLARZ( SIDE, M, N, L, V, IV, JV, DESCV, INCV, TAU, C,
+ * sub( C ) := sub( C ) - v * w'
+ *
+ IF( MYROW.EQ.ICROW1 )
+- $ CALL SAXPY( NQC2, -TAULOC, WORK( IPW ),
++ $ CALL SAXPY( NQC2, -TAULOC( 1 ), WORK( IPW ),
+ $ MAX( 1, NQC2 ), C( IOFFC1 ), LDC )
+- CALL SGER( MPV, NQC2, -TAULOC, WORK, 1, WORK( IPW ),
+- $ 1, C( IOFFC2 ), LDC )
++ CALL SGER( MPV, NQC2, -TAULOC( 1 ), WORK, 1,
++ $ WORK( IPW ), 1, C( IOFFC2 ), LDC )
+ END IF
+ *
+ END IF
+@@ -645,9 +645,9 @@ SUBROUTINE PSLARZ( SIDE, M, N, L, V, IV, JV, DESCV, INCV, TAU, C,
+ *
+ IF( MYROW.EQ.ICROW2 ) THEN
+ *
+- TAULOC = TAU( IIV )
++ TAULOC( 1 ) = TAU( IIV )
+ *
+- IF( TAULOC.NE.ZERO ) THEN
++ IF( TAULOC( 1 ).NE.ZERO ) THEN
+ *
+ * w := sub( C ) * v
+ *
+@@ -668,13 +668,13 @@ SUBROUTINE PSLARZ( SIDE, M, N, L, V, IV, JV, DESCV, INCV, TAU, C,
+ $ ICCOL2 )
+ *
+ IF( MYCOL.EQ.ICCOL1 )
+- $ CALL SAXPY( MPC2, -TAULOC, WORK, 1,
++ $ CALL SAXPY( MPC2, -TAULOC( 1 ), WORK, 1,
+ $ C( IOFFC1 ), 1 )
+ *
+ * sub( C ) := sub( C ) - w * v'
+ *
+ IF( MPC2.GT.0 .AND. NQV.GT.0 )
+- $ CALL SGER( MPC2, NQV, -TAULOC, WORK, 1,
++ $ CALL SGER( MPC2, NQV, -TAULOC( 1 ), WORK, 1,
+ $ V( IOFFV ), LDV, C( IOFFC2 ),
+ $ LDC )
+ END IF
+@@ -698,9 +698,9 @@ SUBROUTINE PSLARZ( SIDE, M, N, L, V, IV, JV, DESCV, INCV, TAU, C,
+ IPW = NQV+1
+ CALL SGERV2D( ICTXT, IPW, 1, WORK, IPW, IVROW,
+ $ MYCOL )
+- TAULOC = WORK( IPW )
++ TAULOC( 1 ) = WORK( IPW )
+ *
+- IF( TAULOC.NE.ZERO ) THEN
++ IF( TAULOC( 1 ).NE.ZERO ) THEN
+ *
+ * w := sub( C ) * v
+ *
+@@ -719,13 +719,13 @@ SUBROUTINE PSLARZ( SIDE, M, N, L, V, IV, JV, DESCV, INCV, TAU, C,
+ $ WORK( IPW ), MAX( 1, MPC2 ),
+ $ RDEST, ICCOL2 )
+ IF( MYCOL.EQ.ICCOL1 )
+- $ CALL SAXPY( MPC2, -TAULOC, WORK( IPW ), 1,
+- $ C( IOFFC1 ), 1 )
++ $ CALL SAXPY( MPC2, -TAULOC( 1 ), WORK( IPW ),
++ $ 1, C( IOFFC1 ), 1 )
+ *
+ * sub( C ) := sub( C ) - w * v'
+ *
+- CALL SGER( MPC2, NQV, -TAULOC, WORK( IPW ), 1,
+- $ WORK, 1, C( IOFFC2 ), LDC )
++ CALL SGER( MPC2, NQV, -TAULOC( 1 ), WORK( IPW ),
++ $ 1, WORK, 1, C( IOFFC2 ), LDC )
+ END IF
+ *
+ END IF
+@@ -750,7 +750,7 @@ SUBROUTINE PSLARZ( SIDE, M, N, L, V, IV, JV, DESCV, INCV, TAU, C,
+ *
+ CALL SGEBS2D( ICTXT, 'Rowwise', ' ', 1, 1,
+ $ TAU( JJV ), 1 )
+- TAULOC = TAU( JJV )
++ TAULOC( 1 ) = TAU( JJV )
+ *
+ ELSE
+ *
+@@ -759,7 +759,7 @@ SUBROUTINE PSLARZ( SIDE, M, N, L, V, IV, JV, DESCV, INCV, TAU, C,
+ *
+ END IF
+ *
+- IF( TAULOC.NE.ZERO ) THEN
++ IF( TAULOC( 1 ).NE.ZERO ) THEN
+ *
+ * w := sub( C ) * v
+ *
+@@ -778,12 +778,12 @@ SUBROUTINE PSLARZ( SIDE, M, N, L, V, IV, JV, DESCV, INCV, TAU, C,
+ $ WORK( IPW ), MAX( 1, MPC2 ), RDEST,
+ $ ICCOL2 )
+ IF( MYCOL.EQ.ICCOL1 )
+- $ CALL SAXPY( MPC2, -TAULOC, WORK( IPW ), 1,
++ $ CALL SAXPY( MPC2, -TAULOC( 1 ), WORK( IPW ), 1,
+ $ C( IOFFC1 ), 1 )
+ *
+ * sub( C ) := sub( C ) - w * v'
+ *
+- CALL SGER( MPC2, NQV, -TAULOC, WORK( IPW ), 1,
++ CALL SGER( MPC2, NQV, -TAULOC( 1 ), WORK( IPW ), 1,
+ $ WORK, 1, C( IOFFC2 ), LDC )
+ END IF
+ *
+@@ -808,18 +808,18 @@ SUBROUTINE PSLARZ( SIDE, M, N, L, V, IV, JV, DESCV, INCV, TAU, C,
+ WORK( IPW ) = TAU( IIV )
+ CALL SGEBS2D( ICTXT, 'Columnwise', COLBTOP, IPW, 1,
+ $ WORK, IPW )
+- TAULOC = TAU( IIV )
++ TAULOC( 1 ) = TAU( IIV )
+ *
+ ELSE
+ *
+ IPW = NQV+1
+ CALL SGEBR2D( ICTXT, 'Columnwise', COLBTOP, IPW, 1,
+ $ WORK, IPW, IVROW, MYCOL )
+- TAULOC = WORK( IPW )
++ TAULOC( 1 ) = WORK( IPW )
+ *
+ END IF
+ *
+- IF( TAULOC.NE.ZERO ) THEN
++ IF( TAULOC( 1 ).NE.ZERO ) THEN
+ *
+ * w := sub( C ) * v
+ *
+@@ -839,13 +839,13 @@ SUBROUTINE PSLARZ( SIDE, M, N, L, V, IV, JV, DESCV, INCV, TAU, C,
+ $ WORK( IPW ), MAX( 1, MPC2 ), RDEST,
+ $ ICCOL2 )
+ IF( MYCOL.EQ.ICCOL1 )
+- $ CALL SAXPY( MPC2, -TAULOC, WORK( IPW ), 1,
++ $ CALL SAXPY( MPC2, -TAULOC( 1 ), WORK( IPW ), 1,
+ $ C( IOFFC1 ), 1 )
+ *
+ * sub( C ) := sub( C ) - w * v'
+ *
+- CALL SGER( MPC2, NQV, -TAULOC, WORK( IPW ), 1, WORK,
+- $ 1, C( IOFFC2 ), LDC )
++ CALL SGER( MPC2, NQV, -TAULOC( 1 ), WORK( IPW ), 1,
++ $ WORK, 1, C( IOFFC2 ), LDC )
+ END IF
+ *
+ ELSE
+@@ -864,7 +864,7 @@ SUBROUTINE PSLARZ( SIDE, M, N, L, V, IV, JV, DESCV, INCV, TAU, C,
+ *
+ CALL SGEBS2D( ICTXT, 'Rowwise', ' ', 1, 1, TAU( JJV ),
+ $ 1 )
+- TAULOC = TAU( JJV )
++ TAULOC( 1 ) = TAU( JJV )
+ *
+ ELSE
+ *
+@@ -873,7 +873,7 @@ SUBROUTINE PSLARZ( SIDE, M, N, L, V, IV, JV, DESCV, INCV, TAU, C,
+ *
+ END IF
+ *
+- IF( TAULOC.NE.ZERO ) THEN
++ IF( TAULOC( 1 ).NE.ZERO ) THEN
+ *
+ * w := sub( C ) * v
+ *
+@@ -892,13 +892,13 @@ SUBROUTINE PSLARZ( SIDE, M, N, L, V, IV, JV, DESCV, INCV, TAU, C,
+ $ WORK( IPW ), MAX( 1, MPC2 ), RDEST,
+ $ ICCOL2 )
+ IF( MYCOL.EQ.ICCOL1 )
+- $ CALL SAXPY( MPC2, -TAULOC, WORK( IPW ), 1,
++ $ CALL SAXPY( MPC2, -TAULOC( 1 ), WORK( IPW ), 1,
+ $ C( IOFFC1 ), 1 )
+ *
+ * sub( C ) := sub( C ) - w * v'
+ *
+- CALL SGER( MPC2, NQV, -TAULOC, WORK( IPW ), 1, WORK,
+- $ 1, C( IOFFC2 ), LDC )
++ CALL SGER( MPC2, NQV, -TAULOC( 1 ), WORK( IPW ), 1,
++ $ WORK, 1, C( IOFFC2 ), LDC )
+ END IF
+ *
+ END IF
+diff --git a/SRC/pslawil.f b/SRC/pslawil.f
+index e04c16b..671e08e 100644
+--- a/SRC/pslawil.f
++++ b/SRC/pslawil.f
+@@ -120,10 +120,14 @@ SUBROUTINE PSLAWIL( II, JJ, M, A, DESCA, H44, H33, H43H34, V )
+ INTEGER CONTXT, DOWN, HBL, ICOL, IROW, JSRC, LDA, LEFT,
+ $ MODKM1, MYCOL, MYROW, NPCOL, NPROW, NUM, RIGHT,
+ $ RSRC, UP
+- REAL H11, H12, H21, H22, H33S, H44S, S, V1, V2, V3
++ REAL H22, H33S, H44S, S, V1, V2
+ * ..
+ * .. Local Arrays ..
+ REAL BUF( 4 )
++ REAL H11( 1 )
++ REAL H12( 1 )
++ REAL H21( 1 )
++ REAL V3( 1 )
+ * ..
+ * .. External Subroutines ..
+ EXTERNAL BLACS_GRIDINFO, SGERV2D, SGESD2D, INFOG2L
+@@ -170,18 +174,18 @@ SUBROUTINE PSLAWIL( II, JJ, M, A, DESCA, H44, H33, H43H34, V )
+ IF( NPCOL.GT.1 ) THEN
+ CALL SGERV2D( CONTXT, 1, 1, V3, 1, MYROW, LEFT )
+ ELSE
+- V3 = A( ( ICOL-2 )*LDA+IROW )
++ V3( 1 ) = A( ( ICOL-2 )*LDA+IROW )
+ END IF
+ IF( NUM.GT.1 ) THEN
+ CALL SGERV2D( CONTXT, 4, 1, BUF, 4, UP, LEFT )
+- H11 = BUF( 1 )
+- H21 = BUF( 2 )
+- H12 = BUF( 3 )
++ H11( 1 ) = BUF( 1 )
++ H21( 1 ) = BUF( 2 )
++ H12( 1 ) = BUF( 3 )
+ H22 = BUF( 4 )
+ ELSE
+- H11 = A( ( ICOL-3 )*LDA+IROW-2 )
+- H21 = A( ( ICOL-3 )*LDA+IROW-1 )
+- H12 = A( ( ICOL-2 )*LDA+IROW-2 )
++ H11( 1 ) = A( ( ICOL-3 )*LDA+IROW-2 )
++ H21( 1 ) = A( ( ICOL-3 )*LDA+IROW-1 )
++ H12( 1 ) = A( ( ICOL-2 )*LDA+IROW-2 )
+ H22 = A( ( ICOL-2 )*LDA+IROW-1 )
+ END IF
+ END IF
+@@ -214,20 +218,20 @@ SUBROUTINE PSLAWIL( II, JJ, M, A, DESCA, H44, H33, H43H34, V )
+ IF( NUM.GT.1 ) THEN
+ CALL SGERV2D( CONTXT, 1, 1, H11, 1, UP, LEFT )
+ ELSE
+- H11 = A( ( ICOL-3 )*LDA+IROW-2 )
++ H11( 1 ) = A( ( ICOL-3 )*LDA+IROW-2 )
+ END IF
+ IF( NPROW.GT.1 ) THEN
+ CALL SGERV2D( CONTXT, 1, 1, H12, 1, UP, MYCOL )
+ ELSE
+- H12 = A( ( ICOL-2 )*LDA+IROW-2 )
++ H12( 1 ) = A( ( ICOL-2 )*LDA+IROW-2 )
+ END IF
+ IF( NPCOL.GT.1 ) THEN
+ CALL SGERV2D( CONTXT, 1, 1, H21, 1, MYROW, LEFT )
+ ELSE
+- H21 = A( ( ICOL-3 )*LDA+IROW-1 )
++ H21( 1 ) = A( ( ICOL-3 )*LDA+IROW-1 )
+ END IF
+ H22 = A( ( ICOL-2 )*LDA+IROW-1 )
+- V3 = A( ( ICOL-2 )*LDA+IROW )
++ V3( 1 ) = A( ( ICOL-2 )*LDA+IROW )
+ END IF
+ END IF
+ IF( ( MYROW.NE.II ) .OR. ( MYCOL.NE.JJ ) )
+@@ -236,24 +240,24 @@ SUBROUTINE PSLAWIL( II, JJ, M, A, DESCA, H44, H33, H43H34, V )
+ IF( MODKM1.GT.1 ) THEN
+ CALL INFOG2L( M+2, M+2, DESCA, NPROW, NPCOL, MYROW, MYCOL,
+ $ IROW, ICOL, RSRC, JSRC )
+- H11 = A( ( ICOL-3 )*LDA+IROW-2 )
+- H21 = A( ( ICOL-3 )*LDA+IROW-1 )
+- H12 = A( ( ICOL-2 )*LDA+IROW-2 )
++ H11( 1 ) = A( ( ICOL-3 )*LDA+IROW-2 )
++ H21( 1 ) = A( ( ICOL-3 )*LDA+IROW-1 )
++ H12( 1 ) = A( ( ICOL-2 )*LDA+IROW-2 )
+ H22 = A( ( ICOL-2 )*LDA+IROW-1 )
+- V3 = A( ( ICOL-2 )*LDA+IROW )
++ V3( 1 ) = A( ( ICOL-2 )*LDA+IROW )
+ END IF
+ *
+- H44S = H44 - H11
+- H33S = H33 - H11
+- V1 = ( H33S*H44S-H43H34 ) / H21 + H12
+- V2 = H22 - H11 - H33S - H44S
+- S = ABS( V1 ) + ABS( V2 ) + ABS( V3 )
++ H44S = H44 - H11( 1 )
++ H33S = H33 - H11( 1 )
++ V1 = ( H33S*H44S-H43H34 ) / H21( 1 ) + H12( 1 )
++ V2 = H22 - H11( 1 ) - H33S - H44S
++ S = ABS( V1 ) + ABS( V2 ) + ABS( V3( 1 ) )
+ V1 = V1 / S
+ V2 = V2 / S
+- V3 = V3 / S
++ V3( 1 ) = V3( 1 ) / S
+ V( 1 ) = V1
+ V( 2 ) = V2
+- V( 3 ) = V3
++ V( 3 ) = V3( 1 )
+ *
+ RETURN
+ *
+diff --git a/SRC/psstebz.f b/SRC/psstebz.f
+index a8a2496..7e588a9 100644
+--- a/SRC/psstebz.f
++++ b/SRC/psstebz.f
+@@ -244,14 +244,14 @@ SUBROUTINE PSSTEBZ( ICTXT, RANGE, ORDER, N, VL, VU, IL, IU,
+ $ ITMP2, J, JB, K, LAST, LEXTRA, LREQ, MYCOL,
+ $ MYROW, NALPHA, NBETA, NCMP, NEIGINT, NEXT, NGL,
+ $ NGLOB, NGU, NINT, NPCOL, NPROW, OFFSET,
+- $ ONEDCONTEXT, P, PREV, REXTRA, RREQ, SELF,
+- $ TORECV
++ $ ONEDCONTEXT, P, PREV, REXTRA, RREQ, SELF
+ REAL ALPHA, ATOLI, BETA, BNORM, DRECV, DSEND, GL,
+ $ GU, INITVL, INITVU, LSAVE, MID, PIVMIN, RELTOL,
+ $ SAFEMN, TMP1, TMP2, TNORM, ULP
+ * ..
+ * .. Local Arrays ..
+ INTEGER IDUM( 5, 2 )
++ INTEGER TORECV( 1, 1 )
+ * ..
+ * .. Executable Statements ..
+ * This is just to keep ftnchek happy
+@@ -774,14 +774,14 @@ SUBROUTINE PSSTEBZ( ICTXT, RANGE, ORDER, N, VL, VU, IL, IU,
+ ELSE
+ CALL IGEBR2D( ONEDCONTEXT, 'ALL', ' ', 1, 1, TORECV, 1, 0,
+ $ I-1 )
+- IF( TORECV.NE.0 ) THEN
+- CALL IGEBR2D( ONEDCONTEXT, 'ALL', ' ', TORECV, 1, IWORK,
+- $ TORECV, 0, I-1 )
+- CALL SGEBR2D( ONEDCONTEXT, 'ALL', ' ', TORECV, 1, WORK,
+- $ TORECV, 0, I-1 )
+- CALL IGEBR2D( ONEDCONTEXT, 'ALL', ' ', TORECV, 1,
+- $ IWORK( N+1 ), TORECV, 0, I-1 )
+- DO 120 J = 1, TORECV
++ IF( TORECV( 1, 1 ).NE.0 ) THEN
++ CALL IGEBR2D( ONEDCONTEXT, 'ALL', ' ', TORECV( 1, 1 ), 1,
++ $ IWORK, TORECV( 1, 1 ), 0, I-1 )
++ CALL SGEBR2D( ONEDCONTEXT, 'ALL', ' ', TORECV( 1, 1 ), 1,
++ $ WORK, TORECV( 1, 1 ), 0, I-1 )
++ CALL IGEBR2D( ONEDCONTEXT, 'ALL', ' ', TORECV( 1, 1 ), 1,
++ $ IWORK( N+1 ), TORECV( 1, 1 ), 0, I-1 )
++ DO 120 J = 1, TORECV( 1, 1 )
+ W( IWORK( J ) ) = WORK( J )
+ IBLOCK( IWORK( J ) ) = IWORK( N+J )
+ 120 CONTINUE
+diff --git a/SRC/pstrord.f b/SRC/pstrord.f
+index 3562242..5cdb549 100644
+--- a/SRC/pstrord.f
++++ b/SRC/pstrord.f
+@@ -328,12 +328,13 @@ SUBROUTINE PSTRORD( COMPQ, SELECT, PARA, N, T, IT, JT,
+ $ EAST, WEST, ILOC4, SOUTH, NORTH, INDXS,
+ $ ITT, JTT, ILEN, DLEN, INDXE, TRSRC1, TCSRC1,
+ $ TRSRC2, TCSRC2, ILOS, DIR, TLIHI, TLILO, TLSEL,
+- $ ROUND, LAST, WIN0S, WIN0E, WINE, MMAX, MMIN
++ $ ROUND, LAST, WIN0S, WIN0E, WINE
+ REAL ELEM, ELEM1, ELEM2, ELEM3, ELEM4, SN, CS, TMP,
+ $ ELEM5
+ * ..
+ * .. Local Arrays ..
+- INTEGER IBUFF( 8 ), IDUM1( 1 ), IDUM2( 1 )
++ INTEGER IBUFF( 8 ), IDUM1( 1 ), IDUM2( 1 ), MMAX( 1 ),
++ $ MMIN( 1 ), INFODUM( 1 )
+ * ..
+ * .. External Functions ..
+ LOGICAL LSAME
+@@ -483,16 +484,16 @@ SUBROUTINE PSTRORD( COMPQ, SELECT, PARA, N, T, IT, JT,
+ END IF
+ IF( SELECT(K).NE.0 ) M = M + 1
+ 10 CONTINUE
+- MMAX = M
+- MMIN = M
++ MMAX( 1 ) = M
++ MMIN( 1 ) = M
+ IF( NPROCS.GT.1 )
+ $ CALL IGAMX2D( ICTXT, 'All', TOP, 1, 1, MMAX, 1, -1,
+ $ -1, -1, -1, -1 )
+ IF( NPROCS.GT.1 )
+ $ CALL IGAMN2D( ICTXT, 'All', TOP, 1, 1, MMIN, 1, -1,
+ $ -1, -1, -1, -1 )
+- IF( MMAX.GT.MMIN ) THEN
+- M = MMAX
++ IF( MMAX( 1 ).GT.MMIN( 1 ) ) THEN
++ M = MMAX( 1 )
+ IF( NPROCS.GT.1 )
+ $ CALL IGAMX2D( ICTXT, 'All', TOP, N, 1, SELECT, N,
+ $ -1, -1, -1, -1, -1 )
+@@ -520,9 +521,11 @@ SUBROUTINE PSTRORD( COMPQ, SELECT, PARA, N, T, IT, JT,
+ *
+ * Global maximum on info.
+ *
+- IF( NPROCS.GT.1 )
+- $ CALL IGAMX2D( ICTXT, 'All', TOP, 1, 1, INFO, 1, -1, -1, -1,
+- $ -1, -1 )
++ IF( NPROCS.GT.1 ) THEN
++ CALL IGAMX2D( ICTXT, 'All', TOP, 1, 1, INFODUM, 1, -1, -1,
++ $ -1, -1, -1 )
++ INFO = INFODUM( 1 )
++ END IF
+ *
+ * Return if some argument is incorrect.
+ *
+@@ -1576,9 +1579,11 @@ SUBROUTINE PSTRORD( COMPQ, SELECT, PARA, N, T, IT, JT,
+ * experienced a failure in the reordering.
+ *
+ MYIERR = IERR
+- IF( NPROCS.GT.1 )
+- $ CALL IGAMX2D( ICTXT, 'All', TOP, 1, 1, IERR, 1, -1,
++ IF( NPROCS.GT.1 ) THEN
++ CALL IGAMX2D( ICTXT, 'All', TOP, 1, 1, INFODUM, 1, -1,
+ $ -1, -1, -1, -1 )
++ IERR = INFODUM( 1 )
++ END IF
+ *
+ IF( IERR.NE.0 ) THEN
+ *
+@@ -1586,9 +1591,11 @@ SUBROUTINE PSTRORD( COMPQ, SELECT, PARA, N, T, IT, JT,
+ * to swap.
+ *
+ IF( MYIERR.NE.0 ) INFO = MAX(1,I+KKS-1)
+- IF( NPROCS.GT.1 )
+- $ CALL IGAMX2D( ICTXT, 'All', TOP, 1, 1, INFO, 1, -1,
++ IF( NPROCS.GT.1 ) THEN
++ CALL IGAMX2D( ICTXT, 'All', TOP, 1, 1, INFODUM, 1, -1,
+ $ -1, -1, -1, -1 )
++ INFO = INFODUM( 1 )
++ END IF
+ GO TO 300
+ END IF
+ *
+@@ -3245,9 +3252,11 @@ SUBROUTINE PSTRORD( COMPQ, SELECT, PARA, N, T, IT, JT,
+ * experienced a failure in the reordering.
+ *
+ MYIERR = IERR
+- IF( NPROCS.GT.1 )
+- $ CALL IGAMX2D( ICTXT, 'All', TOP, 1, 1, IERR, 1, -1,
++ IF( NPROCS.GT.1 ) THEN
++ CALL IGAMX2D( ICTXT, 'All', TOP, 1, 1, INFODUM, 1, -1,
+ $ -1, -1, -1, -1 )
++ IERR = INFODUM( 1 )
++ END IF
+ *
+ IF( IERR.NE.0 ) THEN
+ *
+@@ -3255,9 +3264,11 @@ SUBROUTINE PSTRORD( COMPQ, SELECT, PARA, N, T, IT, JT,
+ * to swap.
+ *
+ IF( MYIERR.NE.0 ) INFO = MAX(1,I+KKS-1)
+- IF( NPROCS.GT.1 )
+- $ CALL IGAMX2D( ICTXT, 'All', TOP, 1, 1, INFO, 1, -1,
++ IF( NPROCS.GT.1 ) THEN
++ CALL IGAMX2D( ICTXT, 'All', TOP, 1, 1, INFODUM, 1, -1,
+ $ -1, -1, -1, -1 )
++ INFO = INFODUM( 1 )
++ END IF
+ GO TO 300
+ END IF
+ *
+diff --git a/SRC/pstrsen.f b/SRC/pstrsen.f
+index 6219bdb..1922e8f 100644
+--- a/SRC/pstrsen.f
++++ b/SRC/pstrsen.f
+@@ -354,13 +354,15 @@ SUBROUTINE PSTRSEN( JOB, COMPQ, SELECT, PARA, N, T, IT, JT,
+ LOGICAL LQUERY, WANTBH, WANTQ, WANTS, WANTSP
+ INTEGER ICOFFT12, ICTXT, IDUM1, IDUM2, IERR, ILOC1,
+ $ IPW1, ITER, ITT, JLOC1, JTT, K, LIWMIN, LLDT,
+- $ LLDQ, LWMIN, MMAX, MMIN, MYROW, MYCOL, N1, N2,
++ $ LLDQ, LWMIN, MYROW, MYCOL, N1, N2,
+ $ NB, NOEXSY, NPCOL, NPROCS, NPROW, SPACE,
+ $ T12ROWS, T12COLS, TCOLS, TCSRC, TROWS, TRSRC,
+ $ WRK1, IWRK1, WRK2, IWRK2, WRK3, IWRK3
+- REAL DPDUM1, ELEM, EST, SCALE, RNORM
++ REAL ELEM, EST, SCALE, RNORM
+ * .. Local Arrays ..
+- INTEGER DESCT12( DLEN_ ), MBNB2( 2 )
++ INTEGER DESCT12( DLEN_ ), MBNB2( 2 ), MMAX( 1 ),
++ $ MMIN( 1 ), INFODUM( 1 )
++ REAL DPDUM1( 1 )
+ * ..
+ * .. External Functions ..
+ LOGICAL LSAME
+@@ -521,16 +523,16 @@ SUBROUTINE PSTRSEN( JOB, COMPQ, SELECT, PARA, N, T, IT, JT,
+ END IF
+ IF( SELECT(K) ) M = M + 1
+ 10 CONTINUE
+- MMAX = M
+- MMIN = M
++ MMAX( 1 ) = M
++ MMIN( 1 ) = M
+ IF( NPROCS.GT.1 )
+ $ CALL IGAMX2D( ICTXT, 'All', TOP, 1, 1, MMAX, 1, -1,
+ $ -1, -1, -1, -1 )
+ IF( NPROCS.GT.1 )
+ $ CALL IGAMN2D( ICTXT, 'All', TOP, 1, 1, MMIN, 1, -1,
+ $ -1, -1, -1, -1 )
+- IF( MMAX.GT.MMIN ) THEN
+- M = MMAX
++ IF( MMAX( 1 ).GT.MMIN( 1 ) ) THEN
++ M = MMAX( 1 )
+ IF( NPROCS.GT.1 )
+ $ CALL IGAMX2D( ICTXT, 'All', TOP, N, 1, IWORK, N,
+ $ -1, -1, -1, -1, -1 )
+@@ -602,9 +604,11 @@ SUBROUTINE PSTRSEN( JOB, COMPQ, SELECT, PARA, N, T, IT, JT,
+ *
+ * Global maximum on info
+ *
+- IF( NPROCS.GT.1 )
+- $ CALL IGAMX2D( ICTXT, 'All', TOP, 1, 1, INFO, 1, -1, -1, -1,
++ IF( NPROCS.GT.1 ) THEN
++ CALL IGAMX2D( ICTXT, 'All', TOP, 1, 1, INFODUM, 1, -1, -1, -1,
+ $ -1, -1 )
++ INFO = INFODUM( 1 )
++ END IF
+ *
+ * Return if some argument is incorrect
+ *
+diff --git a/SRC/pzlarf.f b/SRC/pzlarf.f
+index df65912..7bff287 100644
+--- a/SRC/pzlarf.f
++++ b/SRC/pzlarf.f
+@@ -242,7 +242,7 @@ SUBROUTINE PZLARF( SIDE, M, N, V, IV, JV, DESCV, INCV, TAU,
+ $ IOFFV, IPW, IROFF, IVCOL, IVROW, JJC, JJV, LDC,
+ $ LDV, MYCOL, MYROW, MP, NCC, NCV, NPCOL, NPROW,
+ $ NQ, RDEST
+- COMPLEX*16 TAULOC
++ COMPLEX*16 TAULOC( 1 )
+ * ..
+ * .. External Subroutines ..
+ EXTERNAL BLACS_GRIDINFO, INFOG2L, PB_TOPGET, PBZTRNV,
+@@ -336,7 +336,7 @@ SUBROUTINE PZLARF( SIDE, M, N, V, IV, JV, DESCV, INCV, TAU,
+ *
+ CALL ZGEBS2D( ICTXT, 'Columnwise', ' ', 1, 1,
+ $ TAU( IIV ), 1 )
+- TAULOC = TAU( IIV )
++ TAULOC( 1 ) = TAU( IIV )
+ *
+ ELSE
+ *
+@@ -345,7 +345,7 @@ SUBROUTINE PZLARF( SIDE, M, N, V, IV, JV, DESCV, INCV, TAU,
+ *
+ END IF
+ *
+- IF( TAULOC.NE.ZERO ) THEN
++ IF( TAULOC( 1 ).NE.ZERO ) THEN
+ *
+ * w := sub( C )' * v
+ *
+@@ -363,8 +363,8 @@ SUBROUTINE PZLARF( SIDE, M, N, V, IV, JV, DESCV, INCV, TAU,
+ *
+ * sub( C ) := sub( C ) - v * w'
+ *
+- CALL ZGERC( MP, NQ, -TAULOC, WORK, 1, WORK( IPW ),
+- $ 1, C( IOFFC ), LDC )
++ CALL ZGERC( MP, NQ, -TAULOC( 1 ), WORK, 1,
++ $ WORK( IPW ), 1, C( IOFFC ), LDC )
+ END IF
+ *
+ END IF
+@@ -379,9 +379,9 @@ SUBROUTINE PZLARF( SIDE, M, N, V, IV, JV, DESCV, INCV, TAU,
+ *
+ IF( MYCOL.EQ.ICCOL ) THEN
+ *
+- TAULOC = TAU( JJV )
++ TAULOC( 1 ) = TAU( JJV )
+ *
+- IF( TAULOC.NE.ZERO ) THEN
++ IF( TAULOC( 1 ).NE.ZERO ) THEN
+ *
+ * w := sub( C )' * v
+ *
+@@ -398,7 +398,7 @@ SUBROUTINE PZLARF( SIDE, M, N, V, IV, JV, DESCV, INCV, TAU,
+ *
+ * sub( C ) := sub( C ) - v * w'
+ *
+- CALL ZGERC( MP, NQ, -TAULOC, V( IOFFV ), 1,
++ CALL ZGERC( MP, NQ, -TAULOC( 1 ), V( IOFFV ), 1,
+ $ WORK, 1, C( IOFFC ), LDC )
+ END IF
+ *
+@@ -421,9 +421,9 @@ SUBROUTINE PZLARF( SIDE, M, N, V, IV, JV, DESCV, INCV, TAU,
+ IPW = MP+1
+ CALL ZGERV2D( ICTXT, IPW, 1, WORK, IPW, MYROW,
+ $ IVCOL )
+- TAULOC = WORK( IPW )
++ TAULOC( 1 ) = WORK( IPW )
+ *
+- IF( TAULOC.NE.ZERO ) THEN
++ IF( TAULOC( 1 ).NE.ZERO ) THEN
+ *
+ * w := sub( C )' * v
+ *
+@@ -441,7 +441,7 @@ SUBROUTINE PZLARF( SIDE, M, N, V, IV, JV, DESCV, INCV, TAU,
+ *
+ * sub( C ) := sub( C ) - v * w'
+ *
+- CALL ZGERC( MP, NQ, -TAULOC, WORK, 1,
++ CALL ZGERC( MP, NQ, -TAULOC( 1 ), WORK, 1,
+ $ WORK( IPW ), 1, C( IOFFC ), LDC )
+ END IF
+ *
+@@ -471,7 +471,7 @@ SUBROUTINE PZLARF( SIDE, M, N, V, IV, JV, DESCV, INCV, TAU,
+ *
+ CALL ZGEBS2D( ICTXT, 'Columnwise', ' ', 1, 1,
+ $ TAU( IIV ), 1 )
+- TAULOC = TAU( IIV )
++ TAULOC( 1 ) = TAU( IIV )
+ *
+ ELSE
+ *
+@@ -480,7 +480,7 @@ SUBROUTINE PZLARF( SIDE, M, N, V, IV, JV, DESCV, INCV, TAU,
+ *
+ END IF
+ *
+- IF( TAULOC.NE.ZERO ) THEN
++ IF( TAULOC( 1 ).NE.ZERO ) THEN
+ *
+ * w := sub( C )' * v
+ *
+@@ -500,8 +500,8 @@ SUBROUTINE PZLARF( SIDE, M, N, V, IV, JV, DESCV, INCV, TAU,
+ * sub( C ) := sub( C ) - v * w'
+ *
+ IF( IOFFC.GT.0 )
+- $ CALL ZGERC( MP, NQ, -TAULOC, WORK, 1, WORK( IPW ),
+- $ 1, C( IOFFC ), LDC )
++ $ CALL ZGERC( MP, NQ, -TAULOC( 1 ), WORK, 1,
++ $ WORK( IPW ), 1, C( IOFFC ), LDC )
+ END IF
+ *
+ ELSE
+@@ -516,18 +516,18 @@ SUBROUTINE PZLARF( SIDE, M, N, V, IV, JV, DESCV, INCV, TAU,
+ WORK(IPW) = TAU( JJV )
+ CALL ZGEBS2D( ICTXT, 'Rowwise', ROWBTOP, IPW, 1,
+ $ WORK, IPW )
+- TAULOC = TAU( JJV )
++ TAULOC( 1 ) = TAU( JJV )
+ *
+ ELSE
+ *
+ IPW = MP+1
+ CALL ZGEBR2D( ICTXT, 'Rowwise', ROWBTOP, IPW, 1, WORK,
+ $ IPW, MYROW, IVCOL )
+- TAULOC = WORK( IPW )
++ TAULOC( 1 ) = WORK( IPW )
+ *
+ END IF
+ *
+- IF( TAULOC.NE.ZERO ) THEN
++ IF( TAULOC( 1 ).NE.ZERO ) THEN
+ *
+ * w := sub( C )' * v
+ *
+@@ -547,8 +547,8 @@ SUBROUTINE PZLARF( SIDE, M, N, V, IV, JV, DESCV, INCV, TAU,
+ * sub( C ) := sub( C ) - v * w'
+ *
+ IF( IOFFC.GT.0 )
+- $ CALL ZGERC( MP, NQ, -TAULOC, WORK, 1, WORK( IPW ),
+- $ 1, C( IOFFC ), LDC )
++ $ CALL ZGERC( MP, NQ, -TAULOC( 1 ), WORK, 1,
++ $ WORK( IPW ), 1, C( IOFFC ), LDC )
+ END IF
+ *
+ END IF
+@@ -577,9 +577,9 @@ SUBROUTINE PZLARF( SIDE, M, N, V, IV, JV, DESCV, INCV, TAU,
+ *
+ IF( MYROW.EQ.ICROW ) THEN
+ *
+- TAULOC = TAU( IIV )
++ TAULOC( 1 ) = TAU( IIV )
+ *
+- IF( TAULOC.NE.ZERO ) THEN
++ IF( TAULOC( 1 ).NE.ZERO ) THEN
+ *
+ * w := sub( C ) * v
+ *
+@@ -597,7 +597,7 @@ SUBROUTINE PZLARF( SIDE, M, N, V, IV, JV, DESCV, INCV, TAU,
+ * sub( C ) := sub( C ) - w * v'
+ *
+ IF( IOFFV.GT.0 .AND. IOFFC.GT.0 )
+- $ CALL ZGERC( MP, NQ, -TAULOC, WORK, 1,
++ $ CALL ZGERC( MP, NQ, -TAULOC( 1 ), WORK, 1,
+ $ V( IOFFV ), LDV, C( IOFFC ),
+ $ LDC )
+ END IF
+@@ -621,9 +621,9 @@ SUBROUTINE PZLARF( SIDE, M, N, V, IV, JV, DESCV, INCV, TAU,
+ IPW = NQ+1
+ CALL ZGERV2D( ICTXT, IPW, 1, WORK, IPW, IVROW,
+ $ MYCOL )
+- TAULOC = WORK( IPW )
++ TAULOC( 1 ) = WORK( IPW )
+ *
+- IF( TAULOC.NE.ZERO ) THEN
++ IF( TAULOC( 1 ).NE.ZERO ) THEN
+ *
+ * w := sub( C ) * v
+ *
+@@ -641,8 +641,8 @@ SUBROUTINE PZLARF( SIDE, M, N, V, IV, JV, DESCV, INCV, TAU,
+ *
+ * sub( C ) := sub( C ) - w * v'
+ *
+- CALL ZGERC( MP, NQ, -TAULOC, WORK( IPW ), 1,
+- $ WORK, 1, C( IOFFC ), LDC )
++ CALL ZGERC( MP, NQ, -TAULOC( 1 ), WORK( IPW ),
++ $ 1, WORK, 1, C( IOFFC ), LDC )
+ END IF
+ *
+ END IF
+@@ -667,7 +667,7 @@ SUBROUTINE PZLARF( SIDE, M, N, V, IV, JV, DESCV, INCV, TAU,
+ *
+ CALL ZGEBS2D( ICTXT, 'Rowwise', ' ', 1, 1,
+ $ TAU( JJV ), 1 )
+- TAULOC = TAU( JJV )
++ TAULOC( 1 ) = TAU( JJV )
+ *
+ ELSE
+ *
+@@ -676,7 +676,7 @@ SUBROUTINE PZLARF( SIDE, M, N, V, IV, JV, DESCV, INCV, TAU,
+ *
+ END IF
+ *
+- IF( TAULOC.NE.ZERO ) THEN
++ IF( TAULOC( 1 ).NE.ZERO ) THEN
+ *
+ * w := sub( C ) * v
+ *
+@@ -694,8 +694,8 @@ SUBROUTINE PZLARF( SIDE, M, N, V, IV, JV, DESCV, INCV, TAU,
+ *
+ * sub( C ) := sub( C ) - w * v'
+ *
+- CALL ZGERC( MP, NQ, -TAULOC, WORK( IPW ), 1, WORK,
+- $ 1, C( IOFFC ), LDC )
++ CALL ZGERC( MP, NQ, -TAULOC( 1 ), WORK( IPW ), 1,
++ $ WORK, 1, C( IOFFC ), LDC )
+ END IF
+ *
+ END IF
+@@ -720,18 +720,18 @@ SUBROUTINE PZLARF( SIDE, M, N, V, IV, JV, DESCV, INCV, TAU,
+ WORK(IPW) = TAU( IIV )
+ CALL ZGEBS2D( ICTXT, 'Columnwise', COLBTOP, IPW, 1,
+ $ WORK, IPW )
+- TAULOC = TAU( IIV )
++ TAULOC( 1 ) = TAU( IIV )
+ *
+ ELSE
+ *
+ IPW = NQ+1
+ CALL ZGEBR2D( ICTXT, 'Columnwise', COLBTOP, IPW, 1,
+ $ WORK, IPW, IVROW, MYCOL )
+- TAULOC = WORK( IPW )
++ TAULOC( 1 ) = WORK( IPW )
+ *
+ END IF
+ *
+- IF( TAULOC.NE.ZERO ) THEN
++ IF( TAULOC( 1 ).NE.ZERO ) THEN
+ *
+ * w := sub( C ) * v
+ *
+@@ -750,8 +750,8 @@ SUBROUTINE PZLARF( SIDE, M, N, V, IV, JV, DESCV, INCV, TAU,
+ * sub( C ) := sub( C ) - w * v'
+ *
+ IF( IOFFC.GT.0 )
+- $ CALL ZGERC( MP, NQ, -TAULOC, WORK( IPW ), 1, WORK,
+- $ 1, C( IOFFC ), LDC )
++ $ CALL ZGERC( MP, NQ, -TAULOC( 1 ), WORK( IPW ), 1,
++ $ WORK, 1, C( IOFFC ), LDC )
+ END IF
+ *
+ ELSE
+@@ -770,7 +770,7 @@ SUBROUTINE PZLARF( SIDE, M, N, V, IV, JV, DESCV, INCV, TAU,
+ *
+ CALL ZGEBS2D( ICTXT, 'Rowwise', ' ', 1, 1, TAU( JJV ),
+ $ 1 )
+- TAULOC = TAU( JJV )
++ TAULOC( 1 ) = TAU( JJV )
+ *
+ ELSE
+ *
+@@ -779,7 +779,7 @@ SUBROUTINE PZLARF( SIDE, M, N, V, IV, JV, DESCV, INCV, TAU,
+ *
+ END IF
+ *
+- IF( TAULOC.NE.ZERO ) THEN
++ IF( TAULOC( 1 ).NE.ZERO ) THEN
+ *
+ * w := sub( C ) * v
+ *
+@@ -797,8 +797,8 @@ SUBROUTINE PZLARF( SIDE, M, N, V, IV, JV, DESCV, INCV, TAU,
+ *
+ * sub( C ) := sub( C ) - w * v'
+ *
+- CALL ZGERC( MP, NQ, -TAULOC, WORK( IPW ), 1, WORK, 1,
+- $ C( IOFFC ), LDC )
++ CALL ZGERC( MP, NQ, -TAULOC( 1 ), WORK( IPW ), 1,
++ $ WORK, 1, C( IOFFC ), LDC )
+ END IF
+ *
+ END IF
+diff --git a/SRC/pzlarfc.f b/SRC/pzlarfc.f
+index eb469fc..ddd7ec6 100644
+--- a/SRC/pzlarfc.f
++++ b/SRC/pzlarfc.f
+@@ -242,7 +242,7 @@ SUBROUTINE PZLARFC( SIDE, M, N, V, IV, JV, DESCV, INCV, TAU,
+ $ IOFFV, IPW, IROFF, IVCOL, IVROW, JJC, JJV, LDC,
+ $ LDV, MYCOL, MYROW, MP, NCC, NCV, NPCOL, NPROW,
+ $ NQ, RDEST
+- COMPLEX*16 TAULOC
++ COMPLEX*16 TAULOC( 1 )
+ * ..
+ * .. External Subroutines ..
+ EXTERNAL BLACS_GRIDINFO, INFOG2L, PB_TOPGET, PBZTRNV,
+@@ -336,17 +336,17 @@ SUBROUTINE PZLARFC( SIDE, M, N, V, IV, JV, DESCV, INCV, TAU,
+ *
+ CALL ZGEBS2D( ICTXT, 'Columnwise', ' ', 1, 1,
+ $ TAU( IIV ), 1 )
+- TAULOC = DCONJG( TAU( IIV ) )
++ TAULOC( 1 ) = DCONJG( TAU( IIV ) )
+ *
+ ELSE
+ *
+ CALL ZGEBR2D( ICTXT, 'Columnwise', ' ', 1, 1,
+ $ TAULOC, 1, IVROW, MYCOL )
+- TAULOC = DCONJG( TAULOC )
++ TAULOC( 1 ) = DCONJG( TAULOC( 1 ) )
+ *
+ END IF
+ *
+- IF( TAULOC.NE.ZERO ) THEN
++ IF( TAULOC( 1 ).NE.ZERO ) THEN
+ *
+ * w := sub( C )' * v
+ *
+@@ -364,8 +364,8 @@ SUBROUTINE PZLARFC( SIDE, M, N, V, IV, JV, DESCV, INCV, TAU,
+ *
+ * sub( C ) := sub( C ) - v * w'
+ *
+- CALL ZGERC( MP, NQ, -TAULOC, WORK, 1, WORK( IPW ),
+- $ 1, C( IOFFC ), LDC )
++ CALL ZGERC( MP, NQ, -TAULOC( 1 ), WORK, 1,
++ $ WORK( IPW ), 1, C( IOFFC ), LDC )
+ END IF
+ *
+ END IF
+@@ -380,9 +380,9 @@ SUBROUTINE PZLARFC( SIDE, M, N, V, IV, JV, DESCV, INCV, TAU,
+ *
+ IF( MYCOL.EQ.ICCOL ) THEN
+ *
+- TAULOC = DCONJG( TAU( JJV ) )
++ TAULOC( 1 ) = DCONJG( TAU( JJV ) )
+ *
+- IF( TAULOC.NE.ZERO ) THEN
++ IF( TAULOC( 1 ).NE.ZERO ) THEN
+ *
+ * w := sub( C )' * v
+ *
+@@ -399,7 +399,7 @@ SUBROUTINE PZLARFC( SIDE, M, N, V, IV, JV, DESCV, INCV, TAU,
+ *
+ * sub( C ) := sub( C ) - v * w'
+ *
+- CALL ZGERC( MP, NQ, -TAULOC, V( IOFFV ), 1,
++ CALL ZGERC( MP, NQ, -TAULOC( 1 ), V( IOFFV ), 1,
+ $ WORK, 1, C( IOFFC ), LDC )
+ END IF
+ *
+@@ -422,9 +422,9 @@ SUBROUTINE PZLARFC( SIDE, M, N, V, IV, JV, DESCV, INCV, TAU,
+ IPW = MP+1
+ CALL ZGERV2D( ICTXT, IPW, 1, WORK, IPW, MYROW,
+ $ IVCOL )
+- TAULOC = DCONJG( WORK( IPW ) )
++ TAULOC( 1 ) = DCONJG( WORK( IPW ) )
+ *
+- IF( TAULOC.NE.ZERO ) THEN
++ IF( TAULOC( 1 ).NE.ZERO ) THEN
+ *
+ * w := sub( C )' * v
+ *
+@@ -442,7 +442,7 @@ SUBROUTINE PZLARFC( SIDE, M, N, V, IV, JV, DESCV, INCV, TAU,
+ *
+ * sub( C ) := sub( C ) - v * w'
+ *
+- CALL ZGERC( MP, NQ, -TAULOC, WORK, 1,
++ CALL ZGERC( MP, NQ, -TAULOC( 1 ), WORK, 1,
+ $ WORK( IPW ), 1, C( IOFFC ), LDC )
+ END IF
+ *
+@@ -472,17 +472,17 @@ SUBROUTINE PZLARFC( SIDE, M, N, V, IV, JV, DESCV, INCV, TAU,
+ *
+ CALL ZGEBS2D( ICTXT, 'Columnwise', ' ', 1, 1,
+ $ TAU( IIV ), 1 )
+- TAULOC = DCONJG( TAU( IIV ) )
++ TAULOC( 1 ) = DCONJG( TAU( IIV ) )
+ *
+ ELSE
+ *
+ CALL ZGEBR2D( ICTXT, 'Columnwise', ' ', 1, 1, TAULOC,
+ $ 1, IVROW, MYCOL )
+- TAULOC = DCONJG( TAULOC )
++ TAULOC( 1 ) = DCONJG( TAULOC( 1 ) )
+ *
+ END IF
+ *
+- IF( TAULOC.NE.ZERO ) THEN
++ IF( TAULOC( 1 ).NE.ZERO ) THEN
+ *
+ * w := sub( C )' * v
+ *
+@@ -500,8 +500,8 @@ SUBROUTINE PZLARFC( SIDE, M, N, V, IV, JV, DESCV, INCV, TAU,
+ *
+ * sub( C ) := sub( C ) - v * w'
+ *
+- CALL ZGERC( MP, NQ, -TAULOC, WORK, 1, WORK( IPW ), 1,
+- $ C( IOFFC ), LDC )
++ CALL ZGERC( MP, NQ, -TAULOC( 1 ), WORK, 1,
++ $ WORK( IPW ), 1, C( IOFFC ), LDC )
+ END IF
+ *
+ ELSE
+@@ -516,18 +516,18 @@ SUBROUTINE PZLARFC( SIDE, M, N, V, IV, JV, DESCV, INCV, TAU,
+ WORK(IPW) = TAU( JJV )
+ CALL ZGEBS2D( ICTXT, 'Rowwise', ROWBTOP, IPW, 1,
+ $ WORK, IPW )
+- TAULOC = DCONJG( TAU( JJV ) )
++ TAULOC( 1 ) = DCONJG( TAU( JJV ) )
+ *
+ ELSE
+ *
+ IPW = MP+1
+ CALL ZGEBR2D( ICTXT, 'Rowwise', ROWBTOP, IPW, 1, WORK,
+ $ IPW, MYROW, IVCOL )
+- TAULOC = DCONJG( WORK( IPW ) )
++ TAULOC( 1 ) = DCONJG( WORK( IPW ) )
+ *
+ END IF
+ *
+- IF( TAULOC.NE.ZERO ) THEN
++ IF( TAULOC( 1 ).NE.ZERO ) THEN
+ *
+ * w := sub( C )' * v
+ *
+@@ -545,8 +545,8 @@ SUBROUTINE PZLARFC( SIDE, M, N, V, IV, JV, DESCV, INCV, TAU,
+ *
+ * sub( C ) := sub( C ) - v * w'
+ *
+- CALL ZGERC( MP, NQ, -TAULOC, WORK, 1, WORK( IPW ), 1,
+- $ C( IOFFC ), LDC )
++ CALL ZGERC( MP, NQ, -TAULOC( 1 ), WORK, 1,
++ $ WORK( IPW ), 1, C( IOFFC ), LDC )
+ END IF
+ *
+ END IF
+@@ -575,9 +575,9 @@ SUBROUTINE PZLARFC( SIDE, M, N, V, IV, JV, DESCV, INCV, TAU,
+ *
+ IF( MYROW.EQ.ICROW ) THEN
+ *
+- TAULOC = DCONJG( TAU( IIV ) )
++ TAULOC( 1 ) = DCONJG( TAU( IIV ) )
+ *
+- IF( TAULOC.NE.ZERO ) THEN
++ IF( TAULOC( 1 ).NE.ZERO ) THEN
+ *
+ * w := sub( C ) * v
+ *
+@@ -594,7 +594,7 @@ SUBROUTINE PZLARFC( SIDE, M, N, V, IV, JV, DESCV, INCV, TAU,
+ *
+ * sub( C ) := sub( C ) - w * v'
+ *
+- CALL ZGERC( MP, NQ, -TAULOC, WORK, 1,
++ CALL ZGERC( MP, NQ, -TAULOC( 1 ), WORK, 1,
+ $ V( IOFFV ), LDV, C( IOFFC ), LDC )
+ END IF
+ *
+@@ -617,9 +617,9 @@ SUBROUTINE PZLARFC( SIDE, M, N, V, IV, JV, DESCV, INCV, TAU,
+ IPW = NQ+1
+ CALL ZGERV2D( ICTXT, IPW, 1, WORK, IPW, IVROW,
+ $ MYCOL )
+- TAULOC = DCONJG( WORK( IPW ) )
++ TAULOC( 1 ) = DCONJG( WORK( IPW ) )
+ *
+- IF( TAULOC.NE.ZERO ) THEN
++ IF( TAULOC( 1 ).NE.ZERO ) THEN
+ *
+ * w := sub( C ) * v
+ *
+@@ -637,8 +637,8 @@ SUBROUTINE PZLARFC( SIDE, M, N, V, IV, JV, DESCV, INCV, TAU,
+ *
+ * sub( C ) := sub( C ) - w * v'
+ *
+- CALL ZGERC( MP, NQ, -TAULOC, WORK( IPW ), 1,
+- $ WORK, 1, C( IOFFC ), LDC )
++ CALL ZGERC( MP, NQ, -TAULOC( 1 ), WORK( IPW ),
++ $ 1, WORK, 1, C( IOFFC ), LDC )
+ END IF
+ *
+ END IF
+@@ -663,17 +663,17 @@ SUBROUTINE PZLARFC( SIDE, M, N, V, IV, JV, DESCV, INCV, TAU,
+ *
+ CALL ZGEBS2D( ICTXT, 'Rowwise', ' ', 1, 1,
+ $ TAU( JJV ), 1 )
+- TAULOC = DCONJG( TAU( JJV ) )
++ TAULOC( 1 ) = DCONJG( TAU( JJV ) )
+ *
+ ELSE
+ *
+ CALL ZGEBR2D( ICTXT, 'Rowwise', ' ', 1, 1, TAULOC,
+ $ 1, MYROW, IVCOL )
+- TAULOC = DCONJG( TAULOC )
++ TAULOC( 1 ) = DCONJG( TAULOC( 1 ) )
+ *
+ END IF
+ *
+- IF( TAULOC.NE.ZERO ) THEN
++ IF( TAULOC( 1 ).NE.ZERO ) THEN
+ *
+ * w := sub( C ) * v
+ *
+@@ -691,8 +691,8 @@ SUBROUTINE PZLARFC( SIDE, M, N, V, IV, JV, DESCV, INCV, TAU,
+ *
+ * sub( C ) := sub( C ) - w * v'
+ *
+- CALL ZGERC( MP, NQ, -TAULOC, WORK( IPW ), 1, WORK,
+- $ 1, C( IOFFC ), LDC )
++ CALL ZGERC( MP, NQ, -TAULOC( 1 ), WORK( IPW ), 1,
++ $ WORK, 1, C( IOFFC ), LDC )
+ END IF
+ *
+ END IF
+@@ -716,18 +716,18 @@ SUBROUTINE PZLARFC( SIDE, M, N, V, IV, JV, DESCV, INCV, TAU,
+ WORK(IPW) = TAU( IIV )
+ CALL ZGEBS2D( ICTXT, 'Columnwise', COLBTOP, IPW, 1,
+ $ WORK, IPW )
+- TAULOC = DCONJG( TAU( IIV ) )
++ TAULOC( 1 ) = DCONJG( TAU( IIV ) )
+ *
+ ELSE
+ *
+ IPW = NQ+1
+ CALL ZGEBR2D( ICTXT, 'Columnwise', COLBTOP, IPW, 1,
+ $ WORK, IPW, IVROW, MYCOL )
+- TAULOC = DCONJG( WORK( IPW ) )
++ TAULOC( 1 ) = DCONJG( WORK( IPW ) )
+ *
+ END IF
+ *
+- IF( TAULOC.NE.ZERO ) THEN
++ IF( TAULOC( 1 ).NE.ZERO ) THEN
+ *
+ * w := sub( C ) * v
+ *
+@@ -745,8 +745,8 @@ SUBROUTINE PZLARFC( SIDE, M, N, V, IV, JV, DESCV, INCV, TAU,
+ *
+ * sub( C ) := sub( C ) - w * v'
+ *
+- CALL ZGERC( MP, NQ, -TAULOC, WORK( IPW ), 1, WORK, 1,
+- $ C( IOFFC ), LDC )
++ CALL ZGERC( MP, NQ, -TAULOC( 1 ), WORK( IPW ), 1,
++ $ WORK, 1, C( IOFFC ), LDC )
+ END IF
+ *
+ ELSE
+@@ -765,17 +765,17 @@ SUBROUTINE PZLARFC( SIDE, M, N, V, IV, JV, DESCV, INCV, TAU,
+ *
+ CALL ZGEBS2D( ICTXT, 'Rowwise', ' ', 1, 1, TAU( JJV ),
+ $ 1 )
+- TAULOC = DCONJG( TAU( JJV ) )
++ TAULOC( 1 ) = DCONJG( TAU( JJV ) )
+ *
+ ELSE
+ *
+ CALL ZGEBR2D( ICTXT, 'Rowwise', ' ', 1, 1, TAULOC, 1,
+ $ MYROW, IVCOL )
+- TAULOC = DCONJG( TAULOC )
++ TAULOC( 1 ) = DCONJG( TAULOC( 1 ) )
+ *
+ END IF
+ *
+- IF( TAULOC.NE.ZERO ) THEN
++ IF( TAULOC( 1 ).NE.ZERO ) THEN
+ *
+ * w := sub( C ) * v
+ *
+@@ -793,8 +793,8 @@ SUBROUTINE PZLARFC( SIDE, M, N, V, IV, JV, DESCV, INCV, TAU,
+ *
+ * sub( C ) := sub( C ) - w * v'
+ *
+- CALL ZGERC( MP, NQ, -TAULOC, WORK( IPW ), 1, WORK, 1,
+- $ C( IOFFC ), LDC )
++ CALL ZGERC( MP, NQ, -TAULOC( 1 ), WORK( IPW ), 1,
++ $ WORK, 1, C( IOFFC ), LDC )
+ END IF
+ *
+ END IF
+diff --git a/SRC/pzlarz.f b/SRC/pzlarz.f
+index fefc133..abf6288 100644
+--- a/SRC/pzlarz.f
++++ b/SRC/pzlarz.f
+@@ -251,7 +251,7 @@ SUBROUTINE PZLARZ( SIDE, M, N, L, V, IV, JV, DESCV, INCV, TAU, C,
+ $ IVCOL, IVROW, JJC1, JJC2, JJV, LDC, LDV, MPC2,
+ $ MPV, MYCOL, MYROW, NCC, NCV, NPCOL, NPROW,
+ $ NQC2, NQV, RDEST
+- COMPLEX*16 TAULOC
++ COMPLEX*16 TAULOC( 1 )
+ * ..
+ * .. External Subroutines ..
+ EXTERNAL BLACS_GRIDINFO, INFOG2L, PB_TOPGET, PBZTRNV,
+@@ -370,7 +370,7 @@ SUBROUTINE PZLARZ( SIDE, M, N, L, V, IV, JV, DESCV, INCV, TAU, C,
+ *
+ CALL ZGEBS2D( ICTXT, 'Columnwise', ' ', 1, 1,
+ $ TAU( IIV ), 1 )
+- TAULOC = TAU( IIV )
++ TAULOC( 1 ) = TAU( IIV )
+ *
+ ELSE
+ *
+@@ -379,7 +379,7 @@ SUBROUTINE PZLARZ( SIDE, M, N, L, V, IV, JV, DESCV, INCV, TAU, C,
+ *
+ END IF
+ *
+- IF( TAULOC.NE.ZERO ) THEN
++ IF( TAULOC( 1 ).NE.ZERO ) THEN
+ *
+ * w := sub( C )' * v
+ *
+@@ -402,9 +402,9 @@ SUBROUTINE PZLARZ( SIDE, M, N, L, V, IV, JV, DESCV, INCV, TAU, C,
+ * sub( C ) := sub( C ) - v * w'
+ *
+ IF( MYROW.EQ.ICROW1 )
+- $ CALL ZAXPY( NQC2, -TAULOC, WORK( IPW ),
++ $ CALL ZAXPY( NQC2, -TAULOC( 1 ), WORK( IPW ),
+ $ MAX( 1, NQC2 ), C( IOFFC1 ), LDC )
+- CALL ZGERC( MPV, NQC2, -TAULOC, WORK, 1,
++ CALL ZGERC( MPV, NQC2, -TAULOC( 1 ), WORK, 1,
+ $ WORK( IPW ), 1, C( IOFFC2 ), LDC )
+ END IF
+ *
+@@ -420,9 +420,9 @@ SUBROUTINE PZLARZ( SIDE, M, N, L, V, IV, JV, DESCV, INCV, TAU, C,
+ *
+ IF( MYCOL.EQ.ICCOL2 ) THEN
+ *
+- TAULOC = TAU( JJV )
++ TAULOC( 1 ) = TAU( JJV )
+ *
+- IF( TAULOC.NE.ZERO ) THEN
++ IF( TAULOC( 1 ).NE.ZERO ) THEN
+ *
+ * w := sub( C )' * v
+ *
+@@ -445,11 +445,11 @@ SUBROUTINE PZLARZ( SIDE, M, N, L, V, IV, JV, DESCV, INCV, TAU, C,
+ * sub( C ) := sub( C ) - v * w'
+ *
+ IF( MYROW.EQ.ICROW1 )
+- $ CALL ZAXPY( NQC2, -TAULOC, WORK,
++ $ CALL ZAXPY( NQC2, -TAULOC( 1 ), WORK,
+ $ MAX( 1, NQC2 ), C( IOFFC1 ),
+ $ LDC )
+- CALL ZGERC( MPV, NQC2, -TAULOC, V( IOFFV ), 1,
+- $ WORK, 1, C( IOFFC2 ), LDC )
++ CALL ZGERC( MPV, NQC2, -TAULOC( 1 ), V( IOFFV ),
++ $ 1, WORK, 1, C( IOFFC2 ), LDC )
+ END IF
+ *
+ END IF
+@@ -471,9 +471,9 @@ SUBROUTINE PZLARZ( SIDE, M, N, L, V, IV, JV, DESCV, INCV, TAU, C,
+ IPW = MPV+1
+ CALL ZGERV2D( ICTXT, IPW, 1, WORK, IPW, MYROW,
+ $ IVCOL )
+- TAULOC = WORK( IPW )
++ TAULOC( 1 ) = WORK( IPW )
+ *
+- IF( TAULOC.NE.ZERO ) THEN
++ IF( TAULOC( 1 ).NE.ZERO ) THEN
+ *
+ * w := sub( C )' * v
+ *
+@@ -496,10 +496,10 @@ SUBROUTINE PZLARZ( SIDE, M, N, L, V, IV, JV, DESCV, INCV, TAU, C,
+ * sub( C ) := sub( C ) - v * w'
+ *
+ IF( MYROW.EQ.ICROW1 )
+- $ CALL ZAXPY( NQC2, -TAULOC, WORK( IPW ),
++ $ CALL ZAXPY( NQC2, -TAULOC( 1 ), WORK( IPW ),
+ $ MAX( 1, NQC2 ), C( IOFFC1 ),
+ $ LDC )
+- CALL ZGERC( MPV, NQC2, -TAULOC, WORK, 1,
++ CALL ZGERC( MPV, NQC2, -TAULOC( 1 ), WORK, 1,
+ $ WORK( IPW ), 1, C( IOFFC2 ), LDC )
+ END IF
+ *
+@@ -530,7 +530,7 @@ SUBROUTINE PZLARZ( SIDE, M, N, L, V, IV, JV, DESCV, INCV, TAU, C,
+ *
+ CALL ZGEBS2D( ICTXT, 'Columnwise', ' ', 1, 1,
+ $ TAU( IIV ), 1 )
+- TAULOC = TAU( IIV )
++ TAULOC( 1 ) = TAU( IIV )
+ *
+ ELSE
+ *
+@@ -539,7 +539,7 @@ SUBROUTINE PZLARZ( SIDE, M, N, L, V, IV, JV, DESCV, INCV, TAU, C,
+ *
+ END IF
+ *
+- IF( TAULOC.NE.ZERO ) THEN
++ IF( TAULOC( 1 ).NE.ZERO ) THEN
+ *
+ * w := sub( C )' * v
+ *
+@@ -562,10 +562,10 @@ SUBROUTINE PZLARZ( SIDE, M, N, L, V, IV, JV, DESCV, INCV, TAU, C,
+ * sub( C ) := sub( C ) - v * w'
+ *
+ IF( MYROW.EQ.ICROW1 )
+- $ CALL ZAXPY( NQC2, -TAULOC, WORK( IPW ),
++ $ CALL ZAXPY( NQC2, -TAULOC( 1 ), WORK( IPW ),
+ $ MAX( 1, NQC2 ), C( IOFFC1 ), LDC )
+- CALL ZGERC( MPV, NQC2, -TAULOC, WORK, 1, WORK( IPW ),
+- $ 1, C( IOFFC2 ), LDC )
++ CALL ZGERC( MPV, NQC2, -TAULOC( 1 ), WORK, 1,
++ $ WORK( IPW ), 1, C( IOFFC2 ), LDC )
+ END IF
+ *
+ ELSE
+@@ -580,18 +580,18 @@ SUBROUTINE PZLARZ( SIDE, M, N, L, V, IV, JV, DESCV, INCV, TAU, C,
+ WORK( IPW ) = TAU( JJV )
+ CALL ZGEBS2D( ICTXT, 'Rowwise', ROWBTOP, IPW, 1,
+ $ WORK, IPW )
+- TAULOC = TAU( JJV )
++ TAULOC( 1 ) = TAU( JJV )
+ *
+ ELSE
+ *
+ IPW = MPV+1
+ CALL ZGEBR2D( ICTXT, 'Rowwise', ROWBTOP, IPW, 1, WORK,
+ $ IPW, MYROW, IVCOL )
+- TAULOC = WORK( IPW )
++ TAULOC( 1 ) = WORK( IPW )
+ *
+ END IF
+ *
+- IF( TAULOC.NE.ZERO ) THEN
++ IF( TAULOC( 1 ).NE.ZERO ) THEN
+ *
+ * w := sub( C )' * v
+ *
+@@ -614,10 +614,10 @@ SUBROUTINE PZLARZ( SIDE, M, N, L, V, IV, JV, DESCV, INCV, TAU, C,
+ * sub( C ) := sub( C ) - v * w'
+ *
+ IF( MYROW.EQ.ICROW1 )
+- $ CALL ZAXPY( NQC2, -TAULOC, WORK( IPW ),
++ $ CALL ZAXPY( NQC2, -TAULOC( 1 ), WORK( IPW ),
+ $ MAX( 1, NQC2 ), C( IOFFC1 ), LDC )
+- CALL ZGERC( MPV, NQC2, -TAULOC, WORK, 1, WORK( IPW ),
+- $ 1, C( IOFFC2 ), LDC )
++ CALL ZGERC( MPV, NQC2, -TAULOC( 1 ), WORK, 1,
++ $ WORK( IPW ), 1, C( IOFFC2 ), LDC )
+ END IF
+ *
+ END IF
+@@ -646,9 +646,9 @@ SUBROUTINE PZLARZ( SIDE, M, N, L, V, IV, JV, DESCV, INCV, TAU, C,
+ *
+ IF( MYROW.EQ.ICROW2 ) THEN
+ *
+- TAULOC = TAU( IIV )
++ TAULOC( 1 ) = TAU( IIV )
+ *
+- IF( TAULOC.NE.ZERO ) THEN
++ IF( TAULOC( 1 ).NE.ZERO ) THEN
+ *
+ * w := sub( C ) * v
+ *
+@@ -669,13 +669,13 @@ SUBROUTINE PZLARZ( SIDE, M, N, L, V, IV, JV, DESCV, INCV, TAU, C,
+ $ ICCOL2 )
+ *
+ IF( MYCOL.EQ.ICCOL1 )
+- $ CALL ZAXPY( MPC2, -TAULOC, WORK, 1,
++ $ CALL ZAXPY( MPC2, -TAULOC( 1 ), WORK, 1,
+ $ C( IOFFC1 ), 1 )
+ *
+ * sub( C ) := sub( C ) - w * v'
+ *
+ IF( MPC2.GT.0 .AND. NQV.GT.0 )
+- $ CALL ZGERC( MPC2, NQV, -TAULOC, WORK, 1,
++ $ CALL ZGERC( MPC2, NQV, -TAULOC( 1 ), WORK, 1,
+ $ V( IOFFV ), LDV, C( IOFFC2 ),
+ $ LDC )
+ END IF
+@@ -699,9 +699,9 @@ SUBROUTINE PZLARZ( SIDE, M, N, L, V, IV, JV, DESCV, INCV, TAU, C,
+ IPW = NQV+1
+ CALL ZGERV2D( ICTXT, IPW, 1, WORK, IPW, IVROW,
+ $ MYCOL )
+- TAULOC = WORK( IPW )
++ TAULOC( 1 ) = WORK( IPW )
+ *
+- IF( TAULOC.NE.ZERO ) THEN
++ IF( TAULOC( 1 ).NE.ZERO ) THEN
+ *
+ * w := sub( C ) * v
+ *
+@@ -720,13 +720,14 @@ SUBROUTINE PZLARZ( SIDE, M, N, L, V, IV, JV, DESCV, INCV, TAU, C,
+ $ WORK( IPW ), MAX( 1, MPC2 ),
+ $ RDEST, ICCOL2 )
+ IF( MYCOL.EQ.ICCOL1 )
+- $ CALL ZAXPY( MPC2, -TAULOC, WORK( IPW ), 1,
+- $ C( IOFFC1 ), 1 )
++ $ CALL ZAXPY( MPC2, -TAULOC( 1 ), WORK( IPW ),
++ $ 1, C( IOFFC1 ), 1 )
+ *
+ * sub( C ) := sub( C ) - w * v'
+ *
+- CALL ZGERC( MPC2, NQV, -TAULOC, WORK( IPW ), 1,
+- $ WORK, 1, C( IOFFC2 ), LDC )
++ CALL ZGERC( MPC2, NQV, -TAULOC( 1 ),
++ $ WORK( IPW ), 1, WORK, 1,
++ $ C( IOFFC2 ), LDC )
+ END IF
+ *
+ END IF
+@@ -751,7 +752,7 @@ SUBROUTINE PZLARZ( SIDE, M, N, L, V, IV, JV, DESCV, INCV, TAU, C,
+ *
+ CALL ZGEBS2D( ICTXT, 'Rowwise', ' ', 1, 1,
+ $ TAU( JJV ), 1 )
+- TAULOC = TAU( JJV )
++ TAULOC( 1 ) = TAU( JJV )
+ *
+ ELSE
+ *
+@@ -760,7 +761,7 @@ SUBROUTINE PZLARZ( SIDE, M, N, L, V, IV, JV, DESCV, INCV, TAU, C,
+ *
+ END IF
+ *
+- IF( TAULOC.NE.ZERO ) THEN
++ IF( TAULOC( 1 ).NE.ZERO ) THEN
+ *
+ * w := sub( C ) * v
+ *
+@@ -779,13 +780,13 @@ SUBROUTINE PZLARZ( SIDE, M, N, L, V, IV, JV, DESCV, INCV, TAU, C,
+ $ WORK( IPW ), MAX( 1, MPC2 ), RDEST,
+ $ ICCOL2 )
+ IF( MYCOL.EQ.ICCOL1 )
+- $ CALL ZAXPY( MPC2, -TAULOC, WORK( IPW ), 1,
++ $ CALL ZAXPY( MPC2, -TAULOC( 1 ), WORK( IPW ), 1,
+ $ C( IOFFC1 ), 1 )
+ *
+ * sub( C ) := sub( C ) - w * v'
+ *
+- CALL ZGERC( MPC2, NQV, -TAULOC, WORK( IPW ), 1,
+- $ WORK, 1, C( IOFFC2 ), LDC )
++ CALL ZGERC( MPC2, NQV, -TAULOC( 1 ), WORK( IPW ),
++ $ 1, WORK, 1, C( IOFFC2 ), LDC )
+ END IF
+ *
+ END IF
+@@ -809,18 +810,18 @@ SUBROUTINE PZLARZ( SIDE, M, N, L, V, IV, JV, DESCV, INCV, TAU, C,
+ WORK( IPW ) = TAU( IIV )
+ CALL ZGEBS2D( ICTXT, 'Columnwise', COLBTOP, IPW, 1,
+ $ WORK, IPW )
+- TAULOC = TAU( IIV )
++ TAULOC( 1 ) = TAU( IIV )
+ *
+ ELSE
+ *
+ IPW = NQV+1
+ CALL ZGEBR2D( ICTXT, 'Columnwise', COLBTOP, IPW, 1,
+ $ WORK, IPW, IVROW, MYCOL )
+- TAULOC = WORK( IPW )
++ TAULOC( 1 ) = WORK( IPW )
+ *
+ END IF
+ *
+- IF( TAULOC.NE.ZERO ) THEN
++ IF( TAULOC( 1 ).NE.ZERO ) THEN
+ *
+ * w := sub( C ) * v
+ *
+@@ -840,13 +841,13 @@ SUBROUTINE PZLARZ( SIDE, M, N, L, V, IV, JV, DESCV, INCV, TAU, C,
+ $ WORK( IPW ), MAX( 1, MPC2 ), RDEST,
+ $ ICCOL2 )
+ IF( MYCOL.EQ.ICCOL1 )
+- $ CALL ZAXPY( MPC2, -TAULOC, WORK( IPW ), 1,
++ $ CALL ZAXPY( MPC2, -TAULOC( 1 ), WORK( IPW ), 1,
+ $ C( IOFFC1 ), 1 )
+ *
+ * sub( C ) := sub( C ) - w * v'
+ *
+- CALL ZGERC( MPC2, NQV, -TAULOC, WORK( IPW ), 1, WORK,
+- $ 1, C( IOFFC2 ), LDC )
++ CALL ZGERC( MPC2, NQV, -TAULOC( 1 ), WORK( IPW ), 1,
++ $ WORK, 1, C( IOFFC2 ), LDC )
+ END IF
+ *
+ ELSE
+@@ -865,7 +866,7 @@ SUBROUTINE PZLARZ( SIDE, M, N, L, V, IV, JV, DESCV, INCV, TAU, C,
+ *
+ CALL ZGEBS2D( ICTXT, 'Rowwise', ' ', 1, 1, TAU( JJV ),
+ $ 1 )
+- TAULOC = TAU( JJV )
++ TAULOC( 1 ) = TAU( JJV )
+ *
+ ELSE
+ *
+@@ -874,7 +875,7 @@ SUBROUTINE PZLARZ( SIDE, M, N, L, V, IV, JV, DESCV, INCV, TAU, C,
+ *
+ END IF
+ *
+- IF( TAULOC.NE.ZERO ) THEN
++ IF( TAULOC( 1 ).NE.ZERO ) THEN
+ *
+ * w := sub( C ) * v
+ *
+@@ -893,13 +894,13 @@ SUBROUTINE PZLARZ( SIDE, M, N, L, V, IV, JV, DESCV, INCV, TAU, C,
+ $ WORK( IPW ), MAX( 1, MPC2 ), RDEST,
+ $ ICCOL2 )
+ IF( MYCOL.EQ.ICCOL1 )
+- $ CALL ZAXPY( MPC2, -TAULOC, WORK( IPW ), 1,
++ $ CALL ZAXPY( MPC2, -TAULOC( 1 ), WORK( IPW ), 1,
+ $ C( IOFFC1 ), 1 )
+ *
+ * sub( C ) := sub( C ) - w * v'
+ *
+- CALL ZGERC( MPC2, NQV, -TAULOC, WORK( IPW ), 1, WORK,
+- $ 1, C( IOFFC2 ), LDC )
++ CALL ZGERC( MPC2, NQV, -TAULOC( 1 ), WORK( IPW ), 1,
++ $ WORK, 1, C( IOFFC2 ), LDC )
+ END IF
+ *
+ END IF
+diff --git a/SRC/pzlarzc.f b/SRC/pzlarzc.f
+index 936caec..2c574ff 100644
+--- a/SRC/pzlarzc.f
++++ b/SRC/pzlarzc.f
+@@ -251,7 +251,7 @@ SUBROUTINE PZLARZC( SIDE, M, N, L, V, IV, JV, DESCV, INCV, TAU, C,
+ $ IVCOL, IVROW, JJC1, JJC2, JJV, LDC, LDV, MPC2,
+ $ MPV, MYCOL, MYROW, NCC, NCV, NPCOL, NPROW,
+ $ NQC2, NQV, RDEST
+- COMPLEX*16 TAULOC
++ COMPLEX*16 TAULOC( 1 )
+ * ..
+ * .. External Subroutines ..
+ EXTERNAL BLACS_GRIDINFO, INFOG2L, PB_TOPGET, PBZTRNV,
+@@ -370,17 +370,17 @@ SUBROUTINE PZLARZC( SIDE, M, N, L, V, IV, JV, DESCV, INCV, TAU, C,
+ *
+ CALL ZGEBS2D( ICTXT, 'Columnwise', ' ', 1, 1,
+ $ TAU( IIV ), 1 )
+- TAULOC = DCONJG( TAU( IIV ) )
++ TAULOC( 1 ) = DCONJG( TAU( IIV ) )
+ *
+ ELSE
+ *
+ CALL ZGEBR2D( ICTXT, 'Columnwise', ' ', 1, 1,
+ $ TAULOC, 1, IVROW, MYCOL )
+- TAULOC = DCONJG( TAULOC )
++ TAULOC( 1 ) = DCONJG( TAULOC( 1 ) )
+ *
+ END IF
+ *
+- IF( TAULOC.NE.ZERO ) THEN
++ IF( TAULOC( 1 ).NE.ZERO ) THEN
+ *
+ * w := sub( C )' * v
+ *
+@@ -403,9 +403,9 @@ SUBROUTINE PZLARZC( SIDE, M, N, L, V, IV, JV, DESCV, INCV, TAU, C,
+ * sub( C ) := sub( C ) - v * w'
+ *
+ IF( MYROW.EQ.ICROW1 )
+- $ CALL ZAXPY( NQC2, -TAULOC, WORK( IPW ),
++ $ CALL ZAXPY( NQC2, -TAULOC( 1 ), WORK( IPW ),
+ $ MAX( 1, NQC2 ), C( IOFFC1 ), LDC )
+- CALL ZGERC( MPV, NQC2, -TAULOC, WORK, 1,
++ CALL ZGERC( MPV, NQC2, -TAULOC( 1 ), WORK, 1,
+ $ WORK( IPW ), 1, C( IOFFC2 ), LDC )
+ END IF
+ *
+@@ -421,9 +421,9 @@ SUBROUTINE PZLARZC( SIDE, M, N, L, V, IV, JV, DESCV, INCV, TAU, C,
+ *
+ IF( MYCOL.EQ.ICCOL2 ) THEN
+ *
+- TAULOC = DCONJG( TAU( JJV ) )
++ TAULOC( 1 ) = DCONJG( TAU( JJV ) )
+ *
+- IF( TAULOC.NE.ZERO ) THEN
++ IF( TAULOC( 1 ).NE.ZERO ) THEN
+ *
+ * w := sub( C )' * v
+ *
+@@ -446,11 +446,11 @@ SUBROUTINE PZLARZC( SIDE, M, N, L, V, IV, JV, DESCV, INCV, TAU, C,
+ * sub( C ) := sub( C ) - v * w'
+ *
+ IF( MYROW.EQ.ICROW1 )
+- $ CALL ZAXPY( NQC2, -TAULOC, WORK,
++ $ CALL ZAXPY( NQC2, -TAULOC( 1 ), WORK,
+ $ MAX( 1, NQC2 ), C( IOFFC1 ),
+ $ LDC )
+- CALL ZGERC( MPV, NQC2, -TAULOC, V( IOFFV ), 1,
+- $ WORK, 1, C( IOFFC2 ), LDC )
++ CALL ZGERC( MPV, NQC2, -TAULOC( 1 ), V( IOFFV ),
++ $ 1, WORK, 1, C( IOFFC2 ), LDC )
+ END IF
+ *
+ END IF
+@@ -472,9 +472,9 @@ SUBROUTINE PZLARZC( SIDE, M, N, L, V, IV, JV, DESCV, INCV, TAU, C,
+ IPW = MPV+1
+ CALL ZGERV2D( ICTXT, IPW, 1, WORK, IPW, MYROW,
+ $ IVCOL )
+- TAULOC = DCONJG( WORK( IPW ) )
++ TAULOC( 1 ) = DCONJG( WORK( IPW ) )
+ *
+- IF( TAULOC.NE.ZERO ) THEN
++ IF( TAULOC( 1 ).NE.ZERO ) THEN
+ *
+ * w := sub( C )' * v
+ *
+@@ -497,10 +497,10 @@ SUBROUTINE PZLARZC( SIDE, M, N, L, V, IV, JV, DESCV, INCV, TAU, C,
+ * sub( C ) := sub( C ) - v * w'
+ *
+ IF( MYROW.EQ.ICROW1 )
+- $ CALL ZAXPY( NQC2, -TAULOC, WORK( IPW ),
++ $ CALL ZAXPY( NQC2, -TAULOC( 1 ), WORK( IPW ),
+ $ MAX( 1, NQC2 ), C( IOFFC1 ),
+ $ LDC )
+- CALL ZGERC( MPV, NQC2, -TAULOC, WORK, 1,
++ CALL ZGERC( MPV, NQC2, -TAULOC( 1 ), WORK, 1,
+ $ WORK( IPW ), 1, C( IOFFC2 ), LDC )
+ END IF
+ *
+@@ -531,17 +531,17 @@ SUBROUTINE PZLARZC( SIDE, M, N, L, V, IV, JV, DESCV, INCV, TAU, C,
+ *
+ CALL ZGEBS2D( ICTXT, 'Columnwise', ' ', 1, 1,
+ $ TAU( IIV ), 1 )
+- TAULOC = DCONJG( TAU( IIV ) )
++ TAULOC( 1 ) = DCONJG( TAU( IIV ) )
+ *
+ ELSE
+ *
+ CALL ZGEBR2D( ICTXT, 'Columnwise', ' ', 1, 1, TAULOC,
+ $ 1, IVROW, MYCOL )
+- TAULOC = DCONJG( TAULOC )
++ TAULOC( 1 ) = DCONJG( TAULOC( 1 ) )
+ *
+ END IF
+ *
+- IF( TAULOC.NE.ZERO ) THEN
++ IF( TAULOC( 1 ).NE.ZERO ) THEN
+ *
+ * w := sub( C )' * v
+ *
+@@ -564,10 +564,10 @@ SUBROUTINE PZLARZC( SIDE, M, N, L, V, IV, JV, DESCV, INCV, TAU, C,
+ * sub( C ) := sub( C ) - v * w'
+ *
+ IF( MYROW.EQ.ICROW1 )
+- $ CALL ZAXPY( NQC2, -TAULOC, WORK( IPW ),
++ $ CALL ZAXPY( NQC2, -TAULOC( 1 ), WORK( IPW ),
+ $ MAX( 1, NQC2 ), C( IOFFC1 ), LDC )
+- CALL ZGERC( MPV, NQC2, -TAULOC, WORK, 1, WORK( IPW ),
+- $ 1, C( IOFFC2 ), LDC )
++ CALL ZGERC( MPV, NQC2, -TAULOC( 1 ), WORK, 1,
++ $ WORK( IPW ), 1, C( IOFFC2 ), LDC )
+ END IF
+ *
+ ELSE
+@@ -582,18 +582,18 @@ SUBROUTINE PZLARZC( SIDE, M, N, L, V, IV, JV, DESCV, INCV, TAU, C,
+ WORK( IPW ) = TAU( JJV )
+ CALL ZGEBS2D( ICTXT, 'Rowwise', ROWBTOP, IPW, 1,
+ $ WORK, IPW )
+- TAULOC = DCONJG( TAU( JJV ) )
++ TAULOC( 1 ) = DCONJG( TAU( JJV ) )
+ *
+ ELSE
+ *
+ IPW = MPV+1
+ CALL ZGEBR2D( ICTXT, 'Rowwise', ROWBTOP, IPW, 1, WORK,
+ $ IPW, MYROW, IVCOL )
+- TAULOC = DCONJG( WORK( IPW ) )
++ TAULOC( 1 ) = DCONJG( WORK( IPW ) )
+ *
+ END IF
+ *
+- IF( TAULOC.NE.ZERO ) THEN
++ IF( TAULOC( 1 ).NE.ZERO ) THEN
+ *
+ * w := sub( C )' * v
+ *
+@@ -616,10 +616,10 @@ SUBROUTINE PZLARZC( SIDE, M, N, L, V, IV, JV, DESCV, INCV, TAU, C,
+ * sub( C ) := sub( C ) - v * w'
+ *
+ IF( MYROW.EQ.ICROW1 )
+- $ CALL ZAXPY( NQC2, -TAULOC, WORK( IPW ),
++ $ CALL ZAXPY( NQC2, -TAULOC( 1 ), WORK( IPW ),
+ $ MAX( 1, NQC2 ), C( IOFFC1 ), LDC )
+- CALL ZGERC( MPV, NQC2, -TAULOC, WORK, 1, WORK( IPW ),
+- $ 1, C( IOFFC2 ), LDC )
++ CALL ZGERC( MPV, NQC2, -TAULOC( 1 ), WORK, 1,
++ $ WORK( IPW ), 1, C( IOFFC2 ), LDC )
+ END IF
+ *
+ END IF
+@@ -648,9 +648,9 @@ SUBROUTINE PZLARZC( SIDE, M, N, L, V, IV, JV, DESCV, INCV, TAU, C,
+ *
+ IF( MYROW.EQ.ICROW2 ) THEN
+ *
+- TAULOC = DCONJG( TAU( IIV ) )
++ TAULOC( 1 ) = DCONJG( TAU( IIV ) )
+ *
+- IF( TAULOC.NE.ZERO ) THEN
++ IF( TAULOC( 1 ).NE.ZERO ) THEN
+ *
+ * w := sub( C ) * v
+ *
+@@ -671,12 +671,12 @@ SUBROUTINE PZLARZC( SIDE, M, N, L, V, IV, JV, DESCV, INCV, TAU, C,
+ $ ICCOL2 )
+ *
+ IF( MYCOL.EQ.ICCOL1 )
+- $ CALL ZAXPY( MPC2, -TAULOC, WORK, 1,
++ $ CALL ZAXPY( MPC2, -TAULOC( 1 ), WORK, 1,
+ $ C( IOFFC1 ), 1 )
+ *
+ * sub( C ) := sub( C ) - w * v'
+ *
+- CALL ZGERC( MPC2, NQV, -TAULOC, WORK, 1,
++ CALL ZGERC( MPC2, NQV, -TAULOC( 1 ), WORK, 1,
+ $ V( IOFFV ), LDV, C( IOFFC2 ), LDC )
+ END IF
+ *
+@@ -699,9 +699,9 @@ SUBROUTINE PZLARZC( SIDE, M, N, L, V, IV, JV, DESCV, INCV, TAU, C,
+ IPW = NQV+1
+ CALL ZGERV2D( ICTXT, IPW, 1, WORK, IPW, IVROW,
+ $ MYCOL )
+- TAULOC = DCONJG( WORK( IPW ) )
++ TAULOC( 1 ) = DCONJG( WORK( IPW ) )
+ *
+- IF( TAULOC.NE.ZERO ) THEN
++ IF( TAULOC( 1 ).NE.ZERO ) THEN
+ *
+ * w := sub( C ) * v
+ *
+@@ -720,13 +720,14 @@ SUBROUTINE PZLARZC( SIDE, M, N, L, V, IV, JV, DESCV, INCV, TAU, C,
+ $ WORK( IPW ), MAX( 1, MPC2 ),
+ $ RDEST, ICCOL2 )
+ IF( MYCOL.EQ.ICCOL1 )
+- $ CALL ZAXPY( MPC2, -TAULOC, WORK( IPW ), 1,
+- $ C( IOFFC1 ), 1 )
++ $ CALL ZAXPY( MPC2, -TAULOC( 1 ), WORK( IPW ),
++ $ 1, C( IOFFC1 ), 1 )
+ *
+ * sub( C ) := sub( C ) - w * v'
+ *
+- CALL ZGERC( MPC2, NQV, -TAULOC, WORK( IPW ), 1,
+- $ WORK, 1, C( IOFFC2 ), LDC )
++ CALL ZGERC( MPC2, NQV, -TAULOC( 1 ),
++ $ WORK( IPW ), 1, WORK, 1,
++ $ C( IOFFC2 ), LDC )
+ END IF
+ *
+ END IF
+@@ -751,17 +752,17 @@ SUBROUTINE PZLARZC( SIDE, M, N, L, V, IV, JV, DESCV, INCV, TAU, C,
+ *
+ CALL ZGEBS2D( ICTXT, 'Rowwise', ' ', 1, 1,
+ $ TAU( JJV ), 1 )
+- TAULOC = DCONJG( TAU( JJV ) )
++ TAULOC( 1 ) = DCONJG( TAU( JJV ) )
+ *
+ ELSE
+ *
+ CALL ZGEBR2D( ICTXT, 'Rowwise', ' ', 1, 1, TAULOC,
+ $ 1, MYROW, IVCOL )
+- TAULOC = DCONJG( TAULOC )
++ TAULOC( 1 ) = DCONJG( TAULOC( 1 ) )
+ *
+ END IF
+ *
+- IF( TAULOC.NE.ZERO ) THEN
++ IF( TAULOC( 1 ).NE.ZERO ) THEN
+ *
+ * w := sub( C ) * v
+ *
+@@ -780,13 +781,13 @@ SUBROUTINE PZLARZC( SIDE, M, N, L, V, IV, JV, DESCV, INCV, TAU, C,
+ $ WORK( IPW ), MAX( 1, MPC2 ), RDEST,
+ $ ICCOL2 )
+ IF( MYCOL.EQ.ICCOL1 )
+- $ CALL ZAXPY( MPC2, -TAULOC, WORK( IPW ), 1,
++ $ CALL ZAXPY( MPC2, -TAULOC( 1 ), WORK( IPW ), 1,
+ $ C( IOFFC1 ), 1 )
+ *
+ * sub( C ) := sub( C ) - w * v'
+ *
+- CALL ZGERC( MPC2, NQV, -TAULOC, WORK( IPW ), 1,
+- $ WORK, 1, C( IOFFC2 ), LDC )
++ CALL ZGERC( MPC2, NQV, -TAULOC( 1 ), WORK( IPW ),
++ $ 1, WORK, 1, C( IOFFC2 ), LDC )
+ END IF
+ *
+ END IF
+@@ -810,18 +811,18 @@ SUBROUTINE PZLARZC( SIDE, M, N, L, V, IV, JV, DESCV, INCV, TAU, C,
+ WORK( IPW ) = TAU( IIV )
+ CALL ZGEBS2D( ICTXT, 'Columnwise', COLBTOP, IPW, 1,
+ $ WORK, IPW )
+- TAULOC = DCONJG( TAU( IIV ) )
++ TAULOC( 1 ) = DCONJG( TAU( IIV ) )
+ *
+ ELSE
+ *
+ IPW = NQV+1
+ CALL ZGEBR2D( ICTXT, 'Columnwise', COLBTOP, IPW, 1,
+ $ WORK, IPW, IVROW, MYCOL )
+- TAULOC = DCONJG( WORK( IPW ) )
++ TAULOC( 1 ) = DCONJG( WORK( IPW ) )
+ *
+ END IF
+ *
+- IF( TAULOC.NE.ZERO ) THEN
++ IF( TAULOC( 1 ).NE.ZERO ) THEN
+ *
+ * w := sub( C ) * v
+ *
+@@ -841,13 +842,13 @@ SUBROUTINE PZLARZC( SIDE, M, N, L, V, IV, JV, DESCV, INCV, TAU, C,
+ $ WORK( IPW ), MAX( 1, MPC2 ), RDEST,
+ $ ICCOL2 )
+ IF( MYCOL.EQ.ICCOL1 )
+- $ CALL ZAXPY( MPC2, -TAULOC, WORK( IPW ), 1,
++ $ CALL ZAXPY( MPC2, -TAULOC( 1 ), WORK( IPW ), 1,
+ $ C( IOFFC1 ), 1 )
+ *
+ * sub( C ) := sub( C ) - w * v'
+ *
+- CALL ZGERC( MPC2, NQV, -TAULOC, WORK( IPW ), 1, WORK,
+- $ 1, C( IOFFC2 ), LDC )
++ CALL ZGERC( MPC2, NQV, -TAULOC( 1 ), WORK( IPW ), 1,
++ $ WORK, 1, C( IOFFC2 ), LDC )
+ END IF
+ *
+ ELSE
+@@ -866,17 +867,17 @@ SUBROUTINE PZLARZC( SIDE, M, N, L, V, IV, JV, DESCV, INCV, TAU, C,
+ *
+ CALL ZGEBS2D( ICTXT, 'Rowwise', ' ', 1, 1, TAU( JJV ),
+ $ 1 )
+- TAULOC = DCONJG( TAU( JJV ) )
++ TAULOC( 1 ) = DCONJG( TAU( JJV ) )
+ *
+ ELSE
+ *
+ CALL ZGEBR2D( ICTXT, 'Rowwise', ' ', 1, 1, TAULOC, 1,
+ $ MYROW, IVCOL )
+- TAULOC = DCONJG( TAULOC )
++ TAULOC( 1 ) = DCONJG( TAULOC( 1 ) )
+ *
+ END IF
+ *
+- IF( TAULOC.NE.ZERO ) THEN
++ IF( TAULOC( 1 ).NE.ZERO ) THEN
+ *
+ * w := sub( C ) * v
+ *
+@@ -895,13 +896,13 @@ SUBROUTINE PZLARZC( SIDE, M, N, L, V, IV, JV, DESCV, INCV, TAU, C,
+ $ WORK( IPW ), MAX( 1, MPC2 ), RDEST,
+ $ ICCOL2 )
+ IF( MYCOL.EQ.ICCOL1 )
+- $ CALL ZAXPY( MPC2, -TAULOC, WORK( IPW ), 1,
++ $ CALL ZAXPY( MPC2, -TAULOC( 1 ), WORK( IPW ), 1,
+ $ C( IOFFC1 ), 1 )
+ *
+ * sub( C ) := sub( C ) - w * v'
+ *
+- CALL ZGERC( MPC2, NQV, -TAULOC, WORK( IPW ), 1, WORK,
+- $ 1, C( IOFFC2 ), LDC )
++ CALL ZGERC( MPC2, NQV, -TAULOC( 1 ), WORK( IPW ), 1,
++ $ WORK, 1, C( IOFFC2 ), LDC )
+ END IF
+ *
+ END IF
+diff --git a/SRC/pzlattrs.f b/SRC/pzlattrs.f
+index 819e476..5a54209 100644
+--- a/SRC/pzlattrs.f
++++ b/SRC/pzlattrs.f
+@@ -271,8 +271,9 @@ SUBROUTINE PZLATTRS( UPLO, TRANS, DIAG, NORMIN, N, A, IA, JA,
+ $ JINC, JLAST, LDA, LDX, MB, MYCOL, MYROW, NB,
+ $ NPCOL, NPROW, RSRC
+ DOUBLE PRECISION BIGNUM, GROW, REC, SMLNUM, TJJ, TMAX, TSCAL,
+- $ XBND, XJ, XMAX
++ $ XBND, XJ
+ COMPLEX*16 CSUMJ, TJJS, USCAL, XJTMP, ZDUM
++ DOUBLE PRECISION XMAX( 1 )
+ * ..
+ * .. External Functions ..
+ LOGICAL LSAME
+@@ -391,11 +392,11 @@ SUBROUTINE PZLATTRS( UPLO, TRANS, DIAG, NORMIN, N, A, IA, JA,
+ * Compute a bound on the computed solution vector to see if the
+ * Level 2 PBLAS routine PZTRSV can be used.
+ *
+- XMAX = ZERO
++ XMAX( 1 ) = ZERO
+ CALL PZAMAX( N, ZDUM, IMAX, X, IX, JX, DESCX, 1 )
+- XMAX = CABS2( ZDUM )
++ XMAX( 1 ) = CABS2( ZDUM )
+ CALL DGSUM2D( CONTXT, 'Row', ' ', 1, 1, XMAX, 1, -1, -1 )
+- XBND = XMAX
++ XBND = XMAX( 1 )
+ *
+ IF( NOTRAN ) THEN
+ *
+@@ -590,16 +591,16 @@ SUBROUTINE PZLATTRS( UPLO, TRANS, DIAG, NORMIN, N, A, IA, JA,
+ *
+ * Use a Level 1 PBLAS solve, scaling intermediate results.
+ *
+- IF( XMAX.GT.BIGNUM*HALF ) THEN
++ IF( XMAX( 1 ).GT.BIGNUM*HALF ) THEN
+ *
+ * Scale X so that its components are less than or equal to
+ * BIGNUM in absolute value.
+ *
+- SCALE = ( BIGNUM*HALF ) / XMAX
++ SCALE = ( BIGNUM*HALF ) / XMAX( 1 )
+ CALL PZDSCAL( N, SCALE, X, IX, JX, DESCX, 1 )
+- XMAX = BIGNUM
++ XMAX( 1 ) = BIGNUM
+ ELSE
+- XMAX = XMAX*TWO
++ XMAX( 1 ) = XMAX( 1 )*TWO
+ END IF
+ *
+ IF( NOTRAN ) THEN
+@@ -651,7 +652,7 @@ SUBROUTINE PZLATTRS( UPLO, TRANS, DIAG, NORMIN, N, A, IA, JA,
+ CALL PZDSCAL( N, REC, X, IX, JX, DESCX, 1 )
+ XJTMP = XJTMP*REC
+ SCALE = SCALE*REC
+- XMAX = XMAX*REC
++ XMAX( 1 ) = XMAX( 1 )*REC
+ END IF
+ END IF
+ * X( J ) = ZLADIV( X( J ), TJJS )
+@@ -682,7 +683,7 @@ SUBROUTINE PZLATTRS( UPLO, TRANS, DIAG, NORMIN, N, A, IA, JA,
+ CALL PZDSCAL( N, REC, X, IX, JX, DESCX, 1 )
+ XJTMP = XJTMP*REC
+ SCALE = SCALE*REC
+- XMAX = XMAX*REC
++ XMAX( 1 ) = XMAX( 1 )*REC
+ END IF
+ * X( J ) = ZLADIV( X( J ), TJJS )
+ * XJ = CABS1( X( J ) )
+@@ -706,7 +707,7 @@ SUBROUTINE PZLATTRS( UPLO, TRANS, DIAG, NORMIN, N, A, IA, JA,
+ XJTMP = CONE
+ XJ = ONE
+ SCALE = ZERO
+- XMAX = ZERO
++ XMAX( 1 ) = ZERO
+ END IF
+ 90 CONTINUE
+ *
+@@ -715,7 +716,7 @@ SUBROUTINE PZLATTRS( UPLO, TRANS, DIAG, NORMIN, N, A, IA, JA,
+ *
+ IF( XJ.GT.ONE ) THEN
+ REC = ONE / XJ
+- IF( CNORM( J ).GT.( BIGNUM-XMAX )*REC ) THEN
++ IF( CNORM( J ).GT.( BIGNUM-XMAX( 1 ) )*REC ) THEN
+ *
+ * Scale x by 1/(2*abs(x(j))).
+ *
+@@ -724,7 +725,7 @@ SUBROUTINE PZLATTRS( UPLO, TRANS, DIAG, NORMIN, N, A, IA, JA,
+ XJTMP = XJTMP*REC
+ SCALE = SCALE*REC
+ END IF
+- ELSE IF( XJ*CNORM( J ).GT.( BIGNUM-XMAX ) ) THEN
++ ELSE IF( XJ*CNORM( J ).GT.( BIGNUM-XMAX( 1 ) ) ) THEN
+ *
+ * Scale x by 1/2.
+ *
+@@ -743,7 +744,7 @@ SUBROUTINE PZLATTRS( UPLO, TRANS, DIAG, NORMIN, N, A, IA, JA,
+ CALL PZAXPY( J-1, ZDUM, A, IA, JA+J-1, DESCA, 1, X,
+ $ IX, JX, DESCX, 1 )
+ CALL PZAMAX( J-1, ZDUM, IMAX, X, IX, JX, DESCX, 1 )
+- XMAX = CABS1( ZDUM )
++ XMAX( 1 ) = CABS1( ZDUM )
+ CALL DGSUM2D( CONTXT, 'Row', ' ', 1, 1, XMAX, 1,
+ $ -1, -1 )
+ END IF
+@@ -757,7 +758,7 @@ SUBROUTINE PZLATTRS( UPLO, TRANS, DIAG, NORMIN, N, A, IA, JA,
+ CALL PZAXPY( N-J, ZDUM, A, IA+J, JA+J-1, DESCA, 1,
+ $ X, IX+J, JX, DESCX, 1 )
+ CALL PZAMAX( N-J, ZDUM, I, X, IX+J, JX, DESCX, 1 )
+- XMAX = CABS1( ZDUM )
++ XMAX( 1 ) = CABS1( ZDUM )
+ CALL DGSUM2D( CONTXT, 'Row', ' ', 1, 1, XMAX, 1,
+ $ -1, -1 )
+ END IF
+@@ -785,7 +786,7 @@ SUBROUTINE PZLATTRS( UPLO, TRANS, DIAG, NORMIN, N, A, IA, JA,
+ END IF
+ XJ = CABS1( XJTMP )
+ USCAL = DCMPLX( TSCAL )
+- REC = ONE / MAX( XMAX, ONE )
++ REC = ONE / MAX( XMAX( 1 ), ONE )
+ IF( CNORM( J ).GT.( BIGNUM-XJ )*REC ) THEN
+ *
+ * If x(j) could overflow, scale x by 1/(2*XMAX).
+@@ -820,7 +821,7 @@ SUBROUTINE PZLATTRS( UPLO, TRANS, DIAG, NORMIN, N, A, IA, JA,
+ CALL PZDSCAL( N, REC, X, IX, JX, DESCX, 1 )
+ XJTMP = XJTMP*REC
+ SCALE = SCALE*REC
+- XMAX = XMAX*REC
++ XMAX( 1 ) = XMAX( 1 )*REC
+ END IF
+ END IF
+ *
+@@ -924,7 +925,7 @@ SUBROUTINE PZLATTRS( UPLO, TRANS, DIAG, NORMIN, N, A, IA, JA,
+ CALL PZDSCAL( N, REC, X, IX, JX, DESCX, 1 )
+ XJTMP = XJTMP*REC
+ SCALE = SCALE*REC
+- XMAX = XMAX*REC
++ XMAX( 1 ) = XMAX( 1 )*REC
+ END IF
+ END IF
+ * X( J ) = ZLADIV( X( J ), TJJS )
+@@ -945,7 +946,7 @@ SUBROUTINE PZLATTRS( UPLO, TRANS, DIAG, NORMIN, N, A, IA, JA,
+ CALL PZDSCAL( N, REC, X, IX, JX, DESCX, 1 )
+ XJTMP = XJTMP*REC
+ SCALE = SCALE*REC
+- XMAX = XMAX*REC
++ XMAX( 1 ) = XMAX( 1 )*REC
+ END IF
+ * X( J ) = ZLADIV( X( J ), TJJS )
+ XJTMP = ZLADIV( XJTMP, TJJS )
+@@ -966,7 +967,7 @@ SUBROUTINE PZLATTRS( UPLO, TRANS, DIAG, NORMIN, N, A, IA, JA,
+ END IF
+ XJTMP = CONE
+ SCALE = ZERO
+- XMAX = ZERO
++ XMAX( 1 ) = ZERO
+ END IF
+ 110 CONTINUE
+ ELSE
+@@ -981,7 +982,7 @@ SUBROUTINE PZLATTRS( UPLO, TRANS, DIAG, NORMIN, N, A, IA, JA,
+ X( IROWX ) = XJTMP
+ END IF
+ END IF
+- XMAX = MAX( XMAX, CABS1( XJTMP ) )
++ XMAX( 1 ) = MAX( XMAX( 1 ), CABS1( XJTMP ) )
+ 120 CONTINUE
+ *
+ ELSE
+@@ -1004,7 +1005,7 @@ SUBROUTINE PZLATTRS( UPLO, TRANS, DIAG, NORMIN, N, A, IA, JA,
+ END IF
+ XJ = CABS1( XJTMP )
+ USCAL = TSCAL
+- REC = ONE / MAX( XMAX, ONE )
++ REC = ONE / MAX( XMAX( 1 ), ONE )
+ IF( CNORM( J ).GT.( BIGNUM-XJ )*REC ) THEN
+ *
+ * If x(j) could overflow, scale x by 1/(2*XMAX).
+@@ -1039,7 +1040,7 @@ SUBROUTINE PZLATTRS( UPLO, TRANS, DIAG, NORMIN, N, A, IA, JA,
+ CALL PZDSCAL( N, REC, X, IX, JX, DESCX, 1 )
+ XJTMP = XJTMP*REC
+ SCALE = SCALE*REC
+- XMAX = XMAX*REC
++ XMAX( 1 ) = XMAX( 1 )*REC
+ END IF
+ END IF
+ *
+@@ -1145,7 +1146,7 @@ SUBROUTINE PZLATTRS( UPLO, TRANS, DIAG, NORMIN, N, A, IA, JA,
+ CALL PZDSCAL( N, REC, X, IX, JX, DESCX, 1 )
+ XJTMP = XJTMP*REC
+ SCALE = SCALE*REC
+- XMAX = XMAX*REC
++ XMAX( 1 ) = XMAX( 1 )*REC
+ END IF
+ END IF
+ * X( J ) = ZLADIV( X( J ), TJJS )
+@@ -1164,7 +1165,7 @@ SUBROUTINE PZLATTRS( UPLO, TRANS, DIAG, NORMIN, N, A, IA, JA,
+ CALL PZDSCAL( N, REC, X, IX, JX, DESCX, 1 )
+ XJTMP = XJTMP*REC
+ SCALE = SCALE*REC
+- XMAX = XMAX*REC
++ XMAX( 1 ) = XMAX( 1 )*REC
+ END IF
+ * X( J ) = ZLADIV( X( J ), TJJS )
+ XJTMP = ZLADIV( XJTMP, TJJS )
+@@ -1181,7 +1182,7 @@ SUBROUTINE PZLATTRS( UPLO, TRANS, DIAG, NORMIN, N, A, IA, JA,
+ $ X( IROWX ) = CONE
+ XJTMP = CONE
+ SCALE = ZERO
+- XMAX = ZERO
++ XMAX( 1 ) = ZERO
+ END IF
+ 130 CONTINUE
+ ELSE
+@@ -1194,7 +1195,7 @@ SUBROUTINE PZLATTRS( UPLO, TRANS, DIAG, NORMIN, N, A, IA, JA,
+ IF( ( MYROW.EQ.ITMP1X ) .AND. ( MYCOL.EQ.ITMP2X ) )
+ $ X( IROWX ) = XJTMP
+ END IF
+- XMAX = MAX( XMAX, CABS1( XJTMP ) )
++ XMAX( 1 ) = MAX( XMAX( 1 ), CABS1( XJTMP ) )
+ 140 CONTINUE
+ END IF
+ SCALE = SCALE / TSCAL
+diff --git a/SRC/pzlawil.f b/SRC/pzlawil.f
+index e89a9a3..7e502ef 100644
+--- a/SRC/pzlawil.f
++++ b/SRC/pzlawil.f
+@@ -124,11 +124,10 @@ SUBROUTINE PZLAWIL( II, JJ, M, A, DESCA, H44, H33, H43H34, V )
+ $ MODKM1, MYCOL, MYROW, NPCOL, NPROW, NUM, RIGHT,
+ $ RSRC, UP
+ DOUBLE PRECISION S
+- COMPLEX*16 CDUM, H11, H12, H21, H22, H33S, H44S, V1, V2,
+- $ V3
++ COMPLEX*16 CDUM, H22, H33S, H44S, V1, V2
+ * ..
+ * .. Local Arrays ..
+- COMPLEX*16 BUF( 4 )
++ COMPLEX*16 BUF( 4 ), H11( 1 ), H12( 1 ), H21( 1 ), V3( 1 )
+ * ..
+ * .. External Subroutines ..
+ EXTERNAL BLACS_GRIDINFO, INFOG2L, ZGERV2D, ZGESD2D
+@@ -181,18 +180,18 @@ SUBROUTINE PZLAWIL( II, JJ, M, A, DESCA, H44, H33, H43H34, V )
+ IF( NPCOL.GT.1 ) THEN
+ CALL ZGERV2D( CONTXT, 1, 1, V3, 1, MYROW, LEFT )
+ ELSE
+- V3 = A( ( ICOL-2 )*LDA+IROW )
++ V3( 1 ) = A( ( ICOL-2 )*LDA+IROW )
+ END IF
+ IF( NUM.GT.1 ) THEN
+ CALL ZGERV2D( CONTXT, 4, 1, BUF, 4, UP, LEFT )
+- H11 = BUF( 1 )
+- H21 = BUF( 2 )
+- H12 = BUF( 3 )
++ H11( 1 ) = BUF( 1 )
++ H21( 1 ) = BUF( 2 )
++ H12( 1 ) = BUF( 3 )
+ H22 = BUF( 4 )
+ ELSE
+- H11 = A( ( ICOL-3 )*LDA+IROW-2 )
+- H21 = A( ( ICOL-3 )*LDA+IROW-1 )
+- H12 = A( ( ICOL-2 )*LDA+IROW-2 )
++ H11( 1 ) = A( ( ICOL-3 )*LDA+IROW-2 )
++ H21( 1 ) = A( ( ICOL-3 )*LDA+IROW-1 )
++ H12( 1 ) = A( ( ICOL-2 )*LDA+IROW-2 )
+ H22 = A( ( ICOL-2 )*LDA+IROW-1 )
+ END IF
+ END IF
+@@ -225,20 +224,20 @@ SUBROUTINE PZLAWIL( II, JJ, M, A, DESCA, H44, H33, H43H34, V )
+ IF( NUM.GT.1 ) THEN
+ CALL ZGERV2D( CONTXT, 1, 1, H11, 1, UP, LEFT )
+ ELSE
+- H11 = A( ( ICOL-3 )*LDA+IROW-2 )
++ H11( 1 ) = A( ( ICOL-3 )*LDA+IROW-2 )
+ END IF
+ IF( NPROW.GT.1 ) THEN
+ CALL ZGERV2D( CONTXT, 1, 1, H12, 1, UP, MYCOL )
+ ELSE
+- H12 = A( ( ICOL-2 )*LDA+IROW-2 )
++ H12( 1 ) = A( ( ICOL-2 )*LDA+IROW-2 )
+ END IF
+ IF( NPCOL.GT.1 ) THEN
+ CALL ZGERV2D( CONTXT, 1, 1, H21, 1, MYROW, LEFT )
+ ELSE
+- H21 = A( ( ICOL-3 )*LDA+IROW-1 )
++ H21( 1 ) = A( ( ICOL-3 )*LDA+IROW-1 )
+ END IF
+ H22 = A( ( ICOL-2 )*LDA+IROW-1 )
+- V3 = A( ( ICOL-2 )*LDA+IROW )
++ V3( 1 ) = A( ( ICOL-2 )*LDA+IROW )
+ END IF
+ END IF
+ IF( ( MYROW.NE.II ) .OR. ( MYCOL.NE.JJ ) )
+@@ -247,24 +246,24 @@ SUBROUTINE PZLAWIL( II, JJ, M, A, DESCA, H44, H33, H43H34, V )
+ IF( MODKM1.GT.1 ) THEN
+ CALL INFOG2L( M+2, M+2, DESCA, NPROW, NPCOL, MYROW, MYCOL,
+ $ IROW, ICOL, RSRC, JSRC )
+- H11 = A( ( ICOL-3 )*LDA+IROW-2 )
+- H21 = A( ( ICOL-3 )*LDA+IROW-1 )
+- H12 = A( ( ICOL-2 )*LDA+IROW-2 )
++ H11( 1 ) = A( ( ICOL-3 )*LDA+IROW-2 )
++ H21( 1 ) = A( ( ICOL-3 )*LDA+IROW-1 )
++ H12( 1 ) = A( ( ICOL-2 )*LDA+IROW-2 )
+ H22 = A( ( ICOL-2 )*LDA+IROW-1 )
+- V3 = A( ( ICOL-2 )*LDA+IROW )
++ V3( 1 ) = A( ( ICOL-2 )*LDA+IROW )
+ END IF
+ *
+- H44S = H44 - H11
+- H33S = H33 - H11
+- V1 = ( H33S*H44S-H43H34 ) / H21 + H12
+- V2 = H22 - H11 - H33S - H44S
+- S = CABS1( V1 ) + CABS1( V2 ) + CABS1( V3 )
++ H44S = H44 - H11( 1 )
++ H33S = H33 - H11( 1 )
++ V1 = ( H33S*H44S-H43H34 ) / H21( 1 ) + H12( 1 )
++ V2 = H22 - H11( 1 ) - H33S - H44S
++ S = CABS1( V1 ) + CABS1( V2 ) + CABS1( V3( 1 ) )
+ V1 = V1 / S
+ V2 = V2 / S
+- V3 = V3 / S
++ V3( 1 ) = V3( 1 ) / S
+ V( 1 ) = V1
+ V( 2 ) = V2
+- V( 3 ) = V3
++ V( 3 ) = V3( 1 )
+ *
+ RETURN
+ *
+diff --git a/SRC/pztrevc.f b/SRC/pztrevc.f
+index 0536475..3b27286 100644
+--- a/SRC/pztrevc.f
++++ b/SRC/pztrevc.f
+@@ -218,11 +218,12 @@ SUBROUTINE PZTREVC( SIDE, HOWMNY, SELECT, N, T, DESCT, VL, DESCVL,
+ $ ITMP2, J, K, KI, LDT, LDVL, LDVR, LDW, MB,
+ $ MYCOL, MYROW, NB, NPCOL, NPROW, RSRC
+ REAL SELF
+- DOUBLE PRECISION OVFL, REMAXD, SCALE, SMIN, SMLNUM, ULP, UNFL
++ DOUBLE PRECISION OVFL, REMAXD, SCALE, SMLNUM, ULP, UNFL
+ COMPLEX*16 CDUM, REMAXC, SHIFT
+ * ..
+ * .. Local Arrays ..
+ INTEGER DESCW( DLEN_ )
++ DOUBLE PRECISION SMIN( 1 )
+ * ..
+ * .. External Functions ..
+ LOGICAL LSAME
+@@ -355,13 +356,13 @@ SUBROUTINE PZTREVC( SIDE, HOWMNY, SELECT, N, T, DESCT, VL, DESCVL,
+ $ GO TO 70
+ END IF
+ *
+- SMIN = ZERO
++ SMIN( 1 ) = ZERO
+ SHIFT = CZERO
+ CALL INFOG2L( KI, KI, DESCT, NPROW, NPCOL, MYROW, MYCOL,
+ $ IROW, ICOL, ITMP1, ITMP2 )
+ IF( ( MYROW.EQ.ITMP1 ) .AND. ( MYCOL.EQ.ITMP2 ) ) THEN
+ SHIFT = T( ( ICOL-1 )*LDT+IROW )
+- SMIN = MAX( ULP*( CABS1( SHIFT ) ), SMLNUM )
++ SMIN( 1 ) = MAX( ULP*( CABS1( SHIFT ) ), SMLNUM )
+ END IF
+ CALL DGSUM2D( CONTXT, 'ALL', ' ', 1, 1, SMIN, 1, -1, -1 )
+ CALL ZGSUM2D( CONTXT, 'ALL', ' ', 1, 1, SHIFT, 1, -1, -1 )
+@@ -396,8 +397,9 @@ SUBROUTINE PZTREVC( SIDE, HOWMNY, SELECT, N, T, DESCT, VL, DESCVL,
+ IF( ( MYROW.EQ.ITMP1 ) .AND. ( MYCOL.EQ.ITMP2 ) ) THEN
+ T( ( ICOL-1 )*LDT+IROW ) = T( ( ICOL-1 )*LDT+IROW ) -
+ $ SHIFT
+- IF( CABS1( T( ( ICOL-1 )*LDT+IROW ) ).LT.SMIN ) THEN
+- T( ( ICOL-1 )*LDT+IROW ) = DCMPLX( SMIN )
++ IF( CABS1( T( ( ICOL-1 )*LDT+IROW ) ).LT.SMIN( 1 ) )
++ $ THEN
++ T( ( ICOL-1 )*LDT+IROW ) = DCMPLX( SMIN( 1 ) )
+ END IF
+ END IF
+ 50 CONTINUE
+@@ -467,13 +469,13 @@ SUBROUTINE PZTREVC( SIDE, HOWMNY, SELECT, N, T, DESCT, VL, DESCVL,
+ $ GO TO 110
+ END IF
+ *
+- SMIN = ZERO
++ SMIN( 1 ) = ZERO
+ SHIFT = CZERO
+ CALL INFOG2L( KI, KI, DESCT, NPROW, NPCOL, MYROW, MYCOL,
+ $ IROW, ICOL, ITMP1, ITMP2 )
+ IF( ( MYROW.EQ.ITMP1 ) .AND. ( MYCOL.EQ.ITMP2 ) ) THEN
+ SHIFT = T( ( ICOL-1 )*LDT+IROW )
+- SMIN = MAX( ULP*( CABS1( SHIFT ) ), SMLNUM )
++ SMIN( 1 ) = MAX( ULP*( CABS1( SHIFT ) ), SMLNUM )
+ END IF
+ CALL DGSUM2D( CONTXT, 'ALL', ' ', 1, 1, SMIN, 1, -1, -1 )
+ CALL ZGSUM2D( CONTXT, 'ALL', ' ', 1, 1, SHIFT, 1, -1, -1 )
+@@ -507,8 +509,8 @@ SUBROUTINE PZTREVC( SIDE, HOWMNY, SELECT, N, T, DESCT, VL, DESCVL,
+ IF( ( MYROW.EQ.ITMP1 ) .AND. ( MYCOL.EQ.ITMP2 ) ) THEN
+ T( ( ICOL-1 )*LDT+IROW ) = T( ( ICOL-1 )*LDT+IROW ) -
+ $ SHIFT
+- IF( CABS1( T( ( ICOL-1 )*LDT+IROW ) ).LT.SMIN )
+- $ T( ( ICOL-1 )*LDT+IROW ) = DCMPLX( SMIN )
++ IF( CABS1( T( ( ICOL-1 )*LDT+IROW ) ).LT.SMIN( 1 ) )
++ $ T( ( ICOL-1 )*LDT+IROW ) = DCMPLX( SMIN( 1 ) )
+ END IF
+ 90 CONTINUE
+ *
+
+From 189c84001bcd564296a475c5c757afc9f337e828 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Tiziano=20M=C3=BCller?= <tiziano.mueller@chem.uzh.ch>
+Date: Thu, 25 Jun 2020 18:37:34 +0200
+Subject: [PATCH] use -std=legacy for tests with GCC-10+
+
+---
+ BLACS/TESTING/CMakeLists.txt | 10 +++++++---
+ PBLAS/TESTING/CMakeLists.txt | 7 ++++---
+ PBLAS/TIMING/CMakeLists.txt | 5 +++--
+ TESTING/EIG/CMakeLists.txt | 3 +++
+ TESTING/LIN/CMakeLists.txt | 4 ++++
+ 5 files changed, 21 insertions(+), 8 deletions(-)
+
+diff --git a/BLACS/TESTING/CMakeLists.txt b/BLACS/TESTING/CMakeLists.txt
+index d8846b5..4e91ac2 100644
+--- a/BLACS/TESTING/CMakeLists.txt
++++ b/BLACS/TESTING/CMakeLists.txt
+@@ -1,10 +1,14 @@
+-set(FTestObj
++set(FTestObj
+ blacstest.f btprim.f tools.f)
+
++if ("${CMAKE_Fortran_COMPILER_ID}" STREQUAL "GNU" AND CMAKE_Fortran_COMPILER_VERSION VERSION_GREATER_EQUAL 10)
++ set_source_files_properties(blacstest.f PROPERTIES COMPILE_FLAGS "-std=legacy")
++endif()
++
+ add_executable(xFbtest ${FTestObj})
+ target_link_libraries(xFbtest scalapack)
+
+-set(CTestObj
++set(CTestObj
+ Cbt.c)
+
+ set_property(
+@@ -46,4 +50,4 @@ add_test(xFbtest
+ -DRUNTIMEDIR=${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
+ -DSOURCEDIR=${CMAKE_CURRENT_SOURCE_DIR}
+ -P ${CMAKE_CURRENT_SOURCE_DIR}/runtest.cmake
+- )
+\ No newline at end of file
++ )
+diff --git a/PBLAS/TESTING/CMakeLists.txt b/PBLAS/TESTING/CMakeLists.txt
+index e60f5e4..ee77091 100644
+--- a/PBLAS/TESTING/CMakeLists.txt
++++ b/PBLAS/TESTING/CMakeLists.txt
+@@ -10,7 +10,7 @@ set (zpbtcom pzblastst.f dlamch.f ${pbtcom})
+
+ set_property(
+ SOURCE ${PblasErrorHandler}
+- APPEND PROPERTY COMPILE_DEFINITIONS TestingPblas
++ APPEND PROPERTY COMPILE_DEFINITIONS TestingPblas
+ )
+
+ set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${SCALAPACK_BINARY_DIR}/PBLAS/TESTING)
+@@ -74,5 +74,6 @@ add_test(dpb3tst ${MPIEXEC} ${MPIEXEC_NUMPROC_FLAG} 4 ./dpb3tst)
+ add_test(cpb3tst ${MPIEXEC} ${MPIEXEC_NUMPROC_FLAG} 4 ./cpb3tst)
+ add_test(zpb3tst ${MPIEXEC} ${MPIEXEC_NUMPROC_FLAG} 4 ./zpb3tst)
+
+-
+-
++if ("${CMAKE_Fortran_COMPILER_ID}" STREQUAL "GNU" AND CMAKE_Fortran_COMPILER_VERSION VERSION_GREATER_EQUAL 10)
++ set( CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -std=legacy" ) # local to this directory
++endif()
+diff --git a/PBLAS/TIMING/CMakeLists.txt b/PBLAS/TIMING/CMakeLists.txt
+index 763330f..208bbc3 100644
+--- a/PBLAS/TIMING/CMakeLists.txt
++++ b/PBLAS/TIMING/CMakeLists.txt
+@@ -74,5 +74,6 @@ add_test(dpb3tim ${MPIEXEC} ${MPIEXEC_NUMPROC_FLAG} 4 ./dpb3tim)
+ add_test(cpb3tim ${MPIEXEC} ${MPIEXEC_NUMPROC_FLAG} 4 ./cpb3tim)
+ add_test(zpb3tim ${MPIEXEC} ${MPIEXEC_NUMPROC_FLAG} 4 ./zpb3tim)
+
+-
+-
++if ("${CMAKE_Fortran_COMPILER_ID}" STREQUAL "GNU" AND CMAKE_Fortran_COMPILER_VERSION VERSION_GREATER_EQUAL 10)
++ set( CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -std=legacy" ) # local to this directory
++endif()
+diff --git a/TESTING/EIG/CMakeLists.txt b/TESTING/EIG/CMakeLists.txt
+index 97c7036..19a1f34 100644
+--- a/TESTING/EIG/CMakeLists.txt
++++ b/TESTING/EIG/CMakeLists.txt
+@@ -97,3 +97,6 @@ target_link_libraries(xzheevr scalapack ${LAPACK_LIBRARIES} ${BLAS_LIBRARIES})
+ target_link_libraries(xshseqr scalapack ${LAPACK_LIBRARIES} ${BLAS_LIBRARIES})
+ target_link_libraries(xdhseqr scalapack ${LAPACK_LIBRARIES} ${BLAS_LIBRARIES})
+
++if ("${CMAKE_Fortran_COMPILER_ID}" STREQUAL "GNU" AND CMAKE_Fortran_COMPILER_VERSION VERSION_GREATER_EQUAL 10)
++ set( CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -std=legacy" ) # local to this directory
++endif()
+diff --git a/TESTING/LIN/CMakeLists.txt b/TESTING/LIN/CMakeLists.txt
+index 55a53e9..65f169b 100644
+--- a/TESTING/LIN/CMakeLists.txt
++++ b/TESTING/LIN/CMakeLists.txt
+@@ -110,3 +110,7 @@ target_link_libraries(xsls scalapack ${LAPACK_LIBRARIES} ${BLAS_LIBRARIES})
+ target_link_libraries(xdls scalapack ${LAPACK_LIBRARIES} ${BLAS_LIBRARIES})
+ target_link_libraries(xcls scalapack ${LAPACK_LIBRARIES} ${BLAS_LIBRARIES})
+ target_link_libraries(xzls scalapack ${LAPACK_LIBRARIES} ${BLAS_LIBRARIES})
++
++if ("${CMAKE_Fortran_COMPILER_ID}" STREQUAL "GNU" AND CMAKE_Fortran_COMPILER_VERSION VERSION_GREATER_EQUAL 10)
++ set( CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -std=legacy" ) # local to this directory
++endif()
diff --git a/gnu/packages/patches/strace-readlink-tests.patch b/gnu/packages/patches/strace-readlink-tests.patch
new file mode 100644
index 0000000000..dd5ee98703
--- /dev/null
+++ b/gnu/packages/patches/strace-readlink-tests.patch
@@ -0,0 +1,46 @@
+Prevent strace's "readlink" and "readlinkat" tests from failing due to the
+additional system call made by glibc with the patch "glibc-dl-cache.patch"
+applied (introduced in commit 52564e9).
+
+These changes cause strace to report during these tests only system calls on
+files contained in the test directory, effectively filtering out the
+additional readlink/readlinkat call on "/proc/self/exe" and allowing the tests
+to complete as normal.
+
+diff --git a/tests/gen_tests.in b/tests/gen_tests.in
+index 8b4e2e9..cc3ca63 100644
+--- a/tests/gen_tests.in
++++ b/tests/gen_tests.in
+@@ -623,8 +623,8 @@ quotactl-xfs-v -v -e trace=quotactl
+ read-write -a15 -eread=0,5 -ewrite=1,4 -e trace=read,write -P read-write-tmpfile -P /dev/zero -P /dev/null
+ readahead -a1
+ readdir -a16
+-readlink -xx
+-readlinkat -xx
++readlink -xx --trace-path=test.readlink.link
++readlinkat -xx --trace-path=test.readlinkat.link
+ reboot -s 256
+ recv-MSG_TRUNC -a26 -e trace=recv
+ recvfrom -a35
+diff --git a/tests/readlink.gen.test b/tests/readlink.gen.test
+index 4263234..418691b 100755
+--- a/tests/readlink.gen.test
++++ b/tests/readlink.gen.test
+@@ -1,4 +1,4 @@
+ #!/bin/sh -efu
+-# Generated by ./tests/gen_tests.sh from ./tests/gen_tests.in (readlink -xx ); do not edit.
++# Generated by ./tests/gen_tests.sh from ./tests/gen_tests.in (readlink -xx --trace-path=test.readlink.link); do not edit.
+ . "${srcdir=.}/init.sh"
+-run_strace_match_diff -xx
++run_strace_match_diff -xx --trace-path=test.readlink.link
+diff --git a/tests/readlinkat.gen.test b/tests/readlinkat.gen.test
+index d7de993..a48d590 100755
+--- a/tests/readlinkat.gen.test
++++ b/tests/readlinkat.gen.test
+@@ -1,4 +1,4 @@
+ #!/bin/sh -efu
+-# Generated by ./tests/gen_tests.sh from ./tests/gen_tests.in (readlinkat -xx ); do not edit.
++# Generated by ./tests/gen_tests.sh from ./tests/gen_tests.in (readlinkat -xx --trace-path=test.readlinkat.link); do not edit.
+ . "${srcdir=.}/init.sh"
+-run_strace_match_diff -xx
++run_strace_match_diff -xx --trace-path=test.readlinkat.link
diff --git a/gnu/packages/patches/syslinux-gcc10.patch b/gnu/packages/patches/syslinux-gcc10.patch
new file mode 100644
index 0000000000..8d3750b36e
--- /dev/null
+++ b/gnu/packages/patches/syslinux-gcc10.patch
@@ -0,0 +1,87 @@
+Taken from Gentoo and adapted to fix the build using GCC 10. See:
+https://bugs.gentoo.org/705730.
+
+--- a/mk/com32.mk
++++ b/mk/com32.mk
+@@ -47,6 +47,7 @@ GCCOPT += $(call gcc_ok,-falign-functions=0,-malign-functions=0)
+ GCCOPT += $(call gcc_ok,-falign-jumps=0,-malign-jumps=0)
+ GCCOPT += $(call gcc_ok,-falign-labels=0,-malign-labels=0)
+ GCCOPT += $(call gcc_ok,-falign-loops=0,-malign-loops=0)
++GCCOPT += $(call gcc_ok,-fcommon)
+
+ ifeq ($(FWCLASS),EFI)
+ GCCOPT += -mno-red-zone
+--- a/mk/elf.mk
++++ b/mk/elf.mk
+@@ -42,6 +42,7 @@ GCCOPT += $(call gcc_ok,-falign-functions=0,-malign-functions=0)
+ GCCOPT += $(call gcc_ok,-falign-jumps=0,-malign-jumps=0)
+ GCCOPT += $(call gcc_ok,-falign-labels=0,-malign-labels=0)
+ GCCOPT += $(call gcc_ok,-falign-loops=0,-malign-loops=0)
++GCCOPT += $(call gcc_ok,-fcommon)
+
+ com32 = $(topdir)/com32
+ core = $(topdir)/core
+--- a/mk/embedded.mk
++++ b/mk/embedded.mk
+@@ -51,6 +51,7 @@ GCCOPT += $(call gcc_ok,-falign-jumps=0,-malign-jumps=0)
+ GCCOPT += $(call gcc_ok,-falign-labels=0,-malign-labels=0)
+ GCCOPT += $(call gcc_ok,-falign-loops=0,-malign-loops=0)
+ GCCOPT += $(call gcc_ok,-fvisibility=hidden)
++GCCOPT += $(call gcc_ok,-fcommon)
+
+ LIBGCC := $(shell $(CC) $(GCCOPT) --print-libgcc)
+
+--- a/mk/lib.mk
++++ b/mk/lib.mk
+@@ -28,6 +28,7 @@ GCCOPT += $(call gcc_ok,-falign-functions=0,-malign-functions=0)
+ GCCOPT += $(call gcc_ok,-falign-jumps=0,-malign-jumps=0)
+ GCCOPT += $(call gcc_ok,-falign-labels=0,-malign-labels=0)
+ GCCOPT += $(call gcc_ok,-falign-loops=0,-malign-loops=0)
++GCCOPT += $(call gcc_ok,-fcommon)
+
+ INCLUDE = -I$(SRC)
+ STRIP = strip --strip-all -R .comment -R .note
+--- a/mk/efi.mk
++++ b/mk/efi.mk
+@@ -7,7 +7,7 @@ core = $(topdir)/core
+ # Set up architecture specifics; for cross compilation, set ARCH as apt
+ # gnuefi sets up architecture specifics in ia32 or x86_64 sub directories
+ # set up the LIBDIR and EFIINC for building for the appropriate architecture
+-GCCOPT := $(call gcc_ok,-fno-stack-protector,)
++GCCOPT := $(call gcc_ok,-fno-stack-protector,) $(call gcc_ok,-fcommon)
+ EFIINC = $(objdir)/include/efi
+ LIBDIR = $(objdir)/lib
+
+diff --git a/dos/string.h b/dos/string.h
+index f648de2..a502132 100644
+--- a/dos/string.h
++++ b/dos/string.h
+@@ -5,12 +5,13 @@
+ #ifndef _STRING_H
+ #define _STRING_H
+
++#include <stddef.h>
++
+ /* Standard routines */
+ #define memcpy(a,b,c) __builtin_memcpy(a,b,c)
+ #define memmove(a,b,c) __builtin_memmove(a,b,c)
+ #define memset(a,b,c) __builtin_memset(a,b,c)
+ #define strcpy(a,b) __builtin_strcpy(a,b)
+-#define strlen(a) __builtin_strlen(a)
+
+ /* This only returns true or false */
+ static inline int memcmp(const void *__m1, const void *__m2, unsigned int __n)
+@@ -21,6 +22,13 @@ static inline int memcmp(const void *__m1, const void *__m2, unsigned int __n)
+ return rv;
+ }
+
++static inline size_t strlen(const char *s)
++{
++ size_t len = 0;
++ while (*s++) len++;
++ return len;
++}
++
+ extern char *strchr(const char *s, int c);
+
+ #endif /* _STRING_H */ \ No newline at end of file
diff --git a/gnu/packages/patches/syslinux-strip-gnu-property.patch b/gnu/packages/patches/syslinux-strip-gnu-property.patch
new file mode 100644
index 0000000000..c656bbeedd
--- /dev/null
+++ b/gnu/packages/patches/syslinux-strip-gnu-property.patch
@@ -0,0 +1,31 @@
+Taken from: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=906414.
+
+Author: Lukas Schwaighofer <lukas@schwaighofer.name>
+Description: Strip the .note.gnu.property section for the mbr. This section is
+ added since binutils Debian version 2.31.1-2 and causes mbr.bin to grow in
+ size beyond what can fit into the master boot record.
+---
+ mbr/i386/mbr.ld | 1 +
+ mbr/x86_64/mbr.ld | 1 +
+ 2 files changed, 2 insertions(+)
+
+diff --git a/mbr/i386/mbr.ld b/mbr/i386/mbr.ld
+index d14ba80..5368346 100644
+--- a/mbr/i386/mbr.ld
++++ b/mbr/i386/mbr.ld
+@@ -70,4 +70,5 @@ SECTIONS
+ .debug_typenames 0 : { *(.debug_typenames) }
+ .debug_varnames 0 : { *(.debug_varnames) }
+ /DISCARD/ : { *(.note.GNU-stack) }
++ /DISCARD/ : { *(.note.gnu.property) }
+ }
+diff --git a/mbr/x86_64/mbr.ld b/mbr/x86_64/mbr.ld
+index ae27d49..b8c0d89 100644
+--- a/mbr/x86_64/mbr.ld
++++ b/mbr/x86_64/mbr.ld
+@@ -69,4 +69,5 @@ SECTIONS
+ .debug_typenames 0 : { *(.debug_typenames) }
+ .debug_varnames 0 : { *(.debug_varnames) }
+ /DISCARD/ : { *(.note.GNU-stack) }
++ /DISCARD/ : { *(.note.gnu.property) }
+ }
diff --git a/gnu/packages/patches/tcl-fix-cross-compilation.patch b/gnu/packages/patches/tcl-fix-cross-compilation.patch
deleted file mode 100644
index 00c36b8f27..0000000000
--- a/gnu/packages/patches/tcl-fix-cross-compilation.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-From f7fa48c4c75a1e748dc5071e709c0b62ff739eaa Mon Sep 17 00:00:00 2001
-From: "jan.nijtmans" <nijtmans@users.sourceforge.net>
-Date: Mon, 9 Dec 2019 10:02:20 +0000
-Subject: [PATCH] Fix [abd4abedd2]: Failed to build tk 8.6.10 with cross
- compile
-
-Patch taken from upstream to fix cross-compilation. To be removed on next Tcl release.
-
----
- compat/strtol.c | 2 +-
- compat/strtoul.c | 2 +-
- 2 files changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/compat/strtol.c b/compat/strtol.c
-index b7f69196ce2..811006a64c3 100644
---- a/compat/strtol.c
-+++ b/compat/strtol.c
-@@ -53,7 +53,7 @@ strtol(
- */
-
- p = string;
-- while (TclIsSpaceProc(*p)) {
-+ while (isspace(UCHAR(*p))) {
- p += 1;
- }
-
-diff --git a/compat/strtoul.c b/compat/strtoul.c
-index e37eb05f823..15587f1da1a 100644
---- a/compat/strtoul.c
-+++ b/compat/strtoul.c
-@@ -74,7 +74,7 @@ strtoul(
- */
-
- p = string;
-- while (TclIsSpaceProc(*p)) {
-+ while (isspace(UCHAR(*p))) {
- p += 1;
- }
- if (*p == '-') {
diff --git a/gnu/packages/patches/tcsh-fix-autotest.patch b/gnu/packages/patches/tcsh-fix-autotest.patch
index 200867cb9b..9f5790641b 100644
--- a/gnu/packages/patches/tcsh-fix-autotest.patch
+++ b/gnu/packages/patches/tcsh-fix-autotest.patch
@@ -63,17 +63,6 @@
AT_DATA([comment2.csh],
[[echo testing...@%:@\
---- tests/subst.at
-+++ tests/subst.at
-@@ -54,7 +54,7 @@ AT_CHECK([export HOME=$(getent passwd $(id -un) | awk -F: '{ print $(NF - 1) }')
- , [1
- ])
-
--AT_CHECK([export HOME=$(getent passwd $(id -un) | awk -F: '{ print $(NF - 1) }'); echo "echo ~$(id -un)/foo; echo \"\$HOME/foo\"" | tcsh -f | uniq dnl
-+AT_CHECK([export HOME=$(getent passwd $(id -un) | awk -F: '{ print $(NF - 1) }'); echo "echo ~$(id -un)//foo; echo \"\$HOME/foo\"" | tcsh -f | uniq dnl
- | wc -l | tr -d ' \t'], , [1
- ])
-
--- tests/variables.at
+++ tests/variables.at
@@ -666,7 +666,8 @@ set listflags=(-xA $cwd/args.sh)
diff --git a/gnu/packages/patches/texlive-bin-poppler-0.83.patch b/gnu/packages/patches/texlive-bin-poppler-0.83.patch
deleted file mode 100644
index 5e57e3efac..0000000000
--- a/gnu/packages/patches/texlive-bin-poppler-0.83.patch
+++ /dev/null
@@ -1,52 +0,0 @@
-Fix build with Poppler 0.83 and later.
-
-Taken from Arch Linux, but adjusted to patch the versioned Poppler
-files, as upstream applies it after copying them in place.
-https://git.archlinux.org/svntogit/packages.git/tree/trunk/texlive-poppler-0.83.patch?h=packages/texlive-bin
-
-diff -ru texlive-source-orig/texk/web2c/pdftexdir/pdftoepdf-poppler0.76.0.cc texlive-source/texk/web2c/pdftexdir/pdftoepdf-poppler0.76.0.cc
---- texlive-source-orig/texk/web2c/pdftexdir/pdftoepdf-poppler0.76.0.cc
-+++ texlive-source/texk/web2c/pdftexdir/pdftoepdf-poppler0.76.0.cc
-@@ -723,7 +723,7 @@
- #endif
- // initialize
- if (!isInit) {
-- globalParams = new GlobalParams();
-+ globalParams.reset(new GlobalParams());
- globalParams->setErrQuiet(false);
- isInit = true;
- }
-@@ -1108,6 +1108,5 @@
- delete_document(p);
- }
- // see above for globalParams
-- delete globalParams;
- }
- }
-diff -ru texlive-source-orig/texk/web2c/pdftexdir/pdftosrc-poppler0.76.0.cc texlive-source/texk/web2c/pdftexdir/pdftosrc-poppler0.76.0.cc
---- texlive-source-orig/texk/web2c/pdftexdir/pdftosrc-poppler0.76.0.cc
-+++ texlive-source/texk/web2c/pdftexdir/pdftosrc-poppler0.76.0.cc
-@@ -79,7 +79,7 @@
- exit(1);
- }
- fileName = new GString(argv[1]);
-- globalParams = new GlobalParams();
-+ globalParams.reset(new GlobalParams());
- doc = new PDFDoc(fileName);
- if (!doc->isOk()) {
- fprintf(stderr, "Invalid PDF file\n");
-@@ -100,7 +100,7 @@
- if (objnum == 0) {
- srcStream = catalogDict.dictLookup("SourceObject");
- static char const_SourceFile[] = "SourceFile";
-- if (!srcStream.isStream(const_SourceFile)) {
-+ if (!srcStream.isDict(const_SourceFile)) {
- fprintf(stderr, "No SourceObject found\n");
- exit(1);
- }
-@@ -202,5 +202,4 @@
- fprintf(stderr, "Cross-reference table extracted to %s\n", outname);
- fclose(outfile);
- delete doc;
-- delete globalParams;
- }
diff --git a/gnu/packages/patches/texlive-bin-poppler-0.86.patch b/gnu/packages/patches/texlive-bin-poppler-0.86.patch
deleted file mode 100644
index b1adca657b..0000000000
--- a/gnu/packages/patches/texlive-bin-poppler-0.86.patch
+++ /dev/null
@@ -1,17 +0,0 @@
-Fix build with Poppler 0.86 and later.
-
-Taken from Arch Linux, but adjusted to patch the versioned Poppler
-files, as upstream applies it after copying them in place.
-https://git.archlinux.org/svntogit/packages.git/tree/trunk/texlive-poppler-0.86.patch?h=packages/texlive-bin
-
---- a/texk/web2c/pdftexdir/pdftoepdf-poppler0.76.0.cc 2020-03-03 21:11:35.102711802 +0000
-+++ b/texk/web2c/pdftexdir/pdftoepdf-poppler0.76.0.cc 2020-03-03 21:13:13.057420111 +0000
-@@ -757,7 +757,7 @@
- if (page_name) {
- // get page by name
- GString name(page_name);
-- LinkDest *link = pdf_doc->doc->findDest(&name);
-+ LinkDest *link = pdf_doc->doc->findDest(&name).get();
- if (link == 0 || !link->isOk())
- pdftex_fail("PDF inclusion: invalid destination <%s>", page_name);
- Ref ref = link->getPageRef();
diff --git a/gnu/packages/patches/tor-sandbox-i686.patch b/gnu/packages/patches/tor-sandbox-i686.patch
new file mode 100644
index 0000000000..34b0a053b1
--- /dev/null
+++ b/gnu/packages/patches/tor-sandbox-i686.patch
@@ -0,0 +1,36 @@
+This patch fixes sandboxing on i686 by allowing 'statx'. Without this,
+'src/test/test_include.sh' would fail.
+
+Patch adapted from:
+
+ https://gitlab.torproject.org/tpo/core/tor/-/merge_requests/480
+
+From 001d880d1082f5d124e10554e2718e407c7e88c6 Mon Sep 17 00:00:00 2001
+From: Simon South <simon@simonsouth.net>
+Date: Fri, 5 Nov 2021 10:10:10 -0400
+Subject: [PATCH] sandbox: Allow "statx" syscall on i386 for glibc 2.33
+
+glibc versions 2.33 and newer use the modern "statx" system call in their
+implementations of stat() and opendir() for Linux on i386. Prevent failures in
+the sandbox unit tests by modifying the sandbox to allow this system call
+without restriction on i386 when it is available, and update the test suite to
+skip the "sandbox/stat_filename" test in this case as it is certain to fail.
+---
+ src/lib/sandbox/sandbox.c | 3 +++
+ src/test/test_sandbox.c | 7 ++++---
+ 2 files changed, 7 insertions(+), 3 deletions(-)
+
+diff --git a/src/lib/sandbox/sandbox.c b/src/lib/sandbox/sandbox.c
+index fb02a345ab..a15f99ad76 100644
+--- a/src/lib/sandbox/sandbox.c
++++ b/src/lib/sandbox/sandbox.c
+@@ -252,6 +252,9 @@ static int filter_nopar_gen[] = {
+ SCMP_SYS(sigreturn),
+ #endif
+ SCMP_SYS(stat),
++#if defined(__i386__) && defined(__NR_statx)
++ SCMP_SYS(statx),
++#endif
+ SCMP_SYS(uname),
+ SCMP_SYS(wait4),
+ SCMP_SYS(write),
diff --git a/gnu/packages/patches/transmission-remote-gtk-fix-appstream.patch b/gnu/packages/patches/transmission-remote-gtk-fix-appstream.patch
deleted file mode 100644
index e7d4c8bb86..0000000000
--- a/gnu/packages/patches/transmission-remote-gtk-fix-appstream.patch
+++ /dev/null
@@ -1,61 +0,0 @@
-Fix a bug related to AppStream:
-
-https://github.com/transmission-remote-gtk/transmission-remote-gtk/issues/95
-
-Patch adapted from upstream source repository:
-
-https://github.com/transmission-remote-gtk/transmission-remote-gtk/commit/89259ff90c703c7fe6768b5317803b9aa5b5ab8c
-
-From 89259ff90c703c7fe6768b5317803b9aa5b5ab8c Mon Sep 17 00:00:00 2001
-From: Alan <alan-github@eth0.org.uk>
-Date: Tue, 17 Nov 2020 01:26:22 +0000
-Subject: [PATCH] fix screenshot and add OARS rating so appdata validates
-
----
- README.md | 5 ++---
- data/io.github.TransmissionRemoteGtk.appdata.xml.in | 5 +++--
- 2 files changed, 5 insertions(+), 5 deletions(-)
-
-diff --git a/README.md b/README.md
-index 4306cc7..d38314b 100644
---- a/README.md
-+++ b/README.md
-@@ -6,13 +6,12 @@ the Transmission BitTorrent client, using its HTTP RPC protocol.
-
- # DEPENDENCIES
-
--The following packages are required dependencies:
-+The following packages are required dependencies (debian/ubuntu).
-
- ```bash
--autoconf-archive appstream-glib intltool
-+libgtk-3-dev automake autoconf gcc libgeoip-dev gettext autoconf-archive libappstream-dev appstream-util libcurl4-openssl-dev libjson-glib-dev
- ```
-
--
- # BUILDING
-
- Optionally install `libgeoip` and its headers to see the country
-diff --git a/data/io.github.TransmissionRemoteGtk.appdata.xml.in b/data/io.github.TransmissionRemoteGtk.appdata.xml.in
-index fc35a8f..1476c2a 100644
---- a/data/io.github.TransmissionRemoteGtk.appdata.xml.in
-+++ b/data/io.github.TransmissionRemoteGtk.appdata.xml.in
-@@ -7,6 +7,7 @@
- <translation type="gettext">transmission-remote-gtk</translation>
- <name>Transmission Remote</name>
- <developer_name>Transmission Remote Gtk Team</developer_name>
-+ <content_rating type="oars-1.1" />
- <summary>Remotely manage the Transmission BitTorrent client</summary>
- <url type="homepage">https://github.com/transmission-remote-gtk/transmission-remote-gtk</url>
- <url type="bugtracker">https://github.com/transmission-remote-gtk/transmission-remote-gtk/issues</url>
-@@ -23,8 +24,8 @@
- </ul>
- </description>
- <screenshots>
-- <screenshot height="576" width="1024" type="default">
-- <image>http://eth0.org.uk/~alan/transmission-remote-gtk-1.1.1.png</image>
-+ <screenshot height="512" width="973" type="default">
-+ <image>https://community.linuxmint.com/img/screenshots/transmission-remote-gtk.png</image>
- </screenshot>
- </screenshots>
- <releases>
diff --git a/gnu/packages/patches/vigra-python-compat.patch b/gnu/packages/patches/vigra-python-compat.patch
deleted file mode 100644
index 63c6abb326..0000000000
--- a/gnu/packages/patches/vigra-python-compat.patch
+++ /dev/null
@@ -1,18 +0,0 @@
-Fix build with Boost + Python 3.7.
-
-Taken from upstream:
-https://github.com/ukoethe/vigra/commit/a6fa62663c6a6b752ed0707e95f643e25867a0f9
-
-diff --git a/vigranumpy/src/core/vigranumpycore.cxx b/vigranumpy/src/core/vigranumpycore.cxx
-index ec38d3636..c81c6ae52 100644
---- a/vigranumpy/src/core/vigranumpycore.cxx
-+++ b/vigranumpy/src/core/vigranumpycore.cxx
-@@ -61,7 +61,7 @@ UInt32 pychecksum(python::str const & s)
- return checksum(data, size);
- #else
- Py_ssize_t size = 0;
-- char * data = PyUnicode_AsUTF8AndSize(s.ptr(), &size);
-+ const char * data = PyUnicode_AsUTF8AndSize(s.ptr(), &size);
- return checksum(data, size);
- #endif
- }
diff --git a/gnu/packages/patches/xf86-video-mach64-bool-to-boolean.patch b/gnu/packages/patches/xf86-video-mach64-bool-to-boolean.patch
new file mode 100644
index 0000000000..b85acdd401
--- /dev/null
+++ b/gnu/packages/patches/xf86-video-mach64-bool-to-boolean.patch
@@ -0,0 +1,79 @@
+From ff1a69144735298d1a190fa23b3ae5747e914859 Mon Sep 17 00:00:00 2001
+From: Josselin Poiret <dev@jpoiret.xyz>
+Date: Thu, 18 Nov 2021 13:18:25 +0000
+Subject: [PATCH] Rename bool to boolean for OptionInfoRec.
+
+* src/aticonfig.c: Change uses of .value.bool to .value.boolean
+---
+ src/aticonfig.c | 38 +++++++++++++++++++-------------------
+ 1 file changed, 19 insertions(+), 19 deletions(-)
+
+diff --git a/src/aticonfig.c b/src/aticonfig.c
+index 621e79e..8ea0c6e 100644
+--- a/src/aticonfig.c
++++ b/src/aticonfig.c
+@@ -311,42 +311,42 @@ ATIProcessOptions
+
+ (void)memcpy(PublicOption, ATIPublicOptions, ATIPublicOptionSize);
+
+-# define ProbeSparse PublicOption[ATI_OPTION_PROBE_SPARSE].value.bool
+-# define Accel PublicOption[ATI_OPTION_ACCEL].value.bool
+-# define BIOSDisplay PrivateOption[ATI_OPTION_BIOS_DISPLAY].value.bool
+-# define Blend PrivateOption[ATI_OPTION_BLEND].value.bool
+-# define CRTDisplay PublicOption[ATI_OPTION_CRT_DISPLAY].value.bool
+-# define CRTScreen PrivateOption[ATI_OPTION_CRT_SCREEN].value.bool
+-# define CSync PublicOption[ATI_OPTION_CSYNC].value.bool
+-# define Devel PrivateOption[ATI_OPTION_DEVEL].value.bool
+-# define HWCursor PublicOption[ATI_OPTION_HWCURSOR].value.bool
++# define ProbeSparse PublicOption[ATI_OPTION_PROBE_SPARSE].value.boolean
++# define Accel PublicOption[ATI_OPTION_ACCEL].value.boolean
++# define BIOSDisplay PrivateOption[ATI_OPTION_BIOS_DISPLAY].value.boolean
++# define Blend PrivateOption[ATI_OPTION_BLEND].value.boolean
++# define CRTDisplay PublicOption[ATI_OPTION_CRT_DISPLAY].value.boolean
++# define CRTScreen PrivateOption[ATI_OPTION_CRT_SCREEN].value.boolean
++# define CSync PublicOption[ATI_OPTION_CSYNC].value.boolean
++# define Devel PrivateOption[ATI_OPTION_DEVEL].value.boolean
++# define HWCursor PublicOption[ATI_OPTION_HWCURSOR].value.boolean
+
+ #ifdef XF86DRI_DEVEL
+
+-# define IsPCI PublicOption[ATI_OPTION_IS_PCI].value.bool
++# define IsPCI PublicOption[ATI_OPTION_IS_PCI].value.boolean
+ # define DMAMode PublicOption[ATI_OPTION_DMA_MODE].value.str
+ # define AGPMode PublicOption[ATI_OPTION_AGP_MODE].value.num
+ # define AGPSize PublicOption[ATI_OPTION_AGP_SIZE].value.num
+-# define LocalTex PublicOption[ATI_OPTION_LOCAL_TEXTURES].value.bool
++# define LocalTex PublicOption[ATI_OPTION_LOCAL_TEXTURES].value.boolean
+ # define BufferSize PublicOption[ATI_OPTION_BUFFER_SIZE].value.num
+
+ #endif /* XF86DRI_DEVEL */
+
+ #ifdef TV_OUT
+
+-# define TvOut PublicOption[ATI_OPTION_TV_OUT].value.bool
++# define TvOut PublicOption[ATI_OPTION_TV_OUT].value.boolean
+ # define TvStd PublicOption[ATI_OPTION_TV_STD].value.str
+
+ #endif /* TV_OUT */
+
+-# define CacheMMIO PublicOption[ATI_OPTION_MMIO_CACHE].value.bool
+-# define TestCacheMMIO PublicOption[ATI_OPTION_TEST_MMIO_CACHE].value.bool
+-# define PanelDisplay PublicOption[ATI_OPTION_PANEL_DISPLAY].value.bool
+-# define ShadowFB PublicOption[ATI_OPTION_SHADOW_FB].value.bool
+-# define SWCursor PublicOption[ATI_OPTION_SWCURSOR].value.bool
++# define CacheMMIO PublicOption[ATI_OPTION_MMIO_CACHE].value.boolean
++# define TestCacheMMIO PublicOption[ATI_OPTION_TEST_MMIO_CACHE].value.boolean
++# define PanelDisplay PublicOption[ATI_OPTION_PANEL_DISPLAY].value.boolean
++# define ShadowFB PublicOption[ATI_OPTION_SHADOW_FB].value.boolean
++# define SWCursor PublicOption[ATI_OPTION_SWCURSOR].value.boolean
+ # define AccelMethod PublicOption[ATI_OPTION_ACCELMETHOD].value.str
+-# define RenderAccel PublicOption[ATI_OPTION_RENDER_ACCEL].value.bool
+-# define LCDSync PrivateOption[ATI_OPTION_LCDSYNC].value.bool
++# define RenderAccel PublicOption[ATI_OPTION_RENDER_ACCEL].value.boolean
++# define LCDSync PrivateOption[ATI_OPTION_LCDSYNC].value.boolean
+
+ # define ReferenceClock \
+ PublicOption[ATI_OPTION_REFERENCE_CLOCK].value.freq.freq
+--
+2.33.1
+
diff --git a/gnu/packages/patches/xf86-video-nouveau-fixup-ABI.patch b/gnu/packages/patches/xf86-video-nouveau-fixup-ABI.patch
new file mode 100644
index 0000000000..a18e3f8ab9
--- /dev/null
+++ b/gnu/packages/patches/xf86-video-nouveau-fixup-ABI.patch
@@ -0,0 +1,64 @@
+From e80e73ced69b15662103d0fd6837db4ce6c6eb5b Mon Sep 17 00:00:00 2001
+From: Dave Airlie <airlied@redhat.com>
+Date: Mon, 13 Jul 2020 09:20:15 +1000
+Subject: [PATCH] nouveau: fixup driver for new X server ABI
+
+---
+ src/compat-api.h | 4 ++++
+ src/nouveau_exa.c | 2 +-
+ src/nv_driver.c | 6 +++---
+ 3 files changed, 8 insertions(+), 4 deletions(-)
+
+diff --git a/src/compat-api.h b/src/compat-api.h
+index fde2f4b..8a1fcf9 100644
+--- a/src/compat-api.h
++++ b/src/compat-api.h
+@@ -102,4 +102,8 @@
+
+ #endif
+
++#if ABI_VIDEODRV_VERSION < SET_ABI_VERSION(25, 2)
++#define secondary_dst slave_dst
++#endif
++
+ #endif
+diff --git a/src/nouveau_exa.c b/src/nouveau_exa.c
+index 55df6f8..db3b112 100644
+--- a/src/nouveau_exa.c
++++ b/src/nouveau_exa.c
+@@ -157,7 +157,7 @@ nouveau_exa_destroy_pixmap(ScreenPtr pScreen, void *priv)
+
+ #ifdef NOUVEAU_PIXMAP_SHARING
+ static Bool
+-nouveau_exa_share_pixmap_backing(PixmapPtr ppix, ScreenPtr slave, void **handle_p)
++nouveau_exa_share_pixmap_backing(PixmapPtr ppix, ScreenPtr secondary, void **handle_p)
+ {
+ struct nouveau_bo *bo = nouveau_pixmap_bo(ppix);
+ struct nouveau_pixmap *nvpix = nouveau_pixmap(ppix);
+diff --git a/src/nv_driver.c b/src/nv_driver.c
+index e72a6b6..f9ab4af 100644
+--- a/src/nv_driver.c
++++ b/src/nv_driver.c
+@@ -559,16 +559,16 @@ redisplay_dirty(ScreenPtr screen, PixmapDirtyUpdatePtr dirty)
+ {
+ RegionRec pixregion;
+
+- PixmapRegionInit(&pixregion, dirty->slave_dst);
++ PixmapRegionInit(&pixregion, dirty->secondary_dst);
+
+- DamageRegionAppend(&dirty->slave_dst->drawable, &pixregion);
++ DamageRegionAppend(&dirty->secondary_dst->drawable, &pixregion);
+ #ifdef HAS_DIRTYTRACKING_ROTATION
+ PixmapSyncDirtyHelper(dirty);
+ #else
+ PixmapSyncDirtyHelper(dirty, &pixregion);
+ #endif
+
+- DamageRegionProcessPending(&dirty->slave_dst->drawable);
++ DamageRegionProcessPending(&dirty->secondary_dst->drawable);
+ RegionUninit(&pixregion);
+ }
+
+--
+2.33.1
+
diff --git a/gnu/packages/patches/xygrib-fix-finding-data.patch b/gnu/packages/patches/xygrib-fix-finding-data.patch
new file mode 100644
index 0000000000..0b718b0eff
--- /dev/null
+++ b/gnu/packages/patches/xygrib-fix-finding-data.patch
@@ -0,0 +1,131 @@
+This is a backport of the commits in PR 235 (“Fixes for packaging on
+linux-like systems”), which was merged upstream:
+
+https://github.com/opengribs/XyGrib/pull/235
+
+It fixes finding resources such as icons, maps and translations installed in
+the data directory. This patch has been merged upstream and can be removed
+with the next release.
+
+Sightly adapted to find openjpg-2.4.
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 64059ab65dae..00cc5d6aea6f 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -7,6 +7,9 @@ set(VERSION_PATCH 6)
+ set(XYGRIB_VERSION "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}")
+ set(XYGRIB_VERSION_DATE "2019-07-05")
+
++option(GNU_PACKAGE "Install into GNU standard directories" OFF)
++option(GEN_TRANSLATIONS "Generate translations" ON)
++
+ set(CMAKE_VERBOSE_MAKEFILE ON)
+
+ # Find includes in corresponding build directories
+@@ -25,7 +28,7 @@ set(CMAKE_INCLUDE_CURRENT_DIR ON)
+ set(CMAKE_CXX_STANDARD 11)
+ #set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O3")
+ if(UNIX AND NOT APPLE)
+-set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -fPIC")
++add_compile_options(-Wall -fPIC)
+ endif()
+
+ # Add support for address etc sanitizers, part 1/2 (other half after ADD_EXECUTABLE)
+@@ -108,17 +111,12 @@ find_path(OPENJPEG_INCLUDE_DIR
+ ~/Library/Frameworks/include
+ /Library/Frameworks/include
+ /usr/local/include
+- /usr/local/include/openjpeg-2.3
+- /usr/include/openjpeg-2.3
+- /usr/local/include/openjpeg-2.1
+- /usr/include/openjpeg-2.1
+- /usr/local/include/openjpeg-2.2
+- /usr/include/openjpeg-2.2
+ /usr/include
+ /sw/include # Fink
+ /opt/local/include # DarwinPorts
+ /opt/csw/include # Blastwave
+ /opt/include
++ PATH_SUFFIXES openjpeg-2.4 openjpeg-2.3 openjpeg-2.2 openjpeg-2.1
+ REQUIRED
+ )
+ include_directories(${OPENJPEG_INCLUDE_DIR})
+@@ -212,22 +210,24 @@ include_directories(${PNG_INCLUDE_DIR})
+ configure_file(cmake/Version.h.in ${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/include/Version.h)
+ include_directories(${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/include)
+
+-if(APPLE)
+-set(PREFIX_BIN ${PROJECT_NAME})
+-set(PREFIX_PKGDATA ${PROJECT_NAME})
+-endif()
+-if(WIN32)
+-set(PREFIX_BIN ".")
+-set(PREFIX_PKGDATA ".")
+-endif()
+-if(UNIX AND NOT APPLE)
+-# This is not exactly a good idea on linux - the code should be changed so that the executable would go to /usr/local/bin and the data to /usr/local/share/XyGrib
+-set(PREFIX_BIN ${PROJECT_NAME})
+-set(PREFIX_PKGDATA ${PROJECT_NAME})
++if(GNU_PACKAGE)
++ include(GNUInstallDirs)
++ set(PREFIX_BIN ${CMAKE_INSTALL_FULL_BINDIR})
++ set(PREFIX_PKGDATA ${CMAKE_INSTALL_FULL_DATADIR}/openGribs/${PROJECT_NAME})
++else()
++ if(WIN32)
++ set(PREFIX_BIN ".")
++ set(PREFIX_PKGDATA ".")
++ else()
++ set(PREFIX_BIN ${PROJECT_NAME})
++ set(PREFIX_PKGDATA ${PROJECT_NAME})
++ endif()
+ endif()
+
+ add_subdirectory(src)
+-add_subdirectory(data/tr)
++if(GEN_TRANSLATIONS)
++ add_subdirectory(data/tr)
++endif()
+
+ # Installation
+ # macOS bundle parameters
+@@ -241,4 +241,14 @@ set_target_properties(${PROJECT_NAME} PROPERTIES MACOSX_BUNDLE_SHORT_VERSION_STR
+ set_target_properties(${PROJECT_NAME} PROPERTIES MACOSX_BUNDLE_BUNDLE_VERSION "${XYGRIB_VERSION}")
+ set_target_properties(${PROJECT_NAME} PROPERTIES MACOSX_BUNDLE_COPYRIGHT "${PROJECT_NAME} Authors")
+ # Install data
+-install(DIRECTORY data DESTINATION ${PREFIX_PKGDATA})
++install(DIRECTORY data DESTINATION ${PREFIX_PKGDATA}
++ PATTERN "CMakeFiles" EXCLUDE
++ PATTERN "CMakeLists.txt" EXCLUDE
++ PATTERN "Makefile" EXCLUDE
++ PATTERN "cmake_install.cmake" EXCLUDE)
++if(GNU_PACKAGE)
++ install(FILES debian/xygrib.desktop
++ DESTINATION ${CMAKE_INSTALL_FULL_DATADIR}/applications)
++ install(FILES debian/xygrib.png
++ DESTINATION ${CMAKE_INSTALL_FULL_DATADIR}/pixmaps)
++endif()
+diff --git a/INSTALL.md b/INSTALL.md
+index 2c9d3ab4da03..1190cc780182 100644
+--- a/INSTALL.md
++++ b/INSTALL.md
+@@ -22,7 +22,19 @@ https://gihub.com/opengribs/XyGrib/releases or on https://opengribs.org in the d
+ - openSUSE Tumbleweed: `sudo zypper install gcc git cmake libqt5-qtbase-devel libpng-devel openjpeg2-devel libnova-devel libproj-devel zlib-devel libbz2-devel
+
+ ## Build and package
++### Options
+
++XyGrib has two CMake options
++- GNU_PACKAGE (DEFAULT: OFF)
++```
++Files will be installed in GNU standard installation directories such as prefix/bin and prefix/share.
++Packagers are recommended to test this option.
++```
++- GEN_TRANSLATION (DEFAULT: ON)
++```
++Create targets to generate translation files.
++Turning this off removes the need for qt-linguist, part of qttools qt5 submodule, during build.
++```
+ ### macOS
+
+ - Get the source
diff --git a/gnu/packages/patches/zstd-CVE-2021-24031_CVE-2021-24032.patch b/gnu/packages/patches/zstd-CVE-2021-24031_CVE-2021-24032.patch
deleted file mode 100644
index 48b5eb18eb..0000000000
--- a/gnu/packages/patches/zstd-CVE-2021-24031_CVE-2021-24032.patch
+++ /dev/null
@@ -1,68 +0,0 @@
-Description: fix race condition allowing attackers to access destination file
- This commit addresses https://github.com/facebook/zstd/issues/2491.
- .
- Note that a downside of this solution is that it is global: `umask()` affects
- all file creation calls in the process. I believe this is safe since
- `fileio.c` functions should only ever be used in the zstd binary, and these
- are (almost) the only files ever created by zstd, and AIUI they're only
- created in a single thread. So we can get away with messing with global state.
- .
- Note that this doesn't change the permissions of files created by `dibio.c`.
- I'm not sure what those should be...
-Author: W. Felix Handte <w@felixhandte.com>
-Origin: upstream
-Bug: https://github.com/facebook/zstd/issues/2491
-Bug-Debian: https://github.com/facebook/zstd/issues/2491
-Applied-Upstream: commit:a774c5797399040af62db21d8a9b9769e005430e
-Reviewed-by: Étienne Mollier <etienne.mollier@mailoo.org>
-Last-Update: 2021-03-03
----
-This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
---- a/programs/fileio.c
-+++ b/programs/fileio.c
-@@ -606,11 +606,11 @@ FIO_openDstFile(FIO_prefs_t* const prefs
- FIO_remove(dstFileName);
- } }
-
-- { FILE* const f = fopen( dstFileName, "wb" );
-+ { const int old_umask = UTIL_umask(0177); /* u-x,go-rwx */
-+ FILE* const f = fopen( dstFileName, "wb" );
-+ UTIL_umask(old_umask);
- if (f == NULL) {
- DISPLAYLEVEL(1, "zstd: %s: %s\n", dstFileName, strerror(errno));
-- } else if(srcFileName != NULL && strcmp (srcFileName, stdinmark)) {
-- chmod(dstFileName, 00600);
- }
- return f;
- }
---- a/programs/util.c
-+++ b/programs/util.c
-@@ -54,6 +54,15 @@ int UTIL_getFileStat(const char* infilen
- return 1;
- }
-
-+int UTIL_umask(int mode) {
-+#if PLATFORM_POSIX_VERSION > 0
-+ return umask(mode);
-+#else
-+ /* do nothing, fake return value */
-+ return mode;
-+#endif
-+}
-+
- int UTIL_setFileStat(const char *filename, stat_t *statbuf)
- {
- int res = 0;
---- a/programs/util.h
-+++ b/programs/util.h
-@@ -136,6 +136,10 @@ int UTIL_isSameFile(const char* file1, c
- int UTIL_compareStr(const void *p1, const void *p2);
- int UTIL_isCompressedFile(const char* infilename, const char *extensionList[]);
- const char* UTIL_getFileExtension(const char* infilename);
-+/**
-+ * Wraps umask(). Does nothing when the platform doesn't have that concept.
-+ */
-+int UTIL_umask(int mode);
-
- #ifndef _MSC_VER
- U32 UTIL_isFIFO(const char* infilename);
diff --git a/gnu/packages/patches/zziplib-CVE-2018-16548.patch b/gnu/packages/patches/zziplib-CVE-2018-16548.patch
deleted file mode 100644
index a17c6a9768..0000000000
--- a/gnu/packages/patches/zziplib-CVE-2018-16548.patch
+++ /dev/null
@@ -1,49 +0,0 @@
-The following 3 patches applied to 0.13.69 in this order, combined:
-https://github.com/gdraheim/zziplib/commit/9411bde3e4a70a81ff3ffd256b71927b2d90dcbb.patch
-https://github.com/gdraheim/zziplib/commit/d2e5d5c53212e54a97ad64b793a4389193fec687.patch
-https://github.com/gdraheim/zziplib/commit/0e1dadb05c1473b9df2d7b8f298dab801778ef99.patch
-
-diff --git a/test/test.zip b/test/test.zip
-index 2c992ea..952d475 100644
-Binary files a/test/test.zip and b/test/test.zip differ
-diff --git a/zzip/zip.c b/zzip/zip.c
-index 14e2e06..f97a40a 100644
---- a/zzip/zip.c
-+++ b/zzip/zip.c
-@@ -472,9 +472,15 @@ __zzip_parse_root_directory(int fd,
- } else
- {
- if (io->fd.seeks(fd, zz_rootseek + zz_offset, SEEK_SET) < 0)
-+ {
-+ free(hdr0);
- return ZZIP_DIR_SEEK;
-+ }
- if (io->fd.read(fd, &dirent, sizeof(dirent)) < __sizeof(dirent))
-+ {
-+ free(hdr0);
- return ZZIP_DIR_READ;
-+ }
- d = &dirent;
- }
-
-@@ -574,11 +580,18 @@ __zzip_parse_root_directory(int fd,
-
- if (hdr_return)
- *hdr_return = hdr0;
-+ else
-+ {
-+ /* If it is not assigned to *hdr_return, it will never be free()'d */
-+ free(hdr0);
-+ }
- } /* else zero (sane) entries */
-+ else
-+ free(hdr0);
- # ifndef ZZIP_ALLOW_MODULO_ENTRIES
-- return (entries != zz_entries ? ZZIP_CORRUPTED : 0);
-+ return (entries != zz_entries) ? ZZIP_CORRUPTED : 0;
- # else
-- return ((entries & (unsigned)0xFFFF) != zz_entries ? ZZIP_CORRUPTED : 0);
-+ return ((entries & (unsigned)0xFFFF) != zz_entries) ? ZZIP_CORRUPTED : 0;
- # endif
- }
-
diff --git a/gnu/packages/patchutils.scm b/gnu/packages/patchutils.scm
index 6eaf0e371c..56ea05efdc 100644
--- a/gnu/packages/patchutils.scm
+++ b/gnu/packages/patchutils.scm
@@ -355,7 +355,7 @@ you to figure out what is going on in that merge you keep avoiding.")
;; as the python modules in this package in the wsgi.py file,
;; as this will ensure they are available at runtime.
(define pythonpath
- (string-append (getenv "PYTHONPATH")
+ (string-append (getenv "GUIX_PYTHONPATH")
":"
(site-packages inputs outputs)))
(display
@@ -390,22 +390,22 @@ application = get_wsgi_application()\n") port)))))
(for-each (lambda (directory)
(copy-recursively
directory
- (string-append out-site-packages directory)))
+ (string-append out-site-packages "/" directory)))
'(;; Contains the python code
"patchwork"
;; Contains the templates for the generated HTML
"templates"))
(delete-file-recursively
- (string-append out-site-packages "patchwork/tests"))
+ (string-append out-site-packages "/patchwork/tests"))
;; Install patchwork related tools
(for-each (lambda (file)
(install-file file (string-append out "/bin")))
(list
(string-append out-site-packages
- "patchwork/bin/parsemail.sh")
+ "/patchwork/bin/parsemail.sh")
(string-append out-site-packages
- "patchwork/bin/parsemail-batch.sh")))
+ "/patchwork/bin/parsemail-batch.sh")))
;; Collect the static assets, this includes JavaScript, CSS and
;; fonts. This is a standard Django process when running a
diff --git a/gnu/packages/pcre.scm b/gnu/packages/pcre.scm
index bc0e285001..dbe0562532 100644
--- a/gnu/packages/pcre.scm
+++ b/gnu/packages/pcre.scm
@@ -5,7 +5,7 @@
;;; Copyright © 2016 Leo Famulari <leo@famulari.name>
;;; Copyright © 2017 Marius Bakke <mbakke@fastmail.com>
;;; Copyright © 2017 Ludovic Courtès <ludo@gnu.org>
-;;; Copyright © 2017 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2017, 2021 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
;;; Copyright © 2021 Jean-Baptiste Volatier <jbv@pm.me>
;;; Copyright © 2021 Simon Tournier <zimon.toutoune@gmail.com>
@@ -30,6 +30,7 @@
#:use-module (gnu packages compression)
#:use-module (gnu packages readline)
#:use-module (gnu packages)
+ #:use-module (guix utils)
#:use-module (guix packages)
#:use-module (guix download)
#:use-module (guix build-system gnu))
@@ -37,18 +38,14 @@
(define-public pcre
(package
(name "pcre")
- (version "8.44")
+ (version "8.45")
(source (origin
(method url-fetch)
- (uri (list
- (string-append "ftp://ftp.csx.cam.ac.uk"
- "/pub/software/programming/pcre/"
- "pcre-" version ".tar.bz2")
- (string-append "mirror://sourceforge/pcre/pcre/"
- version "/pcre-" version ".tar.bz2")))
+ (uri (string-append "https://ftp.pcre.org/pub/pcre/pcre-"
+ version ".tar.bz2"))
(sha256
(base32
- "0v9nk51wh55pcbnf2jr36yarz8ayajn6d7ywiq2wagivn9c8c40r"))))
+ "1f7zichy6iimmkfrqdl575sdlm795cyc75szgg1vc2xvsbf6zbjd"))))
(build-system gnu-build-system)
(outputs '("out" ;library & headers
"bin" ;depends on Readline (adds 20MiB to the closure)
@@ -58,7 +55,7 @@
("readline" ,readline)
("zlib" ,zlib)))
(arguments
- '(#:disallowed-references ("doc")
+ `(#:disallowed-references ("doc")
#:configure-flags '("--enable-utf"
"--enable-pcregrep-libz"
"--enable-pcregrep-libbz2"
@@ -66,7 +63,10 @@
"--enable-unicode-properties"
"--enable-pcre16"
"--enable-pcre32"
- "--enable-jit")
+ ;; pcretest fails on powerpc32.
+ ,@(if (target-ppc32?)
+ '()
+ `("--enable-jit")))
#:phases (modify-phases %standard-phases
(add-after 'install 'move-static-libs
(lambda* (#:key outputs #:allow-other-keys)
@@ -77,8 +77,7 @@
(link lib (string-append static "/"
(basename lib)))
(delete-file lib))
- (find-files source "\\.a$"))
- #t))))))
+ (find-files source "\\.a$"))))))))
(synopsis "Perl Compatible Regular Expressions")
(description
"The PCRE library is a set of functions that implement regular expression
@@ -91,14 +90,14 @@ POSIX regular expression API.")
(define-public pcre2
(package
(name "pcre2")
- (version "10.35")
+ (version "10.37")
(source (origin
(method url-fetch)
(uri (string-append "mirror://sourceforge/pcre/pcre2/"
version "/pcre2-" version ".tar.bz2"))
(sha256
(base32
- "04s6kmk9qdd4rjz477h547j4bx7hfz0yalpvrm381rqc5ghaijww"))))
+ "0w6jaswjmg3bc0wsw6msn5bvk66p90kf2asnnj9rhll0idpak5ad"))))
(build-system gnu-build-system)
(inputs `(("bzip2" ,bzip2)
("readline" ,readline)
@@ -110,15 +109,17 @@ POSIX regular expression API.")
"--enable-pcre2test-libreadline"
"--enable-pcre2-16"
"--enable-pcre2-32"
- "--enable-jit"
+ ;; pcre2_jit_test fails on powerpc32.
+ ,@(if (target-ppc32?)
+ '()
+ `("--enable-jit"))
"--disable-static")
#:phases
(modify-phases %standard-phases
(add-after 'unpack 'patch-paths
(lambda _
(substitute* "RunGrepTest"
- (("/bin/echo") (which "echo")))
- #t)))))
+ (("/bin/echo") (which "echo"))))))))
(synopsis "Perl Compatible Regular Expressions")
(description
"The PCRE library is a set of functions that implement regular expression
@@ -127,16 +128,3 @@ own native API, as well as a set of wrapper functions that correspond to the
POSIX regular expression API.")
(license license:bsd-3)
(home-page "https://www.pcre.org/")))
-
-(define-public pcre2-10.36
- (package
- (inherit pcre2)
- (name "pcre2")
- (version "10.36")
- (source (origin
- (method url-fetch)
- (uri (string-append "mirror://sourceforge/pcre/pcre2/"
- version "/pcre2-" version ".tar.bz2"))
- (sha256
- (base32
- "0p3699msps07p40g9426lvxa3b41rg7k2fn7qxl2jm0kh4kkkvx9"))))))
diff --git a/gnu/packages/pdf.scm b/gnu/packages/pdf.scm
index be63ccc434..f08347e61c 100644
--- a/gnu/packages/pdf.scm
+++ b/gnu/packages/pdf.scm
@@ -1,7 +1,7 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2013, 2015, 2016 Andreas Enge <andreas@enge.fr>
;;; Copyright © 2014 Mark H Weaver <mhw@netris.org>
-;;; Copyright © 2014, 2015, 2016, 2018, 2019 Ricardo Wurmus <rekado@elephly.net>
+;;; Copyright © 2014, 2015, 2016, 2018, 2019, 2021 Ricardo Wurmus <rekado@elephly.net>
;;; Copyright © 2015 Paul van der Walt <paul@denknerd.org>
;;; Copyright © 2016 Roel Janssen <roel@gnu.org>
;;; Copyright © 2016 Nikita <nikita@n0.is>
@@ -21,6 +21,7 @@
;;; Copyright © 2020 Michael Rohleder <mike@rohleder.de>
;;; Copyright © 2020 Timotej Lazar <timotej.lazar@araneo.si>
;;; Copyright © 2020 Maxim Cournoyer <maxim.cournoyer@gmail.com>
+;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -55,6 +56,7 @@
#:use-module (gnu packages backup)
#:use-module (gnu packages base)
#:use-module (gnu packages bash)
+ #:use-module (gnu packages build-tools)
#:use-module (gnu packages check)
#:use-module (gnu packages compression)
#:use-module (gnu packages cups)
@@ -79,6 +81,7 @@
#:use-module (gnu packages linux)
#:use-module (gnu packages lua)
#:use-module (gnu packages man)
+ #:use-module (gnu packages markup)
#:use-module (gnu packages pcre)
#:use-module (gnu packages perl)
#:use-module (gnu packages photo)
@@ -97,6 +100,7 @@
#:use-module (gnu packages tcl)
#:use-module (gnu packages tls)
#:use-module (gnu packages web)
+ #:use-module (gnu packages webkit)
#:use-module (gnu packages xdisorg)
#:use-module (gnu packages xml)
#:use-module (gnu packages xorg)
@@ -223,14 +227,14 @@ please install the @code{flyer-composer-gui} package.")))
(define-public poppler
(package
(name "poppler")
- (version "0.86.1")
+ (version "21.07.0")
(source (origin
(method url-fetch)
(uri (string-append "https://poppler.freedesktop.org/poppler-"
version ".tar.xz"))
(sha256
(base32
- "0v3z4mk1rr8i0c4cfkab7pnxdbil30j4cm4w6cqlq6cfghkhlqxg"))))
+ "1m54hsi8z6c13jdbjwz55flkra1mahmkw2igavbf8p86d2gv4sp2"))))
(build-system cmake-build-system)
;; FIXME:
;; use libcurl: no
@@ -256,14 +260,22 @@ please install the @code{flyer-composer-gui} package.")))
("glib" ,glib "bin") ; glib-mkenums, etc.
("gobject-introspection" ,gobject-introspection)))
(arguments
- `(#:tests? #f ; no test data provided with the tarball
+ `(#:tests? #f ;no test data provided with the tarball
#:configure-flags
(let* ((out (assoc-ref %outputs "out"))
(lib (string-append out "/lib")))
(list "-DENABLE_UNSTABLE_API_ABI_HEADERS=ON" ;to install header files
"-DENABLE_ZLIB=ON"
+ "-DENABLE_BOOST=OFF" ;disable Boost to save size
(string-append "-DCMAKE_INSTALL_LIBDIR=" lib)
- (string-append "-DCMAKE_INSTALL_RPATH=" lib)))))
+ (string-append "-DCMAKE_INSTALL_RPATH=" lib)))
+ ,@(if (%current-target-system)
+ `(#:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'set-PKG_CONFIG
+ (lambda _
+ (setenv "PKG_CONFIG" ,(pkg-config-for-target))))))
+ '())))
(synopsis "PDF rendering library")
(description
"Poppler is a PDF rendering library based on the xpdf-3.0 code base.")
@@ -317,7 +329,8 @@ When present, Poppler is able to correctly render CJK and Cyrillic text.")
(uri (pypi-uri "python-poppler-qt5" version))
(sha256
(base32
- "0b82gm4i75q5v19kfbq0h4y0b2vcwr2213zkhxh6l0h45kdndmxd"))))
+ "0b82gm4i75q5v19kfbq0h4y0b2vcwr2213zkhxh6l0h45kdndmxd"))
+ (patches (search-patches "python-poppler-qt5-fix-build.patch"))))
(build-system python-build-system)
(arguments
`(;; There are no tests. The check phase just causes a rebuild.
@@ -638,7 +651,8 @@ by using the poppler rendering engine.")
(files '("lib/zathura")))))
(build-system meson-build-system)
(arguments
- `(#:phases (modify-phases %standard-phases
+ `(#:meson ,meson-0.59
+ #:phases (modify-phases %standard-phases
(add-before 'check 'start-xserver
;; Tests require a running X server.
(lambda* (#:key inputs #:allow-other-keys)
@@ -854,9 +868,9 @@ program capable of converting PDF into other formats.")
#:phases
(modify-phases %standard-phases
(replace 'configure
- (lambda _
+ (lambda* (#:key outputs #:allow-other-keys)
(substitute* "qpdfview.pri"
- (("/usr") (assoc-ref %outputs "out")))
+ (("/usr") (assoc-ref outputs "out")))
(invoke "qmake" "qpdfview.pro"))))))
(home-page "https://launchpad.net/qpdfview")
(synopsis "Tabbed document viewer")
@@ -1134,10 +1148,14 @@ information for every pixel as the input.")
(substitute* "mk/Autoconf.mk"
(("/bin/echo") "echo")
(("/sbin/ldconfig -p") "echo lib")) #t))
+ (add-before 'build 'set-fcommon
+ (lambda _
+ (setenv "CFLAGS" "-fcommon")))
(delete 'configure))
#:tests? #f
- #:make-flags (list ,(string-append "CC=" (cc-for-target))
- (string-append "prefix=" (assoc-ref %outputs "out")))))
+ #:make-flags
+ (list (string-append "CC=" ,(cc-for-target))
+ (string-append "prefix=" (assoc-ref %outputs "out")))))
(inputs `(("libjpeg" ,libjpeg-turbo)
("curl" ,curl)
("libtiff" ,libtiff)
@@ -1159,7 +1177,6 @@ information for every pixel as the input.")
(description
"fbida contains a few applications for viewing and editing images on
the framebuffer.")
-
(license license:gpl2+)))
(define-public pdf2svg
@@ -1364,7 +1381,7 @@ multiple files.")
(define-public pdfpc
(package
(name "pdfpc")
- (version "4.4.1")
+ (version "4.5.0")
(source
(origin
(method git-fetch)
@@ -1373,18 +1390,31 @@ multiple files.")
(commit (string-append "v" version))))
(file-name (git-file-name name version))
(sha256
- (base32 "11n925c5jj3yfwnqkgxzqrmsrpqh8ls1g4idmqqzpsanpam1xvna"))))
+ (base32 "0bmy51w6ypz927hxwp5g7wapqvzqmsi3w32rch6i3f94kg1152ck"))))
(build-system cmake-build-system)
- (arguments '(#:tests? #f)) ; no test target
+ (arguments
+ '(#:tests? #f ; no test target
+ #:phases
+ (modify-phases %standard-phases
+ ;; This is really a bug in Vala.
+ ;; https://github.com/pdfpc/pdfpc/issues/594
+ (add-after 'unpack 'fix-vala-API-conflict
+ (lambda _
+ (substitute* "src/classes/action/movie.vala"
+ (("info.from_caps\\(caps\\)")
+ "Gst.Video.info_from_caps(out info, caps)")))))))
(inputs
`(("cairo" ,cairo)
+ ("discount" ,discount) ; libmarkdown
("gtk+" ,gtk+)
("gstreamer" ,gstreamer)
("gst-plugins-base" ,gst-plugins-base)
+ ("json-glib" ,json-glib)
("libgee" ,libgee)
("poppler" ,poppler)
("pango" ,pango)
- ("vala" ,vala)))
+ ("vala" ,vala)
+ ("webkitgtk" ,webkitgtk-with-libsoup2)))
(native-inputs
`(("pkg-config" ,pkg-config)))
(home-page "https://pdfpc.github.io/")
@@ -1396,7 +1426,7 @@ is able to show a normal presentation window on one screen, while showing a
more sophisticated overview on the other one providing information like a
picture of the next slide, as well as the left over time till the end of the
presentation. The input files processed by pdfpc are PDF documents.")
- (license license:gpl2+)))
+ (license license:gpl3+)))
(define-public paps
(package
diff --git a/gnu/packages/pep.scm b/gnu/packages/pep.scm
index 6685691285..7ae77d1776 100644
--- a/gnu/packages/pep.scm
+++ b/gnu/packages/pep.scm
@@ -244,7 +244,7 @@ ENGINE_INC_PATH=~a/include
`(("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)")
diff --git a/gnu/packages/perl-check.scm b/gnu/packages/perl-check.scm
index 641e026673..bcdef685cd 100644
--- a/gnu/packages/perl-check.scm
+++ b/gnu/packages/perl-check.scm
@@ -971,7 +971,7 @@ bit more fine-grained control over test suites.")
(define-public perl-test-needs
(package
(name "perl-test-needs")
- (version "0.002005")
+ (version "0.002009")
(source
(origin
(method url-fetch)
@@ -981,7 +981,7 @@ bit more fine-grained control over test suites.")
".tar.gz"))
(sha256
(base32
- "16gkgpmr9hvkz382iaqd3500269lk2d44fqaw3dsrvc66nc36kss"))))
+ "1hsagkxw0b0xf9qk4i4c74dkjskrk23jcsxhb3graqfi78cj272p"))))
(build-system perl-build-system)
(home-page
"https://metacpan.org/release/Test-Needs")
diff --git a/gnu/packages/perl.scm b/gnu/packages/perl.scm
index 3fb5a7c3a2..c90ff7f46f 100644
--- a/gnu/packages/perl.scm
+++ b/gnu/packages/perl.scm
@@ -13,7 +13,7 @@
;;; Copyright © 2016 Ben Woodcroft <donttrustben@gmail.com>
;;; Copyright © 2016, 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
;;; Copyright © 2017 Raoul J.P. Bonnal <ilpuccio.febo@gmail.com>
-;;; Copyright © 2017, 2018 Marius Bakke <mbakke@fastmail.com>
+;;; Copyright © 2017, 2018, 2020, 2021 Marius Bakke <marius@gnu.org>
;;; Copyright © 2017 Adriano Peluso <catonano@gmail.com>
;;; Copyright © 2017, 2018–2021 Tobias Geerinckx-Rice <me@tobias.gr>
;;; Copyright © 2017 Leo Famulari <leo@famulari.name>
@@ -31,6 +31,7 @@
;;; Copyright © 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;; Copyright © 2021 Xinglu Chen <public@yoctocell.xyz>
;;; Copyright © 2021 Raghav Gururajan <rg@raghavgururajan.name>
+;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -91,18 +92,17 @@
;; Yeah, Perl... It is required early in the bootstrap process by Linux.
(package
(name "perl")
- (version "5.30.2")
+ (version "5.34.0")
(source (origin
(method url-fetch)
(uri (string-append "mirror://cpan/src/5.0/perl-"
version ".tar.gz"))
(sha256
(base32
- "128nfdxcvxfn5kq55qcfrx2851ys8hv794dcdxbyny8rm7w7vnv6"))
+ "16mywn5afpv1mczv9dlc1w84rbgjgrr0pyr4c0hhb2wnif0zq7jm"))
(patches (search-patches
"perl-no-sys-dirs.patch"
"perl-autosplit-default-time.patch"
- "perl-deterministic-ordering.patch"
"perl-reproducible-build-date.patch"))))
(build-system gnu-build-system)
(arguments
@@ -124,44 +124,36 @@
#:phases
(modify-phases %standard-phases
(add-before 'configure 'setup-configure
- (lambda _
+ (lambda* (#:key inputs #:allow-other-keys)
;; Use the right path for `pwd'.
- ;; TODO: use coreutils from INPUTS instead of 'which'
- ;; in next rebuild cycle, see fixup below.
(substitute* "dist/PathTools/Cwd.pm"
- (("/bin/pwd")
- (which "pwd")))
+ (("'/bin/pwd'")
+ (string-append "'" (search-input-file inputs "bin/pwd") "'")))
;; Build in GNU89 mode to tolerate C++-style comment in libc's
;; <bits/string3.h>.
(substitute* "cflags.SH"
(("-std=c89")
- "-std=gnu89"))
- #t))
+ "-std=gnu89"))))
,@(if (%current-target-system)
`((add-after 'unpack 'unpack-cross
(lambda* (#:key native-inputs inputs #:allow-other-keys)
(let ((cross-checkout
- (assoc-ref native-inputs "perl-cross"))
- (cross-patch
- (assoc-ref native-inputs "perl-cross-patch")))
+ (assoc-ref native-inputs "perl-cross")))
(rename-file "Artistic" "Artistic.perl")
(rename-file "Copying" "Copying.perl")
- (copy-recursively cross-checkout ".")
- (format #t "Applying ~a\n" cross-patch)
- (invoke "patch" "-p1" "-i" cross-patch))
- (let ((bash (assoc-ref inputs "bash")))
+ (copy-recursively cross-checkout "."))
+ (let ((bash (search-input-file inputs "bin/bash")))
(substitute* '("Makefile.config.SH"
"cnf/config.guess"
"cnf/config.sub"
"cnf/configure"
"cnf/configure_misc.sh"
"miniperl_top")
- (("! */bin/sh") (string-append "! " bash "/bin/bash"))
- ((" /bin/sh") (string-append bash "/bin/bash")))
+ (("! */bin/sh") (string-append "! " bash))
+ ((" /bin/sh") bash))
(substitute* '("ext/Errno/Errno_pm.PL")
- (("\\$cpp < errno.c") "$Config{cc} -E errno.c")))
- #t))
+ (("\\$cpp < errno.c") "$Config{cc} -E errno.c")))))
(replace 'configure
(lambda* (#:key configure-flags outputs inputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))
@@ -177,22 +169,18 @@
(lambda (x) (or (string-prefix? "-d" x)
(string-prefix? "-Dcc=" x))))
configure-flags)))
- (bash (assoc-ref inputs "bash"))
- (coreutils (assoc-ref inputs "coreutils")))
+ (bash (assoc-ref inputs "bash-minimal")))
(format (current-error-port)
- "running ./configure ~a\n" (string-join configure-flags))
+ "running ./configure ~a\n"
+ (string-join configure-flags))
(apply invoke (cons "./configure" configure-flags))
(substitute* "config.sh"
(((string-append store-directory "/[^/]*-bash-[^/]*"))
bash))
(substitute* '("config.h")
(("^#define SH_PATH .*")
- (string-append "#define SH_PATH \"" bash "/bin/bash\"\n")))
- ;;TODO: fix this in setup-configure next rebuild cycle
- (substitute* "dist/PathTools/Cwd.pm"
- (((string-append store-directory "/[^/]*-coreutils-[^/]*"))
- coreutils))
- #t)))
+ (string-append "#define SH_PATH \""
+ bash "/bin/bash\"\n"))))))
(add-after 'build 'touch-non-built-files-for-install
(lambda _
;; `make install' wants to install these although they do
@@ -206,8 +194,7 @@
'("Pod-Usage/blib/script/pod2text"
"Pod-Usage/blib/script/pod2usage"
"Pod-Checker/blib/script/podchecker"
- "Pod-Parser/blib/script/podselect")))
- #t)))
+ "Pod-Parser/blib/script/podselect"))))))
`((replace 'configure
(lambda* (#:key configure-flags #:allow-other-keys)
(format #t "Perl configure flags: ~s~%" configure-flags)
@@ -238,13 +225,12 @@
(("libpth => .*$")
(string-append "libpth => '" libc
"/lib',\n"))))
- config2)
- #t))))))
+ config2)))))))
(inputs
- (if (%current-target-system)
- `(("bash" ,bash-minimal)
- ("coreutils" ,coreutils))
- '()))
+ (append (list coreutils-minimal)
+ (if (%current-target-system)
+ (list bash-minimal)
+ '())))
(native-inputs
(if (%current-target-system)
`(("perl-cross"
@@ -252,11 +238,10 @@
(method git-fetch)
(uri (git-reference
(url "https://github.com/arsv/perl-cross")
- (commit "1.3.3")))
- (file-name (git-file-name "perl-cross" "1.3.3"))
+ (commit "1.3.6")))
+ (file-name (git-file-name "perl-cross" "1.3.6"))
(sha256
- (base32 "065qbl1x44maykaj8p8za0b6qxj74bz7fi2zsrlydir1mqb1js3d"))))
- ("perl-cross-patch" ,@(search-patches "perl-cross.patch")))
+ (base32 "0k5vyj40czbkfl7r3dcwxpc7dvdlp2xliaav358bviq3dq9vq9bb")))))
'()))
(native-search-paths (list (search-path-specification
(variable "PERL5LIB")
@@ -5126,6 +5111,25 @@ vaguely inspired by John Ousterhout's Tk_ParseArgv.")
(home-page "https://metacpan.org/release/Getopt-Tabular")
(license (package-license perl))))
+(define-public perl-gettext
+ (package
+ (name "perl-gettext")
+ (version "1.07")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "mirror://cpan/authors/id/P/PV/PVANDRY"
+ "/gettext-" version ".tar.gz"))
+ (sha256
+ (base32
+ "05cwqjxxary11di03gg3fm6j9lbvg1dr2wpr311c1rwp8salg7ch"))))
+ (build-system perl-build-system)
+ (home-page "https://metacpan.org/release/gettext")
+ (synopsis "Perl bindings for POSIX i18n gettext functions")
+ (description
+ "Locale::gettext provides an object oriented interface to the
+internationalization functions provided by the C library.")
+ (license license:perl-license)))
+
(define-public perl-graph
(package
(name "perl-graph")
@@ -8656,13 +8660,39 @@ available.")
"01xifj83dv492lxixijmg6va02rf3ydlxly0a9slmx22r6qa1drh"))))
(build-system perl-build-system)
(propagated-inputs
- `(("perl-devel-symdump" ,perl-devel-symdump)))
+ `(("perl-devel-symdump" ,perl-devel-symdump)
+ ("perl-pod-parser" ,perl-pod-parser)))
(home-page "https://metacpan.org/release/Pod-Coverage")
(synopsis "Check for comprehensive documentation of a module")
(description "This module provides a mechanism for determining if the pod
for a given module is comprehensive.")
(license (package-license perl))))
+(define-public perl-pod-parser
+ (package
+ (name "perl-pod-parser")
+ (version "1.63")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append
+ "mirror://cpan/authors/id/M/MA/MAREKR/Pod-Parser-"
+ version ".tar.gz"))
+ (sha256
+ (base32
+ "1k8clxxdjag56zm6cv38c3q81gj7xphfhh98l21jynwp55hvbq6v"))))
+ (build-system perl-build-system)
+ (home-page "https://metacpan.org/release/Pod-Parser")
+ (synopsis "Modules for parsing/translating POD format documents")
+ (description
+ "@code{Pod::Parser} is a base class for creating POD filters and
+translators. It handles most of the effort involved with parsing the POD
+sections from an input stream, leaving subclasses free to be concerned only
+with performing the actual translation of text.
+
+@emph{NOTE}: This module is considered legacy. New projects should prefer
+@code{Pod::Simple} instead.")
+ (license license:perl-license)))
+
(define-public perl-pod-simple
(package
(name "perl-pod-simple")
@@ -11492,7 +11522,7 @@ MYMETA.yml.")
(define-public perl-module-build
(package
(name "perl-module-build")
- (version "0.4229")
+ (version "0.4231")
(source
(origin
(method url-fetch)
@@ -11500,7 +11530,7 @@ MYMETA.yml.")
"Module-Build-" version ".tar.gz"))
(sha256
(base32
- "064c03wxia7jz0i578awj4srykj0nnigm4p5r0dv0559rnk93r0z"))))
+ "05xpn8qg814y49vrih16zfr9iiwb7pmdf57ahjnc2h0p5illq3vy"))))
(build-system perl-build-system)
(propagated-inputs
`(("perl-cpan-meta" ,perl-cpan-meta)))
@@ -11790,9 +11820,8 @@ prop, vhea, vmtx and the reading and writing of all other table types.")
;; This is needed for tests
(add-after 'unpack 'set-TZDIR
(lambda* (#:key inputs #:allow-other-keys)
- (setenv "TZDIR" (string-append (assoc-ref inputs "tzdata")
- "/share/zoneinfo"))
- #t)))))
+ (setenv "TZDIR"
+ (search-input-directory inputs "share/zoneinfo")))))))
(native-inputs
`(("perl-module-build" ,perl-module-build)
("tzdata" ,tzdata-for-tests)))
diff --git a/gnu/packages/perl6.scm b/gnu/packages/perl6.scm
index e02dd757e5..4639976961 100644
--- a/gnu/packages/perl6.scm
+++ b/gnu/packages/perl6.scm
@@ -62,6 +62,7 @@
(lambda* (#:key inputs outputs #:allow-other-keys)
(let ((out (assoc-ref outputs "out"))
(pkg-config (assoc-ref inputs "pkg-config")))
+ (setenv "CFLAGS" "-fcommon")
(setenv "LDFLAGS" (string-append "-Wl,-rpath=" out "/lib"))
(invoke "perl" "Configure.pl"
"--prefix" out
diff --git a/gnu/packages/photo.scm b/gnu/packages/photo.scm
index 6364323731..34d9cc3dd0 100644
--- a/gnu/packages/photo.scm
+++ b/gnu/packages/photo.scm
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2014, 2015, 2017, 2019 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2014, 2015, 2017, 2019, 2021 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2015 Ricardo Wurmus <rekado@elephly.net>
;;; Copyright © 2015, 2017 Andreas Enge <andreas@enge.fr>
;;; Copyright © 2016, 2017, 2018, 2019, 2021 Efraim Flashner <efraim@flashner.co.il>
@@ -41,6 +41,7 @@
#:use-module (gnu packages autotools)
#:use-module (gnu packages base)
#:use-module (gnu packages boost)
+ #:use-module (gnu packages build-tools)
#:use-module (gnu packages check)
#:use-module (gnu packages cmake)
#:use-module (gnu packages compression)
@@ -156,13 +157,13 @@
"/bin"))
":"))
(gi-typelib-path (getenv "GI_TYPELIB_PATH"))
- (python-path (getenv "PYTHONPATH")))
+ (python-path (getenv "GUIX_PYTHONPATH")))
(for-each
(lambda (program)
(wrap-program program
`("PATH" ":" prefix (,path))
`("GI_TYPELIB_PATH" ":" prefix (,gi-typelib-path))
- `("PYTHONPATH" ":" prefix (,python-path))))
+ `("GUIX_PYTHONPATH" ":" prefix (,python-path))))
(map (lambda (name)
(string-append out "/bin/" name))
'("analyze-pv-structure"
@@ -503,18 +504,12 @@ photographic equipment.")
(substitute* "CMakeLists.txt"
(("\\$\\{LLVM_INSTALL_PREFIX\\}")
(assoc-ref %build-inputs "clang")))))
- (add-before 'configure 'set-LDFLAGS-and-CPATH
- (lambda* (#:key inputs outputs #:allow-other-keys)
+ (add-before 'configure 'set-LDFLAGS
+ (lambda* (#:key outputs #:allow-other-keys)
(setenv "LDFLAGS"
(string-append
"-Wl,-rpath="
- (assoc-ref outputs "out") "/lib/darktable"))
-
- ;; Ensure the OpenEXR headers are found.
- (setenv "CPATH"
- (string-append (assoc-ref inputs "ilmbase")
- "/include/OpenEXR:"
- (or (getenv "CPATH") "")))))
+ (assoc-ref outputs "out") "/lib/darktable"))))
(add-after 'install 'wrap-program
(lambda* (#:key inputs outputs #:allow-other-keys)
(wrap-program (string-append (assoc-ref outputs "out")
@@ -549,7 +544,7 @@ photographic equipment.")
("graphicsmagick" ,graphicsmagick)
("gsettings-desktop-schemas" ,gsettings-desktop-schemas)
("gtk+" ,gtk+)
- ("ilmbase" ,ilmbase)
+ ("imath" ,imath)
("iso-codes" ,iso-codes) ;optional, for language names in the preferences
("json-glib" ,json-glib)
("lcms" ,lcms)
@@ -561,14 +556,14 @@ photographic equipment.")
("libpng" ,libpng)
("librsvg" ,librsvg)
("libsecret" ,libsecret) ;optional, for storing passwords
- ("libsoup" ,libsoup)
+ ("libsoup" ,libsoup-minimal-2)
("libtiff" ,libtiff)
("libwebp" ,libwebp) ;optional, for WebP support
("libxml2" ,libxml2)
("libxslt" ,libxslt)
("lua" ,lua) ;optional, for plugins
("opencl-icd-loader" ,opencl-icd-loader) ;optional, for OpenCL support
- ("openexr" ,openexr-2) ;optional, for EXR import/export
+ ("openexr" ,openexr) ;optional, for EXR import/export
("openjpeg" ,openjpeg) ;optional, for JPEG2000 export
("osm-gps-map" ,osm-gps-map) ;optional, for geotagging view
("pugixml" ,pugixml)
@@ -645,6 +640,7 @@ such as Batch image processing.")
(build-system meson-build-system)
(arguments
`(#:glib-or-gtk? #t
+ #:meson ,meson-0.59 ;fails to build with Meson 0.60
#:phases
(modify-phases %standard-phases
(add-after 'unpack 'skip-gtk-update-icon-cache
@@ -658,10 +654,10 @@ such as Batch image processing.")
(lambda* (#:key inputs outputs #:allow-other-keys)
(let ((out (assoc-ref outputs "out"))
(gi-typelib-path (getenv "GI_TYPELIB_PATH"))
- (python-path (getenv "PYTHONPATH")))
+ (python-path (getenv "GUIX_PYTHONPATH")))
(wrap-program (string-append out "/bin/entangle")
`("GI_TYPELIB_PATH" ":" prefix (,gi-typelib-path))
- `("PYTHONPATH" ":" prefix (,python-path))))
+ `("GUIX_PYTHONPATH" ":" prefix (,python-path))))
#t)))))
(native-inputs
`(("cmake" ,cmake)
@@ -799,7 +795,7 @@ a complete panorama and stitch any series of overlapping pictures.")
("glib" ,glib)
("glibmm" ,glibmm)
("gtk+" ,gtk+)
- ("gtkmm" ,gtkmm)
+ ("gtkmm" ,gtkmm-3)
("lcms" ,lcms)
("lensfun" ,lensfun)
("libcanberra" ,libcanberra)
diff --git a/gnu/packages/php.scm b/gnu/packages/php.scm
index 4c77eb213a..b81fae1f74 100644
--- a/gnu/packages/php.scm
+++ b/gnu/packages/php.scm
@@ -198,6 +198,20 @@
"Zend/tests/concat_003.phpt")))
'())
+ ,@(if (target-ppc64le?)
+ ;; Drop tests known to fail on powerpc64le.
+ '((for-each delete-file
+ (list
+ ;; phpdbg watchpoints don't work.
+ ;; Bug tracked upstream at:
+ ;; https://bugs.php.net/bug.php?id=81408
+ "sapi/phpdbg/tests/watch_001.phpt"
+ "sapi/phpdbg/tests/watch_003.phpt"
+ "sapi/phpdbg/tests/watch_004.phpt"
+ "sapi/phpdbg/tests/watch_005.phpt"
+ "sapi/phpdbg/tests/watch_006.phpt")))
+ '())
+
;; Drop tests that are known to fail.
(for-each delete-file
'("ext/posix/tests/posix_getgrgid.phpt" ; Requires /etc/group.
@@ -327,7 +341,9 @@
;; Expects an empty Array; gets one with " " in it.
"ext/pcre/tests/bug80118.phpt"
;; Renicing a process fails in the build environment.
- "ext/standard/tests/general_functions/proc_nice_basic.phpt"))
+ "ext/standard/tests/general_functions/proc_nice_basic.phpt"
+ ;; Can fail on fast machines?
+ "Zend/tests/bug74093.phpt"))
;; Accomodate two extra openssl errors flanking the expected one:
;; random number generator:RAND_{load,write}_file:Cannot open file
diff --git a/gnu/packages/pkg-config.scm b/gnu/packages/pkg-config.scm
index 9c632532be..dd0d18ae36 100644
--- a/gnu/packages/pkg-config.scm
+++ b/gnu/packages/pkg-config.scm
@@ -1,6 +1,7 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2012, 2013, 2014, 2016 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2019 Mathieu Othacehe <m.othacehe@gmail.com>
+;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -21,8 +22,10 @@
#:use-module (guix licenses)
#:use-module (guix packages)
#:use-module (guix download)
+ #:use-module (guix gexp)
#:use-module (guix build-system gnu)
#:use-module (guix build-system trivial)
+ #:use-module (gnu packages bash)
#:use-module (guix memoization)
#:export (pkg-config))
@@ -130,3 +133,38 @@ build, or a GNU triplet."
;; environment or not.
(define-syntax pkg-config
(identifier-syntax (pkg-config-for-target (%current-target-system))))
+
+;; This hack allows for using both "pkg-config" and "TARGET-pkg-config"
+;; at the same time. Simply using '%pkg-config' and 'pkg-config' won't
+;; work because they both use the "PKG_CONFIG_PATH" environment variable.
+(define-public pkg-config-for-build
+ (package
+ (inherit (hidden-package %pkg-config))
+ (name "pkg-config-for-build")
+ (version "0")
+ (source #f)
+ (build-system trivial-build-system)
+ (inputs
+ `(("bash-minimal" ,bash-minimal)
+ ("pkg-config" ,%pkg-config)))
+ (arguments
+ `(#:modules ((guix build utils))
+ #:builder
+ ,#~(begin
+ (use-modules (guix build utils))
+ (define where (string-append #$output "/bin/pkg-config"))
+ (mkdir-p (dirname where))
+ (call-with-output-file where
+ (lambda (port)
+ (format port "#!~a
+export PKG_CONFIG_PATH=\"$PKG_CONFIG_PATH_FOR_BUILD\"
+exec ~a \"$@\""
+ (search-input-file %build-inputs "bin/bash")
+ (search-input-file %build-inputs "bin/pkg-config"))))
+ (chmod where #o500))))
+ (native-search-paths
+ (map (lambda (original)
+ (search-path-specification
+ (inherit original)
+ (variable "PKG_CONFIG_PATH_FOR_BUILD")))
+ (package-native-search-paths %pkg-config)))))
diff --git a/gnu/packages/plotutils.scm b/gnu/packages/plotutils.scm
index 7a26c632f7..ed01430400 100644
--- a/gnu/packages/plotutils.scm
+++ b/gnu/packages/plotutils.scm
@@ -22,6 +22,8 @@
(define-module (gnu packages plotutils)
#:use-module ((guix licenses) #:prefix license:)
+ #:use-module (guix gexp)
+ #:use-module ((guix utils) #:select (target-x86-32?))
#:use-module (guix packages)
#:use-module (guix download)
#:use-module (guix git-download)
@@ -83,7 +85,27 @@
(search-patches "plotutils-spline-test.patch"))))
(build-system gnu-build-system)
(arguments
- `(#:configure-flags (list "--enable-libplotter")))
+ (list #:configure-flags
+ #~(list "--enable-libplotter"
+
+ ;; On i686 some tests fail due to excess floating point
+ ;; precision; work around it. However, libplotter is C++
+ ;; and thus unaffected by CFLAGS, but '-fexcess-precision'
+ ;; is not implemented for C++ as of GCC 10.
+ #$@(if (target-x86-32?)
+ #~("CFLAGS=-g -O2 -fexcess-precision=standard")
+ #~()))
+
+ #:phases
+ (if (target-x86-32?)
+ #~(modify-phases %standard-phases
+ (add-before 'check 'skip-sloppy-test
+ (lambda _
+ ;; This test reveals a slight difference in the SVG
+ ;; output due to floating point inequalities. Skip it.
+ (substitute* "test/plot2svg.test"
+ (("^exit .*") "exit 77")))))
+ #~%standard-phases)))
(inputs `(("libpng" ,libpng)
("libx11" ,libx11)
("libxt" ,libxt)
@@ -221,15 +243,23 @@ colors, styles, options and details.")
("perl" ,perl)
("texinfo" ,texinfo) ;For generating documentation
;; For the manual and the tests.
- ("texlive" ,(texlive-union (list texlive-amsfonts/patched
- texlive-epsf
- texlive-etoolbox
- texlive-latex-base
- texlive-latex-geometry
- texlive-latex-graphics
- texlive-latex-oberdiek ; for ifluatex
- texlive-latex-parskip
- texlive-tex-texinfo)))))
+ ("texlive" ,(texlive-updmap.cfg
+ (list texlive-amsfonts
+ texlive-dvips-l3backend
+ texlive-epsf
+ texlive-etoolbox
+ texlive-fonts-ec
+ texlive-generic-infwarerr
+ texlive-generic-kvdefinekeys
+ texlive-grfext
+ texlive-latex-base
+ texlive-latex-geometry
+ texlive-latex-graphics
+ texlive-latex-kvoptions
+ texlive-latex-pdftexcmds
+ texlive-oberdiek ;for ifluatex
+ texlive-latex-parskip
+ texlive-tex-texinfo)))))
(inputs
`(("fftw" ,fftw)
("freeglut" ,freeglut)
@@ -303,9 +333,9 @@ colors, styles, options and details.")
(lambda* (#:key inputs outputs #:allow-other-keys)
;; Make sure 'xasy' runs with the correct PYTHONPATH.
(let* ((out (assoc-ref outputs "out"))
- (path (getenv "PYTHONPATH")))
+ (path (getenv "GUIX_PYTHONPATH")))
(wrap-program (string-append out "/share/asymptote/GUI/xasy.py")
- `("PYTHONPATH" ":" prefix (,path))))
+ `("GUIX_PYTHONPATH" ":" prefix (,path))))
#t)))))
(home-page "http://asymptote.sourceforge.net")
(synopsis "Script-based vector graphics language")
diff --git a/gnu/packages/polkit.scm b/gnu/packages/polkit.scm
index f495d51c83..4cbe1feaba 100644
--- a/gnu/packages/polkit.scm
+++ b/gnu/packages/polkit.scm
@@ -1,11 +1,14 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2014 Andreas Enge <andreas@enge.fr>
;;; Copyright © 2015 Andy Wingo <wingo@igalia.com>
+;;; Copyright © 2015, 2021 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2015 Mark H Weaver <mhw@netris.org>
;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2017 Huang Ying <huang.ying.caritas@gmail.com>
;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
;;; Copyright © 2018 Ricardo Wurmus <rekado@elephly.net>
+;;; Copyright © 2021 Morgan Smith <Morgan.J.Smith@outlook.com>
+;;; Copyright © 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -26,25 +29,31 @@
#:use-module ((guix licenses) #:select (lgpl2.0+))
#:use-module (guix packages)
#:use-module (guix download)
+ #:use-module (guix memoization)
+ #:use-module (guix utils)
+ #:use-module (guix build utils)
#:use-module (guix build-system cmake)
#:use-module (guix build-system gnu)
#:use-module (gnu packages)
+ #:use-module (gnu packages autotools)
#:use-module (gnu packages freedesktop)
#:use-module (gnu packages glib)
#:use-module (gnu packages gtk)
+ #:use-module (gnu packages docbook)
#:use-module (gnu packages gnuzilla)
+ #:use-module (gnu packages javascript)
#:use-module (gnu packages linux)
#:use-module (gnu packages nss)
#:use-module (gnu packages perl)
#:use-module (gnu packages pkg-config)
#:use-module (gnu packages qt)
- #:use-module (gnu packages xml))
+ #:use-module (gnu packages xml)
+ #:export (polkit))
-(define-public polkit
+(define-public polkit-mozjs
(package
(name "polkit")
- (version "0.116")
- (replacement polkit/fixed)
+ (version "0.120")
(source (origin
(method url-fetch)
(uri (string-append
@@ -52,7 +61,8 @@
name "-" version ".tar.gz"))
(sha256
(base32
- "1c9lbpndh5zis22f154vjrhnqw65z8s85nrgl42v738yf6g0q5w8"))
+ "00zfg9b9ivkcj2jcf5b92cpvvyljz8cmfwj86lkvy5rihnd5jypf"))
+ (patches (search-patches "polkit-configure-elogind.patch"))
(modules '((guix build utils)))
(snippet
'(begin
@@ -61,36 +71,27 @@
(substitute* "test/Makefile.in"
(("SUBDIRS = mocklibc . polkit polkitbackend")
"SUBDIRS = mocklibc . polkit"))
- (substitute* "configure"
- ;; Replace libsystemd-login with libelogind.
- (("libsystemd-login") "libelogind")
- ;; Skip the sanity check that the current system runs
- ;; systemd.
- (("test ! -d /sys/fs/cgroup/systemd/") "false"))
- (substitute* "src/polkit/polkitunixsession-systemd.c"
- (("systemd") "elogind"))
- (substitute* "src/polkitbackend/polkitbackendsessionmonitor-systemd.c"
- (("systemd") "elogind"))
- (substitute* "src/polkitbackend/polkitbackendjsauthority.cpp"
- (("systemd") "elogind"))
-
- ;; Guix System's polkit service stores actions under
- ;; /etc/polkit-1/actions.
+ ;; Disable a test that requires Python, D-Bus and a few
+ ;; libraries and fails with "ERROR: timed out waiting for bus
+ ;; process to terminate".
+ (substitute* "test/polkitbackend/Makefile.am"
+ (("TEST_PROGS \\+= polkitbackendjsauthoritytest-wrapper.py")
+ ""))
+ ;; Guix System's polkit
+ ;; service stores actions under /etc/polkit-1/actions.
(substitute* "src/polkitbackend/polkitbackendinteractiveauthority.c"
(("PACKAGE_DATA_DIR \"/polkit-1/actions\"")
"PACKAGE_SYSCONF_DIR \"/polkit-1/actions\""))
-
;; Set the setuid helper's real location.
(substitute* "src/polkitagent/polkitagentsession.c"
(("PACKAGE_PREFIX \"/lib/polkit-1/polkit-agent-helper-1\"")
- "\"/run/setuid-programs/polkit-agent-helper-1\""))
- #t))))
+ "\"/run/setuid-programs/polkit-agent-helper-1\""))))))
(build-system gnu-build-system)
(inputs
`(("expat" ,expat)
("linux-pam" ,linux-pam)
("elogind" ,elogind)
- ("mozjs" ,mozjs-60)
+ ("mozjs" ,mozjs-78)
("nspr" ,nspr)))
(propagated-inputs
`(("glib" ,glib))) ; required by polkit-gobject-1.pc
@@ -98,10 +99,17 @@
`(("pkg-config" ,pkg-config)
("glib:bin" ,glib "bin") ; for glib-mkenums
("intltool" ,intltool)
- ("gobject-introspection" ,gobject-introspection)))
+ ("gobject-introspection" ,gobject-introspection)
+ ("libxslt" ,libxslt) ; for man page generation
+ ("docbook-xsl" ,docbook-xsl))) ; for man page generation
(arguments
`(#:configure-flags '("--sysconfdir=/etc"
- "--enable-man-pages")
+ "--enable-man-pages"
+ ;; Prevent ‘configure: error: cannot check for
+ ;; file existence when cross compiling’.
+ ,@(if (%current-target-system)
+ '("--with-os-type=unknown")
+ '()))
#:phases
(modify-phases %standard-phases
(add-after
@@ -112,8 +120,15 @@
(("@INTROSPECTION_GIRDIR@")
(string-append out "/share/gir-1.0/"))
(("@INTROSPECTION_TYPELIBDIR@")
- (string-append out "/lib/girepository-1.0/")))
- #t)))
+ (string-append out "/lib/girepository-1.0/"))))))
+ (add-after 'unpack 'fix-manpage-generation
+ (lambda* (#:key inputs #:allow-other-keys)
+ (let ((xsldoc (string-append (assoc-ref inputs "docbook-xsl")
+ "/xml/xsl/docbook-xsl-"
+ ,(package-version docbook-xsl))))
+ (substitute* '("docs/man/Makefile.am" "docs/man/Makefile.in")
+ (("http://docbook.sourceforge.net/release/xsl/current")
+ xsldoc)))))
(replace
'install
(lambda* (#:key outputs (make-flags '()) #:allow-other-keys)
@@ -125,8 +140,7 @@
(string-append "sysconfdir=" out "/etc")
(string-append "polkit_actiondir="
out "/share/polkit-1/actions")
- make-flags)
- #t))))))
+ make-flags)))))))
(home-page "https://www.freedesktop.org/wiki/Software/polkit/")
(synopsis "Authorization API for privilege management")
(description "Polkit is an application-level toolkit for defining and
@@ -136,12 +150,52 @@ making process with respect to granting access to privileged operations
for unprivileged applications.")
(license lgpl2.0+)))
-(define polkit/fixed
- (package
- (inherit polkit)
- (source (origin
- (inherit (package-source polkit))
- (patches (search-patches "polkit-CVE-2021-3560.patch"))))))
+;;; Variant of polkit built with Duktape, a lighter JavaScript engine compared
+;;; to mozjs.
+(define-public polkit-duktape
+ (let ((base polkit-mozjs))
+ (package/inherit base
+ (name "polkit-duktape")
+ (source
+ (origin
+ (inherit (package-source base))
+ (patches
+ (append
+ (search-patches "polkit-use-duktape.patch")
+ (origin-patches (package-source base))))))
+ (arguments
+ (substitute-keyword-arguments (package-arguments base)
+ ((#:configure-flags flags)
+ `(cons "--with-duktape" ,flags))
+ ((#:phases phases)
+ `(modify-phases ,phases
+ (add-after 'unpack 'force-gnu-build-system-bootstrap
+ (lambda _
+ (delete-file "configure")))))))
+ (native-inputs
+ (append `(("autoconf" ,autoconf)
+ ("automake" ,automake)
+ ("libtool" ,libtool)
+ ("pkg-config" ,pkg-config))
+ (package-native-inputs base)))
+ (inputs (alist-replace "mozjs" `(,duktape)
+ (package-inputs base))))))
+
+(define polkit-for-system
+ (mlambda (system)
+ "Return a polkit package that can be built for SYSTEM; that is, either the
+regular polkit that requires mozjs or its duktape variant."
+ (if (string-prefix? "x86_64" system)
+ polkit-mozjs
+ polkit-duktape)))
+
+;;; Define a top level polkit variable that can be built on any of the
+;;; supported platforms. This is to work around the fact that our
+;;; mrustc-bootstrapped rust toolchain currently only supports the x86_64
+;;; architecture.
+(define-syntax polkit
+ (identifier-syntax (polkit-for-system
+ (or (%current-target-system) (%current-system)))))
(define-public polkit-qt
(package
diff --git a/gnu/packages/presentation.scm b/gnu/packages/presentation.scm
index 0ad407d36c..8d24a81f9d 100644
--- a/gnu/packages/presentation.scm
+++ b/gnu/packages/presentation.scm
@@ -62,12 +62,12 @@
`("PATH" ":" prefix (,(dirname (which "cowsay"))
,(dirname (which "figlet"))
,(dirname (which "jp2a"))))
- `("PYTHONPATH" prefix
+ `("GUIX_PYTHONPATH" prefix
,(cons (string-append out "/lib/python"
(python-version python)
"/site-packages")
(search-path-as-string->list
- (or (getenv "PYTHONPATH") ""))))))
+ (or (getenv "GUIX_PYTHONPATH") ""))))))
'("presentty" "presentty-console")))
#t)))))
(inputs
diff --git a/gnu/packages/pretty-print.scm b/gnu/packages/pretty-print.scm
index 728f00f16e..a204a90cc9 100644
--- a/gnu/packages/pretty-print.scm
+++ b/gnu/packages/pretty-print.scm
@@ -2,7 +2,7 @@
;;; Copyright © 2016, 2019, 2020 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2016, 2021 Ricardo Wurmus <rekado@elephly.net>
;;; Copyright © 2017 Marius Bakke <mbakke@fastmail.com>
-;;; Copyright © 2017, 2020 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2017, 2020, 2021 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2017–2021 Tobias Geerinckx-Rice <me@tobias.gr>
;;; Copyright © 2019 Meiyo Peng <meiyo@riseup.net>
;;; Copyright © 2020 Paul Garlick <pgarlick@tourbillion-technology.com>
@@ -228,8 +228,7 @@ to @code{IOStreams}.")
(let ((gcc (assoc-ref inputs "gcc")))
(setenv "CPLUS_INCLUDE_PATH"
(string-join
- (cons (string-append (assoc-ref inputs "libcxx")
- "/include/c++/v1")
+ (cons (search-input-directory inputs "/include/c++/v1")
;; Hide GCC's C++ headers so that they do not interfere with
;; the Clang headers.
(delete (string-append gcc "/include/c++")
diff --git a/gnu/packages/protobuf.scm b/gnu/packages/protobuf.scm
index 27f4f83f83..59b0d4a3c8 100644
--- a/gnu/packages/protobuf.scm
+++ b/gnu/packages/protobuf.scm
@@ -276,26 +276,13 @@ mechanism for serializing structured data.")
(arguments
`(#:phases
(modify-phases %standard-phases
- (add-before 'check 'setup-test-env
- (lambda* (#:key outputs #:allow-other-keys)
- (let* ((out (assoc-ref outputs "out"))
- (py3sitedir
- (string-append out "/lib/python"
- ,(version-major+minor
- (package-version python))
- "/site-packages")))
- (setenv "PYTHONPATH"
- (string-append py3sitedir ":"
- (getenv "PYTHONPATH"))))
- #t))
(replace 'check
(lambda _
(invoke "pytest" "--cov-report" "term-missing" "--cov"
"pure_protobuf")
(invoke "flake8" "pure_protobuf" "tests"
"--ignore=F541")
- (invoke "isort" "-rc" "-c" "pure_protobuf" "tests")
- #t)))))
+ (invoke "isort" "-rc" "-c" "pure_protobuf" "tests"))))))
(home-page "https://pypi.org/project/pure-protobuf/")
(synopsis "Protobuf implementation using dataclasses")
(description
diff --git a/gnu/packages/pth.scm b/gnu/packages/pth.scm
index 1908ce7763..8efede068c 100644
--- a/gnu/packages/pth.scm
+++ b/gnu/packages/pth.scm
@@ -2,6 +2,7 @@
;;; Copyright © 2012, 2015 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2014 Mark H Weaver <mhw@netris.org>
;;; Copyright © 2017 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2021 Thiago Jung Bauermann <bauermann@kolabnow.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -19,6 +20,7 @@
;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
(define-module (gnu packages pth)
+ #:use-module (gnu packages autotools)
#:use-module (guix licenses)
#:use-module (guix packages)
#:use-module (guix download)
@@ -38,12 +40,20 @@
"0ckjqw5kz5m30srqi87idj7xhpw6bpki43mj07bazjm2qmh3cdbj"))))
(build-system gnu-build-system)
(arguments
- `(#:parallel-build? #f
- #:configure-flags (list
- ,@(if (string=? "aarch64-linux"
- (%current-system))
- '("--host=aarch64-unknown-linux-gnu")
- '()))))
+ '(#:parallel-build? #f
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'update-config-scripts
+ (lambda* (#:key inputs native-inputs #:allow-other-keys)
+ ;; Replace outdated config.guess and config.sub.
+ (for-each (lambda (file)
+ (install-file
+ (search-input-file
+ (or native-inputs inputs)
+ (string-append "/bin/" file)) "."))
+ '("config.guess" "config.sub")))))))
+ (native-inputs
+ (list config))
(home-page "https://www.gnu.org/software/pth/")
(synopsis "Portable thread library")
(description
diff --git a/gnu/packages/pulseaudio.scm b/gnu/packages/pulseaudio.scm
index 060a0613ec..66370a2dfb 100644
--- a/gnu/packages/pulseaudio.scm
+++ b/gnu/packages/pulseaudio.scm
@@ -14,6 +14,7 @@
;;; Copyright © 2020 Michael Rohleder <mike@rohleder.de>
;;; Copyright © 2020 Pierre Neidhardt <mail@ambrevar.xyz>
;;; Copyright © 2020 Marius Bakke <marius@gnu.org>
+;;; Copyright © 2021 Brice Waegeneire <brice@waegenei.re>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -49,7 +50,9 @@
#:use-module (gnu packages avahi)
#:use-module (gnu packages boost)
#:use-module (gnu packages check)
- #:use-module (gnu packages dbm)
+ #:use-module (gnu packages databases)
+ #:use-module (gnu packages documentation)
+ #:use-module (gnu packages freedesktop)
#:use-module (gnu packages glib)
#:use-module (gnu packages gettext)
#:use-module (gnu packages gnome)
@@ -99,10 +102,11 @@
(("^/usr/bin/env") "env"))
#t))))
(build-system gnu-build-system)
- (inputs
- `(("libvorbis" ,libvorbis)
+ (propagated-inputs
+ `(("flac" ,flac)
("libogg" ,libogg)
- ("flac" ,flac)))
+ ("libvorbis" ,libvorbis)
+ ("opus" ,opus)))
(native-inputs
`(("pkg-config" ,pkg-config)
("python" ,python)))
@@ -191,7 +195,7 @@ rates.")
(define-public pulseaudio
(package
(name "pulseaudio")
- (version "14.0")
+ (version "15.0")
(source (origin
(method url-fetch)
(uri (string-append
@@ -199,7 +203,7 @@ rates.")
name "-" version ".tar.xz"))
(sha256
(base32
- "0qf20rgg0ysrnvg3359j56ndls07qmfn5rsy9r85bc42jdfpfd58"))
+ "1851rg4h6sjwanvd294hn52z321rc6vbs4gbfrlw53597dx8h2x4"))
(modules '((guix build utils)))
(snippet
;; Disable console-kit support by default since it's deprecated
@@ -212,14 +216,19 @@ rates.")
(patches (search-patches
"pulseaudio-fix-mult-test.patch"
"pulseaudio-longer-test-timeout.patch"))))
- (build-system gnu-build-system)
+ (build-system meson-build-system)
(arguments
- `(#:configure-flags (list "--localstatedir=/var" ;"--sysconfdir=/etc"
- "--disable-oss-output"
- "--enable-bluez5"
- (string-append "--with-udev-rules-dir="
- (assoc-ref %outputs "out")
- "/lib/udev/rules.d"))
+ `(#:configure-flags
+ (let ((out (assoc-ref %outputs "out")))
+ (list "-Doss-output=disabled"
+ "-Dlocalstatedir=/var"
+ (string-append "-Dudevrulesdir="
+ out "/lib/udev/rules.d")
+ ;; Ensure the RUNPATH contains all installed library locations.
+ (string-append "-Dc_link_args=-Wl,-rpath="
+ out "/lib/pulseaudio:"
+ out "/lib:"
+ out "/lib/pulse-" ,version "/modules")))
#:phases (modify-phases %standard-phases
(add-before 'check 'pre-check
(lambda _
@@ -231,7 +240,6 @@ rates.")
(setenv "CK_DEFAULT_TIMEOUT" "120")
#t)))))
(inputs
- ;; TODO: Add optional inputs (GTK+?).
`(("alsa-lib" ,alsa-lib)
("bluez" ,bluez)
("sbc" ,sbc)
@@ -243,6 +251,7 @@ rates.")
("libltdl" ,libltdl)
("fftwf" ,fftwf)
("avahi" ,avahi)
+ ("webrtc-audio-processing", webrtc-audio-processing)
;; For the optional X11 modules.
("libice" ,libice)
@@ -250,9 +259,11 @@ rates.")
("libxcb" ,libxcb)
("libxtst" ,libxtst)
+ ("elogind" ,elogind)
("eudev" ,eudev))) ;for the detection of hardware audio devices
(native-inputs
`(("check" ,check)
+ ("doxygen" ,doxygen)
("gettext" ,gettext-minimal)
("glib:bin" ,glib "bin")
("m4" ,m4)
@@ -260,9 +271,9 @@ rates.")
("perl-xml-parser" ,perl-xml-parser)
("pkg-config" ,pkg-config)))
(propagated-inputs
- ;; 'libpulse*.la' contain `-lgdbm' and `-lcap', so propagate them.
+ ;; 'libpulse*.la' contain `-ltdb' and `-lcap', so propagate them.
`(("libcap" ,libcap)
- ("gdbm" ,gdbm)))
+ ("tdb" ,tdb)))
(home-page "http://www.pulseaudio.org/")
(synopsis "Sound server")
(description
@@ -294,7 +305,7 @@ sound server.")
(build-system glib-or-gtk-build-system)
(inputs
`(("adwaita-icon-theme" ,adwaita-icon-theme) ;hard-coded theme
- ("gtkmm" ,gtkmm)
+ ("gtkmm" ,gtkmm-3)
("json-glib" ,json-glib)
("libcanberra" ,libcanberra)
("pulseaudio" ,pulseaudio)))
@@ -519,7 +530,7 @@ README.md for a detailed list of features.")
`(("gettext" ,gettext-minimal)
("pkg-config" ,pkg-config)))
(inputs
- `(("gtkmm" ,gtkmm)
+ `(("gtkmm" ,gtkmm-3)
("pulseaudio" ,pulseaudio)))
(home-page "https://freedesktop.org/software/pulseaudio/paprefs/")
(synopsis "Simple GTK based configuration dialog for the PulseAudio sound
diff --git a/gnu/packages/pumpio.scm b/gnu/packages/pumpio.scm
index f8a60af760..1cdb2fdd88 100644
--- a/gnu/packages/pumpio.scm
+++ b/gnu/packages/pumpio.scm
@@ -50,11 +50,9 @@
;; Fix dependency tests.
(substitute* "pumpa.pro"
(("/usr/include/tidy\\.h")
- (string-append (assoc-ref inputs "tidy")
- "/include/tidy.h"))
+ (search-input-file inputs "/include/tidy.h"))
(("/usr/include/aspell.h")
- (string-append (assoc-ref inputs "aspell")
- "/include/aspell.h")))
+ (search-input-file inputs "/include/aspell.h")))
;; Run qmake with proper installation prefix.
(let ((prefix (string-append "PREFIX="
(assoc-ref outputs "out"))))
diff --git a/gnu/packages/python-build.scm b/gnu/packages/python-build.scm
index 61105d12ab..05263499db 100644
--- a/gnu/packages/python-build.scm
+++ b/gnu/packages/python-build.scm
@@ -23,9 +23,11 @@
;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
(define-module (gnu packages python-build)
+ #:use-module (gnu packages)
#:use-module ((guix licenses) #:prefix license:)
#:use-module (guix build-system python)
#:use-module (guix download)
+ #:use-module (guix git-download)
#:use-module (guix packages))
;;; Commentary:
@@ -39,14 +41,14 @@
(define-public python-wheel
(package
(name "python-wheel")
- (version "0.36.2")
+ (version "0.33.6")
(source
(origin
(method url-fetch)
(uri (pypi-uri "wheel" version))
(sha256
(base32
- "0pi4w0brz7a86ddk6pm8p6j0w6d7jgacgxm0c2dab3k5cb8yy7p1"))))
+ "0ii6f34rvpjg3nmw4bc2h7fhdsy38y1h93hghncfs5akfrldmj8h"))))
(build-system python-build-system)
(arguments
;; FIXME: The test suite runs "python setup.py bdist_wheel", which in turn
@@ -107,6 +109,70 @@ Language (TOML) configuration files.")
(description "This package provides a Python parser for TOML-0.4.0.")
(license license:expat)))
+(define-public python-six-bootstrap
+ (package
+ (name "python-six-bootstrap")
+ (version "1.16.0")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "six" version))
+ (sha256
+ (base32
+ "09n9qih9rpj95q3r4a40li7hk6swma11syvgwdc68qm1fxsc6q8y"))))
+ (build-system python-build-system)
+ (arguments `(#:tests? #f)) ;to avoid pytest dependency
+ (home-page "https://pypi.org/project/six/")
+ (synopsis "Python 2 and 3 compatibility utilities")
+ (description
+ "Six is a Python 2 and 3 compatibility library. It provides utility
+functions for smoothing over the differences between the Python versions with
+the goal of writing Python code that is compatible on both Python versions.
+Six supports every Python version since 2.5. It is contained in only one
+Python file, so it can be easily copied into your project.")
+ (license license:x11)))
+
+(define-public python2-six-bootstrap
+ (package-with-python2 python-six-bootstrap))
+
+(define-public python-tomli
+ (package
+ (name "python-tomli")
+ (version "1.2.2")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "tomli" version))
+ (sha256
+ (base32 "1vjg44narb7hdiazdmbv8bfv7pi6phnq7nxm6aphx0iqxcah1kn6"))))
+ (build-system python-build-system)
+ (arguments
+ `(#:tests? #f ;disabled to avoid extra dependencies
+ #:phases
+ (modify-phases %standard-phases
+ (replace 'build
+ (lambda _
+ (setenv "PYTHONPATH" (string-append (getcwd) ":"
+ (getenv "GUIX_PYTHONPATH")))
+ (invoke "python" "-m" "build" "--wheel" "--no-isolation"
+ "--skip-dependency-check")))
+ (replace 'install
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let ((out (assoc-ref outputs "out"))
+ (whl (car (find-files "dist" "\\.whl$"))))
+ (invoke "pip" "--no-cache-dir" "--no-input"
+ "install" "--no-deps" "--prefix" out whl)))))))
+ (native-inputs
+ `(("python-flit-core" ,python-flit-core)
+ ("python-pypa-build" ,python-pypa-build)
+ ("python-six", python-six-bootstrap)))
+ (home-page "https://github.com/hukkin/tomli")
+ (synopsis "Small and fast TOML parser")
+ (description "Tomli is a minimal TOML parser that is fully compatible with
+@url{https://toml.io/en/v1.0.0,TOML v1.0.0}. It is about 2.4 times as fast as
+@code{python-toml}.")
+ (license license:expat)))
+
(define-public python-pep517-bootstrap
(hidden-package
(package
@@ -131,23 +197,118 @@ Language (TOML) configuration files.")
"Wrappers to build Python packages using PEP 517 hooks.")
(license license:expat))))
+(define-public python-pyparsing
+ (package
+ (name "python-pyparsing")
+ (version "2.4.7")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "pyparsing" version))
+ (sha256
+ (base32 "1hgc8qrbq1ymxbwfbjghv01fm3fbpjwpjwi0bcailxxzhf3yq0y2"))))
+ (build-system python-build-system)
+ (outputs '("out" "doc"))
+ (arguments
+ `(#:tests? #f ;no test target
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'install 'install-doc
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((doc (string-append (assoc-ref outputs "doc")
+ "/share/doc/" ,name "-" ,version))
+ (html-doc (string-append doc "/html"))
+ (examples (string-append doc "/examples")))
+ (mkdir-p html-doc)
+ (mkdir-p examples)
+ (for-each
+ (lambda (dir tgt)
+ (map (lambda (file)
+ (install-file file tgt))
+ (find-files dir ".*")))
+ (list "docs" "htmldoc" "examples")
+ (list doc html-doc examples))))))))
+ (home-page "https://github.com/pyparsing/pyparsing")
+ (synopsis "Python parsing class library")
+ (description
+ "The pyparsing module is an alternative approach to creating and
+executing simple grammars, vs. the traditional lex/yacc approach, or the use
+of regular expressions. The pyparsing module provides a library of classes
+that client code uses to construct the grammar directly in Python code.")
+ (license license:expat)))
+
+(define-public python-pyparsing-2.4.7
+ (package
+ (inherit python-pyparsing)
+ (version "2.4.7")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "pyparsing" version))
+ (sha256
+ (base32 "1hgc8qrbq1ymxbwfbjghv01fm3fbpjwpjwi0bcailxxzhf3yq0y2"))))))
+
+(define-public python2-pyparsing
+ (package-with-python2 python-pyparsing))
+
+(define-public python-packaging-bootstrap
+ (package
+ (name "python-packaging-bootstrap")
+ (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 `(#:tests? #f)) ;disabled to avoid extra dependencies
+ (propagated-inputs
+ `(("python-pyparsing" ,python-pyparsing)
+ ("python-six-bootstrap" ,python-six-bootstrap)))
+ (home-page "https://github.com/pypa/packaging")
+ (synopsis "Core utilities for Python packages")
+ (description "Packaging is a Python module for dealing with Python packages.
+It offers an interface for working with package versions, names, and dependency
+information.")
+ ;; From 'LICENSE': This software is made available under the terms of
+ ;; *either* of the licenses found in LICENSE.APACHE or LICENSE.BSD.
+ ;; Contributions to this software is made under the terms of *both* these
+ ;; licenses.
+ (license (list license:asl2.0 license:bsd-2))))
+
+(define-public python2-packaging-bootstrap
+ (package-with-python2 python-packaging-bootstrap))
+
;;; The name 'python-pypa-build' is chosen rather than 'python-build' to avoid
;;; a name clash with python-build from (guix build-system python).
(define-public python-pypa-build
(package
(name "python-pypa-build")
- (version "0.1.0")
+ (version "0.7.0")
(source (origin
(method url-fetch)
(uri (pypi-uri "build" version))
(sha256
(base32
- "1d6m21lijwm04g50nwgsgj7x3vhblzw7jv05ah8psqgzk20bbch8"))))
+ "17xqija27x4my1yrnk6q2vwln60r39g2dhby9zg2l99qjgbdrahs"))))
(build-system python-build-system)
(arguments
- `(#:tests? #f)) ;to tests in the PyPI release
+ `(#:tests? #f ;to tests in the PyPI release
+ #:phases (modify-phases %standard-phases
+ (add-after 'unpack 'use-toml-instead-of-tomli
+ ;; Using toml instead of tomli eases bootstrapping.
+ (lambda _
+ (substitute* "setup.cfg"
+ (("tomli>=.*")
+ "toml\n")))))))
(propagated-inputs
- `(("python-pep517", python-pep517-bootstrap)
+ `(("python-packaging" ,python-packaging-bootstrap)
+ ("python-pep517", python-pep517-bootstrap)
("python-toml" ,python-toml)))
(home-page "https://pypa-build.readthedocs.io/en/latest/")
(synopsis "Simple Python PEP 517 package builder")
@@ -176,3 +337,44 @@ implementation developed for Poetry. This project is intended to be
a light weight, fully compliant, self-contained package allowing PEP 517
compatible build front-ends to build Poetry managed projects.")
(license license:expat)))
+
+(define-public python-flit-core
+ (package
+ (name "python-flit-core")
+ (version "3.4.0")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "flit" version))
+ (sha256
+ (base32 "10vjqnybvjdqdbmyc0asbhhvq51yjnnj00645yiq9849gnr8h0ir"))))
+ (build-system python-build-system)
+ (propagated-inputs
+ `(("python-toml" ,python-toml)))
+ (arguments
+ ;; flit-core has a test suite, but it requires Pytest. Disable it so
+ ;; as to not pull pytest as an input.
+ `(#:tests? #f
+ #:phases
+ (modify-phases %standard-phases
+ (replace 'build
+ ;; flit-core requires itself to build. Luckily, a
+ ;; bootstrapping script exists, which does so using just
+ ;; the checkout sources and Python.
+ (lambda _
+ (invoke "python" "flit_core/build_dists.py")))
+ (replace 'install
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (let ((out (assoc-ref outputs "out"))
+ (whl (car (find-files "." "\\.whl$"))))
+ (invoke "pip" "--no-cache-dir" "--no-input"
+ "install" "--no-deps" "--prefix" out whl))))
+ ;; The sanity-check phase fails because flit depends on tomli at
+ ;; run-time, but this core variant avoids it to avoid a cycle.
+ (delete 'sanity-check))))
+ (home-page "https://github.com/takluyver/flit")
+ (synopsis "Core package of the Flit Python build system")
+ (description "This package provides @code{flit-core}, a PEP 517 build
+backend for packages using Flit. The only public interface is the API
+specified by PEP 517, @code{flit_core.buildapi}.")
+ (license license:bsd-3)))
diff --git a/gnu/packages/python-check.scm b/gnu/packages/python-check.scm
index 6127ce3cf4..4327d216ed 100644
--- a/gnu/packages/python-check.scm
+++ b/gnu/packages/python-check.scm
@@ -1,7 +1,7 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2019, 2021 Ricardo Wurmus <rekado@elephly.net>
;;; Copyright © 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
-;;; Copyright © 2019, 2020 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2019, 2020, 2021 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2019, 2020, 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;; Copyright © 2019, 2021 Hartmut Goebel <h.goebel@crazy-compilers.com>
;;; Copyright © 2020 Julien Lepiller <julien@lepiller.eu>
@@ -529,7 +529,7 @@ sub-package.")
(add-installed-pythonpath inputs outputs)
(invoke "pytest" "-vv"))))))
(native-inputs
- `(("python-pytest" ,python-pytest-6)
+ `(("python-pytest" ,python-pytest)
("python-setuptools" ,python-setuptools) ; needs setuptools >= 50.3.2
("python-setuptools-scm" ,python-setuptools-scm)
("python-setuptools-declarative-requirements"
@@ -698,6 +698,7 @@ framework and makes it easy to undo any monkey patching. The fixtures are:
`(("python-pytest" ,python-pytest)))
(propagated-inputs
`(("python-matplotlib" ,python-matplotlib)
+ ("python-nose" ,python-nose)
("python-pillow" ,python-pillow)))
(home-page "https://github.com/matplotlib/pytest-mpl")
(synopsis "Pytest plugin to help with testing figures output from Matplotlib")
@@ -774,20 +775,21 @@ in Pytest.")
(define-public python-pytest-checkdocs
(package
(name "python-pytest-checkdocs")
- (version "1.2.2")
+ (version "1.2.5")
(source
(origin
(method url-fetch)
(uri (pypi-uri "pytest-checkdocs" version))
(sha256
- (base32 "0j6j1gvj6x451y3qsx4xbaq9p1w9gg3mwk7n0w80cy8vdyjkngb0"))))
+ (base32 "0m4kn7141i6k8qr8ak3lbmk9vim11xsrlnrggcfwczfrglc6jmia"))))
(build-system python-build-system)
(propagated-inputs
`(("python-docutils" ,python-docutils)
("python-importlib-metadata" ,python-importlib-metadata)
("python-more-itertools" ,python-more-itertools)))
(native-inputs
- `(("python-setuptools-scm" ,python-setuptools-scm)))
+ `(("python-setuptools-scm" ,python-setuptools-scm)
+ ("python-pytest" ,python-pytest)))
(home-page "https://github.com/jaraco/pytest-checkdocs")
(synopsis "Check the README when running tests")
(description
@@ -832,28 +834,35 @@ simpler.")
(define-public python-pytest-trio
(package
(name "python-pytest-trio")
- (version "0.6.0")
+ (version "0.7.0")
(source
(origin
(method url-fetch)
(uri (pypi-uri "pytest-trio" version))
(sha256
- (base32 "1zm8didm9h5jkqhghl9bvqs7kr7sjci282c7grhk6yhpzn8a9w4v"))))
+ (base32 "0c8cqf9by2884riksrqymqfp2g1d2d798a2zalcw9hmf34c786y0"))))
(build-system python-build-system)
(arguments
`(#:phases
(modify-phases %standard-phases
(replace 'check
- (lambda* (#:key inputs outputs #:allow-other-keys)
- (add-installed-pythonpath inputs outputs)
- (invoke "pytest" "-W" "error" "-ra" "-v" "--pyargs"
- "pytest_trio" "--verbose" "--cov"))))))
+ (lambda* (#:key tests? inputs outputs #:allow-other-keys)
+ (when tests?
+ (add-installed-pythonpath inputs outputs)
+ (invoke "pytest" "-W" "error" "-ra" "-v" "--pyargs"
+ "pytest_trio" "--verbose" "--cov" "-k"
+ (string-append
+ ;; Needs network
+ "not test_async_yield_fixture_with_nursery"
+ " and not test_try"
+ ;; No keyboard interrupt in our build environment.
+ " and not test_actual_test"))))))))
(native-inputs
`(("python-hypothesis" ,python-hypothesis)
("python-pytest" ,python-pytest)
("python-pytest-cov" ,python-pytest-cov)))
(propagated-inputs
- `(("python-trio" ,python-trio)))
+ (list python-async-generator python-outcome python-pytest python-trio))
(home-page "https://github.com/python-trio/pytest-trio")
(synopsis "Pytest plugin for trio")
(description
@@ -888,26 +897,26 @@ compliance.")
(define-public python-pytest-isort
(package
(name "python-pytest-isort")
- (version "0.3.1")
+ (version "2.0.0")
(source
(origin
(method url-fetch)
(uri (pypi-uri "pytest-isort" version))
(sha256
- (base32 "06myn5hhxs5yp8dqr1yjsgcnnxnsrvsqannm00bvaw0qml6ydzjb"))))
+ (base32 "05wi28zlqk3jafpjal8j523y5jcsx3xl3id9rx93qfjgkif8q6l2"))))
(build-system python-build-system)
(arguments
`(#:phases
(modify-phases %standard-phases
(replace 'check
- (lambda _
- (setenv "PYTHONPATH"
- (string-append (getcwd) ":"
- (getenv "PYTHONPATH")))
- (invoke "pytest"))))))
+ (lambda* (#:key tests? #:allow-other-keys)
+ (when tests?
+ (invoke "pytest")))))))
(propagated-inputs
`(("python-isort" ,python-isort)
("python-pytest" ,python-pytest)))
+ (native-inputs
+ `(("python-mock" ,python-mock)))
(home-page "https://github.com/moccu/pytest-isort/")
(synopsis "Pytest plugin to check import ordering using isort")
(description
@@ -1146,23 +1155,17 @@ service processes for your tests with pytest.")
'(#:phases
(modify-phases %standard-phases
(replace 'check
- (lambda* (#:key inputs outputs #:allow-other-keys)
- ;; Make the installed plugin discoverable by Pytest.
- (add-installed-pythonpath inputs outputs)
- (invoke "pytest" "-vv"))))))
+ (lambda* (#:key tests? inputs outputs #:allow-other-keys)
+ (when tests?
+ (substitute* "setup.cfg"
+ ((".*timeout.*") ""))
+ ;; Make the installed plugin discoverable by Pytest.
+ (add-installed-pythonpath inputs outputs)
+ (invoke "pytest" "-vv")))))))
(native-inputs
- `(("python-coverage" ,python-coverage)
- ("python-docutils" ,python-docutils)
- ("python-flake8" ,python-flake8)
- ("python-isort" ,python-isort)
- ("python-pydantic" ,python-pydantic)
- ("python-pyflakes" ,python-pyflakes)
- ("python-pygments" ,python-pygments)
+ `(("python-pydantic" ,python-pydantic)
("python-pytest" ,python-pytest)
- ("python-pytest-cov" ,python-pytest-cov)
- ("python-pytest-isort" ,python-pytest-isort)
- ("python-pytest-mock" ,python-pytest-mock)
- ("python-pytest-sugar" ,python-pytest-sugar)))
+ ("python-pytest-isort" ,python-pytest-isort)))
(home-page "https://github.com/samuelcolvin/pytest-toolbox")
(synopsis "Numerous useful plugins for Pytest")
(description
@@ -1264,14 +1267,14 @@ also ensuring that the notebooks are running without errors.")
(define-public python-pytest-console-scripts
(package
(name "python-pytest-console-scripts")
- (version "1.2.0")
+ (version "1.2.1")
(source
(origin
(method url-fetch)
(uri (pypi-uri "pytest-console-scripts" version))
(sha256
(base32
- "073l2cz11013dl30zjr575ms78j9b2bsbdl1w0gmig37spbkh8aa"))))
+ "1qsw3i2h3psyi5avwf14panx8wxqfik2z7294dy37w8ha415iwn7"))))
(build-system python-build-system)
(arguments
`(#:phases
@@ -1417,7 +1420,8 @@ interaction, like key presses and mouse clicks.")
(arguments
`(#:tests? #f)); no tests
(propagated-inputs
- `(("python-check-manifest" ,python-check-manifest)))
+ `(("python-check-manifest" ,python-check-manifest)
+ ("python-requests" ,python-requests)))
(home-page "https://github.com/codacy/python-codacy-coverage")
(synopsis "Codacy coverage reporter for Python")
(description "This package analyses Python test suites and reports how much
@@ -1570,7 +1574,7 @@ supported by the MyPy typechecker.")
("python-importlib-metadata" ,python-importlib-metadata)
("python-lxml" ,python-lxml)
("python-psutil" ,python-psutil)
- ("python-pytest" ,python-pytest-6)
+ ("python-pytest" ,python-pytest)
("python-pytest-cov" ,python-pytest-cov)
("python-pytest-forked" ,python-pytest-forked)
("python-pytest-xdist" ,python-pytest-xdist)
@@ -1592,6 +1596,61 @@ any Python VM with basically no runtime overhead.")
;; mypyc/lib-rt/getargs.c
(license (list license:expat license:psfl))))
+;;; This variant exists to break a cycle between python-pylama and python-isort.
+(define-public python-mypy-minimal
+ (hidden-package
+ (package
+ (inherit python-mypy)
+ (name "python-mypy-minimal")
+ (arguments
+ `(#:tests? #f
+ #:phases (modify-phases %standard-phases
+ ;; XXX: Fails with: "In procedure utime: No such file or
+ ;; directory".
+ (delete 'ensure-no-mtimes-pre-1980))))
+ (native-inputs '()))))
+
+(define-public python-pylama
+ (package
+ (name "python-pylama")
+ (version "7.7.1")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "pylama" version))
+ (sha256
+ (base32
+ "13vx7daqz2918y9s8q3v2i3xaq3ah43a9p58srqi6hqskkpm7blv"))))
+ (build-system python-build-system)
+ (arguments
+ `(#:phases (modify-phases %standard-phases
+ (add-after 'unpack 'disable-failing-tests
+ (lambda _
+ ;; Fails with: "ImportError: cannot import name
+ ;; 'commented_out_code_line_numbers' from 'eradicate'".
+ (delete-file "pylama/lint/pylama_eradicate.py")
+ ;; Requires python-astroid, which fails to build on
+ ;; Python 3.9+ (see:
+ ;; https://github.com/PyCQA/astroid/issues/881).
+ (delete-file "pylama/lint/pylama_pylint.py"))))))
+ (native-inputs
+ `(("python-py" ,python-py)
+ ("python-pytest" ,python-pytest)
+ ("python-radon" ,python-radon)))
+ (propagated-inputs
+ `(("python-mccabe" ,python-mccabe)
+ ("python-mypy", python-mypy-minimal)
+ ("python-pycodestyle" ,python-pycodestyle)
+ ("python-pydocstyle" ,python-pydocstyle)
+ ("python-pyflakes" ,python-pyflakes)))
+ (home-page "https://github.com/klen/pylama")
+ (synopsis "Code audit tool for python")
+ (description "Pylama is a code audit tool for Python and JavaScript to check
+for style, syntax and other code health metrics. It is essentially a
+convenient wrapper above tools such as Pyflakes, pydocstyle, pycodestyle and
+McCabe, among others.")
+ (license license:lgpl3+)))
+
(define-public python-pyannotate
(package
(name "python-pyannotate")
@@ -1819,6 +1878,24 @@ The purpose of this package is to provide an easy way to test asynchronous
HTTP requests.")
(license license:expat)))
+(define-public python-pytest-rerunfailures
+ (package
+ (name "python-pytest-rerunfailures")
+ (version "10.2")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "pytest-rerunfailures" version))
+ (sha256
+ (base32 "15v68kggjvkflbqr0vz8gp5yp3pcsk0rz05bpg2l4xp0a6nin7ly"))))
+ (build-system python-build-system)
+ (propagated-inputs (list python-pytest python-setuptools))
+ (home-page "https://github.com/pytest-dev/pytest-rerunfailures")
+ (synopsis "Pytest plugin to re-run flaky tests")
+ (description "This package provides a pytest plugin to re-run tests to
+eliminate flaky failures.")
+ (license license:mpl2.0)))
+
(define-public python-xunitparser
(package
(name "python-xunitparser")
diff --git a/gnu/packages/python-compression.scm b/gnu/packages/python-compression.scm
index 81e1630e81..c41f837475 100644
--- a/gnu/packages/python-compression.scm
+++ b/gnu/packages/python-compression.scm
@@ -58,7 +58,7 @@
(native-inputs
`(("python-pep517" ,python-pep517)
("python-setuptools" ,python-setuptools)
- ("python-setuptools-scm" ,python-setuptools-scm/next)
+ ("python-setuptools-scm" ,python-setuptools-scm)
("python-coverage" ,python-coverage)
("python-coveralls" ,python-coveralls)
("python-pyannotate" ,python-pyannotate)
@@ -86,7 +86,7 @@ were a single file.")
(propagated-inputs
`(("python-cffi" ,python-cffi)
("python-toml" ,python-toml)
- ("python-setuptools-scm" ,python-setuptools-scm/next)))
+ ("python-setuptools-scm" ,python-setuptools-scm)))
(native-inputs
`(("python-setuptools" ,python-setuptools)
("python-coverage" ,python-coverage)
@@ -114,7 +114,7 @@ Jump conversion filter by CFFI for Python.")
`(("python-cffi" ,python-cffi)))
(native-inputs
`(("python-setuptools" ,python-setuptools)
- ("python-setuptools-scm" ,python-setuptools-scm/next)
+ ("python-setuptools-scm" ,python-setuptools-scm)
("python-pep517" ,python-pep517)
("python-coverage" ,python-coverage)
("python-pytest" ,python-pytest)
@@ -148,7 +148,7 @@ several possible methods.")
("python-zstandard" ,python-zstandard)))
(native-inputs
`(("python-setuptools" ,python-setuptools)
- ("python-setuptools-scm" ,python-setuptools-scm/next)
+ ("python-setuptools-scm" ,python-setuptools-scm)
("python-coverage" ,python-coverage)
("python-coveralls" ,python-coveralls)
("python-libarchive-c" ,python-libarchive-c)
diff --git a/gnu/packages/python-crypto.scm b/gnu/packages/python-crypto.scm
index e62fc04c0f..74f61fedbf 100644
--- a/gnu/packages/python-crypto.scm
+++ b/gnu/packages/python-crypto.scm
@@ -542,6 +542,13 @@ message digests and key derivation functions.")
(let ((crypto (package-with-python2
(strip-python2-variant python-cryptography))))
(package/inherit crypto
+ (arguments
+ `(#:python ,python-2
+ #:phases
+ (modify-phases %standard-phases
+ ;; The sanity-check attempts attempts to import the non-existent
+ ;; modules "_openssl" and "_padding".
+ (delete 'sanity-check))))
(propagated-inputs
`(("python2-ipaddress" ,python2-ipaddress)
("python2-backport-ssl-match-hostname"
@@ -552,14 +559,14 @@ message digests and key derivation functions.")
(define-public python-pyopenssl
(package
(name "python-pyopenssl")
- (version "20.0.0")
+ (version "20.0.1")
(source
(origin
(method url-fetch)
(uri (pypi-uri "pyOpenSSL" version))
(sha256
(base32
- "1i8ab5zn9i9iq2ksizp3rd42v157kacddzz88kviqw3kpp68xw4j"))))
+ "0labcbh2g0jhgisd79wx9kixmi6fip28096d1xb05fj3jmsiq8sc"))))
(build-system python-build-system)
(arguments
'(#:phases
@@ -571,7 +578,7 @@ message digests and key derivation functions.")
;; PyOpenSSL runs tests against a certificate with a fixed
;; expiry time. To ensure successful builds in the future,
;; set the time to roughly the release date.
- (invoke "faketime" "2020-12-01" "py.test" "-v" "-k"
+ (invoke "faketime" "2021-05-01" "py.test" "-v" "-k"
(string-append
;; This test tries to look up certificates from
;; the compiled-in default path in OpenSSL, which
@@ -771,31 +778,20 @@ PKCS#8, PKCS#12, PKCS#5, X.509 and TSP.")
(substitute* "setup.py"
(("\"wheel\"") ""))
;; Remove bundled libsodium.
- (delete-file-recursively "src/libsodium")
- #t))
+ (delete-file-recursively "src/libsodium")))
(sha256
(base32
"01b56hxrbif3hx8l6rwz5kljrgvlbj7shmmd2rjh0hn7974a5sal"))))
(build-system python-build-system)
(arguments
- `(#:modules (,@%python-build-system-modules
- (guix build utils)
- (ice-9 ftw)
- (srfi srfi-26))
- #:phases
- (modify-phases (@ (guix build python-build-system) %standard-phases)
+ `(#:phases
+ (modify-phases %standard-phases
(add-before 'build 'use-system-sodium
(lambda _
- (setenv "SODIUM_INSTALL" "system")
- #t))
+ (setenv "SODIUM_INSTALL" "system")))
(replace 'check
(lambda _
- (let ((build-directory
- (car (scandir "build" (cut string-prefix? "lib" <>)))))
- (setenv "PYTHONPATH"
- (string-append "./build/" build-directory ":"
- (getenv "PYTHONPATH")))
- (invoke "pytest" "-vv")))))))
+ (invoke "pytest" "-vv"))))))
(native-inputs
`(("python-hypothesis" ,python-hypothesis)
("python-pytest" ,python-pytest)))
@@ -1169,9 +1165,7 @@ none of them have everything that I'd like, so here's one more. It uses
(lambda* (#:key inputs #:allow-other-keys)
(substitute* "libnacl/__init__.py"
(("/usr/local/lib/libsodium.so")
- (string-append (assoc-ref inputs "libsodium")
- "/lib/libsodium.so")))
- #t)))))
+ (search-input-file inputs "/lib/libsodium.so"))))))))
(native-inputs
`(("python-pyhamcrest" ,python-pyhamcrest)))
(inputs
diff --git a/gnu/packages/python-science.scm b/gnu/packages/python-science.scm
index 13ee6b3df6..eb1f8312cd 100644
--- a/gnu/packages/python-science.scm
+++ b/gnu/packages/python-science.scm
@@ -186,7 +186,16 @@ routines such as routines for numerical integration and optimization.")
(uri (pypi-uri "scipy" version))
(sha256
(base32
- "1cgvgin8fvckv96hjh3ikmwkra5rif51bdb75ifzf7xbil5iwcx4"))))))
+ "1cgvgin8fvckv96hjh3ikmwkra5rif51bdb75ifzf7xbil5iwcx4"))))
+ (native-inputs
+ `(("python-cython" ,python2-cython)
+ ("python-pytest" ,python2-pytest)
+ ("python-sphinx" ,python2-sphinx)
+ ("python-numpydoc" ,python2-numpydoc)
+ ("gfortran" ,gfortran-7)
+ ("gcc" ,gcc-7)
+ ("perl" ,perl)
+ ("which" ,which)))))
(define-public python2-weave
(package
@@ -331,13 +340,13 @@ of the SGP4 satellite tracking algorithm.")
(define-public python-pandas
(package
(name "python-pandas")
- (version "1.3.3")
+ (version "1.3.4")
(source
(origin
(method url-fetch)
(uri (pypi-uri "pandas" version))
(sha256
- (base32 "1pq1nwj2kysy2g3p18wjb1xn8vk1jhcyisxilsnkwyd99aqqqb17"))))
+ (base32 "1z3gm521wpm3j13rwhlb4f2x0645zvxkgxij37i3imdpy39iiam2"))))
(build-system python-build-system)
(arguments
`(#:modules ((guix build utils)
@@ -360,26 +369,30 @@ of the SGP4 satellite tracking algorithm.")
;; xsel needs to write a log file.
(setenv "HOME" "/tmp")))
(replace 'check
- (lambda _
+ (lambda* (#:key tests? #:allow-other-keys)
(let ((build-directory
(string-append
(getcwd) "/build/"
(first (scandir "build"
(cut string-prefix? "lib." <>))))))
+ (substitute* "pyproject.toml"
+ ;; Not all data files are distributed with the tarball.
+ (("--strict-data-files ") ""))
(with-directory-excursion build-directory
- (invoke "pytest" "-vv" "pandas" "--skip-slow"
- "--skip-network"
- "-k"
- ;; These tets access the internet:
- ;; pandas/tests/io/xml/test_xml.py::test_wrong_url[lxml]
- ;; pandas/tests/io/xml/test_xml.py::test_wrong_url[etree]
- ;; TODO: the excel tests fail for unknown reasons
- (string-append "not test_wrong_url"
- " and not test_excelwriter_fspath"
- " and not test_ExcelWriter_dispatch"
- ;; TODO: Missing input
- " and not TestS3"
- " and not s3")))))))))
+ (when tests?
+ (invoke "pytest" "-vv" "pandas" "--skip-slow"
+ "--skip-network"
+ "-k"
+ ;; These tets access the internet:
+ ;; pandas/tests/io/xml/test_xml.py::test_wrong_url[lxml]
+ ;; pandas/tests/io/xml/test_xml.py::test_wrong_url[etree]
+ ;; TODO: the excel tests fail for unknown reasons
+ (string-append "not test_wrong_url"
+ " and not test_excelwriter_fspath"
+ " and not test_ExcelWriter_dispatch"
+ ;; TODO: Missing input
+ " and not TestS3"
+ " and not s3"))))))))))
(propagated-inputs
`(("python-jinja2" ,python-jinja2)
("python-numpy" ,python-numpy)
diff --git a/gnu/packages/python-web.scm b/gnu/packages/python-web.scm
index 964a045049..60f1f348b8 100644
--- a/gnu/packages/python-web.scm
+++ b/gnu/packages/python-web.scm
@@ -1,6 +1,6 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2015 Eric Dvorsak <eric@dvorsak.fr>
-;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020, 2021 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2017 Christopher Baines <mail@cbaines.net>
;;; Copyright © 2016, 2017 Danny Milosavljevic <dannym+a@scratchpost.org>
;;; Copyright © 2013, 2014, 2015, 2016, 2020 Andreas Enge <andreas@enge.fr>
@@ -68,6 +68,7 @@
#:use-module (guix download)
#:use-module (guix git-download)
#:use-module (guix build-system python)
+ #:use-module (guix gexp)
#:use-module (guix utils)
#:use-module (gnu packages)
#:use-module (gnu packages base)
@@ -102,13 +103,13 @@
(define-public python-prawcore
(package
(name "python-prawcore")
- (version "2.0.0")
+ (version "2.3.0")
(source
(origin
(method url-fetch)
(uri (pypi-uri "prawcore" version))
(sha256
- (base32 "1l9nrn4s03xl8fvkyybdk86bm9cyyk43alkxf9g014a9ynvdk65l"))))
+ (base32 "0vgmhjddqxnz5vy70dyqvakak51fg1nk6j3xavkc83d8nzacrwfs"))))
(build-system python-build-system)
(native-inputs
`(("python-betamax" ,python-betamax)
@@ -127,13 +128,13 @@
(define-public python-praw
(package
(name "python-praw")
- (version "7.2.0")
+ (version "7.5.0")
(source
(origin
(method url-fetch)
(uri (pypi-uri "praw" version))
(sha256
- (base32 "0ll1a0n8xs8gykizdsfrw63jp6bc39ab0pk3yzwcak96fyxh0ij3"))))
+ (base32 "1nqcwz8r8xp4rfpy2i11x2fjga8fmmf6zw94xjk1h1yxgn1gq6zr"))))
(build-system python-build-system)
(arguments
`(#:phases
@@ -141,24 +142,25 @@
(add-after 'unpack 'disable-failing-tests
(lambda _
(with-directory-excursion "tests"
- ;; Require networking.
+ ;; Integration tests depend on files that are not included.
(for-each delete-file-recursively
'("integration/models" "unit/models"))
- ;; https://github.com/praw-dev/praw/issues/1699
- ;; #issuecomment-795336704
- (delete-file "unit/test_config.py"))
- #t))
+ ;; The configuration file does not seem to exist.
+ (delete-file "unit/test_config.py"))))
(replace 'check
(lambda* (#:key tests? #:allow-other-keys)
(when tests?
- (invoke "pytest"))
- #t)))))
+ (invoke "pytest" "-k"
+ ;; These tests depend on test files that don't exist.
+ (string-append "not test_bad_request_without_json_text_plain_response"
+ " and not test_bad_request_without_json_text_html_response"))))))))
(native-inputs
`(("python-betamax" ,python-betamax)
("python-betamax-matchers" ,python-betamax-matchers)
("python-pytest" ,python-pytest)))
(propagated-inputs
`(("python-prawcore" ,python-prawcore)
+ ("python-update-checker" ,python-update-checker)
("python-websocket-client" ,python-websocket-client)))
(synopsis "Python Reddit API Wrapper")
(description "PRAW is a Python package that allows for simple access to
@@ -207,8 +209,7 @@ API rules.")
(string-append "@pytest.mark.xfail\n" all)))
;; Don't test the aiohttp pytest plugin to avoid a dependency loop.
- (delete-file "tests/test_pytest_plugin.py")
- #t))
+ (delete-file "tests/test_pytest_plugin.py")))
(add-before 'build 'cythonize
(lambda _
;; Adapted from the Makefile.
@@ -216,18 +217,16 @@ API rules.")
(for-each
(lambda (file)
(invoke "cython" "-3"
- file "-I" "aiohttp"))
+ file "-I" "."))
(find-files "." "_.*\\.pyx$")))))
(replace 'check
(lambda* (#:key tests? #:allow-other-keys)
- (setenv "PYTHONPATH"
- (string-append ".:" (getenv "PYTHONPATH")))
(if tests?
(invoke "pytest" "-vv"
;; Disable loading the aiohttp coverage plugin
;; to avoid a circular dependency (code coverage
;; is not very interesting to us anyway).
- "-o" "addopts=''")
+ "-o" "addopts=''" "--ignore=aiohttp")
(format #t "test suite not run~%")))))))
(propagated-inputs
`(("python-aiodns" ,python-aiodns)
@@ -239,13 +238,13 @@ API rules.")
("python-typing-extensions" ,python-typing-extensions)
("python-yarl" ,python-yarl)))
(native-inputs
- `(("python-cython" ,python-cython)
- ("python-pytest" ,python-pytest)
- ("python-pytest-mock" ,python-pytest-mock)
- ("python-re-assert" ,python-re-assert)
- ("gunicorn" ,gunicorn-bootstrap)
+ `(("gunicorn" ,gunicorn-bootstrap)
+ ("python-async-generator" ,python-async-generator)
+ ("python-cython" ,python-cython)
("python-freezegun" ,python-freezegun)
- ("python-async-generator" ,python-async-generator)))
+ ("python-pytest" ,python-pytest-6.1)
+ ("python-pytest-mock" ,python-pytest-mock)
+ ("python-re-assert" ,python-re-assert)))
(home-page "https://github.com/aio-libs/aiohttp/")
(synopsis "Async HTTP client/server framework (asyncio)")
(description "@code{aiohttp} is an asynchronous HTTP client/server
@@ -345,22 +344,20 @@ comes with a SOCKS proxy client.")
(define-public python-asgiref
(package
(name "python-asgiref")
- (version "3.3.4")
+ (version "3.4.1")
(source (origin
(method url-fetch)
(uri (pypi-uri "asgiref" version))
(sha256
- (base32
- "0y0vdzldjkbs4pxf10pi6jpxq9b2sfp1rlwm153jcf5nvzxns8fi"))))
+ (base32 "1saqgpgbdvb8awzm0f0640j0im55hkrfzvcw683cgqw4ni3apwaf"))))
(build-system python-build-system)
(arguments
- '(#:phases (modify-phases %standard-phases
- (replace 'check
- (lambda _
- (setenv "PYTHONPATH"
- (string-append "./build/lib:"
- (getenv "PYTHONPATH")))
- (invoke "pytest" "-vv"))))))
+ '(#:phases
+ (modify-phases %standard-phases
+ (replace 'check
+ (lambda* (#:key tests? #:allow-other-keys)
+ (when tests?
+ (invoke "pytest" "-vv")))))))
(native-inputs
`(("python-pytest" ,python-pytest)
("python-pytest-asyncio" ,python-pytest-asyncio)))
@@ -470,9 +467,6 @@ Model} (SAM) templates into AWS CloudFormation templates.")
"tests/ext/aiohttp/test_client.py"))))
(replace 'check
(lambda _
- (setenv "PYTHONPATH"
- (string-append "./build/lib:.:"
- (getenv "PYTHONPATH")))
(invoke "pytest" "-vv" "tests"))))))
(native-inputs
`(;; These are required for the test suite.
@@ -811,9 +805,6 @@ content using a variety of algorithms.")
`(#:phases (modify-phases %standard-phases
(replace 'check
(lambda _
- (setenv "PYTHONPATH"
- (string-append "./build/lib:"
- (getenv "PYTHONPATH")))
(invoke "pytest" "-vv"
;; Prevent running the flake8 and black
;; pytest plugins, which only tests style
@@ -1214,7 +1205,8 @@ and written in Python.")
`(("libxml2" ,libxml2)))
(propagated-inputs
`(("python-lxml" ,python-lxml)
- ("python-beautifulsoup4" ,python-beautifulsoup4)))
+ ("python-beautifulsoup4" ,python-beautifulsoup4)
+ ("python-chardet" ,python-chardet)))
(home-page "https://html5-parser.readthedocs.io")
(synopsis "Fast C-based HTML5 parsing for Python")
(description "This package provides a fast implementation of the HTML5
@@ -1504,9 +1496,6 @@ another XPath engine to find the matching elements in an XML or HTML document.")
`(#:phases (modify-phases %standard-phases
(replace 'check
(lambda _
- (setenv "PYTHONPATH"
- (string-append "./build/lib:"
- (getenv "PYTHONPATH")))
(invoke "pytest" "tests" "-vv"
;; XXX: This fails with newer Pytest
;; (upstream uses Pytest 3..).
@@ -1963,8 +1952,10 @@ conforming to a given API or contract.")
'(#:phases
(modify-phases %standard-phases
(replace 'check
- (lambda _
- (invoke "zope-testrunner" "--test-path=src"))))))
+ (lambda* (#:key tests? #:allow-other-keys)
+ (if tests?
+ (invoke "zope-testrunner" "--test-path=src")
+ (format #t "test suite not run~%")))))))
(native-inputs
`(("python-zope-testrunner" ,python-zope-testrunner-bootstrap)))
(propagated-inputs
@@ -1975,14 +1966,27 @@ conforming to a given API or contract.")
that have uses outside of the Zope framework.")
(license license:zpl2.1)))
-(define-public python-zope-exceptions-bootstrap
+(define (python-zope-bootstrap-package orig)
(package
- (inherit python-zope-exceptions)
- (arguments `(#:tests? #f))
+ (inherit orig)
+ (name (string-append (package-name orig) "-bootstrap"))
+ (arguments
+ (if (null? (package-arguments orig))
+ `(#:tests? #f
+ #:phases (modify-phases %standard-phases
+ (delete 'sanity-check)))
+ (substitute-keyword-arguments (package-arguments orig)
+ ((#:tests? _ #f) #f)
+ ((#:phases phases '%standard-phases)
+ `(modify-phases ,phases
+ (delete 'sanity-check))))))
(propagated-inputs `())
(native-inputs `())
(properties `((hidden? . #t)))))
+(define-public python-zope-exceptions-bootstrap
+ (python-zope-bootstrap-package python-zope-exceptions))
+
(define-public python2-zope-exceptions
(package-with-python2 python-zope-exceptions))
@@ -2020,7 +2024,15 @@ forms, HTTP servers, regular expressions, and more.")
"0jyyf1dcz156q95x2y7yw2v420q2xn3cff0c5aci7hmdmcbn0gc7"))))
(build-system python-build-system)
(arguments
- '(#:tests? #f)) ; FIXME: Tests can't find zope.interface.
+ '(#:tests? #f ;FIXME: Tests can't find zope.interface.
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'remove-problematic-test
+ (lambda _
+ ;; This test contains invalid syntax, which breaks bytecode
+ ;; compilation. For simplicity just remove it.
+ (delete-file
+ "src/zope/testrunner/tests/testrunner-ex/sample2/badsyntax.py"))))))
(native-inputs
`(("python-zope-testing" ,python-zope-testing)))
(propagated-inputs
@@ -2035,8 +2047,7 @@ tests.")
(define-public python-zope-testrunner-bootstrap
(package
- (inherit python-zope-testrunner)
- (arguments `(#:tests? #f))
+ (inherit (python-zope-bootstrap-package python-zope-testrunner))
(propagated-inputs
`(("python-six" ,python-six)
("python-zope-exceptions" ,python-zope-exceptions-bootstrap)))
@@ -2134,11 +2145,7 @@ Markup Language.")
(license license:zpl2.1)))
(define-public python-zope-configuration-bootstrap
- (package
- (inherit python-zope-configuration)
- (arguments `(#:tests? #f))
- (native-inputs `())
- (properties `((hidden? . #t)))))
+ (python-zope-bootstrap-package python-zope-configuration))
(define-public python2-zope-configuration
(package-with-python2 python-zope-configuration))
@@ -2201,11 +2208,7 @@ brokering, etc.) for which the proxy is responsible.")
(license license:zpl2.1)))
(define-public python-zope-proxy-bootstrap
- (package
- (inherit python-zope-proxy)
- (arguments `(#:tests? #f))
- (native-inputs `())
- (properties `((hidden? . #t)))))
+ (python-zope-bootstrap-package python-zope-proxy))
(define-public python2-zope-proxy
(package-with-python2 python-zope-proxy))
@@ -2262,11 +2265,7 @@ Zope3, which are are special objects that have a structural location.")
(license license:zpl2.1)))
(define-public python-zope-location-bootstrap
- (package
- (inherit python-zope-location)
- (arguments `(#:tests? #f))
- (native-inputs `())
- (properties `((hidden? . #t)))))
+ (python-zope-bootstrap-package python-zope-location))
(define-public python2-zope-location
(package-with-python2 python-zope-location))
@@ -2305,15 +2304,12 @@ security policies on Python objects.")
(define-public python-zope-security-bootstrap
(package
- (inherit python-zope-security)
- (arguments `(#:tests? #f))
+ (inherit (python-zope-bootstrap-package python-zope-security))
(propagated-inputs
`(("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
("python-zope-interface" ,python-zope-interface)
("python-zope-proxy" ,python-zope-proxy-bootstrap)
- ("python-zope-schema" ,python-zope-schema)))
- (native-inputs `())
- (properties `((hidden? . #t)))))
+ ("python-zope-schema" ,python-zope-schema)))))
(define-public python2-zope-security
(package-with-python2 python-zope-security))
@@ -2334,9 +2330,10 @@ security policies on Python objects.")
'(#:phases
(modify-phases %standard-phases
(replace 'check
- (lambda* (#:key inputs outputs #:allow-other-keys)
- (add-installed-pythonpath inputs outputs)
- (invoke "python" "setup.py" "test"))))))
+ (lambda* (#:key tests? #:allow-other-keys)
+ (if tests?
+ (invoke "python" "setup.py" "test")
+ (format #t "test suite not run~%")))))))
(native-inputs
`(("python-persistent" ,python-persistent)
("python-zope-configuration" ,python-zope-configuration-bootstrap)
@@ -2360,11 +2357,7 @@ facilities for defining, registering and looking up components.")
(license license:zpl2.1)))
(define-public python-zope-component-bootstrap
- (package
- (inherit python-zope-component)
- (arguments `(#:tests? #f))
- (native-inputs `())
- (properties `((hidden? . #t)))))
+ (python-zope-bootstrap-package python-zope-component))
(define-public python2-zope-component
(package-with-python2 python-zope-component))
@@ -2410,7 +2403,8 @@ deprecation warnings to be issued when a variable is used.")
'(;; The tests appear to require networking.
#:tests? #f))
(propagated-inputs
- `(("python-pyopenssl" ,python-pyopenssl)))
+ `(("python-pyasn1" ,python-pyasn1)
+ ("python-pyopenssl" ,python-pyopenssl)))
(synopsis "HTTPS support for Python's httplib and urllib2")
(description "This is a HTTPS client implementation for httplib and urllib2
based on PyOpenSSL. PyOpenSSL provides a more fully-featured SSL implementation
@@ -2539,17 +2533,18 @@ APIs.")
(define-public python-requests
(package
(name "python-requests")
- (version "2.25.0")
+ (version "2.26.0")
(source (origin
(method url-fetch)
(uri (pypi-uri "requests" version))
(sha256
(base32
- "1y6mb8c0ipd64d5axq2p368yxndp3f966hmabjka2q2a5y9hn6kz"))))
+ "19q73fq7hip7b74fwls3p9x6zwvfwqcwpn6kha3zsgvrrzw5iamq"))))
(build-system python-build-system)
(propagated-inputs
`(("python-certifi" ,python-certifi)
("python-chardet" ,python-chardet)
+ ("python-charset-normalizer" ,python-charset-normalizer)
("python-idna" ,python-idna)
("python-urllib3" ,python-urllib3)))
(arguments
@@ -2560,26 +2555,17 @@ APIs.")
(description
"Requests is a Python HTTP client library. It aims to be easier to use
than Python’s urllib2 library.")
- (license license:asl2.0)))
-
-;; Some software requires an older version of Requests, notably Docker/Docker
-;; Compose.
-(define-public python-requests-2.20
- (package (inherit python-requests)
- (version "2.20.1")
- (source (origin
- (method url-fetch)
- (uri (pypi-uri "requests" version))
- (sha256
- (base32
- "0qzj6cgv3k9wyj7wlxgz7xq0cfg4jbbkfm24pp8dnhczwl31527a"))))
- (propagated-inputs
- `(("python-urllib3" ,python-urllib3-1.24)
- ("python-idna" ,python-idna-2.7)
- ,@(package-propagated-inputs python-requests)))))
+ (license license:asl2.0)
+ (properties `((python2-variant . ,(delay python2-requests))))))
(define-public python2-requests
- (package-with-python2 python-requests))
+ (let ((base (package-with-python2 (strip-python2-variant python-requests))))
+ (package
+ (inherit base)
+ ;; The python-charset-normalizer dependency is necessary on Python 3
+ ;; only.
+ (propagated-inputs (modify-inputs (package-propagated-inputs base)
+ (delete "python-charset-normalizer"))))))
(define-public python-requests-unixsocket
(package
@@ -2601,9 +2587,13 @@ than Python’s urllib2 library.")
(substitute* "test-requirements.txt"
(("(.*)==(.*)" _ name) (string-append name "\n")))))
(replace 'check
- (lambda* (#:key inputs outputs #:allow-other-keys)
- (add-installed-pythonpath inputs outputs)
- (invoke "pytest" "-vv"))))))
+ (lambda* (#:key tests? inputs outputs #:allow-other-keys)
+ ;; Avoid a deprecation error.
+ (substitute* "pytest.ini"
+ (("--pep8") ""))
+ (when tests?
+ (add-installed-pythonpath inputs outputs)
+ (invoke "pytest" "-vv")))))))
(propagated-inputs
`(("python-pbr" ,python-pbr)
("python-requests" ,python-requests)
@@ -2814,15 +2804,14 @@ authenticated session objects providing things like keep-alive.")
(define-public python-urllib3
(package
(name "python-urllib3")
- (version "1.26.2")
+ (version "1.26.7")
(source
(origin
(method url-fetch)
(uri (pypi-uri "urllib3" version))
(sha256
(base32
- "024yldjwjavps39yb77sc422z8fa9bn20wcqrcncjwrqjab8y60r"))))
- (replacement python-urllib3/fixed)
+ "1kkf6gi8a1fs0dqkf6kpmdpsy97iirvliz8q1krxp8ppaiawd1s9"))))
(build-system python-build-system)
(arguments `(#:tests? #f))
(propagated-inputs
@@ -2841,29 +2830,6 @@ supports url redirection and retries, and also gzip and deflate decoding.")
(properties `((python2-variant . ,(delay python2-urllib3))))
(license license:expat)))
-(define python-urllib3/fixed
- (package
- (inherit python-urllib3)
- (version "1.26.7")
- (source
- (origin
- (method url-fetch)
- (uri (pypi-uri "urllib3" version))
- (sha256
- (base32
- "1kkf6gi8a1fs0dqkf6kpmdpsy97iirvliz8q1krxp8ppaiawd1s9"))))))
-
-;; Some software requires an older version of urllib3, notably Docker.
-(define-public python-urllib3-1.24
- (package (inherit python-urllib3)
- (version "1.24.3")
- (source (origin
- (method url-fetch)
- (uri (pypi-uri "urllib3" version))
- (sha256
- (base32
- "1x0slqrv6kixkbcdnxbglvjliwhc1payavxjvk8fvbqjrnasd4r3"))))))
-
(define-public python2-urllib3
(let ((base (package-with-python2 (strip-python2-variant python-urllib3))))
(package/inherit
@@ -2896,13 +2862,12 @@ supports url redirection and retries, and also gzip and deflate decoding.")
(("if not self._exists_on_path\\('groff'\\):") "")
(("raise ExecutableNotFoundError\\('groff'\\)") "")
(("cmdline = \\['groff'")
- (string-append "cmdline = ['" (which "groff") "'")))
- #t)))))
+ (string-append "cmdline = ['" (which "groff") "'"))))))))
(propagated-inputs
- `(("python-colorama" ,python-colorama)
+ `(("python-colorama" ,python-colorama-for-awscli)
("python-botocore" ,python-botocore)
("python-s3transfer" ,python-s3transfer)
- ("python-docutils" ,python-docutils)
+ ("python-docutils" ,python-docutils-0.15)
("python-pyyaml" ,python-pyyaml)
("python-rsa" ,python-rsa)))
(native-inputs
@@ -3000,22 +2965,21 @@ minimum of WSGI.")
(define-public python-flask
(package
(name "python-flask")
- (version "1.1.2")
+ (version "2.0.1")
(source (origin
(method url-fetch)
(uri (pypi-uri "Flask" version))
(sha256
(base32
- "0q3h295izcil7lswkzfnyg3k5gq4hpmqmpl6i7s5m1n9szi1myjf"))))
+ "0mcgwq7b4qd99mf5bsvs3wphchxarf8kgil4hwww3blj31xjak0w"))))
(build-system python-build-system)
(arguments
'(#:phases
(modify-phases %standard-phases
(replace 'check
- (lambda _
- (setenv "PYTHONPATH" (string-append "./build/lib:"
- (getenv "PYTHONPATH")))
- (invoke "pytest" "-vv" "tests"))))))
+ (lambda* (#:key tests? #:allow-other-keys)
+ (when tests?
+ (invoke "pytest" "-vv" "tests")))))))
(native-inputs
`(("python-pytest" ,python-pytest)))
(propagated-inputs
@@ -3047,8 +3011,6 @@ presume or force a developer to use a particular tool or library.")
(modify-phases %standard-phases
(replace 'check
(lambda _
- (setenv "PYTHONPATH" (string-append "./build/lib:"
- (getenv "PYTHONPATH")))
(invoke "pytest" "-vv"))))))
(propagated-inputs
`(("python-flask-babel" ,python-flask-babel)
@@ -3809,17 +3771,17 @@ for Flask.")
(build-system python-build-system)
(arguments
'(#:phases (modify-phases %standard-phases
- (add-before 'check 'disable-some-tests
+ (add-before 'check 'adjust-tests
(lambda _
+ ;; Fix for Python 3.9 compatibility.
+ (substitute* "tests/test_script.py"
+ (("self\\.t\\.isAlive")
+ "self.t.is_alive"))
;; This test requires 'postcss' and 'babel' which are
;; not yet available in Guix.
- (delete-file "tests/test_filters.py")
- #t))
+ (delete-file "tests/test_filters.py")))
(replace 'check
(lambda _
- (setenv "PYTHONPATH"
- (string-append "./build/lib:"
- (getenv "PYTHONPATH")))
(invoke "pytest" "-vv"))))))
(native-inputs
`(("python-jinja2" ,python-jinja2)
@@ -4113,28 +4075,31 @@ List. Forked from and using the same API as the publicsuffix package.")
(define-public python-werkzeug
(package
(name "python-werkzeug")
- (version "1.0.1")
+ (version "2.0.1")
(source
(origin
(method url-fetch)
(uri (pypi-uri "Werkzeug" version))
(sha256
(base32
- "0z74sa1xw5h20yin9faj0vvdbq713cgbj84klc72jr9nmpjv303c"))))
+ "0hlwawnn8c41f254qify5jnjj8xb97n294h09bqimzqhs0qdpq8x"))))
(build-system python-build-system)
(arguments
'(#:phases
(modify-phases %standard-phases
- (delete 'check)
- (add-after 'install 'check
- (lambda* (#:key inputs outputs #:allow-other-keys)
- (add-installed-pythonpath inputs outputs)
- (invoke "python" "-m" "pytest"))))))
+ (replace 'check
+ (lambda* (#:key tests? inputs outputs #:allow-other-keys)
+ (when tests?
+ (add-installed-pythonpath inputs outputs)
+ (invoke "python" "-m" "pytest"
+ ;; Test tries to use the network.
+ "-k not test_reloader_sys_path")))))))
(propagated-inputs
`(("python-requests" ,python-requests)))
(native-inputs
`(("python-pytest" ,python-pytest)
- ("python-pytest-timeout" ,python-pytest-timeout)))
+ ("python-pytest-timeout" ,python-pytest-timeout)
+ ("python-pytest-xprocess" ,python-pytest-xprocess)))
(home-page "https://palletsprojects.com/p/werkzeug/")
(synopsis "Utilities for WSGI applications")
(description "One of the most advanced WSGI utility modules. It includes a
@@ -4144,6 +4109,31 @@ uploads, a powerful URL routing system and a bunch of community-contributed
addon modules.")
(license license:x11)))
+(define-public python-werkzeug-1.0
+ (package
+ (inherit python-werkzeug)
+ (version "1.0.1")
+ (source (origin
+ (method url-fetch)
+ (uri (pypi-uri "Werkzeug" version))
+ (sha256
+ (base32
+ "0z74sa1xw5h20yin9faj0vvdbq713cgbj84klc72jr9nmpjv303c"))
+ (patches (search-patches "python-werkzeug-tests.patch"))))
+ (arguments
+ '(#:phases
+ (modify-phases %standard-phases
+ (delete 'check)
+ (add-after 'install 'check
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (add-installed-pythonpath inputs outputs)
+ (invoke "python" "-m" "pytest"))))))
+ (propagated-inputs
+ `(("python-requests" ,python-requests)))
+ (native-inputs
+ `(("python-pytest" ,python-pytest)
+ ("python-pytest-timeout" ,python-pytest-timeout)))))
+
(define-public python-bottle
(package
(name "python-bottle")
@@ -4323,17 +4313,36 @@ name resolutions asynchronously.")
(define-public python-yarl
(package
(name "python-yarl")
- (version "1.1.1")
+ (version "1.6.3")
(source
(origin
(method url-fetch)
(uri (pypi-uri "yarl" version))
(sha256
(base32
- "1s6z13g8vgxfkkqwhn6imnm7pl7ky9arv4jygnn6bcndcbidg7d6"))))
+ "045z4ssg8g5h0qhz8hnx74hswgkndaldqq1xi5l1n5s0j996d44a"))
+ (modules '((guix build utils)))
+ (snippet
+ #~(begin
+ (delete-file "yarl/_quoting_c.c")))))
(build-system python-build-system)
+ (arguments
+ (list #:tests? #f ; test suite can't find yarl._quoting_c
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'cythonize-code
+ (lambda _
+ (invoke "cython" "yarl/_quoting_c.pyx")))
+ (replace 'check
+ (lambda* (#:key tests? inputs outputs #:allow-other-keys)
+ (when tests?
+ (substitute* "setup.cfg"
+ (("--cov=yarl") ""))
+ (add-installed-pythonpath inputs outputs)
+ (invoke "python" "-m" "pytest")))))))
(native-inputs
- `(("python-pytest" ,python-pytest)
+ `(("python-cython" ,python-cython)
+ ("python-pytest" ,python-pytest)
("python-pytest-runner" ,python-pytest-runner)))
(propagated-inputs
`(("python-idna" ,python-idna)
@@ -4376,7 +4385,15 @@ Google search engine. Its module is called @code{googlesearch}.")
"1wpbbbxfpy9mwxdy3kn352cb590ladv574j1aa2l4grjdqw3ln05"))))
(build-system python-build-system)
(arguments
- '(#:tests? #f)) ; tests require internet access
+ `(#:tests? #f ; tests require internet access
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'fix-setup-py
+ (lambda _
+ (substitute* "setup.py"
+ (("googleapiclient/discovery_cache")
+ "googleapiclient.discovery_cache"))
+ #t)))))
(native-inputs
`(("python-httplib2" ,python-httplib2)
("python-six" ,python-six)
@@ -4586,7 +4603,8 @@ Python.")
(sha256
(base32 "1aww2ncglyii4jkbfjxqhinivawf9zmwifcj32d69gpwp6h86czi"))))
(propagated-inputs
- `(("python-unidecode" ,python-unidecode)))
+ `(("python-unidecode" ,python-unidecode)
+ ("python-text-unidecode" ,python-text-unidecode)))
(arguments
`(#:phases
(modify-phases %standard-phases
@@ -4815,14 +4833,11 @@ event loop. It is implemented in Cython and uses libuv under the hood.")
(lambda _
(invoke "make" "-C" "docs" "PAPER=a4" "html" "info")
(delete-file "docs/build/texinfo/Makefile")
- (delete-file "docs/build/texinfo/Gunicorn.texi")
- #t))
+ (delete-file "docs/build/texinfo/Gunicorn.texi")))
(replace 'check
(lambda* (#:key tests? #:allow-other-keys)
(if tests?
(begin
- (setenv "PYTHONPATH"
- (string-append ".:" (getenv "PYTHONPATH")))
(invoke "pytest" "-vv"
;; Disable the geventlet tests because eventlet uses
;; dnspython, which does not work in the build
@@ -4939,7 +4954,7 @@ and fairly speedy.")
(define-public python-uvicorn
(package
(name "python-uvicorn")
- (version "0.11.8")
+ (version "0.13.2")
(source
(origin
;; PyPI tarball has no tests.
@@ -4949,7 +4964,7 @@ and fairly speedy.")
(commit version)))
(file-name (git-file-name name version))
(sha256
- (base32 "00iidg5ysp7k00bw3kmkvr8mghnh4jdi0p2ryiarhryf8wz2r3fy"))))
+ (base32 "04zgmp9z46k72ay6cz7plga6d3w3a6x41anabm7ramp7jdqf6na9"))))
(build-system python-build-system)
(arguments
`(#:phases
@@ -4959,15 +4974,11 @@ and fairly speedy.")
(add-installed-pythonpath inputs outputs)
(invoke "pytest" "-vv"))))))
(native-inputs
- `(("python-black" ,python-black)
- ("python-codecov" ,python-codecov)
- ("python-flake8" ,python-flake8)
- ("python-isort" ,python-isort)
- ("python-mypy" ,python-mypy)
- ("python-pytest" ,python-pytest)
- ("python-pytest-cov" ,python-pytest-cov)
+ `(("python-pytest" ,python-pytest)
("python-pytest-mock" ,python-pytest-mock)
- ("python-requests" ,python-requests)))
+ ("python-requests" ,python-requests)
+ ("python-trustme" ,python-trustme)
+ ("python-wsproto" ,python-wsproto)))
(propagated-inputs
`(("python-click" ,python-click)
("python-h11" ,python-h11)
@@ -4975,8 +4986,7 @@ and fairly speedy.")
("python-pyyaml" ,python-pyyaml)
("python-uvloop" ,python-uvloop)
("python-watchgod" ,python-watchgod)
- ("python-websockets" ,python-websockets)
- ("python-wsproto" ,python-wsproto)))
+ ("python-websockets" ,python-websockets)))
(home-page "https://github.com/encode/uvicorn")
(synopsis "Fast ASGI server implementation")
(description
@@ -5453,7 +5463,15 @@ files.")
(base32
"03s3ml6sbki24aajllf8aily0xzrn929zxi84p50zkkbikdd4raw"))))
(build-system python-build-system)
- (arguments '(#:tests? #f)) ; Tests not included in release tarball.
+ (arguments
+ '(#:tests? #f ; Tests not included in release tarball.
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'fix-websockets-package-name-requirement
+ (lambda* (#:key inputs #:allow-other-keys)
+ ;; Python package names use dot as separator.
+ (substitute* "setup.py"
+ (("websockets/extensions") "websockets.extensions")))))))
(home-page "https://github.com/aaugustin/websockets")
(synopsis
"Python implementation of the WebSocket Protocol (RFC 6455 & 7692)")
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index b3a350aca4..f52a1fed74 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -37,7 +37,7 @@
;;; Copyright © 2017 Frederick M. Muriithi <fredmanglis@gmail.com>
;;; Copyright © 2017, 2018 Adriano Peluso <catonano@gmail.com>
;;; Copyright © 2017 Ben Sturmfels <ben@sturm.com.au>
-;;; Copyright © 2017, 2018, 2019 Mathieu Othacehe <m.othacehe@gmail.com>
+;;; Copyright © 2017, 2018, 2019, 2021 Mathieu Othacehe <m.othacehe@gmail.com>
;;; Copyright © 2017 José Miguel Sánchez García <jmi2k@openmailbox.org>
;;; Copyright © 2017, 2020, 2021 Roel Janssen <roel@gnu.org>
;;; Copyright © 2017, 2018, 2019 Kei Kebreau <kkebreau@posteo.net>
@@ -149,6 +149,7 @@
#:use-module (gnu packages enchant)
#:use-module (gnu packages file)
#:use-module (gnu packages fontutils)
+ #:use-module (gnu packages freedesktop)
#:use-module (gnu packages gcc)
#:use-module (gnu packages geo)
#:use-module (gnu packages ghostscript)
@@ -226,6 +227,7 @@
#:use-module (guix download)
#:use-module (guix git-download)
#:use-module (guix hg-download)
+ #:use-module (guix gexp)
#:use-module (guix utils)
#:use-module (guix build-system gnu)
#:use-module (guix build-system cmake)
@@ -777,12 +779,7 @@ implementation for the Telegram Bot API.")
`(#:phases (modify-phases %standard-phases
(replace 'check
(lambda _
- ;; Extend PYTHONPATH so the built package will be found.
- (setenv "PYTHONPATH"
- (string-append (getcwd) "/build/lib:"
- (getenv "PYTHONPATH")))
- (invoke "pytest" "-p" "no:logging")
- #t)))))
+ (invoke "pytest" "-p" "no:logging"))))))
(home-page "https://github.com/borntyping/python-colorlog")
(synopsis "Log formatting with colors for python")
(description "The @code{colorlog.ColoredFormatter} is a formatter for use
@@ -964,25 +961,22 @@ to CommonMark.")
(lambda _
(substitute* "pymediainfo/__init__.py"
(("libmediainfo.so.0")
- (string-append (assoc-ref %build-inputs "libmediainfo")
- "/lib/libmediainfo.so.0")))
- #t))
+ (search-input-file %build-inputs
+ "/lib/libmediainfo.so.0")))))
(replace 'check
- (lambda* (#:key tests? #:allow-other-keys)
+ (lambda* (#:key tests? inputs outputs #:allow-other-keys)
(when tests?
- ;; Extend PYTHONPATH so the built package will be found.
- (setenv "PYTHONPATH"
- (string-append (getcwd) "/build/lib:"
- (getenv "PYTHONPATH")))
- ;; Skip the only failing test "test_parse_url"
+ (add-installed-pythonpath inputs outputs)
+ ;; Skip the only failing test "test_parse_url" because it tries
+ ;; to access the internet.
(invoke "pytest" "-vv" "-k" "not test_parse_url")))))))
(home-page
"https://github.com/sbraz/pymediainfo")
(synopsis
"Python wrapper for the mediainfo library")
(description
- "Python wrapper for the mediainfo library to access the technical and tag
-data for video and audio files.")
+ "This package provides a Python wrapper for the mediainfo library to
+access the technical and tag data for video and audio files.")
(license license:expat)))
(define-public python-psutil
@@ -1156,15 +1150,16 @@ by @code{binstar}, @code{binstar-build}, and @code{chalmers}.")
(version "2.9.0")
(source
(origin
- (method url-fetch)
- (uri (pypi-uri "Babel" version))
- (sha256
- (base32
- "018yg7g2pa6vjixx1nx41cfispgfi0azzp0a1chlycbj8jsil0ys"))))
+ (method url-fetch)
+ (uri (pypi-uri "Babel" version))
+ (sha256
+ (base32
+ "018yg7g2pa6vjixx1nx41cfispgfi0azzp0a1chlycbj8jsil0ys"))))
(build-system python-build-system)
(native-inputs
`(("python-freezegun" ,python-freezegun)
- ("python-pytest" ,python-pytest)))
+ ("python-pytest" ,python-pytest)
+ ("tzdata" ,tzdata-for-tests)))
(propagated-inputs
`(("python-pytz" ,python-pytz)))
(arguments
@@ -1172,7 +1167,7 @@ by @code{binstar}, @code{binstar-build}, and @code{chalmers}.")
(replace 'check
(lambda _
(invoke "pytest" "-vv"))))))
- (home-page "http://babel.pocoo.org/")
+ (home-page "https://babel.pocoo.org/")
(synopsis
"Tools for internationalizing Python applications")
(description
@@ -1224,7 +1219,7 @@ and verifies that it matches the intended target hostname.")
(build-system python-build-system)
(native-inputs
`(("python-coverage" ,python-coverage)
- ("python-hypothesis" ,python-hypothesis-5.23) ; use_true_random=... from >=5.19.0
+ ("python-hypothesis" ,python-hypothesis)
("python-pre-commit" ,python-pre-commit)
("python-py" ,python-py)
("python-pytest" ,python-pytest)
@@ -1324,14 +1319,6 @@ Expressions are constructed from parsed strings or directly in Python.")
(modify-phases %standard-phases
(replace 'check
(lambda _
- ;; The 'runexamples' script sets PYTHONPATH to CWD, then goes
- ;; on to import numpy. Somehow this works on their CI system.
- ;; Let's just manage PYTHONPATH here instead.
- (substitute* "runexamples.sh"
- (("export PYTHONPATH=.*") ""))
- (setenv "PYTHONPATH"
- (string-append (getcwd) ":"
- (getenv "PYTHONPATH")))
(invoke "./runexamples.sh")
(invoke "nosetests" "-v"))))))
(home-page "https://github.com/fhs/python-hdf4")
@@ -1994,9 +1981,6 @@ language. It aims to be fast.")
`(#:phases (modify-phases %standard-phases
(replace 'check
(lambda _
- (format #t "current working dir ~s~%" (getcwd))
- (setenv "PYTHONPATH"
- (string-append ".:" (getenv "PYTHONPATH")))
;; We must run the test suite module directly, as it
;; fails to define the 'tempdir' variable in scope for
;; the tests otherwise
@@ -2466,27 +2450,47 @@ standard.")
(sha256
(base32
"1qzjj8nwj4dn0mhq1j64f136afiqqb81lvqiikipz3g1g0b80lqx"))))
- (arguments '(#:tests? #f))))) ; No test suite.
+ (arguments
+ `(#:python ,python-2
+ #:tests? #f))))) ; No test suite.
(define-public python-eventlet
(package
(name "python-eventlet")
- (version "0.25.1")
+ (version "0.33.0")
(source
(origin
(method url-fetch)
(uri (pypi-uri "eventlet" version))
(sha256
(base32
- "1hgz8jq19wlz8vwqj900ry8cjv578nz4scc91mlc8944yid6573c"))))
+ "07qlyhcm0f28sxdizawvdf3d50m3hnbzz5kg3fjp7chvki44y540"))))
(build-system python-build-system)
(propagated-inputs
`(("python-dnspython" ,python-dnspython)
("python-greenlet" ,python-greenlet)
- ("python-monotonic" ,python-monotonic)))
+ ("python-monotonic" ,python-monotonic)
+ ("python-six" ,python-six)))
+ (native-inputs
+ `(("python-nose" ,python-nose)))
(arguments
- ;; TODO: Requires unpackaged 'enum-compat'.
- '(#:tests? #f))
+ '(#:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'avoid-OSError
+ (lambda _
+ ;; If eventlet tries to load greendns, an OSError is thrown when
+ ;; getprotobyname is called. Thankfully there is an environment
+ ;; variable to disable the greendns import, so use it:
+ (setenv "EVENTLET_NO_GREENDNS" "yes")))
+ (add-after 'unpack 'delete-broken-tests
+ (lambda _
+ (delete-file "tests/greendns_test.py")
+ (delete-file "tests/socket_test.py")))
+ ;; See https://github.com/eventlet/eventlet/issues/562#issuecomment-714183009
+ (replace 'check
+ (lambda* (#:key tests? #:allow-other-keys)
+ (when tests?
+ (invoke "nosetests" "-v" "tests/")))))))
(home-page "https://eventlet.net")
(synopsis "Concurrent networking library for Python")
(description
@@ -2497,7 +2501,7 @@ Coroutines ensure that the developer uses a blocking style of programming
that is similar to threading, but provide the benefits of non-blocking I/O.
The event dispatch is implicit, which means you can easily use @code{Eventlet}
from the Python interpreter, or as a small part of a larger application.")
- (license license:expat)))
+ (license license:expat)))
(define-public python-sinfo
(package
@@ -2519,48 +2523,20 @@ in the current session, Python, and the OS.")
(license license:bsd-3)))
(define-public python-six
- (package
+ (package/inherit python-six-bootstrap
(name "python-six")
- (version "1.14.0")
- (source
- (origin
- (method url-fetch)
- (uri (pypi-uri "six" version))
- (sha256
- (base32
- "02lw67hprv57hyg3cfy02y3ixjk3nzwc0dx3c4ynlvkfwkfdnsr3"))))
- (build-system python-build-system)
(arguments
`(#:phases
(modify-phases %standard-phases
(replace 'check
(lambda _
- (invoke "py.test" "-v"))))))
+ (invoke "pytest" "-v"))))))
(native-inputs
- `(("python-pytest" ,python-pytest-bootstrap)))
- (home-page "https://pypi.org/project/six/")
- (synopsis "Python 2 and 3 compatibility utilities")
- (description
- "Six is a Python 2 and 3 compatibility library. It provides utility
-functions for smoothing over the differences between the Python versions with
-the goal of writing Python code that is compatible on both Python versions.
-Six supports every Python version since 2.5. It is contained in only one
-Python file, so it can be easily copied into your project.")
- (license license:x11)))
+ `(("python-pytest" ,python-pytest-bootstrap)))))
(define-public python2-six
(package-with-python2 python-six))
-(define-public python-six-bootstrap
- (package
- (inherit python-six)
- (name "python-six-bootstrap")
- (native-inputs `())
- (arguments `(#:tests? #f))))
-
-(define-public python2-six-bootstrap
- (package-with-python2 python-six-bootstrap))
-
(define-public python-schedule
(package
(name "python-schedule")
@@ -2666,16 +2642,18 @@ audio playback capability for Python 3 on OSX, Windows, and Linux.")
(define-public python-simplejson
(package
(name "python-simplejson")
- (version "3.17.0")
+ (version "3.17.2")
(source
(origin
(method url-fetch)
(uri (pypi-uri "simplejson" version))
(sha256
(base32
- "108yf3252fy4ndqab7h46raksxfhcn113bzy2yd8369vidrjnjrb"))))
+ "0hc8nqwdlll4a9cr1k9msn5kmb6kmbjirpgvhjh254nr4sgwgv3m"))))
(build-system python-build-system)
- (home-page "http://simplejson.readthedocs.org/en/latest/")
+ (native-inputs
+ `(("python-toml" ,python-toml)))
+ (home-page "https://simplejson.readthedocs.io/en/latest")
(synopsis
"Json library for Python")
(description
@@ -2698,14 +2676,14 @@ Python 3.3+.")
(define-public python-pyicu
(package
(name "python-pyicu")
- (version "2.4.3")
+ (version "2.7.4")
(source
(origin
(method url-fetch)
(uri (pypi-uri "PyICU" version))
(sha256
(base32
- "075bw66b3w0nw6mc5k32fwmrhyrmq3d7da3q2mw212qfmm0pgjn0"))))
+ "0mkz1673qxldxs4mrqg9882xgmz5fhpia17yrsd6z8dfw8156rf0"))))
(build-system python-build-system)
(inputs
`(("icu4c" ,icu4c)))
@@ -3229,14 +3207,14 @@ server.")
(define-public python-py
(package
(name "python-py")
- (version "1.8.1")
+ (version "1.10.0")
(source
(origin
(method url-fetch)
(uri (pypi-uri "py" version))
(sha256
(base32
- "1ajjazg3913n0sp3vjyva9c2qh5anx8ziryng935f89604a0h9sy"))))
+ "1lqvkqk3b440g9z82gqbzlzas84wrm6ir8kplzhzavmn2pd1pf11"))))
(build-system python-build-system)
(arguments
;; FIXME: "ImportError: 'test' module incorrectly imported from
@@ -3253,18 +3231,6 @@ server.")
code introspection, and logging.")
(license license:expat)))
-(define-public python-py-next
- (package
- (inherit python-py)
- (version "1.10.0")
- (source
- (origin
- (method url-fetch)
- (uri (pypi-uri "py" version))
- (sha256
- (base32
- "1lqvkqk3b440g9z82gqbzlzas84wrm6ir8kplzhzavmn2pd1pf11"))))))
-
(define-public python2-py
(package-with-python2 python-py))
@@ -3459,11 +3425,9 @@ interfaces.")
"cross-libc" "libc"))))
(substitute* "src/click/_unicodefun.py"
(("'locale'")
- (string-append "'" glibc "/bin/locale'"))))
- #t))
+ (string-append "'" glibc "/bin/locale'"))))))
(replace 'check
(lambda _
- (setenv "PYTHONPATH" (string-append "./src:" (getenv "PYTHONPATH")))
(invoke "python" "-m" "pytest"))))))
(native-inputs
`(("python-pytest" ,python-pytest)))
@@ -3602,16 +3566,15 @@ compare, diff, and patch JSON and JSON-like structures in Python.")
'(#:phases
(modify-phases %standard-phases
(replace 'check
- (lambda* (#:key inputs outputs #:allow-other-keys)
- (add-installed-pythonpath inputs outputs)
- (setenv "PYTHONPATH" (string-append ".:" (getenv "PYTHONPATH")))
- (invoke "trial" "jsonschema"))))))
+ (lambda* (#:key inputs outputs tests? #:allow-other-keys)
+ (when tests?
+ (setenv "JSON_SCHEMA_TEST_SUITE" "json")
+ (invoke "trial" "jsonschema")))))))
(native-inputs
`(("python-setuptools_scm" ,python-setuptools-scm)
("python-twisted" ,python-twisted)))
(propagated-inputs
`(("python-attrs" ,python-attrs)
- ("python-importlib-metadata" ,python-importlib-metadata) ;; python < 3.8
("python-pyrsistent" ,python-pyrsistent)
("python-six" ,python-six)))
(home-page "https://github.com/Julian/jsonschema")
@@ -3746,9 +3709,6 @@ somewhat intelligible.")
'(#:phases (modify-phases %standard-phases
(replace 'check
(lambda _
- (setenv "PYTHONPATH"
- (string-append "./build/lib:"
- (getenv "PYTHONPATH")))
(invoke "pytest" "-vv"))))))
(native-inputs
`(("python-pytest" ,python-pytest)))
@@ -3844,13 +3804,13 @@ JavaScript-like message boxes. Types of dialog boxes include:
(package
(name "python-pympler")
(home-page "https://pythonhosted.org/Pympler/")
- (version "0.8")
+ (version "0.9")
(source (origin
(method url-fetch)
(uri (pypi-uri "Pympler" version))
(sha256
(base32
- "08mrpnb6cv2nvfncvr8a9a8bpwhnasa924anapnjvnaw5jcd4k7p"))))
+ "0ivfw2k86nbw9ck9swidl4422w7bhjldxwj90a4sy5r1cbgygjzj"))))
(build-system python-build-system)
(arguments
`(#:phases (modify-phases %standard-phases
@@ -3879,14 +3839,14 @@ visualisation and class tracker statistics.")
(define-public python-itsdangerous
(package
(name "python-itsdangerous")
- (version "1.1.0")
+ (version "2.0.1")
(source
(origin
(method url-fetch)
(uri (pypi-uri "itsdangerous" version))
(sha256
(base32
- "068zpbksq5q2z4dckh2k1zbcq43ay74ylqn77rni797j0wyh66rj"))))
+ "1w6gfb2zhbcmrfj6digwzw1z68w6zg1q87rm6la2m412zil4swly"))))
(build-system python-build-system)
(home-page "https://palletsprojects.com/p/itsdangerous/")
(synopsis "Python library for passing data to/from untrusted environments")
@@ -3895,9 +3855,6 @@ visualisation and class tracker statistics.")
environments and back.")
(license license:bsd-3)))
-(define-public python2-itsdangerous
- (package-with-python2 python-itsdangerous))
-
(define-public python-pyyaml
(package
(name "python-pyyaml")
@@ -3911,7 +3868,8 @@ environments and back.")
"0pm440pmpvgv5rbbnm8hk4qga5a292kvlm1bh3x2nwr8pb5p8xv0"))))
(build-system python-build-system)
(inputs
- `(("libyaml" ,libyaml)))
+ `(("libyaml" ,libyaml)
+ ("python-cython" ,python-cython)))
(home-page "https://pyyaml.org")
(synopsis "YAML parser and emitter for Python")
(description
@@ -3951,64 +3909,56 @@ e.g. filters, callbacks and errbacks can all be promises.")
(define-public python-virtualenv
(package
(name "python-virtualenv")
- (version "20.2.1")
+ (version "20.3.1")
(source
(origin
(method url-fetch)
(uri (pypi-uri "virtualenv" version))
(sha256
(base32
- "1rd6wmymsgv0cdsn50jwybcvbbslzym3mzffcjbl42l8br9cgap0"))))
+ "1nbhnpzswcf3lmzn5xabmfdd7ki8r2w2i37y6wml54di6qi1l48c"))))
(build-system python-build-system)
(native-inputs
`(("python-mock" ,python-mock)
("python-pytest" ,python-pytest)
- ;; NOTE: guix lint remarks that "python-setuptools should probably not
- ;; be an input at all". However, removing the input makes the build error:
- ;; File "setup.py", line 4, in <module>
- ;; raise RuntimeError("setuptools >= 41 required to build")
- ("python-setuptools" ,python-setuptools)
("python-setuptools-scm" ,python-setuptools-scm)))
(propagated-inputs
`(("python-appdirs" ,python-appdirs)
- ("python-distlib" ,python-distlib/next)
+ ("python-distlib" ,python-distlib)
("python-filelock" ,python-filelock)
- ("python-six" ,python-six)
- ("python-importlib-metadata" ,python-importlib-metadata)))
+ ("python-six" ,python-six)))
(home-page "https://virtualenv.pypa.io/")
(synopsis "Virtual Python environment builder")
(description
"Virtualenv is a tool to create isolated Python environments.")
(license license:expat)))
+(define-public python2-virtualenv
+ (let ((base (package-with-python2 (strip-python2-variant python-virtualenv))))
+ (package
+ (inherit base)
+ (propagated-inputs
+ `(("python-contextlib2" ,python2-contextlib2)
+ ,@(package-propagated-inputs base))))))
+
(define-public python-markupsafe
(package
(name "python-markupsafe")
- (version "1.1.1")
+ (version "2.0.1")
(source
(origin
(method url-fetch)
(uri (pypi-uri "MarkupSafe" version))
(sha256
(base32
- "0sqipg4fk7xbixqd8kq6rlkxj664d157bdwbh93farcphf92x1r9"))))
+ "02k2ynmqvvd0z0gakkf8s4idyb606r7zgga41jrkhqmigy06fk2r"))))
(build-system python-build-system)
(arguments
- `(#:modules ((ice-9 ftw)
- (srfi srfi-1)
- (srfi srfi-26)
- (guix build utils)
- (guix build python-build-system))
- #:phases (modify-phases %standard-phases
+ `(#:phases (modify-phases %standard-phases
(replace 'check
- (lambda _
- (let ((cwd (getcwd))
- (libdir (find (cut string-prefix? "lib." <>)
- (scandir "build"))))
- (setenv "PYTHONPATH"
- (string-append cwd "/build/" libdir ":"
- (getenv "PYTHONPATH")))
- (invoke "pytest" "-vv")))))))
+ (lambda* (#:key tests? #:allow-other-keys)
+ (when tests?
+ (invoke "pytest" "-vv")))))))
(native-inputs
`(("python-pytest" ,python-pytest)))
(home-page "https://github.com/mitsuhiko/markupsafe")
@@ -4016,35 +3966,42 @@ e.g. filters, callbacks and errbacks can all be promises.")
(description
"Markupsafe provides an XML/HTML/XHTML markup safe string implementation
for Python.")
- (license license:bsd-3)))
+ (license license:bsd-3)
+ (properties `((python2-variant . ,(delay python2-markupsafe))))))
+;; Version 1.1.1 is the last to support Python 2.
(define-public python2-markupsafe
- (package-with-python2 python-markupsafe))
+ (package
+ (inherit (package-with-python2
+ (strip-python2-variant python-markupsafe)))
+ (version "1.1.1")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "MarkupSafe" version))
+ (sha256
+ (base32
+ "0sqipg4fk7xbixqd8kq6rlkxj664d157bdwbh93farcphf92x1r9"))))))
(define-public python-jinja2
(package
(name "python-jinja2")
- (version "2.11.2")
+ (version "3.0.1")
(source
(origin
(method url-fetch)
(uri (pypi-uri "Jinja2" version))
(sha256
(base32
- "1c1v3djnr0ymp5xpy1h3h60abcaqxdlm4wsqmls9rxby88av5al9"))))
+ "197ms1wimxql650245v63wkv04n8bicj549wfhp51bx68x5lhgvh"))))
(build-system python-build-system)
(arguments
'(#:phases (modify-phases %standard-phases
(replace 'check
(lambda* (#:key tests? #:allow-other-keys)
(if tests?
- (begin
- (setenv "PYTHONPATH"
- (string-append "./build/lib:"
- (getenv "PYTHONPATH")))
- (invoke "pytest" "-vv"))
- (format #t "test suite not run~%"))
- #t)))))
+ (invoke "pytest" "-vv")
+ (format #t "test suite not run~%")))))))
(native-inputs
`(("python-pytest" ,python-pytest)))
(propagated-inputs
@@ -4054,10 +4011,22 @@ for Python.")
(description
"Jinja2 is a small but fast and easy to use stand-alone template engine
written in pure Python.")
- (license license:bsd-3)))
+ (license license:bsd-3)
+ (properties `((python2-variant . ,(delay python2-jinja2))))))
+;; Version 2.11.3 is the last to support Python 2.
(define-public python2-jinja2
- (package-with-python2 python-jinja2))
+ (package
+ (inherit (package-with-python2
+ (strip-python2-variant python-jinja2)))
+ (version "2.11.3")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "Jinja2" version))
+ (sha256
+ (base32
+ "1iiklf3wns67y5lfcacxma5vxfpb7h2a67xbghs01s0avqrq9md6"))))))
(define-public python-jinja2-time
(package
@@ -4119,19 +4088,24 @@ logic-free templating system Mustache.")
(define-public python-joblib
(package
(name "python-joblib")
- (version "0.14.1")
+ (version "1.1.0")
(source (origin
(method url-fetch)
(uri (pypi-uri "joblib" version))
(sha256
(base32
- "1j464w137w6s367gl697j1l63g52akydrxgv4czlck36ynjfwc06"))))
+ "0d8ypyhsw1bjr96zan9ms8wbvnzbjqxniq4vcszghcrps7ngqn21"))))
(build-system python-build-system)
(arguments
`(#:phases
(modify-phases %standard-phases
(replace 'check
- (lambda _ (invoke "pytest" "-v" "joblib"))))))
+ (lambda* (#:key tests? #:allow-other-keys)
+ (when tests?
+ (setenv "JOBLIB_MULTIPROCESSING" "0")
+ (invoke "pytest" "-v" "joblib"
+ ;; We disable this test to avoid having to depend on ipython/jupyter
+ "-k" "not test_parallel_call_cached_function_defined_in_jupyter")))))))
(native-inputs
`(("python-pytest" ,python-pytest)))
(home-page "https://joblib.readthedocs.io/")
@@ -4143,8 +4117,17 @@ and lazy re-evaluation (memoize pattern), easy simple parallel computing
logging and tracing of the execution.")
(license license:bsd-3)))
+;; Newer versions of joblib don't support Python 2.
(define-public python2-joblib
- (package-with-python2 python-joblib))
+ (package
+ (inherit (package-with-python2 python-joblib))
+ (version "0.14.1")
+ (source (origin
+ (method url-fetch)
+ (uri (pypi-uri "joblib" version))
+ (sha256
+ (base32
+ "1j464w137w6s367gl697j1l63g52akydrxgv4czlck36ynjfwc06"))))))
(define-public python-daemon
(package
@@ -4226,14 +4209,14 @@ structure for Python.")
(define-public python-docutils
(package
(name "python-docutils")
- (version "0.16")
+ (version "0.17.1")
(source
(origin
(method url-fetch)
(uri (pypi-uri "docutils" version))
(sha256
(base32
- "1z3qliszqca9m719q3qhdkh0ghh90g500avzdgi7pl77x5h3mpn2"))))
+ "09gii36lp1bs26cpxqyfd20xahnpbrbjzcnba2xq08y3wk97frb8"))))
(build-system python-build-system)
(arguments
'(#:phases (modify-phases %standard-phases
@@ -4259,6 +4242,20 @@ via commands such as @command{rst2man}, as well as supporting Python code.")
(define-public python2-docutils
(package-with-python2 python-docutils))
+;; awscli refuses to be built with docutils < 0.16.
+(define-public python-docutils-0.15
+ (package
+ (inherit python-docutils)
+ (version "0.15")
+ (source (origin
+ (method url-fetch)
+ (uri (pypi-uri "docutils" version))
+ (sha256
+ (base32
+ "0ja8q6mdj6xv62jjw3phv8j5nfqi5x8hnfy4pqfcjcgz4b34k8sl"))))
+ ;; tests contain Python 2 syntax.
+ (arguments '(#:tests? #false))))
+
;; python2-sphinx fails its test suite with newer versions.
(define-public python2-docutils-0.14
(package
@@ -4345,15 +4342,14 @@ text styles of documentation.")
(define-public python-pygments
(package
(name "python-pygments")
- (version "2.7.3")
+ (version "2.8.1")
(source
(origin
(method url-fetch)
(uri (pypi-uri "Pygments" version))
(sha256
(base32
- "05mps9r966r3dpqw6zrs1nlwjdf5y4960hl9m7abwb3qyfnarwyc"))))
- (replacement python-pygments/fixed)
+ "153zyxigm879sk2n71lfv03y2pgxb7dl0dlsbwkz9aydxnkf2mi6"))))
(build-system python-build-system)
(arguments
;; FIXME: Tests require sphinx, which depends on this.
@@ -4365,18 +4361,6 @@ text styles of documentation.")
(license license:bsd-2)
(properties `((python2-variant . ,(delay python2-pygments))))))
-(define python-pygments/fixed
- (package
- (inherit python-pygments)
- (version "2.7.4")
- (source
- (origin
- (method url-fetch)
- (uri (pypi-uri "Pygments" version))
- (sha256
- (base32
- "0dy35ry5qa8dpklk4fkj9kfpw2qb4mh5ha9866kw30wf96dx0jfz"))))))
-
;; Pygments 2.6 and later does not support Python 2.
(define-public python2-pygments
(let ((base (package-with-python2 (strip-python2-variant python-pygments))))
@@ -4576,18 +4560,17 @@ ecosystem, but can naturally be used also by other projects.")
(copy-recursively "doc/libraries"
(string-append doc "/libraries")))))
(replace 'check
- (lambda* (#:key inputs tests? #:allow-other-keys)
- (when tests?
- ;; Some tests require timezone data. Otherwise, they
- ;; look up /etc/localtime, which doesn't exist, and
- ;; fail with:
- ;;
- ;; OverflowError: mktime argument out of range
- (setenv "TZDIR"
- (string-append (assoc-ref inputs "tzdata")
- "/share/zoneinfo"))
- (setenv "TZ" "Europe/Paris")
- (invoke "python" "utest/run.py")))))))
+ (lambda* (#:key inputs #:allow-other-keys)
+ ;; Some tests require timezone data. Otherwise, they
+ ;; look up /etc/localtime, which doesn't exist, and fail
+ ;; with:
+ ;;
+ ;; OverflowError: mktime argument out of range
+ (setenv "TZDIR"
+ (search-input-directory inputs "share/zoneinfo"))
+ (setenv "TZ" "Europe/Paris")
+
+ (invoke "python" "utest/run.py"))))))
(native-inputs
`(("python-docutils" ,python-docutils)
("python-jsonschema" ,python-jsonschema)
@@ -5147,7 +5130,14 @@ matching of file paths.")
(substitute* "tests/test_black.py"
(("( *)def test_python38" match indent)
(string-append indent "@unittest.skip(\"guix\")\n" match)))
- #t)))))
+ #t))
+ ;; Remove blackd, because it depends on python-aiohttp and
+ ;; python-aiohttp-cors.
+ (add-after 'unpack 'remove-entrypoint
+ (lambda _
+ (substitute* "setup.py"
+ (("\\s*\"blackd=blackd:patched_main \\[d\\]\",\n") "")
+ (("\"blackd\", ") "")))))))
(propagated-inputs
`(("python-click" ,python-click)
("python-attrs" ,python-attrs)
@@ -5280,13 +5270,13 @@ provides additional functionality on the produced Mallard documents.")
(define-public python-cython
(package
(name "python-cython")
- (version "0.29.22")
+ (version "0.29.24")
(source
(origin
(method url-fetch)
(uri (pypi-uri "Cython" version))
(sha256
- (base32 "01jl3544qwsi8lp6anbl55566xqkjd53x452i7m6gnfilv3q6syz"))))
+ (base32 "0hw4gs18rh4slij1fg252argxhraypld9apbqbl60230qc3lvw6d"))))
(build-system python-build-system)
;; we need the full python package and not just the python-wrapper
;; because we need libpython3.3m.so
@@ -5297,21 +5287,24 @@ provides additional functionality on the produced Mallard documents.")
(modify-phases %standard-phases
(add-before 'check 'set-HOME
;; some tests require access to "$HOME/.cython"
- (lambda _ (setenv "HOME" "/tmp") #t))
+ (lambda _ (setenv "HOME" "/tmp")))
(replace 'check
- (lambda _
+ (lambda* (#:key tests? #:allow-other-keys)
;; Disable compiler optimizations to greatly reduce the running
;; time of the test suite.
(setenv "CFLAGS" "-O0")
- (invoke "python" "runtests.py" "-vv"
- "-j" (number->string (parallel-job-count))
- ;; XXX: On 32-bit architectures, running the parallel tests
- ;; fails on many-core systems, see
- ;; <https://github.com/cython/cython/issues/2807>.
- ,@(if (not (target-64bit?))
- '("-x" "run.parallel")
- '())))))))
+ (when tests?
+ (invoke "python" "runtests.py" "-vv"
+ "-j" (number->string (parallel-job-count))
+ ;; XXX: On 32-bit architectures, running the parallel tests
+ ;; fails on many-core systems, see
+ ;; <https://github.com/cython/cython/issues/2807>.
+ ,@(if (not (target-64bit?))
+ '("-x" "run.parallel")
+ '())
+ ;; This test fails when running on 24 cores.
+ "-x" "cpp_stl_conversion")))))))
(home-page "https://cython.org/")
(synopsis "C extensions for Python")
(description "Cython is an optimising static compiler for both the Python
@@ -5356,10 +5349,10 @@ writing C extensions for Python as easy as Python itself.")
;; NOTE: when upgrading numpy please make sure that python-pandas and
;; python-scipy still build, as these three packages are often used together.
-(define-public python-numpy
+(define-public python-numpy-next
(package
(name "python-numpy")
- (version "1.17.3")
+ (version "1.21.3")
(source
(origin
(method url-fetch)
@@ -5368,38 +5361,32 @@ writing C extensions for Python as easy as Python itself.")
version "/numpy-" version ".tar.gz"))
(sha256
(base32
- "1ak9dmjja0q90a7fsxli51ypcwssh8c4pb6f8wkrsnf2xgdk6dy9"))))
+ "0s6hy8828yr7fcjiwnym4l8lrknr21gqfkaiawsf86n0hd0a5fyh"))))
(build-system python-build-system)
(inputs
`(("openblas" ,openblas)))
(native-inputs
`(("python-cython" ,python-cython)
+ ("python-hypothesis" ,python-hypothesis)
("python-pytest" ,python-pytest)
+ ("python-pytest-xdist" ,python-pytest-xdist)
("gfortran" ,gfortran)))
(arguments
`(#:phases
(modify-phases %standard-phases
- (add-before 'build 'configure-blas-lapack
+ (add-before 'build 'configure-blas
(lambda* (#:key inputs #:allow-other-keys)
(call-with-output-file "site.cfg"
(lambda (port)
(format port
- "[openblas]
+ "\
+[openblas]
libraries = openblas
library_dirs = ~a/lib
include_dirs = ~a/include
-
-# backslash-n to make emacs happy
-\n[lapack]
-lapack_libs = lapack
-library_dirs = ~a/lib
-include_dirs = ~a/include
"
(assoc-ref inputs "openblas")
- (assoc-ref inputs "openblas")
- (assoc-ref inputs "lapack")
- (assoc-ref inputs "lapack"))))
- #t))
+ (assoc-ref inputs "openblas"))))))
(add-before 'build 'fix-executable-paths
(lambda* (#:key inputs #:allow-other-keys)
;; Make /gnu/store/...-bash-.../bin/sh the default shell,
@@ -5410,21 +5397,17 @@ include_dirs = ~a/include
;; Use "gcc" executable, not "cc".
(substitute* "numpy/distutils/system_info.py"
(("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
- "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
- #t))
- ;; Tests can only be run after the library has been installed and not
- ;; within the source directory.
- (delete 'check)
- (add-after 'install 'check
- (lambda* (#:key outputs inputs #:allow-other-keys)
- ;; Make installed package available for running the tests
- (add-installed-pythonpath inputs outputs)
- ;; Make sure "f2py" etc is found.
- (setenv "PATH" (string-append (assoc-ref outputs "out") "/bin"
- ":" (getenv "PATH")))
- (with-directory-excursion "/tmp"
- (invoke "python" "-c"
- "import numpy; numpy.test(verbose=2)")))))))
+ "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))))
+ (replace 'check
+ (lambda* (#:key tests? outputs inputs #:allow-other-keys)
+ (when tests?
+ ;; Make installed package available for running the tests.
+ (add-installed-pythonpath inputs outputs)
+ ;; Make sure "f2py" etc is found.
+ (setenv "PATH" (string-append (assoc-ref outputs "out") "/bin"
+ ":" (getenv "PATH")))
+ (invoke "./runtests.py"
+ "-j" (number->string (parallel-job-count)))))))))
(home-page "https://numpy.org")
(synopsis "Fundamental package for scientific computing with Python")
(description "NumPy is the fundamental package for scientific computing
@@ -5438,7 +5421,7 @@ capabilities.")
;; Numpy 1.16.x are the last versions that support Python 2.
(define-public python2-numpy
(let ((numpy (package-with-python2
- (strip-python2-variant python-numpy))))
+ (strip-python2-variant python-numpy-next))))
(package
(inherit numpy)
(version "1.16.5")
@@ -5449,7 +5432,42 @@ capabilities.")
version "/numpy-" version ".tar.gz"))
(sha256
(base32
- "0lg1cycxzi4rvvrd5zxinpdz0ni792fpx6xjd75z1923zcac8qrb")))))))
+ "0lg1cycxzi4rvvrd5zxinpdz0ni792fpx6xjd75z1923zcac8qrb"))))
+ (arguments
+ (substitute-keyword-arguments (package-arguments numpy)
+ ((#:phases phases)
+ `(modify-phases ,phases
+ (add-after 'unpack 'delete-failing-test
+ (lambda _
+ ;; There's just one failing test here.
+ (delete-file "numpy/linalg/tests/test_linalg.py")
+ ;; ...and this one depends on the previous one.
+ (delete-file "numpy/matrixlib/tests/test_matrix_linalg.py")))))))
+ (native-inputs
+ `(("python-cython" ,python2-cython)
+ ("python-pytest" ,python2-pytest)
+ ("gfortran" ,gfortran))))))
+
+;; Needed by python-numba, see https://github.com/numba/numba/issues/7176
+(define-public python-numpy-1.20
+ (package
+ (inherit python-numpy-next)
+ (version "1.20.3")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append
+ "https://github.com/numpy/numpy/releases/download/v"
+ version "/numpy-" version ".tar.gz"))
+ (sha256
+ (base32
+ "140zq9snx0di4id4g97vaw9zz8x2rfla5lp3a70j666f5030yd5p"))))
+ ;; 92 tests fail, many of them because parts of the temp file name
+ ;; accidentally ends up in a comparison.
+ (arguments
+ (substitute-keyword-arguments (package-arguments python-numpy-next)
+ ((#:tests? _ #t) #f)))))
+
+(define-public python-numpy python-numpy-1.20)
;; NOTE: NumPy 1.8 is packaged only for Python 2 because it is of
;; interest only for legacy code going back to NumPy's predecessor
@@ -5471,21 +5489,18 @@ capabilities.")
(substitute-keyword-arguments (package-arguments python2-numpy)
((#:phases phases)
`(modify-phases ,phases
- (replace 'configure-blas-lapack
+ (replace 'configure-blas
(lambda* (#:key inputs #:allow-other-keys)
(call-with-output-file "site.cfg"
(lambda (port)
(format port
"[openblas]
-libraries = openblas,lapack
-library_dirs = ~a/lib:~a/lib
-include_dirs = ~a/include:~a/include
+libraries = openblas
+library_dirs = ~a/lib
+include_dirs = ~a/include
"
(assoc-ref inputs "openblas")
- (assoc-ref inputs "lapack")
- (assoc-ref inputs "openblas")
- (assoc-ref inputs "lapack"))))
- #t))))))
+ (assoc-ref inputs "openblas"))))))))))
(native-inputs
`(("python2-nose" ,python2-nose)))
(description "NumPy is the fundamental package for scientific computing
@@ -5539,20 +5554,17 @@ objects.")
"This is a Python library for color math and conversions.")
(license license:bsd-3)))
-(define-public python2-colormath
- (package-with-python2 python-colormath))
-
(define-public python-sparse
(package
(name "python-sparse")
- (version "0.12.0")
+ (version "0.13.0")
(source
(origin
(method url-fetch)
(uri (pypi-uri "sparse" version))
(sha256
(base32
- "05lmzckv69cvxavhdr36k803bgr5dl04cppglid1l880xswc759c"))))
+ "05ar1lhq1yy4nb78s7vpb1wz4ac4kj0r4lrd7yrf23kpmaacjpb8"))))
(build-system python-build-system)
(arguments
`(#:phases
@@ -5624,9 +5636,6 @@ color scales, and color space conversion easy. It has support for:
@end enumerate\n")
(license license:expat)))
-(define-public python2-spectra
- (package-with-python2 python-spectra))
-
(define-public python-pyspnego
(package
(name "python-pyspnego")
@@ -5675,16 +5684,16 @@ readable format.")
("pkg-config" ,pkg-config)
("python-sphinx" ,python-sphinx)
("python-numpydoc" ,python-numpydoc)
- ("texlive" ,(texlive-union (list texlive-fonts-cm-super
+ ("texlive" ,(texlive-updmap.cfg (list texlive-cm-super
texlive-fonts-ec
- texlive-generic-ifxetex
+ texlive-generic-iftex
texlive-pdftex
- texlive-amsfonts/patched
+ texlive-amsfonts
texlive-latex-capt-of
texlive-latex-cmap
texlive-latex-environ
texlive-latex-eqparbox
- texlive-latex-etoolbox
+ texlive-etoolbox
texlive-latex-expdlist
texlive-latex-fancyhdr
texlive-latex-fancyvrb
@@ -5693,11 +5702,11 @@ readable format.")
texlive-latex-framed
texlive-latex-geometry
texlive-latex-graphics
- texlive-latex-hyperref
+ texlive-hyperref
texlive-latex-mdwtools
texlive-latex-multirow
texlive-latex-needspace
- texlive-latex-oberdiek
+ texlive-oberdiek
texlive-latex-parskip
texlive-latex-preview
texlive-latex-tabulary
@@ -5706,7 +5715,7 @@ readable format.")
texlive-latex-trimspaces
texlive-latex-ucs
texlive-latex-upquote
- texlive-latex-url
+ texlive-url
texlive-latex-varwidth
texlive-latex-wrapfig)))
("texinfo" ,texinfo)
@@ -5741,7 +5750,7 @@ readable format.")
(sphinx-theme-checkout (assoc-ref inputs scipy-sphinx-theme))
(pyver ,(string-append "PYVER=")))
- ;; FIXME: this is needed to for texlive-union to generate
+ ;; FIXME: this is needed to for texlive-updmap.cfg to generate
;; fonts, which are not found.
(setenv "HOME" "/tmp")
@@ -5778,13 +5787,13 @@ readable format.")
(define-public python-pygit2
(package
(name "python-pygit2")
- (version "1.6.0")
+ (version "1.7.1")
(source
(origin
(method url-fetch)
(uri (pypi-uri "pygit2" version))
(sha256
- (base32 "0qjd5aqpmla64da4pb47vdnrmnqdbn7248a4fzs7f5q1ax7fmb3s"))))
+ (base32 "0p8n25bijirxh31cv99vd1mkdsvpcs6z6441wz1fqva3b2as5ynp"))))
(build-system python-build-system)
(arguments
'(#:tests? #f)) ; tests don't run correctly in our environment
@@ -5842,6 +5851,7 @@ humans, and implementation simplicity.")
(("'wmctrl")
(string-append "'" wmctrl "/bin/wmctrl")))))))))
(inputs `(("wmctrl" ,wmctrl)))
+ (propagated-inputs (list python-attrs))
(home-page "https://github.com/antocuni/wmctrl")
(synopsis "Tool to programmatically control Xorg windows")
(description "This package provides a library for programmatically
@@ -6018,61 +6028,6 @@ parse and apply unified diffs. It has features such as:
@end itemize")
(license license:expat)))
-(define-public python-pyparsing
- (package
- (name "python-pyparsing")
- (version "2.4.6")
- (source
- (origin
- (method url-fetch)
- (uri (pypi-uri "pyparsing" version))
- (sha256
- (base32 "17wn5zlijc9m9zj26gy3f541y7smpj8rfhl51d025c2gm210b0sc"))))
- (build-system python-build-system)
- (outputs '("out" "doc"))
- (arguments
- `(#:tests? #f ; no test target
- #:phases
- (modify-phases %standard-phases
- (add-after 'install 'install-doc
- (lambda* (#:key outputs #:allow-other-keys)
- (let* ((doc (string-append (assoc-ref outputs "doc")
- "/share/doc/" ,name "-" ,version))
- (html-doc (string-append doc "/html"))
- (examples (string-append doc "/examples")))
- (mkdir-p html-doc)
- (mkdir-p examples)
- (for-each
- (lambda (dir tgt)
- (map (lambda (file)
- (install-file file tgt))
- (find-files dir ".*")))
- (list "docs" "htmldoc" "examples")
- (list doc html-doc examples))
- #t))))))
- (home-page "https://github.com/pyparsing/pyparsing")
- (synopsis "Python parsing class library")
- (description
- "The pyparsing module is an alternative approach to creating and
-executing simple grammars, vs. the traditional lex/yacc approach, or the use
-of regular expressions. The pyparsing module provides a library of classes
-that client code uses to construct the grammar directly in Python code.")
- (license license:expat)))
-
-(define-public python2-pyparsing
- (package-with-python2 python-pyparsing))
-
-(define-public python-pyparsing-2.4.7
- (package
- (inherit python-pyparsing)
- (version "2.4.7")
- (source
- (origin
- (method url-fetch)
- (uri (pypi-uri "pyparsing" version))
- (sha256
- (base32 "1hgc8qrbq1ymxbwfbjghv01fm3fbpjwpjwi0bcailxxzhf3yq0y2"))))))
-
(define-public python-numpydoc
(package
(name "python-numpydoc")
@@ -6260,21 +6215,20 @@ comparison.
(define-public python-matplotlib
(package
(name "python-matplotlib")
- (version "3.1.2")
+ (version "3.4.3")
(source
(origin
(method url-fetch)
(uri (pypi-uri "matplotlib" version))
(sha256
- (base32 "1nmshfqh7wyg15i16hx1yiylcvzkws29ivn66n3i0wyqwcpjr3lf"))
- (patches
- (search-patches "python-matplotlib-run-under-wayland-gtk3.patch"))))
+ (base32 "06032j0ccjxldx4z9kf97qps2g36mfgvy1nap3b9n75kzmnm4kzw"))))
(build-system python-build-system)
(propagated-inputs ; the following packages are all needed at run time
`(("python-cycler" ,python-cycler)
("python-kiwisolver" ,python-kiwisolver)
("python-pyparsing" ,python-pyparsing)
("python-pygobject" ,python-pygobject)
+ ("python-certifi" ,python-certifi)
("gobject-introspection" ,gobject-introspection)
("python-tkinter" ,python "tk")
("python-dateutil" ,python-dateutil)
@@ -6291,6 +6245,7 @@ comparison.
(inputs
`(("libpng" ,libpng)
("freetype" ,freetype)
+ ("qhull" ,qhull)
("cairo" ,cairo)
("glib" ,glib)
;; FIXME: Add backends when available.
@@ -6301,6 +6256,7 @@ comparison.
`(("pkg-config" ,pkg-config)
("python-pytest" ,python-pytest)
("python-mock" ,python-mock)
+ ("python-wheel" ,python-wheel)
("unzip" ,unzip)
("jquery-ui"
,(origin
@@ -6323,7 +6279,8 @@ comparison.
"test_.*\\.py$"))
(("^from matplotlib" match)
(string-append "import pytest\n" match))
- (("( *)@image_comparison" match indent)
+ (("( *)@([^_]+_)*(image_comparison|check_figures_equal)" match
+ indent)
(string-append indent
"@pytest.mark.skip(reason=\"unknown minor image differences\")\n"
match)))
@@ -6332,7 +6289,9 @@ comparison.
(for-each delete-file
;; test_normal_axes, test_get_tightbbox_polar
'("lib/matplotlib/tests/test_axes.py"
- ;; We don't use the webagg backend and this test forces it.
+ "lib/matplotlib/tests/test_polar.py"
+ ;; We don't use the webagg backend and this test
+ ;; forces it.
"lib/matplotlib/tests/test_backend_webagg.py"
;; test_outward_ticks
"lib/matplotlib/tests/test_tightlayout.py"
@@ -6347,9 +6306,11 @@ comparison.
(lambda* (#:key outputs inputs #:allow-other-keys)
(let* ((python-version (python-version
(assoc-ref inputs "python")))
- (dir (string-append (assoc-ref outputs "out")
- "/lib/python" python-version "/site-packages"
- "/matplotlib/backends/web_backend/")))
+ (dir
+ (string-append (assoc-ref outputs "out")
+ "/lib/python" python-version
+ "/site-packages"
+ "/matplotlib/backends/web_backend/")))
(mkdir-p dir)
(invoke "unzip"
(assoc-ref inputs "jquery-ui")
@@ -6372,7 +6333,10 @@ comparison.
(setenv "CFLAGS" "-ffloat-store"))
(call-with-output-file "setup.cfg"
(lambda (port)
- (format port "[directories]~%
+ (format port "[libs]~%
+system_freetype = true
+system_qhull = true
+[directories]~%
basedirlist = ~a,~a~%
[packages]~%
tests = True~%"
@@ -6414,8 +6378,15 @@ toolkits.")
(mkdir-p dir)
(invoke "unzip"
(assoc-ref inputs "jquery-ui")
- "-d" dir))
- #t))
+ "-d" dir))))
+ ;; Without this file mpl_toolkits cannot be imported.
+ (add-after 'install 'create-init-file
+ (lambda* (#:key outputs #:allow-other-keys)
+ (with-output-to-file
+ (string-append
+ (assoc-ref outputs "out")
+ "/lib/python2.7/site-packages/mpl_toolkits/__init__.py")
+ (lambda _ (display "")))))
(delete 'fix-and-disable-failing-tests)
(delete 'check))))) ; These tests weren't run the the past.
;; Make sure to use special packages for Python 2 instead
@@ -6451,7 +6422,7 @@ toolkits.")
("python-ipykernel" ,python-ipykernel)
("python-mock" ,python-mock)
("graphviz" ,graphviz)
- ("texlive" ,(texlive-union (list texlive-amsfonts/patched
+ ("texlive" ,(texlive-updmap.cfg (list texlive-amsfonts
texlive-latex-amsmath
texlive-latex-enumitem
texlive-latex-expdlist
@@ -6463,8 +6434,8 @@ toolkits.")
texlive-pdftex
texlive-fonts-ec
- texlive-fonts-adobe-times
- texlive-fonts-txfonts)))
+ texlive-times
+ texlive-txfonts)))
("texinfo" ,texinfo)
,@(package-native-inputs python-matplotlib)))
(arguments
@@ -6477,9 +6448,7 @@ toolkits.")
(replace 'build
(lambda _
(chdir "doc")
- (setenv "PYTHONPATH"
- (string-append (getenv "PYTHONPATH")
- ":" (getcwd) "/../examples/units"))
+ (setenv "PYTHONPATH" "../examples/units")
(substitute* "conf.py"
;; Don't use git.
(("^SHA = check_output.*")
@@ -6514,13 +6483,36 @@ toolkits.")
"./matplotlib-figures")
(invoke "makeinfo" "--no-split"
"-o" "matplotlib.info" "matplotlib.texi"))
- (install-file "build/texinfo/matplotlib.info" info))
- #t)))))
+ (install-file "build/texinfo/matplotlib.info" info)))))))
(home-page (package-home-page python-matplotlib))
(synopsis "Documentation for the python-matplotlib package")
(description (package-description python-matplotlib))
(license (package-license python-matplotlib))))
+(define-public python-matplotlib-inline
+ (package
+ (name "python-matplotlib-inline")
+ (version "0.1.3")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "matplotlib-inline" version))
+ (sha256
+ (base32 "1vilzwj3xp00mxprmmn1hlafm3p23vn56s46kx3ra4qd5signjx0"))))
+ (build-system python-build-system)
+ (propagated-inputs
+ `(("python-matplotlib" ,python-matplotlib)
+ ("python-traitlets" ,python-traitlets)))
+ (arguments
+ ;; Tests disabled because of a circular dependency with ipython.
+ `(#:tests? #f))
+ (home-page "https://github.com/ipython/matplotlib-inline")
+ (synopsis "Inline Matplotlib backend for Jupyter")
+ (description
+ "This package provides a Matplotlib inline back-end for IPython and
+Jupyter.")
+ (license license:bsd-3)))
+
(define-public python-matplotlib-venn
(package
(name "python-matplotlib-venn")
@@ -6749,24 +6741,12 @@ Python code against some of the style conventions in
"07ikq2c72kd263hpldw55y0px2l3g34hjk66ml9lryh1jv287qmf"))))
(build-system python-build-system)
(arguments
- '(#:modules ((ice-9 ftw)
- (srfi srfi-1)
- (srfi srfi-26)
- (guix build utils)
- (guix build python-build-system))
- #:phases (modify-phases %standard-phases
+ '(#:phases (modify-phases %standard-phases
(replace 'check
(lambda* (#:key tests? #:allow-other-keys)
(if tests?
- (begin
- (let ((libdir (find (cut string-prefix? "lib." <>)
- (scandir "build"))))
- (setenv "PYTHONPATH"
- (string-append "./build/" libdir ":"
- (getenv "PYTHONPATH")))
- (invoke "pytest" "-vv")))
- (format #t "test suite not run~%"))
- #t)))))
+ (invoke "pytest" "-vv")
+ (format #t "test suite not run~%")))))))
(native-inputs
`(("python-pytest" ,python-pytest)
("python-pytest-cov" ,python-pytest-cov)))
@@ -6833,14 +6813,14 @@ by pycodestyle.")
(define-public python-distlib
(package
(name "python-distlib")
- (version "0.3.0")
+ (version "0.3.1")
(source
(origin
(method url-fetch)
(uri (pypi-uri "distlib" version ".zip"))
(sha256
(base32
- "08fyi2r246733vharl2yckw20rilci28r91mzrnnvcr638inw5if"))))
+ "1wdzv7fsjhrkhh1wfkarlhcwa8m00mgcpdsvknmf2qy8f9l13xpd"))))
(build-system python-build-system)
(arguments
`(#:phases
@@ -6864,19 +6844,6 @@ relate to packaging and distribution of Python software. It is intended to be
used as the basis for third-party packaging tools.")
(license license:psfl)))
-;; TODO: Merge with 'python-distlib' on the next rebuild cycle.
-(define-public python-distlib/next
- (package
- (inherit python-distlib)
- (version "0.3.1")
- (source
- (origin
- (method url-fetch)
- (uri (pypi-uri "distlib" version ".zip"))
- (sha256
- (base32
- "1wdzv7fsjhrkhh1wfkarlhcwa8m00mgcpdsvknmf2qy8f9l13xpd"))))))
-
(define-public python-distutils-extra
(package
(name "python-distutils-extra")
@@ -6971,7 +6938,7 @@ the OleFileIO module from PIL, the Python Image Library.")
(native-inputs
`(("pybind11" ,pybind11)
("python-setuptools" ,python-setuptools)
- ("python-setuptools-scm" ,python-setuptools-scm/next)
+ ("python-setuptools-scm" ,python-setuptools-scm)
("python-setuptools-scm-git-archive" ,python-setuptools-scm-git-archive)
("python-toml" ,python-toml)
("python-wheel" ,python-wheel)))
@@ -7053,7 +7020,11 @@ a general image processing tool.")
(uri (pypi-uri "Pillow" version))
(sha256
(base32
- "0l5rv8jkdrb5q846v60v03mcq64yrhklidjkgwv6s1pda71g17yv")))))))
+ "0l5rv8jkdrb5q846v60v03mcq64yrhklidjkgwv6s1pda71g17yv"))))
+ (arguments
+ (substitute-keyword-arguments (package-arguments python-pillow)
+ ;; FIXME: One of the tests is failing.
+ ((#:tests? _ #f) #f))))))
(define-public python-pillow-2.9
(package
@@ -7564,22 +7535,16 @@ support for Python 3 and PyPy. It is based on cffi.")
(("filenames = \\(library_filename,\\) \\+ filenames")
"pass")
(("libcairo.so.2")
- (string-append (assoc-ref inputs "cairo")
- "/lib/libcairo.so.2")))
+ (search-input-file inputs "/lib/libcairo.so.2")))
(substitute* "cairocffi/pixbuf.py"
(("libgdk_pixbuf-2.0.so.0")
- (string-append (assoc-ref inputs "gdk-pixbuf")
- "/lib/libgdk_pixbuf-2.0.so.0"))
+ (search-input-file inputs "/lib/libgdk_pixbuf-2.0.so.0"))
(("libgobject-2.0.so.0")
- (string-append (assoc-ref inputs "glib")
- "/lib/libgobject-2.0.so.0"))
+ (search-input-file inputs "/lib/libgobject-2.0.so.0"))
(("libglib-2.0.so.0")
- (string-append (assoc-ref inputs "glib")
- "/lib/libglib-2.0.so.0"))
+ (search-input-file inputs "/lib/libglib-2.0.so.0"))
(("libgdk-3.so.0")
- (string-append (assoc-ref inputs "gtk+")
- "/lib/libgdk-3.so.0")))
- #t))
+ (search-input-file inputs "/lib/libgdk-3.so.0")))))
(add-after 'unpack 'disable-linters
;; Their check fails; none of our business.
(lambda _
@@ -7912,36 +7877,37 @@ child application and control it as if a human were typing commands.")
(define-public python-setuptools-scm
(package
(name "python-setuptools-scm")
- (version "3.4.3")
+ (version "6.3.2")
(source (origin
(method url-fetch)
(uri (pypi-uri "setuptools_scm" version))
(sha256
- (base32
- "083k93wi7mrmp1cn28hcbnr6sivbgls0y7zz2m5qzn1wg04a3f16"))))
+ (base32 "1wm0i27siyy1yqr9rv7lqvb65agay9051yi8jzmi8dgb3q4ai6m4"))))
(build-system python-build-system)
+ (propagated-inputs
+ `(("python-packaging",python-packaging-bootstrap)
+ ("python-tomli" ,python-tomli)))
(home-page "https://github.com/pypa/setuptools_scm/")
(synopsis "Manage Python package versions in SCM metadata")
(description
"Setuptools_scm handles managing your Python package versions in
@dfn{software configuration management} (SCM) metadata instead of declaring
them as the version argument or in a SCM managed file.")
- (license license:expat)))
-
-;; TODO: Merge with 'python-setuptools-scm' on the next rebuild cycle.
-(define-public python-setuptools-scm/next
- (package
- (inherit python-setuptools-scm)
- (version "5.0.1")
- (source
- (origin
- (method url-fetch)
- (uri (pypi-uri "setuptools_scm" version))
- (sha256
- (base32 "0ahlrxxkx2xhmxskx57gc96w3bdndflxx30304ihvm7ds136nny8"))))))
+ (license license:expat)
+ (properties `((python2-variant . ,(delay python2-setuptools-scm))))))
(define-public python2-setuptools-scm
- (package-with-python2 python-setuptools-scm))
+ (let ((base (package-with-python2
+ (strip-python2-variant python-setuptools-scm))))
+ (package/inherit base
+ (version "5.0.2") ;no python 2 support in version 6
+ (source (origin
+ (method url-fetch)
+ (uri (pypi-uri "setuptools_scm" version))
+ (sha256
+ (base32
+ "1j75i8avp9fhrkpbabsa8vyvbi49kmxlq6l10xir9qs96kfwx843"))))
+ (propagated-inputs '()))))
(define-public python-sexpdata
(package
@@ -7965,14 +7931,14 @@ functions like pickle, json or PyYAML module.")
(define-public python-pathlib2
(package
(name "python-pathlib2")
- (version "2.3.3")
+ (version "2.3.6")
(source
(origin
(method url-fetch)
(uri (pypi-uri "pathlib2" version))
(sha256
(base32
- "0hpp92vqqgcd8h92msm9slv161b1q160igjwnkf2ag6cx0c96695"))))
+ "0psyg60vk8wca473djrh0v9gb853z8wcawi8im5dyg00amawp2vx"))))
(build-system python-build-system)
(propagated-inputs
`(("python-scandir" ,python-scandir)
@@ -8406,7 +8372,6 @@ cluster down and deletes the throwaway profile.")
("python-six" ,python-six)))
(native-inputs
`(("python-pytest" ,python-pytest)))
- (properties `((python2-variant . ,(delay python2-traitlets))))
(home-page "https://ipython.org")
(synopsis "Configuration system for Python applications")
(description
@@ -8418,13 +8383,6 @@ is a distinct layer on top of traitlets, so you can use traitlets in your code
without using the configuration machinery.")
(license license:bsd-3)))
-(define-public python2-traitlets
- (let ((traitlets (package-with-python2 (strip-python2-variant python-traitlets))))
- (package/inherit traitlets
- (propagated-inputs
- `(("python2-enum34" ,python2-enum34)
- ,@(package-propagated-inputs traitlets))))))
-
(define-public python-jupyter-core
(package
(name "python-jupyter-core")
@@ -8451,12 +8409,12 @@ without using the configuration machinery.")
(add-after 'unpack 'patch-testsuite
(lambda _
;; test_not_on_path() and test_path_priority() try to run a test
- ;; that loads jupyter_core, so we need PYTHONPATH
+ ;; that loads jupyter_core, so we need GUIX_PYTHONPATH
(substitute* "jupyter_core/tests/test_command.py"
(("env = \\{'PATH': ''\\}")
- "env = {'PATH': '', 'PYTHONPATH': os.environ['PYTHONPATH']}")
+ "env = {'PATH': '', 'PYTHONPATH': os.environ['GUIX_PYTHONPATH']}")
(("env = \\{'PATH': str\\(b\\)\\}")
- "env = {'PATH': str(b), 'PYTHONPATH': os.environ['PYTHONPATH']}"))
+ "env = {'PATH': str(b), 'PYTHONPATH': os.environ['GUIX_PYTHONPATH']}"))
#t))
;; Migration is running whenever etc/jupyter exists, but the
;; Guix-managed directory will never contain any migratable IPython
@@ -8527,7 +8485,6 @@ without using the configuration machinery.")
("python-traitlets" ,python-traitlets)))
(native-inputs
`(("python-pytest" ,python-pytest)
- ("python-pytest-asyncio" ,python-pytest-asyncio)
("python-pytest-timeout" ,python-pytest-timeout)
("python-async-generator" ,python-async-generator)
("python-mock" ,python-mock)
@@ -8572,10 +8529,10 @@ installing @code{kernelspec}s for use with Jupyter frontends.")
`(#:phases
(modify-phases %standard-phases
(replace 'check
- (lambda _
- (setenv "HOME" "/tmp")
- (invoke "pytest" "-v")
- #t))
+ (lambda* (#:key tests? #:allow-other-keys)
+ (when tests?
+ (setenv "HOME" "/tmp")
+ (invoke "pytest" "-v"))))
(add-after 'install 'set-python-file-name
(lambda* (#:key outputs #:allow-other-keys)
;; Record the absolute file name of the 'python' executable in
@@ -8665,13 +8622,13 @@ callback signature using a prototype function.")
(define-public python-ipython
(package
(name "python-ipython")
- (version "7.20.0")
+ (version "7.27.0")
(source
(origin
(method url-fetch)
(uri (pypi-uri "ipython" version ".tar.gz"))
(sha256
- (base32 "17pzzyfh6z7il1j49fb32glad04pqppqjsymj67gb30ah80ay8qr"))))
+ (base32 "04xgymypnbfgf2q0d5b0hanjbjsp53f055sh1p8xlq52vyzmxdaq"))))
(build-system python-build-system)
(propagated-inputs
`(("python-backcall" ,python-backcall)
@@ -8679,6 +8636,7 @@ callback signature using a prototype function.")
("python-prompt-toolkit" ,python-prompt-toolkit-2)
("python-terminado" ,python-terminado)
("python-matplotlib" ,python-matplotlib)
+ ("python-matplotlib-inline" ,python-matplotlib-inline)
("python-numpy" ,python-numpy)
("python-numpydoc" ,python-numpydoc)
("python-jedi" ,python-jedi)
@@ -8734,7 +8692,10 @@ callback signature using a prototype function.")
;; (which depends on ipython).
(delete-file "IPython/core/tests/test_display.py")
;; AttributeError: module 'IPython.core' has no attribute 'formatters'
- (delete-file "IPython/core/tests/test_interactiveshell.py"))))))
+ (delete-file "IPython/core/tests/test_interactiveshell.py")
+ ;; AttributeError: module 'matplotlib_inline' has no
+ ;; attribute 'backend_inline'
+ (delete-file "IPython/core/tests/test_pylabtools.py"))))))
(home-page "https://ipython.org")
(synopsis "IPython is a tool for interactive computing in Python")
(description
@@ -8789,15 +8750,15 @@ computing.")
`(("python-sphinx" ,python-sphinx)
("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)
;; FIXME: It's possible that a smaller union would work just as well.
- ("texlive" ,(texlive-union (list texlive-amsfonts/patched
+ ("texlive" ,(texlive-updmap.cfg (list texlive-amsfonts
texlive-fonts-ec
- texlive-generic-ifxetex
+ texlive-generic-iftex
texlive-pdftex
texlive-latex-capt-of
texlive-latex-cmap
texlive-latex-environ
texlive-latex-eqparbox
- texlive-latex-etoolbox
+ texlive-etoolbox
texlive-latex-expdlist
texlive-latex-fancyhdr
texlive-latex-fancyvrb
@@ -8806,11 +8767,11 @@ computing.")
texlive-latex-framed
texlive-latex-geometry
texlive-latex-graphics
- texlive-latex-hyperref
+ texlive-hyperref
texlive-latex-mdwtools
texlive-latex-multirow
texlive-latex-needspace
- texlive-latex-oberdiek
+ texlive-oberdiek
texlive-latex-parskip
texlive-latex-preview
texlive-latex-tabulary
@@ -8819,7 +8780,7 @@ computing.")
texlive-latex-trimspaces
texlive-latex-ucs
texlive-latex-upquote
- texlive-latex-url
+ texlive-url
texlive-latex-varwidth
texlive-latex-wrapfig)))
("texinfo" ,texinfo)))))
@@ -8836,6 +8797,15 @@ computing.")
(base32
"1bky2bra6673xx8jy0826znw6cmxs89wcwwzda8d025j3jffx2sq"))))
(build-system python-build-system)
+ (arguments
+ (list
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'remove-vterm-tests
+ ;; According to Debian these tests are cursed.
+ ;; https://salsa.debian.org/python-team/packages/urwid/-/blob/debian/2.1.2-2/debian/changelog#L141
+ (lambda _
+ (delete-file "urwid/tests/test_vterm.py"))))))
(home-page "http://urwid.org")
(synopsis "Console user interface library for Python")
(description
@@ -9012,14 +8982,14 @@ parsing (browser/HTTP) user agent strings.")
(define-public python-dbus
(package
(name "python-dbus")
- (version "1.2.16")
+ (version "1.2.18")
(source
(origin
(method url-fetch)
(uri (string-append "https://dbus.freedesktop.org/releases/dbus-python/"
"dbus-python-" version ".tar.gz"))
(sha256
- (base32 "196m5rk3qzw5nkmgzjl7wmq0v7vpwfhh8bz2sapdi5f9hqfqy8qi"))))
+ (base32 "0q3jrw515z98mqdk9x822nd95rky455zz9876f1nqna5igkd3gcj"))))
(build-system gnu-build-system)
(native-inputs
`(("pkg-config" ,pkg-config)))
@@ -9030,6 +9000,7 @@ parsing (browser/HTTP) user agent strings.")
(description "python-dbus provides bindings for libdbus, the reference
implementation of D-Bus.")
(home-page "https://www.freedesktop.org/wiki/Software/DBusBindings/")
+ (properties `((python2-variant . ,(delay python2-dbus))))
(license license:expat)))
(define-public python2-dbus
@@ -9037,8 +9008,9 @@ implementation of D-Bus.")
(name "python2-dbus")
(inputs `(("python" ,python-2)
,@(alist-delete "python"
- (package-inputs python-dbus)
- equal?)))))
+ (package-inputs python-dbus))))
+ (arguments
+ `(#:configure-flags '("PYTHON_VERSION=2")))))
(define-public python-dbus-next
(package
@@ -9078,7 +9050,7 @@ mobile environments.")
"0z8rrv9rsg1r2qgh2dxj3dfj5xnki98kgi3w839kqby4a26i1yik"))))
(build-system python-build-system)
(arguments `(#:tests? #f)) ; tests depend on system state
- (native-inputs
+ (propagated-inputs
`(("python-dbus" ,python-dbus)))
(home-page "https://bitbucket.org/takluyver/pynotify2")
(synopsis "Python interface to D-Bus notifications")
@@ -9149,10 +9121,15 @@ converts incoming documents to Unicode and outgoing documents to UTF-8.")
(base32
"1k70gpn2d3vgdyxbdy536dgm4kchcraxz6lmgsfg3324iy2789q5"))))
(build-system python-build-system)
- (arguments `(#:tests? #f))
- ;;XXX: 2 tests fail currently despite claming they were to be
- ;;skipped. Also, beautifulsoup4 may depend on this in the future, so we
- ;;don't want to create a circular dependency.
+ (arguments
+ ;;XXX: 2 tests fail currently despite claming they were to be
+ ;;skipped. Also, beautifulsoup4 may depend on this in the future, so we
+ ;;don't want to create a circular dependency.
+ (list #:tests? #f
+ #:phases
+ #~(modify-phases %standard-phases
+ ;; Circular dependency with python-beautifulsoup4.
+ (delete 'sanity-check))))
(home-page "https://github.com/facelessuser/soupsieve")
(synopsis "CSS selector library")
(description
@@ -9452,13 +9429,13 @@ SVG, EPS, PNG and terminal output.")
(define-public python-seaborn
(package
(name "python-seaborn")
- (version "0.11.1")
+ (version "0.11.2")
(source
(origin
(method url-fetch)
(uri (pypi-uri "seaborn" version))
(sha256
- (base32 "1b81p9s6li3b606ivgbynrh102fclwlw74m8qxzsii9pv6p8xrs4"))
+ (base32 "1xpl3zb945sihsiwm9q1yyx84sakk1phcg0fprj6i0j0dllfjifg"))
(patches (search-patches "python-seaborn-kde-test.patch"))))
(build-system python-build-system)
(arguments
@@ -9507,31 +9484,41 @@ and statistical routines from scipy and statsmodels.")
(define-public python-mpmath
(package
- (name "python-mpmath")
- (version "1.1.0")
- (source (origin
- (method url-fetch)
- (uri (pypi-uri "mpmath" version))
- (file-name (git-file-name name version))
- (sha256
- (base32
- "1xlrcja213jpfhw25q1jl5pl10w1a2cc68x1c4mkicxsbzhan5zw"))))
- (build-system python-build-system)
- (native-inputs
- `(("python-pytest" ,python-pytest)))
- (arguments
- '(#:phases
- (modify-phases %standard-phases
- (replace 'check
- (lambda _
- (invoke "python" "mpmath/tests/runtests.py" "-local"))))))
- (home-page "https://mpmath.org")
- (synopsis "Arbitrary-precision floating-point arithmetic in python")
- (description
- "@code{mpmath} can be used as an arbitrary-precision substitute for
+ (name "python-mpmath")
+ (version "1.2.1")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/fredrik-johansson/mpmath")
+ (commit "c6a35f9ee7c294bcf4e0517bc76b268843db9499")))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0ifw59fjjls3mas104rh0frilvab2fhk1dkjraxlqni5n9l676im"))))
+ (build-system python-build-system)
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (add-before 'build 'set-version
+ (lambda _
+ (setenv "SETUPTOOLS_SCM_PRETEND_VERSION" ,version)
+ ;; ZIP does not support timestamps before 1980.
+ (setenv "SOURCE_DATE_EPOCH" "315532800")))
+ (replace 'check
+ (lambda* (#:key tests? inputs outputs #:allow-other-keys)
+ (when tests?
+ (add-installed-pythonpath inputs outputs)
+ (invoke "pytest" "-vv")))))))
+ (native-inputs
+ `(("python-pytest" ,python-pytest)
+ ("python-setuptools-scm" ,python-setuptools-scm)))
+ (home-page "https://mpmath.org")
+ (synopsis "Arbitrary-precision floating-point arithmetic in python")
+ (description
+ "@code{mpmath} can be used as an arbitrary-precision substitute for
Python's float/complex types and math/cmath modules, but also does much
more advanced mathematics.")
- (license license:bsd-3)))
+ (license license:bsd-3)))
(define-public python2-mpmath
(package-with-python2 python-mpmath))
@@ -9731,7 +9718,14 @@ Python 2 and Python 3.")
(license license:psfl)))
(define-public python2-backports-csv
- (package-with-python2 python-backports-csv))
+ (package
+ (inherit (package-with-python2 python-backports-csv))
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ ;; The sanity-check attempts attempts to import the non-existent
+ ;; module "backports".
+ (delete 'sanity-check))))))
(define-public python2-backports-shutil-get-terminal-size
(package
@@ -9751,8 +9745,6 @@ Python 2 and Python 3.")
(modify-phases %standard-phases
(replace 'check
(lambda _
- (setenv "PYTHONPATH" (string-append "./build/lib:"
- (getenv "PYTHONPATH")))
(invoke "py.test" "-v"))))))
(native-inputs
`(("python2-pytest" ,python2-pytest)))
@@ -9979,11 +9971,10 @@ plugin for flake8 to check PEP-8 naming conventions.")
(method url-fetch)
(uri (pypi-uri "pyflakes" version))
(sha256
- (base32
- "1ny10364ciqh4ripasj4zzv4145l21l3s85m3qlrvfq5pk58xg7m"))))
+ (base32
+ "1ny10364ciqh4ripasj4zzv4145l21l3s85m3qlrvfq5pk58xg7m"))))
(build-system python-build-system)
- (home-page
- "https://github.com/pyflakes/pyflakes")
+ (home-page "https://github.com/PyCQA/pyflakes")
(synopsis "Passive checker of Python programs")
(description
"Pyflakes statically checks Python source code for common errors.")
@@ -10001,28 +9992,30 @@ plugin for flake8 to check PEP-8 naming conventions.")
(uri (pypi-uri "pyflakes" version))
(sha256
(base32
- "1j3zqbiwkyicvww499bblq33x0bjpzdrxajhaysr7sk7x5gdgcim"))))))
+ "1j3zqbiwkyicvww499bblq33x0bjpzdrxajhaysr7sk7x5gdgcim"))
+ (patches
+ (search-patches "python-pyflakes-test-location.patch"))))))
(define-public python-mccabe
(package
(name "python-mccabe")
(version "0.6.1")
(source
- (origin
- (method url-fetch)
- (uri (pypi-uri "mccabe" version))
- (sha256
- (base32
- "07w3p1qm44hgxf3vvwz84kswpsx6s7kvaibzrsx5dzm0hli1i3fx"))))
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "mccabe" version))
+ (sha256
+ (base32
+ "07w3p1qm44hgxf3vvwz84kswpsx6s7kvaibzrsx5dzm0hli1i3fx"))))
(build-system python-build-system)
(native-inputs
- `(("python-pytest" ,python-pytest-bootstrap)
- ("python-pytest-runner" ,python-pytest-runner)))
- (home-page "https://github.com/flintwork/mccabe")
+ `(("python-toml", python-toml)
+ ("python-pytest" ,python-pytest-bootstrap)
+ ("python-pytest-runner" ,python-pytest-runner)))
+ (home-page "https://github.com/PyCQA/mccabe")
(synopsis "McCabe checker, plugin for flake8")
- (description
- "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
-complexity of Python source code.")
+ (description "This package provides a Flake8 plug-in to compute the McCabe
+cyclomatic complexity of Python source code.")
(license license:expat)))
(define-public python2-mccabe
@@ -10199,14 +10192,11 @@ unnecessary plus operators for explicit string literal concatenation.")
(substitute* "setup.cfg"
(("\\[pytest\\]")
"[tool:pytest]"))
-
- (setenv "PYTHONPATH"
- (string-append (getcwd) "/build/lib:"
- (getenv "PYTHONPATH")))
(invoke "py.test" "-v"))))))
+ (propagated-inputs
+ `(("python-flake8" ,python-flake8)))
(native-inputs
- `(("python-flake8" ,python-flake8)
- ("python-mock" ,python-mock)
+ `(("python-mock" ,python-mock)
("python-pep8" ,python-pep8)
("python-pycodestyle" ,python-pycodestyle)
("python-pytest" ,python-pytest)))
@@ -10245,14 +10235,14 @@ files.")
(define-public python-flake8-pyi
(package
(name "python-flake8-pyi")
- (version "20.5.0")
+ (version "20.10.0")
(source
(origin
(method url-fetch)
(uri (pypi-uri "flake8-pyi" version))
(sha256
(base32
- "1zpq4s9kp8w95pccmhhyyx1ff2zhnidcf1zb3xs46lzcx9plvnzk"))))
+ "0b27n2pmrxcc7nva4wp2i7mrag0fnq0firvhg1ljq593a45b5qyf"))))
(build-system python-build-system)
(propagated-inputs
`(("python-attrs" ,python-attrs)
@@ -10378,6 +10368,20 @@ Python.")
(define-public python2-mistune
(package-with-python2 python-mistune))
+;; 2.0 is not released yet, but some packages have started using it.
+(define-public python-mistune-next
+ (package
+ (inherit python-mistune)
+ (name "python-mistune-next")
+ (version "2.0.0rc1")
+ (source (origin
+ (method url-fetch)
+ (uri (pypi-uri "mistune" version))
+ (sha256
+ (base32
+ "1nd7iav1ixh9hlj4hxn6lmpava88d86ys8rqm30wgvr7gjlxnas5"))))
+ (native-inputs (list python-nose))))
+
(define-public python-markdown
(package
(name "python-markdown")
@@ -10720,14 +10724,7 @@ third-party code.")
(modify-phases %standard-phases
(replace 'check
(lambda _
- (let ((cwd (getcwd)))
- (setenv "PYTHONPATH"
- (string-append cwd "/build/"
- (find (cut string-prefix? "lib" <>)
- (scandir (string-append cwd "/build")))
- ":"
- (getenv "PYTHONPATH")))
- (invoke "pytest" "-v" "test")))))))
+ (invoke "pytest" "-v" "test"))))))
(native-inputs
`(("python-pytest" ,python-pytest)))
(synopsis "MessagePack (de)serializer")
@@ -11029,9 +11026,9 @@ Unicode-aware. It is not intended as an end-user tool.")
(replace 'check
(lambda* (#:key tests? #:allow-other-keys)
(when tests?
- (setenv "PYTHONPATH"
+ (setenv "GUIX_PYTHONPATH"
(string-append (getcwd) "/build/lib:"
- (getenv "PYTHONPATH")))
+ (getenv "GUIX_PYTHONPATH")))
(invoke "nosetests" "-v")))))))
(native-inputs
`(("nose" ,python-nose)))
@@ -11586,6 +11583,7 @@ is binding LibSass.")
(build-system python-build-system)
(arguments
`(#:tests? #f)) ;circular dependency with python-aiohttp
+ (propagated-inputs `(("python-idna" ,python-idna)))
(home-page "https://github.com/aio-libs/idna-ssl")
(synopsis "Patch @code{ssl.match_hostname} for Unicode(idna) domains support")
(description "Patch @code{ssl.match_hostname} for Unicode(idna)
@@ -11902,7 +11900,7 @@ JSON Reference and JSON Pointer.")
("python-json-spec" ,python-json-spec)
("python-jsonschema" ,python-jsonschema)
("python-pylint" ,python-pylint)
- ("python-pytest" ,python-pytest-6)
+ ("python-pytest" ,python-pytest)
("python-pytest-benchmark"
,python-pytest-benchmark)
("python-pytest-cache" ,python-pytest-cache)
@@ -12168,31 +12166,33 @@ time.")
("python-pytest" ,python-pytest)
("python-pytest-cov" ,python-pytest-cov)
("python-pytest-dependency" ,python-pytest-dependency)
- ("texlive" ,(texlive-union (list texlive-adjustbox
- texlive-amsfonts/patched
+ ("texlive" ,(texlive-updmap.cfg (list texlive-adjustbox
+ texlive-amsfonts
texlive-booktabs
texlive-caption
texlive-eurosym
texlive-fonts-rsfs
texlive-generic-ulem
- texlive-iftex
+ texlive-generic-iftex
texlive-jknappen
texlive-latex-amsmath
texlive-latex-enumitem
texlive-latex-fancyvrb
texlive-latex-float
- texlive-latex-fontspec
+ texlive-fontspec
texlive-latex-geometry
- texlive-latex-hyperref
+ texlive-grffile
+ texlive-hyperref
texlive-latex-jknapltx
texlive-latex-ms
- texlive-latex-oberdiek
+ texlive-oberdiek
texlive-latex-parskip
texlive-latex-trimspaces
texlive-latex-upquote
texlive-latex-ucs
texlive-lm
texlive-mathpazo
+ texlive-stringenc
texlive-tcolorbox
texlive-titling
texlive-tools
@@ -12245,6 +12245,18 @@ convert an @code{.ipynb} notebook file into various static formats including:
(arguments
`(#:phases
(modify-phases %standard-phases
+ (add-after 'unpack 'use-our-home-for-tests
+ (lambda _
+ ;; The 'get_patch_env' function in this file reads:
+ ;; 'HOME': cls.home_dir
+ ;; but for some reason, that definition of HOME is not what the
+ ;; GLib/GIO trash mechanism honors, which would cause test
+ ;; failures. Instead, set 'HOME' here to an existing directory
+ ;; and let the tests honor it.
+ (substitute* "notebook/tests/launchnotebook.py"
+ (("'HOME': .*," all)
+ (string-append "# " all "\n")))
+ (setenv "HOME" (getcwd))))
(replace 'check
(lambda* (#:key tests? inputs outputs #:allow-other-keys)
;; These tests require a browser
@@ -12254,13 +12266,10 @@ convert an @code{.ipynb} notebook file into various static formats including:
;; Some tests do not expect all files to be installed in the
;; same directory, but JUPYTER_PATH contains multiple entries.
(unsetenv "JUPYTER_PATH")
- ;; Some tests need HOME
- (setenv "HOME" "/tmp")
- (with-directory-excursion "/tmp"
- (invoke "pytest" "-vv"
- ;; TODO: This tests fails because nbconvert does not
- ;; list "python" as a format.
- "-k" "not test_list_formats"))))))))
+ (invoke "pytest" "-vv"
+ ;; TODO: This tests fails because nbconvert does not
+ ;; list "python" as a format.
+ "-k" "not test_list_formats")))))))
(propagated-inputs
`(("python-argon2-cffi" ,python-argon2-cffi)
("python-ipykernel" ,python-ipykernel)
@@ -12344,14 +12353,14 @@ in the data.")
(define-public python-jupyter-console
(package
(name "python-jupyter-console")
- (version "6.1.0")
+ (version "6.4.0")
(source
(origin
(method url-fetch)
(uri (pypi-uri "jupyter_console" version))
(sha256
(base32
- "06s3kr5vx0l1y1b7fxb04dmrppscl7q69sl9yyfr0d057d1ssvkg"))))
+ "1iqrxhd8hvlyf8cqbc731ssnwm61wrycnbiczy5wsfahd3hlh8i4"))))
(build-system python-build-system)
(propagated-inputs
`(("python-ipykernel" ,python-ipykernel)
@@ -12359,7 +12368,8 @@ in the data.")
("python-prompt-toolkit" ,python-prompt-toolkit-2)
("python-pygments" ,python-pygments)))
(native-inputs
- `(("python-nose" ,python-nose)))
+ `(("python-nose" ,python-nose)
+ ("python-pytest" ,python-pytest)))
(home-page "https://jupyter.org")
(synopsis "Jupyter terminal console")
(description "This package provides a terminal-based console frontend for
@@ -12419,7 +12429,8 @@ Jupyter kernels such as IJulia and IRKernel.")
#t)))))
(propagated-inputs
`(("python-ipykernel" ,python-ipykernel)
- ("python-ipython" ,python-ipython)))
+ ("python-ipython" ,python-ipython)
+ ("python-pyqt" ,python-pyqt)))
(native-inputs
`(("python-pytest" ,python-pytest)))
(home-page "https://jupyter.org")
@@ -12559,7 +12570,8 @@ library provides codecs are supported.")
(file-name (git-file-name name version))
(sha256
(base32
- "0aad9gbswnnhssin2q0m5lmpm0ahyf80ahs2zjigbn5y7fvljnd0"))))
+ "0aad9gbswnnhssin2q0m5lmpm0ahyf80ahs2zjigbn5y7fvljnd0"))
+ (patches (search-patches "python-docopt-pytest6-compat.patch"))))
(build-system python-build-system)
(native-inputs
`(("python-pytest" ,python-pytest)))
@@ -12567,7 +12579,9 @@ library provides codecs are supported.")
`(#:phases
(modify-phases %standard-phases
(replace 'check
- (lambda _ (invoke "py.test"))))))
+ (lambda* (#:key tests? #:allow-other-keys)
+ (when tests?
+ (invoke "py.test")))))))
(home-page "http://docopt.org")
(synopsis "Command-line interface description language for Python")
(description "This library allows the user to define a command-line
@@ -12781,14 +12795,15 @@ tables.")
(define-public python-atomicwrites
(package
(name "python-atomicwrites")
- (version "1.3.0")
+ (version "1.4.0")
(source (origin
(method url-fetch)
(uri (pypi-uri "atomicwrites" version))
(sha256
(base32
- "19ngcscdf3jsqmpcxn6zl5b6anmsajb6izp1smcd1n02midl9abm"))))
+ "0yla2svfhfqrcj8qbyqzx7wi4jy0dwcxvlkg0k3zjd54s5m3jw5f"))))
(build-system python-build-system)
+ (arguments `(#:tests? #f)) ;avoid circular dependency with pytest
(synopsis "Atomic file writes in Python")
(description "Library for atomic file writes using platform dependent tools
for atomic file system operations.")
@@ -12980,6 +12995,11 @@ pure Python module that works on virtually all Python versions.")
(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
@@ -13350,6 +13370,18 @@ text.")
(define-public python2-colorama
(package-with-python2 python-colorama))
+;; awscli and botocore do not accept version 0.4.4
+(define-public python-colorama-for-awscli
+ (package
+ (inherit python-colorama)
+ (version "0.4.3")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "colorama" version))
+ (sha256
+ (base32 "189n8hpijy14jfan4ha9f5n06mnl33cxz7ay92wjqgkr639s0vg9"))))))
+
(define-public python-moto
(package
(name "python-moto")
@@ -13366,9 +13398,7 @@ text.")
(modify-phases %standard-phases
(add-after 'unpack 'patch-hardcoded-executable-names
(lambda* (#:key inputs #:allow-other-keys)
- (let ((bash-exec (string-append
- (assoc-ref inputs "bash")
- "/bin/sh")))
+ (let ((bash-exec (search-input-file inputs "/bin/sh")))
(substitute* "moto/batch/models.py"
(("/bin/sh") bash-exec))
(substitute* (find-files "tests" "\\.py$")
@@ -14305,15 +14335,20 @@ ISO 8859, etc.).")
(lambda* (#:key inputs outputs #:allow-other-keys)
(add-installed-pythonpath inputs outputs)
(invoke "pytest" "-vv" "-k"
- ;; These tests try to download online data.
- (string-append "not test_PolyLineROI"
- " and not test_getArrayRegion_axisorder"
- " and not test_getArrayRegion"
- " and not test_PlotCurveItem"
- " and not test_NonUniformImage_colormap"
- " and not test_NonUniformImage_lut"
- " and not test_ImageItem_axisorder"
- " and not test_ImageItem")))))))
+ (string-append
+ ;; These tests try to download online data.
+ "not test_PolyLineROI"
+ " and not test_getArrayRegion_axisorder"
+ " and not test_getArrayRegion"
+ " and not test_PlotCurveItem"
+ " and not test_NonUniformImage_colormap"
+ " and not test_NonUniformImage_lut"
+ " and not test_ImageItem_axisorder"
+ " and not test_ImageItem"
+ ;; The test_reload test fails and suggests adding
+ ;; "--assert=plain" to the pytest command, but it
+ ;; doesn't solve the failure.
+ " and not test_reload")))))))
(native-inputs
`(("python-pytest" ,python-pytest)
("python-pytest-cov" ,python-pytest-cov)
@@ -14463,9 +14498,6 @@ algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
useful for solving the Assignment Problem.")
(license license:bsd-3)))
-(define-public python2-munkres
- (package-with-python2 python-munkres))
-
(define-public python-whoosh
(package
(name "python-whoosh")
@@ -14819,31 +14851,19 @@ syntax highlighting, markdown and more to the terminal.")
(define-public python-magic
(package
(name "python-magic")
- (version "0.4.15")
+ (version "0.4.24")
+ (home-page "https://github.com/ahupp/python-magic")
(source
(origin
- (method url-fetch)
- (uri (pypi-uri "python-magic" version))
+ (method git-fetch)
+ (uri (git-reference (url home-page) (commit version)))
+ (file-name (git-file-name name version))
(sha256
(base32
- "1mgwig9pnzgkf86q9ji9pnc99bngms15lfszq5rgqb9db07mqxpk"))
- (file-name (string-append name "-" version "-checkout"))))
+ "17jalhjbfd600lzfz296m0nvgp6c7vx1mgz82jbzn8hgdzknf4w0"))))
(build-system python-build-system)
(arguments
- ;; The tests are unreliable, so don't run them. The tests fail
- ;; under Python3 because they were written for Python2 and
- ;; contain import statements that do not work in Python3. One of
- ;; the tests fails under Python2 because its assertions are
- ;; overly stringent; it relies on comparing output strings which
- ;; are brittle and can change depending on the version of
- ;; libmagic being used and the system on which the test is
- ;; running. In my case, under GuixSD 0.10.0, only one test
- ;; failed, and it seems to have failed only because the version
- ;; of libmagic that is packaged in Guix outputs a slightly
- ;; different (but not wrong) string than the one that the test
- ;; expected.
- '(#:tests? #f
- #:phases (modify-phases %standard-phases
+ '(#:phases (modify-phases %standard-phases
;; Replace a specific method call with a hard-coded
;; path to the necessary libmagic.so file in the
;; store. If we don't do this, then the method call
@@ -14853,24 +14873,22 @@ syntax highlighting, markdown and more to the terminal.")
(add-before 'build 'hard-code-path-to-libmagic
(lambda* (#:key inputs #:allow-other-keys)
(let ((file (assoc-ref inputs "file")))
- (substitute* "magic.py"
- (("ctypes.util.find_library\\('magic'\\)")
- (string-append "'" file "/lib/libmagic.so'")))
- #t)))
- (add-before 'install 'disable-egg-compression
- (lambda _
- (let ((port (open-file "setup.cfg" "a")))
- (display "\n[easy_install]\nzip_ok = 0\n"
- port)
- (close-port port)
- #t))))))
+ (substitute* "magic/loader.py"
+ (("find_library\\('magic'\\)")
+ (string-append "'" file "/lib/libmagic.so'"))))))
+ (replace 'check
+ (lambda* (#:key tests? #:allow-other-keys)
+ ;; The test suite mandates this variable.
+ (setenv "LC_ALL" "en_US.UTF-8")
+ (if tests?
+ (invoke "python" "./test/test.py")
+ (format #t "test suite not run~%")))))))
+ (native-inputs
+ `(("which" ,which)))
(inputs
;; python-magic needs to be able to find libmagic.so.
`(("file" ,file)))
- (home-page
- "https://github.com/ahupp/python-magic")
- (synopsis
- "File type identification using libmagic")
+ (synopsis "File type identification using libmagic")
(description
"This module uses ctypes to access the libmagic file type
identification library. It makes use of the local magic database and
@@ -15165,12 +15183,6 @@ own code, responding to click events and updating clock every second.")
(modify-phases %standard-phases
(replace 'check
(lambda _
- ;; Upstream runs tests after installation and the package itself
- ;; resides in a subdirectory. Extend PYTHONPATH so it will be
- ;; found.
- (setenv "PYTHONPATH"
- (string-append (getcwd) "/build/lib:"
- (getenv "PYTHONPATH")))
(invoke "py.test" "-vv" "tests" "README.rst"))))))
(native-inputs
`(("python-pytest" ,python-pytest)
@@ -15364,13 +15376,6 @@ graphviz.")
(string-join disabled-tests "\n")))))))
(replace 'check
(lambda _
- ;; Make sure the build directory is on PYTHONPATH.
- (setenv "PYTHONPATH"
- (string-append
- (getenv "PYTHONPATH") ":"
- (getcwd) "/build/"
- (car (scandir "build" (cut string-prefix? "lib." <>)))))
-
;; Use the build daemons configured number of workers.
(setenv "NWORKERS" (number->string (parallel-job-count)))
@@ -15428,7 +15433,14 @@ format.")
"17d3hnxv9qndagzz63mdpyk99xj63p9gq586vjn0rxk8cl197nym"))))
(build-system python-build-system)
(arguments
- '(#:tests? #f)) ; FIXME: some tests fail
+ '(#:tests? #f ; FIXME: some tests fail
+ #:phases
+ (modify-phases %standard-phases
+ ;; Remove scripts, because they depend on [conch]
+ (add-after 'unpack 'remove-entrypoint
+ (lambda _
+ (substitute* "src/twisted/python/_setup.py"
+ (("\".+ = twisted\\.conch\\.scripts\\..+\",") "")))))))
(propagated-inputs
`(("python-zope-interface" ,python-zope-interface)
("python-pyhamcrest" ,python-pyhamcrest)
@@ -15640,7 +15652,8 @@ etc.")
(uri (pypi-uri "chai" version))
(sha256
(base32
- "1k6n6zbgrrs83crp6mr3yqj9zlv40b8rpisyrliwsq7naml2p3gz"))))
+ "1k6n6zbgrrs83crp6mr3yqj9zlv40b8rpisyrliwsq7naml2p3gz"))
+ (patches (search-patches "python-chai-drop-python2.patch"))))
(build-system python-build-system)
(home-page "https://github.com/agoragames/chai")
(synopsis "Mocking framework for Python")
@@ -15649,9 +15662,6 @@ etc.")
objects, patterned after the Mocha library for Ruby.")
(license license:bsd-3)))
-(define-public python2-chai
- (package-with-python2 python-chai))
-
(define-public python-inflection
(package
(name "python-inflection")
@@ -15988,17 +15998,15 @@ some degree most natural languages too.")
(delete-file "libcst/tests/test_pyre_integration.py")
(delete-file "libcst/codemod/tests/test_codemod_cli.py")
(delete-file "libcst/metadata/tests/test_full_repo_manager.py")
- (delete-file "libcst/metadata/tests/test_type_inference_provider.py")
- #t))
+ (delete-file "libcst/metadata/tests/test_type_inference_provider.py")))
(add-before 'check 'generate-test-data
(lambda _
- (setenv "PYTHONPATH" (string-append (getcwd) ":" (getenv "PYTHONPATH")))
(invoke "python" "-m" "libcst.codegen.generate" "visitors")
(invoke "python" "-m" "libcst.codegen.generate" "return_types")))
(replace 'check
- (lambda _
- (invoke "python" "-m" "unittest")
- #t)))))
+ (lambda* (#:key tests? #:allow-other-keys)
+ (when tests?
+ (invoke "python" "-m" "unittest")))))))
(native-inputs
`(("python-black" ,python-black)
("python-isort" ,python-isort)))
@@ -16023,6 +16031,14 @@ feels like an AST.")
;; libcst/_add_slots.py
license:asl2.0))))
+(define-public python-libcst-minimal
+ (hidden-package
+ (package
+ (inherit python-libcst)
+ (name "python-libcst-minimal")
+ (arguments '(#:tests? #f))
+ (native-inputs '()))))
+
(define-public python-typing-inspect
(package
(name "python-typing-inspect")
@@ -16032,7 +16048,8 @@ feels like an AST.")
(uri (pypi-uri "typing_inspect" version))
(sha256
(base32
- "1dzs9a1pr23dhbvmnvms2jv7l7jk26023g5ysf0zvnq8b791s6wg"))))
+ "1dzs9a1pr23dhbvmnvms2jv7l7jk26023g5ysf0zvnq8b791s6wg"))
+ (patches (search-patches "python-typing-inspect-fix.patch"))))
(build-system python-build-system)
(propagated-inputs
`(("python-mypy-extensions" ,python-mypy-extensions)
@@ -16078,8 +16095,21 @@ until the object is actually required, and caches the result of said call.")
(base32
"1m0xvyby8baaxp6pfm0fgq8d2pq5dd8qm8bzfbrs009jaw5pza74"))))
(build-system python-build-system)
+ (arguments
+ `(#:tests? #f ; XXX: requires internet access
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'patch-getprotobyname-calls
+ ;; These calls are problematic in the build environment as there is
+ ;; no /etc/protocols. This breaks the sanity-check phase of any
+ ;; package depnding on this one.
+ (lambda _
+ (substitute* "dns/rdtypes/IN/WKS.py"
+ (("socket.getprotobyname\\('tcp'\\)")
+ "6")
+ (("socket.getprotobyname\\('udp'\\)")
+ "17")))))))
(native-inputs `(("unzip" ,unzip)))
- (arguments '(#:tests? #f)) ; XXX: requires internet access
(home-page "https://www.dnspython.org")
(synopsis "DNS toolkit for Python")
(description
@@ -16233,29 +16263,7 @@ parsing UK postcodes.")
(description
"Faker is a Python package that generates fake data such as names,
addresses, and phone numbers.")
- (license license:expat)
- (properties `((python2-variant . ,(delay python2-faker))))))
-
-;; Faker 4.0 dropped Python 2 support, so we stick with this older version here.
-(define-public python2-faker
- (let ((base (package-with-python2 (strip-python2-variant
- python-faker))))
- (package
- (inherit base)
- (version "3.0.1")
- (source (origin
- (method url-fetch)
- (uri (pypi-uri "Faker" version))
- (sha256
- (base32
- "11cr0qvspkdh6198rqy56qildk7bnp6llj8kyy1dan5sp5n4dxy7"))))
- (native-inputs
- `(("python-mock" ,python2-mock)
- ,@(package-native-inputs base)))
- (propagated-inputs
- `(("python2-ipaddress" ,python2-ipaddress)
- ("python2-six" ,python2-six)
- ,@(package-propagated-inputs base))))))
+ (license license:expat)))
(define-public python-pyaml
(package
@@ -16296,7 +16304,8 @@ YAML-serialized data.")
(build-system python-build-system)
(native-inputs
`(("python-pytest" ,python-pytest)
- ("python-nose" ,python-nose)))
+ ("python-nose" ,python-nose)
+ ("python-toml" ,python-toml)))
(propagated-inputs
`(("python-simplejson" ,python-simplejson)))
(home-page "https://github.com/sdispater/backpack")
@@ -16385,10 +16394,15 @@ characters, mouse support, and auto suggestions.")
(version "0.18.1")
(source
(origin
- (method url-fetch)
- (uri (pypi-uri "jedi" version))
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/davidhalter/jedi")
+ (commit (string-append "v" version))
+ (recursive? #true)))
+ (file-name (git-file-name name version))
(sha256
- (base32 "1as9v6kv49j11al2mzjh72dd5mxxnfcjv0z5dbmwi6aalqk7c4vl"))))
+ (base32
+ "07drmi3ai49jw5n23ibkambcgijqcw073ihypjgxfnks5lv4yqy1"))))
(build-system python-build-system)
(arguments
`(#:phases
@@ -16400,8 +16414,8 @@ characters, mouse support, and auto suggestions.")
(invoke "python" "-m" "pytest" "-vv"))
#t)))))
(native-inputs
- `(("python-docopt" ,python-docopt)
- ("python-colorama" ,python-colorama)
+ `(("python-colorama" ,python-colorama)
+ ("python-docopt" ,python-docopt)
("python-django" ,python-django-2.2)
("python-pytest" ,python-pytest)))
(propagated-inputs
@@ -16413,8 +16427,8 @@ characters, mouse support, and auto suggestions.")
Development Environments (@dfn{IDE}s) and text editors. It understands Python
on a deeper level than many other static analysis frameworks for Python.
-Jedi understands docstrings and you can use Jedi autocompletion in your REPL as
-well.")
+Jedi understands docstrings and you can use Jedi autocompletion in your REPL
+as well.")
(license license:expat)))
(define-public ptpython
@@ -16440,9 +16454,9 @@ well.")
(synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
(description
"ptpython is a Python read-eval-print loop with IDE-like features.
-It supports syntax highlighting, multiline editing, autocompletion, mouse,
-color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
-etc.")
+ It supports syntax highlighting, multiline editing, autocompletion, mouse,
+ color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
+ etc.")
(license license:bsd-3)
(properties `((python2-variant . ,(delay ptpython-2))))))
@@ -16492,8 +16506,8 @@ etc.")
(synopsis "Command-line interface for Python modules")
(description
"@code{entrypoint2} is an easy to use command-line interface for Python
-modules based on @code{argparse}. It translates function signature and
-documentation to argparse configuration.")
+ modules based on @code{argparse}. It translates function signature and
+ documentation to argparse configuration.")
(license license:bsd-3)))
(define-public python-pyvirtualdisplay
@@ -16540,6 +16554,12 @@ documentation to argparse configuration.")
(arguments
`(#:phases
(modify-phases %standard-phases
+ (add-after 'unpack 'fix-tests
+ ;; See https://github.com/torproject/stem/issues/56
+ (lambda _
+ (substitute* "run_tests.py"
+ (("test\\.task\\.MOCK_VERSION,")
+ ""))))
(replace 'check
(lambda _
(invoke "./run_tests.py" "--unit")
@@ -16553,8 +16573,8 @@ documentation to argparse configuration.")
"Python controller library that allows applications to interact with Tor")
(description
"Stem is a Python controller library for Tor. With it you can use Tor's
-control protocol to script against the Tor process and read descriptor data
-relays publish about themselves.")
+ control protocol to script against the Tor process and read descriptor data
+ relays publish about themselves.")
(license license:lgpl3)))
(define-public python-pyserial
@@ -16580,8 +16600,8 @@ relays publish about themselves.")
"https://github.com/pyserial/pyserial")
(synopsis "Python Serial Port Bindings")
(description "@code{pyserial} provide serial port bindings for Python. It
-supports different byte sizes, stop bits, parity and flow control with RTS/CTS
-and/or Xon/Xoff. The port is accessed in RAW mode.")
+ supports different byte sizes, stop bits, parity and flow control with RTS/CTS
+ and/or Xon/Xoff. The port is accessed in RAW mode.")
(license license:bsd-3)))
(define-public python2-pyserial
@@ -16602,13 +16622,13 @@ and/or Xon/Xoff. The port is accessed in RAW mode.")
(home-page "https://github.com/pyserial/pyserial-asyncio")
(synopsis "Pyserial asynchronous I/O extension")
(description "This package extends Pyserial with asynchronous I/O
-support.")
+ support.")
(license license:bsd-3)))
(define-public python-pymodbus
(package
(name "python-pymodbus")
- (version "2.5.2")
+ (version "2.5.3")
(source
(origin
(method git-fetch)
@@ -16618,24 +16638,28 @@ support.")
(file-name (git-file-name name version))
(sha256
(base32
- "009blvzi56434f0qfjdg3r8q1flb1jcx2786wi0i0xf81025z9cf"))))
+ "0kjjrx7xrlx0pf3y67hhr4xvqrly3xzmvf6ic5as61m6z19m7zd5"))))
(build-system python-build-system)
(arguments
`(#:phases (modify-phases %standard-phases
(add-after 'unpack 'disable-problematic-tests
(lambda _
- ;; The following test module rely on Python's own 'test'
- ;; module, which is not distributed in the Python
+ ;; The following test modules rely on Python's own
+ ;; 'test' module, which is not distributed in the Python
;; package of Guix.
(delete-file "test/test_client_async_asyncio.py")
- (delete-file "test/test_client_sync_diag.py")))
+ (delete-file "test/test_client_sync_diag.py")
+ ;; The following test module requires the asynctest
+ ;; library, abandoned without support for Python 3.9+
+ ;; (see:
+ ;; https://github.com/riptideio/pymodbus/issues/681).
+ (delete-file "test/test_server_asyncio.py")))
(replace 'check
(lambda* (#:key tests? #:allow-other-keys)
(when tests?
(invoke "python" "-m" "pytest")))))))
(native-inputs
- `(("python-asynctest" ,python-asynctest)
- ("python-mock" ,python-mock)
+ `(("python-mock" ,python-mock)
("python-pytest" ,python-pytest)
("python-redis" ,python-redis)
("python-sqlalchemy" ,python-sqlalchemy)
@@ -16653,26 +16677,53 @@ support.")
(home-page "https://github.com/riptideio/pymodbus/")
(synopsis "Modbus protocol stack in Python")
(description "Pymodbus is a full Modbus protocol implementation using
-@code{asyncio}, @code{tornado} or @code{twisted} for its asynchronous
-communications core. It includes the following @emph{client} features:
-@itemize
-@item full read/write protocol on discrete and register
-@item most of the extended protocol (diagnostic/file/pipe/setting/information)
-@item TCP, UDP, Serial ASCII, Serial RTU, and Serial Binary
-@item asynchronous and synchronous versions
-@item payload builder/decoder utilities
-@item pymodbus read eval print loop (REPL).
-@end itemize
-It also includes the following @emph{server} features:
-@itemize
-@item can function as a fully implemented Modbus server
-@item TCP, UDP, Serial ASCII, Serial RTU, and Serial Binary
-@item asynchronous and synchronous versions
-@item full server control context (device information, counters, etc)
-@item a number of backing contexts (database, redis, sqlite, a slave device).
-@end itemize")
+ @code{asyncio}, @code{tornado} or @code{twisted} for its asynchronous
+ communications core. It includes the following @emph{client} features:
+ @itemize
+ @item full read/write protocol on discrete and register
+ @item most of the extended protocol (diagnostic/file/pipe/setting/information)
+ @item TCP, UDP, Serial ASCII, Serial RTU, and Serial Binary
+ @item asynchronous and synchronous versions
+ @item payload builder/decoder utilities
+ @item pymodbus read eval print loop (REPL).
+ @end itemize
+ It also includes the following @emph{server} features:
+ @itemize
+ @item can function as a fully implemented Modbus server
+ @item TCP, UDP, Serial ASCII, Serial RTU, and Serial Binary
+ @item asynchronous and synchronous versions
+ @item full server control context (device information, counters, etc)
+ @item a number of backing contexts (database, redis, sqlite, a slave device).
+ @end itemize")
(license license:bsd-3)))
+(define-public python-kivy-garden
+ (package
+ (name "python-kivy-garden")
+ (version "0.1.4")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "kivy-garden" version))
+ (sha256
+ (base32 "0wkcpr2zc1q5jb0bi7v2dgc0vs5h1y7j42mviyh764j2i0kz8mn2"))))
+ (build-system python-build-system)
+ (arguments
+ '(#:phases (modify-phases %standard-phases
+ (add-after 'install 'remove-bat-file
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let ((out (assoc-ref outputs "out")))
+ (delete-file
+ (string-append out "/bin/garden.bat"))))))))
+ (propagated-inputs
+ `(("python-requests" ,python-requests)))
+ (home-page "https://github.com/kivy-garden/garden")
+ (synopsis "Garden tool for Kivy flowers")
+ (description
+ "This package provides the @command{garden} command to install packages
+for Kivy, the multitouch application platform.")
+ (license license:expat)))
+
(define-public python-kivy
(package
(name "python-kivy")
@@ -16693,9 +16744,11 @@ It also includes the following @emph{server} features:
(add-after 'patch-generated-file-shebangs 'set-sdl-paths
(lambda* (#:key inputs #:allow-other-keys)
(setenv "KIVY_SDL2_PATH"
- (string-append (assoc-ref inputs "sdl-union")
- "/include/SDL2"))
- #t)))))
+ (search-input-directory inputs "/include/SDL2"))))
+ (add-before 'sanity-check 'set-home
+ (lambda _
+ ;; 'kivy/__init__.py' wants to create $HOME/.kivy.
+ (setenv "HOME" (getcwd)))))))
(native-inputs
`(("pkg-config" ,pkg-config)
("python-cython" ,python-cython)))
@@ -16703,13 +16756,15 @@ It also includes the following @emph{server} features:
`(("gstreamer" ,gstreamer)
("mesa" ,mesa)
("sdl-union"
- ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
+ ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))
+ ("python-docutils" ,python-docutils)
+ ("python-kivy-garden" ,python-kivy-garden)
+ ("python-pygments" ,python-pygments)))
(home-page "https://kivy.org")
- (synopsis
- "Multitouch application framework")
+ (synopsis "Multitouch application framework")
(description
- "A software library for rapid development of
-hardware-accelerated multitouch applications.")
+ "Kivy is a software library for rapid development of hardware-accelerated
+multitouch applications.")
(license license:expat)))
(define-public python2-kivy
@@ -16742,7 +16797,7 @@ hardware-accelerated multitouch applications.")
(home-page "https://github.com/audreyr/binaryornot")
(synopsis "Package to check if a file is binary or text")
(description "Ultra-lightweight pure Python package to check if a file is
-binary or text.")
+ binary or text.")
(license license:bsd-3)
(properties `((python2-variant . ,(delay python2-binaryornot))))))
@@ -16770,12 +16825,8 @@ binary or text.")
(arguments
`(#:phases
(modify-phases %standard-phases
- (add-before 'check 'set-pythonpath
+ (add-before 'check 'set-home
(lambda _
- (setenv "PYTHONPATH"
- (string-append
- (getcwd) "/src/"
- ":" (getenv "PYTHONPATH")))
(setenv "HOME" ""))))))
(native-inputs
`(("python-coverage" ,python-coverage)
@@ -16783,7 +16834,7 @@ binary or text.")
(home-page "https://github.com/ReFirmLabs/binwalk")
(synopsis "Firmware analysis tool")
(description "Binwalk is a tool for analyzing, reverse engineering, and
-extracting firmware images")
+ extracting firmware images")
(license license:expat)))
(define-public python-binwalk
@@ -16814,9 +16865,9 @@ extracting firmware images")
(home-page "http://nltk.org/")
(synopsis "Natural Language Toolkit")
(description "It provides interfaces to over 50 corpora and lexical
-resources such as WordNet, along with a suite of text processing libraries
-for classification, tokenization, stemming, tagging, parsing, and semantic
-reasoning, wrappers for natural language processing libraries.")
+ resources such as WordNet, along with a suite of text processing libraries
+ for classification, tokenization, stemming, tagging, parsing, and semantic
+ reasoning, wrappers for natural language processing libraries.")
(license license:asl2.0)))
;; Versions >=3.5 breaks backward-compatibility,
@@ -16878,7 +16929,7 @@ reasoning, wrappers for natural language processing libraries.")
(synopsis "Python client for Consul")
(description
"Python client for @url{http://www.consul.io/,Consul}, a tool for service
-discovery, monitoring and configuration.")
+ discovery, monitoring and configuration.")
(license license:expat)))
(define-public python2-consul
@@ -16927,8 +16978,6 @@ discovery, monitoring and configuration.")
(modify-phases %standard-phases
(replace 'check
(lambda _
- (setenv "PYTHONPATH" (string-append "./build/lib:"
- (getenv "PYTHONPATH")))
(invoke "pytest" "-vv"))))))
(build-system python-build-system)
(native-inputs
@@ -16938,7 +16987,7 @@ discovery, monitoring and configuration.")
(home-page "https://github.com/eea/odfpy")
(synopsis "Python API and tools to manipulate OpenDocument files")
(description "Collection of libraries and utility programs written in
-Python to manipulate OpenDocument 1.2 files.")
+ Python to manipulate OpenDocument 1.2 files.")
(license
;; The software is mainly dual GPL2+ and ASL2.0, but includes a
;; number of files with other licenses.
@@ -16959,24 +17008,11 @@ Python to manipulate OpenDocument 1.2 files.")
"00y49bfsi7rrsd1s42gc2w95a6arl9ipdsx2493hr0v54fj07ih0"))))
(build-system python-build-system)
(arguments
- `(#:modules ((guix build utils)
- (guix build python-build-system)
- (srfi srfi-1)
- (srfi srfi-26)
- (ice-9 ftw))
- #:phases
+ `(#:phases
(modify-phases %standard-phases
(replace 'check
(lambda _
- (let ((cwd (getcwd)))
- (setenv "PYTHONPATH"
- (string-append
- cwd "/build/"
- (find (cut string-prefix? "lib" <>)
- (scandir (string-append cwd "/build")))
- ":"
- (getenv "PYTHONPATH")))
- (invoke "pytest" "-v")))))))
+ (invoke "pytest" "-v"))))))
(native-inputs
`(("python-hypothesis" ,python-hypothesis)
("python-pytest-cov" ,python-pytest-cov)
@@ -16988,13 +17024,13 @@ Python to manipulate OpenDocument 1.2 files.")
(synopsis "Natural sorting for python and shell")
(description
"Natsort lets you apply natural sorting on lists instead of
-lexicographical. If you use the built-in @code{sorted} method in python
-on a list such as @code{[@code{a20}, @code{a9}, @code{a1}, @code{a4},
-@code{a10}]}, it would be returned as @code{[@code{a1}, @code{a10}, @code{a20},
-@code{a4}, @code{a9}]}. Natsort provides a function @code{natsorted} that
-identifies numbers and sorts them separately from strings. It can also sort
-version numbers, real numbers, mixed types and more, and comes with a shell
-command @command{natsort} that exposes this functionality in the command line.")
+ lexicographical. If you use the built-in @code{sorted} method in python
+ on a list such as @code{[@code{a20}, @code{a9}, @code{a1}, @code{a4},
+ @code{a10}]}, it would be returned as @code{[@code{a1}, @code{a10}, @code{a20},
+ @code{a4}, @code{a9}]}. Natsort provides a function @code{natsorted} that
+ identifies numbers and sorts them separately from strings. It can also sort
+ version numbers, real numbers, mixed types and more, and comes with a shell
+ command @command{natsort} that exposes this functionality in the command line.")
(license license:expat)))
(define-public glances
@@ -17026,8 +17062,8 @@ command @command{natsort} that exposes this functionality in the command line.")
(synopsis "Cross-platform curses-based monitoring tool")
(description
"Glances is a curses-based monitoring tool for a wide variety of platforms.
-Glances uses the PsUtil library to get information from your system. It
-monitors CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
+ Glances uses the PsUtil library to get information from your system. It
+ monitors CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
(license license:lgpl3+)))
(define-public python-graphql-core
@@ -17062,9 +17098,9 @@ monitors CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
(synopsis "GraphQL implementation for Python")
(description
"GraphQL implementation for Python. GraphQL is a data query language and
-runtime designed and used to request and deliver data to mobile and web apps.
-This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
-to Python.")
+ runtime designed and used to request and deliver data to mobile and web apps.
+ This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
+ to Python.")
(license license:expat)))
(define-public python-graphql-relay
@@ -17080,35 +17116,44 @@ to Python.")
"1d70vwam9gjhx7fqzsa03x7lc6ivcqki5r9pk8m7rslmb7pagmbh"))))
(build-system python-build-system)
(arguments
- '(#:tests? #f)) ; The tests are not distributed
+ '(#:phases
+ (modify-phases %standard-phases
+ (replace 'check
+ (lambda* (#:key tests? #:allow-other-keys)
+ (when tests?
+ (invoke "pytest" "tests")))))))
+ (native-inputs
+ (list
+ python-pytest
+ python-pytest-asyncio))
(propagated-inputs
`(("python-graphql-core" ,python-graphql-core)))
(home-page "https://github.com/graphql-python/graphql-relay-py")
(synopsis "Relay implementation for Python")
(description
"This is a library to allow the easy creation of Relay-compliant servers
-using the GraphQL Python reference implementation of a GraphQL server. It
-should be noted that the code is a exact port of the original
-@url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
-from Facebook.")
+ using the GraphQL Python reference implementation of a GraphQL server. It
+ should be noted that the code is a exact port of the original
+ @url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
+ from Facebook.")
(license license:expat)))
(define-public python-graphene
(package
(name "python-graphene")
- (version "0.10.2")
+ (version "3.0")
(source
(origin
(method url-fetch)
(uri (pypi-uri "graphene" version))
(sha256
(base32
- "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
+ "08m1n2ydk48c18cvl8474v3pwwacjl1vgq61m9qs00122mp0cj5g"))))
(build-system python-build-system)
(propagated-inputs
`(("python-graphql-core" ,python-graphql-core)
("python-graphql-relay" ,python-graphql-relay)
- ("python-iso8601" ,python-iso8601)
+ ("python-aniso8601" ,python-aniso8601)
("python-promise" ,python-promise)
("python-six" ,python-six)))
(arguments
@@ -17117,41 +17162,8 @@ from Facebook.")
(synopsis "GraphQL Framework for Python")
(description
"Graphene is a Python library for building GraphQL schemas/types.
-A GraphQL schema describes your data model, and provides a GraphQL server
-with an associated set of resolve methods that know how to fetch data.")
- (license license:expat)))
-
-(define-public python-nautilus
- (package
- (name "python-nautilus")
- (version "0.4.9")
- (source
- (origin
- (method url-fetch)
- (uri (pypi-uri "nautilus" version))
- (sha256
- (base32
- "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
- (build-system python-build-system)
- (arguments `(#:tests? #f)) ; fails to import test modules
- (propagated-inputs
- `(("python-bcrypt" ,python-bcrypt)
- ("python-click" ,python-click)
- ("python-consul" ,python-consul)
- ("python-graphene" ,python-graphene)
- ("python-jinja2" ,python-jinja2)
- ("python-peewee" ,python-peewee)
- ("python-pika" ,python-pika)
- ("python-tornado" ,python-tornado)
- ("python-wtforms" ,python-wtforms)))
- (native-inputs
- `(("python-nose2" ,python-nose2)))
- (home-page "https://github.com/AlecAivazis/nautilus")
- (synopsis "Library for creating microservice applications")
- (description
- "Nautilus is a framework for flux based microservices that looks to
-provide extendible implementations of common aspects of a cloud so that you can
-focus on building massively scalable web applications.")
+ A GraphQL schema describes your data model, and provides a GraphQL server
+ with an associated set of resolve methods that know how to fetch data.")
(license license:expat)))
(define-public python-random2
@@ -17163,20 +17175,22 @@ focus on building massively scalable web applications.")
(uri (pypi-uri "random2" version ".zip"))
(sha256
(base32
- "01y0s4747plsx8fdnxy0nz83dp69naddz58m81r9h0s1qfm31b9l"))))
+ "01y0s4747plsx8fdnxy0nz83dp69naddz58m81r9h0s1qfm31b9l"))
+ (patches
+ (search-patches "python-random2-getrandbits-test.patch"))))
(build-system python-build-system)
(native-inputs `(("unzip" ,unzip)))
(home-page "http://pypi.python.org/pypi/random2")
(synopsis "Python 3 version of the Python 2 @code{random} module")
(description
"This package provides a Python 3 ported version of Python 2.7’s
-@code{random} module. It has also been back-ported to work in Python 2.6.
+ @code{random} module. It has also been back-ported to work in Python 2.6.
-In Python 3, the implementation of @code{randrange()} was changed, so that
-even with the same seed you get different sequences in Python 2 and 3.
+ In Python 3, the implementation of @code{randrange()} was changed, so that
+ even with the same seed you get different sequences in Python 2 and 3.
-This package closes that gap, allowing stable random number generation
-between the different Python versions.")
+ This package closes that gap, allowing stable random number generation
+ between the different Python versions.")
(license license:psfl)))
(define-public python2-random2
@@ -17199,8 +17213,8 @@ between the different Python versions.")
(home-page "https://github.com/shibukawa/snowball_py")
(synopsis "Snowball stemming library collection for Python")
(description "This package provides 16 word stemmer algorithms generated
-from Snowball algorithms. It includes the 15 original ones plus the Poerter
-English stemmer.")
+ from Snowball algorithms. It includes the 15 original ones plus the Poerter
+ English stemmer.")
(license license:bsd-3)))
(define-public python2-snowballstemmer
@@ -17248,12 +17262,12 @@ English stemmer.")
(synopsis
"Setproctitle implementation for Python to customize the process title")
(description "The library allows a process to change its title (as displayed
-by system tools such as ps and top).
+ by system tools such as ps and top).
-Changing the title is mostly useful in multi-process systems, for
-example when a master process is forked: changing the children's title
-allows identifying the task each process is busy with. The technique
-is used by PostgreSQL and the OpenSSH Server for example.")
+ Changing the title is mostly useful in multi-process systems, for
+ example when a master process is forked: changing the children's title
+ allows identifying the task each process is busy with. The technique
+ is used by PostgreSQL and the OpenSSH Server for example.")
(license license:bsd-3)
(properties `((python2-variant . ,(delay python2-setproctitle))))))
@@ -17287,10 +17301,6 @@ is used by PostgreSQL and the OpenSSH Server for example.")
(delete-file "tests/__init__.py")))
(replace 'check
(lambda _
- ;; Extend PYTHONPATH so the built package will be found.
- (setenv "PYTHONPATH"
- (string-append (getcwd) "/build/lib:"
- (getenv "PYTHONPATH")))
(invoke "py.test" "-vv" ))))))
(native-inputs
`(("python-pytest" ,python-pytest)))
@@ -17299,9 +17309,9 @@ is used by PostgreSQL and the OpenSSH Server for example.")
(synopsis "General purpose Python data validator")
(description "It allows validation of arbitrary Python data structures.
-The schema format is based on the JSON Schema
-proposal (http://json-schema.org), so combined with json the library is also
-useful as a validator for JSON data.")
+ The schema format is based on the JSON Schema
+ proposal (http://json-schema.org), so combined with json the library is also
+ useful as a validator for JSON data.")
(license license:expat)))
(define-public python2-validictory
@@ -17319,24 +17329,14 @@ useful as a validator for JSON data.")
(base32
"090vdksbz341f7ljvr0zswblw4lspa8qaiikzyjkf318arpxmil9"))))
(build-system python-build-system)
- (arguments
- `(#:phases
- (modify-phases %standard-phases
- (add-before 'check 'set-pythonpath
- (lambda _
- (setenv "PYTHONPATH"
- (string-append
- (getcwd) "/test/"
- ":" (getenv "PYTHONPATH")))
- #t)))))
(home-page
"https://github.com/eliben/pyelftools")
(synopsis
"Analyze binary and library file information")
(description "This Python library provides interfaces for parsing and
-analyzing two binary and library file formats; the Executable and Linking
-Format (ELF), and debugging information in the Debugging With Attributed
-Record Format (DWARF).")
+ analyzing two binary and library file formats ; the Executable and Linking
+ Format (ELF), and debugging information in the Debugging With Attributed
+ Record Format (DWARF).")
(license license:public-domain)))
(define-public python-pyev
@@ -17357,8 +17357,7 @@ Record Format (DWARF).")
(modify-phases %standard-phases
(add-after 'unpack 'patch
(lambda* (#:key inputs #:allow-other-keys)
- (let ((libev (string-append (assoc-ref inputs "libev")
- "/lib/libev.so.4")))
+ (let ((libev (search-input-file inputs "/lib/libev.so.4")))
(substitute* "setup.py"
(("libev_dll_name = find_library\\(\\\"ev\\\"\\)")
(string-append "libev_dll_name = \"" libev "\"")))))))))
@@ -17388,7 +17387,7 @@ Record Format (DWARF).")
(synopsis "Gets image size of files in various formats in Python")
(description
"This package allows determination of image size from
-PNG, JPEG, JPEG2000 and GIF files in pure Python.")
+ PNG, JPEG, JPEG2000 and GIF files in pure Python.")
(license license:expat)))
(define-public python2-imagesize
@@ -17441,10 +17440,10 @@ PNG, JPEG, JPEG2000 and GIF files in pure Python.")
(home-page "https://github.com/kislyuk/argcomplete")
(synopsis "Shell tab completion for Python argparse")
(description "argcomplete provides extensible command line tab completion
-of arguments and options for Python scripts using @code{argparse}. It's
-particularly useful for programs with many options or sub-parsers that can
-dynamically suggest completions; for example, when browsing resources over the
-network.")
+ of arguments and options for Python scripts using @code{argparse}. It's
+ particularly useful for programs with many options or sub-parsers that can
+ dynamically suggest completions ; for example, when browsing resources over the
+ network.")
(license license:asl2.0)
(properties `((python2-variant . ,(delay python2-argcomplete))))))
@@ -17509,7 +17508,7 @@ network.")
(home-page "http://opensource.perlig.de/rcssmin/")
(synopsis "CSS Minifier")
(description "The minifier is based on the semantics of the YUI compressor,
-which itself is based on the rule list by Isaac Schlueter.")
+ which itself is based on the rule list by Isaac Schlueter.")
(license license:asl2.0)))
(define-public python-rjsmin
@@ -17544,32 +17543,32 @@ which itself is based on the rule list by Isaac Schlueter.")
(home-page "http://opensource.perlig.de/rjsmin/")
(synopsis "Javascript Minifier")
(description "@code{rJSmin} is a javascript minifier written in Python. The
-minifier is based on the semantics of jsmin.c by Douglas Crockford. The module
-is a re-implementation aiming for speed, so it can be used at runtime (rather
-than during a preprocessing step).")
+ minifier is based on the semantics of jsmin.c by Douglas Crockford. The module
+ is a re-implementation aiming for speed, so it can be used at runtime (rather
+ than during a preprocessing step).")
(license license:asl2.0)))
(define-public python-xopen
(package
(name "python-xopen")
- (version "0.5.0")
+ (version "0.8.2")
(source
- (origin
- (method url-fetch)
- (uri (pypi-uri "xopen" version))
- (sha256
- (base32
- "17xbrgi23l87yg6h0qcknssp2q812miiy33qw6v45v5gx0jwv5xh"))))
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "xopen" version))
+ (sha256
+ (base32
+ "1xrlcnd6fri3w97zzzp6vyk4l21yq1lc8r4wksi06hgpkbh4jdq0"))))
(build-system python-build-system)
(propagated-inputs
`(("python-setuptools-scm" ,python-setuptools-scm)))
(home-page "https://github.com/marcelm/xopen/")
(synopsis "Open compressed files transparently")
(description "This module provides an @code{xopen} function that works like
-Python's built-in @code{open} function, but can also deal with compressed files.
-Supported compression formats are gzip, bzip2 and, xz, and are automatically
-recognized by their file extensions. The focus is on being as efficient as
-possible on all supported Python versions.")
+ Python's built-in @code{open} function, but can also deal with compressed files.
+ Supported compression formats are gzip, bzip2 and, xz, and are automatically
+ recognized by their file extensions. The focus is on being as efficient as
+ possible on all supported Python versions.")
(license license:expat)))
(define-public python2-xopen
@@ -17592,71 +17591,53 @@ possible on all supported Python versions.")
"0ar5dqjnqaw0c17mymd6xgd81jn9br9fblawr0x438v1571bkaya"))))
(build-system python-build-system)
(arguments
- `(#:modules ((guix build utils)
- (guix build python-build-system)
- (ice-9 ftw)
- (srfi srfi-1)
- (srfi srfi-26))
- #:phases (modify-phases %standard-phases
+ `(#:phases (modify-phases %standard-phases
(add-after 'unpack 'use-absolute-python
(lambda _
(substitute* "Cheetah/CheetahWrapper.py"
(("#!/usr/bin/env python")
- (string-append "#!" (which "python"))))
- #t))
+ (string-append "#!" (which "python"))))))
(add-after 'unpack 'fix-tests
(lambda _
(substitute* "Cheetah/Tests/ImportHooks.py"
(("os.path.dirname\\(__file__\\)")
- (string-append "'" (getcwd) "/Cheetah/Tests'")))
- #t))
+ (string-append "'" (getcwd) "/Cheetah/Tests'")))))
(replace 'check
(lambda _
- (let ((cwd (getcwd)))
- (setenv "PYTHONPATH"
- (string-append
- cwd "/build/"
- (find (cut string-prefix? "lib" <>)
- (scandir (string-append cwd "/build")))
- ":" (getenv "PYTHONPATH")))
- (setenv "PATH"
- (string-append (getenv "PATH")
- ":" cwd "/bin"))
- (setenv "TMPDIR" "/tmp")
-
- (substitute* "Cheetah/Tests/Test.py"
- (("unittest.TextTestRunner\\(\\)")
- "unittest.TextTestRunner(verbosity=2)"))
-
- (invoke "python" "Cheetah/Tests/Test.py")))))))
+ (setenv "TMPDIR" "/tmp")
+ (substitute* "Cheetah/Tests/Test.py"
+ (("unittest.TextTestRunner\\(\\)")
+ "unittest.TextTestRunner(verbosity=2)"))
+
+ (invoke "python" "Cheetah/Tests/Test.py"))))))
(propagated-inputs
`(("python-markdown" ,python-markdown))) ;optional
(home-page "https://cheetahtemplate.org/")
(synopsis "Template engine")
(description "Cheetah is a text-based template engine and Python code
-generator.
-
-Cheetah can be used as a standalone templating utility or referenced as
-a library from other Python applications. It has many potential uses,
-but web developers looking for a viable alternative to ASP, JSP, PHP and
-PSP are expected to be its principle user group.
-
-Features:
-@enumerate
-@item Generates HTML, SGML, XML, SQL, Postscript, form email, LaTeX, or any other
- text-based format.
-@item Cleanly separates content, graphic design, and program code.
-@item Blends the power and flexibility of Python with a simple template language
- that non-programmers can understand.
-@item Gives template writers full access to any Python data structure, module,
- function, object, or method in their templates.
-@item Makes code reuse easy by providing an object-orientated interface to
- templates that is accessible from Python code or other Cheetah templates.
- One template can subclass another and selectively reimplement sections of it.
-@item Provides a simple, yet powerful, caching mechanism that can dramatically
- improve the performance of a dynamic website.
-@item Compiles templates into optimized, yet readable, Python code.
-@end enumerate")
+ generator.
+
+ Cheetah can be used as a standalone templating utility or referenced as
+ a library from other Python applications. It has many potential uses,
+ but web developers looking for a viable alternative to ASP, JSP, PHP and
+ PSP are expected to be its principle user group.
+
+ Features:
+ @enumerate
+ @item Generates HTML, SGML, XML, SQL, Postscript, form email, LaTeX, or any other
+ text-based format.
+ @item Cleanly separates content, graphic design, and program code.
+ @item Blends the power and flexibility of Python with a simple template language
+ that non-programmers can understand.
+ @item Gives template writers full access to any Python data structure, module,
+ function, object, or method in their templates.
+ @item Makes code reuse easy by providing an object-orientated interface to
+ templates that is accessible from Python code or other Cheetah templates.
+ One template can subclass another and selectively reimplement sections of it.
+ @item Provides a simple, yet powerful, caching mechanism that can dramatically
+ improve the performance of a dynamic website.
+ @item Compiles templates into optimized, yet readable, Python code.
+ @end enumerate")
(license (license:x11-style "file://LICENSE"))))
(define-public python2-cheetah
@@ -17703,7 +17684,7 @@ Features:
(home-page "https://www.dulwich.io/")
(synopsis "Git implementation in Python")
(description "Dulwich is an implementation of the Git file formats and
-protocols written in pure Python.")
+ protocols written in pure Python.")
;; Can be used with either license.
(license (list license:asl2.0 license:gpl2+))))
@@ -17724,22 +17705,19 @@ protocols written in pure Python.")
(modify-phases %standard-phases
(replace 'check
(lambda _
- (setenv "PYTHONPATH"
- (string-append (getcwd) "/build/lib:"
- (getenv "PYTHONPATH")))
(invoke "python" "test/test_pbkdf2.py"))))))
(propagated-inputs
`(("python-pycrypto" ,python-pycrypto))) ; optional
(home-page "https://www.dlitz.net/software/python-pbkdf2/")
(synopsis "Password-based key derivation")
(description "This module implements the password-based key derivation
-function, PBKDF2, specified in RSA PKCS#5 v2.0.
+ function, PBKDF2, specified in RSA PKCS#5 v2.0.
-PKCS#5 v2.0 Password-Based Key Derivation is a key derivation function which
-is part of the RSA Public Key Cryptography Standards series. The provided
-implementation takes a password or a passphrase and a salt value (and
-optionally a iteration count, a digest module, and a MAC module) and provides
-a file-like object from which an arbitrarily-sized key can be read.")
+ PKCS#5 v2.0 Password-Based Key Derivation is a key derivation function which
+ is part of the RSA Public Key Cryptography Standards series. The provided
+ implementation takes a password or a passphrase and a salt value (and
+ optionally a iteration count, a digest module, and a MAC module) and provides
+ a file-like object from which an arbitrarily-sized key can be read.")
(license license:expat)))
(define-public python2-pbkdf2
@@ -17766,12 +17744,12 @@ a file-like object from which an arbitrarily-sized key can be read.")
(home-page "https://github.com/lincolnloop/python-qrcode")
(synopsis "QR Code image generator")
(description "This package provides a pure Python QR Code generator
-module. It uses the Python Imaging Library (PIL) to allow for the generation
-of QR Codes.
+ module. It uses the Python Imaging Library (PIL) to allow for the generation
+ of QR Codes.
-In addition this package provides a command line tool to generate QR codes and
-either write these QR codes to a file or do the output as ascii art at the
-console.")
+ In addition this package provides a command line tool to generate QR codes and
+ either write these QR codes to a file or do the output as ascii art at the
+ console.")
(license license:bsd-3)))
(define-public python2-qrcode
@@ -17795,7 +17773,7 @@ console.")
(synopsis "Convert RST to ANSI-decorated console output")
(description
"Python module dedicated to rendering RST (reStructuredText) documents
-to ansi-escaped strings suitable for display in a terminal.")
+ to ansi-escaped strings suitable for display in a terminal.")
(license license:expat)))
(define-public python-ansi2html
@@ -17819,7 +17797,7 @@ to ansi-escaped strings suitable for display in a terminal.")
(synopsis "Convert ANSI-decorated console output to HTML")
(description
"@command{ansi2html} is a Python library and command line utility for
-converting text with ANSI color codes to HTML or LaTeX.")
+ converting text with ANSI color codes to HTML or LaTeX.")
(license license:gpl3+)))
(define-public python2-ansi2html
@@ -17843,10 +17821,10 @@ converting text with ANSI color codes to HTML or LaTeX.")
(synopsis "Terminal framework API")
(description
"Easy ANSI is a terminal framework API to give you an easy way to use
-colors, cursor control movements, and line/box drawing. It is not meant as a
-replacement to more full-featured frameworks (such as curses or urwid), but as
-a tool to quickly create nice-looking screens in your terminal window. You
-can even create animations with the cursor controls.")
+ colors, cursor control movements, and line/box drawing. It is not meant as a
+ replacement to more full-featured frameworks (such as curses or urwid), but as
+ a tool to quickly create nice-looking screens in your terminal window. You
+ can even create animations with the cursor controls.")
(license license:expat)))
(define-public python-ddt
@@ -17869,8 +17847,8 @@ can even create animations with the cursor controls.")
(synopsis "Data-Driven Tests")
(description
"Data-Driven Tests (@dfn{DDT}) allow you to multiply one test case by
-running it with different test data, and make it appear as multiple test
-cases.")
+ running it with different test data, and make it appear as multiple test
+ cases.")
(license license:expat)))
(define-public python-pycountry
@@ -17889,16 +17867,16 @@ cases.")
(synopsis "ISO databases for languages, countries, currencies, etc.")
(description
"@code{pycountry} provides the ISO databases for the standards:
-@enumerate
-@item 639-3 (Languages)
-@item 3166 (Countries)
-@item 3166-3 (Deleted Countries)
-@item 3166-2 (Subdivisions of countries)
-@item 4217 (Currencies)
-@item 15924 (Scripts)
-@end enumerate
-It includes a copy from Debian’s pkg-isocodes and makes the data accessible
-through a Python API.")
+ @enumerate
+ @item 639-3 (Languages)
+ @item 3166 (Countries)
+ @item 3166-3 (Deleted Countries)
+ @item 3166-2 (Subdivisions of countries)
+ @item 4217 (Currencies)
+ @item 15924 (Scripts)
+ @end enumerate
+ It includes a copy from Debian’s pkg-isocodes and makes the data accessible
+ through a Python API.")
(license license:lgpl2.1+)))
(define-public python2-pycountry
@@ -17923,9 +17901,9 @@ through a Python API.")
(synopsis "Bindings to picosat (a SAT solver)")
(description
"This package provides efficient Python bindings to @code{picosat} on
-the C level. When importing pycosat, the @code{picosat} solver becomes part
-of the Python process itself. @code{picosat} is a @dfn{Boolean Satisfiability
-Problem} (SAT) solver.")
+ the C level. When importing pycosat, the @code{picosat} solver becomes part
+ of the Python process itself. @code{picosat} is a @dfn{Boolean Satisfiability
+ Problem} (SAT) solver.")
(license license:expat)))
(define-public python2-pycosat
@@ -17956,13 +17934,13 @@ Problem} (SAT) solver.")
(synopsis "Version of dict that keeps keys in insertion order")
(description
"This is an implementation of an ordered dictionary with @dfn{Key
-Insertion Order} (KIO: updates of values do not affect the position of the
-key), @dfn{Key Value Insertion Order} (KVIO, an existing key's position is
-removed and put at the back). The standard library module @code{OrderedDict},
-implemented later, implements a subset of @code{ordereddict} functionality.
-Sorted dictionaries are also provided. Currently only with @dfn{Key Sorted
-Order} (KSO, no sorting function can be specified, but a transform can be
-specified to apply on the key before comparison (e.g. @code{string.lower})).")
+ Insertion Order} (KIO: updates of values do not affect the position of the
+ key), @dfn{Key Value Insertion Order} (KVIO, an existing key's position is
+ removed and put at the back). The standard library module @code{OrderedDict},
+ implemented later, implements a subset of @code{ordereddict} functionality.
+ Sorted dictionaries are also provided. Currently only with @dfn{Key Sorted
+ Order} (KSO, no sorting function can be specified, but a transform can be
+ specified to apply on the key before comparison (e.g. @code{string.lower})).")
(license license:expat)))
(define-public python-pypeg2
@@ -17984,8 +17962,8 @@ specified to apply on the key before comparison (e.g. @code{string.lower})).")
(home-page "https://fdik.org/pyPEG/")
(synopsis "Parsing Expression Grammars in Python")
(description "PyPEG is an intrinsic parser interpreter framework for
-Python. It is based on Parsing Expression Grammars, PEG. With pyPEG you can
-parse many formal languages.")
+ Python. It is based on Parsing Expression Grammars, PEG. With pyPEG you can
+ parse many formal languages.")
(license license:gpl2)))
(define-public python-incremental
@@ -18003,7 +17981,7 @@ parse many formal languages.")
(home-page "https://github.com/hawkowl/incremental")
(synopsis "Library for versioning Python projects")
(description "Incremental is a small library that versions your Python
-projects.")
+ projects.")
(license license:expat)))
(define-public python2-incremental
@@ -18013,39 +17991,50 @@ projects.")
(package
(name "python-invoke")
(home-page "https://www.pyinvoke.org/")
- (version "1.5.0")
+ (version "1.6.0")
(source (origin
(method url-fetch)
(uri (pypi-uri "invoke" version))
(sha256
(base32
- "0l16v7zcbgi36z6pvmdrs5q4ks8lalcafi5d9nhrpcjzbc3n1igh"))))
+ "1lsql9daabfr31c7syva5myc5bka45k57ygs9fliv63qrwp1wk9p"))))
(build-system python-build-system)
(arguments
;; XXX: Requires many dependencies that are not yet in Guix.
`(#:tests? #f
#:phases
(modify-phases %standard-phases
+ (add-after 'unpack 'delete-python2-code
+ (lambda _
+ (delete-file-recursively "invoke/vendor/yaml2")))
(add-after 'unpack 'fix-bash-path
(lambda* (#:key inputs #:allow-other-keys)
(let ((bash (assoc-ref inputs "bash")))
(substitute* "invoke/config.py"
(("shell = \"/bin/bash\"")
- (string-append "shell = \"" bash "/bin/bash\""))
- )
- #t))))))
+ (string-append "shell = \"" bash "/bin/bash\"")))))))))
(inputs
`(("bash" ,bash-minimal)))
(synopsis "Pythonic task execution")
(description
"Invoke is a Python task execution tool and library, drawing inspiration
-from various sources to arrive at a powerful and clean feature set. It is
-evolved from the Fabric project, but focuses on local and abstract concerns
-instead of servers and network commands.")
+ from various sources to arrive at a powerful and clean feature set. It is
+ evolved from the Fabric project, but focuses on local and abstract concerns
+ instead of servers and network commands.")
(license license:bsd-3)))
(define-public python2-invoke
- (package-with-python2 python-invoke))
+ (let ((parent (package-with-python2 python-invoke)))
+ (package
+ (inherit parent)
+ (arguments
+ (substitute-keyword-arguments (package-arguments parent)
+ ((#:phases phases #t)
+ `(modify-phases ,phases
+ (delete 'delete-python2-code)
+ (add-after 'unpack 'delete-python3-code
+ (lambda _
+ (delete-file-recursively "invoke/vendor/yaml3"))))))))))
(define-public python-automat
(package
@@ -18062,7 +18051,15 @@ instead of servers and network commands.")
;; python-twisted depends on python-automat. Twisted is optional, but the
;; tests fail if it is not available. Also see
;; <https://github.com/glyph/automat/issues/71>.
- (arguments '(#:tests? #f))
+ (arguments
+ `(#:tests? #f
+ #:phases
+ (modify-phases %standard-phases
+ ;; Remove script, because it depends on python-twisted.
+ (add-after 'unpack 'remove-entrypoint
+ (lambda _
+ (substitute* "setup.py"
+ (("\"automat-visualize = automat._visualize:tool\"") "")))))))
(native-inputs
`(("python-m2r" ,python-m2r)
("python-setuptools-scm" ,python-setuptools-scm)
@@ -18073,8 +18070,8 @@ instead of servers and network commands.")
(home-page "https://github.com/glyph/Automat")
(synopsis "Self-service finite-state machines")
(description "Automat is a library for concise, idiomatic Python
-expression of finite-state automata (particularly deterministic finite-state
-transducers).")
+ expression of finite-state automata (particularly deterministic finite-state
+ transducers).")
(license license:expat)))
(define-public python2-automat
@@ -18100,7 +18097,7 @@ transducers).")
(home-page "https://github.com/miyakogi/m2r")
(synopsis "Markdown to reStructuredText converter")
(description "M2R converts a markdown file including reST markups to valid
-reST format.")
+ reST format.")
(license license:expat)))
(define-public python2-m2r
@@ -18120,8 +18117,8 @@ reST format.")
(home-page "https://github.com/twisted/constantly")
(synopsis "Symbolic constants in Python")
(description "Constantly is a Python library that provides symbolic
-constant support. It includes collections and constants with text, numeric,
-and bit flag values.")
+ constant support. It includes collections and constants with text, numeric,
+ and bit flag values.")
(license license:expat)))
(define-public python2-constantly
@@ -18139,38 +18136,22 @@ and bit flag values.")
"1yzmwi5d197p0qhl7rl4xi9q1w8mk9i3zn6hrl22knbcrb1slspg"))))
(build-system python-build-system)
(arguments
- `(#:modules ((guix build utils)
- (guix build python-build-system)
- (ice-9 ftw)
- (srfi srfi-1)
- (srfi srfi-26))
- #:phases
- (modify-phases %standard-phases
- (replace 'check
- (lambda* (#:key tests? #:allow-other-keys)
- (when tests?
- (let ((cwd (getcwd)))
- (setenv "PYTHONPATH"
- (string-append
- cwd "/build/"
- (find (cut string-prefix? "lib" <>)
- (scandir (string-append cwd "/build")))
- ":"
- (getenv "PYTHONPATH")))
- (invoke "python" "-m" "pytest"))))))))
+ `(#:phases (modify-phases %standard-phases
+ (replace 'check
+ (lambda* (#:key tests? #:allow-other-keys)
+ (when tests?
+ (invoke "pytest")))))))
(native-inputs
`(("python-coverage" ,python-coverage)
("python-hypothesis" ,python-hypothesis)
("python-pympler" ,python-pympler)
("python-pytest" ,python-pytest)
- ("python-six" ,python-six)
- ("python-sphinx" ,python-sphinx)
- ("python-zope-interface" ,python-zope-interface)))
+ ("python-six" ,python-six)))
(home-page "https://github.com/python-attrs/attrs/")
(synopsis "Attributes without boilerplate")
(description "@code{attrs} is a Python package with class decorators that
-ease the chores of implementing the most common attribute-related object
-protocols.")
+ ease the chores of implementing the most common attribute-related object
+ protocols.")
(license license:expat)))
(define-public python2-attrs
@@ -18180,13 +18161,6 @@ protocols.")
(package
(inherit python-attrs)
(name "python-attrs-bootstrap")
- (version "19.3.0")
- (source (origin
- (method url-fetch)
- (uri (pypi-uri "attrs" version))
- (sha256
- (base32
- "0wky4h28n7xnr6xv69p9z6kv8bzn50d10c3drmd9ds8gawbcxdzp"))))
(native-inputs `())
(arguments `(#:tests? #f))))
@@ -18219,8 +18193,8 @@ protocols.")
(home-page "https://liw.fi/cliapp/")
(synopsis "Python framework for command line programs")
(description "@code{cliapp} is a Python framework for command line
-programs. It contains the typical stuff such programs need to do, such
-as parsing the command line for options, and iterating over input files.")
+ programs. It contains the typical stuff such programs need to do, such
+ as parsing the command line for options, and iterating over input files.")
(license license:gpl2+)))
(define-public python2-cliapp
@@ -18255,11 +18229,11 @@ as parsing the command line for options, and iterating over input files.")
(lambda _ (invoke "make" "check"))))))
(home-page "https://liw.fi/ttystatus/")
(synopsis "Python library for showing progress reporting and
-status updates on terminals")
+ status updates on terminals")
(description "@code{ttystatus} is a Python library for showing progress
-reporting and status updates on terminals, for command line programs.
-Output is automatically adapted to the width of the terminal: truncated
-if it does not fit, and resized if the terminal size changes.")
+ reporting and status updates on terminals, for command line programs.
+ Output is automatically adapted to the width of the terminal: truncated
+ if it does not fit, and resized if the terminal size changes.")
(license license:gpl3+)))
(define-public python2-ttystatus
@@ -18284,51 +18258,45 @@ if it does not fit, and resized if the terminal size changes.")
(home-page "https://liw.fi/tracing/")
(synopsis "Python debug logging helper")
(description "@code{python2-tracing} is a python library for
-logging debug messages. It provides a way to turn debugging messages
-on and off, based on the filename they occur in. It is much faster
-than using @code{logging.Filter} to accomplish the same thing, which
-matters when code is run in production mode. The actual logging still
-happens using the @code{logging} library.")
+ logging debug messages. It provides a way to turn debugging messages
+ on and off, based on the filename they occur in. It is much faster
+ than using @code{logging.Filter} to accomplish the same thing, which
+ matters when code is run in production mode. The actual logging still
+ happens using the @code{logging} library.")
(license license:gpl3+)))
(define-public python-astroid
(package
(name "python-astroid")
- (version "2.4.2")
+ (version "2.6.6")
(source
(origin
- (method url-fetch)
- (uri (pypi-uri "astroid" version))
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/PyCQA/astroid")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
(sha256
- (base32 "00xp5gqxidxvgg1bwd91myqzdf2fpb9cjwbdl3p7gwqvlk17hh1g"))
- (modules '((guix build utils)))
- (snippet
- '(begin
- ;; Check to see if the version pinning has been removed.
- (substitute* "astroid/__pkginfo__.py"
- (("==1\\.4\\.\\*") ">=1.4.0"))
- #t))))
+ (base32 "1amzf996inwmh4r3mlpzmch60xs6lrg86vppfnwl1y0l8r0y7zxh"))))
(build-system python-build-system)
(propagated-inputs
`(("python-lazy-object-proxy" ,python-lazy-object-proxy)
- ("python-six" ,python-six)
("python-wrapt" ,python-wrapt)))
(native-inputs
- `(("python-dateutil" ,python-dateutil)
- ("python-pytest" ,python-pytest)
+ `(("python-pytest" ,python-pytest)
("python-pytest-runner" ,python-pytest-runner)))
(home-page "https://github.com/PyCQA/astroid")
(synopsis "Common base representation of python source code for pylint and
-other projects")
+ other projects")
(description "@code{python-astroid} provides a common base representation
-of python source code for projects such as pychecker, pyreverse, pylint, etc.
-
-It provides a compatible representation which comes from the _ast module. It
-rebuilds the tree generated by the builtin _ast module by recursively walking
-down the AST and building an extended ast. The new node classes have
-additional methods and attributes for different usages. They include some
-support for static inference and local name scopes. Furthermore, astroid
-builds partial trees by inspecting living objects.")
+ of python source code for projects such as pychecker, pyreverse, pylint, etc.
+
+ It provides a compatible representation which comes from the _ast module. It
+ rebuilds the tree generated by the builtin _ast module by recursively walking
+ down the AST and building an extended ast. The new node classes have
+ additional methods and attributes for different usages. They include some
+ support for static inference and local name scopes. Furthermore, astroid
+ builds partial trees by inspecting living objects.")
(license license:lgpl2.1+)
(properties `((python2-variant . ,(delay python2-astroid))))))
@@ -18346,26 +18314,27 @@ builds partial trees by inspecting living objects.")
(base32
"0fir4b67sm7shcacah9n61pvq313m523jb4q80sycrh3p8nmi6zw"))))
(arguments
- (substitute-keyword-arguments (package-arguments base)
- ((#:phases phases)
- `(modify-phases ,phases
- (add-after 'unpack 'remove-spurious-test
- (lambda _
- ;; https://github.com/PyCQA/astroid/issues/276
- (delete-file "astroid/tests/unittest_brain.py")
- #t))
- (replace 'check
- (lambda _
- (invoke"python" "-m" "unittest" "discover"
- "-p" "unittest*.py")))))))
+ `(#:python ,python-2
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'remove-spurious-test
+ (lambda _
+ ;; https://github.com/PyCQA/astroid/issues/276
+ (delete-file "astroid/tests/unittest_brain.py")))
+ (replace 'check
+ (lambda* (#:key tests? #:allow-other-keys)
+ (when tests?
+ (invoke "python" "-m" "unittest" "discover"
+ "-p" "unittest*.py")))))))
(native-inputs `())
(propagated-inputs
- `(("python2-backports-functools-lru-cache"
- ,python2-backports-functools-lru-cache)
- ("python2-enum34" ,python2-enum34)
- ("python2-singledispatch" ,python2-singledispatch)
- ,@(alist-delete "python-typed-ast"
- (package-propagated-inputs base)))))))
+ `(("python2-backports-functools-lru-cache"
+ ,python2-backports-functools-lru-cache)
+ ("python2-enum34" ,python2-enum34)
+ ("python2-lazy-object-proxy" ,python2-lazy-object-proxy)
+ ("python2-singledispatch" ,python2-singledispatch)
+ ("python2-six" ,python2-six)
+ ("python2-wrapt" ,python2-wrapt))))))
(define-public python-isbnlib
(package
@@ -18383,36 +18352,90 @@ builds partial trees by inspecting living objects.")
(home-page "https://github.com/xlcnd/isbnlib")
(synopsis "Python library to work with ISBN strings")
(description "@code{python-isbnlib} is a (pure) python library that provides
-several useful methods and functions to validate, clean, transform, hyphenate and
-get metadata for ISBN strings. Its origin was as the core of isbntools. This short
-version, is suitable to be include as a dependency in other projects.")
+ several useful methods and functions to validate, clean, transform, hyphenate and
+ get metadata for ISBN strings. Its origin was as the core of isbntools. This short
+ version, is suitable to be include as a dependency in other projects.")
(license license:lgpl3+)))
(define-public python-isort
(package
(name "python-isort")
- (version "4.3.4")
+ (version "5.7.0")
(source
(origin
(method git-fetch)
(uri (git-reference
- ;; Tests pass only from the Github sources
- (url "https://github.com/timothycrosley/isort")
- (commit version)))
+ ;; Tests pass only from the Github sources
+ (url "https://github.com/timothycrosley/isort")
+ (commit version)))
(file-name (git-file-name name version))
+ (modules '((guix build utils)))
+ (snippet '(for-each delete-file (find-files "." "\\.whl$")))
(sha256
(base32
- "1q0mlrpki5vjbgwxag5rghljjcfg7mvb0pbkwid80p0sqrxlm2p6"))))
+ "0phq4s911mjjdyr5h5siz93jnpkqb2qgphgcfk6axncgxr8i7vi1"))))
(build-system python-build-system)
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ ;; A foretaste of what our future python-build-system will need to
+ ;; do.
+ (replace 'build
+ (lambda _
+ (invoke "python" "-m" "build" "--wheel" "--no-isolation" ".")))
+ (replace 'install
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let ((out (assoc-ref outputs "out"))
+ (whl (car (find-files "dist" "\\.whl$"))))
+ (invoke "pip" "--no-cache-dir" "--no-input"
+ "install" "--no-deps" "--prefix" out whl))))
+ (add-after 'install 'install-example-plugins
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let ((out (assoc-ref outputs "out")))
+ ;; Patch to use the core poetry API.
+ (substitute* '("example_isort_formatting_plugin/pyproject.toml"
+ "example_shared_isort_profile/pyproject.toml")
+ (("poetry>=0.12")
+ "poetry-core>=1.0.0")
+ (("poetry.masonry.api")
+ "poetry.core.masonry.api"))
+ ;; Build the example plugins.
+ (for-each (lambda (source-directory)
+ (invoke "python" "-m" "build" "--wheel"
+ "--no-isolation" "--outdir=dist"
+ source-directory))
+ '("example_isort_formatting_plugin"
+ "example_shared_isort_profile"))
+ ;; Install them to temporary storage, for the test.
+ (setenv "HOME" (getcwd))
+ (let ((example-whls (find-files "dist" "^example.*\\.whl$")))
+ (apply invoke "pip" "--no-cache-dir" "--no-input"
+ "install" "--user" "--no-deps" example-whls)))))
+ (replace 'check
+ (lambda* (#:key tests? inputs outputs #:allow-other-keys)
+ (when tests?
+ (let ((bin (string-append (assoc-ref outputs "out") "/bin")))
+ (setenv "PATH" (string-append (getenv "PATH") ":" bin)))
+ (add-installed-pythonpath inputs outputs)
+ (invoke "pytest" "-vv" "tests/unit/"
+ "--ignore=tests/unit/test_deprecated_finders.py")))))))
(native-inputs
- `(("python-mock" ,python-mock)
+ `(("git" ,git-minimal)
+ ("python-black" ,python-black)
+ ("python-colorama" ,python-colorama)
+ ("python-hypothesmith" ,python-hypothesmith)
+ ("python-libcst" ,python-libcst-minimal)
+ ("python-poetry-core" ,python-poetry-core)
+ ("python-pylama" ,python-pylama)
+ ("python-pypa-build" ,python-pypa-build)
+ ("python-pytest-mock" ,python-pytest-mock)
("python-pytest" ,python-pytest)))
- (home-page "https://github.com/timothycrosley/isort")
+ (home-page "https://github.com/PyCQA/isort")
(synopsis "Python utility/library to sort python imports")
(description "@code{python-isort} is a python utility/library to sort
-imports alphabetically, and automatically separated into sections. It
-provides a command line utility, a python library and plugins for various
-editors.")
+ imports alphabetically, and automatically separated into sections. It
+ provides a command line utility, a python library and plugins for various
+ editors.")
(license license:expat)
(properties `((python2-variant . ,(delay python2-isort))))))
@@ -18444,7 +18467,7 @@ editors.")
(home-page "https://github.com/jaraco/backports.functools_lru_cache")
(synopsis "Backport of functools.lru_cache from Python 3.3")
(description "@code{python2-backports-functools-lru-cache} is a backport
-of @code{functools.lru_cache} from python 3.3.")
+ of @code{functools.lru_cache} from python 3.3.")
(license license:expat)))
(define-public python-configparser
@@ -18464,8 +18487,8 @@ of @code{functools.lru_cache} from python 3.3.")
(home-page "https://github.com/jaraco/configparser/")
(synopsis "Backport of configparser from python 3.5")
(description "@code{python-configparser} is a backport of
-@code{configparser} from Python 3.5 so that it can be used directly
-in other versions.")
+ @code{configparser} from Python 3.5 so that it can be used directly
+ in other versions.")
(license license:expat)))
(define-public python2-configparser
@@ -18486,14 +18509,14 @@ in other versions.")
(home-page "https://github.com/RonnyPfannschmidt/iniconfig")
(synopsis "Simple INI-file parser")
(description "The @code{iniconfig} package provides a small and simple
-INI-file parser module having a unique set of features; @code{iniconfig}
-@itemize
-@item maintains the order of sections and entries;
-@item supports multi-line values with or without line-continuations;
-@item supports \"#\" comments everywhere;
-@item raises errors with proper line-numbers;
-@item raises an error when two sections have the same name.
-@end itemize")
+ INI-file parser module having a unique set of features ; @code{iniconfig}
+ @itemize
+ @item maintains the order of sections and entries ;
+ @item supports multi-line values with or without line-continuations ;
+ @item supports \"#\" comments everywhere ;
+ @item raises errors with proper line-numbers ;
+ @item raises an error when two sections have the same name.
+ @end itemize")
(license license:expat)))
(define-public python-mamba
@@ -18515,7 +18538,7 @@ INI-file parser module having a unique set of features; @code{iniconfig}
(synopsis "Test runner for Python")
(description
"Mamba is a Behaviour-Driven Development tool for Python developers.
-Is heavily influenced from RSpec, Mocha, Jasmine or Ginkgo.")
+ Is heavily influenced from RSpec, Mocha, Jasmine or Ginkgo.")
(license license:expat)))
(define-public python-mando
@@ -18539,7 +18562,7 @@ Is heavily influenced from RSpec, Mocha, Jasmine or Ginkgo.")
"Wrapper around argparse, allowing creation of complete CLI applications")
(description
"This package is a wrapper around argparse, allowing you to write complete CLI
-applications in seconds while maintaining all the flexibility.")
+ applications in seconds while maintaining all the flexibility.")
(license license:expat)))
(define-public python2-mando
@@ -18563,7 +18586,7 @@ applications in seconds while maintaining all the flexibility.")
(synopsis "Python command-line parsing library")
(description
"This package is mostly for people who want to have @code{argparse} on
-older Pythons because it was not part of the standard library back then.")
+ older Pythons because it was not part of the standard library back then.")
(license license:psfl)))
(define-public python-mwclient
@@ -18622,7 +18645,7 @@ older Pythons because it was not part of the standard library back then.")
(synopsis "Convenient utilities not included with the standard Python install")
(description
"Python Utils is a collection of small Python functions and classes which
-make common patterns shorter and easier.")
+ make common patterns shorter and easier.")
(license license:bsd-2)))
(define-public python-diff-match-patch
@@ -18640,7 +18663,7 @@ make common patterns shorter and easier.")
(home-page "https://code.google.com/p/google-diff-match-patch")
(synopsis "Synchronize plain text")
(description "Diff Match and Patch libraries offer robust algorithms to
-perform the operations required for synchronizing plain text.")
+ perform the operations required for synchronizing plain text.")
(license license:asl2.0)))
(define-public python2-diff-match-patch
@@ -18684,13 +18707,13 @@ perform the operations required for synchronizing plain text.")
(synopsis "Fast computation of Levenshtein distance and string similarity")
(description
"The Levenshtein Python C extension module contains functions for fast computation of
-@enumerate
-@item Levenshtein (edit) distance, and edit operations
-@item string similarity
-@item approximate median strings, and generally string averaging
-@item string sequence and set similarity
-@end enumerate
-It supports both normal and Unicode strings.")
+ @enumerate
+ @item Levenshtein (edit) distance, and edit operations
+ @item string similarity
+ @item approximate median strings, and generally string averaging
+ @item string sequence and set similarity
+ @end enumerate
+ It supports both normal and Unicode strings.")
(license license:gpl2+)))
(define-public python2-levenshtein
@@ -18716,12 +18739,12 @@ It supports both normal and Unicode strings.")
(synopsis "Directory iteration function")
(description
"Directory iteration function like os.listdir(), except that instead of
-returning a list of bare filenames, it yields DirEntry objects that include
-file type and stat information along with the name. Using scandir() increases
-the speed of os.walk() by 2-20 times (depending on the platform and file
-system) by avoiding unnecessary calls to os.stat() in most cases.
+ returning a list of bare filenames, it yields DirEntry objects that include
+ file type and stat information along with the name. Using scandir() increases
+ the speed of os.walk() by 2-20 times (depending on the platform and file
+ system) by avoiding unnecessary calls to os.stat() in most cases.
-This package is part of the Python standard library since version 3.5.")
+ This package is part of the Python standard library since version 3.5.")
(license license:bsd-3)))
(define-public python2-scandir
@@ -18744,10 +18767,10 @@ This package is part of the Python standard library since version 3.5.")
(synopsis "Python implementations of various stemming algorithms")
(description
"Python implementations of the Porter, Porter2, Paice-Husk, and Lovins
-stemming algorithms for English. These implementations are straightforward and
-efficient, unlike some Python versions of the same algorithms available on the
-Web. This package is an extraction of the stemming code included in the Whoosh
-search engine.")
+ stemming algorithms for English. These implementations are straightforward and
+ efficient, unlike some Python versions of the same algorithms available on the
+ Web. This package is an extraction of the stemming code included in the Whoosh
+ search engine.")
(license license:public-domain)))
(define-public python-factory-boy
@@ -18771,17 +18794,14 @@ search engine.")
(description
"Factory_boy is a fixtures replacement based on thoughtbot’s factory_girl.
-As a fixtures replacement tool, it aims to replace static, hard to maintain
-fixtures with easy-to-use factories for complex object.
+ As a fixtures replacement tool, it aims to replace static, hard to maintain
+ fixtures with easy-to-use factories for complex object.
-Instead of building an exhaustive test setup with every possible combination
-of corner cases, factory_boy allows you to use objects customized for the
-current test, while only declaring the test-specific fields")
+ Instead of building an exhaustive test setup with every possible combination
+ of corner cases, factory_boy allows you to use objects customized for the
+ current test, while only declaring the test-specific fields")
(license license:expat)))
-(define-public python2-factory-boy
- (package-with-python2 python-factory-boy))
-
(define-public python-translate-toolkit
(package
(name "python-translate-toolkit")
@@ -18816,7 +18836,7 @@ current test, while only declaring the test-specific fields")
(synopsis "Tools and API for translation and localization engineering")
(description
"Tools and API for translation and localization engineering. It contains
-several utilities, as well as an API for building localization tools.")
+ several utilities, as well as an API for building localization tools.")
(license license:gpl2+)))
;; Required for virtaal, newer versions do not build with python2
@@ -18833,28 +18853,15 @@ several utilities, as well as an API for building localization tools.")
(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
(lambda* (#:key tests? #:allow-other-keys)
(if tests?
- (invoke "py.test" "-vv")
- (format #t "test suite not run~%"))
- #t)))))
+ (invoke "pytest" "-vv")
+ (format #t "test suite not run~%")))))))
(native-inputs
`(("python-pretend" ,python-pretend)
("python-pytest" ,python-pytest)))
@@ -18864,8 +18871,8 @@ several utilities, as well as an API for building localization tools.")
(home-page "https://github.com/pypa/packaging")
(synopsis "Core utilities for Python packages")
(description "Packaging is a Python module for dealing with Python packages.
-It offers an interface for working with package versions, names, and dependency
-information.")
+ It offers an interface for working with package versions, names, and dependency
+ information.")
;; From 'LICENSE': This software is made available under the terms of
;; *either* of the licenses found in LICENSE.APACHE or LICENSE.BSD.
;; Contributions to this software is made under the terms of *both* these
@@ -18875,29 +18882,6 @@ information.")
(define-public python2-packaging
(package-with-python2 python-packaging))
-;; Variants with minimal dependencies, for bootstrapping Pytest.
-(define-public python-packaging-bootstrap
- (hidden-package
- (package/inherit
- python-packaging
- (name "python-packaging-bootstrap")
- (native-inputs '())
- (propagated-inputs
- `(("python-pyparsing" ,python-pyparsing)))
- (arguments '(#:tests? #f)))))
-
-(define-public python2-packaging-bootstrap
- (hidden-package
- (package/inherit
- python2-packaging
- (name "python2-packaging-bootstrap")
- (native-inputs '())
- (propagated-inputs
- `(("python-pyparsing" ,python2-pyparsing)))
- (arguments
- `(#:tests? #f
- ,@(package-arguments python2-packaging))))))
-
(define-public python-relatorio
(package
(name "python-relatorio")
@@ -18918,13 +18902,10 @@ information.")
(home-page "https://relatorio.tryton.org/")
(synopsis "Templating library able to output ODT and PDF files")
(description "Relatorio is a templating library which provides a way to
-easily output ODT, ODS, PNG, SVG and several other kinds of files. Support
-for more filetypes can be easily added by creating plugins for them.")
+ easily output ODT, ODS, PNG, SVG and several other kinds of files. Support
+ for more filetypes can be easily added by creating plugins for them.")
(license license:gpl3+)))
-(define-public python2-relatorio
- (package-with-python2 python-relatorio))
-
(define-public python-radon
(package
(name "python-radon")
@@ -18939,6 +18920,13 @@ for more filetypes can be easily added by creating plugins for them.")
(build-system python-build-system)
(arguments
`(#:phases (modify-phases %standard-phases
+ (add-after 'unpack 'relax-requirements
+ (lambda _
+ (substitute* "setup.py"
+ ((".*'future'.*")
+ "")
+ (("colorama==0.4.1")
+ "colorama>=0.4.1"))))
(replace 'check
(lambda _
(invoke "python" "radon/tests/run.py"))))))
@@ -18952,13 +18940,13 @@ for more filetypes can be easily added by creating plugins for them.")
(home-page "https://radon.readthedocs.org/")
(synopsis "Code Metrics in Python")
(description "Radon is a Python tool which computes various code metrics.
-Supported metrics are:
-@itemize @bullet
-@item raw metrics: SLOC, comment lines, blank lines, &c.
-@item Cyclomatic Complexity (i.e. McCabe’s Complexity)
-@item Halstead metrics (all of them)
-@item the Maintainability Index (a Visual Studio metric)
-@end itemize")
+ Supported metrics are:
+ @itemize @bullet
+ @item raw metrics: SLOC, comment lines, blank lines, &c.
+ @item Cyclomatic Complexity (i.e. McCabe’s Complexity)
+ @item Halstead metrics (all of them)
+ @item the Maintainability Index (a Visual Studio metric)
+ @end itemize")
(properties `((python2-variant . ,(delay python2-radon))))
(license license:expat)))
@@ -18991,7 +18979,7 @@ Supported metrics are:
(synopsis "Automated testing library in python for python")
(description
"Sure is a python library that leverages a DSL for writing assertions.
-Sure is heavily inspired by @code{RSpec Expectations} and @code{should.js}.")
+ Sure is heavily inspired by @code{RSpec Expectations} and @code{should.js}.")
(license license:gpl3+)))
(define-public python2-sure
@@ -19018,7 +19006,7 @@ Sure is heavily inspired by @code{RSpec Expectations} and @code{should.js}.")
"ANSI terminal tool for python, colored shell and other handy fancy features")
(description
"@code{Couleur} provides python programs a way to use the ANSI features in a unix
-terminal such as coloured output in the shell, overwriting output, indentation, etc.")
+ terminal such as coloured output in the shell, overwriting output, indentation, etc.")
;; README.md says ASL2.0, but all source code headers are LGPL3+.
;; https://github.com/gabrielfalcao/couleur/issues/11
(license license:lgpl3+)))
@@ -19048,8 +19036,8 @@ terminal such as coloured output in the shell, overwriting output, indentation,
(synopsis "Python binding for Hoedown")
(description
"@code{Misaka} is a CFFI-based binding for @code{Hoedown}, a fast markdown processing
-library written in C. It features a fast HTML renderer and functionality to make custom
-renderers (e.g. man pages or LaTeX).")
+ library written in C. It features a fast HTML renderer and functionality to make custom
+ renderers (e.g. man pages or LaTeX).")
(license license:expat)))
(define-public python2-misaka
@@ -19089,9 +19077,9 @@ renderers (e.g. man pages or LaTeX).")
(synopsis "Markdown-based test runner for python")
(description
"@code{Steadymark} allows documentation to be written in github-flavoured
-markdown. The documentation may contain snippets of code surrounded by python
-code blocks and @code{Steadymark} will find these snippets and run them, making
-sure that there are no old malfunctional examples in the documentation examples.")
+ markdown. The documentation may contain snippets of code surrounded by python
+ code blocks and @code{Steadymark} will find these snippets and run them, making
+ sure that there are no old malfunctional examples in the documentation examples.")
(license license:expat)))
(define-public python-jsonpointer
@@ -19109,7 +19097,7 @@ sure that there are no old malfunctional examples in the documentation examples.
(home-page "https://github.com/stefankoegl/python-json-pointer")
(synopsis "Identify specific nodes in a JSON document")
(description "@code{jsonpointer} allows you to access specific nodes
-by path in a JSON document (see RFC 6901).")
+ by path in a JSON document (see RFC 6901).")
(license license:bsd-3)))
(define-public python2-jsonpointer
@@ -19136,7 +19124,7 @@ by path in a JSON document (see RFC 6901).")
(home-page "https://github.com/stefankoegl/python-json-patch")
(synopsis "Applying JSON Patches in Python 2.6+ and 3.x")
(description "@code{jsonpatch} is a library and program that allows
-applying JSON Patches according to RFC 6902.")
+ applying JSON Patches according to RFC 6902.")
(license license:bsd-3)))
(define-public python2-jsonpatch
@@ -19172,31 +19160,19 @@ applying JSON Patches according to RFC 6902.")
"17dvx15m3r49bmif5zlli8kzjd6bys6psixzbp14sd5367d9h8qi"))))
(build-system python-build-system)
(arguments
- `(#:modules ((guix build utils)
- (guix build python-build-system)
- (ice-9 ftw)
- (srfi srfi-1)
- (srfi srfi-26))
- #:phases
+ `(#:phases
(modify-phases %standard-phases
(replace 'check
(lambda _
- (let ((cwd (getcwd)))
- (setenv "PYTHONPATH"
- (string-append cwd "/build/"
- (find (cut string-prefix? "lib" <>)
- (scandir (string-append cwd "/build")))
- ":"
- (getenv "PYTHONPATH")))
- (invoke "pytest" "-v")))))))
+ (invoke "pytest" "-v"))))))
(native-inputs
`(("python-pytest" ,python-pytest)))
(home-page "https://rfc3986.readthedocs.io/")
(synopsis "Parse and validate URI references")
(description
"@code{rfc3986} is a Python implementation of RFC@tie{}3986 including
-validation and authority parsing. This module also supports RFC@tie{}6874
-which adds support for zone identifiers to IPv6 addresses.")
+ validation and authority parsing. This module also supports RFC@tie{}6874
+ which adds support for zone identifiers to IPv6 addresses.")
(license license:asl2.0)))
(define-public python2-rfc3986
@@ -19217,7 +19193,7 @@ which adds support for zone identifiers to IPv6 addresses.")
(home-page "https://pypi.org/project/rfc3987/")
(synopsis "Parsing and validation of URIs (RFC 3986) and IRIs (RFC 3987)")
(description "@code{rfc3987} provides routines for parsing and
-validation of URIs (see RFC 3986) and IRIs (see RFC 3987).")
+ validation of URIs (see RFC 3986) and IRIs (see RFC 3987).")
(license license:gpl3+)))
(define-public python2-rfc3987
@@ -19255,8 +19231,8 @@ validation of URIs (see RFC 3986) and IRIs (see RFC 3987).")
(synopsis "Python implementation of RFC 6555")
(description
"Python implementation of the Happy Eyeballs Algorithm described in RFC
-6555. Provided with a single file and dead-simple API to allow easy vendoring
-and integration into other projects.")
+ 6555. Provided with a single file and dead-simple API to allow easy vendoring
+ and integration into other projects.")
(license license:asl2.0))))
(define-public python-bagit
@@ -19278,8 +19254,8 @@ and integration into other projects.")
(home-page "https://libraryofcongress.github.io/bagit-python/")
(synopsis "Create and validate BagIt packages")
(description "Bagit is a Python library and command line utility for working
-with BagIt style packages. BagIt is a minimalist packaging format for digital
-preservation.")
+ with BagIt style packages. BagIt is a minimalist packaging format for digital
+ preservation.")
(license license:cc0)))
(define-public python-prov
@@ -19307,7 +19283,7 @@ preservation.")
"W3C Provenance Data Model supporting PROV-JSON, PROV-XML and PROV-O (RDF)")
(description
"This package provides a library for W3C Provenance Data Model supporting
-PROV-O (RDF), PROV-XML, PROV-JSON import/export.")
+ PROV-O (RDF), PROV-XML, PROV-JSON import/export.")
(license license:expat)))
(define-public python-arcp
@@ -19329,17 +19305,17 @@ PROV-O (RDF), PROV-XML, PROV-JSON import/export.")
"Archive and Package URI parser and generator")
(description
"@acronym{arcp, Archive and Package} provides functions for creating
-@code{arcp_} URIs, which can be used for identifying or parsing hypermedia files
-packaged in an archive or package, like a ZIP file. arcp URIs can be used to
-consume or reference hypermedia resources bundled inside a file archive or an
-application package, as well as to resolve URIs for archive resources within a
-programmatic framework. This URI scheme provides mechanisms to generate a
-unique base URI to represent the root of the archive, so that relative URI
-references in a bundled resource can be resolved within the archive without
-having to extract the archive content on the local file system. An arcp URI can
-be used for purposes of isolation (e.g. when consuming multiple archives),
-security constraints (avoiding \"climb out\" from the archive), or for
-externally identiyfing sub-resources referenced by hypermedia formats.")
+ @code{arcp_} URIs, which can be used for identifying or parsing hypermedia files
+ packaged in an archive or package, like a ZIP file. arcp URIs can be used to
+ consume or reference hypermedia resources bundled inside a file archive or an
+ application package, as well as to resolve URIs for archive resources within a
+ programmatic framework. This URI scheme provides mechanisms to generate a
+ unique base URI to represent the root of the archive, so that relative URI
+ references in a bundled resource can be resolved within the archive without
+ having to extract the archive content on the local file system. An arcp URI can
+ be used for purposes of isolation (e.g. when consuming multiple archives),
+ security constraints (avoiding \"climb out\" from the archive), or for
+ externally identiyfing sub-resources referenced by hypermedia formats.")
(license license:asl2.0)))
(define-public python-shellescape
@@ -19373,9 +19349,9 @@ externally identiyfing sub-resources referenced by hypermedia formats.")
"Shell escape a string to safely use it as a token in a shell command")
(description
"The shellescape Python module defines the @code{shellescape.quote()}
-function that returns a shell-escaped version of a Python string. This is a
-backport of the @code{shlex.quote()} function from Python 3.8 that makes it
-accessible to users of Python 3 versions < 3.3 and all Python 2.x versions.")
+ function that returns a shell-escaped version of a Python string. This is a
+ backport of the @code{shlex.quote()} function from Python 3.8 that makes it
+ accessible to users of Python 3 versions < 3.3 and all Python 2.x versions.")
(license license:expat)))
(define-public python-validators
@@ -19405,14 +19381,11 @@ accessible to users of Python 3 versions < 3.3 and all Python 2.x versions.")
(synopsis "Data validation library")
(description
"This package contains validators for different things such as email
-addresses, IP addresses, URLs, hashes and more. It has been designed to
-be easy to use and not require defining a schema or form just to validate
-some input.")
+ addresses, IP addresses, URLs, hashes and more. It has been designed to
+ be easy to use and not require defining a schema or form just to validate
+ some input.")
(license license:expat)))
-(define-public python2-validators
- (package-with-python2 python-validators))
-
(define-public python-validate-email
(package
(name "python-validate-email")
@@ -19428,7 +19401,7 @@ some input.")
(home-page "https://github.com/syrusakbary/validate_email")
(synopsis "Verifies if an email address is valid and really exists")
(description "@code{validate_email} can be used to verify if an email
-address is valid and really exists.")
+ address is valid and really exists.")
(license license:lgpl3+)))
(define-public python2-validate-email
@@ -19483,9 +19456,9 @@ address is valid and really exists.")
("python-pytz" ,python-pytz)))
(home-page "https://github.com/marshmallow-code/marshmallow")
(synopsis "Convert complex datatypes to and from native
-Python datatypes")
+ Python datatypes")
(description "@code{marshmallow} provides a library for converting
-complex datatypes to and from native Python datatypes.")
+ complex datatypes to and from native Python datatypes.")
(license license:expat)))
(define-public python-marshmallow-3.2
@@ -19525,8 +19498,8 @@ complex datatypes to and from native Python datatypes.")
(synopsis "JSON:API 1.0 formatting with Marshmallow")
(description
"The marshmallow-jsonapi package provides a simple way to produce
-@uref{https://jsonapi.org, JSON:API}-compliant data in any Python Web framework.
-It includes optional utilities to integrate with Flask.")
+ @uref{https://jsonapi.org, JSON:API}-compliant data in any Python Web framework.
+ It includes optional utilities to integrate with Flask.")
(license license:expat)))
(define-public python-apispec
@@ -19543,19 +19516,13 @@ It includes optional utilities to integrate with Flask.")
(build-system python-build-system)
(arguments
'(#:phases (modify-phases %standard-phases
- (add-after 'unpack 'disable-prance-tests
- (lambda _
- ;; Disable validation tests since they require the
- ;; optional 'prance' library which is not yet in Guix.
- (substitute* "tests/test_ext_marshmallow_openapi.py"
- (("def test_openapi_tools_validate.*" all)
- (string-append "@pytest.mark.xfail\n" all)))))
(replace 'check
(lambda _
- (setenv "PYTHONPATH"
- (string-append "./build/lib:"
- (getenv "PYTHONPATH")))
- (invoke "pytest" "-vv"))))))
+ (invoke "pytest" "-vv"
+ ;; Disable validation tests since they require
+ ;; the optional 'prance' library which is not
+ ;; yet in Guix.
+ "-k" "not openapi_tools_validate"))))))
(propagated-inputs
`(("python-pyyaml" ,python-pyyaml)))
(native-inputs
@@ -19564,8 +19531,8 @@ It includes optional utilities to integrate with Flask.")
(home-page "https://github.com/marshmallow-code/apispec")
(synopsis "Swagger/OpenAPI specification generator")
(description "@code{python-apispec} is a pluggable API specification
-generator. It currently supports the OpenAPI specification, formerly known
-as Swagger.")
+ generator. It currently supports the OpenAPI specification, formerly known
+ as Swagger.")
(license license:expat)))
(define-public python-flasgger
@@ -19590,9 +19557,6 @@ as Swagger.")
(substitute* "Makefile"
(("flake8 flasgger --ignore=F403")
"flake8 flasgger --ignore=E731,F403"))
- (setenv "PYTHONPATH" (string-append (getcwd)
- ":"
- (getenv "PYTHONPATH")))
(invoke "py.test"))))))
(propagated-inputs
`(("python-flask" ,python-flask)
@@ -19612,7 +19576,7 @@ as Swagger.")
(home-page "https://github.com/rochacbruno/flasgger/")
(synopsis "Extract Swagger specs from your Flask project")
(description "@code{python-flasgger} allows extracting Swagger specs
-from your Flask project. It is a fork of Flask-Swagger.")
+ from your Flask project. It is a fork of Flask-Swagger.")
(license license:expat)))
(define-public python-swagger-spec-validator
@@ -19635,7 +19599,7 @@ from your Flask project. It is a fork of Flask-Swagger.")
"https://github.com/Yelp/swagger_spec_validator")
(synopsis "Validation of Swagger specifications")
(description "@code{swagger_spec_validator} provides a library for
-validating Swagger API specifications.")
+ validating Swagger API specifications.")
(license license:asl2.0)))
(define-public python-apache-libcloud
@@ -19664,7 +19628,7 @@ validating Swagger API specifications.")
(substitute* "libcloud/test/compute/test_ssh_client.py"
(("class ShellOutSSHClientTests")
"@unittest.skip(\"Guix container doesn't have ssh service\")
-class ShellOutSSHClientTests"))
+ class ShellOutSSHClientTests"))
#t))
(add-before 'check 'copy-secret
(lambda _
@@ -19685,7 +19649,7 @@ class ShellOutSSHClientTests"))
(home-page "https://libcloud.apache.org/")
(synopsis "Unified Cloud API")
(description "@code{libcloud} is a Python library for interacting with
-many of the popular cloud service providers using a unified API.")
+ many of the popular cloud service providers using a unified API.")
(license license:asl2.0)))
(define-public python-smmap
@@ -19704,7 +19668,7 @@ many of the popular cloud service providers using a unified API.")
(home-page "https://github.com/Byron/smmap")
(synopsis "Python sliding window memory map manager")
(description "@code{smmap} is a pure Python implementation of a sliding
-window memory map manager.")
+ window memory map manager.")
(license license:bsd-3)))
(define-public python2-smmap
@@ -19728,13 +19692,13 @@ window memory map manager.")
(lambda* (#:key inputs outputs #:allow-other-keys)
(add-installed-pythonpath inputs outputs)
(invoke "python" "-c"
- "from regex.test_regex import test_main; test_main()"))))))
- (home-page "https://bitbucket.org/mrabarnett/mrab-regex")
- (synopsis "Alternative regular expression module")
- (description "This regular expression implementation is backwards-
+ "from regex.test_regex import test_main ; test_main()"))))))
+ (home-page "https://bitbucket.org/mrabarnett/mrab-regex")
+ (synopsis "Alternative regular expression module")
+ (description "This regular expression implementation is backwards-
compatible with the standard @code{re} module, but offers additional
functionality like full case-folding for case-insensitive matches in Unicode.")
- (license license:psfl)))
+ (license license:psfl)))
(define-public python2-regex
(package-with-python2 python-regex))
@@ -19970,25 +19934,26 @@ ignoring formatting changes.")
(define-public python-tqdm
(package
(name "python-tqdm")
- (version "4.43.0")
+ (version "4.60.0")
(source
(origin
(method url-fetch)
(uri (pypi-uri "tqdm" version))
(sha256
(base32
- "093v4c2x5hpigv47zvyxl8wh10y2yd2gvz3l9vchn0zsp8hv2pzk"))))
+ "1bjpy4mjg6ryp0ijvqi77vgs76l5hh3zrv3x4vmcwxrlbswvvppb"))))
(build-system python-build-system)
(arguments
'(#:phases (modify-phases %standard-phases
(replace 'check
- (lambda* (#:key inputs outputs #:allow-other-keys)
- (add-installed-pythonpath inputs outputs)
- ;; This invokation is taken from tox.ini.
- (invoke "nosetests" "--ignore-files=\"test_perf.py\""
- "-d" "-v" "tqdm/"))))))
+ (lambda _
+ (invoke "pytest" "-vv" "-k" "not perf"))))))
(native-inputs
- `(("python-nose" ,python-nose)))
+ `(("python-pytest" ,python-pytest)
+ ("python-pytest-asyncio" ,python-pytest-asyncio)
+ ("python-pytest-timeout" ,python-pytest-timeout)
+ ("python-setuptools-scm" ,python-setuptools-scm)
+ ("python-toml" ,python-toml)))
(home-page "https://github.com/tqdm/tqdm")
(synopsis "Fast, extensible progress meter")
(description
@@ -20112,7 +20077,8 @@ lines are read from a single file.")
(native-inputs
`(("python-pbr" ,python-pbr-minimal)))
(propagated-inputs
- `(("python-linecache2" ,python-linecache2)))
+ `(("python-linecache2" ,python-linecache2)
+ ("python-six" ,python-six)))
(home-page
"https://github.com/testing-cabal/traceback2")
(synopsis "Backports of the traceback module")
@@ -20699,9 +20665,8 @@ user's @file{~/Trash} directory.")
`(modify-phases ,phases
(add-before 'check 'setenv
(lambda _
- (setenv "PYTHONPATH"
- (string-append (getcwd) ":" (getenv "PYTHONPATH")))
- #t)))))))))
+ (setenv "GUIX_PYTHONPATH"
+ (string-append (getcwd) ":" (getenv "GUIX_PYTHONPATH"))))))))))))
(define-public python-pyfavicon
(package
@@ -21052,7 +21017,7 @@ source bytes using the UTF-8 encoding and then rewrites Python 3.6 style
(define-public python-typed-ast
(package
(name "python-typed-ast")
- (version "1.4.0")
+ (version "1.4.2")
(source
(origin
(method git-fetch)
@@ -21060,28 +21025,15 @@ source bytes using the UTF-8 encoding and then rewrites Python 3.6 style
(url "https://github.com/python/typed_ast")
(commit version)))
(sha256
- (base32 "0l0hz809f7i356kmqkvfsaswiidb98j9hs9rrjnfawzqcbffzgyb"))
+ (base32 "1wr6pkvvrq6rzjjw88pd5xy8fy06msam4hlxbkglvdmwh4c083l0"))
(file-name (git-file-name name version))))
(build-system python-build-system)
(arguments
- `(#:modules ((guix build utils)
- (guix build python-build-system)
- (ice-9 ftw)
- (srfi srfi-1)
- (srfi srfi-26))
- #:phases
+ `(#:phases
(modify-phases %standard-phases
(replace 'check
(lambda _
- (let ((cwd (getcwd)))
- (setenv "PYTHONPATH"
- (string-append cwd "/build/"
- (find (cut string-prefix? "lib" <>)
- (scandir (string-append cwd "/build")))
- ":"
- (getenv "PYTHONPATH"))))
- (invoke "pytest")
- #t)))))
+ (invoke "pytest"))))))
(native-inputs `(("python-pytest" ,python-pytest)))
(home-page "https://github.com/python/typed_ast")
(synopsis "Fork of Python @code{ast} modules with type comment support")
@@ -21112,30 +21064,31 @@ based on the CPython 2.7 and 3.7 parsers.")
(arguments
`(#:phases
(modify-phases %standard-phases
- (add-before 'check 'disable-failing-tests
+ ;; Unfortunately, this doesn't seem to be enough to fix these two
+ ;; tests, but we'll patch this anyway.
+ (add-after 'unpack 'patch-shell-reference
(lambda _
(substitute* "tests/test_completion/test_completion.py"
- (("def test_show_completion")
- "def _test_show_completion")
- (("def test_install_completion")
- "def _test_install_completion"))
- (substitute* "tests/test_completion/test_completion_install.py"
- (("def test_completion_install_bash")
- "def _test_completion_install_bash")
- (("def test_completion_install_zsh")
- "def _test_completion_install_zsh")
- (("def test_completion_install_fish")
- "def _test_completion_install_fish")
- (("def test_completion_install_powershell")
- "def _test_completion_install_powershell"))
- #t))
+ (("\"bash\"") (string-append "\"" (which "bash") "\""))
+ (("\"/bin/bash\"") (string-append "\"" (which "bash") "\"")))))
(replace 'check
- (lambda _
- (setenv "PYTHONPATH"
- (string-append (getcwd) ":"
- (getenv "PYTHONPATH")))
- (invoke "python" "-m" "pytest" "tests/")
- #t)))))
+ (lambda* (#:key tests? #:allow-other-keys)
+ (when tests?
+ (setenv "HOME" "/tmp") ; some tests need it
+
+ ;; This is for completion tests
+ (with-output-to-file "/tmp/.bashrc" (lambda _ (display "# dummy")))
+
+ (setenv "GUIX_PYTHONPATH"
+ (string-append (getcwd) ":"
+ (getenv "GUIX_PYTHONPATH")))
+ (let ((disabled-tests (list "test_show_completion"
+ "test_install_completion")))
+ (invoke "python" "-m" "pytest" "tests/"
+ "-k"
+ (string-append "not "
+ (string-join disabled-tests
+ " and not "))))))))))
(propagated-inputs
`(("python-click" ,python-click)))
(native-inputs
@@ -21215,13 +21168,13 @@ Included are implementations of:
(define-public bpython
(package
(name "bpython")
- (version "0.20.1")
+ (version "0.21")
(source
(origin
(method url-fetch)
(uri (pypi-uri "bpython" version))
(sha256
- (base32 "00vmkkc79mlnkyvwww1cr7bpwmf4p61704dhayz6kd0kc203hxvf"))))
+ (base32 "11wlf12nm6ggn9512y4yqs26s8gdgpx0h9ls94k7fsjgjy4rpal8"))))
(build-system python-build-system)
(arguments
`(#:phases
@@ -21247,14 +21200,17 @@ Included are implementations of:
("python-curtsies" ,python-curtsies)
("python-greenlet" ,python-greenlet)
("python-six" ,python-six)
- ("python-wcwidth" ,python-wcwidth)
+ ("python-cwcwidth" ,python-cwcwidth)
+ ("python-pyxdg" ,python-pyxdg)
;; optional dependencies
("python-urwid" ,python-urwid) ; for bpython-urwid only
("python-watchdog" ,python-watchdog)
("python-jedi" ,python-jedi)))
(native-inputs
`(("python-sphinx" ,python-sphinx)
- ("python-mock" ,python-mock)))
+ ("python-mock" ,python-mock)
+ ("python-tox" ,python-tox)
+ ("python-wheel" ,python-wheel)))
(home-page "https://bpython-interpreter.org/")
(synopsis "Fancy interface to the Python interpreter")
(description "Bpython is a fancy interface to the Python
@@ -21744,6 +21700,25 @@ interface to FUSE on various operating systems. It's just one file and is
implemented using @code{ctypes}.")
(license license:isc)))
+(define-public python-update-checker
+ (package
+ (name "python-update-checker")
+ (version "0.18.0")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "update-checker" version))
+ (sha256
+ (base32 "04yb5a9mi45ax50m2m0ih6gdvkk1j7gfmy83dd58i1f59axlabba"))))
+ (build-system python-build-system)
+ (propagated-inputs (list python-requests))
+ (native-inputs (list python-black python-flake8 python-pytest))
+ (home-page "https://github.com/bboe/update_checker")
+ (synopsis "Python module that will check for package updates")
+ (description "This package provides a Python module that will check for
+package updates.")
+ (license license:bsd-2)))
+
(define-public python-userspacefs
(package
(name "python-userspacefs")
@@ -21787,8 +21762,7 @@ user-space file systems in Python.")
(("pytest < 5") "pytest < 7"))
;; We don't care about a coverage report.
(substitute* "test/requirements.txt"
- (("coverage.*") "coverage\n"))
- #t))
+ (("coverage.*") "coverage\n"))))
(replace 'check
(lambda* (#:key tests? #:allow-other-keys)
(when tests?
@@ -21796,11 +21770,7 @@ user-space file systems in Python.")
(delete-file "test/test_js_client.py")
(delete-file "test/test_tsd_types.py")
(delete-file "test/test_python_gen.py")
- (setenv "PYTHONPATH"
- (string-append (getcwd) ":"
- (getenv "PYTHONPATH")))
- (invoke "pytest"))
- #t)))))
+ (invoke "pytest")))))))
(propagated-inputs
`(("python-ply" ,python-ply)
("python-six" ,python-six)))
@@ -21963,9 +21933,12 @@ library to allow local file system access via @code{file://} URLs.")
(arguments
`(#:phases
(modify-phases %standard-phases
+ ;; system-error "utime" "~A" ("No such file or directory")
+ (delete 'ensure-no-mtimes-pre-1980)
(replace 'check
- (lambda _
- (invoke "pytest" "-vv"))))))
+ (lambda* (#:key tests? #:allow-other-keys)
+ (when tests?
+ (invoke "pytest" "-vv")))))))
(native-inputs
`(("python-coverage" ,python-coverage)
("python-pytest" ,python-pytest)))
@@ -22199,14 +22172,14 @@ validation testing and application logic.")
(define-public python-numba
(package
(name "python-numba")
- (version "0.51.2")
+ (version "0.54.1")
(source
(origin
(method url-fetch)
(uri (pypi-uri "numba" version))
(sha256
(base32
- "0s0777m8kq4l96i88zj78np7283v1n4878qfc1gvzb8l45bmkg8n"))))
+ "0gzl2hz9azav9mny4mga19096rrnpw5816r1h4iwrvb4r01wipzr"))))
(build-system python-build-system)
(arguments
`(#:phases
@@ -22214,17 +22187,23 @@ validation testing and application logic.")
(add-after 'unpack 'disable-proprietary-features
(lambda _
(setenv "NUMBA_DISABLE_HSA" "1")
- (setenv "NUMBA_DISABLE_CUDA" "1")
- #t))
+ (setenv "NUMBA_DISABLE_CUDA" "1")))
+ (add-after 'unpack 'disable-failing-tests
+ (lambda _
+ ;; This one test fails because a deprecation warning is printed.
+ (substitute* "numba/tests/test_import.py"
+ (("def test_no_accidental_warnings")
+ "def disabled_test_no_accidental_warnings"))))
(replace 'check
- (lambda* (#:key inputs outputs #:allow-other-keys)
- (add-installed-pythonpath inputs outputs)
- ;; Something is wrong with the PYTHONPATH when running the
- ;; tests from the build directory, as it complains about not being
- ;; able to import certain modules.
- (with-directory-excursion "/tmp"
- (setenv "HOME" (getcwd))
- (invoke "python3" "-m" "numba.runtests" "-v" "-m")))))))
+ (lambda* (#:key tests? inputs outputs #:allow-other-keys)
+ (when tests?
+ (add-installed-pythonpath inputs outputs)
+ ;; Something is wrong with the PYTHONPATH when running the
+ ;; tests from the build directory, as it complains about not being
+ ;; able to import certain modules.
+ (with-directory-excursion "/tmp"
+ (setenv "HOME" (getcwd))
+ (invoke "python3" "-m" "numba.runtests" "-v" "-m"))))))))
(propagated-inputs
`(("python-llvmlite" ,python-llvmlite)
("python-numpy" ,python-numpy)
@@ -22542,14 +22521,17 @@ functions, and dictionaries.")
(define-public python-cytoolz
(package
(name "python-cytoolz")
- (version "0.9.0.1")
+ (version "0.11.2")
(source
(origin
(method url-fetch)
(uri (pypi-uri "cytoolz" version))
(sha256
(base32
- "1r80p88hm3f3r4zpixzr047y5hw4bzy41m4xywnhycda83x0dk44"))))
+ "1d12mgaippxxhn24w2hj0my3aqkx80fks5g4wzfdsvl0acqnc8za"))
+ (modules '((guix build utils)))
+ (snippet
+ '(for-each delete-file (find-files "cytoolz" "\\.c$")))))
(build-system python-build-system)
;; FIXME: tests fail with "module 'cytoolz.curried' has no attribute
;; 'exceptions'"
@@ -22566,6 +22548,22 @@ main differences are that @code{cytoolz} is faster and cytoolz offers a C API
that is accessible to other projects developed in Cython.")
(license license:bsd-3)))
+;; python-cooler doesn't work with 0.11 yet
+(define-public python-cytoolz-for-cooler
+ (package
+ (inherit python-cytoolz)
+ (version "0.10.1")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "cytoolz" version))
+ (sha256
+ (base32
+ "0p4a9nadsy1337gy2cnb5yanbn03j3zm6d9adyqad9bk3nlbpxc2"))
+ (modules '((guix build utils)))
+ (snippet
+ '(for-each delete-file (find-files "cytoolz" "\\.c$")))))))
+
(define-public python-sortedcollections
(package
(name "python-sortedcollections")
@@ -22656,13 +22654,6 @@ data.")
(arguments
'(#:phases
(modify-phases %standard-phases
- (add-before 'check 'do-not-override-PYTHONPATH
- (lambda _
- ;; Append to PYTHONPATH instead of overriding it so
- ;; that dependencies from Guix can be found.
- (substitute* "tests/testutils.py"
- (("env\\['PYTHONPATH'\\] = pythonpath")
- "env['PYTHONPATH'] += os.pathsep + pythonpath"))))
(replace 'check
(lambda* (#:key tests? #:allow-other-keys)
(if tests?
@@ -22812,26 +22803,23 @@ decisions with any given backend.")
(define-public python-dask
(package
(name "python-dask")
- (version "2021.9.1")
+ (version "2021.11.2")
(source
(origin
- (method url-fetch)
- (uri (pypi-uri "dask" version))
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/dask/dask/")
+ (commit "5a8275dd53193b47457cdfadc0e2356ea3eb6ccd")))
+ (file-name (git-file-name name version))
(sha256
- (base32 "0p6nd8wi30l29g5hdwk0453w6fxg4zvxq1y1ix0fa2f8rbr2n7z1"))))
+ (base32 "0h8w7c03mn6s2mmwbqd2sqay3k4vaqiwlsbvliziggw28042zfw2"))))
(build-system python-build-system)
(arguments
`(#:phases
(modify-phases %standard-phases
- (add-after 'unpack 'disable-broken-tests
- (lambda _
- ;; This test is marked as xfail when pytest-xdist is used.
- (substitute* "dask/tests/test_threaded.py"
- (("def test_interrupt\\(\\)" m)
- (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
- m)))))
(replace 'check
- (lambda _ (invoke "pytest" "-vv"))))))
+ (lambda* (#:key tests? #:allow-other-keys)
+ (when tests? (invoke "pytest" "-vv")))))))
(propagated-inputs
`(("python-cloudpickle" ,python-cloudpickle)
("python-fsspec" ,python-fsspec)
@@ -22843,7 +22831,8 @@ decisions with any given backend.")
("python-pyyaml" ,python-pyyaml)))
(native-inputs
`(("python-pytest" ,python-pytest)
- ("python-pytest-runner" ,python-pytest-runner)))
+ ("python-pytest-runner" ,python-pytest-runner)
+ ("python-pytest-rerunfailures" ,python-pytest-rerunfailures)))
(home-page "https://github.com/dask/dask/")
(synopsis "Parallel computing with task scheduling")
(description
@@ -23085,13 +23074,13 @@ distribution.")
(define-public python-gast
(package
(name "python-gast")
- (version "0.3.3")
+ (version "0.5.2")
(source
(origin
(method url-fetch)
(uri (pypi-uri "gast" version))
(sha256
- (base32 "0mrvvfzqafj1wzd0xxfmjf4vphnlxypbhpic1m283aj9i8lfz0dq"))))
+ (base32 "1xv77kzghiqfm4fnvlv0p878ma152dvcfkly3jij89lqigxcw7zq"))))
(build-system python-build-system)
(propagated-inputs
`(("python-astunparse" ,python-astunparse)))
@@ -23230,13 +23219,13 @@ project.")
(define-public python-trio
(package
(name "python-trio")
- (version "0.17.0")
+ (version "0.19.0")
(source
(origin
(method url-fetch)
(uri (pypi-uri "trio" version))
(sha256
- (base32 "0zcxirpdvvl54pbfkgw7vz984879xwvdygqfpggnam24is2zjp78"))))
+ (base32 "1qgg4zhca81dxc1nlmcr5pl1bclmvdp3niqbyslwxs65bs732pl9"))))
(build-system python-build-system)
(arguments
`(#:phases
@@ -23247,23 +23236,27 @@ project.")
(setenv "HOME" "/tmp")
#t))
(replace 'check
- (lambda _
- (invoke "pytest" "-vv" "-k"
- (string-append
- ;; This test times out.
- "not test_ki_protection_works"
- ;; Assertion errors.
- " and not test_guest_mode_ki"
- " and not test_run_in_trio_thread_ki"
- ;; These try to raise KeyboardInterrupt which does not work
- ;; in the build environment.
- " and not test_ki_self"
- " and not test_ki_wakes_us_up"
- ;; Failure in name resolution.
- " and not test_getnameinfo"
- " and not test_SocketType_resolve"
- ;; OSError: protocol not found.
- " and not test_getprotobyname")))))))
+ (lambda* (#:key tests? #:allow-other-keys)
+ (when tests?
+ (invoke "pytest" "-vv" "-k"
+ (string-append
+ ;; This test times out.
+ "not test_ki_protection_works"
+ ;; Assertion errors.
+ " and not test_guest_mode_ki"
+ " and not test_run_in_trio_thread_ki"
+ " and not test_simple_cancel_scope_usage_doesnt_create_cyclic_garbage"
+ " and not test_nursery_cancel_doesnt_create_cyclic_garbage"
+ " and not test_locals_destroyed_promptly_on_cancel"
+ ;; These try to raise KeyboardInterrupt which does not work
+ ;; in the build environment.
+ " and not test_ki_self"
+ " and not test_ki_wakes_us_up"
+ ;; Failure in name resolution.
+ " and not test_getnameinfo"
+ " and not test_SocketType_resolve"
+ ;; OSError: protocol not found.
+ " and not test_getprotobyname"))))))))
(native-inputs
`(("python-astor" ,python-astor)
("python-ipython" ,python-ipython)
@@ -23274,7 +23267,8 @@ project.")
("python-pytest-cov" ,python-pytest-cov)
("python-trustme" ,python-trustme)))
(propagated-inputs
- `(("python-attrs" ,python-attrs)
+ `(("python-async-generator" ,python-async-generator)
+ ("python-attrs" ,python-attrs)
("python-idna" ,python-idna)
("python-outcome" ,python-outcome)
("python-sniffio" ,python-sniffio)
@@ -23583,14 +23577,13 @@ compatible).")
(define-public python-bsddb3
(package
(name "python-bsddb3")
- (version "6.2.6")
+ (version "6.2.9")
(source
(origin
(method url-fetch)
(uri (pypi-uri "bsddb3" version))
(sha256
- (base32
- "019db2y6bfmiqbrgg9x9f6h72qjmqh05czdn2v5sy9bl0gs23mj2"))))
+ (base32 "00bqdsfx8jgmfz5bgkx10nlw5bfsw11a86f91zkl53snvk45xl3h"))))
(build-system python-build-system)
(inputs
`(("bdb" ,bdb)))
@@ -23777,14 +23770,14 @@ for manual interpretation.")
(define-public python-distro
(package
(name "python-distro")
- (version "1.4.0")
+ (version "1.6.0")
(source
(origin
(method url-fetch)
(uri (pypi-uri "distro" version))
(sha256
(base32
- "0mrg75w4ap7mdzyga75yaid9n8bgb345ih5mwjp3plj6v1jxwb9n"))))
+ "09441261dd3c8b2gv15vhw1cryzg60lmgpkk07v6hpwwkyhfbxc3"))))
(build-system python-build-system)
(native-inputs
`(("python-pytest" ,python-pytest)))
@@ -23907,28 +23900,33 @@ for YAML and JSON.")
(define-public python-dbusmock
(package
(name "python-dbusmock")
- (version "0.18.3")
+ (version "0.24.1")
(source
(origin
(method url-fetch)
(uri (pypi-uri "python-dbusmock" version))
(sha256
(base32
- "0hp2kyac88nh9iv6l8hlmv7s1sa1s5f1a3wc2pmlmmxnd211fjlr"))))
+ "0kvjwn5sdp3rqcbclvxljkmk988l12dvppzfn3ldy3jxbyyn1mjn"))))
(build-system python-build-system)
(arguments
'(#:phases
(modify-phases %standard-phases
- (add-after 'unpack 'patch-shell-path
- (lambda _
+ (add-after 'unpack 'patch-paths
+ (lambda* (#:key inputs #:allow-other-keys)
(substitute* "tests/test_code.py"
(("/bin/bash") (which "bash")))
- #t)))))
+ (substitute* "dbusmock/testcase.py"
+ (("'dbus-daemon'")
+ (string-append "'" (assoc-ref inputs "dbus")
+ "/bin/dbus-daemon'"))))))))
(native-inputs
`(;; For tests.
("dbus" ,dbus) ; for dbus-daemon
("python-nose" ,python-nose)
("which" ,which)))
+ (inputs
+ `(("dbus" ,dbus)))
(propagated-inputs
`(("python-dbus" ,python-dbus)
("python-pygobject" ,python-pygobject)))
@@ -24247,8 +24245,6 @@ essential tools are located.")
(modify-phases %standard-phases
(replace 'check
(lambda _
- (setenv "PYTHONPATH"
- (string-append (getcwd) ":" (getenv "PYTHONPATH")))
(invoke "python" "./tests/__main__.py"))))))
(propagated-inputs
`(("python-dill" ,python-dill)
@@ -24271,7 +24267,7 @@ the syntactic logic to configure and launch jobs in an execution environment.")
(define-public python-flit
(package
(name "python-flit")
- (version "3.2.0")
+ (version "3.3.0")
;; We fetch the sources via git because on pypi the package is split into
;; two parts: flit and flit_core; flit_core cannot be built without flit.
(source (origin
@@ -24282,7 +24278,7 @@ the syntactic logic to configure and launch jobs in an execution environment.")
(file-name (git-file-name name version))
(sha256
(base32
- "0fpqxpz5bv2xpv1akmc0c8yfss6sj09wdzxrlf3qw1lp1jhbzpyc"))))
+ "0mvyymw3zqsnip4x4ca6anr5rbx30hcmpqwrnhjwcm7s8mycd01x"))))
(build-system python-build-system)
(arguments
`(#:phases
@@ -24471,50 +24467,6 @@ memoization.")
Notation (CSON).")
(license license:expat)))
-(define-public python-asynctest
- (package
- (name "python-asynctest")
- (version "0.13.0")
- (source
- (origin
- (method url-fetch)
- (uri (pypi-uri "asynctest" version))
- (sha256
- (base32
- "1b3zsy7p84gag6q8ai2ylyrhx213qdk2h2zb6im3xn0m5n264y62"))))
- (build-system python-build-system)
- (arguments
- '(#:phases
- (modify-phases %standard-phases
- (replace 'check
- (lambda _
- (invoke "python" "-X" "dev" "-m" "unittest" "-v" "test")))
- (add-after 'unpack 'disable-tests
- (lambda* _
- ;; XXX: 7 tests fail out of 220. Disable them for now.
- (substitute* (list "test/test_selector.py"
- "test/test_mock.py")
- (("def test_events_watched_outside_test_are_ignored")
- "@unittest.skip('disabled by guix')
- def test_events_watched_outside_test_are_ignored")
- (("def test_awaited_from_autospec_mock.*" line)
- (string-append line " return True\n"))
- (("def test_create_autospec_on_coroutine_and_using_assert_methods.*" line)
- (string-append line " return True\n"))
- (("def test_patch_coroutine_with_multiple_scopes.*" line)
- (string-append line " return True\n"))
- (("def test_multiple_patches_on_coroutine.*" line)
- (string-append line " return True\n"))
- (("def test_patch_coroutine_only_when_running.*" line)
- (string-append line " return True\n")))
- #t)))))
- (home-page "https://github.com/Martiusweb/asynctest")
- (synopsis "Extension of unittest for testing asyncio libraries")
- (description
- "The package asynctest is built on top of the standard unittest module
-and cuts down boilerplate code when testing libraries for asyncio.")
- (license license:asl2.0)))
-
(define-public python-aionotify
(package
(name "python-aionotify")
@@ -24715,7 +24667,7 @@ but portable.")
(define-public python-watchgod
(package
(name "python-watchgod")
- (version "0.6")
+ (version "0.7")
(source
(origin
;; There are no tests in the PyPI tarball.
@@ -24725,7 +24677,7 @@ but portable.")
(commit (string-append "v" version))))
(file-name (git-file-name name version))
(sha256
- (base32 "1lqx44wkryakgpyqj3m0hsz61bqr07vc7smgzh188374hwvscp66"))))
+ (base32 "1w2xsidwp9n4giqhja0bzw7rwrh01db0kdxf2n54mv3dkx545jpq"))))
(build-system python-build-system)
(arguments
`(#:phases
@@ -24736,15 +24688,10 @@ but portable.")
(invoke "pytest" "-vv")))))))
(native-inputs
`(("python-coverage" ,python-coverage)
- ("python-docutils" ,python-docutils)
- ("python-flake8" ,python-flake8)
- ("python-isort" ,python-isort)
- ("python-pycodestyle" ,python-pycodestyle)
- ("python-pyflakes" ,python-pyflakes)
("python-pygments" ,python-pygments)
("python-pytest" ,python-pytest)
+ ("python-pytest-asyncio" ,python-pytest-asyncio)
("python-pytest-cov" ,python-pytest-cov)
- ("python-pytest-aiohttp" ,python-pytest-aiohttp)
("python-pytest-mock" ,python-pytest-mock)
("python-pytest-sugar" ,python-pytest-sugar)
("python-pytest-toolbox" ,python-pytest-toolbox)))
@@ -24956,7 +24903,10 @@ Python.")
(base32 "0v8vg0naa9rywvd31cpq65ljbdclpsrx09788v4xj7lg10np8nk0"))))
(build-system python-build-system)
(arguments
- '(#:tests? #f)) ; TODO: package dependencies required for tests.
+ ;; TODO: package dependencies required for tests.
+ '(#:tests? #f
+ #:phases (modify-phases %standard-phases
+ (delete 'sanity-check))))
(synopsis "Interface for Open Geospatial Consortium web service")
(description
"OWSLib is a Python package for client programming with Open Geospatial
@@ -25818,8 +25768,7 @@ be necessary when using @code{cmd}.")
(modify-phases %standard-phases
(add-before 'build 'qualify-libtidy
(lambda* (#:key inputs #:allow-other-keys)
- (let ((libtidy (string-append (assoc-ref inputs "tidy")
- "/lib/libtidy.so")))
+ (let ((libtidy (search-input-file inputs "/lib/libtidy.so")))
(substitute* "tidylib/tidy.py"
(("ctypes\\.util\\.find_library\\('tidy'\\)")
(format #f "'~a'" libtidy)))
@@ -26227,9 +26176,8 @@ It adds a simple and readable way to print stuff during development.")
(lambda* (#:key inputs #:allow-other-keys)
(setenv "TZ" "UTC")
(setenv "TZDIR"
- (string-append (assoc-ref inputs "tzdata")
- "/share/zoneinfo"))
- #t)))))
+ (search-input-directory inputs
+ "share/zoneinfo")))))))
(home-page "https://github.com/scrapinghub/dateparser")
(synopsis
"Date parsing library designed to parse dates from HTML pages")
@@ -26346,11 +26294,11 @@ By default it uses the open Python vulnerability database Safety DB.")
(propagated-inputs
`(("wheel" ,python-wheel)))
(native-inputs
- `(("texlive" ,(texlive-union (list texlive-amsfonts/patched
+ `(("texlive" ,(texlive-updmap.cfg (list texlive-amsfonts
texlive-fonts-ec
- texlive-iftex
- texlive-latex-hyperref
- texlive-latex-oberdiek
+ texlive-generic-iftex
+ texlive-hyperref
+ texlive-oberdiek
texlive-lm
texlive-xcolor)))))
(arguments
@@ -26362,8 +26310,6 @@ By default it uses the open Python vulnerability database Safety DB.")
(substitute* "tests.py"
(("test_basic_conversion_from_http_url")
"skip_test_basic_conversion_from_http_url"))
- ;; Needed by texlive-union to generate fonts
- (setenv "HOME" "/tmp")
#t)))))
(home-page "https://github.com/bebraw/pypandoc")
(synopsis "Python wrapper for pandoc")
@@ -26683,10 +26629,16 @@ process.")
(inputs
`(("libpng" ,libpng)
("libtiff" ,libtiff)
- ("python2-wxpython" ,python2-wxpython)
("zlib" ,zlib)))
(arguments
- `(#:python ,python-2))
+ `(#:python ,python-2
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'disable-wx-support
+ (lambda _
+ (substitute* "setup.py"
+ (("no_wx = False")
+ "no_wx = True")))))))
(synopsis "Framework for building document analysis applications")
(description
"Gamera is a toolkit for building document image recognition systems.")
@@ -27144,10 +27096,9 @@ and frame grabber interface.")
(lambda* (#:key outputs #:allow-other-keys)
(wrap-program
(string-append (assoc-ref outputs "out") "/bin/screenkey")
- `("PYTHONPATH" ":" prefix (,(getenv "PYTHONPATH")))
+ `("GUIX_PYTHONPATH" ":" prefix (,(getenv "GUIX_PYTHONPATH")))
`("GI_TYPELIB_PATH"
- ":" prefix (,(getenv "GI_TYPELIB_PATH"))))
- #t)))))
+ ":" prefix (,(getenv "GI_TYPELIB_PATH")))))))))
(inputs
`(("python-distutils-extra" ,python-distutils-extra)
("python-tokenize-rt" ,python-tokenize-rt)
@@ -27162,7 +27113,8 @@ and frame grabber interface.")
(synopsis
"Screencast tool to display pressed keys")
(description
- "A screencast tool to display your keys inspired by Screenflick.")
+ "Screenkey is a screencast tool to display your keys inspired by
+Screenflick.")
(license license:gpl3+)))
(define-public python-jinja2-cli
@@ -27542,6 +27494,56 @@ application binary interfaces (ABIs); it takes care of register allocation; it
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 packages provides an unmaintained port of sgmllib to
+Python 3. It is used to parse text files formatted in @acronym{SGML,Standard
+Generalized Mark-up Language}.")
+ (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")
@@ -27567,8 +27569,8 @@ supports x86_64 instructions up to AVX-512 and SHA.")
(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)
@@ -27853,9 +27855,9 @@ pythonic way.")
(replace 'check
(lambda* (#:key tests? #:allow-other-keys)
(when tests?
- (setenv "PYTHONPATH"
+ (setenv "GUIX_PYTHONPATH"
(string-append (getcwd) "/build/lib:"
- (getenv "PYTHONPATH")))
+ (getenv "GUIX_PYTHONPATH")))
(invoke "pytest")))))))
(native-inputs
`(("python-pandas" ,python-pandas) ;; required for test-suite
@@ -28243,30 +28245,6 @@ interfaces.")
"This package is a Python module for reading Emacs Org mode files.")
(license license:bsd-3)))
-(define-public python-sgmllib3k
- (package
- (name "python-sgmllib3k")
- (version "1.0.0")
- (source
- (origin
- (method url-fetch)
- (uri (pypi-uri "sgmllib3k" version))
- (sha256
- (base32 "1s8jm3dgqabgf8x96931scji679qkhvczlv3qld4qxpsicfgns3q"))))
- (build-system python-build-system)
- ;; Requires a test.html input that is not supplied
- (arguments
- `(#:tests? #f))
- (home-page "https://pypi.org/project/sgmllib3k/")
- ;; Actual homepage seems to be down
- ;; (home-page "https://hg.hardcoded.net/sgmllib")
- (synopsis "Python 3 port of sgmllib")
- (description
- "This package provides an unmaintained port of sgmllib to Python 3.
-It is used to parse text files formatted in @acronym{SGML,Standard Generalized
-Mark-up Language}.")
- (license license:bsd-3)))
-
(define-public dynaconf
(package
(name "dynaconf")
diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index 6fa0987d24..92f4273220 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -1,6 +1,6 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org>
-;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2021 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2013, 2014, 2015, 2016 Andreas Enge <andreas@enge.fr>
;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
;;; Copyright © 2014, 2017, 2019 Eric Bavier <bavier@member.fsf.org>
@@ -26,12 +26,12 @@
;;; Copyright © 2016, 2017 Nikita <nikita@n0.is>
;;; Copyright © 2016 Dylan Jeffers <sapientech@sapientech@openmailbox.org>
;;; Copyright © 2016 David Craven <david@craven.ch>
-;;; Copyright © 2016, 2017, 2018, 2019, 2020 Marius Bakke <mbakke@fastmail.com>
+;;; Copyright © 2016, 2017, 2018, 2019, 2020, 2021 Marius Bakke <marius@gnu.org>
;;; Copyright © 2016, 2017 Stefan Reichör <stefan@xsteve.at>
;;; Copyright © 2016, 2017 Alex Vong <alexvong1995@gmail.com>
;;; Copyright © 2016, 2017, 2018 Arun Isaac <arunisaac@systemreboot.net>
-;;; Copyright © 2016, 2017, 2018 Julien Lepiller <julien@lepiller.eu>
;;; Copyright © 2016–2018, 2021 Tobias Geerinckx-Rice <me@tobias.gr>
+;;; Copyright © 2016, 2017, 2018, 2021 Julien Lepiller <julien@lepiller.eu>
;;; Copyright © 2016, 2017 Thomas Danckaert <post@thomasdanckaert.be>
;;; Copyright © 2017 Carlo Zancanaro <carlo@zancanaro.id.au>
;;; Copyright © 2017 Frederick M. Muriithi <fredmanglis@gmail.com>
@@ -52,12 +52,12 @@
;;; Copyright © 2018 Nicolas Goaziou <mail@nicolasgoaziou.fr>
;;; Copyright © 2018 Oleg Pykhalov <go.wigust@gmail.com>
;;; Copyright © 2018 Clément Lassieur <clement@lassieur.org>
-;;; Copyright © 2018, 2019 Maxim Cournoyer <maxim.cournoyer@gmail.com>
+;;; Copyright © 2018, 2019, 2020, 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;; Copyright © 2018 Luther Thompson <lutheroto@gmail.com>
;;; Copyright © 2018 Vagrant Cascadian <vagrant@debian.org>
;;; Copyright © 2019 Tanguy Le Carrour <tanguy@bioneland.org>
;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
-;;; Copyright © 2021 Greg Hogan <code@greghogan.com>
+;;; Copyright © 2020, 2021 Greg Hogan <code@greghogan.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -94,68 +94,104 @@
#:use-module (gnu packages tcl)
#:use-module (gnu packages tls)
#:use-module (gnu packages xml)
+ #:use-module (guix gexp)
#:use-module (guix packages)
#:use-module (guix download)
#:use-module (guix utils)
#:use-module (guix build-system gnu)
#:use-module (guix build-system trivial)
#:use-module (srfi srfi-1)
- #:use-module (srfi srfi-26))
+ #:use-module (srfi srfi-26)
+
+ #:export (customize-site
+ guix-pythonpath-search-path))
+
+(define* (customize-site version)
+ "Generate a install-sitecustomize.py phase, using VERSION."
+ `(lambda* (#:key native-inputs inputs outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (site-packages (string-append
+ out "/lib/python"
+ ,(version-major+minor version)
+ "/site-packages"))
+ (sitecustomize.py (assoc-ref (or native-inputs inputs)
+ "sitecustomize.py"))
+ (dest (string-append site-packages "/sitecustomize.py")))
+ (mkdir-p site-packages)
+ (copy-file sitecustomize.py dest)
+ ;; Set the correct permissions on the installed file, else the byte
+ ;; compilation phase fails with a permission denied error.
+ (chmod dest #o644))))
+
+(define (guix-pythonpath-search-path version)
+ "Generate a GUIX_PYTHONPATH search path specification, using VERSION."
+ (search-path-specification (variable "GUIX_PYTHONPATH")
+ (files (list (string-append
+ "lib/python"
+ (version-major+minor version)
+ "/site-packages")))))
(define-public python-2.7
(package
(name "python2")
- (version "2.7.17")
+ (version "2.7.18")
(source
(origin
- (method url-fetch)
- (uri (string-append "https://www.python.org/ftp/python/"
- version "/Python-" version ".tar.xz"))
- (sha256
- (base32
- "0hds28cg226m8j8sr394nm9yc4gxhvlv109w0avsf2mxrlrz0hsd"))
- (patches (search-patches "python-2.7-search-paths.patch"
- "python-2-deterministic-build-info.patch"
- "python-2.7-site-prefixes.patch"
- "python-2.7-source-date-epoch.patch"
- "python-2.7-adjust-tests.patch"
- "python-cross-compile.patch"
- "python-2.7-CVE-2021-3177.patch"))
- (modules '((guix build utils)))
- (snippet
- '(begin
- ;; Ensure the bundled copies of these libraries are not used.
- (for-each delete-file-recursively
- '("Modules/_ctypes/libffi" "Modules/expat" "Modules/zlib"))
+ (method url-fetch)
+ (uri (string-append "https://www.python.org/ftp/python/"
+ version "/Python-" version ".tar.xz"))
+ (sha256
+ (base32
+ "0hzgxl94hnflis0d6m4szjx0b52gah7wpmcg5g00q7am6xwhwb5n"))
+ (patches (search-patches "python-2.7-search-paths.patch"
+ "python-2-deterministic-build-info.patch"
+ "python-2.7-site-prefixes.patch"
+ "python-2.7-source-date-epoch.patch"
+ "python-2.7-adjust-tests.patch"
+ "python-cross-compile.patch"
+ "python-2.7-CVE-2021-3177.patch"
+ "python-2.7-no-static-lib.patch"))
+ (modules '((guix build utils)))
+ (snippet
+ '(begin
+ ;; Ensure the bundled copies of these libraries are not used.
+ (for-each delete-file-recursively
+ '("Modules/_ctypes/libffi" "Modules/expat" "Modules/zlib"))
- (substitute* "Modules/Setup.dist"
- ;; Link Expat instead of embedding the bundled one.
- (("^#pyexpat.*") "pyexpat pyexpat.c -lexpat\n"))
+ (substitute* "Modules/Setup.dist"
+ ;; Link Expat instead of embedding the bundled one.
+ (("^#pyexpat.*") "pyexpat pyexpat.c -lexpat\n"))
- ;; Suboptimal to delete failing tests here, but if we delete them in
- ;; the arguments then we need to make sure to strip out that phase
- ;; when it gets inherited by python and python-minimal.
- (for-each delete-file
- '("Lib/test/test_compileall.py"
- "Lib/test/test_ctypes.py" ; fails on mips64el
- "Lib/test/test_distutils.py"
- "Lib/test/test_import.py"
- "Lib/test/test_shutil.py"
- "Lib/test/test_socket.py"
- "Lib/test/test_subprocess.py"))
- #t))))
+ ;; Suboptimal to delete failing tests here, but if we delete them in
+ ;; the arguments then we need to make sure to strip out that phase
+ ;; when it gets inherited by python and python-minimal.
+ (for-each delete-file
+ '("Lib/test/test_compileall.py"
+ "Lib/test/test_ctypes.py" ; fails on mips64el
+ "Lib/test/test_distutils.py"
+ "Lib/test/test_import.py"
+ "Lib/test/test_shutil.py"
+ "Lib/test/test_socket.py"
+ "Lib/test/test_subprocess.py"))))))
(outputs '("out"
- "tk")) ;tkinter; adds 50 MiB to the closure
+ "tk" ;tkinter; adds 50 MiB to the closure
+ "idle")) ;programming environment; weighs 5MB
(build-system gnu-build-system)
(arguments
`(#:test-target "test"
#:configure-flags
- (list "--enable-shared" ;allow embedding
- "--with-system-expat" ;for XML support
- "--with-system-ffi" ;build ctypes
- "--with-ensurepip=install" ;install pip and setuptools
+ (list "--enable-shared" ;allow embedding
+ "--with-system-expat" ;for XML support
+ "--with-system-ffi" ;build ctypes
+ "--with-ensurepip=install" ;install pip and setuptools
+ "--with-computed-gotos" ;main interpreter loop optimization
"--enable-unicode=ucs4"
+ ;; FIXME: These flags makes Python significantly faster, but
+ ;; leads to non-reproducible binaries.
+ ;; "--with-lto" ;increase size by 20MB, but 15% speedup
+ ;; "--enable-optimizations"
+
;; Prevent the installed _sysconfigdata.py from retaining a reference
;; to coreutils.
"INSTALL=install -c"
@@ -168,8 +204,13 @@
"ac_cv_file__dev_ptmx=no"
"ac_cv_file__dev_ptc=no")
'())
+ ;; -fno-semantic-interposition reinstates some optimizations by gcc
+ ;; leading to around 15% speedup. This is the default starting from
+ ;; python 3.10.
+ "CFLAGS=-fno-semantic-interposition"
(string-append "LDFLAGS=-Wl,-rpath="
- (assoc-ref %outputs "out") "/lib"))
+ (assoc-ref %outputs "out") "/lib"
+ " -fno-semantic-interposition"))
;; With no -j argument tests use all available cpus, so provide one.
#:make-flags
(list (string-append
@@ -181,12 +222,12 @@
;; https://github.com/python/cpython/commit/529525fb5a8fd9b96ab4021311a598c77588b918.
" --exclude test_urllib2_localnet test_httplib"))
- #:modules ((ice-9 ftw) (ice-9 match)
- (guix build utils) (guix build gnu-build-system))
- #:phases
- (modify-phases %standard-phases
- (add-before
- 'configure 'patch-lib-shells
+ #:modules ((ice-9 ftw) (ice-9 match)
+ (guix build utils) (guix build gnu-build-system))
+ #:phases
+ (modify-phases %standard-phases
+ (add-before
+ 'configure 'patch-lib-shells
(lambda _
;; This variable is used in setup.py to enable cross compilation
;; specific switches. As it is not set properly by configure
@@ -202,40 +243,34 @@
"Lib/distutils/tests/test_spawn.py"
"Lib/test/support/__init__.py"
"Lib/test/test_subprocess.py"))
- (("/bin/sh") (which "sh")))
- #t))
- ,@(if (hurd-system?)
- `((add-before 'build 'patch-regen-for-hurd
- (lambda* (#:key inputs #:allow-other-keys)
- (let ((libc (assoc-ref inputs "libc")))
- (substitute* "Lib/plat-generic/regen"
- (("/usr/include/") (string-append libc "/include/")))
- #t))))
- '())
- (add-before 'configure 'do-not-record-configure-flags
- (lambda* (#:key configure-flags #:allow-other-keys)
- ;; Remove configure flags from the installed '_sysconfigdata.py'
- ;; and 'Makefile' so we don't end up keeping references to the
- ;; build tools.
- ;;
- ;; Preserve at least '--with-system-ffi' since otherwise the
- ;; thing tries to build libffi, fails, and we end up with a
- ;; Python that lacks ctypes.
- (substitute* "configure"
- (("^CONFIG_ARGS=.*$")
- (format #f "CONFIG_ARGS='~a'\n"
- (if (member "--with-system-ffi" configure-flags)
- "--with-system-ffi"
- ""))))
- #t))
- (add-before
- 'check 'pre-check
+ (("/bin/sh") (which "sh")))))
+ ,@(if (hurd-system?)
+ `((add-before 'build 'patch-regen-for-hurd
+ (lambda* (#:key inputs #:allow-other-keys)
+ (let ((libc (assoc-ref inputs "libc")))
+ (substitute* "Lib/plat-generic/regen"
+ (("/usr/include/") (string-append libc "/include/")))))))
+ '())
+ (add-before 'configure 'do-not-record-configure-flags
+ (lambda* (#:key configure-flags #:allow-other-keys)
+ ;; Remove configure flags from the installed '_sysconfigdata.py'
+ ;; and 'Makefile' so we don't end up keeping references to the
+ ;; build tools.
+ ;;
+ ;; Preserve at least '--with-system-ffi' since otherwise the
+ ;; thing tries to build libffi, fails, and we end up with a
+ ;; Python that lacks ctypes.
+ (substitute* "configure"
+ (("^CONFIG_ARGS=.*$")
+ (format #f "CONFIG_ARGS='~a'\n"
+ (if (member "--with-system-ffi" configure-flags)
+ "--with-system-ffi"
+ ""))))))
+ (add-before 'check 'pre-check
(lambda _
;; 'Lib/test/test_site.py' needs a valid $HOME
- (setenv "HOME" (getcwd))
- #t))
- (add-after
- 'unpack 'set-source-file-times-to-1980
+ (setenv "HOME" (getcwd))))
+ (add-after 'unpack 'set-source-file-times-to-1980
;; XXX One of the tests uses a ZIP library to pack up some of the
;; source tree, and fails with "ZIP does not support timestamps
;; before 1980". Work around this by setting the file times in the
@@ -244,98 +279,130 @@
(let ((circa-1980 (* 10 366 24 60 60)))
(ftw "." (lambda (file stat flag)
(utime file circa-1980 circa-1980)
- #t))
- #t)))
- (add-after 'install 'remove-tests
- ;; Remove 25 MiB of unneeded unit tests. Keep test_support.*
- ;; because these files are used by some libraries out there.
- (lambda* (#:key outputs #:allow-other-keys)
- (let ((out (assoc-ref outputs "out")))
- (match (scandir (string-append out "/lib")
- (lambda (name)
- (string-prefix? "python" name)))
- ((pythonX.Y)
- (let ((testdir (string-append out "/lib/" pythonX.Y
- "/test")))
- (with-directory-excursion testdir
- (for-each delete-file-recursively
- (scandir testdir
- (match-lambda
- ((or "." "..") #f)
- ("support" #f)
- (file
- (not
- (string-prefix? "test_support."
- file))))))
- (call-with-output-file "__init__.py" (const #t))
- #t)))))))
- (add-after 'remove-tests 'rebuild-bytecode
- (lambda* (#:key outputs #:allow-other-keys)
- (let ((out (assoc-ref outputs "out")))
- ;; Disable hash randomization to ensure the generated .pycs
- ;; are reproducible.
- (setenv "PYTHONHASHSEED" "0")
- (for-each
- (lambda (opt)
- (format #t "Compiling with optimization level: ~a\n"
- (if (null? opt) "none" (car opt)))
- (for-each (lambda (file)
- (apply invoke
- `(,,(if (%current-target-system)
- "python2"
- '(string-append out "/bin/python"))
- ,@opt
- "-m" "compileall"
- "-f" ; force rebuild
- ;; Don't build lib2to3, because it contains Python 3 code.
- "-x" "lib2to3/.*"
- ,file)))
- (find-files out "\\.py$")))
- (list '() '("-O") '("-OO")))
- #t)))
- (add-after 'install 'move-tk-inter
- (lambda* (#:key outputs #:allow-other-keys)
- ;; When Tkinter support is built move it to a separate output so
- ;; that the main output doesn't contain a reference to Tcl/Tk.
- (let ((out (assoc-ref outputs "out"))
- (tk (assoc-ref outputs "tk")))
- (when tk
- (match (find-files out "tkinter.*\\.so")
- ((tkinter.so)
- ;; The .so is in OUT/lib/pythonX.Y/lib-dynload, but we
- ;; want it under TK/lib/pythonX.Y/site-packages.
- (let* ((len (string-length out))
- (target (string-append
- tk "/"
- (string-drop
- (dirname (dirname tkinter.so))
- len)
- "/site-packages")))
- (install-file tkinter.so target)
- (delete-file tkinter.so)))))
- #t))))))
+ #t)))))
+ (add-after 'install 'remove-tests
+ ;; Remove 25 MiB of unneeded unit tests. Keep test_support.*
+ ;; because these files are used by some libraries out there.
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let ((out (assoc-ref outputs "out")))
+ (match (scandir (string-append out "/lib")
+ (lambda (name)
+ (string-prefix? "python" name)))
+ ((pythonX.Y)
+ (let ((testdir (string-append out "/lib/" pythonX.Y
+ "/test")))
+ (with-directory-excursion testdir
+ (for-each delete-file-recursively
+ (scandir testdir
+ (match-lambda
+ ((or "." "..") #f)
+ ("support" #f)
+ (file
+ (not
+ (string-prefix? "test_support."
+ file))))))
+ (call-with-output-file "__init__.py" (const #t))))
+ (let ((libdir (string-append out "/lib/" pythonX.Y)))
+ (for-each
+ (lambda (directory)
+ (let ((dir (string-append libdir "/" directory)))
+ (when (file-exists? dir)
+ (delete-file-recursively dir))))
+ '("email/test" "ctypes/test" "unittest/test" "tkinter/test"
+ "sqlite3/test" "bsddb/test" "lib-tk/test" "json/tests"
+ "distutils/tests"))))))))
+ (add-after 'remove-tests 'move-tk-inter
+ (lambda* (#:key outputs #:allow-other-keys)
+ ;; When Tkinter support is built move it to a separate output so
+ ;; that the main output doesn't contain a reference to Tcl/Tk.
+ (let ((out (assoc-ref outputs "out"))
+ (tk (assoc-ref outputs "tk")))
+ (when tk
+ (match (find-files out "tkinter.*\\.so")
+ ((tkinter.so)
+ ;; The .so is in OUT/lib/pythonX.Y/lib-dynload, but we
+ ;; want it under TK/lib/pythonX.Y/site-packages.
+ (let* ((len (string-length out))
+ (target (string-append
+ tk "/"
+ (string-drop
+ (dirname (dirname tkinter.so))
+ len)
+ "/site-packages")))
+ (install-file tkinter.so target)
+ (delete-file tkinter.so))))))))
+ (add-after 'move-tk-inter 'move-idle
+ (lambda* (#:key outputs #:allow-other-keys)
+ ;; when idle is built, move it to a separate output to save some
+ ;; space (5MB)
+ (let ((out (assoc-ref outputs "out"))
+ (idle (assoc-ref outputs "idle")))
+ (when idle
+ (for-each
+ (lambda (file)
+ (let ((target (string-append idle "/bin/" (basename file))))
+ (install-file file (dirname target))
+ (delete-file file)))
+ (find-files (string-append out "/bin") "^idle"))
+ (match (find-files out "^idlelib$" #:directories? #t)
+ ((idlelib)
+ (let* ((len (string-length out))
+ (target (string-append idle "/"
+ (string-drop idlelib len)
+ "/site-packages")))
+ (mkdir-p (dirname target))
+ (rename-file idlelib target))))))))
+ (add-after 'move-idle 'rebuild-bytecode
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let ((out (assoc-ref outputs "out")))
+ ;; Disable hash randomization to ensure the generated .pycs
+ ;; are reproducible.
+ (setenv "PYTHONHASHSEED" "0")
+ (for-each
+ (lambda (output)
+ (for-each (lambda (opt)
+ (format #t "Compiling with optimization level: ~a\n"
+ (if (null? opt) "none" (car opt)))
+ (apply invoke
+ `(,,(if (%current-target-system)
+ "python2"
+ '(string-append out "/bin/python"))
+ ,@opt
+ "-m" "compileall"
+ "-f" ; force rebuild
+ ;; Don't build lib2to3, because it contains
+ ;; Python 3 code.
+ "-x" "lib2to3/.*"
+ ,output)))
+ ;; Python 2 has a single file extension (.pyo) for the
+ ;; chosen level of optimization, so it doesn't make
+ ;; sense to byte compile with more than one level.
+ (list '() '("-OO"))))
+ (map cdr outputs)))))
+ (add-after 'install 'install-sitecustomize.py
+ ,(customize-site version)))))
(inputs
`(("bzip2" ,bzip2)
("expat" ,expat)
("gdbm" ,gdbm)
- ("libffi" ,libffi) ; for ctypes
- ("sqlite" ,sqlite) ; for sqlite extension
+ ("libffi" ,libffi) ; for ctypes
+ ("sqlite" ,sqlite) ; for sqlite extension
("openssl" ,openssl)
("readline" ,readline)
("zlib" ,zlib)
("tcl" ,tcl)
- ("tk" ,tk))) ; for tkinter
+ ("tk" ,tk))) ; for tkinter
(native-inputs
`(("pkg-config" ,pkg-config)
+ ("sitecustomize.py" ,(local-file (search-auxiliary-file
+ "python/sitecustomize.py")))
;; When cross-compiling, a native version of Python itself is needed.
,@(if (%current-target-system)
`(("python2" ,this-package)
("which" ,which))
'())))
(native-search-paths
- (list (search-path-specification
- (variable "PYTHONPATH")
- (files '("lib/python2.7/site-packages")))))
+ (list (guix-pythonpath-search-path version)))
(home-page "https://www.python.org")
(synopsis "High-level, dynamically-typed programming language")
(description
@@ -360,24 +427,25 @@ data types.")
(name "python")
(properties `((superseded . ,python-2)))))
-(define-public python-3.8
- (package (inherit python-2)
+(define-public python-3.9
+ (package
+ (inherit python-2)
(name "python")
- (version "3.8.2")
+ (version "3.9.6")
(source (origin
(method url-fetch)
(uri (string-append "https://www.python.org/ftp/python/"
version "/Python-" version ".tar.xz"))
(patches (search-patches
- "python-CVE-2020-26116.patch"
- "python-3.8-CVE-2021-3177.patch"
- "python-3-fix-tests.patch"
- "python-3.8-fix-tests.patch"
+ "python-3-arm-alignment.patch"
"python-3-deterministic-build-info.patch"
- "python-3-search-paths.patch"))
+ "python-3-fix-tests.patch"
+ "python-3-hurd-configure.patch"
+ "python-3-search-paths.patch"
+ "python-3-no-static-lib.patch"))
(sha256
(base32
- "1ps5v323cp5czfshqjmbsqw7nvrdpcbk06f62jbzaqik4gfffii6"))
+ "12hhw2685i68pwfx5hdkqngzhbji4ccyjmqb5rzvkigg6fpj0y9r"))
(modules '((guix build utils)))
(snippet
'(begin
@@ -386,17 +454,16 @@ data types.")
(substitute* "Modules/Setup"
;; Link Expat instead of embedding the bundled one.
(("^#pyexpat.*") "pyexpat pyexpat.c -lexpat\n"))
- #t))))
+ ;; Delete windows binaries
+ (for-each delete-file
+ (find-files "Lib/distutils/command" "\\.exe$"))))))
(arguments
(substitute-keyword-arguments (package-arguments python-2)
((#:make-flags _)
`(list (string-append
(format #f "TESTOPTS=-j~d" (parallel-job-count))
- ;; test_mmap fails on low-memory systems.
- " --exclude test_mmap"
- ;; test_socket may hang and eventually run out of memory
- ;; on some systems: <https://bugs.python.org/issue34587>.
- " test_socket"
+ ;; test_mmap fails on low-memory systems
+ " --exclude test_mmap test_socket"
,@(if (hurd-target?)
'(" test_posix" ;multiple errors
" test_time"
@@ -430,124 +497,90 @@ data types.")
" test_write_pty")
'()))))
((#:phases phases)
- `(modify-phases ,phases
- ,@(if (hurd-system?)
- `((delete 'patch-regen-for-hurd)) ;regen was removed after 3.5.9
- '())
- ,@(if (hurd-target?)
- ;; The build system refuses to cross-compile for unknown targets
- ;; even though it works fine. Add GNU/Hurd target.
- ;; TODO: Make it a patch in a future rebuild cycle.
- '((add-before 'configure 'support-hurd-cross-compile
- (lambda _
- (substitute* "configure"
- (("\\*-\\*-vxworks.*" all)
- (string-append "*-*-gnu)\nac_sys_system=GNU\n;;\n" all)))
- #t)))
- '())
- (add-before 'check 'set-TZDIR
- (lambda* (#:key inputs native-inputs #:allow-other-keys)
- ;; test_email requires the Olson time zone database.
- (setenv "TZDIR"
- (string-append (assoc-ref
- (or native-inputs inputs) "tzdata")
- "/share/zoneinfo"))
- #t))
- ;; Unset SOURCE_DATE_EPOCH while running the test-suite and set it
- ;; again afterwards. See <https://bugs.python.org/issue34022>.
- (add-before 'check 'unset-SOURCE_DATE_EPOCH
- (lambda _ (unsetenv "SOURCE_DATE_EPOCH") #t))
- (add-after 'check 'reset-SOURCE_DATE_EPOCH
- (lambda _ (setenv "SOURCE_DATE_EPOCH" "1") #t))
+ `(modify-phases ,phases
+ ,@(if (hurd-system?)
+ `((delete 'patch-regen-for-hurd)) ;regen was removed after 3.5.9
+ '())
+ (add-after 'unpack 'remove-windows-binaries
+ (lambda _
+ ;; Delete .exe from embedded .whl (zip) files
+ (for-each
+ (lambda (whl)
+ (let ((dir "whl-content")
+ (circa-1980 (* 10 366 24 60 60)))
+ (mkdir-p dir)
+ (with-directory-excursion dir
+ (let ((whl (string-append "../" whl)))
+ (invoke "unzip" whl)
+ (for-each delete-file
+ (find-files "." "\\.exe$"))
+ (delete-file whl)
+ ;; Reset timestamps to prevent them from ending
+ ;; up in the Zip archive.
+ (ftw "." (lambda (file stat flag)
+ (utime file circa-1980 circa-1980)
+ #t))
+ (apply invoke "zip" "-X" whl
+ (find-files "." #:directories? #t))))
+ (delete-file-recursively dir)))
+ (find-files "Lib/ensurepip" "\\.whl$"))))
+ (add-before 'check 'set-TZDIR
+ (lambda* (#:key inputs native-inputs #:allow-other-keys)
+ ;; test_email requires the Olson time zone database.
+ (setenv "TZDIR"
+ (string-append (assoc-ref
+ (or native-inputs inputs) "tzdata")
+ "/share/zoneinfo"))))
(replace 'rebuild-bytecode
(lambda* (#:key outputs #:allow-other-keys)
(let ((out (assoc-ref outputs "out")))
;; Disable hash randomization to ensure the generated .pycs
;; are reproducible.
(setenv "PYTHONHASHSEED" "0")
- (for-each
- (lambda (opt)
- (format #t "Compiling with optimization level: ~a\n"
- (if (null? opt) "none" (car opt)))
- (for-each (lambda (file)
- (apply invoke
- `(,,(if (%current-target-system)
- "python3"
- '(string-append out
- "/bin/python3"))
- ,@opt
- "-m" "compileall"
- "-f" ; force rebuild
- ;; Don't build lib2to3, because it's Python 2 code.
- "-x" "lib2to3/.*"
- ,file)))
- (find-files out "\\.py$")))
- (list '() '("-O") '("-OO")))
- #t)))
- ;; XXX: Apply patch on ARM platforms only to avoid a full rebuild.
- ;; Remove this phase in the next rebuild cycle.
- ,@(let ((system (or (%current-target-system)
- (%current-system))))
- (if (any (cute string-prefix? <> system)
- '("arm" "aarch64"))
- '((add-after 'unpack 'apply-alignment-patch
- (lambda* (#:key native-inputs inputs #:allow-other-keys)
- (invoke "patch" "-p1" "--force" "--input"
- (assoc-ref (or native-inputs inputs)
- "arm-alignment.patch")))))
- '()))))))
- (native-inputs
- `(("tzdata" ,tzdata-for-tests)
- ;; Disable unaligned accesses in the sha3 module on ARM as
- ;; it causes a test failure when building 32-bit Python on a
- ;; 64-bit kernel. See <https://bugs.python.org/issue36515>.
- ;; TODO: make this a regular patch in the next rebuild cycle.
- ,@(let ((system (or (%current-target-system)
- (%current-system))))
- (if (any (cute string-prefix? <> system)
- '("arm" "aarch64"))
- `(("arm-alignment.patch" ,(search-patch "python-3-arm-alignment.patch")))
- '()))
+ (for-each (lambda (output)
+ ;; XXX: Delete existing pycs generated by the build
+ ;; system beforehand because the -f argument does
+ ;; not necessarily overwrite all files, leading to
+ ;; indeterministic results.
+ (for-each (lambda (pyc)
+ (delete-file pyc))
+ (find-files output "\\.pyc$"))
+ (apply invoke
+ `(,,(if (%current-target-system)
+ "python3"
+ '(string-append out
+ "/bin/python3"))
+ "-m" "compileall"
+ "-o" "0" "-o" "1" "-o" "2"
+ "-f" ; force rebuild
+ "--invalidation-mode=unchecked-hash"
+ ;; Don't build lib2to3, because it's
+ ;; Python 2 code.
+ "-x" "lib2to3/.*"
+ ,output)))
+ (map cdr outputs)))))
+ (replace 'install-sitecustomize.py
+ ,(customize-site version))))))
+ (native-inputs
+ `(("tzdata" ,tzdata-for-tests)
+ ("unzip" ,unzip)
+ ("zip" ,(@ (gnu packages compression) zip))
,@(if (%current-target-system)
`(("python3" ,this-package))
'())
,@(package-native-inputs python-2)))
(native-search-paths
- (list (search-path-specification
- (variable "PYTHONPATH")
- (files (list (string-append "lib/python"
- (version-major+minor version)
- "/site-packages"))))))))
-
-(define-public python-3.9
- (package (inherit python-3.8)
- (name "python-next")
- (version "3.9.2")
- (source (origin
- (method url-fetch)
- (uri (string-append "https://www.python.org/ftp/python/"
- version "/Python-" version ".tar.xz"))
- (patches (search-patches
- "python-3.9-fix-tests.patch"
- "python-3-deterministic-build-info.patch"
- "python-3-search-paths.patch"))
- (sha256
- (base32
- "0z94vv5qhlwvcgc4sy9sdiqs0220s84wx3b62vslh5419z2k881w"))
- (modules '((guix build utils)))
- (snippet
- '(begin
- ;; Delete the bundled copy of libexpat.
- (delete-file-recursively "Modules/expat")
- (substitute* "Modules/Setup"
- ;; Link Expat instead of embedding the bundled one.
- (("^#pyexpat.*") "pyexpat pyexpat.c -lexpat\n"))
- #t))))))
+ (list (guix-pythonpath-search-path version)
+ ;; Used to locate tzdata by the zoneinfo module introduced in
+ ;; Python 3.9.
+ (search-path-specification
+ (variable "PYTHONTZPATH")
+ (files (list "share/zoneinfo")))))))
;; Current 3.x version.
-(define-public python-3 python-3.8)
+(define-public python-3 python-3.9)
;; Current major version.
(define-public python python-3)
@@ -621,8 +654,8 @@ for more information.")))
(lambda (old new)
(symlink (string-append python old)
(string-append bin "/" new)))
- `("python3" ,"pydoc3" ,"idle3" ,"pip3")
- `("python" ,"pydoc" ,"idle" ,"pip"))
+ `("python3" ,"pydoc3" ,"pip3")
+ `("python" ,"pydoc" ,"pip"))
;; python-config outputs search paths based upon its location,
;; use a bash wrapper to avoid changing its outputs.
(let ((bash (string-append (assoc-ref %build-inputs "bash")
@@ -633,8 +666,7 @@ for more information.")))
(lambda ()
(format #t "#!~a~%" bash)
(format #t "exec \"~a\" \"$@\"~%" old)
- (chmod new #o755)
- #t)))))))
+ (chmod new #o755))))))))
(synopsis "Wrapper for the Python 3 commands")
(description
"This package provides wrappers for the commands of Python@tie{}3.x such
@@ -791,7 +823,8 @@ ease from the desktop to a microcontroller or embedded system.")
"/lib/libsqlite3.so.0'")))
(substitute* '("lib-python/3/subprocess.py")
;; Fix shell path
- (("/bin/sh") (which "sh")))
+ (("/bin/sh")
+ (search-input-file inputs "/bin/sh")))
(substitute* '("lib-python/3/distutils/unixccompiler.py")
;; gcc-toolchain does not provide symlink cc -> gcc
(("\"cc\"") "\"gcc\""))))
@@ -816,9 +849,6 @@ ease from the desktop to a microcontroller or embedded system.")
"--allworkingmodules"))
;; Build c modules and package everything, so tests work.
(with-directory-excursion "pypy/tool/release"
- (unsetenv "PYTHONPATH") ; Do not use the system’s python libs:
- ; AttributeError: module 'enum' has no
- ; attribute 'IntFlag'
(invoke "python2" "package.py"
"--archive-name" "pypy-dist"
"--builddir" (getcwd)))))
diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm
index 4625d2220d..5ce4220cb0 100644
--- a/gnu/packages/qt.scm
+++ b/gnu/packages/qt.scm
@@ -49,6 +49,7 @@
#:use-module (guix build-system trivial)
#:use-module (guix build-system python)
#:use-module (guix build-system qt)
+ #:use-module (guix gexp)
#:use-module (guix packages)
#:use-module (guix deprecation)
#:use-module (guix utils)
@@ -169,9 +170,7 @@
(lambda* (#:key inputs #:allow-other-keys)
(substitute* "qt5ct.pro"
(("\\$\\$\\[QT_INSTALL_BINS\\]/lrelease")
- (string-append (assoc-ref inputs "qttools")
- "/bin/lrelease")))
- #t))
+ (search-input-file inputs "/bin/lrelease")))))
(replace 'configure
(lambda* (#:key outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out")))
@@ -223,11 +222,11 @@ window managers, that don't provide Qt integration by themselves.")
(arguments
`(#:tests? #f ; No target
#:configure-flags
- (list
- (string-append "-DCMAKE_CXX_FLAGS=-I"
- (assoc-ref %build-inputs "qtbase")
- "/include/qt5/QtXkbCommonSupport/"
- ,(package-version qtbase-5)))))
+ ,#~(list
+ (string-append "-DCMAKE_CXX_FLAGS=-I"
+ #$(this-package-input "qtbase")
+ "/include/qt5/QtXkbCommonSupport/"
+ #$(package-version qtbase-5)))))
(native-inputs
`(("cmake-shared" ,cmake-shared)
("extra-cmake-modules" ,extra-cmake-modules)
@@ -1941,7 +1940,9 @@ using the Enchant spell-checking library.")
(invoke "qmake" "QT_BUILD_PARTS = libs tools" "--"
"--webengine-printing-and-pdf=no"
"--webengine-ffmpeg=system"
- "--webengine-icu=system"
+ ;; FIXME: Building qtwebengine 5.12.2 with
+ ;; icu4c >= 68 fails.
+ ;;"--webengine-icu=system"
"--webengine-pepper-plugins=no"
"-webengine-proprietary-codecs")))))
;; Tests are disabled due to "Could not find QtWebEngineProcess error"
@@ -2682,7 +2683,11 @@ different kinds of sliders, and much more.")
(sha256
(base32
"1rm9sjkabxna67dl7myx9d9vpdyfxfdhrk9w7b94srkkjbd2d8cw"))
- (patches (search-patches "qtwebkit-pbutils-include.patch"))))
+ (patches (search-patches "qtwebkit-pbutils-include.patch"
+ "qtwebkit-fix-building-with-bison-3.7.patch"
+ "qtwebkit-fix-building-with-glib-2.68.patch"
+ "qtwebkit-fix-building-with-icu-68.patch"
+ "qtwebkit-fix-building-with-python-3.9.patch"))))
(build-system cmake-build-system)
(native-inputs
`(("perl" ,perl)
diff --git a/gnu/packages/radio.scm b/gnu/packages/radio.scm
index 9394bf974d..09fd153965 100644
--- a/gnu/packages/radio.scm
+++ b/gnu/packages/radio.scm
@@ -26,6 +26,7 @@
(define-module (gnu packages radio)
#:use-module ((guix licenses) #:prefix license:)
+ #:use-module (guix gexp)
#:use-module (guix packages)
#:use-module (guix download)
#:use-module (guix git-download)
@@ -505,10 +506,10 @@ used by RDS Spy, and audio files containing @dfn{multiplex} signals (MPX).")
("python-pyzmq" ,python-pyzmq)
("python-scipy" ,python-scipy)
("python-sphinx" ,python-sphinx)
- ("texlive" ,(texlive-union (list texlive-amsfonts/patched
- texlive-latex-amsmath
- ;; TODO: Add newunicodechar.
- texlive-latex-graphics)))
+ ("texlive" ,(texlive-updmap.cfg (list texlive-amsfonts
+ texlive-latex-amsmath
+ ;; TODO: Add newunicodechar.
+ texlive-latex-graphics)))
("xorg-server" ,xorg-server-for-tests)))
(inputs
`(("alsa-lib" ,alsa-lib)
@@ -583,8 +584,7 @@ used by RDS Spy, and audio files containing @dfn{multiplex} signals (MPX).")
(add-before 'check 'set-test-environment
(lambda* (#:key inputs #:allow-other-keys)
(setenv "HOME" "/tmp")
- (system (string-append (assoc-ref inputs "xorg-server")
- "/bin/Xvfb :1 &"))
+ (system "Xvfb :1 &")
(setenv "DISPLAY" ":1")
#t))
(replace 'check
@@ -598,7 +598,10 @@ used by RDS Spy, and audio files containing @dfn{multiplex} signals (MPX).")
'(;; https://github.com/gnuradio/gnuradio/issues/3871
"qa_header_payload_demux"
;; https://github.com/gnuradio/gnuradio/issues/4348
- "qa_packet_headerparser_b")
+ "qa_packet_headerparser_b"
+ ;; qa_rotator_cc sometimes fails, it looks like
+ ;; a floating point number precision issue.
+ "qa_rotator_cc")
"|"))))
(add-after 'install 'wrap-python
(assoc-ref python:%standard-phases 'wrap))
@@ -625,7 +628,7 @@ used by RDS Spy, and audio files containing @dfn{multiplex} signals (MPX).")
(variable "GRC_BLOCKS_PATH")
(files '("share/gnuradio/grc/blocks")))
(search-path-specification
- (variable "PYTHONPATH")
+ (variable "GUIX_PYTHONPATH")
(files (list (string-append "lib/python"
(version-major+minor
(package-version python))
@@ -715,7 +718,7 @@ to access different radio hardware.")
("doxygen" ,doxygen)
("libtool" ,libtool)
("pkg-config" ,pkg-config)
- ("texlive" ,(texlive-union (list texlive-amsfonts/patched
+ ("texlive" ,(texlive-updmap.cfg (list texlive-amsfonts
texlive-latex-amsmath
;; TODO: Add newunicodechar.
texlive-latex-graphics)))))
@@ -728,9 +731,7 @@ to access different radio hardware.")
(lambda* (#:key inputs #:allow-other-keys)
(substitute* "git-version-gen"
(("/bin/sh")
- (string-append (assoc-ref inputs "bash")
- "/bin/bash")))
- #t)))))
+ (search-input-file inputs "/bin/bash"))))))))
(synopsis "DSP primitives for SDR")
(description
"This a C-language library for common DSP (Digital Signal Processing)
@@ -1656,8 +1657,7 @@ methods:
"-lncurses"))
(substitute* "src/libcw/libcw_pa.c"
(("libpulse-simple.so" all)
- (string-append (assoc-ref inputs "pulseaudio")
- "/lib/" all))))))))
+ (search-input-file inputs "/lib/libpulse-simple.so"))))))))
(home-page "http://unixcw.sourceforge.net/")
(synopsis "Morse code library and programs")
(description
@@ -1692,7 +1692,8 @@ intended for people who want to learn receiving and sending morse code.")
("osm-gps-map" ,osm-gps-map)
("pulseaudio" ,pulseaudio)))
(arguments
- `(#:tests? #f ; No test suite
+ `(#:configure-flags '("-DCMAKE_C_FLAGS=-fcommon")
+ #:tests? #f ; No test suite
#:phases
(modify-phases %standard-phases
(add-after 'unpack 'fix-paths
@@ -1790,24 +1791,18 @@ Compatible hardware/software:
(string-append "documentation.path = "
(assoc-ref outputs "out")
"/share/man/man1"))
- (("/usr/include/pulse/")
- (string-append (assoc-ref inputs "pulseaudio")
- "/include/pulse/"))
+ (("/usr/include/pulse")
+ (search-input-directory inputs "/include/pulse"))
(("/usr/include/sndfile\\.h")
- (string-append (assoc-ref inputs "libsndfile")
- "/include/sndfile.h"))
- (("/usr/include/opus/")
- (string-append (assoc-ref inputs "opus")
- "/include/opus/"))
- (("/usr/include/speex/")
- (string-append (assoc-ref inputs "speexdsp")
- "/include/speex/"))
- (("/usr/include/qwt/")
- (string-append (assoc-ref inputs "qwt")
- "/include/qwt/"))
+ (search-input-file inputs "/include/sndfile.h"))
+ (("/usr/include/opus")
+ (search-input-directory inputs "/include/opus"))
+ (("/usr/include/speex")
+ (search-input-directory inputs "/include/speex"))
+ (("/usr/include/qwt")
+ (search-input-directory inputs "/include/qwt"))
(("\\$\\$OUT_PWD/include/neaacdec\\.h")
- (string-append (assoc-ref inputs "faad2")
- "/include/neaacdec.h")))))
+ (search-input-file inputs "/include/neaacdec.h")))))
(replace 'configure
(lambda _
(invoke "qmake"))))))
@@ -2045,7 +2040,7 @@ voice formats.")
(define-public sdrangel
(package
(name "sdrangel")
- (version "6.17.1")
+ (version "6.17.3")
(source
(origin
(method git-fetch)
@@ -2054,7 +2049,7 @@ voice formats.")
(commit (string-append "v" version))))
(file-name (git-file-name name version))
(sha256
- (base32 "1yraif6dzs5sdskxnj937x613xz3zxnqim5mnk18vj2m0apcaqam"))))
+ (base32 "16la2g1xqahgnni1qhpnfbqlcqsiihxnm2d6nv2241khb3lhi0i9"))))
(build-system qt-build-system)
(native-inputs
`(("doxygen" ,doxygen)
@@ -2095,20 +2090,29 @@ voice formats.")
(arguments
`(#:tests? #f ; No test suite.
#:configure-flags
- (list (string-append "-DAPT_DIR="
- (assoc-ref %build-inputs "aptdec"))
- (string-append "-DDAB_DIR="
- (assoc-ref %build-inputs "libdab"))
- (string-append "-DDSDCC_DIR="
- (assoc-ref %build-inputs "dsdcc"))
- (string-append "-DMBE_DIR="
- (assoc-ref %build-inputs "mbelib"))
- (string-append "-DSERIALDV_DIR="
- (assoc-ref %build-inputs "serialdv"))
- (string-append "-DSGP4_DIR="
- (assoc-ref %build-inputs "sgp4"))
- (string-append "-DSOAPYSDR_DIR="
- (assoc-ref %build-inputs "soapysdr")))))
+ ,#~(list (string-append "-DAPT_DIR="
+ #$(this-package-input "aptdec"))
+ (string-append "-DDAB_DIR="
+ #$(this-package-input "libdab"))
+ (string-append "-DDSDCC_DIR="
+ #$(this-package-input "dsdcc"))
+ (string-append "-DMBE_DIR="
+ #$(this-package-input "mbelib"))
+ (string-append "-DSERIALDV_DIR="
+ #$(this-package-input "serialdv"))
+ (string-append "-DSGP4_DIR="
+ #$(this-package-input "sgp4"))
+ (string-append "-DSOAPYSDR_DIR="
+ #$(this-package-input "soapysdr")))
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'fix-boost-compatibility
+ (lambda _
+ (substitute*
+ '("plugins/channelrx/noisefigure/noisefigure.cpp"
+ "plugins/channelrx/noisefigure/noisefigureenrdialog.cpp")
+ (("boost::math::barycentric_rational<double>")
+ "boost::math::interpolators::barycentric_rational<double>")))))))
(home-page "https://github.com/f4exb/sdrangel/wiki")
(synopsis "Software defined radio")
(description
diff --git a/gnu/packages/rdf.scm b/gnu/packages/rdf.scm
index fb84d8053d..4b7e6ce29e 100644
--- a/gnu/packages/rdf.scm
+++ b/gnu/packages/rdf.scm
@@ -48,6 +48,7 @@
#:use-module (gnu packages perl)
#:use-module (gnu packages pkg-config)
#:use-module (gnu packages python)
+ #:use-module (gnu packages python-build)
#:use-module (gnu packages python-web)
#:use-module (gnu packages python-xyz)
#:use-module (gnu packages qt)
diff --git a/gnu/packages/readline.scm b/gnu/packages/readline.scm
index c7db9e611d..9aeb7d0e7e 100644
--- a/gnu/packages/readline.scm
+++ b/gnu/packages/readline.scm
@@ -3,7 +3,7 @@
;;; Copyright © 2016, 2019 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2016 Jan Nieuwenhuizen <janneke@gnu.org>
;;; Copyright © 2018, 2021 Tobias Geerinckx-Rice <me@tobias.gr>
-;;; Copyright © 2019 Marius Bakke <mbakke@fastmail.com>
+;;; Copyright © 2019, 2020 Marius Bakke <marius@gnu.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -48,13 +48,10 @@
(list (readline-patch version seqno (base32 hash))
...))
-(define %patch-series-8.0
+(define %patch-series-8.1
(patch-series
- "8.0"
- (1 "0sfh7wn0pr743xspnb1zndxndlv9rc0hcg14cbw5cmyg6f4ykrfq")
- (2 "1xy8mv8xm8hsfixwp3ci9kfx3dii3y92cq27wwd0jq75y6zzxc1n")
- (3 "1vza7sxjcsr2z295ij12nzgncdil1vb6as3mqy4m7svi1chv5pcl")
- (4 "0k1rfx9w32lglxg564yvp0mw6jg6883p8ac2f2lxxqpf80m3vami")))
+ "8.1"
+ (1 "0i4ikdqgcjnb40y2ss3lm09rq56zih5rzma3bib50dk3d1d4cak8")))
(define %patch-series-7.0
(patch-series
@@ -68,16 +65,16 @@
(define-public readline
(package
(name "readline")
- (version (string-append "8.0."
- (number->string (length %patch-series-8.0))))
+ (version (string-append "8.1."
+ (number->string (length %patch-series-8.1))))
(source (origin
(method url-fetch)
(uri (string-append "mirror://gnu/readline/readline-"
(version-major+minor version) ".tar.gz"))
(sha256
(base32
- "0qg4924hf4hg0r0wbx2chswsr08734536fh5iagkd3a7f4czafg3"))
- (patches (append %patch-series-8.0
+ "00ibp0n9crbwx15k9vvckq5wsipw98b1px8pd8i34chy2gpb9kpq"))
+ (patches (append %patch-series-8.1
(search-patches "readline-link-ncurses.patch")))
(patch-flags '("-p0"))))
(build-system gnu-build-system)
diff --git a/gnu/packages/rpc.scm b/gnu/packages/rpc.scm
index f02fa66f6c..0ff8363047 100644
--- a/gnu/packages/rpc.scm
+++ b/gnu/packages/rpc.scm
@@ -152,11 +152,13 @@ browsers to backend services.")
"src/core/lib/gpr/log_posix.cc"
"src/core/lib/iomgr/ev_epollex_linux.cc")
(("gettid\\(")
- "sys_gettid("))
- #t))))))
+ "sys_gettid("))))))))
(native-inputs
- `(("protobuf" ,protobuf-3.6)
- ,@(alist-delete "protobuf" (package-native-inputs grpc))))))
+ `(("abseil-cpp" ,abseil-cpp-20200923.3)
+ ("protobuf" ,protobuf-3.6)
+ ,@(fold alist-delete (package-native-inputs grpc)
+ '("abseil-cpp"
+ "protobuf"))))))
(define-public python-grpcio
(package
diff --git a/gnu/packages/rrdtool.scm b/gnu/packages/rrdtool.scm
index 13419e4d37..b8b48e21d6 100644
--- a/gnu/packages/rrdtool.scm
+++ b/gnu/packages/rrdtool.scm
@@ -73,9 +73,7 @@
(add-before 'check 'prepare-test-environment
(lambda* (#:key inputs #:allow-other-keys)
(setenv "TZDIR"
- (string-append (assoc-ref inputs "tzdata")
- "/share/zoneinfo"))
- #t))
+ (search-input-directory inputs "share/zoneinfo"))))
(add-after 'install 'remove-native-input-references
(lambda* (#:key outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))
diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm
index a567f530a9..55520f7b1a 100644
--- a/gnu/packages/ruby.scm
+++ b/gnu/packages/ruby.scm
@@ -1,12 +1,12 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2014, 2015 Pjotr Prins <pjotr.guix@thebird.nl>
-;;; Copyright © 2014, 2015, 2016, 2017 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2014, 2015, 2016, 2017, 2021 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
;;; Copyright © 2014, 2015 David Thompson <davet@gnu.org>
;;; Copyright © 2015, 2019 Ricardo Wurmus <rekado@elephly.net>
;;; Copyright © 2015, 2016, 2017 Ben Woodcroft <donttrustben@gmail.com>
;;; Copyright © 2017 Nikita <nikita@n0.is>
-;;; Copyright © 2017, 2019, 2020 Marius Bakke <mbakke@fastmail.com>
+;;; Copyright © 2017, 2019, 2020, 2021 Marius Bakke <marius@gnu.org>
;;; Copyright © 2017, 2018, 2019, 2020, 2021 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2017, 2018, 2020, 2021 Tobias Geerinckx-Rice <me@tobias.gr>
;;; Copyright © 2017 Clément Lassieur <clement@lassieur.org>
@@ -95,7 +95,7 @@
license:gpl2+
license:gpl3+))
-(define-public ruby
+(define-public ruby-2.6
(package
(name "ruby")
(version "2.6.5")
@@ -153,11 +153,11 @@ a focus on simplicity and productivity.")
(define-public ruby-2.7
(package
- (inherit ruby)
+ (inherit ruby-2.6)
(version "2.7.4")
(source
(origin
- (inherit (package-source ruby))
+ (inherit (package-source ruby-2.6))
(uri (string-append "https://cache.ruby-lang.org/pub/ruby/"
(version-major+minor version)
"/ruby-" version ".tar.gz"))
@@ -205,7 +205,7 @@ a focus on simplicity and productivity.")
(define-public ruby-2.5
(package
- (inherit ruby)
+ (inherit ruby-2.6)
(version "2.5.9")
(source
(origin
@@ -219,7 +219,7 @@ a focus on simplicity and productivity.")
(define-public ruby-2.4
(package
- (inherit ruby)
+ (inherit ruby-2.6)
(version "2.4.10")
(source
(origin
@@ -236,6 +236,8 @@ a focus on simplicity and productivity.")
(delete-file-recursively "ext/fiddle/libffi-3.2.1")
#t))))))
+(define-public ruby ruby-2.7)
+
(define-public mruby
(package
(name "mruby")
@@ -1155,8 +1157,7 @@ structure. Supports custom object formatting via plugins.")
(modify-phases %standard-phases
(add-after 'unpack 'patch-pandoc-path
(lambda* (#:key inputs #:allow-other-keys)
- (let ((pandoc (string-append (assoc-ref inputs "pandoc")
- "/bin/pandoc")))
+ (let ((pandoc (search-input-file inputs "/bin/pandoc")))
(substitute* "lib/pandoc-ruby.rb"
(("@@pandoc_path = 'pandoc'")
(format #f "@@pandoc_path = '~a'" pandoc)))
@@ -1164,14 +1165,18 @@ structure. Supports custom object formatting via plugins.")
(("('|\")pandoc" _ quote)
(string-append quote pandoc))
(("\\^pandoc")
- ".*pandoc"))
- #t)))
+ ".*pandoc")))))
+ (add-after 'unpack 'adjust-tests
+ ;; The tests expect filenames with spaces. Because they don't have
+ ;; spaces the quotes around the output are dropped automatically.
+ (lambda _
+ (substitute* "test/test_pandoc_ruby.rb"
+ (("\\\\\"#\\{file\\.path\\}\\\\\"") "#{file.path}"))))
(add-after 'extract-gemspec 'remove-Gemfile.lock
(lambda _
(delete-file "Gemfile.lock")
(substitute* "pandoc-ruby.gemspec"
- (("Gemfile\\.lock") ""))
- #t)))))
+ (("Gemfile\\.lock") "")))))))
(native-inputs
`(("ruby-mocha" ,ruby-mocha)))
(inputs
@@ -1262,7 +1267,7 @@ syntax to the minimum while remaining clear.")
(define-public ruby-asciidoctor
(package
(name "ruby-asciidoctor")
- (version "2.0.10")
+ (version "2.0.16")
(source
(origin
(method git-fetch) ;the gem release lacks a Rakefile
@@ -1272,20 +1277,12 @@ syntax to the minimum while remaining clear.")
(file-name (git-file-name name version))
(sha256
(base32
- "0jaxpnsdnx3qyjw5p2lsx1swny12q1i2vxw2kgdp4vlsyjv95z95"))))
+ "086i17v9rxx0sxac26xp8c5v75jqba6rqjlk57x94qjvrh8vzyw2"))))
(build-system ruby-build-system)
(arguments
`(#:test-target "test:all"
#:phases
(modify-phases %standard-phases
- (replace 'replace-git-ls-files
- (lambda _
- ;; TODO: Remove after the fix of using 'cut' to better mimic the
- ;; git ls-files output is merged in ruby-build-system.
- (substitute* "asciidoctor.gemspec"
- (("`git ls-files -z`")
- "`find . -type f -print0 |sort -z|cut -zc3-`"))
- #t))
(add-after 'extract-gemspec 'strip-version-requirements
(lambda _
(delete-file "Gemfile")
@@ -1294,7 +1291,8 @@ syntax to the minimum while remaining clear.")
(string-append stripped "\n")))
#t)))))
(native-inputs
- `(("ruby-erubis" ,ruby-erubis)
+ `(("ruby-erubi" ,ruby-erubi)
+ ("ruby-erubis" ,ruby-erubis)
("ruby-minitest" ,ruby-minitest)
("ruby-nokogiri" ,ruby-nokogiri)
("ruby-asciimath" ,ruby-asciimath)
@@ -1484,17 +1482,7 @@ loader for the file type associated with a filename extension, and it augments
"1dmk94z6ivhrz5hsq68vl5vgydhkz89n394rha1ymddw3rymbfcv"))))
(build-system ruby-build-system)
(arguments
- `(#:test-target "spec"
- #:phases
- (modify-phases %standard-phases
- (replace 'replace-git-ls-files
- (lambda _
- ;; TODO: Remove after the fix of using 'cut' to better mimic the
- ;; git ls-files output is merged in ruby-build-system.
- (substitute* "treetop.gemspec"
- (("`git ls-files -z`")
- "`find . -type f -print0 |sort -z|cut -zc3-`"))
- #t)))))
+ `(#:test-target "spec"))
(native-inputs
`(("ruby-activesupport" ,ruby-activesupport)
("ruby-rr" ,ruby-rr)
@@ -1717,15 +1705,6 @@ only what they care about.")
(lambda _
(delete-file "Gemfile")
(delete-file "Gemfile.lock")
- #t))
- (replace 'replace-git-ls-files
- (lambda _
- ;; TODO: Remove after the fix of using 'cut' to better mimic the
- ;; git ls-files output is merged in ruby-build-system.
- (substitute* "standard.gemspec"
- (("`git ls-files -z`")
- "`find . -type f -not -regex '.*\\.gem$' -print0 \
-|sort -z|cut -zc3-`"))
#t)))))
(native-inputs
`(("ruby-gimme" ,ruby-gimme)
@@ -1767,14 +1746,6 @@ to save time in the following ways:
(lambda _
(substitute* (find-files "." "\\.rb$")
(("require.*bundler/setup.*") ""))
- #t))
- (replace 'replace-git-ls-files
- (lambda _
- ;; TODO: Remove after the fix of using 'cut' to better mimic the
- ;; git ls-files output is merged in ruby-build-system.
- (substitute* "chunky_png.gemspec"
- (("`git ls-files`")
- "`find . -type f -not -regex '.*\\.gem$' |sort |cut -c3-`"))
#t)))))
(native-inputs
`(("bundler" ,bundler)
@@ -1860,85 +1831,69 @@ web pages.")
(license license:expat)))
(define-public ruby-asciidoctor-pdf
- ;; Use the latest commit, as the last tag doesn't build with the
- ;; latest Ruby dependencies in Guix.
- (let ((revision "1")
- (commit "d257440df895d1595a3825ef58b32e4b290ba1c3"))
- (package
- (name "ruby-asciidoctor-pdf")
- (version (git-version "1.5.3" revision commit))
- (source
- (origin
- (method git-fetch) ;no test suite in the distributed gem
- (uri (git-reference
- (url "https://github.com/asciidoctor/asciidoctor-pdf")
- (commit commit)))
- (file-name (git-file-name name version))
- (sha256
- (base32
- "1563d11ghzsrsg4inwfwj6b9hb5sk5b429f49fwq5qg3sq76kgjj"))))
- (build-system ruby-build-system)
- (arguments
- `(#:test-target "spec"
- #:phases
- (modify-phases %standard-phases
- (add-after 'unpack 'remove-failing-tests
- ;; Two tests module fail for unknown reasons, *only* when
- ;; ran in the build container (see:
- ;; https://github.com/asciidoctor/asciidoctor-pdf/issues/1725#issuecomment-658777965).
- (lambda _
- (delete-file "spec/audio_spec.rb")
- (delete-file "spec/video_spec.rb")
- #t))
- (add-after 'extract-gemspec 'strip-version-requirements
- (lambda _
- (substitute* "asciidoctor-pdf.gemspec"
- (("(.*add_.*dependency '[_A-Za-z0-9-]+').*" _ stripped)
- (string-append stripped "\n")))
- #t))
- (replace 'replace-git-ls-files
- ;; TODO: Remove after the fix of using 'cut' to better mimic the
- ;; git ls-files output is merged in ruby-build-system.
- (lambda _
- (substitute* "asciidoctor-pdf.gemspec"
- (("`git ls-files -z`")
- "`find . -type f -not -regex '.*\\.gem$' -print0 \
-|sort -z|cut -zc3-`"))
- #t))
- ;; The tests rely on the Gem being installed, so move the check phase
- ;; after the install phase.
- (delete 'check)
- (add-after 'install 'check
- (lambda* (#:key outputs tests? #:allow-other-keys)
- (let ((new-gem (string-append (assoc-ref outputs "out")
- "/lib/ruby/vendor_ruby")))
- (setenv "GEM_PATH"
- (string-append (getenv "GEM_PATH") ":" new-gem))
- (when tests?
- (invoke "rspec" "-t" "~visual" "-t" "~cli" "-t" "~network"))
- #t))))))
- (native-inputs
- `(("ruby-chunky-png" ,ruby-chunky-png)
- ("ruby-coderay" ,ruby-coderay)
- ("ruby-pdf-inspector" ,ruby-pdf-inspector)
- ("ruby-rouge" ,ruby-rouge)
- ("ruby-rspec" ,ruby-rspec)))
- (propagated-inputs
- `(("ruby-asciidoctor" ,ruby-asciidoctor)
- ("ruby-concurrent-ruby" ,ruby-concurrent)
- ("ruby-open-uri-cached" ,ruby-open-uri-cached)
- ("ruby-prawn" ,ruby-prawn)
- ("ruby-prawn-icon" ,ruby-prawn-icon)
- ("ruby-prawn-svg" ,ruby-prawn-svg)
- ("ruby-prawn-table" ,ruby-prawn-table)
- ("ruby-prawn-templates" ,ruby-prawn-templates)
- ("ruby-safe-yaml" ,ruby-safe-yaml)
- ("ruby-text-hyphen" ,ruby-text-hyphen)
- ("ruby-thread-safe" ,ruby-thread-safe)
- ("ruby-treetop" ,ruby-treetop)
- ("ruby-ttfunk" ,ruby-ttfunk)))
- (synopsis"AsciiDoc to Portable Document Format (PDF)} converter")
- (description "Asciidoctor PDF is an extension for Asciidoctor that
+ (package
+ (name "ruby-asciidoctor-pdf")
+ (version "1.6.1")
+ (source
+ (origin
+ (method git-fetch) ;no test suite in the distributed gem
+ (uri (git-reference
+ (url "https://github.com/asciidoctor/asciidoctor-pdf")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1iyfy6n9d3rkyrfjmnnfb44c76mq1larmkv1x8n6p5nbm33wb9sf"))))
+ (build-system ruby-build-system)
+ (arguments
+ `(#:test-target "spec"
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'remove-failing-tests
+ ;; Two tests module fail for unknown reasons, *only* when
+ ;; ran in the build container (see:
+ ;; https://github.com/asciidoctor/asciidoctor-pdf/issues/1725#issuecomment-658777965).
+ (lambda _
+ (delete-file "spec/audio_spec.rb")
+ (delete-file "spec/video_spec.rb")))
+ (add-after 'extract-gemspec 'strip-version-requirements
+ (lambda _
+ (substitute* "asciidoctor-pdf.gemspec"
+ (("(.*add_.*dependency '[_A-Za-z0-9-]+').*" _ stripped)
+ (string-append stripped "\n")))))
+ ;; The tests rely on the Gem being installed, so move the check phase
+ ;; after the install phase.
+ (delete 'check)
+ (add-after 'install 'check
+ (lambda* (#:key outputs tests? #:allow-other-keys)
+ (let ((new-gem (string-append (assoc-ref outputs "out")
+ "/lib/ruby/vendor_ruby")))
+ (setenv "GEM_PATH"
+ (string-append (getenv "GEM_PATH") ":" new-gem))
+ (when tests?
+ (invoke "rspec" "-t" "~visual" "-t" "~cli" "-t" "~network"))))))))
+ (native-inputs
+ `(("ruby-chunky-png" ,ruby-chunky-png)
+ ("ruby-coderay" ,ruby-coderay)
+ ("ruby-pdf-inspector" ,ruby-pdf-inspector)
+ ("ruby-rouge" ,ruby-rouge)
+ ("ruby-rspec" ,ruby-rspec)))
+ (propagated-inputs
+ `(("ruby-asciidoctor" ,ruby-asciidoctor)
+ ("ruby-concurrent-ruby" ,ruby-concurrent)
+ ("ruby-open-uri-cached" ,ruby-open-uri-cached)
+ ("ruby-prawn" ,ruby-prawn)
+ ("ruby-prawn-icon" ,ruby-prawn-icon)
+ ("ruby-prawn-svg" ,ruby-prawn-svg)
+ ("ruby-prawn-table" ,ruby-prawn-table)
+ ("ruby-prawn-templates" ,ruby-prawn-templates)
+ ("ruby-safe-yaml" ,ruby-safe-yaml)
+ ("ruby-text-hyphen" ,ruby-text-hyphen)
+ ("ruby-thread-safe" ,ruby-thread-safe)
+ ("ruby-treetop" ,ruby-treetop)
+ ("ruby-ttfunk" ,ruby-ttfunk)))
+ (synopsis"AsciiDoc to Portable Document Format (PDF)} converter")
+ (description "Asciidoctor PDF is an extension for Asciidoctor that
converts AsciiDoc documents to Portable Document Format (PDF) using the Prawn
PDF library. It has features such as:
@itemize
@@ -1961,13 +1916,13 @@ PDF library. It has features such as:
@item Custom TrueType (TTF) fonts
@item Double-sided printing mode (margins alternate on recto and verso pages)
@end itemize")
- (home-page "https://asciidoctor.org/docs/asciidoctor-pdf")
- (license license:expat))))
+ (home-page "https://asciidoctor.org/docs/asciidoctor-pdf")
+ (license license:expat)))
(define-public ruby-ast
(package
(name "ruby-ast")
- (version "2.4.1")
+ (version "2.4.2")
(source
(origin
(method git-fetch) ;no test included in gem from v2.4.1
@@ -1977,7 +1932,7 @@ PDF library. It has features such as:
(file-name (git-file-name name version))
(sha256
(base32
- "0k8vya256chimy473g818gim06m5rjgh6mz5sc5g8xz3csh3rysi"))))
+ "0vm94yml8rknr7z034vg6s3fpx6lml2prz9fn3hr67cx0143bb4h"))))
(build-system ruby-build-system)
(arguments
'(#:phases
@@ -1989,24 +1944,25 @@ PDF library. It has features such as:
(("Coveralls::SimpleCov::Formatter") ""))
#t))
(add-after 'extract-gemspec 'remove-unnecessary-requirements
- (lambda _
+ (lambda* (#:key inputs #:allow-other-keys)
(substitute* "ast.gemspec"
((".*coveralls.*") "\n")
(("%q<rest-client>.*") "%q<rest-client>.freeze, [\">= 0\"])\n")
(("%q<mime-types>.*") "%q<mime-types>.freeze, [\">= 0\"])\n")
- (("%q<rake>.*") "%q<rake>.freeze, [\">= 0\"])\n"))
+ (("%q<rake>.*") "%q<rake>.freeze, [\">= 0\"])\n")
+ (("12\\.3") "13.0"))
#t)))))
(native-inputs
`(("bundler" ,bundler)
- ("ruby-simplecov" ,ruby-simplecov)
+ ("ruby-bacon" ,ruby-bacon)
+ ("ruby-bacon-colored-output" ,ruby-bacon-colored-output)
("ruby-json-pure" ,ruby-json-pure)
- ("ruby-mime-times" ,ruby-mime-types)
- ("ruby-yard" ,ruby-yard)
("ruby-kramdown" ,ruby-kramdown)
+ ("ruby-mime-types" ,ruby-mime-types)
+ ("ruby-racc" ,ruby-racc)
("ruby-rest-client" ,ruby-rest-client)
- ("ruby-bacon" ,ruby-bacon)
- ("ruby-bacon-colored-output" ,ruby-bacon-colored-output)
- ("ruby-racc" ,ruby-racc)))
+ ("ruby-simplecov" ,ruby-simplecov)
+ ("ruby-yard" ,ruby-yard)))
(synopsis "Library for working with Abstract Syntax Trees")
(description
"@code{ast} is a Ruby library for working with Abstract Syntax Trees.
@@ -2129,8 +2085,6 @@ value is found.")
(invoke "ruby" "-Ilib" "-Itest" "-rrubygems" file))
(find-files "test" ".*rb$")))
#t)))))
- (propagated-inputs
- `(("ruby-rexml" ,ruby-rexml)))
(synopsis "Simple JSON and XML parsing for Ruby")
(description
"@code{crack} provides really simple JSON and XML parsing, extracted from
@@ -3780,13 +3734,13 @@ temporary files and directories during tests.")
(define-public ruby-test-unit
(package
(name "ruby-test-unit")
- (version "3.2.5")
+ (version "3.4.4")
(source (origin
(method url-fetch)
(uri (rubygems-uri "test-unit" version))
(sha256
(base32
- "05bx36fw01iqz0xqhvjfrwjgnj1zx3b2vn6w1fzp19rchd7zqc52"))))
+ "15isy7vhppbfd0032klirj9gxp65ygkzjdwrmm28xpirlcsk6qpd"))))
(build-system ruby-build-system)
(propagated-inputs
`(("ruby-power-assert" ,ruby-power-assert)))
@@ -4349,7 +4303,7 @@ number, support for interrupted tests, better backtraces, and more.")
(description
"Mocha is a mocking and stubbing library with JMock/SchMock syntax, which
allows mocking and stubbing of methods on real (non-mock) classes.")
- (home-page "https://mocha.jamesmead.org")
+ (home-page "https://mocha.jamesmead.org/")
;; Mocha can be used with either license at the users choice.
(license (list license:expat license:ruby))))
@@ -4429,13 +4383,13 @@ client protocol.")
(define-public ruby-minitest
(package
(name "ruby-minitest")
- (version "5.12.2")
+ (version "5.14.4")
(source (origin
(method url-fetch)
(uri (rubygems-uri "minitest" version))
(sha256
(base32
- "0zjm24aiz42i9n37mcw8lydd7n0y7wfk27by06jx77ypcld3qvkw"))))
+ "19z7wkhg59y8abginfrm2wzplz7py3va8fyngiigngqvsws6cwgl"))))
(build-system ruby-build-system)
(native-inputs
`(("ruby-hoe" ,ruby-hoe)))
@@ -4653,7 +4607,8 @@ MiniTest @code{Object#stub} with a global @code{stub} method.")
"1hbq9jk904xkz868yha1bqcm6azm7kmjsll2k4pn2nrcib508h2a"))))
(build-system ruby-build-system)
(arguments
- `(#:phases
+ `(#:tests? #f ; Test suite has bitrotted.
+ #:phases
(modify-phases %standard-phases
(add-before 'check 'clean-dependencies
(lambda _
@@ -4781,7 +4736,10 @@ minitest 5.12, and is planned to be removed from minitest 6.")
"05z8r6sw3fz4s44fs1150ndlcmcy82vlxmhps5nncg8vk59k3gmf"))))
(build-system ruby-build-system)
(arguments
- '(#:test-target "spec"))
+ '(#:test-target "spec"
+ ;; Test suite is incompatible with ruby-2.7.
+ ;; https://github.com/jeremyevans/minitest-hooks/issues/19
+ #:tests? #f))
(native-inputs
`(("ruby-sequel" ,ruby-sequel)
("ruby-sqlite3" ,ruby-sqlite3)))
@@ -4874,8 +4832,7 @@ you to merge elements inside a hash together recursively.")
(lambda* (#:key inputs outputs #:allow-other-keys)
;; Make the default git binary an absolute path to the
;; store.
- (let ((git (string-append (assoc-ref inputs "git")
- "/bin/git"))
+ (let ((git (search-input-file inputs "/bin/git"))
(config (string-append
(assoc-ref outputs "out")
"/lib/ruby/vendor_ruby/gems/git-"
@@ -4996,7 +4953,7 @@ net/http library.")
(define-public ruby-multi-json
(package
(name "ruby-multi-json")
- (version "1.13.1")
+ (version "1.15.0")
(source
(origin
(method git-fetch)
@@ -5008,20 +4965,17 @@ net/http library.")
(file-name (git-file-name name version))
(sha256
(base32
- "18wpb6p01rrkl4v33byh70vxj2a5jxkfxzv3pz8z6pssy4ymwkm4"))))
+ "0mkdvy6i00yyksjvnv6znh7wf89j9506qzzjq6bsbmbkyqrszp4d"))))
(build-system ruby-build-system)
(arguments
`(#:phases
(modify-phases %standard-phases
- (add-after 'unpack 'remove-signing-key-reference
+ (add-before 'check 'pre-check
(lambda _
- (substitute* "multi_json.gemspec"
- ((".*spec.signing_key.*") ""))
- #t)))))
+ ;; As seen in the .travis.yml file.
+ (setenv "SKIP_ADAPTERS" "gson,jr_jackson,nsjsonserialization"))))))
(native-inputs
- `(("bundler" ,bundler)
- ("ruby-rspec" ,ruby-rspec)
- ("ruby-yard" ,ruby-yard)
+ `(("ruby-rspec" ,ruby-rspec)
("ruby-json-pure" ,ruby-json-pure)
("ruby-oj" ,ruby-oj)
("ruby-yajl-ruby" ,ruby-yajl-ruby)))
@@ -5160,7 +5114,10 @@ to reproduce user environments.")
(base32
"15zplpfw3knqifj9bpf604rb3wc1vhq6363pd6lvhayng8wql5vy"))))))
-(define-public ruby-nokogiri
+;; TODO: In the next rebuild cycle, provide texlive a version of ruby-hydra
+;; that does not depend on byebug and rspec, so that their dependencies can
+;; be updated more freely. For now pin this version to avoid rebuilds.
+(define-public ruby-nokogiri-1.10
(package
(name "ruby-nokogiri")
(version "1.10.9")
@@ -5209,6 +5166,38 @@ both CSS3 selector and XPath 1.0 support.")
(home-page "http://www.nokogiri.org/")
(license license:expat)))
+;; nokogiri requires this version exactly.
+(define-public ruby-mini-portile-2.6.1
+ (package
+ (inherit ruby-mini-portile)
+ (version "2.6.1")
+ (source (origin
+ (method url-fetch)
+ (uri (rubygems-uri "mini_portile2" version))
+ (sha256
+ (base32
+ "1lvxm91hi0pabnkkg47wh1siv56s6slm2mdq1idfm86dyfidfprq"))))))
+
+(define-public ruby-nokogiri
+ (package
+ (inherit ruby-nokogiri-1.10)
+ (version "1.12.5")
+ (source (origin
+ (method url-fetch)
+ (uri (rubygems-uri "nokogiri" version))
+ (sha256
+ (base32
+ "1v02g7k7cxiwdcahvlxrmizn3avj2q6nsjccgilq1idc89cr081b"))))
+ (arguments
+ '(#:tests? #f ;XXX: no tests in rubygem
+ #:gem-flags (list "--" "--use-system-libraries"
+ (string-append "--with-xml2-include="
+ (assoc-ref %build-inputs "libxml2")
+ "/include/libxml2"))))
+ (propagated-inputs
+ (modify-inputs (package-propagated-inputs ruby-nokogiri-1.10)
+ (replace "ruby-mini-portile" ruby-mini-portile-2.6.1)))))
+
(define-public ruby-method-source
(package
(name "ruby-method-source")
@@ -5997,13 +5986,13 @@ documentation for Ruby code.")
(define-public ruby-tins
(package
(name "ruby-tins")
- (version "1.15.0")
+ (version "1.29.1")
(source (origin
(method url-fetch)
(uri (rubygems-uri "tins" version))
(sha256
(base32
- "09whix5a7ics6787zrkwjmp16kqyh6560p9f317syks785805f7s"))))
+ "0nzp88y19rqlcizp1nw8m44fvfxs9g3bhjpscz44dwfawfrmr0cb"))))
(build-system ruby-build-system)
;; This gem needs gem-hadar at development time, but gem-hadar needs tins
;; at runtime. To avoid the dependency on gem-hadar we disable rebuilding
@@ -6019,6 +6008,8 @@ documentation for Ruby code.")
(substitute* "tins.gemspec"
(("\"lib/spruz\", ") ""))
(invoke "gem" "build" "tins.gemspec"))))))
+ (propagated-inputs
+ `(("ruby-sync" ,ruby-sync)))
(synopsis "Assorted tools for Ruby")
(description "Tins is a Ruby library providing assorted tools.")
(home-page "https://github.com/flori/tins")
@@ -6254,13 +6245,13 @@ a native C extension.")
(define-public ruby-json-pure
(package
(name "ruby-json-pure")
- (version "2.2.0")
+ (version "2.3.1")
(source (origin
(method url-fetch)
(uri (rubygems-uri "json_pure" version))
(sha256
(base32
- "0m0j1mfwv0mvw72kzqisb26xjl236ivqypw1741dkis7s63b8439"))))
+ "00pziwkfqwk8vj19s65sdki31q1wvmf5v9b3sfglxm94qfvas1lx"))))
(build-system ruby-build-system)
(arguments
`(#:phases
@@ -6269,28 +6260,13 @@ a native C extension.")
(lambda _
(substitute* "Rakefile"
;; Since this is not a git repository, do not call 'git'.
- (("`git ls-files`") "`find . -type f |sort`")
- ;; Loosen dependency constraint.
- (("'test-unit', '~> 2.0'") "'test-unit', '>= 2.0'"))
- #t))
- (add-after 'replace-git-ls-files 'regenerate-gemspec
- (lambda _
- ;; Regenerate gemspec so loosened dependency constraints are
- ;; propagated.
- (invoke "rake" "gemspec")))
- (add-after 'regenerate-gemspec 'fix-json-java.gemspec
- (lambda _
- ;; This gemspec doesn't look to be generated by the above
- ;; command, so patch it separately.
- (substitute* "json-java.gemspec"
- (("%q<test-unit>\\.freeze, \\[\"~> 2\\.0\"\\]")
- "%q<test-unit>.freeze, [\">= 2.0\"]"))
- #t)))))
+ (("`git ls-files`") "`find . -type f |sort`")))))))
(native-inputs
`(("bundler" ,bundler)
("ragel" ,ragel)
("ruby-simplecov" ,ruby-simplecov)
- ("ruby-test-unit" ,ruby-test-unit)))
+ ("ruby-test-unit" ,ruby-test-unit)
+ ("which" ,which)))
(synopsis "JSON implementation in pure Ruby")
(description
"This package provides a JSON implementation written in pure Ruby.")
@@ -6410,28 +6386,22 @@ you about the changes.")
(define-public ruby-loofah
(package
(name "ruby-loofah")
- (version "2.3.1")
+ (version "2.13.0")
+ (home-page "https://github.com/flavorjones/loofah")
(source
(origin
- (method url-fetch)
- (uri (rubygems-uri "loofah" version))
+ ;; Build from git because the gem lacks tests.
+ (method git-fetch)
+ (uri (git-reference (url home-page)
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
(sha256
(base32
- "0npqav026zd7r4qdidq9x5nxcp2dzg71bnp421xxx7sngbxf2xbd"))))
+ "0rmsm7mckiq0gslfqdl02yvn500n42v84gq28qjqn4yq9jwfs9ga"))))
(build-system ruby-build-system)
- (arguments
- '(#:phases
- (modify-phases %standard-phases
- (add-after 'unpack 'remove-unnecessary-dependencies
- (lambda _
- ;; concourse is a development tool which is unused, so remove it
- ;; so it's not required.
- (substitute* "Rakefile"
- (("require \"concourse\"") "")
- (("Concourse\\.new.*") "task :concourse do\n"))
- #t)))))
(native-inputs
`(("ruby-hoe" ,ruby-hoe)
+ ("ruby-hoe-markdown" ,ruby-hoe-markdown)
("ruby-rr" ,ruby-rr)))
(propagated-inputs
`(("ruby-nokogiri" ,ruby-nokogiri)
@@ -6440,7 +6410,6 @@ you about the changes.")
(description
"Loofah is a general library for manipulating and transforming HTML/XML
documents and fragments. It's built on top of Nokogiri and libxml2.")
- (home-page "https://github.com/flavorjones/loofah")
(license license:expat)))
(define-public ruby-activesupport
@@ -6557,6 +6526,24 @@ acceptable elements, attributes, and CSS properties, Sanitize will remove all
unacceptable HTML and/or CSS from a string.")
(license license:expat)))
+(define-public ruby-sync
+ (package
+ (name "ruby-sync")
+ (version "0.5.0")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (rubygems-uri "sync" version))
+ (sha256
+ (base32
+ "1z9qlq4icyiv3hz1znvsq1wz2ccqjb1zwd6gkvnwg6n50z65d0v6"))))
+ (build-system ruby-build-system)
+ (synopsis "Ruby module with a two-phase lock and counter")
+ (description "This package provides a Ruby module that provides a two-phase
+lock with a counter.")
+ (home-page "https://github.com/ruby/sync")
+ (license license:bsd-2)))
+
(define-public ruby-oj
(package
(name "ruby-oj")
@@ -6678,31 +6665,6 @@ with PostgreSQL 9.0 and later.")
(define-public ruby-byebug
(package
(name "ruby-byebug")
- (version "9.0.6")
- (source
- (origin
- (method url-fetch)
- (uri (rubygems-uri "byebug" version))
- (sha256
- (base32
- "1kbfcn65rgdhi72n8x9l393b89rvi5z542459k7d1ggchpb0idb0"))))
- (build-system ruby-build-system)
- (arguments
- '(#:tests? #f)) ; no tests
- (synopsis "Debugger for Ruby 2")
- (description "Byebug is a Ruby 2 debugger implemented using the Ruby 2
-TracePoint C API for execution control and the Debug Inspector C API for call
-stack navigation. The core component provides support that front-ends can
-build on. It provides breakpoint handling and bindings for stack frames among
-other things and it comes with a command line interface.")
- (home-page "https://github.com/deivid-rodriguez/byebug")
- (license license:bsd-2)))
-
-;;; TODO: Make it the default byebug in core-updates.
-(define-public ruby-byebug-11
- (package
- (inherit ruby-byebug)
- (name "ruby-byebug")
(version "11.1.3")
(source
(origin
@@ -6726,9 +6688,9 @@ other things and it comes with a command line interface.")
(("load File\\.expand_path\\(\"bundle\".*") "")
(("require \"bundler/setup\".*") "")))
#t))))
+ (build-system ruby-build-system)
(arguments
- `(#:tests? #t
- #:phases
+ `(#:phases
(modify-phases %standard-phases
(add-after 'unpack 'skip-tmp-path-sensitive-test
(lambda _
@@ -6739,6 +6701,12 @@ other things and it comes with a command line interface.")
(add-before 'build 'compile
(lambda _
(invoke "rake" "compile")))
+ (add-before 'check 'disable-misbehaving-test
+ ;; Expects 5, gets 162. From a file containing ~10 lines.
+ (lambda _
+ (substitute* "test/commands/finish_test.rb"
+ (("test_finish_inside_autoloaded_files")
+ "finish_inside_autoloaded_files"))))
(add-before 'check 'set-home
(lambda _
(setenv "HOME" (getcwd))
@@ -6750,7 +6718,15 @@ other things and it comes with a command line interface.")
("ruby-pry" ,ruby-pry)
("ruby-rake-compiler" ,ruby-rake-compiler)
("ruby-rubocop" ,ruby-rubocop)
- ("ruby-yard" ,ruby-yard)))))
+ ("ruby-yard" ,ruby-yard)))
+ (synopsis "Debugger for Ruby 2")
+ (description "Byebug is a Ruby 2 debugger implemented using the Ruby 2
+TracePoint C API for execution control and the Debug Inspector C API for call
+stack navigation. The core component provides support that front-ends can
+build on. It provides breakpoint handling and bindings for stack frames among
+other things and it comes with a command line interface.")
+ (home-page "https://github.com/deivid-rodriguez/byebug")
+ (license license:bsd-2)))
(define-public ruby-netrc
(package
@@ -6772,8 +6748,11 @@ other things and it comes with a command line interface.")
(lambda _
(for-each (lambda (file)
(invoke "ruby" "-Itest" file))
- (find-files "./test" "test_.*\\.rb"))
- #t)))))
+ (find-files "./test" "test_.*\\.rb"))))
+ (add-before 'check 'patch-tests-for-newer-ruby
+ (lambda _
+ (substitute* "test/test_netrc.rb"
+ (("Dir.pwd, '.netrc'") "Netrc.home_path, '.netrc'")))))))
(native-inputs
`(("ruby-minitest" ,ruby-minitest)))
(synopsis "Library to read and update netrc files")
@@ -6861,7 +6840,8 @@ tree-like structures. It is similar to Ruby's built-in @code{TSort} module.")
(build-system ruby-build-system)
(propagated-inputs
`(("ruby-tdiff" ,ruby-tdiff)
- ("ruby-nokogiri" ,ruby-nokogiri)))
+ ;; Use a fixed version to prevent rebuilds; see ruby-nokogiri TODO.
+ ("ruby-nokogiri" ,ruby-nokogiri-1.10)))
(native-inputs
`(("ruby-rspec" ,ruby-rspec)
("ruby-yard" ,ruby-yard)
@@ -6876,15 +6856,17 @@ differences (added or removed nodes) between two XML/HTML documents.")
(define-public ruby-racc
(package
(name "ruby-racc")
- (version "1.4.14")
+ (version "1.5.2")
(source
(origin
(method url-fetch)
(uri (rubygems-uri "racc" version))
(sha256
(base32
- "00yhs2ag7yy5v83mqvkbnhk9bvsh6mx3808k53n61ddzx446v1zl"))))
+ "178k7r0xn689spviqzhvazzvxfq6fyjldxb3ywjbgipbfi4s8j1g"))))
(build-system ruby-build-system)
+ (arguments
+ `(#:tests? #f)) ; Fails while parsing test instructions.
(native-inputs
`(("ruby-hoe" ,ruby-hoe)
("ruby-rake-compiler" ,ruby-rake-compiler)))
@@ -7251,35 +7233,38 @@ following: @code{[1, 2, 3, 4, 6, 8, 9, 10]} into @code{[1..4, 6..6, 8..10]}.")
(license license:expat)))
(define-public ruby-regexp-property-values
- (package
- (name "ruby-regexp-property-values")
- (version "1.0.0")
- (source
- (origin
- (method git-fetch)
- (uri (git-reference ;no test suite in distributed gem
- (url "https://github.com/jaynetics/regexp_property_values")
- (commit (string-append "v" version))))
- (file-name (git-file-name name version))
- (sha256
- (base32
- "0l3fjmscg1wxn7kc6bl022cc6k5d91pwb7daq1b5w36kvsx52w1j"))))
- (build-system ruby-build-system)
- (arguments
- '(#:test-target "default"))
- (native-inputs
- `(("ruby-character-set" ,ruby-character-set)
- ("ruby-rake-compiler" ,ruby-rake-compiler)
- ("ruby-range-compressor" ,ruby-range-compressor)
- ("ruby-rspec" ,ruby-rspec)))
- (synopsis "Inspect Ruby's regex engine property values")
- (description "This small library lets you see which property values are
+ (let ((commit "03007a66c912949a7130b973cc0eca109c20811f")
+ (revision "1"))
+ (package
+ (name "ruby-regexp-property-values")
+ (version (git-version "1.0.0" revision commit))
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference ;no test suite in distributed gem
+ (url "https://github.com/jaynetics/regexp_property_values")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1zsax784p16zdkf60lyq9z924zvsafhx9ckxx9srsgkyiqrifi1s"))))
+ (build-system ruby-build-system)
+ (arguments
+ '(#:test-target "default"))
+ (native-inputs
+ `(("ruby-character-set" ,ruby-character-set)
+ ("ruby-rake" ,ruby-rake)
+ ("ruby-rake-compiler" ,ruby-rake-compiler)
+ ("ruby-range-compressor" ,ruby-range-compressor)
+ ("ruby-rspec" ,ruby-rspec)))
+ (synopsis "Inspect Ruby's regex engine property values")
+ (description "This small library lets you see which property values are
supported by the regular expression engine of the Ruby version you are running
and can directly read out their code point ranges. In other words, it
determines all supported values for @code{\\p{value}} expressions and what
they match.")
- (home-page "https://github.com/jaynetics/regexp_property_values")
- (license license:expat)))
+ (home-page "https://github.com/jaynetics/regexp_property_values")
+ (license license:expat))))
(define-public ruby-regexp-parser
(package
@@ -7410,7 +7395,6 @@ run.")
("ruby-parser" ,ruby-parser)
("ruby-rainbow" ,ruby-rainbow)
("ruby-regexp-parser" ,ruby-regexp-parser)
- ("ruby-rexml" ,ruby-rexml)
("ruby-rubocop-ast" ,ruby-rubocop-ast)
("ruby-progressbar" ,ruby-progressbar)
("ruby-unicode-display-width" ,ruby-unicode-display-width)))
@@ -7691,7 +7675,7 @@ notes.")
("ruby-rubocop" ,ruby-rubocop)
("ruby-simplecov" ,ruby-simplecov)))
(propagated-inputs
- `(("ruby-byebug" ,ruby-byebug-11)
+ `(("ruby-byebug" ,ruby-byebug)
("ruby-pry" ,ruby-pry)))
(synopsis "Step-by-step debugging and stack navigation in Pry")
(description "This package adds step-by-step debugging and stack
@@ -7800,14 +7784,14 @@ variable length integers (varint) in Ruby Protocol Buffers.")
(define-public ruby-ruby-prof
(package
(name "ruby-ruby-prof")
- (version "1.4.1")
+ (version "1.4.3")
(source
(origin
(method url-fetch)
(uri (rubygems-uri "ruby-prof" version))
(sha256
(base32
- "12cd91m08ih0imfpy4k87618hd4mhyz291a6bx2hcskza4nf6d27"))))
+ "1r3xalp91l07m0cwllcxjzg6nkviiqnxkcbgg5qnzsdji6rgy65m"))))
(build-system ruby-build-system)
(arguments
`(#:phases
@@ -9978,17 +9962,50 @@ generation.")
(home-page "https://github.com/jbarnette/hoe-git")
(license license:expat)))
+(define-public ruby-hoe-markdown
+ (package
+ (name "ruby-hoe-markdown")
+ (version "1.4.0")
+ (home-page "https://github.com/flavorjones/hoe-markdown")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url home-page)
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "0wb0yjdx9gx9r0cahpx42pblvglgh1i9pdfxjavq7f40nan2g076"))))
+ (build-system ruby-build-system)
+ (arguments
+ '(#:test-target "spec"
+ #:phases (modify-phases %standard-phases
+ (add-before 'check 'disable-bundler-dependency
+ (lambda _
+ (substitute* "spec/spec_helper.rb"
+ (("require.*bundler/setup.*")
+ "")))))))
+ (native-inputs
+ `(("ruby-rspec" ,ruby-rspec)))
+ (propagated-inputs
+ `(("ruby-rake" ,ruby-rake)))
+ (synopsis "Hoe plugin with Markdown helpers")
+ (description
+ "This package provides a Hoe plugin with various Markdown helpers, which
+can be used to e.g. hyperlink Markdown documentation between project files.")
+ (license license:expat)))
+
(define-public ruby-sequel
(package
(name "ruby-sequel")
- (version "4.49.0")
+ (version "5.47.0")
(source
(origin
(method url-fetch)
(uri (rubygems-uri "sequel" version))
(sha256
(base32
- "010p4a60npppvgbyw7pq5xia8aydpgxdlhh3qjm2615kwjsw3fl8"))))
+ "03pmhj4kc3ga75wy397l57bvd18jxxmrk3qsznjw93b993qgvj3z"))))
(build-system ruby-build-system)
(arguments
'(#:tests? #f)) ; Avoid dependency loop with ruby-minitest-hooks.
@@ -10696,7 +10713,8 @@ the @file{spec} directory.")
`(("ruby-sass-listen" ,ruby-sass-listen)))
(native-inputs
`(("ruby-sass-spec" ,ruby-sass-spec)
- ("ruby-mathn" ,ruby-mathn)))
+ ("ruby-mathn" ,ruby-mathn)
+ ("ruby-cmath" ,ruby-cmath)))
(home-page "https://sass-lang.com/")
(synopsis "CSS extension language")
(description "Sass is a CSS extension language. It extends CSS with
@@ -11233,13 +11251,13 @@ implementation.")
(define-public ruby-rouge
(package
(name "ruby-rouge")
- (version "3.21.0")
+ (version "3.26.1")
(source (origin
(method url-fetch)
(uri (rubygems-uri "rouge" version))
(sha256
(base32
- "1agrrmj88k9jkk36ra1ml2c1jffpp595pkxmcla74ac9ia09vn3s"))))
+ "197k0vskf72wxx0gzwld2jzg27bb7982xlvnzy9adlvkzp7nh8vf"))))
(build-system ruby-build-system)
(arguments `(#:tests? #f)); No rakefile
(home-page "http://rouge.jneen.net/")
@@ -12482,3 +12500,28 @@ resource assignment, cost and revenue planning, risk and communication
management, status tracking and reporting.")
(home-page "https://taskjuggler.org")
(license license:gpl2)))
+
+(define-public ruby-cmath
+ (package
+ (name "ruby-cmath")
+ (version "1.0.0")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (rubygems-uri "cmath" version))
+ (sha256
+ (base32
+ "1xkz6xyhpkjbdvpdib8450w62rls1mjryz0gzbbnadxkxn82nb8m"))))
+ (build-system ruby-build-system)
+ (arguments
+ `(#:tests? #false))
+ (native-inputs
+ `(("bundler" ,bundler)
+ ("ruby-rake-compiler" ,ruby-rake-compiler)))
+ (synopsis "Trigonometric functions for complex numbers")
+ (description
+ "This gem is a library that provides trigonometric and transcendental
+functions for complex numbers. The functions in this module accept integers,
+floating-point numbers or complex numbers as arguments.")
+ (home-page "https://github.com/ruby/cmath")
+ (license license:bsd-2)))
diff --git a/gnu/packages/rust-apps.scm b/gnu/packages/rust-apps.scm
index ab84065361..5ad8fbd2cc 100644
--- a/gnu/packages/rust-apps.scm
+++ b/gnu/packages/rust-apps.scm
@@ -483,8 +483,7 @@ characters, ASCII whitespace characters, other ASCII characters and non-ASCII.")
"0m5lrvx6wwkxqdc5digm1k4diiaqcg5j4pia77s5nw1aam7k51hy"))))
(build-system cargo-build-system)
(arguments
- `(#:rust ,rust-1.46
- #:modules ((guix build cargo-build-system)
+ `(#:modules ((guix build cargo-build-system)
(guix build utils)
(srfi srfi-26))
#:cargo-inputs
@@ -691,7 +690,7 @@ gitignore rules.")
(origin
(method url-fetch)
(uri (crate-uri "cbindgen" version))
- (file-name (string-append name "-" version ".crate"))
+ (file-name (string-append name "-" version ".tar.xz"))
(sha256
(base32
"0673pq96hs7waavkv58v2pakpxpsfyjvbraa5kyl2b44phgdzcid"))))
@@ -933,8 +932,7 @@ of the project is to be runnable on untrusted networks without crashing.")
(base32 "0hzyqpjxya6g1ifb3hvjvj0zl2aigx898pz7h5pl46z50jp2pdc8"))))
(build-system cargo-build-system)
(arguments
- `(#:rust ,rust-1.52
- #:cargo-build-flags '("--release" "--features" "external-harfbuzz")
+ `(#:cargo-build-flags '("--release" "--features" "external-harfbuzz")
#:cargo-inputs
(("rust-atty" ,rust-atty-0.2)
("rust-byte-unit" ,rust-byte-unit-4)
@@ -1177,8 +1175,7 @@ runs a command whenever it detects modifications.")
"06bc3s5kjwpyr2cq79p0306a9bqp3xp928d750ybby9npq2dvj3z"))))
(build-system cargo-build-system)
(arguments
- `(#:rust ,rust-1.52
- #:install-source? #f ; virtual manifest
+ `(#:install-source? #f ; virtual manifest
#:cargo-test-flags
'("--release" "--"
"--skip=tests::test_version_check" ;; It need rustc's version
@@ -1305,8 +1302,7 @@ support for Rust.")
"0fwdxhdj2963xr6xfqr56i7hikhsdv562vgxq2dj3h2mi3dil1k6"))))
(build-system cargo-build-system)
(arguments
- `(#:rust ,rust-1.52 ;inherited from rust-cargo
- #:cargo-inputs
+ `(#:cargo-inputs
(("rust-cbindgen" ,rust-cbindgen-0.19)
("rust-cargo" ,rust-cargo-0.53) ;
("rust-anyhow" ,rust-anyhow-1)
diff --git a/gnu/packages/rust.scm b/gnu/packages/rust.scm
index 73f94a3929..2a43e88727 100644
--- a/gnu/packages/rust.scm
+++ b/gnu/packages/rust.scm
@@ -4,13 +4,14 @@
;;; Copyright © 2016 Nikita <nikita@n0.is>
;;; Copyright © 2017 Ben Woodcroft <donttrustben@gmail.com>
;;; Copyright © 2017, 2018 Nikolai Merinov <nikolai.merinov@member.fsf.org>
-;;; Copyright © 2017, 2019, 2020 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2017, 2019, 2020, 2021 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2018, 2019 Tobias Geerinckx-Rice <me@tobias.gr>
;;; Copyright © 2018 Danny Milosavljevic <dannym+a@scratchpost.org>
;;; Copyright © 2019 Ivan Petkov <ivanppetkov@gmail.com>
;;; Copyright © 2020, 2021 Jakub Kądziołka <kuba@kadziolka.net>
;;; Copyright © 2020 Pierre Langlois <pierre.langlois@gmx.com>
;;; Copyright © 2020 Matthew James Kraai <kraai@ftbfs.org>
+;;; Copyright © 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -107,1372 +108,671 @@
(inherit base-rust)
(version version)
(source
- (origin
- (inherit (package-source base-rust))
- (uri (rust-uri version))
- (sha256 (base32 checksum))))
+ (origin
+ (inherit (package-source base-rust))
+ (uri (rust-uri version))
+ (sha256 (base32 checksum))))
(native-inputs
(alist-replace "cargo-bootstrap" (list base-rust "cargo")
(alist-replace "rustc-bootstrap" (list base-rust)
(package-native-inputs base-rust))))))
-(define-public mrustc
- (let ((rustc-version "1.19.0"))
- (package
- (name "mrustc")
- (version "0.9")
- (source (origin
- (method git-fetch)
- (uri (git-reference
- (url "https://github.com/thepowersgang/mrustc")
- (commit (string-append "v" version))))
- (file-name (git-file-name name version))
- (sha256
- (base32
- "194ny7vsks5ygiw7d8yxjmp1qwigd71ilchis6xjl6bb2sj97rd2"))))
- (outputs '("out" "cargo"))
- (build-system gnu-build-system)
- (inputs
- `(("zlib" ,zlib)))
- (native-inputs
- `(("bison" ,bison)
- ("flex" ,flex)
- ;; Required for the libstd sources.
- ("rustc" ,(package-source rust-1.19))))
- (arguments
- `(#:test-target "test"
- #:make-flags
- (list ,(string-append "RUSTC_TARGET="
- (or (%current-target-system)
- (nix-system->gnu-triplet-for-rust))))
- #:phases
- (modify-phases %standard-phases
- (add-after 'unpack 'patch-date
- (lambda _
- (substitute* "Makefile"
- (("shell date") "shell date -d @1"))
- (substitute* "run_rustc/Makefile"
- (("[$]Vtime ") "$V "))
- #t))
- (add-after 'patch-date 'unpack-target-compiler
- (lambda* (#:key inputs outputs #:allow-other-keys)
- (invoke "tar" "xf" (assoc-ref inputs "rustc"))
- (chdir ,(string-append "rustc-" rustc-version "-src"))
- (invoke "patch" "-p0" ,(string-append "../rustc-" rustc-version
- "-src.patch"))
- (chdir "..")
- (setenv "RUSTC_VERSION" ,rustc-version)
- (setenv "MRUSTC_TARGET_VER"
- ,(version-major+minor rustc-version))
- (setenv "OUTDIR_SUF" "")
- #t))
- (replace 'configure
- (lambda* (#:key inputs #:allow-other-keys)
- (setenv "CC" (string-append (assoc-ref inputs "gcc")
- "/bin/gcc"))
- (setenv "CXX" (string-append (assoc-ref inputs "gcc")
- "/bin/g++"))
- #t))
- (add-after 'build 'build-minicargo
- (lambda* (#:key make-flags #:allow-other-keys)
- ;; TODO: minicargo.mk: RUSTC_VERSION=$(RUSTC_VERSION) RUSTC_CHANNEL=$(RUSTC_SRC_TY) OUTDIR_SUF=$(OUTDIR_SUF)
- (apply invoke "make" "-f" "minicargo.mk" "LIBS" make-flags)
- (apply invoke "make" "-C" "tools/minicargo" make-flags)))
- ;(add-after 'check 'check-locally
- ; (lambda* (#:key make-flags #:allow-other-keys)
- ; ;; The enum test wouldn't work otherwise.
- ; ;; See <https://github.com/thepowersgang/mrustc/issues/137>.
- ; (setenv "MRUSTC_TARGET_VER" ,(version-major+minor rustc-version))
- ; (apply invoke "make" "local_tests" make-flags)))
- (replace 'install
- (lambda* (#:key inputs outputs #:allow-other-keys)
- (let* ((out (assoc-ref outputs "out"))
- (bin (string-append out "/bin"))
- (tools-bin (string-append out "/tools/bin"))
- (cargo-out (assoc-ref outputs "cargo"))
- (cargo-bin (string-append cargo-out "/bin"))
- (lib (string-append out "/lib"))
- (lib/rust (string-append lib "/mrust"))
- (gcc (assoc-ref inputs "gcc"))
- (run_rustc (string-append out
- "/share/mrustc/run_rustc")))
- ;; These files are not reproducible.
- (for-each delete-file (find-files "output" "\\.txt$"))
- ;(delete-file-recursively "output/local_tests")
- (mkdir-p (dirname lib/rust))
- (copy-recursively "output" lib/rust)
- (mkdir-p bin)
- (mkdir-p tools-bin)
- (install-file "bin/mrustc" bin)
- ;; minicargo uses relative paths to resolve mrustc.
- (install-file "tools/bin/minicargo" tools-bin)
- (install-file "tools/bin/minicargo" cargo-bin)
- (mkdir-p run_rustc)
- (copy-file "run_rustc/Makefile"
- (string-append run_rustc "/Makefile"))
- #t))))))
- (synopsis "Compiler for the Rust programming language")
- (description "Rust is a systems programming language that provides memory
-safety and thread safety guarantees.")
- (home-page "https://github.com/thepowersgang/mrustc")
- ;; Dual licensed.
- (license (list license:asl2.0 license:expat)))))
-
-(define rust-1.19
+;;; Note: mrustc's only purpose is to be able to bootstap Rust; it's designed
+;;; to be used in source form. The latest support for bootstrapping from
+;;; 1.39.0 is not yet released so use the latest commit (see:
+;;; https://github.com/thepowersgang/mrustc/issues/185).
+(define %mrustc-commit "474bec9cfd7862a20e7288cecd7fcf5e18648b9a")
+(define %mrustc-source
+ (let* ((version "0.9")
+ (commit %mrustc-commit)
+ (revision "1")
+ (name "mrustc"))
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/thepowersgang/mrustc")
+ (commit commit)))
+ (file-name (git-file-name name (git-version version revision commit)))
+ (sha256
+ (base32
+ "1zacz5qia0r457mv74wvrvznnv4az5g2w9j8ji9ssy727wljhvz7")))))
+
+;;; Rust 1.39 is special in that it is built with mrustc, which shortens the
+;;; bootstrap path.
+(define rust-1.39
(package
(name "rust")
- (version "1.19.0")
+ (version "1.39.0")
(source
- (origin
- (method url-fetch)
- (uri (rust-uri "1.19.0"))
- (sha256 (base32 "0l8c14qsf42rmkqy92ahij4vf356dbyspxcips1aswpvad81y8qm"))
- (modules '((guix build utils)))
- (snippet '(begin (delete-file-recursively "src/llvm") #t))
- (patches (search-patches "rust-1.19-mrustc.patch"))))
+ (origin
+ (method url-fetch)
+ (uri (rust-uri version))
+ (sha256 (base32 "0mwkc1bnil2cfyf6nglpvbn2y0zfbv44zfhsd5qg4c9rm6vgd8dl"))
+ (modules '((guix build utils)))
+ (snippet '(for-each delete-file-recursively
+ '("src/llvm-emscripten"
+ "src/llvm-project"
+ "vendor/jemalloc-sys/jemalloc")))
+ (patches (search-patches "rustc-1.39.0-src.patch"))
+ (patch-flags '("-p0")))) ;default is -p1
(outputs '("out" "cargo"))
- (properties '((timeout . 72000) ;20 hours
- (max-silent-time . 18000))) ;5 hours (for armel)
+ (properties '((timeout . 72000) ;20 hours
+ (max-silent-time . 18000))) ;5 hours (for armel)
+ (build-system gnu-build-system)
+ (inputs
+ `(("libcurl" ,curl)
+ ("libssh2" ,libssh2)
+ ("llvm" ,llvm)
+ ("openssl" ,openssl)
+ ("zlib" ,zlib)))
+ (native-inputs
+ `(("bison" ,bison)
+ ("flex" ,flex)
+ ("pkg-config" ,pkg-config)
+ ;; Required for the libstd sources.
+ ("mrustc-source" ,%mrustc-source)))
(arguments
`(#:imported-modules ,%cargo-utils-modules ;for `generate-all-checksums'
- #:modules ((guix build utils) (ice-9 match) (guix build gnu-build-system))
+ #:modules ((guix build cargo-utils)
+ (guix build utils)
+ (guix build gnu-build-system))
+ #:test-target "test"
+ ;; Rust's own .so library files are not found in any RUNPATH, but
+ ;; that doesn't seem to cause issues.
+ #:validate-runpath? #f
+ #:make-flags
+ (list ,(string-append "RUSTC_TARGET="
+ (or (%current-target-system)
+ (nix-system->gnu-triplet-for-rust)))
+ ,(string-append "RUSTC_VERSION=" version)
+ ,(string-append "MRUSTC_TARGET_VER="
+ (version-major+minor version))
+ "OUTDIR_SUF=") ;do not add version suffix to output dir
#:phases
(modify-phases %standard-phases
- (add-after 'unpack 'set-env
+ (add-after 'unpack 'patch-reference-to-cc
+ ;; This prevents errors like 'error: linker `cc` not found' when
+ ;; "cc" is not found on PATH.
(lambda* (#:key inputs #:allow-other-keys)
- ;; Disable test for cross compilation support.
- (setenv "CFG_DISABLE_CROSS_TESTS" "1")
- (setenv "SHELL" (which "sh"))
- (setenv "CONFIG_SHELL" (which "sh"))
- (setenv "CC" (string-append (assoc-ref inputs "gcc") "/bin/gcc"))
- ;; guix llvm-3.9.1 package installs only shared libraries
- (setenv "LLVM_LINK_SHARED" "1")
- #t))
- (add-after 'unpack 'patch-cargo-tomls
- (lambda* (#:key inputs outputs #:allow-other-keys)
- (substitute* "src/librustc_errors/Cargo.toml"
- (("[[]dependencies[]]") "
-[dependencies]
-term = \"0.4.4\"
-"))
- (substitute* "src/librustc/Cargo.toml"
- (("[[]dependencies[]]") "
-[dependencies]
-getopts = { path = \"../libgetopts\" }
-"))
- (substitute* "src/librustdoc/Cargo.toml"
- (("[[]dependencies[]]") "
-[dependencies]
-test = { path = \"../libtest\" }
-"))
- #t))
- (add-after 'unpack 'patch-tests
+ (let ((gcc (assoc-ref inputs "gcc")))
+ (substitute* (find-files "." "^link.rs$")
+ (("\"cc\".as_ref")
+ (format #f "~s.as_ref" (string-append gcc "/bin/gcc")))))))
+ (add-after 'unpack 'setup-mrustc-sources
(lambda* (#:key inputs #:allow-other-keys)
- (let ((bash (assoc-ref inputs "bash")))
- (substitute* "src/libstd/process.rs"
- ;; The newline is intentional.
- ;; There's a line length "tidy" check in Rust which would
- ;; fail otherwise.
- (("\"/bin/sh\"") (string-append "\n\"" bash "/bin/sh\"")))
- (substitute* "src/libstd/net/tcp.rs"
- ;; There is no network in build environment
- (("fn connect_timeout_unroutable")
- "#[ignore]\nfn connect_timeout_unroutable"))
- ;; <https://lists.gnu.org/archive/html/guix-devel/2017-06/msg00222.html>
- (substitute* "src/libstd/sys/unix/process/process_common.rs"
- (("fn test_process_mask") "#[allow(unused_attributes)]
- #[ignore]
- fn test_process_mask"))
- #t)))
- (add-after 'patch-tests 'patch-aarch64-test
- (lambda* _
- (substitute* "src/librustc_back/dynamic_lib.rs"
- ;; This test is known to fail on aarch64 and powerpc64le:
- ;; https://github.com/rust-lang/rust/issues/45410
- (("fn test_loading_cosine") "#[ignore]\nfn test_loading_cosine"))
- #t))
- (add-after 'patch-tests 'use-readelf-for-tests
+ (copy-recursively (assoc-ref inputs "mrustc-source") "../mrustc")
+ ;; The Makefile of mrustc expects the sources directory of rustc
+ ;; to be at this location, and it simplifies things to make it
+ ;; so.
+ (symlink (getcwd)
+ (string-append "../mrustc/rustc-" ,version "-src"))))
+ (add-after 'setup-mrustc-sources 'patch-makefiles
+ ;; This disables building the (unbundled) LLVM.
+ (lambda* (#:key inputs parallel-build? #:allow-other-keys)
+ (let ((llvm (assoc-ref inputs "llvm"))
+ (job-spec (format #f "-j~a"
+ (if parallel-build?
+ (number->string (parallel-job-count))
+ "1"))))
+ (with-directory-excursion "../mrustc"
+ (substitute* '("minicargo.mk"
+ "run_rustc/Makefile")
+ ;; Use the system-provided LLVM.
+ (("LLVM_CONFIG := .*")
+ (string-append "LLVM_CONFIG := " llvm "/bin/llvm-config\n"))
+ (("\\$\\(LLVM_CONFIG\\): .*")
+ "$(LLVM_CONFIG):\n")
+ (("\\$Vcd \\$\\(RUSTCSRC\\)build && \\$\\(MAKE\\).*")
+ "true\n"))
+ (substitute* "Makefile"
+ ;; Patch date and git obtained version information.
+ ((" -D VERSION_GIT_FULLHASH=.*")
+ (string-append
+ " -D VERSION_GIT_FULLHASH=\\\"" ,%mrustc-commit "\\\""
+ " -D VERSION_GIT_BRANCH=\\\"master\\\""
+ " -D VERSION_GIT_SHORTHASH=\\\""
+ ,(string-take %mrustc-commit 7) "\\\""
+ " -D VERSION_BUILDTIME="
+ "\"\\\"Thu, 01 Jan 1970 00:00:01 +0000\\\"\""
+ " -D VERSION_GIT_ISDIRTY=0\n"))
+ ;; Do not try to fetch sources from the Internet.
+ ((": \\$\\(RUSTC_SRC_DL\\)")
+ ":"))
+ (substitute* "run_rustc/Makefile"
+ (("[$]Vtime ")
+ "$V ")
+ ;; Unlock the number of parallel jobs for cargo.
+ (("-j [[:digit:]]+ ")
+ "")
+ ;; Patch the shebang of a generated wrapper for rustc
+ (("#!/bin/sh")
+ (string-append "#!" (which "sh"))))))))
+ (add-after 'patch-generated-file-shebangs 'patch-cargo-checksums
(lambda* _
- ;; nm doesn't recognize the file format because of the
- ;; nonstandard sections used by the Rust compiler, but readelf
- ;; ignores them.
- (substitute* "src/test/run-make/atomic-lock-free/Makefile"
- (("\tnm ")
- "\treadelf -c "))
- #t))
- (add-after 'patch-tests 'remove-unsupported-tests
- (lambda* _
- ;; Our ld-wrapper cannot process non-UTF8 bytes in LIBRARY_PATH.
- ;; <https://lists.gnu.org/archive/html/guix-devel/2017-06/msg00193.html>
- (delete-file-recursively "src/test/run-make/linker-output-non-utf8")
- #t))
- (add-after 'patch-source-shebangs 'patch-cargo-checksums
- (lambda* _
- (use-modules (guix build cargo-utils))
- (substitute* "src/Cargo.lock"
- (("(\"checksum .* = )\".*\"" all name)
+ (substitute* "Cargo.lock"
+ (("(checksum = )\".*\"" all name)
(string-append name "\"" ,%cargo-reference-hash "\"")))
- (generate-all-checksums "src/vendor")
- #t))
- ;; This phase is overridden by newer versions.
+ (generate-all-checksums "vendor")))
+ (add-before 'configure 'configure-cargo-home
+ (lambda _
+ (let ((cargo-home (string-append (getcwd) "/.cargo")))
+ (mkdir-p cargo-home)
+ (setenv "CARGO_HOME" cargo-home))))
(replace 'configure
- (const #t))
- ;; This phase is overridden by newer versions.
+ (lambda _
+ (setenv "CC" "gcc")
+ (setenv "CXX" "g++")
+ ;; The Guix LLVM package installs only shared libraries.
+ (setenv "LLVM_LINK_SHARED" "1")
+ ;; This is a workaround for
+ ;; https://github.com/thepowersgang/mrustc/issues/138.
+ (setenv "LIBSSH2_SYS_USE_PKG_CONFIG" "yes")
+ ;; rustc still insists on having 'cc' on PATH in some places
+ ;; (e.g. when building the 'test' library crate).
+ (mkdir-p "/tmp/bin")
+ (symlink (which "gcc") "/tmp/bin/cc")
+ (setenv "PATH" (string-append "/tmp/bin:" (getenv "PATH")))))
+ (delete 'patch-generated-file-shebangs)
(replace 'build
- (lambda* (#:key inputs outputs #:allow-other-keys)
- (let ((rustc-bootstrap (assoc-ref inputs "rustc-bootstrap")))
- (setenv "CFG_COMPILER_HOST_TRIPLE"
- ,(nix-system->gnu-triplet (%current-system)))
- (setenv "CFG_RELEASE" "")
- (setenv "CFG_RELEASE_CHANNEL" "stable")
- (setenv "CFG_LIBDIR_RELATIVE" "lib")
- (setenv "CFG_VERSION" "1.19.0-stable-mrustc")
- (setenv "MRUSTC_TARGET_VER" ,(version-major+minor version))
- ; bad: (setenv "CFG_PREFIX" "mrustc") ; FIXME output path.
- (mkdir-p "output")
- ;; mrustc 0.9 doesn't check the search paths for crates anymore.
- (copy-recursively (string-append rustc-bootstrap "/lib/mrust")
- "output")
- (invoke (string-append rustc-bootstrap "/tools/bin/minicargo")
- "src/rustc" "--vendor-dir" "src/vendor"
- "--output-dir" "output/rustc-build"
- "-L" (string-append rustc-bootstrap "/lib/mrust")
- "-j" "1")
- (setenv "CFG_COMPILER_HOST_TRIPLE" #f)
- (setenv "CFG_RELEASE" #f)
- (setenv "CFG_RELEASE_CHANNEL" #f)
- (setenv "CFG_VERSION" #f)
- (setenv "CFG_PREFIX" #f)
- (setenv "CFG_LIBDIR_RELATIVE" #f)
- (invoke (string-append rustc-bootstrap "/tools/bin/minicargo")
- "src/tools/cargo" "--vendor-dir" "src/vendor"
- "--output-dir" "output/cargo-build"
- "-L" "output/"
- "-L" (string-append rustc-bootstrap "/lib/mrust")
- "-j" "1")
- ;; Now use the newly-built rustc to build the libraries.
- ;; One day that could be replaced by:
- ;; (invoke "output/cargo-build/cargo" "build"
- ;; "--manifest-path" "src/bootstrap/Cargo.toml"
- ;; "--verbose") ; "--locked" "--frozen"
- ;; but right now, Cargo has problems with libstd's circular
- ;; dependencies.
- (mkdir-p "output/target-libs")
- (for-each (match-lambda
- ((name . flags)
- (write name)
- (newline)
- (apply invoke
- "output/rustc-build/rustc"
- "-C" (string-append "linker="
- (getenv "CC"))
- ;; Required for libterm.
- "-Z" "force-unstable-if-unmarked"
- "-L" "output/target-libs"
- (string-append "src/" name "/lib.rs")
- "-o"
- (string-append "output/target-libs/"
- (car (string-split name #\/))
- ".rlib")
- flags)))
- '(("libcore")
- ("libstd_unicode")
- ("liballoc")
- ("libcollections")
- ("librand")
- ("liblibc/src" "--cfg" "stdbuild")
- ("libunwind" "-l" "gcc_s")
- ("libcompiler_builtins")
- ("liballoc_system")
- ("libpanic_unwind")
- ;; Uses "cc" to link.
- ("libstd" "-l" "dl" "-l" "rt" "-l" "pthread")
- ("libarena")
-
- ;; Test dependencies:
-
- ("libgetopts")
- ("libterm")
- ("libtest")))
- #t)))
- ;; This phase is overridden by newer versions.
- (replace 'check
- (const #t))
- ;; This phase is overridden by newer versions.
+ (lambda* (#:key make-flags parallel-build? #:allow-other-keys)
+ (let* ((src-root (getcwd))
+ (job-count (if parallel-build?
+ (parallel-job-count)
+ 1))
+ (job-spec (string-append "-j" (number->string job-count))))
+ ;; Adapted from:
+ ;; https://github.com/dtolnay/bootstrap/blob/master/build.sh.
+ (chdir "../mrustc")
+ (setenv "MINICARGO_FLAGS" job-spec)
+ (setenv "CARGO_BUILD_JOBS" (number->string job-count))
+ (display "Building rustc...\n")
+ (apply invoke "make" "-f" "minicargo.mk" "output/rustc"
+ job-spec make-flags)
+ (display "Building cargo...\n")
+ (apply invoke "make" "-f" "minicargo.mk" "output/cargo"
+ job-spec make-flags)
+ (display "Rebuilding stdlib with rustc...\n")
+ ;; Note: invoking make with -j would cause a compiler error
+ ;; (unexpected panic).
+ (apply invoke "make" "-C" "run_rustc" make-flags))))
(replace 'install
(lambda* (#:key inputs outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))
- (target-system ,(or (%current-target-system)
- (nix-system->gnu-triplet
- (%current-system))))
- (out-libs (string-append out "/lib/rustlib/"
- target-system "/lib")))
- ;(setenv "CFG_PREFIX" out)
- (mkdir-p out-libs)
- (copy-recursively "output/target-libs" out-libs)
- (install-file "output/rustc-build/rustc"
- (string-append out "/bin"))
- (install-file "output/rustc-build/rustdoc"
- (string-append out "/bin"))
- (install-file "output/cargo-build/cargo"
- (string-append (assoc-ref outputs "cargo")
- "/bin")))
- #t)))))
- (build-system gnu-build-system)
- (native-inputs
- `(("bison" ,bison) ; For the tests
- ("cmake" ,cmake-minimal)
- ("flex" ,flex) ; For the tests
- ;; FIXME: Rust 1.27 and some later versions require GDB 8.2 specifically.
- ;; See <https://bugs.gnu.org/37810>. Use it on all Rusts for simplicity.
- ("gdb" ,gdb-8.2) ; For the tests
- ("procps" ,procps) ; For the tests
- ("python-2" ,python-2)
- ("rustc-bootstrap" ,mrustc)
- ("cargo-bootstrap" ,mrustc "cargo")
- ("pkg-config" ,pkg-config) ; For "cargo"
- ("which" ,which)))
- (inputs
- `(("jemalloc" ,jemalloc-4.5.0)
- ("llvm" ,llvm-3.9.1)
- ("openssl" ,openssl-1.0)
- ("libssh2" ,libssh2) ; For "cargo"
- ("libcurl" ,curl))) ; For "cargo"
-
- ;; rustc invokes gcc, so we need to set its search paths accordingly.
- ;; Note: duplicate its value here to cope with circular dependencies among
- ;; modules (see <https://bugs.gnu.org/31392>).
- (native-search-paths
- (list (search-path-specification
- (variable "C_INCLUDE_PATH")
- (files '("include")))
- (search-path-specification
- (variable "CPLUS_INCLUDE_PATH")
- (files '("include/c++" "include")))
- (search-path-specification
- (variable "LIBRARY_PATH")
- (files '("lib" "lib64")))))
-
- (supported-systems
- (delete "i686-linux" ; fails to build, see #35519
- %supported-systems))
+ (cargo (assoc-ref outputs "cargo"))
+ (bin (string-append out "/bin"))
+ (rustc (string-append bin "/rustc"))
+ (cargo-bin (string-append cargo "/bin"))
+ (lib (string-append out "/lib"))
+ (gnu-triplet ,(or (%current-target-system)
+ (nix-system->gnu-triplet-for-rust)))
+ (system-lib-prefix (string-append lib "/rustlib/"
+ gnu-triplet "/lib")))
+ (mkdir-p (dirname rustc))
+ (copy-file "run_rustc/output/prefix/bin/rustc_binary" rustc)
+ (wrap-program rustc
+ `("LD_LIBRARY_PATH" = (,system-lib-prefix)))
+ (mkdir-p lib)
+ (copy-recursively "run_rustc/output/prefix/lib" lib)
+ (install-file "run_rustc/output/prefix/bin/cargo" cargo-bin)))))))
(synopsis "Compiler for the Rust programming language")
(description "Rust is a systems programming language that provides memory
safety and thread safety guarantees.")
- (home-page "https://www.rust-lang.org")
+ (home-page "https://github.com/thepowersgang/mrustc")
+
+ ;; So far mrustc is x86_64-only. It may support i686 soon:
+ ;; <https://github.com/thepowersgang/mrustc/issues/78>.
+ (supported-systems '("x86_64-linux"))
+
;; Dual licensed.
(license (list license:asl2.0 license:expat))))
-(define-public rust-1.20
- (let ((base-rust
- (rust-bootstrapped-package rust-1.19 "1.20.0"
- "0542y4rnzlsrricai130mqyxl8r6rd991frb4qsnwb27yigqg91a")))
- (package
- (inherit base-rust)
- (source
- (origin
- (inherit (package-source base-rust))
- (snippet '(begin
- (delete-file-recursively "src/jemalloc")
- (delete-file-recursively "src/llvm")
- #t))
- (patches '())))
- (native-inputs
- `(;; The tests fail with newer versions of GNU Make.
- ("make" ,gnu-make-4.2)
- ,@(package-native-inputs base-rust)))
- (outputs '("out" "doc" "cargo"))
- ;; Since rust-1.19 is local, it's quite probable that Hydra
- ;; will build rust-1.19 only as a dependency of rust-1.20.
- ;; But then Hydra will use the wrong properties, the ones here,
- ;; for rust-1.19. Therefore, we copied the properties of
- ;; rust-1.19 here.
- (properties '((timeout . 72000) ;20 hours
- (max-silent-time . 18000))) ;5 hours (for armel)
- (arguments
- (substitute-keyword-arguments (package-arguments rust-1.19)
- ((#:phases phases)
- `(modify-phases ,phases
- (add-after 'patch-tests 'patch-cargo-tests
- (lambda _
- (substitute* "src/tools/cargo/tests/build.rs"
- (("/usr/bin/env") (which "env"))
- ;; Guix llvm is compiled without asmjs-unknown-emscripten.
- (("fn wasm32_final_outputs") "#[ignore]\nfn wasm32_final_outputs"))
- (substitute* "src/tools/cargo/tests/death.rs"
- ;; This is stuck when built in container.
- (("fn ctrl_c_kills_everyone") "#[ignore]\nfn ctrl_c_kills_everyone"))
- ;; Prints test output in the wrong order when built on
- ;; i686-linux.
- (substitute* "src/tools/cargo/tests/test.rs"
- (("fn cargo_test_env") "#[ignore]\nfn cargo_test_env"))
-
- ;; These tests pull in a dependency on "git", which changes
- ;; too frequently take part in the Rust toolchain.
- (substitute* "src/tools/cargo/tests/new.rs"
- (("fn author_prefers_cargo") "#[ignore]\nfn author_prefers_cargo")
- (("fn finds_author_git") "#[ignore]\nfn finds_author_git")
- (("fn finds_local_author_git") "#[ignore]\nfn finds_local_author_git"))
- #t))
- (add-after 'patch-cargo-tests 'ignore-glibc-2.27-incompatible-test
- ;; https://github.com/rust-lang/rust/issues/47863
- (lambda _
- (substitute* "src/test/run-pass/out-of-stack.rs"
- (("// ignore-android") "// ignore-test\n// ignore-android"))
- #t))
- (replace 'configure
- (lambda* (#:key inputs outputs #:allow-other-keys)
- (let* ((out (assoc-ref outputs "out"))
- (doc (assoc-ref outputs "doc"))
- (gcc (assoc-ref inputs "gcc"))
- (gdb (assoc-ref inputs "gdb"))
- (binutils (assoc-ref inputs "binutils"))
- (python (assoc-ref inputs "python-2"))
- (rustc (assoc-ref inputs "rustc-bootstrap"))
- (cargo (assoc-ref inputs "cargo-bootstrap"))
- (llvm (assoc-ref inputs "llvm"))
- (jemalloc (assoc-ref inputs "jemalloc")))
- (call-with-output-file "config.toml"
- (lambda (port)
- (display (string-append "
+(define rust-1.40
+ (package
+ (name "rust")
+ (version "1.40.0")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (rust-uri version))
+ (sha256 (base32 "1ba9llwhqm49w7sz3z0gqscj039m53ky9wxzhaj11z6yg1ah15yx"))
+ (modules '((guix build utils)))
+ ;; llvm-emscripten is no longer bundled, as that codegen backend got
+ ;; removed.
+ (snippet '(for-each delete-file-recursively
+ '("src/llvm-project"
+ "vendor/jemalloc-sys/jemalloc")))))
+ (outputs '("out" "cargo"))
+ (properties '((timeout . 72000) ;20 hours
+ (max-silent-time . 18000))) ;5 hours (for armel)
+ (build-system gnu-build-system)
+ ;; Rust 1.40 does not ship rustc-internal libraries by default (see
+ ;; rustc-dev-split). This means that librustc_driver.so is no longer
+ ;; available in lib/rustlib/$target/lib, which is the directory
+ ;; included in the runpath of librustc_codegen_llvm-llvm.so. This is
+ ;; detected by our validate-runpath phase as an error, but it is
+ ;; harmless as the codegen backend is loaded by librustc_driver.so
+ ;; itself, which must at that point have been already loaded. As such,
+ ;; we skip validating the runpath for Rust 1.40. Rust 1.41 stopped
+ ;; putting the codegen backend in a separate library, which makes this
+ ;; workaround only necessary for this release.
+ (arguments
+ `(#:validate-runpath? #f
+ ;; Only the final Rust is tested, not the intermediate bootstrap ones,
+ ;; for performance and simplicity.
+ #:tests? #f
+ #:imported-modules ,%cargo-utils-modules ;for `generate-all-checksums'
+ #:modules ((guix build cargo-utils)
+ (guix build utils)
+ (guix build gnu-build-system)
+ (ice-9 match)
+ (srfi srfi-1))
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'set-env
+ (lambda* (#:key inputs #:allow-other-keys)
+ (setenv "SHELL" (which "sh"))
+ (setenv "CONFIG_SHELL" (which "sh"))
+ (setenv "CC" (search-input-file inputs "/bin/gcc"))
+ ;; The Guix LLVM package installs only shared libraries.
+ (setenv "LLVM_LINK_SHARED" "1")))
+ (add-after 'unpack 'add-cc-shim-to-path
+ (lambda _
+ (mkdir-p "/tmp/bin")
+ (symlink (which "gcc") "/tmp/bin/cc")
+ (setenv "PATH" (string-append "/tmp/bin:" (getenv "PATH")))))
+ (add-after 'unpack 'neuter-tidy
+ ;; We often need to patch tests with various Guix-specific paths.
+ ;; This often increases the line length and makes tidy, rustc's
+ ;; style checker, complain. We could insert additional newlines or
+ ;; add an "// ignore-tidy-linelength" comment, but as an ignore
+ ;; comment must be used, both approaches are fragile due to
+ ;; upstream formatting changes. As such, disable running the
+ ;; linter during tests, since it's intended for rustc developers
+ ;; anyway.
+ (lambda _
+ (substitute* "src/bootstrap/builder.rs"
+ ((".*::Tidy,.*")
+ ""))))
+ (replace 'configure
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (gcc (assoc-ref inputs "gcc"))
+ (python (assoc-ref inputs "python"))
+ (binutils (assoc-ref inputs "binutils"))
+ (rustc (assoc-ref inputs "rustc-bootstrap"))
+ (cargo (assoc-ref inputs "cargo-bootstrap"))
+ (llvm (assoc-ref inputs "llvm"))
+ (jemalloc (assoc-ref inputs "jemalloc")))
+ ;; The compiler is no longer directly built against jemalloc, but
+ ;; rather via the jemalloc-sys crate (which vendors the jemalloc
+ ;; source). To use jemalloc we must enable linking to it (otherwise
+ ;; it would use the system allocator), and set an environment
+ ;; variable pointing to the compiled jemalloc.
+ (setenv "JEMALLOC_OVERRIDE"
+ (search-input-file inputs
+ "/lib/libjemalloc_pic.a"))
+ (call-with-output-file "config.toml"
+ (lambda (port)
+ (display (string-append "
[llvm]
[build]
cargo = \"" cargo "/bin/cargo" "\"
rustc = \"" rustc "/bin/rustc" "\"
-docs = true
-python = \"" python "/bin/python2" "\"
-gdb = \"" gdb "/bin/gdb" "\"
+docs = false
+python = \"" python "/bin/python" "\"
vendor = true
submodules = false
[install]
prefix = \"" out "\"
-docdir = \"" doc "/share/doc/rust" "\"
sysconfdir = \"etc\"
[rust]
+jemalloc=true
default-linker = \"" gcc "/bin/gcc" "\"
channel = \"stable\"
rpath = true
-" ;; There are 2 failed codegen tests:
-;; codegen/mainsubprogram.rs and codegen/mainsubprogramstart.rs
-;; These tests require a patched LLVM
-"codegen-tests = false
[target." ,(nix-system->gnu-triplet-for-rust) "]
llvm-config = \"" llvm "/bin/llvm-config" "\"
cc = \"" gcc "/bin/gcc" "\"
cxx = \"" gcc "/bin/g++" "\"
ar = \"" binutils "/bin/ar" "\"
-jemalloc = \"" jemalloc "/lib/libjemalloc_pic.a" "\"
[dist]
-") port)))
- #t)))
- (add-after 'configure 'provide-cc
- (lambda* (#:key inputs #:allow-other-keys)
- (symlink (string-append (assoc-ref inputs "gcc") "/bin/gcc")
- "/tmp/cc")
- (setenv "PATH" (string-append "/tmp:" (getenv "PATH")))
- #t))
- (add-after 'provide-cc 'configure-archiver
- (lambda* (#:key inputs #:allow-other-keys)
- (substitute* "src/build_helper/lib.rs"
- ;; Make sure "ar" is always used as the archiver.
- (("\"musl\"") "\"\"")
- ;; Then substitute "ar" by our name.
- (("\"ar\"") (string-append "\""
- (assoc-ref inputs "binutils")
- "/bin/ar\"")))
- #t))
- (delete 'patch-cargo-tomls)
- (add-before 'build 'reset-timestamps-after-changes
- (lambda* _
- (for-each
- (lambda (filename)
- ;; Rust 1.20.0 treats timestamp 0 as "file doesn't exist".
- ;; Therefore, use timestamp 1.
- (utime filename 1 1 1 1))
- (find-files "." #:directories? #t))
- #t))
- (replace 'build
- (lambda* _
- (invoke "./x.py" "build")
- (invoke "./x.py" "build" "src/tools/cargo")))
- (replace 'check
- (lambda* _
- ;; Disable parallel execution to prevent EAGAIN errors when
- ;; running tests.
- (invoke "./x.py" "-j1" "test" "-vv")
- (invoke "./x.py" "-j1" "test" "src/tools/cargo")
- #t))
- (replace 'install
- (lambda* (#:key outputs #:allow-other-keys)
- (invoke "./x.py" "install")
- (substitute* "config.toml"
- ;; replace prefix to specific output
- (("prefix = \"[^\"]*\"")
- (string-append "prefix = \"" (assoc-ref outputs "cargo") "\"")))
- (invoke "./x.py" "install" "cargo")))
- (add-after 'install 'delete-install-logs
- (lambda* (#:key outputs #:allow-other-keys)
- (define (delete-manifest-file out-path file)
- (delete-file (string-append out-path "/lib/rustlib/" file)))
-
- (let ((out (assoc-ref outputs "out"))
- (cargo-out (assoc-ref outputs "cargo")))
- (for-each
- (lambda (file) (delete-manifest-file out file))
- '("install.log"
- "manifest-rust-docs"
- ,(string-append "manifest-rust-std-"
- (nix-system->gnu-triplet-for-rust))
- "manifest-rustc"))
- (for-each
- (lambda (file) (delete-manifest-file cargo-out file))
- '("install.log"
- "manifest-cargo"))
- #t)))
- (add-after 'install 'wrap-rustc
- (lambda* (#:key inputs outputs #:allow-other-keys)
- (let ((out (assoc-ref outputs "out"))
- (libc (assoc-ref inputs "libc"))
- (ld-wrapper (assoc-ref inputs "ld-wrapper")))
- ;; Let gcc find ld and libc startup files.
- (wrap-program (string-append out "/bin/rustc")
- `("PATH" ":" prefix (,(string-append ld-wrapper "/bin")))
- `("LIBRARY_PATH" ":" suffix (,(string-append libc "/lib"))))
- #t))))))))))
+") port))))))
+ (replace 'build
+ (lambda* (#:key parallel-build? #:allow-other-keys)
+ (let ((job-spec (string-append
+ "-j" (if parallel-build?
+ (number->string (parallel-job-count))
+ "1"))))
+ (invoke "./x.py" job-spec "build" "--stage=1"
+ "src/libstd"
+ "src/tools/cargo"))))
+ (replace 'install
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (cargo-out (assoc-ref outputs "cargo"))
+ (gnu-triplet ,(or (%current-target-system)
+ (nix-system->gnu-triplet-for-rust)))
+ (build (string-append "build/" gnu-triplet)))
+ ;; Manually do the installation instead of calling './x.py
+ ;; install', as that is slow and needlessly rebuilds some
+ ;; things.
+ (install-file (string-append build "/stage1/bin/rustc")
+ (string-append out "/bin"))
+ (copy-recursively (string-append build "/stage1/lib")
+ (string-append out "/lib"))
+ (install-file (string-append build "/stage1-tools-bin/cargo")
+ (string-append cargo-out "/bin")))))
+ (add-after 'install 'delete-install-logs
+ (lambda* (#:key outputs #:allow-other-keys)
+ (for-each (lambda (f)
+ (false-if-exception (delete-file f)))
+ (append-map (lambda (output)
+ (find-files (string-append
+ output "/lib/rustlib")
+ "(^install.log$|^manifest-)"))
+ (map cdr outputs)))))
+ (add-after 'install 'wrap-rustc
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (let ((out (assoc-ref outputs "out"))
+ (libc (assoc-ref inputs "libc"))
+ (ld-wrapper (assoc-ref inputs "ld-wrapper")))
+ ;; Let gcc find ld and libc startup files.
+ (wrap-program (string-append out "/bin/rustc")
+ `("PATH" ":" prefix (,(string-append ld-wrapper "/bin")))
+ `("LIBRARY_PATH" ":"
+ suffix (,(string-append libc "/lib"))))))))))
+ (native-inputs
+ `(("cmake" ,cmake-minimal)
+ ("pkg-config" ,pkg-config) ; For "cargo"
+ ("python" ,python-wrapper)
+ ("rustc-bootstrap" ,rust-1.39)
+ ("cargo-bootstrap" ,rust-1.39 "cargo")
+ ("which" ,which)))
+ (inputs
+ `(("jemalloc" ,jemalloc)
+ ("llvm" ,llvm)
+ ("openssl" ,openssl)
+ ("libssh2" ,libssh2) ; For "cargo"
+ ("libcurl" ,curl))) ; For "cargo"
+ ;; rustc invokes gcc, so we need to set its search paths accordingly.
+ ;; Note: duplicate its value here to cope with circular dependencies among
+ ;; modules (see <https://bugs.gnu.org/31392>).
+ (native-search-paths
+ (list (search-path-specification
+ (variable "C_INCLUDE_PATH")
+ (files '("include")))
+ (search-path-specification
+ (variable "CPLUS_INCLUDE_PATH")
+ (files '("include/c++" "include")))
+ (search-path-specification
+ (variable "LIBRARY_PATH")
+ (files '("lib" "lib64")))))
+ (synopsis "Compiler for the Rust progamming language")
+ (description "Rust is a systems programming language that provides memory
+safety and thread safety guarantees.")
+ (home-page "https://www.rust-lang.org")
+ ;; Dual licensed.
+ (license (list license:asl2.0 license:expat))))
-(define-public rust-1.21
- (let ((base-rust (rust-bootstrapped-package rust-1.20 "1.21.0"
- "1yj8lnxybjrybp00fqhxw8fpr641dh8wcn9mk44xjnsb4i1c21qp")))
+(define rust-1.41
+ (let ((base-rust (rust-bootstrapped-package
+ rust-1.40 "1.41.1"
+ "0ws5x0fxv57fyllsa6025h3q6j9v3m8nb3syl4x0hgkddq0kvj9q")))
(package
(inherit base-rust)
(arguments
(substitute-keyword-arguments (package-arguments base-rust)
+ ((#:validate-runpath? _ #t)
+ #t)
((#:phases phases)
`(modify-phases ,phases
- (add-after 'configure 'remove-ar
- (lambda* (#:key inputs #:allow-other-keys)
- ;; Remove because toml complains about "unknown field".
- (substitute* "config.toml"
- (("^ar =.*") "\n"))
- #t)))))))))
-
-(define-public rust-1.22
- (let ((base-rust (rust-bootstrapped-package rust-1.21 "1.22.1"
- "1lrzzp0nh7s61wgfs2h6ilaqi6iq89f1pd1yaf65l87bssyl4ylb")))
+ (delete 'add-cc-shim-to-path)
+ (add-after 'patch-generated-file-shebangs 'patch-cargo-checksums
+ (lambda* _
+ (substitute* "Cargo.lock"
+ (("(checksum = )\".*\"" all name)
+ (string-append name "\"" ,%cargo-reference-hash "\"")))
+ (generate-all-checksums "vendor"))))))))))
+
+(define rust-1.42
+ (rust-bootstrapped-package
+ rust-1.41 "1.42.0" "0x9lxs82may6c0iln0b908cxyn1cv7h03n5cmbx3j1bas4qzks6j"))
+
+(define rust-1.43
+ (rust-bootstrapped-package
+ rust-1.42 "1.43.0" "18akhk0wz1my6y9vhardriy2ysc482z0fnjdcgs9gy59kmnarxkm"))
+
+;; This version requires llvm <= 11.
+(define rust-1.44
+ (rust-bootstrapped-package
+ rust-1.43 "1.44.1"
+ "0ww4z2v3gxgn3zddqzwqya1gln04p91ykbrflnpdbmcd575n8bky"))
+
+(define rust-1.45
+ (let ((base-rust (rust-bootstrapped-package
+ rust-1.44 "1.45.2"
+ "0273a1g3f59plyi1n0azf21qjzwml1yqdnj5z472crz37qggr8xp")))
(package
(inherit base-rust)
(arguments
(substitute-keyword-arguments (package-arguments base-rust)
((#:phases phases)
`(modify-phases ,phases
- (add-after 'unpack 'remove-flaky-test
+ (add-after 'unpack 'set-linker-locale-to-utf8
(lambda _
- ;; See <https://github.com/rust-lang/rust/issues/43402>.
- (when (file-exists? "src/test/run-make/issue-26092")
- (delete-file-recursively "src/test/run-make/issue-26092"))
- #t)))))))))
-
-(define-public rust-1.23
- (let ((base-rust (rust-bootstrapped-package rust-1.22 "1.23.0"
- "14fb8vhjzsxlbi6yrn1r6fl5dlbdd1m92dn5zj5gmzfwf4w9ar3l")))
- (package
- (inherit base-rust)
+ (substitute* (find-files "." "^linker.rs$")
+ (("linker.env\\(\"LC_ALL\", \"C\"\\);")
+ "linker.env(\"LC_ALL\", \"en_US.UTF-8\");")))))))))))
+
+(define rust-1.46
+ (rust-bootstrapped-package
+ rust-1.45 "1.46.0" "0a17jby2pd050s24cy4dfc0gzvgcl585v3vvyfilniyvjrqknsid"))
+
+(define rust-1.47
+ (let ((base-rust (rust-bootstrapped-package
+ rust-1.46 "1.47.0"
+ "07fqd2vp7cf1ka3hr207dnnz93ymxml4935vp74g4is79h3dz19i")))
+ (package/inherit base-rust
(arguments
(substitute-keyword-arguments (package-arguments base-rust)
((#:phases phases)
`(modify-phases ,phases
- (delete 'configure-archiver)
- (delete 'remove-ar)
- (add-after 'unpack 'dont-build-native
- (lambda _
- ;; XXX: Revisit this when we use gcc 6.
- (substitute* "src/binaryen/CMakeLists.txt"
- (("ADD_COMPILE_FLAG\\(\\\"-march=native\\\"\\)") ""))
- #t)))))))))
-
-(define-public rust-1.24
- (let ((base-rust
- (rust-bootstrapped-package rust-1.23 "1.24.1"
- "1vv10x2h9kq7fxh2v01damdq8pvlp5acyh1kzcda9sfjx12kv99y")))
+ (replace 'build
+ ;; The standard library source location moved in this release.
+ (lambda* (#:key parallel-build? #:allow-other-keys)
+ (let ((job-spec (string-append
+ "-j" (if parallel-build?
+ (number->string (parallel-job-count))
+ "1"))))
+ (invoke "./x.py" job-spec "build" "--stage=1"
+ "library/std"
+ "src/tools/cargo")))))))))))
+
+(define rust-1.48
+ (rust-bootstrapped-package
+ rust-1.47 "1.48.0" "0fz4gbb5hp5qalrl9lcl8yw4kk7ai7wx511jb28nypbxninkwxhf"))
+
+(define rust-1.49
+ (rust-bootstrapped-package
+ rust-1.48 "1.49.0" "0yf7kll517398dgqsr7m3gldzj0iwsp3ggzxrayckpqzvylfy2mm"))
+
+(define rust-1.50
+ (rust-bootstrapped-package
+ rust-1.49 "1.50.0" "0pjs7j62maiyvkmhp9zrxl528g2n0fphp4rq6ap7aqdv0a6qz5wm"))
+
+(define rust-1.51
+ (rust-bootstrapped-package
+ rust-1.50 "1.51.0" "0ixqkqglv3isxbvl4ldr4byrkx692wghsz3fasy1pn5kr2prnsvs"))
+
+;;; The LLVM requiriment has been bumped to version 10 in Rust 1.52. Use the
+;;; latest available.
+(define rust-1.52
+ (let ((base-rust (rust-bootstrapped-package
+ rust-1.51 "1.52.1"
+ "165zs3xzp9dravybwslqs1qhn35agp6wacmzpymqg3qfdni26vrs")))
(package
(inherit base-rust)
- (arguments
- (substitute-keyword-arguments (package-arguments base-rust)
- ((#:phases phases)
- `(modify-phases ,phases
- (delete 'use-readelf-for-tests)
- (replace 'patch-aarch64-test
- (lambda* _
- (substitute* "src/librustc_metadata/dynamic_lib.rs"
- ;; This test is known to fail on aarch64 and powerpc64le:
- ;; https://github.com/rust-lang/rust/issues/45410
- (("fn test_loading_cosine") "#[ignore]\nfn test_loading_cosine"))
- #t)))))))))
+ (inputs (alist-replace "llvm" (list llvm-12)
+ (package-inputs base-rust))))))
+
+(define rust-1.53
+ (rust-bootstrapped-package
+ rust-1.52 "1.53.0" "1f95p259dfp5ca118bg107rj3rqwlswy65dxn3hg8sqgl4wwmxsw"))
-;;; Rust 1.25 release support work with llvm 6--but build with llvm 6 is
-;;; not determenistic due to <https://github.com/rust-lang/rust/issues/50556>.
-;;; Keep using llvm 3.9.1 until builds become determenistic
-(define-public rust-1.25
+(define rust-1.54
(let ((base-rust
- (rust-bootstrapped-package rust-1.24 "1.25.0"
- "0baxjr99311lvwdq0s38bipbnj72pn6fgbk6lcq7j555xq53mxpf")))
+ (rust-bootstrapped-package
+ rust-1.53 "1.54.0"
+ "0xk9dhfff16caambmwij67zgshd8v9djw6ha0fnnanlv7rii31dc")))
(package
(inherit base-rust)
(source
- (origin
- (inherit (package-source base-rust))
- (snippet '(begin
- (delete-file-recursively "src/jemalloc")
- (delete-file-recursively "src/llvm")
- (delete-file-recursively "src/llvm-emscripten")
- #t))
- (patches (search-patches
- "rust-1.25-accept-more-detailed-gdb-lines.patch"))))
+ (origin
+ (inherit (package-source base-rust))
+ (snippet '(delete-file-recursively "src/llvm-project"))))
+ (outputs (cons "rustfmt" (package-outputs base-rust)))
(arguments
(substitute-keyword-arguments (package-arguments base-rust)
+ ((#:tests? _ #f)
+ #t)
((#:phases phases)
`(modify-phases ,phases
- (add-after 'patch-cargo-tests 'patch-cargo-index-update
+ (add-after 'unpack 'relax-gdb-auto-load-safe-path
+ ;; Allow GDB to load binaries from any location, otherwise the
+ ;; gdbinfo tests fail. This is only useful when testing with a
+ ;; GDB version newer than 8.2.
(lambda _
- (substitute* "src/tools/cargo/tests/generate-lockfile.rs"
- ;; This test wants to update the crate index.
- (("fn no_index_update") "#[ignore]\nfn no_index_update"))
- #t))
- (replace 'patch-aarch64-test
+ (setenv "HOME" (getcwd))
+ (with-output-to-file (string-append (getenv "HOME") "/.gdbinit")
+ (lambda _
+ (format #t "set auto-load safe-path /~%")))
+ ;; Do not launch gdb with '-nx' which causes it to not execute
+ ;; any init file.
+ (substitute* "src/tools/compiletest/src/runtest.rs"
+ (("\"-nx\".as_ref\\(\\), ")
+ ""))))
+ (add-after 'unpack 'patch-cargo-env-shebang
+ (lambda _
+ (substitute* '("src/tools/cargo/tests/testsuite/build.rs"
+ "src/tools/cargo/tests/testsuite/fix.rs")
+ ;; The cargo *_wrapper tests set RUSTC.*WRAPPER environment
+ ;; variable which points to /usr/bin/env. Since it's not a
+ ;; shebang, it needs to be manually patched.
+ (("/usr/bin/env")
+ (which "env")))))
+ (add-after 'unpack 'disable-tests-requiring-git
(lambda _
- (substitute* "src/librustc_metadata/dynamic_lib.rs"
- ;; This test is known to fail on aarch64 and powerpc64le:
- ;; https://github.com/rust-lang/rust/issues/45410
- (("fn test_loading_cosine") "#[ignore]\nfn test_loading_cosine"))
- ;; This test fails on aarch64 with llvm@6.0:
- ;; https://github.com/rust-lang/rust/issues/49807
- ;; other possible solution:
- ;; https://github.com/rust-lang/rust/pull/47688
- (delete-file "src/test/debuginfo/by-value-self-argument-in-trait-impl.rs")
- #t))
- (delete 'ignore-glibc-2.27-incompatible-test))))))))
-
-(define-public rust-1.26
- (let ((base-rust
- (rust-bootstrapped-package rust-1.25 "1.26.2"
- "0047ais0fvmqvngqkdsxgrzhb0kljg8wy85b01kbbjc88hqcz7pv")))
- (package
- (inherit base-rust)
- (source
- (origin
- (inherit (package-source base-rust))
- (patches (search-patches
- "rust-coresimd-doctest.patch"
- "rust-1.25-accept-more-detailed-gdb-lines.patch"))))
- (inputs
- (alist-replace "openssl" (list openssl)
- (package-inputs base-rust)))
- (arguments
- (substitute-keyword-arguments (package-arguments base-rust)
- ((#:phases phases)
- `(modify-phases ,phases
- ;; binaryen was replaced with LLD project from LLVM
- (delete 'dont-build-native)
- (replace 'check
- (lambda* _
- ;; Enable parallel execution.
- (let ((parallel-job-spec
- (string-append "-j" (number->string
- (min 4
- (parallel-job-count))))))
- (invoke "./x.py" parallel-job-spec "test" "-vv")
- (invoke "./x.py" parallel-job-spec "test"
- "src/tools/cargo"))))
- (replace 'remove-unsupported-tests
- (lambda* _
- ;; Our ld-wrapper cannot process non-UTF8 bytes in LIBRARY_PATH.
- ;; <https://lists.gnu.org/archive/html/guix-devel/2017-06/msg00193.html>
- (delete-file-recursively "src/test/run-make-fulldeps/linker-output-non-utf8")
- #t))
- (replace 'patch-cargo-tests
- (lambda* _
- (substitute* "src/tools/cargo/tests/testsuite/build.rs"
- (("/usr/bin/env") (which "env"))
- ;; Guix llvm is compiled without asmjs-unknown-emscripten.
- (("fn wasm32_final_outputs") "#[ignore]\nfn wasm32_final_outputs"))
- (substitute* "src/tools/cargo/tests/testsuite/death.rs"
- ;; This is stuck when built in container.
- (("fn ctrl_c_kills_everyone") "#[ignore]\nfn ctrl_c_kills_everyone"))
- ;; Prints test output in the wrong order when built on
- ;; i686-linux.
- (substitute* "src/tools/cargo/tests/testsuite/test.rs"
- (("fn cargo_test_env") "#[ignore]\nfn cargo_test_env"))
-
- ;; Avoid dependency on "git".
(substitute* "src/tools/cargo/tests/testsuite/new.rs"
- (("fn author_prefers_cargo") "#[ignore]\nfn author_prefers_cargo")
- (("fn finds_author_git") "#[ignore]\nfn finds_author_git")
- (("fn finds_local_author_git") "#[ignore]\nfn finds_local_author_git"))
- #t))
- (add-after 'patch-cargo-tests 'disable-cargo-test-for-nightly-channel
- (lambda* _
- ;; This test failed to work on "nightly" channel builds
- ;; https://github.com/rust-lang/cargo/issues/5648
- (substitute* "src/tools/cargo/tests/testsuite/resolve.rs"
- (("fn test_resolving_minimum_version_with_transitive_deps")
- "#[ignore]\nfn test_resolving_minimum_version_with_transitive_deps"))
- #t))
- (replace 'patch-cargo-index-update
- (lambda* _
- (substitute* "src/tools/cargo/tests/testsuite/generate_lockfile.rs"
- ;; This test wants to update the crate index.
- (("fn no_index_update") "#[ignore]\nfn no_index_update"))
- #t))))))
- (supported-systems
- (delete "aarch64-linux" ; fails to build, see #47019
- (package-supported-systems base-rust))))))
-
-(define-public rust-1.27
- (let ((base-rust
- (rust-bootstrapped-package rust-1.26 "1.27.2"
- "0pg1s37bhx9zqbynxyydq5j6q7kij9vxkcv8maz0m25prm88r0cs")))
- (package
- (inherit base-rust)
- (source
- (origin
- (inherit (package-source base-rust))
- (patches (search-patches "rust-coresimd-doctest.patch"
- "rust-bootstrap-stage0-test.patch"
- "rust-1.25-accept-more-detailed-gdb-lines.patch"
- "rust-reproducible-builds.patch"))))
- (arguments
- (substitute-keyword-arguments (package-arguments base-rust)
- ((#:phases phases)
- `(modify-phases ,phases
- (add-before 'install 'mkdir-prefix-paths
- (lambda* (#:key outputs #:allow-other-keys)
- ;; As result of https://github.com/rust-lang/rust/issues/36989
- ;; `prefix' directory should exist before `install' call
- (mkdir-p (assoc-ref outputs "out"))
- (mkdir-p (assoc-ref outputs "cargo"))
- #t))
- (add-after 'patch-cargo-tests 'disable-thinlto-test
- (lambda* _
- ;; thinlto required llvm 6.0 for work
- (substitute* "src/tools/cargo/tests/testsuite/path.rs"
- (("fn thin_lto_works") "#[ignore]\nfn thin_lto_works"))
- #t)))))))))
-
-(define-public rust-1.28
- (let ((base-rust
- (rust-bootstrapped-package rust-1.27 "1.28.0"
- "11k4rn77bca2rikykkk9fmprrgjswd4x4kaq7fia08vgkir82nhx")))
- (package
- (inherit base-rust)
- (source
- (origin
- (inherit (package-source base-rust))
- (patches (search-patches "rust-coresimd-doctest.patch"
- "rust-bootstrap-stage0-test.patch"
- "rust-1.25-accept-more-detailed-gdb-lines.patch"
- "rust-reproducible-builds.patch"))))
- (inputs
- ;; Use LLVM 6.0
- (alist-replace "llvm" (list llvm-6)
- (package-inputs base-rust)))
- (arguments
- (substitute-keyword-arguments (package-arguments base-rust)
- ((#:phases phases)
- `(modify-phases ,phases
- (add-after 'configure 'enable-codegen-tests
- ;; Codegen tests should pass with llvm 6, so enable them.
- (lambda* _
- (substitute* "config.toml"
- (("codegen-tests = false") ""))
- #t))
- (add-after 'patch-tests 'disable-amd64-avx-test
- ;; That test would fail on x86_64 machines without avx.
- (lambda* _
- (substitute* "src/test/run-pass/issue-44056.rs"
- (("only-x86_64") "ignore-test"))
- #t))
- ;; This is no longer needed as of 1.28
- (delete 'disable-cargo-test-for-nightly-channel)
- ;; The thinlto test should pass with llvm 6.
- (delete 'disable-thinlto-test))))))))
-
-(define-public rust-1.29
- (let ((base-rust
- (rust-bootstrapped-package rust-1.28 "1.29.2"
- "1jb787080z754caa2w3w1amsygs4qlzj9rs1vy64firfmabfg22h")))
- (package
- (inherit base-rust)
- (source
- (origin
- (inherit (package-source base-rust))
- (patches (search-patches "rust-1.25-accept-more-detailed-gdb-lines.patch"
- "rust-reproducible-builds.patch")))))))
-
-(define-public rust-1.30
- (let ((base-rust
- (rust-bootstrapped-package rust-1.29 "1.30.1"
- "0aavdc1lqv0cjzbqwl5n59yd0bqdlhn0zas61ljf38yrvc18k8rn")))
- (package
- (inherit base-rust)
- (source
- (origin
- (inherit (package-source base-rust))
- (snippet '(begin
- (delete-file-recursively "src/jemalloc")
- (delete-file-recursively "src/llvm")
- (delete-file-recursively "src/llvm-emscripten")
- (delete-file-recursively "src/tools/clang")
- (delete-file-recursively "src/tools/lldb")
- #t))))
- (arguments
- (substitute-keyword-arguments (package-arguments base-rust)
- ((#:phases phases)
- `(modify-phases ,phases
- (add-after 'patch-cargo-tests 'patch-cargo-env-shebang
- (lambda* (#:key inputs #:allow-other-keys)
- (let ((coreutils (assoc-ref inputs "coreutils")))
- (substitute* "src/tools/cargo/tests/testsuite/fix.rs"
- ;; Cargo has a test which explicitly sets a
- ;; RUSTC_WRAPPER environment variable which points
- ;; to /usr/bin/env. Since it's not a shebang, it
- ;; needs to be manually patched
- (("\"/usr/bin/env\"")
- (string-append "\"" coreutils "/bin/env\"")))
- #t)))
- (add-after 'patch-cargo-env-shebang 'ignore-cargo-package-tests
- (lambda* _
- (substitute* "src/tools/cargo/tests/testsuite/package.rs"
- ;; These tests largely check that cargo outputs warning/error
- ;; messages as expected. It seems that cargo outputs an
- ;; absolute path to something in the store instead of the
- ;; expected relative path (e.g. `[..]`) so we'll ignore
- ;; these for now
- (("fn include") "#[ignore]\nfn include")
- (("fn exclude") "#[ignore]\nfn exclude"))
- #t))
- ;; The test has been moved elsewhere.
- (replace 'disable-amd64-avx-test
+ (("fn author_prefers_cargo")
+ "#[ignore]\nfn author_prefers_cargo")
+ (("fn finds_author_git")
+ "#[ignore]\nfn finds_author_git")
+ (("fn finds_local_author_git")
+ "#[ignore]\nfn finds_local_author_git"))))
+ (add-after 'unpack 'patch-command-exec-tests
+ ;; This test suite includes some tests that the stdlib's
+ ;; `Command` execution properly handles in situations where
+ ;; the environment or PATH variable are empty, but this fails
+ ;; since we don't have `echo` available at its usual FHS
+ ;; location.
(lambda _
- (substitute* "src/test/ui/run-pass/issues/issue-44056.rs"
- (("only-x86_64") "ignore-test"))
- #t)))))))))
-
-(define (patch-command-exec-tests-phase test-path)
- "The command-exec.rs test moves around between releases. We need to apply
-a Guix-specific patch to it for each release. This function generates the phase
-that applies said patch, parametrized by the test-path. This is done this way
-because the phase is more complex than the equivalents for other tests that
-move around."
- `(lambda* (#:key inputs #:allow-other-keys)
- (let ((coreutils (assoc-ref inputs "coreutils")))
- (substitute* ,test-path
- ;; This test suite includes some tests that the stdlib's
- ;; `Command` execution properly handles situations where
- ;; the environment or PATH variable are empty, but this
- ;; fails since we don't have `echo` available in the usual
- ;; Linux directories.
- ;; NB: the leading space is so we don't fail a tidy check
- ;; for trailing whitespace, and the newlines are to ensure
- ;; we don't exceed the 100 chars tidy check as well
- ((" Command::new\\(\"echo\"\\)")
- (string-append "\nCommand::new(\"" coreutils "/bin/echo\")\n")))
- #t)))
-
-(define-public rust-1.31
- (let ((base-rust
- (rust-bootstrapped-package rust-1.30 "1.31.1"
- "0sk84ff0cklybcp0jbbxcw7lk7mrm6kb6km5nzd6m64dy0igrlli")))
- (package
- (inherit base-rust)
- (arguments
- (substitute-keyword-arguments (package-arguments base-rust)
- ((#:phases phases)
- `(modify-phases ,phases
- (add-after 'patch-tests 'patch-command-exec-tests
- ,(patch-command-exec-tests-phase
- "src/test/run-pass/command-exec.rs"))
- ;; The test has been moved elsewhere.
- (replace 'disable-amd64-avx-test
+ (substitute* (match (find-files "." "^command-exec.rs$")
+ ((file) file))
+ (("Command::new\\(\"echo\"\\)")
+ (format #f "Command::new(~s)" (which "echo"))))))
+ (add-after 'unpack 'patch-command-uid-gid-test
(lambda _
- (substitute* "src/test/ui/issues/issue-44056.rs"
- (("only-x86_64") "ignore-test"))
- #t))
- (add-after 'patch-tests 'patch-process-docs-rev-cmd
- (lambda* _
- ;; Disable some doc tests which depend on the "rev" command
- ;; https://github.com/rust-lang/rust/pull/58746
- (substitute* "src/libstd/process.rs"
- (("```rust") "```rust,no_run"))
- #t)))))))))
-
-(define-public rust-1.32
- (let ((base-rust
- (rust-bootstrapped-package rust-1.31 "1.32.0"
- "0ji2l9xv53y27xy72qagggvq47gayr5lcv2jwvmfirx029vlqnac")))
- (package
- (inherit base-rust)
- (source
- (origin
- (inherit (package-source base-rust))
- (snippet '(begin (delete-file-recursively "src/llvm")
- (delete-file-recursively "src/llvm-emscripten")
- (delete-file-recursively "src/tools/clang")
- (delete-file-recursively "src/tools/lldb")
- (delete-file-recursively "vendor/jemalloc-sys/jemalloc")
- #t))
- (patches (search-patches "rust-reproducible-builds.patch"))
- ;; the vendor directory has moved to the root of
- ;; the tarball, so we have to strip an extra prefix
- (patch-flags '("-p2"))))
- (inputs
- ;; Downgrade to LLVM 6, all LTO tests appear to fail with LLVM 7.0.1
- (alist-replace "llvm" (list llvm-6)
- (package-inputs base-rust)))
- (arguments
- (substitute-keyword-arguments (package-arguments base-rust)
- ((#:phases phases)
- `(modify-phases ,phases
- ;; Cargo.lock and the vendor/ directory have been moved to the
- ;; root of the rust tarball
- (replace 'patch-cargo-checksums
- (lambda* _
- (use-modules (guix build cargo-utils))
- (substitute* "Cargo.lock"
- (("(\"checksum .* = )\".*\"" all name)
- (string-append name "\"" ,%cargo-reference-hash "\"")))
- (generate-all-checksums "vendor")
- #t))
- (add-after 'enable-codegen-tests 'override-jemalloc
- (lambda* (#:key inputs #:allow-other-keys)
- ;; The compiler is no longer directly built against jemalloc,
- ;; but rather via the jemalloc-sys crate (which vendors the
- ;; jemalloc source). To use jemalloc we must enable linking to
- ;; it (otherwise it would use the system allocator), and set
- ;; an environment variable pointing to the compiled jemalloc.
- (substitute* "config.toml"
- (("^jemalloc =.*$") "")
- (("[[]rust[]]") "\n[rust]\njemalloc=true\n"))
- (setenv "JEMALLOC_OVERRIDE" (string-append (assoc-ref inputs "jemalloc")
- "/lib/libjemalloc_pic.a"))
- #t))
- ;; Remove no longer relevant steps
- (delete 'remove-flaky-test)
- (delete 'patch-aarch64-test))))))))
-
-(define-public rust-1.33
- (let ((base-rust
- (rust-bootstrapped-package rust-1.32 "1.33.0"
- "152x91mg7bz4ygligwjb05fgm1blwy2i70s2j03zc9jiwvbsh0as")))
- (package
- (inherit base-rust)
- (source
- (origin
- (inherit (package-source base-rust))
- (patches '())
- (patch-flags '("-p1"))))
- (inputs
- ;; Upgrade to jemalloc@5.1.0
- (alist-replace "jemalloc" (list jemalloc)
- (package-inputs base-rust)))
- (arguments
- (substitute-keyword-arguments (package-arguments base-rust)
- ((#:phases phases)
- `(modify-phases ,phases
- (delete 'ignore-cargo-package-tests)
- (add-after 'configure 'configure-test-threads
- ;; Several rustc and cargo tests will fail if run on one core
- ;; https://github.com/rust-lang/rust/issues/59122
- ;; https://github.com/rust-lang/cargo/issues/6746
- ;; https://github.com/rust-lang/rust/issues/58907
+ (substitute* (match (find-files "." "^command-uid-gid.rs$")
+ ((file) file))
+ (("/bin/sh")
+ (which "sh")))))
+ (add-after 'unpack 'skip-shebang-tests
+ ;; This test make sure that the parser behaves properly when a
+ ;; source file starts with a shebang. Unfortunately, the
+ ;; patch-shebangs phase changes the meaning of these edge-cases.
+ ;; We skip the test since it's drastically unlikely Guix's
+ ;; packaging will introduce a bug here.
+ (lambda _
+ (delete-file "src/test/ui/parser/shebang/sneaky-attrib.rs")))
+ (add-after 'unpack 'patch-process-tests
(lambda* (#:key inputs #:allow-other-keys)
- (setenv "RUST_TEST_THREADS" "2")
- #t)))))))))
-
-(define-public rust-1.34
- (let ((base-rust
- (rust-bootstrapped-package rust-1.33 "1.34.1"
- "19s09k7y5j6g3y4d2rk6kg9pvq6ml94c49w6b72dmq8p9lk8bixh")))
- (package
- (inherit base-rust)
- (source
- (origin
- (inherit (package-source base-rust))
- (snippet '(begin
- (delete-file-recursively "src/llvm-emscripten")
- (delete-file-recursively "src/llvm-project")
- (delete-file-recursively "vendor/jemalloc-sys/jemalloc")
- #t)))))))
-
-(define-public rust-1.35
- (let ((base-rust
- (rust-bootstrapped-package rust-1.34 "1.35.0"
- "0bbizy6b7002v1rdhrxrf5gijclbyizdhkglhp81ib3bf5x66kas")))
- (package
- (inherit base-rust)
- (inputs
- (alist-replace "llvm" (list llvm-8)
- (package-inputs base-rust)))
- (arguments
- (substitute-keyword-arguments (package-arguments base-rust)
- ((#:phases phases)
- `(modify-phases ,phases
- ;; The tidy test includes a pass which ensures large binaries
- ;; don't accidentally get checked into the rust git repo.
- ;; Unfortunately the test assumes that git is always available,
- ;; so we'll comment out the invocation of this pass.
- (add-after 'configure 'disable-tidy-bins-check
- (lambda* _
- (substitute* "src/tools/tidy/src/main.rs"
- (("bins::check") "//bins::check"))
- #t)))))))))
-
-(define-public rust-1.36
- (let ((base-rust
- (rust-bootstrapped-package rust-1.35 "1.36.0"
- "06xv2p6zq03lidr0yaf029ii8wnjjqa894nkmrm6s0rx47by9i04")))
- (package
- (inherit base-rust)
- (arguments
- (substitute-keyword-arguments (package-arguments base-rust)
- ((#:phases phases)
- `(modify-phases ,phases
- (delete 'patch-process-docs-rev-cmd))))))))
-
-(define-public rust-1.37
- (let ((base-rust
- (rust-bootstrapped-package rust-1.36 "1.37.0"
- "1hrqprybhkhs6d9b5pjskfnc5z9v2l2gync7nb39qjb5s0h703hj")))
- (package
- (inherit base-rust)
- (arguments
- (substitute-keyword-arguments (package-arguments base-rust)
- ((#:phases phases)
- `(modify-phases ,phases
- (add-before 'configure 'configure-cargo-home
+ (let ((bash (assoc-ref inputs "bash")))
+ (substitute* "library/std/src/process/tests.rs"
+ (("\"/bin/sh\"")
+ (string-append "\"" bash "/bin/sh\"")))
+ (substitute* "library/std/src/sys/unix/process/process_common/tests.rs"
+ (("fn test_process_mask")
+ "#[allow(unused_attributes)]
+ #[ignore]
+ fn test_process_mask")))))
+ (add-after 'unpack 'disable-interrupt-tests
(lambda _
- (let ((cargo-home (string-append (getcwd) "/.cargo")))
- (mkdir-p cargo-home)
- (setenv "CARGO_HOME" cargo-home)
- #t))))))))))
-
-(define-public rust-1.38
- (let ((base-rust
- (rust-bootstrapped-package rust-1.37 "1.38.0"
- "101dlpsfkq67p0hbwx4acqq6n90dj4bbprndizpgh1kigk566hk4")))
- (package
- (inherit base-rust)
- (inputs
- (alist-replace "llvm" (list llvm-9)
- (package-inputs base-rust)))
- (arguments
- (substitute-keyword-arguments (package-arguments base-rust)
- ((#:phases phases)
- `(modify-phases ,phases
- (replace 'patch-command-exec-tests
- ,(patch-command-exec-tests-phase
- "src/test/ui/command-exec.rs"))
- (add-after 'patch-tests 'patch-command-uid-gid-test
+ ;; This test hangs in the build container; disable it.
+ (substitute* (match (find-files "." "^freshness.rs$")
+ ((file) file))
+ (("fn linking_interrupted")
+ "#[ignore]\nfn linking_interrupted"))
+ ;; Likewise for the ctrl_c_kills_everyone test.
+ (substitute* (match (find-files "." "^death.rs$")
+ ((file) file))
+ (("fn ctrl_c_kills_everyone")
+ "#[ignore]\nfn ctrl_c_kills_everyone"))))
+ (add-after 'configure 'enable-docs
(lambda _
- (substitute* "src/test/ui/command-uid-gid.rs"
- (("/bin/sh") (which "sh"))
- (("ignore-sgx") "ignore-sgx\n// ignore-tidy-linelength"))
- #t)))))))))
-
-(define-public rust-1.39
- (let ((base-rust
- (rust-bootstrapped-package rust-1.38 "1.39.0"
- "0mwkc1bnil2cfyf6nglpvbn2y0zfbv44zfhsd5qg4c9rm6vgd8dl")))
- (package
- (inherit base-rust)
- (arguments
- (substitute-keyword-arguments (package-arguments base-rust)
- ((#:phases phases)
- `(modify-phases ,phases
- (replace 'patch-cargo-checksums
- ;; The Cargo.lock format changed.
- (lambda* _
- (use-modules (guix build cargo-utils))
- (substitute* "Cargo.lock"
- (("(checksum = )\".*\"" all name)
- (string-append name "\"" ,%cargo-reference-hash "\"")))
- (generate-all-checksums "vendor")
- #t)))))))))
-
-(define-public rust-1.40
- (let ((base-rust
- (rust-bootstrapped-package rust-1.39 "1.40.0"
- "1ba9llwhqm49w7sz3z0gqscj039m53ky9wxzhaj11z6yg1ah15yx")))
- (package
- (inherit base-rust)
- (source
- (origin
- (inherit (package-source base-rust))
- ;; llvm-emscripten is no longer bundled, as that codegen backend
- ;; got removed.
- (snippet '(begin
- (delete-file-recursively "src/llvm-project")
- (delete-file-recursively "vendor/jemalloc-sys/jemalloc")
- #t))))
- (arguments
- ;; Rust 1.40 does not ship rustc-internal libraries by default
- ;; (see rustc-dev-split). This means that librustc_driver.so is no
- ;; longer available in lib/rustlib/$target/lib, which is the directory
- ;; included in the runpath of librustc_codegen_llvm-llvm.so.
- ;; This is detected by our validate-runpath phase as an error, but it
- ;; is harmless as the codegen backend is loaded by librustc_driver.so
- ;; itself, which must at that point have been already loaded.
- ;; As such, we skip validating the runpath for Rust 1.40.
- ;; Rust 1.41 stopped putting the codegen backend in a separate library,
- ;; which makes this workaround only necessary for this release.
- (cons* #:validate-runpath? #f
- (substitute-keyword-arguments (package-arguments base-rust)
- ((#:phases phases)
- `(modify-phases ,phases
- ;; We often need to patch tests with various Guix-specific paths.
- ;; This often increases the line length and makes tidy, rustc's
- ;; style checker, complain. We could insert additional newlines
- ;; or add an "// ignore-tidy-linelength" comment, but as an
- ;; ignore comment must be used, both approaches are fragile due
- ;; to upstream formatting changes. As such, disable running the
- ;; linter during tests, since it's intended for rustc developers
- ;; anyway.
- ;;
- ;; TODO(rebuild-rust): This phase could be added earlier to
- ;; simplify a significant amount of code, but it would require
- ;; rebuilding the entire rusty universe.
- (add-after 'patch-tests 'neuter-tidy
- (lambda _
- (substitute* "src/bootstrap/builder.rs"
- (("^.*::Tidy,") ""))
- #t))
- ;; TODO(rebuild-rust): Adapt the find-files approach for
- ;; earlier testsuite patches.
- (replace 'patch-command-uid-gid-test
- (lambda _
- (match (find-files "src/test" "command-uid-gid\\.rs")
- ((file)
- (substitute* file
- (("/bin/sh") (which "sh")))))
- #t))
- (replace 'patch-command-exec-tests
- ,(patch-command-exec-tests-phase
- '(match (find-files "src/test" "command-exec\\.rs")
- ((file) file))))
- ;; The test got removed in commit 000fe63b6fc57b09828930cacbab20c2ee6e6d15
- ;; "Remove painful test that is not pulling its weight"
- (delete 'remove-unsupported-tests)))))))))
-
-(define-public rust-1.41
- (let ((base-rust
- (rust-bootstrapped-package rust-1.40 "1.41.1"
- "0ws5x0fxv57fyllsa6025h3q6j9v3m8nb3syl4x0hgkddq0kvj9q")))
- (package
- (inherit base-rust)
- (arguments
- (substitute-keyword-arguments (package-arguments base-rust)
- ((#:validate-runpath? _) #t))))))
-
-(define-public rust-1.42
- (rust-bootstrapped-package rust-1.41 "1.42.0"
- "0x9lxs82may6c0iln0b908cxyn1cv7h03n5cmbx3j1bas4qzks6j"))
-
-(define-public rust-1.43
- (rust-bootstrapped-package rust-1.42 "1.43.0"
- "18akhk0wz1my6y9vhardriy2ysc482z0fnjdcgs9gy59kmnarxkm"))
-
-(define-public rust-1.44
- (rust-bootstrapped-package rust-1.43 "1.44.1"
- "0ww4z2v3gxgn3zddqzwqya1gln04p91ykbrflnpdbmcd575n8bky"))
-
-(define-public rust-1.45
- (let ((base-rust
- (rust-bootstrapped-package rust-1.44 "1.45.2"
- "0273a1g3f59plyi1n0azf21qjzwml1yqdnj5z472crz37qggr8xp")))
- (package
- (inherit base-rust)
- (source
- (origin
- (inherit (package-source base-rust))
- (patches (search-patches "rust-1.45-linker-locale.patch"))))
- (inputs
- (alist-replace "llvm" (list llvm-10)
- (package-inputs base-rust)))
- (arguments
- (substitute-keyword-arguments (package-arguments base-rust)
- ((#:phases phases)
- `(modify-phases ,phases
- ;; These tests make sure that the parser behaves properly when
- ;; a source file starts with a shebang. Unfortunately,
- ;; the patch-shebangs phase changes the meaning of these edge-cases.
- ;; We skip the test since it's drastically unlikely Guix's packaging
- ;; will introduce a bug here.
- (add-after 'patch-tests 'skip-shebang-tests
- (lambda _
- (with-directory-excursion "src/test/ui/parser/shebang"
- (delete-file "shebang-doc-comment.rs")
- (delete-file "sneaky-attrib.rs")
- #t)))
- ;; This test case synchronizes itself by starting a localhost TCP
- ;; server. This doesn't work as networking is not available.
- (add-after 'patch-tests 'skip-networking-test
- (lambda _
- (substitute* "src/tools/cargo/tests/testsuite/freshness.rs"
- (("fn linking_interrupted" all)
- (string-append "#[ignore] " all)))
- #t)))))))))
-
-(define-public rust-1.46
- (let ((base-rust
- (rust-bootstrapped-package rust-1.45 "1.46.0"
- "0a17jby2pd050s24cy4dfc0gzvgcl585v3vvyfilniyvjrqknsid")))
- (package
- (inherit base-rust)
- (outputs (cons "rustfmt" (package-outputs base-rust)))
- (arguments
- (substitute-keyword-arguments (package-arguments base-rust)
- ((#:phases phases)
- `(modify-phases ,phases
+ (substitute* "config.toml"
+ (("docs = false")
+ "docs = true"))))
+ (add-after 'configure 'add-gdb-to-config
+ (lambda* (#:key inputs #:allow-other-keys)
+ (let ((gdb (assoc-ref inputs "gdb")))
+ (substitute* "config.toml"
+ (("^python =.*" all)
+ (string-append all
+ "gdb = \"" gdb "/bin/gdb\"\n"))))))
(replace 'build
- (lambda* _
- (invoke "./x.py" "build")
- (invoke "./x.py" "build" "src/tools/cargo")
- (invoke "./x.py" "build" "src/tools/rustfmt")))
- (replace 'check
- (lambda* _
- ;; Test rustfmt.
- (let ((parallel-job-spec
- (string-append "-j" (number->string
- (min 4
- (parallel-job-count))))))
- (invoke "./x.py" parallel-job-spec "test" "-vv")
- (invoke "./x.py" parallel-job-spec "test"
- "src/tools/cargo")
- (invoke "./x.py" parallel-job-spec "test"
+ ;; Phase overridden to also build rustfmt.
+ (lambda* (#:key parallel-build? #:allow-other-keys)
+ (let ((job-spec (string-append
+ "-j" (if parallel-build?
+ (number->string (parallel-job-count))
+ "1"))))
+ (invoke "./x.py" job-spec "build"
+ "library/std" ;rustc
+ "src/tools/cargo"
"src/tools/rustfmt"))))
+ (replace 'check
+ ;; Phase overridden to also test rustfmt.
+ (lambda* (#:key tests? parallel-build? #:allow-other-keys)
+ (when tests?
+ (let ((job-spec (string-append
+ "-j" (if parallel-build?
+ (number->string (parallel-job-count))
+ "1"))))
+ (invoke "./x.py" job-spec "test" "-vv"
+ "library/std"
+ "src/tools/cargo"
+ "src/tools/rustfmt")))))
(replace 'install
+ ;; Phase overridden to also install rustfmt.
(lambda* (#:key outputs #:allow-other-keys)
(invoke "./x.py" "install")
(substitute* "config.toml"
- ;; replace prefix to specific output
+ ;; Adjust the prefix to the 'cargo' output.
(("prefix = \"[^\"]*\"")
- (string-append "prefix = \"" (assoc-ref outputs "cargo") "\"")))
+ (format #f "prefix = ~s" (assoc-ref outputs "cargo"))))
(invoke "./x.py" "install" "cargo")
(substitute* "config.toml"
- ;; replace prefix to specific output
+ ;; Adjust the prefix to the 'rustfmt' output.
(("prefix = \"[^\"]*\"")
- (string-append "prefix = \"" (assoc-ref outputs "rustfmt") "\"")))
- (invoke "./x.py" "install" "rustfmt")))
- (replace 'delete-install-logs
- (lambda* (#:key outputs #:allow-other-keys)
- (define (delete-manifest-file out-path file)
- (delete-file (string-append out-path "/lib/rustlib/" file)))
-
- (let ((out (assoc-ref outputs "out"))
- (cargo-out (assoc-ref outputs "cargo"))
- (rustfmt-out (assoc-ref outputs "rustfmt")))
- (for-each
- (lambda (file) (delete-manifest-file out file))
- '("install.log"
- "manifest-rust-docs"
- ,(string-append "manifest-rust-std-"
- (nix-system->gnu-triplet-for-rust))
- "manifest-rustc"))
- (for-each
- (lambda (file) (delete-manifest-file cargo-out file))
- '("install.log"
- "manifest-cargo"))
- (for-each
- (lambda (file) (delete-manifest-file rustfmt-out file))
- '("install.log"
- "manifest-rustfmt-preview"))
- #t))))))))))
-
-(define-public rust-1.47
- (let ((base-rust
- (rust-bootstrapped-package rust-1.46 "1.47.0"
- "07fqd2vp7cf1ka3hr207dnnz93ymxml4935vp74g4is79h3dz19i")))
- (package
- (inherit base-rust)
- (inputs
- (alist-replace "llvm" (list llvm-11)
- (package-inputs base-rust)))
- (arguments
- (substitute-keyword-arguments (package-arguments base-rust)
- ((#:phases phases)
- `(modify-phases ,phases
- ;; The source code got rearranged: libstd is now in the newly created library folder.
- (replace 'patch-tests
- (lambda* (#:key inputs #:allow-other-keys)
- (let ((bash (assoc-ref inputs "bash")))
- (substitute* "library/std/src/process.rs"
- (("\"/bin/sh\"") (string-append "\"" bash "/bin/sh\"")))
- ;; <https://lists.gnu.org/archive/html/guix-devel/2017-06/msg00222.html>
- (substitute* "library/std/src/sys/unix/process/process_common.rs"
- (("fn test_process_mask") "#[allow(unused_attributes)]
- #[ignore]
- fn test_process_mask"))
- #t)))
- (delete 'patch-cargo-checksums)
- (add-after 'patch-generated-file-shebangs 'patch-cargo-checksums
- ;; Generate checksums after patching generated files (in
- ;; particular, vendor/jemalloc/rep/Makefile).
- (lambda* _
- (use-modules (guix build cargo-utils))
- (substitute* "Cargo.lock"
- (("(checksum = )\".*\"" all name)
- (string-append name "\"" ,%cargo-reference-hash "\"")))
- (generate-all-checksums "vendor")
- #t)))))))))
-
-(define-public rust-1.48
- (let ((base-rust
- (rust-bootstrapped-package rust-1.47 "1.48.0"
- "0fz4gbb5hp5qalrl9lcl8yw4kk7ai7wx511jb28nypbxninkwxhf")))
- (package
- (inherit base-rust)
- (source
- (origin
- (inherit (package-source base-rust))
- ;; New patch required due to the second part of the source code rearrangement:
- ;; the relevant source code is now in the compiler directory.
- (patches (search-patches "rust-1.48-linker-locale.patch"))))
- (arguments
- (substitute-keyword-arguments (package-arguments base-rust)
- ((#:phases phases)
- `(modify-phases ,phases
- ;; Some tests got split out into separate files.
- (replace 'patch-tests
- (lambda* (#:key inputs #:allow-other-keys)
- (let ((bash (assoc-ref inputs "bash")))
- (substitute* "library/std/src/process/tests.rs"
- (("\"/bin/sh\"") (string-append "\"" bash "/bin/sh\"")))
- (substitute* "library/std/src/sys/unix/process/process_common/tests.rs"
- (("fn test_process_mask") "#[allow(unused_attributes)]
- #[ignore]
- fn test_process_mask"))
- #t))))))))))
-
-(define-public rust-1.49
- (rust-bootstrapped-package rust-1.48 "1.49.0"
- "0yf7kll517398dgqsr7m3gldzj0iwsp3ggzxrayckpqzvylfy2mm"))
-
-(define-public rust-1.50
- (rust-bootstrapped-package rust-1.49 "1.50.0"
- "0pjs7j62maiyvkmhp9zrxl528g2n0fphp4rq6ap7aqdv0a6qz5wm"))
-
-(define-public rust-1.51
- (rust-bootstrapped-package rust-1.50 "1.51.0"
- "0ixqkqglv3isxbvl4ldr4byrkx692wghsz3fasy1pn5kr2prnsvs"))
-
-(define-public rust-1.52
- (let ((base-rust
- (rust-bootstrapped-package rust-1.51 "1.52.1"
- "165zs3xzp9dravybwslqs1qhn35agp6wacmzpymqg3qfdni26vrs")))
- (package
- (inherit base-rust)
- (inputs
- (alist-replace "llvm" (list llvm-12)
- (package-inputs base-rust))))))
-
-;; TODO(staging): Bump this variable to the latest packaged rust.
-(define-public rust rust-1.45)
+ (format #f "prefix = ~s" (assoc-ref outputs "rustfmt"))))
+ (invoke "./x.py" "install" "rustfmt")))))))
+ ;; Add test inputs.
+ (native-inputs (cons* `("gdb" ,gdb)
+ `("procps" ,procps)
+ (package-native-inputs base-rust))))))
+
+;;; Note: Only the latest versions of Rust are supported and tested. The
+;;; intermediate rusts are built for bootstrapping purposes and should not
+;;; be relied upon. This is to ease maintenance and reduce the time
+;;; required to build the full Rust bootstrap chain.
+(define-public rust rust-1.54)
diff --git a/gnu/packages/samba.scm b/gnu/packages/samba.scm
index 966ccc8c17..c49ed9a4aa 100644
--- a/gnu/packages/samba.scm
+++ b/gnu/packages/samba.scm
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2013, 2015, 2017 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2013, 2015, 2017, 2021 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2015 Mark H Weaver <mhw@netris.org>
;;; Copyright © 2016, 2017, 2019, 2021 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2016 Adonay "adfeno" Felipe Nogueira <https://libreplanet.org/wiki/User:Adfeno> <adfeno@openmailbox.org>
@@ -289,6 +289,18 @@ Samba is an important component to seamlessly integrate Linux/Unix Servers and
Desktops into Active Directory environments using the winbind daemon.")
(license gpl3+)))
+(define-public samba/fixed
+ ;; Version that rarely changes, depended on by libsoup.
+ (package/inherit samba
+ (version "4.13.10")
+ (source
+ (origin
+ (inherit (package-source samba))
+ (uri (string-append "https://download.samba.org/pub/samba/stable/"
+ "samba-" version ".tar.gz"))
+ (sha256
+ (base32 "00q5hf2r71dyma785dckcyksv3082mqfgyy9q6k6rc6kqjwkirzh"))))))
+
(define-public talloc
(package
(name "talloc")
diff --git a/gnu/packages/scheme.scm b/gnu/packages/scheme.scm
index d6299fc503..8fd3dfaea2 100644
--- a/gnu/packages/scheme.scm
+++ b/gnu/packages/scheme.scm
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2013, 2014, 2015, 2016, 2018, 2020 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2013, 2014, 2015, 2016, 2018, 2020, 2021 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2015 Taylan Ulrich Bayırlı/Kammer <taylanbayirli@gmail.com>
;;; Copyright © 2015, 2016 Federico Beffa <beffa@fbengineering.ch>
;;; Copyright © 2016 Ricardo Wurmus <rekado@elephly.net>
@@ -127,10 +127,6 @@
(("\\./configure")
(string-append (which "sh") " configure")))
#t))
- ;; FIXME: the texlive-union insists on regenerating fonts. It stores
- ;; them in HOME, so it needs to be writeable.
- (add-before 'build 'set-HOME
- (lambda _ (setenv "HOME" "/tmp") #t))
(replace 'build
(lambda* (#:key system outputs #:allow-other-keys)
(let ((out (assoc-ref outputs "out")))
@@ -178,8 +174,8 @@
("autoconf" ,autoconf)
("automake" ,automake)
("libtool" ,libtool)
- ("texlive" ,(texlive-union (list texlive-tex-texinfo
- texlive-epsf)))
+ ("texlive" ,(texlive-updmap.cfg (list texlive-tex-texinfo
+ texlive-epsf)))
("texinfo" ,texinfo)
("ghostscript" ,ghostscript)
("m4" ,m4)))
@@ -627,8 +623,7 @@ utility functions for all standard Scheme implementations.")
(replace 'build
(lambda* (#:key inputs outputs #:allow-other-keys)
(setenv "SCHEME_LIBRARY_PATH"
- (string-append (assoc-ref inputs "slib")
- "/lib/slib/"))
+ (search-input-directory inputs "lib/slib"))
(invoke "make" "scmlit" "CC=gcc")
(invoke "make" "all")))
(add-after 'install 'post-install
@@ -638,8 +633,7 @@ utility functions for all standard Scheme implementations.")
(delete-file req)
(format (open req (logior O_WRONLY O_CREAT))
"(define (library-vicinity) ~s)\n"
- (string-append (assoc-ref inputs "slib")
- "/lib/slib/"))
+ (search-input-directory inputs "lib/slib"))
;; We must generate the slibcat file.
(invoke (string-append out "/bin/scm")
diff --git a/gnu/packages/screen.scm b/gnu/packages/screen.scm
index 4426d9d562..502e8f11af 100644
--- a/gnu/packages/screen.scm
+++ b/gnu/packages/screen.scm
@@ -132,14 +132,13 @@ controlling terminal and attach to it later.")
(add-after
'install 'wrap-python-scripts
(lambda* (#:key inputs outputs #:allow-other-keys)
- (let* ((python (string-append (assoc-ref inputs "python")
- "/bin/python"))
+ (let* ((python (search-input-file inputs "/bin/python"))
(out (assoc-ref outputs "out"))
(config (string-append out "/bin/byobu-config"))
(select (string-append out "/bin/byobu-select-session")))
(wrap-program config
`("BYOBU_PYTHON" = (,python))
- `("PYTHONPATH" ":" prefix (,(getenv "PYTHONPATH"))))
+ `("GUIX_PYTHONPATH" ":" prefix (,(getenv "GUIX_PYTHONPATH"))))
(wrap-program select
`("BYOBU_PYTHON" = (,python)))
#t))))))
diff --git a/gnu/packages/sdl.scm b/gnu/packages/sdl.scm
index 2211ccab87..7e9dcd9ba2 100644
--- a/gnu/packages/sdl.scm
+++ b/gnu/packages/sdl.scm
@@ -116,7 +116,7 @@ joystick, and graphics hardware.")
(define-public sdl2
(package (inherit sdl)
(name "sdl2")
- (version "2.0.12")
+ (version "2.0.14")
(source (origin
(method url-fetch)
(uri
@@ -124,7 +124,7 @@ joystick, and graphics hardware.")
version ".tar.gz"))
(sha256
(base32
- "0qy8wbqvfkb5ps8kxgaaf2zzpkjqbsw712hlp74znbn0jpv6i4il"))))
+ "1g1jahknv5r4yhh1xq5sf0md20ybdw1zh1i15lry26sq39bmn8fq"))))
(arguments
(substitute-keyword-arguments (package-arguments sdl)
((#:configure-flags flags)
diff --git a/gnu/packages/security-token.scm b/gnu/packages/security-token.scm
index d5ce6e100d..537f43cb89 100644
--- a/gnu/packages/security-token.scm
+++ b/gnu/packages/security-token.scm
@@ -1,6 +1,6 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2014 Ludovic Courtès <ludo@gnu.org>
-;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2014, 2021 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2016, 2021 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2016 Mike Gerwitz <mtg@gnu.org>
;;; Copyright © 2016 Marius Bakke <mbakke@fastmail.com>
;;; Copyright © 2017 Thomas Danckaert <post@thomasdanckaert.be>
@@ -10,6 +10,7 @@
;;; Copyright © 2018 Arun Isaac <arunisaac@systemreboot.net>
;;; Copyright © 2020 Raphaël Mélotte <raphael.melotte@mind.be>
;;; Copyright © 2021 Antero Mejr <antero@kodmin.com>
+;;; Copyright © 2021 Brice Waegeneire <brice@waegenei.re>
;;; Copyright © 2021 Sergey Trofimov <sarg@sarg.org.ru>
;;; Copyright © 2021 Dhruvin Gandhi <contact@dhruvin.dev>
;;; Copyright © 2021 Ahmad Jarara <git@ajarara.io>
@@ -222,14 +223,14 @@ with a PKCS #11 Cryptographic Token Interface.")
(define-public pcsc-lite
(package
(name "pcsc-lite")
- (version "1.9.0")
+ (version "1.9.3")
(source (origin
(method url-fetch)
(uri (string-append "https://pcsclite.apdu.fr/files/"
"pcsc-lite-" version ".tar.bz2"))
(sha256
(base32
- "1y9f9zipnrmgiw0mxrvcgky8vfrcmg6zh40gbln5a93i2c1x8j01"))))
+ "0n9y9m1wr5bwanpnylpdza3sf7lawi63jjizrl1aj5yxf4y46mk9"))))
(build-system gnu-build-system)
(arguments
`(#:configure-flags '("--enable-usbdropdir=/var/lib/pcsc/drivers"
@@ -300,8 +301,8 @@ website for more information about Yubico and the YubiKey.")
;; configuration file at runtime.
(add-after 'unpack 'set-default-libpcsclite.so.1-path
(lambda* (#:key inputs #:allow-other-keys)
- (let ((libpcsclite (string-append (assoc-ref inputs "pcsc-lite")
- "/lib/libpcsclite.so.1")))
+ (let ((libpcsclite (search-input-file inputs
+ "/lib/libpcsclite.so.1")))
(substitute* "configure"
(("DEFAULT_PCSC_PROVIDER=\"libpcsclite\\.so\\.1\"")
(string-append
@@ -439,8 +440,8 @@ retrieve a YubiKey's serial number, and so forth.")
(("lib = \"libpcsclite\\.so\\.1\";")
(simple-format #f
"lib = \"~a\";"
- (string-append (assoc-ref inputs "pcsc-lite")
- "/lib/libpcsclite.so.1"))))
+ (search-input-file inputs
+ "/lib/libpcsclite.so.1"))))
#t)))))
(inputs
`(("pcsc-lite" ,pcsc-lite)))
@@ -611,10 +612,11 @@ your existing infrastructure.")
(add-after 'unpack 'install-public-suffix-list
(lambda* (#:key inputs #:allow-other-keys)
(copy-file
- (string-append (assoc-ref inputs "public-suffix-list")
- "/share/public-suffix-list-"
- ,(package-version public-suffix-list)
- "/public_suffix_list.dat")
+ (search-input-file inputs
+ (string-append
+ "/share/public-suffix-list-"
+ ,(package-version public-suffix-list)
+ "/public_suffix_list.dat"))
"fido2/public_suffix_list.dat")
#t)))))
(propagated-inputs
diff --git a/gnu/packages/selinux.scm b/gnu/packages/selinux.scm
index 4c2228871f..ecc18865cb 100644
--- a/gnu/packages/selinux.scm
+++ b/gnu/packages/selinux.scm
@@ -2,6 +2,8 @@
;;; Copyright © 2016, 2017, 2018 Ricardo Wurmus <rekado@elephly.net>
;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
;;; Copyright © 2019, 2020 Marius Bakke <mbakke@fastmail.com>
+;;; Copyright © 2021 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2021 Guillaume Le Vaillant <glv@posteo.net>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -47,47 +49,41 @@
(define-public libsepol
(package
(name "libsepol")
- (version "3.0")
- (source (let ((release "20191204"))
- (origin
- (method git-fetch)
- (uri (git-reference
- (url "https://github.com/SELinuxProject/selinux")
- (commit release)))
- (file-name (string-append "selinux-" release "-checkout"))
- (sha256
- (base32
- "05rpzm72cgprd0ccr6lvx9hm8j8b5nkqi4avshlsyg7s3sdlcxjs")))))
+ (version "3.2")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/SELinuxProject/selinux")
+ (commit version)))
+ (file-name (git-file-name "selinux" version))
+ (sha256
+ (base32
+ "03p3lmvrvkcvsmiczsjzhyfgxlxdkdyq0p8igv3s3hdak5n92jjn"))))
(build-system gnu-build-system)
(arguments
`(#:tests? #f ; tests require checkpolicy, which requires libsepol
#:test-target "test"
#:make-flags
- (let ((out (assoc-ref %outputs "out"))
- (target ,(%current-target-system)))
+ (let ((out (assoc-ref %outputs "out")))
(list (string-append "PREFIX=" out)
(string-append "SHLIBDIR=" out "/lib")
(string-append "MAN3DIR=" out "/share/man/man3")
(string-append "MAN5DIR=" out "/share/man/man5")
(string-append "MAN8DIR=" out "/share/man/man8")
+ (string-append "CFLAGS=-Wno-error")
(string-append "LDFLAGS=-Wl,-rpath=" out "/lib")
- (string-append "CC="
- (if target
- (string-append (assoc-ref %build-inputs "cross-gcc")
- "/bin/" target "-gcc")
- "gcc"))))
+ (string-append "CC=" ,(cc-for-target))))
#:phases
(modify-phases %standard-phases
(delete 'configure)
(add-after 'unpack 'enter-dir
- (lambda _ (chdir ,name) #t))
+ (lambda _ (chdir ,name)))
(add-after 'enter-dir 'portability
(lambda _
(substitute* "src/ibpkeys.c"
(("#include \"ibpkey_internal.h\"" line)
(string-append line "\n#include <inttypes.h>\n"))
- (("%#lx") "%#\" PRIx64 \""))
- #t)))))
+ (("%#lx") "%#\" PRIx64 \"")))))))
(native-inputs
`(("flex" ,flex)))
(home-page "https://selinuxproject.org/")
@@ -106,23 +102,18 @@ boolean settings).")
(arguments
`(#:tests? #f ; there is no check target
#:make-flags
- (let ((out (assoc-ref %outputs "out"))
- (target ,(%current-target-system)))
+ (let ((out (assoc-ref %outputs "out")))
(list (string-append "PREFIX=" out)
(string-append "LIBSEPOLA="
(assoc-ref %build-inputs "libsepol")
"/lib/libsepol.a")
- (string-append "CC="
- (if target
- (string-append (assoc-ref %build-inputs "cross-gcc")
- "/bin/" target "-gcc")
- "gcc"))))
+ (string-append "CC=" ,(cc-for-target))))
#:phases
(modify-phases %standard-phases
(delete 'configure)
(delete 'portability)
(add-after 'unpack 'enter-dir
- (lambda _ (chdir ,name) #t)))))
+ (lambda _ (chdir ,name))))))
(inputs
`(("libsepol" ,libsepol)))
(native-inputs
@@ -159,7 +150,7 @@ module into a binary representation.")
`(modify-phases ,phases
(delete 'portability)
(replace 'enter-dir
- (lambda _ (chdir ,name) #t))
+ (lambda _ (chdir ,name)))
(add-after 'build 'pywrap
(lambda* (#:key make-flags #:allow-other-keys)
(apply invoke "make" "pywrap" make-flags)))
@@ -209,13 +200,12 @@ the core SELinux management utilities.")
`(modify-phases ,phases
(delete 'portability)
(replace 'enter-dir
- (lambda _ (chdir ,name) #t))
+ (lambda _ (chdir ,name)))
(add-before 'install 'adjust-semanage-conf-location
(lambda _
(substitute* "src/Makefile"
(("DEFAULT_SEMANAGE_CONF_LOCATION=/etc")
- "DEFAULT_SEMANAGE_CONF_LOCATION=$(PREFIX)/etc"))
- #t))
+ "DEFAULT_SEMANAGE_CONF_LOCATION=$(PREFIX)/etc"))))
(add-after 'build 'pywrap
(lambda* (#:key make-flags #:allow-other-keys)
(apply invoke "make" "pywrap" make-flags)))
@@ -256,7 +246,7 @@ binary policies.")
`(modify-phases ,phases
(delete 'portability)
(replace 'enter-dir
- (lambda _ (chdir ,name) #t))))))
+ (lambda _ (chdir ,name)))))))
(inputs
`(("libsepol" ,libsepol)))
(native-inputs
@@ -279,7 +269,7 @@ binary policies.")
`(modify-phases ,phases
(delete 'portability)
(replace 'enter-dir
- (lambda _ (chdir "python/sepolgen") #t))
+ (lambda _ (chdir "python/sepolgen")))
;; By default all Python files would be installed to
;; $out/gnu/store/...-python-.../, so we override the
;; PACKAGEDIR to fix this.
@@ -301,8 +291,7 @@ binary policies.")
(assoc-ref inputs "python"))
"/site-packages/sepolgen")))
(substitute* "src/share/Makefile"
- (("\\$\\(DESTDIR\\)") (assoc-ref outputs "out"))))
- #t)))))))
+ (("\\$\\(DESTDIR\\)") (assoc-ref outputs "out")))))))))))
(inputs
`(("python" ,python-wrapper)))
(native-inputs '())
@@ -342,8 +331,7 @@ based on required access.")
(add-after 'unpack 'set-SEPOL-variable
(lambda* (#:key inputs #:allow-other-keys)
(setenv "SEPOL"
- (string-append (assoc-ref inputs "libsepol")
- "/lib/libsepol.a"))))
+ (search-input-file inputs "/lib/libsepol.a"))))
(add-after 'unpack 'remove-Werror
(lambda _
(substitute* "setup.py"
@@ -379,7 +367,7 @@ tools, and libraries designed to facilitate SELinux policy analysis.")
`(#:test-target "test"
#:make-flags
(let ((out (assoc-ref %outputs "out")))
- (list "CC=gcc"
+ (list (string-append "CC=" ,(cc-for-target))
(string-append "PREFIX=" out)
(string-append "LOCALEDIR=" out "/share/locale")
(string-append "BASHCOMPLETIONDIR=" out
@@ -401,9 +389,8 @@ tools, and libraries designed to facilitate SELinux policy analysis.")
#:phases
(modify-phases %standard-phases
(delete 'configure)
- (delete 'portability)
(add-after 'unpack 'enter-dir
- (lambda _ (chdir ,name) #t))
+ (lambda _ (chdir ,name)))
(add-after 'enter-dir 'ignore-/usr-tests
(lambda* (#:key inputs #:allow-other-keys)
;; Rewrite lookup paths for header files.
@@ -411,10 +398,9 @@ tools, and libraries designed to facilitate SELinux policy analysis.")
"setfiles/Makefile"
"run_init/Makefile")
(("/usr(/include/security/pam_appl.h)" _ file)
- (string-append (assoc-ref inputs "pam") file))
+ (search-input-file inputs file))
(("/usr(/include/libaudit.h)" _ file)
- (string-append (assoc-ref inputs "audit") file)))
- #t)))))
+ (search-input-file inputs file))))))))
(inputs
`(("audit" ,audit)
("pam" ,linux-pam)
diff --git a/gnu/packages/sequoia.scm b/gnu/packages/sequoia.scm
index 2c68f43e36..719a9d2ef4 100644
--- a/gnu/packages/sequoia.scm
+++ b/gnu/packages/sequoia.scm
@@ -70,7 +70,7 @@
("sqlite" ,sqlite)))
(arguments
`(#:tests? #f ;; building the tests requires 9.7GB total
- #:rust ,rust-1.46
+ #:rust ,rust
#:cargo-inputs
(("rust-anyhow" ,rust-anyhow-1)
("rust-backtrace" ,rust-backtrace-0.3)
diff --git a/gnu/packages/serialization.scm b/gnu/packages/serialization.scm
index e24ef973b5..4501dfb62d 100644
--- a/gnu/packages/serialization.scm
+++ b/gnu/packages/serialization.scm
@@ -3,13 +3,14 @@
;;; Copyright © 2016 Lukas Gradl <lgradl@openmailbox.org>
;;; Copyright © 2016 David Craven <david@craven.ch>
;;; Copyright © 2016, 2019, 2020 Marius Bakke <mbakke@fastmail.com>
-;;; Copyright © 2016, 2018, 2019 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2016, 2018, 2019, 2021 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2017 Corentin Bocquillon <corentin@nybble.fr>
;;; Copyright © 2017 Gregor Giesen <giesen@zaehlwerk.net>
;;; Copyright © 2017 Frederick M. Muriithi <fredmanglis@gmail.com>
;;; Copyright © 2017 Nikita <nikita@n0.is>
;;; Copyright © 2017, 2018, 2019 Tobias Geerinckx-Rice <me@tobias.gr>
;;; Copyright © 2018 Joshua Sierles, Nextjournal <joshua@nextjournal.com>
+;;; Copyright © 2020 Martin Becze <mjbecze@riseup.net>
;;; Copyright © 2020 Alexandros Theodotou <alex@zrythm.org>
;;;
;;; This file is part of GNU Guix.
@@ -31,6 +32,7 @@
#:use-module ((guix licenses) #:prefix license:)
#:use-module (guix packages)
#:use-module (guix download)
+ #:use-module (guix hg-download)
#:use-module (guix git-download)
#:use-module (guix utils)
#:use-module (guix build-system cmake)
@@ -110,8 +112,7 @@ implement RPC protocols.")
(let ((gcc (assoc-ref inputs "gcc")))
(setenv "CPLUS_INCLUDE_PATH"
(string-join
- (cons* (string-append (assoc-ref inputs "libcxx+libcxxabi")
- "/include/c++/v1")
+ (cons* (search-input-directory inputs "include/c++/v1")
;; Hide GCC's C++ headers so that they do not interfere with
;; the Clang headers.
(delete (string-append gcc "/include/c++")
@@ -418,16 +419,17 @@ in which the loaded data is arranged in memory.")
(define-public jsoncpp
(package
(name "jsoncpp")
- (version "1.9.2")
+ (version "1.9.4")
(home-page "https://github.com/open-source-parsers/jsoncpp")
(source (origin
(method git-fetch)
(uri (git-reference (url home-page) (commit version)))
(file-name (git-file-name name version))
- (patches (search-patches "jsoncpp-fix-inverted-case.patch"))
+ (patches
+ (search-patches "jsoncpp-pkg-config-version.patch"))
(sha256
(base32
- "037d1b1qdmn3rksmn1j71j26bv4hkjv7sn7da261k853xb5899sg"))))
+ "0qnx5y6c90fphl9mj9d20j2dfgy6s5yr5l0xnzid0vh71zrp6jwv"))))
(build-system cmake-build-system)
(arguments
`(#:configure-flags '("-DBUILD_SHARED_LIBS:BOOL=YES"
@@ -569,21 +571,23 @@ it is comparable to protobuf.")
(define-public python-ruamel.yaml
(package
(name "python-ruamel.yaml")
- (version "0.15.83")
+ (version "0.16.13")
(source
(origin
(method url-fetch)
(uri (pypi-uri "ruamel.yaml" version))
(sha256
(base32
- "0p4i8ad28cbbbjja8b9274irkhnphhvhap3aym6yb8xfp1d72kpw"))))
+ "0hm9yg785f46bkrgqknd6fdvmkby9dpzjnm0b63qf0i748acaj5v"))))
(build-system python-build-system)
(native-inputs
`(("python-pytest" ,python-pytest)))
+ (propagated-inputs
+ `(("python-ruamel.yaml.clib" ,python-ruamel.yaml.clib)))
(arguments
`(;; TODO: Tests require packaging "ruamel.std.pathlib".
#:tests? #f))
- (home-page "https://bitbucket.org/ruamel/yaml")
+ (home-page "https://sourceforge.net/projects/ruamel-yaml/")
(synopsis "YAML 1.2 parser/emitter")
(description
"This package provides YAML parser/emitter that supports roundtrip
@@ -593,8 +597,43 @@ and has round-trip loaders and dumpers. It supports comments. Block
style and key ordering are kept, so you can diff the source.")
(license license:expat)))
-(define-public python2-ruamel.yaml
- (package-with-python2 python-ruamel.yaml))
+(define-public python-ruamel.yaml.clib
+ (package
+ (name "python-ruamel.yaml.clib")
+ (version "0.2.6")
+ (source
+ (origin
+ ;; pypi release code has cythonized code without corresponding source.
+ (method hg-fetch)
+ (uri (hg-reference
+ (url "http://hg.code.sf.net/p/ruamel-yaml-clib/code")
+ (changeset version)))
+ (file-name (string-append name "-" version "-checkout"))
+ (sha256
+ (base32
+ "05m3y7pjfbaarqbbgw1k6gs6cnnmxnwadjipxvw1aaaqk3s236cs"))
+ (modules '((guix build utils)))
+ (snippet
+ '(begin
+ (delete-file "_ruamel_yaml.c")))))
+ (build-system python-build-system)
+ (arguments
+ `(#:tests? #f ; This package is split from python-ruamel.yaml and
+ ; depends on modules from it for the test suite.
+ #:phases
+ (modify-phases %standard-phases
+ (delete 'sanity-check) ; Depends on python-ruamel.yaml
+ (add-after 'unpack 'cythonize-code
+ (lambda _
+ (invoke "cython" "_ruamel_yaml.pyx"))))))
+ (native-inputs
+ `(("python-cython" ,python-cython)))
+ (home-page "https://sourceforge.net/p/ruamel-yaml-clib/code/ci/default/tree")
+ (synopsis "C version of reader, parser and emitter for ruamel.yaml")
+ (description
+ "This package provides a C version of the reader, parser and emitter for
+@code{ruamel.yaml} derived from libyaml.")
+ (license license:expat)))
(define-public python-cbor
(package
diff --git a/gnu/packages/shells.scm b/gnu/packages/shells.scm
index 33290862bf..29890af48e 100644
--- a/gnu/packages/shells.scm
+++ b/gnu/packages/shells.scm
@@ -16,6 +16,7 @@
;;; Copyright © 2020 Brice Waegeneire <brice@waegenei.re>
;;; Copyright © 2020 Ryan Prior <rprior@protonmail.com>
;;; Copyright © 2020 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2020 Marius Bakke <marius@gnu.org>
;;; Copyright © 2021 Nicolas Goaziou <mail@nicolasgoaziou.fr>
;;; Copyright © 2021 Felix Gruber <felgru@posteo.net>
;;;
@@ -296,12 +297,13 @@ and syntax highlighting.")
,(string-append func-path "/fenv.apply.fish")
,(string-append func-path "/fenv.main.fish"))
(("bash")
- (string-append (assoc-ref %build-inputs "bash") "/bin/bash"))
+ (search-input-file %build-inputs "/bin/bash"))
(("sed")
- (string-append (assoc-ref %build-inputs "sed") "/bin/sed"))
+ (search-input-file %build-inputs "/bin/sed"))
((" tr ")
- (string-append " " (assoc-ref %build-inputs "coreutils")
- "/bin/tr ")))))))
+ (string-append " "
+ (search-input-file %build-inputs "/bin/tr")
+ " ")))))))
(inputs
`(("bash" ,bash)
("coreutils" ,coreutils)
@@ -392,7 +394,7 @@ written by Paul Haahr and Byron Rakitzis.")
(define-public tcsh
(package
(name "tcsh")
- (version "6.22.02")
+ (version "6.22.03")
(source (origin
(method url-fetch)
;; Old tarballs are moved to old/.
@@ -402,7 +404,7 @@ written by Paul Haahr and Byron Rakitzis.")
"old/tcsh-" version ".tar.gz")))
(sha256
(base32
- "0nw8prz1n0lmr82wnpyhrzmki630afn7p9cfgr3vl00vr9c72a7d"))
+ "1dv24bsp6faayinvwds092ylk9sb6894rl9ddm87y31a7mjzsb5y"))
(patches (search-patches "tcsh-fix-autotest.patch"))
(patch-flags '("-p0"))))
(build-system gnu-build-system)
@@ -427,6 +429,16 @@ written by Paul Haahr and Byron Rakitzis.")
;; Take care of pwd
(substitute* '("tests/commands.at" "tests/variables.at")
(("/bin/pwd") (which "pwd")))
+ (substitute* "Makefile"
+ ;; Likewise for /usr/bin/env.
+ (("/usr/bin/env") "env")
+ ;; Don't reset the environment (PATH, etc).
+ (("\\$\\(ENVCMD\\) -") "$(ENVCMD)"))
+ ;; This test does not expect the home directory from
+ ;; /etc/passwd to be '/'.
+ (substitute* "tests/subst.at"
+ (("\\$\\(id -un\\)/foo")
+ "$(id -un)//foo"))
;; The .at files create shell scripts without shebangs. Erk.
(substitute* "tests/commands.at"
(("./output.sh") "/bin/sh output.sh"))
@@ -954,8 +966,7 @@ files and text.")
(base32 "1db521jrs0yxwmvkkl8wssa8qyi0m62n69l7xxl2gpyz1v8nvw76"))))
(build-system cargo-build-system)
(arguments
- `(#:rust ,rust-1.52
- #:tests? #false ;missing files
+ `(#:tests? #false ;missing files
#:features '("extra")
#:cargo-inputs
(("rust-ctrlc" ,rust-ctrlc-3)
diff --git a/gnu/packages/simulation.scm b/gnu/packages/simulation.scm
index 23580322bb..f5fe3fcf1d 100644
--- a/gnu/packages/simulation.scm
+++ b/gnu/packages/simulation.scm
@@ -1,5 +1,6 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2017, 2018, 2019, 2020, 2021 Paul Garlick <pgarlick@tourbillion-technology.com>
+;;; Copyright © 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -270,16 +271,13 @@ problems for efficient solution on parallel systems.")
(replace 'check
(lambda _
(setenv "HOME" "/tmp")
- (setenv "PYTHONPATH"
- (string-append (getcwd) ":" (getenv "PYTHONPATH")))
(with-directory-excursion "test"
;; Disable parallel tests to avoid race condition. See
;; https://github.com/pytest-dev/pytest-cov/issues/237.
(substitute* "runtests.sh"
(("for p in 1 4 8 16; do")
"for p in 1; do"))
- (invoke "./runtests.sh"))
- #t)))))
+ (invoke "./runtests.sh")))))))
(home-page "https://bitbucket.org/fenics-project/dijitso/")
(synopsis "Distributed just-in-time building of shared libraries")
(description
@@ -315,11 +313,7 @@ the complexity of that interface. Parallel support depends on the
(modify-phases %standard-phases
(replace 'check
(lambda _
- (setenv "PYTHONPATH"
- (string-append (getcwd) ":" (getenv "PYTHONPATH")))
- (with-directory-excursion "test"
- (invoke "py.test"))
- #t)))))
+ (invoke "py.test" "test"))))))
(home-page "https://bitbucket.org/fenics-project/ufl/")
(synopsis "Unified language for form-compilers")
(description "The Unified Form Language (UFL) is a domain specific
@@ -353,8 +347,6 @@ UFL is part of the FEniCS Project.")
(modify-phases %standard-phases
(replace 'check
(lambda _
- (setenv "PYTHONPATH"
- (string-append (getcwd) ":" (getenv "PYTHONPATH")))
(with-directory-excursion "test"
;; FIXME: three FIAT test modules are known to fail
;; with recent versions of pytest (>= 4). These are
@@ -364,8 +356,7 @@ UFL is part of the FEniCS Project.")
(invoke "py.test" "unit/"
"--ignore=unit/test_fiat.py"
"--ignore=unit/test_quadrature.py"
- "--ignore=unit/test_reference_element.py"))
- #t)))))
+ "--ignore=unit/test_reference_element.py")))))))
(home-page "https://bitbucket.org/fenics-project/fiat/")
(synopsis "Tabulation of finite element function spaces")
(description
@@ -405,8 +396,6 @@ FIAT is part of the FEniCS Project.")
(replace 'check
(lambda _
(setenv "HOME" (getcwd))
- (setenv "PYTHONPATH"
- (string-append (getcwd) ":" (getenv "PYTHONPATH")))
(with-directory-excursion "test"
;; FIXME: the tests in subdirectory
;; 'unit/ufc/finite_element' require the ffc_factory
@@ -631,8 +620,7 @@ user interface to the FEniCS core components and external libraries.")
;; Define paths to store locations.
(setenv "PYBIND11_DIR" (assoc-ref %build-inputs "pybind11"))
;; Move to python sub-directory.
- (chdir "python")
- #t))
+ (chdir "python")))
(add-after 'build 'mpi-setup
,%openmpi-setup)
(add-before 'check 'pre-check
@@ -674,14 +662,8 @@ user interface to the FEniCS core components and external libraries.")
"d for d in demos if d[0].stem not in "
"excludeList]\n")))
(setenv "HOME" (getcwd))
- (setenv "PYTHONPATH"
- (string-append
- (getcwd) "/build/lib.linux-x86_64-"
- ,(version-major+minor (package-version python)) ":"
- (getenv "PYTHONPATH")))
;; Restrict OpenBLAS to MPI-only in preference to MPI+OpenMP.
- (setenv "OPENBLAS_NUM_THREADS" "1")
- #t))
+ (setenv "OPENBLAS_NUM_THREADS" "1")))
(replace 'check
(lambda _
(with-directory-excursion "test"
@@ -693,8 +675,7 @@ user interface to the FEniCS core components and external libraries.")
(min 3 (parallel-job-count)))
"python" "-B" "-m"
"pytest" "unit" "--ignore"
- "unit/nls/test_PETScSNES_solver.py"))
- #t))
+ "unit/nls/test_PETScSNES_solver.py"))))
(add-after 'install 'install-demo-files
(lambda* (#:key outputs #:allow-other-keys)
(let* ((demos (string-append
@@ -708,8 +689,7 @@ user interface to the FEniCS core components and external libraries.")
(unless (equal? "." dir)
(mkdir-p tgt-dir)
(install-file file tgt-dir))))
- (find-files "." ".*\\.(py|gz|xdmf)$"))))
- #t)))))
+ (find-files "." ".*\\.(py|gz|xdmf)$")))))))))
(home-page "https://fenicsproject.org/")
(synopsis "High-level environment for solving differential equations")
(description
diff --git a/gnu/packages/skribilo.scm b/gnu/packages/skribilo.scm
index e5d764ae28..4d3d420973 100644
--- a/gnu/packages/skribilo.scm
+++ b/gnu/packages/skribilo.scm
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2020 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2020, 2021 Ludovic Courtès <ludo@gnu.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -65,7 +65,12 @@
" -c"))))
#t)))
- #:parallel-build? #f))
+ #:parallel-build? #f
+
+ ;; XXX: Temporarily disable tests because they rely on
+ ;; 'test-runner-current' *not* returning #f after 'test-end', which is
+ ;; no longer the case in Guile >= 3.0.6. This is fixed upstream.
+ #:tests? #f))
(native-inputs `(("pkg-config" ,pkg-config)))
diff --git a/gnu/packages/slang.scm b/gnu/packages/slang.scm
index 404a4535ca..693144e173 100644
--- a/gnu/packages/slang.scm
+++ b/gnu/packages/slang.scm
@@ -57,14 +57,21 @@
#:parallel-build? #f ; there's at least one race
#:phases
(modify-phases %standard-phases
+ (add-after 'unpack 'reduce-array-test-size
+ ;; Reduce the size of the array, otherwise the array.sl/array.slc
+ ;; tests fails with "Unable to create a multi-dimensional array of
+ ;; the desired size" on 32 bit systems.
+ (lambda _
+ (substitute* "src/test/array.sl"
+ (("10000,10000,10000,10000,10000,10000")
+ "10,10,10,10,10,10"))))
(add-before 'configure 'substitute-before-config
(lambda* (#:key inputs #:allow-other-keys)
(let ((ncurses (assoc-ref inputs "ncurses")))
(substitute* "configure"
(("MISC_TERMINFO_DIRS=\"\"")
(string-append "MISC_TERMINFO_DIRS="
- "\"" ncurses "/share/terminfo" "\"")))
- #t))))))
+ "\"" ncurses "/share/terminfo" "\"")))))))))
(inputs
`(("readline" ,readline)
("zlib" ,zlib)
diff --git a/gnu/packages/solidity.scm b/gnu/packages/solidity.scm
new file mode 100644
index 0000000000..26167ee659
--- /dev/null
+++ b/gnu/packages/solidity.scm
@@ -0,0 +1,92 @@
+;;; Copyright © 2020 Martin Becze <mjbecze@riseup.net>
+;;;
+;;; This file is part of GNU Guix.
+;;;
+;;; GNU Guix is free software; you can redistribute it and/or modify it
+;;; under the terms of the GNU General Public License as published by
+;;; the Free Software Foundation; either version 3 of the License, or (at
+;;; your option) any later version.
+;;;
+;;; GNU Guix is distributed in the hope that it will be useful, but
+;;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;;; GNU General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
+
+(define-module (gnu packages solidity)
+ #:use-module (gnu packages base)
+ #:use-module (gnu packages boost)
+ #:use-module (gnu packages maths)
+ #:use-module (gnu packages serialization)
+ #:use-module (gnu packages python)
+ #:use-module (gnu packages ncurses)
+ #:use-module (guix packages)
+ #:use-module (guix git-download)
+ #:use-module (guix build-system cmake)
+ #:use-module ((guix licenses) #:prefix license:))
+
+(define-public solidity
+ (let ((commit "3f05b770bdbf60eca866382049ea191dd701409a"))
+ (package
+ (name "solidity")
+ (version "0.7.4")
+ (source
+ (origin
+ (method git-fetch)
+ (uri
+ (git-reference
+ (url "https://github.com/ethereum/solidity")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "1mswhjymiwnd3n7h3sjvjx5x8223yih0yvfcr0zpqr4aizpfx5z8"))))
+ (build-system cmake-build-system)
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'create-commit_hash.txt
+ (lambda _
+ (with-output-to-file "commit_hash.txt"
+ (lambda _
+ (display
+ (substring ,commit 0 8))))))
+ (delete 'configure)
+ (delete 'install)
+ (replace 'build
+ (lambda* (#:key outputs #:allow-other-keys)
+ ;; Unbundle jsoncpp
+ (delete-file "./cmake/jsoncpp.cmake")
+ (substitute* "CMakeLists.txt"
+ (("include\\(jsoncpp\\)") ""))
+ ;; Bug list is always sorted since we only build releases
+ (substitute* "./test/cmdlineTests.sh"
+ (("\"\\$REPO_ROOT\"/scripts/update_bugs_by_version\\.py") ""))
+ (substitute* "./scripts/build.sh"
+ (("sudo\\ make\\ install") "make install")
+ (("cmake\\ ..")
+ (string-append "cmake .. -DCMAKE_INSTALL_PREFIX="
+ (assoc-ref outputs "out"))))
+ (setenv "CIRCLECI" "1")
+ (invoke "./scripts/build.sh")
+ #t))
+ (replace 'check
+ (lambda _
+ (invoke "./scripts/tests.sh")
+ #t)))))
+ (inputs
+ `(("boost-static" ,boost-static)
+ ("jsoncpp" ,jsoncpp)
+ ("z3" ,z3)))
+ (native-inputs
+ `(("python" ,python)
+ ("tput" ,ncurses)
+ ("xargs" ,findutils)))
+ (home-page "https://solidity.readthedocs.io")
+ (synopsis "Contract-Oriented Programming Language")
+ (description
+ "Solidity is a statically-typed curly-braces programming language
+designed for developing smart contracts that run on the Ethereum Virtual
+Machine.")
+ (license license:gpl3+))))
diff --git a/gnu/packages/speech.scm b/gnu/packages/speech.scm
index cbc46b32b4..8914d6d20e 100644
--- a/gnu/packages/speech.scm
+++ b/gnu/packages/speech.scm
@@ -4,7 +4,7 @@
;;; Copyright © 2017 Leo Famulari <leo@famulari.name>
;;; Copyright © 2018, 2020, 2021 Tobias Geerinckx-Rice <me@tobias.gr>
;;; Copyright © 2016 Kei Kebreau <kkebreau@posteo.net>
-;;; Copyright © 2019 Ricardo Wurmus <rekado@elephly.net>
+;;; Copyright © 2019, 2021 Ricardo Wurmus <rekado@elephly.net>
;;; Copyright © 2020 Nicolas Goaziou <mail@nicolasgoaziou.fr>
;;; Copyright © 2020 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2021 qblade <qblade@protonmail.com>
@@ -366,6 +366,11 @@ be used by the sighted.")
"config/make_system.mak")
(("/bin/sh") (which "sh"))))
#t))
+ (add-after 'unpack-and-patch-speech-tools 'set-fcommon
+ (lambda _
+ (substitute* "../speech_tools/config/rules/defaults.mak"
+ (("\\(CFLAGS\\)") "(CFLAGS) -fcommon")
+ (("\\(CXXFLAGS\\)") "(CXXFLAGS) -fcommon"))))
(add-after 'unpack 'patch-/bin/sh
(lambda _
(substitute* '("config/test_make_rules"
diff --git a/gnu/packages/sphinx.scm b/gnu/packages/sphinx.scm
index 9aafcb9213..471988b178 100644
--- a/gnu/packages/sphinx.scm
+++ b/gnu/packages/sphinx.scm
@@ -17,6 +17,7 @@
;;; Copyright © 2021 Eric Bavier <bavier@posteo.net>
;;; Copyright © 2021 Vinicius Monego <monego@posteo.net>
;;; Copyright © 2021 Hugo Lecomte <hugo.lecomte@inria.fr>
+;;; Copyright © 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -45,6 +46,7 @@
#:use-module (gnu packages graphviz)
#:use-module (gnu packages image)
#:use-module (gnu packages imagemagick)
+ #:use-module (gnu packages python)
#:use-module (gnu packages python-build)
#:use-module (gnu packages python-crypto)
#:use-module (gnu packages python-web)
@@ -56,26 +58,27 @@
(define-public python-sphinx
(package
(name "python-sphinx")
- (version "3.3.1")
+ (version "4.2.0")
(source
(origin
(method url-fetch)
(uri (pypi-uri "Sphinx" version))
(sha256
(base32
- "0023vc2i29pjxmvdqbz1wdbi7gbj56y1br1b2z8h8wa44li5k38y"))))
+ "19jq21py7m061v8142y2dbqrbv0adqcdjmharrdy34a432wqs1wl"))))
(build-system python-build-system)
(arguments
`(#:phases
(modify-phases %standard-phases
(replace 'check
- (lambda _
- ;; Requires Internet access.
- (delete-file "tests/test_build_linkcheck.py")
- (substitute* "tests/test_build_latex.py"
- (("@pytest.mark.sphinx\\('latex', testroot='images'\\)")
- "@pytest.mark.skip()"))
- (invoke "make" "test"))))))
+ (lambda* (#:key tests? #:allow-other-keys)
+ (when tests?
+ ;; Requires Internet access.
+ (delete-file "tests/test_build_linkcheck.py")
+ (substitute* "tests/test_build_latex.py"
+ (("@pytest.mark.sphinx\\('latex', testroot='images'\\)")
+ "@pytest.mark.skip()"))
+ (invoke "make" "test")))))))
(propagated-inputs
`(("python-babel" ,python-babel)
("python-docutils" ,python-docutils)
@@ -132,6 +135,8 @@ sources.")
;; <https://github.com/sphinx-doc/sphinx/issues/4710>.
'("tests/test_api_translator.py"
"tests/test_setup_command.py"
+ ;; Websupport is provided by a separate package
+ "tests/test_websupport.py"
;; This one fails for unknown reasons.
"tests/test_correct_year.py"))))))))
(native-inputs `(("python2-mock" ,python2-mock)
@@ -245,13 +250,13 @@ users from Sphinx docs.")
(define-public python-sphinxcontrib-htmlhelp
(package
(name "python-sphinxcontrib-htmlhelp")
- (version "1.0.3")
+ (version "2.0.0")
(source (origin
(method url-fetch)
(uri (pypi-uri "sphinxcontrib-htmlhelp" version))
(sha256
(base32
- "16v5jdnibwrqjdr5aqchgyzpwy3rgamwhdf4kidv5nxj65zbpxg8"))))
+ "1ckd5xx4ngd6f4prxbc1bbvnafy1gg06j3bxyj5kk7v21lnvpy7m"))))
(build-system python-build-system)
(arguments
`(#:tests? #f)) ;XXX: circular dependency on Sphinx
@@ -350,13 +355,13 @@ documents.")
(define-public python-sphinxcontrib-serializinghtml
(package
(name "python-sphinxcontrib-serializinghtml")
- (version "1.1.4")
+ (version "1.1.5")
(source (origin
(method url-fetch)
(uri (pypi-uri "sphinxcontrib-serializinghtml" version))
(sha256
(base32
- "1g3pbx0g88zd9xzcrbaypa2k60axrh92vf5j76wsk0p9hv6fr87a"))))
+ "0lk91cl9bi4ynhz971zjs0bsr7jwxx8mx2f40psrx06zvzjnspxa"))))
(build-system python-build-system)
(arguments
`(#:tests? #f)) ;XXX: circular dependency on Sphinx
@@ -405,10 +410,29 @@ builder does not support SVG images natively (e.g. LaTeX).")
(description "This package provides a Python API to easily integrate
Sphinx documentation into your web application. It provides tools to
integrate Sphinx documents in web templates and to handle searches.")
- (license license:bsd-3)))
+ (license license:bsd-3)
+ (properties `((python2-variant . ,(delay python2-sphinxcontrib-websupport))))))
+;; 1.1.2 is the last version to support Python 2.
(define-public python2-sphinxcontrib-websupport
- (package-with-python2 python-sphinxcontrib-websupport))
+ (package
+ (inherit (package-with-python2
+ (strip-python2-variant python-sphinxcontrib-websupport)))
+ (version "1.1.2")
+ (source (origin
+ (method url-fetch)
+ (uri (pypi-uri "sphinxcontrib-websupport" version))
+ (sha256
+ (base32
+ "1z7fqra0xm1cdp8vvp80fcvnjlywym7bzz80m0liq7fz1zxvw08m"))))
+ (arguments
+ `(#:tests? #f
+ #:python ,python-2
+ #:phases
+ (modify-phases %standard-phases
+ (delete 'sanity-check))))
+ (propagated-inputs
+ `(("python2-six" ,python2-six)))))
(define-public python-sphinx-gallery
(package
diff --git a/gnu/packages/spice.scm b/gnu/packages/spice.scm
index 9c88b63108..94976ab130 100644
--- a/gnu/packages/spice.scm
+++ b/gnu/packages/spice.scm
@@ -252,6 +252,14 @@ which allows users to view a desktop computing environment.")
'("--enable-lz4"
"--enable-automated-tests")
+ #:phases
+ (modify-phases %standard-phases
+ ;; XXX: Otherwise the server listen tests fails with
+ ;; Failed to create /homeless-shelter/.config/glib-2.0/settings
+ (add-before 'check 'set-XDG_CONFIG_HOME
+ (lambda _
+ (setenv "XDG_CONFIG_HOME" "/tmp"))))
+
;; Several tests appear to be opening the same sockets concurrently.
#:parallel-tests? #f))
(synopsis "Server implementation of the SPICE protocol")
@@ -340,17 +348,6 @@ resolution scaling on graphical console window resize.")
(base32
"1rrjlclm6ad63gah1fa4yfwrz4z6vgq2yrybbvzvvdbxrgl4vgzv"))))
(build-system meson-build-system)
- (arguments
- '(#:tests? #f ; TODO Tests require gnutls built with
- ; p11-kit
- #:phases
- (modify-phases %standard-phases
- (add-after 'unpack 'patch-tests
- (lambda* (#:key inputs #:allow-other-keys)
- (substitute* "tests/setup-softhsm2.sh"
- (("\\/usr\\/lib64\\/pkcs11\\/libsofthsm2\\.so")
- (string-append (assoc-ref inputs "softhsm")
- "/lib/softhsm/libsofthsm2.so"))))))))
(propagated-inputs
`(("glib" ,glib) ; Requires: in the pkg-config file
("nss" ,nss) ; Requires.private: in the pkg-config
@@ -359,7 +356,6 @@ resolution scaling on graphical console window resize.")
`(("openssl" ,openssl)
("nss" ,nss "bin")
("opensc" ,opensc)
- ("softhsm" ,softhsm)
("gnutls" ,gnutls)
("pkg-config" ,pkg-config)
("which" ,which)))
diff --git a/gnu/packages/sqlite.scm b/gnu/packages/sqlite.scm
index 007b8f94f1..7afa97eb7c 100644
--- a/gnu/packages/sqlite.scm
+++ b/gnu/packages/sqlite.scm
@@ -1,12 +1,12 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2013, 2015, 2018 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2013, 2015, 2018, 2020 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2014, 2015, 2016, 2018 Mark H Weaver <mhw@netris.org>
;;; Copyright © 2014 Sree Harsha Totakura <sreeharsha@totakura.in>
;;; Copyright © 2015, 2016 Sou Bunnbu <iyzsong@gmail.com>
;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2016 Ben Woodcroft <donttrustben@gmail.com>
;;; Copyright © 2016 David Craven <david@craven.ch>
-;;; Copyright © 2016, 2017, 2018, 2019, 2020 Marius Bakke <mbakke@fastmail.com>
+;;; Copyright © 2016, 2017, 2018, 2019, 2020, 2021 Marius Bakke <marius@gnu.org>
;;; Copyright © 2017 Ricardo Wurmus <rekado@elephly.net>
;;; Copyright © 2017 Jelle Licht <jlicht@fsfe.org>
;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
@@ -45,34 +45,32 @@
;;; This module has been separated from (gnu packages databases) to reduce the
;;; number of module references for core packages.
+(define (sqlite-uri version year)
+ (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/" (number->string year)
+ "/sqlite-autoconf-" numeric-version ".tar.gz")))
+
(define-public sqlite
(package
(name "sqlite")
- (version "3.31.1")
+ (version "3.36.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 2021))
+ (patches (search-patches "sqlite-hurd.patch"))
(sha256
(base32
- "1bj936svd8i5g25xd1bj52hj4zca01fgl3sqkj86z9q5pkz4wa32"))))
- (replacement sqlite/fixed)
+ "1qxwkfvd185dfcqbakrzikrsw6ffr5jp1gl3dch9dsdyjvmw745x"))))
(build-system gnu-build-system)
(inputs `(("readline" ,readline)))
- (native-inputs (if (hurd-target?)
- ;; TODO move into origin on the next rebuild cycle.
- `(("hurd-locking-mode.patch"
- ,@(search-patches "sqlite-hurd.patch")))
- '()))
(outputs '("out" "static"))
(arguments
`(#:configure-flags
@@ -80,25 +78,13 @@
;; -DSQLITE_ENABLE_UNLOCK_NOTIFY and -DSQLITE_ENABLE_DBSTAT_VTAB
;; to CFLAGS. GNU Icecat will refuse to use the system SQLite
;; unless these options are enabled.
- (list (string-append "CFLAGS=-O2 -DSQLITE_SECURE_DELETE "
+ (list (string-append "CFLAGS=-O2 -g -DSQLITE_SECURE_DELETE "
"-DSQLITE_ENABLE_FTS3 "
"-DSQLITE_ENABLE_UNLOCK_NOTIFY "
"-DSQLITE_ENABLE_DBSTAT_VTAB "
;; Column metadata is required by GNU Jami and Qt, et.al.
"-DSQLITE_ENABLE_COLUMN_METADATA"))
#:phases (modify-phases %standard-phases
- ;; TODO: remove in the next rebuild cycle
- ,@(if (hurd-target?)
- `((add-after 'unpack 'patch-sqlite/hurd
- (lambda* (#:key inputs native-inputs
- #:allow-other-keys)
- (let ((patch (assoc-ref
- (if ,(%current-target-system)
- native-inputs
- inputs)
- "hurd-locking-mode.patch")))
- (invoke "patch" "-p1" "--force" "-i" patch)))))
- '())
(add-after 'install 'move-static-library
(lambda* (#:key outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))
@@ -123,23 +109,13 @@ widely deployed SQL database engine in the world. The source code for SQLite
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
"0rlbaq177gcgk5dswd3akbhv2nvvzljrbhgy18hklbhw7h90f5d3"))))))
diff --git a/gnu/packages/ssh.scm b/gnu/packages/ssh.scm
index e8c7a92199..842f3a456b 100644
--- a/gnu/packages/ssh.scm
+++ b/gnu/packages/ssh.scm
@@ -15,7 +15,7 @@
;;; 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.
@@ -319,11 +319,12 @@ Additionally, various channel-specific options can be negotiated.")
(uri (git-reference
(url home-page)
(commit (string-append "v" version))))
- (file-name (string-append name "-" version ".tar.gz"))
+ (file-name (git-file-name name version))
(sha256
(base32
"1xpxkvgj7wgcl450djkcrmrf957mcy2f36hfs5g6kpla1gax2d1g"))
- (modules '((guix build utils)))))
+ (patches (search-patches "guile-ssh-fix-test-suite.patch"
+ "guile-ssh-read-error.patch"))))
(build-system gnu-build-system)
(outputs '("out" "debug"))
(arguments
@@ -389,6 +390,9 @@ libssh library.")
(package
(inherit guile-ssh)
(name "guile2.0-ssh")
+ (source (origin
+ (inherit (package-source guile-ssh))
+ (patches (search-patches "guile-ssh-fix-test-suite.patch"))))
(native-inputs
`(("guile" ,guile-2.0) ;needed when cross-compiling.
,@(alist-delete "guile" (package-native-inputs guile-ssh))))
@@ -399,6 +403,9 @@ libssh library.")
(package
(inherit guile-ssh)
(name "guile2.2-ssh")
+ (source (origin
+ (inherit (package-source guile-ssh))
+ (patches (search-patches "guile-ssh-fix-test-suite.patch"))))
(native-inputs
`(("guile" ,guile-2.2) ;needed when cross-compiling.
,@(alist-delete "guile" (package-native-inputs guile-ssh))))
diff --git a/gnu/packages/statistics.scm b/gnu/packages/statistics.scm
index 599d6a8fc3..edb1bd4405 100644
--- a/gnu/packages/statistics.scm
+++ b/gnu/packages/statistics.scm
@@ -12,6 +12,7 @@
;;; Copyright © 2017 Alex Kost <alezost@gmail.com>
;;; Copyright © 2018 Alex Branham <alex.branham@gmail.com>
;;; Copyright © 2020 Tim Howes <timhowes@lavabit.com>
+;;; Copyright © 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;; Copyright © 2021 Bonface Munyoki Kilyungi <me@bonfacemunyoki.com>
;;; Copyright © 2021 Lars-Dominik Braun <lars@6xq.net>
;;; Copyright © 2021 Frank Pursel <frank.pursel@gmail.com>
@@ -221,9 +222,8 @@ This package also provides @command{xls2csv} to export Excel files to CSV.")
(("compress = TRUE") "compress = FALSE"))))
(add-before 'configure 'patch-coreutils-paths
(lambda* (#:key inputs #:allow-other-keys)
- (let* ((coreutils (assoc-ref inputs "coreutils"))
- (uname-bin (string-append coreutils "/bin/uname"))
- (rm-bin (string-append coreutils "/bin/rm")))
+ (let ((uname-bin (search-input-file inputs "/bin/uname"))
+ (rm-bin (search-input-file inputs "/bin/rm")))
(substitute* "src/scripts/R.sh.in"
(("uname") uname-bin))
(substitute* "src/unix/sys-std.c"
@@ -304,8 +304,8 @@ as.POSIXct(if (\"\" != Sys.getenv(\"SOURCE_DATE_EPOCH\")) {\
(lambda* (#:key inputs #:allow-other-keys)
(setenv "TZ" "UTC+1")
(setenv "TZDIR"
- (string-append (assoc-ref inputs "tzdata")
- "/share/zoneinfo"))))
+ (search-input-directory inputs
+ "share/zoneinfo"))))
(add-after 'build 'make-info
(lambda _ (invoke "make" "info")))
(add-after 'build 'install-info
@@ -345,18 +345,19 @@ as.POSIXct(if (\"\" != Sys.getenv(\"SOURCE_DATE_EPOCH\")) {\
("perl" ,perl)
("pkg-config" ,pkg-config)
("texinfo" ,texinfo) ; for building HTML manuals
- ("texlive" ,(texlive-union (list texlive-ae
+ ("texlive" ,(texlive-updmap.cfg (list texlive-ae
texlive-inconsolata
texlive-fonts-ec
- texlive-amsfonts/patched
+ texlive-grfext
+ texlive-amsfonts
texlive-latex-base
texlive-latex-fancyvrb
texlive-latex-graphics
- texlive-latex-hyperref
- texlive-latex-oberdiek
+ texlive-hyperref
+ texlive-oberdiek
texlive-latex-tools
texlive-latex-upquote
- texlive-latex-url
+ texlive-url
texlive-latex-xkeyval)))
("tzdata" ,tzdata-for-tests)
("xz" ,xz)))
@@ -1952,25 +1953,26 @@ and fast file reading.")
(define-public python-patsy
(package
(name "python-patsy")
- (version "0.5.1")
+ (version "0.5.2")
(source (origin
(method url-fetch)
(uri (pypi-uri "patsy" version))
(sha256
(base32
- "149rbrdzwns0ay88caf1zsm1r53v1q5np1mrb36na50y432cw5gi"))))
+ "17dn72519gvwifw3i8mzwlslxmxkl8ihzfrxg1iblsk70iwdwlsh"))))
(build-system python-build-system)
(arguments
`(#:phases
(modify-phases %standard-phases
(replace 'check
- (lambda _ (invoke "nosetests" "-v"))))))
+ (lambda* (#:key tests? #:allow-other-keys)
+ (when tests? (invoke "pytest" "-vv")))))))
(propagated-inputs
`(("python-numpy" ,python-numpy)
("python-scipy" ,python-scipy)
("python-six" ,python-six)))
(native-inputs
- `(("python-nose" ,python-nose)))
+ `(("python-pytest" ,python-pytest)))
(home-page "https://github.com/pydata/patsy")
(synopsis "Describe statistical models and build design matrices")
(description
@@ -6145,25 +6147,15 @@ to any arbitrary string. In this case, it is up to you to set valid values.")
"1cysswxr5glrdblyl2zsmywcj7xhxn3wmyihxinrz9gm8gmaacax"))))
(build-system python-build-system)
(arguments
- '(#:modules ((ice-9 ftw)
- (srfi srfi-1)
- (srfi srfi-26)
- (guix build utils)
- (guix build python-build-system))
- #:phases
+ '(#:phases
(modify-phases %standard-phases
(replace 'check
(lambda* (#:key outputs inputs #:allow-other-keys)
(let ((cwd (getcwd)))
- (setenv "TZ" "UTC")
- (setenv "PYTHONPATH"
- (string-append cwd "/build/"
- (find (cut string-prefix? "lib" <>)
- (scandir (string-append cwd "/build")))
- ":"
- (getenv "PYTHONPATH"))))
+ (setenv "TZ" "UTC"))
;; test_vector_complex has issues when run in our environment.
- (invoke "pytest" "-v" "rpy2/tests/" "-k" "not test_vector_complex"))))))
+ (invoke "pytest" "-v" "rpy2/tests/"
+ "-k" "not test_vector_complex"))))))
(propagated-inputs
`(("python-cffi" ,python-cffi)
("python-six" ,python-six)
diff --git a/gnu/packages/storage.scm b/gnu/packages/storage.scm
index 4dfae1e80e..a36d29eb33 100644
--- a/gnu/packages/storage.scm
+++ b/gnu/packages/storage.scm
@@ -39,6 +39,7 @@
#:use-module (gnu packages disk)
#:use-module (gnu packages gperf)
#:use-module (gnu packages jemalloc)
+ #:use-module (gnu packages icu4c)
#:use-module (gnu packages linux)
#:use-module (gnu packages lua)
#:use-module (gnu packages ncurses)
@@ -46,9 +47,11 @@
#:use-module (gnu packages nss)
#:use-module (gnu packages openldap)
#:use-module (gnu packages pkg-config)
+ #:use-module (gnu packages pretty-print)
#:use-module (gnu packages python)
#:use-module (gnu packages python-xyz)
#:use-module (gnu packages sphinx)
+ #:use-module (gnu packages sqlite)
#:use-module (gnu packages tls)
#:use-module (gnu packages web)
#:use-module (gnu packages xml))
@@ -56,18 +59,19 @@
(define-public ceph
(package
(name "ceph")
- (version "14.2.16")
+ (version "16.2.6")
(source (origin
(method url-fetch)
(uri (string-append "https://download.ceph.com/tarballs/ceph-"
version ".tar.gz"))
(sha256
(base32
- "0lmdri415hqczc9565s5m5568pnj97ipqxgnw6085kps0flwq5zh"))
+ "104xmc84d4ycdn7f4z09kvzwl1vlywxp3hbfxhgq0kcmgikb4wad"))
(patches
(search-patches
"ceph-disable-cpu-optimizations.patch"
- "ceph-fix-snappy-breaking-change.patch"))
+ "ceph-boost-compat.patch"
+ "ceph-rocksdb-compat.patch"))
(modules '((guix build utils)))
(snippet
'(begin
@@ -78,9 +82,8 @@
;"src/xxHash"
;"src/zstd"
;"src/civetweb"
- ;"src/seastar/fmt"
- "src/test/downloads"
"src/c-ares"
+ "src/fmt"
"src/googletest"
"src/rapidjson"
"src/spdk"
@@ -113,7 +116,7 @@
"-DBUILD_SHARED_LIBS=ON"
"-DWITH_SYSTEM_ROCKSDB=ON"
"-DWITH_SYSTEM_BOOST=ON"
- "-DWITH_PYTHON3=ON"
+
;; TODO: Enable these when available in Guix.
"-DWITH_MGR_DASHBOARD_FRONTEND=OFF" ;requires node + nodeenv
"-DWITH_BABELTRACE=OFF"
@@ -124,6 +127,9 @@
;; Use jemalloc instead of tcmalloc.
"-DALLOCATOR=jemalloc"
+ ;; Don't install systemd unit files.
+ "-DWITH_SYSTEMD=OFF"
+
;; Do not bother building the tests; we are not currently running
;; them, and they do not build with system googletest as of 14.2.5.
"-DWITH_TESTS=OFF"))
@@ -141,15 +147,12 @@
(substitute* "cmake/modules/Distutils.cmake"
;; Prevent creation of Python eggs.
(("setup.py install")
- "setup.py install --single-version-externally-managed --root=/"))
-
- (substitute* (find-files "src/pybind" "^setup\\.py$")
- ;; Here we inject an extra line to the `setup.py' of the
+ "setup.py install --single-version-externally-managed --root=/")
+ ;; Inject the -rpath linker argument when linking
;; Python C libraries so RUNPATH gets set up correctly.
- (("^([[:blank:]]+)extra_compile_args=(.*)$" _ indent args)
- (string-append indent "extra_compile_args=" args
- indent "extra_link_args=['-Wl,-rpath="
- lib "/lib'],\n")))
+ (("LDFLAGS=(.*)\n" _ flags)
+ (string-append "LDFLAGS=\\\"" flags
+ " -Wl,-rpath=" lib "/lib\\\"\n")))
;; Statically link libcrc32 because it does not get installed,
;; yet several libraries end up referring to it.
@@ -159,8 +162,7 @@
(substitute* "udev/50-rbd.rules"
(("/usr/bin/ceph-rbdnamer")
- (string-append out "/bin/ceph-rbdnamer")))
- #t)))
+ (string-append out "/bin/ceph-rbdnamer"))))))
(add-before 'install 'set-install-environment
(lambda* (#:key outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))
@@ -171,31 +173,26 @@
"/site-packages")))
;; The Python install scripts refuses to function if
;; the install directory is not on PYTHONPATH.
- (setenv "PYTHONPATH"
- (string-append py3sitedir ":"
- (getenv "PYTHONPATH")))
- #t)))
+ (setenv "PYTHONPATH" py3sitedir))))
(add-after 'install 'wrap-python-scripts
(lambda* (#:key inputs outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))
- (scripts '("ceph" "ceph-mgr" "ceph-volume"))
- (prettytable (assoc-ref inputs "python-prettytable"))
- (six (assoc-ref inputs "python-six"))
+ (scripts '("bin/ceph" "bin/cephfs-top" "sbin/ceph-volume"))
+ (dependencies (map (lambda (input)
+ (assoc-ref inputs input))
+ '("python-prettytable" "python-pyyaml")))
(sitedir (lambda (package)
(string-append package
"/lib/python"
,(version-major+minor
(package-version python))
"/site-packages")))
- (PYTHONPATH (string-append
- (sitedir out) ":"
- (sitedir six) ":"
- (sitedir prettytable))))
+ (PYTHONPATH (string-join (map sitedir (cons out dependencies))
+ ":")))
(for-each (lambda (executable)
- (wrap-program (string-append out "/bin/" executable)
- `("PYTHONPATH" ":" prefix (,PYTHONPATH))))
- scripts)
- #t))))))
+ (wrap-program (string-append out "/" executable)
+ `("GUIX_PYTHONPATH" ":" prefix (,PYTHONPATH))))
+ scripts)))))))
(outputs
'("out" "lib"))
(native-inputs
@@ -210,7 +207,9 @@
("cryptsetup" ,cryptsetup)
("expat" ,expat)
("fcgi" ,fcgi)
+ ("fmt" ,fmt)
("fuse" ,fuse)
+ ("icu4c" ,icu4c)
("jemalloc" ,jemalloc)
("keyutils" ,keyutils)
("leveldb" ,leveldb)
@@ -227,12 +226,13 @@
("ncurses" ,ncurses)
("nss" ,nss)
("python-prettytable" ,python-prettytable) ;used by ceph_daemon.py
- ("python-six" ,python-six) ;for ceph-mgr + plugins
- ("python" ,python-wrapper)
+ ("python-pyyaml" ,python-pyyaml) ;from python-common/setup.py
+ ("python" ,python)
("rapidjson" ,rapidjson)
("rdma-core" ,rdma-core)
("rocksdb" ,rocksdb)
("snappy" ,snappy)
+ ("sqlite" ,sqlite)
("udev" ,eudev)
("util-linux" ,util-linux)
("util-linux:lib" ,util-linux "lib")
diff --git a/gnu/packages/suckless.scm b/gnu/packages/suckless.scm
index e22880e78e..1b339e88fa 100644
--- a/gnu/packages/suckless.scm
+++ b/gnu/packages/suckless.scm
@@ -427,15 +427,15 @@ drawing.")
(add-before 'build 'set-dmenu-and-xprop-file-name
(lambda* (#:key inputs #:allow-other-keys)
(substitute* "config.def.h"
- (("dmenu") (string-append (assoc-ref inputs "dmenu") "/bin/dmenu"))
- (("xprop") (string-append (assoc-ref inputs "xprop") "/bin/xprop")))
+ (("dmenu") (search-input-file inputs "/bin/dmenu"))
+ (("xprop") (search-input-file inputs "/bin/xprop")))
#t)))))
(inputs
`(("dmenu" ,dmenu)
("gcr" ,gcr)
("glib-networking" ,glib-networking)
("gsettings-desktop-schemas" ,gsettings-desktop-schemas)
- ("webkitgtk" ,webkitgtk)
+ ("webkitgtk" ,webkitgtk-with-libsoup2)
("xprop" ,xprop)))
(native-inputs
`(("pkg-config" ,pkg-config)))
diff --git a/gnu/packages/swig.scm b/gnu/packages/swig.scm
index 86c1407da9..b14bcd6401 100644
--- a/gnu/packages/swig.scm
+++ b/gnu/packages/swig.scm
@@ -1,7 +1,7 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2013, 2015, 2016 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2015 Mark H Weaver <mhw@netris.org>
-;;; Copyright © 2018 Marius Bakke <mbakke@fastmail.com>
+;;; Copyright © 2018, 2021 Marius Bakke <marius@gnu.org>
;;; Copyright © 2019 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2020 Arun Isaac <arunisaac@systemreboot.net>
;;;
@@ -35,7 +35,7 @@
(define-public swig
(package
(name "swig")
- (version "4.0.1")
+ (version "4.0.2")
(source (origin
(method url-fetch)
(uri (string-append "mirror://sourceforge/" name "/" name "/"
@@ -43,18 +43,8 @@
name "-" version ".tar.gz"))
(sha256
(base32
- "1ac7g0gd8ndwv3ybqn5vjgqxa7090bby4db164a7mn9ssp8b803s"))))
+ "1z06m5zv87mha6hvys1iay810ghc1jngilfby1ms2n4d1mryjfym"))))
(build-system gnu-build-system)
- (arguments
- '(#:phases
- (modify-phases %standard-phases
- (add-before 'configure 'workaround-gcc-bug
- (lambda _
- ;; XXX: Don't add the -isystem flag, or GCCs #include_next
- ;; won't be able to find <stdlib.h>.
- (substitute* "configure"
- (("-isystem ") "-I"))
- #t)))))
(native-inputs `(("boost" ,boost)
("pcre" ,pcre "bin") ;for 'pcre-config'
;; The following are for tests and examples:
diff --git a/gnu/packages/sync.scm b/gnu/packages/sync.scm
index e9fc913ad5..946b64b452 100644
--- a/gnu/packages/sync.scm
+++ b/gnu/packages/sync.scm
@@ -156,9 +156,8 @@
(("ON CACHE") "OFF CACHE"))
(substitute* "src/gui/CMakeLists.txt"
(("@kwidgetsaddons@")
- (string-append (assoc-ref inputs "kwidgetsaddons")
- "/include/KF5/KWidgetsAddons/")))
- #t))
+ (search-input-directory inputs
+ "/include/KF5/KWidgetsAddons/")))))
(add-before 'check 'pre-check
(lambda _
;; Tests write to $HOME.
@@ -191,7 +190,6 @@
("libcloudproviders" ,libcloudproviders)
("libzip" ,libzip)
("openssl" ,openssl)
- ("python-nautilus" ,python-nautilus)
("qtbase" ,qtbase-5)
("qtdeclarative" ,qtdeclarative)
("qtgraphicaleffects" ,qtgraphicaleffects)
diff --git a/gnu/packages/syncthing.scm b/gnu/packages/syncthing.scm
index 8ae3c3d840..d9fcc22cba 100644
--- a/gnu/packages/syncthing.scm
+++ b/gnu/packages/syncthing.scm
@@ -192,7 +192,6 @@ Protocol.")
("python-dateutil" ,python-dateutil)
("python-pycairo" ,python-pycairo)
("python-pygobject" ,python-pygobject)
- ("python-nautilus" ,python-nautilus)
("psmisc" ,psmisc)
("syncthing" ,syncthing)))
;; (native-inputs
diff --git a/gnu/packages/syndication.scm b/gnu/packages/syndication.scm
index fef315c5b9..7612209c95 100644
--- a/gnu/packages/syndication.scm
+++ b/gnu/packages/syndication.scm
@@ -2,6 +2,7 @@
;;; Copyright © 2016, 2017, 2019, 2020, 2021 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2018, 2019, 2021 Tobias Geerinckx-Rice <me@tobias.gr>
;;; Copyright © 2020 Vinicius Monego <monego@posteo.net>
+;;; Copyright © 2021 Felix Gruber <felgru@posteo.net>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -182,9 +183,8 @@ cards.")
(package-version python))
"/site-packages")))
(wrap-program (string-append bin "giara")
- `("PYTHONPATH" ":" prefix (,(getenv "PYTHONPATH") ,lib))
- `("GI_TYPELIB_PATH" ":" prefix (,(getenv "GI_TYPELIB_PATH")))))
- #t)))))
+ `("GUIX_PYTHONPATH" ":" prefix (,(getenv "GUIX_PYTHONPATH") ,lib))
+ `("GI_TYPELIB_PATH" ":" prefix (,(getenv "GI_TYPELIB_PATH"))))))))))
(native-inputs
`(("gettext" ,gettext-minimal)
("glib:bin" ,glib "bin")
@@ -206,7 +206,7 @@ cards.")
("python-pycairo" ,python-pycairo)
("python-pygobject" ,python-pygobject)
("python-requests" ,python-requests)
- ("webkitgtk" ,webkitgtk)))
+ ("webkitgtk" ,webkitgtk-with-libsoup2)))
(propagated-inputs
`(("dconf" ,dconf)))
(synopsis "Client for Reddit")
@@ -244,7 +244,6 @@ cards.")
(guix build utils)
((guix build gnu-build-system) #:prefix gnu:))
#:vendor-dir "vendor"
- #:rust ,rust-1.51 ; or newer
#:install-source? #f
#:cargo-inputs
(("rust-backtrace" ,rust-backtrace-0.3)
@@ -274,29 +273,21 @@ cards.")
(lambda* (#:key vendor-dir #:allow-other-keys)
;; Don't keep the whole tarball in the vendor directory
(delete-file-recursively
- (string-append vendor-dir "/" ,name "-" ,version ".tar.xz"))
- #t))
+ (string-append vendor-dir "/" ,name "-" ,version ".tar.xz"))))
(add-after 'unpack 'patch-source
- (lambda _
+ (lambda* (#:key outputs #:allow-other-keys)
(substitute* "Makefile"
- (("Cargo.lock") ""))
- #t))
+ (("Cargo.lock") "")
+ ;; Replace the prefix in the Makefile.
+ (("/usr/local") (assoc-ref outputs "out")))))
(replace 'build
- (lambda* args
- ((assoc-ref gnu:%standard-phases 'build)
- #:make-flags
- (list (string-append "prefix=" (assoc-ref %outputs "out"))))))
+ (assoc-ref gnu:%standard-phases 'build))
(replace 'check
- (lambda* args
+ (lambda args
((assoc-ref gnu:%standard-phases 'check)
- #:test-target "test"
- #:make-flags
- (list (string-append "prefix=" (assoc-ref %outputs "out"))))))
+ #:test-target "test")))
(replace 'install
- (lambda* args
- ((assoc-ref gnu:%standard-phases 'install)
- #:make-flags
- (list (string-append "prefix=" (assoc-ref %outputs "out")))))))))
+ (assoc-ref gnu:%standard-phases 'install)))))
(native-search-paths
;; Newsboat respects CURL_CA_BUNDLE.
(package-native-search-paths curl))
@@ -373,10 +364,10 @@ file system, and many more features.")
(lambda* (#:key inputs outputs #:allow-other-keys)
(let ((out (assoc-ref outputs "out"))
(gi-typelib-path (getenv "GI_TYPELIB_PATH"))
- (python-path (getenv "PYTHONPATH")))
+ (python-path (getenv "GUIX_PYTHONPATH")))
(wrap-program (string-append out "/bin/liferea")
`("GI_TYPELIB_PATH" ":" prefix (,gi-typelib-path))
- `("PYTHONPATH" ":" prefix (,python-path))))
+ `("GUIX_PYTHONPATH" ":" prefix (,python-path))))
#t)))))
(native-inputs
`(("autoconf" ,autoconf)
@@ -432,9 +423,8 @@ a simple interface that makes it easy to organize and browse feeds.")
(lambda* (#:key inputs #:allow-other-keys)
(setenv "HOME" (getcwd))
(setenv "TERM" "linux")
- (setenv "TERMINFO" (string-append (assoc-ref inputs "ncurses")
- "/share/terminfo"))
- #t)))
+ (setenv "TERMINFO"
+ (search-input-directory inputs "share/terminfo")))))
#:tests? #f)) ; tests fail: _curses.error: nocbreak() returned ERR
(propagated-inputs
`(("python-beautifulsoup4" ,python-beautifulsoup4)
@@ -598,13 +588,13 @@ that aims to be quite fast and comfortable to its user.")
(add-after 'unpack 'patch-mpv-path
(lambda* (#:key inputs #:allow-other-keys)
(substitute* "gfeeds/confManager.py"
- (("mpv") (string-append (assoc-ref inputs "mpv") "/bin/mpv")))
+ (("mpv") (search-input-file inputs "/bin/mpv")))
#t))
(add-after 'install 'wrap-gfeeds
(lambda* (#:key outputs #:allow-other-keys)
(wrap-program (string-append
(assoc-ref outputs "out") "/bin/gfeeds")
- `("PYTHONPATH" ":" prefix (,(getenv "PYTHONPATH")))
+ `("PYTHONPATH" ":" prefix (,(getenv "GUIX_PYTHONPATH")))
`("GI_TYPELIB_PATH" ":" prefix (,(getenv "GI_TYPELIB_PATH")))
`("XDG_DATA_DIRS" ":" prefix (,(getenv "XDG_DATA_DIRS"))))
#t)))))
diff --git a/gnu/packages/task-management.scm b/gnu/packages/task-management.scm
index 79999ccfea..73ddf25033 100644
--- a/gnu/packages/task-management.scm
+++ b/gnu/packages/task-management.scm
@@ -189,7 +189,7 @@ a task.")
(define-public blanket
(package
(name "blanket")
- (version "0.4.1")
+ (version "0.5.0")
(source
(origin
(method git-fetch)
@@ -198,7 +198,7 @@ a task.")
(commit version)))
(file-name (git-file-name name version))
(sha256
- (base32 "1rk9xxiflj8rf75q56s907xp3jzxc7r88njlmxg07gl6i35mmcmi"))))
+ (base32 "00i821zqfbigxmc709322r16z75qsw4rg23yhv35gza9sl65bzkg"))))
(build-system meson-build-system)
(arguments
`(#:glib-or-gtk? #t
@@ -210,11 +210,11 @@ a task.")
(let* ((out (assoc-ref outputs "out"))
(gi-typelib-path (getenv "GI_TYPELIB_PATH"))
(gst-plugin-path (getenv "GST_PLUGIN_SYSTEM_PATH"))
- (python-path (getenv "PYTHONPATH")))
+ (python-path (getenv "GUIX_PYTHONPATH")))
(wrap-program (string-append out "/bin/blanket")
`("GI_TYPELIB_PATH" ":" prefix (,gi-typelib-path))
`("GST_PLUGIN_SYSTEM_PATH" ":" prefix (,gst-plugin-path))
- `("PYTHONPATH" ":" prefix (,python-path))))
+ `("GUIX_PYTHONPATH" ":" prefix (,python-path))))
#t)))))
(native-inputs
`(("desktop-file-utils" ,desktop-file-utils)
diff --git a/gnu/packages/tbb.scm b/gnu/packages/tbb.scm
index 5f1438667d..427f281686 100644
--- a/gnu/packages/tbb.scm
+++ b/gnu/packages/tbb.scm
@@ -2,6 +2,7 @@
;;; Copyright © 2015, 2016 Ricardo Wurmus <rekado@elephly.net>
;;; Copyright © 2016 Nikita <nikita@n0.is>
;;; Copyright © 2019 Tobias Geerinckx-Rice <me@tobias.gr>
+;;; Copyright © 2021 Guillaume Le Vaillant <glv@posteo.net>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -23,12 +24,39 @@
#:use-module (guix licenses)
#:use-module (guix git-download)
#:use-module (guix utils)
+ #:use-module (guix build-system cmake)
#:use-module (guix build-system gnu)
#:use-module (gnu packages))
(define-public tbb
(package
(name "tbb")
+ (version "2021.4.0")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/oneapi-src/oneTBB")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0ih727g802j9lvwkqhw021bk1wb7xlvfgd0vl1i6jng4am1wv7vq"))))
+ (build-system cmake-build-system)
+ (arguments
+ `(#:configure-flags '("-DTBB_STRICT=OFF"))) ;; Don't fail on warnings
+ (home-page "https://www.threadingbuildingblocks.org")
+ (synopsis "C++ library for parallel programming")
+ (description
+ "Threading Building Blocks (TBB) is a C++ runtime library that abstracts
+the low-level threading details necessary for optimal multi-core performance.
+It uses common C++ templates and coding style to eliminate tedious threading
+implementation work. It provides parallel loop constructs, asynchronous
+tasks, synchronization primitives, atomic operations, and more.")
+ (license asl2.0)))
+
+(define-public tbb-2020
+ (package
+ (name "tbb")
(version "2020.3")
(source (origin
(method git-fetch)
@@ -55,8 +83,7 @@
(("os_kernel_version:=.*")
"os_kernel_version:=5\n")
(("os_version:=.*")
- "os_version:=1\n"))
- #t))))
+ "os_version:=1\n"))))))
(outputs '("out" "doc"))
(build-system gnu-build-system)
(arguments
@@ -68,8 +95,7 @@
(add-after 'unpack 'fail-on-test-errors
(lambda _
(substitute* "Makefile"
- (("-\\$\\(MAKE") "$(MAKE"))
- #t))
+ (("-\\$\\(MAKE") "$(MAKE"))))
(replace 'configure
(lambda* (#:key outputs #:allow-other-keys)
(substitute* "build/linux.gcc.inc"
@@ -94,8 +120,7 @@
(find-files "build/guix_release" "\\.so"))
(copy-recursively "doc" doc)
(copy-recursively "examples" examples)
- (copy-recursively "include" include)
- #t))))))
+ (copy-recursively "include" include)))))))
(home-page "https://www.threadingbuildingblocks.org")
(synopsis "C++ library for parallel programming")
(description
diff --git a/gnu/packages/tcl.scm b/gnu/packages/tcl.scm
index 4d052dbdaf..2ad10416cb 100644
--- a/gnu/packages/tcl.scm
+++ b/gnu/packages/tcl.scm
@@ -44,20 +44,19 @@
(define-public tcl
(package
(name "tcl")
- (version "8.6.10")
+ (version "8.6.11")
(source (origin
(method url-fetch)
(uri (string-append "mirror://sourceforge/tcl/Tcl/"
version "/tcl" version "-src.tar.gz"))
(sha256
(base32
- "1vc7imilx6kcb5319r7hnrp4jn5pqb41an3vr3azhgcfcgvdp5ji"))
- (patches (search-patches "tcl-fix-cross-compilation.patch"))))
+ "0n4211j80mxr6ql0xx52rig8r885rcbminfpjdb2qrw6hmk8c14c"))))
(build-system gnu-build-system)
(arguments
`(#:phases (modify-phases %standard-phases
(add-before 'configure 'pre-configure
- (lambda _ (chdir "unix") #t))
+ (lambda _ (chdir "unix")))
(add-after 'install 'install-private-headers
(lambda* (#:key outputs #:allow-other-keys)
;; Private headers are needed by Expect.
@@ -68,8 +67,7 @@
;; Programs such as Ghostscript rely on it.
(with-directory-excursion bin
(symlink (car (find-files "." "tclsh"))
- "tclsh"))
- #t))))
+ "tclsh"))))))
;; By default, man pages are put in PREFIX/man, but we want them in
;; PREFIX/share/man. The 'validate-documentation-location' phase is
@@ -197,7 +195,7 @@ X11 GUIs.")
(define-public tk
(package
(name "tk")
- (version "8.6.10")
+ (version "8.6.11.1")
(source (origin
(method url-fetch)
(uri (string-append "mirror://sourceforge/tcl/Tcl/"
@@ -205,38 +203,31 @@ X11 GUIs.")
version "-src.tar.gz"))
(sha256
(base32
- "11p3ycqbr5116vpaxv6fl6md6gcav1ffspgr8wrlc2lxhn543pv3"))
+ "1gh9k7l76qg9l0sb78ijw9xz4xl1af47aqbdifb6mjpf3cbsnv00"))
(patches (search-patches "tk-find-library.patch"))))
(build-system gnu-build-system)
(arguments
`(#:phases (modify-phases %standard-phases
- (add-before
- 'configure 'pre-configure
- (lambda _
- (chdir "unix")
- #t))
- (add-after
- 'install 'create-wish-symlink
- (lambda* (#:key outputs #:allow-other-keys)
- (let ((out (assoc-ref outputs "out")))
- (symlink (string-append out "/bin/wish"
- ,(version-major+minor
+ (add-before 'configure 'pre-configure
+ (lambda _ (chdir "unix")))
+ (add-after 'install 'create-wish-symlink
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let ((out (assoc-ref outputs "out")))
+ (symlink (string-append out "/bin/wish"
+ ,(version-major+minor
(package-version tk)))
- (string-append out "/bin/wish")))
- #t))
- (add-after
- 'install 'add-fontconfig-flag
- (lambda* (#:key inputs outputs #:allow-other-keys)
- ;; Add the missing -L flag for Fontconfig in 'tk.pc' and
- ;; 'tkConfig.sh'.
- (let ((out (assoc-ref outputs "out"))
- (fontconfig (assoc-ref inputs "fontconfig")))
- (substitute* (find-files out
- "^(tkConfig\\.sh|tk\\.pc)$")
- (("-lfontconfig")
- (string-append "-L" fontconfig
- "/lib -lfontconfig")))
- #t))))
+ (string-append out "/bin/wish")))))
+ (add-after 'install 'add-fontconfig-flag
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ ;; Add the missing -L flag for Fontconfig in 'tk.pc' and
+ ;; 'tkConfig.sh'.
+ (let ((out (assoc-ref outputs "out"))
+ (fontconfig (assoc-ref inputs "fontconfig")))
+ (substitute* (find-files out
+ "^(tkConfig\\.sh|tk\\.pc)$")
+ (("-lfontconfig")
+ (string-append "-L" fontconfig
+ "/lib -lfontconfig")))))))
#:configure-flags
(list (string-append "--with-tcl="
diff --git a/gnu/packages/telephony.scm b/gnu/packages/telephony.scm
index 30b14578b6..5e8610ab85 100644
--- a/gnu/packages/telephony.scm
+++ b/gnu/packages/telephony.scm
@@ -20,6 +20,7 @@
;;; Copyright © 2020, 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;; Copyright © 2020 Vincent Legoll <vincent.legoll@gmail.com>
;;; Copyright © 2021 LibreMiami <packaging-guix@libremiami.org>
+;;; Copyright © 2021 Sarah Morgensen <iskarian@mgsn.dev>
;;; Copyright © 2021 Demis Balbach <db@minikn.xyz>
;;;
;;; This file is part of GNU Guix.
@@ -590,8 +591,8 @@ address of one of the participants.")
(lambda* (#:key inputs outputs #:allow-other-keys)
(invoke "qmake" "main.pro" "QMAKE_LRELEASE=lrelease"
(string-append "MUMBLE_PYTHON="
- (string-append (assoc-ref inputs "python")
- "/bin/python3"))
+ (search-input-file inputs
+ "/bin/python3"))
(string-append "CONFIG+="
(string-join
;; Options used are listed in the same order
@@ -928,14 +929,11 @@ Initiation Protocol (SIP) and a multimedia framework.")
(lambda* (#:key inputs #:allow-other-keys)
(substitute* "os/linux/AudioPulse.cpp"
(("libpulse\\.so")
- (string-append (assoc-ref inputs "pulseaudio")
- "/lib/libpulse.so")))
+ (search-input-file inputs "/lib/libpulse.so")))
(substitute* '("os/linux/AudioInputALSA.cpp"
"os/linux/AudioOutputALSA.cpp")
(("libasound\\.so")
- (string-append (assoc-ref inputs "alsa-lib")
- "/lib/libasound.so")))
- #t)))))
+ (search-input-file inputs "/lib/libasound.so"))))))))
(synopsis "VoIP library for Telegram clients")
(description "A collection of libraries and header files for implementing
telephony functionality into custom Telegram clients.")
diff --git a/gnu/packages/terminals.scm b/gnu/packages/terminals.scm
index 1b88d3813b..dbe1afd829 100644
--- a/gnu/packages/terminals.scm
+++ b/gnu/packages/terminals.scm
@@ -62,7 +62,6 @@
#:use-module (gnu packages)
#:use-module (gnu packages autotools)
#:use-module (gnu packages base)
- #:use-module (gnu packages build-tools) ;for meson-0.55
#:use-module (gnu packages check)
#:use-module (gnu packages cmake)
#:use-module (gnu packages compression)
@@ -845,8 +844,7 @@ eye-candy, customizable, and reasonably lightweight.")
"15h01ijx87i60bdgjjap1ymwlxggsxc6iziykh3bahj8432s1836"))))
(build-system meson-build-system)
(arguments
- `(#:meson ,meson-0.55
- ;; Using a "release" build is recommended both for performance, and
+ `(;; Using a "release" build is recommended both for performance, and
;; also to address a GCC 10 issue when doing PGO builds.
#:build-type "release"
;; Enable LTO as recommended by INSTALL.md.
@@ -1109,14 +1107,14 @@ than a terminal.")
(define-public python-curtsies
(package
(name "python-curtsies")
- (version "0.3.4")
+ (version "0.3.5")
(source
(origin
(method url-fetch)
(uri (pypi-uri "curtsies" version))
(sha256
(base32
- "019bpf5wmng4f6ic2ykg893ypfihpfvzi6dhblcagfwbincl79ac"))))
+ "1g8dwafx4vx06isjkn28r3cwb0hw1bv67lgygaz34yk66lrzz1x5"))))
(build-system python-build-system)
(arguments
`(#:phases
@@ -1126,7 +1124,7 @@ than a terminal.")
(invoke "nosetests" "-v"))))))
(propagated-inputs
`(("python-blessings" ,python-blessings)
- ("python-wcwidth" ,python-wcwidth)))
+ ("python-cwcwidth" ,python-cwcwidth)))
(native-inputs
`(("python-mock" ,python-mock)
("python-pyte" ,python-pyte)
@@ -1490,7 +1488,7 @@ basic input/output.")
(bin (string-append out "/bin"))
(share (string-append out "/share"))
(icons (string-append share "/icons/hicolor/scalable/apps"))
- (tic (string-append (assoc-ref inputs "ncurses") "/bin/tic"))
+ (tic (search-input-file inputs "/bin/tic"))
(man (string-append share "/man/man1"))
(alacritty-bin "target/release/alacritty"))
;; Install the executable.
diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index bfca91310a..256fe7da90 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -8,7 +8,7 @@
;;; Copyright © 2016 Thomas Danckaert <post@thomasdanckaert.be>
;;; Copyright © 2016, 2017, 2018, 2019, 2020, 2021 Ricardo Wurmus <rekado@elephly.net>
;;; Copyright © 2017 Leo Famulari <leo@famulari.name>
-;;; Copyright © 2017, 2020 Marius Bakke <mbakke@fastmail.com>
+;;; Copyright © 2017, 2020, 2021 Marius Bakke <marius@gnu.org>
;;; Copyright © 2017, 2018, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
;;; Copyright © 2018 Danny Milosavljevic <dannym+a@scratchpost.org>
;;; Copyright © 2018, 2020 Arun Isaac <arunisaac@systemreboot.net>
@@ -19,6 +19,7 @@
;;; Copyright © 2021 Xinglu Chen <public@yoctocell.xyz>
;;; Copyright © 2021 Ivan Gankevich <i.gankevich@spbu.ru>
;;; Copyright © 2021 Julien Lepiller <julien@lepiller.eu>
+;;; Copyright © 2021 Thiago Jung Bauermann <bauermann@kolabnow.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -37,8 +38,10 @@
(define-module (gnu packages tex)
#:use-module ((guix licenses) #:prefix license:)
+ #:use-module (guix gexp)
#:use-module (guix packages)
#:use-module (guix download)
+ #:use-module (guix build-system copy)
#:use-module (guix build-system gnu)
#:use-module (guix build-system perl)
#:use-module (guix build-system python)
@@ -46,6 +49,7 @@
#:use-module (guix build-system trivial)
#:use-module (guix build-system texlive)
#:use-module (guix utils)
+ #:use-module (guix deprecation)
#:use-module (guix git-download)
#:use-module (guix svn-download)
#:use-module (gnu packages)
@@ -122,7 +126,7 @@ copied to their outputs; otherwise the TEXLIVE-BUILD-SYSTEM is used."
(string-append doc "/doc")))
'())
(mkdir-p out)
- (copy-recursively (assoc-ref inputs "source") out)
+ (copy-recursively "." out)
,@(if with-documentation?
'((delete-file-recursively (string-append out "/doc")))
'())
@@ -151,7 +155,7 @@ copied to their outputs; otherwise the TEXLIVE-BUILD-SYSTEM is used."
"-checkout"))
(sha256
(base32
- "0lk7shx768sxvgr85y8bnmmnj8x4bbkgpxrz3z8jp8avi33prw83"))))
+ "04xzf5gr3ylyh3ls09imrx4mwq3qp1k97r9njzlan6hlff875rx2"))))
(define (texlive-hyphen-package name code locations hash)
"Return a TeX Live hyphenation package with the given NAME, using source
@@ -224,111 +228,101 @@ files from LOCATIONS with expected checksum HASH. CODE is not currently in use.
(define texlive-extra-src
(origin
(method url-fetch)
- (uri "ftp://tug.org/historic/systems/texlive/2019/texlive-20190410-extra.tar.xz")
+ (uri "ftp://tug.org/historic/systems/texlive/2021/texlive-20210325-extra.tar.xz")
(sha256 (base32
- "13ncf2an4nlqv18lki6y2p6pcsgs1i54zqkhfwprax5j53bk70j8"))))
+ "171kg1n9zapw3d2g47d8l0cywa99bl9m54xkqvp9625ks22z78s6"))))
(define texlive-texmf-src
(origin
(method url-fetch)
- (uri "ftp://tug.org/historic/systems/texlive/2019/texlive-20190410-texmf.tar.xz")
+ (uri "ftp://tug.org/historic/systems/texlive/2021/texlive-20210325-texmf.tar.xz")
(sha256 (base32
- "00n4qh9fj8v9zzy3y488hpfq1g3dnnh72y4yjsaikfcqpi59gv62"))))
+ "070gczcm1h9rx29w2f02xd3nhd84c4k28nfmm8qgp69yq8vd84pz"))))
(define-public texlive-bin
(package
- (name "texlive-bin")
- (version "20190410")
- (source
- (origin
- (method url-fetch)
- (uri (string-append "ftp://tug.org/historic/systems/texlive/2019/"
- "texlive-" version "-source.tar.xz"))
- (sha256
- (base32
- "1dfps39q6bdr1zsbp9p74mvalmy3bycihv19sb9c6kg30kprz8nj"))
- (patches
- (let ((arch-patch
- (lambda (name revision hash)
- (origin
- (method url-fetch)
- (uri (string-append "https://raw.githubusercontent.com"
- "/archlinux/svntogit-packages/" revision
- "/repos/extra-x86_64/" name))
- (file-name (string-append "texlive-bin-" name))
- (sha256 (base32 hash)))))
- (arch-revision "49d7fe25e5ea63f136ebc20270c1d8fc9b00041c"))
- (list
- (arch-patch "pdftex-poppler0.76.patch" arch-revision
- "03vc88dz37mjjyaspzv0fik2fp5gp8qv82114869akd1dhszbaax")
- (search-patch "texlive-bin-poppler-0.83.patch")
- (arch-patch "texlive-poppler-0.84.patch" arch-revision
- "1ia6cr99krk4ipx4hdi2qdb98bh2h26mckjlpxdzrjnfhlnghksa")
- (search-patch "texlive-bin-poppler-0.86.patch"))))
- (modules '((guix build utils)
- (ice-9 ftw)))
- (snippet
- '(begin
- (with-directory-excursion "libs"
- (let ((preserved-directories '("." ".." "lua53" "luajit")))
- ;; Delete bundled software, except Lua which cannot easily be
- ;; used as an external dependency.
- (for-each delete-file-recursively
- (scandir "."
- (lambda (file)
- (and (not (member file preserved-directories))
- (eq? 'directory (stat:type (stat file)))))))))
- ;; TODO: Unbundle stuff in texk/dvisvgm/dvisvgm-src/libs too.
- #t))))
- (build-system gnu-build-system)
- (inputs
- `(("texlive-extra-src" ,texlive-extra-src)
- ("texlive-scripts"
- ,(origin
- (method svn-fetch)
- (uri (svn-reference
- (url (string-append "svn://www.tug.org/texlive/tags/"
- %texlive-tag "/Master/texmf-dist/"
- "/scripts/texlive"))
- (revision %texlive-revision)))
- (file-name (string-append "texlive-scripts-"
- (number->string %texlive-revision)
- "-checkout"))
- (sha256
- (base32
- "1cj04svl8bpfwjr4gqfcc04rmklz3aggrxvgj7q5bxrh7c7g18xh"))))
- ("cairo" ,cairo)
- ("fontconfig" ,fontconfig)
- ("fontforge" ,fontforge)
- ("freetype" ,freetype)
- ("gd" ,gd)
- ("gmp" ,gmp)
- ("ghostscript" ,ghostscript)
- ("graphite2" ,graphite2)
- ("harfbuzz" ,harfbuzz)
- ("icu4c" ,icu4c)
- ("libpaper" ,libpaper)
- ("libpng" ,libpng)
- ("libxaw" ,libxaw)
- ("libxt" ,libxt)
- ("mpfr" ,mpfr)
- ("perl" ,perl)
- ("pixman" ,pixman)
- ("poppler" ,poppler)
- ("potrace" ,potrace)
- ("python" ,python-2) ; incompatible with Python 3 (print syntax)
- ("ruby" ,ruby)
- ("tcsh" ,tcsh)
- ("teckit" ,teckit)
- ("zlib" ,zlib)
- ("zziplib" ,zziplib)))
- (native-inputs
- `(("pkg-config" ,pkg-config)))
- (arguments
- `(#:out-of-source? #t
- #:configure-flags
+ (name "texlive-bin")
+ (version "20210325")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "ftp://tug.org/historic/systems/texlive/2021/"
+ "texlive-" version "-source.tar.xz"))
+ (sha256
+ (base32
+ "0jsq1p66l46k2qq0gbqmx25flj2nprsz4wrd1ybn286p11kdkvvs"))
+ (modules '((guix build utils)
+ (ice-9 ftw)))
+ (snippet
+ '(begin
+ (with-directory-excursion "libs"
+ (let ((preserved-directories '("." ".." "lua53" "luajit" "pplib" "xpdf")))
+ ;; Delete bundled software, except Lua which cannot easily be
+ ;; used as an external dependency, pplib and xpdf which aren't
+ ;; supported as system libraries (see m4/kpse-xpdf-flags.m4).
+ (for-each delete-file-recursively
+ (scandir "."
+ (lambda (file)
+ (and (not (member file preserved-directories))
+ (eq? 'directory (stat:type (stat file)))))))))
+ ;; TODO: Unbundle stuff in texk/dvisvgm/dvisvgm-src/libs too.
+ #t))))
+ (build-system gnu-build-system)
+ (inputs
+ `(("texlive-extra-src" ,texlive-extra-src)
+ ("config" ,config)
+ ("texlive-scripts"
+ ,(origin
+ (method svn-fetch)
+ (uri (svn-reference
+ (url (string-append "svn://www.tug.org/texlive/tags/"
+ %texlive-tag "/Master/texmf-dist/"
+ "/scripts/texlive"))
+ (revision %texlive-revision)))
+ (file-name (string-append "texlive-scripts-"
+ (number->string %texlive-revision)
+ "-checkout"))
+ (sha256
+ (base32
+ "10xpa4nnz1biap7qfv7fb0zk6132ki5g1j8w0bqwkggfncdfl07d"))))
+ ("cairo" ,cairo)
+ ("fontconfig" ,fontconfig)
+ ("fontforge" ,fontforge)
+ ("freetype" ,freetype)
+ ("gd" ,gd)
+ ("gmp" ,gmp)
+ ("ghostscript" ,ghostscript)
+ ("graphite2" ,graphite2)
+ ("harfbuzz" ,harfbuzz)
+ ("icu4c" ,icu4c)
+ ("libpaper" ,libpaper)
+ ("libpng" ,libpng)
+ ("libxaw" ,libxaw)
+ ("libxt" ,libxt)
+ ("mpfr" ,mpfr)
+ ("perl" ,perl)
+ ("pixman" ,pixman)
+ ("potrace" ,potrace)
+ ("python" ,python)
+ ("ruby" ,ruby)
+ ("tcsh" ,tcsh)
+ ("teckit" ,teckit)
+ ("zlib" ,zlib)
+ ("zziplib" ,zziplib)))
+ (native-inputs
+ `(("pkg-config" ,pkg-config)))
+ (arguments
+ `(#:modules ((guix build gnu-build-system)
+ (guix build utils)
+ (ice-9 ftw)
+ (srfi srfi-1)
+ (srfi srfi-26))
+ #:out-of-source? #t
+ #:configure-flags
'("--disable-static"
"--disable-native-texlive-build"
+ "--enable-shared"
+ "--with-banner-add=/GNU Guix"
"--with-system-cairo"
"--with-system-freetype2"
"--with-system-gd"
@@ -341,16 +335,15 @@ files from LOCATIONS with expected checksum HASH. CODE is not currently in use.
"--with-system-libpng"
"--with-system-mpfr"
"--with-system-pixman"
- "--with-system-poppler"
"--with-system-potrace"
"--with-system-teckit"
- "--with-system-xpdf"
"--with-system-zlib"
"--with-system-zziplib"
;; LuaJIT is not ported to powerpc64le* yet.
,@(if (string-prefix? "powerpc64le" (or (%current-target-system)
(%current-system)))
'("--disable-luajittex"
+ "--disable-luajithbtex"
"--disable-mfluajit")
'()))
@@ -363,102 +356,187 @@ files from LOCATIONS with expected checksum HASH. CODE is not currently in use.
(string-prefix? "mips64" s)
(string-prefix? "powerpc64le" s))))
- #:phases
- (modify-phases %standard-phases
- (add-after 'unpack 'configure-ghostscript-executable
- ;; ps2eps.pl uses the "gswin32c" ghostscript executable on Windows,
- ;; and the "gs" ghostscript executable on Unix. It detects Unix by
- ;; checking for the existence of the /usr/bin directory. Since
- ;; Guix System does not have /usr/bin, it is also detected as Windows.
- (lambda* (#:key inputs #:allow-other-keys)
- (substitute* "utils/ps2eps/ps2eps-src/bin/ps2eps.pl"
- (("gswin32c") "gs"))
- (substitute* "texk/texlive/linked_scripts/epstopdf/epstopdf.pl"
- (("\"gs\"")
- (string-append "\"" (assoc-ref inputs "ghostscript") "/bin/gs\"")))
- #t))
- (add-after 'unpack 'use-code-for-new-poppler
- (lambda _
- (copy-file "texk/web2c/pdftexdir/pdftoepdf-poppler0.76.0.cc"
- "texk/web2c/pdftexdir/pdftoepdf.cc")
- (copy-file "texk/web2c/pdftexdir/pdftosrc-poppler0.76.0.cc"
- "texk/web2c/pdftexdir/pdftosrc.cc")
- #t))
- (add-after 'unpack 'patch-dvisvgm-build-files
- (lambda _
- ;; XXX: Ghostscript is detected, but HAVE_LIBGS is never set, so
- ;; the appropriate linker flags are not added.
- (substitute* "texk/dvisvgm/configure"
- (("^have_libgs=yes" all)
- (string-append all "\nHAVE_LIBGS=1")))
- #t))
- (add-after 'unpack 'disable-failing-test
- (lambda _
- ;; FIXME: This test fails on 32-bit architectures since Glibc 2.28:
- ;; <https://bugzilla.redhat.com/show_bug.cgi?id=1631847>.
- (substitute* "texk/web2c/omegafonts/check.test"
- (("^\\./omfonts -ofm2opl \\$srcdir/tests/check tests/xcheck \\|\\| exit 1")
- "./omfonts -ofm2opl $srcdir/tests/check tests/xcheck || exit 77"))
- #t))
- (add-after 'install 'postint
- (lambda* (#:key inputs outputs #:allow-other-keys #:rest args)
- (let* ((out (assoc-ref outputs "out"))
- (share (string-append out "/share"))
- (texlive-extra (assoc-ref inputs "texlive-extra-src"))
- (unpack (assoc-ref %standard-phases 'unpack))
- (patch-source-shebangs
- (assoc-ref %standard-phases 'patch-source-shebangs)))
- (substitute* (string-append share "/texmf-dist/web2c/texmf.cnf")
- ;; Don't truncate lines.
- (("^error_line = .*$") "error_line = 254\n")
- (("^half_error_line = .*$") "half_error_line = 238\n")
- (("^max_print_line = .*$") "max_print_line = 1000\n"))
- ;; Create symbolic links for the latex variants and their
- ;; man pages.
- (with-directory-excursion (string-append out "/bin/")
- (for-each symlink
- '("pdftex" "pdftex" "xetex" "luatex")
- '("latex" "pdflatex" "xelatex" "lualatex")))
- (with-directory-excursion (string-append share "/man/man1/")
- (symlink "luatex.1" "lualatex.1"))
- ;; Unpack texlive-extra and install tlpkg.
- (mkdir "texlive-extra")
- (with-directory-excursion "texlive-extra"
- (apply unpack (list #:source texlive-extra))
- (apply patch-source-shebangs (list #:source texlive-extra))
- (invoke "mv" "tlpkg" share))
- (let ((scripts (string-append share "/texmf-dist/scripts/texlive/")))
- (mkdir-p scripts)
- (copy-recursively (assoc-ref inputs "texlive-scripts") scripts)
- ;; Make sure that fmtutil can find its Perl modules.
- (substitute* (string-append scripts "fmtutil.pl")
- (("\\$TEXMFROOT/") (string-append share "/"))))
-
- ;; texlua shebangs are not patched by the patch-source-shebangs
- ;; phase because the texlua executable does not exist at that
- ;; time.
- (setenv "PATH" (string-append (getenv "PATH") ":" out "/bin"))
- (with-directory-excursion out
- (patch-source-shebangs))))))))
- (native-search-paths
- (list (search-path-specification
- (variable "TEXMF")
- (files '("share/texmf-dist"))
- (separator #f))
- (search-path-specification
- (variable "TEXMFCNF")
- (files '("share/texmf-dist/web2c"))
- (separator #f))))
- (synopsis "TeX Live, a package of the TeX typesetting system")
- (description
- "TeX Live provides a comprehensive TeX document production system.
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'configure-ghostscript-executable
+ ;; ps2eps.pl uses the "gswin32c" ghostscript executable on Windows,
+ ;; and the "gs" ghostscript executable on Unix. It detects Unix by
+ ;; checking for the existence of the /usr/bin directory. Since
+ ;; Guix System does not have /usr/bin, it is also detected as Windows.
+ (lambda* (#:key inputs #:allow-other-keys)
+ (substitute* "utils/ps2eps/ps2eps-src/bin/ps2eps.pl"
+ (("gswin32c") "gs"))
+ (substitute* "texk/texlive/linked_scripts/epstopdf/epstopdf.pl"
+ (("\"gs\"")
+ (string-append "\"" (assoc-ref inputs "ghostscript") "/bin/gs\"")))
+ #t))
+ (add-after 'unpack 'patch-dvisvgm-build-files
+ (lambda _
+ ;; XXX: Ghostscript is detected, but HAVE_LIBGS is never set, so
+ ;; the appropriate linker flags are not added.
+ (substitute* "texk/dvisvgm/configure"
+ (("^have_libgs=yes" all)
+ (string-append all "\nHAVE_LIBGS=1")))
+ #t))
+ (add-after 'unpack 'disable-failing-test
+ (lambda _
+ ;; FIXME: This test fails on 32-bit architectures since Glibc 2.28:
+ ;; <https://bugzilla.redhat.com/show_bug.cgi?id=1631847>.
+ (substitute* "texk/web2c/omegafonts/check.test"
+ (("^\\./omfonts -ofm2opl \\$srcdir/tests/check tests/xcheck \\|\\| exit 1")
+ "./omfonts -ofm2opl $srcdir/tests/check tests/xcheck || exit 77"))
+ #t))
+ ,@(if (target-ppc32?)
+ ;; Some mendex tests fail on some architectures.
+ `((add-after 'unpack 'skip-mendex-tests
+ (lambda _
+ (substitute* '("texk/mendexk/tests/mendex.test"
+ "texk/upmendex/tests/upmendex.test")
+ (("srcdir/tests/pprecA-0.ind pprecA-0.ind1 \\|\\| exit 1")
+ "srcdir/tests/pprecA-0.ind pprecA-0.ind1 || exit 77")))))
+ '())
+ (add-after 'unpack 'unpack-texlive-extra
+ (lambda* (#:key inputs #:allow-other-keys)
+ (mkdir "texlive-extra")
+ (with-directory-excursion "texlive-extra"
+ (apply (assoc-ref %standard-phases 'unpack)
+ (list #:source (assoc-ref inputs "texlive-extra-src"))))))
+ (add-after 'unpack-texlive-extra 'unpack-texlive-scripts
+ (lambda* (#:key inputs #:allow-other-keys)
+ (mkdir "texlive-scripts")
+ (with-directory-excursion "texlive-scripts"
+ (apply (assoc-ref %standard-phases 'unpack)
+ (list #:source (assoc-ref inputs "texlive-scripts"))))))
+ (add-after 'unpack-texlive-scripts 'patch-scripts
+ (lambda _
+ (let* ((scripts (append (find-files "texk/kpathsea" "^mktex")
+ (find-files "texk/texlive/linked_scripts"
+ "\\.sh$")
+ (find-files "texlive-scripts" "\\.sh$")))
+ (commands '("awk" "basename" "cat" "grep" "mkdir" "rm"
+ "sed" "sort" "uname"))
+ (command-regexp (format #f "\\b(~a)\\b"
+ (string-join commands "|")))
+ (iso-8859-1-encoded-scripts
+ '("texk/texlive/linked_scripts/texlive-extra/rubibtex.sh"
+ "texk/texlive/linked_scripts/texlive-extra/rumakeindex.sh")))
+
+ (define (substitute-commands scripts)
+ (substitute* scripts
+ ((command-regexp dummy command)
+ (which command))))
+
+ (substitute-commands (lset-difference string= scripts
+ iso-8859-1-encoded-scripts))
+
+ (with-fluids ((%default-port-encoding "ISO-8859-1"))
+ (substitute-commands iso-8859-1-encoded-scripts))
+
+ #t)))
+ (add-after 'check 'customize-texmf.cnf
+ ;; The default texmf.cnf is provided by this package, texlive-bin.
+ ;; Every variable of interest is set relatively to the GUIX_TEXMF
+ ;; environment variable defined via a search path specification
+ ;; further below. The configuration file is patched after the test
+ ;; suite has run, as it relies on the default configuration to find
+ ;; its paths (and the GUIX_TEXMF variable isn't set yet).
+ (lambda _
+ ;; The current directory is build/ because of the out-of-tree
+ ;; build.
+ (let* ((source (first (scandir ".." (cut string-suffix?
+ "source" <>))))
+ (texmf.cnf (string-append "../" source
+ "/texk/kpathsea/texmf.cnf")))
+ (substitute* texmf.cnf
+ (("^TEXMFROOT = .*")
+ "TEXMFROOT = {$GUIX_TEXMF}/..\n")
+ (("^TEXMF = .*")
+ "TEXMF = {$GUIX_TEXMF}\n")
+ (("^%TEXMFCNF = .*")
+ "TEXMFCNF = {$GUIX_TEXMF}/web2c\n")
+ ;; Don't truncate lines.
+ (("^error_line = .*$") "error_line = 254\n")
+ (("^half_error_line = .*$") "half_error_line = 238\n")
+ (("^max_print_line = .*$") "max_print_line = 1000\n")))
+ #t))
+ (add-after 'install 'post-install
+ (lambda* (#:key inputs outputs #:allow-other-keys #:rest args)
+ (let* ((out (assoc-ref outputs "out"))
+ (patch-source-shebangs (assoc-ref %standard-phases
+ 'patch-source-shebangs))
+ (share (string-append out "/share"))
+ (scripts (string-append share
+ "/texmf-dist/scripts/texlive"))
+ (source (string-append
+ "../" (first (scandir ".." (cut string-suffix?
+ "source" <>)))))
+ (tl-extra-root (string-append source "/texlive-extra"))
+ (tl-extra-dir (first
+ (scandir tl-extra-root
+ (negate
+ (cut member <> '("." ".."))))))
+ (tlpkg-src (string-append tl-extra-root "/" tl-extra-dir
+ "/tlpkg"))
+ (config.guess (search-input-file inputs
+ "/bin/config.guess")))
+
+ ;; Create symbolic links for the latex variants and their
+ ;; man pages.
+ (with-directory-excursion (string-append out "/bin/")
+ (for-each symlink
+ '("pdftex" "pdftex" "xetex" "luatex")
+ '("latex" "pdflatex" "xelatex" "lualatex")))
+ (with-directory-excursion (string-append share "/man/man1/")
+ (symlink "luatex.1" "lualatex.1"))
+
+ ;; Install tlpkg.
+ (copy-recursively tlpkg-src (string-append share "/tlpkg"))
+
+ ;; Install texlive-scripts.
+ (copy-recursively (string-append
+ source "/texlive-scripts/source/")
+ scripts)
+
+ ;; Make sure that fmtutil can find its Perl modules.
+ (substitute* (string-append scripts "/fmtutil.pl")
+ (("\\$TEXMFROOT/")
+ (string-append share "/")))
+
+ ;; Likewise for updmap.pl.
+ (substitute* (string-append scripts "/updmap.pl")
+ (("\\$TEXMFROOT/tlpkg")
+ (string-append share "/tlpkg")))
+
+ ;; Likewise for the tlmgr.
+ (substitute* (string-append scripts "/tlmgr.pl")
+ ((".*\\$::installerdir = \\$Master.*" all)
+ (format #f " $Master = ~s;~%~a" share all)))
+
+ ;; Install the config.guess script, required by tlmgr.
+ (with-directory-excursion share
+ (mkdir-p "tlpkg/installer/")
+ (symlink config.guess "tlpkg/installer/config.guess"))
+
+ ;; texlua shebangs are not patched by the patch-source-shebangs
+ ;; phase because the texlua executable does not exist at that
+ ;; time.
+ (setenv "PATH" (string-append (getenv "PATH") ":" out "/bin"))
+ (with-directory-excursion out
+ (patch-source-shebangs))))))))
+ (native-search-paths
+ (list (search-path-specification
+ (variable "GUIX_TEXMF")
+ (files '("share/texmf-dist")))))
+ (synopsis "TeX Live, a package of the TeX typesetting system")
+ (description
+ "TeX Live provides a comprehensive TeX document production system.
It includes all the major TeX-related programs, macro packages, and fonts
that are free software, including support for many languages around the
world.
This package contains the binaries.")
- (license (license:fsf-free "https://www.tug.org/texlive/copying.html"))
- (home-page "https://www.tug.org/texlive/")))
+ (license (license:fsf-free "https://www.tug.org/texlive/copying.html"))
+ (home-page "https://www.tug.org/texlive/")))
(define-public texlive-libkpathsea
(package/inherit texlive-bin
@@ -493,6 +571,12 @@ This package contains the binaries.")
(description "kpathsea is a library, whose purpose is to return a filename
from a list of user-specified directories similar to how shells look up
executables. It is maintained as a part of TeX Live.")))
+
+(define-syntax-rule (define-deprecated-package old-name name)
+ "Define OLD-NAME as a deprecated package alias for NAME."
+ (define-deprecated/public old-name name
+ (deprecated-package (symbol->string 'old-name) name)))
+
(define texlive-docstrip
(package
@@ -500,7 +584,7 @@ executables. It is maintained as a part of TeX Live.")))
"texlive-docstrip"
(list "/tex/latex/base/docstrip.tex")
(base32
- "1f9sx1lp7v34zwm186msf03q2h28rrg0lh65z59zc0cvqffs6dvb")
+ "1pxbqbia0727vg01xv8451szm55z2w8sb0vv3kf4iqx5ibb6m0d2")
#:trivial? #t))
(home-page "https://www.ctan.org/texlive")
(synopsis "Utility to strip documentation from TeX files.")
@@ -515,7 +599,7 @@ documentation from TeX files. It is part of the LaTeX base.")
(list "/tex/generic/unicode-data/"
"/doc/generic/unicode-data/")
(base32
- "0zy4v9y667cka5fi4dnc6x500907812y7pcaf63s5qxi8l7khxxy")
+ "1d41zvjsig7sqf2j2m89dnbv3gicpb16r04b4ikps4gabhbky83k")
#:trivial? #t))
(home-page "https://www.ctan.org/pkg/unicode-data")
(synopsis "Unicode data and loaders for TeX")
@@ -530,8 +614,7 @@ set up and one for initializing XeTeX character classes as has been carried
out to date by @code{unicode-letters.tex}. ")
(license license:lppl1.3c+)))
-(define-public texlive-generic-unicode-data
- (deprecated-package "texlive-generic-unicode-data" texlive-unicode-data))
+(define-deprecated-package texlive-generic-unicode-data texlive-unicode-data)
(define-public texlive-hyphen-base
(package
@@ -548,7 +631,7 @@ out to date by @code{unicode-letters.tex}. ")
"/tex/generic/hyphen/hypht1.tex"
"/tex/generic/hyphen/zerohyph.tex")
(base32
- "0f19nml4hdx9lh7accqdk1b9ismwfm2523l5zsc4kb4arysgcakz")
+ "1sagn9aybs34m1s6m3zwya5g5kbiwfnw8ifcgxssygmzzs88dgjp")
#:trivial? #t))
(home-page "https://tug.org/texlive/")
(synopsis "Core hyphenation support files")
@@ -569,7 +652,7 @@ default versions of those), etc.")
"/fonts/enc/dvips/base/"
"/tex/generic/dvips/")
(base32
- "1qr7h0ahycmz5wmpv54glfss9jqdmmyymj6kim626d1c8v9bmg86")
+ "0rns1hpjy4fmsskmkwx197j8qbgdmyj0j9214sq9vhpa6nv7czm3")
#:trivial? #t))
(home-page "https://www.ctan.org/pkg/dvips")
(synopsis "DVI to PostScript drivers")
@@ -594,24 +677,24 @@ allow existing format source files to be used with newer engines, for example
to adapt the plain e-TeX source file to work with XeTeX and LuaTeX.")
(license license:public-domain)))
-(define-public texlive-generic-tex-ini-files
- (deprecated-package "texlive-generic-tex-ini-files" texlive-tex-ini-files))
+(define-deprecated-package texlive-generic-tex-ini-files texlive-tex-ini-files)
-(define-public texlive-metafont-base
+(define-public texlive-metafont
(package
- (name "texlive-metafont-base")
+ (name "texlive-metafont")
(version (number->string %texlive-revision))
(source (origin
- (method svn-fetch)
- (uri (svn-reference
+ (method svn-multi-fetch)
+ (uri (svn-multi-reference
(url (string-append "svn://www.tug.org/texlive/tags/"
- %texlive-tag "/Master/texmf-dist/"
- "/metafont"))
+ %texlive-tag "/Master/texmf-dist"))
+ (locations '("/metafont/"
+ "/fonts/source/public/modes/"))
(revision %texlive-revision)))
(file-name (string-append name "-" version "-checkout"))
(sha256
(base32
- "1yl4n8cn5xqk2nc22zgzq6ymd7bhm6xx1mz3azip7i3ki4bhb5q5"))))
+ "17y72xmz5a36vdsq7pfrwj0j4c7llrm9j5kcq349cpaas7r32lmb"))))
(build-system gnu-build-system)
(arguments
`(#:tests? #f ; no test target
@@ -620,14 +703,17 @@ to adapt the plain e-TeX source file to work with XeTeX and LuaTeX.")
(delete 'configure)
(replace 'build
(lambda* (#:key inputs #:allow-other-keys)
- (let ((cwd (getcwd)))
+ (let* ((cwd (getcwd))
+ (mf (string-append cwd "/metafont"))
+ (modes (string-append cwd "/fonts/source/public/modes")))
(setenv "MFINPUTS"
- (string-append cwd "/base:"
- cwd "/misc:"
- cwd "/roex:"
- cwd "/feynmf:"
- cwd "/mfpic:"
- cwd "/config")))
+ (string-append modes ":"
+ mf "/base:"
+ mf "/misc:"
+ mf "/roex:"
+ mf "/feynmf:"
+ mf "/mfpic:"
+ mf "/config")))
(mkdir "build")
(with-directory-excursion "build"
(invoke "inimf" "mf.mf"))))
@@ -635,12 +721,14 @@ to adapt the plain e-TeX source file to work with XeTeX and LuaTeX.")
(lambda* (#:key outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))
(base (string-append out "/share/texmf-dist/web2c"))
- (mf (string-append out "/share/texmf-dist/metafont/base")))
+ (mf (string-append out "/share/texmf-dist/metafont/")))
(mkdir-p base)
(mkdir-p mf)
(install-file "build/mf.base" base)
- (copy-recursively "base" mf)
- #t))))))
+ (with-directory-excursion "metafont"
+ (for-each (lambda (where)
+ (copy-recursively where (string-append mf where)))
+ (list "base" "misc" "config")))))))))
(native-inputs
`(("texlive-bin" ,texlive-bin)))
(home-page "https://www.ctan.org/pkg/metafont")
@@ -649,6 +737,8 @@ to adapt the plain e-TeX source file to work with XeTeX and LuaTeX.")
build fonts using the Metafont system.")
(license license:knuth)))
+(define-deprecated-package texlive-metafont-base texlive-metafont)
+
(define-public texlive-fontinst
(let ((template (simple-texlive-package
"texlive-fontinst"
@@ -673,11 +763,9 @@ build fonts using the Metafont system.")
"/tex/fontinst/latinetx/"
"/tex/fontinst/latinmtx/"
"/tex/fontinst/mathmtx/"
- "/tex/fontinst/smblmtx/"
-
- "/scripts/texlive/fontinst.sh")
+ "/tex/fontinst/smblmtx/")
(base32
- "0lprwib7n2ygfxvrw675vhif7ghyip2x6k70kqs9syp8lqxiizf8")
+ "195jsijrpv828pqy99gm13j31nsc8bsa58zlbln2r0h5j9l44b5g")
#:trivial? #t)))
(package
(inherit template)
@@ -739,8 +827,7 @@ metrics (and related information) for a font family that TeX needs to do any
typesetting in these fonts.")
(license license:lppl1.1+))))
-(define-public texlive-tex-fontinst-base
- (deprecated-package "texlive-tex-fontinst-base" texlive-fontinst))
+(define-deprecated-package texlive-tex-fontinst-base texlive-fontinst)
(define-public texlive-fontname
(package
@@ -749,7 +836,7 @@ typesetting in these fonts.")
(list "/doc/fonts/fontname/fontname.texi"
"/fonts/map/fontname/")
(base32
- "0h5im5rnhycrrkd6z10f17m2caa8lv594wf482b68qjmnxfrqnxj")
+ "009qvjpw48lajp0gxpvdk10n5qw3q41cpq05ycns67mxwkcaywq6")
#:trivial? #t))
(home-page "https://www.ctan.org/pkg/fontname")
(synopsis "Scheme for naming fonts in TeX")
@@ -766,7 +853,7 @@ documents.")
"/fonts/map/dvips/cm/cmtext-bsr-interpolated.map"
"/doc/fonts/cm/")
(base32
- "09mvl94qrwlb9b4pkigi151l256v3djhwl4m5lgvk6yhn5y75zrp")
+ "1ky4gvcn8qn3d61bvb39512b8r92igv6il7vh02hw04223yj6q8i")
#:trivial? #t)))
(package
(inherit template)
@@ -780,7 +867,7 @@ documents.")
`(modify-phases ,phases
(replace 'build
(lambda* (#:key inputs #:allow-other-keys)
- (let ((mf (assoc-ref inputs "texlive-metafont-base")))
+ (let ((mf (assoc-ref inputs "texlive-metafont")))
;; Tell mf where to find mf.base
(setenv "MFBASES" (string-append mf "/share/texmf-dist/web2c"))
;; Tell mf where to look for source files
@@ -824,7 +911,7 @@ documents.")
#t)))))))
(native-inputs
`(("texlive-bin" ,texlive-bin)
- ("texlive-metafont-base" ,texlive-metafont-base)))
+ ("texlive-metafont" ,texlive-metafont)))
(home-page "https://www.ctan.org/pkg/cm")
(synopsis "Computer Modern fonts for TeX")
(description "This package provides the Computer Modern fonts by Donald
@@ -833,8 +920,7 @@ display, and mathematical fonts in a range of styles, based on Monotype Modern
8A.")
(license license:knuth))))
-(define-public texlive-fonts-cm
- (deprecated-package "texlive-fonts-cm" texlive-cm))
+(define-deprecated-package texlive-fonts-cm texlive-cm)
(define-public texlive-cm-super
(let ((template (simple-texlive-package
@@ -868,8 +954,7 @@ originals.")
;; With font exception
(license license:gpl2+))))
-(define-public texlive-fonts-cm-super
- (deprecated-package "texlive-fonts-cm-super" texlive-cm-super))
+(define-deprecated-package texlive-fonts-cm-super texlive-cm-super)
(define-public texlive-courier
(package
@@ -889,7 +974,7 @@ originals.")
"/tex4ht/ht-fonts/alias/adobe/courier/"
"/tex4ht/ht-fonts/unicode/adobe/courier/")
(base32
- "1hfgisdi7mjf5156ax6d6zsbiq42zkmp1x5lg17rgzf61k6d6z1y")
+ "05lglavi073glj26k9966351hka5ac22g4vim61dkfy001vz4i7r")
#:trivial? #t))
(home-page "https://ctan.org/pkg/urw-base35")
(synopsis "URW Base 35 font pack for LaTeX")
@@ -898,6 +983,45 @@ font from Adobe's basic set.")
;; No license version specified.
(license license:gpl3+)))
+(define-public texlive-tex-gyre
+ (package
+ (inherit (simple-texlive-package
+ "texlive-tex-gyre"
+ '("/doc/fonts/tex-gyre/GUST-FONT-LICENSE.txt"
+ "/fonts/afm/public/tex-gyre/"
+ "/fonts/enc/dvips/tex-gyre/"
+ "/fonts/map/dvips/tex-gyre/"
+ "/fonts/opentype/public/tex-gyre/"
+ "/fonts/tfm/public/tex-gyre/"
+ "/fonts/type1/public/tex-gyre/"
+ "/tex/latex/tex-gyre/")
+ (base32
+ "1ldnlmclghm3gnyv02r8a6cqybygz2ifq07mhykhf43h1pw3aq7k")
+ #:trivial? #t))
+ (home-page "https://ctan.org/pkg/tex-gyre")
+ (synopsis "TeX fonts extending URW fonts")
+ (description
+ "The TeX-GYRE bundle consist of multiple font families:
+@itemize @bullet
+@item Adventor, based on the URW Gothic L family of fonts;
+@item Bonum, based on the URW Bookman L family;
+@item Chorus, based on URW Chancery L Medium Italic;
+@item Cursor, based on URW Nimbus Mono L;
+@item Heros, based on URW Nimbus Sans L;
+@item Pagella, based on URW Palladio L;
+@item Schola, based on the URW Century Schoolbook L family;
+@item Termes, based on the URW Nimbus Roman No9 L family of fonts.
+@end itemize
+
+The constituent standard faces of each family have been greatly extended
+(though Chorus omits Greek support and has no small-caps family). Each
+family is available in Adobe Type 1 and Open Type formats, and LaTeX
+support (for use with a variety of encodings) is provided.")
+ ;; The GUST font license (GFL) is legally identical to the LaTeX Project
+ ;; Public License (LPPL), version 1.3c or later, but comes with an
+ ;; additional but not legally binding clause.
+ (license license:lppl1.3c+)))
+
(define-public texlive-lm
(package
(inherit (simple-texlive-package
@@ -912,7 +1036,7 @@ font from Adobe's basic set.")
"/fonts/type1/public/lm/"
"/tex/latex/lm/")
(base32
- "0i1hwr8rp0jqyvs4qyplrirscd4w7lsgwsncyv3yzy80bsa56jq5")
+ "0yyk0dr4yms82mwy4dc03zf5igyhgcb65icdah042rk23rlpxygv")
#:trivial? #t))
(home-page "http://www.gust.org.pl/projects/e-foundry/latin-modern/")
(synopsis "Latin Modern family of fonts")
@@ -924,76 +1048,70 @@ Computers & Typesetting series.")
;; additional but not legally binding clause.
(license license:lppl1.3c+)))
-(define-public texlive-fonts-lm
- (deprecated-package "texlive-fonts-lm" texlive-lm))
+(define-deprecated-package texlive-fonts-lm texlive-lm)
-(define-public texlive-fonts-knuth-lib
- (package
- (name "texlive-fonts-knuth-lib")
- (version (number->string %texlive-revision))
- (source (origin
- (method svn-fetch)
- (uri (svn-reference
- (url (string-append "svn://www.tug.org/texlive/tags/"
- %texlive-tag "/Master/texmf-dist/"
- "/fonts/source/public/knuth-lib"))
- (revision %texlive-revision)))
- (file-name (string-append name "-" version "-checkout"))
- (sha256
- (base32
- "0in9aqyi8jkyf9d16z0li50z5fpwj1iwgwm83gmvwqcf7chfs04y"))))
- (build-system gnu-build-system)
- (arguments
- `(#:modules ((guix build gnu-build-system)
- (guix build utils)
- (srfi srfi-26))
- #:tests? #f ; no tests
- #:phases
- (modify-phases %standard-phases
- (delete 'configure)
- (replace 'build
- (lambda* (#:key inputs #:allow-other-keys)
- (let ((mf (assoc-ref inputs "texlive-metafont-base")))
- ;; Tell mf where to find mf.base
- (setenv "MFBASES"
- (string-append mf "/share/texmf-dist/web2c"))
- ;; Tell mf where to look for source files
- (setenv "MFINPUTS"
- (string-append (getcwd) ":"
- mf "/share/texmf-dist/metafont/base")))
- (mkdir "build")
- (for-each (lambda (font)
- (format #t "building font ~a\n" font)
- (invoke "mf" "-progname=mf"
- "-output-directory=build"
- (string-append "\\"
- "mode:=ljfour; "
- "mag:=1; "
- "batchmode; "
- "input " font)))
- (find-files "." "(manfnt|logo.+)\\.mf$"))
- #t))
- (replace 'install
- (lambda* (#:key outputs #:allow-other-keys)
- (let* ((out (assoc-ref outputs "out"))
- (tfm (string-append
- out "/share/texmf-dist/fonts/tfm/public/knuth-lib"))
- (mf (string-append
- out "/share/texmf-dist/fonts/source/public/knuth-lib")))
- (for-each (cut install-file <> tfm)
- (find-files "build" "\\.*"))
- (for-each (cut install-file <> mf)
- (find-files "." "\\.mf"))
- #t))))))
- (native-inputs
- `(("texlive-bin" ,texlive-bin)
- ("texlive-metafont-base" ,texlive-metafont-base)))
- (home-page "https://www.ctan.org/pkg/knuth-lib")
- (synopsis "Small library of METAFONT sources")
- (description "This is a collection of core TeX and METAFONT macro files
+(define-public texlive-knuth-lib
+ (let ((template (simple-texlive-package
+ "texlive-knuth-lib"
+ (list "/fonts/source/public/knuth-lib/"
+ "/tex/generic/knuth-lib/"
+ "/tex/plain/knuth-lib/")
+ (base32
+ "1cxyqqprp8sj2j4zp9l0wry8cq2awpz3a8i5alzpc4ndg7a6pgdf")
+ #:trivial? #t)))
+ (package
+ (inherit template)
+ (arguments
+ (substitute-keyword-arguments (package-arguments template)
+ ((#:modules _ '())
+ '((guix build gnu-build-system)
+ (guix build utils)
+ (srfi srfi-26)))
+ ((#:phases phases '())
+ `(modify-phases ,phases
+ (replace 'build
+ (lambda* (#:key inputs #:allow-other-keys)
+ (with-directory-excursion "fonts/source/public/knuth-lib"
+ (let ((mf (assoc-ref inputs "texlive-metafont")))
+ ;; Tell mf where to find mf.base
+ (setenv "MFBASES"
+ (string-append mf "/share/texmf-dist/web2c"))
+ ;; Tell mf where to look for source files
+ (setenv "MFINPUTS"
+ (string-append (getcwd) ":"
+ mf "/share/texmf-dist/metafont/base")))
+ (mkdir "build")
+ (for-each (lambda (font)
+ (format #t "building font ~a\n" font)
+ (invoke "mf" "-progname=mf"
+ "-output-directory=build"
+ (string-append "\\"
+ "mode:=ljfour; "
+ "mag:=1; "
+ "batchmode; "
+ "input " font)))
+ (find-files "." "(manfnt|logo.+)\\.mf$")))
+ #t))
+ (add-after 'install 'install-fonts
+ (lambda* (#:key outputs #:allow-other-keys)
+ (with-directory-excursion "fonts/source/public/knuth-lib"
+ (let* ((out (assoc-ref outputs "out"))
+ (tfm (string-append
+ out "/share/texmf-dist/fonts/tfm/public/knuth-lib")))
+ (for-each (cut install-file <> tfm)
+ (find-files "build" "\\.tfm"))
+ #t))))))))
+ (native-inputs
+ `(("texlive-bin" ,texlive-bin)
+ ("texlive-metafont" ,texlive-metafont)))
+ (home-page "https://www.ctan.org/pkg/knuth-lib")
+ (synopsis "Small library of METAFONT sources")
+ (description "This is a collection of core TeX and METAFONT macro files
from Donald Knuth, including the plain format, plain base, and the MF logo
fonts.")
- (license license:knuth)))
+ (license license:knuth))))
+
+(define-deprecated-package texlive-fonts-knuth-lib texlive-knuth-lib)
(define-public texlive-fonts-latex
(package
@@ -1022,7 +1140,7 @@ fonts.")
(delete 'configure)
(replace 'build
(lambda* (#:key inputs #:allow-other-keys)
- (let ((mf (assoc-ref inputs "texlive-metafont-base")))
+ (let ((mf (assoc-ref inputs "texlive-metafont")))
;; Tell mf where to find mf.base
(setenv "MFBASES" (string-append mf "/share/texmf-dist/web2c"))
;; Tell mf where to look for source files
@@ -1061,7 +1179,7 @@ fonts.")
#t))))))
(native-inputs
`(("texlive-bin" ,texlive-bin)
- ("texlive-metafont-base" ,texlive-metafont-base)
+ ("texlive-metafont" ,texlive-metafont)
("texlive-cm" ,texlive-cm)))
(home-page "https://www.ctan.org/pkg/latex-fonts")
(synopsis "Collection of fonts used in LaTeX distributions")
@@ -1071,27 +1189,80 @@ class), line and circle fonts (for use in the picture environment) and LaTeX
symbol fonts.")
(license license:lppl1.2+)))
-(define-public texlive-latex-mflogo
- (package
- (name "texlive-latex-mflogo")
- (version (number->string %texlive-revision))
- (source
- (origin
- (method svn-fetch)
- (uri (texlive-ref "latex" "mflogo"))
- (file-name (string-append name "-" version "-checkout"))
- (sha256
- (base32
- "15i2ib6nvhf31g1b92c6njf7n0g29znlq7hbfp9ii7qabhcwwvrj"))))
- (build-system texlive-build-system)
- (arguments '(#:tex-directory "latex/mflogo"))
- (home-page "http://www.ctan.org/pkg/mflogo")
- (synopsis "LaTeX support for Metafont logo fonts")
- (description
- "This package provides LaTeX and font definition files to access the
+(define-public texlive-mflogo
+ (let ((template (simple-texlive-package
+ "texlive-mflogo"
+ (list "/doc/latex/mflogo/"
+ "/source/latex/mflogo/"
+ "/fonts/source/public/mflogo/logosl8.mf")
+ (base32
+ "1vb4mg7fh4k54g7nqwiw3qm4iir8whpfnspis76l4sddzar1amh7"))))
+ (package
+ (inherit template)
+ (arguments
+ (substitute-keyword-arguments (package-arguments template)
+ ((#:modules _ '())
+ '((guix build texlive-build-system)
+ (guix build utils)
+ (srfi srfi-1)
+ (srfi srfi-26)))
+ ((#:tex-directory _ #t)
+ "latex/mflogo")
+ ((#:phases phases '())
+ `(modify-phases ,phases
+ (add-after 'unpack 'chdir
+ (lambda _
+ (chdir "source/latex/mflogo") #t))
+ (add-after 'build 'build-font-metrics
+ (lambda* (#:key inputs #:allow-other-keys)
+ (let ((root "../../..")
+ (mf (assoc-ref inputs "texlive-metafont"))
+ (kl (assoc-ref inputs "texlive-knuth-lib")))
+ ;; Tell mf where to find mf.base
+ (setenv "MFBASES"
+ (string-append mf "/share/texmf-dist/web2c"))
+ ;; Tell mf where to look for source files
+ (setenv "MFINPUTS"
+ (string-append root ":"
+ mf "/share/texmf-dist/metafont/base:"
+ kl "/share/texmf-dist/fonts/source/public/knuth-lib:"
+ root "/fonts/source/public/mflogo/"))
+ (for-each (lambda (font)
+ (format #t "building font ~a\n" font)
+ (invoke "mf" "-progname=mf"
+ "-output-directory=build"
+ (string-append "\\"
+ "mode:=ljfour; "
+ "mag:=1; "
+ "scrollmode; "
+ "input " (basename font))))
+ (find-files (string-append root
+ "/fonts/source/public/mflogo/")
+ "\\.mf$")))
+ #t))
+ (add-before 'install 'install-fonts
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (tfm (string-append
+ out "/share/texmf-dist/fonts/tfm/public/mflogo")))
+ (for-each (lambda (file)
+ (install-file file tfm)
+ (delete-file file))
+ (find-files "build" "\\.tfm"))
+ #t)))))))
+ (native-inputs
+ `(("texlive-bin" ,texlive-bin)
+ ("texlive-metafont" ,texlive-metafont)
+ ("texlive-knuth-lib" ,texlive-knuth-lib)))
+ (home-page "http://www.ctan.org/pkg/mflogo")
+ (synopsis "LaTeX support for Metafont logo fonts")
+ (description
+ "This package provides LaTeX and font definition files to access the
Knuthian mflogo fonts described in The Metafontbook and to typeset Metafont
logos in LaTeX documents.")
- (license license:lppl)))
+ (license license:lppl))))
+
+(define-deprecated-package texlive-latex-mflogo texlive-mflogo)
(define-public texlive-mflogo-font
(package
@@ -1114,8 +1285,7 @@ source; they have since been autotraced and reissued in Adobe Type 1 format by
Taco Hoekwater.")
(license license:knuth)))
-(define-public texlive-fonts-mflogo-font
- (deprecated-package "texlive-fonts-mflogo-font" texlive-mflogo-font))
+(define-deprecated-package texlive-fonts-mflogo-font texlive-mflogo-font)
(define-public texlive-amsfonts
(let ((template (simple-texlive-package
@@ -1147,171 +1317,11 @@ Taco Hoekwater.")
`(modify-phases ,phases
(add-before 'build 'build-fonts
(lambda* (#:key inputs #:allow-other-keys)
- (let ((mf (assoc-ref inputs "texlive-union"))
- (src (string-append (getcwd) "/fonts/source/public/amsfonts/")))
- ;; Make METAFONT reproducible
- (setenv "SOURCE_DATE_EPOCH" "1")
- ;; Tell mf where to find mf.base
- (setenv "MFBASES" (string-append mf "/share/texmf-dist/web2c"))
- ;; Tell mf where to look for source files
- (setenv "MFINPUTS"
- (string-append src ":"
- src "/cmextra:"
- src "/cyrillic:"
- src "/dummy:"
- src "/symbols:"
- mf "/share/texmf-dist/metafont/base:"
- (assoc-ref inputs "texlive-cm")
- "/share/texmf-dist/fonts/source/public/cm")))
- (let ((build (string-append (getcwd) "/build-fonts")))
- (mkdir-p build)
- (with-directory-excursion "fonts/source/public/amsfonts"
- (for-each (lambda (font)
- (format #t "building font ~a\n" (basename font ".mf"))
- (with-directory-excursion (dirname font)
- (invoke "mf" "-progname=mf"
- (string-append "-output-directory=" build)
- (string-append "\\"
- "mode:=ljfour; "
- "mag:=1; "
- "nonstopmode; "
- "input "
- (getcwd) "/"
- (basename font ".mf")))))
- (find-files "." "[0-9]+\\.mf$"))))
+ ;; Allow self fonts sources and other resources to be
+ ;; discovered.
+ (setenv "GUIX_TEXMF" (string-append (getenv "GUIX_TEXMF")
+ ":" (getcwd)))
- ;; There are no metafont sources for the Euler fonts, so we
- ;; convert the afm files instead.
- (let ((build (string-append (getcwd) "/build-fonts/euler")))
- (mkdir build)
- (with-directory-excursion "fonts/afm/public/amsfonts/"
- (for-each (lambda (font)
- (format #t "converting afm font ~a\n" (basename font ".afm"))
- (invoke "afm2tfm" font
- (string-append build "/"
- (basename font ".tfm"))))
- (find-files "." "\\.afm$")))
-
- ;; Frustratingly, not all fonts can be created this way. To
- ;; generate eufm8.tfm, for example, we first scale down
- ;; eufm10.afm to eufm8.pl, and then generate the tfm file from
- ;; the pl file.
- (setenv "TEXINPUTS"
- (string-append build "//:"
- (getcwd) "/fonts/afm/public/amsfonts//:"
- (getcwd) "/source/latex/amsfonts//:"
- (assoc-ref inputs "texlive-union") "//"))
- (with-directory-excursion build
- (for-each (match-lambda
- (((target-base target-size)
- (source-base source-size))
- (let ((factor (number->string
- (truncate/ (* 1000 target-size)
- source-size))))
- (invoke "tex"
- "-interaction=scrollmode"
- (string-append "\\input fontinst.sty "
- "\\transformfont{" target-base "}"
- "{\\scalefont{" factor "}"
- "{\\fromafm{" source-base "}}} "
- "\\bye")))
- (invoke "pltotf"
- (string-append target-base ".pl")
- (string-append target-base ".tfm"))
- (delete-file (string-append target-base ".pl"))))
-
- '((("eufm8" 8) ("eufm10" 10))
-
- (("eufb6" 6) ("eufb7" 7))
- (("eufb8" 8) ("eufb10" 10))
- (("eufb9" 9) ("eufb10" 10))
-
- (("eufm6" 6) ("eufb7" 7))
- (("eufm9" 9) ("eufb10" 10))
-
- (("eurb6" 6) ("eurb7" 7))
- (("eurb8" 8) ("eurb10" 10))
- (("eurb9" 9) ("eurb10" 10))
-
- (("eurm6" 6) ("eurm7" 7))
- (("eurm8" 8) ("eurm10" 10))
- (("eurm9" 9) ("eurm10" 10))))))
- #t))
- (add-after 'install 'install-generated-fonts
- (lambda* (#:key inputs outputs #:allow-other-keys)
- (copy-recursively "build-fonts"
- (string-append
- (assoc-ref outputs "out")
- "/share/texmf-dist/fonts/tfm/public/amsfonts"))
- #t))))))
- (native-inputs
- `(("texlive-union" ,(texlive-union (list texlive-tex-fontinst-base
- texlive-cm
- texlive-metafont-base)))))
- (home-page "https://www.ctan.org/pkg/amsfonts")
- (synopsis "TeX fonts from the American Mathematical Society")
- (description
- "This package provides an extended set of fonts for use in mathematics,
-including: extra mathematical symbols; blackboard bold letters (uppercase
-only); fraktur letters; subscript sizes of bold math italic and bold Greek
-letters; subscript sizes of large symbols such as sum and product; added sizes
-of the Computer Modern small caps font; cyrillic fonts (from the University of
-Washington); Euler mathematical fonts. All fonts are provided as Adobe Type 1
-files, and all except the Euler fonts are provided as Metafont source. The
-distribution also includes the canonical Type 1 versions of the Computer
-Modern family of fonts. The Euler fonts are supported by separate packages;
-details can be found in the documentation.")
- (license license:silofl1.1))))
-
-;; XXX: we can only change texlive-amsfonts on the core-updates branch. This
-;; patched version generates only tfm files for fonts provided by the source
-;; files of this package, not variants of the fonts provided by texlive-cm.
-(define-public texlive-amsfonts/patched
- (let ((template (simple-texlive-package
- "texlive-amsfonts"
- (list "/source/latex/amsfonts/"
- "/fonts/source/public/amsfonts/"
- "/fonts/type1/public/amsfonts/"
- "/fonts/afm/public/amsfonts/"
- "/fonts/map/dvips/amsfonts/"
- "/tex/plain/amsfonts/"
- "/doc/fonts/amsfonts/")
- (base32
- "15q70nkjf8wqzbd5ivcdx3i2sdgqxjb38q0qn9a2qw9i0qcnx6zw"))))
- (package
- (inherit template)
- (arguments
- (substitute-keyword-arguments (package-arguments template)
- ((#:build-targets _ #t)
- '(list "amsfonts.ins"))
- ((#:tex-directory _ #t)
- "latex/amsfonts")
- ((#:modules modules '())
- `((guix build texlive-build-system)
- (guix build utils)
- (ice-9 match)
- (srfi srfi-1)
- (srfi srfi-26)))
- ((#:phases phases)
- `(modify-phases ,phases
- (add-before 'build 'build-fonts
- (lambda* (#:key inputs #:allow-other-keys)
- (let ((mf (assoc-ref inputs "texlive-union"))
- (src (string-append (getcwd) "/fonts/source/public/amsfonts/")))
- ;; Make METAFONT reproducible
- (setenv "SOURCE_DATE_EPOCH" "1")
- ;; Tell mf where to find mf.base
- (setenv "MFBASES" (string-append mf "/share/texmf-dist/web2c"))
- ;; Tell mf where to look for source files
- (setenv "MFINPUTS"
- (string-append src ":"
- src "/cmextra:"
- src "/cyrillic:"
- src "/dummy:"
- src "/symbols:"
- mf "/share/texmf-dist/metafont/base:"
- (assoc-ref inputs "texlive-cm")
- "/share/texmf-dist/fonts/source/public/cm")))
(let ((build (string-append (getcwd) "/build-fonts")))
(mkdir-p build)
(with-directory-excursion "fonts/source/public/amsfonts"
@@ -1333,7 +1343,7 @@ details can be found in the documentation.")
;; convert the afm files instead.
(let ((build (string-append (getcwd) "/build-fonts/euler")))
(mkdir build)
- (with-directory-excursion "fonts/afm/public/amsfonts/"
+ (with-directory-excursion "fonts/afm/public/amsfonts/euler"
(for-each (lambda (font)
(format #t "converting afm font ~a\n" (basename font ".afm"))
(invoke "afm2tfm" font
@@ -1347,10 +1357,9 @@ details can be found in the documentation.")
;; eufm10.afm to eufm8.pl, and then generate the tfm file from
;; the pl file.
(setenv "TEXINPUTS"
- (string-append build "//:"
+ (string-append ":" build "//:"
(getcwd) "/fonts/afm/public/amsfonts//:"
- (getcwd) "/source/latex/amsfonts//:"
- (assoc-ref inputs "texlive-union") "//"))
+ (getcwd) "/source/latex/amsfonts//:"))
(with-directory-excursion build
(for-each (match-lambda
(((target-base target-size)
@@ -1385,19 +1394,16 @@ details can be found in the documentation.")
(("eurm6" 6) ("eurm7" 7))
(("eurm8" 8) ("eurm10" 10))
- (("eurm9" 9) ("eurm10" 10))))))
- #t))
+ (("eurm9" 9) ("eurm10" 10))))))))
(add-after 'install 'install-generated-fonts
(lambda* (#:key inputs outputs #:allow-other-keys)
(copy-recursively "build-fonts"
(string-append
(assoc-ref outputs "out")
- "/share/texmf-dist/fonts/tfm/public/amsfonts"))
- #t))))))
+ "/share/texmf-dist/fonts/tfm/public/amsfonts"))))))))
(native-inputs
- `(("texlive-union" ,(texlive-union (list texlive-tex-fontinst-base
- texlive-cm
- texlive-metafont-base)))))
+ `(("texlive-updmap.cfg" ,(texlive-updmap.cfg
+ (list texlive-fontinst)))))
(home-page "https://www.ctan.org/pkg/amsfonts")
(synopsis "TeX fonts from the American Mathematical Society")
(description
@@ -1413,11 +1419,9 @@ Modern family of fonts. The Euler fonts are supported by separate packages;
details can be found in the documentation.")
(license license:silofl1.1))))
-(define-public texlive-fonts-amsfonts
- (deprecated-package "texlive-fonts-amsfonts" texlive-amsfonts))
+(define-deprecated-package texlive-fonts-amsfonts texlive-amsfonts)
-(define-public texlive-latex-amsfonts
- (deprecated-package "texlive-latex-amsfonts" texlive-amsfonts))
+(define-deprecated-package texlive-latex-amsfonts texlive-amsfonts)
(define-public texlive-mkpattern
(package
@@ -1461,7 +1465,7 @@ output encodings, and features generation of clean UTF-8 patterns.")
;; Build tfm font.
(replace 'build
(lambda* (#:key inputs #:allow-other-keys)
- (let ((mf (assoc-ref inputs "texlive-metafont-base")))
+ (let ((mf (assoc-ref inputs "texlive-metafont")))
;; Tell mf where to find mf.base
(setenv "MFBASES" (string-append mf "/share/texmf-dist/web2c"))
;; Tell mf where to look for source files
@@ -1487,7 +1491,7 @@ output encodings, and features generation of clean UTF-8 patterns.")
#t))))))
(native-inputs
`(("texlive-bin" ,texlive-bin)
- ("texlive-metafont-base" ,texlive-metafont-base)
+ ("texlive-metafont" ,texlive-metafont)
("texlive-cm" ,texlive-cm)))
(home-page "https://www.ctan.org/pkg/etex")
(synopsis "Extended version of TeX")
@@ -1505,7 +1509,7 @@ incorporates the e-TeX extensions.")
"texlive-tex-plain"
(list "/tex/plain/")
(base32
- "1m4qpaszwfv7j8a85rlwl7rs4iv5nlj67c1vvn6ysly72h9gjydb")
+ "0gwygkm8i2jmpf7bfg6fb6824rl7fq4a2s0wni73v0fz6s4chr1n")
#:trivial? #t))
(home-page "https://www.ctan.org/pkg/plain")
(synopsis "Plain TeX format and supporting files")
@@ -1612,11 +1616,9 @@ language.")
(package
(inherit (texlive-hyphen-package
"texlive-hyphen-bulgarian" "bg"
- (list "/doc/generic/hyph-utf8/bg/azbukaExtended.pdf"
- "/doc/generic/hyph-utf8/bg/azbukaExtended.tex"
- "/tex/generic/hyph-utf8/patterns/tex/hyph-bg.tex")
+ '("/tex/generic/hyph-utf8/patterns/tex/hyph-bg.tex")
(base32
- "0ngrgw2rmipxss76rgfk62x9nnsgwmaxxna2jqxxhybai3q39mx5")))
+ "0m254y71j3qrb71klvfalfmic3kjy31l85b9cgpdm5yznlsq3i8d")))
(synopsis "Hyphenation patterns for Bulgarian")
(description "The package provides hyphenation patterns for the Bulgarian
language in T2A and UTF-8 encodings.")
@@ -1640,9 +1642,10 @@ T1/EC and UTF-8 encodings.")
(package
(inherit (texlive-hyphen-package
"texlive-hyphen-chinese" "zh-latn-pinyin"
- (list "/tex/generic/hyph-utf8/patterns/tex/hyph-zh-latn-pinyin.tex")
+ '("/tex/generic/hyph-utf8/patterns/ptex/hyph-zh-latn-pinyin.ec.tex"
+ "/tex/generic/hyph-utf8/patterns/tex/hyph-zh-latn-pinyin.tex")
(base32
- "1j68mry2zy91m1kbzwhin5q2jajf6xh48npdds8wvp1sqmzih2a3")))
+ "1hhh30hcjymm2igpllly04cavsfmd6xrjkd9zax6b2wdxn3ka4pm")))
(synopsis "Hyphenation patterns for unaccented Chinese pinyin")
(description "The package provides hyphenation patterns for unaccented
Chinese pinyin T1/EC and UTF-8 encodings.")
@@ -1784,12 +1787,24 @@ be replaced by files tailored to individual languages.")
"texlive-hyphen-finnish" "fi"
(list "/tex/generic/hyph-utf8/patterns/tex/hyph-fi.tex")
(base32
- "1f72b4ydb4zddvw2i004948khmwzigxkdkwfym5v1kkq0183sfpj")))
+ "1pa8sjs9zvnv1y6dma4s60sf9cr4zrvhxwm6i8cnshm84q16w4bc")))
(synopsis "Hyphenation patterns for Finnish")
(description "The package provides hyphenation patterns for Finnish in
T1/EC and UTF-8 encodings.")
(license license:public-domain)))
+(define-public texlive-hyphen-schoolfinnish
+ (package
+ (inherit (texlive-hyphen-package
+ "texlive-hyphen-schoolfinnish" "fi-x-school"
+ (list "/tex/generic/hyph-utf8/patterns/tex/hyph-fi-x-school.tex")
+ (base32
+ "1w5n6gaclgifbbnafg32vz3mfaibyldvh4yh1ya3sq9fwfmv035c")))
+ (synopsis "Hyphenation patterns for Finnish for school")
+ (description "The package provides hyphenation patterns for Finnish for
+school in T1/EC and UTF-8 encodings.")
+ (license license:public-domain)))
+
(define-public texlive-hyphen-french
(package
(inherit (texlive-hyphen-package
@@ -1851,7 +1866,7 @@ T8M, T8K, and UTF-8 encodings.")
"/tex/generic/dehyph/dehyphtex.tex"
"/tex/generic/dehyph/README")
(base32
- "0wp5by5kkf4ac6li5mbppqzw11500wa7f22p5vpz3m1kwd15zavw")))
+ "17cc5hd0fr3ykpgly9nxaiz4sik3kmfn2wyxz1fkdnqqhl3i41a0")))
(synopsis "Hyphenation patterns for German")
(description "This package provides hyphenation patterns for German in
T1/EC and UTF-8 encodings, for traditional and reformed spelling, including
@@ -1881,10 +1896,10 @@ in monotonic and polytonic spelling in LGR and UTF-8 encodings.")
(inherit (texlive-hyphen-package
"texlive-hyphen-hungarian" "hu"
(list "/doc/generic/huhyphen/"
- "/doc/generic/hyph-utf8/hu/"
+ "/doc/generic/hyph-utf8/languages/hu/"
"/tex/generic/hyph-utf8/patterns/tex/hyph-hu.tex")
(base32
- "1j1b8kksg9r8nmjyjvvz8fr3hgcrjj6jlybf9p06nwrrwm2r8j8f")))
+ "006d2290lcsqzh9ljansbaj9k52s17zgkw0kpsspn5l7a8n00zcl")))
(synopsis "Hyphenation patterns for Hungarian")
(description "This package provides hyphenation patterns for Hungarian in
T1/EC and UTF-8 encodings.")
@@ -1996,11 +2011,12 @@ Europe, in T1/EC and UTF-8 encodings.")
(package
(inherit (texlive-hyphen-package
"texlive-hyphen-latin" '("la-x-classic" "la-x-liturgic" "la")
- (list "/tex/generic/hyph-utf8/patterns/tex/hyph-la-x-classic.tex"
- "/tex/generic/hyph-utf8/patterns/tex/hyph-la-x-liturgic.tex"
- "/tex/generic/hyph-utf8/patterns/tex/hyph-la.tex")
+ '("/tex/generic/hyph-utf8/patterns/tex/hyph-la-x-classic.tex"
+ "/tex/generic/hyph-utf8/patterns/tex/hyph-la-x-liturgic.tex"
+ "/tex/generic/hyph-utf8/patterns/tex/hyph-la.tex"
+ "/tex/generic/hyph-utf8/patterns/tex-8bit/hyph-la-x-classic.ec.tex")
(base32
- "0rxg8a4s5cpj8vlkz5a74a036axda5jqgvr3f9aj2cc2x9f2f3w9")))
+ "119rf6sk1f639ky6zr9njn21nsxzgfmjci94y26745qs8w08ilkl")))
(synopsis "Liturgical Latin hyphenation patterns")
(description "This package provides hyphenation patterns for Latin in
T1/EC and UTF-8 encodings, mainly in modern spelling (u when u is needed and v
@@ -2042,6 +2058,19 @@ L7X and UTF-8 encodings.")
;; the hyph-utf8 package we choose the LPPL license.
(license license:lppl)))
+(define-public texlive-hyphen-macedonian
+ (package
+ (inherit (texlive-hyphen-package
+ "texlive-hyphen-macedonian" "mk"
+ '("/tex/generic/hyph-utf8/patterns/tex/hyph-mk.tex"
+ "/tex/generic/hyph-utf8/patterns/tex-8bit/hyph-mk.macedonian.tex")
+ (base32
+ "1fv6y8gpic5ciw8cclfxc8h3wr5xir1j0a7shixja1pmdyz7db2b")))
+ (synopsis "Macedonian hyphenation patterns")
+ (description "This package provides hypenation patterns for Macedonian.")
+ ;; XXX: License just says 'GPL'. Assume GPL2 since the file predates GPL3.
+ (license license:gpl2+)))
+
(define-public texlive-hyphen-mongolian
(package
(inherit (texlive-hyphen-package
@@ -2180,10 +2209,10 @@ T2A and UTF-8 encodings.")
(package
(inherit (texlive-hyphen-package
"texlive-hyphen-sanskrit" "sa"
- (list "/doc/generic/hyph-utf8/sa/hyphenmin.txt"
+ (list "/doc/generic/hyph-utf8/languages/sa/hyphenmin.txt"
"/tex/generic/hyph-utf8/patterns/tex/hyph-sa.tex")
(base32
- "0gi2qk0wf388h9n25gzhv0cdz67ph83wal8h3iz2sqnpdjsw8kpc")))
+ "1bkzj8swj4lbswf1vr4pb1jg6dixzs7p8h8zm8s8as52h442aida")))
(synopsis "Sanskrit hyphenation patterns")
(description "This package provides hyphenation patterns for Sanskrit and
Prakrit in longdesc transliteration, and in Devanagari, Bengali, Kannada,
@@ -2241,7 +2270,7 @@ T1/EC and UTF-8 encodings.")
"texlive-hyphen-spanish" "es"
(list "/tex/generic/hyph-utf8/patterns/tex/hyph-es.tex")
(base32
- "1h3yg9vcq0lf7hxv0ahkqmyg269dxjs8m2mz8sgz5l1fxmvahvaj")))
+ "05lbvjkj304xxghyihk8js0kmg97ddlgijld3bp81bc28h4cav0v")))
(synopsis "Hyphenation patterns for Spanish")
(description "The package provides hyphenation patterns for Spanish in
T1/EC and UTF-8 encodings.")
@@ -2361,7 +2390,7 @@ T1/EC and UTF-8 encodings.")
"/doc/generic/hyph-utf8/img/miktex-languages.png"
"/doc/generic/hyph-utf8/img/texlive-collection.png")
(base32
- "1bar5mc808ch20anhqrdxcwiych359qsvr7mggxpg2l2kq5xdyq0")))
+ "0rgp0zn36gwzqwpmjb9h01ns3m19v3r7lpw1h0pc9bx115w6c9jx")))
(outputs '("out" "doc"))
(build-system gnu-build-system)
(arguments
@@ -2397,7 +2426,7 @@ T1/EC and UTF-8 encodings.")
(setenv "TFMFONTS"
(string-append (assoc-ref inputs "texlive-cm")
"/share/texmf-dist/fonts/tfm/public/cm:"
- (assoc-ref inputs "texlive-fonts-knuth-lib")
+ (assoc-ref inputs "texlive-knuth-lib")
"/share/texmf-dist/fonts/tfm/public/knuth-lib"))
;; ...and find all tex files in this environment.
(setenv "TEXINPUTS"
@@ -2451,7 +2480,7 @@ T1/EC and UTF-8 encodings.")
;; for a working "tex".
("texlive-tex-plain" ,texlive-tex-plain)
("texlive-cm" ,texlive-cm)
- ("texlive-fonts-knuth-lib" ,texlive-fonts-knuth-lib)
+ ("texlive-knuth-lib" ,texlive-knuth-lib)
("texlive-hyphen-base" ,texlive-hyphen-base)))
(home-page "https://ctan.org/pkg/hyph-utf8")
(synopsis "Hyphenation patterns expressed in UTF-8")
@@ -2484,8 +2513,7 @@ converters, will completely supplant the older patterns.")
license:public-domain
license:wtfpl2))))
-(define-public texlive-generic-hyph-utf8
- (deprecated-package "texlive-generic-hyph-utf8" texlive-hyph-utf8))
+(define-deprecated-package texlive-generic-hyph-utf8 texlive-hyph-utf8)
(define-public texlive-dehyph-exptl
(package
@@ -2494,7 +2522,7 @@ converters, will completely supplant the older patterns.")
(list "/tex/generic/dehyph-exptl/"
"/doc/generic/dehyph-exptl/")
(base32
- "1fnqc63gz8gvdyfz45bx8dxn1r1rwrypahs3bqd2vlc8ff76xp86")
+ "0l57a0r4gycp94kz6lrxqvh9m57j2shmbr2laf5zjb0qnrisq46d")
#:trivial? #t))
(propagated-inputs
`(("texlive-hyphen-base" ,texlive-hyphen-base)
@@ -2509,8 +2537,7 @@ bundle.")
;; under LPPL.
(license (list license:expat license:lppl))))
-(define-public texlive-generic-dehyph-exptl
- (deprecated-package "texlive-generic-dehyph-exptl" texlive-dehyph-exptl))
+(define-deprecated-package texlive-generic-dehyph-exptl texlive-dehyph-exptl)
(define-public texlive-ukrhyph
(package
@@ -2601,7 +2628,7 @@ UCY (Omega Unicode Cyrillic), LCY, LWN (OT2), and koi8-r.")
"/web2c/tcvn-t5.tcx"
"/web2c/viscii-t5.tcx")
(base32
- "191i8n3g46p53bb9dkx2ggwpzy7skgg0pbklsrpx8x4ayd86wcaf")
+ "00q2nny7lw7jxyln6ch4h0alygbrzk8yynliyc291m53kds1h0mr")
#:trivial? #t))
(home-page "https://www.tug.org/texlive/")
(synopsis "Files related to the path searching library for TeX")
@@ -2617,7 +2644,7 @@ mechanism. This package provides supporting files.")
"texlive-latexconfig"
(list "/tex/latex/latexconfig/")
(base32
- "1wa7yhdpnz1nyidwgli68fyr33jn951bnniqrih5lj98k09rqc3h")
+ "10ynmd8b9b9l1wl1mva23yz4zir53p6r5z31s39wmxz19pj12qvx")
#:trivial? #t))
(home-page "https://www.tug.org/")
(synopsis "Configuration files for LaTeX-related formats")
@@ -2643,7 +2670,7 @@ formats.")
"/tex/latex/base/testpage.tex"
"/tex/latex/base/texsys.cfg")
(base32
- "0m0gjb4hbsf2iqkkx3px4f28r2scjvsjv4zb2whkbnb44apyw1f0")
+ "0msyjz0937rc7hs77v6la152sdiwd73qj41z1mlyh0m3dns9qz4g")
#:trivial? #t)))
(package
(inherit template)
@@ -2677,7 +2704,7 @@ formats.")
'(("texlive-etex" . "/etex")
("texlive-cm" . "/cm")
("texlive-fonts-latex" . "/latex-fonts")
- ("texlive-fonts-knuth-lib" . "/knuth-lib")))
+ ("texlive-knuth-lib" . "/knuth-lib")))
":"))
(let ((cwd (getcwd)))
(setenv "TEXINPUTS"
@@ -2687,7 +2714,8 @@ formats.")
cwd "/build:"
(string-join
(map (match-lambda ((_ . dir) dir)) inputs)
- "//:"))))
+ "//:")))
+ (setenv "LUAINPUTS" (string-append cwd "/build:")))
;; This is the actual build step.
(mkdir "build")
@@ -2704,12 +2732,13 @@ formats.")
(let ((disabled-formats
'("aleph aleph" "lamed aleph" "uptex uptex" "euptex euptex"
"eptex eptex" "ptex ptex" "pdfxmltex pdftex" "platex eptex"
+ "platex-dev eptex" "uplatex-dev euptex"
"csplain pdftex" "mf mf-nowin" "mex pdftex" "pdfmex pdftex"
- "luacsplain luatex"
- ,@(if (string-prefix? "powerpc64le"
- (or (%current-target-system)
- (%current-system)))
- '("luajittex") '())
+ "luacsplain luatex" "optex luatex"
+ ;; LuaJIT is not ported to powerpc64le* yet and
+ ;; building these fail on powerpc.
+ ,@(if (target-powerpc?)
+ '("luajittex" "luajithbtex" "mfluajit") '())
"cont-en xetex" "cont-en pdftex" "pdfcsplain xetex"
"pdfcsplain pdftex" "pdfcsplain luatex" "cslatex pdftex"
"mptopdf pdftex" "uplatex euptex" "jadetex pdftex"
@@ -2724,7 +2753,10 @@ formats.")
(make-file-writable "web2c/fmtutil.cnf")
(substitute* "web2c/fmtutil.cnf"
(((string-append "^(" (string-join disabled-formats "|") ")") m)
- (string-append "#! " m))))
+ (string-append "#! " m))
+ (("translate-file=cp227")
+ (format #f "translate-file=~a/share/texmf-dist/web2c/cp227"
+ (assoc-ref inputs "texlive-kpathsea")))))
(invoke "fmtutil-sys" "--all"
"--fmtdir=web2c"
(string-append "--cnffile=web2c/fmtutil.cnf"))
@@ -2760,7 +2792,7 @@ formats.")
("texlive-kpathsea" ,texlive-kpathsea)
("texlive-cm" ,texlive-cm)
("texlive-fonts-latex" ,texlive-fonts-latex)
- ("texlive-fonts-knuth-lib" ,texlive-fonts-knuth-lib)
+ ("texlive-knuth-lib" ,texlive-knuth-lib)
("texlive-luatexconfig"
,(texlive-origin
"texlive-luatexconfig" (number->string %texlive-revision)
@@ -2768,7 +2800,7 @@ formats.")
"/tex/generic/config/luatexiniconfig.tex"
"/web2c/texmfcnf.lua")
(base32
- "1gi87wy12r8w8fhx9ajcid382dmqzf6b9070b5nndvbbjrvhwf23")))))
+ "0yjx7nw9mgfgnq1givkzbxh7z7ncw1liaddjgm7n2nwn0aw6xfdg")))))
(propagated-inputs
`(("texlive-dehyph-exptl" ,texlive-dehyph-exptl)
("texlive-etex" ,texlive-etex)
@@ -2793,6 +2825,7 @@ formats.")
("texlive-hyphen-estonian" ,texlive-hyphen-estonian)
("texlive-hyphen-ethiopic" ,texlive-hyphen-ethiopic)
("texlive-hyphen-finnish" ,texlive-hyphen-finnish)
+ ("texlive-hyphen-schoolfinnish" ,texlive-hyphen-schoolfinnish)
("texlive-hyphen-french" ,texlive-hyphen-french)
("texlive-hyphen-friulan" ,texlive-hyphen-friulan)
("texlive-hyphen-galician" ,texlive-hyphen-galician)
@@ -2810,6 +2843,7 @@ formats.")
("texlive-hyphen-latin" ,texlive-hyphen-latin)
("texlive-hyphen-latvian" ,texlive-hyphen-latvian)
("texlive-hyphen-lithuanian" ,texlive-hyphen-lithuanian)
+ ("texlive-hyphen-macedonian" ,texlive-hyphen-macedonian)
("texlive-hyphen-mongolian" ,texlive-hyphen-mongolian)
("texlive-hyphen-norwegian" ,texlive-hyphen-norwegian)
("texlive-hyphen-occitan" ,texlive-hyphen-occitan)
@@ -2835,6 +2869,12 @@ formats.")
("texlive-unicode-data" ,texlive-unicode-data)
("texlive-ukrhyph" ,texlive-ukrhyph)
("texlive-ruhyphen" ,texlive-ruhyphen)
+ ("texlive-latex-l3kernel" ,texlive-latex-l3kernel)
+ ("texlive-latex-l3backend" ,texlive-latex-l3backend)
+ ;; TODO: This dependency isn't needed for LaTeX version 2021-06-01
+ ;; and later. See:
+ ;; https://tug.org/pipermail/tex-live/2021-June/047180.html
+ ("texlive-latex-l3packages" ,texlive-latex-l3packages)
("texlive-latexconfig" ,texlive-latexconfig)))
(home-page "https://www.ctan.org/pkg/latex-base")
(synopsis "Base sources of LaTeX")
@@ -2845,6 +2885,60 @@ with the required packages, constitutes what every LaTeX distribution should
contain.")
(license license:lppl1.3c+))))
+(define-public texlive-latex-atveryend
+ (package
+ (inherit (simple-texlive-package
+ "texlive-latex-atveryend"
+ '("/doc/latex/atveryend/README.md"
+ "/tex/latex/atveryend/")
+ (base32
+ "1gz5ssxjlqa53a8blsmdk2qjahzc910ldh26xjxfxgqnqb03rqx7")
+ #:trivial? #t))
+ (home-page "https://www.ctan.org/pkg/atveryend")
+ (synopsis "Hooks at the very end of a document")
+ (description
+ "This LaTeX packages provides two hooks for @code{\\end@{document@}}
+that are executed after the hook of @code{\\AtEndDocument}:
+@code{\\AfterLastShipout} can be used for code that is to be executed right
+after the last @code{\\clearpage} before the @file{.aux} file is closed.
+@code{\\AtVeryEndDocument} is used for code after closing and final reading
+of the @file{.aux} file.")
+ (license license:lppl1.3c+)))
+
+(define-public texlive-latex-auxhook
+ (package
+ (inherit (simple-texlive-package
+ "texlive-latex-auxhook"
+ '("/doc/latex/auxhook/README.md"
+ "/tex/latex/auxhook/")
+ (base32
+ "1xh445shr00rh43nnz03xh8k2mdrxgsr03lllqpgvwhm6yzsydkf")
+ #:trivial? #t))
+ (home-page "https://www.ctan.org/pkg/auxhook")
+ (synopsis "Hooks for auxiliary files")
+ (description
+ "This package provides hooks for adding code at the beginning of
+@file{.aux} files.")
+ (license license:lppl1.3c+)))
+
+(define-public texlive-latex-epstopdf-pkg
+ (package
+ (inherit (simple-texlive-package
+ "texlive-latex-epstopdf-pkg"
+ '("/doc/latex/epstopdf-pkg/"
+ "/tex/latex/epstopdf-pkg/")
+ (base32
+ "0zl6jiyp2cvvyqx3lwxdkcvvnkqgbwj4issq07cagf61gljq6fns")
+ #:trivial? #t))
+ (home-page "https://www.ctan.org/pkg/epstopdf-pkg")
+ (synopsis "Call @command{epstopdf} \"on the fly\"")
+ (description
+ "The package adds support for EPS files in the @code{graphicx} package
+when running under pdfTeX. If an EPS graphic is detected, the package
+spawns a process to convert the EPS to PDF, using the script
+@command{epstopdf}.")
+ (license license:lppl1.3c+)))
+
(define-public texlive-latex-filecontents
(package
(name "texlive-latex-filecontents")
@@ -2855,7 +2949,7 @@ contain.")
(file-name (string-append name "-" version "-checkout"))
(sha256
(base32
- "1h78zw0vhldx478zs4v86ajg7vpkysd1kg3npc480qqls3q6ba40"))))
+ "1cmfigg5jx3hmdyh4gv8kwxi7dg076ldkxmr46s05xvhzjig1z9x"))))
(build-system texlive-build-system)
(arguments '(#:tex-directory "latex/filecontents"))
(home-page "https://www.ctan.org/pkg/filecontents")
@@ -2870,31 +2964,6 @@ overwrite existing files and letting you use @code{filecontents} /
@code{filecontents*} anywhere.")
(license license:lppl1.3c+)))
-(define-public texlive-generic-ifxetex
- (package
- (name "texlive-generic-ifxetex")
- (version (number->string %texlive-revision))
- (source (origin
- (method svn-fetch)
- (uri (texlive-ref "generic" "ifxetex"))
- (file-name (string-append name "-" version "-checkout"))
- (sha256
- (base32
- "0w2xj7n0szavj329kds09q626szkc378p3w0sk022q0ln4ksz86d"))))
- (build-system texlive-build-system)
- (arguments
- '(#:tex-directory "generic/ifxetex"
- #:tex-format "xelatex"))
- (inputs
- `(("texlive-latex-filecontents" ,texlive-latex-filecontents)))
- (home-page "https://www.ctan.org/pkg/ifxetex")
- (synopsis "Am I running under XeTeX?")
- (description
- "This is a simple package which provides an @code{\\ifxetex} conditional,
-so that other code can determine that it is running under XeTeX. The package
-requires the e-TeX extensions to the TeX primitive set.")
- (license license:lppl1.3c+)))
-
(define-public texlive-epsf
(package
(inherit (simple-texlive-package
@@ -2915,8 +2984,7 @@ bundle of packages. (The latex-graphics bundle is also available to Plain TeX
users, via its Plain TeX version.)")
(license license:public-domain)))
-(define-public texlive-generic-epsf
- (deprecated-package "texlive-generic-epsf" texlive-epsf))
+(define-deprecated-package texlive-generic-epsf texlive-epsf)
(define-public texlive-latex-fancyvrb
(package
@@ -2925,7 +2993,7 @@ users, via its Plain TeX version.)")
(list "/doc/latex/fancyvrb/README"
"/tex/latex/fancyvrb/")
(base32
- "1dwkcradz9nwpjwmv1sjzn77lvw25ypr0rrgmf1kd8pd2mw7dxcn")
+ "0pdilgpw4zc0ipp4z9kdi61nymifyjy2mfpk74xk2cw9vhynkk3w")
#:trivial? #t))
(home-page "https://www.ctan.org/pkg/fancyvrb")
(synopsis "Sophisticated verbatim text")
@@ -2945,8 +3013,10 @@ verbatim source).")
(list "/doc/latex/graphics-def/README.md"
"/tex/latex/graphics-def/")
(base32
- "0zrbn9cwfnnrrl3b2zsd74ldksp9jwpvjh7z93ild1m75crpb39a")
+ "0b66fy06safyrd717rfr476g1gz6nqfv1vqvam7ac2yy0g0djb17")
#:trivial? #t))
+ (propagated-inputs
+ `(("texlive-latex-epstopdf-pkg" ,texlive-latex-epstopdf-pkg)))
(home-page "https://www.ctan.org/pkg/latex-graphics")
(synopsis "Color and graphics option files")
(description
@@ -2982,7 +3052,7 @@ set default \"driver\" options for the color and graphics packages.")
(file-name (string-append name "-" version "-checkout"))
(sha256
(base32
- "0nlfhn55ax89rcvpkrl9570671b62kcr4c9l5ch3w5zw9vmi00dz"))))
+ "0fgjl58f25zvagssz4dwmmsclzw8cr7mx00kdrbx2kcnamcb7h8d"))))
(build-system texlive-build-system)
(arguments '(#:tex-directory "latex/graphics"))
(propagated-inputs
@@ -2997,6 +3067,22 @@ documents. It comprises the packages color, graphics, graphicx, trig, epsfig,
keyval, and lscape.")
(license license:lppl1.3c+)))
+(define-public texlive-latex-hycolor
+ (package
+ (inherit (simple-texlive-package
+ "texlive-latex-hycolor"
+ (list "/doc/latex/hycolor/README.md"
+ "/tex/latex/hycolor/")
+ (base32
+ "026lfb4l7b3q8g6zc68siqandhb1x98cbycn7njknqva6s99aiqn")
+ #:trivial? #t))
+ (home-page "https://www.ctan.org/pkg/latex-graphics")
+ (synopsis "Color for hyperref and bookmark")
+ (description
+ "This package provides the code for the @code{color} option that is
+used by @code{hyperref} and @code{bookmark}.")
+ (license license:lppl1.3c+)))
+
(define-public texlive-xcolor
(let ((template (simple-texlive-package
"texlive-xcolor"
@@ -3034,32 +3120,122 @@ row colors plus repeated non-aligned material (like horizontal lines) in
tables.")
(license license:lppl1.2+))))
-(define-public texlive-latex-xcolor
- (deprecated-package "texlive-latex-xcolor" texlive-xcolor))
+(define-deprecated-package texlive-latex-xcolor texlive-xcolor)
-(define-public texlive-latex-hyperref
- (package
- (name "texlive-latex-hyperref")
- (version "6.84a2")
- ;; The sources in the TeX Live SVN repository do not contain hluatex.dtx,
- ;; so we fetch the release from GitHub.
- (source (origin
- (method url-fetch)
- (uri (string-append "https://github.com/ho-tex/hyperref/"
- "archive/release-" version ".tar.gz"))
- (file-name (string-append name "-" version ".tar.gz"))
- (sha256
- (base32
- "1d3rmjgzh0025a1dza55zb6nzzlgd1y9snwx45wq1c1vf42m79h2"))))
- (build-system texlive-build-system)
- (arguments '(#:tex-directory "latex/hyperref"))
- (propagated-inputs
- `(("texlive-latex-oberdiek" ,texlive-latex-oberdiek) ; for ltxcmds.sty
- ("texlive-latex-url" ,texlive-latex-url)))
- (home-page "https://www.ctan.org/pkg/hyperref")
- (synopsis "Extensive support for hypertext in LaTeX")
- (description
- "The @code{hyperref} package is used to handle cross-referencing commands
+(define-public texlive-xmltex
+ (let ((template (simple-texlive-package
+ "texlive-xmltex"
+ (list
+ "/doc/otherformats/xmltex/"
+ "/tex/xmltex/")
+ (base32
+ "023gv9axq05vwqz50fnkig24dzahwlc4raks2s8xc4pzrv2dv1zy"))))
+ (package
+ (inherit template)
+ (arguments
+ (substitute-keyword-arguments (package-arguments template)
+ ((#:tex-directory _ #t)
+ "tex/xmltex/base")
+ ((#:phases phases '%standard-phases)
+ `(modify-phases ,phases
+ (add-before 'install 'generate-formats
+ (lambda* (#:key inputs #:allow-other-keys)
+ (mkdir "web2c")
+ (for-each (lambda (f)
+ (copy-file f (basename f)))
+ (find-files "tex" "\\.(ini|tex)$"))
+ (invoke "fmtutil-sys" "--byfmt" "xmltex"
+ "--fmtdir=web2c")
+ (invoke "fmtutil-sys" "--byfmt" "pdfxmltex"
+ "--fmtdir=web2c")))
+ (add-after 'install 'install-formats-and-wrappers
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (texlive-bin (assoc-ref inputs "texlive-bin"))
+ (pdftex (string-append texlive-bin "/bin/pdftex"))
+ (web2c (string-append out "/share/texmf-dist/web2c")))
+ (mkdir-p web2c)
+ (copy-recursively "web2c" web2c)
+ ;; Create convenience command wrappers.
+ (mkdir-p (string-append out "/bin"))
+ (symlink pdftex (string-append out "/bin/xmltex"))
+ (symlink pdftex (string-append out "/bin/pdfxmltex"))
+ #t)))))))
+ (propagated-inputs
+ ;; The following fonts are propagated as a texlive-updmap.cfg as the font
+ ;; maps need to be recreated for the fonts to be usable. They are
+ ;; required by xmltex through mlnames.sty and unicode.sty.
+ `(("texlive" ,(texlive-updmap.cfg
+ (list
+ texlive-amsfonts
+ texlive-babel
+ texlive-courier
+ texlive-helvetic
+ texlive-hyperref
+ texlive-symbol
+ texlive-tipa
+ texlive-times
+ texlive-zapfding
+ ;; The following fonts, while not required, are used if
+ ;; available:
+ texlive-stmaryrd
+ texlive-wasy)))))
+ (native-inputs
+ `(("texlive-tex-ini-files" ,texlive-tex-ini-files)))
+ (home-page "https://www.ctan.org/pkg/xmltex/")
+ (synopsis "Support for parsing XML documents")
+ (description "The package provides an implementation of a parser for
+documents matching the XML 1.0 and XML Namespace Recommendations. Element and
+attribute names, as well as character data, may use any characters allowed in
+XML, using UTF-8 or a suitable 8-bit encoding.")
+ (license license:lppl1.0+)))) ;per xmltex/base/readme.txt
+
+(define-public texlive-hyperref
+ (let ((template (simple-texlive-package
+ "texlive-hyperref"
+ (list "/doc/latex/hyperref/"
+ "/source/latex/hyperref/"
+ ;; These files are not generated from the sources
+ "/tex/latex/hyperref/minitoc-hyper.sty"
+ "/tex/latex/hyperref/ntheorem-hyper.sty"
+ "/tex/latex/hyperref/xr-hyper.sty")
+ (base32
+ "0nmbxaq676m2y9fgdji0bxqchmrli4hwhspijaszx51b3ki6bj2h"))))
+ (package
+ (inherit template)
+ (arguments
+ (substitute-keyword-arguments (package-arguments template)
+ ((#:tex-directory _ #t)
+ "latex/hyperref")
+ ((#:phases phases)
+ `(modify-phases ,phases
+ (add-after 'unpack 'chdir
+ (lambda _ (chdir "source/latex/hyperref") #t))))))
+ (propagated-inputs
+ `(("texlive-generic-atbegshi" ,texlive-generic-atbegshi)
+ ("texlive-generic-bitset" ,texlive-generic-bitset)
+ ("texlive-generic-etexcmds" ,texlive-generic-etexcmds)
+ ("texlive-generic-gettitlestring" ,texlive-generic-gettitlestring)
+ ("texlive-generic-iftex" ,texlive-generic-iftex)
+ ("texlive-generic-infwarerr" ,texlive-generic-infwarerr)
+ ("texlive-generic-intcalc" ,texlive-generic-intcalc)
+ ("texlive-generic-kvdefinekeys" ,texlive-generic-kvdefinekeys)
+ ("texlive-generic-kvsetkeys" ,texlive-generic-kvsetkeys)
+ ("texlive-generic-ltxcmds" ,texlive-generic-ltxcmds)
+ ("texlive-generic-pdfescape" ,texlive-generic-pdfescape)
+ ("texlive-latex-auxhook" ,texlive-latex-auxhook)
+ ("texlive-latex-atveryend" ,texlive-latex-atveryend)
+ ("texlive-latex-hycolor" ,texlive-latex-hycolor)
+ ("texlive-latex-kvoptions" ,texlive-latex-kvoptions)
+ ("texlive-latex-letltxmacro" ,texlive-latex-letltxmacro)
+ ("texlive-latex-pdftexcmds" ,texlive-latex-pdftexcmds)
+ ("texlive-latex-refcount" ,texlive-latex-refcount)
+ ("texlive-latex-rerunfilecheck" ,texlive-latex-rerunfilecheck)
+ ("texlive-url" ,texlive-url)))
+ (home-page "https://www.ctan.org/pkg/hyperref")
+ (synopsis "Extensive support for hypertext in LaTeX")
+ (description
+ "The @code{hyperref} package is used to handle cross-referencing commands
in LaTeX to produce hypertext links in the document. The package provides
backends for the @code{\\special} set defined for HyperTeX DVI processors; for
embedded @code{pdfmark} commands for processing by Acrobat
@@ -3067,11 +3243,13 @@ Distiller (@code{dvips} and Y&Y's @code{dvipsone}); for Y&Y's @code{dviwindo};
for PDF control within pdfTeX and @code{dvipdfm}; for TeX4ht; and for VTeX's
pdf and HTML backends. The package is distributed with the @code{backref} and
@code{nameref} packages, which make use of the facilities of @code{hyperref}.")
- (license license:lppl1.3+)))
+ (license license:lppl1.3+))))
-(define-public texlive-latex-oberdiek
+(define-deprecated-package texlive-latex-hyperref texlive-hyperref)
+
+(define-public texlive-oberdiek
(package
- (name "texlive-latex-oberdiek")
+ (name "texlive-oberdiek")
(version (number->string %texlive-revision))
(source (origin
(method svn-fetch)
@@ -3079,7 +3257,7 @@ pdf and HTML backends. The package is distributed with the @code{backref} and
(file-name (string-append name "-" version "-checkout"))
(sha256
(base32
- "0pi2d6gsddcs9wprdbar46s91kdc5fxl1m79g7xrbccsx8s9xbml"))))
+ "1cadrkpdqs65gxsaszfgfd8wqp8pvpik2sjmlyq3hz5p9yna3p9m"))))
(build-system texlive-build-system)
(arguments
'(#:tex-directory "latex/oberdiek"
@@ -3093,7 +3271,7 @@ pdf and HTML backends. The package is distributed with the @code{backref} and
(("ifpdf.ins") "ifpdf.dtx"))
#t)))))
(propagated-inputs
- `(("texlive-generic-ifxetex" ,texlive-generic-ifxetex)))
+ `(("texlive-generic-iftex" ,texlive-generic-iftex)))
(home-page "https://www.ctan.org/pkg/oberdiek")
(synopsis "Bundle of packages submitted by Heiko Oberdiek")
(description
@@ -3102,6 +3280,30 @@ better accessibility support for PDF files; extensible chemists reaction
arrows; record information about document class(es) used; and many more.")
(license license:lppl1.3+)))
+(define-deprecated-package texlive-latex-oberdiek texlive-oberdiek)
+
+(define-public texlive-latex-rerunfilecheck
+ (package
+ (inherit (simple-texlive-package
+ "texlive-latex-rerunfilecheck"
+ '("/doc/latex/rerunfilecheck/"
+ "/tex/latex/rerunfilecheck/")
+ (base32
+ "1myz0d5bxhxvl4220ikywh921qld8n324kk9kscqbc5iw4063g56")
+ #:trivial? #t))
+ (propagated-inputs
+ `(("texlive-generic-infwarerr" ,texlive-generic-infwarerr)
+ ("texlive-generic-uniquecounter" ,texlive-generic-uniquecounter)
+ ("texlive-latex-atveryend" ,texlive-latex-atveryend)
+ ("texlive-latex-kvoptions" ,texlive-latex-kvoptions)
+ ("texlive-latex-pdftexcmds" ,texlive-latex-pdftexcmds)))
+ (home-page "https://www.ctan.org/pkg/rerunfilecheck")
+ (synopsis "Checksum based rerun checks on auxiliary files")
+ (description
+ "This package provides additional rerun warnings if some auxiliary
+files have changed. It is based on MD5 checksum, provided by pdfTeX.")
+ (license license:lppl1.3c+)))
+
(define-public texlive-latex-tools
(package
(name "texlive-latex-tools")
@@ -3112,11 +3314,23 @@ arrows; record information about document class(es) used; and many more.")
(file-name (string-append name "-" version "-checkout"))
(sha256
(base32
- "1wqvn4z0s92h5iqzrvxw7hinzp95avjk9v8lnqbqr4kz6nv4xb9l"))))
+ "1vm5wfyd0vbmv31a29fc7k8y14xiw00msvdx9n7dzsn9zpfjflqs"))))
(build-system texlive-build-system)
(arguments
'(#:tex-directory "latex/tools"
- #:build-targets '("tools.ins")))
+ #:build-targets '("tools.ins")
+ #:phases (modify-phases %standard-phases
+ (add-after 'install 'provide-array-2016-10-06.sty
+ (lambda* (#:key outputs #:allow-other-keys)
+ ;; XXX: array.sty does:
+ ;; "DeclareRelease{}{2016-10-06}{array-2016-10-06.sty}"
+ ;; ...which causes some users (hypre) to look for that
+ ;; file specifically. Provide it.
+ (with-directory-excursion (string-append
+ (assoc-ref outputs "out")
+ "/share/texmf-dist/tex"
+ "/latex/tools")
+ (symlink "array.sty" "array-2016-10-06.sty")))))))
(home-page "https://www.ctan.org/pkg/latex-tools")
(synopsis "LaTeX standard tools bundle")
(description
@@ -3151,8 +3365,7 @@ of file names.")
;; the latest version is 1.3c.
(license license:lppl1.3c+)))
-(define-public texlive-latex-url
- (deprecated-package "texlive-latex-url" texlive-url))
+(define-deprecated-package texlive-latex-url texlive-url)
(define-public texlive-tetex
(package
@@ -3181,10 +3394,15 @@ Live distribution.")
(file-name (string-append name "-" version "-checkout"))
(sha256
(base32
- "0s77z2cbv841l45qrpf0s8qhzfa4wi689lg7zkw88qg18nzvy0ly"))))
+ "068xkinrkl6qjf8r6a9i0msvnzp4y7a3gnd2h12ws0km1dv19r20"))))
(build-system texlive-build-system)
(arguments
- '(#:tex-directory "latex/l3kernel"))
+ '(#:tex-directory "latex/l3kernel"
+ #:tex-engine "tex"
+ #:tex-format #f
+ #:texlive-latex-base #f))
+ (native-inputs
+ `(("texlive-docstrip" ,texlive-docstrip)))
(home-page "https://www.ctan.org/pkg/l3kernel")
(synopsis "LaTeX3 programmers’ interface")
(description
@@ -3195,20 +3413,59 @@ code are built: it is an API for TeX programmers. The packages are set up so
that the LaTeX3 conventions can be used with regular LaTeX 2e packages.")
(license license:lppl1.3c+)))
-(define-public texlive-latex-l3packages
+(define-public texlive-latex-l3backend
(package
- (name "texlive-latex-l3packages")
+ (name "texlive-latex-l3backend")
(version (number->string %texlive-revision))
(source (origin
(method svn-fetch)
- (uri (texlive-ref "latex" "l3packages"))
+ (uri (texlive-ref "latex" "l3backend"))
(file-name (string-append name "-" version "-checkout"))
(sha256
(base32
- "1cv4fk9pabh7mkxhfsdmh4k8xpmzg1psgcsvd11c869m7n3a629h"))))
+ "0mlwyzssqn6wkyv9hzp24d40p8f20zrjqgvqyqs1rd7q7awan42a"))))
+ (build-system texlive-build-system)
+ (arguments
+ '(#:tex-directory "latex/l3backend"
+ #:tex-engine "tex"
+ #:tex-format #f
+ #:texlive-latex-base #f))
+ (native-inputs
+ `(("texlive-docstrip" ,texlive-docstrip)))
+ (home-page "https://www.ctan.org/pkg/l3backend")
+ (synopsis "LaTeX3 backend drivers")
+ (description
+ "This package forms parts of expl3, and contains the code used to
+interface with backends (drivers) across the expl3 codebase. The functions
+here are defined differently depending on the engine in use. As such, these
+are distributed separately from l3kernel to allow this code to be updated on
+an independent schedule.")
+ (license license:lppl1.3c+)))
+
+(define-public texlive-latex-l3packages
+ (package
+ (name "texlive-latex-l3packages")
+ (version (number->string %texlive-revision))
+ (source (texlive-origin name version
+ '("/source/latex/l3packages/"
+ ;; These files have been generated with a
+ ;; bespoke source tree and then modified by
+ ;; hand. It's unfeasible to recreate them. See:
+ ;; https://tug.org/pipermail/tex-live/2021-June/047188.html
+ "/tex/latex/l3packages/xparse/xparse-2018-04-12.sty"
+ "/tex/latex/l3packages/xparse/xparse-2020-10-01.sty"
+
+ ;; TODO: This file can be removed when using
+ ;; LaTeX version 2021-06-01 or newer. See:
+ ;; https://tug.org/pipermail/tex-live/2021-June/047180.html
+ "/tex/latex/l3packages/xparse/xparse-generic.tex")
+ (base32 "05rjxdqhhg7z1z2rmhmwj2qf09xygymayy3jzj9fdphk0pab3amm")))
(build-system texlive-build-system)
(arguments
'(#:tex-directory "latex/l3packages"
+ #:tex-engine "tex"
+ #:tex-format #f
+ #:texlive-latex-base #f
;; build-targets must be specified manually since they are in
;; sub-directories.
#:build-targets '("l3keys2e.ins" "xparse.ins" "xfrac.ins" "xfp.ins" "xtemplate.ins")
@@ -3220,16 +3477,23 @@ that the LaTeX3 conventions can be used with regular LaTeX 2e packages.")
(lambda _
(let ((cwd (getcwd)))
(setenv "TEXINPUTS"
- (string-append cwd "/l3keys2e:"
- cwd "/xparse:"
- cwd "/xfrac:"
- cwd "/xfp:"
- cwd "/xtemplate"
+ (string-append cwd "/source/latex/l3packages/l3keys2e:"
+ cwd "/source/latex/l3packages/xparse:"
+ cwd "/source/latex/l3packages/xfrac:"
+ cwd "/source/latex/l3packages/xfp:"
+ cwd "/source/latex/l3packages/xtemplate"
;; The terminating ":" is required to include the
;; l3kernel input as well.
":")))
- #t)))
+ #t))
+ (add-after 'install 'copy-generated-files
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let ((dest (string-append (assoc-ref outputs "out")
+ "/share/texmf-dist/tex/latex/l3packages")))
+ (copy-recursively "tex/latex/l3packages/xparse" dest)))))
))
+ (native-inputs
+ `(("texlive-docstrip" ,texlive-docstrip)))
(propagated-inputs
`(("texlive-latex-l3kernel" ,texlive-latex-l3kernel)))
(home-page "https://www.ctan.org/pkg/l3packages")
@@ -3250,58 +3514,167 @@ programming tools and kernel support. Packages provided in this release are:
@end enumerate\n")
(license license:lppl1.3c+)))
-(define-public texlive-latex-fontspec
+(define-public texlive-dvips-l3backend
(package
- (name "texlive-latex-fontspec")
- (version (number->string %texlive-revision))
- (source (origin
- (method svn-fetch)
- (uri (texlive-ref "latex" "fontspec"))
- (file-name (string-append name "-" version "-checkout"))
- (sha256
- (base32
- "1223cw029n6zff7pqpwbsq1x8v3w63smczkmnybqxkw5h2za8gbz"))))
- (build-system texlive-build-system)
- (arguments
- '(#:tex-directory "latex/fontspec"
- #:phases
- (modify-phases %standard-phases
- (add-after 'install 'install-default-fontspec.cfg
- (lambda* (#:key outputs #:allow-other-keys)
- (with-output-to-file
- (string-append (assoc-ref outputs "out")
- "/share/texmf-dist/tex/latex/fontspec/fontspec.cfg")
- (lambda _
- (display "\
-%%% FONTSPEC.CFG %%%
-%
-% This configuration file sets up TeX Ligatures by default for all fonts loaded
-% with `\\setmainfont` and `\\setsansfont`.
-%
-% In addition, `\\setmonofont` has default features to enforce \"monospace\"
-% settings with regard to space stretchability and shrinkability.
-
-\\defaultfontfeatures
- [\\rmfamily,\\sffamily]
- {Ligatures=TeX}
-
-\\defaultfontfeatures
- [\\ttfamily]
- {WordSpace={1,0,0},
- HyphenChar=None,
- PunctuationSpace=WordSpace}
-")))
- #t)))))
- (propagated-inputs
- `(("texlive-latex-l3packages" ,texlive-latex-l3packages)))
- (home-page "https://www.ctan.org/pkg/fontspec")
- (synopsis "Advanced font selection in XeLaTeX and LuaLaTeX")
+ (inherit (simple-texlive-package
+ "texlive-dvips-l3backend"
+ (list
+ "/dvips/l3backend/")
+ (base32
+ "1hvj153h1pn93h6n76dv3mg9ai0mcz9q9mysfiqjfpqzijz9ikky")
+ #:trivial? #t))
+ (home-page "https://www.ctan.org/pkg/l3backend")
+ (synopsis "LaTeX3 backend drivers for dvips")
(description
- "Fontspec is a package for XeLaTeX and LuaLaTeX. It provides an
+ "This package forms parts of expl3, and contains the code used to
+interface with backends (drivers) across the expl3 codebase. The functions
+here are defined for the dvips engine only.")
+ (license license:lppl1.3c+)))
+
+(define-public texlive-fontspec
+ (let ((template (simple-texlive-package
+ "texlive-fontspec"
+ (list "/doc/latex/fontspec/"
+ "/source/latex/fontspec/"
+ "/tex/latex/fontspec/fontspec.cfg")
+ (base32
+ "06rms8dw1j67v3rgv6xmfykdmgbxi5rp78yxc782cy1sw07blgsg"))))
+ (package
+ (inherit template)
+ (arguments
+ (substitute-keyword-arguments (package-arguments template)
+ ((#:tex-directory _ #t)
+ "latex/fontspec")
+ ((#:phases phases)
+ `(modify-phases ,phases
+ (add-after 'unpack 'chdir
+ (lambda _ (chdir "source/latex/fontspec/") #t))))))
+ (propagated-inputs
+ `(("texlive-latex-l3packages" ,texlive-latex-l3packages)))
+ (home-page "https://www.ctan.org/pkg/fontspec")
+ (synopsis "Advanced font selection in XeLaTeX and LuaLaTeX")
+ (description
+ "Fontspec is a package for XeLaTeX and LuaLaTeX. It provides an
automatic and unified interface to feature-rich AAT and OpenType fonts through
the NFSS in LaTeX running on XeTeX or LuaTeX engines. The package requires
the l3kernel and xparse bundles from the LaTeX 3 development team.")
- (license license:lppl1.3+)))
+ (license license:lppl1.3+))))
+
+(define-deprecated-package texlive-latex-fontspec texlive-fontspec)
+
+(define-public texlive-grffile
+ (let ((template (simple-texlive-package
+ "texlive-grffile"
+ (list "/doc/latex/grffile/README.md"
+ "/source/latex/grffile/grffile.dtx")
+ (base32
+ "1ib2n4d52faipvxdvdh4ar1p5j997h7cza26sfyd8z3qdf0naqgx"))))
+ (package
+ (inherit template)
+ (arguments
+ (substitute-keyword-arguments (package-arguments template)
+ ((#:tex-directory _ #t)
+ "latex/grffile")
+ ((#:build-targets _ #t)
+ '(list "grffile.dtx"))
+ ((#:phases phases)
+ `(modify-phases ,phases
+ (add-after 'unpack 'chdir
+ (lambda _ (chdir "source/latex/grffile/")))))))
+ (home-page "https://www.ctan.org/pkg/grffile")
+ (synopsis "Extended file name support for graphics (legacy package)")
+ (description
+ "The original grffile package extended the file name processing of the
+@code{graphics} package to support a larger range of file names. The base
+LaTeX code now supports multiple dots and spaces, and this package by default
+is a stub that just loads @code{graphicx}.")
+ (license license:lppl1.3c+))))
+
+(define-public texlive-stringenc
+ (let ((template (simple-texlive-package
+ "texlive-stringenc"
+ (list "/doc/latex/stringenc/README.md"
+ "/source/latex/stringenc/stringenc.dtx")
+ (base32
+ "19sfi5jxldxmy79pxmapmgmn3iknf8wjczasvlrrwv0gyycxdzhw"))))
+ (package
+ (inherit template)
+ (outputs '("doc" "out"))
+ (arguments
+ (substitute-keyword-arguments (package-arguments template)
+ ((#:tex-directory _ #t)
+ "generic/stringenc")
+ ((#:build-targets _ #t)
+ '(list "stringenc.dtx"))
+ ((#:phases phases)
+ `(modify-phases ,phases
+ (add-after 'unpack 'chdir
+ (lambda _ (chdir "source/latex/stringenc/")))
+ (add-after 'copy-files 'clean-up
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (delete-file-recursively
+ (string-append (assoc-ref outputs "out") "/share/texmf-dist/build"))
+ (delete-file
+ (string-append (assoc-ref outputs "out") "/share/texmf-dist/stringenc.dtx"))
+ (install-file
+ (string-append (assoc-ref inputs "source") "/source/latex/stringenc/stringenc.dtx")
+ (string-append (assoc-ref outputs "out") "/share/texmf-dist/source/latex/stringenc/"))
+ (install-file
+ (string-append (assoc-ref inputs "source") "/doc/latex/stringenc/README.md")
+ (string-append (assoc-ref outputs "doc") "/doc/latex/stringenc/"))))))))
+ (home-page "https://www.ctan.org/pkg/stringenc")
+ (synopsis "Converting a string between different encodings")
+ (description
+ "This package provides @code{\\StringEncodingConvert} for converting a
+string between different encodings. Both LaTeX and plain-TeX are supported.")
+ (license license:lppl1.3c+))))
+
+(define-public texlive-l3build
+ (let ((template (simple-texlive-package
+ "texlive-l3build"
+ (list "/doc/latex/l3build/"
+ "/doc/man/man1/l3build.1"
+ "/scripts/l3build/"
+ "/tex/latex/l3build/"
+ ;; TODO: The dtx file builds only the documentation.
+ ;; We avoid this for a simpler package definition,
+ ;; but it may be possible to exclude
+ ;; /doc/latex/l3build and the man page in the future.
+ "/source/latex/l3build/")
+ (base32
+ "1fcay05jj53qgp2b98jpawi0id298fs5xc4y1r5krrfr4sp4hd59")
+ #:trivial? #t)))
+ (package
+ (inherit template)
+ (arguments
+ (substitute-keyword-arguments (package-arguments template)
+ ((#:phases phases)
+ `(modify-phases ,phases
+ (add-after 'install 'patch-shebangs-again
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ ;; XXX: Since the 'patch-shebangs' phase cannot change the
+ ;; original source files patch the shebangs again here.
+ (let* ((coreutils (assoc-ref inputs "coreutils"))
+ (texlive-bin (assoc-ref inputs "texlive-bin"))
+ (path (list (string-append coreutils "/bin")
+ (string-append texlive-bin "/bin"))))
+ (for-each (lambda (file)
+ (format #t "~a~%" file)
+ (patch-shebang file path))
+ (find-files (assoc-ref outputs "out")))
+ #t)))))))
+ (inputs
+ `(("coreutils" ,coreutils)
+ ("texlive-bin" ,texlive-bin)))
+ (home-page "https://github.com/latex3/luaotfload")
+ (synopsis "Testing and building system for LaTeX")
+ (description
+ "The l3build module is designed to support the development of
+high-quality LaTeX code by providing: a unit testing system, automated
+typesetting of code sources, and a reliable packaging system for CTAN
+releases. The bundle consists of a Lua script to run the tasks and a
+@code{.tex} file which provides the testing environment.")
+ (license license:lppl1.3c+))))
;; The SVN directory contains little more than a dtx file that generates three
;; of the many lua files that should be installed as part of this package.
@@ -3341,97 +3714,102 @@ this bundle for use independent of ConTeXt.")
;; GPL version 2 only
(license license:gpl2)))
-(define-public texlive-luatex-luaotfload
+;; TODO: We should be able to build this from the sources on Github with
+;; texlive-l3build, but I haven't been able to get it to work.
+(define-public texlive-luaotfload
+ (let ((template (simple-texlive-package
+ "texlive-luaotfload"
+ (list "/doc/luatex/luaotfload/"
+ "/doc/man/man1/luaotfload-tool.1"
+ "/doc/man/man5/luaotfload.conf.5"
+ "/source/luatex/luaotfload/fontloader-reference-load-order.lua"
+ "/source/luatex/luaotfload/fontloader-reference-load-order.tex"
+ "/scripts/luaotfload/luaotfload-tool.lua"
+ "/tex/luatex/luaotfload/")
+ (base32
+ "10wznvxx3qsl88n560py5vyx5r3a3914anbqfhwcmhmwg097xxl4")
+ #:trivial? #t)))
+ (package
+ (inherit template)
+ (propagated-inputs
+ `(("texlive-luatex-lualibs" ,texlive-luatex-lualibs)))
+ (home-page "https://github.com/lualatex/luaotfload")
+ (synopsis "OpenType font loader for LuaTeX")
+ (description
+ "Luaotfload is an adaptation of the ConTeXt font loading system for the
+Plain and LaTeX formats. It allows OpenType fonts to be loaded with font
+features accessible using an extended font request syntax while providing
+compatibilitywith XeTeX. By indexing metadata in a database it facilitates
+loading fonts by their proper names instead of file names.")
+ ;; GPL version 2 only
+ (license license:gpl2))))
+
+(define-deprecated-package texlive-luatex-luaotfload texlive-luaotfload)
+
+;; FIXME: This package is a temporary workaround to provide ‘lualatex.fmt’ for
+;; the LuaTeX engine. It is needed because it was discovered too late in the
+;; core-updates-frozen cycle that texlive-latex-base only provides it for
+;; LuaHBTeX. See https://issues.guix.gnu.org/51252.
+(define-public texlive-latex-luatex
(package
- (name "texlive-luatex-luaotfload")
- (version "2.8-fix-2")
- ;; The release tarball does not contain all source files.
- (source (origin
- (method git-fetch)
- (uri (git-reference
- (url "https://github.com/lualatex/luaotfload")
- (commit (string-append "v" version))))
- (file-name (git-file-name name version))
- (sha256
- (base32
- "0l5l7iq3dxcxl65qaghcpjg27yd9iw1sxa8pnd7xlvlm09dhfdnf"))))
+ (name "texlive-latex-luatex")
+ (version (number->string %texlive-revision))
+ (source #f)
(build-system gnu-build-system)
(arguments
- `(#:make-flags
- (list (string-append "DESTDIR="
- (assoc-ref %outputs "out")
- "/share/texmf-dist")
- "all")
- #:parallel-build? #f ; not supported
+ `(#:modules ((guix build gnu-build-system)
+ (guix build utils)
+ (ice-9 rdelim)
+ (ice-9 string-fun))
#:phases
(modify-phases %standard-phases
- (replace 'configure
+ (delete 'unpack)
+ (delete 'bootstrap)
+ (delete 'configure)
+ (delete 'check)
+ (replace 'build
(lambda* (#:key inputs #:allow-other-keys)
- (substitute* "doc/Makefile"
- (("rst2man") "rst2man.py")
- ;; Don't build the PDF. This requires more of LaTeX.
- (("\\$\\(DOCPDF\\)") ""))
-
- (substitute* "Makefile"
- ;; We don't build the PDF, so don't attempt to install it.
- (("cp \\$\\(RESOURCES\\) \\$\\(DOCPDF\\)")
- "cp $(RESOURCES)")
- (("= \\$\\(DOCPDF\\)") "= ")
- ;; Fix name of fontloader file
- (("^LOADER.*= \\$\\(BUILDDIR\\)/fontloader-\\$\\(shell date \\+%F\\).lua")
- "LOADER = $(BUILDDIR)/fontloader.lua"))
-
- (mkdir "build")
-
- ;; Don't download this file.
- (copy-file (assoc-ref inputs "glyphlist")
- "build/glyphlist.txt")
-
- ;; Don't use git
- (let ((notes
- `((committer . "Philipp Gesang <phg@phi-gamma.net>")
- (description . ,version)
- (loader . "fontloader.lua")
- (revision . "ad480924393fffa2896156e1a32c22f5c61120dd")
- (timestamp . "2019-01-01 00:00:00 +0000"))))
- (substitute* "scripts/mkstatus"
- (("local notes.*=.*")
- (string-append "local notes = {"
- (string-join
- (map (lambda (entry)
- (format "[\"~a\"]=\"~a\","
- (symbol->string (car entry))
- (cdr entry)))
- notes))
- "}"))))
- #t)))))
+ (mkdir "web2c")
+ (let ((fmtutil.cnf-in (open-file
+ (string-append
+ (assoc-ref inputs "texlive-kpathsea")
+ "/share/texmf-dist/web2c/fmtutil.cnf")
+ "r"))
+ (fmtutil.cnf-out (open-file "web2c/fmtutil.cnf" "w")))
+
+ ;; Copy ‘lualatex’ format lines to the new fmtutil.cnf, changing
+ ;; the engine from ‘luahbtex’ to ‘luatex’.
+ (do ((line "" (read-line fmtutil.cnf-in 'concat)))
+ ((eof-object? line))
+ (when (string-prefix? "lualatex" line)
+ (display (string-replace-substring line "luahbtex" "luatex")
+ fmtutil.cnf-out)))
+ (close-port fmtutil.cnf-out)
+ (close-port fmtutil.cnf-in)
+
+ (invoke "fmtutil" "--sys" "--all" "--fmtdir=web2c"
+ "--cnffile=web2c/fmtutil.cnf")
+
+ ;; Don't risk this file interfering with anything else.
+ (delete-file "web2c/fmtutil.cnf"))))
+ (replace 'install
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let ((web2c (string-append %output "/share/texmf-dist/web2c")))
+ (mkdir-p web2c)
+ (copy-recursively "web2c" web2c)))))))
(native-inputs
- `(("zip" ,zip)
- ("unzip" ,unzip)
- ("graphviz" ,graphviz)
- ("lualatex" ,(texlive-union (list texlive-luatex-lualibs
- texlive-context-base)))
- ("python-docutils" ,python-docutils)
- ("glyphlist"
- ,(origin
- (method url-fetch)
- (uri (string-append "https://raw.githubusercontent.com/adobe-type-tools/"
- "agl-aglfn/b2a04cb906f9257cc06a2fe0ad4b3d663bc02136/"
- "glyphlist.txt"))
- (sha256
- (base32 "1s6svfw23rqzdvflv8frgd4xrwvrmsj8szwzqgcd39dp9rpjafjp"))))))
- (propagated-inputs
- `(("texlive-luatex-lualibs" ,texlive-luatex-lualibs)))
- (home-page "https://github.com/lualatex/luaotfload")
- (synopsis "OpenType font loader for LuaTeX")
- (description
- "Luaotfload is an adaptation of the ConTeXt font loading system for the
-Plain and LaTeX formats. It allows OpenType fonts to be loaded with font
-features accessible using an extended font request syntax while providing
-compatibilitywith XeTeX. By indexing metadata in a database it facilitates
-loading fonts by their proper names instead of file names.")
- ;; GPL version 2 only
- (license license:gpl2)))
+ `(("texlive-bin" ,texlive-bin)
+ ("texlive-babel" ,texlive-babel)
+ ("texlive-cm" ,texlive-cm)
+ ("texlive-fonts-latex" ,texlive-fonts-latex)
+ ("texlive-kpathsea" ,texlive-kpathsea)
+ ("texlive-latex-base" ,texlive-latex-base)
+ ("texlive-lm" ,texlive-lm)
+ ("texlive-tex-ini-files" ,texlive-tex-ini-files)))
+ (home-page (package-home-page texlive-latex-base))
+ (synopsis "LuaLaTeX format files for LuaTeX")
+ (description "This package is necessary to use LaTeX with the LuaTeX engine.")
+ (license (package-license texlive-latex-base))))
(define-public texlive-latex-amsmath
(package
@@ -3443,7 +3821,7 @@ loading fonts by their proper names instead of file names.")
(file-name (string-append name "-" version "-checkout"))
(sha256
(base32
- "0qgk2332dacsxn1z95qzp35gbs7wrzl1ipjdhnmk1r897msm4sf5"))))
+ "172zybw7rp05jca8wl6x0mh6z6gncdyi1j9wdfyjnhbvqw0z4wi4"))))
(build-system texlive-build-system)
(arguments '(#:tex-directory "latex/amsmath"))
(home-page "https://www.ctan.org/pkg/amsmath")
@@ -3462,64 +3840,84 @@ mathematics, and @code{ntheoremntheorem}, for specifying theorem (and similar)
definitions.")
(license license:lppl1.3c+)))
-(define-public texlive-latex-amscls
- (package
- (name "texlive-latex-amscls")
- (version (number->string %texlive-revision))
- (source (origin
- (method svn-fetch)
- (uri (texlive-ref "latex" "amscls"))
- (file-name (string-append name "-" version "-checkout"))
- (sha256
- (base32
- "0c2j9xh4qpi0x1vvcxdjxq6say0zhyr569fryi5cmhp8bclh4kca"))))
- (build-system texlive-build-system)
- (arguments
- `(#:tex-directory "latex/amscls"))
- (home-page "https://www.ctan.org/pkg/amscls")
- (synopsis "AMS document classes for LaTeX")
- (description
- "This bundle contains three AMS classes: @code{amsartamsart} (for writing
+(define-public texlive-amscls
+ (let ((template (simple-texlive-package
+ "texlive-amscls"
+ (list "/doc/latex/amscls/"
+ "/source/latex/amscls/"
+ "/bibtex/bst/amscls/")
+ (base32
+ "0vw0b815slvfqfd8qffyfzb3xfvyv6k77m12xp0l67hs8p08s5b7"))))
+ (package
+ (inherit template)
+ (arguments
+ (substitute-keyword-arguments (package-arguments template)
+ ((#:tex-directory _ #t)
+ "latex/amscls")
+ ((#:phases phases)
+ `(modify-phases ,phases
+ (add-after 'unpack 'chdir
+ (lambda _ (chdir "source/latex/amscls/") #t))))))
+ (home-page "https://www.ctan.org/pkg/amscls")
+ (synopsis "AMS document classes for LaTeX")
+ (description
+ "This bundle contains three AMS classes: @code{amsartamsart} (for writing
articles for the AMS), @code{amsbookamsbook} (for books) and
@code{amsprocamsproc} (for proceedings), together with some supporting
material. The material is made available as part of the AMS-LaTeX
distribution.")
- (license license:lppl1.3c+)))
+ (license license:lppl1.3c+))))
-(define-public texlive-latex-babel
- (package
- (name "texlive-latex-babel")
- (version (number->string %texlive-revision))
- (source (origin
- (method svn-fetch)
- (uri (texlive-ref "latex" "babel"))
- (file-name (string-append name "-" version "-checkout"))
- (sha256
- (base32
- "1rwqq841i1rxywymzwkw0cw2yhgvxwjx5mgygfasvypwrwll6f6s"))))
- (build-system texlive-build-system)
- (arguments
- '(#:tex-directory "generic/babel"
- #:phases
- (modify-phases %standard-phases
- ;; This package tries to produce babel.aux twice but refuses to
- ;; overwrite the first one.
- (add-before 'build 'fix-ins
- (lambda _
- (substitute* "babel.ins"
- (("askonceonly") "askforoverwritefalse"))
- #t)))))
- (home-page "https://www.ctan.org/pkg/babel")
- (synopsis "Multilingual support for Plain TeX or LaTeX")
- (description
- "The package manages culturally-determined typographical (and other)
+(define-deprecated-package texlive-latex-amscls texlive-amscls)
+
+(define-public texlive-babel
+ (let ((template (simple-texlive-package
+ "texlive-babel"
+ (list "/doc/latex/babel/"
+ "/source/latex/babel/"
+ "/makeindex/babel/")
+ (base32
+ "0qr5vjp79g1c1l6k173qhfdfabgbky73wymzhm56pazx4a8r08wz"))))
+ (package
+ (inherit template)
+ (arguments
+ (substitute-keyword-arguments (package-arguments template)
+ ((#:tex-directory _ #t)
+ "generic/babel")
+ ((#:phases phases)
+ `(modify-phases ,phases
+ (add-after 'unpack 'chdir
+ (lambda _ (chdir "source/latex/babel/") #t))
+ ;; This package tries to produce babel.aux twice but refuses to
+ ;; overwrite the first one.
+ (add-before 'build 'fix-ins
+ (lambda _
+ (substitute* "babel.ins"
+ (("askonceonly") "askforoverwritefalse"))
+ #t))
+ (add-after 'install 'install-locales
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let ((locale-directory
+ (string-append (assoc-ref outputs "out")
+ "/share/texmf-dist/tex/generic/babel/locale/")))
+ (mkdir-p locale-directory)
+ (invoke "unzip" "locale.zip" "-d"
+ locale-directory))))))))
+ (native-inputs
+ `(("unzip" ,unzip)))
+ (home-page "https://www.ctan.org/pkg/babel")
+ (synopsis "Multilingual support for Plain TeX or LaTeX")
+ (description
+ "The package manages culturally-determined typographical (and other)
rules, and hyphenation patterns for a wide range of languages. A document may
select a single language to be supported, or it may select several, in which
case the document may switch from one language to another in a variety of
ways. Babel uses contributed configuration files that provide the detail of
what has to be done for each language. Users of XeTeX are advised to use the
polyglossia package rather than Babel.")
- (license license:lppl1.3+)))
+ (license license:lppl1.3+))))
+
+(define-deprecated-package texlive-latex-babel texlive-babel)
(define-public texlive-generic-babel-english
(package
@@ -3553,7 +3951,7 @@ for Canadian and USA text.")
(file-name (string-append name "-" version "-checkout"))
(sha256
(base32
- "129f9w41cb6yyrr6kpv3zz9ml6334hyq1wcz7j9jn47p0hlxqfk8"))))
+ "1x9hnr9gz5mqdb97cinivn9xjnfr4qi996aa4cnr2sm2dsbhqxnp"))))
(build-system texlive-build-system)
(arguments '(#:tex-directory "generic/babel-german"))
(home-page "https://www.ctan.org/pkg/babel-german")
@@ -3571,7 +3969,7 @@ Swiss varieties of German.")
"texlive-babel-swedish"
(list "/source/generic/babel-swedish/")
(base32
- "0swdg2l5i7cbcvy4q4xgsnwwnbxiyvs6f5b72kiw7mjn24v27g8f"))))
+ "03rp4n9wkqyckman765r8v8j2pg5fg9frbfxsnhq0i2mr0yhbr6v"))))
(package
(inherit template)
(arguments
@@ -3614,67 +4012,133 @@ T2* and X2 encodings. These encodings cover (between them) pretty much every
language that is written in a Cyrillic alphabet.")
(license license:lppl1.3c+)))
-(define-public texlive-latex-psnfss
- (package
- (name "texlive-latex-psnfss")
- (version (number->string %texlive-revision))
- (source (origin
- (method svn-fetch)
- (uri (texlive-ref "latex" "psnfss"))
- (file-name (string-append name "-" version "-checkout"))
- (sha256
- (base32
- "1920dcq8613yzprasbg80fh4fcjcidvvl54wkx438nimyxcri7qz"))))
- (build-system texlive-build-system)
- (arguments '(#:tex-directory "latex/psnfss"))
- (home-page "https://www.ctan.org/pkg/psnfss")
- (synopsis "Font support for common PostScript fonts")
- (description
- "The PSNFSS collection includes a set of files that provide a complete
-working setup of the LaTeX font selection scheme (NFSS2) for use with common
-PostScript fonts. It covers the so-called \"Base\" fonts (which are built
-into any Level 2 PostScript printing device and the Ghostscript interpreter)
-and a number of free fonts. It provides font definition files, macros and
-font metrics. The bundle as a whole is part of the LaTeX required set of
-packages.")
- (license license:lppl1.2+)))
-
-;; TODO: this should supersede texlive-latex-psnfss, but we can't do this
-;; before the next rebuild cycle.
(define-public texlive-psnfss
(let ((template (simple-texlive-package
"texlive-psnfss"
(list "/doc/latex/psnfss/"
"/source/latex/psnfss/"
"/fonts/map/dvips/psnfss/"
- ;; Only the sty files are generated. We need all the .fd
- ;; files.
- "/tex/latex/psnfss/")
+
+ ;; Only the .sty files are generated from the sources.
+ "/tex/latex/psnfss/8rbch.fd"
+ "/tex/latex/psnfss/8rpag.fd"
+ "/tex/latex/psnfss/8rpbk.fd"
+ "/tex/latex/psnfss/8rpcr.fd"
+ "/tex/latex/psnfss/8rphv.fd"
+ "/tex/latex/psnfss/8rpnc.fd"
+ "/tex/latex/psnfss/8rppl.fd"
+ "/tex/latex/psnfss/8rptm.fd"
+ "/tex/latex/psnfss/8rput.fd"
+ "/tex/latex/psnfss/8rpzc.fd"
+ "/tex/latex/psnfss/omlbch.fd"
+ "/tex/latex/psnfss/omlpag.fd"
+ "/tex/latex/psnfss/omlpbk.fd"
+ "/tex/latex/psnfss/omlpcr.fd"
+ "/tex/latex/psnfss/omlphv.fd"
+ "/tex/latex/psnfss/omlpnc.fd"
+ "/tex/latex/psnfss/omlppl.fd"
+ "/tex/latex/psnfss/omlptm.fd"
+ "/tex/latex/psnfss/omlptmcm.fd"
+ "/tex/latex/psnfss/omlput.fd"
+ "/tex/latex/psnfss/omlpzc.fd"
+ "/tex/latex/psnfss/omlzplm.fd"
+ "/tex/latex/psnfss/omlzpple.fd"
+ "/tex/latex/psnfss/omlztmcm.fd"
+ "/tex/latex/psnfss/omsbch.fd"
+ "/tex/latex/psnfss/omspag.fd"
+ "/tex/latex/psnfss/omspbk.fd"
+ "/tex/latex/psnfss/omspcr.fd"
+ "/tex/latex/psnfss/omsphv.fd"
+ "/tex/latex/psnfss/omspnc.fd"
+ "/tex/latex/psnfss/omsppl.fd"
+ "/tex/latex/psnfss/omsptm.fd"
+ "/tex/latex/psnfss/omsput.fd"
+ "/tex/latex/psnfss/omspzc.fd"
+ "/tex/latex/psnfss/omspzccm.fd"
+ "/tex/latex/psnfss/omszplm.fd"
+ "/tex/latex/psnfss/omszpple.fd"
+ "/tex/latex/psnfss/omsztmcm.fd"
+ "/tex/latex/psnfss/omxpsycm.fd"
+ "/tex/latex/psnfss/omxzplm.fd"
+ "/tex/latex/psnfss/omxzpple.fd"
+ "/tex/latex/psnfss/omxztmcm.fd"
+ "/tex/latex/psnfss/ot1bch.fd"
+ "/tex/latex/psnfss/ot1pag.fd"
+ "/tex/latex/psnfss/ot1pbk.fd"
+ "/tex/latex/psnfss/ot1pcr.fd"
+ "/tex/latex/psnfss/ot1phv.fd"
+ "/tex/latex/psnfss/ot1pnc.fd"
+ "/tex/latex/psnfss/ot1ppl.fd"
+ "/tex/latex/psnfss/ot1pplj.fd"
+ "/tex/latex/psnfss/ot1pplx.fd"
+ "/tex/latex/psnfss/ot1ptm.fd"
+ "/tex/latex/psnfss/ot1ptmcm.fd"
+ "/tex/latex/psnfss/ot1put.fd"
+ "/tex/latex/psnfss/ot1pzc.fd"
+ "/tex/latex/psnfss/ot1zplm.fd"
+ "/tex/latex/psnfss/ot1zpple.fd"
+ "/tex/latex/psnfss/ot1ztmcm.fd"
+ "/tex/latex/psnfss/t1bch.fd"
+ "/tex/latex/psnfss/t1pag.fd"
+ "/tex/latex/psnfss/t1pbk.fd"
+ "/tex/latex/psnfss/t1pcr.fd"
+ "/tex/latex/psnfss/t1phv.fd"
+ "/tex/latex/psnfss/t1pnc.fd"
+ "/tex/latex/psnfss/t1ppl.fd"
+ "/tex/latex/psnfss/t1pplj.fd"
+ "/tex/latex/psnfss/t1pplx.fd"
+ "/tex/latex/psnfss/t1ptm.fd"
+ "/tex/latex/psnfss/t1put.fd"
+ "/tex/latex/psnfss/t1pzc.fd"
+ "/tex/latex/psnfss/ts1bch.fd"
+ "/tex/latex/psnfss/ts1pag.fd"
+ "/tex/latex/psnfss/ts1pbk.fd"
+ "/tex/latex/psnfss/ts1pcr.fd"
+ "/tex/latex/psnfss/ts1phv.fd"
+ "/tex/latex/psnfss/ts1pnc.fd"
+ "/tex/latex/psnfss/ts1ppl.fd"
+ "/tex/latex/psnfss/ts1pplj.fd"
+ "/tex/latex/psnfss/ts1pplx.fd"
+ "/tex/latex/psnfss/ts1ptm.fd"
+ "/tex/latex/psnfss/ts1put.fd"
+ "/tex/latex/psnfss/ts1pzc.fd"
+ "/tex/latex/psnfss/ufplm.fd"
+ "/tex/latex/psnfss/ufplmbb.fd"
+ "/tex/latex/psnfss/upsy.fd"
+ "/tex/latex/psnfss/upzd.fd")
(base32
- "04y7v4bghpzky6c3l6qadx7s47m69jh1y615g91rxcn8z3r190di")
- #:trivial? #false)))
+ "11f14dzhwsy4pli21acccip43d36nf3pac33ihjffnps1i2mhqkd"))))
(package
(inherit template)
(arguments
(substitute-keyword-arguments (package-arguments template)
- ((#:tex-directory _ '())
+ ((#:tex-directory _ #t)
"latex/psnfss")
((#:phases phases)
`(modify-phases ,phases
(add-after 'unpack 'chdir
- (lambda _ (chdir "source/latex/psnfss")))))))
+ (lambda _
+ (chdir "source/latex/psnfss") #t))))))
+ (native-inputs
+ `(("texlive-cm" ,texlive-cm)))
(home-page "https://www.ctan.org/pkg/psnfss")
(synopsis "Font support for common PostScript fonts")
(description
"The PSNFSS collection includes a set of files that provide a complete
working setup of the LaTeX font selection scheme (NFSS2) for use with common
-PostScript fonts. It covers the so-called \"Base\" fonts (which are built
-into any Level 2 PostScript printing device and the Ghostscript interpreter)
-and a number of free fonts. It provides font definition files, macros and
-font metrics. The bundle as a whole is part of the LaTeX required set of
-packages.")
+PostScript fonts. The base set of text fonts covered by PSNFSS includes the
+AvantGarde, Bookman, Courier, Helvetica, New Century Schoolbook, Palatino,
+Symbol, Times Roman and Zapf Dingbats fonts. In addition, the fonts Bitstream
+Charter and Adobe Utopia are covered. Separate packages are provided to load
+each font for use as the main text font. The package @code{helvet} allows
+Helvetica to be loaded with its size scaled to something more appropriate for
+use as a Sans-Serif font to match Times, while @code{pifont} provides the
+means to select single glyphs from symbol fonts. The bundle as a whole is
+part of the LaTeX required set of packages.")
(license license:lppl1.2+))))
+(define-deprecated-package texlive-latex-psnfss texlive-psnfss)
+
;; For user profiles
(define-public texlive-base
(let ((default-packages
@@ -3682,17 +4146,19 @@ packages.")
texlive-dvips
texlive-fontname
texlive-cm
+ texlive-cm-super ; to avoid bitmap fonts
texlive-fonts-latex
- texlive-metafont-base
+ texlive-metafont
texlive-latex-base
+ texlive-kpathsea ;for mktex.opt
;; LaTeX packages from the "required" set.
texlive-latex-amsmath
- texlive-latex-amscls
- texlive-latex-babel
+ texlive-amscls
+ texlive-babel
texlive-generic-babel-english
texlive-latex-cyrillic
texlive-latex-graphics
- texlive-latex-psnfss
+ texlive-psnfss
texlive-latex-tools
texlive-tetex)))
(package
@@ -3720,144 +4186,86 @@ It includes little more than the required set of LaTeX packages.")
'()
default-packages)))))
-(define-public texlive-default-updmap.cfg
- (origin
- (method url-fetch)
- (uri (string-append "https://tug.org/svn/texlive/tags/"
- %texlive-tag "/Master/texmf-dist/web2c/updmap.cfg"
- "?revision=" (number->string %texlive-revision)))
- (file-name (string-append "updmap.cfg-"
- (number->string %texlive-revision)))
- (sha256
- (base32
- "0faqknqxs80qp9ywk0by5k85s0yalg97c4lja4q56lsyblrr4j7i"))))
-
-;; For use in package definitions only
-(define-public texlive-union
+;;; TODO: Add a TeX Live profile hook computing fonts maps (and others?)
+;;; configuration from the packages in the profile, similar to what's done
+;;; below.
+(define-public texlive-updmap.cfg
(lambda* (#:optional (packages '()))
- "Return 'texlive-union' package which is a union of PACKAGES and the
-standard LaTeX packages."
+ "Return a 'texlive-updmap.cfg' package which contains the fonts map
+configuration of a base set of packages plus PACKAGES."
(let ((default-packages (match (package-propagated-inputs texlive-base)
(((labels packages) ...) packages))))
- (package (inherit texlive-base)
- (name "texlive-union")
- (build-system trivial-build-system)
+ (package
+ (version (number->string %texlive-revision))
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "https://tug.org/svn/texlive/tags/"
+ %texlive-tag
+ "/Master/texmf-dist/web2c/updmap.cfg"
+ "?revision=" version))
+ (file-name "updmap.cfg")
+ (sha256
+ (base32
+ "0zhpyld702im6352fwp41f2hgfkpj2b4j1kfsjqbkijlcmvb6w2c"))))
+ (name "texlive-updmap.cfg")
+ (build-system copy-build-system)
(arguments
- '(#:modules ((guix build union)
+ '(#:modules ((guix build copy-build-system)
(guix build utils)
- (guix build texlive-build-system)
- (guix build gnu-build-system)
- (guix build gremlin)
- (guix elf))
- #:builder
- (begin
- (use-modules (ice-9 match)
- (ice-9 popen)
- (srfi srfi-26)
- (guix build union)
- (guix build utils)
- (guix build texlive-build-system))
- (let* ((out (assoc-ref %outputs "out"))
- (texmf.cnf (string-append out "/share/texmf-dist/web2c/texmf.cnf")))
- ;; Build a modifiable union of all inputs (but exclude bash and
- ;; the updmap.cfg file)
- (match (filter (match-lambda
- ((name . _)
- (not (member name '("bash"
- "coreutils"
- "sed"
- "updmap.cfg")))))
- %build-inputs)
- (((names . directories) ...)
- (union-build (assoc-ref %outputs "out")
- directories
- #:create-all-directories? #t
- #:log-port (%make-void-port "w"))))
-
- ;; The configuration file "texmf.cnf" is provided by the
- ;; "texlive-bin" package. We take it and override only the
- ;; setting for TEXMFROOT and TEXMF. This file won't be consulted
- ;; by default, though, so we still need to set TEXMFCNF.
- (substitute* texmf.cnf
- (("^TEXMFROOT = .*")
- (string-append "TEXMFROOT = " out "/share\n"))
- (("^TEXMF = .*")
- "TEXMF = $TEXMFROOT/share/texmf-dist\n"))
- (setenv "PATH" (string-append
- (assoc-ref %build-inputs "bash") "/bin:"
- (assoc-ref %build-inputs "coreutils") "/bin:"
- (assoc-ref %build-inputs "sed") "/bin:"
- (string-append out "/bin")))
- (for-each
- (cut wrap-program <>
- `("TEXMFCNF" ":" suffix (,(dirname texmf.cnf)))
- `("TEXMF" ":" suffix (,(string-append out "/share/texmf-dist"))))
- (find-files (string-append out "/bin") ".*"))
-
- ;; Remove invalid maps from config file.
- (let ((web2c (string-append out "/share/texmf-config/web2c/"))
- (maproot (string-append out "/share/texmf-dist/fonts/map/")))
- (mkdir-p web2c)
- (copy-file
- (assoc-ref %build-inputs "updmap.cfg")
- (string-append web2c "updmap.cfg"))
- (make-file-writable (string-append web2c "updmap.cfg"))
+ (ice-9 popen)
+ (ice-9 textual-ports))
+ #:install-plan '(("updmap.cfg" "share/texmf-config/web2c/")
+ ("map" "share/texmf-dist/fonts/map"))
+ #:phases
+ (modify-phases %standard-phases
+ (add-before 'install 'regenerate-updmap.cfg
+ (lambda _
+ (make-file-writable "updmap.cfg")
+ ;; Disable unavailable map files.
(let* ((port (open-pipe* OPEN_WRITE "updmap-sys"
"--syncwithtrees"
"--nohash"
- (string-append "--cnffile=" web2c "updmap.cfg"))))
+ "--cnffile" "updmap.cfg")))
(display "Y\n" port)
(when (not (zero? (status:exit-val (close-pipe port))))
(error "failed to filter updmap.cfg")))
+
+ ;; Set TEXMFSYSVAR to a sane and writable value; updmap fails
+ ;; if it cannot create its log file there.
+ (setenv "TEXMFSYSVAR" (getcwd))
+
;; Generate maps.
(invoke "updmap-sys"
- (string-append "--cnffile=" web2c "updmap.cfg")
- (string-append "--dvipdfmxoutputdir="
- maproot "dvipdfmx/updmap/")
- (string-append "--dvipsoutputdir="
- maproot "dvips/updmap/")
- (string-append "--pdftexoutputdir="
- maproot "pdftex/updmap/"))
- ;; Having this file breaks all file lookups later.
- (delete-file (string-append out "/share/texmf-dist/ls-R")))
- #t))))
- (inputs
- `(("bash" ,bash)
- ,@(map (lambda (package)
- (list (package-name package) package))
- (append default-packages packages))))
- (native-inputs
- `(("coreutils" ,coreutils)
- ("sed" ,sed)
- ("updmap.cfg"
- ,(origin
- (method url-fetch)
- (uri (string-append "https://tug.org/svn/texlive/tags/"
- %texlive-tag "/Master/texmf-dist/web2c/updmap.cfg"
- "?revision=" (number->string %texlive-revision)))
- (file-name (string-append "updmap.cfg-"
- (number->string %texlive-revision)))
- (sha256
- (base32
- "0faqknqxs80qp9ywk0by5k85s0yalg97c4lja4q56lsyblrr4j7i"))))))
+ "--cnffile" "updmap.cfg"
+ "--dvipdfmxoutputdir" "map/dvipdfmx/updmap/"
+ "--dvipsoutputdir" "map/dvips/updmap/"
+ "--pdftexoutputdir" "map/pdftex/updmap/"))))))
+ (propagated-inputs (map (lambda (package)
+ (list (package-name package) package))
+ (append default-packages packages)))
(home-page (package-home-page texlive-bin))
- (synopsis "Union of TeX Live packages")
- (description "This package provides a subset of the TeX Live
-distribution.")
- (license (fold (lambda (package result)
- (match (package-license package)
- ((lst ...)
- (append lst result))
- ((? license:license? license)
- (cons license result))))
- '()
- (append default-packages packages)))))))
+ (synopsis "TeX Live fonts map configuration")
+ (description "This package contains the fonts map configuration file
+generated for the base TeX Live packages as well as, optionally, user-provided
+ones.")
+ (license (delete-duplicates
+ (fold (lambda (package result)
+ (match (package-license package)
+ ((lst ...)
+ (append lst result))
+ ((? license:license? license)
+ (cons license result))))
+ '()
+ (append default-packages packages))))))))
+
+(define-deprecated/alias texlive-union texlive-updmap.cfg)
+(export texlive-union)
;; For use in package definitions only
(define-public texlive-tiny
(package
- (inherit (texlive-union))
+ (inherit (texlive-updmap.cfg))
(name "texlive-tiny")
(description "This is a very limited subset of the TeX Live distribution.
It includes little more than the required set of LaTeX packages.")))
@@ -3874,7 +4282,7 @@ It includes little more than the required set of LaTeX packages.")))
"/fonts/type1/public/tipa/"
"/tex/latex/tipa/")
(base32
- "1h53dscv8z6fsa0ax5dys3x11b2f1g60l22hpdf7c88cvdhcs8sn")
+ "0cqzf8vb10b8jw99m9gflskxa4c3rpiznxglix6chl5lai5sgw44")
#:trivial? #t))
(home-page "https://www.ctan.org/pkg/tipa")
(synopsis "Fonts and macros for IPA phonetics characters")
@@ -4017,7 +4425,7 @@ package.")
(file-name (string-append name "-" version "-checkout"))
(sha256
(base32
- "1zyl2pcz2x529gzj5m93a1s4ipymdabf7qdjl3l1673pizd4hfyv"))))
+ "0rhn74ywv000b89w8qjf1i0qsk6kd1mjapfwis14jwjvbjqgvj95"))))
(build-system texlive-build-system)
(arguments '(#:tex-directory "latex/draftwatermark"))
(home-page "https://www.ctan.org/pkg/draftwatermark")
@@ -4081,6 +4489,37 @@ for a variety of alignment purposes, as is evidenced by the examples in
also provided.")
(license license:lppl1.3+)))
+(define-public texlive-latex-etoc
+ (package
+ (inherit (simple-texlive-package
+ "texlive-latex-etoc"
+ '("/doc/latex/etoc/README.md"
+ "/doc/latex/etoc/etoc.pdf"
+ "/tex/latex/etoc/")
+ (base32
+ "0198cn75m1y8ggbfv1qlnif0d9275f6mxqsansyqw4np0rv6q9sv")
+ #:trivial? #t))
+ (home-page "https://www.ctan.org/pkg/etoc")
+ (synopsis "Completely customisable TOCs")
+ (description
+ "This package gives the user complete control of how the entries of
+the table of contents should be constituted from the name, number, and page
+number of each sectioning unit. The layout is controlled by the definition
+of ‘line styles’ for each sectioning level used in the document.
+
+The package provides its own custom line styles (which may be used as
+examples), and continues to support the standard formatting inherited from
+the LaTeX document classes, but the package can also allow the user to
+delegate the details to packages dealing with list making environments (such
+as enumitem). The package’s default global style typesets tables of contents
+in a multi-column format, with either a standard heading, or a ruled title
+(optionally with a frame around the table).
+
+The @code{\\tableofcontents} command may be used arbitrarily many times in
+the same document, while @code{\\localtableofcontents} provides a ‘local’
+table of contents.")
+ (license license:lppl1.3c+)))
+
(define-public texlive-latex-expdlist
(package
(name "texlive-latex-expdlist")
@@ -4135,8 +4574,23 @@ mode. The functionality is provided by purely expandable macros or by faster
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
@@ -4212,6 +4666,42 @@ that are compatible with @code{natbib}: @code{plainnat}, @code{unsrtnat},
designed from the start to be compatible with @code{natbib}.")
(license license:lppl)))
+(define-public texlive-latex-newunicodechar
+ (package
+ (inherit (simple-texlive-package
+ "texlive-latex-newunicodechar"
+ '("/doc/latex/newunicodechar/" "/tex/latex/newunicodechar/")
+ (base32
+ "0pwx3ylhvk5hxjnalas00grrbwla79j424i27hrm0zgflq7wsbrj")
+ #:trivial? #t))
+ (home-page "https://www.ctan.org/pkg/newunicodechar")
+ (synopsis "Definitions of the meaning of Unicode characters")
+ (description
+ "This package provides a friendly interface for defining the meaning of
+Unicode characters. The document should be processed by (pdf)LaTeX with the
+Unicode option of @code{inputenc} or @code{inputenx}, or by XeLaTeX/LuaLaTeX.")
+ (license license:lppl1.3c+)))
+
+(define-public texlive-latex-pdftexcmds
+ (package
+ (inherit (simple-texlive-package
+ "texlive-latex-pdftexcmds"
+ '("/doc/generic/pdftexcmds/"
+ "/tex/generic/pdftexcmds/")
+ (base32
+ "1hph0djbfc8hlwfc41rzlf8l3ccyyvc0n7a0qdrr9881jwd6iv1b")
+ #:trivial? #t))
+ (propagated-inputs
+ `(("texlive-generic-iftex" ,texlive-generic-iftex)
+ ("texlive-generic-infwarerr" ,texlive-generic-infwarerr)
+ ("texlive-generic-ltxcmds" ,texlive-generic-ltxcmds)))
+ (home-page "https://www.ctan.org/pkg/pdftexcmds")
+ (synopsis "LuaTeX support for pdfTeX utility functions")
+ (description
+ "This package makes a number of utility functions from pdfTeX
+available for luaTeX by reimplementing them using Lua.")
+ (license license:lppl1.3c+)))
+
(define-public texlive-latex-psfrag
(package
(name "texlive-latex-psfrag")
@@ -4248,11 +4738,11 @@ rotated.")
#:trivial? #t))
(propagated-inputs
`(("texlive-latex-bigfoot" ,texlive-latex-bigfoot) ; for suffix
- ("texlive-latex-filemod" ,texlive-latex-filemod)
+ ("texlive-filemod" ,texlive-filemod)
("texlive-latex-graphics" ,texlive-latex-graphics)
("texlive-latex-ifplatform" ,texlive-latex-ifplatform)
("texlive-latex-l3kernel" ,texlive-latex-l3kernel) ; for expl3
- ("texlive-latex-oberdiek" ,texlive-latex-oberdiek)
+ ("texlive-oberdiek" ,texlive-oberdiek)
("texlive-latex-psfrag" ,texlive-latex-psfrag)
("texlive-latex-tools" ,texlive-latex-tools) ; for shellesc
("texlive-latex-trimspaces" ,texlive-latex-trimspaces)
@@ -4266,8 +4756,26 @@ drastically speeding up compilation time when only a single figure needs
re-processing.")
(license license:lppl)))
-(define-public texlive-latex-pstool
- (deprecated-package "texlive-latex-pstool" texlive-pstool))
+(define-deprecated-package texlive-latex-pstool texlive-pstool)
+
+(define-public texlive-latex-refcount
+ (package
+ (inherit (simple-texlive-package
+ "texlive-latex-refcount"
+ (list "/doc/latex/refcount/"
+ "/tex/latex/refcount/")
+ (base32
+ "0pkmqj2qihndlv3ks33xzqw91q46jx79r3aygj68d8dflyddi583")
+ #:trivial? #t))
+ (home-page "https://www.ctan.org/pkg/refcount")
+ (synopsis "Counter operations with label references")
+ (description
+ "This package provides the @code{\\setcounterref} and
+@code{\\addtocounterref} commands which use the section (or other) number
+from the reference as the value to put into the counter. It also provides
+@code{\\setcounterpageref} and @code{\\addtocounterpageref} that do the
+corresponding thing with the page reference of the label.")
+ (license license:lppl1.3c+)))
(define-public texlive-seminar
(package
@@ -4289,8 +4797,41 @@ recent classes such as powerdot or beamer, both of which are tuned to
21st-century presentation styles.")
(license license:lppl1.2+)))
-(define-public texlive-latex-seminar
- (deprecated-package "texlive-latex-seminar" texlive-seminar))
+(define-deprecated-package texlive-latex-seminar texlive-seminar)
+
+(define-public texlive-latex-stackengine
+ (package
+ (inherit (simple-texlive-package
+ "texlive-latex-stackengine"
+ (list "/doc/latex/stackengine/"
+ "/tex/latex/stackengine/")
+ (base32
+ "1rbw3dmb6kl3wlnpxacr8cmp2ivac1kpnb33k7r5s3lp1q59ck38")
+ #:trivial? #t))
+ (home-page "https://www.ctan.org/pkg/stackengine")
+ (synopsis "Customised stacking of objects")
+ (description
+ "The package provides a versatile way to stack objects vertically in a
+variety of customizable ways. A number of useful macros are provided, all
+of which make use of the @code{stackengine} core.")
+ (license license:lppl1.3+)))
+
+(define-public texlive-latex-tocloft
+ (package
+ (inherit (simple-texlive-package
+ "texlive-latex-tocloft"
+ '("/doc/latex/tocloft/" "/tex/latex/tocloft/")
+ (base32
+ "0mg3hpzq7wpm6mnnvb0rp3wby56zyxkyai8d2h3f4vk93zrc6awk")
+ #:trivial? #t))
+ (home-page "https://www.ctan.org/pkg/tocloft")
+ (synopsis "Control table of contents")
+ (description
+ "This package provides control over the typography of the
+@dfn{Table of Contents}, @dfn{List of Figures} and @dfn{List of Tables},
+and the ability to create new ‘List of ...’. The ToC @code{\\parskip} may
+be changed. ")
+ (license license:lppl1.3c+)))
(define-public texlive-latex-trimspaces
(package
@@ -4380,8 +4921,7 @@ hyperlink to the target of the DOI.")
;; Any version of the LPPL.
(license license:lppl1.3+)))
-(define-public texlive-latex-doi
- (deprecated-package "texlive-latex-doi" texlive-doi))
+(define-deprecated-package texlive-latex-doi texlive-doi)
(define-public texlive-etoolbox
(package
@@ -4390,7 +4930,7 @@ hyperlink to the target of the DOI.")
(list "/doc/latex/etoolbox/"
"/tex/latex/etoolbox/")
(base32
- "1cc1vw1ach55g4ff4x30by8k1mg01w199ccxvn72f5khlnnxial0")
+ "070iaj540rglf0c80l0hjkwg6aa7qyskhh4iwyhf7n8vrg5cjjab")
#:trivial? #t))
(home-page "https://www.ctan.org/pkg/etoolbox")
(synopsis "e-TeX tools for LaTeX")
@@ -4404,8 +4944,7 @@ some LaTeX kernel commands; nevertheless, the package will not modify any part
of the LaTeX kernel.")
(license license:lppl1.3+)))
-(define-public texlive-latex-etoolbox
- (deprecated-package "texlive-latex-etoolbox" texlive-etoolbox))
+(define-deprecated-package texlive-latex-etoolbox texlive-etoolbox)
(define-public texlive-latex-fncychap
(package
@@ -4565,11 +5104,11 @@ BibLaTeX, and is considered experimental.")
(file-name (string-append name "-" version "-checkout"))
(sha256
(base32
- "0a8f38c2ds1flxcr0apdpyaaz3k6fyalz6dkbrmcv9srjc40mh3n"))))
+ "0a9nrmiwksnpa6iaapirqid974ai56qgin2n4h9mggy9v8gp7r71"))))
(build-system texlive-build-system)
(arguments '(#:tex-directory "latex/geometry"))
(propagated-inputs
- `(("texlive-latex-oberdiek" ,texlive-latex-oberdiek))) ;for ifpdf
+ `(("texlive-oberdiek" ,texlive-oberdiek))) ;for ifpdf
(home-page "https://www.ctan.org/pkg/geometry")
(synopsis "Flexible and complete interface to document dimensions")
(description
@@ -4616,7 +5155,7 @@ array environments; verbatim handling; and syntax diagrams.")
(file-name (string-append name "-" version "-checkout"))
(sha256
(base32
- "0na7v4hsyx5s67cpjj2dbnq8j67k8lln6b19hmj631gfs27slss1"))))
+ "1ci6hr8hx4g2x359n6wqvw6w8fv42cjjpzxxxd3pn6av5nkaiav3"))))
(build-system texlive-build-system)
(arguments '(#:tex-directory "latex/polyglossia"))
(home-page "https://www.ctan.org/pkg/polyglossia")
@@ -4636,7 +5175,7 @@ and XeLaTeX; it relies on the @code{fontspec} package, version 2.0 at least.")
(file-name (string-append name "-" version "-checkout"))
(sha256
(base32
- "14b2bc7cqz4ckxxycim9sw6jkrr1pahivm1rdbpz5k6hl967w1s3"))))
+ "19fd0bqxjkzc16bza3w20pnsc90gbhbllm244b3h6sink4dlnn54"))))
(build-system texlive-build-system)
(arguments '(#:tex-directory "latex/supertabular"))
(home-page "https://www.ctan.org/pkg/supertabular")
@@ -4662,7 +5201,7 @@ situations where longtable has problems.")
(file-name (string-append name "-" version "-checkout"))
(sha256
(base32
- "16jy02m089m7n6v9vbfi4xjgngc1fnvsmmppk8axfwzbhdky3c9c"))))
+ "1qcmcsxdsibca0mad559vhz36xaxsbkivgv1hc98vdyd90fg4y31"))))
(build-system trivial-build-system)
(arguments
`(#:modules ((guix build utils))
@@ -4756,7 +5295,7 @@ considered obsolete; alternatives are the @code{typearea} package from the
(file-name (string-append name "-" version "-checkout"))
(sha256
(base32
- "0rxfpr8vq3brwx5rc7qn91ixlp9zva4zrms8a579fqa1g5yva7vg"))))
+ "1gc2brr2rs495w7qi6spdva1xrza94x7a36dncjdkghnsq8r92h4"))))
(build-system texlive-build-system)
(arguments '(#:tex-directory "latex/appendix"))
(home-page "https://www.ctan.org/pkg/appendix")
@@ -4769,6 +5308,23 @@ environment is provided which can be used instead of the @code{\\appendix}
command.")
(license license:lppl)))
+(define-public texlive-latex-bookmark
+ (package
+ (inherit (simple-texlive-package
+ "texlive-latex-bookmark"
+ (list "/doc/latex/bookmark/"
+ "/tex/latex/bookmark/")
+ (base32
+ "0xwjdah0p4an0fknvgj9y5phl62sf522z6570pvy6c09hkz0j4h1")
+ #:trivial? #t))
+ (home-page "https://www.ctan.org/pkg/bookmark")
+ (synopsis "Bookmark (outline) organization for hyperref")
+ (description
+ "This package implements a new bookmark (outline) organization for the
+@code{hyperref} package. Bookmark properties such as style and color. Other
+action types are available (URI, GoToR, Named).")
+ (license license:lppl1.3c+)))
+
(define-public texlive-latex-changebar
(package
(name "texlive-latex-changebar")
@@ -4806,7 +5362,7 @@ drivers, and VTeX and pdfTeX.")
(file-name (string-append name "-" version "-checkout"))
(sha256
(base32
- "1s1rv6zgw105w2j6ffhnk914qrix87y1ndzri1q72g2kbr91zlbg"))))
+ "0m4r52gw9vwsi1pzwh0cy03jxhwizymi4a2fj3jfs5rrvh105r5y"))))
(build-system trivial-build-system)
(arguments
`(#:modules ((guix build utils))
@@ -4836,7 +5392,7 @@ copy-and-paste functions work properly.")
(file-name (string-append name "-" version "-checkout"))
(sha256
(base32
- "16vd99p01a0y30xr5yf1z2j5da9x8gy21vb30wk08jh31zffbaqj"))))
+ "1qa0mh0fy9hcvfsmprv6q50q0qzdjjfbxi3axap26z6zg3qj68bc"))))
(build-system texlive-build-system)
(arguments '(#:tex-directory "latex/colortbl"))
(home-page "https://www.ctan.org/pkg/colortbl")
@@ -4895,7 +5451,7 @@ floats, center, flushleft, and flushright, lists, and pages.")
(file-name (string-append name "-" version "-checkout"))
(sha256
(base32
- "0hrwspqkqfahxyzzsnjyrxlgxj06zw1f3636gx76pvl4xhvdj1cj"))))
+ "1h2zv7cps0pknqhy2dyfclyi002lmsfshm0rn6ywfl9p4fnvh0bc"))))
(build-system trivial-build-system)
(arguments
`(#:modules ((guix build utils))
@@ -4963,6 +5519,24 @@ the same place. The package also has a range of techniques for labelling
footnotes with symbols rather than numbers.")
(license license:lppl1.3+)))
+(define-public texlive-latex-letltxmacro
+ (package
+ (inherit (simple-texlive-package
+ "texlive-latex-letltxmacro"
+ (list "/doc/latex/letltxmacro/"
+ "/tex/latex/letltxmacro/")
+ (base32
+ "0yy1m1jiyxq2pssp0pidaa2swx6lyxw3zwpm2r8m0v2r3lvsyyxx")
+ #:trivial? #t))
+ (home-page "https://www.ctan.org/pkg/letltxmacro")
+ (synopsis "Let assignment for macros")
+ (description
+ "TeX’s @code{\\let} assignment does not work for LaTeX macros with
+optional arguments, or for macros that are defined as robust macros by
+@code{\\DeclareRobustCommand}. This package defines @code{\\LetLtxMacro}
+that also takes care of the involved internal macros.")
+ (license license:lppl1.3c+)))
+
(define-public texlive-latex-listings
(package
(name "texlive-latex-listings")
@@ -4973,7 +5547,7 @@ footnotes with symbols rather than numbers.")
(file-name (string-append name "-" version "-checkout"))
(sha256
(base32
- "1fbrhqj22vzakn30j71fc41l8nliqbv1dmxm0zlwi2qjjbq6fwav"))))
+ "082zri3gp8s6p2difhk1pbix2vzmvsf6fmld2z78v35xwk3fiya0"))))
(build-system texlive-build-system)
(arguments
'(#:tex-directory "latex/listings"
@@ -5026,6 +5600,25 @@ transliterate semitic languages; patches to make (La)TeX formulae embeddable
in SGML; use maths minus in text as appropriate; simple Young tableaux.")
(license license:gpl2)))
+(define-public texlive-latex-kvoptions
+ (package
+ (inherit (simple-texlive-package
+ "texlive-latex-kvoptions"
+ (list "/doc/latex/kvoptions/"
+ "/tex/latex/kvoptions/")
+ (base32
+ "02i4n2n3j4lg68d3nam08m63kb4irc99wfhyc2z51r02lm1wwmvw")
+ #:trivial? #t))
+ (propagated-inputs
+ `(("texlive-generic-kvsetkeys" ,texlive-generic-kvsetkeys)
+ ("texlive-generic-ltxcmds" ,texlive-generic-ltxcmds)))
+ (home-page "https://www.ctan.org/pkg/kvoptions")
+ (synopsis "Key/value format for package options")
+ (description
+ "This package provides facilities for using key-value format in
+package options.")
+ (license license:lppl1.3c+)))
+
(define-public texlive-fonts-ec
(package
(name "texlive-fonts-ec")
@@ -5053,7 +5646,7 @@ in SGML; use maths minus in text as appropriate; simple Young tableaux.")
(delete 'configure)
(replace 'build
(lambda* (#:key inputs #:allow-other-keys)
- (let ((mf (assoc-ref inputs "texlive-metafont-base")))
+ (let ((mf (assoc-ref inputs "texlive-metafont")))
;; Tell mf where to find mf.base
(setenv "MFBASES" (string-append mf "/share/texmf-dist/web2c"))
;; Tell mf where to look for source files
@@ -5088,7 +5681,7 @@ in SGML; use maths minus in text as appropriate; simple Young tableaux.")
#t))))))
(native-inputs
`(("texlive-bin" ,texlive-bin)
- ("texlive-metafont-base" ,texlive-metafont-base)
+ ("texlive-metafont" ,texlive-metafont)
("texlive-cm" ,texlive-cm)))
(home-page "https://www.ctan.org/pkg/ec")
(synopsis "Computer modern fonts in T1 and TS1 encodings")
@@ -5146,7 +5739,7 @@ via the CM-super, Latin Modern and (in a restricted way) CM-LGC font sets.")
"/fonts/type1/public/inconsolata/"
"/tex/latex/inconsolata/")
(base32
- "1a77w26m4c4j0202s1qkikz7ha6cxlv8zxhzi9s3l0x1l2pl7cr2")
+ "19lvma52vk7x8d7j4s9ymjwm3w2k08860fh6dkzn76scgpdm4wlb")
#:trivial? #t))
(home-page "https://www.ctan.org/pkg/inconsolata")
(synopsis "Monospaced font with support files for use with TeX")
@@ -5185,8 +5778,7 @@ Adobe's basic set.")
;; No license version specified.
(license license:gpl3+)))
-(define-public texlive-fonts-adobe-times
- (deprecated-package "texlive-fonts-adobe-times" texlive-times))
+(define-deprecated-package texlive-fonts-adobe-times texlive-times)
(define-public texlive-palatino
(package
@@ -5214,8 +5806,7 @@ Adobe's basic set.")
;; No license version specified.
(license license:gpl3+)))
-(define-public texlive-fonts-adobe-palatino
- (deprecated-package "texlive-fonts-adobe-palatino" texlive-palatino))
+(define-deprecated-package texlive-fonts-adobe-palatino texlive-palatino)
(define-public texlive-zapfding
(package
@@ -5240,8 +5831,7 @@ Adobe's basic set.")
;; No license version specified.
(license license:gpl3+)))
-(define-public texlive-fonts-adobe-zapfding
- (deprecated-package "texlive-fonts-adobe-zapfding" texlive-zapfding))
+(define-deprecated-package texlive-fonts-adobe-zapfding texlive-zapfding)
(define-public texlive-fonts-rsfs
(package
@@ -5270,7 +5860,7 @@ Adobe's basic set.")
(delete 'configure)
(replace 'build
(lambda* (#:key inputs #:allow-other-keys)
- (let ((mf (assoc-ref inputs "texlive-metafont-base")))
+ (let ((mf (assoc-ref inputs "texlive-metafont")))
;; Tell mf where to find mf.base
(setenv "MFBASES" (string-append mf "/share/texmf-dist/web2c"))
;; Tell mf where to look for source files
@@ -5305,7 +5895,7 @@ Adobe's basic set.")
#t))))))
(native-inputs
`(("texlive-bin" ,texlive-bin)
- ("texlive-metafont-base" ,texlive-metafont-base)
+ ("texlive-metafont" ,texlive-metafont)
("texlive-cm" ,texlive-cm)))
(home-page "https://www.ctan.org/pkg/rsfs")
(synopsis "Ralph Smith's Formal Script font")
@@ -5328,7 +5918,7 @@ one of the packages @code{calrsfs} and @code{mathrsfs}.")
(file-name (string-append name "-" version "-checkout"))
(sha256
(base32
- "0y2y08kr3w6asm9lblj9yywqmhaal36fq71zzcbfsc7cvwf641q7"))))
+ "12f7pbhiav4iz3rra5vq85v9f14h8j1ybi42kvnkzgjsay87p7gf"))))
(build-system texlive-build-system)
(arguments '(#:tex-directory "latex/eso-pic"))
(home-page "https://www.ctan.org/pkg/eso-pic")
@@ -5390,7 +5980,7 @@ splines, and filled circles and ellipses. The package uses @code{tpic}
(file-name (string-append name "-" version "-checkout"))
(sha256
(base32
- "1vm9xp67hzif0pqab4r3ialf0cyhi0fa4p8kxgp1ymcf85pqip14"))))
+ "1j8svflnx9w897mdavyf1f0n256wh4bbclrhv5vx7b501gmlbp7d"))))
(build-system trivial-build-system)
(arguments
`(#:modules ((guix build utils))
@@ -5422,7 +6012,7 @@ in the form @code{key=value} are available, for example:
(file-name (string-append name "-" version "-checkout"))
(sha256
(base32
- "07vbcp6avdwldr870cwf65av2s9lfyzcpp8gpld53yw6lcxgaipj"))))
+ "1kak9i6nwz6vc4xjj6lbvkb69s49pis6qynjzvsjraxbdw28y2dq"))))
(build-system texlive-build-system)
(arguments '(#:tex-directory "latex/multirow"))
(home-page "https://www.ctan.org/pkg/multirow")
@@ -5447,7 +6037,7 @@ entry at the \"natural\" width of its text.")
(file-name (string-append name "-" version "-checkout"))
(sha256
(base32
- "1pr6ym3ad7x14ng7gmhsmywh3685d2cnm5qgyrqbigng2r6fcc1k"))))
+ "1ygsr0rsdabj61zask3346xrwiphz5i6f1nfb9k4d3234psh09kb"))))
(build-system trivial-build-system)
(arguments
`(#:modules ((guix build utils))
@@ -5483,7 +6073,7 @@ positions; a grid for orientation is available.")
(file-name (string-append name "-" version "-checkout"))
(sha256
(base32
- "0j1fhm1m9k6rz80lmch3x44g20y9nm4abaaf8czb0q8hzwlx5aq5"))))
+ "1zll8jci8lsd7y44j567akf6y8fp2p7qq23rs527zhr0br9mn3sh"))))
(build-system trivial-build-system)
(arguments
`(#:modules ((guix build utils))
@@ -5513,7 +6103,7 @@ designed class) helps alleviate this untidiness.")
(file-name (string-append name "-" version "-checkout"))
(sha256
(base32
- "0s4izcah7im67889qz4d26pcfpasmm35sj1rw4ragkkdk3rlbbbd"))))
+ "140kl8r7g2ak2frjn5pmwiwibfynyfwp897r9vk8pypmn390lzr2"))))
(build-system texlive-build-system)
(arguments '(#:tex-directory "latex/pdfpages"))
(home-page "https://www.ctan.org/pkg/pdfpages")
@@ -5527,38 +6117,47 @@ package supports pdfTeX (pdfLaTeX) and VTeX. With VTeX it is even possible to
use this package to insert PostScript files, in addition to PDF files.")
(license license:lppl1.3+)))
-(define-public texlive-fonts-stmaryrd
- (package
- (name "texlive-fonts-stmaryrd")
- (version (number->string %texlive-revision))
- (source (origin
- (method svn-fetch)
- (uri (texlive-ref "fonts" "stmaryrd"))
- (file-name (string-append name "-" version "-checkout"))
- (sha256
- (base32
- "08pn4ca3vl6qm9l3wm5h5iyjsrg411kkm1yana329xwg2j14s9n6"))))
- (build-system texlive-build-system)
- (arguments
- '(#:tex-directory "latex/stmaryrd"
- #:phases
- (modify-phases %standard-phases
- (add-after 'configure 'patch-ins
- (lambda _
- (substitute* "stmaryrd.ins"
- (("^%% LaTeX2e.*") "\\input docstrip\n")
- (("fontdef\\}\\}" line)
- (string-append line "\n\\endbatchfile")))
- #t)))))
- (home-page "https://www.ctan.org/pkg/stmaryrd")
- (synopsis "St Mary Road symbols for theoretical computer science")
- (description
- "The fonts were originally distributed as Metafont sources only, but
+(define-public texlive-stmaryrd
+ (let ((template (simple-texlive-package
+ "texlive-stmaryrd"
+ (list "/fonts/afm/public/stmaryrd/"
+ "/fonts/map/dvips/stmaryrd/"
+ "/fonts/source/public/stmaryrd/"
+ "/fonts/tfm/public/stmaryrd/"
+ "/fonts/type1/public/stmaryrd/"
+ "/source/fonts/stmaryrd/"
+ "/doc/fonts/stmaryrd/")
+ (base32
+ "0yn0yl6x1z9ab5gb56lhvkqabd2agz3ggxifwxkiysrj5780j29z"))))
+ (package
+ (inherit template)
+ (arguments (substitute-keyword-arguments (package-arguments template)
+ ((#:tex-directory _ #t)
+ "latex/stmaryrd")
+ ((#:phases phases)
+ `(modify-phases ,phases
+ (add-after 'unpack 'chdir
+ (lambda _
+ (chdir "source/fonts/stmaryrd")
+ #t))
+ (add-after 'chdir 'patch-ins
+ (lambda _
+ (substitute* "stmaryrd.ins"
+ (("^%% LaTeX2e.*") "\\input docstrip\n")
+ (("fontdef\\}\\}" line)
+ (string-append line "\n\\endbatchfile")))
+ #t))))))
+ (home-page "https://www.ctan.org/pkg/stmaryrd")
+ (synopsis "St Mary Road symbols for theoretical computer science")
+ (description
+ "The fonts were originally distributed as Metafont sources only, but
Adobe Type 1 versions are also now available. Macro support is provided for
use under LaTeX; the package supports the @code{only} option (provided by the
@code{somedefs} package) to restrict what is loaded, for those who don't need
the whole font.")
- (license license:lppl)))
+ (license license:lppl))))
+
+(define-deprecated-package texlive-fonts-stmaryrd texlive-stmaryrd)
(define-public texlive-latex-subfigure
(package
@@ -5683,8 +6282,7 @@ TeX metrics (VF and TFM files) and macros for use with LaTeX.")
;; Any version of the GPL with font exception.
(license license:gpl3+)))
-(define-public texlive-fonts-txfonts
- (deprecated-package "texlive-fonts-txfonts" texlive-txfonts))
+(define-deprecated-package texlive-fonts-txfonts texlive-txfonts)
(define-public texlive-fonts-iwona
(package
@@ -5709,8 +6307,7 @@ TeX metrics (VF and TFM files) and macros for use with LaTeX.")
(use-modules (guix build utils))
(let ((target (string-append (assoc-ref %outputs "out")
"/share/texmf-dist/"))
- (unzip (string-append (assoc-ref %build-inputs "unzip")
- "/bin/unzip")))
+ (unzip (search-input-file %build-inputs "/bin/unzip")))
(invoke unzip (assoc-ref %build-inputs "source"))
(mkdir-p target)
(copy-recursively "iwona" target)
@@ -5734,12 +6331,10 @@ of ink traps which typify the Kurier font.")
"texlive-jknappen"
(list "/fonts/source/jknappen/"
"/fonts/tfm/jknappen/"
- "/fonts/source/jknappen/"
- "/fonts/tfm/jknappen/"
"/tex4ht/ht-fonts/alias/jknappen/"
"/tex4ht/ht-fonts/unicode/jknappen/")
(base32
- "1v5wk5il41bddzr81h5636h3cjz0w1qann5g9garsb7qfch9fhws")
+ "0xvy3c845jc7iw1h9rcm1r2yvm1ni1sm9r9k9j2cfc82xy43rwij")
#:trivial? #t))
(home-page "https://www.ctan.org/pkg/jknappen")
(synopsis "Miscellaneous packages by Jörg Knappen")
@@ -5778,6 +6373,90 @@ Simple Young tableaux.
@end table")
(license license:gpl2))) ;per the 00readme_txt file.
+(define-public texlive-jadetex
+ (let ((template (simple-texlive-package
+ "texlive-jadetex"
+ (list "/doc/man/man1/jadetex.1"
+ "/doc/man/man1/jadetex.man1.pdf"
+ "/doc/man/man1/pdfjadetex.1"
+ "/doc/man/man1/pdfjadetex.man1.pdf"
+ "/source/jadetex/base/"
+ ;; The following files are not generated from
+ ;; sources.
+ "/tex/jadetex/base/jadetex.ini"
+ "/tex/jadetex/base/pdfjadetex.ini"
+ "/tex/jadetex/base/uentities.sty")
+ (base32
+ "03chyc3vjqgxcj985gy4k0bd0lf1n4a6sgbhc7k84jparjk3hx4i"))))
+ (package
+ (inherit template)
+ (arguments
+ (substitute-keyword-arguments (package-arguments template)
+ ((#:tex-directory _ #t)
+ "jadetex/base")
+ ((#:phases phases)
+ `(modify-phases ,phases
+ (add-after 'unpack 'unify-source-directory
+ (lambda _
+ (chdir "source/jadetex/base")
+ (for-each (lambda (f)
+ (copy-file f (basename f)))
+ (find-files "../../../tex/jadetex/base"))
+ #t))
+ (add-after 'build 'generate-formats
+ (lambda* (#:key inputs #:allow-other-keys)
+ (mkdir "web2c")
+ (for-each (lambda (f)
+ (symlink f (basename f)))
+ (find-files "build"))
+ (invoke "fmtutil-sys" "--byfmt" "jadetex"
+ "--fmtdir=web2c")
+ (invoke "fmtutil-sys" "--byfmt" "pdfjadetex"
+ "--fmtdir=web2c")))
+ (add-after 'install 'install-formats-and-wrappers
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (texlive-bin (assoc-ref inputs "texlive-bin"))
+ (pdftex (string-append texlive-bin "/bin/pdftex"))
+ (web2c (string-append out "/share/texmf-dist/web2c")))
+ (mkdir-p web2c)
+ (copy-recursively "web2c" web2c)
+ ;; Create convenience command wrappers.
+ (mkdir-p (string-append out "/bin"))
+ (symlink pdftex (string-append out "/bin/jadetex"))
+ (symlink pdftex (string-append out "/bin/pdfjadetex"))
+ #t)))))))
+ (propagated-inputs
+ ;; Propagate the texlive-updmap.cfg input used by xmltex, which provides the
+ ;; required fonts for its use.
+ `(("texlive-xmltex" ,texlive-xmltex)
+ ("texlive-kpathsea" ,texlive-kpathsea))) ;for fmtutil.cnf template
+ (native-inputs
+ `(("texlive-cm" ,texlive-cm) ;for cmex10 and others
+ ("texlive-fonts-latex" ,texlive-fonts-latex) ;for lasy6
+ ;; The t1cmr.fd file of texlive-latex-base refers to the ecrm font,
+ ;; provided by the jknappen package collection.
+ ("texlive-jknappen" ,texlive-jknappen)
+ ("texlive-generic-ulem" ,texlive-generic-ulem)
+ ("texlive-hyperref" ,texlive-hyperref)
+ ("texlive-latex-colortbl" ,texlive-latex-colortbl)
+ ("texlive-latex-fancyhdr" ,texlive-latex-fancyhdr)
+ ("texlive-latex-graphics" ,texlive-latex-graphics) ;for color.sty
+ ("texlive-latex-tools" ,texlive-latex-tools) ;for array.sty
+ ("texlive-marvosym" ,texlive-marvosym)
+ ("texlive-tex-ini-files" ,texlive-tex-ini-files))) ;for pdftexconfig
+ (home-page "https://www.ctan.org/pkg/jadetex/")
+ (synopsis "TeX macros to produce TeX output using OpenJade")
+ (description "JadeTeX is a companion package to the OpenJade DSSSL
+processor. OpenJade applies a DSSSL stylesheet to an SGML or XML document.
+The output of this process can be in a number of forms, including a set of
+high level LaTeX macros. It is the task of the JadeTeX package to transform
+these macros into DVI/PostScript (using the @command{jadetex} command) or
+Portable Document Format (PDF) form (using the @command{pdfjadetex}
+command).")
+ ;; The license text is found at the header of the jadetex.dtx file.
+ (license license:expat))))
+
(define-public texlive-libertine
(package
(inherit (simple-texlive-package
@@ -5793,7 +6472,7 @@ Simple Young tableaux.
"/tex/latex/libertine/")
(base32
- "1v2vimpfi0b08sd79dadrck7wkpa0bphiakwyvhjc3ygq9k5bp8k")
+ "1d5r80isyvs2v3i8pzlhsn7ns6bn8ldkbs82g25widraixlhg6yg")
#:trivial? #t))
(home-page "https://www.ctan.org/pkg/libertine")
(synopsis "Use Linux Libertine and Biolinum fonts with LaTeX")
@@ -5851,7 +6530,7 @@ LGR. The package doesn't (currently) support mathematics.")
(file-name (string-append name "-" version "-checkout"))
(sha256
(base32
- "04nmkhqx6jxcxx9a30zbcd5smxi5fd0cbp132bki7fnvhspnhg21"))))
+ "1kw7dvxvdfbf31zw0n8r0g5xak3vcdf25n33fqw93j59zpc5nvbl"))))
(build-system trivial-build-system)
(arguments
`(#:modules ((guix build utils))
@@ -5902,23 +6581,48 @@ now contains a package @code{fix-cm},f which performs the task of
@code{ec} fonts.")
(license license:lppl)))
-(define-public texlive-latex-lh
- (package
- (name "texlive-latex-lh")
- (version (number->string %texlive-revision))
- (source (origin
- (method svn-fetch)
- (uri (texlive-ref "latex" "lh"))
- (file-name (string-append name "-" version "-checkout"))
- (sha256
- (base32
- "00gdiwh3sfhh1iimjhpja7lm7k4vzqzql2irgwnpz94qvh25zwi5"))))
- (build-system texlive-build-system)
- (arguments '(#:tex-directory "latex/lh"))
- (home-page "https://www.ctan.org/pkg/lh")
- (synopsis "Cyrillic fonts that support LaTeX standard encodings")
- (description
- "The LH fonts address the problem of the wide variety of alphabets that
+(define-public texlive-lh
+ (let ((template (simple-texlive-package
+ "texlive-lh"
+ (list "/doc/fonts/lh/"
+ "/source/fonts/lh/"
+ "/source/latex/lh/"
+ "/fonts/source/lh/"
+ "/tex/plain/lh/")
+ (base32
+ "0vw75i52asi5sssp8k9r8dy4ihvqbvmbsl3dini3ls8cky15lz37"))))
+ (package
+ (inherit template)
+ (outputs '("out" "doc"))
+ (arguments
+ (substitute-keyword-arguments (package-arguments template)
+ ((#:tex-directory _ #t)
+ "latex/lh")
+ ((#:build-targets _ '())
+ ''("nfssfox.ins" "lcyfonts.ins" "ot2fonts.ins" "t2ccfonts.ins"))
+ ((#:phases phases)
+ `(modify-phases ,phases
+ (add-after 'unpack 'chdir
+ (lambda _ (chdir "source/latex/lh")))
+ (replace 'copy-files
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (let* ((source (assoc-ref inputs "source"))
+ (doc (string-append (assoc-ref outputs "doc")
+ "/share/texmf-dist/doc"))
+ (target (string-append (assoc-ref outputs "out")
+ "/share/texmf-dist"))
+ (tex (string-append target "/tex/latex/lh/")))
+ (copy-recursively "build/" tex)
+ (copy-recursively (string-append source "/fonts/source/lh")
+ (string-append target "/fonts/source/lh"))
+ (copy-recursively (string-append source "/tex/plain/lh")
+ (string-append target "/tex/plain/lh"))
+ (copy-recursively (string-append source "/doc")
+ doc))))))))
+ (home-page "https://www.ctan.org/pkg/lh")
+ (synopsis "Cyrillic fonts that support LaTeX standard encodings")
+ (description
+ "The LH fonts address the problem of the wide variety of alphabets that
are written with Cyrillic-style characters. The fonts are the original basis
of the set of T2* and X2 encodings that are now used when LaTeX users need to
write in Cyrillic languages. Macro support in standard LaTeX encodings is
@@ -5927,7 +6631,9 @@ offers support for other (more traditional) encodings. The fonts, in the
standard T2* and X2 encodings are available in Adobe Type 1 format, in the
CM-Super family of fonts. The package also offers its own LaTeX support for
OT2 encoded fonts, CM bright shaped fonts and Concrete shaped fonts.")
- (license license:lppl)))
+ (license license:lppl))))
+
+(define-deprecated-package texlive-latex-lh texlive-lh)
(define-public texlive-marvosym
(package
@@ -5969,7 +6675,7 @@ the derived Type 1 font, together with support files for TeX (LaTeX).")
(file-name (string-append name "-" version "-checkout"))
(sha256
(base32
- "1xyd57c8z1xi0kbqpbad61flcazz68i9ssxrag0gjvci3irxi8xh"))))
+ "140k9dz2g2vj5ypgyqx3px9c1y9a820y8kq139p96lw0yk6839aw"))))
(build-system trivial-build-system)
(arguments
`(#:modules ((guix build utils))
@@ -5998,7 +6704,7 @@ than the bitmaps Metafont creates.")
(uri (texlive-ref "latex" "acmart"))
(sha256
(base32
- "18rl67p2zhngskisnhv78mksv8q8q658l6igkswzswldixmkpphq"))
+ "12wxav9r6v7dlfja9myrwz7famgfpcfwd292qzmgg283xgngh9kd"))
(file-name (string-append name "-" version "-checkout"))))
(build-system texlive-build-system)
(arguments '(#:tex-directory "latex/acmart"))
@@ -6052,7 +6758,7 @@ get a narrower “natural” width.")
"/tex/plain/wasy/"
"/doc/fonts/wasy/")
(base32
- "10dxbqgv42niybj65hj6y47x8lsl83m48rgw2v2s50k05wbghwbm")
+ "1swzxgld3lndi5q0q6zkwbw06ndh13fvp04as7zpwyhh646s0hbx")
#:trivial? #t))
(home-page "https://www.ctan.org/pkg/wasy")
(synopsis "Waldi symbol fonts")
@@ -6061,9 +6767,9 @@ in the Metafont and Adobe Type 1 formats. Support under LaTeX is provided by
the @code{wasysym} package.")
(license license:public-domain)))
-(define-public texlive-latex-wasysym
+(define-public texlive-wasysym
(package
- (name "texlive-latex-wasysym")
+ (name "texlive-wasysym")
(version (number->string %texlive-revision))
(source (origin
(method svn-fetch)
@@ -6071,7 +6777,7 @@ the @code{wasysym} package.")
(file-name (string-append name "-" version "-checkout"))
(sha256
(base32
- "1sgwbfwjjf70g54hh93gsd9jp9nm67w6n74x9d72a56n07jbk5hv"))))
+ "0zxcf0pfqf439cfwl0r5dd93b0v4pbiih36n2pwshdlvnmy0nr50"))))
(build-system texlive-build-system)
(arguments '(#:tex-directory "latex/wasysym"))
(home-page "https://www.ctan.org/pkg/wasysym")
@@ -6083,6 +6789,8 @@ male and female symbols and astronomical symbols, as well as the complete
implements an easy to use interface for these symbols.")
(license license:lppl)))
+(define-deprecated-package texlive-latex-wasysym texlive-wasysym)
+
(define-public texlive-latex-wrapfig
(package
(name "texlive-latex-wrapfig")
@@ -6167,7 +6875,7 @@ package of that name now exists.")
(file-name (string-append name "-" version "-checkout"))
(sha256
(base32
- "1hpsk4yp08qvbl43kqiv0hhwxv3gcqqxcpahyv6ch2b38pbj4bh6"))))
+ "0hnf821yvki9bzfkz79ns9m1msjp3yvd4dhf3268wrpr1zjx6w8v"))))
(build-system texlive-build-system)
(arguments
'(#:tex-directory "latex/preview"
@@ -6199,7 +6907,7 @@ files.")
(file-name (string-append name "-" version "-checkout"))
(sha256
(base32
- "0jmasg40bk53zdd2jc8nc18jvdai3p2wmamy7hwli8gls4nf25qp"))))
+ "09pd4wynksg1y1ddxnqbhk2dc185zw5nyi794d86n3qx8l014ijy"))))
(build-system texlive-build-system)
(arguments '(#:tex-directory "latex/acronym"))
(home-page "https://www.ctan.org/pkg/acronym")
@@ -6227,14 +6935,14 @@ e-TeX.")
"/tex/generic/pdftex/glyphtounicode.tex"
"/tex/generic/pdftex/pdfcolor.tex")
(base32
- "0wsgbl0jrqc1qzgf23dla6b95lv2h8x6xvs5466d8jdrih6pwriq")
+ "1wx928rqsv0x1a8vc7aq49w3nglr4bmlhl822slqglymfxrmb91b")
#:trivial? #t))
;; TODO: add this missing package:
;; dehyph
(propagated-inputs
`(("texlive-cm" ,texlive-cm)
("texlive-etex" ,texlive-etex)
- ("texlive-fonts-knuth-lib" ,texlive-fonts-knuth-lib)
+ ("texlive-knuth-lib" ,texlive-knuth-lib)
("texlive-hyphen-base" ,texlive-hyphen-base)
("texlive-kpathsea" ,texlive-kpathsea)
("texlive-tex-ini-files" ,texlive-tex-ini-files)
@@ -6246,20 +6954,19 @@ e-TeX.")
directly generate PDF documents instead of DVI.")
(license license:gpl2+)))
-(define-public texlive-generic-pdftex
- (deprecated-package "texlive-generic-pdftex" texlive-pdftex))
+(define-deprecated-package texlive-generic-pdftex texlive-pdftex)
(define texlive-texmf
(package
(name "texlive-texmf")
- (version "20190410")
+ (version "20210325")
(source texlive-texmf-src)
(build-system gnu-build-system)
(inputs
`(("texlive-bin" ,texlive-bin)
("lua" ,lua)
("perl" ,perl)
- ("python" ,python-2) ; incompatible with Python 3 (print syntax)
+ ("python" ,python)
("ruby" ,ruby)
("tcsh" ,tcsh)))
(arguments
@@ -6290,9 +6997,15 @@ directly generate PDF documents instead of DVI.")
(share (string-append out "/share"))
(texmfroot (string-append share "/texmf-dist/web2c"))
(texmfcnf (string-append texmfroot "/texmf.cnf"))
+ (fmtutilcnf (string-append texmfroot "/fmtutil.cnf"))
(texlive-bin (assoc-ref inputs "texlive-bin"))
(texbin (string-append texlive-bin "/bin"))
(tlpkg (string-append texlive-bin "/share/tlpkg")))
+ ;; LuaJIT is not ported to powerpc64* yet.
+ (if ,(target-ppc64le?)
+ (substitute* fmtutilcnf
+ (("^(luajittex|luajithbtex|mfluajit)" m)
+ (string-append "#! " m))))
;; Register SHARE as TEXMFROOT in texmf.cnf.
(substitute* texmfcnf
(("TEXMFROOT = \\$SELFAUTOPARENT")
@@ -6329,10 +7042,10 @@ This package contains the complete tree of texmf-dist data.")
(define-public texlive
(package
(name "texlive")
- (version "20190410")
+ (version "20210325")
(source #f)
(build-system trivial-build-system)
- (inputs `(("bash" ,bash) ; for wrap-program
+ (inputs `(("bash" ,bash-minimal) ;for wrap-program
("texlive-bin" ,texlive-bin)
("texlive-texmf" ,texlive-texmf)))
(native-search-paths
@@ -6392,7 +7105,7 @@ This package contains the complete TeX Live distribution.")
(define-public perl-text-bibtex
(package
(name "perl-text-bibtex")
- (version "0.85")
+ (version "0.88")
(source
(origin
(method url-fetch)
@@ -6400,7 +7113,7 @@ This package contains the complete TeX Live distribution.")
version ".tar.gz"))
(sha256
(base32
- "036kxgbn1jf70pfm2lmjlzjwnhbkd888fp5lyvmkjpdd15gla18h"))))
+ "0b7lmjvfmypps1nw6nsdikgaakm0n0g4186glaqazg5xd1p5h55h"))))
(build-system perl-build-system)
(arguments
`(#:phases
@@ -6437,20 +7150,16 @@ values (strings, macros, or numbers) pasted together.")
;; checking the Biber/BibLaTeX compatibility matrix in the BibLaTeX manual
;; at <https://ctan.org/pkg/biblatex>.
(name "biber")
- (version "2.12")
+ (version "2.16")
(source (origin
(method git-fetch)
(uri (git-reference
(url "https://github.com/plk/biber/")
(commit (string-append "v" version))))
(file-name (git-file-name name version))
- ;; TODO: Patch awaiting inclusion upstream (see:
- ;; https://github.com/plk/biber/issues/239).
- (patches (search-patches "biber-fix-encoding-write.patch"
- "biber-sortinithash.patch"))
(sha256
(base32
- "1g1hi6zvf2hmrjly1sidjaxy5440gfqm4p7p3n7kayshnjsmlskx"))))
+ "0586q8y1f2k23mvb02ccm3qsb35cwskafksixsjaih7a7xcf5gxx"))))
(build-system perl-build-system)
(arguments
`(#:phases
@@ -6473,6 +7182,7 @@ values (strings, macros, or numbers) pasted together.")
("perl-datetime-format-builder" ,perl-datetime-format-builder)
("perl-datetime-calendar-julian" ,perl-datetime-calendar-julian)
("perl-file-slurper" ,perl-file-slurper)
+ ("perl-io-string" ,perl-io-string)
("perl-ipc-cmd" ,perl-ipc-cmd)
("perl-ipc-run3" ,perl-ipc-run3)
("perl-list-allutils" ,perl-list-allutils)
@@ -6480,10 +7190,8 @@ values (strings, macros, or numbers) pasted together.")
("perl-mozilla-ca" ,perl-mozilla-ca)
("perl-regexp-common" ,perl-regexp-common)
("perl-log-log4perl" ,perl-log-log4perl)
- ;; We cannot use perl-unicode-collate here, because otherwise the
- ;; hardcoded hashes in the tests would differ. See
- ;; https://mail-archive.com/debian-bugs-dist@lists.debian.org/msg1469249.html
- ;;("perl-unicode-collate" ,perl-unicode-collate)
+ ("perl-parse-recdescent" ,perl-parse-recdescent)
+ ("perl-unicode-collate" ,perl-unicode-collate)
("perl-unicode-normalize" ,perl-unicode-normalize)
("perl-unicode-linebreak" ,perl-unicode-linebreak)
("perl-encode-eucjpascii" ,perl-encode-eucjpascii)
@@ -6624,11 +7332,11 @@ develop documents with LaTeX, in a single application.")
(delete-file "book.pdf")
#t)))))
(native-inputs
- `(("texlive" ,(texlive-union (list texlive-amsfonts
- texlive-fonts-adobe-palatino
- texlive-fonts-adobe-zapfding
- texlive-fonts-knuth-lib
- texlive-fonts-mflogo-font
+ `(("texlive" ,(texlive-updmap.cfg (list texlive-amsfonts
+ texlive-palatino
+ texlive-zapfding
+ texlive-knuth-lib
+ texlive-mflogo-font
texlive-pdftex)))
("automake" ,automake)))
(home-page "https://www.gnu.org/software/teximpatient/")
@@ -6657,33 +7365,31 @@ and Karl Berry.")
#t))))
(build-system qt-build-system)
(arguments
- `(#:configure-flags `("-DLYX_USE_QT=QT5"
- "-DLYX_EXTERNAL_BOOST=1"
- "-DLYX_INSTALL=1"
- "-DLYX_RELEASE=1"
- "-DLYX_PROGRAM_SUFFIX=OFF"
- ,(string-append "-DLYX_INSTALL_PREFIX="
- (assoc-ref %outputs "out")))
- #:phases
- (modify-phases %standard-phases
- (add-after 'unpack 'patch-python
- (lambda* (#:key inputs #:allow-other-keys)
- (substitute* '("lib/configure.py"
- "src/support/ForkedCalls.cpp"
- "src/support/Systemcall.cpp"
- "src/support/os.cpp"
- "src/support/filetools.cpp")
- (("\"python ")
- (string-append "\""
- (assoc-ref inputs "python")
- "/bin/python3 ")))
- #t))
- (add-after 'unpack 'add-missing-test-file
- (lambda _
- ;; Create missing file that would cause tests to fail.
- (with-output-to-file "src/tests/check_layout.cmake"
- (const #t))
- #t)))))
+ (list #:configure-flags
+ #~(list "-DLYX_USE_QT=QT5"
+ "-DLYX_EXTERNAL_BOOST=1"
+ "-DLYX_INSTALL=1"
+ "-DLYX_RELEASE=1"
+ "-DLYX_PROGRAM_SUFFIX=OFF"
+ (string-append "-DLYX_INSTALL_PREFIX=" #$output))
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'patch-python
+ (lambda* (#:key inputs #:allow-other-keys)
+ (substitute* '("lib/configure.py"
+ "src/support/ForkedCalls.cpp"
+ "src/support/Systemcall.cpp"
+ "src/support/os.cpp"
+ "src/support/filetools.cpp")
+ (("\"python ")
+ (string-append "\""
+ (assoc-ref inputs "python")
+ "/bin/python3 ")))))
+ (add-after 'unpack 'add-missing-test-file
+ (lambda _
+ ;; Create missing file that would cause tests to fail.
+ (with-output-to-file "src/tests/check_layout.cmake"
+ (const #t)))))))
(inputs
`(("boost" ,boost)
("hunspell" ,hunspell) ; Note: Could also use aspell instead.
@@ -6694,7 +7400,7 @@ and Karl Berry.")
("qtsvg" ,qtsvg)
("zlib" ,zlib)))
(propagated-inputs
- `(("texlive" ,(texlive-union (list texlive-fonts-ec)))))
+ `(("texlive" ,(texlive-updmap.cfg (list texlive-fonts-ec)))))
(native-inputs
`(("python" ,python)
("pkg-config" ,pkg-config)))
@@ -6721,7 +7427,7 @@ required: automatic sectioning and pagination, spell checking and so forth.")
(file-name (string-append name "-" version "-checkout"))
(sha256
(base32
- "0s86v2b6b1vky1svmmn8pn0l2gz3v280mvjbr2d9l2sjyarlgz9w"))))
+ "0a1v70k6231323y1lazfda1y9568w8hn7c8jhc7rblkhdfv3slw7"))))
(build-system trivial-build-system)
(arguments
`(#:modules ((guix build utils))
@@ -6761,7 +7467,7 @@ specification. It replaces the now obsolete @code{movie15} package.")
(file-name (string-append name "-" version "-checkout"))
(sha256
(base32
- "1yhp51w8yr10c10pc9196q7hlw80brzqinnqbjw81d0sf2p0llc5"))))
+ "1mrz1mj59m27bfya52vi4lm84ifisaf30pmf8id1biqwcq4jyynh"))))
(build-system trivial-build-system)
(arguments
`(#:modules ((guix build utils))
@@ -6802,7 +7508,7 @@ It also ensures compatibility with the @code{media9} and @code{animate} packages
(file-name (string-append name "-" version "-checkout"))
(sha256
(base32
- "0m4wx3yjb5al1qsv995z8fii8xxy96mcfihbnlx43lpgayiwz35s"))))
+ "04ww5abfm7dx81d21yr2gwy9jswaalnfm2384xp4cyx7srd9spfv"))))
(build-system texlive-build-system)
(arguments
'(#:tex-directory "latex/ms"
@@ -6925,7 +7631,7 @@ is preferred in many parts of the world, as distinct from that which is used in
(file-name (string-append name "-" version "-checkout"))
(sha256
(base32
- "1rzdniqq9zk39w8ch8ylx3ywh2mj87s4ivchrsk2b8nx06jyn797"))))
+ "161ka7sckiakcr1fgydxpc580sr16vp4sp3avjl2v9jn1pd2pwp0"))))
(build-system trivial-build-system)
(arguments
`(#:modules ((guix build utils))
@@ -6962,7 +7668,7 @@ striking out (line through words) and crossing out (/// over words).")
(file-name (string-append name "-" version "-checkout"))
(sha256
(base32
- "1dscrgwyr71vgx35mzb316xl669arzagfgq50fdv3nxga63959b3"))))
+ "1jk10rxz5f8vh46am11b40hxhhikk67h9jr3z877q5qc8kwppgza"))))
(build-system trivial-build-system)
(native-inputs
`(("texlive-latex-pgf-generic"
@@ -6976,9 +7682,9 @@ striking out (line through words) and crossing out (/// over words).")
(file-name (string-append "texlive-latex-pgf-generic" version "-checkout"))
(sha256
(base32
- "0hk5x2j15n4pps279cmkbjl1dvhasq3mbhna5xdvp2qgh635ahks"))))))
+ "05zdq7y3am109m5534ahqqp9x5iar3ha68v1r4zkrdly2mijxz2j"))))))
(propagated-inputs
- `(("texlive-latex-xcolor" ,texlive-latex-xcolor)))
+ `(("texlive-xcolor" ,texlive-xcolor)))
(arguments
`(#:modules ((guix build utils))
#:builder
@@ -7020,7 +7726,7 @@ produce either PostScript or PDF output.")
(file-name (string-append name "-" version "-checkout"))
(sha256
(base32
- "1vz9zg7s5w52xr323zgglzprfrvba2zvyzf6b8vrdf4wdghlpv4z"))))
+ "1m6i8162r6ka19q517llrf0lax80rrsq564qirwk1chv5dqsmnfi"))))
(build-system trivial-build-system)
(arguments
`(#:modules ((guix build utils))
@@ -7065,6 +7771,165 @@ refers to the version of scrbook, scrreprt, scrartcl, scrlttr2 and
typearea (which are the main parts of the bundle).")
(license license:lppl1.3+)))
+(define-public texlive-generic-atbegshi
+ (package
+ (inherit (simple-texlive-package
+ "texlive-generic-atbegshi"
+ '("/doc/latex/atbegshi/"
+ "/tex/generic/atbegshi/")
+ (base32
+ "184fr5kd3wl44ix63lwb3ll7dhiikkyw1czbnzrl4am4rx0zh4d8")
+ #:trivial? #t))
+ (home-page "https://www.ctan.org/pkg/atbegshi")
+ (synopsis "Execute commands at @code{\\shipout} time")
+ (description
+ "This package is a modern reimplementation of package @code{everyshi},
+providing various commands to be executed before a @code{\\shipout} command.
+It makes use of e-TeX’s facilities if they are available. The package may
+be used either with LaTeX or with plain TeX.")
+ (license license:lppl1.3c+)))
+
+(define-public texlive-generic-bigintcalc
+ (package
+ (inherit (simple-texlive-package
+ "texlive-generic-bigintcalc"
+ '("/doc/latex/bigintcalc/README.md"
+ "/tex/generic/bigintcalc/")
+ (base32
+ "19grk4p1dh566hgpzhnjyjnrw57hpjijcpr7ci401n9jszcc1xkz")
+ #:trivial? #t))
+ (propagated-inputs
+ `(("texlive-latex-pdftexcmds" ,texlive-latex-pdftexcmds)))
+ (home-page "https://www.ctan.org/pkg/bigintcalc")
+ (synopsis "Integer calculations on very large numbers")
+ (description
+ "This package provides expandable arithmetic operations with big
+integers that can exceed TeX's number limits.")
+ (license license:lppl1.3c+)))
+
+(define-public texlive-generic-bitset
+ (package
+ (inherit (simple-texlive-package
+ "texlive-generic-bitset"
+ '("/doc/latex/bitset/README.md"
+ "/tex/generic/bitset/")
+ (base32
+ "0inj6qpzizvsbxdfsaijnl4iq976kyrnchnm3gc1kc2w389zrn1l")
+ #:trivial? #t))
+ (propagated-inputs
+ `(("texlive-generic-infwarerr" ,texlive-generic-infwarerr)
+ ("texlive-generic-intcalc" ,texlive-generic-intcalc)
+ ("texlive-generic-bigintcalc" ,texlive-generic-bigintcalc)))
+ (home-page "https://www.ctan.org/pkg/bitset")
+ (synopsis "Handle bit-vector datatype")
+ (description
+ "This package defines and implements the data type bit set, a vector
+of bits. The size of the vector may grow dynamically. Individual bits
+can be manipulated.")
+ (license license:lppl1.3c+)))
+
+(define-public texlive-generic-etexcmds
+ (package
+ (inherit (simple-texlive-package
+ "texlive-generic-etexcmds"
+ '("/doc/latex/etexcmds/README.md"
+ "/tex/generic/etexcmds/")
+ (base32
+ "11y6pnlq13bp0ybi7c82g8ds8085zv1zaslgqv3dzhgi3dklpc0c")
+ #:trivial? #t))
+ (propagated-inputs
+ `(("texlive-generic-infwarerr" ,texlive-generic-infwarerr)
+ ("texlive-generic-iftex" ,texlive-generic-iftex)))
+ (home-page "https://www.ctan.org/pkg/etexcmds")
+ (synopsis "Avoid name clashes with e-TeX commands")
+ (description
+ "New primitive commands are introduced in e-TeX; sometimes the names
+collide with existing macros. This package solves the name clashes by
+adding a prefix to e-TeX’s commands. For example, ε-TeX’s
+@code{\\unexpanded} is provided as @code{\\etex@@unexpanded}.")
+ (license license:lppl1.3c+)))
+
+(define-public texlive-generic-gettitlestring
+ (package
+ (inherit (simple-texlive-package
+ "texlive-generic-gettitlestring"
+ '("/doc/latex/gettitlestring/"
+ "/tex/generic/gettitlestring/")
+ (base32
+ "1p4hg9mac03rzvj9dw0ws3zdh55fy1ns954f912algw9f2aq4xgp")
+ #:trivial? #t))
+ (home-page "https://www.ctan.org/pkg/gettitlestring")
+ (synopsis "Clean up title references")
+ (description
+ "This package provides commands for cleaning up the title string
+(such as removing @code{\\label} commands) for packages that typeset such
+strings.")
+ (license license:lppl1.3c+)))
+
+(define-public texlive-generic-infwarerr
+ (package
+ (inherit (simple-texlive-package
+ "texlive-generic-infwarerr"
+ '("/tex/generic/infwarerr/")
+ (base32
+ "19nlrbfmqbkjrrx9x75s9nd6crg1lzimb2fr3hfblaivj6lx8p4r")
+ #:trivial? #t))
+ (home-page "https://www.ctan.org/pkg/infwarerr")
+ (synopsis "Information/warning/error macros")
+ (description
+ "This package provides a complete set of macros for information,
+warning and error messages. Under LaTeX, the commands are wrappers for
+the corresponding LaTeX commands; under Plain TeX they are available as
+complete implementations.")
+ (license license:lppl1.3c+)))
+
+(define-public texlive-generic-intcalc
+ (package
+ (inherit (simple-texlive-package
+ "texlive-generic-intcalc"
+ '("/tex/generic/intcalc/")
+ (base32
+ "0llrnayqwdqxi91yh7panbbiljina3bynv2hxhi6sssaw3pyd92l")
+ #:trivial? #t))
+ (home-page "https://www.ctan.org/pkg/intcalc")
+ (synopsis "Expandable arithmetic operations with integers")
+ (description
+ "This package provides expandable arithmetic operations with integers,
+using the e-TeX extension @code{\\numexpr} if it is available.")
+ (license license:lppl1.3c+)))
+
+(define-public texlive-generic-kvdefinekeys
+ (package
+ (inherit (simple-texlive-package
+ "texlive-generic-kvdefinekeys"
+ '("/tex/generic/kvdefinekeys/")
+ (base32
+ "12nn74skhwiszbdhawqds31caz6d59a5pjmwar0r8lmk4f1jr3xh")
+ #:trivial? #t))
+ (home-page "https://www.ctan.org/pkg/kvdefinekeys")
+ (synopsis "Define keys for use in the @code{kvsetkeys} package")
+ (description
+ "This package provides the @code{\\kv@@define@@key} (analogous to
+keyval’s @code{\\define@@key}, to define keys for use by @code{kvsetkeys}.")
+ (license license:lppl1.3c+)))
+
+(define-public texlive-generic-kvsetkeys
+ (package
+ (inherit (simple-texlive-package
+ "texlive-generic-kvsetkeys"
+ '("/tex/generic/kvsetkeys/")
+ (base32
+ "149vpmv4vms269dzq4sghlngg380sasvxnb3sx9rfs7d9j0finvi")
+ #:trivial? #t))
+ (home-page "https://www.ctan.org/pkg/kvsetkeys")
+ (synopsis "Key value parser with default handler support")
+ (description
+ "This package provides @code{\\kvsetkeys}, a variant of @code{\\setkeys}
+from the @code{keyval} package. Users can specify a handler that deals with
+unknown options. Active commas and equal signs may be used, and only one
+level of curly braces are removed from the values.")
+ (license license:lppl1.3c+)))
+
(define-public texlive-generic-listofitems
(package
(name "texlive-generic-listofitems")
@@ -7079,7 +7944,7 @@ typearea (which are the main parts of the bundle).")
(file-name (string-append name "-" version "-checkout"))
(sha256
(base32
- "1x4wnpca97rnbvvg6wjmbkxxvnfva274q9ahzx746b435q93z3i1"))))
+ "1wnbnfrhi6hgqa78jsw6hljzi03i5x99mlr5n2419hgws52hk67y"))))
(build-system trivial-build-system)
(arguments
`(#:modules ((guix build utils))
@@ -7099,6 +7964,58 @@ the parsing character has been selected by the user, and to access any of
these items with a simple syntax.")
(license license:lppl1.3c+)))
+(define-public texlive-generic-ltxcmds
+ (package
+ (inherit (simple-texlive-package
+ "texlive-generic-ltxcmds"
+ '("/tex/generic/ltxcmds/")
+ (base32
+ "1lr77yai2qivlx26s5094czpfxmg96bhxps5wbm8xn7cpsw0zbd9")
+ #:trivial? #t))
+ (home-page "https://www.ctan.org/pkg/ltxcmds")
+ (synopsis "LaTeX kernel commands extracted for general use")
+ (description
+ "This package exports some utility macros from the LaTeX kernel into
+a separate namespace and also makes them available for other formats such
+as plain TeX.")
+ (license license:lppl1.3c+)))
+
+(define-public texlive-generic-pdfescape
+ (package
+ (inherit (simple-texlive-package
+ "texlive-generic-pdfescape"
+ '("/tex/generic/pdfescape/")
+ (base32
+ "1vbdjmm9bi9ngzz2z1b8jnf6nzf9xsaj5pvyswg13y4dr00mnz6n")
+ #:trivial? #t))
+ (home-page "https://www.ctan.org/pkg/pdfescape")
+ (synopsis "pdfTeX's escape features for plain TeX")
+ (description
+ "This package implements pdfTeX's escape features (@code{\\pdfescapehex},
+@code{\\pdfunescapehex}, @code{\\pdfescapename}, @code{\\pdfescapestring})
+using TeX or e-TeX.")
+ (license license:lppl1.3c+)))
+
+(define-public texlive-generic-uniquecounter
+ (package
+ (inherit (simple-texlive-package
+ "texlive-generic-uniquecounter"
+ '("/doc/latex/uniquecounter/"
+ "/tex/generic/uniquecounter/")
+ (base32
+ "1bjh8vwiqlkmjqndnh4xp116524x4m3hdcyq2s231jiqy8il8dcc")
+ #:trivial? #t))
+ (propagated-inputs
+ `(("texlive-generic-bigintcalc" ,texlive-generic-bigintcalc)
+ ("texlive-generic-infwarerr" ,texlive-generic-infwarerr)))
+ (home-page "https://www.ctan.org/pkg/uniquecounter")
+ (synopsis "Unlimited unique counter")
+ (description
+ "This package provides a kind of counter that provides unique number
+values. Several counters can be created with different names. The numeric
+values are not limited.")
+ (license license:lppl1.3c+)))
+
(define-public texlive-latex-readarray
(package
(name "texlive-latex-readarray")
@@ -7247,11 +8164,9 @@ AMS-LaTeX, AMS-TeX, and plain TeX). The distribution includes Michael Barr's
@code{diag} package, which was previously distributed stand-alone.")
(license license:gpl3+))))
-(define-public texlive-fonts-xypic
- (deprecated-package "texlive-fonts-xypic" texlive-xypic))
+(define-deprecated-package texlive-fonts-xypic texlive-xypic)
-(define-public texlive-generic-xypic
- (deprecated-package "texblive-generic-xypic" texlive-xypic))
+(define-deprecated-package texlive-generic-xypic texlive-xypic)
(define-public texlive-bibtex
(package
@@ -7268,7 +8183,7 @@ AMS-LaTeX, AMS-TeX, and plain TeX). The distribution includes Michael Barr's
(file-name (string-append name "-" version "-checkout"))
(sha256
(base32
- "1wijqq605cbhn2bdaryby3xpkwmnk9ixcrjn5zwlfrxbgfblzfmz"))))
+ "0fr0s3jhrvplddb42if570dxllz54fa0pf4d2am27h8m385nghbf"))))
(build-system trivial-build-system)
(arguments
`(#:modules ((guix build utils))
@@ -7313,8 +8228,7 @@ Support for use with LaTeX is available in @code{freenfss}, part of
(license (license:non-copyleft
"http://mirrors.ctan.org/fonts/charter/readme.charter"))))
-(define-public texlive-fonts-charter
- (deprecated-package "texlive-fonts-charter" texlive-charter))
+(define-deprecated-package texlive-fonts-charter texlive-charter)
(define-public texlive-context
(package
@@ -7357,7 +8271,6 @@ Support for use with LaTeX is available in @code{freenfss}, part of
"/doc/man/man1/mtx-watch.1"
"/doc/man/man1/mtx-youless.1"
-
"/bibtex/bst/context/"
"/context/"
@@ -7391,7 +8304,7 @@ Support for use with LaTeX is available in @code{freenfss}, part of
"/tex/generic/context/"
"/tex/latex/context/")
(base32
- "1npaw9jy41iv9qiilbmcljvc28rjzyjkan6mfcxizv2sbirymwp1")
+ "1rsw760f52rj62i7ms89xgxdi0qw6hag5fs5hb667nclr4kdkam8")
#:trivial? #t))
;; TODO: add these missing packages:
;; xetex, luatex, lm-math, manfnt-font, and mptopdf
@@ -7400,17 +8313,20 @@ Support for use with LaTeX is available in @code{freenfss}, part of
("texlive-lm" ,texlive-lm)
("texlive-pdftex" ,texlive-pdftex)
("texlive-metapost" ,texlive-metapost)
- ("texlive-fonts-stmaryrd" ,texlive-fonts-stmaryrd)
+ ("texlive-stmaryrd" ,texlive-stmaryrd)
("texlive-mflogo-font" ,texlive-mflogo-font)))
(home-page "https://www.ctan.org/pkg/context")
(synopsis "Full featured, parameter driven macro package for TeX")
- (description "A full featured, parameter driven macro package, which fully
-supports advanced interactive documents. See the ConTeXt garden for a wealth
-of support information.")
- (license license:gpl2+)))
+ (description "ConTeXt is a full featured, parameter driven macro package,
+which fully supports advanced interactive documents. See the ConTeXt garden
+for a wealth of support information.")
+ ;; The GPL applies to all code; alternatively, the LaTeX license may be used.
+ ;; The CC-BY-SA license applies to all documentation.
+ (license (list license:lppl1.3c+
+ license:gpl2+
+ license:cc-by-sa4.0))))
-(define-public texlive-context-base
- (deprecated-package "texlive-context-base" texlive-context))
+(define-deprecated-package texlive-context-base texlive-context)
(define-public texlive-beamer
(package
@@ -7419,12 +8335,12 @@ of support information.")
(list "/doc/latex/beamer/"
"/tex/latex/beamer/")
(base32
- "1fqzbkmw2kfxihab8j4dadc3v68xap6v2ghpp2064fna47xlwy1c")
+ "091n27n4l3iac911bvmpp735ffryyzaq46mkclgn3q9jsvc4ngiv")
#:trivial? #t))
(propagated-inputs
- `(("texlive-latex-hyperref" ,texlive-latex-hyperref)
- ("texlive-latex-oberdiek" ,texlive-latex-oberdiek)
- ("texlive-latex-etoolbox" ,texlive-latex-etoolbox)
+ `(("texlive-hyperref" ,texlive-hyperref)
+ ("texlive-oberdiek" ,texlive-oberdiek)
+ ("texlive-etoolbox" ,texlive-etoolbox)
("texlive-latex-pgf" ,texlive-latex-pgf)))
(home-page "https://www.ctan.org/pkg/beamer")
(synopsis "LaTeX class for producing presentations and slides")
@@ -7441,8 +8357,7 @@ effects, varying slide transitions and animations.")
;; dual-licensed under either FDLv1.3+ or LPPL1.3c+.
(license (list license:lppl1.3c+ license:gpl2+ license:fdl1.3+))))
-(define-public texlive-latex-beamer
- (deprecated-package "texlive-latex-beamer" texlive-beamer))
+(define-deprecated-package texlive-latex-beamer texlive-beamer)
(define-public texlive-latex-xmpincl
(package
@@ -7467,58 +8382,44 @@ the metadata is stored in an XML file, and this XML stream is then embedded in
the file to which it applies.")
(license license:gpl3+)))
-(define-public texlive-latex-pdfx
- (package
- (name "texlive-latex-pdfx")
- (version (number->string %texlive-revision))
- (source
- (origin
- (method svn-fetch)
- (uri (texlive-ref "latex" "pdfx"))
- (file-name (string-append name "-" version "-checkout"))
- (sha256
- (base32
- "18294h0cr05fs424m3x6aq24z5hf5zmiflalkj4kvpmsyyqqsj74"))))
- (build-system texlive-build-system)
- (arguments
- '(#:tex-directory "latex/pdfx"
- #:phases
- (modify-phases %standard-phases
- (add-after 'unpack 'fix-encoding
- (lambda _
- (substitute* "pdfx.dtx"
- ((" .+umaczy") "umaczy"))
- #t))
- (add-before 'install 'install-tex-files
- (lambda* (#:key inputs outputs #:allow-other-keys)
- (let ((target (string-append (assoc-ref outputs "out")
- "/share/texmf-dist/tex/latex/pdfx")))
- (mkdir-p target)
- (copy-recursively (assoc-ref inputs "texlive-tex-pdfx") target)
- ;; Install the generated version in the "install" phase.
- (delete-file (string-append target "/pdfx.sty"))
- #t))))))
- (propagated-inputs
- `(("texlive-pdftex" ,texlive-pdftex)))
- (native-inputs
- `(("texlive-tex-pdfx"
- ,(origin
- (method svn-fetch)
- (uri (svn-reference
- (url (string-append "svn://www.tug.org/texlive/tags/"
- %texlive-tag "/Master/texmf-dist/"
- "/tex/latex/pdfx"))
- (revision %texlive-revision)))
- (file-name (string-append "texlive-tex-latex-pdfx-" version "-checkout"))
- (sha256
- (base32
- "171ffvpkj2fab4ljcxv3l6l5c8ga8zavdhmhfq07id8zyyr619ip"))))))
- (home-page "https://www.ctan.org/pkg/pdfx")
- (synopsis "PDF/X and PDF/A support for pdfTeX, LuaTeX and XeTeX")
- (description
- "This package helps LaTeX users to create PDF/X, PDF/A and other
+(define-public texlive-pdfx
+ (let ((template (simple-texlive-package
+ "texlive-pdfx"
+ (list "/doc/latex/pdfx/"
+ "/source/latex/pdfx/"
+ "/tex/latex/pdfx/")
+ (base32
+ "1z4j4d92k2fjmf8jfap4zn7ij97d9rz2jcs9aslcac07ag4x5bdp"))))
+ (package
+ (inherit template)
+ (arguments
+ (substitute-keyword-arguments (package-arguments template)
+ ((#:tex-directory _ #t)
+ "latex/pdfx")
+ ((#:phases phases)
+ `(modify-phases ,phases
+ (add-after 'unpack 'delete-generated-file
+ (lambda _
+ ;; Generate this file from sources
+ (delete-file "tex/latex/pdfx/pdfx.sty")
+ #t))
+ (add-after 'delete-generated-file 'chdir
+ (lambda _ (chdir "source/latex/pdfx") #t))
+ (add-after 'chdir 'fix-encoding
+ (lambda _
+ (substitute* "pdfx.dtx"
+ ((" .+umaczy") "umaczy"))
+ #t))))))
+ (propagated-inputs
+ `(("texlive-pdftex" ,texlive-pdftex)))
+ (home-page "https://www.ctan.org/pkg/pdfx")
+ (synopsis "PDF/X and PDF/A support for pdfTeX, LuaTeX and XeTeX")
+ (description
+ "This package helps LaTeX users to create PDF/X, PDF/A and other
standards-compliant PDF documents with pdfTeX, LuaTeX and XeTeX.")
- (license license:lppl1.2+)))
+ (license license:lppl1.2+))))
+
+(define-deprecated-package texlive-latex-pdfx texlive-pdfx)
(define-public texlive-ydoc
(let ((template (simple-texlive-package
@@ -7542,21 +8443,11 @@ standards-compliant PDF documents with pdfTeX, LuaTeX and XeTeX.")
(add-after 'unpack 'chdir
(lambda _ (chdir "source/latex/ydoc") #t))
(add-after 'copy-files 'move-files
- (lambda* (#:key outputs #:allow-other-keys)
- (let* ((share (string-append (assoc-ref outputs "out")
- "/share/texmf-dist"))
- (target (string-append share "/tex/generic/ydoc"))
- (doc (string-append (assoc-ref outputs "doc")
- "/share/texmf-dist/doc") ))
- (mkdir-p target)
- (for-each
- (lambda (file)
- (rename-file (string-append share "/tex/latex/ydoc/" file)
- (string-append target "/" file)))
- '("ydocincl.tex" "ydocstrip.tex"))
- (mkdir-p doc)
- (rename-file (string-append share "/doc") doc)
- #t)))))))
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (let ((source (assoc-ref inputs "source"))
+ (doc (string-append (assoc-ref outputs "doc")
+ "/share/texmf-dist/doc")))
+ (copy-recursively (string-append source "/doc") doc))))))))
(home-page "http://www.ctan.org/pkg/ydoc")
(synopsis "Macros for documentation of LaTeX classes and packages")
(description "The package provides macros and environments to document
@@ -7576,7 +8467,7 @@ change.")
"/tex/generic/pstricks/"
"/tex/latex/pstricks/")
(base32
- "0sdxdd0qi4sccw9il7d4s7jivs24pq99cdzfnrf0gkqjb1y8s7cl")
+ "15c9iqfq2y9c8c78cvqb6vzd5a5rm7qq5x7m05jq1hb8sgqrqb0j")
#:trivial? #t)))
(package
(inherit template)
@@ -7622,7 +8513,7 @@ of the old package @code{pst-char}.")
"texlive-marginnote"
(list "/source/latex/marginnote/marginnote.dtx")
(base32
- "1vj1k8xm11gjdfj60as42d8lsv3dbzrm5dlgqcfk89d9dzm3k39j"))))
+ "152bwxhnssj40rr72r6cfirvqbnc0h7xnagfrbz58v2xck53qhg1"))))
(package
(inherit template)
(home-page "http://www.ctan.org/pkg/marginnote")
@@ -7643,13 +8534,13 @@ may be used instead of @code{\\marginpar} at almost every place where
frames made with the @code{framed} package.")
(license license:lppl1.3c+))))
-(define-public texlive-iftex
+(define-public texlive-generic-iftex
(let ((template (simple-texlive-package
- "texlive-iftex"
+ "texlive-generic-iftex"
(list "/doc/generic/iftex/"
- "/tex/generic/iftex/iftex.sty")
+ "/tex/generic/iftex/")
(base32
- "089zvw31gby150n1k0zdk2c0q97pgbqs46phxydaqil64b55nnl7")
+ "147xa5kl4kjs05nj8v3kd7dpr5xkz3xp3gdvjih32ccd7527f5vp")
#:trivial? #t)))
(package
(inherit template)
@@ -7663,13 +8554,17 @@ package also provides the @code{\\RequirePDFTeX}, @code{\\RequireXeTeX}, and
LuaTeX (respectively) is not the engine in use.")
(license license:lppl1.3+))))
+(define-deprecated-package texlive-iftex texlive-generic-iftex)
+
+(define-deprecated-package texlive-generic-ifxetex texlive-generic-iftex)
+
(define-public texlive-tools
(let ((template (simple-texlive-package
"texlive-tools"
(list "/doc/latex/tools/"
"/source/latex/tools/")
(base32
- "1ivhij7171wvrgcjn4wah84wxwpd21d0chh3zxab4pj067c8d0mh"))))
+ "1xas0b69r3d5x4zhcqysgybyqaikd9avv6r1bdckb947id3iaz58"))))
(package
(inherit template)
(arguments
@@ -7704,7 +8599,7 @@ are part of the LaTeX required tools distribution, comprising the packages:
(file-name (string-append name "-" version "-checkout"))
(sha256
(base32
- "0wancavix39j240pd8m9cgmwsijwx6jd6n54v8wg0x2rk5m44myp"))))
+ "0w4x82wmdvcmy8z3p55xvpz5q7jac1q1j591hi8mngfyqa8rda1c"))))
(build-system texlive-build-system)
(arguments
'(#:tex-directory "latex/xkeyval"
@@ -7757,7 +8652,7 @@ are part of the LaTeX required tools distribution, comprising the packages:
("texlive-xcolor" ,texlive-xcolor)
("texlive-latex-footmisc" ,texlive-latex-footmisc)
("texlive-latex-listings" ,texlive-latex-listings)
- ("texlive-iftex" ,texlive-iftex)
+ ("texlive-generic-iftex" ,texlive-generic-iftex)
("texlive-pstricks" ,texlive-pstricks)
("texlive-pst-text" ,texlive-pst-text)
("texlive-tools" ,texlive-tools)
@@ -7812,7 +8707,7 @@ The behaviour in standalone mode may adjusted using a configuration file
(list "/source/latex/siunitx/siunitx.dtx"
"/doc/latex/siunitx/README.md")
(base32
- "11kf6znkgw7y5qmw75qk6px6pqf57bwr53q0673zaiyq20lif96c")))
+ "05kl7yid2npp2gbfshnv2xd08w81fkh5h2n5wd9xcpbhlqjzx9sj")))
(build-system texlive-build-system)
(arguments
'(#:tex-directory "latex/siunitx"
@@ -7852,7 +8747,7 @@ package to handle all of the possible unit-related needs of LaTeX users.")
(file-name (string-append name "-" version "-checkout"))
(sha256
(base32
- "1dqid48vgh25wmw8xzmx6x3pfgz1y9f0r8aza1yxq2mjny5yf68x"))))
+ "1mycxzl761p2zzmva8xsjbxbvrxx3vhi5p160mh9kiqwhrs5biz5"))))
(build-system texlive-build-system)
(arguments '(#:tex-directory "latex/booktabs"))
(home-page "http://www.ctan.org/pkg/booktabs")
@@ -7870,7 +8765,7 @@ to what constitutes a good table in this context. The package offers
(list "/doc/latex/csquotes/"
"/tex/latex/csquotes/")
(base32
- "088gvi60d7sdl6fgg68fbz30fnpqc3yrpkx80sfw7vwgar3wm3av")
+ "17y5mrmjmi7n0cgq4cnqr55f4bni6lx1pfdv5pzsmbrzha3mhbfg")
#:trivial? #t)))
(package
(inherit template)
@@ -7928,7 +8823,7 @@ XML file.
(list "/doc/latex/biblatex/"
"/tex/latex/biblatex/")
(base32
- "11kzvny50iklzkamr0rqd5x532q8rxny1xhmf96jl8mzj1d2zmay")
+ "091cz2vrq22d1fr05wljd8vbllsz95q2hn2p8hhrwb2l2xrmxwn8")
#:trivial? #t)))
(package
(inherit template)
@@ -7967,7 +8862,7 @@ section.
(list "/doc/latex/todonotes/"
"/tex/latex/todonotes/")
(base32
- "0lvxsskz4bdfxhd59hf77kiq8k4nh2spb66vc6hifdgi21z8r8wm")
+ "1jqw8jy73488bdr971w0dnlggsvicagpnpx8ddqkma920ba8rabp")
#:trivial? #t)))
(package
(inherit template)
@@ -8006,7 +8901,7 @@ included in the @code{units} bundle.")
(list "/doc/latex/microtype/"
"/tex/latex/microtype/")
(base32
- "0xmjpzbj4nqmnl5m7xx1bshdk2c8n57rmbvn0j479ypj4wdlq9iy")
+ "07861ixrjzxm0l24z82ivhaj4v6xm4ijbaabp66jxsf8s8h7dq9n")
#:trivial? #t)))
(package
(inherit template)
@@ -8031,7 +8926,7 @@ the bundle.")
(list "/doc/latex/caption/"
"/tex/latex/caption/")
(base32
- "09gmh8yjj9f5zak8r18g87w9p5jn7flnvmlhxmvdq6992mbdc6hg")
+ "1isnn375d14xsx398j3m8rbb0pdk12kijw4xcgl82xici170klwq")
#:trivial? #t)))
(package
(inherit template)
@@ -8208,7 +9103,7 @@ a repackaging, for use with TeX, of the Bitstream Vera family.")
"/fonts/vf/public/fourier/"
"/tex/latex/fourier/")
(base32
- "1vs2xdx6f6hd01zlslx3y93g3dsa7k3yhqpnhgkizgjmz0r9ipz1")
+ "04d575nd4yvl58g9dfab9mrjxiv4792bdkz4bjvlkx6x257vlfzn")
#:trivial? #t))
(home-page "https://www.ctan.org/pkg/fourier")
(synopsis "Utopia fonts for LaTeX documents")
@@ -8254,7 +9149,7 @@ matching maths fonts are provided by the @code{fourier} and
(file-name (string-append name "-" version "-checkout"))
(sha256
(base32
- "19mhp9l7cjw0sbq55c9lz0l2pffkyhyir3i63jqynifjmglbgkl7"))))
+ "0j3w1y66pkf3bjl9dh5xy3lfg33rg08s4wx37a3jcndvcji20j3f"))))
(build-system texlive-build-system)
(arguments '(#:tex-directory "latex/fontaxes"))
(home-page "http://www.ctan.org/pkg/fontaxes")
@@ -8297,7 +9192,7 @@ footnote style author/affiliation input in the @command{\\author} command,
(list "/doc/latex/mweights/"
"/tex/latex/mweights/")
(base32
- "1k2xclk54q3xgn48hji23q52nivkzgwf0s30bmm6k83f7v57qv8h")
+ "12493g3yz06mhiybnphqbp49fjzy36clzw63b74mkfhsg1pq7h1b")
#:trivial? #t))
(home-page "https://www.ctan.org/pkg/mweights")
(synopsis "Support for multiple-weight font packages")
@@ -8323,7 +9218,7 @@ or if it differs from the weight desired for another font family. The
"/fonts/vf/impallari/cabin/"
"/tex/latex/cabin/")
(base32
- "0dfq9gqch80iyvp58spmpmqfc9h61sjvnddm81ba0af1p8ag8sfg")
+ "1gqqqbj7i18fs1ss5n3axd821hzq5kbv1dl7dqxp4gba619f1rli")
#:trivial? #t))
(home-page "https://www.ctan.org/pkg/cabin")
(synopsis "Humanist Sans Serif font with LaTeX support")
@@ -8354,7 +9249,7 @@ use with [pdf]LaTeX.")
"/fonts/vf/public/newtx/"
"/tex/latex/newtx/")
(base32
- "0rqjj33m6xkhrjzjhf24kxdg61az5sqsbcl0m7xqkf4akqybn22d")
+ "0h0wm3cd0wxag5x7vy3vgr42jd8m6ffkl90pnkvqdxzbnfdjv3l6")
#:trivial? #t))
(home-page "https://www.ctan.org/pkg/newtx")
(synopsis "Repackaging of the TX fonts with improved metrics")
@@ -8382,7 +9277,7 @@ mathematics package that matches Libertine text quite well.")
"/fonts/vf/public/xcharter/"
"/tex/latex/xcharter/")
(base32
- "0krm4h53lw7h9jbmv5nc89fm4x7i8l574aig1l4mw8w3ziknwmi7")
+ "0d8rvcmvxrlxqqxpirxqbhmiijpsz5y4vvldh1jnc018aannjlhm")
#:trivial? #t))
(home-page "https://www.ctan.org/pkg/xcharter")
(synopsis "Extension of the Bitstream Charter fonts")
@@ -8653,13 +9548,38 @@ Arguments may contain verbatim material or other special use of characters.
The macros were designed for use within other macros.")
(license license:lppl1.3))))
+(define-public texlive-grfext
+ (let ((template (simple-texlive-package
+ "texlive-grfext"
+ (list "/doc/latex/grfext/README.md"
+ "/source/latex/grfext/grfext.dtx")
+ (base32
+ "1cdvjp9gcnixxlbl8ibwz1yr799gwax5hm686hwmwsigdgafhzgq"))))
+ (package
+ (inherit template)
+ (arguments
+ (substitute-keyword-arguments (package-arguments template)
+ ((#:tex-directory _ '())
+ "latex/grfext")
+ ((#:build-targets _ '())
+ ''("grfext.dtx"))
+ ((#:phases phases)
+ `(modify-phases ,phases
+ (add-after 'unpack 'chdir
+ (lambda _ (chdir "source/latex/grfext")))))))
+ (home-page "https://github.com/ho-tex/grfext")
+ (synopsis "Manipulate the graphics package's list of extensions")
+ (description "This package provides macros for adding to, and reordering
+the list of graphics file extensions recognised by package graphics.")
+ (license license:lppl1.3c+))))
+
(define-public texlive-adjustbox
(let ((template (simple-texlive-package
"texlive-adjustbox"
(list "/doc/latex/adjustbox/"
"/source/latex/adjustbox/")
(base32
- "14vd0yd50bky2pbbjkn59q1aglnqpdhh8vwjdyan0jkzljsr2ch8"))))
+ "074nxbnl184b6iwhis5n85pilq3b2pld3bbrq0wc30hw462m898k"))))
(package
(inherit template)
(arguments
@@ -8700,7 +9620,7 @@ provided box macros are @code{\\lapbox}, @code{\\marginbox},
(list "/doc/latex/tcolorbox/"
"/tex/latex/tcolorbox/")
(base32
- "172lcnk6964alsga5w6kcvjhpjjcw1g9df73k8pyhl5lf4fmxa29")
+ "1qnsbblkadzdn1fx2k21xnlwcb35pg9xya24chkm66jmidi22qp0")
#:trivial? #true)))
(package
(inherit template)
diff --git a/gnu/packages/texinfo.scm b/gnu/packages/texinfo.scm
index a2fe989f1a..f9c40b3450 100644
--- a/gnu/packages/texinfo.scm
+++ b/gnu/packages/texinfo.scm
@@ -5,7 +5,7 @@
;;; Copyright © 2017, 2019 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2019 Ricardo Wurmus <rekado@elephly.net>
;;; Copyright © 2019 Pierre-Moana Levesque <pierre.moana.levesque@gmail.com>
-;;; Copyright © 2019 Mathieu Othacehe <m.othacehe@gmail.com>
+;;; Copyright © 2019, 2020 Mathieu Othacehe <m.othacehe@gmail.com>
;;; Copyright © 2020 Nicolas Goaziou <mail@nicolasgoaziou.fr>
;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
;;;
@@ -59,21 +59,18 @@
;; with the native compiler, the environment is reset. This leads to
;; multiple environment variables missing. Do not reset the environment
;; to prevent that.
- (if (%current-target-system)
- '(#:phases
- (modify-phases %standard-phases
- (add-before 'configure 'fix-cross-configure
- (lambda _
- (substitute* "configure"
- (("env -i")
- "env "))
- #t))))
- '()))
+ `(#:phases
+ (if ,(%current-target-system)
+ (modify-phases %standard-phases
+ (add-before 'configure 'fix-cross-configure
+ (lambda _
+ (substitute* "configure"
+ (("env -i")
+ "env "))
+ #t)))
+ %standard-phases)))
(inputs `(("ncurses" ,ncurses)
- ;; TODO: remove `if' in the next rebuild cycle.
- ,@(if (%current-target-system)
- `(("perl" ,perl))
- '())))
+ ("perl" ,perl)))
;; When cross-compiling, texinfo will build some of its own binaries with
;; the native compiler. This means ncurses is needed both in both inputs
;; and native-inputs.
diff --git a/gnu/packages/text-editors.scm b/gnu/packages/text-editors.scm
index 0034aeabd6..2d1f508446 100644
--- a/gnu/packages/text-editors.scm
+++ b/gnu/packages/text-editors.scm
@@ -9,7 +9,7 @@
;;; Copyright © 2019 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2019 Andreas Enge <andreas@enge.fr>
;;; Copyright © 2019, 2020, 2021 Nicolas Goaziou <mail@nicolasgoaziou.fr>
-;;; Copyright © 2020 Marius Bakke <mbakke@fastmail.com>
+;;; Copyright © 2020, 2021 Marius Bakke <marius@gnu.org>
;;; Copyright © 2020 Tom Zander <tomz@freedommail.ch>
;;; Copyright © 2020 Mark Meyer <mark@ofosos.org>
;;; Copyright © 2020 Maxime Devos <maximedevos@telenet.be>
@@ -36,6 +36,7 @@
(define-module (gnu packages text-editors)
#:use-module (guix packages)
#:use-module (guix download)
+ #:use-module (guix gexp)
#:use-module (guix git-download)
#:use-module (guix utils)
#:use-module (guix build-system cargo)
@@ -393,7 +394,7 @@ bindings and many of the powerful features of GNU Emacs.")
`(("aspell" ,aspell)
("boost" ,boost)
("ctags" ,universal-ctags)
- ("gtkmm" ,gtkmm)
+ ("gtkmm" ,gtkmm-3)
("gtksourceviewmm" ,gtksourceviewmm)
("libclang" ,clang-11) ;XXX: must be the same version as Mesas LLVM
("libgit2" ,libgit2)))
@@ -521,35 +522,31 @@ Wordstar-, EMACS-, Pico, Nedit or vi-like key bindings. e3 can be used on
(substitute* "GNUmakefile"
(("/usr/bin/") ""))))))
(build-system gnu-build-system)
- (native-inputs
- `(("pkg-config" ,pkg-config)))
- (inputs
- `(("diffutils" ,diffutils)
- ("libbsd" ,libbsd)
- ("ncurses" ,ncurses)))
+ (native-inputs (list pkg-config))
+ (inputs (list diffutils libbsd ncurses))
(arguments
;; No test suite available.
- `(#:tests? #f
- #:make-flags (list (string-append "prefix=" %output)
- (string-append "CC=" ,(cc-for-target))
- (string-append "PKG_CONFIG=" ,(pkg-config-for-target)))
- #:phases (modify-phases %standard-phases
- (delete 'configure) ; no configure script
- (add-before 'build 'correct-location-of-diff
- (lambda* (#:key inputs #:allow-other-keys)
- (substitute* "buffer.c"
- (("/usr/bin/diff")
- (string-append (assoc-ref inputs "diffutils")
- "/bin/diff")))))
- (add-before 'install 'patch-tutorial-location
- (lambda* (#:key outputs #:allow-other-keys)
- (substitute* "mg.1"
- (("/usr") (assoc-ref outputs "out")))))
- (add-after 'install 'install-tutorial
- (lambda* (#:key outputs #:allow-other-keys)
- (let* ((out (assoc-ref outputs "out"))
- (doc (string-append out "/share/doc/mg")))
- (install-file "tutorial" doc)))))))
+ (list #:tests? #f
+ #:make-flags
+ #~(list (string-append "prefix=" #$output)
+ (string-append "CC=" #$(cc-for-target))
+ (string-append "PKG_CONFIG=" #$(pkg-config-for-target)))
+ #:phases
+ #~(modify-phases %standard-phases
+ (delete 'configure) ;no configure script
+ (add-before 'build 'correct-location-of-diff
+ (lambda* (#:key inputs #:allow-other-keys)
+ (substitute* "buffer.c"
+ (("/usr/bin/diff")
+ (search-input-file inputs "/bin/diff")))))
+ (add-before 'install 'patch-tutorial-location
+ (lambda _
+ (substitute* "mg.1"
+ (("/usr") #$output))))
+ (add-after 'install 'install-tutorial
+ (lambda _
+ (let ((doc (string-append #$output "/share/doc/mg")))
+ (install-file "tutorial" doc)))))))
(home-page "https://homepage.boetes.org/software/mg/")
(synopsis "Microscopic GNU Emacs clone")
(description
@@ -765,7 +762,8 @@ environment with Markdown markup.")
(let ((bin (string-append out "/bin"))
(executable (string-append share "/bin/manuskript")))
(wrap-program executable
- (list "PYTHONPATH" 'prefix (list (getenv "PYTHONPATH"))))
+ (list "GUIX_PYTHONPATH" 'prefix
+ (list (getenv "GUIX_PYTHONPATH"))))
(mkdir-p bin)
(with-directory-excursion bin
(symlink (string-append share "/bin/manuskript")
diff --git a/gnu/packages/textutils.scm b/gnu/packages/textutils.scm
index 7e7293ac16..b2a4dcd3ee 100644
--- a/gnu/packages/textutils.scm
+++ b/gnu/packages/textutils.scm
@@ -22,6 +22,7 @@
;;; Copyright © 2020 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;; Copyright © 2021 Jean-Baptiste Volatier <jbv@pm.me>
;;; Copyright © 2021 Simon Tournier <zimon.toutoune@gmail.com>
+;;; Copyright © 2021 Felix Gruber <felgru@posteo.net>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -1210,7 +1211,7 @@ OpenDocument presentations (*.odp).")
(chdir "python")
(mkdir-p dist)
(setenv "PYTHONPATH"
- (string-append dist ":" (getenv "PYTHONPATH")))
+ (string-append dist ":" (getenv "GUIX_PYTHONPATH")))
(invoke "python" "setup.py" "install"
"--root=/" "--single-version-externally-managed"
(string-append "--prefix=" out))
diff --git a/gnu/packages/time.scm b/gnu/packages/time.scm
index b60fab5db5..9f729ec0a5 100644
--- a/gnu/packages/time.scm
+++ b/gnu/packages/time.scm
@@ -172,14 +172,14 @@ Pendulum instances.")
(define-public python-dateutil
(package
(name "python-dateutil")
- (version "2.8.1")
+ (version "2.8.2")
(source
(origin
(method url-fetch)
(uri (pypi-uri "python-dateutil" version))
(sha256
(base32
- "0g42w7k5007iv9dam6gnja2ry8ydwirh99mgdll35s12pyfzxsvk"))))
+ "11iy7m4bp2lgfkcl0r6xzf34bvk7ppjmsyn2ygfikbi72v6cl8q1"))))
(build-system python-build-system)
(arguments
`(#:phases (modify-phases %standard-phases
@@ -450,17 +450,15 @@ datetime type.")
(define-public python-aniso8601
(package
(name "python-aniso8601")
- (version "1.3.0")
+ (version "9.0.1")
(source
(origin
(method url-fetch)
(uri (pypi-uri "aniso8601" version))
(sha256
(base32
- "1waj54iv3n3lw1fapbz8a93yjgrybgpc86wif5baxdh1arpj9df3"))))
+ "0wxry6riyqajl02mkad8g2q98sx5jr13zndj3fandpzfcxv13qvj"))))
(build-system python-build-system)
- (propagated-inputs
- `(("python-dateutil" ,python-dateutil)))
(home-page "https://bitbucket.org/nielsenb/aniso8601")
(synopsis "Python library for parsing ISO 8601 strings")
(description
diff --git a/gnu/packages/tls.scm b/gnu/packages/tls.scm
index 905197525d..a93621fa93 100644
--- a/gnu/packages/tls.scm
+++ b/gnu/packages/tls.scm
@@ -5,7 +5,7 @@
;;; Copyright © 2013, 2015 Andreas Enge <andreas@enge.fr>
;;; Copyright © 2015 David Thompson <davet@gnu.org>
;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020, 2021 Leo Famulari <leo@famulari.name>
-;;; Copyright © 2016, 2017, 2019 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2016, 2017, 2019, 2021 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2016, 2017, 2018 Nikita <nikita@n0.is>
;;; Copyright © 2016 Hartmut Goebel <h.goebel@crazy-compilers.com>
;;; Copyright © 2017 Ricardo Wurmus <rekado@elephly.net>
@@ -15,8 +15,10 @@
;;; Copyright © 2018 Clément Lassieur <clement@lassieur.org>
;;; Copyright © 2019 Mathieu Othacehe <m.othacehe@gmail.com>
;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
+;;; Copyright © 2020, 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;; Copyright © 2021 Solene Rapenne <solene@perso.pw>
;;; Copyright © 2021 Brice Waegeneire <brice@waegenei.re>
+;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be>
;;; Copyright © 2021 Matthew James Kraai <kraai@ftbfs.org>
;;; Copyright © 2021 John Kehayias <john.kehayias@protonmail.com>
;;;
@@ -41,6 +43,7 @@
#:use-module (guix download)
#:use-module (guix git-download)
#:use-module (guix utils)
+ #:use-module (guix gexp)
#:use-module (guix build-system gnu)
#:use-module (guix build-system go)
#:use-module (guix build-system perl)
@@ -55,6 +58,7 @@
#:use-module (gnu packages curl)
#:use-module (gnu packages dns)
#:use-module (gnu packages gawk)
+ #:use-module (gnu packages gettext)
#:use-module (gnu packages guile)
#:use-module (gnu packages hurd)
#:use-module (gnu packages libbsd)
@@ -63,6 +67,7 @@
#:use-module (gnu packages linux)
#:use-module (gnu packages ncurses)
#:use-module (gnu packages nettle)
+ #:use-module (gnu packages networking)
#:use-module (gnu packages perl)
#:use-module (gnu packages pkg-config)
#:use-module (gnu packages python)
@@ -78,7 +83,7 @@
(define-public libtasn1
(package
(name "libtasn1")
- (version "4.16.0")
+ (version "4.17.0")
(source
(origin
(method url-fetch)
@@ -86,7 +91,7 @@
version ".tar.gz"))
(sha256
(base32
- "179jskl7dmfp1rd2khkzmlibzgki4wi6hvmmwfv7q49r728b03qf"))))
+ "19a53i1ajs4dd8nnlr2i6gbzvla84ay71g3y1phvh8krx8f5brzc"))))
(build-system gnu-build-system)
(arguments
`(#:configure-flags '("--disable-static")))
@@ -140,13 +145,33 @@ in intelligent transportation networks.")
(base32 "1dn6br4v033d3gp2max9lsr3y4q0nj6iyr1yq3kzi8ym7lal13wa"))))
(build-system gnu-build-system)
(native-inputs
- `(("pkg-config" ,pkg-config)))
+ `(,@(if (hurd-target?)
+ `(("autoconf" ,autoconf)
+ ("automake" ,automake)
+ ("gettext" ,gettext-minimal) ;for autopoint
+ ("libtool" ,libtool))
+ '())
+ ("pkg-config" ,pkg-config)))
(inputs
`(("libffi" ,libffi)
+ ,@(if (hurd-target?)
+ `(("libbsd" ,libbsd)
+ ("hurd-patch" ,(search-patch "p11-kit-hurd.patch")))
+ '())
("libtasn1" ,libtasn1)))
(arguments
`(#:configure-flags '("--without-trust-paths")
#:phases (modify-phases %standard-phases
+ ,@(if (hurd-target?)
+ '((add-after 'unpack 'apply-hurd-patch
+ (lambda* (#:key inputs #:allow-other-keys)
+ (let ((patch (assoc-ref inputs "hurd-patch")))
+ (invoke "patch" "-p1" "--batch" "-i"
+ patch))))
+ (replace 'bootstrap
+ (lambda _
+ (invoke "autoreconf" "-fiv"))))
+ '())
(add-before 'check 'prepare-tests
(lambda _
;; "test-runtime" expects XDG_RUNTIME_DIR to be set up
@@ -187,8 +212,7 @@ living in the same process.")
(define-public gnutls
(package
(name "gnutls")
- (version "3.6.15")
- (replacement gnutls-3.6.16)
+ (version "3.7.2")
(source (origin
(method url-fetch)
;; Note: Releases are no longer on ftp.gnu.org since the
@@ -198,19 +222,20 @@ living in the same process.")
"/gnutls-" version ".tar.xz"))
(patches (search-patches "gnutls-skip-trust-store-test.patch"
"gnutls-cross.patch"
- "gnutls-CVE-2021-20231.patch"
- "gnutls-CVE-2021-20232.patch"))
+ "gnutls-guile-eintr-eagain.patch"))
(sha256
(base32
- "0n0m93ymzd0q9hbknxc2ycanz49sqlkyyf73g9fk7n787llc7a0f"))))
+ "0li7mwjnm64mbxhacz0rpf6i9qd83f53fvbrx96alpqqk9d6qvk4"))))
(build-system gnu-build-system)
(arguments
`(#:tests? ,(not (or (%current-target-system)
(hurd-target?)))
- ;; Ensure we don't keep a reference to net-tools.
- #:disallowed-references ,(if (hurd-target?) '() (list net-tools))
+ ;; Ensure we don't keep a reference to the tools used for testing.
+ #:disallowed-references ,(if (hurd-target?)
+ '()
+ (list net-tools iproute socat))
#:configure-flags
- (list
+ (cons*
;; GnuTLS doesn't consult any environment variables to specify
;; the location of the system-wide trust store. Instead it has a
;; configure-time option. Unless specified, its configure script
@@ -231,13 +256,25 @@ living in the same process.")
(string-append "--with-guile-extension-dir="
"$(libdir)/guile/$(GUILE_EFFECTIVE_VERSION)/extensions")
- ;; FIXME: Temporarily disable p11-kit support since it is not
- ;; working on mips64el.
- "--without-p11-kit")
+ (let ((system ,(or (%current-target-system)
+ (%current-system))))
+ (if (string-prefix? "mips64el" system)
+ (list
+ ;; FIXME: Temporarily disable p11-kit support since it is
+ ;; not working on mips64el.
+ "--without-p11-kit")
+ '())))
#:phases (modify-phases %standard-phases
- (add-after
- 'install 'move-doc
+ ;; fastopen.sh fails to connect to the server in the builder
+ ;; environment (see:
+ ;; https://gitlab.com/gnutls/gnutls/-/issues/1095).
+ (add-after 'unpack 'disable-failing-tests
+ (lambda _
+ (substitute* "tests/fastopen.sh"
+ (("^unset RETCODE")
+ "exit 77\n")))) ;skip
+ (add-after 'install 'move-doc
(lambda* (#:key outputs #:allow-other-keys)
;; Copy the 4.1 MiB of section 3 man pages to "doc".
(let* ((out (assoc-ref outputs "out"))
@@ -246,8 +283,7 @@ living in the same process.")
(oldman (string-append out "/share/man/man3")))
(mkdir-p mandir)
(copy-recursively oldman mandir)
- (delete-file-recursively oldman)
- #t))))))
+ (delete-file-recursively oldman)))))))
(outputs '("out" ;4.4 MiB
"debug"
"doc")) ;4.1 MiB of man pages
@@ -257,10 +293,14 @@ living in the same process.")
'())
,@(if (hurd-target?)
'()
- `(("net-tools" ,net-tools)))
+ `(("net-tools" ,net-tools)
+ ("iproute" ,iproute) ;for 'ss'
+ ("socat" ,socat))) ;several tests rely on it
("pkg-config" ,pkg-config)
+ ("texinfo" ,texinfo)
("which" ,which)
- ,@(if (hurd-target?) '()
+ ,@(if (hurd-target?)
+ '()
`(("datefudge" ,datefudge))) ;tests rely on 'datefudge'
("util-linux" ,util-linux))) ;one test needs 'setsid'
(inputs
@@ -270,7 +310,12 @@ living in the same process.")
`(("libtasn1" ,libtasn1)
("libidn2" ,libidn2)
("nettle" ,nettle)
- ("zlib" ,zlib)))
+ ("zlib" ,zlib)
+ ,@(let ((system (or (%current-target-system)
+ (%current-system))))
+ (if (string-prefix? "mips64el" system)
+ '()
+ `(("p11-kit" ,p11-kit))))))
(home-page "https://www.gnu.org/software/gnutls/")
(synopsis "Transport layer security library")
(description
@@ -282,68 +327,6 @@ required structures.")
(properties '((ftp-server . "ftp.gnutls.org")
(ftp-directory . "/gcrypt/gnutls")))))
-;; Replacement package to fix CVE-2021-20305.
-(define gnutls-3.6.16
- (package
- (inherit gnutls)
- (version "3.6.16")
- (source (origin
- (method url-fetch)
- (uri (string-append "mirror://gnupg/gnutls/v"
- (version-major+minor version)
- "/gnutls-" version ".tar.xz"))
- (patches (search-patches "gnutls-skip-trust-store-test.patch"
- "gnutls-cross.patch"))
- (sha256
- (base32
- "1czk511pslz367shf32f2jvvkp7y1323bcv88c2qng98mj0v6y8v"))))
- (arguments
- (if (%current-target-system)
- (substitute-keyword-arguments (package-arguments gnutls)
- ((#:phases phases '%standard-phases)
- `(modify-phases ,phases
- (add-before 'configure 'build-eccdata-headers
- (lambda* (#:key configure-flags #:allow-other-keys)
- ;; Build the 'ecc/eccdata' program using the native
- ;; compiler, not the cross-compiler as happens by default,
- ;; and use it to build lib/nettle/ecc/ecc-*.h. In GnuTLS
- ;; 3.6.15, this was not necessary because the tarball
- ;; contained pre-generated lib/nettle/ecc/ecc-*.h files as
- ;; well as 'ecc/eccdata.stamp'.
- (let ((jobs (number->string (parallel-job-count)))
- (patch (assoc-ref %standard-phases
- 'patch-generated-file-shebangs)))
- (mkdir "+native-build")
- (with-directory-excursion "+native-build"
- ;; Build natively, with the native compiler, GMP, etc.
- (invoke "../configure"
- (string-append "SHELL=" (which "sh"))
- (string-append "CONFIG_SHELL=" (which "sh"))
- "NETTLE_CFLAGS= " "NETTLE_LIBS= "
- "HOGWEED_CFLAGS= " "HOGWEED_LIBS= "
- "LIBTASN1_CFLAGS= " "LIBTASN1_LIBS= "
- "ac_cv_func_nettle_rsa_sec_decrypt=yes"
- "--without-p11-kit" "--disable-guile")
- (patch)
- (invoke "make" "-C" "gl" "-j" jobs)
- (invoke "make" "-C" "lib/nettle" "V=1" "-j" jobs))
-
- ;; Copy the files we obtained during native build.
- (for-each (lambda (file)
- (install-file file "lib/nettle/ecc"))
- (find-files
- "+native-build/lib/nettle/ecc"
- "^(eccdata\\.stamp|ecc-.*\\.h)$"))))))))
- (package-arguments gnutls)))
- (native-inputs
- (if (%current-target-system)
- `(("libtasn1" ,libtasn1) ;for 'ecc/eccdata'
- ("libidn2" ,libidn2)
- ("nettle" ,nettle)
- ("zlib" ,zlib)
- ,@(package-native-inputs gnutls))
- (package-native-inputs gnutls)))))
-
(define-public gnutls/guile-2.0
;; GnuTLS for Guile 2.0.
(package/inherit gnutls
@@ -368,148 +351,37 @@ required structures.")
,@(alist-delete "guile"
(package-inputs gnutls))))))
-(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))
+(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")))
- (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
+(define-public openssl
(package
- (inherit openssl)
+ (name "openssl")
(version "1.1.1l")
(source (origin
(method url-fetch)
@@ -523,7 +395,118 @@ required structures.")
(patches (search-patches "openssl-1.1-c-rehash-in.patch"))
(sha256
(base32
- "1lbblxps2fhmz7bqh058iywh5wxfignbfx1s1kz2fj63b5g3wyhb"))))))
+ "1lbblxps2fhmz7bqh058iywh5wxfignbfx1s1kz2fj63b5g3wyhb"))))
+ (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 (or (target-arm?)
+ (target-riscv64?))
+ #~((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/")))
;; We will not add any new uses of this package. If you add new code that uses
;; this package, your change will be reverted!
@@ -567,7 +550,7 @@ required structures.")
;; 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")))
@@ -590,9 +573,9 @@ required structures.")
;; 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"
@@ -600,12 +583,12 @@ required structures.")
;; 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"))
- '())))))
+ #$@(if (%current-target-system)
+ '((getenv "CONFIGURE_TARGET_ARCH"))
+ '())))))
(delete 'move-extra-documentation)
(add-after 'install 'move-man3-pages
(lambda* (#:key outputs #:allow-other-keys)
@@ -630,7 +613,7 @@ required structures.")
;; 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
@@ -950,8 +933,7 @@ number generator")
(modify-phases %standard-phases
(add-after 'unpack 'patch-paths
(lambda* (#:key inputs #:allow-other-keys)
- (let ((pem (string-append (assoc-ref inputs "libressl")
- "/etc/ssl/cert.pem")))
+ (let ((pem (search-input-file inputs "/etc/ssl/cert.pem")))
(substitute* "http.c"
(("/etc/ssl/cert.pem") pem))
#t)))
diff --git a/gnu/packages/tmux.scm b/gnu/packages/tmux.scm
index 682fa9737a..e0aa2b3751 100644
--- a/gnu/packages/tmux.scm
+++ b/gnu/packages/tmux.scm
@@ -171,10 +171,6 @@ windows.")
(modify-phases %standard-phases
(replace 'check
(lambda _
- ;; Extend PYTHONPATH so the built package will be found.
- (setenv "PYTHONPATH"
- (string-append (getcwd) "/build/lib:"
- (getenv "PYTHONPATH")))
;; Fix <https://github.com/tmux-python/libtmux/issues/265>.
(setenv "LANG" "en_US.utf8")
;; Skip tests that I suspect fail because of a change
diff --git a/gnu/packages/tor.scm b/gnu/packages/tor.scm
index a881e68241..fc489dcbaf 100644
--- a/gnu/packages/tor.scm
+++ b/gnu/packages/tor.scm
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2013, 2014, 2015 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2013, 2014, 2015, 2021 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
;;; Copyright © 2016, 2017, 2018, 2020, 2021 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2016, 2017 Nikita <nikita@n0.is>
@@ -64,7 +64,8 @@
version ".tar.gz"))
(sha256
(base32
- "0sj7qn6d6js6gk4vjfkc7p9g021czbfaq00yfq3mn5ycnhvimkhm"))))
+ "0sj7qn6d6js6gk4vjfkc7p9g021czbfaq00yfq3mn5ycnhvimkhm"))
+ (patches (search-patches "tor-sandbox-i686.patch"))))
(build-system gnu-build-system)
(arguments
`(#:configure-flags
@@ -75,8 +76,19 @@
(add-before 'check 'skip-practracker
;; This is a style linter. It doesn't get to throw fatal errors.
(lambda _
- (setenv "TOR_DISABLE_PRACTRACKER" "set")
- #t)))))
+ (setenv "TOR_DISABLE_PRACTRACKER" "set")))
+ ,@(if (or (target-aarch64?)
+ (target-ppc32?))
+ ;; Work around upstream issue relating to sandboxing and glibc-2.33.
+ ;; This is similar to the issue the tor-sandbox-i686 patch fixes
+ ;; but for other architectures.
+ ;; https://gitlab.torproject.org/tpo/core/tor/-/issues/40381
+ ;; https://gitlab.torproject.org/tpo/core/tor/-/merge_requests/446
+ `((add-before 'check 'adjust-test-suite
+ (lambda _
+ (substitute* "src/test/test_include.sh"
+ ((".*Sandbox 1.*") "")))))
+ '()))))
(native-inputs
`(("pkg-config" ,pkg-config)
("python" ,python))) ; for tests
@@ -226,7 +238,7 @@ networks.")
(define-public onionshare-cli
(package
(name "onionshare-cli")
- (version "2.3.2")
+ (version "2.4")
(source
(origin
(method git-fetch)
@@ -235,7 +247,7 @@ networks.")
(commit (string-append "v" version))))
(file-name (git-file-name name version))
(sha256
- (base32 "1qk0zvbaws9md1lmi0al1jc8v86l65nf7n3w1s36iwsfzazc6clv"))))
+ (base32 "157ryxm4p1q7b3nj32v9fziw1li6s6s203b7ll80js14cbp6dj9d"))))
(build-system python-build-system)
(native-inputs
`(("python-pytest" ,python-pytest)))
@@ -247,6 +259,7 @@ networks.")
("python-flask" ,python-flask)
("python-flask-httpauth" ,python-flask-httpauth)
("python-flask-socketio" ,python-flask-socketio)
+ ("python-pynacl" ,python-pynacl)
("python-psutil" ,python-psutil)
("python-pycryptodome" ,python-pycryptodome)
("python-pysocks" ,python-pysocks)
@@ -264,18 +277,21 @@ networks.")
"desktop/src/onionshare/gui_common.py")
(("shutil\\.which\\(\\\"tor\\\"\\)")
(string-append "\"" (which "tor") "\"")))
- #t))
+ (substitute* "cli/tests/test_cli_common.py"
+ (("/usr/share/tor")
+ (string-append (assoc-ref inputs "tor") "/share/tor")))))
(add-before 'build 'change-directory
- (lambda _ (chdir "cli") #t))
+ (lambda _ (chdir "cli")))
(replace 'check
- (lambda _
- (setenv "HOME" "/tmp")
- ;; Greendns is not needed for testing, and if eventlet tries to
- ;; load it, an OSError is thrown when getprotobyname is called.
- ;; Thankfully there is an environment variable to disable the
- ;; greendns import, so use it:
- (setenv "EVENTLET_NO_GREENDNS" "yes")
- (invoke "pytest" "-v" "./tests"))))))
+ (lambda* (#:key tests? #:allow-other-keys)
+ (when tests?
+ (setenv "HOME" "/tmp")
+ ;; Greendns is not needed for testing, and if eventlet tries to
+ ;; load it, an OSError is thrown when getprotobyname is called.
+ ;; Thankfully there is an environment variable to disable the
+ ;; greendns import, so use it:
+ (setenv "EVENTLET_NO_GREENDNS" "yes")
+ (invoke "pytest" "-v" "./tests")))))))
(home-page "https://onionshare.org/")
(synopsis "Securely and anonymously share files")
(description "OnionShare lets you securely and anonymously share files,
@@ -294,7 +310,7 @@ OnionShare.")
((#:phases phases)
`(modify-phases ,phases
(replace 'change-directory
- (lambda _ (chdir "desktop/src") #t))
+ (lambda _ (chdir "desktop/src")))
(add-after 'unpack 'patch-tests
(lambda _
;; Disable tests that require starting servers, which will hang
@@ -334,22 +350,19 @@ OnionShare.")
(display line out)
(loop))))))))))
(replace 'check
- (lambda _
- ;; Some tests need a writable homedir:
- (setenv "HOME" "/tmp")
- ;; Ensure installed modules can be found:
- (setenv "PYTHONPATH"
- (string-append %output "/lib/python"
- ,(version-major+minor (package-version python))
- "/site-packages:"
- (getenv "PYTHONPATH")))
- ;; Avoid `getprotobyname` issues:
- (setenv "EVENTLET_NO_GREENDNS" "yes")
- ;; Make Qt render "offscreen":
- (setenv "QT_QPA_PLATFORM" "offscreen")
- ;; Must be run from "desktop" dir:
- (chdir "..")
- (invoke "./tests/run.sh")))
+ (lambda* (#:key tests? inputs outputs #:allow-other-keys)
+ (when tests?
+ ;; Some tests need a writable homedir:
+ (setenv "HOME" "/tmp")
+ ;; Ensure installed modules can be found:
+ (add-installed-pythonpath inputs outputs)
+ ;; Avoid `getprotobyname` issues:
+ (setenv "EVENTLET_NO_GREENDNS" "yes")
+ ;; Make Qt render "offscreen":
+ (setenv "QT_QPA_PLATFORM" "offscreen")
+ ;; Must be run from "desktop" dir:
+ (with-directory-excursion ".."
+ (invoke "./tests/run.sh")))))
(add-after 'install 'install-data
(lambda* (#:key outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))
@@ -357,8 +370,7 @@ OnionShare.")
(install-file "org.onionshare.OnionShare.svg"
(string-append share "/icons/hicolor/scalable/apps"))
(install-file "org.onionshare.OnionShare.desktop"
- (string-append share "/applications"))
- #t)))))))
+ (string-append share "/applications")))))))))
(native-inputs
`(("python-pytest" ,python-pytest)))
(inputs
diff --git a/gnu/packages/tryton.scm b/gnu/packages/tryton.scm
index d5cfb63e1b..0ac0a5a5cd 100644
--- a/gnu/packages/tryton.scm
+++ b/gnu/packages/tryton.scm
@@ -60,7 +60,7 @@
("python-psycopg2" ,python-psycopg2)
("python-relatorio" ,python-relatorio)
("python-sql" ,python-sql)
- ("python-werkzeug" ,python-werkzeug)
+ ("python-werkzeug" ,python-werkzeug-1.0) ;setup.py requires werkzeug<2
("python-wrapt" ,python-wrapt)))
(native-inputs
`(("python-mock" ,python-mock)
@@ -113,7 +113,7 @@ and security.")
`(("glib-compile-schemas" ,glib "bin")
("gobject-introspection" ,gobject-introspection)))
(propagated-inputs
- `(("gdk-pixbuf" ,gdk-pixbuf+svg)
+ `(("librsvg" ,librsvg)
("gsettings-desktop-schemas" ,gsettings-desktop-schemas)
("gtk+" ,gtk+)
("python-dateutil" ,python-dateutil)
@@ -172,7 +172,7 @@ the build system."
;;; Tryton modules - please sort alphabetically
;;;
-(define %standard-trytond-native-inputs
+(define (%standard-trytond-native-inputs)
;; native-inputs required by most of the tryton module for running the test
`(("python-dateutil" ,python-dateutil)
("python-genshi" ,python-genshi)
@@ -183,7 +183,7 @@ the build system."
("python-proteus" ,python-proteus)
("python-relatorio" ,python-relatorio)
("python-sql" ,python-sql)
- ("python-werkzeug" ,python-werkzeug)
+ ("python-werkzeug" ,python-werkzeug-1.0)
("python-wrapt" ,python-wrapt)))
(define-public trytond-account
@@ -198,7 +198,7 @@ the build system."
(base32 "0j1mn8sd5n8rkwgfvcy9kf8s7s3qxvnilnc72i83ac573zj922xc"))))
(build-system python-build-system)
(arguments (tryton-arguments "account"))
- (native-inputs `(,@%standard-trytond-native-inputs))
+ (native-inputs (%standard-trytond-native-inputs))
(propagated-inputs
`(("python-simpleeval" ,python-simpleeval)
("trytond" ,trytond)
@@ -228,7 +228,7 @@ most of accounting needs.")
(build-system python-build-system)
(arguments (tryton-arguments "account_asset"))
(native-inputs
- `(,@%standard-trytond-native-inputs
+ `(,@(%standard-trytond-native-inputs)
("trytond-purchase" ,trytond-purchase)))
(propagated-inputs
`(("trytond" ,trytond)
@@ -254,7 +254,7 @@ of fixed assets.")
(base32 "1l4zxsh9f3ndsgj3224xv23nr7gbg5kwrydwgv34nlkyxp5557dk"))))
(build-system python-build-system)
(arguments (tryton-arguments "account_be"))
- (native-inputs `(,@%standard-trytond-native-inputs))
+ (native-inputs (%standard-trytond-native-inputs))
(propagated-inputs
`(("trytond" ,trytond)
("trytond-account" ,trytond-account)
@@ -278,7 +278,7 @@ chart of account for Belgium.")
(build-system python-build-system)
(arguments (tryton-arguments "account_cash_rounding"))
(native-inputs
- `(,@%standard-trytond-native-inputs
+ `(,@(%standard-trytond-native-inputs)
("trytond-account-invoice" ,trytond-account-invoice)
("trytond-purchase" ,trytond-purchase)
("trytond-sale" ,trytond-sale)))
@@ -306,7 +306,7 @@ amounts to be rounded using the cash rounding factor of the currency.")
(build-system python-build-system)
(arguments (tryton-arguments "account_credit_limit"))
(native-inputs
- `(,@%standard-trytond-native-inputs
+ `(,@(%standard-trytond-native-inputs)
("trytond-account-dunning" ,trytond-account-dunning)))
(propagated-inputs
`(("trytond" ,trytond)
@@ -331,7 +331,7 @@ credit limit of parties.")
(base32 "1dhgspabr2bm0y6qkzh5kz6badhf23arzkw7lra1zsn52r23j9dl"))))
(build-system python-build-system)
(arguments (tryton-arguments "account_de_skr03"))
- (native-inputs `(,@%standard-trytond-native-inputs))
+ (native-inputs (%standard-trytond-native-inputs))
(propagated-inputs
`(("trytond" ,trytond)
("trytond-account" ,trytond-account)))
@@ -353,7 +353,7 @@ Tryton.")
(base32 "005yw868wxv8fhp7dlqd2z19hhjlmk4cgqa36axdfjmbwxvh1r6r"))))
(build-system python-build-system)
(arguments (tryton-arguments "account_deposit"))
- (native-inputs `(,@%standard-trytond-native-inputs))
+ (native-inputs (%standard-trytond-native-inputs))
(propagated-inputs
`(("trytond" ,trytond)
("trytond-account" ,trytond-account)
@@ -382,7 +382,7 @@ the party.")
(base32 "0d5wabn5g1gzmllihkdhzqix934184v303pp20927qxpzb2pm3qw"))))
(build-system python-build-system)
(arguments (tryton-arguments "account_dunning"))
- (native-inputs `(,@%standard-trytond-native-inputs))
+ (native-inputs (%standard-trytond-native-inputs))
(propagated-inputs
`(("trytond" ,trytond)
("trytond-account" ,trytond-account)
@@ -406,7 +406,7 @@ receivable move lines.")
(base32 "0sbh2rnziw5fhlbaq4n8q9rwqcgz35rik77dbvhflyyjdxh51vfq"))))
(build-system python-build-system)
(arguments (tryton-arguments "account_dunning_email"))
- (native-inputs `(,@%standard-trytond-native-inputs))
+ (native-inputs (%standard-trytond-native-inputs))
(propagated-inputs
`(("trytond" ,trytond)
("trytond-account-dunning" ,trytond-account-dunning)
@@ -432,7 +432,7 @@ emails.")
(build-system python-build-system)
(arguments (tryton-arguments "account_dunning_fee"))
(native-inputs
- `(,@%standard-trytond-native-inputs
+ `(,@(%standard-trytond-native-inputs)
("trytond-account-dunning-letter" ,trytond-account-dunning-letter)))
(propagated-inputs
`(("trytond" ,trytond)
@@ -456,7 +456,7 @@ accounting moves as fees when processing dunning.")
(base32 "0xb0mpf7n8jjgm8sb52q5sb2fjs1ap1gc0p33csdgz2lyh66lh3b"))))
(build-system python-build-system)
(arguments (tryton-arguments "account_dunning_letter"))
- (native-inputs `(,@%standard-trytond-native-inputs))
+ (native-inputs (%standard-trytond-native-inputs))
(propagated-inputs
`(("trytond" ,trytond)
("trytond-account" ,trytond-account)
@@ -483,7 +483,7 @@ letters.")
(build-system python-build-system)
(arguments (tryton-arguments "account_es"))
(native-inputs
- `(,@%standard-trytond-native-inputs
+ `(,@(%standard-trytond-native-inputs)
("trytond-account-asset" ,trytond-account-asset)
("trytond-account-payment-sepa" ,trytond-account-payment-sepa)))
(propagated-inputs
@@ -522,7 +522,7 @@ A wizard allows to generate the following AEAT files:
(base32 "1x3w7iijkckv20q8lpqb5fnfrvddm130f51mcpnh4hlyx14q1c5i"))))
(build-system python-build-system)
(arguments (tryton-arguments "account_eu"))
- (native-inputs `(,@%standard-trytond-native-inputs))
+ (native-inputs (%standard-trytond-native-inputs))
(propagated-inputs
`(("trytond" ,trytond)
("trytond-account" ,trytond-account)
@@ -552,7 +552,7 @@ accounting requirements in Europe. It includes:
(base32 "1zpzdnd68gsjrz4as019amygdh8yad8wvwrm22dbccwmbbnyvqpg"))))
(build-system python-build-system)
(arguments (tryton-arguments "account_fr"))
- (native-inputs `(,@%standard-trytond-native-inputs))
+ (native-inputs (%standard-trytond-native-inputs))
(propagated-inputs
`(("trytond" ,trytond)
("trytond-account" ,trytond-account)
@@ -576,7 +576,7 @@ for Tryton.")
(build-system python-build-system)
(arguments (tryton-arguments "account_fr_chorus"))
(native-inputs
- `(,@%standard-trytond-native-inputs
+ `(,@(%standard-trytond-native-inputs)
("trytond-edocument-uncefact" ,trytond-edocument-uncefact)))
(propagated-inputs
`(("python-requests" ,python-requests)
@@ -609,7 +609,7 @@ using the credential from the accounting configuration.")
(base32 "0r8zigb4qmv40kf835x8jd7049nnhk5g7g0aibvfd0y9p28lspnz"))))
(build-system python-build-system)
(arguments (tryton-arguments "account_invoice"))
- (native-inputs `(,@%standard-trytond-native-inputs))
+ (native-inputs (%standard-trytond-native-inputs))
(propagated-inputs
`(("trytond" ,trytond)
("trytond-account" ,trytond-account)
@@ -640,7 +640,7 @@ term.")
(base32 "152jxsl6v2wclk1wjhykbyvianh47cp2yg575hkx18dfynyp7nmw"))))
(build-system python-build-system)
(arguments (tryton-arguments "account_invoice_correction"))
- (native-inputs `(,@%standard-trytond-native-inputs))
+ (native-inputs (%standard-trytond-native-inputs))
(propagated-inputs
`(("trytond" ,trytond)
("trytond-account-invoice" ,trytond-account-invoice)))
@@ -665,7 +665,7 @@ original quantity, once with the inverted quantity.")
(base32 "1ay9cpf6z8j3gamwy52z88qg31s09wkp6k5flv20f9c00hvly452"))))
(build-system python-build-system)
(arguments (tryton-arguments "account_invoice_defer"))
- (native-inputs `(,@%standard-trytond-native-inputs))
+ (native-inputs (%standard-trytond-native-inputs))
(propagated-inputs
`(("trytond" ,trytond)
("trytond-account" ,trytond-account)
@@ -690,7 +690,7 @@ defer the expense or the revenue of an invoice line over many periods.")
(base32 "0pq1raj6v76vqsb2mk1bfv1vg1ngfk9iiai30rlzj2zcl53phcvj"))))
(build-system python-build-system)
(arguments (tryton-arguments "account_invoice_history"))
- (native-inputs `(,@%standard-trytond-native-inputs))
+ (native-inputs (%standard-trytond-native-inputs))
(propagated-inputs
`(("trytond" ,trytond)
("trytond-account-invoice" ,trytond-account-invoice)
@@ -714,7 +714,7 @@ the historization of the invoice and its related fields.")
(base32 "1affxhinyzz1lqfq621f76fixnx523fi7qrxwsqa4f1b6g31651a"))))
(build-system python-build-system)
(arguments (tryton-arguments "account_invoice_line_standalone"))
- (native-inputs `(,@%standard-trytond-native-inputs))
+ (native-inputs (%standard-trytond-native-inputs))
(propagated-inputs
`(("trytond" ,trytond)
("trytond-account-invoice" ,trytond-account-invoice)))
@@ -737,7 +737,7 @@ allows to create invoice line not linked to an invoice.")
(base32 "0wam7v92ldajpx3529x2cfvczgwv8ayr6hi6bwj8fi736p9x2kbp"))))
(build-system python-build-system)
(arguments (tryton-arguments "account_invoice_secondary_unit"))
- (native-inputs `(,@%standard-trytond-native-inputs))
+ (native-inputs (%standard-trytond-native-inputs))
(propagated-inputs
`(("trytond" ,trytond)
("trytond-account-invoice" ,trytond-account-invoice)
@@ -761,7 +761,7 @@ a secondary unit of measure on invoice line.")
(base32 "1228n6vsx0rdjsy3idvpyssa3n21nhvz9gqaacwa46c0hp2251bp"))))
(build-system python-build-system)
(arguments (tryton-arguments "account_invoice_stock"))
- (native-inputs `(,@%standard-trytond-native-inputs))
+ (native-inputs (%standard-trytond-native-inputs))
(propagated-inputs
`(("trytond" ,trytond)
("trytond-account-invoice" ,trytond-account-invoice)
@@ -792,7 +792,7 @@ average price of the posted invoice lines that are linked to it.")
(build-system python-build-system)
(arguments (tryton-arguments "account_payment"))
(native-inputs
- `(,@%standard-trytond-native-inputs
+ `(,@(%standard-trytond-native-inputs)
("trytond-account-invoice" ,trytond-account-invoice)))
(propagated-inputs
`(("trytond" ,trytond)
@@ -818,7 +818,7 @@ payments for receivable or payable Account Move Lines.")
(base32 "0dgw47q4m5l13bhfl1kdpajh0q94pazdrq9sqzf1vg9mggai2gvi"))))
(build-system python-build-system)
(arguments (tryton-arguments "account_payment_braintree"))
- (native-inputs `(,@%standard-trytond-native-inputs))
+ (native-inputs (%standard-trytond-native-inputs))
(propagated-inputs
`(("python-braintree" ,python-braintree)
("trytond" ,trytond)
@@ -847,7 +847,7 @@ methods.")
(build-system python-build-system)
(arguments (tryton-arguments "account_payment_clearing"))
(native-inputs
- `(,@%standard-trytond-native-inputs
+ `(,@(%standard-trytond-native-inputs)
("trytond-account-statement" ,trytond-account-statement)
("trytond-account-statement-rule" ,trytond-account-statement-rule)))
(propagated-inputs
@@ -874,7 +874,7 @@ journal.")
(base32 "0clnl2lql5q0gh48lad3vw47xajgd3cdj4kbmvdi72jh775p174w"))))
(build-system python-build-system)
(arguments (tryton-arguments "account_payment_sepa"))
- (native-inputs `(,@%standard-trytond-native-inputs))
+ (native-inputs (%standard-trytond-native-inputs))
(propagated-inputs
`(("python-stdnum" ,python-stdnum)
("trytond" ,trytond)
@@ -900,7 +900,7 @@ generate SEPA files for a Payment Group.")
(base32 "0ccn5s360w78wqnq86qfyci8wii4n1n3pd9wvwsnbrpmabj1byv1"))))
(build-system python-build-system)
(arguments (tryton-arguments "account_payment_sepa_cfonb"))
- (native-inputs `(,@%standard-trytond-native-inputs))
+ (native-inputs (%standard-trytond-native-inputs))
(propagated-inputs
`(("trytond" ,trytond)
("trytond-account-payment" ,trytond-account-payment)
@@ -927,7 +927,7 @@ CFONB flavors to SEPA messages.")
(base32 "18hr2lrrx9asb0d3cjcpska4bv825yjln9cbqjzg0xbl36z6w3s2"))))
(build-system python-build-system)
(arguments (tryton-arguments "account_payment_stripe"))
- (native-inputs `(,@%standard-trytond-native-inputs))
+ (native-inputs (%standard-trytond-native-inputs))
(propagated-inputs
`(("python-stripe" ,python-stripe)
("trytond" ,trytond)
@@ -954,7 +954,7 @@ checkout form to handle Setup Intent and Payment Intent by card.")
(base32 "1z0dn1p22smzb4a9v451224wrpxcw94inl7jxkarc0q088gasn7d"))))
(build-system python-build-system)
(arguments (tryton-arguments "account_product"))
- (native-inputs `(,@%standard-trytond-native-inputs))
+ (native-inputs (%standard-trytond-native-inputs))
(propagated-inputs
`(("trytond" ,trytond)
("trytond-account" ,trytond-account)
@@ -983,7 +983,7 @@ and category.")
(base32 "0nlak4kv2ampb5v2zbsvabnirvdi53h6vr35kp2zmrv4alpjsla0"))))
(build-system python-build-system)
(arguments (tryton-arguments "account_statement"))
- (native-inputs `(,@%standard-trytond-native-inputs))
+ (native-inputs (%standard-trytond-native-inputs))
(propagated-inputs
`(("trytond" ,trytond)
("trytond-account" ,trytond-account)
@@ -1010,7 +1010,7 @@ statements. Statement can be used for bank statement, cash daybook etc.")
(base32 "09mkxb9m9167lpca8pb8k4rvnwhsng6b6pmhw9c21w2r4q0hppxv"))))
(build-system python-build-system)
(arguments (tryton-arguments "account_statement_aeb43"))
- (native-inputs `(,@%standard-trytond-native-inputs))
+ (native-inputs (%standard-trytond-native-inputs))
(propagated-inputs
`(("python-csb43" ,python-csb43)
("python-stdnum" ,python-stdnum)
@@ -1037,7 +1037,7 @@ defined by the Spanish banking association.")
(base32 "11gryxh2b2py0h6f89nj2y42cwb8rrxjn0r5jbhrcsfhb2kh1x3w"))))
(build-system python-build-system)
(arguments (tryton-arguments "account_statement_coda"))
- (native-inputs `(,@%standard-trytond-native-inputs))
+ (native-inputs (%standard-trytond-native-inputs))
(propagated-inputs
`(("python-febelfin-coda" ,python-febelfin-coda)
("trytond" ,trytond)
@@ -1063,7 +1063,7 @@ defined by Belgian \"febelfin\".")
(base32 "1n24lwp1lfw59xdd7mqaz6ncr5b0bldr2qniqdnkvyaav0h8h5px"))))
(build-system python-build-system)
(arguments (tryton-arguments "account_statement_ofx"))
- (native-inputs `(,@%standard-trytond-native-inputs))
+ (native-inputs (%standard-trytond-native-inputs))
(propagated-inputs
`(("python-ofxparse" ,python-ofxparse)
("trytond" ,trytond)
@@ -1089,7 +1089,7 @@ the import of the @emph{OFX} files as statement.")
(base32 "0kg6lf2wa5scwxggr8p7r7j6jd3a34qv2dcs9w18ra1qvg6p4kmp"))))
(build-system python-build-system)
(arguments (tryton-arguments "account_statement_rule"))
- (native-inputs `(,@%standard-trytond-native-inputs))
+ (native-inputs (%standard-trytond-native-inputs))
(propagated-inputs
`(("trytond" ,trytond)
("trytond-account" ,trytond-account)
@@ -1122,7 +1122,7 @@ linked to the origin.")
(build-system python-build-system)
(arguments (tryton-arguments "account_stock_anglo_saxon"))
(native-inputs
- `(,@%standard-trytond-native-inputs
+ `(,@(%standard-trytond-native-inputs)
("trytond-purchase" ,trytond-purchase)
("trytond-sale" ,trytond-sale)
("trytond-sale-supply-drop-shipment"
@@ -1155,7 +1155,7 @@ anglo-saxon accounting model for stock valuation.")
(build-system python-build-system)
(arguments (tryton-arguments "account_stock_continental"))
(native-inputs
- `(,@%standard-trytond-native-inputs
+ `(,@(%standard-trytond-native-inputs)
("trytond-account-invoice" ,trytond-account-invoice)
("trytond-purchase" ,trytond-purchase)
("trytond-sale" ,trytond-sale)
@@ -1185,7 +1185,7 @@ continental accounting model for stock valuation.")
(base32 "1p5xgd76585i55zcwvsi2gqhl0br9gbw398ap7m0cvadxfa6nxch"))))
(build-system python-build-system)
(arguments (tryton-arguments "account_stock_landed_cost"))
- (native-inputs `(,@%standard-trytond-native-inputs))
+ (native-inputs (%standard-trytond-native-inputs))
(propagated-inputs
`(("trytond" ,trytond)
("trytond-account" ,trytond-account)
@@ -1211,7 +1211,7 @@ allocate landed cost on Supplier Shipments after their reception.")
(base32 "10i0ww3k2cgdg227lv6h8ag2j6rm07maylbh3n0grwxfy8dbq34m"))))
(build-system python-build-system)
(arguments (tryton-arguments "account_stock_landed_cost_weight"))
- (native-inputs `(,@%standard-trytond-native-inputs))
+ (native-inputs (%standard-trytond-native-inputs))
(propagated-inputs
`(("trytond" ,trytond)
("trytond-account-stock-landed-cost" ,trytond-account-stock-landed-cost)
@@ -1239,7 +1239,7 @@ from the Product Measurements")
(base32 "1di8brrj4jpx99i0553whyh2fddayvwq06dwdshb3iibgv4357cr"))))
(build-system python-build-system)
(arguments (tryton-arguments "account_tax_cash"))
- (native-inputs `(,@%standard-trytond-native-inputs))
+ (native-inputs (%standard-trytond-native-inputs))
(propagated-inputs
`(("trytond" ,trytond)
("trytond-account" ,trytond-account)
@@ -1264,7 +1264,7 @@ report on cash basis.")
(build-system python-build-system)
(arguments (tryton-arguments "account_tax_rule_country"))
(native-inputs
- `(,@%standard-trytond-native-inputs
+ `(,@(%standard-trytond-native-inputs)
("trytond-account-invoice" ,trytond-account-invoice)
("trytond-purchase" ,trytond-purchase)
("trytond-sale" ,trytond-sale)
@@ -1293,7 +1293,7 @@ criteria.")
(base32 "09j9xz41n5hk3j7w63xbw1asd3p00prqvl652qcm9x1nrlmqiw3r"))))
(build-system python-build-system)
(arguments (tryton-arguments "analytic_account"))
- (native-inputs `(,@%standard-trytond-native-inputs))
+ (native-inputs (%standard-trytond-native-inputs))
(propagated-inputs
`(("trytond" ,trytond)
("trytond-account" ,trytond-account)
@@ -1324,7 +1324,7 @@ required to analyse accounting using multiple different axes.")
(build-system python-build-system)
(arguments (tryton-arguments "analytic_invoice"))
(native-inputs
- `(,@%standard-trytond-native-inputs
+ `(,@(%standard-trytond-native-inputs)
("trytond-account-asset" ,trytond-account-asset)))
(propagated-inputs
`(("trytond" ,trytond)
@@ -1348,7 +1348,7 @@ analytic accounts on invoice line.")
(base32 "1yx3w3p98y11qw99jy02kal9393y6jpxazsfcznsffgigw2vl3y6"))))
(build-system python-build-system)
(arguments (tryton-arguments "analytic_purchase"))
- (native-inputs `(,@%standard-trytond-native-inputs))
+ (native-inputs (%standard-trytond-native-inputs))
(propagated-inputs
`(("trytond" ,trytond)
("trytond-analytic-account" ,trytond-analytic-account)
@@ -1372,7 +1372,7 @@ analytic accounts on purchase line.")
(base32 "07l97jmg67468pihymfcjagqbbfdcmry3654f24zbmnljxy2qm1x"))))
(build-system python-build-system)
(arguments (tryton-arguments "analytic_sale"))
- (native-inputs `(,@%standard-trytond-native-inputs))
+ (native-inputs (%standard-trytond-native-inputs))
(propagated-inputs
`(("trytond" ,trytond)
("trytond-analytic-account" ,trytond-analytic-account)
@@ -1397,7 +1397,7 @@ analytic accounts on sale line.")
(build-system python-build-system)
(arguments (tryton-arguments "attendance"))
(native-inputs
- `(,@%standard-trytond-native-inputs
+ `(,@(%standard-trytond-native-inputs)
("trytond-timesheet" ,trytond-timesheet)))
(propagated-inputs
`(("trytond" ,trytond)
@@ -1422,7 +1422,7 @@ detail of the time of entrance and exit")
(base32 "1g46mimgjkz2lvh90p2ffmkfgwl7w03iqnvqlcghwpxk5vyxw3sj"))))
(build-system python-build-system)
(arguments (tryton-arguments "authentication_sms"))
- (native-inputs `(,@%standard-trytond-native-inputs))
+ (native-inputs (%standard-trytond-native-inputs))
(propagated-inputs
`(("trytond" ,trytond)))
(home-page "https://docs.tryton.org/projects/modules-authentication-sms")
@@ -1445,7 +1445,7 @@ configuration file.")
(base32 "0qwgp2s88n4hcqqxg1g34lmmvq5spdlkm978gzn6s96kmmzang0c"))))
(build-system python-build-system)
(arguments (tryton-arguments "bank"))
- (native-inputs `(,@%standard-trytond-native-inputs))
+ (native-inputs (%standard-trytond-native-inputs))
(propagated-inputs
`(("python-stdnum" ,python-stdnum)
("trytond" ,trytond)
@@ -1469,7 +1469,7 @@ and account.")
(base32 "0kp08jb5f86bzfyn99qs4k1047svdrkhz3jxv3jw46vrpc2s0c1y"))))
(build-system python-build-system)
(arguments (tryton-arguments "carrier"))
- (native-inputs `(,@%standard-trytond-native-inputs))
+ (native-inputs (%standard-trytond-native-inputs))
(propagated-inputs
`(("trytond" ,trytond)
("trytond-country" ,trytond-country)
@@ -1494,7 +1494,7 @@ of carrier.")
(build-system python-build-system)
(arguments (tryton-arguments "carrier_percentage"))
(native-inputs
- `(,@%standard-trytond-native-inputs
+ `(,@(%standard-trytond-native-inputs)
("trytond-purchase-shipment-cost" ,trytond-purchase-shipment-cost)
("trytond-sale-shipment-cost" ,trytond-sale-shipment-cost)))
(propagated-inputs
@@ -1520,7 +1520,7 @@ method \"on percentage\" on carrier.")
(build-system python-build-system)
(arguments (tryton-arguments "carrier_subdivision"))
(native-inputs
- `(,@%standard-trytond-native-inputs
+ `(,@(%standard-trytond-native-inputs)
("trytond-sale-shipment-cost" ,trytond-sale-shipment-cost)))
(propagated-inputs
`(("trytond" ,trytond)
@@ -1555,7 +1555,7 @@ or a specific postal code.")
(build-system python-build-system)
(arguments (tryton-arguments "carrier_weight"))
(native-inputs
- `(,@%standard-trytond-native-inputs
+ `(,@(%standard-trytond-native-inputs)
("trytond-purchase-shipment-cost" ,trytond-purchase-shipment-cost)
("trytond-sale-shipment-cost" ,trytond-sale-shipment-cost)))
(propagated-inputs
@@ -1585,7 +1585,7 @@ the weight is greater or equal but smaller than the next line.")
(build-system python-build-system)
(arguments (tryton-arguments "commission"))
(native-inputs
- `(,@%standard-trytond-native-inputs
+ `(,@(%standard-trytond-native-inputs)
("trytond-sale" ,trytond-sale)))
(propagated-inputs
`(("python-simpleeval" ,python-simpleeval)
@@ -1614,7 +1614,7 @@ invoice, following the agent's commission plan.")
(base32 "113wzwjip8virdh9bnh14vl29wb3w7a32skk5yibja819s19ycdn"))))
(build-system python-build-system)
(arguments (tryton-arguments "commission_waiting"))
- (native-inputs `(,@%standard-trytond-native-inputs))
+ (native-inputs (%standard-trytond-native-inputs))
(propagated-inputs
`(("trytond" ,trytond)
("trytond-account" ,trytond-account)
@@ -1639,7 +1639,7 @@ to a waiting account defined on the agent.")
(base32 "1q4qdyg32dn00pn3pj2yjl3jhxaqpv7a1cv5s5c95cpy5p46p02n"))))
(build-system python-build-system)
(arguments (tryton-arguments "company"))
- (native-inputs `(,@%standard-trytond-native-inputs))
+ (native-inputs (%standard-trytond-native-inputs))
(propagated-inputs
`(("trytond" ,trytond)
("trytond-currency" ,trytond-currency)
@@ -1666,7 +1666,7 @@ company and employee and extend the user model.")
(base32 "0aasp12l66zcys9w3qc4ysi2krd5c9x3xxaxvr29j7zl7nz05bwx"))))
(build-system python-build-system)
(arguments (tryton-arguments "company_work_time"))
- (native-inputs `(,@%standard-trytond-native-inputs))
+ (native-inputs (%standard-trytond-native-inputs))
(propagated-inputs
`(("trytond" ,trytond)
("trytond-company" ,trytond-company)))
@@ -1694,7 +1694,7 @@ month and a year of work.")
(build-system python-build-system)
;; Doctest contains one test that requires internet access.
(arguments (tryton-arguments "country" "--no-doctest"))
- (native-inputs `(,@%standard-trytond-native-inputs))
+ (native-inputs (%standard-trytond-native-inputs))
(propagated-inputs
`(("python-pycountry" ,python-pycountry)
("trytond" ,trytond)))
@@ -1721,7 +1721,7 @@ month and a year of work.")
;; Doctest 'scenario_currency_rate_update.rst' fails.
(arguments (tryton-arguments "currency" "--no-doctest"))
(native-inputs
- `(,@%standard-trytond-native-inputs
+ `(,@(%standard-trytond-native-inputs)
("python-forex-python" ,python-forex-python)
("python-pycountry" ,python-pycountry)))
(propagated-inputs
@@ -1749,7 +1749,7 @@ currency and rate.")
(base32 "1qilj1b9zr35z15313xbvgklf87dgxddvkcnymklwp9n7vs7hrz5"))))
(build-system python-build-system)
(arguments (tryton-arguments "customs"))
- (native-inputs `(,@%standard-trytond-native-inputs))
+ (native-inputs (%standard-trytond-native-inputs))
(propagated-inputs
`(("python-simpleeval" ,python-simpleeval)
("trytond" ,trytond)
@@ -1774,7 +1774,7 @@ duty based on the tariff code.")
(base32 "1drqiks8r7y58wz0skfa39v9yqx9fi5x0ymrrjd87wybw9q3kv46"))))
(build-system python-build-system)
(arguments (tryton-arguments "dashboard"))
- (native-inputs `(,@%standard-trytond-native-inputs))
+ (native-inputs (%standard-trytond-native-inputs))
(propagated-inputs
`(("trytond" ,trytond)))
(home-page "https://docs.tryton.org/projects/modules-dashboard")
@@ -1796,7 +1796,7 @@ configure their dashboard.")
(build-system python-build-system)
(arguments (tryton-arguments "edocument_uncefact"))
(native-inputs
- `(,@%standard-trytond-native-inputs
+ `(,@(%standard-trytond-native-inputs)
("python-lxml" ,python-lxml)
("trytond-account-invoice" ,trytond-account-invoice)))
(propagated-inputs
@@ -1824,7 +1824,7 @@ electronic document from UN/CEFACT. Supported formats are:
(base32 "1ri3gjvk0h0sljbgh7h2j0rbr3953p3k21l8x6rhrnh1q2rqgi70"))))
(build-system python-build-system)
(arguments (tryton-arguments "edocument_unece"))
- (native-inputs `(,@%standard-trytond-native-inputs))
+ (native-inputs (%standard-trytond-native-inputs))
(propagated-inputs
`(("trytond" ,trytond)
("trytond-account" ,trytond-account)
@@ -1855,7 +1855,7 @@ from the UNECE. Supported formats are:
(build-system python-build-system)
(arguments (tryton-arguments "incoterm"))
(native-inputs
- `(,@%standard-trytond-native-inputs
+ `(,@(%standard-trytond-native-inputs)
("trytond-account" ,trytond-account)
("trytond-account-invoice" ,trytond-account-invoice)
("trytond-account-invoice-stock" ,trytond-account-invoice-stock)
@@ -1891,7 +1891,7 @@ versions of 2010 and 2020.")
(base32 "1iylbpp66qjff1mkp0w3a703pracpcv3bv25i2bafkmcjiv9b4jl"))))
(build-system python-build-system)
(arguments (tryton-arguments "ldap_authentication"))
- (native-inputs `(,@%standard-trytond-native-inputs))
+ (native-inputs (%standard-trytond-native-inputs))
(propagated-inputs
`(("python-ldap3" ,python-ldap3)
("trytond" ,trytond)))
@@ -1913,7 +1913,7 @@ authenticate users via a LDAP server.")
(base32 "0mh85sx5xj06zjmf9fhcislkwlp7k54fz14k3ia1xxpw5f953y3c"))))
(build-system python-build-system)
(arguments (tryton-arguments "marketing"))
- (native-inputs `(,@%standard-trytond-native-inputs))
+ (native-inputs (%standard-trytond-native-inputs))
(propagated-inputs
`(("trytond" ,trytond)))
(home-page "https://docs.tryton.org/projects/modules-marketing")
@@ -1935,7 +1935,7 @@ fundamentals for marketing modules.")
(build-system python-build-system)
(arguments (tryton-arguments "marketing_automation"))
(native-inputs
- `(,@%standard-trytond-native-inputs
+ `(,@(%standard-trytond-native-inputs)
("trytond-party" ,trytond-party)))
(propagated-inputs
`(("trytond" ,trytond)
@@ -1961,7 +1961,7 @@ that are executed on selected records.")
(base32 "07zh1pni4kpm6bsgyizz0a5k64nyxc9laxxaih9py7d24p9pgvky"))))
(build-system python-build-system)
(arguments (tryton-arguments "marketing_email"))
- (native-inputs `(,@%standard-trytond-native-inputs))
+ (native-inputs (%standard-trytond-native-inputs))
(propagated-inputs
`(("trytond" ,trytond)
("trytond-marketing" ,trytond-marketing)
@@ -1987,7 +1987,7 @@ mailing lists.")
(build-system python-build-system)
(arguments (tryton-arguments "notification_email"))
(native-inputs
- `(,@%standard-trytond-native-inputs
+ `(,@(%standard-trytond-native-inputs)
("trytond-commission" ,trytond-commission)
("trytond-company" ,trytond-company)
("trytond-party" ,trytond-party)
@@ -2015,7 +2015,7 @@ to the email.")
(build-system python-build-system)
;; Doctest 'scenario_party_phone_number.rst' fails.
(arguments (tryton-arguments "party" "--no-doctest"))
- (native-inputs `(,@%standard-trytond-native-inputs))
+ (native-inputs (%standard-trytond-native-inputs))
(propagated-inputs
`(("python-stdnum" ,python-stdnum)
("trytond" ,trytond)
@@ -2043,7 +2043,7 @@ addresses.")
(build-system python-build-system)
(arguments (tryton-arguments "party_avatar"))
(native-inputs
- `(,@%standard-trytond-native-inputs
+ `(,@(%standard-trytond-native-inputs)
("trytond-company" ,trytond-company)))
(propagated-inputs
`(("trytond" ,trytond)
@@ -2066,7 +2066,7 @@ party.")
(base32 "03lkjmhinxm75schfn596vyg8459fx2spdyh372ikra3zdp8pg75"))))
(build-system python-build-system)
(arguments (tryton-arguments "party_relationship"))
- (native-inputs `(,@%standard-trytond-native-inputs))
+ (native-inputs (%standard-trytond-native-inputs))
(propagated-inputs
`(("trytond" ,trytond)
("trytond-party" ,trytond-party)))
@@ -2088,7 +2088,7 @@ different types of relations between parties.")
(base32 "1xmfjiqn7wzwja34abrxn3bj39z0799pdxd8bcz7l5dxrnqxwc38"))))
(build-system python-build-system)
(arguments (tryton-arguments "party_siret"))
- (native-inputs `(,@%standard-trytond-native-inputs))
+ (native-inputs (%standard-trytond-native-inputs))
(propagated-inputs
`(("trytond" ,trytond)
("trytond-party" ,trytond-party)))
@@ -2110,7 +2110,7 @@ identification numbers SIREN and SIRET on party and address.")
(base32 "1xvvqxkvzyqy6fn2sj5h3zj0g17igzwx6s18sxkdz72vqz6kpv0l"))))
(build-system python-build-system)
(arguments (tryton-arguments "product"))
- (native-inputs `(,@%standard-trytond-native-inputs))
+ (native-inputs (%standard-trytond-native-inputs))
(propagated-inputs
`(("python-stdnum" ,python-stdnum)
("trytond" ,trytond)
@@ -2137,7 +2137,7 @@ Template and Product.")
(base32 "0brvwvm3q2ik4vjb9cwd6jxddrmpp2vcafw8k675gy0xbbp1ddik"))))
(build-system python-build-system)
(arguments (tryton-arguments "product_attribute"))
- (native-inputs `(,@%standard-trytond-native-inputs))
+ (native-inputs (%standard-trytond-native-inputs))
(propagated-inputs
`(("trytond" ,trytond)
("trytond-product" ,trytond-product)))
@@ -2159,7 +2159,7 @@ models `Attribute` and `Attribute Set` for products.")
(base32 "1sq42siqq8w6dd8jnqnkzy3npaf9g2nrdzazkl6nw5dysvpsz8cr"))))
(build-system python-build-system)
(arguments (tryton-arguments "product_classification"))
- (native-inputs `(,@%standard-trytond-native-inputs))
+ (native-inputs (%standard-trytond-native-inputs))
(propagated-inputs
`(("trytond" ,trytond)
("trytond-product" ,trytond-product)))
@@ -2183,7 +2183,7 @@ reference field classification to the product template.")
(base32 "1pkk0z4bl1pz2yxs46b18fj35zwa80dnbickjg1ad66n9yrmifk6"))))
(build-system python-build-system)
(arguments (tryton-arguments "product_classification_taxonomic"))
- (native-inputs `(,@%standard-trytond-native-inputs))
+ (native-inputs (%standard-trytond-native-inputs))
(propagated-inputs
`(("trytond" ,trytond)
("trytond-product-classification" ,trytond-product-classification)))
@@ -2206,7 +2206,7 @@ adds the taxonomic classification to the products.")
(base32 "1zksnawvnbf1l2hkyxw4m85ysjy6i8kbx103sz4p9a9bgvjn3ai6"))))
(build-system python-build-system)
(arguments (tryton-arguments "product_cost_fifo"))
- (native-inputs `(,@%standard-trytond-native-inputs))
+ (native-inputs (%standard-trytond-native-inputs))
(propagated-inputs
`(("trytond" ,trytond)
("trytond-product" ,trytond-product)
@@ -2229,7 +2229,7 @@ first-in-first-out option in the `Cost Method` field of the product form.")
(base32 "01cxx1lmcxwangk3q8lhbkd97w208qxpk96mqxv2hgds77xr42cj"))))
(build-system python-build-system)
(arguments (tryton-arguments "product_cost_history"))
- (native-inputs `(,@%standard-trytond-native-inputs))
+ (native-inputs (%standard-trytond-native-inputs))
(propagated-inputs
`(("trytond" ,trytond)
("trytond-product" ,trytond-product)
@@ -2257,7 +2257,7 @@ and assets.")
(build-system python-build-system)
(arguments (tryton-arguments "product_cost_warehouse"))
(native-inputs
- `(,@%standard-trytond-native-inputs
+ `(,@(%standard-trytond-native-inputs)
("trytond-account-stock-continental" ,trytond-account-stock-continental)
("trytond-product-cost-fifo" ,trytond-product-cost-fifo)
("trytond-product-cost-history" ,trytond-product-cost-history)))
@@ -2286,7 +2286,7 @@ cost price of products to be calculated separately for each warehouse.")
(build-system python-build-system)
(arguments (tryton-arguments "product_kit"))
(native-inputs
- `(,@%standard-trytond-native-inputs
+ `(,@(%standard-trytond-native-inputs)
("trytond-account-invoice" ,trytond-account-invoice)
("trytond-account-invoice-stock" ,trytond-account-invoice-stock)
("trytond-company" ,trytond-company)
@@ -2315,7 +2315,7 @@ purchased using a single line.")
(base32 "0za3p0wxh2kb6f49455pggnpmy0vfiwj95j5c3l63x8q5yp8vdjl"))))
(build-system python-build-system)
(arguments (tryton-arguments "product_measurements"))
- (native-inputs `(,@%standard-trytond-native-inputs))
+ (native-inputs (%standard-trytond-native-inputs))
(propagated-inputs
`(("trytond" ,trytond)
("trytond-product" ,trytond-product)))
@@ -2337,7 +2337,7 @@ following measurements to Product:")
(base32 "1csr2g7wx89kykhm76dyrjn0nicvjmc4razqfqpj9rhdpwppdgr6"))))
(build-system python-build-system)
(arguments (tryton-arguments "product_price_list"))
- (native-inputs `(,@%standard-trytond-native-inputs))
+ (native-inputs (%standard-trytond-native-inputs))
(propagated-inputs
`(("python-simpleeval" ,python-simpleeval)
("trytond" ,trytond)
@@ -2362,7 +2362,7 @@ to compute prices per product or category.")
(build-system python-build-system)
(arguments (tryton-arguments "product_price_list_dates"))
(native-inputs
- `(,@%standard-trytond-native-inputs
+ `(,@(%standard-trytond-native-inputs)
("trytond-sale-price-list" ,trytond-sale-price-list)))
(propagated-inputs
`(("trytond" ,trytond)
@@ -2386,7 +2386,7 @@ date and end date conditions to the price list lines.")
(base32 "15jdw9qj2fffml9x4vdlzp3iz5gs2l597hpf5y5p887mmx9aa8cn"))))
(build-system python-build-system)
(arguments (tryton-arguments "product_price_list_parent"))
- (native-inputs `(,@%standard-trytond-native-inputs))
+ (native-inputs (%standard-trytond-native-inputs))
(propagated-inputs
`(("trytond" ,trytond)
("trytond-product-price-list" ,trytond-product-price-list)))
@@ -2410,7 +2410,7 @@ which contains the unit price computed by the parent price list.")
(base32 "0ys1wg52bs3i7yjrrkm9ycn07xz7fsb2pqc4a2bj44691pvrclpk"))))
(build-system python-build-system)
(arguments (tryton-arguments "production"))
- (native-inputs `(,@%standard-trytond-native-inputs))
+ (native-inputs (%standard-trytond-native-inputs))
(propagated-inputs
`(("trytond" ,trytond)
("trytond-company" ,trytond-company)
@@ -2434,7 +2434,7 @@ for production management: Bill of material and production order.")
(base32 "08pp80d4jfw7qmhvds60i63pb2nad489xwkf2ybbzdkrzhcgrrjk"))))
(build-system python-build-system)
(arguments (tryton-arguments "production_outsourcing"))
- (native-inputs `(,@%standard-trytond-native-inputs))
+ (native-inputs (%standard-trytond-native-inputs))
(propagated-inputs
`(("trytond" ,trytond)
("trytond-product" ,trytond-product)
@@ -2463,7 +2463,7 @@ the production.")
(build-system python-build-system)
(arguments (tryton-arguments "production_routing"))
(native-inputs
- `(,@%standard-trytond-native-inputs
+ `(,@(%standard-trytond-native-inputs)
("trytond-stock-supply-production" ,trytond-stock-supply-production)))
(propagated-inputs
`(("trytond" ,trytond)
@@ -2486,7 +2486,7 @@ routings for production: Routing, Step and Operation.")
(base32 "0jl2jnm0lwybwjw2w4nb7ih2s3z7lp00l6zm5vsx4phcvfvzcxgi"))))
(build-system python-build-system)
(arguments (tryton-arguments "production_split"))
- (native-inputs `(,@%standard-trytond-native-inputs))
+ (native-inputs (%standard-trytond-native-inputs))
(propagated-inputs
`(("trytond" ,trytond)
("trytond-production" ,trytond-production)))
@@ -2511,7 +2511,7 @@ quantity.")
(base32 "01a09snawlr224s5aqhrdkal14qry4hlfsglnsk09yzbw6fx196b"))))
(build-system python-build-system)
(arguments (tryton-arguments "production_work"))
- (native-inputs `(,@%standard-trytond-native-inputs))
+ (native-inputs (%standard-trytond-native-inputs))
(propagated-inputs
`(("trytond" ,trytond)
("trytond-company" ,trytond-company)
@@ -2538,7 +2538,7 @@ work cost.")
(base32 "1r7k25wddd381g0p5pj3m8jqvbg8g6ss0ifnhhjya3b6x0d41jz9"))))
(build-system python-build-system)
(arguments (tryton-arguments "production_work_timesheet"))
- (native-inputs `(,@%standard-trytond-native-inputs))
+ (native-inputs (%standard-trytond-native-inputs))
(propagated-inputs
`(("trytond" ,trytond)
("trytond-production-routing" ,trytond-production-routing)
@@ -2563,7 +2563,7 @@ enter timesheet for production works.")
(base32 "1xlqzg07csr9a89jjgmk5n4d9dd2s3qahg2x8arf3vqqnrqw1g0f"))))
(build-system python-build-system)
(arguments (tryton-arguments "project"))
- (native-inputs `(,@%standard-trytond-native-inputs))
+ (native-inputs (%standard-trytond-native-inputs))
(propagated-inputs
`(("trytond" ,trytond)
("trytond-company" ,trytond-company)
@@ -2588,7 +2588,7 @@ project and task and the basis for simple project management.")
(base32 "0wxgpsn5kwfz4f51icmc0p7r615lpr286ifwyz0xnd6rrh0glvmw"))))
(build-system python-build-system)
(arguments (tryton-arguments "project_invoice"))
- (native-inputs `(,@%standard-trytond-native-inputs))
+ (native-inputs (%standard-trytond-native-inputs))
(propagated-inputs
`(("trytond" ,trytond)
("trytond-account" ,trytond-account)
@@ -2625,7 +2625,7 @@ methods on projects. The methods are:
(base32 "0yanvfmg4nmbc322h6w9m7asv4bm95y2wksi4rrvlbs84njgvhnq"))))
(build-system python-build-system)
(arguments (tryton-arguments "project_plan"))
- (native-inputs `(,@%standard-trytond-native-inputs))
+ (native-inputs (%standard-trytond-native-inputs))
(propagated-inputs
`(("trytond" ,trytond)
("trytond-company" ,trytond-company)
@@ -2650,7 +2650,7 @@ on top of the Project module.")
(build-system python-build-system)
(arguments (tryton-arguments "project_revenue"))
(native-inputs
- `(,@%standard-trytond-native-inputs
+ `(,@(%standard-trytond-native-inputs)
("trytond-purchase" ,trytond-purchase)))
(propagated-inputs
`(("trytond" ,trytond)
@@ -2681,7 +2681,7 @@ the linked time sheets and the linked purchase lines.")
(base32 "12drjw30ik3alckn6xrny4814vzi3ysh17wgiawiy9319yahsvay"))))
(build-system python-build-system)
(arguments (tryton-arguments "purchase"))
- (native-inputs `(,@%standard-trytond-native-inputs))
+ (native-inputs (%standard-trytond-native-inputs))
(propagated-inputs
`(("trytond" ,trytond)
("trytond-account" ,trytond-account)
@@ -2714,7 +2714,7 @@ the linked time sheets and the linked purchase lines.")
(base32 "0bgk5ib7y1nzdrfx00g9qr2lxmjkascvh1caps21r12czz0iz5fx"))))
(build-system python-build-system)
(arguments (tryton-arguments "purchase_amendment"))
- (native-inputs `(,@%standard-trytond-native-inputs))
+ (native-inputs (%standard-trytond-native-inputs))
(propagated-inputs
`(("trytond" ,trytond)
("trytond-account-invoice" ,trytond-account-invoice)
@@ -2750,7 +2750,7 @@ amendment is composed of action lines which can:
(base32 "18mb1vqmf9c934jp2qjwj4mi0sx99m8005vxc42mjj1f5qkxxsgg"))))
(build-system python-build-system)
(arguments (tryton-arguments "purchase_history"))
- (native-inputs `(,@%standard-trytond-native-inputs))
+ (native-inputs (%standard-trytond-native-inputs))
(propagated-inputs
`(("trytond" ,trytond)
("trytond-purchase" ,trytond-purchase)))
@@ -2773,7 +2773,7 @@ time the purchase is reset to draft.")
(base32 "1qwa8a1vxalvb6r3d1w5wwpa9kx7w8c879x1zb4wwc9nqpdji8v0"))))
(build-system python-build-system)
(arguments (tryton-arguments "purchase_invoice_line_standalone"))
- (native-inputs `(,@%standard-trytond-native-inputs))
+ (native-inputs (%standard-trytond-native-inputs))
(propagated-inputs
`(("trytond" ,trytond)
("trytond-account-invoice-line-standalone"
@@ -2798,7 +2798,7 @@ makes purchase to generate invoice lines instead of invoices.")
(base32 "0y54b677dy1jpmclgxvbzs2zsypzkyvmdbx1i58j16hs24l8h0c8"))))
(build-system python-build-system)
(arguments (tryton-arguments "purchase_price_list"))
- (native-inputs `(,@%standard-trytond-native-inputs))
+ (native-inputs (%standard-trytond-native-inputs))
(propagated-inputs
`(("trytond" ,trytond)
("trytond-account" ,trytond-account)
@@ -2825,7 +2825,7 @@ lists to be defined for suppliers.")
(build-system python-build-system)
;; Doctest 'scenario_purchase_request.rst' fails.
(arguments (tryton-arguments "purchase_request" "--no-doctest"))
- (native-inputs `(,@%standard-trytond-native-inputs))
+ (native-inputs (%standard-trytond-native-inputs))
(propagated-inputs
`(("trytond" ,trytond)
("trytond-product" ,trytond-product)
@@ -2855,7 +2855,7 @@ generated by other process from Tryton.")
(build-system python-build-system)
(arguments (tryton-arguments "purchase_request_quotation"))
(native-inputs
- `(,@%standard-trytond-native-inputs
+ `(,@(%standard-trytond-native-inputs)
("trytond-purchase-requisition" ,trytond-purchase-requisition)))
(propagated-inputs
`(("trytond" ,trytond)
@@ -2885,7 +2885,7 @@ supplier.")
(base32 "0hiz4q4cq7zz6xxl6bkk0vn71hc2wgasnhda5h41cmi69jphhzzk"))))
(build-system python-build-system)
(arguments (tryton-arguments "purchase_requisition"))
- (native-inputs `(,@%standard-trytond-native-inputs))
+ (native-inputs (%standard-trytond-native-inputs))
(propagated-inputs
`(("trytond" ,trytond)
("trytond-company" ,trytond-company)
@@ -2917,7 +2917,7 @@ be created.")
(build-system python-build-system)
(arguments (tryton-arguments "purchase_secondary_unit"))
(native-inputs
- `(,@%standard-trytond-native-inputs
+ `(,@(%standard-trytond-native-inputs)
("trytond-account-invoice-secondary-unit"
,trytond-account-invoice-secondary-unit)
("trytond-stock-secondary-unit" ,trytond-stock-secondary-unit)))
@@ -2951,7 +2951,7 @@ the product with its factor against the purchase unit.")
(build-system python-build-system)
(arguments (tryton-arguments "purchase_shipment_cost"))
(native-inputs
- `(,@%standard-trytond-native-inputs
+ `(,@(%standard-trytond-native-inputs)
("trytond-account-invoice-stock" ,trytond-account-invoice-stock)
("trytond-account-stock-anglo-saxon" ,trytond-account-stock-anglo-saxon)
("trytond-account-stock-continental" ,trytond-account-stock-continental)
@@ -2981,7 +2981,7 @@ shipment costs to Supplier Shipment.")
(base32 "0wk5lhj74vl7zs4l3x176iwfqr3jnq37xhiksgnajsrjrl54bgfg"))))
(build-system python-build-system)
(arguments (tryton-arguments "sale"))
- (native-inputs `(,@%standard-trytond-native-inputs))
+ (native-inputs (%standard-trytond-native-inputs))
(propagated-inputs
`(("trytond" ,trytond)
("trytond-account" ,trytond-account)
@@ -3016,7 +3016,7 @@ to be generated that contain aggregated sales figures.")
(build-system python-build-system)
(arguments (tryton-arguments "sale_advance_payment"))
(native-inputs
- `(,@%standard-trytond-native-inputs
+ `(,@(%standard-trytond-native-inputs)
("trytond-sale-supply" ,trytond-sale-supply)))
(propagated-inputs
`(("python-simpleeval" ,python-simpleeval)
@@ -3043,7 +3043,7 @@ for advance payment management on the sale.")
(base32 "1vkcyfp30hng2vj1h1pvwrlvp9b59pkzzlmgnj6gvs867l8f2zva"))))
(build-system python-build-system)
(arguments (tryton-arguments "sale_amendment"))
- (native-inputs `(,@%standard-trytond-native-inputs))
+ (native-inputs (%standard-trytond-native-inputs))
(propagated-inputs
`(("trytond" ,trytond)
("trytond-account-invoice" ,trytond-account-invoice)
@@ -3069,7 +3069,7 @@ composed of action lines which can:")
(base32 "0wbs7kawrzz39z0jw34ygdb85qja49xfb75ahbwgqd185wf3jvgz"))))
(build-system python-build-system)
(arguments (tryton-arguments "sale_complaint"))
- (native-inputs `(,@%standard-trytond-native-inputs))
+ (native-inputs (%standard-trytond-native-inputs))
(propagated-inputs
`(("trytond" ,trytond)
("trytond-account-invoice" ,trytond-account-invoice)
@@ -3094,7 +3094,7 @@ composed of action lines which can:")
(base32 "1qj4lg5gjsqg27sv6l5afb3rgw46y008ywy6742w9ab6misy57dh"))))
(build-system python-build-system)
(arguments (tryton-arguments "sale_credit_limit"))
- (native-inputs `(,@%standard-trytond-native-inputs))
+ (native-inputs (%standard-trytond-native-inputs))
(propagated-inputs
`(("trytond" ,trytond)
("trytond-account-credit-limit" ,trytond-account-credit-limit)
@@ -3121,7 +3121,7 @@ credit limit of the party when confirming a sale.")
(base32 "0ss976dcx6k2z2gdbhcgdp6d561b2vwwgf83xdl2pc28q2d3rmh6"))))
(build-system python-build-system)
(arguments (tryton-arguments "sale_discount"))
- (native-inputs `(,@%standard-trytond-native-inputs))
+ (native-inputs (%standard-trytond-native-inputs))
(propagated-inputs
`(("trytond" ,trytond)
("trytond-product" ,trytond-product)
@@ -3144,7 +3144,7 @@ line.")
(base32 "0n6fxv573bszhfw1ik16y9754jfp6r2rrliprm6iv7v5ld3r1yqi"))))
(build-system python-build-system)
(arguments (tryton-arguments "sale_extra"))
- (native-inputs `(,@%standard-trytond-native-inputs))
+ (native-inputs (%standard-trytond-native-inputs))
(propagated-inputs
`(("trytond" ,trytond)
("trytond-company" ,trytond-company)
@@ -3170,7 +3170,7 @@ on sale based on criteria.")
(base32 "0bbcgm7xs5hmn3axz62jkarhl9v43nk9mk9zldlf9qrfqy89fd80"))))
(build-system python-build-system)
(arguments (tryton-arguments "sale_gift_card"))
- (native-inputs `(,@%standard-trytond-native-inputs))
+ (native-inputs (%standard-trytond-native-inputs))
(propagated-inputs
`(("trytond" ,trytond)
("trytond-account" ,trytond-account)
@@ -3197,7 +3197,7 @@ and redeeming of gift cards.")
(base32 "1pp5lmmpiqakcmwxv392v1miiisbb0yl55gjb618ngx6ayrd0vdv"))))
(build-system python-build-system)
(arguments (tryton-arguments "sale_history"))
- (native-inputs `(,@%standard-trytond-native-inputs))
+ (native-inputs (%standard-trytond-native-inputs))
(propagated-inputs
`(("trytond" ,trytond)
("trytond-sale" ,trytond-sale)))
@@ -3220,7 +3220,7 @@ time the sale is reset to draft.")
(base32 "1h8lcm8dg3i6644c50d9y1lca9x7k8l6cvwzkabvzixm54mflqsx"))))
(build-system python-build-system)
(arguments (tryton-arguments "sale_invoice_grouping"))
- (native-inputs `(,@%standard-trytond-native-inputs))
+ (native-inputs (%standard-trytond-native-inputs))
(propagated-inputs
`(("trytond" ,trytond)
("trytond-account-invoice" ,trytond-account-invoice)
@@ -3245,7 +3245,7 @@ option to define how invoice lines generated from sales will be grouped.")
(base32 "0rvj73382h2ha6jqhini0fzpn40w190qij1r7k2fa0c9ls15rrp5"))))
(build-system python-build-system)
(arguments (tryton-arguments "sale_opportunity"))
- (native-inputs `(,@%standard-trytond-native-inputs))
+ (native-inputs (%standard-trytond-native-inputs))
(propagated-inputs
`(("trytond" ,trytond)
("trytond-account" ,trytond-account)
@@ -3275,7 +3275,7 @@ lead/opportunity model.")
(build-system python-build-system)
(arguments (tryton-arguments "sale_payment"))
(native-inputs
- `(,@%standard-trytond-native-inputs
+ `(,@(%standard-trytond-native-inputs)
("trytond-account-payment-clearing" ,trytond-account-payment-clearing)))
(propagated-inputs
`(("trytond" ,trytond)
@@ -3300,7 +3300,7 @@ payments prior to the creation of any invoice.")
(base32 "0xg0i12a7billpdv13arvc3j5jsbn9gzis8snkl84315ayz3irq4"))))
(build-system python-build-system)
(arguments (tryton-arguments "sale_price_list"))
- (native-inputs `(,@%standard-trytond-native-inputs))
+ (native-inputs (%standard-trytond-native-inputs))
(propagated-inputs
`(("trytond" ,trytond)
("trytond-company" ,trytond-company)
@@ -3326,7 +3326,7 @@ price list on sale. A price list can be set per party or as default.")
(build-system python-build-system)
(arguments (tryton-arguments "sale_product_customer"))
(native-inputs
- `(,@%standard-trytond-native-inputs
+ `(,@(%standard-trytond-native-inputs)
("trytond-sale-amendment" ,trytond-sale-amendment)))
(propagated-inputs
`(("trytond" ,trytond)
@@ -3351,7 +3351,7 @@ customer's names and codes for products or variants.")
(base32 "1bvk14sjlqrlg2wakihrcbz8vl40hr6isbc3ijdsv5g1khl3j74i"))))
(build-system python-build-system)
(arguments (tryton-arguments "sale_promotion"))
- (native-inputs `(,@%standard-trytond-native-inputs))
+ (native-inputs (%standard-trytond-native-inputs))
(propagated-inputs
`(("python-simpleeval" ,python-simpleeval)
("trytond" ,trytond)
@@ -3378,7 +3378,7 @@ on sale based on criteria.")
(base32 "1hkbsamsf6swx05ij2yh7b3nvmcnlvf9xbz9r7hfs6blx2jkxs3p"))))
(build-system python-build-system)
(arguments (tryton-arguments "sale_promotion_coupon"))
- (native-inputs `(,@%standard-trytond-native-inputs))
+ (native-inputs (%standard-trytond-native-inputs))
(propagated-inputs
`(("trytond" ,trytond)
("trytond-sale" ,trytond-sale)
@@ -3403,7 +3403,7 @@ to the promotions.")
(build-system python-build-system)
(arguments (tryton-arguments "sale_secondary_unit"))
(native-inputs
- `(,@%standard-trytond-native-inputs
+ `(,@(%standard-trytond-native-inputs)
("trytond-account-invoice-secondary-unit"
,trytond-account-invoice-secondary-unit)
("trytond-sale-product-customer" ,trytond-sale-product-customer)
@@ -3435,7 +3435,7 @@ unit is defined on the product with its factor against the sale unit.")
(build-system python-build-system)
(arguments (tryton-arguments "sale_shipment_cost"))
(native-inputs
- `(,@%standard-trytond-native-inputs
+ `(,@(%standard-trytond-native-inputs)
("trytond-sale-promotion" ,trytond-sale-promotion)
("trytond-stock-shipment-cost" ,trytond-stock-shipment-cost)))
(propagated-inputs
@@ -3464,7 +3464,7 @@ cost for sale.")
(base32 "0n1h50j6c4za7a16pgn916cqjxxrd2qs16hb2h42wsp5p2bkfww2"))))
(build-system python-build-system)
(arguments (tryton-arguments "sale_shipment_grouping"))
- (native-inputs `(,@%standard-trytond-native-inputs))
+ (native-inputs (%standard-trytond-native-inputs))
(propagated-inputs
`(("trytond" ,trytond)
("trytond-party" ,trytond-party)
@@ -3489,7 +3489,7 @@ define how stock moves generated from sales will be grouped.")
(base32 "0zigl695hyw7zyk86y1ng6mnvd9v8dbk05c5n6q14yvh4gz3ri5l"))))
(build-system python-build-system)
(arguments (tryton-arguments "sale_shipment_tolerance"))
- (native-inputs `(,@%standard-trytond-native-inputs))
+ (native-inputs (%standard-trytond-native-inputs))
(propagated-inputs
`(("trytond" ,trytond)
("trytond-sale" ,trytond-sale)
@@ -3518,7 +3518,7 @@ raised.")
(build-system python-build-system)
(arguments (tryton-arguments "sale_stock_quantity"))
(native-inputs
- `(,@%standard-trytond-native-inputs
+ `(,@(%standard-trytond-native-inputs)
("trytond-stock-supply" ,trytond-stock-supply)))
(propagated-inputs
`(("trytond" ,trytond)
@@ -3546,7 +3546,7 @@ stock forecasts.")
(base32 "092ljl0ywybwchp4qfki752nclqc6hkx2h99cd1h3g998jv3l72x"))))
(build-system python-build-system)
(arguments (tryton-arguments "sale_subscription"))
- (native-inputs `(,@%standard-trytond-native-inputs))
+ (native-inputs (%standard-trytond-native-inputs))
(propagated-inputs
`(("trytond" ,trytond)
("trytond-account" ,trytond-account)
@@ -3573,7 +3573,7 @@ services and recurrence rule models.")
(base32 "1j160sqfvzqv0ah85w2bsc4fixrxhzjq0lbin2bgasmdm3yqfqdj"))))
(build-system python-build-system)
(arguments (tryton-arguments "sale_subscription_asset"))
- (native-inputs `(,@%standard-trytond-native-inputs))
+ (native-inputs (%standard-trytond-native-inputs))
(propagated-inputs
`(("trytond" ,trytond)
("trytond-sale-subscription" ,trytond-sale-subscription)
@@ -3597,7 +3597,7 @@ notion of asset to the sale subscription module.")
(base32 "0lk4pj2fr1q603wnia96i7fzym8pncpvy0hg41q4dkr380nm3qzs"))))
(build-system python-build-system)
(arguments (tryton-arguments "sale_supply"))
- (native-inputs `(,@%standard-trytond-native-inputs))
+ (native-inputs (%standard-trytond-native-inputs))
(propagated-inputs
`(("trytond" ,trytond)
("trytond-purchase" ,trytond-purchase)
@@ -3626,7 +3626,7 @@ supply method.")
(base32 "0gm2m5zm7vrm1vb34svqby7h91ka3mhln3367zmwr17yfyqf68dk"))))
(build-system python-build-system)
(arguments (tryton-arguments "sale_supply_drop_shipment"))
- (native-inputs `(,@%standard-trytond-native-inputs))
+ (native-inputs (%standard-trytond-native-inputs))
(propagated-inputs
`(("trytond" ,trytond)
("trytond-company" ,trytond-company)
@@ -3658,7 +3658,7 @@ shipment is created and linked to both the purchase and the sale.")
(base32 "03v702r4sfmql5yv6414gi2y72psvr3zq3xmx049w5nsywc2585v"))))
(build-system python-build-system)
(arguments (tryton-arguments "sale_supply_production"))
- (native-inputs `(,@%standard-trytond-native-inputs))
+ (native-inputs (%standard-trytond-native-inputs))
(propagated-inputs
`(("trytond" ,trytond)
("trytond-production" ,trytond-production)
@@ -3686,7 +3686,7 @@ back to the default supply method.")
(base32 "1v6pvkwj6vhjqbz2zn0609kb7kx4g0dsn1xhvax4z2dqigh7ywpx"))))
(build-system python-build-system)
(arguments (tryton-arguments "stock"))
- (native-inputs `(,@%standard-trytond-native-inputs))
+ (native-inputs (%standard-trytond-native-inputs))
(propagated-inputs
`(("python-simpleeval" ,python-simpleeval)
("trytond" ,trytond)
@@ -3719,7 +3719,7 @@ inventory to control and update stock levels.")
(build-system python-build-system)
(arguments (tryton-arguments "stock_assign_manual"))
(native-inputs
- `(,@%standard-trytond-native-inputs
+ `(,@(%standard-trytond-native-inputs)
("trytond-production" ,trytond-production)))
(propagated-inputs
`(("trytond" ,trytond)
@@ -3744,7 +3744,7 @@ location to pick products.")
(build-system python-build-system)
(arguments (tryton-arguments "stock_consignment"))
(native-inputs
- `(,@%standard-trytond-native-inputs
+ `(,@(%standard-trytond-native-inputs)
("trytond-stock-supply" ,trytond-stock-supply)))
(propagated-inputs
`(("trytond" ,trytond)
@@ -3774,7 +3774,7 @@ consignment stock from supplier or at customer warehouse.")
(base32 "1l3ks2jbz95qqbv9jsvakrxgazyq1kkk3fspwvrg1d10rv6xmb58"))))
(build-system python-build-system)
(arguments (tryton-arguments "stock_forecast"))
- (native-inputs `(,@%standard-trytond-native-inputs))
+ (native-inputs (%standard-trytond-native-inputs))
(propagated-inputs
`(("trytond" ,trytond)
("trytond-company" ,trytond-company)
@@ -3799,7 +3799,7 @@ other stock mechanisms to anticipate customer demand.")
(base32 "0mvgday5qhmx89xikklr2ad2xa7zxkiysxa2bqsf76imvx4801q6"))))
(build-system python-build-system)
(arguments (tryton-arguments "stock_inventory_location"))
- (native-inputs `(,@%standard-trytond-native-inputs))
+ (native-inputs (%standard-trytond-native-inputs))
(propagated-inputs
`(("trytond" ,trytond)
("trytond-company" ,trytond-company)
@@ -3825,7 +3825,7 @@ wizard \"Create Inventories\" under the \"Inventories\" sub-menu.")
(build-system python-build-system)
(arguments (tryton-arguments "stock_location_move"))
(native-inputs
- `(,@%standard-trytond-native-inputs
+ `(,@(%standard-trytond-native-inputs)
("trytond-stock-supply" ,trytond-stock-supply)))
(propagated-inputs
`(("trytond" ,trytond)
@@ -3849,7 +3849,7 @@ define some Locations as movable
(base32 "0lpvgk5s7v30c0hicqc2m6apv8gzd1d6229yv1lrp2g62yp9pa9f"))))
(build-system python-build-system)
(arguments (tryton-arguments "stock_location_sequence"))
- (native-inputs `(,@%standard-trytond-native-inputs))
+ (native-inputs (%standard-trytond-native-inputs))
(propagated-inputs
`(("trytond" ,trytond)
("trytond-stock" ,trytond-stock)))
@@ -3872,7 +3872,7 @@ ordering to location.")
(base32 "18cwrvnrzjk1wb765gr6hp3plpdpwz1a7cwimjhxi47iw7w5c84g"))))
(build-system python-build-system)
(arguments (tryton-arguments "stock_lot"))
- (native-inputs `(,@%standard-trytond-native-inputs))
+ (native-inputs (%standard-trytond-native-inputs))
(propagated-inputs
`(("trytond" ,trytond)
("trytond-product" ,trytond-product)
@@ -3898,7 +3898,7 @@ ordering to location.")
(base32 "1x8sjhgbakqbgfhrrl7b1b0961riqibs6q6lmgmyrvjyrxx0hpig"))))
(build-system python-build-system)
(arguments (tryton-arguments "stock_lot_sled"))
- (native-inputs `(,@%standard-trytond-native-inputs))
+ (native-inputs (%standard-trytond-native-inputs))
(propagated-inputs
`(("trytond" ,trytond)
("trytond-product" ,trytond-product)
@@ -3925,7 +3925,7 @@ it is no more used to compute the forecast quantity of the stock.")
(build-system python-build-system)
(arguments (tryton-arguments "stock_lot_unit"))
(native-inputs
- `(,@%standard-trytond-native-inputs
+ `(,@(%standard-trytond-native-inputs)
("trytond-production" ,trytond-production)))
(propagated-inputs
`(("trytond" ,trytond)
@@ -3950,7 +3950,7 @@ unit and quantity on stock lot.")
(base32 "1jbpl141wyc19v27bcyqsph8p2zf9yqprm55yl642mvwq55bshq8"))))
(build-system python-build-system)
(arguments (tryton-arguments "stock_package"))
- (native-inputs `(,@%standard-trytond-native-inputs))
+ (native-inputs (%standard-trytond-native-inputs))
(propagated-inputs
`(("trytond" ,trytond)
("trytond-company" ,trytond-company)
@@ -3974,7 +3974,7 @@ packaging information about customer and supplier return shipments.")
(base32 "09j7v64wmpiw1bh9byjq4shsd5474rq0mfx7wwak8hn0v5ni7imn"))))
(build-system python-build-system)
(arguments (tryton-arguments "stock_package_shipping"))
- (native-inputs `(,@%standard-trytond-native-inputs))
+ (native-inputs (%standard-trytond-native-inputs))
(propagated-inputs
`(("trytond" ,trytond)
("trytond-carrier" ,trytond-carrier)
@@ -4004,7 +4004,7 @@ interact with shipping service providers.")
(base32 "1dw6amd1kvpsldk14m656c0hpazf1ljzz2zri00nqq11d9x8xab5"))))
(build-system python-build-system)
(arguments (tryton-arguments "stock_package_shipping_ups"))
- (native-inputs `(,@%standard-trytond-native-inputs))
+ (native-inputs (%standard-trytond-native-inputs))
(propagated-inputs
`(("python-requests" ,python-requests)
("trytond" ,trytond)
@@ -4035,7 +4035,7 @@ you to generate the UPS labels per package using the UPS webservices.")
(build-system python-build-system)
(arguments (tryton-arguments "stock_product_location"))
(native-inputs
- `(,@%standard-trytond-native-inputs
+ `(,@(%standard-trytond-native-inputs)
("trytond-production" ,trytond-production)))
(propagated-inputs
`(("trytond" ,trytond)
@@ -4064,7 +4064,7 @@ warehouse.")
(build-system python-build-system)
(arguments (tryton-arguments "stock_quantity_early_planning"))
(native-inputs
- `(,@%standard-trytond-native-inputs
+ `(,@(%standard-trytond-native-inputs)
("trytond-production" ,trytond-production)))
(propagated-inputs
`(("trytond" ,trytond)
@@ -4090,7 +4090,7 @@ reducing stock level by proposing to consume earlier.")
(build-system python-build-system)
(arguments (tryton-arguments "stock_quantity_issue"))
(native-inputs
- `(,@%standard-trytond-native-inputs
+ `(,@(%standard-trytond-native-inputs)
("trytond-production" ,trytond-production)))
(propagated-inputs
`(("trytond" ,trytond)
@@ -4115,7 +4115,7 @@ stock quantity issues.")
(base32 "0s4nryiirdbndm2sz5aqpk2mzw9zxah92gmh6433sj5zyc6a22if"))))
(build-system python-build-system)
(arguments (tryton-arguments "stock_secondary_unit"))
- (native-inputs `(,@%standard-trytond-native-inputs))
+ (native-inputs (%standard-trytond-native-inputs))
(propagated-inputs
`(("trytond" ,trytond)
("trytond-product" ,trytond-product)
@@ -4138,7 +4138,7 @@ secondary unit of measure on the stock move.")
(base32 "13c940pz5ivqj9qk6b5nbid2xfkjnnijjmbz1bn7ic7ydfpiqy8j"))))
(build-system python-build-system)
(arguments (tryton-arguments "stock_shipment_cost"))
- (native-inputs `(,@%standard-trytond-native-inputs))
+ (native-inputs (%standard-trytond-native-inputs))
(propagated-inputs
`(("trytond" ,trytond)
("trytond-product" ,trytond-product)
@@ -4163,7 +4163,7 @@ price. This cost is added to the product margin reports.")
(build-system python-build-system)
(arguments (tryton-arguments "stock_shipment_measurements"))
(native-inputs
- `(,@%standard-trytond-native-inputs
+ `(,@(%standard-trytond-native-inputs)
("trytond-stock-package" ,trytond-stock-package)))
(propagated-inputs
`(("trytond" ,trytond)
@@ -4190,7 +4190,7 @@ measurement and the quantity of their moves.")
(base32 "0ynvmmdxgzgg6mn8ckhl7jr9ircq4bpwsl0xpzk83r6mhlvlrxpm"))))
(build-system python-build-system)
(arguments (tryton-arguments "stock_split"))
- (native-inputs `(,@%standard-trytond-native-inputs))
+ (native-inputs (%standard-trytond-native-inputs))
(propagated-inputs
`(("trytond" ,trytond)
("trytond-stock" ,trytond-stock)))
@@ -4214,7 +4214,7 @@ there can be a move with the remaining quantity.")
(base32 "1p5l3yjjy6l25kk9xnhbl691l3v8gfg9fhc87jc6qszhxlqxk730"))))
(build-system python-build-system)
(arguments (tryton-arguments "stock_supply"))
- (native-inputs `(,@%standard-trytond-native-inputs))
+ (native-inputs (%standard-trytond-native-inputs))
(propagated-inputs
`(("trytond" ,trytond)
("trytond-account" ,trytond-account)
@@ -4245,7 +4245,7 @@ mechanisms and introduces the concepts of order point.")
(base32 "1b6q2zk0qnsxdhlqgsnb49prgn6sgqlpr84vy31a2p83mwiz0fqr"))))
(build-system python-build-system)
(arguments (tryton-arguments "stock_supply_day"))
- (native-inputs `(,@%standard-trytond-native-inputs))
+ (native-inputs (%standard-trytond-native-inputs))
(propagated-inputs
`(("trytond" ,trytond)
("trytond-purchase" ,trytond-purchase)))
@@ -4269,7 +4269,7 @@ a supplying may happens at any day of the week.")
(base32 "0i5dc9ddd6mfx3zjlcq16isw52b8qy7igaj2lv8jqvkdrc19yfha"))))
(build-system python-build-system)
(arguments (tryton-arguments "stock_supply_forecast"))
- (native-inputs `(,@%standard-trytond-native-inputs))
+ (native-inputs (%standard-trytond-native-inputs))
(propagated-inputs
`(("trytond" ,trytond)
("trytond-stock-forecast" ,trytond-stock-forecast)
@@ -4293,7 +4293,7 @@ forecast into account to compute purchase requests.")
(base32 "1qyvj61hwn3xgjqagnr7d28qkiniw5fp0b5vmn9wii9grf7p4m8d"))))
(build-system python-build-system)
(arguments (tryton-arguments "stock_supply_production"))
- (native-inputs `(,@%standard-trytond-native-inputs))
+ (native-inputs (%standard-trytond-native-inputs))
(propagated-inputs
`(("trytond" ,trytond)
("trytond-product" ,trytond-product)
@@ -4319,7 +4319,7 @@ supply mechanisms via production request.")
(base32 "0airh5jvcdjbkb71p684dr5qgsnpam2hhmq6gswclgnx3nd1lz6a"))))
(build-system python-build-system)
(arguments (tryton-arguments "timesheet"))
- (native-inputs `(,@%standard-trytond-native-inputs))
+ (native-inputs (%standard-trytond-native-inputs))
(propagated-inputs
`(("trytond" ,trytond)
("trytond-company" ,trytond-company)
@@ -4344,7 +4344,7 @@ periods.")
(base32 "0pjsdgad2plbx8k6mh6mpa6qbz6lp30nnpv7ydyz0gsgb6jz7li6"))))
(build-system python-build-system)
(arguments (tryton-arguments "timesheet_cost"))
- (native-inputs `(,@%standard-trytond-native-inputs))
+ (native-inputs (%standard-trytond-native-inputs))
(propagated-inputs
`(("trytond" ,trytond)
("trytond-company" ,trytond-company)
@@ -4368,7 +4368,7 @@ employee.")
(base32 "11sjz46kagrpig5n05pp52yph4z0l1zm140q9wsagjcmzkx7s6gf"))))
(build-system python-build-system)
(arguments (tryton-arguments "user_role"))
- (native-inputs `(,@%standard-trytond-native-inputs))
+ (native-inputs (%standard-trytond-native-inputs))
(propagated-inputs
`(("trytond" ,trytond)))
(home-page "https://docs.tryton.org/projects/modules-user-role")
@@ -4392,7 +4392,7 @@ user for a period of time only.")
(build-system python-build-system)
(arguments (tryton-arguments "web_shop"))
(native-inputs
- `(,@%standard-trytond-native-inputs
+ `(,@(%standard-trytond-native-inputs)
("trytond-product-attribute" ,trytond-product-attribute)))
(propagated-inputs
`(("trytond" ,trytond)
@@ -4422,7 +4422,7 @@ configuration of an online web shop.")
(build-system python-build-system)
(arguments (tryton-arguments "web_shop_vue_storefront"))
(native-inputs
- `(,@%standard-trytond-native-inputs
+ `(,@(%standard-trytond-native-inputs)
("trytond-carrier" ,trytond-carrier)
("trytond-product-attribute" ,trytond-product-attribute)
("trytond-sale-promotion-coupon" ,trytond-sale-promotion-coupon)
@@ -4455,7 +4455,7 @@ Vue Storefront 1.x.")
(base32 "0j4yv9q0f39bkyqlcn7kpnlqi9wc4qfjs8zic69za6xw2c86zgzm"))))
(build-system python-build-system)
(arguments (tryton-arguments "web_shop_vue_storefront_stripe"))
- (native-inputs `(,@%standard-trytond-native-inputs))
+ (native-inputs (%standard-trytond-native-inputs))
(propagated-inputs
`(("trytond" ,trytond)
("trytond-account-payment-stripe" ,trytond-account-payment-stripe)
@@ -4481,7 +4481,7 @@ provides support of Stripe payment for Vue Storefront integration.")
(base32 "0vxwnsy7xzxawn7fmm6ykdrhih6ahrwwx6fzd6kz7qbwh4nmqcpk"))))
(build-system python-build-system)
(arguments (tryton-arguments "web_shortener"))
- (native-inputs `(,@%standard-trytond-native-inputs))
+ (native-inputs (%standard-trytond-native-inputs))
(propagated-inputs
`(("trytond" ,trytond)))
(home-page "https://docs.tryton.org/projects/modules-web-shortener")
@@ -4503,7 +4503,7 @@ optionally triggers action.")
(base32 "1k07d1kcfm2hwwqcyy8k5mjbhhgrnji0hadn487zsx1zp50r6rds"))))
(build-system python-build-system)
(arguments (tryton-arguments "web_user"))
- (native-inputs `(,@%standard-trytond-native-inputs))
+ (native-inputs (%standard-trytond-native-inputs))
(propagated-inputs
`(("trytond" ,trytond)
("trytond-party" ,trytond-party)))
diff --git a/gnu/packages/uml.scm b/gnu/packages/uml.scm
index ad766beece..83f10a08a1 100644
--- a/gnu/packages/uml.scm
+++ b/gnu/packages/uml.scm
@@ -54,8 +54,7 @@
#t))
(add-after 'delete-extra-from-classpath 'patch-usr-bin-dot
(lambda* (#:key inputs #:allow-other-keys)
- (let ((dot (string-append (assoc-ref inputs "graphviz")
- "/bin/dot")))
+ (let ((dot (search-input-file inputs "/bin/dot")))
(substitute*
"src/net/sourceforge/plantuml/cucadiagram/dot/GraphvizLinux.java"
(("/usr/bin/dot") dot)))
diff --git a/gnu/packages/upnp.scm b/gnu/packages/upnp.scm
index ffdebdf1de..6dded5e0d2 100644
--- a/gnu/packages/upnp.scm
+++ b/gnu/packages/upnp.scm
@@ -63,7 +63,7 @@
;; the configure phase.
`(#:make-flags
(list
- (string-append "SH=" (assoc-ref %build-inputs "bash") "/bin/sh")
+ (string-append "SH=" (search-input-file %build-inputs "/bin/sh"))
(string-append "INSTALLPREFIX=" (assoc-ref %outputs "out"))
,(string-append "CC=" (cc-for-target))
diff --git a/gnu/packages/valgrind.scm b/gnu/packages/valgrind.scm
index 4036bd461b..e90142b6a7 100644
--- a/gnu/packages/valgrind.scm
+++ b/gnu/packages/valgrind.scm
@@ -35,7 +35,7 @@
(name "valgrind")
;; Note: check "guix refresh -l -e '(@ (gnu packages valgrind) valgrind)'"
;; when updating this package to find which branch it should go to.
- (version "3.16.1")
+ (version "3.17.0")
(source (origin
(method url-fetch)
(uri (list (string-append "https://sourceware.org/pub/valgrind"
@@ -44,7 +44,7 @@
"/valgrind-" version ".tar.bz2")))
(sha256
(base32
- "1jik19rcd34ip8a5c9nv5wfj8k8maqb8cyclr4xhznq2gcpkl7y9"))
+ "18l5jbk301j3462gipqn9bkfx44mdmwn0pwr73r40gl1irkfqfmd"))
(patches (search-patches "valgrind-enable-arm.patch"))))
(build-system gnu-build-system)
(outputs '("doc" ;16 MB
diff --git a/gnu/packages/version-control.scm b/gnu/packages/version-control.scm
index 162b0ad832..10a2e240dc 100644
--- a/gnu/packages/version-control.scm
+++ b/gnu/packages/version-control.scm
@@ -1,7 +1,7 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org>
;;; Copyright © 2013 Cyril Roelandt <tipecaml@gmail.com>
-;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2013, 2014 Andreas Enge <andreas@enge.fr>
;;; Copyright © 2015, 2016 Mathieu Lirzin <mthl@gnu.org>
;;; Copyright © 2014, 2015, 2016 Mark H Weaver <mhw@netris.org>
@@ -40,6 +40,7 @@
;;; Copyright © 2021 Xinglu Chen <public@yoctocell.xyz>
;;; Copyright © 2021 François J. <francois-oss@avalenn.eu>
;;; Copyright © 2021 Julien Lepiller <julien@lepiller.eu>
+;;; Copyright © 2021 Guillaume Le Vaillant <glv@posteo.net>
;;; Copyright © 2021 jgart <jgart@dismail.de>
;;; Copyright © 2021 Foo Chuan Wei <chuanwei.foo@hotmail.com>
;;;
@@ -657,6 +658,18 @@ everything from small to very large projects with speed and efficiency.")
("perl" ,perl)
("zlib" ,zlib)))))
+(define-public git-minimal/fixed
+ ;; Version that rarely changes, depended on by Graphene/GTK+.
+ (package/inherit git-minimal
+ (version "2.33.1")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "mirror://kernel.org/software/scm/git/git-"
+ version ".tar.xz"))
+ (sha256
+ (base32
+ "0bqz401dyp8wnjj3k5ahrniwk4dalndysqazzwdvv25hqbkacm70"))))))
+
(define-public git2cl
(let ((commit "1d74d4c0d933fc69ed5cec838c73502584dead05"))
(package
@@ -722,12 +735,12 @@ logs to GNU ChangeLog format.")
(git (assoc-ref inputs "git")))
(wrap-program (string-append out "/bin/gl")
`("PATH" ":" prefix (,(string-append git "/bin")))
- `("PYTHONPATH" ":" =
+ `("GUIX_PYTHONPATH" ":" =
(,(string-append out "/lib/python"
,(version-major+minor
(package-version python))
"/site-packages:")
- ,(getenv "PYTHONPATH"))))
+ ,(getenv "GUIX_PYTHONPATH"))))
#t))))))
(native-inputs
`(("git-for-tests" ,git-minimal)))
@@ -774,19 +787,20 @@ to GitHub contributions calendar.")
(define-public libgit2
(package
(name "libgit2")
- (version "1.1.0")
+ (version "1.3.0")
(source (origin
- (method url-fetch)
- (uri (string-append "https://github.com/libgit2/libgit2/"
- "releases/download/v" version
- "/libgit2-" version ".tar.gz"))
+ ;; Since v1.1.1, release artifacts are no longer offered (see:
+ ;; https://github.com/libgit2/libgit2/discussions/5932#discussioncomment-1682729).
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/libgit2/libgit2")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
(sha256
(base32
- "1fjdglkh04qv3b4alg621pxa689i0wlf8m7nf2755zawjr2zhwxd"))
- (patches (search-patches "libgit2-mtime-0.patch"))
- (snippet '(begin
- (delete-file-recursively "deps") #t))
- (modules '((guix build utils)))))
+ "0vgpb2175a5dhqiy1iwywwppahgqhi340i8bsvafjpvkw284vazd"))
+ (modules '((guix build utils)))
+ (snippet '(delete-file-recursively "deps"))))
(build-system cmake-build-system)
(outputs '("out" "debug"))
(arguments
@@ -808,8 +822,7 @@ to GitHub contributions calendar.")
(("#!/bin/sh") (string-append "#!" (which "sh"))))
(substitute* "tests/clar/fs.h"
(("/bin/cp") (which "cp"))
- (("/bin/rm") (which "rm")))
- #t))
+ (("/bin/rm") (which "rm")))))
;; Run checks more verbosely, unless we are cross-compiling.
(replace 'check
(lambda* (#:key (tests? #t) #:allow-other-keys)
@@ -837,23 +850,23 @@ write native speed custom Git applications in any language with bindings.")
;; GPLv2 with linking exception
(license license:gpl2)))
-(define-public libgit2-0.28
+(define-public libgit2-1.1
(package
(inherit libgit2)
- (version "0.28.5")
- (source
- (origin
- (method url-fetch)
- (uri (string-append "https://github.com/libgit2/libgit2/releases/"
- "download/v" version
- "/libgit2-" version ".tar.gz"))
- (sha256
- (base32
- "0hjgpqjjmkciw1i8jqkx9q2vhdc4fc99qajhrj2bq8ziwsp6hyrb"))
- (patches (search-patches "libgit2-mtime-0.patch"))
- (modules '((guix build utils)))
- (snippet '(begin
- (delete-file-recursively "deps") #t))))))
+ (name "libgit2")
+ (version "1.1.0")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "https://github.com/libgit2/libgit2/"
+ "releases/download/v" version
+ "/libgit2-" version ".tar.gz"))
+ (sha256
+ (base32
+ "1fjdglkh04qv3b4alg621pxa689i0wlf8m7nf2755zawjr2zhwxd"))
+ (patches (search-patches "libgit2-mtime-0.patch"))
+ (snippet '(begin
+ (delete-file-recursively "deps") #t))
+ (modules '((guix build utils)))))))
(define-public git-crypt
(package
@@ -1027,7 +1040,7 @@ collaboration using typical untrusted file hosts or services.")
(lambda (file)
(wrap-program (string-append (assoc-ref outputs "out")
"/lib/cgit/filters/" file)
- `("PYTHONPATH" ":" prefix (,(getenv "PYTHONPATH")))))
+ `("GUIX_PYTHONPATH" ":" prefix (,(getenv "GUIX_PYTHONPATH")))))
'("syntax-highlighting.py"
"html-converters/md2html"))
#t)))))
@@ -1084,9 +1097,8 @@ a built-in cache to decrease server I/O pressure.")
(assoc-ref inputs "git") "/bin/git"
"'"))
(("/usr/sbin/sendmail")
- (string-append (assoc-ref inputs "sendmail")
- "/sbin/sendmail")))
- #t)))))
+ (search-input-file inputs
+ "/sbin/sendmail"))))))))
(inputs
`(("git" ,git)
("sendmail" ,sendmail)))
@@ -1473,8 +1485,7 @@ also walk each side of a merge and test those changes individually.")
(delete 'build)
(add-before 'install 'patch-scripts
(lambda* (#:key inputs #:allow-other-keys)
- (let ((perl (string-append (assoc-ref inputs "perl")
- "/bin/perl")))
+ (let ((perl (search-input-file inputs "/bin/perl")))
;; This seems to take care of every shell script that
;; invokes Perl.
(substitute* (find-files "." ".*")
@@ -1511,8 +1522,7 @@ also walk each side of a merge and test those changes individually.")
(substitute* '("src/lib/Gitolite/Hooks/PostUpdate.pm"
"src/lib/Gitolite/Hooks/Update.pm")
(("/usr/bin/perl")
- (string-append (assoc-ref inputs "perl")
- "/bin/perl")))
+ (search-input-file inputs "/bin/perl")))
(substitute* "src/lib/Gitolite/Common.pm"
(("\"ssh-keygen")
@@ -1681,16 +1691,14 @@ visualize your public Git repositories on a web interface.")
;; Ruby and Node tests require node and gem.
"--ignore=tests/languages/node_test.py"
"--ignore=tests/languages/ruby_test.py"
- ;; FIXME: Python tests fail because of distlib version
- ;; mismatch. Even with python-distlib/next it is
- ;; pulling version 0.3.0, while 0.3.1 is required.
- "--ignore=tests/languages/python_test.py" "-k"
+ "-k"
(string-append
;; TODO: these tests fail with AssertionError. It may
;; be possible to fix them.
"not test_install_existing_hooks_no_overwrite"
" and not test_uninstall_restores_legacy_hooks"
- " and not test_installed_from_venv")))))
+ " and not test_installed_from_venv"
+ " and not test_healthy_venv_creator")))))
(add-before 'reset-gzip-timestamps 'make-gz-writable
(lambda* (#:key outputs #:allow-other-keys)
;; Make sure .gz files are writable so that the
@@ -1702,7 +1710,7 @@ visualize your public Git repositories on a web interface.")
`(("git" ,git-minimal)
("python-covdefaults" ,python-covdefaults)
("python-coverage" ,python-coverage)
- ("python-distlib" ,python-distlib/next)
+ ("python-distlib" ,python-distlib)
("python-pytest" ,python-pytest)
("python-pytest-env" ,python-pytest-env)
("python-re-assert" ,python-re-assert)
@@ -1877,10 +1885,8 @@ history. It implements the changeset evolution concept for Mercurial.")
(modify-phases %standard-phases
(add-after 'unpack 'patch-paths
(lambda* (#:key inputs #:allow-other-keys)
- (let ((gpg (string-append (assoc-ref inputs "gnupg")
- "/bin/gpg"))
- (openssl (string-append (assoc-ref inputs "openssl")
- "/bin/openssl")))
+ (let ((gpg (search-input-file inputs "/bin/gpg"))
+ (openssl (search-input-file inputs "/bin/openssl")))
(substitute* "commitsigs.py"
(("b'gpg',") (string-append "b'" gpg "',"))
(("b'openssl',") (string-append "b'" openssl "',")))))))
@@ -2626,10 +2632,8 @@ Features include:
#:builder
(begin
(use-modules (guix build utils))
- (let ((bash (string-append (assoc-ref %build-inputs "bash")
- "/bin/bash"))
- (rclone (string-append (assoc-ref %build-inputs "rclone")
- "/bin/rclone")))
+ (let ((bash (search-input-file %build-inputs "/bin/bash"))
+ (rclone (search-input-file %build-inputs "/bin/rclone")))
(copy-file (string-append (assoc-ref %build-inputs "source")
"/git-annex-remote-rclone")
"git-annex-remote-rclone")
@@ -2651,7 +2655,7 @@ by rclone usable with git-annex.")
(define-public fossil
(package
(name "fossil")
- (version "2.11")
+ (version "2.14")
(source
(origin
(method url-fetch)
@@ -2659,7 +2663,7 @@ by rclone usable with git-annex.")
"https://www.fossil-scm.org/index.html/uv/"
"fossil-src-" version ".tar.gz"))
(sha256
- (base32 "0c9nzx42wxfmym9vf1pnbdb1c7gp7a7zqky60izxsph7w2xh8nix"))
+ (base32 "1fazl117ph5z7xg7h6w7i32sf7rsa67499rg2llsxn3d34hckl5q"))
(modules '((guix build utils)))
(snippet
'(begin
@@ -2855,8 +2859,7 @@ directory full of HOWTOs.")
#t))
(add-before 'install 'patch-git
(lambda* (#:key inputs #:allow-other-keys)
- (let ((git (string-append (assoc-ref inputs "git")
- "/bin/git")))
+ (let ((git (search-input-file inputs "/bin/git")))
(substitute* "bin/git-when-merged"
(("'git'") (string-append "'" git "'")))
#t)))
@@ -2864,7 +2867,7 @@ directory full of HOWTOs.")
(lambda* (#:key outputs #:allow-other-keys)
(wrap-program (string-append (assoc-ref outputs "out")
"/bin/git-when-merged")
- `("PYTHONPATH" ":" prefix (,(getenv "PYTHONPATH"))))
+ `("GUIX_PYTHONPATH" ":" prefix (,(getenv "GUIX_PYTHONPATH"))))
#t)))))
(inputs
`(("git" ,git)
@@ -2900,8 +2903,7 @@ how information about the merge is displayed.")
(delete 'configure)
(add-before 'install 'patch-git
(lambda* (#:key inputs #:allow-other-keys)
- (let ((git (string-append (assoc-ref inputs "git")
- "/bin/git")))
+ (let ((git (search-input-file inputs "/bin/git")))
(substitute* "git-imerge"
(("'git'") (string-append "'" git "'")))
#t)))
@@ -2909,7 +2911,7 @@ how information about the merge is displayed.")
(lambda* (#:key outputs #:allow-other-keys)
(wrap-program (string-append (assoc-ref outputs "out")
"/bin/git-imerge")
- `("PYTHONPATH" ":" prefix (,(getenv "PYTHONPATH"))))
+ `("GUIX_PYTHONPATH" ":" prefix (,(getenv "GUIX_PYTHONPATH"))))
#t)))))
(inputs
`(("git" ,git)
@@ -2954,9 +2956,9 @@ interrupted, published, and collaborated on while in progress.")
(invoke "make" "man"))
#t))
(add-after 'install 'install-man-pages
- (lambda _
+ (lambda* (#:key outputs #:allow-other-keys)
(with-directory-excursion "src/github.com/git-lfs/git-lfs/man"
- (let ((out (assoc-ref %outputs "out")))
+ (let ((out (assoc-ref outputs "out")))
(for-each
(lambda (manpage)
(install-file manpage (string-append out "/share/man/man1")))
@@ -3193,11 +3195,10 @@ defects faster.")
(substitute* "tests/test_main.py"
(("'gita\\\\n'") "'source\\n'")
(("'gita'") "'source'"))
- (invoke (string-append (assoc-ref inputs "git") "/bin/git")
+ (invoke (search-input-file inputs "/bin/git")
"init")
(add-installed-pythonpath inputs outputs)
- (invoke (string-append (assoc-ref inputs "python-pytest")
- "/bin/pytest")
+ (invoke (search-input-file inputs "/bin/pytest")
"-vv" "tests")))
(add-after 'install 'install-shell-completions
(lambda* (#:key outputs #:allow-other-keys)
diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm
index eeabb11bcf..eec88195c7 100644
--- a/gnu/packages/video.scm
+++ b/gnu/packages/video.scm
@@ -5,7 +5,7 @@
;;; Copyright © 2015 Taylan Ulrich Bayırlı/Kammer <taylanbayirli@gmail.com>
;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020, 2021 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2015, 2016 Andy Patterson <ajpatter@uwaterloo.ca>
-;;; Copyright © 2015, 2018, 2019, 2020 Ricardo Wurmus <rekado@elephly.net>
+;;; Copyright © 2015, 2018, 2019, 2020, 2021 Ricardo Wurmus <rekado@elephly.net>
;;; Copyright © 2015, 2016, 2017, 2018, 2019 Alex Vong <alexvong1995@gmail.com>
;;; Copyright © 2016, 2017 Alex Griffin <a@ajgrf.com>
;;; Copyright © 2016 Kei Kebreau <kkebreau@posteo.net>
@@ -22,7 +22,7 @@
;;; Copyright © 2017 Gregor Giesen <giesen@zaehlwerk.net>
;;; Copyright © 2017, 2018, 2019 Rutger Helling <rhelling@mykolab.com>
;;; Copyright © 2018 Roel Janssen <roel@gnu.org>
-;;; Copyright © 2018, 2019, 2020 Marius Bakke <mbakke@fastmail.com>
+;;; Copyright © 2018, 2019, 2020, 2021 Marius Bakke <marius@gnu.org>
;;; Copyright © 2018, 2019, 2020 Pierre Neidhardt <mail@ambrevar.xyz>
;;; Copyright © 2018, 2019, 2020 Leo Famulari <leo@famulari.name>
;;; Copyright © 2018 Brendan Tildesley <mail@brendan.scot>
@@ -38,7 +38,7 @@
;;; Copyright © 2020 Josh Holland <josh@inv.alid.pw>
;;; Copyright © 2020 Brice Waegeneire <brice@waegenei.re>
;;; Copyright © 2020 Vincent Legoll <vincent.legoll@gmail.com>
-;;; Copyright © 2020 Guillaume Le Vaillant <glv@posteo.net>
+;;; Copyright © 2020, 2021 Guillaume Le Vaillant <glv@posteo.net>
;;; Copyright © 2020 Alex McGrath <amk@amk.ie>
;;; Copyright © 2020, 2021 Michael Rohleder <mike@rohleder.de>
;;; Copyright © 2020, 2021 Vinicius Monego <monego@posteo.net>
@@ -52,6 +52,7 @@
;;; Copyright © 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;; Copyright © 2020 Hartmut Goebel <h.goebel@crazy-compilers.com>
;;; Copyright © 2021 Raghav Gururajan <rg@raghavgururajan.name>
+;;; Copyright © 2021 Thiago Jung Bauermann <bauermann@kolabnow.com>
;;; Copyright © 2021 Petr Hodina <phodina@protonmail.com>
;;; Copyright © 2021 Robin Templeton <robin@terpri.org>
;;; Copyright © 2021 Aleksandr Vityazev <avityazev@posteo.org>
@@ -79,6 +80,7 @@
#:use-module (guix utils)
#:use-module (guix packages)
#:use-module (guix download)
+ #:use-module (guix gexp)
#:use-module (guix git-download)
#:use-module (guix svn-download)
#:use-module (guix hg-download)
@@ -104,6 +106,7 @@
#:use-module (gnu packages bash)
#:use-module (gnu packages bison)
#:use-module (gnu packages boost)
+ #:use-module (gnu packages build-tools)
#:use-module (gnu packages cdrom)
#:use-module (gnu packages check)
#:use-module (gnu packages cmake)
@@ -209,10 +212,15 @@
(arguments
`(#:configure-flags
(list
- "--enable-libv4l2"
+ "CFLAGS=-O2 -g -fcommon"
+ ;; XXX: Broken API.
+ ;; Undeclared variables 'sys_nerr' and 'sys_errlist'.
+ ;; "--enable-libv4l2"
"--enable-libmpeg2"
"--enable-libmpeg2convert"
- "--enable-v4l"
+ ;; XXX: Broken API.
+ ;; Undeclared variables 'sys_nerr' and 'sys_errlist'.
+ ;; "--enable-v4l"
;;; XXX: Not available.
;"--enable-bktr"
;"--enable-sunau"
@@ -274,7 +282,7 @@
("lzo" ,lzo)
("mjepgtools" ,mjpegtools)
("sdl" ,sdl)
- ("v4l-utils" ,v4l-utils)
+ ;; ("v4l-utils" ,v4l-utils)
("x11" ,libx11)
("x264" ,libx264)
("xaw" ,libxaw)
@@ -721,12 +729,22 @@ stream decoding")
"1vkh19gb76agvh4h87ysbrgy82hrw88lnsvhynjf4vng629dmpgv"))))
(build-system gnu-build-system)
(native-inputs
- `(("makeinfo" ,texinfo)))
+ `(("config" ,config)
+ ("makeinfo" ,texinfo)))
(inputs
`(("ncurses" ,ncurses)))
(arguments
`(#:phases
(modify-phases %standard-phases
+ (add-after 'unpack 'update-config-scripts
+ (lambda* (#:key inputs native-inputs #:allow-other-keys)
+ ;; Replace outdated config.guess and config.sub.
+ (for-each (lambda (file)
+ (install-file
+ (search-input-file
+ (or native-inputs inputs)
+ (string-append "/bin/" file)) "."))
+ '("config.guess" "config.sub"))))
(replace 'configure
(lambda* (#:key build inputs outputs #:allow-other-keys)
;; This old `configure' script doesn't support
@@ -737,17 +755,6 @@ stream decoding")
(invoke "./configure"
(string-append "--prefix=" out)
(string-append "--build=" build)
- ;; The ancient config.guess is unable to
- ;; guess the host triplet on mips64el.
- ,@(if (string=? "mips64el-linux"
- (%current-system))
- '("--host=mips64el-unknown-linux-gnu")
- '())
- ;; The same is also true with aarch64.
- ,@(if (string=? "aarch64-linux"
- (%current-system))
- '("--host=aarch64-unknown-linux-gnu")
- '())
(string-append "--with-ncurses="
ncurses))))))))
(home-page "http://aa-project.sourceforge.net/aalib/")
@@ -1022,10 +1029,8 @@ H.264 (MPEG-4 AVC) video streams.")
#t)))
(add-before 'configure 'add-googletest
(lambda* (#:key inputs #:allow-other-keys)
- (symlink
- (string-append (assoc-ref inputs "googletest")
- "/include/gtest") "lib/gtest")
- #t))
+ (symlink (search-input-directory inputs "/include/gtest")
+ "lib/gtest")))
(replace 'build
(lambda _
(let ((-j (list "-j" (number->string (parallel-job-count)))))
@@ -1472,14 +1477,14 @@ quality and performance.")
(define-public libva
(package
(name "libva")
- (version "2.10.0")
+ (version "2.13.0")
(source
(origin
(method url-fetch)
(uri (string-append "https://github.com/intel/libva/releases/download/"
version "/libva-" version ".tar.bz2"))
(sha256
- (base32 "0dh2zjn6wi74ga75r6pbrrj8hjm213zyxvn9bv78z0fra1dy70gs"))))
+ (base32 "0q6l193x9whd80sjd5mx8cb7c0fcljb19nhfpla5h49nkzrq7lzs"))))
(build-system gnu-build-system)
(native-inputs
`(("pkg-config" ,pkg-config)))
@@ -2243,34 +2248,32 @@ projects while introducing many more.")
("zlib" ,zlib)
("mpv" ,mpv)))
(arguments
- `(#:tests? #false ; no tests
- #:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
- (string-append "CC=" ,(cc-for-target))
- ;; A KLUDGE to turn off invoking lrelease on the
- ;; project for now, because it fails consistently
- ;; with "WARNING: Could not find qmake spec
- ;; 'default'". See below.
- "LRELEASE=true")
- #:phases
- (modify-phases %standard-phases
- (delete 'configure)
- ;; Due to the above, we must run lrelease separately on each .ts file
- ;; (as opposed to running `lrelease-pro smplayer.pro` for the entire
- ;; project, as the Makefile does normally without the above kludge).
- (add-after 'build 'compile-ts-files
- (lambda _
- (for-each (lambda (file)
- (invoke "lrelease" file))
- (find-files "./" "\\.ts$"))
- #true))
- (add-after 'install 'wrap-executable
- (lambda* (#:key inputs outputs #:allow-other-keys)
- (let* ((out (assoc-ref outputs "out"))
- (mpv (assoc-ref inputs "mpv")))
- (wrap-program (string-append out "/bin/smplayer")
- `("PATH" ":" prefix
- ,(list (string-append mpv "/bin")))))
- #true)))))
+ (list #:tests? #false ; no tests
+ #:make-flags #~(list (string-append "PREFIX=" #$output)
+ (string-append "CC=" #+(cc-for-target))
+ ;; A KLUDGE to turn off invoking lrelease on the
+ ;; project for now, because it fails consistently
+ ;; with "WARNING: Could not find qmake spec
+ ;; 'default'". See below.
+ "LRELEASE=true")
+ #:phases
+ #~(modify-phases %standard-phases
+ (delete 'configure)
+ ;; Due to the above, we must run lrelease separately on each .ts file
+ ;; (as opposed to running `lrelease-pro smplayer.pro` for the entire
+ ;; project, as the Makefile does normally without the above kludge).
+ (add-after 'build 'compile-ts-files
+ (lambda _
+ (for-each (lambda (file)
+ (invoke "lrelease" file))
+ (find-files "./" "\\.ts$"))))
+ (add-after 'install 'wrap-executable
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (mpv (assoc-ref inputs "mpv")))
+ (wrap-program (string-append out "/bin/smplayer")
+ `("PATH" ":" prefix
+ ,(list (string-append mpv "/bin"))))))))))
(home-page "https://www.smplayer.info")
(synopsis "Complete front-end for MPlayer, a media player")
(description "SMPlayer is a graphical user interface (GUI) for
@@ -2643,8 +2646,7 @@ other site that youtube-dl supports.")
;; Explicitly invoke the input ffmpeg, instead of whichever one
;; happens to be in the user's $PATH at run time.
(lambda* (#:key inputs #:allow-other-keys)
- (let ((ffmpeg (string-append (assoc-ref inputs "ffmpeg")
- "/bin/ffmpeg")))
+ (let ((ffmpeg (search-input-file inputs "/bin/ffmpeg")))
(substitute* "src/you_get/processor/ffmpeg.py"
;; Don't blindly replace all occurrences of ‘'ffmpeg'’: the
;; same string is also used when sniffing ffmpeg's output.
@@ -3840,7 +3842,11 @@ Content System specification.")
;; test suite results differ depending on the country and also introduce
;; non-determinism in the tests.
;; https://github.com/mps-youtube/mps-youtube/issues/556
- `(#:tests? #f))
+ '(#:tests? #f
+ #:phases (modify-phases %standard-phases
+ ;; Loading this as a library will create cache directories,
+ ;; etc; which fails in the build container.
+ (delete 'sanity-check))))
(propagated-inputs
`(("python-pafy" ,python-pafy)
("python-pygobject" ,python-pygobject))) ; For mpris2 support
@@ -4080,7 +4086,10 @@ post-processing of video formats like MPEG2, H.264/AVC, and VC-1.")
(outputs '("out"
"static")) ; 3.7MiB .a file
(arguments
- `(#:phases
+ `(;; Build as C++2003 to avoid C++11 "narrowing conversion" errors.
+ #:configure-flags '("CXXFLAGS=-O2 -g -std=c++03")
+
+ #:phases
(modify-phases %standard-phases
(add-after 'unpack 'remove-dates
(lambda _
@@ -4436,6 +4445,7 @@ tools for styling them, including a built-in real-time video preview.")
(url "https://gitlab.gnome.org/GNOME/pitivi.git")
(commit %version)))
(file-name (git-file-name name version))
+ (patches (search-patches "pitivi-fix-build-with-meson-0.60.patch"))
(sha256
(base32 "08x2fs2bak1fbmkvjijgx1dsawispv91bpv5j5gkqbv5dfgf7wah"))))
(build-system meson-build-system)
@@ -4447,12 +4457,12 @@ tools for styling them, including a built-in real-time video preview.")
("gst-plugins-good" ,gst-plugins-good)
("gst-plugins-bad"
,(gst-plugins/selection gst-plugins-bad
- #:plugins '("debugutils" "transcoder")
+ #:plugins '("debugutils" "transcode")
#:configure-flags '("-Dintrospection=enabled")))
("gst-libav" ,gst-libav)
("gsound" ,gsound)
("gtk+" ,gtk+)
- ("gdk-pixbuf+svg" ,gdk-pixbuf+svg)
+ ("librsvg" ,librsvg)
("libpeas" ,libpeas)
("libnotify" ,libnotify)
("pango" ,pango)
@@ -4468,6 +4478,9 @@ tools for styling them, including a built-in real-time video preview.")
("pkg-config" ,pkg-config)))
(arguments
`(#:glib-or-gtk? #t
+ ;; Pitivi is not yet compatible with Meson 0.60:
+ ;; https://gitlab.gnome.org/GNOME/pitivi/-/issues/2593
+ #:meson ,meson-0.59
#:phases
(modify-phases %standard-phases
(add-after 'glib-or-gtk-wrap 'wrap-other-dependencies
@@ -4475,7 +4488,7 @@ tools for styling them, including a built-in real-time video preview.")
(let ((prog (string-append (assoc-ref outputs "out")
"/bin/pitivi")))
(wrap-program prog
- `("PYTHONPATH" = (,(getenv "PYTHONPATH")))
+ `("GUIX_PYTHONPATH" = (,(getenv "GUIX_PYTHONPATH")))
`("GI_TYPELIB_PATH" = (,(getenv "GI_TYPELIB_PATH")))
;; We've only added inputs for what Pitivi deems either
;; necessary or optional. Let the user's packages take
@@ -4802,9 +4815,8 @@ create smoother and stable videos.")
(setenv "ZMQDIR"
(assoc-ref inputs "zeromq"))
(setenv "UNITTEST_DIR"
- (string-append (assoc-ref inputs "unittest++")
- "/include/UnitTest++"))
- #t)))))
+ (search-input-directory inputs
+ "include/UnitTest++")))))))
(home-page "https://openshot.org")
(synopsis "Video-editing, animation, and playback library")
(description "OpenShot Library (libopenshot) is a powerful C++ video
@@ -5045,6 +5057,13 @@ video from a Wayland session.")
`(#:tests? #f ; Tests seem to require networking.
#:phases
(modify-phases %standard-phases
+ (add-after 'unpack 'disable-builtin-byte-compilation
+ (lambda _
+ ;; The setup.py script attempts to compile bytecode and fails.
+ ;; We compile bytecode in a separate phase, so just disable it.
+ (substitute* "setup.py"
+ (("distutils\\.util\\.byte_compile\\(.*")
+ ""))))
;; gaupol's setup.py script does not support one of the Python build
;; system's default flags, "--single-version-externally-managed".
(replace 'install
@@ -5059,8 +5078,7 @@ video from a Wayland session.")
(gi-typelib-path (getenv "GI_TYPELIB_PATH")))
(wrap-program (string-append out "/bin/gaupol")
`("GST_PLUGIN_SYSTEM_PATH" ":" prefix (,gst-plugin-path))
- `("GI_TYPELIB_PATH" ":" prefix (,gi-typelib-path))))
- #t))
+ `("GI_TYPELIB_PATH" ":" prefix (,gi-typelib-path))))))
(add-after 'unpack 'patch-data-dir
;; Fix some path variables that setup.py seems to garble.
(lambda* (#:key outputs #:allow-other-keys)
@@ -5069,8 +5087,7 @@ video from a Wayland session.")
(("DATA_DIR = \\{!r\\}\"\\.format\\(data_dir\\)")
(string-append "DATA_DIR = '" out "/share/gaupol'\""))
(("LOCALE_DIR = \\{!r\\}\"\\.format\\(locale_dir\\)")
- (string-append "LOCALE_DIR = '" out "/share/locale'\"")))
- #t))))))
+ (string-append "LOCALE_DIR = '" out "/share/locale'\"")))))))))
(synopsis "Editor for text-based subtitles")
(description
"Gaupol supports multiple subtitle file formats and provides means of
@@ -5226,6 +5243,8 @@ on supporting video-on-demand and live encoding on Intel Xeon processors.")
(sha256
(base32 "1zkgnj2sfvckix360wwk1v5s43g69snm45m0drnzyv7hgf5g7q1q"))))
(build-system gnu-build-system)
+ (arguments
+ `(#:configure-flags '("CFLAGS=-O2 -g -fcommon")))
(synopsis "Scan ATSC/DVB-C/DVB-S/DVB-T channels")
(description
"This is a small command line utility used to perform frequency scans for
@@ -5342,7 +5361,8 @@ for cases where libaom (the reference encoder) is too slow.")
(build-system meson-build-system)
(arguments '(#:glib-or-gtk? #t))
(inputs
- `(("gtk+" ,gtk+)))
+ `(("gtk+" ,gtk+)
+ ("python" ,python-wrapper)))
(native-inputs
`(("desktop-file-utils" ,desktop-file-utils) ; for update-desktop-database
("gettext" ,gettext-minimal)
diff --git a/gnu/packages/vim.scm b/gnu/packages/vim.scm
index aca7c5cac2..b2228bed4c 100644
--- a/gnu/packages/vim.scm
+++ b/gnu/packages/vim.scm
@@ -112,8 +112,7 @@
(lambda* (#:key inputs #:allow-other-keys)
;; One of the tests tests timezone-dependent functions.
(setenv "TZDIR"
- (string-append (assoc-ref inputs "tzdata")
- "/share/zoneinfo"))
+ (search-input-directory inputs "share/zoneinfo"))
;; Make sure the TERM environment variable is set for the tests
(setenv "TERM" "xterm")
@@ -775,8 +774,7 @@ refactor Vim in order to:
(modify-phases %standard-phases
(add-after 'configure 'reference-nvim
(lambda* (#:key inputs #:allow-other-keys)
- (let ((nvim (string-append (assoc-ref inputs "neovim")
- "/bin/nvim")))
+ (let ((nvim (search-input-file inputs "/bin/nvim")))
;; This substitution should change one line, and replaces the default
;; value in the struct of options with an absolute store reference.
(substitute* "../source/src/main.c"
diff --git a/gnu/packages/virtualization.scm b/gnu/packages/virtualization.scm
index d29b5f4978..55f0cf2d19 100644
--- a/gnu/packages/virtualization.scm
+++ b/gnu/packages/virtualization.scm
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2020 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2020, 2021 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2015, 2016, 2017, 2018 Mark H Weaver <mhw@netris.org>
;;; Copyright © 2016, 2017, 2018. 2019, 2020, 2021 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2016, 2017 Ricardo Wurmus <rekado@elephly.net>
@@ -174,7 +174,7 @@
`(#:tests? ,(or (%current-target-system)
(not (string=? "i686-linux" (%current-system))))
#:configure-flags
- (let ((gcc (string-append (assoc-ref %build-inputs "gcc") "/bin/gcc"))
+ (let ((gcc (search-input-file %build-inputs "/bin/gcc"))
(out (assoc-ref %outputs "out")))
(list (string-append "--cc=" gcc)
;; Some architectures insist on using HOST_CC.
@@ -250,7 +250,7 @@
;; Configure, build and install QEMU user-emulation static binaries.
(add-after 'configure 'configure-user-static
(lambda* (#:key inputs outputs #:allow-other-keys)
- (let* ((gcc (string-append (assoc-ref inputs "gcc") "/bin/gcc"))
+ (let* ((gcc (search-input-file inputs "/bin/gcc"))
(static (assoc-ref outputs "static"))
;; This is the common set of configure flags; it is
;; duplicated here to isolate this phase from manipulations
@@ -336,8 +336,7 @@ exec smbd $@")))
("perl" ,perl)
("flex" ,flex)
("bison" ,bison)
- ;; Using meson 0.57.1 enables reproducible QEMU builds.
- ("meson" ,meson-next)
+ ("meson" ,meson)
("ninja" ,ninja)
("pkg-config" ,pkg-config)
("python-wrapper" ,python-wrapper)
@@ -346,7 +345,7 @@ exec smbd $@")))
("texinfo" ,texinfo)
;; The following static libraries are required to build
;; the static output of QEMU.
- ("glib-static" ,glib-static)
+ ("glib:static" ,glib "static")
("pcre:static" ,pcre "static")
("zlib:static" ,zlib "static")))
(home-page "https://www.qemu.org")
@@ -522,8 +521,7 @@ firmware blobs. You can
"ganeti-sphinx-compat.patch"
"ganeti-haskell-compat.patch"
"ganeti-haskell-pythondir.patch"
- "ganeti-disable-version-symlinks.patch"
- "ganeti-preserve-PYTHONPATH.patch"))))
+ "ganeti-disable-version-symlinks.patch"))))
(build-system gnu-build-system)
(arguments
`(#:imported-modules (,@%gnu-build-system-modules
@@ -531,7 +529,7 @@ firmware blobs. You can
(guix build python-build-system))
#:modules (,@%gnu-build-system-modules
((guix build haskell-build-system) #:prefix haskell:)
- ((guix build python-build-system) #:select (python-version))
+ ((guix build python-build-system) #:select (site-packages))
(srfi srfi-1)
(srfi srfi-26)
(ice-9 match)
@@ -631,7 +629,8 @@ firmware blobs. You can
;; .sphinx-build-real executable name created by the Sphinx wrapper.
(substitute* "configure"
(("\\$SPHINX --version 2>&1")
- "$SPHINX --version 2>&1 | sed 's/.sphinx-build-real/sphinx-build/g'"))))
+ "$SPHINX --version 2>&1 \
+| sed 's/.sphinx-build-real/sphinx-build/g'"))))
;; The build system invokes Cabal and GHC, which do not work with
;; GHC_PACKAGE_PATH: <https://github.com/haskell/cabal/issues/3728>.
@@ -678,34 +677,16 @@ firmware blobs. You can
"")
;; This test requires networking.
(("test/py/import-export_unittest\\.bash")
- ""))
-
- ;; Many of the Makefile targets reset PYTHONPATH before running
- ;; the Python interpreter, which does not work very well for us.
- (substitute* "Makefile"
- (("PYTHONPATH=")
- (string-append "PYTHONPATH=" (getenv "PYTHONPATH") ":")))))
+ ""))))
(add-after 'build 'build-bash-completions
(lambda _
- (let ((orig-pythonpath (getenv "PYTHONPATH")))
- (setenv "PYTHONPATH" (string-append ".:" orig-pythonpath))
- (invoke "./autotools/build-bash-completion")
- (setenv "PYTHONPATH" orig-pythonpath))))
+ (setenv "PYTHONPATH" ".")
+ (invoke "./autotools/build-bash-completion")
+ (unsetenv "PYTHONPATH")))
(add-before 'check 'pre-check
(lambda* (#:key inputs #:allow-other-keys)
;; Set TZDIR so that time zones are found.
- (setenv "TZDIR" (string-append (assoc-ref inputs "tzdata")
- "/share/zoneinfo"))
-
- ;; This test checks whether PYTHONPATH is untouched, and extends
- ;; it to include test directories if so. Add an else branch for
- ;; our modified PYTHONPATH, in order to prevent a confusing test
- ;; failure where expired certificates are not cleaned because
- ;; check-cert-expired is silently crashing.
- (substitute* "test/py/ganeti-cleaner_unittest.bash"
- (("then export PYTHONPATH=(.*)" all testpath)
- (string-append all "else export PYTHONPATH="
- (getenv "PYTHONPATH") ":" testpath "\n")))
+ (setenv "TZDIR" (search-input-directory inputs "share/zoneinfo"))
(substitute* "test/py/ganeti.utils.process_unittest.py"
;; This test attempts to run an executable with
@@ -758,19 +739,16 @@ firmware blobs. You can
((commands ... prog)
(cons (basename prog) progs))))
(loop (read-line port) progs)))))))))))
- ;; Wrap all executables with PYTHONPATH. We can't borrow the phase
- ;; from python-build-system because we also need to wrap the scripts
- ;; in $out/lib/ganeti such as "node-daemon-setup".
+ ;; Wrap all executables with GUIX_PYTHONPATH. We can't borrow
+ ;; the phase from python-build-system because we also need to wrap
+ ;; the scripts in $out/lib/ganeti such as "node-daemon-setup".
(add-after 'install 'wrap
(lambda* (#:key inputs outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))
(sbin (string-append out "/sbin"))
(lib (string-append out "/lib"))
- (python (assoc-ref inputs "python"))
- (major+minor (python-version python))
- (PYTHONPATH (string-append lib "/python" major+minor
- "/site-packages:"
- (getenv "PYTHONPATH"))))
+ (PYTHONPATH (string-append (site-packages inputs outputs)
+ ":" (getenv "GUIX_PYTHONPATH"))))
(define (shell-script? file)
(call-with-ascii-input-file file
(lambda (port)
@@ -791,7 +769,8 @@ firmware blobs. You can
(for-each (lambda (file)
(wrap-program file
- `("PYTHONPATH" ":" prefix (,PYTHONPATH))))
+ `("GUIX_PYTHONPATH" ":" prefix
+ (,PYTHONPATH))))
(append-map (cut find-files <> wrap?)
(list (string-append lib "/ganeti")
sbin)))))))))
@@ -1003,7 +982,7 @@ Debian or a derivative using @command{debootstrap}.")
(define-public libosinfo
(package
(name "libosinfo")
- (version "1.7.1")
+ (version "1.9.0")
(source
(origin
(method url-fetch)
@@ -1011,7 +990,7 @@ Debian or a derivative using @command{debootstrap}.")
version ".tar.xz"))
(sha256
(base32
- "1s97sv24bybggjx6hgqba2qdqz3ivfpd4cmkh4zm5y59sim109mv"))))
+ "0nd360c9ampw8hb6xh5g45q858df2r4jj9q88bcl6gzgaj0l3wxl"))))
(build-system meson-build-system)
(arguments
`(#:configure-flags
@@ -1026,13 +1005,12 @@ Debian or a derivative using @command{debootstrap}.")
(substitute* "osinfo/osinfo_loader.c"
(("path = DATA_DIR.*")
(string-append "path = \"" (assoc-ref inputs "osinfo-db")
- "/share/osinfo\";")))
- #t)))))
+ "/share/osinfo\";"))))))))
(inputs
- `(("libsoup" ,libsoup)
+ `(("libsoup" ,libsoup-minimal-2)
("libxml2" ,libxml2)
("libxslt" ,libxslt)
- ("osinfo-db" ,osinfo-db)))
+ ("osinfo-db" ,osinfo-db-next)))
(native-inputs
`(("glib" ,glib "bin") ; glib-mkenums, etc.
("gobject-introspection" ,gobject-introspection)
@@ -1257,14 +1235,14 @@ pretty simple, REST API.")
(define-public libvirt
(package
(name "libvirt")
- (version "7.6.0")
+ (version "7.9.0")
(source
(origin
(method url-fetch)
(uri (string-append "https://libvirt.org/sources/libvirt-"
version ".tar.xz"))
(sha256
- (base32 "0hb1fq0yx41n36c3n1a54b5p37n0m7abs917d76v7aqas03735lg"))
+ (base32 "131fyxb05rrcr9ih4mhhjyw3cgsxh5l12vj4y109q9vlynsz5742"))
(patches (search-patches "libvirt-add-install-prefix.patch"))))
(build-system meson-build-system)
(arguments
@@ -1285,7 +1263,6 @@ pretty simple, REST API.")
(string-append "-Dinstall_prefix=" (assoc-ref %outputs "out"))
"--sysconfdir=/etc"
"--localstatedir=/var")
- #:meson ,meson-0.55
#:phases
(modify-phases %standard-phases
(add-after 'unpack 'skip-directory-confusion
@@ -1359,6 +1336,8 @@ to integrate other virtualization mechanisms if needed.")
(base32
"1gdcvqz88qkp402zra9csc6391f2xki1270x683n6ixakl3gf8w4"))))
(build-system meson-build-system)
+ (arguments
+ `(#:meson ,meson-0.59)) ;KeyError: 'install_dir' with meson 0.60
(inputs
`(("openssl" ,openssl)
("cyrus-sasl" ,cyrus-sasl)
@@ -1392,14 +1371,14 @@ three libraries:
(define-public python-libvirt
(package
(name "python-libvirt")
- (version "7.3.0")
+ (version "7.9.0")
(source
(origin
(method url-fetch)
(uri (string-append "https://libvirt.org/sources/python/libvirt-python-"
version ".tar.gz"))
(sha256
- (base32 "15pn8610ybf03xff3vbz3apz2ph42k2kh6k19r020l9nvc6jcv37"))))
+ (base32 "0nakisj2ady5a41k4zc95k0kp749f4ppmxgr91b1h1dzbzxcydc5"))))
(build-system python-build-system)
(arguments
`(#:phases
@@ -1462,8 +1441,8 @@ virtualization library.")
(lambda* (#:key inputs #:allow-other-keys)
;; Xen is not available for now - so only patch qemu.
(substitute* "virtManager/createconn.py"
- (("/usr(/bin/qemu-system)" _ suffix)
- (string-append (assoc-ref inputs "qemu") suffix)))
+ (("/usr(/bin/qemu-system-[a-zA-Z0-9_-]+)" _ suffix)
+ (search-input-file inputs suffix)))
#t))
(add-before 'wrap 'wrap-with-GI_TYPELIB_PATH
(lambda* (#:key inputs outputs #:allow-other-keys)
@@ -1497,7 +1476,7 @@ virtualization library.")
#t))
(add-after 'install 'glib-or-gtk-compile-schemas
(assoc-ref glib-or-gtk:%standard-phases 'glib-or-gtk-compile-schemas))
- (add-after 'install 'glib-or-gtk-wrap
+ (add-after 'wrap 'glib-or-gtk-wrap
(assoc-ref glib-or-gtk:%standard-phases 'glib-or-gtk-wrap)))))
(inputs
`(("dconf" ,dconf)
@@ -1562,11 +1541,13 @@ domains, their live performance and resource utilization statistics.")
(list (string-append "PREFIX=" (assoc-ref %outputs "out"))
(string-append "LIBDIR=" (assoc-ref %outputs "out")
"/lib")
- (string-append "ASCIIDOC=" (assoc-ref %build-inputs "asciidoc")
- "/bin/asciidoc")
+ (string-append "ASCIIDOC="
+ (search-input-file %build-inputs
+ "/bin/asciidoc"))
(string-append "PYTHON=python3")
- (string-append "XMLTO=" (assoc-ref %build-inputs "xmlto")
- "/bin/xmlto"))
+ (string-append "XMLTO="
+ (search-input-file %build-input
+ "/bin/xmlto")))
#:phases
(modify-phases %standard-phases
(delete 'configure) ; no configure script
@@ -1591,8 +1572,9 @@ domains, their live performance and resource utilization statistics.")
;; /usr/include/..., which obviously does not exist.
(let* ((file "google/protobuf/descriptor.proto")
(target (string-append "images/" file))
- (source (string-append (assoc-ref inputs "protobuf")
- "/include/" file)))
+ (source (search-input-file
+ inputs
+ (string-append "include/" file))))
(delete-file target)
(symlink source target))))
(add-after 'install 'wrap
@@ -1603,9 +1585,9 @@ domains, their live performance and resource utilization statistics.")
,(version-major+minor
(package-version python))
"/site-packages"))
- (path (getenv "PYTHONPATH")))
+ (path (getenv "GUIX_PYTHONPATH")))
(wrap-program (string-append out "/bin/crit")
- `("PYTHONPATH" ":" prefix (,site ,path))))))
+ `("GUIX_PYTHONPATH" ":" prefix (,site ,path))))))
(add-after 'install 'delete-static-libraries
;; Not building/installing these at all doesn't seem to be supported.
(lambda* (#:key outputs #:allow-other-keys)
@@ -2213,7 +2195,7 @@ which is a hypervisor.")
(define-public osinfo-db-tools
(package
(name "osinfo-db-tools")
- (version "1.8.0")
+ (version "1.9.0")
(source (origin
(method url-fetch)
(uri (string-append "https://releases.pagure.org/libosinfo/osinfo-db-tools-"
@@ -2221,10 +2203,10 @@ which is a hypervisor.")
(sha256
(base32
- "038q3gzdbkfkhpicj0755mw1q4gbvn57pslpw8n2dp3lds9im0g9"))))
+ "1h23a8nzdxjyvw44dwh903563n3b1z5skx8g0b1p1v5cif3iqpr5"))))
(build-system meson-build-system)
(inputs
- `(("libsoup" ,libsoup)
+ `(("libsoup" ,libsoup-minimal-2)
("libxml2" ,libxml2)
("libxslt" ,libxslt)
("json-glib" ,json-glib)
@@ -2279,6 +2261,19 @@ libosinfo library. It provides information about guest operating systems for
use with virtualization provisioning tools")
(license license:lgpl2.0+)))
+;; XXX: Support for guix-1.3 has been added upstream but no release were
+;; created. Remove it when a new osinfo-db release is out.
+(define-public osinfo-db-next
+ (package
+ (inherit osinfo-db)
+ (version "20211127")
+ (source (origin
+ (method url-fetch)
+ (uri "https://othacehe.org/files/osinfo-db-20211127.tar.xz")
+ (sha256
+ (base32
+ "0kvgdsvpm51a6vqs4k6zmdbc5vvj8mnsgm4pa7h79d9gg244gb3s"))))))
+
(define-public python-transient
(package
(name "python-transient")
diff --git a/gnu/packages/vnc.scm b/gnu/packages/vnc.scm
index 10ae2b6e87..c6b9d0059b 100644
--- a/gnu/packages/vnc.scm
+++ b/gnu/packages/vnc.scm
@@ -119,7 +119,7 @@
("ffmpeg" ,ffmpeg)
("freerdp" ,freerdp) ; for rdp plugin
("gcrypt" ,libgcrypt)
- ("gdk-pixbuf" ,gdk-pixbuf+svg)
+ ("librsvg" ,librsvg)
("glib" ,glib)
("gnome-keyring" ,gnome-keyring)
("gsettings-desktop-schemas" ,gsettings-desktop-schemas)
@@ -127,7 +127,7 @@
("harfbuzz" ,harfbuzz)
("json-glib" ,json-glib)
("libsecret" ,libsecret) ; for secret plugin
- ("libsoup" ,libsoup)
+ ("libsoup" ,libsoup-minimal-2)
("libssh" ,libssh) ; for ssh plugin
("libvnc" ,libvnc) ; for vnc plugin
("openssl" ,openssl)
diff --git a/gnu/packages/vpn.scm b/gnu/packages/vpn.scm
index a59762f733..b06ca33868 100644
--- a/gnu/packages/vpn.scm
+++ b/gnu/packages/vpn.scm
@@ -1,6 +1,6 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2013 Andreas Enge <andreas@enge.fr>
-;;; Copyright © 2013, 2016, 2018, 2019, 2020 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2013, 2016, 2018, 2019, 2020, 2021 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2014 Eric Bavier <bavier@member.fsf.org>
;;; Copyright © 2015 Jeff Mickey <j@codemac.net>
;;; Copyright © 2016, 2017, 2019, 2021 Efraim Flashner <efraim@flashner.co.il>
@@ -323,7 +323,7 @@ endpoints.")
"/bin/" command)))
(substitute* "src/libstrongswan/utils/process.c"
(("/bin/sh")
- (string-append (assoc-ref inputs "bash") "/bin/sh")))
+ (search-input-file inputs "/bin/sh")))
(substitute* "src/libstrongswan/tests/suites/test_process.c"
(("/bin/sh") (which "sh"))
@@ -331,8 +331,8 @@ endpoints.")
(("cat") (which "cat")))))
(add-before 'check 'set-up-test-environment
(lambda* (#:key inputs #:allow-other-keys)
- (setenv "TZDIR" (string-append (assoc-ref inputs "tzdata")
- "/share/zoneinfo")))))
+ (setenv "TZDIR"
+ (search-input-directory inputs "share/zoneinfo")))))
#:configure-flags
(list
"--disable-ldap"
@@ -529,10 +529,12 @@ Only \"Universal TUN/TAP device driver support\" is needed in the kernel.")
;; Wrap scripts with paths to their common hard dependencies.
;; Optional dependencies will need to be installed by the user.
(lambda* (#:key inputs outputs #:allow-other-keys)
- (let ((out (assoc-ref outputs "out")))
+ (let ((out (assoc-ref outputs "out"))
+ (guile (search-input-file inputs "bin/guile")))
(for-each
(lambda (script)
(wrap-script (string-append out "/etc/vpnc/" script)
+ #:guile guile
`("PATH" ":" prefix
,(map (lambda (name)
(let ((input (assoc-ref inputs name)))
@@ -661,6 +663,7 @@ and probably others.")
(assoc-ref inputs "qtwebengine")
"/lib/qt5/libexec/QtWebEngineProcess")))
(wrap-program bin
+ #:sh (search-input-file inputs "bin/bash")
`("QTWEBENGINEPROCESS_PATH" = (,qt-process-path)))
#t))))))
(inputs
@@ -774,6 +777,7 @@ traversing network address translators (@dfn{NAT}s) and firewalls.")
(let ((entrypoint (string-append (assoc-ref outputs "out")
"/bin/.protonvpn-real")))
(wrap-program entrypoint
+ #:sh (search-input-file inputs "bin/bash")
`("PATH" ":" prefix
,(map (lambda (name)
(let ((input (assoc-ref inputs name)))
@@ -1060,6 +1064,7 @@ WireGuard was added to Linux 5.6.")
(coreutils (string-append (assoc-ref inputs "coreutils")
"/bin")))
(wrap-program (string-append out "/bin/wg-quick")
+ #:sh (search-input-file inputs "bin/bash")
`("PATH" ":" prefix ,(append inputs-sbin
(list coreutils))))))))))
(inputs
@@ -1106,8 +1111,7 @@ public keys and can roam across IP addresses.")
(lambda* (#:key inputs #:allow-other-keys)
(substitute* "l2tp.h"
(("/usr/sbin/pppd")
- (string-append (assoc-ref inputs "ppp")
- "/sbin/pppd")))
+ (search-input-file inputs "/sbin/pppd")))
(setenv "KERNELSRC"
(assoc-ref inputs "linux-libre-headers"))
#t)))
diff --git a/gnu/packages/vulkan.scm b/gnu/packages/vulkan.scm
index ac91f8451c..b3f20fdbcf 100644
--- a/gnu/packages/vulkan.scm
+++ b/gnu/packages/vulkan.scm
@@ -3,6 +3,7 @@
;;; Copyright © 2018, 2019 Tobias Geerinckx-Rice <me@tobias.gr>
;;; Copyright © 2018 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2020 Marius Bakke <mbakke@fastmail.com>
+;;; Copyright © 2021 Mathieu Othacehe <othacehe@gnu.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -24,6 +25,7 @@
#:use-module (guix packages)
#:use-module (guix download)
#:use-module (guix git-download)
+ #:use-module (guix gexp)
#:use-module (guix build-system cmake)
#:use-module (guix build-system gnu)
#:use-module (guix build-system meson)
@@ -222,7 +224,14 @@ interpretation of the specifications for these languages.")
"15gx9ab6w1sjq9hkpbas7z2f8f47j6mlln6p3w26qmydjj8gfjjv"))))
(build-system cmake-build-system)
(arguments
- `(#:phases (modify-phases %standard-phases
+ `(#:configure-flags
+ ,#~(list
+ (string-append "-DVULKAN_HEADERS_INSTALL_DIR="
+ #$(this-package-input "vulkan-headers"))
+ (string-append "-DCMAKE_INSTALL_INCLUDEDIR="
+ #$(this-package-input "vulkan-headers")
+ "/include"))
+ #:phases (modify-phases %standard-phases
(add-after 'unpack 'unpack-googletest
(lambda* (#:key inputs #:allow-other-keys)
(let ((gtest (assoc-ref inputs "googletest:source")))
@@ -243,8 +252,9 @@ interpretation of the specifications for these languages.")
("libxrandr" ,libxrandr)
("pkg-config" ,pkg-config)
("python" ,python)
- ("vulkan-headers" ,vulkan-headers)
("wayland" ,wayland)))
+ (inputs
+ `(("vulkan-headers" ,vulkan-headers)))
(home-page
"https://github.com/KhronosGroup/Vulkan-Loader")
(synopsis "Khronos official ICD loader and validation layers for Vulkan")
diff --git a/gnu/packages/w3m.scm b/gnu/packages/w3m.scm
index 934a6d9e38..a14ca02e84 100644
--- a/gnu/packages/w3m.scm
+++ b/gnu/packages/w3m.scm
@@ -5,6 +5,7 @@
;;; Copyright © 2016, 2019 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2018 Rutger Helling <rhelling@mykolab.com>
;;; Copyright © 2020 Tobias Geerinckx-Rice <me@tobias.gr>
+;;; Copyright © 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -27,6 +28,7 @@
#:use-module (gnu packages bdw-gc)
#:use-module (gnu packages compression)
#:use-module (gnu packages gtk)
+ #:use-module (gnu packages image)
#:use-module (gnu packages ncurses)
#:use-module (gnu packages perl)
#:use-module (gnu packages pkg-config)
@@ -40,7 +42,7 @@
(define-public w3m
(package
(name "w3m")
- (version "0.5.3+git20200502")
+ (version "0.5.3+git20210102")
(source (origin
(method git-fetch)
;; Debian's fork of w3m is the only one that is still maintained.
@@ -50,21 +52,22 @@
(file-name (git-file-name name version))
(sha256
(base32
- "0yyfhwcwy1dvdbirj6zqwk4gl8z9npfavs0k7ipcg5fd16vnx7mi"))))
+ "0amq1wfjp5mhqjmvrc0yhxjlx1335p78d7ap8iykfjn5h8yhmrg5"))))
(build-system gnu-build-system)
(arguments
'(#:tests? #f ; no check target
;; Use $EDITOR instead of a hard-coded value.
- #:configure-flags '("--with-editor=")
+ #:configure-flags (list "--with-editor="
+ "--with-imagelib=imlib2")
#:phases
(modify-phases %standard-phases
(add-before 'configure 'fix-perl
(lambda _ (substitute* '("scripts/w3mmail.cgi.in"
"scripts/dirlist.cgi.in")
- (("@PERL@") (which "perl")))
- #t)))))
+ (("@PERL@") (which "perl"))))))))
(inputs
`(("gdk-pixbuf" ,gdk-pixbuf)
+ ("imlib2" ,imlib2)
("libgc" ,libgc)
("libx11" ,libx11)
("ncurses" ,ncurses)
diff --git a/gnu/packages/web-browsers.scm b/gnu/packages/web-browsers.scm
index f2c5cb0be7..945dc72847 100644
--- a/gnu/packages/web-browsers.scm
+++ b/gnu/packages/web-browsers.scm
@@ -51,6 +51,7 @@
#:use-module (gnu packages)
#:use-module (gnu packages autotools)
#:use-module (gnu packages backup)
+ #:use-module (gnu packages base)
#:use-module (gnu packages bison)
#:use-module (gnu packages compression)
#:use-module (gnu packages curl)
@@ -125,10 +126,12 @@
(assoc-ref glib-or-gtk:%standard-phases
'glib-or-gtk-wrap)))))
(native-inputs
- `(("glib:bin" ,glib "bin")
+ `(("desktop-file-utils" ,desktop-file-utils) ;for tests
+ ("glib:bin" ,glib "bin")
("gtk+:bin" ,gtk+ "bin")
("intltool" ,intltool)
- ("pkg-config" ,pkg-config)))
+ ("pkg-config" ,pkg-config)
+ ("which" ,which))) ;for tests
(inputs
`(("adwaita-icon-theme" ,adwaita-icon-theme)
("gcr" ,gcr)
@@ -139,10 +142,9 @@
("json-glib" ,json-glib)
("libarchive" ,libarchive)
("libpeas" ,libpeas)
- ("libsoup" ,libsoup)
("sqlite" ,sqlite)
("vala" ,vala)
- ("webkitgtk" ,webkitgtk)))
+ ("webkitgtk" ,webkitgtk-with-libsoup2)))
(synopsis "Lightweight graphical web browser")
(description "@code{Midori} is a lightweight, Webkit-based web browser.
It features integration with GTK+3, configurable web search engine, bookmark
@@ -222,7 +224,7 @@ features including, tables, builtin image display, bookmarks, SSL and more.")
("glib-networking" ,glib-networking)
("lua5.1-filesystem" ,lua5.1-filesystem)
("luajit" ,luajit)
- ("webkitgtk" ,webkitgtk)
+ ("webkitgtk" ,webkitgtk-with-libsoup2)
("sqlite" ,sqlite)))
(native-inputs
`(("pkg-config" ,pkg-config)))
@@ -563,7 +565,7 @@ GUI. It is based on PyQt5 and QtWebEngine.")
(inputs
`(("glib-networking" ,glib-networking)
("gsettings-desktop-schemas" ,gsettings-desktop-schemas)
- ("webkitgtk" ,webkitgtk)))
+ ("webkitgtk" ,webkitgtk-with-libsoup2)))
(native-inputs
`(("pkg-config" ,pkg-config)))
(home-page "https://fanglingsu.github.io/vimb/")
diff --git a/gnu/packages/web.scm b/gnu/packages/web.scm
index 8bb02ee887..7ea3217481 100644
--- a/gnu/packages/web.scm
+++ b/gnu/packages/web.scm
@@ -40,17 +40,19 @@
;;; Copyright © 2019, 2020 Florian Pelz <pelzflorian@pelzflorian.de>
;;; Copyright © 2020 Timotej Lazar <timotej.lazar@araneo.si>
;;; Copyright © 2020 Pierre Neidhardt <mail@ambrevar.xyz>
-;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
+;;; Copyright © 2020, 2021 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
;;; Copyright © 2018, 2019, 2020 Björn Höfling <bjoern.hoefling@bjoernhoefling.de>
;;; Copyright © 2020, 2021 Paul Garlick <pgarlick@tourbillion-technology.com>
;;; Copyright © 2020 Michael Rohleder <mike@rohleder.de>
;;; Copyright © 2020, 2021 Ryan Prior <rprior@protonmail.com>
;;; Copyright © 2020 Alexandru-Sergiu Marton <brown121407@posteo.ro>
+;;; Copyright © 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;; Copyright © 2021 Stefan Reichör <stefan@xsteve.at>
;;; Copyright © 2021 la snesne <lasnesne@lagunposprasihopre.org>
;;; Copyright © 2021 Matthew James Kraai <kraai@ftbfs.org>
;;; Copyright © 2021 Sarah Morgensen <iskarian@mgsn.dev>
;;; Copyright © 2021 Jack Hill <jackhill@jackhill.us>
+;;; Copyright © 2021 Guillaume Le Vaillant <glv@posteo.net>
;;; Copyright © 2021 Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
;;;
;;; This file is part of GNU Guix.
@@ -1010,8 +1012,8 @@ and UNIX socket support.")
(arguments
`(#:configure-flags
(list "--disable-plugin" ;NPAPI plugins are obsolete nowadays.
- (string-append "BIN_BASH=" (assoc-ref %build-inputs "bash")
- "/bin/bash")
+ (string-append "BIN_BASH="
+ (search-input-file %build-inputs "/bin/bash"))
(string-append "--with-jdk-home=" (assoc-ref %build-inputs "jdk")))))
(outputs '("out" "doc"))
(native-inputs
@@ -1033,7 +1035,7 @@ libraries for working with JNLP applets.")
(define-public jansson
(package
(name "jansson")
- (version "2.12")
+ (version "2.13.1")
(source (origin
(method url-fetch)
(uri
@@ -1041,7 +1043,7 @@ libraries for working with JNLP applets.")
version ".tar.bz2"))
(sha256
(base32
- "1lp1mv8pjp5yziws66cy0dhpcam4bbjqhffk13v4vgdybp674pb4"))))
+ "1g8h18vh8gyxlwfmvdivdp1siad26ywj5zr4j4avgdyjg7wa147f"))))
(build-system gnu-build-system)
(arguments
`(#:configure-flags '("--disable-static")))
@@ -1055,7 +1057,7 @@ data.")
(define-public json-c
(package
(name "json-c")
- (version "0.14")
+ (version "0.15")
(source (origin
(method url-fetch)
(uri (string-append
@@ -1063,8 +1065,7 @@ data.")
version ".tar.gz"))
(sha256
(base32
- "0w381krr99q5a2rypx4g437fa7gzgl82i64sgnrs6g5jr44dwxxk"))
- (patches (search-patches "json-c-CVE-2020-12762.patch"))))
+ "1im484iz08j3gmzpw07v16brwq46pxxj65i996kkp2vivcfhmn5q"))))
(build-system cmake-build-system)
(home-page "https://github.com/json-c/json-c/wiki")
(synopsis "JSON implementation in C")
@@ -3886,16 +3887,14 @@ and IPv6 sockets, intended as a replacement for IO::Socket::INET.")
(define-public perl-io-socket-ssl
(package
(name "perl-io-socket-ssl")
- (version "2.066")
+ (version "2.068")
(source (origin
(method url-fetch)
(uri (string-append "mirror://cpan/authors/id/S/SU/SULLR/"
"IO-Socket-SSL-" version ".tar.gz"))
(sha256
(base32
- "1kgbws7dwp2hh16qid7169dfkhmcwg7dz9ffbm6k0id5h53hciqd"))
- (patches (search-patches
- "perl-io-socket-ssl-openssl-1.0.2f-fix.patch"))))
+ "1ycgzg1l7p07y5wc0vzgnj122vm51p5aqpi4s56pp0piaq0gq824"))))
(build-system perl-build-system)
(propagated-inputs
`(("perl-net-ssleay" ,perl-net-ssleay)
@@ -4515,14 +4514,14 @@ applications.")
(define-public perl-uri
(package
(name "perl-uri")
- (version "1.76")
+ (version "5.05")
(source (origin
(method url-fetch)
(uri (string-append "mirror://cpan/authors/id/O/OA/OALDERS/"
"URI-" version ".tar.gz"))
(sha256
(base32
- "0gj1aj18k43kmzc3y1zhj5giinf8rksacf757r475xfna0fqxjdj"))))
+ "1v3r3ck67w272kzfgm1nd3wb41av1hlnza56vkxxj1i7s3917hd5"))))
(build-system perl-build-system)
(native-inputs
;; For tests.
@@ -4765,14 +4764,14 @@ their web site.")
(define-public python-feedparser
(package
(name "python-feedparser")
- (version "6.0.2")
+ (version "6.0.8")
(source
(origin
(method url-fetch)
(uri (pypi-uri "feedparser" version ".tar.gz"))
(sha256
(base32
- "0x0hm9brh3j71645pydvlkrwxaaca9dnwd7xahwjyjaz882s200v"))))
+ "0qcnkyjjfj5gg5rhd1j4zzlqx5h34bma18zwgj68q95b0l543q2w"))))
(build-system python-build-system)
(propagated-inputs
`(("python-sgmllib3k" ,python-sgmllib3k)))
@@ -5094,7 +5093,13 @@ fast and flexible way of exploring HTML from the terminal.")
("gsettings-desktop-schemas" ,gsettings-desktop-schemas)
("pkg-config" ,pkg-config)))
(inputs
- `(("libsoup" ,libsoup)))
+ `(("libsoup" ,libsoup-minimal-2)))
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (add-before 'check 'set-home-for-tests
+ (lambda _
+ (setenv "HOME" "/tmp"))))))
(home-page "https://gitlab.com/groups/uhttpmock")
(synopsis "Library for mocking web service APIs which use HTTP or HTTPS")
(description
@@ -5392,7 +5397,13 @@ developed as part of the Netsurf project.")
"libcss-" version "-src.tar.gz"))
(sha256
(base32
- "1p66sdiiqm7w4jkq23hsf08khsnmq93hshh9f9m8sbirjdpf3p6j"))))
+ "1p66sdiiqm7w4jkq23hsf08khsnmq93hshh9f9m8sbirjdpf3p6j"))
+ (modules '((guix build utils)))
+ (snippet
+ '(begin
+ ;; This can be removed with the next release.
+ (substitute* "src/select/computed.c"
+ (("css_unit unit;") "css_unit unit = CSS_UNIT_PX;"))))))
(build-system gnu-build-system)
(native-inputs
`(("netsurf-buildsystem" ,netsurf-buildsystem)
@@ -5723,7 +5734,7 @@ w3c webidl files and a binding configuration file.")
(lambda* (#:key inputs #:allow-other-keys)
(substitute* '("test/bloom.c" "test/hashtable.c")
(("/usr/share/dict/words")
- (string-append (assoc-ref inputs "miscfiles") "/share/web2")))
+ (search-input-file inputs "/share/web2")))
#t))
(add-after 'install 'install-more
(lambda* (#:key outputs #:allow-other-keys)
@@ -6380,13 +6391,13 @@ message stream (in a web server that is per connection).")
(define-public python-httpretty
(package
(name "python-httpretty")
- (version "1.0.5")
+ (version "1.1.4")
(source
(origin
(method url-fetch)
(uri (pypi-uri "httpretty" version))
(sha256
- (base32 "1dg0nfl7i9kjnq98ww98x2afzav4mpgiwzvjc43ily1x9my94g75"))))
+ (base32 "0s1vjdaf3pk2xd0hvi5f7p3jm2rgwpbc734jdp9r50m1smfhxpi0"))))
(build-system python-build-system)
(arguments
`(#:tests? #f ; Tests require network access.
@@ -6395,8 +6406,7 @@ message stream (in a web server that is per connection).")
(replace 'check
(lambda* (#:key tests? #:allow-other-keys)
(when tests?
- (invoke "nosetests"))
- #t)))))
+ (invoke "nosetests")))))))
(native-inputs
`(("python-coverage" ,python-coverage)
("python-eventlet" ,python-eventlet)
@@ -6610,9 +6620,8 @@ Instagram and YouTube.")
`(#:phases
(modify-phases %standard-phases
(replace 'check
- (lambda* (#:key inputs outputs tests? #:allow-other-keys)
+ (lambda* (#:key tests? #:allow-other-keys)
(when tests?
- (add-installed-pythonpath inputs outputs)
(invoke "py.test" "tests")))))))
(home-page "https://linkchecker.github.io/linkchecker/")
(synopsis "Check websites for broken links")
@@ -7583,7 +7592,7 @@ derivation by David Revoy from the original MonsterID by Andreas Gohr.")
(define-public nghttp2
(package
(name "nghttp2")
- (version "1.41.0")
+ (version "1.44.0")
(source
(origin
(method url-fetch)
@@ -7592,7 +7601,7 @@ derivation by David Revoy from the original MonsterID by Andreas Gohr.")
"nghttp2-" version ".tar.xz"))
(sha256
(base32
- "1hk77vngjmvvzb5y1gi1aqwf6qywrc7yak08zvzb7x81qs6mphmb"))))
+ "0p9wvva4g8hwj55x19rbyvnq2dbsnf65rphhxnpqs7ll54xlg6an"))))
(build-system gnu-build-system)
(outputs (list "out"
"lib")) ; only libnghttp2
@@ -7601,6 +7610,7 @@ derivation by David Revoy from the original MonsterID by Andreas Gohr.")
;; Required by tests.
("cunit" ,cunit)
+ ("python" ,python)
("tzdata" ,tzdata-for-tests)))
(inputs
;; Required to build the tools (i.e. without ‘--enable-lib-only’).
@@ -7620,7 +7630,10 @@ derivation by David Revoy from the original MonsterID by Andreas Gohr.")
"--enable-app" ; build all the tools
"--enable-hpack-tools" ; ...all the tools
"--disable-examples"
- "--disable-static") ; don't bother building .a files
+ "--disable-static" ; don't bother building .a files
+ ,@(if (%current-target-system)
+ '("--disable-python-bindings")
+ '()))
#:phases
(modify-phases %standard-phases
(add-after 'unpack 'break-circular-reference
diff --git a/gnu/packages/webkit.scm b/gnu/packages/webkit.scm
index 16096be57b..a1cffb55b3 100644
--- a/gnu/packages/webkit.scm
+++ b/gnu/packages/webkit.scm
@@ -6,6 +6,7 @@
;;; Copyright © 2018–2021 Tobias Geerinckx-Rice <me@tobias.gr>
;;; Copyright © 2018 Pierre Neidhardt <mail@ambrevar.xyz>
;;; Copyright © 2019 Marius Bakke <mbakke@fastmail.com>
+;;; Copyright © 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -27,6 +28,7 @@
#:use-module (guix packages)
#:use-module (guix download)
#:use-module (guix utils)
+ #:use-module (guix build utils)
#:use-module (guix build-system cmake)
#:use-module (guix build-system gnu)
#:use-module (gnu packages)
@@ -239,7 +241,7 @@ acceleration in mind, leveraging common 3D graphics APIs for best performance.")
(patches (search-patches "webkitgtk-share-store.patch"
"webkitgtk-bind-all-fonts.patch"))))
(build-system cmake-build-system)
- (outputs '("out" "doc"))
+ (outputs '("out" "doc" "debug"))
(arguments
`(#:tests? #f ; no tests
#:build-type "Release" ; turn off debugging symbols to save space
@@ -253,10 +255,6 @@ acceleration in mind, leveraging common 3D graphics APIs for best performance.")
(string-append ; uses lib64 by default
"-DLIB_INSTALL_DIR="
(assoc-ref %outputs "out") "/lib")
-
- ;; XXX TODO: Use libsoup@3.
- "-DUSE_SOUP2=ON"
-
;; XXX Adding GStreamer GL support would apparently
;; require adding gst-plugins-bad to the inputs,
;; which might entail a security risk as a result of
@@ -277,8 +275,7 @@ acceleration in mind, leveraging common 3D graphics APIs for best performance.")
(let ((store-directory (%store-directory)))
(substitute*
"Source/WebKit/UIProcess/Launcher/glib/BubblewrapLauncher.cpp"
- (("@storedir@") store-directory))
- #t)))
+ (("@storedir@") store-directory)))))
(add-after 'unpack 'patch-gtk-doc-scan
(lambda* (#:key inputs #:allow-other-keys)
(for-each (lambda (file)
@@ -286,27 +283,13 @@ acceleration in mind, leveraging common 3D graphics APIs for best performance.")
(("http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd")
(string-append (assoc-ref inputs "docbook-xml")
"/xml/dtd/docbook/docbookx.dtd"))))
- (find-files "Source" "\\.sgml$"))
- #t))
+ (find-files "Source" "\\.sgml$"))))
(add-after 'unpack 'embed-absolute-wpebackend-reference
(lambda* (#:key inputs #:allow-other-keys)
(let ((wpebackend-fdo (assoc-ref inputs "wpebackend-fdo")))
(substitute* "Source/WebKit/UIProcess/glib/WebProcessPoolGLib.cpp"
(("libWPEBackend-fdo-([\\.0-9]+)\\.so" all version)
- (string-append wpebackend-fdo "/lib/" all)))
- #t)))
- (add-before 'configure 'prepare-build-environment
- (lambda* (#:key inputs #:allow-other-keys)
- (setenv "CC" "clang")
- (setenv "CXX" "clang++")
- ;; XXX Until we switch back to using GCC,
- ;; work around <https://bugs.gnu.org/51591>.
- ,@(if (target-x86-32?)
- '((substitute* "Source/WTF/wtf/CheckedArithmetic.h"
- (("#define USE_MUL_OVERFLOW 1")
- "#define USE_MUL_OVERFLOW 0")))
- '())
- #t))
+ (string-append wpebackend-fdo "/lib/" all))))))
,@(if (target-x86-64?)
'()
'((add-after 'unpack 'disable-sse2
@@ -320,11 +303,9 @@ acceleration in mind, leveraging common 3D graphics APIs for best performance.")
(doc (assoc-ref outputs "doc")))
(mkdir-p (string-append doc "/share"))
(rename-file (string-append out "/share/gtk-doc")
- (string-append doc "/share/gtk-doc"))
- #t))))))
+ (string-append doc "/share/gtk-doc"))))))))
(native-inputs
- `(("clang" ,clang-11)
- ("bison" ,bison)
+ `(("bison" ,bison)
("gettext" ,gettext-minimal)
("glib:bin" ,glib "bin") ; for glib-mkenums, etc.
("gobject-introspection" ,gobject-introspection)
@@ -380,3 +361,18 @@ HTML/CSS applications to full-fledged web browsers.")
license:lgpl2.1+
license:bsd-2
license:bsd-3))))
+
+;;; Required by gnome-online-accounts; as webkitgtk 2.34 propagates libsoup 3,
+;;; which causes the build to fail.
+;;; Also required by e.g. emacs-next-pgtk, emacs-xwidgets, and some other
+;;; Gnome packages for webkit2gtk-4.0. See also the upstream tracker for
+;;; libsoup 3: https://gitlab.gnome.org/GNOME/libsoup/-/issues/218
+(define-public webkitgtk-with-libsoup2
+ (package/inherit webkitgtk
+ (name "webkitgtk-with-libsoup2")
+ (arguments (substitute-keyword-arguments (package-arguments webkitgtk)
+ ((#:configure-flags flags)
+ `(cons "-DUSE_SOUP2=ON" ,flags))))
+ (propagated-inputs
+ (alist-replace "libsoup" (list libsoup-minimal-2)
+ (package-propagated-inputs webkitgtk)))))
diff --git a/gnu/packages/wget.scm b/gnu/packages/wget.scm
index b537f6fa95..659d2e0341 100644
--- a/gnu/packages/wget.scm
+++ b/gnu/packages/wget.scm
@@ -45,7 +45,7 @@
(define-public wget
(package
(name "wget")
- (version "1.20.3")
+ (version "1.21.1")
(source
(origin
(method url-fetch)
@@ -53,7 +53,7 @@
version ".tar.lz"))
(sha256
(base32
- "1frajd86ds8vz2hprq30wq8ya89z9dcxnwm8nwk12bbc47l7qq39"))))
+ "1bchzkacjsc5c0x01ngaana9fs5j12wfw1c8qxps1yp68x9vx6yv"))))
(build-system gnu-build-system)
(inputs
`(("gnutls" ,gnutls)
diff --git a/gnu/packages/wicd.scm b/gnu/packages/wicd.scm
index fec39ad530..073d440479 100644
--- a/gnu/packages/wicd.scm
+++ b/gnu/packages/wicd.scm
@@ -123,7 +123,10 @@
"--no-install-kde"
"--no-install-gnome-shell-extensions"
- "--distro=guixsd"
+ ;; Don't pass --distro= despite setup.py's complaints.
+ ;; Guix isn't recognised, and if it ever would be we'd
+ ;; rather ask upstream to follow standards instead.
+
"--wicdgroup=netdev"
"--loggroup=root"
"--logperms=0640"
diff --git a/gnu/packages/wine.scm b/gnu/packages/wine.scm
index 4361cccd8d..d77d1070e1 100644
--- a/gnu/packages/wine.scm
+++ b/gnu/packages/wine.scm
@@ -435,10 +435,10 @@ integrate Windows applications into your desktop.")
(let* ((out (assoc-ref outputs "out"))
(icd (string-append out "/share/vulkan/icd.d")))
(mkdir-p icd)
- (copy-file (string-append (assoc-ref inputs "mesa")
+ (copy-file (search-input-file inputs
"/share/vulkan/icd.d/radeon_icd.i686.json")
(string-append icd "/radeon_icd.i686.json"))
- (copy-file (string-append (assoc-ref inputs "mesa")
+ (copy-file (search-input-file inputs
"/share/vulkan/icd.d/intel_icd.i686.json")
(string-append icd "/intel_icd.i686.json"))
(wrap-program (string-append out "/bin/wine-preloader")
diff --git a/gnu/packages/wm.scm b/gnu/packages/wm.scm
index 0733198e65..cdd34bf237 100644
--- a/gnu/packages/wm.scm
+++ b/gnu/packages/wm.scm
@@ -8,7 +8,7 @@
;;; Copyright © 2016, 2019, 2020 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2016 Al McElrath <hello@yrns.org>
;;; Copyright © 2016 Carlo Zancanaro <carlo@zancanaro.id.au>
-;;; Copyright © 2016, 2017, 2018, 2019 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2016, 2017, 2018, 2019, 2021 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2016, 2017, 2018, 2020 Nikita <nikita@n0.is>
;;; Copyright © 2016 doncatnip <gnopap@gmail.com>
;;; Copyright © 2016 Ivan Vilata i Balaguer <ivan@selidor.net>
@@ -83,7 +83,7 @@
#:use-module (gnu packages autotools)
#:use-module (gnu packages base)
#:use-module (gnu packages bison)
- #:use-module (gnu packages build-tools) ;for meson-0.55
+ #:use-module (gnu packages build-tools)
#:use-module (gnu packages calendar)
#:use-module (gnu packages check)
#:use-module (gnu packages datastructures)
@@ -713,14 +713,10 @@ Features include:
(lambda* (#:key inputs outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))
(icons (string-append out "/share/i3lock-fancy/icons/"))
- (wmctrl (string-append (assoc-ref inputs "wmctrl")
- "/bin/wmctrl"))
- (mconvert (string-append (assoc-ref inputs "imagemagick")
- "/bin/convert"))
- (mimport (string-append (assoc-ref inputs "imagemagick")
- "/bin/import"))
- (awk (string-append (assoc-ref inputs "gawk")
- "/bin/gawk")))
+ (wmctrl (search-input-file inputs "/bin/wmctrl"))
+ (mconvert (search-input-file inputs "/bin/convert"))
+ (mimport (search-input-file inputs "/bin/import"))
+ (awk (search-input-file inputs "/bin/gawk")))
(substitute* "lock"
(("\\$\\(command -V wmctrl\\)") wmctrl)
@@ -1031,9 +1027,7 @@ experience.")
(base32
"0vkwyci4z4jj2aczxkrmj0861j5jczjr8isasa7gml93nlvyw7gv"))))
(build-system meson-build-system)
- (arguments
- `( #:meson ,meson-0.55
- #:build-type "release"))
+ (arguments `(#:build-type "release"))
(native-inputs
`(("pkg-config" ,pkg-config)
("wayland-protocols" ,wayland-protocols)
@@ -1078,7 +1072,8 @@ for wlroots-based Wayland compositors.")
"\"~c\"")))
#t))
(patches
- (search-patches "awesome-reproducible-png.patch"))))
+ (search-patches "awesome-reproducible-png.patch"
+ "awesome-4.3-fno-common.patch"))))
(build-system cmake-build-system)
(native-inputs
`(("asciidoc" ,asciidoc)
@@ -1160,7 +1155,8 @@ for wlroots-based Wayland compositors.")
(setenv "LD_LIBRARY_PATH" cairo)
(setenv "LUA_PATH" (string-append "?.lua;" lua-path))
(setenv "LUA_CPATH" lua-cpath)
- #t)))
+ (setenv "HOME" (getcwd))
+ (setenv "XDG_CACHE_HOME" (getcwd)))))
(replace 'check
(lambda _
;; There aren't any tests, so just make sure the binary
@@ -1411,7 +1407,7 @@ project derived from the original Calm Window Manager.")
(define-public dwl
(package
(name "dwl")
- (version "0.2")
+ (version "0.2.1")
(source (origin
(method git-fetch)
(uri (git-reference
@@ -1420,7 +1416,7 @@ project derived from the original Calm Window Manager.")
(file-name (git-file-name name version))
(sha256
(base32
- "0r5hsxpckkrq1y7bjfq58rlc5xy45z499rg628q3nh289978ail1"))))
+ "0js8xjc2rx1ml6s58s90jrak5n7vh3kj5na2j4yy3qy0cb501xcm"))))
(build-system gnu-build-system)
(arguments
`(#:tests? #f ; no tests
@@ -1535,7 +1531,7 @@ functionality to display information about the most commonly used services.")
(define-public wlroots
(package
(name "wlroots")
- (version "0.12.0")
+ (version "0.14.1")
(source
(origin
(method git-fetch)
@@ -1544,12 +1540,10 @@ functionality to display information about the most commonly used services.")
(commit version)))
(file-name (git-file-name name version))
(sha256
- (base32 "01j38lmgs2c6fq68v8b75pkilia2wsgzgp46ivfbi9hhx47kgcfn"))))
+ (base32 "1sshp3lvlkl1i670kxhwsb4xzxl8raz6769kqvgmxzcb63ns9ay1"))))
(build-system meson-build-system)
(arguments
- `(#:configure-flags '("-Dlogind-provider=elogind")
- #:meson ,meson-0.55
- #:phases
+ `(#:phases
(modify-phases %standard-phases
(add-before 'configure 'hardcode-paths
(lambda* (#:key inputs #:allow-other-keys)
@@ -1560,12 +1554,12 @@ functionality to display information about the most commonly used services.")
#t)))))
(propagated-inputs
`(;; As required by wlroots.pc.
- ("elogind" ,elogind)
("eudev" ,eudev)
("libinput" ,libinput)
("libxkbcommon" ,libxkbcommon)
("mesa" ,mesa)
("pixman" ,pixman)
+ ("seatd" ,seatd)
("wayland" ,wayland)
("wayland-protocols" ,wayland-protocols)
("xcb-util-errors" ,xcb-util-errors)
@@ -1583,7 +1577,7 @@ modules for building a Wayland compositor.")
(define-public sway
(package
(name "sway")
- (version "1.5.1")
+ (version "1.6.1")
(source
(origin
(method git-fetch)
@@ -1592,7 +1586,7 @@ modules for building a Wayland compositor.")
(commit version)))
(file-name (git-file-name name version))
(sha256
- (base32 "1xsa3h8zhf29p0mi90baxpr76jkd9pd1gr97ky8cnjbcs4isj9j0"))))
+ (base32 "0j4sdbsrlvky1agacc0pcz9bwmaxjmrapjnzscbd2i0cria2fc5j"))))
(build-system meson-build-system)
(arguments
`(#:phases
@@ -1760,7 +1754,7 @@ display a clock or apply image manipulation techniques to the background image."
(inputs `(("date" ,date)
("fmt" ,fmt)
("gtk-layer-shell" ,gtk-layer-shell)
- ("gtkmm" ,gtkmm)
+ ("gtkmm" ,gtkmm-3)
("jsoncpp" ,jsoncpp)
("libdbusmenu" ,libdbusmenu)
("libinput" ,libinput)
@@ -1771,8 +1765,7 @@ display a clock or apply image manipulation techniques to the background image."
("spdlog" ,spdlog)
("wayland" ,wayland)))
(native-inputs
- `(("gcc" ,gcc-8) ; for #include <filesystem>
- ("glib:bin" ,glib "bin")
+ `(("glib:bin" ,glib "bin")
("pkg-config" ,pkg-config)
("scdoc" ,scdoc)
("wayland-protocols" ,wayland-protocols)))
@@ -2002,12 +1995,9 @@ productive, customizable lisp based systems.")
(copy-recursively (assoc-ref %build-inputs "source") ".")
(chdir "util/stumpish")
(substitute* "stumpish"
- (("rlwrap") (string-append (assoc-ref %build-inputs "rlwrap")
- "/bin/rlwrap"))
- (("xprop") (string-append (assoc-ref %build-inputs "xprop")
- "/bin/xprop"))
- (("/bin/sh") (string-append (assoc-ref %build-inputs "bash")
- "/bin/bash")))
+ (("rlwrap") (search-input-file %build-inputs "/bin/rlwrap"))
+ (("xprop") (search-input-file %build-inputs "/bin/xprop"))
+ (("/bin/sh") (search-input-file %build-inputs "/bin/bash")))
(install-file "stumpish" (string-append %output "/bin")))))
(home-page "https://github.com/stumpwm/stumpwm-contrib")
(synopsis "StumpWM interactive shell")
@@ -2525,7 +2515,7 @@ shows a notification for the user on the screen.")
(define-public cagebreak
(package
(name "cagebreak")
- (version "1.6.0")
+ (version "1.8.0")
(source (origin
(method git-fetch)
(uri (git-reference
@@ -2534,14 +2524,15 @@ shows a notification for the user on the screen.")
(file-name (git-file-name name version))
(sha256
(base32
- "02gxmypfj75amdd8lwdkkk7imw7lwmghpyk8h9asljy9aq6ymdqp"))))
+ "0296mnzk7qd0zvnhw716jvpp7madjsar373ixx4qcff0m0jwfrxm"))))
(build-system meson-build-system)
(arguments '(#:configure-flags '("-Dxwayland=true")))
(native-inputs
`(("pandoc" ,pandoc)
("pkg-config" ,pkg-config)))
(inputs
- `(("pango" ,pango)
+ `(("libevdev" ,libevdev)
+ ("pango" ,pango)
("wlroots" ,wlroots)))
(home-page "https://github.com/project-repo/cagebreak")
(synopsis "Tiling wayland compositor inspired by ratpoison")
@@ -2582,14 +2573,14 @@ read and write, and compatible with JSON.")
(define-public hikari
(package
(name "hikari")
- (version "2.2.3")
+ (version "2.3.2")
(source
(origin
(method url-fetch)
(uri (string-append "https://hikari.acmelabs.space/releases/"
"hikari-" version ".tar.gz"))
(sha256
- (base32 "1d023cphzi15k434n60l1rp5awxmdijvsxfrm59fmsvd5rjxh9q7"))))
+ (base32 "1jvy21irh6s7czff2hk63spswqibjcjhrpsgmrki5bii9ddi73wy"))))
(build-system gnu-build-system)
(native-inputs
`(("bmake" ,bmake)
diff --git a/gnu/packages/wxwidgets.scm b/gnu/packages/wxwidgets.scm
index 54d385fd53..475b5efe15 100644
--- a/gnu/packages/wxwidgets.scm
+++ b/gnu/packages/wxwidgets.scm
@@ -100,8 +100,7 @@
(modify-phases %standard-phases
(add-after 'unpack 'refer-to-inputs
(lambda* (#:key inputs #:allow-other-keys)
- (let* ((mime (string-append (assoc-ref inputs "shared-mime-info")
- "/share/mime")))
+ (let* ((mime (search-input-directory inputs "/share/mime")))
(substitute* "src/unix/utilsx11.cpp"
(("wxExecute\\(xdg_open \\+")
(string-append "wxExecute(\"" (which "xdg-open") "\"")))
@@ -216,7 +215,7 @@ and many other languages.")
(setenv "WXWIN" (assoc-ref inputs "wxwidgets"))
;; Copy the waf executable to the source directory since it needs
;; to be in a writable directory.
- (copy-file (string-append (assoc-ref inputs "python-waf") "/bin/waf")
+ (copy-file (search-input-file inputs "/bin/waf")
"bin/waf")
(setenv "WAF" "bin/waf")
;; The build script tries to copy license files from the
@@ -306,8 +305,9 @@ provide a 100% native look and feel for the application.")
(setenv "WXWIN" (assoc-ref inputs "wxwidgets"))
(use-modules (ice-9 popen) (ice-9 rdelim))
(let ((port (open-pipe* OPEN_READ
- (string-append (assoc-ref inputs "wxwidgets")
- "/bin/wx-config") "--cppflags")))
+ (search-input-file inputs
+ "/bin/wx-config")
+ "--cppflags")))
(setenv "CPPFLAGS" (read-string port))
(close-pipe port))
#t)))))
diff --git a/gnu/packages/xdisorg.scm b/gnu/packages/xdisorg.scm
index 90822cd6bf..8024691f71 100644
--- a/gnu/packages/xdisorg.scm
+++ b/gnu/packages/xdisorg.scm
@@ -3,7 +3,7 @@
;;; Copyright © 2014, 2015, 2016 Mark H Weaver <mhw@netris.org>
;;; Copyright © 2014 Eric Bavier <bavier@member.fsf.org>
;;; Copyright © 2014, 2015, 2016 Alex Kost <alezost@gmail.com>
-;;; Copyright © 2013, 2015, 2017, 2018, 2019, 2021y Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2013, 2015, 2017, 2018, 2019, 2021 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2015, 2016 Mathieu Lirzin <mthl@gnu.org>
;;; Copyright © 2015 Alexander I.Grafov <grafov@gmail.com>
;;; Copyright © 2015 Andy Wingo <wingo@igalia.com>
@@ -42,6 +42,7 @@
;;; Copyright © 2020 James Smith <jsubuntuxp@disroot.org>
;;; Copyright © 2020 B. Wilson <elaexuotee@wilsonb.com>
;;; Copyright © 2020, 2021 Zheng Junjie <873216071@qq.com>
+;;; Copyright © 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;; Copyright © 2021 Nicolas Goaziou <mail@nicolasgoaziou.fr>
;;; Copyright © 2021 Xinglu Chen <public@yoctocell.xyz>
;;; Copyright © 2021 Renzo Poddighe <renzo@poddighe.nl>
@@ -49,6 +50,7 @@
;;; Copyright © 2021 Niklas Eklund <niklas.eklund@posteo.net>
;;; Copyright © 2021 Nikita Domnitskii <nikita@domnitskii.me>
;;; Copyright © 2021 ikasero <ahmed@ikasero.com>
+;;; Copyright © 2021 Felix Gruber <felgru@posteo.net>
;;; Copyright © 2021 jgart <jgart@dismail.de>
;;;
;;; This file is part of GNU Guix.
@@ -236,8 +238,7 @@ program.")
(modify-phases %standard-phases
(add-before 'build 'configure
(lambda* (#:key inputs outputs #:allow-other-keys)
- (let ((xrandr (string-append (assoc-ref inputs "xrandr")
- "/bin/xrandr")))
+ (let ((xrandr (search-input-file inputs "/bin/xrandr")))
(substitute* "contrib/etc/xdg/autostart/autorandr.desktop"
(("/usr") (assoc-ref outputs "out")))
(substitute* "autorandr.py"
@@ -426,14 +427,14 @@ avoiding password prompts when X11 forwarding has already been setup.")
(define-public libxkbcommon
(package
(name "libxkbcommon")
- (version "1.0.3")
+ (version "1.3.0")
(source (origin
(method url-fetch)
(uri (string-append "https://xkbcommon.org/download/libxkbcommon-"
version ".tar.xz"))
(sha256
(base32
- "0lmwglj16anhpaq0h830xsl1ivknv75i4lir9bk88aq73s2jy852"))))
+ "0ysynzzgzd9jdrh1321r4bgw8wd5zljrlyn5y1a31g39xacf02bv"))))
(build-system meson-build-system)
(inputs
`(("libx11" ,libx11)
@@ -609,7 +610,7 @@ following the mouse.")
(define-public pixman
(package
(name "pixman")
- (version "0.38.4")
+ (version "0.40.0")
(source
(origin
(method url-fetch)
@@ -618,13 +619,17 @@ following the mouse.")
"https://www.cairographics.org/releases/pixman-"
version ".tar.gz"))
(sha256
- (base32 "1ryxzdf048x7wsx4dlvrr1p00gzwfs7lybnhgc7ygbj0dvyxcrns"))
+ (base32 "1z13n96m7x91j25qq9wlkxsbq04wfwjhw66ir17frna06zn0s83d"))
(patches
(search-patches
"pixman-CVE-2016-5296.patch"))))
(build-system gnu-build-system)
(arguments
- '(#:configure-flags '("--disable-static")))
+ `(#:configure-flags
+ (list
+ "--disable-static"
+ "--enable-timers"
+ "--enable-gnuplot")))
(native-inputs
`(("pkg-config" ,pkg-config)))
(inputs
@@ -635,12 +640,12 @@ following the mouse.")
manipulation, providing features such as image compositing and trapezoid
rasterisation.")
(home-page "http://www.pixman.org/")
- (license license:x11)))
+ (license license:expat)))
(define-public libdrm
(package
(name "libdrm")
- (version "2.4.103")
+ (version "2.4.107")
(source (origin
(method url-fetch)
(uri (string-append
@@ -648,7 +653,7 @@ rasterisation.")
version ".tar.xz"))
(sha256
(base32
- "08h2nnf4w96b4ql7485mvjgbbsb8rwc0qa93fdm1cq34pbyszq1z"))))
+ "127qf1rzhaf13vdd75a58v5q34617hvangjlfnlkcdh37gqcwm65"))))
(build-system meson-build-system)
(arguments
`(#:configure-flags
@@ -663,9 +668,10 @@ rasterisation.")
#:phases (modify-phases %standard-phases
(replace 'check
- (lambda _
- (invoke "meson" "test" "--timeout-multiplier" "5"))))))
- (inputs
+ (lambda* (#:key tests? #:allow-other-keys)
+ (when tests?
+ (invoke "meson" "test" "--timeout-multiplier" "5")))))))
+ (propagated-inputs
`(("libpciaccess" ,libpciaccess)))
(native-inputs
`(("pkg-config" ,pkg-config)))
@@ -1440,15 +1446,12 @@ the X.Org X Server version 1.7 and later (X11R7.5 or later).")
(add-after 'split-outputs 'wrap
(lambda* (#:key inputs outputs #:allow-other-keys)
(let* ((gtk (assoc-ref outputs "gtk"))
- (python-version
- (@ (guix build python-build-system) python-version))
- (python (assoc-ref inputs "python"))
- (sitedir (string-append gtk "/lib/python"
- (python-version python)
- "/site-packages")))
+ (site-packages (@ (guix build python-build-system)
+ site-packages))
+ (site (site-packages inputs outputs)))
(wrap-program (string-append gtk "/bin/redshift-gtk")
- `("PYTHONPATH" ":" prefix
- (,(string-append sitedir ":" (getenv "PYTHONPATH"))))
+ `("GUIX_PYTHONPATH" ":" prefix
+ (,(string-append site ":" (getenv "GUIX_PYTHONPATH"))))
`("GI_TYPELIB_PATH" ":" prefix (,(getenv "GI_TYPELIB_PATH"))))
#t))))))
(outputs '("out" "gtk"))
@@ -1561,7 +1564,7 @@ protocol.")
;; to Python libraries.
(wrap-program (string-append (assoc-ref outputs "out")
"/bin/gammastep-indicator")
- `("PYTHONPATH" ":" prefix (,(getenv "PYTHONPATH")))
+ `("PYTHONPATH" ":" prefix (,(getenv "GUIX_PYTHONPATH")))
`("GI_TYPELIB_PATH" ":" prefix
(,(getenv "GI_TYPELIB_PATH")))))))))
(native-inputs
@@ -1696,30 +1699,45 @@ Saver extension) library.")
(license license:gpl3+)))
(define-public xsel
- (package
- (name "xsel")
- (version "1.2.0")
- (source (origin
- (method url-fetch)
- (uri (string-append "http://www.vergenet.net/~conrad/software"
- "/xsel/download/xsel-" version ".tar.gz"))
- (sha256
- (base32
- "070lbcpw77j143jrbkh0y1v10ppn1jwmjf92800w7x42vh4cw9xr"))))
- (build-system gnu-build-system)
- (inputs
- `(("libxt" ,libxt)))
- (home-page "http://www.vergenet.net/~conrad/software/xsel/")
- (synopsis "Manipulate X selection")
- (description
- "XSel is a command-line program for getting and setting the contents of
+ ;; The 1.2.0 release no longer compiles with GCC 8 and upper, see:
+ ;; https://github.com/kfish/xsel/commit/d88aa9a8dba9228e6780d6bb5a5720a36f854918.
+ (let ((commit "062e6d373537c60829fa9b5dcddbcd942986b3c3")
+ (revision "1"))
+ (package
+ (name "xsel")
+ (version (git-version "1.2.0" revision commit))
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/kfish/xsel")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0fbf80zsc22vcqp59r9fdx4icxhrkv7l3lphw83326jrmkzy6kri"))))
+ (build-system gnu-build-system)
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (replace 'bootstrap
+ (lambda _
+ (invoke "autoreconf" "-vfi"))))))
+ (native-inputs `(("autoconf" ,autoconf)
+ ("automake" ,automake)
+ ("libtool" ,libtool)))
+ (inputs
+ `(("libxt" ,libxt)))
+ (home-page "http://www.vergenet.net/~conrad/software/xsel/")
+ (synopsis "Manipulate X selection")
+ (description
+ "XSel is a command-line program for getting and setting the contents of
the X selection. Normally this is only accessible by manually highlighting
information and pasting it with the middle mouse button.
XSel reads from standard input and writes to standard output by default,
but can also follow a growing file, display contents, delete entries and more.")
- (license (license:x11-style "file://COPYING"
- "See COPYING in the distribution."))))
+ (license (license:x11-style "file://COPYING"
+ "See COPYING in the distribution.")))))
(define-public xdpyprobe
(package
@@ -2725,10 +2743,12 @@ tools to complement clipnotify.")
(gawk (assoc-ref inputs "gawk"))
(util-linux (assoc-ref inputs "util-linux"))
(xdotool (assoc-ref inputs "xdotool"))
- (xsel (assoc-ref inputs "xsel")))
+ (xsel (assoc-ref inputs "xsel"))
+ (guile (search-input-file inputs "bin/guile")))
(for-each
(lambda (prog)
(wrap-script (string-append out "/bin/" prog)
+ #:guile guile
`("PATH" ":" prefix
,(map (lambda (dir)
(string-append dir "/bin"))
diff --git a/gnu/packages/xfce.scm b/gnu/packages/xfce.scm
index 7a4fca4f43..a63676a04b 100644
--- a/gnu/packages/xfce.scm
+++ b/gnu/packages/xfce.scm
@@ -255,7 +255,7 @@ to share commonly used Xfce widgets among the Xfce applications.")
(lambda* (#:key outputs #:allow-other-keys)
(let ((out (assoc-ref outputs "out")))
(wrap-program (string-append out "/bin/catfish")
- `("PYTHONPATH" = (,(getenv "PYTHONPATH")))
+ `("GUIX_PYTHONPATH" = (,(getenv "GUIX_PYTHONPATH")))
`("GI_TYPELIB_PATH" = (,(getenv "GI_TYPELIB_PATH"))))))))
#:tests? #f))
(native-inputs
@@ -436,8 +436,7 @@ management D-Bus specification.")
(lambda* (#:key inputs #:allow-other-keys)
(substitute* (string-append "plugins/clock/clock.c")
(("/usr/share/zoneinfo")
- (string-append (assoc-ref inputs "tzdata") "/share/zoneinfo")))
- #t)))))
+ (search-input-directory inputs "share/zoneinfo"))))))))
(native-inputs
`(("pkg-config" ,pkg-config)
("intltool" ,intltool)
@@ -634,7 +633,7 @@ applications, and includes a search bar to search for applications.")
("pkg-config" ,pkg-config)))
(inputs
`(("garcon" ,garcon)
- ("librsvg" ,librsvg)
+ ("librsvg" ,(librsvg-for-system))
("libwnck" ,libwnck)
("libx11" ,libx11)
("libxfce4ui" ,libxfce4ui)
@@ -1095,7 +1094,6 @@ inhibit interface which allows applications to prevent automatic sleep.")
`(("gtk+" ,gtk+)
("libexif" ,libexif)
("libxfce4ui" ,libxfce4ui)
- ("librsvg" ,librsvg)
("tumbler" ,tumbler)))
(home-page "https://docs.xfce.org/apps/ristretto/start")
(synopsis "Fast and lightweight picture-viewer")
@@ -1305,7 +1303,7 @@ of data to either CD/DVD/BD.")
("glib:bin" ,glib "bin"))) ; glib-genmarshal
(inputs
`(("exo" ,exo)
- ("libsoup" ,libsoup)
+ ("libsoup" ,libsoup-minimal-2)
("libxfce4ui" ,libxfce4ui)
("xfce4-panel" ,xfce4-panel)))
(home-page "https://goodies.xfce.org/projects/applications/xfce4-screenshooter")
@@ -2119,7 +2117,7 @@ lan interface (signal state, signal quality, network name (SSID)).")
("pkg-config" ,pkg-config)))
(inputs
`(("gtk+" ,gtk+)
- ("libsoup" ,libsoup)
+ ("libsoup" ,libsoup-minimal-2)
("libxfce4ui" ,libxfce4ui)
("libxml2" ,libxml2)
("xfce4-panel" ,xfce4-panel)))
diff --git a/gnu/packages/xiph.scm b/gnu/packages/xiph.scm
index 0c9c799067..04dd0b84db 100644
--- a/gnu/packages/xiph.scm
+++ b/gnu/packages/xiph.scm
@@ -11,6 +11,7 @@
;;; Copyright © 2018 Leo Famulari <leo@famulari.name>
;;; Copyright © 2020 Vincent Legoll <vincent.legoll@gmail.com>
;;; Copyright © 2021 Brendan Tildesley <mail@brendan.scot>
+;;; Copyright © 2021 Matthew James Kraai <kraai@ftbfs.org>
;;; Copyright © 2021 Vinicius Monego <monego@posteo.net>
;;;
;;; This file is part of GNU Guix.
@@ -51,14 +52,14 @@
(define-public libogg
(package
(name "libogg")
- (version "1.3.4")
+ (version "1.3.5")
(source (origin
(method url-fetch)
(uri (string-append "https://downloads.xiph.org/releases/ogg/libogg-"
version ".tar.xz"))
(sha256
(base32
- "1zlk33vxvxr0l9lhkbhkdwvylw96d2n0fnd3d8dl031hph9bqqy1"))))
+ "01b7050bghdvbxvw0gzv588fn4a27zh42ljpwzm4vrf8dziipnf4"))))
(build-system gnu-build-system)
(arguments
'(#:configure-flags '("--disable-static")))
diff --git a/gnu/packages/xml.scm b/gnu/packages/xml.scm
index a5d124601c..d9ca96a9f6 100644
--- a/gnu/packages/xml.scm
+++ b/gnu/packages/xml.scm
@@ -5,7 +5,7 @@
;;; Copyright © 2015 Sou Bunnbu <iyzsong@gmail.com>
;;; Copyright © 2015, 2016, 2017, 2018, 2020 Ricardo Wurmus <rekado@elephly.net>
;;; Copyright © 2015, 2016, 2017 Mark H Weaver <mhw@netris.org>
-;;; Copyright © 2015, 2016, 2017, 2018, 2021 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2015, 2016, 2017, 2018, 2020, 2021 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2015 Raimon Grau <raimonster@gmail.com>
;;; Copyright © 2016 Mathieu Lirzin <mthl@gnu.org>
;;; Copyright © 2016, 2017 Leo Famulari <leo@famulari.name>
@@ -121,8 +121,7 @@ the entire document.")
(define-public expat
(package
(name "expat")
- (version "2.2.9")
- (replacement expat-2.4.1)
+ (version "2.4.1")
(source (let ((dot->underscore (lambda (c) (if (char=? #\. c) #\_ c))))
(origin
(method url-fetch)
@@ -134,10 +133,22 @@ the entire document.")
"/expat-" version ".tar.xz")))
(sha256
(base32
- "1960mmgbb4cm64n1p0nz3hrs1pw03hkrfcw8prmnn4622mdrd9hy")))))
+ "0spvyb9d3hijs4ys3x64cfmilsynl8kv6clfahv8d4lvp86js0yg")))))
(build-system gnu-build-system)
(arguments
- '(#:configure-flags '("--disable-static")))
+ '(#:phases (modify-phases %standard-phases
+ (add-after 'install 'move-static-library
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let ((out (assoc-ref outputs "out"))
+ (static (assoc-ref outputs "static")))
+ (mkdir-p (string-append static "/lib"))
+ (link (string-append out "/lib/libexpat.a")
+ (string-append static "/lib/libexpat.a"))
+ (delete-file (string-append out "/lib/libexpat.a"))
+ (substitute* (string-append out "/lib/libexpat.la")
+ (("old_library=.*")
+ "old_library=''"))))))))
+ (outputs '("out" "static"))
(home-page "https://libexpat.github.io/")
(synopsis "Stream-oriented XML parser library written in C")
(description
@@ -146,24 +157,6 @@ stream-oriented parser in which an application registers handlers for
things the parser might find in the XML document (like start tags).")
(license license:expat)))
-;; Replacement package to fix CVE-2013-0340.
-(define expat-2.4.1
- (package
- (inherit expat)
- (version "2.4.1")
- (source (let ((dot->underscore (lambda (c) (if (char=? #\. c) #\_ c))))
- (origin
- (method url-fetch)
- (uri (list (string-append "mirror://sourceforge/expat/expat/"
- version "/expat-" version ".tar.xz")
- (string-append
- "https://github.com/libexpat/libexpat/releases/download/R_"
- (string-map dot->underscore version)
- "/expat-" version ".tar.xz")))
- (sha256
- (base32
- "0spvyb9d3hijs4ys3x64cfmilsynl8kv6clfahv8d4lvp86js0yg")))))))
-
(define-public libebml
(package
(name "libebml")
@@ -191,35 +184,43 @@ hierarchical form with variable field lengths.")
(define-public libxml2
(package
(name "libxml2")
- (version "2.9.10")
+ (version "2.9.12")
(source (origin
(method url-fetch)
(uri (string-append "ftp://xmlsoft.org/libxml2/libxml2-"
version ".tar.gz"))
(sha256
(base32
- "07xynh8hcxb2yb1fs051xrgszjvj37wnxvxgsj10rzmqzy9y3zma"))))
+ "14hxwzmf5xqppx77z7i0ni9lpzg1a84dqpf8j8l1fvy570g6imn8"))
+ (patches (search-patches "libxml2-parent-pointers.patch"
+ "libxml2-terminating-newline.patch"
+ "libxml2-xpath-recursion-limit.patch"))))
(build-system gnu-build-system)
- (outputs '("out" "static"))
+ (outputs '("out" "static" "doc"))
(arguments
`(#:phases (modify-phases %standard-phases
- (add-after 'install 'move-static-libs
+ (add-after 'install 'use-other-outputs
(lambda* (#:key outputs #:allow-other-keys)
- (let ((src (string-append (assoc-ref outputs "out") "/lib"))
+ (let ((src (assoc-ref outputs "out"))
+ (doc (string-append (assoc-ref outputs "doc") "/share"))
(dst (string-append (assoc-ref outputs "static")
"/lib")))
+ (mkdir-p doc)
(mkdir-p dst)
+ (for-each (lambda (dir)
+ (rename-file (string-append src "/share/" dir)
+ (string-append doc "/" dir)))
+ '("doc" "gtk-doc"))
(for-each (lambda (ar)
(rename-file ar (string-append dst "/"
(basename ar))))
- (find-files src "\\.a$"))
+ (find-files (string-append src "/lib") "\\.a$"))
;; Remove reference to the static library from the .la
;; file such that Libtool does the right thing when both
;; the shared and static variants are available.
- (substitute* (string-append src "/libxml2.la")
- (("^old_library='libxml2.a'") "old_library=''"))
- #t))))))
+ (substitute* (string-append src "/lib/libxml2.la")
+ (("^old_library='libxml2.a'") "old_library=''"))))))))
(home-page "http://www.xmlsoft.org/")
(synopsis "C parser for XML")
(inputs `(("xz" ,xz)))
@@ -299,8 +300,9 @@ formulas and hyperlinks to multiple worksheets in an Excel 2007+ XLSX file.")
(name "python-libxml2")
(source (origin
(inherit (package-source libxml2))
- (patches (cons (search-patch "python-libxml2-utf8.patch")
- (origin-patches (package-source libxml2))))))
+ (patches
+ (append (search-patches "python-libxml2-utf8.patch")
+ (origin-patches (package-source libxml2))))))
(build-system python-build-system)
(outputs '("out"))
(arguments
@@ -321,8 +323,7 @@ formulas and hyperlinks to multiple worksheets in an Excel 2007+ XLSX file.")
(format #f "ROOT = r'~a'" libxml2))
;; For 'iconv.h'.
(("/opt/include")
- (string-append glibc "/include"))))
- #t)))))
+ (string-append glibc "/include")))))))))
(inputs `(("libxml2" ,libxml2)))
(synopsis "Python bindings for the libxml2 library")))
@@ -2495,15 +2496,18 @@ The central program included in this package is @code{onsgmls}, which replaces
(define-public python-elementpath
(package
(name "python-elementpath")
- (version "1.4.0")
+ (version "2.0.3")
(source
(origin
(method url-fetch)
(uri (pypi-uri "elementpath" version))
(sha256
(base32
- "15h7d41v48q31hzjay7qzixdv531hnga3h35hksk7x52pgqcrkz7"))))
+ "1kxx573ywqfh6j6aih2i6hhsya6kz79qq4bgz6yskwk6b18jyr8z"))))
(build-system python-build-system)
+ ;; The test suite is not run, to avoid a dependency cycle with
+ ;; python-xmlschema.
+ (arguments `(#:tests? #f))
(home-page
"https://github.com/sissaschool/elementpath")
(synopsis
@@ -2520,13 +2524,20 @@ because lxml.etree already has its own implementation of XPath 1.0.")
(define-public python-lxml
(package
(name "python-lxml")
- (version "4.4.2")
+ (version "4.6.3")
(source
(origin
(method url-fetch)
(uri (pypi-uri "lxml" version))
(sha256
- (base32 "01nvb5j8vs9nk4z5s3250b1m22b4d08kffa36if3g1mdygdrvxpg"))))
+ (base32 "0s14r1w2x9sdlcsw8mxiqgw4rz5zs5lpqpxrfyn4a1mkndqqbdrr"))
+ ;; Adapt a test to libxml2 2.9.12, taken from this commit:
+ ;; https://github.com/lxml/lxml/commit/852ed1092bd80b6b9a51db24371047e
+ (modules '((guix build utils)))
+ (snippet
+ '(substitute* "src/lxml/tests/test_etree.py"
+ (("self\\.assertEqual\\(\\{'hha': None\\}, el\\.nsmap\\)")
+ "self.assertEqual({}, el.nsmap)")))))
(build-system python-build-system)
(arguments
`(#:phases (modify-phases %standard-phases
@@ -2549,7 +2560,7 @@ libxml2 and libxslt.")
(define-public python-xmlschema
(package
(name "python-xmlschema")
- (version "1.1.2")
+ (version "1.2.5")
(source (origin
;; Unit tests are not distributed with the PyPI archive.
(method git-fetch)
@@ -2559,21 +2570,20 @@ libxml2 and libxslt.")
(file-name (git-file-name name version))
(sha256
(base32
- "03bz5mp45y4shmlc1gxq1h69vjx60z1acg9cy4kq7fczgx8qg9jw"))))
+ "0rsa75x86gdjalvy4riq7613szb616hff80crx006chyppzdkxmq"))))
(build-system python-build-system)
(arguments
'(#:phases
(modify-phases %standard-phases
(replace 'check
- (lambda* (#:key (tests? #t) #:allow-other-keys)
+ (lambda* (#:key tests? #:allow-other-keys)
(if tests?
- (begin
- (setenv "PYTHONPATH"
- (string-append "./build/lib:"
- (getenv "PYTHONPATH")))
- (invoke "python" "-m" "unittest" "-v"))
- (format #t "test suite not run~%"))
- #t)))))
+ ;; Disable test_export_remote__issue_187, which is known to
+ ;; fail (see:
+ ;; https://github.com/sissaschool/xmlschema/issues/206).
+ (invoke "python" "-m" "unittest" "-v"
+ "-k" "not test_export_remote__issue_187")
+ (format #t "test suite not run~%")))))))
(native-inputs
`(("python-lxml" ,python-lxml))) ;for tests
(propagated-inputs
diff --git a/gnu/packages/xnee.scm b/gnu/packages/xnee.scm
index 5cd20cbef1..d01981ee63 100644
--- a/gnu/packages/xnee.scm
+++ b/gnu/packages/xnee.scm
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2013 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2013, 2021 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2015 Andreas Enge <andreas@enge.fr>
;;;
;;; This file is part of GNU Guix.
@@ -38,6 +38,8 @@
(base32
"04n2lac0vgpv8zsn7nmb50hf3qb56pmj90dmwnivg09gyrf1x92j"))))
(build-system gnu-build-system)
+ (arguments
+ '(#:configure-flags '("CFLAGS=-O2 -g -fcommon")))
(inputs
`(("gtk+" ,gtk+-2)
("libx11" ,libx11)
diff --git a/gnu/packages/xorg.scm b/gnu/packages/xorg.scm
index a63e3392f8..21f4cae58e 100644
--- a/gnu/packages/xorg.scm
+++ b/gnu/packages/xorg.scm
@@ -2,11 +2,11 @@
;;; Copyright © 2013, 2014 Andreas Enge <andreas@enge.fr>
;;; Copyright © 2014, 2015, 2017, 2018, 2020 Mark H Weaver <mhw@netris.org>
;;; Copyright © 2014, 2015 Eric Bavier <bavier@member.fsf.org>
-;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020, 2021 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2015 Eric Dvorsak <eric@dvorsak.fr>
;;; Copyright © 2016 Mathieu Lirzin <mthl@gnu.org>
;;; Copyright © 2015 Cyrill Schenkel <cyrill.schenkel@gmail.com>
-;;; Copyright © 2016, 2017, 2019, 2020 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2016, 2017, 2019, 2020, 2021 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2016 Nikita <nikita@n0.is>
;;; Copyright © 2016 Alex Kost <alezost@gmail.com>
;;; Copyright © 2016 David Craven <david@craven.ch>
@@ -24,11 +24,12 @@
;;; Copyright © 2020 Liliana Marie Prikler <liliana.prikler@gmail.com>
;;; Copyright © 2020 Florian Pelz <pelzflorian@pelzflorian.de>
;;; Copyright © 2020, 2021 Michael Rohleder <mike@rohleder.de>
-;;; Copyright © 2020 Maxim Cournoyer <maxim.cournoyer@gmail.com>
+;;; Copyright © 2020, 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;; Copyright © 2020 Jean-Baptiste Note <jean-baptiste.note@m4x.org>
;;; Copyright © 2021 Nicolò Balzarotti <nicolo@nixo.xyz>
;;; Copyright © 2021 Matthew James Kraai <kraai@ftbfs.org>
;;; Copyright © 2021 Brice Waegeneire <brice@waegenei.re>
+;;; Copyright © 2021 Matthew James Kraai <kraai@ftbfs.org>
;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be>
;;; Copyright © 2021 qblade <qblade@protonmail.com>
;;;
@@ -52,7 +53,9 @@
#:use-module (guix packages)
#:use-module (guix download)
#:use-module (guix git-download)
+ #:use-module (guix build-system copy)
#:use-module (guix build-system gnu)
+ #:use-module (guix build-system meson)
#:use-module (guix build-system perl)
#:use-module (guix build-system python)
#:use-module (guix utils)
@@ -66,6 +69,7 @@
#:use-module (gnu packages compression)
#:use-module (gnu packages emacs)
#:use-module (gnu packages flex)
+ #:use-module (gnu packages fonts)
#:use-module (gnu packages fontutils)
#:use-module (gnu packages freedesktop)
#:use-module (gnu packages gettext)
@@ -84,6 +88,7 @@
#:use-module (gnu packages llvm)
#:use-module (gnu packages m4)
#:use-module (gnu packages ncurses)
+ #:use-module (gnu packages onc-rpc)
#:use-module (gnu packages pciutils)
#:use-module (gnu packages perl)
#:use-module (gnu packages perl-check)
@@ -101,6 +106,16 @@
+;; When cross-compiling certain packages, "--disable-malloc0returnsnull"
+;; needs to be passed. Otherwise, the configure script will try to run a
+;; binary for the host on the build machine.
+(define (malloc0-flags)
+ (if (%current-target-system)
+ ;; At least on glibc-based systems, malloc(0) evaluates to a non-NULL
+ ;; pointer (except in out-of-memory situations). On other systems,
+ ;; --enable-malloc0returnsnull might be required instead.
+ '("--disable-malloc0returnsnull")
+ '()))
;; packages without propagated input
;; (rationale for this separation: The packages in PROPAGATED_INPUTS need to
@@ -227,14 +242,14 @@ which can be read by any architecture.")
(define-public xorgproto
(package
(name "xorgproto")
- (version "2019.2")
+ (version "2021.5")
(source (origin
(method url-fetch)
- (uri (string-append "mirror://xorg/individual/proto/"
+ (uri (string-append "ftp://ftp.freedesktop.org/pub/xorg//individual/proto/"
"xorgproto-" version ".tar.bz2"))
(sha256
(base32
- "13kvir8dz9dvzhvyfndpff1z7k8h14s7kkl7mbl427andhax1v26"))))
+ "05d0kib351qmnlfimaznaw0220fr0ym7fx2gn9h2jqxxilxncbxa"))))
(build-system gnu-build-system)
(propagated-inputs
;; To get util-macros in (almost?) all package inputs.
@@ -1387,22 +1402,24 @@ configuration files.")
(name "libxkbfile")
(version "1.1.0")
(source
- (origin
- (method url-fetch)
- (uri (string-append
- "mirror://xorg/individual/lib/libxkbfile-"
- version
- ".tar.bz2"))
- (sha256
- (base32
- "1irq9crvscd3yb8sr802dhvvfr35jdy1n2yz094xplmd42mbv3bm"))))
+ (origin
+ (method url-fetch)
+ (uri (string-append
+ "mirror://xorg/individual/lib/libxkbfile-"
+ version
+ ".tar.bz2"))
+ (sha256
+ (base32
+ "1irq9crvscd3yb8sr802dhvvfr35jdy1n2yz094xplmd42mbv3bm"))))
(build-system gnu-build-system)
(arguments
'(#:configure-flags '("--disable-static")))
- (inputs
- `(("libx11" ,libx11)))
+ (propagated-inputs
+ ;; Required in xkbfile.pc.
+ `(("libx11" ,libx11)
+ ("kbproto" ,kbproto)))
(native-inputs
- `(("pkg-config" ,pkg-config)))
+ `(("pkg-config" ,pkg-config)))
(home-page "https://www.x.org/wiki/")
(synopsis "Xorg XKB file handling library")
(description "Xorg XKB file handling library.")
@@ -1476,7 +1493,7 @@ treat it as part of their software base when porting.")
(define-public libxres
(package
(name "libxres")
- (version "1.2.0")
+ (version "1.2.1")
(source
(origin
(method url-fetch)
@@ -1486,7 +1503,7 @@ treat it as part of their software base when porting.")
".tar.bz2"))
(sha256
(base32
- "1m0jr0lbz9ixpp9ihk68349q0i7ry2379lnfzdy4mrl86ijc2xgz"))))
+ "049b7dk6hx47161hg47ryjrm6pwsp27r5pby05b0wqb1pcggprmn"))))
(build-system gnu-build-system)
(arguments
'(#:configure-flags '("--disable-static")))
@@ -1907,7 +1924,7 @@ management to participate in an X11R6 session.")
(define-public util-macros
(package
(name "util-macros")
- (version "1.19.2")
+ (version "1.19.3")
(source
(origin
(method url-fetch)
@@ -1917,7 +1934,7 @@ management to participate in an X11R6 session.")
".tar.bz2"))
(sha256
(base32
- "04p7ydqxgq37jklnfj18b70zsifiz4h50wvrk94i2112mmv37r6p"))))
+ "0w8ryfqylprz37zj9grl4jzdsqq67ibfwq5raj7vm1i7kmp2x08g"))))
(build-system gnu-build-system)
(native-inputs `(("pkg-config" ,pkg-config)))
(arguments
@@ -2150,8 +2167,15 @@ emulate a TI-30 or an HP-10C.")
"https://xcb.freedesktop.org/dist/xcb-proto-"
version ".tar.xz"))
(sha256
- (base32
- "01d62r286yfc3rpz714nqdgkl0wk9j0wqkd4ylas1d7r4vmkqshq"))))
+ (base32
+ "01d62r286yfc3rpz714nqdgkl0wk9j0wqkd4ylas1d7r4vmkqshq"))
+ (modules '((guix build utils)))
+ (snippet
+ '(begin
+ ;; fractions.gcd has been deprecated since python-3.5.
+ (substitute* "xcbgen/align.py"
+ (("from fractions import gcd") "from math import gcd"))
+ #t))))
(build-system gnu-build-system)
(native-inputs
`(("pkg-config" ,pkg-config) ("python" ,python-minimal-wrapper)))
@@ -2255,65 +2279,58 @@ X11 Inter-Client Communication Conventions Manual (ICCCM).")
X server: @code{handhelds}, @code{redglass} and @code{whiteglass}.")
(license license:x11)))
-
(define-public hackneyed-x11-cursors
- ;; The current release 0.8 suffers from non-deterministic build problems.
- (let ((revision "1")
- (commit "9423cef2e2e5ff6b1d65d61f7108c97bc7f5fdfb"))
- (package
- (name "hackneyed-x11-cursors")
- (version (git-version "0.8.1" revision commit))
- (source
- (origin
- (method git-fetch)
- (uri (git-reference
- (url "https://gitlab.com/Enthymeme/hackneyed-x11-cursors.git")
- (commit commit)))
- (file-name (git-file-name name version))
- (sha256
- (base32
- "0f637i76sdwz3nm1g1iynamq6j0i6k3c70fpl0fmd0dlynm8ga96"))))
- (build-system gnu-build-system)
- (arguments
- `(#:tests? #f ;no test suite
- #:make-flags (list (string-append "PREFIX=" %output))
- #:phases
- (modify-phases %standard-phases
- (delete 'configure)
- (add-before 'build 'set-inkscape-environment-variable
- (lambda* (#:key inputs #:allow-other-keys)
- (let ((inkscape (string-append (assoc-ref inputs "inkscape")
- "/bin/inkscape")))
- (setenv "INKSCAPE" inkscape)
- #t)))
- (add-before 'build 'placate-inkscape-warnings
- (lambda _
- (setenv "HOME" (getcwd))
- #t))
- (add-after 'build 'generate-black-cursors
- (lambda* (#:key make-flags parallel-build #:allow-other-keys)
- (let ((build (assoc-ref %standard-phases 'build))
- (make-flags/extended
- `(,@make-flags
- "THEME_NAME=Hackneyed-Dark"
- "COMMON_SOURCE=theme/common-dark.svg"
- "RSVG_SOURCE=theme/right-handed-dark.svg"
- "LSVG_SOURCE=theme/left-handed-dark.svg")))
- (build #:make-flags make-flags/extended
- #:parallel-build parallel-build))))
- (add-after 'install 'install-black-cursors
- (lambda* (#:key make-flags #:allow-other-keys)
- (apply invoke `("make" "install" ,@make-flags
- "THEME_NAME=Hackneyed-Dark")))))))
- (native-inputs `(("imagemagick" ,imagemagick)
- ("inkscape" ,inkscape)
- ("xcursorgen" ,xcursorgen)))
- (home-page "https://gitlab.com/Enthymeme/hackneyed-x11-cursors")
- (synopsis "Classic cursor theme for X11")
- (description "Hackneyed is a scalable cursor theme mildly resembling old
+ (package
+ (name "hackneyed-x11-cursors")
+ (version "0.8.2")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://gitlab.com/Enthymeme/hackneyed-x11-cursors.git")
+ (commit version)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1mjwbny4rid9dzz6xfb8l5rkwki41sfhdp970cf3w2pi9kyg1njs"))))
+ (build-system gnu-build-system)
+ (arguments
+ `(#:tests? #f ;no test suite
+ #:make-flags (list (string-append "PREFIX=" %output))
+ #:phases
+ (modify-phases %standard-phases
+ (delete 'configure)
+ (add-before 'build 'set-inkscape-environment-variable
+ (lambda* (#:key inputs #:allow-other-keys)
+ (let ((inkscape (search-input-file inputs "/bin/inkscape")))
+ (setenv "INKSCAPE" inkscape))))
+ (add-before 'build 'placate-inkscape-warnings
+ (lambda _
+ (setenv "HOME" (getcwd))))
+ (add-after 'build 'generate-black-cursors
+ (lambda* (#:key make-flags parallel-build #:allow-other-keys)
+ (let ((build (assoc-ref %standard-phases 'build))
+ (make-flags/extended
+ `(,@make-flags
+ "THEME_NAME=Hackneyed-Dark"
+ "COMMON_SOURCE=theme/common-dark.svg"
+ "RSVG_SOURCE=theme/right-handed-dark.svg"
+ "LSVG_SOURCE=theme/left-handed-dark.svg")))
+ (build #:make-flags make-flags/extended
+ #:parallel-build parallel-build))))
+ (add-after 'install 'install-black-cursors
+ (lambda* (#:key make-flags #:allow-other-keys)
+ (apply invoke `("make" "install" ,@make-flags
+ "THEME_NAME=Hackneyed-Dark")))))))
+ (native-inputs `(("imagemagick" ,imagemagick)
+ ("inkscape" ,inkscape)
+ ("xcursorgen" ,xcursorgen)))
+ (home-page "https://gitlab.com/Enthymeme/hackneyed-x11-cursors")
+ (synopsis "Classic cursor theme for X11")
+ (description "Hackneyed is a scalable cursor theme mildly resembling old
Windows 3.x cursors. The cursors are available in white and black colors. A
left-handed version of the cursors is also included.")
- (license license:x11))))
+ (license license:x11)))
(define-public xcursorgen
(package
@@ -2424,6 +2441,7 @@ DRI (Direct Rendering Infrastructure) drivers.")
(base32
"1ql592pdhddhkipkrsxn929y9l2nn02a5fh2z3dx47kmzs5y006p"))))
(build-system gnu-build-system)
+ (arguments `(#:configure-flags ',(malloc0-flags)))
(inputs
`(("libxrender" ,libxrender)
("libxrandr" ,libxrandr)
@@ -2473,7 +2491,7 @@ XC-APPGROUP, XTEST.")
(define-public libevdev
(package
(name "libevdev")
- (version "1.9.1")
+ (version "1.11.0")
(source
(origin
(method url-fetch)
@@ -2481,7 +2499,7 @@ XC-APPGROUP, XTEST.")
name "-" version ".tar.xz"))
(sha256
(base32
- "1jvsphdrs1i54ccjcn6ll26jy42am7h28lbsvwa6pmxgqm43qq7m"))))
+ "1l628xblk36vh7aqia1fw6hh62af7va0pd70h28112l5i4afmx33"))))
(build-system gnu-build-system)
(arguments
`(#:configure-flags '("--disable-static")))
@@ -2535,7 +2553,7 @@ including most mice, keyboards, tablets and touchscreens.")
(define-public xf86-input-libinput
(package
(name "xf86-input-libinput")
- (version "1.0.1")
+ (version "1.1.0")
(source (origin
(method url-fetch)
(uri (string-append
@@ -2543,7 +2561,7 @@ including most mice, keyboards, tablets and touchscreens.")
name "-" version ".tar.bz2"))
(sha256
(base32
- "0nr4r9x8c7y1l0ipivjch5zps093mxmg2nqmfn2934am26fc9ppx"))))
+ "05ldqr10f2rrnshyk3lc773rz0gp3ccdzwa8n7lsc94i850jl7g1"))))
(build-system gnu-build-system)
(arguments
'(#:configure-flags
@@ -2711,14 +2729,14 @@ as USB mice.")
(define-public xf86-video-amdgpu
(package
(name "xf86-video-amdgpu")
- (version "19.1.0")
+ (version "21.0.0")
(source
(origin
(method url-fetch)
(uri (string-append "mirror://xorg/individual/driver/"
"xf86-video-amdgpu-" version ".tar.bz2"))
(sha256
- (base32 "0pgy4ihnja0vm8504qw7qxh3pdpa3p9k6967nz15m6b1mvha83jg"))))
+ (base32 "125dq85n46yqmnmr2hknxwcqicwlvz2b2phf0m963fpg9l1j6y30"))))
(build-system gnu-build-system)
(inputs `(("xorg-server" ,xorg-server)))
(native-inputs `(("pkg-config" ,pkg-config)))
@@ -2776,27 +2794,36 @@ X server.")
(license license:x11)))
(define-public xf86-video-ati
- (package
- (name "xf86-video-ati")
- (version "19.1.0")
- (source
- (origin
- (method url-fetch)
- (uri (string-append "mirror://xorg/individual/driver/"
- "xf86-video-ati-" version ".tar.bz2"))
- (sha256
- (base32 "0j9w4axsqlycv4v14g53xyhkm9h7d27b2fcv9lrzb9gf54b5m7v5"))))
- (build-system gnu-build-system)
- (inputs `(("mesa" ,mesa)
- ("xorgproto" ,xorgproto)
- ("xorg-server" ,xorg-server)))
- (native-inputs `(("pkg-config" ,pkg-config)))
- (home-page "https://www.x.org/wiki/")
- (synopsis "ATI Radeon video driver for X server")
- (description
- "xf86-video-ati is an ATI Radeon video driver for the Xorg
+ ;; The current release is too old to build with our inputs.
+ (let ((commit "5eba006e4129e8015b822f9e1d2f1e613e252cda")
+ (revision "1"))
+ (package
+ (name "xf86-video-ati")
+ (version (git-version "19.1.0" revision commit))
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://gitlab.freedesktop.org/xorg/driver/xf86-video-ati.git")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "1n49wx0v13jh8vv17sxgrmmpi1mk3n2wph07jfmxmzqahpcn4lkn"))))
+ (build-system gnu-build-system)
+ (inputs `(("mesa" ,mesa)
+ ("xorgproto" ,xorgproto)
+ ("xorg-server" ,xorg-server)))
+ (native-inputs
+ `(("pkg-config" ,pkg-config)
+ ("autoconf" ,autoconf)
+ ("automake" ,automake)
+ ("libtool" ,libtool)))
+ (home-page "https://www.x.org/wiki/")
+ (synopsis "ATI Radeon video driver for X server")
+ (description
+ "xf86-video-ati is an ATI Radeon video driver for the Xorg
X server.")
- (license license:x11)))
+ (license license:x11))))
(define-public xf86-video-cirrus
@@ -2904,7 +2931,13 @@ framebuffer device.")
`(#:configure-flags
(list (string-append "--with-xorg-conf-dir="
(assoc-ref %outputs "out")
- "/share/X11/xorg.conf.d"))))
+ "/share/X11/xorg.conf.d"))
+ #:phases
+ (modify-phases %standard-phases
+ (replace 'bootstrap
+ (lambda _
+ ;; autogen.sh calls configure unconditionally.
+ (invoke "autoreconf" "-vfi"))))))
(home-page "https://www.x.org/wiki/")
(synopsis "Adreno video driver for X server")
(description
@@ -3076,7 +3109,8 @@ It supports a variety of Intel graphics chipsets.")
(sha256
(base32
"171wg8r6py1l138s58rlapin3rlpwsg9spmvhc7l68mm3g3hf1vs"))
- (patches (search-patches "xf86-video-mach64-glibc-2.20.patch"))))
+ (patches (search-patches "xf86-video-mach64-glibc-2.20.patch"
+ "xf86-video-mach64-bool-to-boolean.patch"))))
(build-system gnu-build-system)
(inputs `(("mesa" ,mesa)
("xorgproto" ,xorgproto)
@@ -3208,7 +3242,8 @@ supported, and the RENDER extension is not accelerated by this driver.")
(uri (string-append "mirror://xorg/individual/driver/xf86-video-nouveau-"
version ".tar.bz2"))
(sha256
- (base32 "0sqm1jwjg15sp8v7039y2hsbhph8gpjd2bdzcqqiij2mgbi254s9"))))
+ (base32 "0sqm1jwjg15sp8v7039y2hsbhph8gpjd2bdzcqqiij2mgbi254s9"))
+ (patches (search-patches "xf86-video-nouveau-fixup-ABI.patch"))))
(build-system gnu-build-system)
(inputs `(("xorg-server" ,xorg-server)))
(native-inputs `(("pkg-config" ,pkg-config)))
@@ -3586,8 +3621,7 @@ X server.")
(format #t "decompressing x86emu source code~%")
(with-directory-excursion "libs"
(let ((srcs (assoc-ref inputs "xorg-server-sources"))
- (tar-binary (string-append (assoc-ref inputs "tar")
- "/bin/tar")))
+ (tar-binary (search-input-file inputs "/bin/tar")))
(invoke tar-binary "xvf" srcs "--strip-components=3"
"--wildcards" "*/hw/xfree86/x86emu/")
;; extract license:
@@ -3910,10 +3944,10 @@ alternative implementations like XRandR or TwinView.")
(license license:x11)))
-(define xkbcomp-intermediate ;used as input for xkeyboard-config
+(define-public xkbcomp-intermediate ;used as input for xkeyboard-config
(package
(name "xkbcomp-intermediate")
- (version "1.4.4")
+ (version "1.4.5")
(source
(origin
(method url-fetch)
@@ -3921,7 +3955,7 @@ alternative implementations like XRandR or TwinView.")
version ".tar.bz2"))
(sha256
(base32
- "0zpjkbap9160pdd6jpgb5f0yg5281w0rkkx1l0i7g887lq1ydk2r"))))
+ "0pmhshqinwqh5rip670l3szjpywky67hv232ql6gvdj489n0hlb8"))))
(build-system gnu-build-system)
(inputs
`(("xorgproto" ,xorgproto)
@@ -3943,11 +3977,16 @@ explicitly specify most aspects of keyboard behaviour on per-key basis
and to more closely track the logical and physical state of the
keyboard. It also includes a number of keyboard controls designed to
make keyboards more accessible to people with physical impairments.")
- (license license:x11)))
+ (license license:x11)
+
+ ;; The only reason this package is public is to make sure it's built and
+ ;; published by the continuous integration tool.
+ (properties '((hidden? . #t)))))
(define-public xkbcomp ; using xkeyboard-config as input
(package (inherit xkbcomp-intermediate)
(name "xkbcomp")
+ (properties '())
(inputs
`(,@(package-inputs xkbcomp-intermediate)
("xkeyboard-config" ,xkeyboard-config)))
@@ -4050,17 +4089,17 @@ extension to the X11 protocol. It includes:
(define-public xkeyboard-config
(package
(name "xkeyboard-config")
- (version "2.31")
+ (version "2.34")
(source
(origin
(method url-fetch)
(uri (string-append
- "mirror://xorg/individual/data/xkeyboard-config/xkeyboard-config-"
+ "ftp://ftp.freedesktop.org/pub/xorg//individual/data/xkeyboard-config/xkeyboard-config-"
version
".tar.bz2"))
(sha256
(base32
- "18xddaxh83zm698syh50w983jg6b7b8zgv0dfaf7ha485hgihi6s"))))
+ "1kmq2ykwmh10sd6155gml4jhdxmvsll6xdg7zw86czpfhrvd48dk"))))
(build-system gnu-build-system)
(inputs
`(("libx11" ,libx11)
@@ -4758,13 +4797,14 @@ cannot be adequately worked around on the client side of the wire.")
(base32
"0azqxllcsfxc3ilhz6kwc6x7m8wc477p59ir9p0yrsldx766zbar"))))
(build-system gnu-build-system)
+ (outputs '("out" "doc")) ;man pages represent 40% of the total
(arguments
`(#:configure-flags
(list "--disable-static"
- ;; Disable zero malloc check that fails when cross-compiling.
- ,@(if (%current-target-system)
- '("--disable-malloc0returnsnull")
- '()))))
+ (string-append "--mandir="
+ (assoc-ref %outputs "doc")
+ "/share/man")
+ ,@(malloc0-flags))))
(propagated-inputs
`(("xorgproto" ,xorgproto)))
(inputs
@@ -4795,7 +4835,7 @@ cannot be adequately worked around on the client side of the wire.")
"086p0axqj57nvkaqa6r00dnr9kyrn1m8blgf0zjy25zpxkbxn200"))))
(build-system gnu-build-system)
(arguments
- '(#:configure-flags '("--disable-static")))
+ `(#:configure-flags '("--disable-static" ,@(malloc0-flags))))
(propagated-inputs
`(("xorgproto" ,xorgproto)))
(inputs
@@ -4854,11 +4894,7 @@ cannot be adequately worked around on the client side of the wire.")
(build-system gnu-build-system)
(arguments
`(#:configure-flags
- (list "--disable-static"
- ;; Disable zero malloc check that fails when cross-compiling.
- ,@(if (%current-target-system)
- '("--disable-malloc0returnsnull")
- '()))))
+ (list "--disable-static" ,@(malloc0-flags))))
(propagated-inputs
`(("xorgproto" ,xorgproto)))
(inputs
@@ -4925,7 +4961,7 @@ protocol and arbitrary X extension protocol.")
"125hn06bd3d8y97hm2pbf5j55gg4r2hpd3ifad651i4sr7m16v6j"))))
(build-system gnu-build-system)
(arguments
- '(#:configure-flags '("--disable-static")))
+ `(#:configure-flags '(,@(malloc0-flags) "--disable-static")))
(propagated-inputs
`(("xorgproto" ,xorgproto)))
(inputs
@@ -4974,9 +5010,8 @@ protocol and arbitrary X extension protocol.")
(wrap-program (string-append (assoc-ref outputs "out")
"/bin/mkfontdir")
`("PATH" ":" prefix
- (,(string-append (assoc-ref inputs "mkfontscale")
- "/bin"))))
- #t)))))
+ (,(dirname
+ (search-input-file inputs "/bin/mkfontscale"))))))))))
(inputs
`(("mkfontscale" ,mkfontscale)))
(native-inputs
@@ -5084,7 +5119,7 @@ an X Window System display.")
(define-public libxfixes
(package
(name "libxfixes")
- (version "5.0.3")
+ (version "6.0.0")
(source
(origin
(method url-fetch)
@@ -5094,7 +5129,7 @@ an X Window System display.")
".tar.bz2"))
(sha256
(base32
- "1miana3y4hwdqdparsccmygqr3ic3hs5jrqfzp70hvi2zwxd676y"))))
+ "0k2v4i4r24y3kdr5ici1qqhp69djnja919xfqp54c2rylm6s5hd7"))))
(build-system gnu-build-system)
(arguments
'(#:configure-flags '("--disable-static")))
@@ -5173,8 +5208,13 @@ new API's in libXft, or the legacy API's in libX11.")
(base32
"0q8hz3slga3w3ch8wp0k7ay9ilhz315qnab0w1y2x9w3cf7hv8rn"))))
(build-system gnu-build-system)
+ (outputs '("out" "doc")) ;man pages represent 28% of the total
(arguments
- '(#:configure-flags '("--disable-static")))
+ `(#:configure-flags (list "--disable-static"
+ (string-append "--mandir="
+ (assoc-ref %outputs "doc")
+ "/share/man")
+ ,@(malloc0-flags))))
(propagated-inputs
`(("xorgproto" ,xorgproto)
("libx11" ,libx11)
@@ -5203,7 +5243,7 @@ new API's in libXft, or the legacy API's in libX11.")
"08z0mqywrm7ij8bxlfrx0d2wy6kladdmkva1nw5k6qix82z0xsla"))))
(build-system gnu-build-system)
(arguments
- '(#:configure-flags '("--disable-static")))
+ `(#:configure-flags '("--disable-static" ,@(malloc0-flags))))
(propagated-inputs
;; In accordance with xrandr.pc.
`(("libx11" ,libx11)
@@ -5234,7 +5274,7 @@ new API's in libXft, or the legacy API's in libX11.")
"1kbdjsvkm5l7axv7g477qj18sab2wnqhliy6197syzizgfbsfgbb"))))
(build-system gnu-build-system)
(arguments
- '(#:configure-flags '("--disable-static")))
+ `(#:configure-flags '(,@(malloc0-flags) "--disable-static")))
(propagated-inputs
`(("libxv" ,libxv)))
(inputs
@@ -5264,7 +5304,7 @@ new API's in libXft, or the legacy API's in libX11.")
"0mydhlyn72i7brjwypsqrpkls3nm6vxw0li8b2nw0caz7kwjgvmg"))))
(build-system gnu-build-system)
(arguments
- '(#:configure-flags '("--disable-static")))
+ `(#:configure-flags '("--disable-static" ,@(malloc0-flags))))
(propagated-inputs
`(("libxext" ,libxext)
("xorgproto" ,xorgproto)))
@@ -5295,6 +5335,7 @@ protocol.")
(base32
"0d2chjgyn5lr9sfhacfvqgnj9l9faz11vn322a06jd6lk3dxcpm5"))))
(build-system gnu-build-system)
+ (outputs '("out" "doc")) ;5.5 MiB of man pages
(propagated-inputs
`(("libpthread-stubs" ,libpthread-stubs)
("libxau" ,libxau)
@@ -5306,8 +5347,11 @@ protocol.")
`(("pkg-config" ,pkg-config)
("python" ,python-minimal-wrapper)))
(arguments
- `(#:configure-flags '("--enable-xkb"
- "--disable-static")))
+ `(#:configure-flags (list "--enable-xkb"
+ "--disable-static"
+ (string-append "--mandir="
+ (assoc-ref %outputs "doc")
+ "/share/man"))))
(home-page "https://xcb.freedesktop.org/")
(synopsis "The X C Binding (XCB) library")
(description
@@ -5326,78 +5370,101 @@ over Xlib, including:
- easy extension implementation: interfaces auto-generated from XML-XCB.")
(license license:x11)))
+(define-public libxcvt
+ (package
+ (name "libxcvt")
+ (version "0.1.1")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "https://www.x.org/releases/individual"
+ "/lib/libxcvt-" version ".tar.xz"))
+ (sha256
+ (base32
+ "0acc7vrj5kfb19zvyl7f29rnsvx383dvwc19k70r8prm1lccxsr7"))))
+ (build-system meson-build-system)
+ (home-page "https://gitlab.freedesktop.org/xorg/lib/libxcvt")
+ (synopsis "VESA Coordinated Video Timings (CVT) library")
+ (description "@code{libxcvt} is a library providing a standalone version
+of the X server implementation of the VESA Coordinated Video Timings (CVT)
+standard timing modelines generator. @code{libxcvt} also provides a
+standalone version of the command line tool @command{cvt} copied from the Xorg
+implementation and is meant to be a direct replacement to the version provided
+by the Xorg server.")
+ (license license:x11)))
(define-public xorg-server
(package
(name "xorg-server")
- (version "1.20.11")
+ (version "21.1.1")
(source
- (origin
- (method url-fetch)
- (uri (string-append "mirror://xorg/individual/xserver/"
- "xorg-server-" version ".tar.bz2"))
- (sha256
- (base32
- "0jacqgin8kcyy8fyv0lhgb4if8g9hp60rm3ih3s1mgps7xp7jk4i"))
- (patches
- (list
- ;; See:
- ;; https://lists.fedoraproject.org/archives/list/devel@lists.
- ;; fedoraproject.org/message/JU655YB7AM4OOEQ4MOMCRHJTYJ76VFOK/
- (origin
- (method url-fetch)
- (uri (string-append
- "http://pkgs.fedoraproject.org/cgit/rpms/xorg-x11-server.git"
- "/plain/06_use-intel-only-on-pre-gen4.diff"))
- (sha256
- (base32
- "0mm70y058r8s9y9jiv7q2myv0ycnaw3iqzm7d274410s0ik38w7q"))
- (file-name "xorg-server-use-intel-only-on-pre-gen4.diff"))))))
+ (origin
+ (method url-fetch)
+
+ (uri (string-append "https://xorg.freedesktop.org/archive/individual"
+ "/xserver/xorg-server-" version ".tar.xz"))
+ (sha256
+ (base32
+ "0md7dqsc5qb30gym06c4zc2cjsdc5ps8nywk1bkcpix05kppybkq"))
+ (patches
+ (list
+ ;; See:
+ ;; https://lists.fedoraproject.org/archives/list/devel@lists.
+ ;; fedoraproject.org/message/JU655YB7AM4OOEQ4MOMCRHJTYJ76VFOK/
+ (origin
+ (method url-fetch)
+ (uri (string-append
+ "http://pkgs.fedoraproject.org/cgit/rpms/xorg-x11-server.git"
+ "/plain/06_use-intel-only-on-pre-gen4.diff"))
+ (sha256
+ (base32
+ "0mm70y058r8s9y9jiv7q2myv0ycnaw3iqzm7d274410s0ik38w7q"))
+ (file-name "xorg-server-use-intel-only-on-pre-gen4.diff"))))))
(build-system gnu-build-system)
(propagated-inputs
- `(("libpciaccess" ,libpciaccess)
- ("mesa" ,mesa)
- ("pixman" ,pixman)
- ("xorgproto" ,xorgproto)))
+ ;; The following libraries are required by xorg-server.pc.
+ `(("libpciaccess" ,libpciaccess)
+ ("libxcvt" ,libxcvt)
+ ("mesa" ,mesa)
+ ("pixman" ,pixman)
+ ("xorgproto" ,xorgproto)))
(inputs
- `(("udev" ,eudev)
- ("dbus" ,dbus)
- ("libdmx" ,libdmx)
- ("libepoxy" ,libepoxy)
- ("libgcrypt" ,libgcrypt)
- ("libxau" ,libxau)
- ("libxaw" ,libxaw)
- ("libxdmcp" ,libxdmcp)
- ("libxfixes" ,libxfixes)
- ("libxfont2" ,libxfont2)
- ("libxkbfile" ,libxkbfile)
- ("libxrender" ,libxrender)
- ("libxres" ,libxres)
- ("libxshmfence" ,libxshmfence)
- ("libxt" ,libxt)
- ("libxv" ,libxv)
- ("xkbcomp" ,xkbcomp)
- ("xkeyboard-config" ,xkeyboard-config)
- ("xtrans" ,xtrans)
- ("zlib" ,zlib)
- ;; Inputs for Xephyr
- ("xcb-util" ,xcb-util)
- ("xcb-util-image" ,xcb-util-image)
- ("xcb-util-keysyms" ,xcb-util-keysyms)
- ("xcb-util-renderutil" ,xcb-util-renderutil)
- ("xcb-util-wm" ,xcb-util-wm)))
+ `(("udev" ,eudev)
+ ("dbus" ,dbus)
+ ("libdmx" ,libdmx)
+ ("libepoxy" ,libepoxy)
+ ("libgcrypt" ,libgcrypt)
+ ("libxau" ,libxau)
+ ("libxaw" ,libxaw)
+ ("libxdmcp" ,libxdmcp)
+ ("libxfixes" ,libxfixes)
+ ("libxfont2" ,libxfont2)
+ ("libxkbfile" ,libxkbfile)
+ ("libxrender" ,libxrender)
+ ("libxres" ,libxres)
+ ("libxshmfence" ,libxshmfence)
+ ("libxt" ,libxt)
+ ("libxv" ,libxv)
+ ("xkbcomp" ,xkbcomp)
+ ("xkeyboard-config" ,xkeyboard-config)
+ ("xtrans" ,xtrans)
+ ("zlib" ,zlib)
+ ;; Inputs for Xephyr
+ ("xcb-util" ,xcb-util)
+ ("xcb-util-image" ,xcb-util-image)
+ ("xcb-util-keysyms" ,xcb-util-keysyms)
+ ("xcb-util-renderutil" ,xcb-util-renderutil)
+ ("xcb-util-wm" ,xcb-util-wm)))
(native-inputs
`(("python" ,python-wrapper)
("pkg-config" ,pkg-config)))
(arguments
- `(#:parallel-tests? #f
- #:configure-flags
+ `(#:configure-flags
(list (string-append "--with-xkb-path="
(assoc-ref %build-inputs "xkeyboard-config")
"/share/X11/xkb")
(string-append "--with-xkb-output="
"/tmp") ; FIXME: This is a bit doubtful; where should
- ; the compiled keyboard maps go?
+ ; the compiled keyboard maps go?
(string-append "--with-xkb-bin-directory="
(assoc-ref %build-inputs "xkbcomp")
"/bin")
@@ -5406,19 +5473,19 @@ over Xlib, including:
;; It's not used anyway, so set it to empty.
"--with-default-font-path="
+ ;; Enable the X security extensions (ssh -X).
+ "--enable-xcsecurity"
+
;; The default is to use "uname -srm", which captures the kernel
;; version and makes builds non-reproducible.
"--with-os-name=GNU"
-
- "--with-os-vendor=GuixSD" ;not strictly needed, but looks nice
-
+ "--with-os-vendor=Guix" ; not strictly needed, but looks nice
;; For the log file, etc.
"--localstatedir=/var"
- ;; For sddm
+ ;; For sddm.
"--enable-kdrive"
"--enable-xephyr")
-
#:phases
(modify-phases %standard-phases
(add-before 'configure 'pre-configure
@@ -5437,9 +5504,7 @@ over Xlib, including:
(("^BUILD_DATE=.*$")
"BUILD_DATE=19700101\n")
(("^BUILD_TIME=.*$")
- "BUILD_TIME=000001\n"))
-
- #t)))))
+ "BUILD_TIME=000001\n")))))))
(home-page "https://www.x.org/wiki/")
(synopsis "Xorg implementation of the X Window System")
(description
@@ -5460,47 +5525,150 @@ draggable titlebars and borders.")
(define-public xorg-server-for-tests
(hidden-package
(package
- (inherit xorg-server)
- (version "1.20.10")
- (source
- (origin
- (method url-fetch)
- (uri (string-append "mirror://xorg/individual/xserver/"
- "xorg-server-" version ".tar.bz2"))
- (sha256
- (base32
- "16bwrf0ag41l7jbrllbix8z6avc5yimga7ihvq4ch3a5hb020x4p"))
- (patches
- (list
- ;; See:
- ;; https://lists.fedoraproject.org/archives/list/devel@lists.
- ;; fedoraproject.org/message/JU655YB7AM4OOEQ4MOMCRHJTYJ76VFOK/
- (origin
- (method url-fetch)
- (uri (string-append
- "http://pkgs.fedoraproject.org/cgit/rpms/xorg-x11-server.git"
- "/plain/06_use-intel-only-on-pre-gen4.diff"))
- (sha256
- (base32
- "0mm70y058r8s9y9jiv7q2myv0ycnaw3iqzm7d274410s0ik38w7q"))
- (file-name "xorg-server-use-intel-only-on-pre-gen4.diff")))))))))
+ (inherit xorg-server))))
+
+(define-public eglexternalplatform
+ (package
+ (name "eglexternalplatform")
+ (version "1.1")
+ (source
+ (origin
+ (method git-fetch)
+ (uri
+ (git-reference
+ (url "https://github.com/NVIDIA/eglexternalplatform")
+ (commit version)))
+ (file-name
+ (git-file-name name version))
+ (sha256
+ (base32 "0lr5s2xa1zn220ghmbsiwgmx77l156wk54c7hybia0xpr9yr2nhb"))))
+ (build-system copy-build-system)
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'patch-pkgconfig
+ (lambda* (#:key outputs #:allow-other-keys)
+ (substitute* "eglexternalplatform.pc"
+ (("/usr")
+ (assoc-ref outputs "out")))))
+ (add-after 'install 'revise
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out")))
+ (mkdir-p (string-append out "/include/EGL"))
+ (rename-file
+ (string-append out "/interface")
+ (string-append out "/include/EGL"))
+ (mkdir-p (string-append out "/share/pkgconfig"))
+ (rename-file
+ (string-append out "/eglexternalplatform.pc")
+ (string-append out "/share/pkgconfig/eglexternalplatform.pc"))
+ (for-each delete-file-recursively
+ (list
+ (string-append out "/samples")
+ (string-append out "/COPYING")
+ (string-append out "/README.md")))))))))
+ (synopsis "EGL External Platform interface")
+ (description "EGLExternalPlatform is an specification of the EGL External
+Platform interface for writing EGL platforms and their interactions with modern
+window systems on top of existing low-level EGL platform implementations. This
+keeps window system implementation specifics out of EGL drivers by using
+application-facing EGL functions.")
+ (home-page "https://github.com/NVIDIA/eglexternalplatform")
+ (license license:expat)))
+
+(define-public egl-wayland
+ (package
+ (name "egl-wayland")
+ (version "1.1.9")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/NVIDIA/egl-wayland")
+ (commit version)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "1iz86cpc4v7izckrcslllnw0vvvgsxg1sr65yb8s9d0f8xa8djdd"))))
+ (build-system meson-build-system)
+ (native-inputs
+ `(("libglvnd" ,libglvnd) ;needed for headers
+ ("mesa-headers" ,mesa-headers)
+ ("pkg-config" ,pkg-config)))
+ (inputs
+ `(("mesa" ,mesa)
+ ("wayland" ,wayland)
+ ("wayland-protocols" ,wayland-protocols)))
+ (propagated-inputs
+ `(("eglexternalplatform" ,eglexternalplatform)))
+ (synopsis "EGLStream-based Wayland external platform")
+ (description "EGL-Wayland is an implementation of a EGL External Platform
+library to add client-side Wayland support to EGL on top of EGLDevice and
+EGLStream families of extensions.")
+ (home-page "https://github.com/NVIDIA/egl-wayland")
+ (license license:expat)))
(define-public xorg-server-xwayland
- (package/inherit xorg-server
+ (package
(name "xorg-server-xwayland")
- (inputs
- `(("wayland" ,wayland)
- ("wayland-protocols" ,wayland-protocols)
- ,@(package-inputs xorg-server)))
+ (version "21.1.3")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "https://xorg.freedesktop.org/archive/individual"
+ "/xserver/xwayland-" version ".tar.xz"))
+ (sha256
+ (base32
+ "18pqvg76grbsyxa3mm3j06i1l8cwb28nbn2gcnqpsk7x75zpbhpb"))))
+ (inputs (list font-dejavu
+ dbus
+ egl-wayland
+ eudev
+ libfontenc
+ libdrm
+ libepoxy
+ libgcrypt
+ libtirpc
+ libxfont2
+ libxkbfile
+ pixman
+ wayland
+ wayland-protocols
+ xkbcomp
+ xkeyboard-config
+ xorgproto
+ xtrans))
+ (native-inputs (list pkg-config))
+ (build-system meson-build-system)
(arguments
- (substitute-keyword-arguments (package-arguments xorg-server)
- ((#:configure-flags flags)
- `(cons* "--enable-xwayland" "--disable-xorg"
- "--disable-docs" "--disable-devel-docs"
- "--disable-xvfb" "--disable-xnest"
- "--disable-xquartz" "--disable-xwin"
- ,flags))))
- (synopsis "Xorg server with wayland backend")))
+ `(#:configure-flags
+ (list "-Dxwayland_eglstream=true"
+ (string-append "-Dxkb_dir="
+ (assoc-ref %build-inputs "xkeyboard-config")
+ "/share/X11/xkb")
+ (string-append "-Dxkb_bin_dir="
+ (assoc-ref %build-inputs "xkbcomp") "/bin")
+ ;; The build system insist on providing a default font path; give
+ ;; that of dejavu, the same used for our fontconfig package.
+ (string-append "-Ddefault_font_path="
+ (assoc-ref %build-inputs "font-dejavu")
+ "/share/fonts")
+ "-Dxkb_output_dir=/tmp"
+ (format #f "-Dbuilder_string=\"Build ID: ~a ~a\"" ,name ,version)
+ "-Dxcsecurity=true"
+ "-Ddri3=true"
+ "-Dglamor=true"
+ ;; For the log file, etc.
+ "--localstatedir=/var")
+ #:phases (modify-phases %standard-phases
+ (add-after 'unpack 'patch-/bin/sh
+ (lambda _
+ (substitute* (find-files "." "\\.c$")
+ (("/bin/sh") (which "sh"))))))))
+ (synopsis "Xorg server with Wayland backend")
+ (description "Xwayland is an X server for running X clients under
+Wayland.")
+ (home-page "https://www.x.org/wiki/")
+ (license license:x11)))
;; packages of height 4 in the propagated-inputs tree
@@ -5508,18 +5676,15 @@ draggable titlebars and borders.")
(define-public libx11
(package
(name "libx11")
- (version "1.6.10")
+ (version "1.7.2")
(source
(origin
(method url-fetch)
- (uri (string-append
- "mirror://xorg/individual/lib/libX11-"
- version
- ".tar.bz2"))
+ (uri (string-append "mirror://xorg/individual/lib/libX11-"
+ version ".tar.bz2"))
(sha256
(base32
- "09k2pqmqbn2m1bpgl7jfxyqxaaxsnzbnp2bp8ycmqldqi5ln4j5g"))))
- (replacement libx11/fixed)
+ "0v7aj8q3rlchdyfwdna7n7vgpyzyir391dlv5rwy9fxagbikbyhw"))))
(build-system gnu-build-system)
(outputs '("out"
"doc")) ;8 MiB of man pages + XML
@@ -5529,11 +5694,7 @@ draggable titlebars and borders.")
(assoc-ref %outputs "doc")
"/share/man")
"--disable-static"
-
- ;; Disable zero malloc check that fails when cross-compiling.
- ,@(if (%current-target-system)
- '("--disable-malloc0returnsnull")
- '()))))
+ ,@(malloc0-flags))))
(propagated-inputs
`(("xorgproto" ,xorgproto)
("libxcb" ,libxcb)))
@@ -5547,18 +5708,6 @@ draggable titlebars and borders.")
(description "Xorg Core X11 protocol client library.")
(license license:x11)))
-(define-public libx11/fixed
- (package
- (inherit libx11)
- (version "1.7.1A")
- (source
- (origin
- (method url-fetch)
- (uri "mirror://xorg/individual/lib/libX11-1.7.1.tar.bz2")
- (sha256
- (base32
- "0isxad59hvdwggbxqqjjjg3zmih9xiq4d9mdsnqbyb2nmbg46kp6"))))))
-
;; packages of height 5 in the propagated-inputs tree
(define-public libxcursor
@@ -5566,34 +5715,31 @@ draggable titlebars and borders.")
(name "libxcursor")
(version "1.2.0")
(source
- (origin
- (method url-fetch)
- (uri (string-append
- "mirror://xorg/individual/lib/libXcursor-"
- version
- ".tar.bz2"))
- (sha256
- (base32
- "10l7c9fm0jmpkm9ab9dz8r6m1pr87vvgqjnbx1psz50h4pwfklrs"))))
+ (origin
+ (method url-fetch)
+ (uri (string-append
+ "mirror://xorg/individual/lib/libXcursor-"
+ version
+ ".tar.bz2"))
+ (sha256
+ (base32
+ "10l7c9fm0jmpkm9ab9dz8r6m1pr87vvgqjnbx1psz50h4pwfklrs"))))
(build-system gnu-build-system)
(arguments
'(#:configure-flags '("--disable-static")))
(propagated-inputs
- `(("libx11" ,libx11)
- ("libxrender" ,libxrender)
- ("libxfixes" ,libxfixes)
- ("xorgproto" ,xorgproto)))
+ `(("libx11" ,libx11)
+ ("libxrender" ,libxrender)
+ ("libxfixes" ,libxfixes)
+ ("xorgproto" ,xorgproto)))
(native-inputs
- `(("pkg-config" ,pkg-config)))
-;; TODO: add XCURSOR_PATH=.../share/icons to profile search paths, so
-;; libXcursor finds cursors installed into a profile. If we solve bugs
-;; <http://bugs.gnu.org/20255> and <http://bugs.gnu.org/22138>, we can fix
-;; this with a search-path as follows:
-;;
-;; (native-search-paths
-;; (list (search-path-specification
-;; (variable "XCURSOR_PATH")
-;; (files '("share/icons")))))
+ `(("pkg-config" ,pkg-config)))
+ ;; FIXME: The search path below won't be very effective until the bugs
+ ;; <http://bugs.gnu.org/20255> and <http://bugs.gnu.org/22138> are solved.
+ (native-search-paths
+ (list (search-path-specification
+ (variable "XCURSOR_PATH")
+ (files '("share/icons")))))
(home-page "https://www.x.org/wiki/")
(synopsis "Xorg Cursor management library")
(description "Xorg Cursor management library.")
@@ -5602,7 +5748,7 @@ draggable titlebars and borders.")
(define-public libxt
(package
(name "libxt")
- (version "1.2.0")
+ (version "1.2.1")
(source
(origin
(method url-fetch)
@@ -5612,7 +5758,7 @@ draggable titlebars and borders.")
".tar.bz2"))
(sha256
(base32
- "0cbqlyssr8aia88c8i7z59z9d0kp3p2hp6683xhz9ndyv8qza7dk"))
+ "0q1x7842r8rcn2m0q4q9f69h4qa097fyizs8brzx5ns62s7w1737"))
(patches (search-patches "libxt-guix-search-paths.patch"))))
(build-system gnu-build-system)
(outputs '("out"
@@ -5623,10 +5769,7 @@ draggable titlebars and borders.")
(assoc-ref %outputs "doc")
"/share/man")
"--disable-static"
- ;; Disable zero malloc check that fails when cross-compiling.
- ,@(if (%current-target-system)
- '("--disable-malloc0returnsnull")
- '()))))
+ ,@(malloc0-flags))))
(propagated-inputs
`(("libx11" ,libx11)
("libice" ,libice)
@@ -5644,7 +5787,7 @@ draggable titlebars and borders.")
(define-public libxaw
(package
(name "libxaw")
- (version "1.0.13")
+ (version "1.0.14")
(source
(origin
(method url-fetch)
@@ -5654,7 +5797,7 @@ draggable titlebars and borders.")
".tar.bz2"))
(sha256
(base32
- "1kdhxplwrn43d9jp3v54llp05kwx210lrsdvqb6944jp29rhdy4f"))))
+ "13kg59r3086383g1dyhnwxanhp2frssh9062mrgn34nzlf7gkbkn"))))
(build-system gnu-build-system)
(arguments
'(#:configure-flags '("--disable-static")))
@@ -6422,7 +6565,8 @@ basic eye-candy effects.")
;; The trailing -- is intentional, so we only replace it inside
;; a command line.
(("dbus-launch --")
- (string-append (assoc-ref inputs "dbus") "/bin/dbus-launch --")))
+ (string-append (search-input-file inputs "/bin/dbus-launch")
+ " --")))
;; /run/user does not exist on guix system
(substitute* "./xpra/scripts/config.py"
(("socket-dir.*: \"\",")
@@ -6535,6 +6679,10 @@ and embedded platforms.")
`(("gtk" ,gtk+)
("gtk" ,gtk+-2)
,@(package-inputs uim)))
+ (arguments
+ (substitute-keyword-arguments (package-arguments uim)
+ ((#:configure-flags configure-flags)
+ (append configure-flags (list "CFLAGS=-O2 -g -fcommon")))))
(synopsis "Multilingual input method framework (GTK+ support)")))
(define-public uim-qt
@@ -6548,7 +6696,8 @@ and embedded platforms.")
(substitute-keyword-arguments (package-arguments uim)
((#:configure-flags configure-flags)
(append configure-flags (list "--with-qt5-immodule"
- "--with-qt5")))))
+ "--with-qt5"
+ "CPPFLAGS=-fcommon")))))
(synopsis "Multilingual input method framework (Qt support)")))
(define-public keynav
diff --git a/gnu/services.scm b/gnu/services.scm
index 1655218f2d..68fa4ebb63 100644
--- a/gnu/services.scm
+++ b/gnu/services.scm
@@ -319,7 +319,13 @@ the resulting list of services. Each clause must have the form:
where TYPE is a service type, such as 'guix-service-type', and VARIABLE is an
identifier that is bound within BODY to the value of the service of that
-TYPE. Consider this example:
+TYPE.
+
+Clauses can also remove services of a given type:
+
+ (delete TYPE)
+
+Consider this example:
(modify-services %base-services
(guix-service-type config =>
diff --git a/gnu/services/cups.scm b/gnu/services/cups.scm
index d965014cd8..2e86845e51 100644
--- a/gnu/services/cups.scm
+++ b/gnu/services/cups.scm
@@ -419,6 +419,9 @@ queues. The URI @url{file:///dev/null} is always allowed.")
(string "lp")
"Specifies the group name or ID that will be used when executing external
programs.")
+ (log-file-group
+ (string "lpadmin")
+ "Specifies the group name or ID that will be used for log files.")
(log-file-perm
(string "0644")
"Specifies the permissions for all log files that the scheduler writes.")
diff --git a/gnu/services/databases.scm b/gnu/services/databases.scm
index 8e983ef0be..39225a4bd6 100644
--- a/gnu/services/databases.scm
+++ b/gnu/services/databases.scm
@@ -116,7 +116,7 @@ host all all ::1/128 md5"))
(ident-file postgresql-config-file-ident-file
(default %default-postgres-ident))
(socket-directory postgresql-config-file-socket-directory
- (default #false))
+ (default "/var/run/postgresql"))
(extra-config postgresql-config-file-extra-config
(default '())))
@@ -364,7 +364,7 @@ and stores the database cluster in @var{data-directory}."
postgresql-role-configuration make-postgresql-role-configuration
postgresql-role-configuration?
(host postgresql-role-configuration-host ;string
- (default "/tmp"))
+ (default "/var/run/postgresql"))
(log postgresql-role-configuration-log ;string
(default "/var/log/postgresql_roles.log"))
(roles postgresql-role-configuration-roles
diff --git a/gnu/services/dbus.scm b/gnu/services/dbus.scm
index ddb20bd0bb..85a4c3ec9a 100644
--- a/gnu/services/dbus.scm
+++ b/gnu/services/dbus.scm
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2019, 2020 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2019, 2020, 2021 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2015 Sou Bunnbu <iyzsong@gmail.com>
;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be>
;;; Copyright © 2021 Brice Waegeneire <brice@waegenei.re>
@@ -301,10 +301,19 @@ tuples, are all set as environment variables when the bus daemon launches it."
polkit-configuration make-polkit-configuration
polkit-configuration?
(polkit polkit-configuration-polkit ;file-like
- (default polkit))
+ (default %default-polkit))
(actions polkit-configuration-actions ;list of file-like
(default '())))
+(define %default-polkit
+ ;; The default polkit package.
+ (let-system (system target)
+ ;; Since mozjs depends on Rust, which is currently x86_64-only, use
+ ;; polkit-duktape on other systems.
+ (if (string-prefix? "x86_64-" (or target system))
+ polkit-mozjs
+ polkit-duktape)))
+
(define %polkit-accounts
(list (user-group (name "polkitd") (system? #t))
(user-account
diff --git a/gnu/services/desktop.scm b/gnu/services/desktop.scm
index 64d0e85301..c6761ca784 100644
--- a/gnu/services/desktop.scm
+++ b/gnu/services/desktop.scm
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2014, 2015, 2016, 2017, 2018, 2019, 2020 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2014-2021 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2015 Andy Wingo <wingo@igalia.com>
;;; Copyright © 2015 Mark H Weaver <mhw@netris.org>
;;; Copyright © 2016 Sou Bunnbu <iyzsong@gmail.com>
@@ -40,6 +40,7 @@
#:use-module (gnu services sound)
#:use-module ((gnu system file-systems)
#:select (%elogind-file-systems file-system))
+ #:autoload (gnu services sddm) (sddm-service-type)
#:use-module (gnu system)
#:use-module (gnu system setuid)
#:use-module (gnu system shadow)
@@ -1021,7 +1022,7 @@ rules."
(use-modules (guix build utils))
(let ((directory "/tmp/.X11-unix"))
(mkdir-p directory)
- (chmod directory #o777))))))
+ (chmod directory #o1777))))))
;;;
;;; Enlightenment desktop service.
@@ -1187,9 +1188,17 @@ or setting its password with passwd.")))
;;; The default set of desktop services.
;;;
-(define %desktop-services
+(define* (desktop-services-for-system #:optional
+ (system (or (%current-target-system)
+ (%current-system))))
;; List of services typically useful for a "desktop" use case.
- (cons* (service gdm-service-type)
+
+ ;; Since GDM depends on Rust (gdm -> gnome-shell -> gjs -> mozjs -> rust)
+ ;; and Rust is currently unavailable on non-x86_64 platforms, default to
+ ;; SDDM there (FIXME).
+ (cons* (if (string-prefix? "x86_64" system)
+ (service gdm-service-type)
+ (service sddm-service-type))
;; Screen lockers are a pretty useful thing and these are small.
(screen-locker-service slock)
@@ -1248,4 +1257,7 @@ or setting its password with passwd.")))
%base-services))
+(define-syntax %desktop-services
+ (identifier-syntax (desktop-services-for-system)))
+
;;; desktop.scm ends here
diff --git a/gnu/services/xorg.scm b/gnu/services/xorg.scm
index 47d50e48da..82a7d25602 100644
--- a/gnu/services/xorg.scm
+++ b/gnu/services/xorg.scm
@@ -10,6 +10,7 @@
;;; Copyright © 2020 Alex Griffin <a@ajgrf.com>
;;; Copyright © 2021 Brice Waegeneire <brice@waegenei.re>
;;; Copyright © 2021 Oleg Pykhalov <go.wigust@gmail.com>
+;;; Copyright © 2021 Josselin Poiret <josselin.poiret@protonmail.ch>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -48,6 +49,7 @@
#:use-module (gnu packages admin)
#:use-module (gnu packages bash)
#:use-module (gnu system shadow)
+ #:use-module (guix build-system glib-or-gtk)
#:use-module (guix build-system trivial)
#:use-module (guix gexp)
#:use-module (guix store)
@@ -869,6 +871,24 @@ the GNOME desktop environment.")
(apply execl (string-append #$dbus "/bin/dbus-daemon")
(program-arguments)))))
+;; Wrapper script for Wayland sessions, similar to Xsession.
+;;
+;; See `xinitrc`. By default, it launches the specified session through a
+;; login shell. With the default Guix configuration, this should source
+;; /etc/profile, setting up the Guix profile environment variables. However,
+;; gdm launches its own graphical session through the same method, so we need
+;; to ignore this case, since `gdm` doesn't have a login shell.
+(define gdm-wayland-session-wrapper
+ (program-file
+ "gdm-wayland-session-wrapper"
+ #~((let* ((user (getpw (getuid)))
+ (name (passwd:name user))
+ (shell (passwd:shell user))
+ (args (cdr (command-line))))
+ (if (string=? name "gdm")
+ (apply execl (cons (car args) args))
+ (execl shell shell "--login" "-c" (string-join args)))))))
+
(define-record-type* <gdm-configuration>
gdm-configuration make-gdm-configuration
gdm-configuration?
@@ -883,7 +903,10 @@ the GNOME desktop environment.")
(xorg-configuration gdm-configuration-xorg
(default (xorg-configuration)))
(x-session gdm-configuration-x-session
- (default (xinitrc))))
+ (default (xinitrc)))
+ (wayland? gdm-configuration-wayland? (default #f))
+ (wayland-session gdm-configuration-wayland-session
+ (default gdm-wayland-session-wrapper)))
(define (gdm-configuration-file config)
(mixed-text-file "gdm-custom.conf"
@@ -909,8 +932,9 @@ the GNOME desktop environment.")
;; See also
;; <https://debbugs.gnu.org/cgi/bugreport.cgi?bug=39281>.
"InitialSetupEnable=false\n"
- ;; Enable me once X is working.
- "WaylandEnable=false\n"
+ "WaylandEnable=" (if (gdm-configuration-wayland? config)
+ "true"
+ "false") "\n"
"\n"
"[debug]\n"
"Enable=" (if (gdm-configuration-debug? config)
@@ -976,7 +1000,17 @@ the GNOME desktop environment.")
;; can depend on GNOME Shell directly.
(cons #$gnome-shell
'#$(gdm-configuration-gnome-shell-assets
- config)))))))))
+ config)))))
+ ;; Add XCURSOR_PATH so that mutter can find its
+ ;; cursors. gdm doesn't login so doesn't source
+ ;; the corresponding line in /etc/profile.
+ "XCURSOR_PATH=/run/current-system/profile/share/icons"
+ (string-append
+ "GDK_PIXBUF_MODULE_FILE="
+ #$gnome-shell "/" #$%gdk-pixbuf-loaders-cache-file)
+ (string-append
+ "GDM_WAYLAND_SESSION="
+ #$(gdm-configuration-wayland-session config))))))
(stop #~(make-kill-destructor))
(respawn? #t))))
diff --git a/gnu/system.scm b/gnu/system.scm
index 9de0f79b44..088c62ddde 100644
--- a/gnu/system.scm
+++ b/gnu/system.scm
@@ -170,6 +170,7 @@
%setuid-programs
%sudoers-specification
%base-packages
+ %base-packages-artwork
%base-packages-interactive
%base-packages-linux
%base-packages-networking
@@ -266,6 +267,7 @@
(default (operating-system-default-essential-services
this-operating-system)))
(services operating-system-user-services ; list of services
+ (thunked) ;allow for system-dependent services
(default %base-services))
(pam-services operating-system-pam-services ; list of PAM services
@@ -789,6 +791,10 @@ of PROVENANCE-SERVICE-TYPE to its services."
(list ath9k-htc-firmware
openfwwf-firmware))
+(define %base-packages-artwork
+ ;; Default set of artwork packages.
+ (list guix-icons))
+
(define %base-packages-utils
;; Default set of utilities packages.
(cons* procps psmisc which
@@ -850,6 +856,7 @@ of PROVENANCE-SERVICE-TYPE to its services."
;; Default set of packages globally visible. It should include anything
;; required for basic administrator tasks.
(append (list e2fsprogs)
+ %base-packages-artwork
%base-packages-interactive
%base-packages-linux
%base-packages-networking
@@ -881,6 +888,19 @@ syntactically correct."
"--check" "--file" #$file)
(copy-file #$file #$output)))))
+(define (os-release)
+ (plain-file "os-release"
+ "\
+NAME=\"Guix System\"
+ID=guix
+PRETTY_NAME=\"Guix System\"
+LOGO=guix-icon
+HOME_URL=\"https://guix.gnu.org\"
+DOCUMENTATION_URL=\"https://guix.gnu.org/en/manual\"
+SUPPORT_URL=\"https://guix.gnu.org/en/help\"
+BUG_REPORT_URL=\"https://lists.gnu.org/mailman/listinfo/bug-guix\"
+"))
+
(define* (operating-system-etc-service os)
"Return a <service> that builds a directory containing the static part of
the /etc directory."
@@ -986,7 +1006,8 @@ then
source /run/current-system/profile/etc/profile.d/bash_completion.sh
fi\n")))
(etc-service
- `(("services" ,(file-append net-base "/etc/services"))
+ `(("os-release" ,#~#$(os-release))
+ ("services" ,(file-append net-base "/etc/services"))
("protocols" ,(file-append net-base "/etc/protocols"))
("rpc" ,(file-append net-base "/etc/rpc"))
("login.defs" ,#~#$login.defs)
diff --git a/gnu/system/locale.scm b/gnu/system/locale.scm
index 18bbe5ba32..dcbc93e3bf 100644
--- a/gnu/system/locale.scm
+++ b/gnu/system/locale.scm
@@ -147,8 +147,7 @@ data format changes between libc versions."
(define %default-locale-libcs
;; The libcs for which we build locales by default.
- ;; List the previous and current libc to ease transition.
- (list glibc))
+ (list glibc-2.31 glibc))
(define %default-locale-definitions
;; Arbitrary set of locales that are built by default. They are here mostly
diff --git a/gnu/system/shadow.scm b/gnu/system/shadow.scm
index 7c57222716..59f0a02c8b 100644
--- a/gnu/system/shadow.scm
+++ b/gnu/system/shadow.scm
@@ -3,6 +3,7 @@
;;; Copyright © 2016 Alex Griffin <a@ajgrf.com>
;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
;;; Copyright © 2020 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2020 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -164,7 +165,12 @@ XTerm*utf8: always
XTerm*metaSendsEscape: true\n"))
(gdbinit (plain-file "gdbinit" "\
# Tell GDB where to look for separate debugging files.
-set debug-file-directory ~/.guix-profile/lib/debug
+guile
+(use-modules (gdb))
+(execute (string-append \"set debug-file-directory \"
+ (or (getenv \"GDB_DEBUG_FILE_DIRECTORY\")
+ \"~/.guix-profile/lib/debug\")))
+end
# Authorize extensions found in the store, such as the
# pretty-printers of libstdc++.
diff --git a/gnu/system/vm.scm b/gnu/system/vm.scm
index f1541cf30c..2487539b61 100644
--- a/gnu/system/vm.scm
+++ b/gnu/system/vm.scm
@@ -538,7 +538,7 @@ the operating system."
;; Even as root in a VM, the initializer would fail due to
;; lack of privileges if we use a root-directory that is on
;; a file system that is shared with the host (e.g., /tmp).
- (root-directory "/guixsd-system-root"))
+ (root-directory "/guix-system-root"))
(set-path-environment-variable "PATH" '("bin" "sbin") '(#+tar))
(mkdir root-directory)
(initialize root-directory)
@@ -708,8 +708,8 @@ with '-virtfs' options for the host file systems listed in SHARED-FS."
'())
"-no-reboot"
- "-object" "rng-random,filename=/dev/urandom,id=guixsd-vm-rng"
- "-device" "virtio-rng-pci,rng=guixsd-vm-rng"
+ "-object" "rng-random,filename=/dev/urandom,id=guix-vm-rng"
+ "-device" "virtio-rng-pci,rng=guix-vm-rng"
#$@(map virtfs-option shared-fs)
(format #f "-drive file=~a,if=virtio,cache=writeback,werror=report,readonly=on"
@@ -787,7 +787,7 @@ it is mostly useful when FULL-BOOT? is true."
virtual-machine?
(operating-system virtual-machine-operating-system) ;<operating-system>
(qemu virtual-machine-qemu ;<package>
- (default qemu))
+ (default qemu-minimal))
(graphic? virtual-machine-graphic? ;Boolean
(default #f))
(memory-size virtual-machine-memory-size ;integer (MiB)
diff --git a/gnu/tests/audio.scm b/gnu/tests/audio.scm
index 7bf7d4ef14..8aa6d1e818 100644
--- a/gnu/tests/audio.scm
+++ b/gnu/tests/audio.scm
@@ -48,9 +48,7 @@
(define marionette
(make-marionette (list #$vm)))
- (mkdir #$output)
- (chdir #$output)
-
+ (test-runner-current (system-test-runner #$output))
(test-begin "mpd")
(test-assert "service is running"
@@ -70,8 +68,7 @@
'(system* #$(file-append mpd-mpc "/bin/mpc"))
marionette))
- (test-end)
- (exit (= (test-runner-fail-count (test-runner-current)) 0)))))
+ (test-end))))
(gexp->derivation "mpd-test" test))
(define %test-mpd
diff --git a/gnu/tests/base.scm b/gnu/tests/base.scm
index 9429a10b75..38d4317e52 100644
--- a/gnu/tests/base.scm
+++ b/gnu/tests/base.scm
@@ -87,6 +87,7 @@ Otherwise assume that there is no password for root."
(use-modules (gnu build marionette)
(guix build syscalls)
(srfi srfi-1)
+ (srfi srfi-19)
(srfi srfi-26)
(srfi srfi-64)
(ice-9 match))
@@ -94,9 +95,7 @@ Otherwise assume that there is no password for root."
(define marionette
(make-marionette #$command))
- (mkdir #$output)
- (chdir #$output)
-
+ (test-runner-current (system-test-runner #$output))
(test-begin "basic")
#$(and initialization
@@ -198,6 +197,16 @@ info --version")
(pk 'services services)
'(root #$@(operating-system-shepherd-service-names os)))))
+ (test-equal "libc honors /etc/localtime"
+ -7200 ;CEST = GMT+2
+ ;; Assume OS is configured to have a CEST timezone.
+ (let* ((sept-2021 (time-second
+ (date->time-utc
+ (make-date 0 0 00 12 01 09 2021 7200)))))
+ (marionette-eval
+ `(tm:gmtoff (localtime ,sept-2021))
+ marionette)))
+
(test-equal "/var/log/messages is not world-readable"
#o640 ;<https://bugs.gnu.org/40405>
(begin
@@ -486,10 +495,11 @@ info --version")
(test-assert "screendump"
(begin
- (marionette-control (string-append "screendump " #$output
- "/tty1.ppm")
- marionette)
- (file-exists? "tty1.ppm")))
+ (let ((capture
+ (string-append #$output "/tty1.ppm")))
+ (marionette-control
+ (string-append "screendump " capture) marionette)
+ (file-exists? capture))))
(test-assert "screen text"
(let ((text (marionette-screen-text marionette
@@ -505,8 +515,7 @@ info --version")
"root@"
#$(operating-system-host-name os))))))
- (test-end)
- (exit (= (test-runner-fail-count (test-runner-current)) 0)))))
+ (test-end))))
(gexp->derivation name test))
@@ -642,9 +651,7 @@ in a loop. See <http://bugs.gnu.org/26931>.")
(define marionette
(make-marionette (list #$(virtual-machine os))))
- (mkdir #$output)
- (chdir #$output)
-
+ (test-runner-current (system-test-runner #$output))
(test-begin "cleanup")
(test-assert "dirty service worked"
@@ -657,8 +664,7 @@ in a loop. See <http://bugs.gnu.org/26931>.")
(scandir "/tmp"))
marionette))
- (test-end)
- (exit (= (test-runner-fail-count (test-runner-current)) 0)))))
+ (test-end))))
(gexp->derivation "cleanup" test))
@@ -713,9 +719,7 @@ non-ASCII names from /tmp.")
(define marionette
(make-marionette (list #$(virtual-machine os))))
- (mkdir #$output)
- (chdir #$output)
-
+ (test-runner-current (system-test-runner #$output))
(test-begin "mcron")
(test-assert "service running"
@@ -752,8 +756,7 @@ non-ASCII names from /tmp.")
result)
marionette))
- (test-end)
- (exit (= (test-runner-fail-count (test-runner-current)) 0)))))
+ (test-end))))
(gexp->derivation name test))
@@ -824,6 +827,7 @@ non-ASCII names from /tmp.")
(mkdir #$output)
(chdir #$output)
+ (test-runner-current (system-test-runner))
(test-begin "avahi")
(test-assert "nscd PID file is created"
@@ -902,8 +906,7 @@ non-ASCII names from /tmp.")
(= (hostent:addrtype result) AF_INET)))))
- (test-end)
- (exit (= (test-runner-fail-count (test-runner-current)) 0)))))
+ (test-end))))
(gexp->derivation "nss-mdns" test))
diff --git a/gnu/tests/ci.scm b/gnu/tests/ci.scm
index a8b39fcd01..5294514c66 100644
--- a/gnu/tests/ci.scm
+++ b/gnu/tests/ci.scm
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2017 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2017, 2021 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2017, 2018, 2019, 2020, 2021 Christopher Baines <mail@cbaines.net>
;;; Copyright © 2017, 2018 Clément Lassieur <clement@lassieur.org>
;;; Copyright © 2018 Pierre-Antoine Rouby <pierre-antoine.rouby@inria.fr>
@@ -70,9 +70,7 @@ HTTP-PORT."
;; port 8080 in the host.
(make-marionette (list #$vm)))
- (mkdir #$output)
- (chdir #$output)
-
+ (test-runner-current (system-test-runner #$output))
(test-begin "laminar")
(test-assert "service running"
@@ -116,8 +114,7 @@ HTTP-PORT."
#:times 10
#:delay 5))
- (test-end)
- (exit (= (test-runner-fail-count (test-runner-current)) 0)))))
+ (test-end))))
(gexp->derivation "laminar-test" test))
diff --git a/gnu/tests/cups.scm b/gnu/tests/cups.scm
index 4e922e5023..4c7d78b7c8 100644
--- a/gnu/tests/cups.scm
+++ b/gnu/tests/cups.scm
@@ -54,9 +54,7 @@
(define marionette
(make-marionette (list #$vm)))
- (mkdir #$output)
- (chdir #$output)
-
+ (test-runner-current (system-test-runner #$output))
(test-begin "cups")
;; Wait for the web interface to become ready.
@@ -80,8 +78,7 @@
#:decode-body? #t)))
(response-code response)))
- (test-end)
- (exit (= (test-runner-fail-count (test-runner-current)) 0)))))
+ (test-end))))
(gexp->derivation "cups-test" test))
diff --git a/gnu/tests/databases.scm b/gnu/tests/databases.scm
index c8d11e10c0..a20de1a8c7 100644
--- a/gnu/tests/databases.scm
+++ b/gnu/tests/databases.scm
@@ -61,9 +61,7 @@
(define marionette
(make-marionette (list #$vm)))
- (mkdir #$output)
- (chdir #$output)
-
+ (test-runner-current (system-test-runner #$output))
(test-begin "memcached")
;; Wait for memcached to be up and running.
@@ -115,8 +113,7 @@
'(file-exists? "/var/log/memcached")
marionette))
- (test-end)
- (exit (= (test-runner-fail-count (test-runner-current)) 0)))))
+ (test-end))))
(gexp->derivation "memcached-test" test))
@@ -179,9 +176,7 @@
(define marionette
(make-marionette (list #$vm)))
- (mkdir #$output)
- (chdir #$output)
-
+ (test-runner-current (system-test-runner #$output))
(test-begin "postgresql")
(test-assert "service running"
@@ -233,16 +228,14 @@
(let* ((port (open-pipe*
OPEN_READ
#$(file-append postgresql "/bin/psql")
- "-tAh" "/tmp"
- "-c" "SELECT 1 FROM pg_database WHERE
+ "-tA" "-c" "SELECT 1 FROM pg_database WHERE
datname='root'"))
(output (get-string-all port)))
(close-pipe port)
(string-contains output "1")))
marionette))
- (test-end)
- (exit (= (test-runner-fail-count (test-runner-current)) 0)))))
+ (test-end))))
(gexp->derivation "postgresql-test" test))
@@ -283,9 +276,7 @@
(define marionette
(make-marionette (list #$vm)))
- (mkdir #$output)
- (chdir #$output)
-
+ (test-runner-current (system-test-runner #$output))
(test-begin "mysql")
(test-assert "service running"
@@ -341,8 +332,7 @@
output))
marionette))
- (test-end)
- (exit (= (test-runner-fail-count (test-runner-current)) 0)))))
+ (test-end))))
(gexp->derivation "mysql-test" test))
diff --git a/gnu/tests/desktop.scm b/gnu/tests/desktop.scm
index 6aa22fd49b..57069c0ede 100644
--- a/gnu/tests/desktop.scm
+++ b/gnu/tests/desktop.scm
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2017 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2017, 2021 Ludovic Courtès <ludo@gnu.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -43,9 +43,7 @@
(define marionette
(make-marionette '(#$vm)))
- (mkdir #$output)
- (chdir #$output)
-
+ (test-runner-current (system-test-runner #$output))
(test-begin "elogind")
;; Log in as root on tty1, and check what 'loginctl' returns.
@@ -83,8 +81,7 @@
(guest-file "/root/seats")
(guest-file "/root/users")))))
- (test-end)
- (exit (= (test-runner-fail-count (test-runner-current)) 0)))))
+ (test-end))))
(gexp->derivation "elogind" test))
diff --git a/gnu/tests/dict.scm b/gnu/tests/dict.scm
index c50e3cd6da..4d9702360c 100644
--- a/gnu/tests/dict.scm
+++ b/gnu/tests/dict.scm
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2017, 2018 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2017, 2018, 2021 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2018 Clément Lassieur <clement@lassieur.org>
;;;
;;; This file is part of GNU Guix.
@@ -79,9 +79,7 @@
(define %dico-socket
(socket PF_INET SOCK_STREAM 0))
- (mkdir #$output)
- (chdir #$output)
-
+ (test-runner-current (system-test-runner #$output))
(test-begin "dicod")
;; Wait for the service to be started.
@@ -117,8 +115,7 @@
(string-contains result "hello")
result))))
- (test-end)
- (exit (= (test-runner-fail-count (test-runner-current)) 0)))))
+ (test-end))))
(gexp->derivation "dicod" test))
diff --git a/gnu/tests/docker.scm b/gnu/tests/docker.scm
index 92611b0a8d..bc119988b7 100644
--- a/gnu/tests/docker.scm
+++ b/gnu/tests/docker.scm
@@ -76,9 +76,7 @@ inside %DOCKER-OS."
(define marionette
(make-marionette (list #$vm)))
- (mkdir #$output)
- (chdir #$output)
-
+ (test-runner-current (system-test-runner #$output))
(test-begin "docker")
(test-assert "service running"
@@ -143,8 +141,7 @@ inside %DOCKER-OS."
(string->number response4))))
marionette))
- (test-end)
- (exit (= (test-runner-fail-count (test-runner-current)) 0)))))
+ (test-end))))
(gexp->derivation "docker-test" test))
@@ -221,9 +218,7 @@ inside %DOCKER-OS."
(define marionette
(make-marionette (list #$vm)))
- (mkdir #$output)
- (chdir #$output)
-
+ (test-runner-current (system-test-runner #$output))
(test-begin "docker")
(test-assert "service running"
@@ -288,8 +283,7 @@ inside %DOCKER-OS."
"status" "guix-daemon")))
marionette))
- (test-end)
- (exit (= (test-runner-fail-count (test-runner-current)) 0)))))
+ (test-end))))
(gexp->derivation "docker-system-test" test))
diff --git a/gnu/tests/file-sharing.scm b/gnu/tests/file-sharing.scm
index 9a8ee6a593..d1343e2eba 100644
--- a/gnu/tests/file-sharing.scm
+++ b/gnu/tests/file-sharing.scm
@@ -91,9 +91,7 @@
(port-forwardings
`((9091 . ,%transmission-daemon-rpc-port)))))))
- (mkdir #$output)
- (chdir #$output)
-
+ (test-runner-current (system-test-runner #$output))
(test-begin "transmission-daemon")
;; Make sure the "transmission" user and group have been created.
@@ -259,8 +257,7 @@
"--auth" auth-string
"--session-info"))))))
- (test-end)
- (exit (= (test-runner-fail-count (test-runner-current)) 0)))))
+ (test-end))))
(gexp->derivation "transmission-daemon-test" test))
diff --git a/gnu/tests/ganeti.scm b/gnu/tests/ganeti.scm
index c29b885a5e..f647e9554c 100644
--- a/gnu/tests/ganeti.scm
+++ b/gnu/tests/ganeti.scm
@@ -112,9 +112,7 @@
(define marionette
(make-marionette (list #$vm)))
- (mkdir #$output)
- (chdir #$output)
-
+ (test-runner-current (system-test-runner #$output))
(test-begin "ganeti")
;; Ganeti uses the Shepherd to start/stop daemons, so make sure
@@ -244,8 +242,7 @@
"destroy" "--yes-do-it"))
marionette))
- (test-end)
- (exit (= (test-runner-fail-count (test-runner-current)) 0)))))
+ (test-end))))
(gexp->derivation (string-append "ganeti-" hypervisor "-test") test))
diff --git a/gnu/tests/guix.scm b/gnu/tests/guix.scm
index af7d8f0b21..69cac7c1aa 100644
--- a/gnu/tests/guix.scm
+++ b/gnu/tests/guix.scm
@@ -74,9 +74,7 @@
(define marionette
(make-marionette (list #$vm)))
- (mkdir #$output)
- (chdir #$output)
-
+ (test-runner-current (system-test-runner #$output))
(test-begin "guix-build-coordinator")
(test-assert "service running"
@@ -99,8 +97,7 @@
#:decode-body? #t)))
(response-code response)))
- (test-end)
- (exit (= (test-runner-fail-count (test-runner-current)) 0)))))
+ (test-end))))
(gexp->derivation "guix-build-coordinator-test" test))
@@ -199,9 +196,7 @@ host all all ::1/128 trust"))))))
(define marionette
(make-marionette (list #$vm)))
- (mkdir #$output)
- (chdir #$output)
-
+ (test-runner-current (system-test-runner #$output))
(test-begin "guix-data-service")
(test-assert "service running"
@@ -235,8 +230,7 @@ host all all ::1/128 trust"))))))
#:decode-body? #t)))
(response-code response)))
- (test-end)
- (exit (= (test-runner-fail-count (test-runner-current)) 0)))))
+ (test-end))))
(gexp->derivation "guix-data-service-test" test))
diff --git a/gnu/tests/install.scm b/gnu/tests/install.scm
index 38785ae0bd..9602efebe7 100644
--- a/gnu/tests/install.scm
+++ b/gnu/tests/install.scm
@@ -925,7 +925,7 @@ reboot\n")
(operating-system
(host-name "bootroot")
- (timezone "Europe/Madrid")
+ (timezone "Europe/Paris")
(locale "en_US.UTF-8")
(bootloader (bootloader-configuration
@@ -1168,7 +1168,7 @@ RAID-0 (stripe) root partition.")
(operating-system
(host-name "hurd")
- (timezone "America/Montreal")
+ (timezone "Europe/Paris")
(locale "en_US.UTF-8")
(bootloader (bootloader-configuration
(bootloader grub-bootloader)
@@ -1679,9 +1679,12 @@ build (current-guix) and then store a couple of full system images.")
;; encryption support. The installer produces a UUID for the partition;
;; this "UUID" is explicitly set in 'gui-test-program' to the value shown
;; below.
- (swap-devices (if encrypted?
- '()
- (list (uuid "11111111-2222-3333-4444-123456789abc"))))
+ (swap-devices
+ (if encrypted?
+ '()
+ (list
+ (swap-space
+ (target (uuid "11111111-2222-3333-4444-123456789abc"))))))
(services (cons (service dhcp-client-service-type)
(operating-system-user-services %minimal-os-on-vda)))))
diff --git a/gnu/tests/ldap.scm b/gnu/tests/ldap.scm
index 197c1bfb28..d5403b3539 100644
--- a/gnu/tests/ldap.scm
+++ b/gnu/tests/ldap.scm
@@ -69,9 +69,7 @@
(define marionette
(make-marionette (list #$vm)))
- (mkdir #$output)
- (chdir #$output)
-
+ (test-runner-current (system-test-runner #$output))
(test-begin "ldap")
;; Set up LDAP directory server
@@ -148,8 +146,7 @@ suffix = dc=example,dc=com")))
#$(file-append coreutils "/bin/true")))
marionette))
- (test-end)
- (exit (= (test-runner-fail-count (test-runner-current)) 0)))))
+ (test-end))))
(gexp->derivation "ldap-test" test))
diff --git a/gnu/tests/linux-modules.scm b/gnu/tests/linux-modules.scm
index fc8945b77f..69cb013267 100644
--- a/gnu/tests/linux-modules.scm
+++ b/gnu/tests/linux-modules.scm
@@ -76,23 +76,26 @@ that MODULES are actually loaded."
(marionette-operating-system
base-os
#:imported-modules '((guix combinators))))
+
(define vm (virtual-machine os))
+
(define (test script)
(with-imported-modules '((gnu build marionette))
#~(begin
(use-modules (gnu build marionette)
(srfi srfi-64))
+
(define marionette
(make-marionette (list #$vm)))
- (mkdir #$output)
- (chdir #$output)
+
+ (test-runner-current (system-test-runner #$output))
(test-begin "loadable-kernel-modules")
(test-assert "script successfully evaluated"
(marionette-eval
'(primitive-load #$script)
marionette))
- (test-end)
- (exit (= (test-runner-fail-count (test-runner-current)) 0)))))
+ (test-end))))
+
(gexp->derivation "loadable-kernel-modules"
(test (modules-loaded?-program os module-names))))
diff --git a/gnu/tests/mail.scm b/gnu/tests/mail.scm
index eb8952b33a..f13751b72f 100644
--- a/gnu/tests/mail.scm
+++ b/gnu/tests/mail.scm
@@ -1,7 +1,7 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2016 Sou Bunnbu <iyzsong@member.fsf.org>
;;; Copyright © 2017 Carlo Zancanaro <carlo@zancanaro.id.au>
-;;; Copyright © 2017, 2020 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2017, 2020, 2021 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2018 Oleg Pykhalov <go.wigust@gmail.com>
;;; Copyright © 2018 Clément Lassieur <clement@lassieur.org>
;;; Copyright © 2019 Christopher Baines <mail@cbaines.net>
@@ -85,9 +85,7 @@ match from any for local action inbound
code
(read-reply-code port))))
- (mkdir #$output)
- (chdir #$output)
-
+ (test-runner-current (system-test-runner #$output))
(test-begin "opensmptd")
(test-assert "service is running"
@@ -157,8 +155,7 @@ match from any for local action inbound
(sleep 1) (wait (- n 1))))))
marionette))
- (test-end)
- (exit (= (test-runner-fail-count (test-runner-current)) 0)))))
+ (test-end))))
(gexp->derivation "opensmtpd-test" test))
@@ -230,9 +227,7 @@ acl_check_data:
(define smtp (socket AF_INET SOCK_STREAM 0))
(define addr (make-socket-address AF_INET INADDR_LOOPBACK 1025))
- (mkdir #$output)
- (chdir #$output)
-
+ (test-runner-current (system-test-runner #$output))
(test-begin "exim")
(test-assert "service is running"
@@ -285,8 +280,7 @@ acl_check_data:
(lambda (x) (not (string-prefix? "." x))))))
marionette))
- (test-end)
- (exit (= (test-runner-fail-count (test-runner-current)) 0)))))
+ (test-end))))
(gexp->derivation "exim-test" test))
@@ -338,9 +332,7 @@ acl_check_data:
(define message "From: test@example.com\n\
Subject: Hello Nice to meet you!")
- (mkdir #$output)
- (chdir #$output)
-
+ (test-runner-current (system-test-runner #$output))
(test-begin "dovecot")
;; Wait for dovecot to be up and running.
@@ -399,8 +391,7 @@ Subject: Hello Nice to meet you!")
get-string-all)))))
marionette))
- (test-end)
- (exit (= (test-runner-fail-count (test-runner-current)) 0)))))
+ (test-end))))
(gexp->derivation "dovecot-test" test))
@@ -489,9 +480,7 @@ Subject: Hello Nice to meet you!")
(define message "From: test@example.com\n\
Subject: Hello Nice to meet you!")
- (mkdir #$output)
- (chdir #$output)
-
+ (test-runner-current (system-test-runner #$output))
(test-begin "getmail")
;; Wait for dovecot to be up and running.
@@ -577,8 +566,7 @@ Subject: Hello Nice to meet you!")
marionette)
message))
- (test-end)
- (exit (= (test-runner-fail-count (test-runner-current)) 0)))))
+ (test-end))))
(gexp->derivation "getmail-test" test))
diff --git a/gnu/tests/messaging.scm b/gnu/tests/messaging.scm
index 176e3d08cb..202a1c2f73 100644
--- a/gnu/tests/messaging.scm
+++ b/gnu/tests/messaging.scm
@@ -1,6 +1,6 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2017, 2018 Clément Lassieur <clement@lassieur.org>
-;;; Copyright © 2017, 2018 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2017, 2018, 2021 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2018 Efraim Flashner <efraim@flashner.co.il>
;;;
;;; This file is part of GNU Guix.
@@ -98,9 +98,7 @@
(else
(error "file didn't show up" file)))))
- (mkdir #$output)
- (chdir #$output)
-
+ (test-runner-current (system-test-runner #$output))
(test-begin "xmpp")
;; Wait for XMPP service to be up and running.
@@ -128,8 +126,7 @@
(system* freetalk-bin "-s" #$script.ft)
(host-wait-for-file #$witness)))
- (test-end)
- (exit (= (test-runner-fail-count (test-runner-current)) 0)))))
+ (test-end))))
(gexp->derivation name test))
@@ -191,9 +188,7 @@
(define marionette
(make-marionette (list #$vm)))
- (mkdir #$output)
- (chdir #$output)
-
+ (test-runner-current (system-test-runner #$output))
(test-begin "bitlbee")
(test-assert "service started"
@@ -231,8 +226,7 @@
(->bool (string-contains (pk 'message (read-line sock))
"BitlBee"))))
- (test-end)
- (exit (= (test-runner-fail-count (test-runner-current)) 0)))))
+ (test-end))))
(gexp->derivation "bitlbee-test" test))
@@ -264,9 +258,7 @@
(define marionette
(make-marionette (list #$vm)))
- (mkdir #$output)
- (chdir #$output)
-
+ (test-runner-current (system-test-runner #$output))
(test-begin "quassel")
(test-assert "service started"
@@ -281,8 +273,7 @@
'(file-exists? "/var/lib/quassel/quasselCert.pem")
marionette))
- (test-end)
- (exit (= (test-runner-fail-count (test-runner-current)) 0)))))
+ (test-end))))
(gexp->derivation "quassel-test" test))
diff --git a/gnu/tests/monitoring.scm b/gnu/tests/monitoring.scm
index 8630f5818c..ae0a8e0845 100644
--- a/gnu/tests/monitoring.scm
+++ b/gnu/tests/monitoring.scm
@@ -63,9 +63,7 @@
(define marionette
(make-marionette (list #$vm)))
- (mkdir #$output)
- (chdir #$output)
-
+ (test-runner-current (system-test-runner #$output))
(test-begin #$name)
(test-assert "prometheus-node-exporter running"
@@ -87,8 +85,7 @@
(http-get "http://localhost:8080")))
(response-code response))))
- (test-end)
- (exit (= (test-runner-fail-count (test-runner-current)) 0)))))
+ (test-end))))
(gexp->derivation (string-append name "-test") test))
@@ -165,9 +162,7 @@ cat ~a | sudo -u zabbix psql zabbix;
(define marionette
(make-marionette (list #$vm)))
- (mkdir #$output)
- (chdir #$output)
-
+ (test-runner-current (system-test-runner #$output))
(test-begin #$name)
;; XXX: Shepherd reads the config file *before* binding its control
@@ -296,9 +291,7 @@ zabbix||{}
(test-url "/")
(test-url "/does-not-exist" 404))
- (test-end)
-
- (exit (= (test-runner-fail-count (test-runner-current)) 0)))))
+ (test-end))))
(gexp->derivation (string-append name "-test") test))
diff --git a/gnu/tests/networking.scm b/gnu/tests/networking.scm
index 246e0a15fa..2bcc7f70dc 100644
--- a/gnu/tests/networking.scm
+++ b/gnu/tests/networking.scm
@@ -197,9 +197,7 @@ port 7, and a dict service on port 2628."
(define marionette
(make-marionette (list #$vm)))
- (mkdir #$output)
- (chdir #$output)
-
+ (test-runner-current (system-test-runner #$output))
(test-begin "inetd")
;; Make sure the PID file is created.
@@ -230,8 +228,7 @@ port 7, and a dict service on port 2628."
(close dict)
response)))
- (test-end)
- (exit (= (test-runner-fail-count (test-runner-current)) 0)))))
+ (test-end))))
(gexp->derivation "inetd-test" test))
@@ -304,9 +301,7 @@ port 7, and a dict service on port 2628."
(define marionette
(make-marionette (list #$(virtual-machine os))))
- (mkdir #$output)
- (chdir #$output)
-
+ (test-runner-current (system-test-runner #$output))
(test-begin "openvswitch")
;; Make sure the bridge is created.
@@ -356,8 +351,7 @@ port 7, and a dict service on port 2628."
(logand flags IFF_UP)))
marionette))
- (test-end)
- (exit (= (test-runner-fail-count (test-runner-current)) 0)))))
+ (test-end))))
(gexp->derivation "openvswitch-test" test))
@@ -421,9 +415,7 @@ subnet 192.168.1.0 netmask 255.255.255.0 {
(define marionette
(make-marionette (list #$(virtual-machine os))))
- (mkdir #$output)
- (chdir #$output)
-
+ (test-runner-current (system-test-runner #$output))
(test-begin "dhcpd")
(test-assert "pid file exists"
@@ -456,8 +448,7 @@ subnet 192.168.1.0 netmask 255.255.255.0 {
(current-services))))
marionette))
- (test-end)
- (exit (= (test-runner-fail-count (test-runner-current)) 0)))))
+ (test-end))))
(gexp->derivation "dhcpd-test" test))
@@ -516,9 +507,7 @@ subnet 192.168.1.0 netmask 255.255.255.0 {
(current-services))))
marionette))
- (mkdir #$output)
- (chdir #$output)
-
+ (test-runner-current (system-test-runner #$output))
(test-begin "tor")
;; Test the usual Tor service.
@@ -550,8 +539,7 @@ subnet 192.168.1.0 netmask 255.255.255.0 {
(wait-for-unix-socket "/var/run/tor/socks-sock"
marionette/unix-socks-socket)))
- (test-end)
- (exit (= (test-runner-fail-count (test-runner-current)) 0)))))
+ (test-end))))
(gexp->derivation "tor-test" test))
@@ -643,9 +631,7 @@ COMMIT
(loop (read-line in)))))))))
marionette))
- (mkdir #$output)
- (chdir #$output)
-
+ (test-runner-current (system-test-runner #$output))
(test-begin "iptables")
(test-equal "iptables-save dumps the same rules that were loaded"
@@ -674,8 +660,7 @@ COMMIT
;; marionette)
;; (wait-for-tcp-port inetd-echo-port marionette #:timeout 5)))
- (test-end)
- (exit (= (test-runner-fail-count (test-runner-current)) 0)))))
+ (test-end))))
(gexp->derivation "iptables" test))
@@ -739,9 +724,7 @@ COMMIT
marionette))
(marionette-eval '(use-modules (guix ipfs)) marionette)
- (mkdir #$output)
- (chdir #$output)
-
+ (test-runner-current (system-test-runner #$output))
(test-begin "ipfs")
;; Test the IPFS service.
@@ -761,8 +744,7 @@ COMMIT
test-bv
(read-contents (add-data test-bv)))
- (test-end)
- (exit (= (test-runner-fail-count (test-runner-current)) 0)))))
+ (test-end))))
(gexp->derivation "ipfs-test" test))
(define %test-ipfs
diff --git a/gnu/tests/nfs.scm b/gnu/tests/nfs.scm
index a0c091eadb..7b7dd8c360 100644
--- a/gnu/tests/nfs.scm
+++ b/gnu/tests/nfs.scm
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2016, 2017, 2020 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2016, 2017, 2020, 2021 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2016 John Darrington <jmd@gnu.org>
;;; Copyright © 2017 Mathieu Othacehe <m.othacehe@gmail.com>
;;; Copyright © 2017 Tobias Geerinckx-Rice <me@tobias.gr>
@@ -92,9 +92,7 @@
(error "Socket didn't show up: " ,file))))
marionette))
- (mkdir #$output)
- (chdir #$output)
-
+ (test-runner-current (system-test-runner #$output))
(test-begin "rpc-daemon")
;; Wait for the rpcbind daemon to be up and running.
@@ -130,8 +128,7 @@
'(zero? (system* "rpcinfo" "-p"))
marionette))
- (test-end)
- (exit (= (test-runner-fail-count (test-runner-current)) 0)))))
+ (test-end))))
(gexp->derivation name test))
@@ -198,9 +195,7 @@
(define marionette
(make-marionette (list #$(virtual-machine os))))
- (mkdir #$output)
- (chdir #$output)
-
+ (test-runner-current (system-test-runner #$output))
(test-begin "nfs-daemon")
(marionette-eval
'(begin
@@ -252,8 +247,7 @@
"nfs-server:/" "/remote" "-v"))
(file-exists? "/remote/hello")))
marionette))
- (test-end)
- (exit (= (test-runner-fail-count (test-runner-current)) 0)))))
+ (test-end))))
(gexp->derivation "nfs-server-test" test))
@@ -310,9 +304,7 @@ directories can be mounted.")
(use-modules (gnu build marionette)
(srfi srfi-64))
- (mkdir #$output)
- (chdir #$output)
-
+ (test-runner-current (system-test-runner #$output))
(test-begin "start-nfs-boot-test")
;;; Start up NFS server host.
@@ -401,8 +393,7 @@ directories can be mounted.")
(call-with-input-file "/export/mounts" display))
server-marionette)
- (test-end)
- (exit (= (test-runner-fail-count (test-runner-current)) 0)))))
+ (test-end))))
(gexp->derivation "nfs-root-fs-test" test))
diff --git a/gnu/tests/package-management.scm b/gnu/tests/package-management.scm
index 087eaf923e..fe897944d0 100644
--- a/gnu/tests/package-management.scm
+++ b/gnu/tests/package-management.scm
@@ -60,9 +60,7 @@
(define marionette
(make-marionette (list #$vm)))
- (mkdir #$output)
- (chdir #$output)
-
+ (test-runner-current (system-test-runner #$output))
(test-begin #$name)
;; XXX: Shepherd reads the config file *before* binding its control
@@ -105,9 +103,7 @@ derivation {
"guix-test.nix")))
marionette))
- (test-end)
-
- (exit (= (test-runner-fail-count (test-runner-current)) 0)))))
+ (test-end))))
(gexp->derivation (string-append name "-test") test))
diff --git a/gnu/tests/reconfigure.scm b/gnu/tests/reconfigure.scm
index 001b5d185a..2fd7c6854d 100644
--- a/gnu/tests/reconfigure.scm
+++ b/gnu/tests/reconfigure.scm
@@ -79,9 +79,7 @@ generation of the system profile."
entries)))
marionette))
- (mkdir #$output)
- (chdir #$output)
-
+ (test-runner-current (system-test-runner #$output))
(test-begin "switch-to-system")
(let ((generations-prior (system-generations marionette)))
@@ -112,8 +110,7 @@ generation of the system profile."
"jakob")
marionette)))
- (test-end)
- (exit (= (test-runner-fail-count (test-runner-current)) 0)))))
+ (test-end))))
(gexp->derivation "switch-to-system" (test (switch-system-program os))))
@@ -153,9 +150,7 @@ Shepherd (PID 1) by unloading obsolete services and loading new services."
(map live-service-canonical-name (current-services)))
marionette))
- (mkdir #$output)
- (chdir #$output)
-
+ (test-runner-current (system-test-runner #$output))
(test-begin "upgrade-services")
(let ((services-prior (running-services marionette)))
@@ -176,8 +171,7 @@ Shepherd (PID 1) by unloading obsolete services and loading new services."
(test-assert "script stopped obsolete service"
(not (memq 'dummy (running-services marionette)))))
- (test-end)
- (exit (= (test-runner-fail-count (test-runner-current)) 0)))))
+ (test-end))))
(gexp->derivation
"upgrade-services"
@@ -220,9 +214,7 @@ bootloader's configuration file."
(second (string-split (match:substring parameter) #\=)))
(list-matches "system=[^ ]*" grub-cfg))))
- (mkdir #$output)
- (chdir #$output)
-
+ (test-runner-current (system-test-runner #$output))
(test-begin "install-bootloader")
(test-assert "no prior menu entry for system generation"
@@ -236,8 +228,7 @@ bootloader's configuration file."
(test-assert "menu entry created for system generation"
(member #$os (generations-in-grub-cfg marionette)))
- (test-end)
- (exit (= (test-runner-fail-count (test-runner-current)) 0)))))
+ (test-end))))
(let* ((bootloader ((compose bootloader-configuration-bootloader
operating-system-bootloader)
diff --git a/gnu/tests/rsync.scm b/gnu/tests/rsync.scm
index 24e60d9d9d..91f2b41cec 100644
--- a/gnu/tests/rsync.scm
+++ b/gnu/tests/rsync.scm
@@ -54,9 +54,7 @@ PORT."
(define marionette
(make-marionette (list #$vm)))
- (mkdir #$output)
- (chdir #$output)
-
+ (test-runner-current (system-test-runner #$output))
(test-begin "rsync")
;; Wait for rsync to be up and running.
@@ -106,8 +104,7 @@ PORT."
(read-line port))))
marionette))
- (test-end)
- (exit (= (test-runner-fail-count (test-runner-current)) 0)))))
+ (test-end))))
(gexp->derivation "rsync-test" test))
diff --git a/gnu/tests/security-token.scm b/gnu/tests/security-token.scm
index 1169a4b9fd..07270c0bfd 100644
--- a/gnu/tests/security-token.scm
+++ b/gnu/tests/security-token.scm
@@ -44,9 +44,7 @@
(define marionette
(make-marionette (list #$(virtual-machine os))))
- (mkdir #$output)
- (chdir #$output)
-
+ (test-runner-current (system-test-runner #$output))
(test-begin "pcscd")
(test-assert "pcscd is alive"
@@ -59,8 +57,7 @@
(current-services))))
marionette))
- (test-end)
- (exit (= (test-runner-fail-count (test-runner-current)) 0)))))
+ (test-end))))
(gexp->derivation "pcscd" test))
diff --git a/gnu/tests/singularity.scm b/gnu/tests/singularity.scm
index 1fc2773a00..f4b9776b48 100644
--- a/gnu/tests/singularity.scm
+++ b/gnu/tests/singularity.scm
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2019 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2019, 2021 Ludovic Courtès <ludo@gnu.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -72,9 +72,7 @@
(define marionette
(make-marionette (list #$(virtual-machine os))))
- (mkdir #$output)
- (chdir #$output)
-
+ (test-runner-current (system-test-runner #$output))
(test-begin "singularity")
(test-assert "singularity exec /bin/guile (as root)"
@@ -126,8 +124,7 @@
"--debug" "run" #$image "-c" "(use-modules (json))"))
marionette))
- (test-end)
- (exit (= (test-runner-fail-count (test-runner-current)) 0)))))
+ (test-end))))
(gexp->derivation "singularity-test" test))
diff --git a/gnu/tests/ssh.scm b/gnu/tests/ssh.scm
index 10438ad22a..791ff7b73f 100644
--- a/gnu/tests/ssh.scm
+++ b/gnu/tests/ssh.scm
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2016, 2017, 2018, 2019, 2020 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2016, 2017, 2018, 2019, 2020, 2021 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2017, 2018 Clément Lassieur <clement@lassieur.org>
;;; Copyright © 2017 Marius Bakke <mbakke@fastmail.com>
;;;
@@ -108,9 +108,7 @@ root with an empty password."
('denied
(loop rest)))))))))
- (mkdir #$output)
- (chdir #$output)
-
+ (test-runner-current (system-test-runner #$output))
(test-begin "ssh-daemon")
;; Wait for sshd to be up and running.
@@ -209,8 +207,7 @@ root with an empty password."
(channel-request-exec channel "path-witness")
(zero? (channel-get-exit-status channel))))))
- (test-end)
- (exit (= (test-runner-fail-count (test-runner-current)) 0))))))
+ (test-end)))))
(gexp->derivation name test))
diff --git a/gnu/tests/telephony.scm b/gnu/tests/telephony.scm
index aeb6500c47..998bdbccf9 100644
--- a/gnu/tests/telephony.scm
+++ b/gnu/tests/telephony.scm
@@ -138,9 +138,7 @@ accounts provisioning feature of the service."
(define marionette
(make-marionette (list #$vm)))
- (mkdir #$output)
- (chdir #$output)
-
+ (test-runner-current (system-test-runner #$output))
(test-begin "jami")
(test-assert "service is running"
@@ -341,8 +339,7 @@ accounts provisioning feature of the service."
account-details)))))
marionette))
- (test-end)
- (exit (= (test-runner-fail-count (test-runner-current)) 0)))))
+ (test-end))))
(gexp->derivation (if provisioning?
"jami-provisioning-test"
diff --git a/gnu/tests/version-control.scm b/gnu/tests/version-control.scm
index a7cde1f163..fd3dba88ba 100644
--- a/gnu/tests/version-control.scm
+++ b/gnu/tests/version-control.scm
@@ -1,6 +1,6 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2017, 2018 Oleg Pykhalov <go.wigust@gmail.com>
-;;; Copyright © 2017, 2018, 2020 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2017, 2018, 2020, 2021 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2017, 2018 Clément Lassieur <clement@lassieur.org>
;;; Copyright © 2018 Christopher Baines <mail@cbaines.net>
;;;
@@ -132,9 +132,7 @@ HTTP-PORT."
(define marionette
(make-marionette (list #$vm)))
- (mkdir #$output)
- (chdir #$output)
-
+ (test-runner-current (system-test-runner #$output))
(test-begin "cgit")
;; XXX: Shepherd reads the config file *before* binding its control
@@ -210,8 +208,7 @@ HTTP-PORT."
(test-url "/test/tree/does-not-exist" 404)
(test-url "/does-not-exist" 404))
- (test-end)
- (exit (= (test-runner-fail-count (test-runner-current)) 0)))))
+ (test-end))))
(gexp->derivation "cgit-test" test))
@@ -270,9 +267,7 @@ HTTP-PORT."
(define marionette
(make-marionette (list #$vm)))
- (mkdir #$output)
- (chdir #$output)
-
+ (test-runner-current (system-test-runner #$output))
(test-begin "git-http")
;; Wait for nginx to be up and running.
@@ -302,8 +297,7 @@ HTTP-PORT."
(call-with-input-file "/tmp/clone/README"
get-string-all)))
- (test-end)
- (exit (= (test-runner-fail-count (test-runner-current)) 0)))))
+ (test-end))))
(gexp->derivation "git-http" test))
@@ -367,9 +361,7 @@ HTTP-PORT."
(define marionette
(make-marionette (list #$vm)))
- (mkdir #$output)
- (chdir #$output)
-
+ (test-runner-current (system-test-runner #$output))
(test-begin "gitolite")
;; Wait for sshd to be up and running.
@@ -410,8 +402,7 @@ HTTP-PORT."
(test-assert "pushing, and the associated hooks"
(invoke #$(file-append git "/bin/git") "push")))
- (test-end)
- (exit (= (test-runner-fail-count (test-runner-current)) 0)))))
+ (test-end))))
(gexp->derivation "gitolite" test))
@@ -458,7 +449,8 @@ HTTP-PORT."
(define vm
(virtual-machine
(operating-system os)
- (port-forwardings `((8081 . ,http-port)))))
+ (port-forwardings `((8081 . ,http-port)))
+ (memory-size 1024)))
(define test
(with-imported-modules '((gnu build marionette))
@@ -472,9 +464,7 @@ HTTP-PORT."
(define marionette
(make-marionette (list #$vm)))
- (mkdir #$output)
- (chdir #$output)
-
+ (test-runner-current (system-test-runner #$output))
(test-begin "gitile")
;; XXX: Shepherd reads the config file *before* binding its control
@@ -540,8 +530,7 @@ HTTP-PORT."
(test-url "/test/tree/-/does-not-exist" 404)
(test-url "/does-not-exist" 404))
- (test-end)
- (exit (= (test-runner-fail-count (test-runner-current)) 0)))))
+ (test-end))))
(gexp->derivation "gitile-test" test))
diff --git a/gnu/tests/virtualization.scm b/gnu/tests/virtualization.scm
index 9f9d3a5e26..628cd0549b 100644
--- a/gnu/tests/virtualization.scm
+++ b/gnu/tests/virtualization.scm
@@ -1,6 +1,6 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2017 Christopher Baines <mail@cbaines.net>
-;;; Copyright © 2020 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2020, 2021 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
;;; Copyright © 2021 Pierre Langlois <pierre.langlois@gmx.com>
;;;
@@ -73,9 +73,7 @@
(define marionette
(make-marionette (list #$vm)))
- (mkdir #$output)
- (chdir #$output)
-
+ (test-runner-current (system-test-runner #$output))
(test-begin "libvirt")
(test-assert "service running"
@@ -107,8 +105,7 @@
"-c" "qemu:///system" "connect"))
marionette))
- (test-end)
- (exit (= (test-runner-fail-count (test-runner-current)) 0)))))
+ (test-end))))
(gexp->derivation "libvirt-test" test))
@@ -193,9 +190,7 @@
(define marionette
(make-marionette (list #$vm)))
- (mkdir #$output)
- (chdir #$output)
-
+ (test-runner-current (system-test-runner #$output))
(test-begin "childhurd")
(test-assert "service running"
@@ -250,8 +245,7 @@
(open-input-pipe #$run-uname-over-ssh)))
marionette))
- (test-end)
- (exit (= (test-runner-fail-count (test-runner-current)) 0)))))
+ (test-end))))
(gexp->derivation "childhurd-test" test))
diff --git a/gnu/tests/web.scm b/gnu/tests/web.scm
index fb0713addc..4e8eceaa2b 100644
--- a/gnu/tests/web.scm
+++ b/gnu/tests/web.scm
@@ -113,9 +113,7 @@ HTTP-PORT."
(define marionette
(make-marionette (list #$vm)))
- (mkdir #$output)
- (chdir #$output)
-
+ (test-runner-current (system-test-runner #$output))
(test-begin #$name)
(test-assert #$(string-append name " service running")
@@ -150,8 +148,7 @@ HTTP-PORT."
marionette)))
'())
- (test-end)
- (exit (= (test-runner-fail-count (test-runner-current)) 0)))))
+ (test-end))))
(gexp->derivation (string-append name "-test") test))
@@ -309,9 +306,7 @@ HTTP-PORT, along with php-fpm."
(define marionette
(make-marionette (list #$vm)))
- (mkdir #$output)
- (chdir #$output)
-
+ (test-runner-current (system-test-runner #$output))
(test-begin "php-fpm")
(test-assert "php-fpm running"
@@ -350,9 +345,7 @@ HTTP-PORT, along with php-fpm."
(and matches
(match:substring matches 0))))))
- (test-end)
-
- (exit (= (test-runner-fail-count (test-runner-current)) 0)))))
+ (test-end))))
(gexp->derivation "php-fpm-test" test))
@@ -394,9 +387,7 @@ HTTP-PORT, along with php-fpm."
(define marionette
(make-marionette (list #$vm)))
- (mkdir #$output)
- (chdir #$output)
-
+ (test-runner-current (system-test-runner #$output))
(test-begin #$name)
(test-assert "hpcguix-web running"
@@ -422,8 +413,7 @@ HTTP-PORT, along with php-fpm."
#:times 10
#:delay 5)))
- (test-end)
- (exit (= (test-runner-fail-count (test-runner-current)) 0)))))
+ (test-end))))
(gexp->derivation (string-append name "-test") test))
@@ -487,9 +477,7 @@ HTTP-PORT."
;; port 8080 in the host.
(make-marionette (list #$vm)))
- (mkdir #$output)
- (chdir #$output)
-
+ (test-runner-current (system-test-runner #$output))
(test-begin "tailon")
(test-assert "service running"
@@ -513,8 +501,7 @@ HTTP-PORT."
#:times 10
#:delay 5))
- (test-end)
- (exit (= (test-runner-fail-count (test-runner-current)) 0)))))
+ (test-end))))
(gexp->derivation "tailon-test" test))
@@ -631,9 +618,7 @@ HTTP-PORT."
(define marionette
(make-marionette (list #$vm)))
- (mkdir #$output)
- (chdir #$output)
-
+ (test-runner-current (system-test-runner #$output))
(test-begin "patchwork")
(test-assert "patchwork-postgresql-user-and-service started"
@@ -668,8 +653,7 @@ HTTP-PORT."
#:times 10
#:delay 5))
- (test-end)
- (exit (= (test-runner-fail-count (test-runner-current)) 0)))))
+ (test-end))))
(gexp->derivation "patchwork-test" test))
diff --git a/guix/build-system/android-ndk.scm b/guix/build-system/android-ndk.scm
index dbfa626a19..211fd11311 100644
--- a/guix/build-system/android-ndk.scm
+++ b/guix/build-system/android-ndk.scm
@@ -1,5 +1,6 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2016 Danny Milosavljevic <dannym@scratchpost.org>
+;;; Copyright © 2021 Ludovic Courtès <ludo@gnu.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -20,7 +21,8 @@
#:use-module (guix search-paths)
#:use-module (guix store)
#:use-module (guix utils)
- #:use-module (guix derivations)
+ #:use-module (guix gexp)
+ #:use-module (guix monads)
#:use-module (guix packages)
#:use-module (guix build-system)
#:use-module (guix build-system gnu)
@@ -34,62 +36,51 @@
(guix build syscalls)
,@%gnu-build-system-modules))
-(define* (android-ndk-build store name inputs
- #:key
- (tests? #t)
- (test-target #f)
- (phases '(@ (guix build android-ndk-build-system)
- %standard-phases))
- (outputs '("out"))
- (make-flags ''())
- (search-paths '())
- (system (%current-system))
- (guile #f)
- (imported-modules %android-ndk-build-system-modules)
- (modules '((guix build android-ndk-build-system)
- (guix build utils))))
+(define* (android-ndk-build name inputs
+ #:key
+ source
+ (tests? #t)
+ (test-target #f)
+ (phases '%standard-phases)
+ (outputs '("out"))
+ (make-flags #~'())
+ (search-paths '())
+ (system (%current-system))
+ (guile #f)
+ (imported-modules %android-ndk-build-system-modules)
+ (modules '((guix build android-ndk-build-system)
+ (guix build utils))))
"Build SOURCE using Android NDK, and with INPUTS."
(define builder
- `(begin
- (use-modules ,@modules)
- (android-ndk-build #:name ,name
- #:source ,(match (assoc-ref inputs "source")
- (((? derivation? source))
- (derivation->output-path source))
- ((source)
- source)
- (source
- source))
- #:system ,system
- #:test-target ,test-target
- #:tests? ,tests?
- #:phases ,phases
- #:make-flags (cons* "-f"
- ,(string-append
- (derivation->output-path
- (car (assoc-ref inputs "android-build")))
- "/share/android/build/core/main.mk")
- ,make-flags)
- #:outputs %outputs
- #:search-paths ',(map search-path-specification->sexp
- search-paths)
- #:inputs %build-inputs)))
+ (with-imported-modules imported-modules
+ #~(begin
+ (use-modules #$@(sexp->gexp modules))
- (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)))))
+ (android-ndk-build #:name #$name
+ #:source #+source
+ #:system #$system
+ #:test-target #$test-target
+ #:tests? #$tests?
+ #:phases #$phases
+ #:bootstrap-scripts '() ;no autotools machinery
+ #:make-flags
+ (cons* "-f"
+ #$(file-append (gexp-input-thing
+ (car (assoc-ref inputs
+ "android-build")))
+ "/share/android/build/core/main.mk")
+ #$make-flags)
+ #:outputs #$(outputs->gexp outputs)
+ #:search-paths '#$(sexp->gexp
+ (map search-path-specification->sexp
+ search-paths))
+ #:inputs #$(input-tuples->gexp inputs)))))
- (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* (lower name
#:key source inputs native-inputs outputs system target
@@ -98,7 +89,7 @@
"Return a bag for NAME."
(define private-keywords
- '(#:source #:target #:inputs #:native-inputs #:outputs))
+ '(#:target #:inputs #:native-inputs #:outputs))
(and (not target) ;; TODO: support cross-compilation
(bag
diff --git a/guix/build-system/ant.scm b/guix/build-system/ant.scm
index 1809d1f3d2..08a4c996f9 100644
--- a/guix/build-system/ant.scm
+++ b/guix/build-system/ant.scm
@@ -1,5 +1,6 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2016 Ricardo Wurmus <rekado@elephly.net>
+;;; Copyright © 2021 Ludovic Courtès <ludo@gnu.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -20,7 +21,8 @@
#:use-module (guix store)
#:use-module (guix utils)
#:use-module (guix packages)
- #:use-module (guix derivations)
+ #:use-module (guix gexp)
+ #:use-module (guix monads)
#:use-module (guix search-paths)
#:use-module (guix build-system)
#:use-module (guix build-system gnu)
@@ -73,7 +75,7 @@
#:rest arguments)
"Return a bag for NAME."
(define private-keywords
- '(#:source #:target #:jdk #:ant #:zip #:inputs #:native-inputs))
+ '(#:target #:jdk #:ant #:zip #:inputs #:native-inputs))
(and (not target) ;XXX: no cross-compilation
(bag
@@ -94,8 +96,9 @@
(build ant-build)
(arguments (strip-keyword-arguments private-keywords arguments)))))
-(define* (ant-build store name inputs
+(define* (ant-build name inputs
#:key
+ source
(tests? #t)
(test-target "check")
(configure-flags ''())
@@ -107,8 +110,7 @@
(test-exclude (list "**/Abstract*.java"))
(source-dir "src")
(test-dir "src/test")
- (phases '(@ (guix build ant-build-system)
- %standard-phases))
+ (phases '%standard-phases)
(outputs '("out"))
(search-paths '())
(system (%current-system))
@@ -119,49 +121,35 @@
(guix build utils))))
"Build SOURCE with INPUTS."
(define builder
- `(begin
- (use-modules ,@modules)
- (ant-build #:name ,name
- #:source ,(match (assoc-ref inputs "source")
- (((? derivation? source))
- (derivation->output-path source))
- ((source)
- source)
- (source
- source))
- #:make-flags ,make-flags
- #:configure-flags ,configure-flags
- #:system ,system
- #:tests? ,tests?
- #:test-target ,test-target
- #:build-target ,build-target
- #:jar-name ,jar-name
- #:main-class ,main-class
- #:test-include (list ,@test-include)
- #:test-exclude (list ,@test-exclude)
- #:source-dir ,source-dir
- #:test-dir ,test-dir
- #:phases ,phases
- #:outputs %outputs
- #:search-paths ',(map search-path-specification->sexp
- search-paths)
- #:inputs %build-inputs)))
+ (with-imported-modules imported-modules
+ #~(begin
+ (use-modules #$@(sexp->gexp modules))
+ (ant-build #:name #$name
+ #:source #+source
+ #:make-flags #$make-flags
+ #:configure-flags #$configure-flags
+ #:system #$system
+ #:tests? #$tests?
+ #:test-target #$test-target
+ #:build-target #$build-target
+ #:jar-name #$jar-name
+ #:main-class #$main-class
+ #:test-include (list #$@test-include)
+ #:test-exclude (list #$@test-exclude)
+ #:source-dir #$source-dir
+ #:test-dir #$test-dir
+ #:phases #$phases
+ #:outputs #$(outputs->gexp outputs)
+ #:search-paths '#$(sexp->gexp
+ (map search-path-specification->sexp
+ search-paths))
+ #:inputs #$(input-tuples->gexp inputs)))))
- (define guile-for-build
- (match guile
- ((? package?)
- (package-derivation store guile system #:graft? #f))
- (#f ; the default
- (let* ((distro (resolve-interface '(gnu packages commencement)))
- (guile (module-ref distro 'guile-final)))
- (package-derivation store guile system #:graft? #f)))))
-
- (build-expression->derivation store name builder
- #: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 ant-build-system
(build-system
diff --git a/guix/build-system/asdf.scm b/guix/build-system/asdf.scm
index 4edf6857b5..a0f4634db0 100644
--- a/guix/build-system/asdf.scm
+++ b/guix/build-system/asdf.scm
@@ -1,6 +1,7 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2016, 2017 Andy Patterson <ajpatter@uwaterloo.ca>
;;; Copyright © 2019, 2020, 2021 Guillaume Le Vaillant <glv@posteo.net>
+;;; Copyright © 2021 Ludovic Courtès <ludo@gnu.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -22,7 +23,8 @@
#:use-module (guix utils)
#:use-module (guix memoization)
#:use-module (guix packages)
- #:use-module (guix derivations)
+ #:use-module (guix gexp)
+ #:use-module (guix monads)
#:use-module (guix search-paths)
#:use-module ((guix build utils)
#:select ((package-name->name+version
@@ -92,46 +94,33 @@
(build asdf-build/source)
(arguments (strip-keyword-arguments private-keywords arguments)))))
-(define* (asdf-build/source store name inputs
+(define* (asdf-build/source name inputs
#:key source outputs
- (phases '(@ (guix build asdf-build-system)
- %standard-phases/source))
+ (phases '%standard-phases/source)
(search-paths '())
(system (%current-system))
(guile #f)
(imported-modules %asdf-build-system-modules)
(modules %asdf-build-modules))
(define builder
- `(begin
- (use-modules ,@modules)
- (asdf-build/source #:name ,name
- #:source ,(match (assoc-ref inputs "source")
- (((? derivation? source))
- (derivation->output-path source))
- ((source) source)
- (source source))
- #:system ,system
- #:phases ,phases
- #:outputs %outputs
- #:search-paths ',(map search-path-specification->sexp
- search-paths)
- #:inputs %build-inputs)))
-
- (define guile-for-build
- (match guile
- ((? package?)
- (package-derivation store guile system #:graft? #f))
- (#f
- (let* ((distro (resolve-interface '(gnu packages commencement)))
- (guile (module-ref distro 'guile-final)))
- (package-derivation store guile system #:graft? #f)))))
-
- (build-expression->derivation store name builder
- #:inputs inputs
- #:system system
- #:modules imported-modules
- #:outputs outputs
- #:guile-for-build guile-for-build))
+ (with-imported-modules imported-modules
+ #~(begin
+ (use-modules #$@(sexp->gexp modules))
+ (asdf-build/source #:name #$name
+ #:source #+source
+ #:system #$system
+ #:phases #$phases
+ #:outputs #$(outputs->gexp outputs)
+ #:search-paths '#$(sexp->gexp
+ (map search-path-specification->sexp
+ search-paths))
+ #:inputs #$(input-tuples->gexp inputs)))))
+
+ (mlet %store-monad ((guile (package->derivation (or guile (default-guile))
+ system #:graft? #f)))
+ (gexp->derivation name builder
+ #:system system
+ #:guile-for-build guile)))
(define* (package-with-build-system from-build-system to-build-system
from-prefix to-prefix
@@ -278,19 +267,18 @@ set up using CL source package conventions."
(arguments (strip-keyword-arguments private-keywords arguments))))))
(define (asdf-build lisp-type)
- (lambda* (store name inputs
- #:key source outputs
- (tests? #t)
- (asd-files ''())
- (asd-systems ''())
- (test-asd-file #f)
- (phases '(@ (guix build asdf-build-system)
- %standard-phases))
- (search-paths '())
- (system (%current-system))
- (guile #f)
- (imported-modules %asdf-build-system-modules)
- (modules %asdf-build-modules))
+ (lambda* (name inputs
+ #:key source outputs
+ (tests? #t)
+ (asd-files ''())
+ (asd-systems ''())
+ (test-asd-file #f)
+ (phases '%standard-phases)
+ (search-paths '())
+ (system (%current-system))
+ (guile #f)
+ (imported-modules %asdf-build-system-modules)
+ (modules %asdf-build-modules))
(define systems
(if (null? (cadr asd-systems))
@@ -305,44 +293,32 @@ set up using CL source package conventions."
asd-systems))
(define builder
- `(begin
- (use-modules ,@modules)
- (parameterize ((%lisp (string-append
- (assoc-ref %build-inputs ,lisp-type)
- "/bin/" ,lisp-type))
- (%lisp-type ,lisp-type))
- (asdf-build #:name ,name
- #:source ,(match (assoc-ref inputs "source")
- (((? derivation? source))
- (derivation->output-path source))
- ((source) source)
- (source source))
- #:asd-files ,asd-files
- #:asd-systems ,systems
- #:test-asd-file ,test-asd-file
- #:system ,system
- #:tests? ,tests?
- #:phases ,phases
- #:outputs %outputs
- #:search-paths ',(map search-path-specification->sexp
- search-paths)
- #:inputs %build-inputs))))
-
- (define guile-for-build
- (match guile
- ((? package?)
- (package-derivation store guile system #:graft? #f))
- (#f
- (let* ((distro (resolve-interface '(gnu packages commencement)))
- (guile (module-ref distro 'guile-final)))
- (package-derivation store guile system #:graft? #f)))))
-
- (build-expression->derivation store name builder
- #:inputs inputs
- #:system system
- #:modules imported-modules
- #:outputs outputs
- #:guile-for-build guile-for-build)))
+ (with-imported-modules imported-modules
+ #~(begin
+ (use-modules #$@(sexp->gexp modules))
+ (parameterize ((%lisp (search-input-file
+ #$(input-tuples->gexp inputs)
+ (string-append "bin/" #$lisp-type)))
+ (%lisp-type #$lisp-type))
+ (asdf-build #:name #$name
+ #:source #+source
+ #:asd-files #$asd-files
+ #:asd-systems #$systems
+ #:test-asd-file #$test-asd-file
+ #: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))))))
+
+ (mlet %store-monad ((guile (package->derivation (or guile (default-guile))
+ system #:graft? #f)))
+ (gexp->derivation name builder
+ #:system system
+ #:guile-for-build guile))))
(define asdf-build-system/sbcl
(build-system
diff --git a/guix/build-system/cargo.scm b/guix/build-system/cargo.scm
index e53d2a7523..60c35eed07 100644
--- a/guix/build-system/cargo.scm
+++ b/guix/build-system/cargo.scm
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2013, 2014, 2015, 2016, 2019 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2013, 2014, 2015, 2016, 2019, 2021 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2013 Andreas Enge <andreas@enge.fr>
;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org>
;;; Copyright © 2016 David Craven <david@craven.ch>
@@ -26,7 +26,8 @@
#:use-module (guix search-paths)
#:use-module (guix store)
#:use-module (guix utils)
- #:use-module (guix derivations)
+ #:use-module (guix gexp)
+ #:use-module (guix monads)
#:use-module (guix packages)
#:use-module (guix build-system)
#:use-module (guix build-system gnu)
@@ -71,8 +72,9 @@ to NAME and VERSION."
(guix build json)
,@%cargo-utils-modules))
-(define* (cargo-build store name inputs
+(define* (cargo-build name inputs
#:key
+ source
(tests? #t)
(test-target #f)
(vendor-dir "guix-vendor")
@@ -82,8 +84,7 @@ to NAME and VERSION."
(features ''())
(skip-build? #f)
(install-source? #t)
- (phases '(@ (guix build cargo-build-system)
- %standard-phases))
+ (phases '%standard-phases)
(outputs '("out"))
(search-paths '())
(system (%current-system))
@@ -94,47 +95,35 @@ to NAME and VERSION."
"Build SOURCE using CARGO, and with INPUTS."
(define builder
- `(begin
- (use-modules ,@modules)
- (cargo-build #:name ,name
- #:source ,(match (assoc-ref inputs "source")
- (((? derivation? source))
- (derivation->output-path source))
- ((source)
- source)
- (source
- source))
- #:system ,system
- #:test-target ,test-target
- #:vendor-dir ,vendor-dir
- #:cargo-build-flags ,cargo-build-flags
- #:cargo-test-flags ,cargo-test-flags
- #:cargo-package-flags ,cargo-package-flags
- #:features ,features
- #:skip-build? ,skip-build?
- #:install-source? ,install-source?
- #:tests? ,(and tests? (not skip-build?))
- #:phases ,phases
- #:outputs %outputs
- #:search-paths ',(map search-path-specification->sexp
- search-paths)
- #:inputs %build-inputs)))
+ (with-imported-modules imported-modules
+ #~(begin
+ (use-modules #$@(sexp->gexp modules))
- (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)))))
+ (cargo-build #:name #$name
+ #:source #+source
+ #:system #$system
+ #:test-target #$test-target
+ #:vendor-dir #$vendor-dir
+ #:cargo-build-flags #$(sexp->gexp cargo-build-flags)
+ #:cargo-test-flags #$(sexp->gexp cargo-test-flags)
+ #:cargo-package-flags #$(sexp->gexp cargo-package-flags)
+ #:features #$(sexp->gexp features)
+ #:skip-build? #$skip-build?
+ #:install-source? #$install-source?
+ #:tests? #$(and tests? (not skip-build?))
+ #:phases #$(if (pair? phases)
+ (sexp->gexp phases)
+ phases)
+ #:outputs #$(outputs->gexp outputs)
+ #:inputs #$(input-tuples->gexp inputs)
+ #:search-paths '#$(sexp->gexp
+ (map search-path-specification->sexp
+ search-paths))))))
- (build-expression->derivation store name builder
- #:inputs inputs
- #:system system
- #:modules imported-modules
- #:outputs outputs
- #:guile-for-build guile-for-build))
+ (gexp->derivation name builder
+ #:system system
+ #:target #f
+ #:guile-for-build guile))
(define (package-cargo-inputs p)
(apply
@@ -222,7 +211,7 @@ any dependent crates. This can be a benefits:
- It avoids waiting for quadratic builds from source: cargo always builds
dependencies within the current workspace. This is largely due to Rust not
having a stable ABI and other resolutions that cargo applies. This means that
- if we have a depencency chain of X -> Y -> Z and we build each definition
+ if we have a dependency chain of X -> Y -> Z and we build each definition
independently the following will happen:
* Cargo will build and test crate Z
* Cargo will build crate Z in Y's workspace, then build and test Y
@@ -253,7 +242,7 @@ any dependent crates. This can be a benefits:
"Return a bag for NAME."
(define private-keywords
- '(#:source #:target #:rust #:inputs #:native-inputs #:outputs
+ '(#:target #:rust #:inputs #:native-inputs #:outputs
#:cargo-inputs #:cargo-development-inputs))
(and (not target) ;; TODO: support cross-compilation
diff --git a/guix/build-system/chicken.scm b/guix/build-system/chicken.scm
index 10f1469e88..07666d1321 100644
--- a/guix/build-system/chicken.scm
+++ b/guix/build-system/chicken.scm
@@ -1,5 +1,6 @@
;;; 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.
@@ -19,7 +20,9 @@
(define-module (guix build-system chicken)
#:use-module (guix utils)
- #:use-module (guix derivations)
+ #:use-module (guix gexp)
+ #:use-module (guix store)
+ #:use-module (guix monads)
#:use-module (guix search-paths)
#:use-module (guix build-system)
#:use-module (guix build-system gnu)
@@ -55,7 +58,7 @@ EXTENSION is the file name extension, such as '.tar.gz'."
#:rest arguments)
"Return a bag for NAME."
(define private-keywords
- '(#:source #:target #:chicken #:inputs #:native-inputs))
+ '(#:target #:chicken #:inputs #:native-inputs))
;; TODO: cross-compilation support
(and (not target)
@@ -77,60 +80,45 @@ EXTENSION is the file name extension, such as '.tar.gz'."
(build chicken-build)
(arguments (strip-keyword-arguments private-keywords arguments)))))
-(define* (chicken-build store name inputs
- #:key
- (phases '(@ (guix build chicken-build-system)
- %standard-phases))
- (outputs '("out"))
- (search-paths '())
- (egg-name "")
- (unpack-path "")
- (build-flags ''())
- (tests? #t)
- (system (%current-system))
- (guile #f)
- (imported-modules %chicken-build-system-modules)
- (modules '((guix build chicken-build-system)
- (guix build union)
- (guix build utils))))
+(define* (chicken-build name inputs
+ #:key
+ source
+ (phases '%standard-phases)
+ (outputs '("out"))
+ (search-paths '())
+ (egg-name "")
+ (unpack-path "")
+ (build-flags ''())
+ (tests? #t)
+ (system (%current-system))
+ (guile #f)
+ (imported-modules %chicken-build-system-modules)
+ (modules '((guix build chicken-build-system)
+ (guix build union)
+ (guix build utils))))
(define builder
- `(begin
- (use-modules ,@modules)
- (chicken-build #:name ,name
- #:source ,(match (assoc-ref inputs "source")
- (((? derivation? source))
- (derivation->output-path source))
- ((source)
- source)
- (source
- source))
- #:system ,system
- #:phases ,phases
- #:outputs %outputs
- #:search-paths ',(map search-path-specification->sexp
- search-paths)
- #:egg-name ,egg-name
- #:unpack-path ,unpack-path
- #:build-flags ,build-flags
- #:tests? ,tests?
- #:inputs %build-inputs)))
+ (with-imported-modules imported-modules
+ #~(begin
+ (use-modules #$@(sexp->gexp modules))
+ (chicken-build #:name #$name
+ #:source #+source
+ #:system #$system
+ #:phases #$phases
+ #:outputs #$(outputs->gexp outputs)
+ #:search-paths '#$(sexp->gexp
+ (map search-path-specification->sexp
+ search-paths))
+ #:egg-name #$egg-name
+ #:unpack-path #$unpack-path
+ #:build-flags #$build-flags
+ #:tests? #$tests?
+ #:inputs #$(input-tuples->gexp inputs)))))
- (define guile-for-build
- (match guile
- ((? package?)
- (package-derivation store guile system #:graft? #f))
- (#f ; the default
- (let* ((distro (resolve-interface '(gnu packages commencement)))
- (guile (module-ref distro 'guile-final)))
- (package-derivation store guile system
- #:graft? #f)))))
-
- (build-expression->derivation store name builder
- #: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 chicken-build-system
(build-system
diff --git a/guix/build-system/clojure.scm b/guix/build-system/clojure.scm
index 607f67aaec..39b7f44e89 100644
--- a/guix/build-system/clojure.scm
+++ b/guix/build-system/clojure.scm
@@ -1,6 +1,6 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2018 Alex Vong <alexvong1995@gmail.com>
-;;; Copyright © 2020 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2020, 2021 Ludovic Courtès <ludo@gnu.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -25,7 +25,9 @@
#:select (standard-packages)
#:prefix gnu:)
- #:use-module (guix derivations)
+ #:use-module (guix gexp)
+ #:use-module (guix store)
+ #:use-module (guix monads)
#:use-module (guix packages)
#:use-module ((guix search-paths)
#:select
@@ -102,26 +104,9 @@
(arguments (strip-keyword-arguments private-keywords
arguments))))))
-(define-with-docs source->output-path
- "Convert source input to output path."
- (match-lambda
- (((? derivation? source))
- (derivation->output-path source))
- ((source)
- source)
- (source
- source)))
-
-(define-with-docs maybe-guile->guile
- "Find the right guile."
- (match-lambda
- ((and maybe-guile (? package?))
- maybe-guile)
- (#f ; default
- (@* (gnu packages commencement) guile-final))))
-
-(define* (clojure-build store name inputs
+(define* (clojure-build name inputs
#:key
+ source
(source-dirs `',%source-dirs)
(test-dirs `',%test-dirs)
(compile-dir %compile-dir)
@@ -133,7 +118,7 @@
(aot-include `',%aot-include)
(aot-exclude `',%aot-exclude)
- doc-dirs ; no sensible default
+ doc-dirs ; no sensible default
(doc-regex %doc-regex)
(tests? %tests?)
@@ -149,48 +134,45 @@
(imported-modules %clojure-build-system-modules)
(modules %default-modules))
"Build SOURCE with INPUTS."
- (let ((builder `(begin
- (use-modules ,@modules)
- (clojure-build #:name ,name
- #:source ,(source->output-path
- (assoc-ref inputs "source"))
-
- #:source-dirs ,source-dirs
- #:test-dirs ,test-dirs
- #:compile-dir ,compile-dir
-
- #:jar-names ,jar-names
- #:main-class ,main-class
- #:omit-source? ,omit-source?
-
- #:aot-include ,aot-include
- #:aot-exclude ,aot-exclude
-
- #:doc-dirs ,doc-dirs
- #:doc-regex ,doc-regex
-
- #:tests? ,tests?
- #:test-include ,test-include
- #:test-exclude ,test-exclude
-
- #:phases ,phases
- #:outputs %outputs
- #:search-paths ',(map search-path-spec->sexp
- search-paths)
- #:system ,system
- #:inputs %build-inputs)))
-
- (guile-for-build (package-derivation store
- (maybe-guile->guile 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)))
+ (define builder
+ (with-imported-modules imported-modules
+ #~(begin
+ (use-modules #$@(sexp->gexp modules))
+
+ (clojure-build #:name #$name
+ #:source #+source
+
+ #:source-dirs #$source-dirs
+ #:test-dirs #$test-dirs
+ #:compile-dir #$compile-dir
+
+ #:jar-names #$jar-names
+ #:main-class #$main-class
+ #:omit-source? #$omit-source?
+
+ #:aot-include #$aot-include
+ #:aot-exclude #$aot-exclude
+
+ #:doc-dirs #$doc-dirs
+ #:doc-regex #$doc-regex
+
+ #:tests? #$tests?
+ #:test-include #$test-include
+ #:test-exclude #$test-exclude
+
+ #:phases #$phases
+ #:outputs #$(outputs->gexp outputs)
+ #:search-paths '#$(sexp->gexp
+ (map search-path-spec->sexp
+ search-paths))
+ #:system #$system
+ #:inputs #$(input-tuples->gexp inputs)))))
+
+ (mlet %store-monad ((guile (package->derivation (or guile (default-guile))
+ system #:graft? #f)))
+ (gexp->derivation name builder
+ #:system system
+ #:guile-for-build guile)))
(define clojure-build-system
(build-system
diff --git a/guix/build-system/cmake.scm b/guix/build-system/cmake.scm
index f590b6ea42..2056c04153 100644
--- a/guix/build-system/cmake.scm
+++ b/guix/build-system/cmake.scm
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2013, 2014, 2015, 2020 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2013, 2014, 2015, 2020, 2021 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2013 Cyril Roelandt <tipecaml@gmail.com>
;;; Copyright © 2017 Ricardo Wurmus <rekado@elephly.net>
;;; Copyright © 2020 Efraim Flashner <efraim@flashner.co.il>
@@ -21,7 +21,9 @@
(define-module (guix build-system cmake)
#:use-module (guix store)
+ #:use-module (guix gexp)
#:use-module (guix utils)
+ #:use-module (guix monads)
#:use-module (guix derivations)
#:use-module (guix search-paths)
#:use-module (guix build-system)
@@ -61,7 +63,7 @@
#:rest arguments)
"Return a bag for NAME."
(define private-keywords
- `(#:source #:cmake #:inputs #:native-inputs #:outputs
+ `(#:cmake #:inputs #:native-inputs
,@(if target '() '(#:target))))
(bag
@@ -95,8 +97,8 @@
(build (if target cmake-cross-build cmake-build))
(arguments (strip-keyword-arguments private-keywords arguments))))
-(define* (cmake-build store name inputs
- #:key (guile #f)
+(define* (cmake-build name inputs
+ #:key guile source
(outputs '("out")) (configure-flags ''())
(search-paths '())
(make-flags ''())
@@ -111,8 +113,7 @@
(strip-flags ''("--strip-debug"))
(strip-directories ''("lib" "lib64" "libexec"
"bin" "sbin"))
- (phases '(@ (guix build cmake-build-system)
- %standard-phases))
+ (phases '%standard-phases)
(system (%current-system))
(substitutable? #t)
(imported-modules %cmake-build-system-modules)
@@ -120,62 +121,57 @@
(guix build utils))))
"Build SOURCE using CMAKE, and with INPUTS. This assumes that SOURCE
provides a 'CMakeLists.txt' file as its build system."
- (define builder
- `(begin
- (use-modules ,@modules)
- (cmake-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
- #:configure-flags ,configure-flags
- #:make-flags ,make-flags
- #:out-of-source? ,out-of-source?
- #:build-type ,build-type
- #:tests? ,tests?
- #:test-target ,test-target
- #:parallel-build? ,parallel-build?
- #:parallel-tests? ,parallel-tests?
- #:validate-runpath? ,validate-runpath?
- #:patch-shebangs? ,patch-shebangs?
- #:strip-binaries? ,strip-binaries?
- #:strip-flags ,strip-flags
- #:strip-directories ,strip-directories)))
+ (define build
+ (with-imported-modules imported-modules
+ #~(begin
+ (use-modules #$@(sexp->gexp modules))
- (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)))))
+ #$(with-build-variables inputs outputs
+ #~(cmake-build #:source #+source
+ #:system #$system
+ #:outputs %outputs
+ #:inputs %build-inputs
+ #:search-paths '#$(sexp->gexp
+ (map search-path-specification->sexp
+ search-paths))
+ #:phases #$(if (pair? phases)
+ (sexp->gexp phases)
+ phases)
+ #:configure-flags #$(if (pair? configure-flags)
+ (sexp->gexp configure-flags)
+ configure-flags)
+ #:make-flags #$make-flags
+ #:out-of-source? #$out-of-source?
+ #:build-type #$build-type
+ #:tests? #$tests?
+ #:test-target #$test-target
+ #:parallel-build? #$parallel-build?
+ #:parallel-tests? #$parallel-tests?
+ #:validate-runpath? #$validate-runpath?
+ #:patch-shebangs? #$patch-shebangs?
+ #:strip-binaries? #$strip-binaries?
+ #:strip-flags #$(sexp->gexp strip-flags)
+ #:strip-directories #$(sexp->gexp strip-directories))))))
- (build-expression->derivation store name builder
- #:system system
- #:inputs inputs
- #:modules imported-modules
- #:outputs outputs
- #:substitutable? substitutable?
- #:guile-for-build guile-for-build))
+ (mlet %store-monad ((guile (package->derivation (or guile (default-guile))
+ system #:graft? #f)))
+ (gexp->derivation name build
+ #:system system
+ #:target #f
+ #:graft? #f
+ #:substitutable? substitutable?
+ #:guile-for-build guile)))
;;;
;;; Cross-compilation.
;;;
-(define* (cmake-cross-build store name
+(define* (cmake-cross-build name
#:key
- target native-drvs target-drvs
- (guile #f)
+ target
+ build-inputs target-inputs host-inputs
+ source guile
(outputs '("out"))
(configure-flags ''())
(search-paths '())
@@ -193,8 +189,7 @@ provides a 'CMakeLists.txt' file as its build system."
"--enable-deterministic-archives"))
(strip-directories ''("lib" "lib64" "libexec"
"bin" "sbin"))
- (phases '(@ (guix build cmake-build-system)
- %standard-phases))
+ (phases '%standard-phases)
(substitutable? #t)
(system (%current-system))
(build (nix-system->gnu-triplet system))
@@ -205,78 +200,58 @@ provides a 'CMakeLists.txt' file as its build system."
with INPUTS. This assumes that SOURCE provides a 'CMakeLists.txt' file as its
build system."
(define builder
- `(begin
- (use-modules ,@modules)
- (let ()
- (define %build-host-inputs
- ',(map (match-lambda
- ((name (? derivation? drv) sub ...)
- `(,name . ,(apply derivation->output-path drv sub)))
- ((name path)
- `(,name . ,path)))
- native-drvs))
+ (with-imported-modules imported-modules
+ #~(begin
+ (use-modules #$@(sexp->gexp modules))
+
+ (define %build-host-inputs
+ #+(input-tuples->gexp build-inputs))
+
+ (define %build-target-inputs
+ (append #$(input-tuples->gexp host-inputs)
+ #+(input-tuples->gexp target-inputs)))
- (define %build-target-inputs
- ',(map (match-lambda
- ((name (? derivation? drv) sub ...)
- `(,name . ,(apply derivation->output-path drv sub)))
- ((name (? package? pkg) sub ...)
- (let ((drv (package-cross-derivation store pkg
- target system)))
- `(,name . ,(apply derivation->output-path drv sub))))
- ((name path)
- `(,name . ,path)))
- target-drvs))
+ (define %build-inputs
+ (append %build-host-inputs %build-target-inputs))
- (cmake-build #:source ,(match (assoc-ref native-drvs "source")
- (((? derivation? source))
- (derivation->output-path source))
- ((source)
- source)
- (source
- source))
- #:system ,system
- #:build ,build
- #:target ,target
- #:outputs %outputs
- #:inputs %build-target-inputs
- #:native-inputs %build-host-inputs
- #:search-paths ',(map search-path-specification->sexp
- search-paths)
- #:native-search-paths ',(map
- search-path-specification->sexp
- native-search-paths)
- #:phases ,phases
- #:configure-flags ,configure-flags
- #:make-flags ,make-flags
- #:out-of-source? ,out-of-source?
- #:build-type ,build-type
- #:tests? ,tests?
- #:test-target ,test-target
- #:parallel-build? ,parallel-build?
- #:parallel-tests? ,parallel-tests?
- #:validate-runpath? ,validate-runpath?
- #:patch-shebangs? ,patch-shebangs?
- #:strip-binaries? ,strip-binaries?
- #:strip-flags ,strip-flags
- #:strip-directories ,strip-directories))))
+ (define %outputs
+ #$(outputs->gexp outputs))
- (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)))))
+ (cmake-build #:source #+source
+ #:system #$system
+ #:build #$build
+ #:target #$target
+ #:outputs %outputs
+ #:inputs %build-target-inputs
+ #:native-inputs %build-host-inputs
+ #:search-paths '#$(map search-path-specification->sexp
+ search-paths)
+ #:native-search-paths '#$(map
+ search-path-specification->sexp
+ native-search-paths)
+ #:phases #$phases
+ #:configure-flags #$configure-flags
+ #:make-flags #$make-flags
+ #:out-of-source? #$out-of-source?
+ #:build-type #$build-type
+ #:tests? #$tests?
+ #:test-target #$test-target
+ #:parallel-build? #$parallel-build?
+ #:parallel-tests? #$parallel-tests?
+ #:validate-runpath? #$validate-runpath?
+ #:patch-shebangs? #$patch-shebangs?
+ #:strip-binaries? #$strip-binaries?
+ #:strip-flags #$strip-flags
+ #:strip-directories #$strip-directories))))
- (build-expression->derivation store name builder
- #:system system
- #:inputs (append native-drvs target-drvs)
- #:outputs outputs
- #:modules imported-modules
- #:substitutable? substitutable?
- #: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
+ #:target target
+ #:graft? #f
+ #:substitutable? substitutable?
+ #:guile-for-build guile)))
(define cmake-build-system
(build-system
diff --git a/guix/build-system/copy.scm b/guix/build-system/copy.scm
index d1bf8fb654..4894ba46fb 100644
--- a/guix/build-system/copy.scm
+++ b/guix/build-system/copy.scm
@@ -1,6 +1,7 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2019 Julien Lepiller <julien@lepiller.eu>
;;; Copyright © 2020 Pierre Neidhardt <mail@ambrevar.xyz>
+;;; Copyright © 2021 Ludovic Courtès <ludo@gnu.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -20,7 +21,8 @@
(define-module (guix build-system copy)
#:use-module (guix store)
#:use-module (guix utils)
- #:use-module (guix derivations)
+ #:use-module (guix gexp)
+ #:use-module (guix monads)
#:use-module (guix search-paths)
#:use-module (guix build-system)
#:use-module (guix build-system gnu)
@@ -59,7 +61,7 @@
#:rest arguments)
"Return a bag for NAME from the given arguments."
(define private-keywords
- '(#:source #:target #:inputs #:native-inputs))
+ '(#:target #:inputs #:native-inputs))
(bag
(name name)
@@ -75,8 +77,9 @@
(build copy-build)
(arguments (strip-keyword-arguments private-keywords arguments))))
-(define* (copy-build store name inputs
- #:key (guile #f)
+(define* (copy-build name inputs
+ #:key
+ guile source
(outputs '("out"))
(install-plan ''(("." "./")))
(search-paths '())
@@ -90,49 +93,43 @@
(phases '(@ (guix build copy-build-system)
%standard-phases))
(system (%current-system))
+ (target #f)
(imported-modules %copy-build-system-modules)
(modules '((guix build copy-build-system)
(guix build utils))))
"Build SOURCE using INSTALL-PLAN, and with INPUTS."
(define builder
- `(begin
- (use-modules ,@modules)
- (copy-build #:source ,(match (assoc-ref inputs "source")
- (((? derivation? source))
- (derivation->output-path source))
- ((source)
- source)
- (source
- source))
- #:system ,system
- #:outputs %outputs
- #:inputs %build-inputs
- #:install-plan ,install-plan
- #:search-paths ',(map search-path-specification->sexp
- search-paths)
- #:phases ,phases
- #:out-of-source? ,out-of-source?
- #: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)
- (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)))))
+ #$(with-build-variables inputs outputs
+ #~(copy-build #:source #+source
+ #:system #$system
+ #:outputs %outputs
+ #:inputs %build-inputs
+ #:install-plan #$(if (pair? install-plan)
+ (sexp->gexp install-plan)
+ install-plan)
+ #:search-paths '#$(sexp->gexp
+ (map search-path-specification->sexp
+ search-paths))
+ #:phases #$(if (pair? phases)
+ (sexp->gexp phases)
+ phases)
+ #:out-of-source? #$out-of-source?
+ #:validate-runpath? #$validate-runpath?
+ #:patch-shebangs? #$patch-shebangs?
+ #:strip-binaries? #$strip-binaries?
+ #:strip-flags #$(sexp->gexp strip-flags)
+ #:strip-directories #$(sexp->gexp strip-directories))))))
- (build-expression->derivation store name builder
- #:system system
- #:inputs inputs
- #: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
+ #:target #f
+ #:guile-for-build guile)))
(define copy-build-system
(build-system
diff --git a/guix/build-system/dub.scm b/guix/build-system/dub.scm
index 5a31a2f51a..55ad7decb8 100644
--- a/guix/build-system/dub.scm
+++ b/guix/build-system/dub.scm
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2013, 2014, 2015, 2016 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2013, 2014, 2015, 2016, 2021 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2013 Andreas Enge <andreas@enge.fr>
;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org>
;;; Copyright © 2016 David Craven <david@craven.ch>
@@ -24,7 +24,8 @@
#:use-module (guix search-paths)
#:use-module (guix store)
#:use-module (guix utils)
- #:use-module (guix derivations)
+ #:use-module (guix gexp)
+ #:use-module (guix monads)
#:use-module (guix packages)
#:use-module (guix build-system)
#:use-module (guix build-system gnu)
@@ -56,57 +57,43 @@
(guix build syscalls)
,@%gnu-build-system-modules))
-(define* (dub-build store name inputs
- #:key
- (tests? #t)
- (test-target #f)
- (dub-build-flags ''())
- (phases '(@ (guix build dub-build-system)
- %standard-phases))
- (outputs '("out"))
- (search-paths '())
- (system (%current-system))
- (guile #f)
- (imported-modules %dub-build-system-modules)
- (modules '((guix build dub-build-system)
- (guix build utils))))
+(define* (dub-build name inputs
+ #:key
+ source
+ (tests? #t)
+ (test-target #f)
+ (dub-build-flags ''())
+ (phases '%standard-phases)
+ (outputs '("out"))
+ (search-paths '())
+ (system (%current-system))
+ (guile #f)
+ (imported-modules %dub-build-system-modules)
+ (modules '((guix build dub-build-system)
+ (guix build utils))))
"Build SOURCE using DUB, and with INPUTS."
(define builder
- `(begin
- (use-modules ,@modules)
- (dub-build #:name ,name
- #:source ,(match (assoc-ref inputs "source")
- (((? derivation? source))
- (derivation->output-path source))
- ((source)
- source)
- (source
- source))
- #:system ,system
- #:test-target ,test-target
- #:dub-build-flags ,dub-build-flags
- #:tests? ,tests?
- #:phases ,phases
- #:outputs %outputs
- #:search-paths ',(map search-path-specification->sexp
- search-paths)
- #:inputs %build-inputs)))
+ (with-imported-modules imported-modules
+ #~(begin
+ (use-modules #$@(sexp->gexp modules))
+ (dub-build #:name #$name
+ #:source #+source
+ #:system #$system
+ #:test-target #$test-target
+ #:dub-build-flags #$dub-build-flags
+ #:tests? #$tests?
+ #:phases #$phases
+ #:outputs #$(outputs->gexp outputs)
+ #:search-paths '#$(sexp->gexp
+ (map search-path-specification->sexp
+ search-paths))
+ #:inputs #$(input-tuples->gexp inputs)))))
- (define guile-for-build
- (match guile
- ((? package?)
- (package-derivation store guile system #:graft? #f))
- (#f ; the default
- (let* ((distro (resolve-interface '(gnu packages commencement)))
- (guile (module-ref distro 'guile-final)))
- (package-derivation store guile system #:graft? #f)))))
-
- (build-expression->derivation store name builder
- #: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* (lower name
#:key source inputs native-inputs outputs system target
@@ -118,7 +105,7 @@
"Return a bag for NAME."
(define private-keywords
- '(#:source #:target #:ldc #:dub #:pkg-config #:inputs #:native-inputs #:outputs))
+ '(#:target #:ldc #:dub #:pkg-config #:inputs #:native-inputs #:outputs))
(and (not target) ;; TODO: support cross-compilation
(bag
diff --git a/guix/build-system/dune.scm b/guix/build-system/dune.scm
index 5b33ef6841..12100fd8e8 100644
--- a/guix/build-system/dune.scm
+++ b/guix/build-system/dune.scm
@@ -1,6 +1,7 @@
;;; 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.
@@ -21,7 +22,7 @@
(define-module (guix build-system dune)
#:use-module (guix store)
#:use-module (guix utils)
- #:use-module (guix derivations)
+ #:use-module (guix gexp)
#:use-module (guix search-paths)
#:use-module (guix build-system)
#:use-module ((guix build-system gnu) #:prefix gnu:)
@@ -72,7 +73,7 @@
"--profile" "release")))
(define private-keywords
- '(#:source #:target #:dune #:findlib #:ocaml #:inputs #:native-inputs))
+ '(#:target #:dune #:findlib #:ocaml #:inputs #:native-inputs))
(and (not target) ;XXX: no cross-compilation
(let ((base (ocaml:lower name
@@ -94,8 +95,9 @@
`(#:dune-release-flags ,dune-release-flags)
(strip-keyword-arguments private-keywords arguments)))))))
-(define* (dune-build store name inputs
- #:key (guile #f)
+(define* (dune-build name inputs
+ #:key
+ guile source
(outputs '("out"))
(search-paths '())
(build-flags ''())
@@ -122,51 +124,40 @@
"Build SOURCE using OCAML, and with INPUTS. This assumes that SOURCE
provides a 'setup.ml' file as its build system."
(define builder
- `(begin
- (use-modules ,@modules)
- (dune-build #:source ,(match (assoc-ref inputs "source")
- (((? derivation? source))
- (derivation->output-path source))
- ((source)
- source)
- (source
- source))
- #:system ,system
- #:outputs %outputs
- #:inputs %build-inputs
- #:search-paths ',(map search-path-specification->sexp
- search-paths)
- #:phases ,phases
- #:test-flags ,test-flags
- #:build-flags ,build-flags
- #:out-of-source? ,out-of-source?
- #:jbuild? ,jbuild?
- #:package ,package
- #:dune-release-flags ,dune-release-flags
- #:tests? ,tests?
- #:test-target ,test-target
- #:install-target ,install-target
- #:validate-runpath? ,validate-runpath?
- #:patch-shebangs? ,patch-shebangs?
- #:strip-binaries? ,strip-binaries?
- #:strip-flags ,strip-flags
- #:strip-directories ,strip-directories)))
+ (with-imported-modules imported-modules
+ #~(begin
+ (use-modules #$@modules)
+ (dune-build #:source #$source
+ #:system #$system
+ #:outputs (list #$@(map (lambda (name)
+ #~(cons #$name
+ (ungexp output name)))
+ outputs))
+ #:inputs (map (lambda (tuple)
+ (apply cons tuple))
+ '#$inputs)
+ #:search-paths '#$(map search-path-specification->sexp
+ search-paths)
+ #:phases #$phases
+ #:test-flags #$test-flags
+ #:build-flags #$build-flags
+ #:out-of-source? #$out-of-source?
+ #:jbuild? #$jbuild?
+ #:package #$package
+ #:dune-release-flags #$dune-release-flags
+ #:tests? #$tests?
+ #:test-target #$test-target
+ #:install-target #$install-target
+ #:validate-runpath? #$validate-runpath?
+ #:patch-shebangs? #$patch-shebangs?
+ #:strip-binaries? #$strip-binaries?
+ #:strip-flags #$strip-flags
+ #:strip-directories #$strip-directories))))
- (define guile-for-build
- (match guile
- ((? package?)
- (package-derivation store guile system #:graft? #f))
- (#f ; the default
- (let* ((distro (resolve-interface '(gnu packages commencement)))
- (guile (module-ref distro 'guile-final)))
- (package-derivation store guile system #:graft? #f)))))
-
- (build-expression->derivation store name builder
- #:system system
- #:inputs inputs
- #:modules imported-modules
- #:outputs outputs
- #:guile-for-build guile-for-build))
+ (gexp->derivation name builder
+ #:system system
+ #:target #f
+ #:guile-for-build guile))
(define dune-build-system
(build-system
diff --git a/guix/build-system/emacs.scm b/guix/build-system/emacs.scm
index ac05ff420e..3df68789ff 100644
--- a/guix/build-system/emacs.scm
+++ b/guix/build-system/emacs.scm
@@ -23,7 +23,8 @@
#:use-module (guix store)
#:use-module (guix utils)
#:use-module (guix packages)
- #:use-module (guix derivations)
+ #:use-module (guix gexp)
+ #:use-module (guix monads)
#:use-module (guix search-paths)
#:use-module (guix build-system)
#:use-module (guix build-system gnu)
@@ -81,13 +82,12 @@
(build emacs-build)
(arguments (strip-keyword-arguments private-keywords arguments)))))
-(define* (emacs-build store name inputs
+(define* (emacs-build name inputs
#:key source
(tests? #f)
(parallel-tests? #t)
(test-command ''("make" "check"))
- (phases '(@ (guix build emacs-build-system)
- %standard-phases))
+ (phases '%standard-phases)
(outputs '("out"))
(include (quote %default-include))
(exclude (quote %default-exclude))
@@ -100,43 +100,29 @@
(guix build emacs-utils))))
"Build SOURCE using EMACS, and with INPUTS."
(define builder
- `(begin
- (use-modules ,@modules)
- (emacs-build #:name ,name
- #:source ,(match (assoc-ref inputs "source")
- (((? derivation? source))
- (derivation->output-path source))
- ((source)
- source)
- (source
- source))
- #:system ,system
- #:test-command ,test-command
- #:tests? ,tests?
- #:parallel-tests? ,parallel-tests?
- #:phases ,phases
- #:outputs %outputs
- #:include ,include
- #:exclude ,exclude
- #:search-paths ',(map search-path-specification->sexp
- search-paths)
- #:inputs %build-inputs)))
+ (with-imported-modules imported-modules
+ #~(begin
+ (use-modules #$@(sexp->gexp modules))
+ (emacs-build #:name #$name
+ #:source #+source
+ #:system #$system
+ #:test-command #$test-command
+ #:tests? #$tests?
+ #:parallel-tests? #$parallel-tests?
+ #:phases #$phases
+ #:outputs #$(outputs->gexp outputs)
+ #:include #$include
+ #:exclude #$exclude
+ #:search-paths '#$(sexp->gexp
+ (map search-path-specification->sexp
+ search-paths))
+ #:inputs #$(input-tuples->gexp inputs)))))
- (define guile-for-build
- (match guile
- ((? package?)
- (package-derivation store guile system #:graft? #f))
- (#f ; the default
- (let* ((distro (resolve-interface '(gnu packages commencement)))
- (guile (module-ref distro 'guile-final)))
- (package-derivation store guile system #:graft? #f)))))
-
- (build-expression->derivation store name builder
- #: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 emacs-build-system
(build-system
diff --git a/guix/build-system/font.scm b/guix/build-system/font.scm
index d40a4985f8..74dc80b5db 100644
--- a/guix/build-system/font.scm
+++ b/guix/build-system/font.scm
@@ -17,6 +17,9 @@
;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
(define-module (guix build-system font)
+ #:use-module (guix gexp)
+ #:use-module (guix store)
+ #:use-module (guix monads)
#:use-module (guix utils)
#:use-module (guix packages)
#:use-module (guix derivations)
@@ -69,13 +72,12 @@
(build font-build)
(arguments (strip-keyword-arguments private-keywords arguments))))
-(define* (font-build store name inputs
+(define* (font-build name inputs
#:key source
(tests? #t)
(test-target "test")
(configure-flags ''())
- (phases '(@ (guix build font-build-system)
- %standard-phases))
+ (phases '%standard-phases)
(outputs '("out"))
(search-paths '())
(system (%current-system))
@@ -85,41 +87,32 @@
(guix build utils))))
"Build SOURCE with INPUTS."
(define builder
- `(begin
- (use-modules ,@modules)
- (font-build #:name ,name
- #:source ,(match (assoc-ref inputs "source")
- (((? derivation? source))
- (derivation->output-path source))
- ((source)
- source)
- (source
- source))
- #:configure-flags ,configure-flags
- #:system ,system
- #:test-target ,test-target
- #:tests? ,tests?
- #:phases ,phases
- #:outputs %outputs
- #:search-paths ',(map search-path-specification->sexp
- search-paths)
- #:inputs %build-inputs)))
+ (with-imported-modules imported-modules
+ #~(begin
+ (use-modules #$@modules)
- (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)))))
+ #$(with-build-variables inputs outputs
+ #~(font-build #:name #$name
+ #:source #+source
+ #:configure-flags #$configure-flags
+ #:system #$system
+ #:test-target #$test-target
+ #:tests? #$tests?
+ #:phases #$(if (pair? phases)
+ (sexp->gexp phases)
+ phases)
+ #:outputs %outputs
+ #:search-paths '#$(sexp->gexp
+ (map search-path-specification->sexp
+ search-paths))
+ #:inputs %build-inputs)))))
- (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
+ #:target #f
+ #:guile-for-build guile)))
(define font-build-system
(build-system
diff --git a/guix/build-system/glib-or-gtk.scm b/guix/build-system/glib-or-gtk.scm
index fb1f8fb930..aa9703829b 100644
--- a/guix/build-system/glib-or-gtk.scm
+++ b/guix/build-system/glib-or-gtk.scm
@@ -1,7 +1,8 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2013, 2014, 2015, 2019, 2020 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2013, 2014, 2015, 2019, 2020, 2021 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2013 Cyril Roelandt <tipecaml@gmail.com>
;;; Copyright © 2014 Federico Beffa <beffa@fbengineering.ch>
+;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -21,15 +22,21 @@
(define-module (guix build-system glib-or-gtk)
#:use-module (guix store)
#:use-module (guix utils)
+ #:use-module (guix gexp)
+ #:use-module (guix monads)
#:use-module (guix derivations)
#:use-module (guix search-paths)
+ #:use-module ((guix build glib-or-gtk-build-system)
+ #:select (%gdk-pixbuf-loaders-cache-file))
#:use-module (guix build-system)
#:use-module (guix build-system gnu)
#:use-module (guix packages)
#:use-module (ice-9 match)
#:export (%glib-or-gtk-build-system-modules
glib-or-gtk-build
- glib-or-gtk-build-system))
+ glib-or-gtk-cross-build
+ glib-or-gtk-build-system)
+ #:re-export (%gdk-pixbuf-loaders-cache-file)) ;for convenience
;; Commentary:
;;
@@ -80,33 +87,45 @@
#:key source inputs native-inputs outputs system target
(glib (default-glib))
(implicit-inputs? #t)
+ (implicit-cross-inputs? #t)
(strip-binaries? #t)
#:allow-other-keys
#:rest arguments)
"Return a bag for NAME."
(define private-keywords
- '(#:source #:target #:glib #:inputs #:native-inputs
- #:outputs #:implicit-inputs?))
-
- (and (not target) ;XXX: no cross-compilation
- (bag
- (name name)
- (system system)
- (host-inputs (if source
- `(("source" ,source))
- '()))
- (build-inputs `(,@native-inputs
- ,@inputs
- ("glib:bin" ,glib "bin") ; to compile schemas
- ,@(if implicit-inputs?
- (standard-packages)
- '())))
- (outputs outputs)
- (build glib-or-gtk-build)
- (arguments (strip-keyword-arguments private-keywords arguments)))))
-
-(define* (glib-or-gtk-build store name inputs
- #:key (guile #f)
+ `(#:glib #:inputs #:native-inputs
+ #:outputs #:implicit-inputs? #:implicit-cross-inputs?
+ ,@(if target '() '(#:target))))
+
+ (bag
+ (name name)
+ (system system) (target target)
+ (host-inputs `(,@(if source
+ `(("source" ,source))
+ '())
+ ,@(if target
+ inputs
+ '())))
+ (build-inputs `(,@native-inputs
+ ,@(if target '() inputs)
+ ("glib:bin" ,glib "bin") ; to compile schemas
+ ;; Keep standard inputs of gnu-build-system.
+ ,@(if (and target implicit-cross-inputs?)
+ (standard-cross-packages target 'host)
+ '())
+ ,@(if implicit-inputs?
+ (standard-packages)
+ '())))
+ ;; Keep standard inputs of 'gnu-build-system'.
+ (target-inputs (if (and target implicit-cross-inputs?)
+ (standard-cross-packages target 'target)
+ '()))
+ (outputs outputs)
+ (build (if target glib-or-gtk-cross-build glib-or-gtk-build))
+ (arguments (strip-keyword-arguments private-keywords arguments))))
+
+(define* (glib-or-gtk-build name inputs
+ #:key guile source
(outputs '("out"))
(search-paths '())
(configure-flags ''())
@@ -132,70 +151,143 @@
allowed-references
disallowed-references)
"Build SOURCE with INPUTS. See GNU-BUILD for more details."
- (define canonicalize-reference
- (match-lambda
- ((? package? p)
- (derivation->output-path (package-derivation store p system)))
- (((? package? p) output)
- (derivation->output-path (package-derivation store p system)
- output))
- ((? string? output)
- output)))
+ (define build
+ (with-imported-modules imported-modules
+ #~(begin
+ (use-modules #$@(sexp->gexp modules))
+
+ #$(with-build-variables inputs outputs
+ #~(glib-or-gtk-build #:source #+source
+ #:system #$system
+ #:outputs %outputs
+ #:inputs %build-inputs
+ #:search-paths '#$(sexp->gexp
+ (map search-path-specification->sexp
+ search-paths))
+ #:phases #$(if (pair? phases)
+ (sexp->gexp phases)
+ phases)
+ #:glib-or-gtk-wrap-excluded-outputs
+ #$glib-or-gtk-wrap-excluded-outputs
+ #:configure-flags #$configure-flags
+ #:make-flags #$make-flags
+ #:out-of-source? #$out-of-source?
+ #:tests? #$tests?
+ #:test-target #$test-target
+ #:parallel-build? #$parallel-build?
+ #:parallel-tests? #$parallel-tests?
+ #:validate-runpath? #$validate-runpath?
+ #:patch-shebangs? #$patch-shebangs?
+ #:strip-binaries? #$strip-binaries?
+ #:strip-flags #$(sexp->gexp strip-flags)
+ #:strip-directories
+ #$(sexp->gexp strip-directories))))))
+
+ (mlet %store-monad ((guile (package->derivation (or guile (default-guile))
+ system #:graft? #f)))
+ (gexp->derivation name build
+ #:system system
+ #:target #f
+ #:graft? #f
+ #:allowed-references allowed-references
+ #:disallowed-references disallowed-references
+ #:guile-for-build guile)))
+
+(define* (glib-or-gtk-cross-build name
+ #:key
+ target
+ build-inputs target-inputs host-inputs
+ guile source
+ (outputs '("out"))
+ (search-paths '())
+ (native-search-paths '())
+ (configure-flags ''())
+ ;; Disable icon theme cache generation.
+ (make-flags ''("gtk_update_icon_cache=true"))
+ (out-of-source? #f)
+ (tests? #f)
+ (test-target "check")
+ (parallel-build? #t)
+ (parallel-tests? #t)
+ (validate-runpath? #t)
+ (make-dynamic-linker-cache? #f)
+ (patch-shebangs? #t)
+ (strip-binaries? #t)
+ (strip-flags ''("--strip-debug"))
+ (strip-directories ''("lib" "lib64" "libexec"
+ "bin" "sbin"))
+ (phases '(@ (guix build glib-or-gtk-build-system)
+ %standard-phases))
+ (glib-or-gtk-wrap-excluded-outputs ''())
+ (system (%current-system))
+ (build (nix-system->gnu-triplet system))
+ (imported-modules %glib-or-gtk-build-system-modules)
+ (modules %default-modules)
+ allowed-references
+ disallowed-references)
+ "Cross-build SOURCE with INPUTS. See GNU-BUILD for more details."
(define builder
- `(begin
- (use-modules ,@modules)
- (glib-or-gtk-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
- #:glib-or-gtk-wrap-excluded-outputs
- ,glib-or-gtk-wrap-excluded-outputs
- #:configure-flags ,configure-flags
- #:make-flags ,make-flags
- #:out-of-source? ,out-of-source?
- #:tests? ,tests?
- #:test-target ,test-target
- #:parallel-build? ,parallel-build?
- #:parallel-tests? ,parallel-tests?
- #: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
- #:allowed-references
- (and allowed-references
- (map canonicalize-reference
- allowed-references))
- #:disallowed-references
- (and disallowed-references
- (map canonicalize-reference
- disallowed-references))
- #:guile-for-build guile-for-build))
+ #~(begin
+ (use-modules #$@(sexp->gexp modules))
+
+ (define %build-host-inputs
+ #+(input-tuples->gexp build-inputs))
+
+ (define %build-target-inputs
+ (append #$(input-tuples->gexp host-inputs)
+ #+(input-tuples->gexp target-inputs)))
+
+ (define %build-inputs
+ (append %build-host-inputs %build-target-inputs))
+
+ (define %outputs
+ #$(outputs->gexp outputs))
+
+ (glib-or-gtk-build #:source #+source
+ #:system #$system
+ #:build #$build
+ #:target #$target
+ #:outputs %outputs
+ #:inputs %build-target-inputs
+ #:native-inputs %build-host-inputs
+ #:search-paths '#$(sexp->gexp
+ (map search-path-specification->sexp
+ search-paths))
+ #:native-search-paths '#$(sexp->gexp
+ (map search-path-specification->sexp
+ native-search-paths))
+ #:phases #$(if (pair? phases)
+ (sexp->gexp phases)
+ phases)
+ #:glib-or-gtk-wrap-excluded-outputs
+ #$glib-or-gtk-wrap-excluded-outputs
+ #:configure-flags #$configure-flags
+ #:make-flags #$make-flags
+ #:out-of-source? #$out-of-source?
+ #:tests? #$tests?
+ #:test-target #$test-target
+ #:parallel-build? #$parallel-build?
+ #:parallel-tests? #$parallel-tests?
+ #:validate-runpath? #$validate-runpath?
+ #:make-dynamic-linker-cache? #$make-dynamic-linker-cache?
+ #:patch-shebangs? #$patch-shebangs?
+ #:strip-binaries? #$strip-binaries?
+ #:strip-flags #$(sexp->gexp strip-flags)
+ #:strip-directories
+ #$(sexp->gexp strip-directories))))
+
+
+ (mlet %store-monad ((guile (package->derivation (or guile (default-guile))
+ system #:graft? #f)))
+ (gexp->derivation name builder
+ #:system system
+ #:target target
+ #:graft? #f
+ #:modules imported-modules
+ #:allowed-references allowed-references
+ #:disallowed-references disallowed-references
+ #:guile-for-build guile)))
(define glib-or-gtk-build-system
(build-system
diff --git a/guix/build-system/gnu.scm b/guix/build-system/gnu.scm
index 6b481ad45c..651415098e 100644
--- a/guix/build-system/gnu.scm
+++ b/guix/build-system/gnu.scm
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2019, 2020 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021 Ludovic Courtès <ludo@gnu.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -20,6 +20,8 @@
#:use-module (guix store)
#:use-module (guix utils)
#:use-module (guix memoization)
+ #:use-module (guix gexp)
+ #:use-module (guix monads)
#:use-module (guix derivations)
#:use-module (guix search-paths)
#:use-module (guix build-system)
@@ -215,7 +217,7 @@ use `--strip-all' as the arguments to `strip'."
(arguments
(let ((a (default-keyword-arguments (package-arguments p)
'(#:configure-flags '()
- #:strip-flags '("--strip-debug")))))
+ #:strip-flags '("--strip-unneeded")))))
(substitute-keyword-arguments a
((#:configure-flags flags)
`(cons* "--disable-shared" "LDFLAGS=-static" ,flags))
@@ -281,7 +283,7 @@ standard packages used as implicit inputs of the GNU build system."
#:rest arguments)
"Return a bag for NAME from the given arguments."
(define private-keywords
- `(#:source #:inputs #:native-inputs #:outputs
+ `(#:inputs #:native-inputs #:outputs
#:implicit-inputs? #:implicit-cross-inputs?
,@(if target '() '(#:target))))
@@ -324,10 +326,22 @@ standard packages used as implicit inputs of the GNU build system."
;; Regexp matching license files.
"^(COPYING.*|LICEN[CS]E.*|[Ll]icen[cs]e.*|Copy[Rr]ight(\\.(txt|md))?)$")
-(define* (gnu-build store name input-drvs
- #:key (guile #f)
+(define %bootstrap-scripts
+ ;; Typical names of Autotools "bootstrap" scripts.
+ #~%bootstrap-scripts)
+
+(define %strip-flags
+ #~'("--strip-unneeded" "--enable-deterministic-archives"))
+
+(define %strip-directories
+ #~'("lib" "lib64" "libexec" "bin" "sbin"))
+
+(define* (gnu-build name inputs
+ #:key
+ guile source
(outputs '("out"))
(search-paths '())
+ (bootstrap-scripts %bootstrap-scripts)
(configure-flags ''())
(make-flags ''())
(out-of-source? #f)
@@ -337,11 +351,10 @@ standard packages used as implicit inputs of the GNU build system."
(parallel-tests? #t)
(patch-shebangs? #t)
(strip-binaries? #t)
- (strip-flags ''("--strip-debug"
- "--enable-deterministic-archives"))
- (strip-directories ''("lib" "lib64" "libexec"
- "bin" "sbin"))
+ (strip-flags %strip-flags)
+ (strip-directories %strip-directories)
(validate-runpath? #t)
+ (make-dynamic-linker-cache? #t)
(license-file-regexp %license-file-regexp)
(phases '%standard-phases)
(locale "en_US.utf8")
@@ -368,78 +381,58 @@ SUBSTITUTABLE? determines whether users may be able to use substitutes of the
returned derivations, or whether they should always build it locally.
ALLOWED-REFERENCES can be either #f, or a list of packages that the outputs
-are allowed to refer to. Likewise for DISALLOWED-REFERENCES, which lists
-packages that must not be referenced."
- (define canonicalize-reference
- (match-lambda
- ((? package? p)
- (derivation->output-path (package-derivation store p system
- #:graft? #f)))
- (((? package? p) output)
- (derivation->output-path (package-derivation store p system
- #:graft? #f)
- output))
- ((? string? output)
- output)))
-
+are allowed to refer to."
(define builder
- `(begin
- (use-modules ,@modules)
- (gnu-build #:source ,(match (assoc-ref input-drvs "source")
- (((? derivation? source))
- (derivation->output-path source))
- ((source)
- source)
- (source
- source))
- #:system ,system
- #:build ,build
- #:outputs %outputs
- #:inputs %build-inputs
- #:search-paths ',(map search-path-specification->sexp
- search-paths)
- #:phases ,phases
- #:locale ,locale
- #:configure-flags ,configure-flags
- #:make-flags ,make-flags
- #:out-of-source? ,out-of-source?
- #:tests? ,tests?
- #:test-target ,test-target
- #:parallel-build? ,parallel-build?
- #:parallel-tests? ,parallel-tests?
- #:patch-shebangs? ,patch-shebangs?
- #:strip-binaries? ,strip-binaries?
- #:validate-runpath? ,validate-runpath?
- #:license-file-regexp ,license-file-regexp
- #: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 input-drvs
- #:outputs outputs
- #:modules imported-modules
- #:substitutable? substitutable?
-
- #:allowed-references
- (and allowed-references
- (map canonicalize-reference
- allowed-references))
- #:disallowed-references
- (and disallowed-references
- (map canonicalize-reference
- disallowed-references))
- #:guile-for-build guile-for-build))
+ (with-imported-modules imported-modules
+ #~(begin
+ (use-modules #$@(sexp->gexp modules))
+
+ #$(with-build-variables inputs outputs
+ #~(gnu-build #:source #+source
+ #:system #$system
+ #:build #$build
+ #:outputs %outputs
+ #:inputs %build-inputs
+ #:search-paths '#$(sexp->gexp
+ (map search-path-specification->sexp
+ search-paths))
+ #:phases #$(if (pair? phases)
+ (sexp->gexp phases)
+ phases)
+ #:locale #$locale
+ #:bootstrap-scripts #$bootstrap-scripts
+ #:configure-flags #$(if (pair? configure-flags)
+ (sexp->gexp configure-flags)
+ configure-flags)
+ #:make-flags #$(if (pair? make-flags)
+ (sexp->gexp make-flags)
+ make-flags)
+ #:out-of-source? #$out-of-source?
+ #:tests? #$tests?
+ #:test-target #$test-target
+ #:parallel-build? #$parallel-build?
+ #:parallel-tests? #$parallel-tests?
+ #:patch-shebangs? #$patch-shebangs?
+ #:license-file-regexp #$license-file-regexp
+ #:strip-binaries? #$strip-binaries?
+ #:validate-runpath? #$validate-runpath?
+ #:make-dynamic-linker-cache? #$make-dynamic-linker-cache?
+ #:license-file-regexp #$license-file-regexp
+ #:strip-flags #$strip-flags
+ #:strip-directories #$strip-directories)))))
+
+ (mlet %store-monad ((guile (package->derivation (or guile (default-guile))
+ system #:graft? #f)))
+ ;; Note: Always pass #:graft? #f. Without it, ALLOWED-REFERENCES &
+ ;; co. would be interpreted as referring to grafted packages.
+ (gexp->derivation name builder
+ #:system system
+ #:target #f
+ #:graft? #f
+ #:substitutable? substitutable?
+ #:allowed-references allowed-references
+ #:disallowed-references disallowed-references
+ #:guile-for-build guile)))
;;;
@@ -475,15 +468,16 @@ is one of `host' or `target'."
`(("cross-libc:static" ,libc "static"))
'()))))))))
-(define* (gnu-cross-build store name
+(define* (gnu-cross-build name
#:key
- target native-drvs target-drvs
- (guile #f)
- source
+ target
+ build-inputs target-inputs host-inputs
+ guile source
(outputs '("out"))
(search-paths '())
(native-search-paths '())
+ (bootstrap-scripts %bootstrap-scripts)
(configure-flags ''())
(make-flags ''())
(out-of-source? #f)
@@ -492,11 +486,15 @@ is one of `host' or `target'."
(parallel-build? #t) (parallel-tests? #t)
(patch-shebangs? #t)
(strip-binaries? #t)
- (strip-flags ''("--strip-debug"
- "--enable-deterministic-archives"))
- (strip-directories ''("lib" "lib64" "libexec"
- "bin" "sbin"))
+ (strip-flags %strip-flags)
+ (strip-directories %strip-directories)
(validate-runpath? #t)
+
+ ;; We run 'ldconfig' to generate ld.so.cache and it
+ ;; generally can't do that for cross-built binaries
+ ;; ("ldconfig: foo.so is for unknown machine 40.").
+ (make-dynamic-linker-cache? #f)
+
(license-file-regexp %license-file-regexp)
(phases '%standard-phases)
(locale "en_US.utf8")
@@ -510,102 +508,67 @@ is one of `host' or `target'."
"Cross-build NAME for TARGET, where TARGET is a GNU triplet. INPUTS are
cross-built inputs, and NATIVE-INPUTS are inputs that run on the build
platform."
- (define canonicalize-reference
- (match-lambda
- ((? package? p)
- (derivation->output-path (package-cross-derivation store p
- target system)))
- (((? package? p) output)
- (derivation->output-path (package-cross-derivation store p
- target system)
- output))
- ((? string? output)
- output)))
-
(define builder
- `(begin
- (use-modules ,@modules)
-
- (let ()
- (define %build-host-inputs
- ',(map (match-lambda
- ((name (? derivation? drv) sub ...)
- `(,name . ,(apply derivation->output-path drv sub)))
- ((name path)
- `(,name . ,path)))
- native-drvs))
-
- (define %build-target-inputs
- ',(map (match-lambda
- ((name (? derivation? drv) sub ...)
- `(,name . ,(apply derivation->output-path drv sub)))
- ((name (? package? pkg) sub ...)
- (let ((drv (package-cross-derivation store pkg
- target system)))
- `(,name . ,(apply derivation->output-path drv sub))))
- ((name path)
- `(,name . ,path)))
- target-drvs))
-
- (gnu-build #:source ,(match (assoc-ref native-drvs "source")
- (((? derivation? source))
- (derivation->output-path source))
- ((source)
- source)
- (source
- source))
- #:system ,system
- #:build ,build
- #:target ,target
- #:outputs %outputs
- #:inputs %build-target-inputs
- #:native-inputs %build-host-inputs
- #:search-paths ',(map search-path-specification->sexp
- search-paths)
- #:native-search-paths ',(map
- search-path-specification->sexp
- native-search-paths)
- #:phases ,phases
- #:locale ,locale
- #:configure-flags ,configure-flags
- #:make-flags ,make-flags
- #:out-of-source? ,out-of-source?
- #:tests? ,tests?
- #:test-target ,test-target
- #:parallel-build? ,parallel-build?
- #:parallel-tests? ,parallel-tests?
- #:patch-shebangs? ,patch-shebangs?
- #:strip-binaries? ,strip-binaries?
- #:validate-runpath? ,validate-runpath?
- #:license-file-regexp ,license-file-regexp
- #: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 (append native-drvs target-drvs)
- #:outputs outputs
- #:modules imported-modules
- #:substitutable? substitutable?
-
- #:allowed-references
- (and allowed-references
- (map canonicalize-reference
- allowed-references))
- #:disallowed-references
- (and disallowed-references
- (map canonicalize-reference
- disallowed-references))
- #:guile-for-build guile-for-build))
+ #~(begin
+ (use-modules #$@(sexp->gexp modules))
+
+ (define %build-host-inputs
+ #+(input-tuples->gexp build-inputs))
+
+ (define %build-target-inputs
+ (append #$(input-tuples->gexp host-inputs)
+ #+(input-tuples->gexp target-inputs)))
+
+ (define %build-inputs
+ (append %build-host-inputs %build-target-inputs))
+
+ (define %outputs
+ #$(outputs->gexp outputs))
+
+ (gnu-build #:source #+source
+ #:system #$system
+ #:build #$build
+ #:target #$target
+ #:outputs %outputs
+ #:inputs %build-target-inputs
+ #:native-inputs %build-host-inputs
+ #:search-paths '#$(sexp->gexp
+ (map search-path-specification->sexp
+ search-paths))
+ #:native-search-paths '#$(sexp->gexp
+ (map
+ search-path-specification->sexp
+ native-search-paths))
+ #:phases #$phases
+ #:locale #$locale
+ #:bootstrap-scripts #$bootstrap-scripts
+ #:configure-flags #$configure-flags
+ #:make-flags #$make-flags
+ #:out-of-source? #$out-of-source?
+ #:tests? #$tests?
+ #:test-target #$test-target
+ #:parallel-build? #$parallel-build?
+ #:parallel-tests? #$parallel-tests?
+ #:patch-shebangs? #$patch-shebangs?
+ #:license-file-regexp #$license-file-regexp
+ #:strip-binaries? #$strip-binaries?
+ #:validate-runpath? #$validate-runpath?
+ #:make-dynamic-linker-cache? #$make-dynamic-linker-cache?
+ #:license-file-regexp #$license-file-regexp
+ #:strip-flags #$strip-flags
+ #:strip-directories #$strip-directories)))
+
+ (mlet %store-monad ((guile (package->derivation (or guile (default-guile))
+ system #:graft? #f)))
+ (gexp->derivation name builder
+ #:system system
+ #:target target
+ #:graft? #f
+ #:modules imported-modules
+ #:substitutable? substitutable?
+ #:allowed-references allowed-references
+ #:disallowed-references disallowed-references
+ #:guile-for-build guile)))
(define gnu-build-system
(build-system
diff --git a/guix/build-system/go.scm b/guix/build-system/go.scm
index 757e63afe9..18824c79d9 100644
--- a/guix/build-system/go.scm
+++ b/guix/build-system/go.scm
@@ -2,6 +2,7 @@
;;; Copyright © 2016 Petter <petter@mykolab.ch>
;;; Copyright © 2017 Leo Famulari <leo@famulari.name>
;;; Copyright © 2020 Jakub Kądziołka <kuba@kadziolka.net>
+;;; Copyright © 2021 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2021 Efraim Flashner <efraim@flashner.co.il>
;;;
;;; This file is part of GNU Guix.
@@ -21,7 +22,9 @@
(define-module (guix build-system go)
#:use-module (guix utils)
- #:use-module (guix derivations)
+ #:use-module (guix gexp)
+ #:use-module (guix store)
+ #:use-module (guix monads)
#:use-module (guix search-paths)
#:use-module (guix build-system)
#:use-module (guix build-system gnu)
@@ -116,7 +119,7 @@ commit hash and its date rather than a proper release tag."
#:rest arguments)
"Return a bag for NAME."
(define private-keywords
- '(#:source #:target #:go #:inputs #:native-inputs))
+ '(#:target #:go #:inputs #:native-inputs))
(bag
(name name)
@@ -150,10 +153,10 @@ commit hash and its date rather than a proper release tag."
(build (if target go-cross-build go-build))
(arguments (strip-keyword-arguments private-keywords arguments))))
-(define* (go-build store name inputs
+(define* (go-build name inputs
#:key
- (phases '(@ (guix build go-build-system)
- %standard-phases))
+ source
+ (phases '%standard-phases)
(outputs '("out"))
(search-paths '())
(install-source? #t)
@@ -171,53 +174,38 @@ commit hash and its date rather than a proper release tag."
(guix build union)
(guix build utils))))
(define builder
- `(begin
- (use-modules ,@modules)
- (go-build #:name ,name
- #:source ,(match (assoc-ref inputs "source")
- (((? derivation? source))
- (derivation->output-path source))
- ((source)
- source)
- (source
- source))
- #:system ,system
- #:phases ,phases
- #:outputs %outputs
- #:goarch ,goarch
- #:goos ,goos
- #:search-paths ',(map search-path-specification->sexp
- search-paths)
- #:install-source? ,install-source?
- #:import-path ,import-path
- #:unpack-path ,unpack-path
- #:build-flags ,build-flags
- #:tests? ,tests?
- #:allow-go-reference? ,allow-go-reference?
- #:inputs %build-inputs)))
+ (with-imported-modules imported-modules
+ #~(begin
+ (use-modules #$@modules)
+ (go-build #:name #$name
+ #:source #+source
+ #:system #$system
+ #:phases #$phases
+ #:outputs #$(outputs->gexp outputs)
+ #:goarch #$goarch
+ #:goos #$goos
+ #:search-paths '#$(sexp->gexp
+ (map search-path-specification->sexp
+ search-paths))
+ #:install-source? #$install-source?
+ #:import-path #$import-path
+ #:unpack-path #$unpack-path
+ #:build-flags #$build-flags
+ #:tests? #$tests?
+ #:allow-go-reference? #$allow-go-reference?
+ #:inputs #$(input-tuples->gexp inputs)))))
- (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)))))
+ (mlet %store-monad ((guile (package->derivation (or guile (default-guile))
+ system #:graft? #f)))
+ (gexp->derivation name builder
+ #:system system
+ #:guile-for-build guile)))
- (build-expression->derivation store name builder
- #:inputs inputs
- #:system system
- #:modules imported-modules
- #:outputs outputs
- #:guile-for-build guile-for-build))
-
-(define* (go-cross-build store name
+(define* (go-cross-build name
#:key
- target native-drvs target-drvs
- (phases '(@ (guix build go-build-system)
- %standard-phases))
+ source target
+ build-inputs target-inputs host-inputs
+ (phases '%standard-phases)
(outputs '("out"))
(search-paths '())
(native-search-paths '())
@@ -225,7 +213,7 @@ commit hash and its date rather than a proper release tag."
(import-path "")
(unpack-path "")
(build-flags ''())
- (tests? #f) ; nothing can be done
+ (tests? #f) ; nothing can be done
(allow-go-reference? #f)
(system (%current-system))
(goarch (first (go-target target)))
@@ -237,73 +225,53 @@ commit hash and its date rather than a proper release tag."
(guix build utils))))
"Cross-build NAME using GO, where TARGET is a GNU triplet and with INPUTS."
(define builder
- `(begin
- (use-modules ,@modules)
- (let ()
- (define %build-host-inputs
- ',(map (match-lambda
- ((name (? derivation? drv) sub ...)
- `(,name . ,(apply derivation->output-path drv sub)))
- ((name path)
- `(,name . ,path)))
- native-drvs))
+ #~(begin
+ (use-modules #$@(sexp->gexp modules))
- (define %build-target-inputs
- ',(map (match-lambda
- ((name (? derivation? drv) sub ...)
- `(,name . ,(apply derivation->output-path drv sub)))
- ((name (? package? pkg) sub ...)
- (let ((drv (package-cross-derivation store pkg
- target system)))
- `(,name . ,(apply derivation->output-path drv sub))))
- ((name path)
- `(,name . ,path)))
- target-drvs))
+ (define %build-host-inputs
+ #+(input-tuples->gexp build-inputs))
- (go-build #:name ,name
- #:source ,(match (assoc-ref native-drvs "source")
- (((? derivation? source))
- (derivation->output-path source))
- ((source)
- source)
- (source
- source))
- #:system ,system
- #:phases ,phases
- #:outputs %outputs
- #:target ,target
- #:goarch ,goarch
- #:goos ,goos
- #:inputs %build-target-inputs
- #:native-inputs %build-host-inputs
- #:search-paths ',(map search-path-specification->sexp
- search-paths)
- #:native-search-paths ',(map
- search-path-specification->sexp
- native-search-paths)
- #:install-source? ,install-source?
- #:import-path ,import-path
- #:unpack-path ,unpack-path
- #:build-flags ,build-flags
- #:tests? ,tests?
- #:allow-go-reference? ,allow-go-reference?
- #:inputs %build-inputs))))
+ (define %build-target-inputs
+ (append #$(input-tuples->gexp host-inputs)
+ #+(input-tuples->gexp target-inputs)))
+
+ (define %build-inputs
+ (append %build-host-inputs %build-target-inputs))
- (define guile-for-build
- (match guile
- ((? package?)
- (package-derivation store guile system #:graft? #f))
- (#f ; the default
- (let* ((distro (resolve-interface '(gnu packages commencement)))
- (guile (module-ref distro 'guile-final)))
- (package-derivation store guile system #:graft? #f)))))
+ (define %outputs
+ #$(outputs->gexp outputs))
+
+ (go-build #:name #$name
+ #:source #+source
+ #:system #$system
+ #:phases #$phases
+ #:outputs %outputs
+ #:target #$target
+ #:goarch #$goarch
+ #:goos #$goos
+ #:inputs %build-target-inputs
+ #:native-inputs %build-host-inputs
+ #:search-paths '#$(map search-path-specification->sexp
+ search-paths)
+ #:native-search-paths '#$(map
+ search-path-specification->sexp
+ native-search-paths)
+ #:install-source? #$install-source?
+ #:import-path #$import-path
+ #:unpack-path #$unpack-path
+ #:build-flags #$build-flags
+ #:tests? #$tests?
+ #:allow-go-reference? #$allow-go-reference?
+ #:inputs %build-inputs)))
- (build-expression->derivation store name builder
- #:system system
- #:inputs (append native-drvs target-drvs)
- #:outputs outputs
- #:modules imported-modules
- #:guile-for-build guile-for-build))
+ (mlet %store-monad ((guile (package->derivation (or guile (default-guile))
+ system #:graft? #f)))
+ (gexp->derivation name builder
+ #:system system
+ #:target target
+ #:graft? #f
+ #:substitutable? substitutable?
+ #:guile-for-build guile)))
(define go-build-system
(build-system
diff --git a/guix/build-system/guile.scm b/guix/build-system/guile.scm
index 45e735b987..f64f214675 100644
--- a/guix/build-system/guile.scm
+++ b/guix/build-system/guile.scm
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2018, 2019 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2018, 2019, 2021 Ludovic Courtès <ludo@gnu.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -20,7 +20,8 @@
#:use-module (guix store)
#:use-module (guix utils)
#:use-module (guix packages)
- #:use-module (guix derivations)
+ #:use-module (guix monads)
+ #:use-module (guix gexp)
#:use-module (guix search-paths)
#:use-module (guix build-system)
#:use-module (guix build-system gnu)
@@ -75,7 +76,7 @@
;; denominator between Guile 2.0 and 2.2.
''("-Wunbound-variable" "-Warity-mismatch" "-Wformat"))
-(define* (guile-build store name inputs
+(define* (guile-build name inputs
#:key source
(guile #f)
(phases '%standard-phases)
@@ -91,47 +92,34 @@
(guix build utils))))
"Build SOURCE using Guile taken from the native inputs, and with INPUTS."
(define builder
- `(begin
- (use-modules ,@modules)
- (guile-build #:name ,name
- #:source ,(match (assoc-ref inputs "source")
- (((? derivation? source))
- (derivation->output-path source))
- ((source)
- source)
- (source
- source))
- #:source-directory ,source-directory
- #:scheme-file-regexp ,scheme-file-regexp
- #:not-compiled-file-regexp ,not-compiled-file-regexp
- #:compile-flags ,compile-flags
- #:phases ,phases
- #:system ,system
- #:outputs %outputs
- #:search-paths ',(map search-path-specification->sexp
- search-paths)
- #:inputs %build-inputs)))
-
- (define guile-for-build
- (match guile
- ((? package?)
- (package-derivation store guile system #:graft? #f))
- (#f ; the default
- (let* ((distro (resolve-interface '(gnu packages commencement)))
- (guile (module-ref distro 'guile-final)))
- (package-derivation store guile system #:graft? #f)))))
-
- (build-expression->derivation store name builder
- #:inputs inputs
- #:system system
- #:modules imported-modules
- #:outputs outputs
- #:guile-for-build guile-for-build))
-
-(define* (guile-cross-build store name
+ (with-imported-modules imported-modules
+ #~(begin
+ (use-modules #$@modules)
+
+ (guile-build #:name #$name
+ #:source #+source
+ #:source-directory #$source-directory
+ #:scheme-file-regexp #$scheme-file-regexp
+ #:not-compiled-file-regexp #$not-compiled-file-regexp
+ #:compile-flags #$compile-flags
+ #:phases #$phases
+ #:system #$system
+ #:outputs #$(outputs->gexp outputs)
+ #:inputs #$(input-tuples->gexp inputs)
+ #:search-paths '#$(map search-path-specification->sexp
+ search-paths)))))
+
+ (mlet %store-monad ((guile (package->derivation (or guile (default-guile))
+ system #:graft? #f)))
+ (gexp->derivation name builder
+ #:system system
+ #:target #f
+ #:guile-for-build guile)))
+
+(define* (guile-cross-build name
#:key
(system (%current-system)) target
- native-drvs target-drvs
+ build-inputs target-inputs host-inputs
(guile #f)
source
(outputs '("out"))
@@ -146,68 +134,42 @@
(modules '((guix build guile-build-system)
(guix build utils))))
(define builder
- `(begin
- (use-modules ,@modules)
-
- (let ()
- (define %build-host-inputs
- ',(map (match-lambda
- ((name (? derivation? drv) sub ...)
- `(,name . ,(apply derivation->output-path drv sub)))
- ((name path)
- `(,name . ,path)))
- native-drvs))
-
- (define %build-target-inputs
- ',(map (match-lambda
- ((name (? derivation? drv) sub ...)
- `(,name . ,(apply derivation->output-path drv sub)))
- ((name (? package? pkg) sub ...)
- (let ((drv (package-cross-derivation store pkg
- target system)))
- `(,name . ,(apply derivation->output-path drv sub))))
- ((name path)
- `(,name . ,path)))
- target-drvs))
-
- (guile-build #:source ,(match (assoc-ref native-drvs "source")
- (((? derivation? source))
- (derivation->output-path source))
- ((source)
- source)
- (source
- source))
- #:system ,system
- #:target ,target
- #:outputs %outputs
- #:source-directory ,source-directory
- #:not-compiled-file-regexp ,not-compiled-file-regexp
- #:compile-flags ,compile-flags
- #:inputs %build-target-inputs
- #:native-inputs %build-host-inputs
- #:search-paths ',(map search-path-specification->sexp
- search-paths)
- #:native-search-paths ',(map
- search-path-specification->sexp
- native-search-paths)
- #:phases ,phases))))
-
- (define guile-for-build
- (match guile
- ((? package?)
- (package-derivation store guile system #:graft? #f))
- (#f ; the default
- (let* ((distro (resolve-interface '(gnu packages commencement)))
- (guile (module-ref distro 'guile-final)))
- (package-derivation store guile system #:graft? #f)))))
-
- (build-expression->derivation store name builder
- #:system system
- #:inputs (append native-drvs target-drvs)
- #:outputs outputs
- #:modules imported-modules
- #:substitutable? substitutable?
- #:guile-for-build guile-for-build))
+ (with-imported-modules imported-modules
+ #~(begin
+ (use-modules #$@modules)
+
+ (define %build-host-inputs
+ #+(input-tuples->gexp build-inputs))
+
+ (define %build-target-inputs
+ (append #$(input-tuples->gexp host-inputs)
+ #+(input-tuples->gexp target-inputs)))
+
+ (define %outputs
+ #$(outputs->gexp outputs))
+
+ (guile-build #:source #+source
+ #:system #$system
+ #:target #$target
+ #:outputs %outputs
+ #:source-directory #$source-directory
+ #:not-compiled-file-regexp #$not-compiled-file-regexp
+ #:compile-flags #$compile-flags
+ #:inputs %build-target-inputs
+ #:native-inputs %build-host-inputs
+ #:search-paths '#$(map search-path-specification->sexp
+ search-paths)
+ #:native-search-paths '#$(map
+ search-path-specification->sexp
+ native-search-paths)
+ #:phases #$phases))))
+
+ (mlet %store-monad ((guile (package->derivation (or guile (default-guile))
+ system #:graft? #f)))
+ (gexp->derivation name builder
+ #:system system
+ #:target target
+ #:guile-for-build guile)))
(define guile-build-system
(build-system
diff --git a/guix/build-system/haskell.scm b/guix/build-system/haskell.scm
index 72e37f2b0e..dc83512d30 100644
--- a/guix/build-system/haskell.scm
+++ b/guix/build-system/haskell.scm
@@ -2,6 +2,7 @@
;;; Copyright © 2015 Federico Beffa <beffa@fbengineering.ch>
;;; Copyright © 2020 Timothy Sample <samplet@ngyro.com>
;;; Copyright © 2020 Simon Tournier <zimon.toutoune@gmail.com>
+;;; Copyright © 2021 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2021 Xinglu Chen <public@yoctocell.xyz>
;;;
;;; This file is part of GNU Guix.
@@ -23,7 +24,8 @@
#:use-module (guix store)
#:use-module (guix utils)
#:use-module (guix packages)
- #:use-module (guix derivations)
+ #:use-module (guix gexp)
+ #:use-module (guix monads)
#:use-module (guix download)
#:use-module (guix search-paths)
#:use-module (guix build-system)
@@ -125,7 +127,7 @@ version REVISION."
(cons name propagated-names))))))
extra-directories))))))))
-(define* (haskell-build store name inputs
+(define* (haskell-build name inputs
#:key source
(haddock? #t)
(haddock-flags ''())
@@ -136,8 +138,7 @@ version REVISION."
(parallel-build? #f)
(configure-flags ''())
(extra-directories ''())
- (phases '(@ (guix build haskell-build-system)
- %standard-phases))
+ (phases '%standard-phases)
(outputs '("out" "static"))
(search-paths '())
(system (%current-system))
@@ -148,50 +149,43 @@ version REVISION."
"Build SOURCE using HASKELL, and with INPUTS. This assumes that SOURCE
provides a 'Setup.hs' file as its build system."
(define builder
- `(begin
- (use-modules ,@modules)
- (haskell-build #:name ,name
- #:source ,(match (assoc-ref inputs "source")
- (((? derivation? source))
- (derivation->output-path source))
- ((source)
- source)
- (source
- source))
- #:cabal-revision ,(match (assoc-ref inputs
- "cabal-revision")
- (((? derivation? revision))
- (derivation->output-path revision))
- (revision revision))
- #:configure-flags ,configure-flags
- #:extra-directories ,extra-directories
- #:haddock-flags ,haddock-flags
- #:system ,system
- #:test-target ,test-target
- #:tests? ,tests?
- #:parallel-build? ,parallel-build?
- #:haddock? ,haddock?
- #:phases ,phases
- #:outputs %outputs
- #:search-paths ',(map search-path-specification->sexp
- search-paths)
- #:inputs %build-inputs)))
-
- (define guile-for-build
- (match guile
- ((? package?)
- (package-derivation store guile system #:graft? #f))
- (#f ; the default
- (let* ((distro (resolve-interface '(gnu packages commencement)))
- (guile (module-ref distro 'guile-final)))
- (package-derivation store guile system #:graft? #f)))))
-
- (build-expression->derivation store name builder
- #:inputs inputs
- #:system system
- #:modules imported-modules
- #:outputs outputs
- #:guile-for-build guile-for-build))
+ (with-imported-modules imported-modules
+ #~(begin
+ (use-modules #$@(sexp->gexp modules))
+
+ #$(with-build-variables inputs outputs
+ #~(haskell-build #:name #$name
+ #:source #+source
+
+ ;; XXX: INPUTS contains <gexp-input> records as
+ ;; opposed to raw lowerable objects, hence the
+ ;; use of ungexp-splicing.
+ #:cabal-revision
+ #$@(match (assoc-ref inputs "cabal-revision")
+ (#f '(#f))
+ (lst lst))
+
+ #:configure-flags #$configure-flags
+ #:extra-directories #$extra-directories
+ #:extra-directories #$extra-directories
+ #:haddock-flags #$haddock-flags
+ #:system #$system
+ #:test-target #$test-target
+ #:tests? #$tests?
+ #:parallel-build? #$parallel-build?
+ #:haddock? #$haddock?
+ #:phases #$phases
+ #:outputs #$(outputs->gexp outputs)
+ #:search-paths '#$(sexp->gexp
+ (map search-path-specification->sexp
+ search-paths))
+ #:inputs #$(input-tuples->gexp inputs))))))
+
+ (mlet %store-monad ((guile (package->derivation (or guile (default-guile))
+ system #:graft? #f)))
+ (gexp->derivation name builder
+ #:system system
+ #:guile-for-build guile)))
(define haskell-build-system
(build-system
diff --git a/guix/build-system/julia.scm b/guix/build-system/julia.scm
index 8ceac090c7..6261f8a55a 100644
--- a/guix/build-system/julia.scm
+++ b/guix/build-system/julia.scm
@@ -1,6 +1,8 @@
;;; 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>
+;;; Copyright © 2021 Simon Tournier <zimon.toutoune@gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -21,7 +23,8 @@
#:use-module (guix store)
#:use-module (guix utils)
#:use-module (guix packages)
- #:use-module (guix derivations)
+ #:use-module (guix gexp)
+ #:use-module (guix monads)
#:use-module (guix search-paths)
#:use-module (guix build-system)
#:use-module (guix build-system gnu)
@@ -74,11 +77,11 @@
(build julia-build)
(arguments (strip-keyword-arguments private-keywords arguments)))))
-(define* (julia-build store name inputs
+(define* (julia-build name inputs
#:key source
(tests? #t)
- (phases '(@ (guix build julia-build-system)
- %standard-phases))
+ (parallel-tests? #t)
+ (phases '%standard-phases)
(outputs '("out"))
(search-paths '())
(system (%current-system))
@@ -90,41 +93,28 @@
(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?
+ #:parallel-tests? #$parallel-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-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
diff --git a/guix/build-system/linux-module.scm b/guix/build-system/linux-module.scm
index 548ed7a9aa..0eab919deb 100644
--- a/guix/build-system/linux-module.scm
+++ b/guix/build-system/linux-module.scm
@@ -1,6 +1,7 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2019 Danny Milosavljevic <dannym@scratchpost.org>
;;; Copyright © 2020 Mathieu Othacehe <m.othacehe@gmail.com>
+;;; Copyright © 2021 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2021 Tobias Geerinckx-Rice <me@tobias.gr>
;;;
;;; This file is part of GNU Guix.
@@ -21,7 +22,8 @@
(define-module (guix build-system linux-module)
#:use-module (guix store)
#:use-module (guix utils)
- #:use-module (guix derivations)
+ #:use-module (guix gexp)
+ #:use-module (guix monads)
#:use-module (guix search-paths)
#:use-module (guix build-system)
#:use-module (guix build-system gnu)
@@ -115,7 +117,7 @@
#:rest arguments)
"Return a bag for NAME."
(define private-keywords
- `(#:source #:target #:gcc #:kmod #:linux #:inputs #:native-inputs
+ `(#:target #:gcc #:kmod #:linux #:inputs #:native-inputs
,@(if target '() '(#:target))))
(bag
@@ -149,13 +151,12 @@
(build (if target linux-module-build-cross linux-module-build))
(arguments (strip-keyword-arguments private-keywords arguments))))
-(define* (linux-module-build store name inputs
+(define* (linux-module-build name inputs
#:key
- target
+ source target
(search-paths '())
(tests? #t)
- (phases '(@ (guix build linux-module-build-system)
- %standard-phases))
+ (phases '%standard-phases)
(outputs '("out"))
(make-flags ''())
(parallel-build? #t)
@@ -169,50 +170,37 @@
(guix build utils))))
"Build SOURCE using LINUX, and with INPUTS."
(define builder
- `(begin
- (use-modules ,@modules)
- (linux-module-build #:name ,name
- #:source ,(match (assoc-ref inputs "source")
- (((? derivation? source))
- (derivation->output-path source))
- ((source)
- source)
- (source
- source))
- #:source-directory ,source-directory
- #:search-paths ',(map search-path-specification->sexp
- search-paths)
- #:phases ,phases
- #:system ,system
- #:target ,target
- #:arch ,(system->arch (or target system))
- #:tests? ,tests?
- #:outputs %outputs
- #:make-flags ,make-flags
- #:parallel-build? ,parallel-build?
- #:inputs %build-inputs)))
+ (with-imported-modules imported-modules
+ #~(begin
+ (use-modules #$@(sexp->gexp modules))
+ (linux-module-build #:name #$name
+ #:source #+source
+ #:source-directory #$source-directory
+ #:search-paths '#$(sexp->gexp
+ (map search-path-specification->sexp
+ search-paths))
+ #:phases #$phases
+ #:system #$system
+ #:target #$target
+ #:arch #$(system->arch (or target system))
+ #:tests? #$tests?
+ #:outputs #$(outputs->gexp outputs)
+ #:make-flags #$make-flags
+ #:parallel-build? #$parallel-build?
+ #:inputs #$(input-tuples->gexp inputs)))))
- (define guile-for-build
- (match guile
- ((? package?)
- (package-derivation store guile system #:graft? #f))
- (#f ; the default
- (let* ((distro (resolve-interface '(gnu packages commencement)))
- (guile (module-ref distro 'guile-final)))
- (package-derivation store guile system #:graft? #f)))))
-
- (build-expression->derivation store name builder
- #:system system
- #:inputs inputs
- #:modules imported-modules
- #:outputs outputs
- #:guile-for-build guile-for-build
- #:substitutable? substitutable?))
+ (mlet %store-monad ((guile (package->derivation (or guile (default-guile))
+ system #:graft? #f)))
+ (gexp->derivation name builder
+ #:system system
+ #:guile-for-build guile
+ #:substitutable? substitutable?)))
(define* (linux-module-build-cross
- store name
+ name
#:key
- target native-drvs target-drvs
+ source target
+ build-inputs target-inputs host-inputs
(guile #f)
(outputs '("out"))
(make-flags ''())
@@ -220,8 +208,7 @@
(search-paths '())
(native-search-paths '())
(tests? #f)
- (phases '(@ (guix build linux-module-build-system)
- %standard-phases))
+ (phases '%standard-phases)
(system (%current-system))
(substitutable? #t)
(imported-modules
@@ -229,70 +216,43 @@
(modules '((guix build linux-module-build-system)
(guix build utils))))
(define builder
- `(begin
- (use-modules ,@modules)
- (let ()
- (define %build-host-inputs
- ',(map (match-lambda
- ((name (? derivation? drv) sub ...)
- `(,name . ,(apply derivation->output-path drv sub)))
- ((name path)
- `(,name . ,path)))
- native-drvs))
+ (with-imported-modules imported-modules
+ #~(begin
+ (use-modules #$@(sexp->gexp modules))
- (define %build-target-inputs
- ',(map (match-lambda
- ((name (? derivation? drv) sub ...)
- `(,name . ,(apply derivation->output-path drv sub)))
- ((name (? package? pkg) sub ...)
- (let ((drv (package-cross-derivation store pkg
- target system)))
- `(,name . ,(apply derivation->output-path drv sub))))
- ((name path)
- `(,name . ,path)))
- target-drvs))
+ (define %build-host-inputs
+ '#+(input-tuples->gexp build-inputs))
- (linux-module-build #:name ,name
- #:source ,(match (assoc-ref native-drvs "source")
- (((? derivation? source))
- (derivation->output-path source))
- ((source)
- source)
- (source
- source))
- #:system ,system
- #:target ,target
- #:arch ,(system->arch (or target system))
- #:outputs %outputs
- #:make-flags ,make-flags
- #:inputs %build-target-inputs
- #:native-inputs %build-host-inputs
- #:search-paths
- ',(map search-path-specification->sexp
- search-paths)
- #:native-search-paths
- ',(map
- search-path-specification->sexp
- native-search-paths)
- #:phases ,phases
- #:tests? ,tests?))))
+ (define %build-target-inputs
+ (append #$(input-tuples->gexp host-inputs)
+ #+(input-tuples->gexp target-inputs)))
- (define guile-for-build
- (match guile
- ((? package?)
- (package-derivation store guile system #:graft? #f))
- (#f ; the default
- (let* ((distro (resolve-interface '(gnu packages commencement)))
- (guile (module-ref distro 'guile-final)))
- (package-derivation store guile system #:graft? #f)))))
+ (linux-module-build #:name #$name
+ #:source #+source
+ #:system #$system
+ #:target #$target
+ #:arch #$(system->arch (or target system))
+ #:outputs #$(outputs->gexp outputs)
+ #:make-flags #$make-flags
+ #:inputs %build-target-inputs
+ #:native-inputs %build-host-inputs
+ #:search-paths
+ '#$(sexp->gexp
+ (map search-path-specification->sexp
+ search-paths))
+ #:native-search-paths
+ '#$(map
+ search-path-specification->sexp
+ native-search-paths)
+ #:phases #$phases
+ #:tests? #$tests?))))
- (build-expression->derivation store name builder
- #:system system
- #:inputs (append native-drvs target-drvs)
- #:outputs outputs
- #:modules imported-modules
- #:guile-for-build guile-for-build
- #:substitutable? substitutable?))
+ (mlet %store-monad ((guile (package->derivation (or guile (default-guile))
+ system #:graft? #f)))
+ (gexp->derivation name builder
+ #:system system
+ #:guile-for-build guile
+ #:substitutable? substitutable?)))
(define linux-module-build-system
(build-system
diff --git a/guix/build-system/maven.scm b/guix/build-system/maven.scm
index 2dceefccc1..0af5922692 100644
--- a/guix/build-system/maven.scm
+++ b/guix/build-system/maven.scm
@@ -1,5 +1,6 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2020 Julien Lepiller <julien@lepiller.eu>
+;;; Copyright © 2021 Ludovic Courtès <ludo@gnu.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -19,7 +20,8 @@
(define-module (guix build-system maven)
#:use-module (guix store)
#:use-module (guix utils)
- #:use-module (guix derivations)
+ #:use-module (guix gexp)
+ #:use-module (guix monads)
#:use-module (guix search-paths)
#:use-module (guix build-system)
#:use-module (guix build-system gnu)
@@ -119,7 +121,7 @@
#:rest arguments)
"Return a bag for NAME."
(define private-keywords
- '(#:source #:target #:jdk #:maven #:maven-plugins #:inputs #:native-inputs))
+ '(#:target #:jdk #:maven #:maven-plugins #:inputs #:native-inputs))
(and (not target) ;XXX: no cross-compilation
(bag
@@ -140,70 +142,56 @@
(build maven-build)
(arguments (strip-keyword-arguments private-keywords arguments)))))
-(define* (maven-build store name inputs
- #:key (guile #f)
- (outputs '("out"))
- (search-paths '())
- (out-of-source? #t)
- (validate-runpath? #t)
- (patch-shebangs? #t)
- (strip-binaries? #t)
- (exclude %default-exclude)
- (local-packages '())
- (tests? #t)
- (strip-flags ''("--strip-debug"))
- (strip-directories ''("lib" "lib64" "libexec"
- "bin" "sbin"))
- (phases '(@ (guix build maven-build-system)
- %standard-phases))
- (system (%current-system))
- (imported-modules %maven-build-system-modules)
- (modules '((guix build maven-build-system)
- (guix build maven pom)
- (guix build utils))))
+(define* (maven-build name inputs
+ #:key
+ source (guile #f)
+ (outputs '("out"))
+ (search-paths '())
+ (out-of-source? #t)
+ (validate-runpath? #t)
+ (patch-shebangs? #t)
+ (strip-binaries? #t)
+ (exclude %default-exclude)
+ (local-packages '())
+ (tests? #t)
+ (strip-flags ''("--strip-debug"))
+ (strip-directories ''("lib" "lib64" "libexec"
+ "bin" "sbin"))
+ (phases '%standard-phases)
+ (system (%current-system))
+ (imported-modules %maven-build-system-modules)
+ (modules '((guix build maven-build-system)
+ (guix build maven pom)
+ (guix build utils))))
"Build SOURCE using PATCHELF, and with INPUTS. This assumes that SOURCE
provides its own binaries."
(define builder
- `(begin
- (use-modules ,@modules)
- (maven-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
- #:exclude (quote ,exclude)
- #:local-packages (quote ,local-packages)
- #:tests? ,tests?
- #:out-of-source? ,out-of-source?
- #: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))
+ (with-imported-modules imported-modules
+ #~(begin
+ (use-modules #$@(sexp->gexp modules))
+ (maven-build #:source #+source
+ #:system #$system
+ #:outputs #$(outputs->gexp outputs)
+ #:inputs #$(input-tuples->gexp inputs)
+ #:search-paths '#$(sexp->gexp
+ (map search-path-specification->sexp
+ search-paths))
+ #:phases #$phases
+ #:exclude '#$exclude
+ #:local-packages '#$local-packages
+ #:tests? #$tests?
+ #:out-of-source? #$out-of-source?
+ #:validate-runpath? #$validate-runpath?
+ #:patch-shebangs? #$patch-shebangs?
+ #:strip-binaries? #$strip-binaries?
+ #:strip-flags #$(sexp->gexp strip-flags)
+ #:strip-directories #$(sexp->gexp strip-directories)))))
+
+ (mlet %store-monad ((guile (package->derivation (or guile (default-guile))
+ system #:graft? #f)))
+ (gexp->derivation name builder
+ #:system system
+ #:guile-for-build guile)))
(define maven-build-system
(build-system
diff --git a/guix/build-system/meson.scm b/guix/build-system/meson.scm
index b68bcb80de..ba7441a3eb 100644
--- a/guix/build-system/meson.scm
+++ b/guix/build-system/meson.scm
@@ -1,6 +1,8 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2017 Peter Mikkelsen <petermikkelsen10@gmail.com>
;;; Copyright © 2018, 2019 Marius Bakke <mbakke@fastmail.com>
+;;; Copyright © 2021 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -18,9 +20,10 @@
;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
(define-module (guix build-system meson)
- #:use-module (guix store)
+ #:use-module (guix gexp)
#:use-module (guix utils)
- #:use-module (guix derivations)
+ #:use-module (guix store)
+ #:use-module (guix monads)
#:use-module (guix search-paths)
#:use-module (guix build-system)
#:use-module (guix build-system gnu)
@@ -28,7 +31,8 @@
#:use-module (guix packages)
#:use-module (ice-9 match)
#:export (%meson-build-system-modules
- meson-build-system))
+ meson-build-system
+ make-cross-file))
;; Commentary:
;;
@@ -38,6 +42,68 @@
;;
;; Code:
+(define (make-machine-alist triplet)
+ "Make an association list describing what should go into
+the ‘host_machine’ section of the cross file when cross-compiling
+for TRIPLET."
+ `((system . ,(cond ((target-hurd? triplet) "gnu")
+ ((target-linux? triplet) "linux")
+ ((target-mingw? triplet) "windows")
+ (#t (error "meson: unknown operating system"))))
+ (cpu_family . ,(cond ((target-x86-32? triplet) "x86")
+ ((target-x86-64? triplet) "x86_64")
+ ((target-arm32? triplet) "arm")
+ ((target-aarch64? triplet) "aarch64")
+ ((target-powerpc? triplet)
+ (if (target-64bit? triplet)
+ "ppc64"
+ "ppc"))
+ (#t (error "meson: unknown architecture"))))
+ (cpu . ,(cond ((target-x86-32? triplet) ; i386, ..., i686
+ (substring triplet 0 4))
+ ((target-x86-64? triplet) "x86_64")
+ ((target-aarch64? triplet) "armv8-a")
+ ((target-arm32? triplet) "armv7")
+ ;; According to #mesonbuild on OFTC, there does not appear
+ ;; to be an official-ish list of CPU types recognised by
+ ;; Meson, the "cpu" field is not used by Meson itself and
+ ;; most software doesn't look at this field, except perhaps
+ ;; for selecting optimisations, so set it to something
+ ;; arbitrary.
+ (#t "strawberries")))
+ (endian . ,(cond ((string-prefix? "powerpc64le-" triplet) "little")
+ ((string-prefix? "mips64el-" triplet) "little")
+ ((target-x86-32? triplet) "little")
+ ((target-x86-64? triplet) "little")
+ ;; At least in Guix. Aarch64 and 32-bit arm
+ ;; have a big-endian mode as well.
+ ((target-arm? triplet) "little")
+ (#t (error "meson: unknown architecture"))))))
+
+(define (make-binaries-alist triplet)
+ "Make an associatoin list describing what should go into
+the ‘binaries’ section of the cross file when cross-compiling for
+TRIPLET."
+ `((c . ,(cc-for-target triplet))
+ (cpp . ,(cxx-for-target triplet))
+ (pkgconfig . ,(pkg-config-for-target triplet))
+ (objcopy . ,(string-append triplet "-objcopy"))
+ (ar . ,(string-append triplet "-ar"))
+ (ld . ,(string-append triplet "-ld"))
+ (strip . ,(string-append triplet "-strip"))))
+
+(define (make-cross-file triplet)
+ (computed-file "cross-file"
+ (with-imported-modules '((guix build meson-configuration))
+ #~(begin
+ (use-modules (guix build meson-configuration))
+ (call-with-output-file #$output
+ (lambda (port)
+ (write-section-header port "host_machine")
+ (write-assignments port '#$(make-machine-alist triplet))
+ (write-section-header port "binaries")
+ (write-assignments port '#$(make-binaries-alist triplet))))))))
+
(define %meson-build-system-modules
;; Build-side modules imported by default.
`((guix build meson-build-system)
@@ -55,7 +121,7 @@
"Return the default meson package."
;; Lazily resolve the binding to avoid a circular dependency.
(let ((module (resolve-interface '(gnu packages build-tools))))
- (module-ref module 'meson-for-build)))
+ (module-ref module 'meson)))
(define* (lower name
#:key source inputs native-inputs outputs system target
@@ -66,33 +132,44 @@
#:rest arguments)
"Return a bag for NAME."
(define private-keywords
- `(#:source #:meson #:ninja #:inputs #:native-inputs #:outputs #:target))
-
- (and (not target) ;; TODO: add support for cross-compilation.
- (bag
- (name name)
- (system system)
- (build-inputs `(("meson" ,meson)
- ("ninja" ,ninja)
- ,@native-inputs
- ,@inputs
- ;; Keep the standard inputs of 'gnu-build-system'.
- ,@(standard-packages)))
- (host-inputs (if source
- `(("source" ,source))
- '()))
- (outputs outputs)
- (build meson-build)
- (arguments (strip-keyword-arguments private-keywords arguments)))))
-
-(define* (meson-build store name inputs
- #:key (guile #f)
+ `(#:meson #:ninja #:inputs #:native-inputs #:outputs
+ ,@(if target
+ '()
+ '(#:target))))
+
+ (bag
+ (name name)
+ (system system) (target target)
+ (build-inputs `(("meson" ,meson)
+ ("ninja" ,ninja)
+ ,@native-inputs
+ ,@(if target '() inputs)
+ ;; Keep the standard inputs of 'gnu-build-system'.
+ ,@(if target
+ (standard-cross-packages target 'host)
+ '())
+ ,@(standard-packages)))
+ (host-inputs `(,@(if source
+ `(("source" ,source))
+ '())
+ ,@(if target inputs '())))
+ ;; Keep the standard inputs of 'gnu-buid-system'.
+ (target-inputs (if target
+ (standard-cross-packages target 'target)
+ '()))
+ (outputs outputs)
+ (build (if target meson-cross-build meson-build))
+ (arguments (strip-keyword-arguments private-keywords arguments))))
+
+(define* (meson-build name inputs
+ #:key
+ guile source
(outputs '("out"))
(configure-flags ''())
(search-paths '())
(build-type "debugoptimized")
(tests? #t)
- (test-target "test")
+ (test-options ''())
(glib-or-gtk? #f)
(parallel-build? #t)
(parallel-tests? #f)
@@ -104,8 +181,7 @@
"bin" "sbin"))
(elf-directories ''("lib" "lib64" "libexec"
"bin" "sbin"))
- (phases '(@ (guix build meson-build-system)
- %standard-phases))
+ (phases '%standard-phases)
(system (%current-system))
(imported-modules %meson-build-system-modules)
(modules '((guix build meson-build-system)
@@ -114,76 +190,154 @@
disallowed-references)
"Build SOURCE using MESON, and with INPUTS, assuming that SOURCE
has a 'meson.build' file."
+ (define builder
+ (with-imported-modules imported-modules
+ #~(begin
+ (use-modules #$@(sexp->gexp modules))
+
+ (define build-phases
+ #$(let ((phases (if (pair? phases) (sexp->gexp phases) phases)))
+ (if glib-or-gtk?
+ phases
+ #~(modify-phases #$phases
+ (delete 'glib-or-gtk-compile-schemas)
+ (delete 'glib-or-gtk-wrap)))))
+
+ #$(with-build-variables inputs outputs
+ #~(meson-build #:source #+source
+ #:system #$system
+ #:outputs %outputs
+ #:inputs %build-inputs
+ #:search-paths '#$(sexp->gexp
+ (map search-path-specification->sexp
+ search-paths))
+ #:phases build-phases
+ #:configure-flags
+ #$(if (pair? configure-flags)
+ (sexp->gexp configure-flags)
+ configure-flags)
+ #:build-type #$build-type
+ #:tests? #$tests?
+ #:test-options #$(sexp->gexp test-options)
+ #:parallel-build? #$parallel-build?
+ #:parallel-tests? #$parallel-tests?
+ #:validate-runpath? #$validate-runpath?
+ #:patch-shebangs? #$patch-shebangs?
+ #:strip-binaries? #$strip-binaries?
+ #:strip-flags #$(sexp->gexp strip-flags)
+ #:strip-directories #$(sexp->gexp strip-directories)
+ #:elf-directories #$(sexp->gexp elf-directories))))))
+
+ (mlet %store-monad ((guile (package->derivation (or guile (default-guile))
+ system #:graft? #f)))
+ (gexp->derivation name builder
+ #:system system
+ #:target #f
+ #:graft? #f
+ #:substitutable? substitutable?
+ #:allowed-references allowed-references
+ #:disallowed-references disallowed-references
+ #:guile-for-build guile)))
- ;; TODO: Copied from build-system/gnu, factorize this!
- (define canonicalize-reference
- (match-lambda
- ((? package? p)
- (derivation->output-path (package-derivation store p system
- #:graft? #f)))
- (((? package? p) output)
- (derivation->output-path (package-derivation store p system
- #:graft? #f)
- output))
- ((? string? output)
- output)))
+(define* (meson-cross-build name
+ #:key
+ target
+ build-inputs host-inputs target-inputs
+ guile source
+ (outputs '("out"))
+ (configure-flags ''())
+ (search-paths '())
+ (native-search-paths '())
+ (build-type "debugoptimized")
+ (tests? #f)
+ (test-options ''())
+ (glib-or-gtk? #f)
+ (parallel-build? #t)
+ (parallel-tests? #f)
+ (validate-runpath? #t)
+ (patch-shebangs? #t)
+ (strip-binaries? #t)
+ (strip-flags ''("--strip-debug"))
+ (strip-directories ''("lib" "lib64" "libexec"
+ "bin" "sbin"))
+ (elf-directories ''("lib" "lib64" "libexec"
+ "bin" "sbin"))
+ ;; See 'gnu-cross-build' for why this needs to be
+ ;; disabled when cross-compiling.
+ (make-dynamic-linker-cache? #f)
+ (phases '%standard-phases)
+ (system (%current-system))
+ (imported-modules %meson-build-system-modules)
+ (modules '((guix build meson-build-system)
+ (guix build utils)))
+ allowed-references
+ disallowed-references)
+ "Cross-build SOURCE for TARGET using MESON, and with INPUTS, assuming that
+SOURCE has a 'meson.build' file."
+ (define cross-file
+ (make-cross-file target))
+ (define inputs
+ (if (null? target-inputs)
+ (input-tuples->gexp host-inputs)
+ #~(append #$(input-tuples->gexp host-inputs)
+ #+(input-tuples->gexp target-inputs))))
(define builder
- `(let ((build-phases (if ,glib-or-gtk?
- ,phases
- (modify-phases ,phases
- (delete 'glib-or-gtk-compile-schemas)
- (delete 'glib-or-gtk-wrap)))))
- (use-modules ,@modules)
- (meson-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 build-phases
- #:configure-flags ,configure-flags
- #:build-type ,build-type
- #:tests? ,tests?
- #:test-target ,test-target
- #:parallel-build? ,parallel-build?
- #:parallel-tests? ,parallel-tests?
- #:validate-runpath? ,validate-runpath?
- #:patch-shebangs? ,patch-shebangs?
- #:strip-binaries? ,strip-binaries?
- #:strip-flags ,strip-flags
- #:strip-directories ,strip-directories
- #:elf-directories ,elf-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
- #:allowed-references
- (and allowed-references
- (map canonicalize-reference
- allowed-references))
- #:disallowed-references
- (and disallowed-references
- (map canonicalize-reference
- disallowed-references))))
+ (with-imported-modules imported-modules
+ #~(begin
+ (use-modules #$@(sexp->gexp modules))
+
+ (define build-phases
+ #$(let ((phases (if (pair? phases) (sexp->gexp phases) phases)))
+ (if glib-or-gtk?
+ phases
+ #~(modify-phases #$phases
+ (delete 'glib-or-gtk-compile-schemas)
+ (delete 'glib-or-gtk-wrap)))))
+
+ ;; Do not use 'with-build-variables', as there should be
+ ;; no reason to use %build-inputs and friends.
+ (meson-build #:source #+source
+ #:system #$system
+ #:build #$(nix-system->gnu-triplet system)
+ #:target #$target
+ #:outputs #$(outputs->gexp outputs)
+ #:inputs #$inputs
+ #:native-inputs #+(input-tuples->gexp build-inputs)
+ #:search-paths '#$(sexp->gexp
+ (map search-path-specification->sexp
+ search-paths))
+ #:native-search-paths '#$(sexp->gexp
+ (map search-path-specification->sexp
+ native-search-paths))
+ #:phases build-phases
+ #:make-dynamic-linker-cache? #$make-dynamic-linker-cache?
+ #:configure-flags `("--cross-file" #+cross-file
+ ,@#$(if (pair? configure-flags)
+ (sexp->gexp configure-flags)
+ configure-flags))
+ #:build-type #$build-type
+ #:tests? #$tests?
+ #:test-options #$(sexp->gexp test-options)
+ #:parallel-build? #$parallel-build?
+ #:parallel-tests? #$parallel-tests?
+ #:validate-runpath? #$validate-runpath?
+ #:patch-shebangs? #$patch-shebangs?
+ #:strip-binaries? #$strip-binaries?
+ #:strip-flags #$(sexp->gexp strip-flags)
+ #:strip-directories #$(sexp->gexp strip-directories)
+ #:elf-directories #$(sexp->gexp elf-directories)))))
+
+ (mlet %store-monad ((guile (package->derivation (or guile (default-guile))
+ system #:graft? #f)))
+ (gexp->derivation name builder
+ #:system system
+ #:target target
+ #:graft? #f
+ #:substitutable? substitutable?
+ #:allowed-references allowed-references
+ #:disallowed-references disallowed-references
+ #:guile-for-build guile)))
(define meson-build-system
(build-system
diff --git a/guix/build-system/minify.scm b/guix/build-system/minify.scm
index 9d53760685..7d4745ab32 100644
--- a/guix/build-system/minify.scm
+++ b/guix/build-system/minify.scm
@@ -1,5 +1,6 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2017, 2018 Ricardo Wurmus <rekado@elephly.net>
+;;; Copyright © 2021 Ludovic Courtès <ludo@gnu.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -20,7 +21,8 @@
#:use-module (guix store)
#:use-module (guix utils)
#:use-module (guix packages)
- #:use-module (guix derivations)
+ #:use-module (guix gexp)
+ #:use-module (guix monads)
#:use-module (guix search-paths)
#:use-module (guix build-system)
#:use-module (guix build-system gnu)
@@ -54,7 +56,7 @@
#:rest arguments)
"Return a bag for NAME."
(define private-keywords
- '(#:source #:target #:inputs #:native-inputs))
+ '(#:target #:inputs #:native-inputs))
(bag
(name name)
@@ -70,11 +72,11 @@
(build minify-build)
(arguments (strip-keyword-arguments private-keywords arguments))))
-(define* (minify-build store name inputs
+(define* (minify-build name inputs
#:key
+ source
(javascript-files #f)
- (phases '(@ (guix build minify-build-system)
- %standard-phases))
+ (phases '%standard-phases)
(outputs '("out"))
(system (%current-system))
search-paths
@@ -84,38 +86,24 @@
(guix build utils))))
"Build SOURCE with INPUTS."
(define builder
- `(begin
- (use-modules ,@modules)
- (minify-build #:name ,name
- #:source ,(match (assoc-ref inputs "source")
- (((? derivation? source))
- (derivation->output-path source))
- ((source)
- source)
- (source
- source))
- #:javascript-files ,javascript-files
- #:phases ,phases
- #:outputs %outputs
- #:search-paths ',(map search-path-specification->sexp
- search-paths)
- #:inputs %build-inputs)))
+ (with-imported-modules imported-modules
+ #~(begin
+ (use-modules #$@(sexp->gexp modules))
+ (minify-build #:name #$name
+ #:source #+source
+ #:javascript-files #$javascript-files
+ #:phases #$phases
+ #:outputs #$(outputs->gexp outputs)
+ #:search-paths '#$(sexp->gexp
+ (map search-path-specification->sexp
+ search-paths))
+ #:inputs #$(input-tuples->gexp inputs)))))
- (define guile-for-build
- (match guile
- ((? package?)
- (package-derivation store guile system #:graft? #f))
- (#f ; the default
- (let* ((distro (resolve-interface '(gnu packages commencement)))
- (guile (module-ref distro 'guile-final)))
- (package-derivation store guile system #:graft? #f)))))
-
- (build-expression->derivation store name builder
- #: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 minify-build-system
(build-system
diff --git a/guix/build-system/node.scm b/guix/build-system/node.scm
index 98f63f87ef..735f8dd06e 100644
--- a/guix/build-system/node.scm
+++ b/guix/build-system/node.scm
@@ -1,6 +1,7 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2016 Jelle Licht <jlicht@fsfe.org>
;;; Copyright © 2019 Timothy Sample <samplet@ngyro.com>
+;;; Copyright © 2021 Ludovic Courtès <ludo@gnu.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -18,9 +19,11 @@
;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
(define-module (guix build-system node)
+ #:use-module (guix store)
#:use-module (guix utils)
#:use-module (guix packages)
- #:use-module (guix derivations)
+ #:use-module (guix gexp)
+ #:use-module (guix monads)
#:use-module (guix search-paths)
#:use-module (guix build-system)
#:use-module (guix build-system gnu)
@@ -48,7 +51,7 @@
#:rest arguments)
"Return a bag for NAME."
(define private-keywords
- '(#:source #:target #:node #:inputs #:native-inputs))
+ '(#:target #:node #:inputs #:native-inputs))
(and (not target) ;XXX: no cross-compilation
(bag
@@ -67,12 +70,13 @@
(build node-build)
(arguments (strip-keyword-arguments private-keywords arguments)))))
-(define* (node-build store name inputs
+(define* (node-build name inputs
#:key
+ source
+ (npm-flags ''())
(test-target "test")
(tests? #t)
- (phases '(@ (guix build node-build-system)
- %standard-phases))
+ (phases '%standard-phases)
(outputs '("out"))
(search-paths '())
(system (%current-system))
@@ -82,38 +86,27 @@
(guix build utils))))
"Build SOURCE using NODE and INPUTS."
(define builder
- `(begin
- (use-modules ,@modules)
- (node-build #:name ,name
- #:source ,(match (assoc-ref inputs "source")
- (((? derivation? source))
- (derivation->output-path source))
- ((source) source)
- (source source))
- #:system ,system
- #:test-target ,test-target
- #:tests? ,tests?
- #:phases ,phases
- #:outputs %outputs
- #:search-paths ',(map search-path-specification->sexp
- search-paths)
- #:inputs %build-inputs)))
+ (with-imported-modules imported-modules
+ #~(begin
+ (use-modules #$@(sexp->gexp modules))
+ (node-build #:name #$name
+ #:source #+source
+ #:system #$system
+ #:npm-flags #$npm-flags
+ #:test-target #$test-target
+ #:tests? #$tests?
+ #:phases #$phases
+ #:outputs #$(outputs->gexp outputs)
+ #:search-paths '#$(sexp->gexp
+ (map search-path-specification->sexp
+ search-paths))
+ #:inputs #$(input-tuples->gexp inputs)))))
- (define guile-for-build
- (match guile
- ((? package?)
- (package-derivation store guile system #:graft? #f))
- (#f
- (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 node-build-system
(build-system
diff --git a/guix/build-system/ocaml.scm b/guix/build-system/ocaml.scm
index 5513216c25..e7d6d96f0e 100644
--- a/guix/build-system/ocaml.scm
+++ b/guix/build-system/ocaml.scm
@@ -1,6 +1,7 @@
;;; 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>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -19,7 +20,7 @@
(define-module (guix build-system ocaml)
#:use-module (guix store)
#:use-module (guix utils)
- #:use-module (guix derivations)
+ #:use-module (guix gexp)
#:use-module (guix search-paths)
#:use-module (guix build-system)
#:use-module (guix build-system gnu)
@@ -206,7 +207,7 @@ pre-defined variants."
#:rest arguments)
"Return a bag for NAME."
(define private-keywords
- '(#:source #:target #:ocaml #:findlib #:inputs #:native-inputs))
+ '(#:target #:ocaml #:findlib #:inputs #:native-inputs))
(and (not target) ;XXX: no cross-compilation
(bag
@@ -226,8 +227,9 @@ pre-defined variants."
(build ocaml-build)
(arguments (strip-keyword-arguments private-keywords arguments)))))
-(define* (ocaml-build store name inputs
- #:key (guile #f)
+(define* (ocaml-build name inputs
+ #:key
+ guile source
(outputs '("out")) (configure-flags ''())
(search-paths '())
(make-flags ''())
@@ -253,51 +255,35 @@ pre-defined variants."
"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)
- (ocaml-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
- #:configure-flags ,configure-flags
- #:test-flags ,test-flags
- #:make-flags ,make-flags
- #:build-flags ,build-flags
- #:out-of-source? ,out-of-source?
- #:use-make? ,use-make?
- #: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))
+ (with-imported-modules imported-modules
+ #~(begin
+ (use-modules #$@modules)
+ (ocaml-build #:source #$source
+ #:system #$system
+ #:outputs #$(outputs->gexp outputs)
+ #:inputs #$(input-tuples->gexp inputs)
+ #:search-paths '#$(map search-path-specification->sexp
+ search-paths)
+ #:phases #$phases
+ #:configure-flags #$configure-flags
+ #:test-flags #$test-flags
+ #:make-flags #$make-flags
+ #:build-flags #$build-flags
+ #:out-of-source? #$out-of-source?
+ #:use-make? #$use-make?
+ #: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))))
+
+ (gexp->derivation name builder
+ #:system system
+ #:target #f
+ #:guile-for-build guile))
(define ocaml-build-system
(build-system
diff --git a/guix/build-system/perl.scm b/guix/build-system/perl.scm
index 06af1dd20e..db0a916fb2 100644
--- a/guix/build-system/perl.scm
+++ b/guix/build-system/perl.scm
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2013, 2014, 2015 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2013, 2014, 2015, 2021 Ludovic Courtès <ludo@gnu.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -19,6 +19,8 @@
(define-module (guix build-system perl)
#:use-module (guix store)
#:use-module (guix utils)
+ #:use-module (guix gexp)
+ #:use-module (guix monads)
#:use-module (guix derivations)
#:use-module (guix search-paths)
#:use-module (guix build-system)
@@ -57,7 +59,7 @@
#:rest arguments)
"Return a bag for NAME."
(define private-keywords
- '(#:source #:target #:perl #:inputs #:native-inputs))
+ '(#:target #:perl #:inputs #:native-inputs))
(and (not target) ;XXX: no cross-compilation
(bag
@@ -76,8 +78,8 @@
(build perl-build)
(arguments (strip-keyword-arguments private-keywords arguments)))))
-(define* (perl-build store name inputs
- #:key
+(define* (perl-build name inputs
+ #:key source
(search-paths '())
(tests? #t)
(parallel-build? #t)
@@ -95,46 +97,37 @@
(guix build utils))))
"Build SOURCE using PERL, and with INPUTS. This assumes that SOURCE
provides a `Makefile.PL' file as its build system."
- (define builder
- `(begin
- (use-modules ,@modules)
- (perl-build #:name ,name
- #:source ,(match (assoc-ref inputs "source")
- (((? derivation? source))
- (derivation->output-path source))
- ((source)
- source)
- (source
- source))
- #:search-paths ',(map search-path-specification->sexp
- search-paths)
- #:make-maker? ,make-maker?
- #:make-maker-flags ,make-maker-flags
- #:module-build-flags ,module-build-flags
- #:phases ,phases
- #:system ,system
- #:test-target "test"
- #:tests? ,tests?
- #:parallel-build? ,parallel-build?
- #:parallel-tests? ,parallel-tests?
- #:outputs %outputs
- #:inputs %build-inputs)))
+ (define build
+ (with-imported-modules imported-modules
+ #~(begin
+ (use-modules #$@(sexp->gexp modules))
- (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)))))
+ #$(with-build-variables inputs outputs
+ #~(perl-build #:name #$name
+ #:source #+source
+ #:search-paths '#$(sexp->gexp
+ (map search-path-specification->sexp
+ search-paths))
+ #:make-maker? #$make-maker?
+ #:make-maker-flags #$make-maker-flags
+ #:module-build-flags #$(sexp->gexp module-build-flags)
+ #:phases #$(if (pair? phases)
+ (sexp->gexp phases)
+ phases)
+ #:system #$system
+ #:test-target "test"
+ #:tests? #$tests?
+ #:parallel-build? #$parallel-build?
+ #:parallel-tests? #$parallel-tests?
+ #:outputs %outputs
+ #:inputs %build-inputs)))))
- (build-expression->derivation store name builder
- #:system system
- #:inputs inputs
- #: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 build
+ #:system system
+ #:target #f
+ #:guile-for-build guile)))
(define perl-build-system
(build-system
diff --git a/guix/build-system/python.scm b/guix/build-system/python.scm
index 80895162f8..efade6f74b 100644
--- a/guix/build-system/python.scm
+++ b/guix/build-system/python.scm
@@ -1,7 +1,8 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2013, 2014, 2015, 2016, 2017 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2021 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2013 Andreas Enge <andreas@enge.fr>
;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org>
+;;; Copyright © 2021 Lars-Dominik Braun <lars@6xq.net>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -19,9 +20,13 @@
;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
(define-module (guix build-system python)
+ #:use-module ((gnu packages) #:select (search-auxiliary-file))
+ #:use-module (guix gexp)
#:use-module (guix store)
#:use-module (guix utils)
#:use-module (guix memoization)
+ #:use-module (guix gexp)
+ #:use-module (guix monads)
#:use-module (guix packages)
#:use-module (guix derivations)
#:use-module (guix search-paths)
@@ -70,6 +75,10 @@ extension, such as '.tar.gz'."
(let ((python (resolve-interface '(gnu packages python))))
(module-ref python 'python-2)))
+(define sanity-check.py
+ ;; The script used to validate the installation of a Python package.
+ (search-auxiliary-file "python/sanity-check.py"))
+
(define* (package-with-explicit-python python old-prefix new-prefix
#:key variant-property)
"Return a procedure of one argument, P. The procedure creates a package with
@@ -140,7 +149,7 @@ pre-defined variants."
#:rest arguments)
"Return a bag for NAME."
(define private-keywords
- '(#:source #:target #:python #:inputs #:native-inputs))
+ '(#:target #:python #:inputs #:native-inputs))
(and (not target) ;XXX: no cross-compilation
(bag
@@ -154,19 +163,19 @@ pre-defined variants."
;; Keep the standard inputs of 'gnu-build-system'.
,@(standard-packages)))
(build-inputs `(("python" ,python)
+ ("sanity-check.py" ,(local-file sanity-check.py))
,@native-inputs))
(outputs outputs)
(build python-build)
(arguments (strip-keyword-arguments private-keywords arguments)))))
-(define* (python-build store name inputs
- #:key
+(define* (python-build name inputs
+ #:key source
(tests? #t)
(test-target "test")
(use-setuptools? #t)
(configure-flags ''())
- (phases '(@ (guix build python-build-system)
- %standard-phases))
+ (phases '%standard-phases)
(outputs '("out"))
(search-paths '())
(system (%current-system))
@@ -176,43 +185,35 @@ pre-defined variants."
(guix build utils))))
"Build SOURCE using PYTHON, and with INPUTS. This assumes that SOURCE
provides a 'setup.py' file as its build system."
- (define builder
- `(begin
- (use-modules ,@modules)
- (python-build #:name ,name
- #:source ,(match (assoc-ref inputs "source")
- (((? derivation? source))
- (derivation->output-path source))
- ((source)
- source)
- (source
- source))
- #:configure-flags ,configure-flags
- #:system ,system
- #:test-target ,test-target
- #:tests? ,tests?
- #:use-setuptools? ,use-setuptools?
- #:phases ,phases
- #:outputs %outputs
- #:search-paths ',(map search-path-specification->sexp
- search-paths)
- #:inputs %build-inputs)))
-
- (define guile-for-build
- (match guile
- ((? package?)
- (package-derivation store guile system #:graft? #f))
- (#f ; the default
- (let* ((distro (resolve-interface '(gnu packages commencement)))
- (guile (module-ref distro 'guile-final)))
- (package-derivation store guile system #:graft? #f)))))
-
- (build-expression->derivation store name builder
- #:inputs inputs
- #:system system
- #:modules imported-modules
- #:outputs outputs
- #:guile-for-build guile-for-build))
+ (define build
+ (with-imported-modules imported-modules
+ #~(begin
+ (use-modules #$@(sexp->gexp modules))
+
+ #$(with-build-variables inputs outputs
+ #~(python-build #:name #$name
+ #:source #+source
+ #:configure-flags #$configure-flags
+ #:use-setuptools? #$use-setuptools?
+ #:system #$system
+ #:test-target #$test-target
+ #:tests? #$tests?
+ #:phases #$(if (pair? phases)
+ (sexp->gexp phases)
+ phases)
+ #:outputs %outputs
+ #:search-paths '#$(sexp->gexp
+ (map search-path-specification->sexp
+ search-paths))
+ #:inputs %build-inputs)))))
+
+
+ (mlet %store-monad ((guile (package->derivation (or guile (default-guile))
+ system #:graft? #f)))
+ (gexp->derivation name build
+ #:system system
+ #:target #f
+ #:guile-for-build guile)))
(define python-build-system
(build-system
diff --git a/guix/build-system/qt.scm b/guix/build-system/qt.scm
index e1368db1d9..003a065aa6 100644
--- a/guix/build-system/qt.scm
+++ b/guix/build-system/qt.scm
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2013, 2014, 2015 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2013, 2014, 2015, 2021 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2013 Cyril Roelandt <tipecaml@gmail.com>
;;; Copyright © 2017 Ricardo Wurmus <rekado@elephly.net>
;;; Copyright © 2019 Hartmut Goebel <h.goebel@crazy-compilers.com>
@@ -23,9 +23,10 @@
(define-module (guix build-system qt)
#:use-module (guix store)
#:use-module (guix utils)
+ #:use-module (guix gexp)
+ #:use-module (guix monads)
#:use-module ((guix build qt-utils)
#:select (%qt-wrap-excluded-inputs))
- #:use-module (guix derivations)
#:use-module (guix search-paths)
#:use-module (guix build-system)
#:use-module (guix build-system cmake)
@@ -75,7 +76,7 @@
#:rest arguments)
"Return a bag for NAME."
(define private-keywords
- `(#:source #:cmake #:inputs #:native-inputs #:outputs
+ `(#:cmake #:inputs #:native-inputs #:outputs
,@(if target '() '(#:target))))
(bag
@@ -109,8 +110,9 @@
(arguments (strip-keyword-arguments private-keywords arguments))))
-(define* (qt-build store name inputs
- #:key (guile #f)
+(define* (qt-build name inputs
+ #:key
+ source (guile #f)
(outputs '("out")) (configure-flags ''())
(search-paths '())
(make-flags ''())
@@ -125,8 +127,7 @@
(strip-flags ''("--strip-debug"))
(strip-directories ''("lib" "lib64" "libexec"
"bin" "sbin"))
- (phases '(@ (guix build qt-build-system)
- %standard-phases))
+ (phases '%standard-phases)
(qt-wrap-excluded-outputs ''())
(qt-wrap-excluded-inputs %qt-wrap-excluded-inputs)
(system (%current-system))
@@ -136,61 +137,50 @@
"Build SOURCE using CMAKE, and with INPUTS. This assumes that SOURCE
provides a 'CMakeLists.txt' file as its build system."
(define builder
- `(begin
- (use-modules ,@modules)
- (qt-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
- #:qt-wrap-excluded-outputs ,qt-wrap-excluded-outputs
- #:qt-wrap-excluded-inputs ,qt-wrap-excluded-inputs
- #:configure-flags ,configure-flags
- #:make-flags ,make-flags
- #:out-of-source? ,out-of-source?
- #:build-type ,build-type
- #:tests? ,tests?
- #:test-target ,test-target
- #:parallel-build? ,parallel-build?
- #:parallel-tests? ,parallel-tests?
- #: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 #$@(sexp->gexp modules))
+ (qt-build #:source #+source
+ #:system #$system
+ #:outputs #$(outputs->gexp outputs)
+ #:inputs #$(input-tuples->gexp inputs)
+ #:search-paths '#$(sexp->gexp
+ (map search-path-specification->sexp
+ search-paths))
+ #:phases #$(if (pair? phases)
+ (sexp->gexp phases)
+ phases)
+ #:qt-wrap-excluded-outputs #$qt-wrap-excluded-outputs
+ #:qt-wrap-excluded-inputs #$qt-wrap-excluded-inputs
+ #:configure-flags #$configure-flags
+ #:make-flags #$make-flags
+ #:out-of-source? #$out-of-source?
+ #:build-type #$build-type
+ #:tests? #$tests?
+ #:test-target #$test-target
+ #:parallel-build? #$parallel-build?
+ #:parallel-tests? #$parallel-tests?
+ #: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))
+ (mlet %store-monad ((guile (package->derivation (or guile (default-guile))
+ system #:graft? #f)))
+ (gexp->derivation name builder
+ #:system system
+ #:guile-for-build guile)))
;;;
;;; Cross-compilation.
;;;
-(define* (qt-cross-build store name
+(define* (qt-cross-build name
#:key
- target native-drvs target-drvs
+ source target
+ build-inputs target-inputs host-inputs
(guile #f)
(outputs '("out"))
(configure-flags ''())
@@ -199,7 +189,7 @@ provides a 'CMakeLists.txt' file as its build system."
(make-flags ''())
(out-of-source? #t)
(build-type "RelWithDebInfo")
- (tests? #f) ; nothing can be done
+ (tests? #f) ; nothing can be done
(test-target "test")
(parallel-build? #t) (parallel-tests? #f)
(validate-runpath? #t)
@@ -209,8 +199,7 @@ provides a 'CMakeLists.txt' file as its build system."
"--enable-deterministic-archives"))
(strip-directories ''("lib" "lib64" "libexec"
"bin" "sbin"))
- (phases '(@ (guix build qt-build-system)
- %standard-phases))
+ (phases '%standard-phases)
(system (%current-system))
(build (nix-system->gnu-triplet system))
(imported-modules %qt-build-system-modules)
@@ -220,77 +209,53 @@ provides a 'CMakeLists.txt' file as its build system."
with INPUTS. This assumes that SOURCE provides a 'CMakeLists.txt' file as its
build system."
(define builder
- `(begin
- (use-modules ,@modules)
- (let ()
- (define %build-host-inputs
- ',(map (match-lambda
- ((name (? derivation? drv) sub ...)
- `(,name . ,(apply derivation->output-path drv sub)))
- ((name path)
- `(,name . ,path)))
- native-drvs))
+ (with-imported-modules imported-modules
+ #~(begin
+ (use-modules #$@(sexp->gexp modules))
+
+ (define %build-host-inputs
+ #+(input-tuples->gexp build-inputs))
- (define %build-target-inputs
- ',(map (match-lambda
- ((name (? derivation? drv) sub ...)
- `(,name . ,(apply derivation->output-path drv sub)))
- ((name (? package? pkg) sub ...)
- (let ((drv (package-cross-derivation store pkg
- target system)))
- `(,name . ,(apply derivation->output-path drv sub))))
- ((name path)
- `(,name . ,path)))
- target-drvs))
+ (define %build-target-inputs
+ (append #$(input-tuples->gexp host-inputs)
+ #+(input-tuples->gexp target-inputs)))
- (qt-build #:source ,(match (assoc-ref native-drvs "source")
- (((? derivation? source))
- (derivation->output-path source))
- ((source)
- source)
- (source
- source))
- #:system ,system
- #:build ,build
- #:target ,target
- #:outputs %outputs
- #:inputs %build-target-inputs
- #:native-inputs %build-host-inputs
- #:search-paths ',(map search-path-specification->sexp
- search-paths)
- #:native-search-paths ',(map
- search-path-specification->sexp
- native-search-paths)
- #:phases ,phases
- #:configure-flags ,configure-flags
- #:make-flags ,make-flags
- #:out-of-source? ,out-of-source?
- #:build-type ,build-type
- #:tests? ,tests?
- #:test-target ,test-target
- #:parallel-build? ,parallel-build?
- #:parallel-tests? ,parallel-tests?
- #:validate-runpath? ,validate-runpath?
- #:patch-shebangs? ,patch-shebangs?
- #:strip-binaries? ,strip-binaries?
- #:strip-flags ,strip-flags
- #:strip-directories ,strip-directories))))
+ (define %outputs
+ #$(outputs->gexp outputs))
- (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)))))
+ (qt-build #:source #+source
+ #:system #$system
+ #:build #$build
+ #:target #$target
+ #:outputs %outputs
+ #:inputs %build-target-inputs
+ #:native-inputs %build-host-inputs
+ #:search-paths '#$(sexp->gexp
+ (map search-path-specification->sexp
+ search-paths))
+ #:native-search-paths '#$(map
+ search-path-specification->sexp
+ native-search-paths)
+ #:phases #$phases
+ #:configure-flags #$configure-flags
+ #:make-flags #$make-flags
+ #:out-of-source? #$out-of-source?
+ #:build-type #$build-type
+ #:tests? #$tests?
+ #:test-target #$test-target
+ #:parallel-build? #$parallel-build?
+ #:parallel-tests? #$parallel-tests?
+ #:validate-runpath? #$validate-runpath?
+ #:patch-shebangs? #$patch-shebangs?
+ #:strip-binaries? #$strip-binaries?
+ #:strip-flags #$strip-flags
+ #:strip-directories #$strip-directories))))
- (build-expression->derivation store name builder
- #:system system
- #:inputs (append native-drvs target-drvs)
- #:outputs outputs
- #:modules imported-modules
- #:guile-for-build guile-for-build))
+ (mlet %store-monad ((guile (package->derivation (or guile (default-guile))
+ system #:graft? #f)))
+ (gexp->derivation name builder
+ #:system system
+ #:guile-for-build guile)))
(define qt-build-system
(build-system
diff --git a/guix/build-system/r.scm b/guix/build-system/r.scm
index 96d37d5ea6..2c82390ba6 100644
--- a/guix/build-system/r.scm
+++ b/guix/build-system/r.scm
@@ -1,5 +1,6 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2015, 2017, 2018, 2019, 2020 Ricardo Wurmus <rekado@elephly.net>
+;;; Copyright © 2021 Ludovic Courtès <ludo@gnu.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -20,7 +21,8 @@
#:use-module (guix store)
#:use-module (guix utils)
#:use-module (guix packages)
- #:use-module (guix derivations)
+ #:use-module (guix gexp)
+ #:use-module (guix monads)
#:use-module (guix search-paths)
#:use-module (guix build-system)
#:use-module (guix build-system gnu)
@@ -82,7 +84,7 @@ release corresponding to NAME and VERSION."
#:rest arguments)
"Return a bag for NAME."
(define private-keywords
- '(#:source #:target #:r #:inputs #:native-inputs))
+ '(#:target #:r #:inputs #:native-inputs))
(and (not target) ;XXX: no cross-compilation
(bag
@@ -101,13 +103,13 @@ release corresponding to NAME and VERSION."
(build r-build)
(arguments (strip-keyword-arguments private-keywords arguments)))))
-(define* (r-build store name inputs
+(define* (r-build name inputs
#:key
+ source
(tests? #t)
(test-target "tests")
(configure-flags ''())
- (phases '(@ (guix build r-build-system)
- %standard-phases))
+ (phases '%standard-phases)
(outputs '("out"))
(search-paths '())
(system (%current-system))
@@ -118,42 +120,28 @@ release corresponding to NAME and VERSION."
(guix build utils))))
"Build SOURCE with INPUTS."
(define builder
- `(begin
- (use-modules ,@modules)
- (r-build #:name ,name
- #:source ,(match (assoc-ref inputs "source")
- (((? derivation? source))
- (derivation->output-path source))
- ((source)
- source)
- (source
- source))
- #:configure-flags ,configure-flags
- #:system ,system
- #:tests? ,tests?
- #:test-target ,test-target
- #:phases ,phases
- #:outputs %outputs
- #:search-paths ',(map search-path-specification->sexp
- search-paths)
- #:inputs %build-inputs)))
+ (with-imported-modules imported-modules
+ #~(begin
+ (use-modules #$@(sexp->gexp modules))
+ (r-build #:name #$name
+ #:source #+source
+ #:configure-flags #$configure-flags
+ #:system #$system
+ #:tests? #$tests?
+ #:test-target #$test-target
+ #:phases #$phases
+ #:outputs #$(outputs->gexp outputs)
+ #:search-paths '#$(sexp->gexp
+ (map search-path-specification->sexp
+ search-paths))
+ #:inputs #$(input-tuples->gexp inputs)))))
- (define guile-for-build
- (match guile
- ((? package?)
- (package-derivation store guile system #:graft? #f))
- (#f ; the default
- (let* ((distro (resolve-interface '(gnu packages commencement)))
- (guile (module-ref distro 'guile-final)))
- (package-derivation store guile system #:graft? #f)))))
-
- (build-expression->derivation store name builder
- #:inputs inputs
- #:system system
- #:modules imported-modules
- #:outputs outputs
- #:guile-for-build guile-for-build
- #:substitutable? substitutable?))
+ (mlet %store-monad ((guile (package->derivation (or guile (default-guile))
+ system #:graft? #f)))
+ (gexp->derivation name builder
+ #:system system
+ #:guile-for-build guile
+ #:substitutable? substitutable?)))
(define r-build-system
(build-system
diff --git a/guix/build-system/rakudo.scm b/guix/build-system/rakudo.scm
index a02e2bad3a..05a4d9c2ad 100644
--- a/guix/build-system/rakudo.scm
+++ b/guix/build-system/rakudo.scm
@@ -1,5 +1,6 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2019 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2021 Ludovic Courtès <ludo@gnu.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -19,7 +20,8 @@
(define-module (guix build-system rakudo)
#:use-module (guix store)
#:use-module (guix utils)
- #:use-module (guix derivations)
+ #:use-module (guix gexp)
+ #:use-module (guix monads)
#:use-module (guix search-paths)
#:use-module (guix build-system)
#:use-module (guix build-system gnu)
@@ -71,7 +73,7 @@
#:rest arguments)
"Return a bag for NAME."
(define private-keywords
- '(#:source #:target #:rakudo #:prove6 #:zef #:inputs #:native-inputs))
+ '(#:target #:rakudo #:prove6 #:zef #:inputs #:native-inputs))
(and (not target) ;XXX: no cross-compilation
(bag
@@ -96,12 +98,12 @@
(build rakudo-build)
(arguments (strip-keyword-arguments private-keywords arguments)))))
-(define* (rakudo-build store name inputs
+(define* (rakudo-build name inputs
#:key
+ source
(search-paths '())
(tests? #t)
- (phases '(@ (guix build rakudo-build-system)
- %standard-phases))
+ (phases '%standard-phases)
(outputs '("out"))
(system (%current-system))
(guile #f)
@@ -112,39 +114,25 @@
(guix build utils))))
"Build SOURCE using PERL6, and with INPUTS."
(define builder
- `(begin
- (use-modules ,@modules)
- (rakudo-build #:name ,name
- #:source ,(match (assoc-ref inputs "source")
- (((? derivation? source))
- (derivation->output-path source))
- ((source)
- source)
- (source
- source))
- #:search-paths ',(map search-path-specification->sexp
- search-paths)
- #:phases ,phases
- #:system ,system
- #:tests? ,tests?
- #:outputs %outputs
- #:inputs %build-inputs)))
+ (with-imported-modules imported-modules
+ #~(begin
+ (use-modules #$@(sexp->gexp modules))
+ (rakudo-build #:name #$name
+ #:source #+source
+ #:search-paths '#$(sexp->gexp
+ (map search-path-specification->sexp
+ search-paths))
+ #:phases #$phases
+ #:system #$system
+ #:tests? #$tests?
+ #:outputs #$(outputs->gexp outputs)
+ #:inputs #$(input-tuples->gexp inputs)))))
- (define guile-for-build
- (match guile
- ((? package?)
- (package-derivation store guile system #:graft? #f))
- (#f ; the default
- (let* ((distro (resolve-interface '(gnu packages commencement)))
- (guile (module-ref distro 'guile-final)))
- (package-derivation store guile system #:graft? #f)))))
-
- (build-expression->derivation store name builder
- #:system system
- #:inputs inputs
- #:modules imported-modules
- #:outputs outputs
- #:guile-for-build guile-for-build))
+ (mlet %store-monad ((guile (package->derivation (or guile (default-guile))
+ system #:graft? #f)))
+ (gexp->derivation name builder
+ #:system system
+ #:guile-for-build guile)))
(define rakudo-build-system
(build-system
diff --git a/guix/build-system/renpy.scm b/guix/build-system/renpy.scm
index 5ed59bf5a5..f1070951ee 100644
--- a/guix/build-system/renpy.scm
+++ b/guix/build-system/renpy.scm
@@ -1,4 +1,6 @@
;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2021 Leo Prikler <leo.prikler@student.tugraz.at>
+;;; Copyright © 2021 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2021 Liliana Marie Prikler <liliana.prikler@gmail.com>
;;;
;;; This file is part of GNU Guix.
@@ -21,7 +23,8 @@
#:use-module (guix utils)
#:use-module (guix memoization)
#:use-module (guix packages)
- #:use-module (guix derivations)
+ #:use-module (guix gexp)
+ #:use-module (guix monads)
#:use-module (guix search-paths)
#:use-module (guix build-system)
#:use-module (guix build-system gnu)
@@ -53,7 +56,7 @@
#:rest arguments)
"Return a bag for NAME."
(define private-keywords
- '(#:source #:target #:renpy #:inputs #:native-inputs))
+ '(#:target #:renpy #:inputs #:native-inputs))
(and (not target) ;XXX: no cross-compilation
(bag
@@ -72,57 +75,43 @@
(build renpy-build)
(arguments (strip-keyword-arguments private-keywords arguments)))))
-(define* (renpy-build store name inputs
- #:key
- (phases '(@ (guix build renpy-build-system)
- %standard-phases))
- (configure-flags ''())
- (outputs '("out"))
- (output "out")
- (game "game")
- (search-paths '())
- (system (%current-system))
- (guile #f)
- (imported-modules %renpy-build-system-modules)
- (modules '((guix build renpy-build-system)
- (guix build utils))))
+(define* (renpy-build name inputs
+ #:key
+ source
+ (phases '%standard-phases)
+ (configure-flags ''())
+ (outputs '("out"))
+ (output "out")
+ (game "game")
+ (search-paths '())
+ (system (%current-system))
+ (guile #f)
+ (imported-modules %renpy-build-system-modules)
+ (modules '((guix build renpy-build-system)
+ (guix build utils))))
"Build SOURCE using RENPY, and with INPUTS."
(define builder
- `(begin
- (use-modules ,@modules)
- (renpy-build #:name ,name
- #:source ,(match (assoc-ref inputs "source")
- (((? derivation? source))
- (derivation->output-path source))
- ((source)
- source)
- (source
- source))
- #:configure-flags ,configure-flags
- #:system ,system
- #:phases ,phases
- #:outputs %outputs
- #:output ,output
- #:game ,game
- #:search-paths ',(map search-path-specification->sexp
- search-paths)
- #:inputs %build-inputs)))
+ (with-imported-modules imported-modules
+ #~(begin
+ (use-modules #$@(sexp->gexp modules))
+ (renpy-build #:name #$name
+ #:source #+source
+ #:configure-flags #$configure-flags
+ #:system #$system
+ #:phases #$phases
+ #:outputs #$(outputs->gexp outputs)
+ #:output #$output
+ #:game #$game
+ #:search-paths '#$(sexp->gexp
+ (map search-path-specification->sexp
+ search-paths))
+ #:inputs #$(input-tuples->gexp inputs)))))
- (define guile-for-build
- (match guile
- ((? package?)
- (package-derivation store guile system #:graft? #f))
- (#f ; the default
- (let* ((distro (resolve-interface '(gnu packages commencement)))
- (guile (module-ref distro 'guile-final)))
- (package-derivation store guile system #:graft? #f)))))
-
- (build-expression->derivation store name builder
- #: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 renpy-build-system
(build-system
diff --git a/guix/build-system/ruby.scm b/guix/build-system/ruby.scm
index 8142e8551a..342daf7978 100644
--- a/guix/build-system/ruby.scm
+++ b/guix/build-system/ruby.scm
@@ -1,6 +1,6 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2014 David Thompson <davet@gnu.org>
-;;; Copyright © 2014, 2015 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2014, 2015, 2021 Ludovic Courtès <ludo@gnu.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -20,6 +20,8 @@
(define-module (guix build-system ruby)
#:use-module (guix store)
#:use-module (guix utils)
+ #:use-module (guix gexp)
+ #:use-module (guix monads)
#:use-module (guix packages)
#:use-module (guix derivations)
#:use-module (guix search-paths)
@@ -54,7 +56,7 @@ NAME and VERSION."
#:rest arguments)
"Return a bag for NAME."
(define private-keywords
- '(#:source #:target #:ruby #:inputs #:native-inputs))
+ '(#:target #:ruby #:inputs #:native-inputs))
(and (not target) ;XXX: no cross-compilation
(bag
@@ -73,13 +75,12 @@ NAME and VERSION."
(build ruby-build)
(arguments (strip-keyword-arguments private-keywords arguments)))))
-(define* (ruby-build store name inputs
- #:key
+(define* (ruby-build name inputs
+ #:key source
(gem-flags ''())
(test-target "test")
(tests? #t)
- (phases '(@ (guix build ruby-build-system)
- %standard-phases))
+ (phases '%standard-phases)
(outputs '("out"))
(search-paths '())
(system (%current-system))
@@ -88,42 +89,33 @@ NAME and VERSION."
(modules '((guix build ruby-build-system)
(guix build utils))))
"Build SOURCE using RUBY and INPUTS."
- (define builder
- `(begin
- (use-modules ,@modules)
- (ruby-build #:name ,name
- #:source ,(match (assoc-ref inputs "source")
- (((? derivation? source))
- (derivation->output-path source))
- ((source)
- source)
- (source
- source))
- #:system ,system
- #:gem-flags ,gem-flags
- #:test-target ,test-target
- #:tests? ,tests?
- #:phases ,phases
- #:outputs %outputs
- #:search-paths ',(map search-path-specification->sexp
- search-paths)
- #:inputs %build-inputs)))
+ (define build
+ #~(begin
+ (use-modules #$@(sexp->gexp modules))
- (define guile-for-build
- (match guile
- ((? package?)
- (package-derivation store guile system #:graft? #f))
- (#f
- (let* ((distro (resolve-interface '(gnu packages commencement)))
- (guile (module-ref distro 'guile-final)))
- (package-derivation store guile system #:graft? #f)))))
+ #$(with-build-variables inputs outputs
+ #~(ruby-build #:name #$name
+ #:source #+source
+ #:system #$system
+ #:gem-flags #$gem-flags
+ #:test-target #$test-target
+ #:tests? #$tests?
+ #:phases #$(if (pair? phases)
+ (sexp->gexp phases)
+ phases)
+ #:outputs %outputs
+ #:search-paths '#$(sexp->gexp
+ (map search-path-specification->sexp
+ search-paths))
+ #:inputs %build-inputs))))
- (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 build
+ #:system system
+ #:target #f
+ #:modules imported-modules
+ #:guile-for-build guile)))
(define ruby-build-system
(build-system
diff --git a/guix/build-system/scons.scm b/guix/build-system/scons.scm
index aad455c419..74901b3478 100644
--- a/guix/build-system/scons.scm
+++ b/guix/build-system/scons.scm
@@ -1,5 +1,6 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2017 Arun Isaac <arunisaac@systemreboot.net>
+;;; Copyright © 2021 Ludovic Courtès <ludo@gnu.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -19,7 +20,8 @@
(define-module (guix build-system scons)
#:use-module (guix utils)
#:use-module (guix packages)
- #:use-module (guix derivations)
+ #:use-module (guix monads)
+ #:use-module (guix gexp)
#:use-module (guix search-paths)
#:use-module (guix build-system)
#:use-module (guix build-system gnu)
@@ -53,7 +55,7 @@
#:rest arguments)
"Return a bag for NAME."
(define private-keywords
- '(#:source #:target #:scons #:inputs #:native-inputs))
+ '(#:target #:scons #:inputs #:native-inputs))
(and (not target) ;XXX: no cross-compilation
(bag
@@ -72,15 +74,15 @@
(build scons-build)
(arguments (strip-keyword-arguments private-keywords arguments)))))
-(define* (scons-build store name inputs
+(define* (scons-build name inputs
#:key
+ (source #f)
(tests? #t)
(scons-flags ''())
- (build-targets ''())
+ (build-targets #~'())
(test-target "test")
- (install-targets ''("install"))
- (phases '(@ (guix build scons-build-system)
- %standard-phases))
+ (install-targets #~'("install"))
+ (phases '%standard-phases)
(outputs '("out"))
(search-paths '())
(system (%current-system))
@@ -91,43 +93,33 @@
"Build SOURCE using SCons, and with INPUTS. This assumes that SOURCE
provides a 'SConstruct' file as its build system."
(define builder
- `(begin
- (use-modules ,@modules)
- (scons-build #:name ,name
- #:source ,(match (assoc-ref inputs "source")
- (((? derivation? source))
- (derivation->output-path source))
- ((source)
- source)
- (source
- source))
- #:scons-flags ,scons-flags
- #:system ,system
- #:build-targets ,build-targets
- #:test-target ,test-target
- #:tests? ,tests?
- #:install-targets ,install-targets
- #:phases ,phases
- #:outputs %outputs
- #:search-paths ',(map search-path-specification->sexp
- search-paths)
- #:inputs %build-inputs)))
+ (with-imported-modules imported-modules
+ #~(begin
+ (use-modules #$@(sexp->gexp modules))
- (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)))))
+ #$(with-build-variables inputs outputs
+ #~(scons-build #:name #$name
+ #:source #+source
+ #:scons-flags #$(sexp->gexp scons-flags)
+ #:system #$system
+ #:build-targets #$build-targets
+ #:test-target #$test-target
+ #:tests? #$tests?
+ #:install-targets #$install-targets
+ #:phases #$(if (pair? phases)
+ (sexp->gexp phases)
+ phases)
+ #:outputs %outputs
+ #:inputs %build-inputs
+ #:search-paths
+ '#$(sexp->gexp
+ (map search-path-specification->sexp
+ search-paths)))))))
- (build-expression->derivation store name builder
- #:inputs inputs
- #:system system
- #:modules imported-modules
- #:outputs outputs
- #:guile-for-build guile-for-build))
+ (gexp->derivation name builder
+ #:system system
+ #:target #f
+ #:guile-for-build guile))
(define scons-build-system
(build-system
diff --git a/guix/build-system/texlive.scm b/guix/build-system/texlive.scm
index 8bbca0ccb7..09907c67d8 100644
--- a/guix/build-system/texlive.scm
+++ b/guix/build-system/texlive.scm
@@ -1,5 +1,7 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2017 Ricardo Wurmus <rekado@elephly.net>
+;;; Copyright © 2021 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2021 Thiago Jung Bauermann <bauermann@kolabnow.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -20,7 +22,8 @@
#:use-module (guix store)
#:use-module (guix utils)
#:use-module (guix packages)
- #:use-module (guix derivations)
+ #:use-module (guix monads)
+ #:use-module (guix gexp)
#:use-module (guix search-paths)
#:use-module (guix build-system)
#:use-module (guix build-system gnu)
@@ -42,8 +45,8 @@
;; These variables specify the SVN tag and the matching SVN revision. They
;; are taken from https://www.tug.org/svn/texlive/tags/
-(define %texlive-tag "texlive-2019.3")
-(define %texlive-revision 51265)
+(define %texlive-tag "texlive-2021.3")
+(define %texlive-revision 59745)
(define (texlive-origin name version locations hash)
"Return an <origin> object for a TeX Live package consisting of multiple
@@ -59,13 +62,17 @@ name for the checkout directory."
(file-name (string-append name "-" version "-checkout"))
(sha256 hash)))
-(define (texlive-ref component id)
+(define* (texlive-ref component #:optional id)
"Return a <svn-reference> object for the package ID, which is part of the
-given Texlive COMPONENT."
+given Texlive COMPONENT. If ID is not provided, COMPONENT is used as the top
+level package ID."
(svn-reference
(url (string-append "svn://www.tug.org/texlive/tags/"
%texlive-tag "/Master/texmf-dist/"
- "source/" component "/" id))
+ "source/" component
+ (if id
+ (string-append "/" id)
+ "")))
(revision %texlive-revision)))
(define %texlive-build-system-modules
@@ -96,7 +103,7 @@ given Texlive COMPONENT."
#:rest arguments)
"Return a bag for NAME."
(define private-keywords
- '(#:source #:target #:inputs #:native-inputs
+ '(#:target #:inputs #:native-inputs
#:texlive-latex-base #:texlive-bin))
(bag
@@ -110,18 +117,29 @@ given Texlive COMPONENT."
;; Keep the standard inputs of 'gnu-build-system'.
,@(standard-packages)))
(build-inputs `(("texlive-bin" ,texlive-bin)
- ("texlive-latex-base" ,texlive-latex-base)
+ ,@(if texlive-latex-base
+ `(("texlive-latex-base" ,texlive-latex-base))
+ '())
,@native-inputs))
(outputs outputs)
(build texlive-build)
(arguments (strip-keyword-arguments private-keywords arguments))))
-(define* (texlive-build store name inputs
+(define* (texlive-build name inputs
#:key
+ source
(tests? #f)
tex-directory
(build-targets #f)
- (tex-format "luatex")
+ (tex-engine #f)
+
+ ;; FIXME: This would normally default to "luatex" but
+ ;; LuaTeX has a bug where sometimes it corrupts the
+ ;; heap and aborts. This causes the build of texlive
+ ;; packages to fail at random. The problem is being
+ ;; tracked at <https://issues.guix.gnu.org/48064>.
+ (tex-format "pdftex")
+
(phases '(@ (guix build texlive-build-system)
%standard-phases))
(outputs '("out"))
@@ -135,43 +153,34 @@ given Texlive COMPONENT."
(guix build utils))))
"Build SOURCE with INPUTS."
(define builder
- `(begin
- (use-modules ,@modules)
- (texlive-build #:name ,name
- #:source ,(match (assoc-ref inputs "source")
- (((? derivation? source))
- (derivation->output-path source))
- ((source)
- source)
- (source
- source))
- #:tex-directory ,tex-directory
- #:build-targets ,build-targets
- #:tex-format ,tex-format
- #:system ,system
- #:tests? ,tests?
- #:phases ,phases
- #:outputs %outputs
- #:search-paths ',(map search-path-specification->sexp
- search-paths)
- #:inputs %build-inputs)))
-
- (define guile-for-build
- (match guile
- ((? package?)
- (package-derivation store guile system #:graft? #f))
- (#f ; the default
- (let* ((distro (resolve-interface '(gnu packages commencement)))
- (guile (module-ref distro 'guile-final)))
- (package-derivation store guile system #:graft? #f)))))
-
- (build-expression->derivation store name builder
- #:inputs inputs
- #:system system
- #:modules imported-modules
- #:outputs outputs
- #:guile-for-build guile-for-build
- #:substitutable? substitutable?))
+ (with-imported-modules imported-modules
+ #~(begin
+ (use-modules #$@(sexp->gexp modules))
+
+ #$(with-build-variables inputs outputs
+ #~(texlive-build #:name #$name
+ #:source #+source
+ #:tex-directory #$tex-directory
+ #:build-targets #$build-targets
+ #:tex-engine #$(if tex-engine
+ tex-engine
+ tex-format)
+ #:tex-format #$tex-format
+ #:system #$system
+ #:tests? #$tests?
+ #:phases #$(if (pair? phases)
+ (sexp->gexp phases)
+ phases)
+ #:outputs %outputs
+ #:inputs %build-inputs
+ #:search-paths '#$(sexp->gexp
+ (map search-path-specification->sexp
+ search-paths)))))))
+
+ (gexp->derivation name builder
+ #:system system
+ #:target #f
+ #:substitutable? substitutable?))
(define texlive-build-system
(build-system
diff --git a/guix/build-system/trivial.scm b/guix/build-system/trivial.scm
index b50ef7cd92..378ae481b9 100644
--- a/guix/build-system/trivial.scm
+++ b/guix/build-system/trivial.scm
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2012, 2013, 2014, 2018 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2012, 2013, 2014, 2015, 2018, 2021 Ludovic Courtès <ludo@gnu.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -19,24 +19,16 @@
(define-module (guix build-system trivial)
#:use-module (guix store)
#:use-module (guix utils)
- #:use-module (guix derivations)
+ #:use-module (guix gexp)
+ #:use-module (guix monads)
#:use-module (guix packages)
#:use-module (guix build-system)
#:use-module (ice-9 match)
#:export (trivial-build-system))
-(define (guile-for-build store guile system)
- (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)))))
-
(define* (lower name
#:key source inputs native-inputs outputs system target
- guile builder modules allowed-references)
+ guile builder (modules '()) allowed-references)
"Return a bag for NAME."
(bag
(name name)
@@ -54,65 +46,50 @@
#:modules ,modules
#:allowed-references ,allowed-references))))
-(define* (trivial-build store name inputs
+(define* (trivial-build name inputs
#:key
- outputs guile system builder (modules '())
+ outputs guile
+ system builder (modules '())
search-paths allowed-references)
"Run build expression BUILDER, an expression, for SYSTEM. SOURCE is
ignored."
- (define canonicalize-reference
- (match-lambda
- ((? package? p)
- (derivation->output-path (package-derivation store p system
- #:graft? #f)))
- (((? package? p) output)
- (derivation->output-path (package-derivation store p system
- #:graft? #f)
- output))
- ((? string? output)
- output)))
-
- (build-expression->derivation store name builder
- #:inputs inputs
- #:system system
- #:outputs outputs
- #:modules modules
- #:allowed-references
- (and allowed-references
- (map canonicalize-reference
- allowed-references))
- #:guile-for-build
- (guile-for-build store guile system)))
+ (mlet %store-monad ((guile (package->derivation (or guile (default-guile))
+ system #:graft? #f))
+ (builder -> (if (pair? builder)
+ (sexp->gexp builder)
+ builder)))
+ (gexp->derivation name (with-build-variables inputs outputs builder)
+ #:system system
+ #:target #f
+ #:graft? #f
+ #:modules modules
+ #:allowed-references allowed-references
+ #:guile-for-build guile)))
-(define* (trivial-cross-build store name
+(define* (trivial-cross-build name
#:key
- target native-drvs target-drvs
+ target
+ source build-inputs target-inputs host-inputs
outputs guile system builder (modules '())
search-paths native-search-paths
allowed-references)
"Run build expression BUILDER, an expression, for SYSTEM. SOURCE is
ignored."
- (define canonicalize-reference
- (match-lambda
- ((? package? p)
- (derivation->output-path (package-cross-derivation store p system)))
- (((? package? p) output)
- (derivation->output-path (package-cross-derivation store p system)
- output))
- ((? string? output)
- output)))
-
- (build-expression->derivation store name builder
- #:inputs (append native-drvs target-drvs)
- #:system system
- #:outputs outputs
- #:modules modules
- #:allowed-references
- (and allowed-references
- (map canonicalize-reference
- allowed-references))
- #:guile-for-build
- (guile-for-build store guile system)))
+ (mlet %store-monad ((guile (package->derivation (or guile (default-guile))
+ system #:graft? #f))
+ (builder -> (if (pair? builder)
+ (sexp->gexp builder)
+ builder)))
+ (gexp->derivation name (with-build-variables
+ (append build-inputs target-inputs host-inputs)
+ outputs
+ builder)
+ #:system system
+ #:target target
+ #:graft? #f
+ #:modules modules
+ #:allowed-references allowed-references
+ #:guile-for-build guile)))
(define trivial-build-system
(build-system
diff --git a/guix/build-system/waf.scm b/guix/build-system/waf.scm
index 044d2a0829..e8cd5520b8 100644
--- a/guix/build-system/waf.scm
+++ b/guix/build-system/waf.scm
@@ -19,6 +19,8 @@
(define-module (guix build-system waf)
#:use-module (guix store)
#:use-module (guix utils)
+ #:use-module (guix gexp)
+ #:use-module (guix monads)
#:use-module (guix packages)
#:use-module (guix derivations)
#:use-module (guix search-paths)
@@ -52,7 +54,7 @@
#:rest arguments)
"Return a bag for NAME."
(define private-keywords
- '(#:source #:target #:python #:inputs #:native-inputs))
+ '(#:target #:python #:inputs #:native-inputs))
(and (not target) ;XXX: no cross-compilation
(bag
@@ -71,58 +73,46 @@
(build waf-build) ; only change compared to 'lower' in python.scm
(arguments (strip-keyword-arguments private-keywords arguments)))))
-(define* (waf-build store name inputs
- #:key
- (tests? #t)
- (test-target "check")
- (configure-flags ''())
- (phases '(@ (guix build waf-build-system)
- %standard-phases))
- (outputs '("out"))
- (search-paths '())
- (system (%current-system))
- (guile #f)
- (imported-modules %waf-build-system-modules)
- (modules '((guix build waf-build-system)
- (guix build utils))))
+(define* (waf-build name inputs
+ #:key source
+ (tests? #t)
+ (test-target "check")
+ (configure-flags #~'())
+ (phases '%standard-phases)
+ (outputs '("out"))
+ (search-paths '())
+ (system (%current-system))
+ (guile #f)
+ (imported-modules %waf-build-system-modules)
+ (modules '((guix build waf-build-system)
+ (guix build utils))))
"Build SOURCE with INPUTS. This assumes that SOURCE provides a 'waf' file
as its build system."
- (define builder
- `(begin
- (use-modules ,@modules)
- (waf-build #:name ,name
- #:source ,(match (assoc-ref inputs "source")
- (((? derivation? source))
- (derivation->output-path source))
- ((source)
- source)
- (source
- source))
- #:configure-flags ,configure-flags
- #:system ,system
- #:test-target ,test-target
- #:tests? ,tests?
- #:phases ,phases
- #:outputs %outputs
- #:search-paths ',(map search-path-specification->sexp
- search-paths)
- #:inputs %build-inputs)))
+ (define build
+ #~(begin
+ (use-modules #$@(sexp->gexp modules))
- (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)))))
+ #$(with-build-variables inputs outputs
+ #~(waf-build #:name #$name
+ #:source #+source
+ #:configure-flags #$configure-flags
+ #:system #$system
+ #:test-target #$test-target
+ #:tests? #$tests?
+ #:phases #$phases
+ #:outputs %outputs
+ #:search-paths '#$(sexp->gexp
+ (map search-path-specification->sexp
+ search-paths))
+ #:inputs %build-inputs))))
- (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 build
+ #:system system
+ #:target #f
+ #:modules imported-modules
+ #:guile-for-build guile)))
(define waf-build-system
(build-system
diff --git a/guix/build/copy-build-system.scm b/guix/build/copy-build-system.scm
index a86f0cde29..fb2d1db056 100644
--- a/guix/build/copy-build-system.scm
+++ b/guix/build/copy-build-system.scm
@@ -1,6 +1,7 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2019 Julien Lepiller <julien@lepiller.eu>
;;; Copyright © 2020 Pierre Neidhardt <mail@ambrevar.xyz>
+;;; Copyright © 2021 Efraim Flashner <efraim@flashner.co.il>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -58,7 +59,7 @@ In the above, FILTERS are optional.
one of the elements in the list.
- With `#:include-regexp`, install subpaths matching the regexps in the list.
- The `#:exclude*` FILTERS work similarly. Without `#:include*` flags,
- install every subpath but the files matching the `#:exlude*` filters.
+ install every subpath but the files matching the `#:exclude*` filters.
If both `#:include*` and `#:exclude*` are specified, the exclusion is done
on the inclusion list.
@@ -133,8 +134,8 @@ given, then the predicate always returns DEFAULT-VALUE."
file-list))))
(define* (install source target #:key include exclude include-regexp exclude-regexp)
- (set! target (string-append (assoc-ref outputs "out") "/" target))
- (let ((filters? (or include exclude include-regexp exclude-regexp)))
+ (let ((final-target (string-append (assoc-ref outputs "out") "/" target))
+ (filters? (or include exclude include-regexp exclude-regexp)))
(when (and (not (file-is-directory? source))
filters?)
(error "Cannot use filters when SOURCE is a file."))
@@ -143,12 +144,12 @@ given, then the predicate always returns DEFAULT-VALUE."
(and (file-is-directory? source)
filters?))))
(if multi-files-in-source?
- (install-file-list source target
+ (install-file-list source final-target
#:include include
#:exclude exclude
#:include-regexp include-regexp
#:exclude-regexp exclude-regexp)
- (install-simple source target)))))
+ (install-simple source final-target)))))
(for-each (lambda (plan) (apply install plan)) install-plan)
#t)
diff --git a/guix/build/emacs-build-system.scm b/guix/build/emacs-build-system.scm
index f13162d6c4..e6b88ad640 100644
--- a/guix/build/emacs-build-system.scm
+++ b/guix/build/emacs-build-system.scm
@@ -120,24 +120,10 @@ environment variable\n" source-directory))
"Substitute the absolute \"/bin/\" directory with the right location in the
store in '.el' files."
- (define (file-contains-nul-char? file)
- (call-with-input-file file
- (lambda (in)
- (let loop ((line (read-line in 'concat)))
- (cond
- ((eof-object? line) #f)
- ((string-index line #\nul) #t)
- (else (loop (read-line in 'concat))))))
- #:binary #t))
-
(let* ((out (assoc-ref outputs "out"))
(elpa-name-ver (store-directory->elpa-name-version out))
(el-dir (string-append out %install-dir "/" elpa-name-ver))
- ;; (ice-9 regex) uses libc's regexp routines, which cannot deal with
- ;; strings containing NULs. Filter out such files. TODO: Remove
- ;; this workaround when <https://bugs.gnu.org/30116> is fixed.
- (el-files (remove file-contains-nul-char?
- (find-files (getcwd) "\\.el$"))))
+ (el-files (find-files (getcwd) "\\.el$")))
(define (substitute-program-names)
(substitute* el-files
(("\"/bin/([^.]\\S*)\"" _ cmd-name)
diff --git a/guix/build/glib-or-gtk-build-system.scm b/guix/build/glib-or-gtk-build-system.scm
index ba680fd1a9..475a94ae4f 100644
--- a/guix/build/glib-or-gtk-build-system.scm
+++ b/guix/build/glib-or-gtk-build-system.scm
@@ -2,6 +2,8 @@
;;; Copyright © 2014 Federico Beffa <beffa@fbengineering.ch>
;;; Copyright © 2014, 2015 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2018 Mark H Weaver <mhw@netris.org>
+;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be>
+;;; Copyright © 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -27,6 +29,8 @@
#:use-module (srfi srfi-1)
#:use-module (srfi srfi-26)
#:export (%standard-phases
+ %gdk-pixbuf-loaders-cache-file
+ generate-gdk-pixbuf-loaders-cache
glib-or-gtk-build))
;; Commentary:
@@ -50,12 +54,24 @@
"Check for the existence of \"libdir/gtk-v.0\" in INPUTS. Return a list
with all found directories."
(let* ((version
- (if (string-match "gtk\\+-3"
- (or (assoc-ref inputs "gtk+")
- (assoc-ref inputs "source")
- "gtk+-3")) ; we default to version 3
- "3.0"
- "2.0"))
+ (cond
+ ((string-match "gtk-4"
+ (or (assoc-ref inputs "gtk")
+ (assoc-ref inputs "source")
+ ""))
+ "4.0")
+ ((string-match "gtk\\+-3"
+ (or (assoc-ref inputs "gtk+")
+ (assoc-ref inputs "source")
+ ""))
+ "3.0")
+ ((string-match "gtk\\+-2"
+ (or (assoc-ref inputs "gtk+")
+ (assoc-ref inputs "source")
+ ""))
+ "2.0")
+ (else
+ "4.0"))) ; We default to version 4.0.
(gtk-module
(lambda (input prev)
(let* ((in (match input
@@ -136,69 +152,41 @@ Wrapping is not applied to outputs whose name is listed in
GLIB-OR-GTK-WRAP-EXCLUDED-OUTPUTS. This is useful when an output is known not
to contain any GLib or GTK+ binaries, and where wrapping would gratuitously
add a dependency of that output on GLib and GTK+."
+ ;; Do not require bash to be present in the package inputs
+ ;; even when there is nothing to wrap.
+ ;; Also, calculate (sh) only once to prevent some I/O.
+ (define %sh (delay (search-input-file inputs "bin/bash")))
+ (define (sh) (force %sh))
(define handle-output
(match-lambda
- ((output . directory)
- (unless (member output glib-or-gtk-wrap-excluded-outputs)
- (let* ((bindir (string-append directory "/bin"))
- (libexecdir (string-append directory "/libexec"))
- (bin-list (append (find-files bindir ".*")
- (find-files libexecdir ".*")))
- (datadirs (data-directories
- (alist-cons output directory inputs)))
- (gtk-mod-dirs (gtk-module-directories
- (alist-cons output directory inputs)))
- (gio-mod-dirs (gio-module-directories
- (alist-cons output directory inputs)))
- (data-env-var
- (if (not (null? datadirs))
- `("XDG_DATA_DIRS" ":" prefix ,datadirs)
- #f))
- (gtk-mod-env-var
- (if (not (null? gtk-mod-dirs))
- `("GTK_PATH" ":" prefix ,gtk-mod-dirs)
- #f))
- (gio-mod-env-var
- (if (not (null? gio-mod-dirs))
- `("GIO_EXTRA_MODULES" ":" prefix ,gio-mod-dirs)
- #f)))
- (cond
- ((and data-env-var gtk-mod-env-var gio-mod-env-var)
- (for-each (cut wrap-program <>
- data-env-var
- gtk-mod-env-var
- gio-mod-env-var)
- bin-list))
- ((and data-env-var gtk-mod-env-var (not gio-mod-env-var))
- (for-each (cut wrap-program <>
- data-env-var
- gtk-mod-env-var)
- bin-list))
- ((and data-env-var (not gtk-mod-env-var) gio-mod-env-var)
- (for-each (cut wrap-program <>
- data-env-var
- gio-mod-env-var)
- bin-list))
- ((and (not data-env-var) gtk-mod-env-var gio-mod-env-var)
- (for-each (cut wrap-program <>
- gio-mod-env-var
- gtk-mod-env-var)
- bin-list))
- ((and data-env-var (not gtk-mod-env-var) (not gio-mod-env-var))
- (for-each (cut wrap-program <>
- data-env-var)
- bin-list))
- ((and (not data-env-var) gtk-mod-env-var (not gio-mod-env-var))
- (for-each (cut wrap-program <>
- gtk-mod-env-var)
- bin-list))
- ((and (not data-env-var) (not gtk-mod-env-var) gio-mod-env-var)
- (for-each (cut wrap-program <>
- gio-mod-env-var)
- bin-list))))))))
-
- (for-each handle-output outputs)
- #t)
+ ((output . directory)
+ (unless (member output glib-or-gtk-wrap-excluded-outputs)
+ (let* ((bindir (string-append directory "/bin"))
+ (libexecdir (string-append directory "/libexec"))
+ (bin-list (filter (negate wrapped-program?)
+ (append (find-files bindir ".*")
+ (find-files libexecdir ".*"))))
+ (datadirs (data-directories
+ (alist-cons output directory inputs)))
+ (gtk-mod-dirs (gtk-module-directories
+ (alist-cons output directory inputs)))
+ (gio-mod-dirs (gio-module-directories
+ (alist-cons output directory inputs)))
+ (env-vars `(,@(if (not (null? datadirs))
+ (list `("XDG_DATA_DIRS" ":" prefix ,datadirs))
+ '())
+ ,@(if (not (null? gtk-mod-dirs))
+ (list `("GTK_PATH" ":" prefix ,gtk-mod-dirs))
+ '())
+ ,@(if (not (null? gio-mod-dirs))
+ (list `("GIO_EXTRA_MODULES" ":"
+ prefix ,gio-mod-dirs))
+ '()))))
+ (for-each (lambda (program)
+ (apply wrap-program program #:sh (sh) env-vars))
+ bin-list))))))
+
+ (for-each handle-output outputs))
(define* (compile-glib-schemas #:key outputs #:allow-other-keys)
"Implement phase \"glib-or-gtk-compile-schemas\": compile \"glib\" schemas
@@ -211,11 +199,58 @@ if needed."
(not (file-exists?
(string-append schemasdir "/gschemas.compiled"))))
(invoke "glib-compile-schemas" schemasdir)))))
- outputs)
- #t)
+ outputs))
+
+;; This file is to be generated by the
+;; `generate-gdk-pixbuf-loaders-cache' build phase defined below.
+(define %gdk-pixbuf-loaders-cache-file
+ "lib/gdk-pixbuf-2.0/2.10.0/loaders.cache")
+
+(define (generate-gdk-pixbuf-loaders-cache directories outputs)
+ "Generate the loaders.cache file used by gdk-pixbuf to locate the available
+loaders among DIRECTORIES, and set the GDK_PIXBUF_MODULE_FILE environment
+variable. The cache file is installed under OUTPUTS. Return the first cache
+file name if one was created else #f."
+ (let* ((loaders (append-map
+ (cut find-files <> "^libpixbufloader-.*\\.so$")
+ directories))
+ (outputs* (map (cut string-append <> "/"
+ %gdk-pixbuf-loaders-cache-file)
+ outputs))
+ (loaders.cache (first outputs*))
+ (loaders.cache-copies (cdr outputs*)))
+ (if (not (null? loaders))
+ (begin
+ (mkdir-p (dirname loaders.cache))
+ (setenv "GDK_PIXBUF_MODULE_FILE" loaders.cache)
+ (apply invoke "gdk-pixbuf-query-loaders" "--update-cache" loaders)
+ (for-each (lambda (f)
+ (mkdir-p (dirname f))
+ (copy-file loaders.cache f))
+ loaders.cache-copies)
+ loaders.cache)
+ #f)))
+
+(define* (generate-gdk-pixbuf-loaders-cache-file #:key inputs outputs
+ #:allow-other-keys)
+ "Build phase that Wraps the GENERATE-GDK-PIXBUF-LOADERS-CACHE procedure."
+ ;; Conditionally compute the cache file if the gdk-pixbuf command is
+ ;; available on PATH (it comes with gdk-pixbuf).
+ (when (which "gdk-pixbuf-query-loaders")
+ (let ((loaders.cache (generate-gdk-pixbuf-loaders-cache
+ (map cdr inputs)
+ (filter-map identity
+ (list
+ (assoc-ref outputs "out")
+ (assoc-ref outputs "bin")
+ (assoc-ref outputs "lib"))))))
+ (when loaders.cache
+ (format #t "GDK_PIXBUF_MODULE_FILE set to `~a'~%" loaders.cache)))))
(define %standard-phases
(modify-phases gnu:%standard-phases
+ (add-after 'unpack 'generate-gdk-pixbuf-loaders-cache-file
+ generate-gdk-pixbuf-loaders-cache-file)
(add-after 'install 'glib-or-gtk-compile-schemas compile-glib-schemas)
(add-after 'install 'glib-or-gtk-wrap wrap-all-programs)))
diff --git a/guix/build/gnu-build-system.scm b/guix/build/gnu-build-system.scm
index 2e7dff2034..d0f7413268 100644
--- a/guix/build/gnu-build-system.scm
+++ b/guix/build/gnu-build-system.scm
@@ -1,7 +1,8 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2018 Mark H Weaver <mhw@netris.org>
;;; Copyright © 2020 Brendan Tildesley <mail@brendan.scot>
+;;; Copyright © 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -35,6 +36,7 @@
#:use-module (rnrs io ports)
#:export (%standard-phases
%license-file-regexp
+ %bootstrap-scripts
dump-file-contents
gnu-build))
@@ -57,23 +59,26 @@
"Set the 'SOURCE_DATE_EPOCH' environment variable. This is used by tools
that incorporate timestamps as a way to tell them to use a fixed timestamp.
See https://reproducible-builds.org/specs/source-date-epoch/."
- (setenv "SOURCE_DATE_EPOCH" "1")
- #t)
+ (setenv "SOURCE_DATE_EPOCH" "1"))
(define (first-subdirectory directory)
- "Return the file name of the first sub-directory of DIRECTORY."
+ "Return the file name of the first sub-directory of DIRECTORY or false, when
+there are none."
(match (scandir directory
(lambda (file)
(and (not (member file '("." "..")))
(file-is-directory? (string-append directory "/"
file)))))
- ((first . _) first)))
+ ((first . _) first)
+ (_ #f)))
(define* (set-paths #:key target inputs native-inputs
(search-paths '()) (native-search-paths '())
#:allow-other-keys)
(define input-directories
- (match inputs
+ ;; The "source" input can be a directory, but we don't want it for search
+ ;; paths. See <https://issues.guix.gnu.org/44924>.
+ (match (alist-delete "source" inputs)
(((_ . dir) ...)
dir)))
@@ -113,9 +118,7 @@ See https://reproducible-builds.org/specs/source-date-epoch/."
#:separator separator
#:type type
#:pattern pattern)))
- native-search-paths))
-
- #t)
+ native-search-paths)))
(define* (install-locale #:key
(locale "en_US.utf8")
@@ -134,15 +137,13 @@ chance to be set."
(setenv (locale-category->string locale-category) locale)
(format (current-error-port) "using '~a' locale for category ~s~%"
- locale (locale-category->string locale-category))
- #t)
+ locale (locale-category->string locale-category)))
(lambda args
;; This is known to fail for instance in early bootstrap where locales
;; are not available.
(format (current-error-port)
"warning: failed to install '~a' locale: ~a~%"
- locale (strerror (system-error-errno args)))
- #t)))
+ locale (strerror (system-error-errno args))))))
(define* (unpack #:key source #:allow-other-keys)
"Unpack SOURCE in the working directory, and change directory within the
@@ -156,13 +157,25 @@ working directory."
;; Preserve timestamps (set to the Epoch) on the copied tree so that
;; things work deterministically.
(copy-recursively source "."
- #:keep-mtime? #t))
+ #:keep-mtime? #t)
+ ;; Make the source checkout files writable, for convenience.
+ (for-each (lambda (f)
+ (false-if-exception (make-file-writable f)))
+ (find-files ".")))
(begin
- (if (string-suffix? ".zip" source)
- (invoke "unzip" source)
- (invoke "tar" "xvf" source))
- (chdir (first-subdirectory "."))))
- #t)
+ (cond
+ ((string-suffix? ".zip" source)
+ (invoke "unzip" source))
+ ((tarball? source)
+ (invoke "tar" "xvf" source))
+ (else
+ (let ((name (strip-store-file-name source))
+ (command (compressor source)))
+ (copy-file source name)
+ (when command
+ (invoke command "--decompress" name)))))
+ ;; Attempt to change into child directory.
+ (and=> (first-subdirectory ".") chdir))))
(define %bootstrap-scripts
;; Typical names of Autotools "bootstrap" scripts.
@@ -205,8 +218,7 @@ working directory."
(invoke "autoreconf" "-vif")
(format #t "no 'configure.ac' or anything like that, \
doing nothing~%"))))
- (format #t "GNU build system bootstrapping not needed~%"))
- #t)
+ (format #t "GNU build system bootstrapping not needed~%")))
;; See <http://bugs.gnu.org/17840>.
(define* (patch-usr-bin-file #:key native-inputs inputs
@@ -220,8 +232,7 @@ things like the ABI being used."
(for-each (lambda (file)
(when (executable-file? file)
(patch-/usr/bin/file file)))
- (find-files "." "^configure$")))
- #t)
+ (find-files "." "^configure$"))))
(define* (patch-source-shebangs #:key source #:allow-other-keys)
"Patch shebangs in all source files; this includes non-executable
@@ -233,8 +244,7 @@ $CONFIG_SHELL, but some don't, such as `mkinstalldirs' or Automake's
(lambda (file stat)
;; Filter out symlinks.
(eq? 'regular (stat:type stat)))
- #:stat lstat))
- #t)
+ #:stat lstat)))
(define (patch-generated-file-shebangs . rest)
"Patch shebangs in generated files, including `SHELL' variables in
@@ -249,9 +259,7 @@ makefiles."
#:stat lstat))
;; Patch `SHELL' in generated makefiles.
- (for-each patch-makefile-SHELL (find-files "." "^(GNU)?[mM]akefile$"))
-
- #t)
+ (for-each patch-makefile-SHELL (find-files "." "^(GNU)?[mM]akefile$")))
(define* (configure #:key build target native-inputs inputs outputs
(configure-flags '()) out-of-source?
@@ -381,8 +389,7 @@ makefiles."
`("-j" ,(number->string (parallel-job-count)))
'())
,@make-flags)))
- (format #t "test suite not run~%"))
- #t)
+ (format #t "test suite not run~%")))
(define* (install #:key (make-flags '()) #:allow-other-keys)
(apply invoke "make" "install" make-flags))
@@ -400,7 +407,8 @@ makefiles."
(match-lambda
((_ . dir)
(list (string-append dir "/bin")
- (string-append dir "/sbin")))))
+ (string-append dir "/sbin")
+ (string-append dir "/libexec")))))
(define output-bindirs
(append-map bin-directories outputs))
@@ -415,8 +423,7 @@ makefiles."
(for-each (lambda (dir)
(let ((files (list-of-files dir)))
(for-each (cut patch-shebang <> path) files)))
- output-bindirs)))
- #t)
+ output-bindirs))))
(define* (strip #:key target outputs (strip-binaries? #t)
(strip-command (if target
@@ -425,7 +432,7 @@ makefiles."
(objcopy-command (if target
(string-append target "-objcopy")
"objcopy"))
- (strip-flags '("--strip-debug"
+ (strip-flags '("--strip-unneeded"
"--enable-deterministic-archives"))
(strip-directories '("lib" "lib64" "libexec"
"bin" "sbin"))
@@ -514,8 +521,7 @@ makefiles."
(let ((sub (string-append dir "/" d)))
(and (directory-exists? sub) sub)))
strip-directories)))
- outputs)))
- #t)
+ outputs))))
(define* (validate-runpath #:key
(validate-runpath? #t)
@@ -560,9 +566,7 @@ phase after stripping."
outputs)))
(unless (every* validate dirs)
(error "RUNPATH validation failed")))
- (format (current-error-port) "skipping RUNPATH validation~%"))
-
- #t)
+ (format (current-error-port) "skipping RUNPATH validation~%")))
(define* (validate-documentation-location #:key outputs
#:allow-other-keys)
@@ -582,8 +586,7 @@ and 'man/'. This phase moves directories to the right place if needed."
(match outputs
(((names . directories) ...)
- (for-each validate-output directories)))
- #t)
+ (for-each validate-output directories))))
(define* (reset-gzip-timestamps #:key outputs #:allow-other-keys)
"Reset embedded timestamps in gzip files found in OUTPUTS."
@@ -599,8 +602,7 @@ and 'man/'. This phase moves directories to the right place if needed."
(match outputs
(((names . directories) ...)
- (for-each process-directory directories)))
- #t)
+ (for-each process-directory directories))))
(define* (compress-documentation #:key outputs
(compress-documentation? #t)
@@ -616,7 +618,7 @@ DOCUMENTATION-COMPRESSOR-FLAGS."
(let ((target (readlink link)))
(delete-file link)
(symlink (string-append target compressed-documentation-extension)
- link)))
+ (string-append link compressed-documentation-extension))))
(define (has-links? file)
;; Return #t if FILE has hard links.
@@ -679,8 +681,7 @@ DOCUMENTATION-COMPRESSOR-FLAGS."
(match outputs
(((names . directories) ...)
(for-each maybe-compress directories)))
- (format #t "not compressing documentation~%"))
- #t)
+ (format #t "not compressing documentation~%")))
(define* (delete-info-dir-file #:key outputs #:allow-other-keys)
"Delete any 'share/info/dir' file from OUTPUTS."
@@ -689,8 +690,7 @@ DOCUMENTATION-COMPRESSOR-FLAGS."
(let ((info-dir-file (string-append directory "/share/info/dir")))
(when (file-exists? info-dir-file)
(delete-file info-dir-file)))))
- outputs)
- #t)
+ outputs))
(define* (patch-dot-desktop-files #:key outputs inputs #:allow-other-keys)
@@ -730,8 +730,74 @@ which cannot be found~%"
(("^TryExec=([^/[:blank:]\r\n]*)(.*)$" _ binary rest)
(string-append "TryExec="
(which binary) rest)))))))))
- outputs)
- #t)
+ outputs))
+
+(define* (make-dynamic-linker-cache #:key outputs
+ (make-dynamic-linker-cache? #t)
+ #:allow-other-keys)
+ "Create a dynamic linker cache under 'etc/ld.so.cache' in each of the
+OUTPUTS. This reduces application startup time by avoiding the 'stat' storm
+that traversing all the RUNPATH entries entails."
+ (define (make-cache-for-output directory)
+ (define bin-directories
+ (filter-map (lambda (sub-directory)
+ (let ((directory (string-append directory "/"
+ sub-directory)))
+ (and (directory-exists? directory)
+ directory)))
+ '("bin" "sbin" "libexec")))
+
+ (define programs
+ ;; Programs that can benefit from the ld.so cache.
+ (append-map (lambda (directory)
+ (if (directory-exists? directory)
+ (find-files directory
+ (lambda (file stat)
+ (and (executable-file? file)
+ (elf-file? file))))
+ '()))
+ bin-directories))
+
+ (define library-path
+ ;; Directories containing libraries that PROGRAMS depend on,
+ ;; recursively.
+ (delete-duplicates
+ (append-map (lambda (program)
+ (map dirname (file-needed/recursive program)))
+ programs)))
+
+ (define cache-file
+ (string-append directory "/etc/ld.so.cache"))
+
+ (define ld.so.conf
+ (string-append (or (getenv "TMPDIR") "/tmp")
+ "/ld.so.conf"))
+
+ (unless (null? library-path)
+ (mkdir-p (dirname cache-file))
+ (guard (c ((invoke-error? c)
+ ;; Do not treat 'ldconfig' failure as an error.
+ (format (current-error-port)
+ "warning: 'ldconfig' failed:~%")
+ (report-invoke-error c (current-error-port))))
+ ;; Create a config file to tell 'ldconfig' where to look for the
+ ;; libraries that PROGRAMS need.
+ (call-with-output-file ld.so.conf
+ (lambda (port)
+ (for-each (lambda (directory)
+ (display directory port)
+ (newline port))
+ library-path)))
+
+ (invoke "ldconfig" "-f" ld.so.conf "-C" cache-file)
+ (format #t "created '~a' from ~a library search path entries~%"
+ cache-file (length library-path)))))
+
+ (if make-dynamic-linker-cache?
+ (match outputs
+ (((_ . directories) ...)
+ (for-each make-cache-for-output directories)))
+ (format #t "ld.so cache not built~%")))
(define %license-file-regexp
;; Regexp matching license files.
@@ -796,8 +862,7 @@ which cannot be found~%"
package))
(map (cut string-append source "/" <>) files)))
(format (current-error-port)
- "failed to find license files~%"))
- #t))
+ "failed to find license files~%"))))
(define %standard-phases
;; Standard build phases, as a list of symbol/procedure pairs.
@@ -813,6 +878,7 @@ which cannot be found~%"
validate-documentation-location
delete-info-dir-file
patch-dot-desktop-files
+ make-dynamic-linker-cache
install-license-files
reset-gzip-timestamps
compress-documentation)))
@@ -840,26 +906,30 @@ in order. Return #t if all the PHASES succeeded, #f otherwise."
(exit 1)))
;; The trick is to #:allow-other-keys everywhere, so that each procedure in
;; PHASES can pick the keyword arguments it's interested in.
- (every (match-lambda
- ((name . proc)
- (let ((start (current-time time-monotonic)))
- (format #t "starting phase `~a'~%" name)
- (let ((result (apply proc args))
- (end (current-time time-monotonic)))
- (format #t "phase `~a' ~:[failed~;succeeded~] after ~,1f seconds~%"
- name result
- (elapsed-time end start))
-
- ;; Issue a warning unless the result is #t.
- (unless (eqv? result #t)
- (format (current-error-port) "\
-## WARNING: phase `~a' returned `~s'. Return values other than #t
-## are deprecated. Please migrate this package so that its phase
-## procedures report errors by raising an exception, and otherwise
-## always return #t.~%"
- name result))
-
- ;; Dump the environment variables as a shell script, for handy debugging.
- (system "export > $NIX_BUILD_TOP/environment-variables")
- result))))
- phases)))
+ (for-each (match-lambda
+ ((name . proc)
+ (let ((start (current-time time-monotonic)))
+ (define (end-of-phase success?)
+ (let ((end (current-time time-monotonic)))
+ (format #t "phase `~a' ~:[failed~;succeeded~] after ~,1f seconds~%"
+ name success?
+ (elapsed-time end start))
+
+ ;; Dump the environment variables as a shell script,
+ ;; for handy debugging.
+ (system "export > $NIX_BUILD_TOP/environment-variables")))
+
+ (format #t "starting phase `~a'~%" name)
+ (with-throw-handler #t
+ (lambda ()
+ (apply proc args)
+ (end-of-phase #t))
+ (lambda args
+ ;; This handler executes before the stack is unwound.
+ ;; The exception is automatically re-thrown from here,
+ ;; and we should get a proper backtrace.
+ (format (current-error-port)
+ "error: in phase '~a': uncaught exception:
+~{~s ~}~%" name args)
+ (end-of-phase #f))))))
+ phases)))
diff --git a/guix/build/gremlin.scm b/guix/build/gremlin.scm
index e8ea66dfb3..2a74d51dd9 100644
--- a/guix/build/gremlin.scm
+++ b/guix/build/gremlin.scm
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2015, 2018 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2015, 2018, 2020 Ludovic Courtès <ludo@gnu.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -41,6 +41,17 @@
elf-dynamic-info-runpath
expand-origin
+ file-dynamic-info
+ file-runpath
+ file-needed
+ file-needed/recursive
+
+ missing-runpath-error?
+ missing-runpath-error-file
+ runpath-too-long-error?
+ runpath-too-long-error-file
+ set-file-runpath
+
validate-needed-in-runpath
strip-runpath))
@@ -215,7 +226,9 @@ string table if the type is a string."
(#f #f)
((? elf-segment? dynamic)
(let ((entries (dynamic-entries elf dynamic)))
- (%elf-dynamic-info (find (matching-entry DT_SONAME) entries)
+ (%elf-dynamic-info (and=> (find (matching-entry DT_SONAME)
+ entries)
+ dynamic-entry-value)
(filter-map (lambda (entry)
(and (= (dynamic-entry-type entry)
DT_NEEDED)
@@ -232,6 +245,63 @@ string table if the type is a string."
dynamic-entry-value))
'()))))))
+(define (file-dynamic-info file)
+ "Return the <elf-dynamic-info> record of FILE, or #f if FILE lacks dynamic
+info."
+ (call-with-input-file file
+ (lambda (port)
+ (elf-dynamic-info (parse-elf (get-bytevector-all port))))))
+
+(define (file-runpath file)
+ "Return the DT_RUNPATH dynamic entry of FILE as a list of strings, or #f if
+FILE lacks dynamic info."
+ (and=> (file-dynamic-info file) elf-dynamic-info-runpath))
+
+(define (file-needed file)
+ "Return the list of DT_NEEDED dynamic entries of FILE, or #f if FILE lacks
+dynamic info."
+ (and=> (file-dynamic-info file) elf-dynamic-info-needed))
+
+(define (file-needed/recursive file)
+ "Return two values: the list of absolute .so file names FILE depends on,
+recursively, and the list of .so file names that could not be found. File
+names are resolved by searching the RUNPATH of the file that NEEDs them.
+
+This is similar to the info returned by the 'ldd' command."
+ (let loop ((files (list file))
+ (result '())
+ (not-found '()))
+ (match files
+ (()
+ (values (reverse result)
+ (reverse (delete-duplicates not-found))))
+ ((file . rest)
+ (match (file-dynamic-info file)
+ (#f
+ (loop rest result not-found))
+ (info
+ (let ((runpath (elf-dynamic-info-runpath info))
+ (needed (elf-dynamic-info-needed info)))
+ (if (and runpath needed)
+ (let* ((runpath (map (cute expand-origin <> (dirname file))
+ runpath))
+ (resolved (map (cut search-path runpath <>)
+ needed))
+ (failed (filter-map (lambda (needed resolved)
+ (and (not resolved)
+ (not (libc-library? needed))
+ needed))
+ needed resolved))
+ (needed (remove (lambda (value)
+ (or (not value)
+ ;; XXX: quadratic
+ (member value result)))
+ resolved)))
+ (loop (append rest needed)
+ (append needed result)
+ (append failed not-found)))
+ (loop rest result not-found)))))))))
+
(define %libc-libraries
;; List of libraries as of glibc 2.21 (there are more but those are
;; typically mean to be LD_PRELOADed and thus do not appear as NEEDED.)
@@ -364,4 +434,49 @@ according to DT_NEEDED."
(false-if-exception (close-port port))
(apply throw key args))))
-;;; gremlin.scm ends here
+
+(define-condition-type &missing-runpath-error &elf-error
+ missing-runpath-error?
+ (file missing-runpath-error-file))
+
+(define-condition-type &runpath-too-long-error &elf-error
+ runpath-too-long-error?
+ (file runpath-too-long-error-file))
+
+(define (set-file-runpath file path)
+ "Set the value of the DT_RUNPATH dynamic entry of FILE, which must name an
+ELF file, to PATH, a list of strings. Raise a &missing-runpath-error or
+&runpath-too-long-error when appropriate."
+ (define (call-with-input+output-file file proc)
+ (let ((port (open-file file "r+b")))
+ (guard (c (#t (close-port port) (raise c)))
+ (proc port)
+ (close-port port))))
+
+ (call-with-input+output-file file
+ (lambda (port)
+ (let* ((elf (parse-elf (get-bytevector-all port)))
+ (entries (dynamic-entries elf (dynamic-link-segment elf)))
+ (runpath (find (lambda (entry)
+ (= DT_RUNPATH (dynamic-entry-type entry)))
+ entries))
+ (path (string->utf8 (string-join path ":"))))
+ (unless runpath
+ (raise (condition (&missing-runpath-error (elf elf)
+ (file file)))))
+
+ ;; There might be padding left beyond RUNPATH in the string table, but
+ ;; we don't know, so assume there's no padding.
+ (unless (<= (bytevector-length path)
+ (bytevector-length
+ (string->utf8 (dynamic-entry-value runpath))))
+ (raise (condition (&runpath-too-long-error (elf #f #;elf)
+ (file file)))))
+
+ (seek port (dynamic-entry-offset runpath) SEEK_SET)
+ (put-bytevector port path)
+ (put-u8 port 0)))))
+
+;;; Local Variables:
+;;; eval: (put 'call-with-input+output-file 'scheme-indent-function 1)
+;;; End:
diff --git a/guix/build/julia-build-system.scm b/guix/build/julia-build-system.scm
index 41c69665c6..b4e0044567 100644
--- a/guix/build/julia-build-system.scm
+++ b/guix/build/julia-build-system.scm
@@ -1,6 +1,7 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2019, 2020 Nicolò Balzarotti <nicolo@nixo.xyz>
;;; Copyright © 2021 Jean-Baptiste Volatier <jbv@pm.me>
+;;; Copyright © 2021 Simon Tournier <zimon.toutoune@gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -74,8 +75,7 @@ Project.toml)."
julia-package-name
(project.toml->name "Project.toml")))))
(mkdir-p package-dir)
- (copy-recursively (getcwd) package-dir))
- #t)
+ (copy-recursively (getcwd) package-dir)))
(define* (precompile #:key source inputs outputs julia-package-name
#:allow-other-keys)
@@ -99,15 +99,22 @@ Project.toml)."
;; element of DEPOT_PATH. Once the cache file exists, this hack is not
;; needed anymore (like in the check phase). If the user install new
;; packages, those will be installed and precompiled in the home dir.
- (string-append "pushfirst!(DEPOT_PATH, pop!(DEPOT_PATH)); using " package)))
- #t)
+ (string-append "pushfirst!(DEPOT_PATH, pop!(DEPOT_PATH)); using "
+ package))))
(define* (check #:key tests? source inputs outputs julia-package-name
- #:allow-other-keys)
+ parallel-tests? #:allow-other-keys)
(when tests?
(let* ((out (assoc-ref outputs "out"))
(package (or julia-package-name (project.toml->name "Project.toml")))
- (builddir (string-append out "/share/julia/")))
+ (builddir (string-append out "/share/julia/"))
+ (job-count (if parallel-tests?
+ (parallel-job-count)
+ 1))
+ ;; The --proc argument of Julia *adds* extra processors rather than
+ ;; specify the exact count to use, so zero must be specified to
+ ;; disable parallel processing...
+ (additional-procs (max 0 (1- job-count))))
;; With a patch, SOURCE_DATE_EPOCH is honored
(setenv "SOURCE_DATE_EPOCH" "1")
(setenv "JULIA_DEPOT_PATH" builddir)
@@ -115,14 +122,21 @@ Project.toml)."
(string-append builddir "loadpath/" ":"
(or (getenv "JULIA_LOAD_PATH")
"")))
+ (setenv "JULIA_CPU_THREADS" (number->string job-count))
(setenv "HOME" "/tmp")
- (invoke "julia" "--depwarn=yes"
- (string-append builddir "loadpath/"
- package "/test/runtests.jl"))))
- #t)
+ (apply invoke "julia"
+ `("--depwarn=yes"
+ ,@(if parallel-tests?
+ ;; XXX: ... but '--procs' doesn't accept 0 as a valid
+ ;; value, so just omit the argument entirely.
+ (list (string-append "--procs="
+ (number->string additional-procs)))
+ '())
+ ,(string-append builddir "loadpath/"
+ package "/test/runtests.jl"))))))
-(define* (link-depot #:key source inputs outputs julia-package-name julia-package-uuid
- #:allow-other-keys)
+(define* (link-depot #:key source inputs outputs
+ julia-package-name julia-package-uuid #:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))
(package-name (or
julia-package-name
@@ -137,10 +151,11 @@ println(Base.version_slug(Base.UUID(\"~a\"),
;; When installing a package, julia looks first at in the JULIA_DEPOT_PATH
;; for a path like packages/PACKAGE/XXXX
;; Where XXXX is a slug encoding the package UUID and SHA1 of the files
- ;; Here we create a link with the correct path to enable julia to find the package
+ ;; Here we create a link with the correct path to enable julia to find the
+ ;; package
(mkdir-p (string-append out "/share/julia/packages/" package-name))
- (symlink package-dir (string-append out "/share/julia/packages/" package-name "/" slug)))
- #t)
+ (symlink package-dir (string-append out "/share/julia/packages/"
+ package-name "/" slug))))
(define (julia-create-package-toml outputs source
name uuid version
@@ -166,8 +181,7 @@ version = \"" version "\"
(display (string-append (car (car dep)) " = \"" (cdr (car dep)) "\"\n")
f))
deps))
- (close-port f))
- #t)
+ (close-port f)))
(define %standard-phases
(modify-phases gnu:%standard-phases
diff --git a/guix/build/lisp-utils.scm b/guix/build/lisp-utils.scm
index 8a02cb68dd..17d2637f87 100644
--- a/guix/build/lisp-utils.scm
+++ b/guix/build/lisp-utils.scm
@@ -281,7 +281,7 @@ DEPENDENCY-PREFIXES to ensure references to those libraries are retained."
type
compress?
#:allow-other-keys)
- "Generate an executable by using asdf operation TYPE, containing whithin the
+ "Generate an executable by using asdf operation TYPE, containing within the
image all DEPENDENCIES, and running ENTRY-PROGRAM in the case of an
executable. Link in any asd files from DEPENDENCY-PREFIXES to ensure
references to those libraries are retained."
diff --git a/guix/build/maven/pom.scm b/guix/build/maven/pom.scm
index 9e35e47a7f..193a76b7cb 100644
--- a/guix/build/maven/pom.scm
+++ b/guix/build/maven/pom.scm
@@ -293,7 +293,7 @@ this repository contains."
#:key with-plugins? with-build-dependencies?
with-modules? (excludes '())
(local-packages '()))
- "Open @var{pom-file}, and override its content, rewritting its dependencies
+ "Open @var{pom-file}, and override its content, rewriting its dependencies
to set their version to the latest version available in the @var{inputs}.
@var{#:with-plugins?} controls whether plugins are also overridden.
diff --git a/guix/build/meson-build-system.scm b/guix/build/meson-build-system.scm
index 8043a84abb..61ce45367d 100644
--- a/guix/build/meson-build-system.scm
+++ b/guix/build/meson-build-system.scm
@@ -2,6 +2,7 @@
;;; Copyright © 2017 Peter Mikkelsen <petermikkelsen10@gmail.com>
;;; Copyright © 2018 Ricardo Wurmus <rekado@elephly.net>
;;; Copyright © 2018 Marius Bakke <mbakke@fastmail.com>
+;;; Copyright © 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -63,16 +64,17 @@
(number->string (parallel-job-count))
"1")))
-(define* (check #:key test-target parallel-tests? tests?
+(define* (check #:key tests? test-options parallel-tests?
#:allow-other-keys)
- (setenv "MESON_TESTTHREADS"
- (if parallel-tests?
- (number->string (parallel-job-count))
- "1"))
(if tests?
- (invoke "ninja" test-target)
- (format #t "test suite not run~%"))
- #t)
+ (begin
+ (setenv "MESON_TESTTHREADS"
+ (if parallel-tests?
+ (number->string (parallel-job-count))
+ "1"))
+ ;; Always provide "-t 0" to disable the 30 s default timeout.
+ (apply invoke "meson" "test" "--print-errorlogs" "-t" "0" test-options))
+ (format #t "test suite not run~%")))
(define* (install #:rest args)
(invoke "ninja" "install"))
@@ -100,7 +102,7 @@ for example libraries only needed for the tests."
(find-files dir elf-pred))
existing-elf-dirs))))
(for-each strip-runpath elf-list)))))
- (for-each handle-output outputs)
+ (for-each handle-output (alist-delete "debug" outputs))
#t)
(define %standard-phases
diff --git a/guix/build/meson-configuration.scm b/guix/build/meson-configuration.scm
new file mode 100644
index 0000000000..1aac5f8f0a
--- /dev/null
+++ b/guix/build/meson-configuration.scm
@@ -0,0 +1,56 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be>
+;;;
+;;; This file is part of GNU Guix.
+;;;
+;;; GNU Guix is free software; you can redistribute it and/or modify it
+;;; under the terms of the GNU General Public License as published by
+;;; the Free Software Foundation; either version 3 of the License, or (at
+;;; your option) any later version.
+;;;
+;;; GNU Guix is distributed in the hope that it will be useful, but
+;;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;;; GNU General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
+
+(define-module (guix build meson-configuration)
+ #:use-module (ice-9 match)
+ #:export (write-section-header write-assignment write-assignments))
+
+;; Commentary:
+;;
+;; Utilities for generating a ‘Cross build definition file’ for
+;; the Meson build system. Configuration values are currently
+;; never escaped. In practice this is unlikely to be a problem
+;; in the build environment.
+;;
+;; Code:
+
+(define (write-section-header port section-name)
+ "Write a section header for a section named SECTION-NAME to PORT."
+ (format port "[~a]~%" section-name))
+
+(define (write-assignment port key value)
+ "Write an assignment of VALUE to KEY to PORT.
+
+VALUE must be a string (without any special characters such as quotes),
+a boolean or an integer. Lists are currently not supported"
+ (match value
+ ((? string?)
+ (format port "~a = '~a'~%" key value))
+ ((? integer?)
+ (format port "~a = ~a~%" key value))
+ (#f
+ (format port "~a = true~%" key))
+ (#t
+ (format port "~a = false~%" key))))
+
+(define* (write-assignments port alist)
+ "Write the assignments in ALIST, an association list, to PORT."
+ (for-each (match-lambda
+ ((key . value)
+ (write-assignment port key value)))
+ alist))
diff --git a/guix/build/minify-build-system.scm b/guix/build/minify-build-system.scm
index c5a876726f..5789ca3f0f 100644
--- a/guix/build/minify-build-system.scm
+++ b/guix/build/minify-build-system.scm
@@ -23,6 +23,7 @@
#:use-module (guix build utils)
#:use-module (srfi srfi-1)
#:use-module (srfi srfi-26)
+ #:use-module (ice-9 match)
#:use-module (ice-9 popen)
#:export (%standard-phases
minify-build
@@ -42,14 +43,17 @@
(minified (open-pipe* OPEN_READ "uglifyjs" file)))
(call-with-output-file installed
(cut dump-port minified <>))
- #t))
+ (match (close-pipe minified)
+ (0 #t)
+ (status
+ (error "uglify-js failed" status)))))
(define* (build #:key javascript-files
#:allow-other-keys)
(let ((files (or javascript-files
(find-files "src" "\\.js$"))))
(mkdir-p "guix/build")
- (every (cut minify <> #:directory "guix/build/") files)))
+ (for-each (cut minify <> #:directory "guix/build/") files)))
(define* (install #:key outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))
@@ -60,8 +64,7 @@
(if (not (zero? (stat:size (stat file))))
(install-file file js)
(error "File is empty: " file)))
- (find-files "guix/build" "\\.min\\.js$")))
- #t)
+ (find-files "guix/build" "\\.min\\.js$"))))
(define %standard-phases
(modify-phases gnu:%standard-phases
diff --git a/guix/build/python-build-system.scm b/guix/build/python-build-system.scm
index 09bd8465c8..08871f60cd 100644
--- a/guix/build/python-build-system.scm
+++ b/guix/build/python-build-system.scm
@@ -6,6 +6,11 @@
;;; Copyright © 2016 Hartmut Goebel <h.goebel@crazy-compilers.com>
;;; Copyright © 2018 Ricardo Wurmus <rekado@elephly.net>
;;; Copyright © 2018 Arun Isaac <arunisaac@systemreboot.net>
+;;; Copyright © 2019, 2020, 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
+;;; Copyright © 2020 Jakub Kądziołka <kuba@kadziolka.net>
+;;; Copyright © 2020 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2021 Lars-Dominik Braun <lars@6xq.net>
+;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -27,6 +32,7 @@
#:use-module (guix build utils)
#:use-module (ice-9 match)
#:use-module (ice-9 ftw)
+ #:use-module (ice-9 format)
#:use-module (srfi srfi-1)
#:use-module (srfi srfi-26)
#:export (%standard-phases
@@ -128,6 +134,15 @@
(apply invoke "python" "./setup.py" command params)))
(error "no setup.py found")))
+(define* (sanity-check #:key tests? inputs outputs #:allow-other-keys)
+ "Ensure packages depending on this package via setuptools work properly,
+their advertised endpoints work and their top level modules are importable
+without errors."
+ (let ((sanity-check.py (assoc-ref inputs "sanity-check.py")))
+ ;; Make sure the working directory is empty (i.e. no Python modules in it)
+ (with-directory-excursion "/tmp"
+ (invoke "python" sanity-check.py (site-packages inputs outputs)))))
+
(define* (build #:key use-setuptools? #:allow-other-keys)
"Build a given Python package."
(call-setuppy "build" '() use-setuptools?)
@@ -154,65 +169,86 @@
(major+minor (take components 2)))
(string-join major+minor ".")))
+(define (python-output outputs)
+ "Return the path of the python output, if there is one, or fall-back to out."
+ (or (assoc-ref outputs "python")
+ (assoc-ref outputs "out")))
+
(define (site-packages inputs outputs)
"Return the path of the current output's Python site-package."
- (let* ((out (assoc-ref outputs "out"))
+ (let* ((out (python-output outputs))
(python (assoc-ref inputs "python")))
- (string-append out "/lib/python"
- (python-version python)
- "/site-packages/")))
+ (string-append out "/lib/python" (python-version python) "/site-packages")))
(define (add-installed-pythonpath inputs outputs)
- "Prepend the Python site-package of OUTPUT to PYTHONPATH. This is useful
-when running checks after installing the package."
- (let ((old-path (getenv "PYTHONPATH"))
- (add-path (site-packages inputs outputs)))
- (setenv "PYTHONPATH"
- (string-append add-path
- (if old-path (string-append ":" old-path) "")))
- #t))
+ "Prepend the site-package of OUTPUT to GUIX_PYTHONPATH. This is useful when
+running checks after installing the package."
+ (setenv "GUIX_PYTHONPATH" (string-append (site-packages inputs outputs) ":"
+ (getenv "GUIX_PYTHONPATH"))))
+
+(define* (add-install-to-pythonpath #:key inputs outputs #:allow-other-keys)
+ "A phase that just wraps the 'add-installed-pythonpath' procedure."
+ (add-installed-pythonpath inputs outputs))
-(define* (install #:key outputs (configure-flags '()) use-setuptools?
+(define* (add-install-to-path #:key outputs #:allow-other-keys)
+ "Adding Python scripts to PATH is also often useful in tests."
+ (setenv "PATH" (string-append (assoc-ref outputs "out")
+ "/bin:"
+ (getenv "PATH"))))
+
+(define* (install #:key inputs outputs (configure-flags '()) use-setuptools?
#:allow-other-keys)
"Install a given Python package."
- (let* ((out (assoc-ref outputs "out"))
- (params (append (list (string-append "--prefix=" out))
+ (let* ((out (python-output outputs))
+ (python (assoc-ref inputs "python"))
+ (major-minor (map string->number
+ (take (string-split (python-version python) #\.) 2)))
+ (<3.7? (match major-minor
+ ((major minor)
+ (or (< major 3) (and (= major 3) (< minor 7))))))
+ (params (append (list (string-append "--prefix=" out)
+ "--no-compile")
(if use-setuptools?
;; distutils does not accept these flags
(list "--single-version-externally-managed"
- "--root=/")
+ "--root=/")
'())
configure-flags)))
(call-setuppy "install" params use-setuptools?)
- #t))
+ ;; Rather than produce potentially non-reproducible .pyc files on Pythons
+ ;; older than 3.7, whose 'compileall' module lacks the
+ ;; '--invalidation-mode' option, do not generate any.
+ (unless <3.7?
+ (invoke "python" "-m" "compileall" "--invalidation-mode=unchecked-hash"
+ out))))
(define* (wrap #:key inputs outputs #:allow-other-keys)
(define (list-of-files dir)
(find-files dir (lambda (file stat)
(and (eq? 'regular (stat:type stat))
- (not (wrapper? file))))))
+ (not (wrapped-program? file))))))
(define bindirs
(append-map (match-lambda
- ((_ . dir)
- (list (string-append dir "/bin")
- (string-append dir "/sbin"))))
+ ((_ . dir)
+ (list (string-append dir "/bin")
+ (string-append dir "/sbin"))))
outputs))
- (let* ((out (assoc-ref outputs "out"))
- (python (assoc-ref inputs "python"))
- (var `("PYTHONPATH" prefix
- ,(cons (string-append out "/lib/python"
- (python-version python)
- "/site-packages")
- (search-path-as-string->list
- (or (getenv "PYTHONPATH") ""))))))
+ ;; Do not require "bash" to be present in the package inputs
+ ;; even when there is nothing to wrap.
+ ;; Also, calculate (sh) only once to prevent some I/O.
+ (define %sh (delay (search-input-file inputs "bin/bash")))
+ (define (sh) (force %sh))
+
+ (let* ((var `("GUIX_PYTHONPATH" prefix
+ ,(search-path-as-string->list
+ (or (getenv "GUIX_PYTHONPATH") "")))))
(for-each (lambda (dir)
(let ((files (list-of-files dir)))
- (for-each (cut wrap-program <> var)
+ (for-each (cut wrap-program <> #:sh (sh) var)
files)))
- bindirs)
- #t))
+ bindirs)))
(define* (rename-pth-file #:key name inputs outputs #:allow-other-keys)
"Rename easy-install.pth to NAME.pth to avoid conflicts between packages
@@ -220,16 +256,11 @@ installed with setuptools."
;; Even if the "easy-install.pth" is not longer created, we kept this phase.
;; There still may be packages creating an "easy-install.pth" manually for
;; some good reason.
- (let* ((out (assoc-ref outputs "out"))
- (python (assoc-ref inputs "python"))
- (site-packages (string-append out "/lib/python"
- (python-version python)
- "/site-packages"))
+ (let* ((site-packages (site-packages inputs outputs))
(easy-install-pth (string-append site-packages "/easy-install.pth"))
(new-pth (string-append site-packages "/" name ".pth")))
(when (file-exists? easy-install-pth)
- (rename-file easy-install-pth new-pth))
- #t))
+ (rename-file easy-install-pth new-pth))))
(define* (ensure-no-mtimes-pre-1980 #:rest _)
"Ensure that there are no mtimes before 1980-01-02 in the source tree."
@@ -241,32 +272,49 @@ installed with setuptools."
(ftw "." (lambda (file stat flag)
(unless (<= early-1980 (stat:mtime stat))
(utime file early-1980 early-1980))
- #t))
- #t))
+ #t))))
(define* (enable-bytecode-determinism #:rest _)
"Improve determinism of pyc files."
;; Use deterministic hashes for strings, bytes, and datetime objects.
(setenv "PYTHONHASHSEED" "0")
- #t)
+ ;; Prevent Python from creating .pyc files when loading modules (such as
+ ;; when running a test suite).
+ (setenv "PYTHONDONTWRITEBYTECODE" "1"))
+
+(define* (ensure-no-cythonized-files #:rest _)
+ "Check the source code for @code{.c} files which may have been pre-generated
+by Cython."
+ (for-each
+ (lambda (file)
+ (let ((generated-file
+ (string-append (string-drop-right file 3) "c")))
+ (when (file-exists? generated-file)
+ (format #t "Possible Cythonized file found: ~a~%" generated-file))))
+ (find-files "." "\\.pyx$")))
(define %standard-phases
;; The build phase only builds C extensions and copies the Python sources,
- ;; while the install phase byte-compiles and copies them to the prefix
- ;; directory. The tests are run after the install phase because otherwise
- ;; the cached .pyc generated during the tests execution seem to interfere
- ;; with the byte compilation of the install phase.
+ ;; while the install phase copies then byte-compiles the sources to the
+ ;; prefix directory. The check phase is moved after the installation phase
+ ;; to ease testing the built package.
(modify-phases gnu:%standard-phases
(add-after 'unpack 'ensure-no-mtimes-pre-1980 ensure-no-mtimes-pre-1980)
(add-after 'ensure-no-mtimes-pre-1980 'enable-bytecode-determinism
enable-bytecode-determinism)
+ (add-after 'enable-bytecode-determinism 'ensure-no-cythonized-files
+ ensure-no-cythonized-files)
(delete 'bootstrap)
(delete 'configure) ;not needed
(replace 'build build)
(delete 'check) ;moved after the install phase
(replace 'install install)
- (add-after 'install 'check check)
- (add-after 'install 'wrap wrap)
+ (add-after 'install 'add-install-to-pythonpath add-install-to-pythonpath)
+ (add-after 'add-install-to-pythonpath 'add-install-to-path
+ add-install-to-path)
+ (add-after 'add-install-to-path 'wrap wrap)
+ (add-after 'wrap 'check check)
+ (add-after 'check 'sanity-check sanity-check)
(add-before 'strip 'rename-pth-file rename-pth-file)))
(define* (python-build #:key inputs (phases %standard-phases)
diff --git a/guix/build/qt-build-system.scm b/guix/build/qt-build-system.scm
index a6955ce4c2..c63bd5ed21 100644
--- a/guix/build/qt-build-system.scm
+++ b/guix/build/qt-build-system.scm
@@ -3,6 +3,7 @@
;;; Copyright © 2014, 2015 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2018 Mark H Weaver <mhw@netris.org>
;;; Copyright © 2019, 2020, 2021 Hartmut Goebel <h.goebel@crazy-compilers.com>
+;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be>
;;;
;;; This file is part of GNU Guix.
;;;
diff --git a/guix/build/qt-utils.scm b/guix/build/qt-utils.scm
index 5d3a4d22e6..fa018a93ac 100644
--- a/guix/build/qt-utils.scm
+++ b/guix/build/qt-utils.scm
@@ -4,6 +4,7 @@
;;; Copyright © 2020 Jakub Kądziołka <kuba@kadziolka.net>
;;; Copyright © 2021 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
+;;; Copyright © 2021 Brendan Tildesley <mail@brendan.scot>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -133,7 +134,10 @@ add a dependency of that output on Qt."
(define (find-files-to-wrap output-dir)
(append-map
(lambda (dir)
- (if (directory-exists? dir) (find-files dir ".*") (list)))
+ (if (directory-exists? dir)
+ (find-files dir (lambda (file stat)
+ (not (wrapped-program? file))))
+ (list)))
(list (string-append output-dir "/bin")
(string-append output-dir "/sbin")
(string-append output-dir "/libexec")
diff --git a/guix/build/rakudo-build-system.scm b/guix/build/rakudo-build-system.scm
index dbdeb1ccd2..5cf1cc55bc 100644
--- a/guix/build/rakudo-build-system.scm
+++ b/guix/build/rakudo-build-system.scm
@@ -1,5 +1,6 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2019 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -97,7 +98,8 @@
(map (cut string-append dir "/" <>)
(or (scandir dir (lambda (f)
(let ((s (stat (string-append dir "/" f))))
- (eq? 'regular (stat:type s)))))
+ (and (eq? 'regular (stat:type s))
+ (not (wrapped-program? f))))))
'())))
(define bindirs
@@ -107,6 +109,12 @@
(string-append dir "/sbin"))))
outputs))
+ ;; Do not require bash to be present in the package inputs
+ ;; even when there is nothing to wrap.
+ ;; Also, calculate (sh) only once to prevent some I/O.
+ (define %sh (delay (search-input-file inputs "bin/bash")))
+ (define (sh) (force %sh))
+
(let* ((out (assoc-ref outputs "out"))
(var `("PERL6LIB" "," prefix
,(cons (string-append out "/share/perl6/lib,"
@@ -116,7 +124,7 @@
(or (getenv "PERL6LIB") "") #\,)))))
(for-each (lambda (dir)
(let ((files (list-of-files dir)))
- (for-each (cut wrap-program <> var)
+ (for-each (cut wrap-program <> #:sh (sh) var)
files)))
bindirs)
#t))
diff --git a/guix/build/rpath.scm b/guix/build/rpath.scm
deleted file mode 100644
index 75a1fef5ef..0000000000
--- a/guix/build/rpath.scm
+++ /dev/null
@@ -1,59 +0,0 @@
-;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2013 Ludovic Courtès <ludo@gnu.org>
-;;;
-;;; This file is part of GNU Guix.
-;;;
-;;; GNU Guix is free software; you can redistribute it and/or modify it
-;;; under the terms of the GNU General Public License as published by
-;;; the Free Software Foundation; either version 3 of the License, or (at
-;;; your option) any later version.
-;;;
-;;; GNU Guix is distributed in the hope that it will be useful, but
-;;; WITHOUT ANY WARRANTY; without even the implied warranty of
-;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-;;; GNU General Public License for more details.
-;;;
-;;; You should have received a copy of the GNU General Public License
-;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
-
-(define-module (guix build rpath)
- #:use-module (ice-9 popen)
- #:use-module (ice-9 rdelim)
- #:export (%patchelf
- file-rpath
- augment-rpath))
-
-;;; Commentary:
-;;;
-;;; Tools to manipulate the RPATH and RUNPATH of ELF binaries. Currently they
-;;; rely on PatchELF.
-;;;
-;;; Code:
-
-(define %patchelf
- ;; The `patchelf' command.
- (make-parameter "patchelf"))
-
-(define %not-colon
- (char-set-complement (char-set #\:)))
-
-(define (file-rpath file)
- "Return the RPATH (or RUNPATH) of FILE as a list of directory names, or #f
-on failure."
- (let* ((p (open-pipe* OPEN_READ (%patchelf) "--print-rpath" file))
- (l (read-line p)))
- (and (zero? (close-pipe p))
- (string-tokenize l %not-colon))))
-
-(define (augment-rpath file dir)
- "Add DIR to the front of the RPATH and RUNPATH of FILE. Return the new
-RPATH as a list, or #f on failure."
- (let* ((rpath (or (file-rpath file) '()))
- (rpath* (cons dir rpath)))
- (format #t "~a: changing RPATH from ~s to ~s~%"
- file rpath rpath*)
- (and (zero? (system* (%patchelf) "--set-rpath"
- (string-join rpath* ":") file))
- rpath*)))
-
-;;; rpath.scm ends here
diff --git a/guix/build/ruby-build-system.scm b/guix/build/ruby-build-system.scm
index c957a61115..9aceb187a4 100644
--- a/guix/build/ruby-build-system.scm
+++ b/guix/build/ruby-build-system.scm
@@ -2,6 +2,7 @@
;;; Copyright © 2015 David Thompson <davet@gnu.org>
;;; Copyright © 2015 Pjotr Prins <pjotr.public01@thebird.nl>
;;; Copyright © 2015, 2016 Ben Woodcroft <donttrustben@gmail.com>
+;;; Copyright © 2020 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -73,13 +74,19 @@ directory."
(define* (replace-git-ls-files #:key source #:allow-other-keys)
"Many gemspec files downloaded from outside rubygems.org use `git ls-files`
-to list of the files to be included in the built gem. However, since this
+to list the files to be included in the built gem. However, since this
operation is not deterministic, we replace it with `find`."
- (when (not (gem-archive? source))
+ (unless (gem-archive? source)
(let ((gemspec (first-gemspec)))
+ ;; Do not include the freshly built .gem itself as it causes problems.
+ ;; Strip the first 2 characters ("./") to more exactly match the output
+ ;; given by 'git ls-files'. This is useful to prevent breaking regexps
+ ;; that could be used to filter the list of files.
(substitute* gemspec
- (("`git ls-files`") "`find . -type f |sort`")
- (("`git ls-files -z`") "`find . -type f -print0 |sort -z`"))))
+ (("`git ls-files`")
+ "`find . -type f -not -regex '.*\\.gem$' | sort | cut -c3-`")
+ (("`git ls-files -z`")
+ "`find . -type f -not -regex '.*\\.gem$' -print0 | sort -z | cut -zc3-`"))))
#t)
(define* (extract-gemspec #:key source #:allow-other-keys)
@@ -129,11 +136,7 @@ is #f."
#:allow-other-keys)
"Install the gem archive SOURCE to the output store item. Additional
GEM-FLAGS are passed to the 'gem' invocation, if present."
- (let* ((ruby-version
- (match:substring (string-match "ruby-(.*)\\.[0-9]$"
- (assoc-ref inputs "ruby"))
- 1))
- (out (assoc-ref outputs "out"))
+ (let* ((out (assoc-ref outputs "out"))
(vendor-dir (string-append out "/lib/ruby/vendor_ruby"))
(gem-file (first-matching-file "\\.gem$"))
(gem-file-basename (basename gem-file))
@@ -144,8 +147,8 @@ GEM-FLAGS are passed to the 'gem' invocation, if present."
(setenv "GEM_VENDOR" vendor-dir)
(or (zero?
- ;; 'zero? system*' allows the custom error handling to function as
- ;; expected, while 'invoke' raises its own exception.
+ ;; 'zero? system*' allows the custom error handling to function as
+ ;; expected, while 'invoke' raises its own exception.
(apply system* "gem" "install" gem-file
"--verbose"
"--local" "--ignore-dependencies" "--vendor"
diff --git a/guix/build/syscalls.scm b/guix/build/syscalls.scm
index 63bd017d1d..45f95c509d 100644
--- a/guix/build/syscalls.scm
+++ b/guix/build/syscalls.scm
@@ -125,6 +125,8 @@
with-file-lock
with-file-lock/no-wait
+ set-child-subreaper!
+
set-thread-name
thread-name
@@ -1433,6 +1435,11 @@ handler if the lock is already held by another process."
(define PR_SET_NAME 15) ;<linux/prctl.h>
(define PR_GET_NAME 16)
+(define PR_SET_CHILD_SUBREAPER 36)
+
+(define (set-child-subreaper!)
+ "Set the CHILD_SUBREAPER capability for the current process."
+ (%prctl PR_SET_CHILD_SUBREAPER 1 0 0 0))
(define %max-thread-name-length
;; Maximum length in bytes of the process name, including the terminating
diff --git a/guix/build/texlive-build-system.scm b/guix/build/texlive-build-system.scm
index 841c631dae..353fb934a6 100644
--- a/guix/build/texlive-build-system.scm
+++ b/guix/build/texlive-build-system.scm
@@ -1,5 +1,7 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2017 Ricardo Wurmus <rekado@elephly.net>
+;;; Copyright © 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
+;;; Copyright © 2021 Thiago Jung Bauermann <bauermann@kolabnow.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -33,46 +35,19 @@
;;
;; Code:
-(define (compile-with-latex format file)
- (invoke format
+(define (compile-with-latex engine format file)
+ (invoke engine
"-interaction=nonstopmode"
"-output-directory=build"
- (string-append "&" format)
+ (if format (string-append "&" format) "-ini")
file))
-(define* (configure #:key inputs #:allow-other-keys)
- (let* ((out (string-append (getcwd) "/.texlive-union"))
- (texmf.cnf (string-append out "/share/texmf-dist/web2c/texmf.cnf")))
- ;; Build a modifiable union of all inputs (but exclude bash)
- (match inputs
- (((names . directories) ...)
- (union-build out (filter directory-exists? directories)
- #:create-all-directories? #t
- #:log-port (%make-void-port "w"))))
-
- ;; The configuration file "texmf.cnf" is provided by the
- ;; "texlive-bin" package. We take it and override only the
- ;; setting for TEXMFROOT and TEXMF. This file won't be consulted
- ;; by default, though, so we still need to set TEXMFCNF.
- (substitute* texmf.cnf
- (("^TEXMFROOT = .*")
- (string-append "TEXMFROOT = " out "/share\n"))
- (("^TEXMF = .*")
- "TEXMF = $TEXMFROOT/share/texmf-dist\n"))
- (setenv "TEXMFCNF" (dirname texmf.cnf))
- (setenv "TEXMF" (string-append out "/share/texmf-dist"))
-
- ;; Don't truncate lines.
- (setenv "error_line" "254") ; must be less than 255
- (setenv "half_error_line" "238") ; must be less than error_line - 15
- (setenv "max_print_line" "1000"))
+(define* (build #:key inputs build-targets tex-engine tex-format
+ #:allow-other-keys)
(mkdir "build")
- #t)
-
-(define* (build #:key inputs build-targets tex-format #:allow-other-keys)
- (every (cut compile-with-latex tex-format <>)
- (if build-targets build-targets
- (scandir "." (cut string-suffix? ".ins" <>)))))
+ (for-each (cut compile-with-latex tex-engine tex-format <>)
+ (if build-targets build-targets
+ (scandir "." (cut string-suffix? ".ins" <>)))))
(define* (install #:key outputs tex-directory #:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))
@@ -81,13 +56,12 @@
(mkdir-p target)
(for-each delete-file (find-files "." "\\.(log|aux)$"))
(for-each (cut install-file <> target)
- (find-files "build" ".*"))
- #t))
+ (find-files "build" ".*"))))
(define %standard-phases
(modify-phases gnu:%standard-phases
(delete 'bootstrap)
- (replace 'configure configure)
+ (delete 'configure)
(replace 'build build)
(delete 'check)
(replace 'install install)))
diff --git a/guix/build/union.scm b/guix/build/union.scm
index 961ac3298b..bf75c67c52 100644
--- a/guix/build/union.scm
+++ b/guix/build/union.scm
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2012, 2013, 2014, 2016, 2017, 2018, 2019 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2012, 2013, 2014, 2016, 2017, 2018, 2019, 2021 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2014 Mark H Weaver <mhw@netris.org>
;;; Copyright © 2017 Huang Ying <huang.ying.caritas@gmail.com>
;;;
@@ -99,8 +99,9 @@ identical, #f otherwise."
;; a warning doesn't make sense. For example, "icon-theme.cache" is
;; regenerated by a profile hook which shadows the file provided by
;; individual packages, and "gschemas.compiled" is made available to
- ;; applications via 'glib-or-gtk-build-system'.
- '("icon-theme.cache" "gschemas.compiled"))
+ ;; applications via 'glib-or-gtk-build-system'; "etc/ld.so.cache" is created
+ ;; for most packages.
+ '("icon-theme.cache" "gschemas.compiled" "ld.so.cache"))
(define (warn-about-collision files)
"Handle the collision among FILES by emitting a warning and choosing the
diff --git a/guix/build/utils.scm b/guix/build/utils.scm
index 419c10195b..3beb7da67a 100644
--- a/guix/build/utils.scm
+++ b/guix/build/utils.scm
@@ -1,10 +1,13 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2013 Andreas Enge <andreas@enge.fr>
;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org>
-;;; Copyright © 2015, 2018 Mark H Weaver <mhw@netris.org>
+;;; Copyright © 2015, 2018, 2021 Mark H Weaver <mhw@netris.org>
;;; Copyright © 2018 Arun Isaac <arunisaac@systemreboot.net>
;;; Copyright © 2018, 2019 Ricardo Wurmus <rekado@elephly.net>
+;;; Copyright © 2020 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2020, 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
+;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -49,9 +52,14 @@
package-name->name+version
parallel-job-count
+ compressor
+ tarball?
+ %xz-parallel-args
+
directory-exists?
executable-file?
symbolic-link?
+ call-with-temporary-output-file
call-with-ascii-input-file
elf-file?
ar-file?
@@ -72,6 +80,11 @@
search-path-as-string->list
list->search-path-as-string
which
+ search-input-file
+ search-input-directory
+ search-error?
+ search-error-path
+ search-error-file
every*
alist-cons-before
@@ -89,7 +102,7 @@
patch-/usr/bin/file
fold-port-matches
remove-store-references
- wrapper?
+ wrapped-program?
wrap-program
wrap-script
@@ -134,12 +147,39 @@
;;;
+;;; Compression helpers.
+;;;
+
+(define (compressor file-name)
+ "Return the name of the compressor package/binary used to compress or
+decompress FILE-NAME, based on its file extension, else false."
+ (cond ((string-suffix? "gz" file-name) "gzip")
+ ((string-suffix? "Z" file-name) "gzip")
+ ((string-suffix? "bz2" file-name) "bzip2")
+ ((string-suffix? "lz" file-name) "lzip")
+ ((string-suffix? "zip" file-name) "unzip")
+ ((string-suffix? "xz" file-name) "xz")
+ (else #f))) ;no compression used/unknown file extension
+
+(define (tarball? file-name)
+ "True when FILE-NAME has a tar file extension."
+ (string-match "\\.(tar(\\..*)?|tgz|tbz)$" file-name))
+
+(define (%xz-parallel-args)
+ "The xz arguments required to enable bit-reproducible, multi-threaded
+compression."
+ (list "--memlimit=50%"
+ (format #f "--threads=~a" (max 2 (parallel-job-count)))))
+
+
+;;;
;;; Directories.
;;;
(define (%store-directory)
"Return the directory name of the store."
- (or (getenv "NIX_STORE")
+ (or (getenv "NIX_STORE_DIR") ;outside of builder
+ (getenv "NIX_STORE") ;inside builder, set by the daemon
"/gnu/store"))
(define (store-file-name? file)
@@ -197,6 +237,22 @@ introduce the version part."
"Return #t if FILE is a symbolic link (aka. \"symlink\".)"
(eq? (stat:type (lstat file)) 'symlink))
+(define (call-with-temporary-output-file proc)
+ "Call PROC with a name of a temporary file and open output port to that
+file; close the file and delete it when leaving the dynamic extent of this
+call."
+ (let* ((directory (or (getenv "TMPDIR") "/tmp"))
+ (template (string-append directory "/guix-file.XXXXXX"))
+ (out (mkstemp! template)))
+ (dynamic-wind
+ (lambda ()
+ #t)
+ (lambda ()
+ (proc template out))
+ (lambda ()
+ (false-if-exception (close out))
+ (false-if-exception (delete-file template))))))
+
(define (call-with-ascii-input-file file proc)
"Open FILE as an ASCII or binary file, and pass the resulting port to
PROC. FILE is closed when PROC's dynamic extent is left. Return the
@@ -322,11 +378,13 @@ name."
#:key
(log (current-output-port))
(follow-symlinks? #f)
- keep-mtime?)
+ (copy-file copy-file)
+ keep-mtime? keep-permissions?)
"Copy SOURCE directory to DESTINATION. Follow symlinks if FOLLOW-SYMLINKS?
-is true; otherwise, just preserve them. When KEEP-MTIME? is true, keep the
-modification time of the files in SOURCE on those of DESTINATION. Write
-verbose output to the LOG port."
+is true; otherwise, just preserve them. Call COPY-FILE to copy regular files.
+When KEEP-MTIME? is true, keep the modification time of the files in SOURCE on
+those of DESTINATION. When KEEP-PERMISSIONS? is true, preserve file
+permissions. Write verbose output to the LOG port."
(define strip-source
(let ((len (string-length source)))
(lambda (file)
@@ -343,16 +401,21 @@ verbose output to the LOG port."
(symlink target dest)))
(else
(copy-file file dest)
- (when keep-mtime?
- (set-file-time dest stat))))))
+ (when keep-permissions?
+ (chmod dest (stat:perms stat)))))
+ (when keep-mtime?
+ (set-file-time dest stat))))
(lambda (dir stat result) ; down
(let ((target (string-append destination
(strip-source dir))))
- (mkdir-p target)
- (when keep-mtime?
- (set-file-time target stat))))
+ (mkdir-p target)))
(lambda (dir stat result) ; up
- result)
+ (let ((target (string-append destination
+ (strip-source dir))))
+ (when keep-mtime?
+ (set-file-time target stat))
+ (when keep-permissions?
+ (chmod target (stat:perms stat)))))
(const #t) ; skip
(lambda (file stat errno result)
(format (current-error-port) "i/o error: ~a: ~a~%"
@@ -365,6 +428,16 @@ verbose output to the LOG port."
stat
lstat)))
+(define-syntax-rule (warn-on-error expr file)
+ (catch 'system-error
+ (lambda ()
+ expr)
+ (lambda args
+ (format (current-error-port)
+ "warning: failed to delete ~a: ~a~%"
+ file (strerror
+ (system-error-errno args))))))
+
(define* (delete-file-recursively dir
#:key follow-mounts?)
"Delete DIR recursively, like `rm -rf', without following symlinks. Don't
@@ -375,10 +448,10 @@ errors."
(or follow-mounts?
(= dev (stat:dev stat))))
(lambda (file stat result) ; leaf
- (delete-file file))
+ (warn-on-error (delete-file file) file))
(const #t) ; down
(lambda (dir stat result) ; up
- (rmdir dir))
+ (warn-on-error (rmdir dir) dir))
(const #t) ; skip
(lambda (file stat errno result)
(format (current-error-port)
@@ -546,6 +619,40 @@ PROGRAM could not be found."
(search-path (search-path-as-string->list (getenv "PATH"))
program))
+(define-condition-type &search-error &error
+ search-error?
+ (path search-error-path)
+ (file search-error-file))
+
+(define (search-input-file inputs file)
+ "Find a file named FILE among the INPUTS and return its absolute file name.
+
+FILE must be a string like \"bin/sh\". If FILE is not found, an exception is
+raised."
+ (match inputs
+ (((_ . directories) ...)
+ ;; Accept both "bin/sh" and "/bin/sh" as FILE argument.
+ (let ((file (string-trim file #\/)))
+ (or (search-path directories file)
+ (raise
+ (condition (&search-error (path directories) (file file)))))))))
+
+(define (search-input-directory inputs directory)
+ "Find a sub-directory named DIRECTORY among the INPUTS and return its
+absolute file name.
+
+DIRECTORY must be a string like \"xml/dtd/docbook\". If DIRECTORY is not
+found, an exception is raised."
+ (match inputs
+ (((_ . directories) ...)
+ (or (any (lambda (parent)
+ (let ((directory (string-append parent "/" directory)))
+ (and (directory-exists? directory)
+ directory)))
+ directories)
+ (raise (condition
+ (&search-error (path directories) (file directory))))))))
+
;;;
;;; Phases.
@@ -746,6 +853,31 @@ PROC's result is returned."
(lambda (key . args)
(false-if-exception (delete-file template))))))
+(define (unused-private-use-code-point s)
+ "Find a code point within a Unicode Private Use Area that is not
+present in S, and return the corresponding character object. If one
+cannot be found, return false."
+ (define (scan lo hi)
+ (and (<= lo hi)
+ (let ((c (integer->char lo)))
+ (if (string-index s c)
+ (scan (+ lo 1) hi)
+ c))))
+ (or (scan #xE000 #xF8FF)
+ (scan #xF0000 #xFFFFD)
+ (scan #x100000 #x10FFFD)))
+
+(define (replace-char c1 c2 s)
+ "Return a string which is equal to S except with all instances of C1
+replaced by C2. If C1 and C2 are equal, return S."
+ (if (char=? c1 c2)
+ s
+ (string-map (lambda (c)
+ (if (char=? c c1)
+ c2
+ c))
+ s)))
+
(define (substitute file pattern+procs)
"PATTERN+PROCS is a list of regexp/two-argument-procedure pairs. For each
line of FILE, and for each PATTERN that it matches, call the corresponding
@@ -764,16 +896,26 @@ end of a line; by itself it won't match the terminating newline of a line."
(let loop ((line (read-line in 'concat)))
(if (eof-object? line)
#t
- (let ((line (fold (lambda (r+p line)
- (match r+p
- ((regexp . proc)
- (match (list-matches regexp line)
- ((and m+ (_ _ ...))
- (proc line m+))
- (_ line)))))
- line
- rx+proc)))
- (display line out)
+ ;; Work around the fact that Guile's regexp-exec does not handle
+ ;; NUL characters (a limitation of the underlying GNU libc's
+ ;; regexec) by temporarily replacing them by an unused private
+ ;; Unicode code point.
+ ;; TODO: Use SRFI-115 instead, once available in Guile.
+ (let* ((nul* (or (and (string-index line #\nul)
+ (unused-private-use-code-point line))
+ #\nul))
+ (line* (replace-char #\nul nul* line))
+ (line1* (fold (lambda (r+p line)
+ (match r+p
+ ((regexp . proc)
+ (match (list-matches regexp line)
+ ((and m+ (_ _ ...))
+ (proc line m+))
+ (_ line)))))
+ line*
+ rx+proc))
+ (line1 (replace-char nul* #\nul line1*)))
+ (display line1 out)
(loop (read-line in 'concat)))))))))
@@ -800,7 +942,7 @@ sub-expression. For example:
((\"hello\")
\"good morning\\n\")
((\"foo([a-z]+)bar(.*)$\" all letters end)
- (string-append \"baz\" letter end)))
+ (string-append \"baz\" letters end)))
Here, anytime a line of FILE contains \"hello\", it is replaced by \"good
morning\". Anytime a line of FILE matches the second regexp, ALL is bound to
@@ -853,29 +995,45 @@ match the terminating newline of a line."
;;;
(define* (dump-port in out
+ #:optional len
#:key (buffer-size 16384)
(progress (lambda (t k) (k))))
- "Read as much data as possible from IN and write it to OUT, using chunks of
-BUFFER-SIZE bytes. Call PROGRESS at the beginning and after each successful
-transfer of BUFFER-SIZE bytes or less, passing it the total number of bytes
-transferred and the continuation of the transfer as a thunk."
+ "Read LEN bytes from IN or as much data as possible if LEN is #f, and write
+it to OUT, using chunks of BUFFER-SIZE bytes. Call PROGRESS at the beginning
+and after each successful transfer of BUFFER-SIZE bytes or less, passing it
+the total number of bytes transferred and the continuation of the transfer as
+a thunk."
(define buffer
(make-bytevector buffer-size))
(define (loop total bytes)
(or (eof-object? bytes)
+ (and len (= total len))
(let ((total (+ total bytes)))
(put-bytevector out buffer 0 bytes)
(progress total
(lambda ()
(loop total
- (get-bytevector-n! in buffer 0 buffer-size)))))))
+ (get-bytevector-n! in buffer 0
+ (if len
+ (min (- len total) buffer-size)
+ buffer-size))))))))
;; Make sure PROGRESS is called when we start so that it can measure
;; throughput.
(progress 0
(lambda ()
- (loop 0 (get-bytevector-n! in buffer 0 buffer-size)))))
+ (loop 0 (get-bytevector-n! in buffer 0
+ (if len
+ (min len buffer-size)
+ buffer-size))))))
+
+(define AT_SYMLINK_NOFOLLOW
+ ;; Guile 2.0 did not define this constant, hence this hack.
+ (let ((variable (module-variable the-root-module 'AT_SYMLINK_NOFOLLOW)))
+ (if variable
+ (variable-ref variable)
+ 256))) ;for GNU/Linux
(define (set-file-time file stat)
"Set the atime/mtime of FILE to that specified by STAT."
@@ -883,7 +1041,8 @@ transferred and the continuation of the transfer as a thunk."
(stat:atime stat)
(stat:mtime stat)
(stat:atimensec stat)
- (stat:mtimensec stat)))
+ (stat:mtimensec stat)
+ AT_SYMLINK_NOFOLLOW))
(define (get-char* p)
;; We call it `get-char', but that's really a binary version
@@ -1108,14 +1267,14 @@ known as `nuke-refs' in Nixpkgs."
(program wrap-error-program)
(type wrap-error-type))
-(define (wrapper? prog)
- "Return #t if PROG is a wrapper as produced by 'wrap-program'."
+(define (wrapped-program? prog)
+ "Return #t if PROG is a program that was moved and wrapped by 'wrap-program'."
(and (file-exists? prog)
(let ((base (basename prog)))
(and (string-prefix? "." base)
(string-suffix? "-real" base)))))
-(define* (wrap-program prog #:rest vars)
+(define* (wrap-program prog #:key (sh (which "bash")) #:rest vars)
"Make a wrapper for PROG. VARS should look like this:
'(VARIABLE DELIMITER POSITION LIST-OF-DIRECTORIES)
@@ -1142,7 +1301,12 @@ programs that expect particular shared libraries to be in $LD_LIBRARY_PATH, or
modules in $GUILE_LOAD_PATH, etc.
If PROG has previously been wrapped by 'wrap-program', the wrapper is extended
-with definitions for VARS."
+with definitions for VARS. If it is not, SH will be used as interpreter."
+ (define vars/filtered
+ (match vars
+ ((#:sh _ . vars) vars)
+ (vars vars)))
+
(define wrapped-file
(string-append (dirname prog) "/." (basename prog) "-real"))
@@ -1184,6 +1348,9 @@ with definitions for VARS."
(format #f "export ~a=\"$~a${~a:+:}~a\""
var var var (string-join rest ":")))))
+ (when (wrapped-program? prog)
+ (error (string-append prog " is a wrapper. Refusing to wrap.")))
+
(if already-wrapped?
;; PROG is already a wrapper: add the new "export VAR=VALUE" lines just
@@ -1193,7 +1360,7 @@ with definitions for VARS."
(for-each (lambda (var)
(display (export-variable var) port)
(newline port))
- vars)
+ vars/filtered)
(display last port)
(close-port port))
@@ -1205,8 +1372,8 @@ with definitions for VARS."
(lambda (port)
(format port
"#!~a~%~a~%exec -a \"$0\" \"~a\" \"$@\"~%"
- (which "bash")
- (string-join (map export-variable vars) "\n")
+ sh
+ (string-join (map export-variable vars/filtered) "\n")
(canonicalize-path wrapped-file))))
(chmod prog-tmp #o755)
@@ -1307,7 +1474,7 @@ not supported."
(lambda ()
(call-with-ascii-input-file prog
(lambda (p)
- (format out header)
+ (display header out)
(dump-port p out)
(close out)
(chmod template mode)
diff --git a/guix/deprecation.scm b/guix/deprecation.scm
index 04d4d4a337..c66c9367f6 100644
--- a/guix/deprecation.scm
+++ b/guix/deprecation.scm
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2019, 2020 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2019, 2020, 2021 Ludovic Courtès <ludo@gnu.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -21,6 +21,8 @@
#:use-module (guix diagnostics)
#:autoload (guix utils) (source-properties->location)
#:export (define-deprecated
+
+ define-deprecated/public
define-deprecated/alias
warn-about-deprecation))
@@ -39,6 +41,8 @@
(warning location (G_ "'~a' is deprecated~%")
variable))))
+(define-syntax public (syntax-rules ())) ;private syntactic keyword
+
(define-syntax define-deprecated
(lambda (s)
"Define a deprecated variable or procedure, along these lines:
@@ -53,6 +57,8 @@ This will write a deprecation warning to GUIX-WARNING-PORT."
#'(define-deprecated proc replacement
(lambda* (formals ...) body ...)))
((_ variable replacement exp)
+ #'(define-deprecated private variable replacement exp))
+ ((_ visibility variable replacement exp)
(identifier? #'variable)
(with-syntax ((real (datum->syntax
#'variable
@@ -74,11 +80,23 @@ This will write a deprecation warning to GUIX-WARNING-PORT."
#'(real args (... ...)))
(id
(identifier? #'id)
- #'real)))))))
+ #'real))))
+
+ ;; When asking for public visibility, export both REAL and
+ ;; VARIABLE. Exporting REAL is useful when defining deprecated
+ ;; packages: there must be a public variable bound to a package
+ ;; so that the (guix discover) machinery finds it.
+ #,(if (free-identifier=? #'visibility #'public)
+ #'(export real variable)
+ #'(begin)))))
((_ variable alias)
(identifier? #'alias)
#'(define-deprecated variable alias alias)))))
+(define-syntax-rule (define-deprecated/public body ...)
+ "Like 'define/deprecated', but export all the newly introduced bindings."
+ (define-deprecated public body ...))
+
(define-syntax-rule (define-deprecated/alias deprecated replacement)
"Define as an alias a deprecated variable, procedure, or macro, along
these lines:
diff --git a/guix/derivations.scm b/guix/derivations.scm
index 33f4dc5d9d..f77ea179f4 100644
--- a/guix/derivations.scm
+++ b/guix/derivations.scm
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2012-2021 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2016, 2017 Mathieu Lirzin <mthl@gnu.org>
;;;
;;; This file is part of GNU Guix.
@@ -1243,20 +1243,21 @@ MODULES are compiled."
(hash-set! %module-cache key result)
result)))
-(define* (build-expression->derivation store name exp ;deprecated
- #:key
- (system (%current-system))
- (inputs '())
- (outputs '("out"))
- hash hash-algo recursive?
- (env-vars '())
- (modules '())
- guile-for-build
- references-graphs
- allowed-references
- disallowed-references
- local-build? (substitutable? #t)
- (properties '()))
+(define-deprecated (build-expression->derivation store name exp
+ #:key
+ (system (%current-system))
+ (inputs '())
+ (outputs '("out"))
+ hash hash-algo recursive?
+ (env-vars '())
+ (modules '())
+ guile-for-build
+ references-graphs
+ allowed-references
+ disallowed-references
+ local-build? (substitutable? #t)
+ (properties '()))
+ gexp->derivation ;unbound, but that's okay
"Return a derivation that executes Scheme expression EXP as a builder
for derivation NAME. INPUTS must be a list of (NAME DRV-PATH SUB-DRV)
tuples; when SUB-DRV is omitted, \"out\" is assumed. MODULES is a list
diff --git a/guix/gexp.scm b/guix/gexp.scm
index f3d278b3e6..01dca902f7 100644
--- a/guix/gexp.scm
+++ b/guix/gexp.scm
@@ -40,6 +40,7 @@
#:use-module (ice-9 match)
#:export (gexp
gexp?
+ sexp->gexp
with-imported-modules
with-extensions
let-system
@@ -106,6 +107,10 @@
lowered-gexp-load-path
lowered-gexp-load-compiled-path
+ with-build-variables
+ input-tuples->gexp
+ outputs->gexp
+
gexp->derivation
gexp->file
gexp->script
@@ -113,6 +118,7 @@
mixed-text-file
file-union
directory-union
+
imported-files
imported-modules
compiled-modules
@@ -197,6 +203,18 @@ As a result, the S-expression will be approximate if GEXP has references."
(set-record-type-printer! <gexp> write-gexp)
+(define (gexp-with-hidden-inputs gexp inputs)
+ "Add INPUTS, a list of <gexp-input>, to the references of GEXP. These are
+\"hidden inputs\" because they do not actually appear in the expansion of GEXP
+returned by 'gexp->sexp'."
+ (make-gexp (append inputs (gexp-references gexp))
+ (gexp-self-modules gexp)
+ (gexp-self-extensions gexp)
+ (let ((extra (length inputs)))
+ (lambda args
+ (apply (gexp-proc gexp) (drop args extra))))
+ (gexp-location gexp)))
+
;;;
;;; Methods.
@@ -271,14 +289,17 @@ OBJ must be an object that has an associated gexp compiler, such as a
(#f
(raise (condition (&gexp-input-error (input obj)))))
(lower
- ;; Cache in STORE the result of lowering OBJ.
- (mcached (mlet %store-monad ((lowered (lower obj system target)))
- (if (and (struct? lowered)
- (not (derivation? lowered)))
- (loop lowered)
- (return lowered)))
- obj
- system target graft?))))))
+ ;; Cache in STORE the result of lowering OBJ. If OBJ is a
+ ;; derivation, bypass the cache.
+ (if (derivation? obj)
+ (return obj)
+ (mcached (mlet %store-monad ((lowered (lower obj system target)))
+ (if (and (struct? lowered)
+ (not (derivation? lowered)))
+ (loop lowered)
+ (return lowered)))
+ obj
+ system target graft?)))))))
(define* (lower+expand-object obj
#:optional (system (%current-system))
@@ -293,9 +314,11 @@ expand to file names, but it's possible to expand to a plain data type."
(raise (condition (&gexp-input-error (input obj)))))
(lower
(mlet* %store-monad ((graft? (grafting?))
- (lowered (mcached (lower obj system target)
- obj
- system target graft?)))
+ (lowered (if (derivation? obj)
+ (return obj)
+ (mcached (lower obj system target)
+ obj
+ system target graft?))))
;; LOWER might return something that needs to be further
;; lowered.
(if (struct? lowered)
@@ -662,7 +685,8 @@ SUFFIX."
expander => (lambda (obj lowered output)
(match obj
(($ <file-append> base suffix)
- (let* ((expand (lookup-expander base))
+ (let* ((expand (or (lookup-expander base)
+ (lookup-expander lowered)))
(base (expand base lowered output)))
(string-append base (string-concatenate suffix)))))))
@@ -1607,7 +1631,8 @@ last one is created from the given <scheme-file> object."
(guile (%guile-for-build))
(module-path %load-path)
(extensions '())
- (deprecation-warnings #f))
+ (deprecation-warnings #f)
+ (optimization-level 1))
"Return a derivation that builds a tree containing the `.go' files
corresponding to MODULES. All the MODULES are built in a context where
they can refer to each other. When TARGET is true, cross-compile MODULES for
@@ -1618,127 +1643,178 @@ TARGET, a GNU triplet."
#:system system
#:guile guile
#:module-path
- module-path)))
+ module-path))
+ (extensions (mapm %store-monad
+ (lambda (extension)
+ (lower-object extension system
+ #:target #f))
+ extensions)))
(define build
- (gexp
- (begin
- (primitive-load (ungexp %utils-module)) ;for 'mkdir-p'
-
- (use-modules (ice-9 ftw)
- (ice-9 format)
- (srfi srfi-1)
- (srfi srfi-26)
- (system base target)
- (system base compile))
-
- (define (regular? file)
- (not (member file '("." ".."))))
-
- (define (process-entry entry output processed)
- (if (file-is-directory? entry)
- (let ((output (string-append output "/" (basename entry))))
- (mkdir-p output)
- (process-directory entry output processed))
- (let* ((base (basename entry ".scm"))
- (output (string-append output "/" base ".go")))
- (format #t "[~2@a/~2@a] Compiling '~a'...~%"
- (+ 1 processed (ungexp total))
- (ungexp (* total 2))
- entry)
-
- (ungexp-splicing
- (if target
- (gexp ((with-target (ungexp target)
+ (gexp-with-hidden-inputs
+ (gexp
+ (begin
+ (primitive-load (ungexp %utils-module)) ;for 'mkdir-p'
+
+ (use-modules (ice-9 ftw)
+ (ice-9 format)
+ (srfi srfi-1)
+ (srfi srfi-26)
+ (system base target)
+ (system base compile))
+
+ (define modules
+ (getenv "modules"))
+
+ (define total
+ (string->number (getenv "module count")))
+
+ (define extensions
+ (string-split (getenv "extensions") #\space))
+
+ (define target
+ (getenv "target"))
+
+ (define optimization-level
+ (string->number (getenv "optimization level")))
+
+ (define optimizations-for-level
+ (or (and=> (false-if-exception
+ (resolve-interface '(system base optimize)))
+ (lambda (iface)
+ (module-ref iface 'optimizations-for-level))) ;Guile 3.0
+ (const '())))
+
+ (define (regular? file)
+ (not (member file '("." ".."))))
+
+ (define (process-entry entry output processed)
+ (if (file-is-directory? entry)
+ (let ((output (string-append output "/" (basename entry))))
+ (mkdir-p output)
+ (process-directory entry output processed))
+ (let* ((base (basename entry ".scm"))
+ (output (string-append output "/" base ".go")))
+ (format #t "[~2@a/~2@a] Compiling '~a'...~%"
+ (+ 1 processed total)
+ (* total 2)
+ entry)
+
+ (with-target (or target %host-type)
(lambda ()
(compile-file entry
#:output-file output
#:opts
- %auto-compilation-options)))))
- (gexp ((compile-file entry
- #:output-file output
- #:opts %auto-compilation-options)))))
-
- (+ 1 processed))))
-
- (define (process-directory directory output processed)
- (let ((entries (map (cut string-append directory "/" <>)
- (scandir directory regular?))))
- (fold (cut process-entry <> output <>)
- processed
- entries)))
-
- (define* (load-from-directory directory
- #:optional (loaded 0))
- "Load all the source files found in DIRECTORY."
- ;; XXX: This works around <https://bugs.gnu.org/15602>.
- (let ((entries (map (cut string-append directory "/" <>)
- (scandir directory regular?))))
- (fold (lambda (file loaded)
- (if (file-is-directory? file)
- (load-from-directory file loaded)
- (begin
- (format #t "[~2@a/~2@a] Loading '~a'...~%"
- (+ 1 loaded) (ungexp (* 2 total))
- file)
- (save-module-excursion
- (lambda ()
- (primitive-load file)))
- (+ 1 loaded))))
- loaded
- entries)))
-
- (setvbuf (current-output-port)
- (cond-expand (guile-2.2 'line) (else _IOLBF)))
-
- (define mkdir-p
- ;; Capture 'mkdir-p'.
- (@ (guix build utils) mkdir-p))
-
- ;; Add EXTENSIONS to the search path.
- (set! %load-path
- (append (map (lambda (extension)
- (string-append extension
- "/share/guile/site/"
- (effective-version)))
- '((ungexp-native-splicing extensions)))
- %load-path))
- (set! %load-compiled-path
- (append (map (lambda (extension)
- (string-append extension "/lib/guile/"
- (effective-version)
- "/site-ccache"))
- '((ungexp-native-splicing extensions)))
- %load-compiled-path))
-
- (set! %load-path (cons (ungexp modules) %load-path))
-
- ;; Above we loaded our own (guix build utils) but now we may need to
- ;; load a compile a different one. Thus, force a reload.
- (let ((utils (string-append (ungexp modules)
- "/guix/build/utils.scm")))
- (when (file-exists? utils)
- (load utils)))
-
- (mkdir (ungexp output))
- (chdir (ungexp modules))
-
- (load-from-directory ".")
- (process-directory "." (ungexp output) 0))))
-
- ;; TODO: Pass MODULES as an environment variable.
+ `(,@%auto-compilation-options
+ ,@(optimizations-for-level
+ optimization-level)))))
+
+ (+ 1 processed))))
+
+ (define (process-directory directory output processed)
+ (let ((entries (map (cut string-append directory "/" <>)
+ (scandir directory regular?))))
+ (fold (cut process-entry <> output <>)
+ processed
+ entries)))
+
+ (define* (load-from-directory directory
+ #:optional (loaded 0))
+ "Load all the source files found in DIRECTORY."
+ ;; XXX: This works around <https://bugs.gnu.org/15602>.
+ (let ((entries (map (cut string-append directory "/" <>)
+ (scandir directory regular?))))
+ (fold (lambda (file loaded)
+ (if (file-is-directory? file)
+ (load-from-directory file loaded)
+ (begin
+ (format #t "[~2@a/~2@a] Loading '~a'...~%"
+ (+ 1 loaded) (* 2 total)
+ file)
+ (save-module-excursion
+ (lambda ()
+ (primitive-load file)))
+ (+ 1 loaded))))
+ loaded
+ entries)))
+
+ (setvbuf (current-output-port)
+ (cond-expand (guile-2.2 'line) (else _IOLBF)))
+
+ (define mkdir-p
+ ;; Capture 'mkdir-p'.
+ (@ (guix build utils) mkdir-p))
+
+ ;; Remove environment variables for internal consumption.
+ (unsetenv "modules")
+ (unsetenv "module count")
+ (unsetenv "extensions")
+ (unsetenv "target")
+ (unsetenv "optimization level")
+
+ ;; Add EXTENSIONS to the search path.
+ (set! %load-path
+ (append (map (lambda (extension)
+ (string-append extension
+ "/share/guile/site/"
+ (effective-version)))
+ extensions)
+ %load-path))
+ (set! %load-compiled-path
+ (append (map (lambda (extension)
+ (string-append extension "/lib/guile/"
+ (effective-version)
+ "/site-ccache"))
+ extensions)
+ %load-compiled-path))
+
+ (set! %load-path (cons modules %load-path))
+
+ ;; Above we loaded our own (guix build utils) but now we may need to
+ ;; load a compile a different one. Thus, force a reload.
+ (let ((utils (string-append modules
+ "/guix/build/utils.scm")))
+ (when (file-exists? utils)
+ (load utils)))
+
+ (mkdir (ungexp output))
+ (chdir modules)
+
+ (load-from-directory ".")
+ (process-directory "." (ungexp output) 0)))
+ (append (map gexp-input extensions)
+ (list (gexp-input modules)))))
+
(gexp->derivation name build
+ #:script-name "compile-modules"
#:system system
#:target target
#:guile-for-build guile
#:local-build? #t
#:env-vars
- (case deprecation-warnings
- ((#f)
- '(("GUILE_WARN_DEPRECATED" . "no")))
- ((detailed)
- '(("GUILE_WARN_DEPRECATED" . "detailed")))
- (else
- '())))))
+ `(("modules"
+ . ,(if (derivation? modules)
+ (derivation->output-path modules)
+ modules))
+ ("module count" . ,(number->string total))
+ ("extensions"
+ . ,(string-join
+ (map (match-lambda
+ ((? derivation? drv)
+ (derivation->output-path drv))
+ ((? string? str) str))
+ extensions)))
+ ("optimization level"
+ . ,(number->string optimization-level))
+ ,@(if target
+ `(("target" . ,target))
+ '())
+ ,@(case deprecation-warnings
+ ((#f)
+ '(("GUILE_WARN_DEPRECATED" . "no")))
+ ((detailed)
+ '(("GUILE_WARN_DEPRECATED" . "detailed")))
+ (else
+ '()))))))
;;;
@@ -1806,6 +1882,72 @@ Assume MODULES are compiled with GUILE."
extensions))
%load-compiled-path)))))))))
+(define* (input-tuples->gexp inputs #:key native?)
+ "Given INPUTS, a list of label/gexp-input tuples, return a gexp that expands
+to an input alist."
+ (define references
+ (map (match-lambda
+ ((label input) input))
+ inputs))
+
+ (define labels
+ (match inputs
+ (((labels . _) ...)
+ labels)))
+
+ (define (proc . args)
+ (cons 'quote (list (map cons labels args))))
+
+ ;; This gexp is more efficient than an equivalent hand-written gexp: fewer
+ ;; allocations, no need to scan long list-valued <gexp-input> records in
+ ;; search of file-like objects, etc.
+ (make-gexp references '() '() proc
+ (source-properties inputs)))
+
+(define (outputs->gexp outputs)
+ "Given OUTPUTS, a list of output names, return a gexp that expands to an
+output alist."
+ (define references
+ (map gexp-output outputs))
+
+ (define (proc . args)
+ `(list ,@(map (lambda (name)
+ `(cons ,name ((@ (guile) getenv) ,name)))
+ outputs)))
+
+ ;; This gexp is more efficient than an equivalent hand-written gexp.
+ (make-gexp references '() '() proc
+ (source-properties outputs)))
+
+(define (with-build-variables inputs outputs body)
+ "Return a gexp that surrounds BODY with a definition of the legacy
+'%build-inputs', '%outputs', and '%output' variables based on INPUTS, a list
+of name/gexp-input tuples, and OUTPUTS, a list of strings."
+
+ ;; These two variables are defined for backward compatibility. They are
+ ;; used by package expressions. These must be top-level defines so that
+ ;; 'use-modules' form in BODY that are required for macro expansion work as
+ ;; expected.
+ (gexp (begin
+ (define %build-inputs
+ (ungexp (input-tuples->gexp inputs)))
+ (define %outputs
+ (ungexp (outputs->gexp outputs)))
+ (define %output
+ (assoc-ref %outputs "out"))
+
+ (ungexp body))))
+
+(define (sexp->gexp sexp)
+ "Turn SEXP into a gexp without any references.
+
+Using this is a way for the caller to tell that SEXP doesn't need to be
+scanned for file-like objects, thereby reducing processing costs. This is
+particularly useful if SEXP is a long list or a deep tree."
+ (make-gexp '() '() '()
+ (lambda () sexp)
+ (source-properties sexp)))
+
(define* (gexp->script name exp
#:key (guile (default-guile))
(module-path %load-path)
diff --git a/guix/grafts.scm b/guix/grafts.scm
index 4c69eb35a2..0ffda8f9aa 100644
--- a/guix/grafts.scm
+++ b/guix/grafts.scm
@@ -42,6 +42,7 @@
graft-derivation/shallow
%graft?
+ without-grafting
set-grafting
grafting?))
@@ -341,6 +342,17 @@ DRV, and graft DRV itself to refer to those grafted dependencies."
;; Whether to honor package grafts by default.
(make-parameter #t))
+(define (call-without-grafting thunk)
+ (lambda (store)
+ (values (parameterize ((%graft? #f))
+ (run-with-store store (thunk)))
+ store)))
+
+(define-syntax-rule (without-grafting mexp ...)
+ "Bind monadic expressions MEXP in a dynamic extent where '%graft?' is
+false."
+ (call-without-grafting (lambda () (mbegin %store-monad mexp ...))))
+
(define-inlinable (set-grafting enable?)
;; This monadic procedure enables grafting when ENABLE? is true, and
;; disables it otherwise. It returns the previous setting.
diff --git a/guix/import/cran.scm b/guix/import/cran.scm
index 7478866515..1389576cad 100644
--- a/guix/import/cran.scm
+++ b/guix/import/cran.scm
@@ -137,9 +137,9 @@
(map (lambda (name)
(case (%input-style)
((specification)
- (list name (list 'unquote (list 'specification->package name))))
+ `(specification->package ,name))
(else
- (list name (list 'unquote (string->symbol name))))))
+ (string->symbol name))))
(sort names string-ci<?)))
(define* (maybe-inputs package-inputs #:optional (type 'inputs))
@@ -149,7 +149,7 @@ package definition."
(()
'())
((package-inputs ...)
- `((,type (,'quasiquote ,(format-inputs package-inputs)))))))
+ `((,type (list ,@(format-inputs package-inputs)))))))
(define %cran-url "https://cran.r-project.org/web/packages/")
(define %cran-canonical-url "https://cran.r-project.org/package=")
diff --git a/guix/import/egg.scm b/guix/import/egg.scm
index ff9f5a0247..0b88020554 100644
--- a/guix/import/egg.scm
+++ b/guix/import/egg.scm
@@ -1,6 +1,7 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2021 Xinglu Chen <public@yoctocell.xyz>
;;; Copyright © 2021 Tobias Geerinckx-Rice <me@tobias.gr>
+;;; Copyright © 2021 Sarah Morgensen <iskarian@mgsn.dev>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -249,12 +250,9 @@ not work."
(let ((name (prettify-name (extract-name name))))
;; Dependencies are sometimes specified as symbols and sometimes
;; as strings
- (list (string-append (if system? "" package-name-prefix)
- name)
- (list 'unquote
- (string->symbol (string-append
- (if system? "" package-name-prefix)
- name))))))
+ (string->symbol (string-append
+ (if system? "" package-name-prefix)
+ name))))
(define egg-propagated-inputs
(let ((dependencies (assoc-ref egg-content 'dependencies)))
@@ -293,7 +291,7 @@ not work."
'())
((inputs ...)
(list (list input-type
- (list 'quasiquote inputs))))))
+ `(list ,@inputs))))))
(values
`(package
@@ -321,7 +319,7 @@ not work."
(license ,egg-licenses))
(filter (lambda (name)
(not (member name '("srfi-4"))))
- (map (compose guix-name->egg-name first)
+ (map (compose guix-name->egg-name symbol->string)
(append egg-propagated-inputs
egg-native-inputs)))))))
diff --git a/guix/import/elpa.scm b/guix/import/elpa.scm
index 2483677b39..d20e274db7 100644
--- a/guix/import/elpa.scm
+++ b/guix/import/elpa.scm
@@ -353,9 +353,7 @@ type '<elpa-package>'."
(elpa-package-inputs pkg))))
(define dependencies
- (map (lambda (n)
- (let ((new-n (elpa-name->package-name n)))
- (list new-n (list 'unquote (string->symbol new-n)))))
+ (map (compose string->symbol elpa-name->package-name)
dependencies-names))
(define (maybe-inputs input-type inputs)
@@ -363,8 +361,7 @@ type '<elpa-package>'."
(()
'())
((inputs ...)
- (list (list input-type
- (list 'quasiquote inputs))))))
+ (list (list input-type `(list ,@inputs))))))
(define melpa-source
(melpa-recipe->origin melpa-recipe))
diff --git a/guix/import/gem.scm b/guix/import/gem.scm
index 418d716be6..0e5bb7e635 100644
--- a/guix/import/gem.scm
+++ b/guix/import/gem.scm
@@ -4,6 +4,7 @@
;;; Copyright © 2018 Oleg Pykhalov <go.wigust@gmail.com>
;;; Copyright © 2020, 2021 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2020 Martin Becze <mjbecze@riseup.net>
+;;; Copyright © 2021 Sarah Morgensen <iskarian@mgsn.dev>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -110,12 +111,7 @@ VERSION, HASH, HOME-PAGE, DESCRIPTION, DEPENDENCIES, and LICENSES."
,@(if (null? dependencies)
'()
`((propagated-inputs
- (,'quasiquote
- ,(map (lambda (name)
- `(,name
- (,'unquote
- ,(string->symbol name))))
- dependencies)))))
+ (list ,@(map string->symbol dependencies)))))
(synopsis ,synopsis)
(description ,description)
(home-page ,home-page)
diff --git a/guix/import/hackage.scm b/guix/import/hackage.scm
index 0d5616ca62..6ef1e7a675 100644
--- a/guix/import/hackage.scm
+++ b/guix/import/hackage.scm
@@ -5,6 +5,7 @@
;;; Copyright © 2018 Ricardo Wurmus <rekado@elephly.net>
;;; Copyright © 2019 Robert Vollmert <rob@vllmrt.net>
;;; Copyright © 2021 Xinglu Chen <public@yoctocell.xyz>
+;;; Copyright © 2021 Sarah Morgensen <iskarian@mgsn.dev>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -267,14 +268,12 @@ the hash of the Cabal file."
hackage-dependencies))
(define dependencies
- (map (lambda (name)
- (list name (list 'unquote (string->symbol name))))
+ (map string->symbol
(map hackage-name->package-name
hackage-dependencies)))
(define native-dependencies
- (map (lambda (name)
- (list name (list 'unquote (string->symbol name))))
+ (map string->symbol
(map hackage-name->package-name
hackage-native-dependencies)))
@@ -284,8 +283,8 @@ the hash of the Cabal file."
'())
((inputs ...)
(list (list input-type
- (list 'quasiquote inputs))))))
-
+ `(list ,@inputs))))))
+
(define (maybe-arguments)
(match (append (if (not include-test-dependencies?)
'(#:tests? #f)
diff --git a/guix/import/opam.scm b/guix/import/opam.scm
index eb384ba426..d9fdf4527a 100644
--- a/guix/import/opam.scm
+++ b/guix/import/opam.scm
@@ -2,6 +2,7 @@
;;; 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.
@@ -306,10 +307,8 @@ path to the repository."
(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 (repositories-specs '("opam")))
(or (fold (lambda (repository others)
@@ -321,9 +320,9 @@ path to the repository."
(filter-map get-opam-repository repositories-specs))
(warning (G_ "opam: 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* ((with-opam (if (member "opam" repo) repo (cons "opam" repo)))
(opam-file (opam-fetch name with-opam))
@@ -362,10 +361,10 @@ or #f on failure."
'ocaml-build-system))
,@(if (null? inputs)
'()
- `((propagated-inputs ,(list 'quasiquote inputs))))
+ `((propagated-inputs (list ,@inputs))))
,@(if (null? native-inputs)
'()
- `((native-inputs ,(list 'quasiquote native-inputs))))
+ `((native-inputs (list ,@native-inputs))))
,@(if (equal? name (guix-name->opam-name (ocaml-name->guix-name name)))
'()
`((properties
diff --git a/guix/import/print.scm b/guix/import/print.scm
index 767b0528d5..66016145cb 100644
--- a/guix/import/print.scm
+++ b/guix/import/print.scm
@@ -32,6 +32,14 @@
#:use-module (ice-9 match)
#:export (package->code))
+(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."
@@ -148,8 +156,24 @@ when evaluated."
(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))
+ (name (variable-name package module)))
+ (variable-reference module name)))
+ ((_ package output)
+ (let* ((module (package-module-name package))
+ (name (variable-name package module)))
+ (list 'quasiquote
+ (list
+ (list 'unquote
+ (variable-reference module name))
+ output)))))
+ inputs))
+ (list 'quasiquote ;preserve input labels (deprecated)
+ (object->code inputs #t))))
(let ((name (package-name package))
(version (package-version package))
@@ -192,13 +216,13 @@ when evaluated."
(outs `((outputs (list ,@outs)))))
,@(match native-inputs
(() '())
- (pkgs `((native-inputs ,(package-lists->code pkgs)))))
+ (pkgs `((native-inputs ,(inputs->code pkgs)))))
,@(match inputs
(() '())
- (pkgs `((inputs ,(package-lists->code pkgs)))))
+ (pkgs `((inputs ,(inputs->code pkgs)))))
,@(match propagated-inputs
(() '())
- (pkgs `((propagated-inputs ,(package-lists->code pkgs)))))
+ (pkgs `((propagated-inputs ,(inputs->code pkgs)))))
,@(if (lset= string=? supported-systems %supported-systems)
'()
`((supported-systems (list ,@supported-systems))))
diff --git a/guix/import/pypi.scm b/guix/import/pypi.scm
index bbbabe4c09..343e7c0a0a 100644
--- a/guix/import/pypi.scm
+++ b/guix/import/pypi.scm
@@ -189,7 +189,7 @@ the input field."
(()
'())
((package-inputs ...)
- `((,input-type (,'quasiquote ,package-inputs))))))
+ `((,input-type (list ,@package-inputs))))))
(define %requirement-name-regexp
;; Regexp to match the requirement name in a requirement specification.
@@ -408,15 +408,8 @@ return the unaltered list of upstream dependency names."
(remove (cut string=? "argparse" <>) deps))
(define (requirement->package-name/sort deps)
- (sort
- (map (lambda (input)
- (let ((guix-name (python->package-name input)))
- (list guix-name (list 'unquote (string->symbol guix-name)))))
- deps)
- (lambda args
- (match args
- (((a _ ...) (b _ ...))
- (string-ci<? a b))))))
+ (map string->symbol
+ (sort (map python->package-name deps) string-ci<?)))
(define process-requirements
(compose requirement->package-name/sort strip-argparse))
diff --git a/guix/lint.scm b/guix/lint.scm
index ac2e7b3841..8bbbe210d6 100644
--- a/guix/lint.scm
+++ b/guix/lint.scm
@@ -82,6 +82,7 @@
#:export (check-description-style
check-inputs-should-be-native
check-inputs-should-not-be-an-input-at-all
+ check-input-labels
check-wrapper-inputs
check-patch-file-names
check-patch-headers
@@ -522,6 +523,37 @@ of a package, and INPUT-NAMES, a list of package specifications such as
(package-input-intersection (package-direct-inputs package)
input-names))))
+(define (check-input-labels package)
+ "Emit a warning for labels that differ from the corresponding package name."
+ (define (check input-kind package-inputs)
+ (define (warning label name)
+ (make-warning package
+ (G_ "label '~a' does not match package name '~a'")
+ (list label name)
+ #:field input-kind))
+
+ (append-map (match-lambda
+ (((? string? label) (? package? dependency))
+ (if (string=? label (package-name dependency))
+ '()
+ (list (warning label (package-name dependency)))))
+ (((? string? label) (? package? dependency) output)
+ (let ((expected (string-append (package-name dependency)
+ ":" output)))
+ (if (string=? label expected)
+ '()
+ (list (warning label expected)))))
+ (_
+ '()))
+ (package-inputs package)))
+
+ (append-map (match-lambda
+ ((kind proc)
+ (check kind proc)))
+ `((native-inputs ,package-native-inputs)
+ (inputs ,package-inputs)
+ (propagated-inputs ,package-propagated-inputs))))
+
(define (report-wrap-program-error package wrapper-name)
"Warn that \"bash-minimal\" is missing from 'inputs', while WRAPPER-NAME
requires it."
@@ -1775,6 +1807,10 @@ them for PACKAGE."
(description "Identify inputs that shouldn't be inputs at all")
(check check-inputs-should-not-be-an-input-at-all))
(lint-checker
+ (name 'input-labels)
+ (description "Identify input labels that do not match package names")
+ (check check-input-labels))
+ (lint-checker
(name 'wrapper-inputs)
(description "Make sure 'wrap-program' can finds its interpreter.")
(check check-wrapper-inputs))
diff --git a/guix/packages.scm b/guix/packages.scm
index a3602a3d7a..b3c5a00011 100644
--- a/guix/packages.scm
+++ b/guix/packages.scm
@@ -5,6 +5,7 @@
;;; Copyright © 2016 Alex Kost <alezost@gmail.com>
;;; Copyright © 2017, 2019, 2020 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2019 Marius Bakke <mbakke@fastmail.com>
+;;; Copyright © 2020, 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;; Copyright © 2021 Chris Marusich <cmmarusich@gmail.com>
;;;
;;; This file is part of GNU Guix.
@@ -23,6 +24,8 @@
;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
(define-module (guix packages)
+ #:use-module ((guix build utils) #:select (compressor tarball?
+ strip-store-file-name))
#:use-module (guix utils)
#:use-module (guix records)
#:use-module (guix store)
@@ -53,6 +56,7 @@
#:re-export (%current-system
%current-target-system
search-path-specification) ;for convenience
+ #:re-export-and-replace (delete) ;used as syntactic keyword
#:replace ((define-public* . define-public))
#:export (content-hash
content-hash?
@@ -108,6 +112,18 @@
deprecated-package
package-field-location
+ this-package-input
+ this-package-native-input
+
+ lookup-package-input
+ lookup-package-native-input
+ lookup-package-propagated-input
+ lookup-package-direct-input
+
+ prepend ;syntactic keyword
+ replace ;syntactic keyword
+ modify-inputs
+
package-direct-sources
package-transitive-sources
package-direct-inputs
@@ -277,8 +293,8 @@ as base32. Otherwise, it must be a bytevector."
(default '()) (delayed))
(snippet origin-snippet (default #f)) ; sexp or #f
- (patch-flags origin-patch-flags ; list of strings
- (default '("-p1")))
+ (patch-flags origin-patch-flags ; string-list gexp
+ (default %default-patch-flags))
;; Patching requires Guile, GNU Patch, and a few more. These two fields are
;; used to specify these dependencies when needed.
@@ -326,6 +342,9 @@ specifications to 'hash'."
(set-record-type-printer! <origin> print-origin)
+(define %default-patch-flags
+ #~("-p1"))
+
(define (origin-actual-file-name origin)
"Return the file name of ORIGIN, either its 'file-name' field or the file
name of its URI."
@@ -372,7 +391,7 @@ from forcing GEXP-PROMISE."
;; This is the list of system types that are supported. By default, we
;; expect all packages to build successfully here.
'("x86_64-linux" "i686-linux" "armhf-linux" "aarch64-linux" "mips64el-linux" "i586-gnu"
- "powerpc64le-linux"))
+ "powerpc64le-linux" "powerpc-linux"))
(define %hurd-systems
;; The GNU/Hurd systems for which support is being developed.
@@ -383,7 +402,16 @@ from forcing GEXP-PROMISE."
;;
;; XXX: MIPS is unavailable in CI:
;; <https://lists.gnu.org/archive/html/guix-devel/2017-03/msg00790.html>.
- (fold delete %supported-systems '("mips64el-linux")))
+ (fold delete %supported-systems '("mips64el-linux" "powerpc-linux")))
+
+(define-inlinable (sanitize-inputs inputs)
+ "Sanitize INPUTS by turning it into a list of name/package tuples if it's
+not already the case."
+ (cond ((null? inputs) inputs)
+ ((and (pair? (car inputs))
+ (string? (caar inputs)))
+ inputs)
+ (else (map add-input-label inputs))))
(define-syntax current-location-vector
(lambda (s)
@@ -495,11 +523,14 @@ Texinfo. Otherwise, return the string."
(default '()) (thunked))
(inputs package-inputs ; input packages or derivations
- (default '()) (thunked))
+ (default '()) (thunked)
+ (sanitize sanitize-inputs))
(propagated-inputs package-propagated-inputs ; same, but propagated
- (default '()) (thunked))
+ (default '()) (thunked)
+ (sanitize sanitize-inputs))
(native-inputs package-native-inputs ; native input packages/derivations
- (default '()) (thunked))
+ (default '()) (thunked)
+ (sanitize sanitize-inputs))
(outputs package-outputs ; list of strings
(default '("out")))
@@ -534,6 +565,24 @@ Texinfo. Otherwise, return the string."
(default (current-definition-location))
(innate)))
+(define (add-input-label input)
+ "Add an input label to INPUT."
+ (match input
+ ((? package? package)
+ (list (package-name package) package))
+ (((? package? package) output) ;XXX: ugly?
+ (list (package-name package) package output))
+ ((? gexp-input?) ;XXX: misplaced because 'native?' field is ignored?
+ (let ((obj (gexp-input-thing input))
+ (output (gexp-input-output input)))
+ `(,(if (package? obj)
+ (package-name obj)
+ "_")
+ ,obj
+ ,@(if (string=? output "out") '() (list output)))))
+ (x
+ `("_" ,x))))
+
(set-record-type-printer! <package>
(lambda (package port)
(let ((loc (package-location package))
@@ -590,6 +639,7 @@ it has in Guix."
user interfaces, ignores."
(package
(inherit p)
+ (location (package-location p))
(properties `((hidden? . #t)
,@(package-properties p)))))
@@ -613,12 +663,6 @@ object."
(define (package-field-location package field)
"Return the source code location of the definition of FIELD for PACKAGE, or
#f if it could not be determined."
- (define (goto port line column)
- (unless (and (= (port-column port) (- column 1))
- (= (port-line port) (- line 1)))
- (unless (eof-object? (read-char port))
- (goto port line column))))
-
(match (package-location package)
(($ <location> file line column)
(match (search-path %load-path file)
@@ -628,7 +672,7 @@ object."
;; In general we want to keep relative file names for modules.
(call-with-input-file file-found
(lambda (port)
- (goto port line column)
+ (go-to-location port line column)
(match (read port)
(('package inits ...)
(let ((field (assoc field inits)))
@@ -651,6 +695,18 @@ object."
#f)))
(_ #f)))
+(define-syntax-rule (this-package-input name)
+ "Return the input NAME of the package being defined--i.e., an input
+from the ‘inputs’ or ‘propagated-inputs’ field. Native inputs are not
+considered. If this input does not exist, return #f instead."
+ (or (lookup-package-input this-package name)
+ (lookup-package-propagated-input this-package name)))
+
+(define-syntax-rule (this-package-native-input name)
+ "Return the native package input NAME of the package being defined--i.e.,
+an input from the ‘native-inputs’ field. If this native input does not
+exist, return #f instead."
+ (lookup-package-native-input this-package name))
;; Error conditions.
@@ -701,8 +757,12 @@ identifiers. The result is inferred from the file names of patches."
(let* ((canonical (module-ref (resolve-interface '(gnu packages base))
'canonical-package))
(ref (lambda (module var)
- (canonical
- (module-ref (resolve-interface module) var)))))
+ ;; Make sure 'canonical-package' is not influenced by
+ ;; '%current-target-system' since we're going to use the
+ ;; native package anyway.
+ (parameterize ((%current-target-system #f))
+ (canonical
+ (module-ref (resolve-interface module) var))))))
`(("tar" ,(ref '(gnu packages base) 'tar))
("xz" ,(ref '(gnu packages compression) 'xz))
("bzip2" ,(ref '(gnu packages compression) 'bzip2))
@@ -735,7 +795,7 @@ the build code of derivation."
#:key
inputs
(snippet #f)
- (flags '("-p1"))
+ (flags %default-patch-flags)
(modules '())
(guile-for-build (%guile-for-build))
(system (%current-system)))
@@ -759,20 +819,7 @@ specifies modules in scope when evaluating SNIPPET."
((package) package)
(#f #f)))))
- (define decompression-type
- (cond ((string-suffix? "gz" source-file-name) "gzip")
- ((string-suffix? "Z" source-file-name) "gzip")
- ((string-suffix? "bz2" source-file-name) "bzip2")
- ((string-suffix? "lz" source-file-name) "lzip")
- ((string-suffix? "zip" source-file-name) "unzip")
- (else "xz")))
-
- (define original-file-name
- ;; Remove the store prefix plus the slash, hash, and hyphen.
- (let* ((sans (string-drop source-file-name
- (+ (string-length (%store-prefix)) 1)))
- (dash (string-index sans #\-)))
- (string-drop sans (+ 1 dash))))
+ (define original-file-name (strip-store-file-name source-file-name))
(define (numeric-extension? file-name)
;; Return true if FILE-NAME ends with digits.
@@ -785,11 +832,9 @@ specifies modules in scope when evaluating SNIPPET."
(define (tarxz-name file-name)
;; Return a '.tar.xz' file name based on FILE-NAME.
- (let ((base (cond ((numeric-extension? file-name)
- original-file-name)
- ((checkout? file-name)
- (string-drop-right file-name 9))
- (else (file-sans-extension file-name)))))
+ (let ((base (if (numeric-extension? file-name)
+ original-file-name
+ (file-sans-extension file-name))))
(string-append base
(if (equal? (file-extension base) "tar")
".xz"
@@ -798,22 +843,27 @@ specifies modules in scope when evaluating SNIPPET."
(define instantiate-patch
(match-lambda
((? string? patch) ;deprecated
- (interned-file patch #:recursive? #t))
+ (local-file patch #:recursive? #t))
((? struct? patch) ;origin, local-file, etc.
- (lower-object patch system))))
-
- (mlet %store-monad ((tar -> (lookup-input "tar"))
- (xz -> (lookup-input "xz"))
- (patch -> (lookup-input "patch"))
- (locales -> (lookup-input "locales"))
- (decomp -> (lookup-input decompression-type))
- (patches (sequence %store-monad
- (map instantiate-patch patches))))
+ patch)))
+
+ (let ((tar (lookup-input "tar"))
+ (gzip (lookup-input "gzip"))
+ (bzip2 (lookup-input "bzip2"))
+ (lzip (lookup-input "lzip"))
+ (xz (lookup-input "xz"))
+ (patch (lookup-input "patch"))
+ (locales (lookup-input "locales"))
+ (comp (and=> (compressor source-file-name) lookup-input))
+ (patches (map instantiate-patch patches)))
(define build
(with-imported-modules '((guix build utils))
#~(begin
(use-modules (ice-9 ftw)
+ (ice-9 match)
+ (ice-9 regex)
(srfi srfi-1)
+ (srfi srfi-26)
(guix build utils))
;; The --sort option was added to GNU tar in version 1.28, released
@@ -839,66 +889,8 @@ specifies modules in scope when evaluating SNIPPET."
(lambda (name)
(not (member name '("." "..")))))))
- ;; Encoding/decoding errors shouldn't be silent.
- (fluid-set! %default-port-conversion-strategy 'error)
-
- (when #+locales
- ;; First of all, install a UTF-8 locale so that UTF-8 file names
- ;; are correctly interpreted. During bootstrap, LOCALES is #f.
- (setenv "LOCPATH"
- (string-append #+locales "/lib/locale/"
- #+(and locales
- (version-major+minor
- (package-version locales)))))
- (setlocale LC_ALL "en_US.utf8"))
-
- (setenv "PATH" (string-append #+xz "/bin" ":"
- #+decomp "/bin"))
-
- ;; SOURCE may be either a directory or a tarball.
- (if (file-is-directory? #+source)
- (let* ((store (%store-directory))
- (len (+ 1 (string-length store)))
- (base (string-drop #+source len))
- (dash (string-index base #\-))
- (directory (string-drop base (+ 1 dash))))
- (mkdir directory)
- (copy-recursively #+source directory))
- #+(if (string=? decompression-type "unzip")
- #~(invoke "unzip" #+source)
- #~(invoke (string-append #+tar "/bin/tar")
- "xvf" #+source)))
-
- (let ((directory (first-file ".")))
- (format (current-error-port)
- "source is under '~a'~%" directory)
- (chdir directory)
-
- (for-each apply-patch '#+patches)
-
- (let ((result #+(if snippet
- #~(let ((module (make-fresh-user-module)))
- (module-use-interfaces!
- module
- (map resolve-interface '#+modules))
- ((@ (system base compile) compile)
- '#+snippet
- #:to 'value
- #:opts %auto-compilation-options
- #:env module))
- #~#t)))
- ;; Issue a warning unless the result is #t.
- (unless (eqv? result #t)
- (format (current-error-port) "\
-## WARNING: the snippet returned `~s'. Return values other than #t
-## are deprecated. Please migrate this package so that its snippet
-## reports errors by raising an exception, and otherwise returns #t.~%"
- result))
- (unless result
- (error "snippet returned false")))
-
- (chdir "..")
-
+ (define (repack directory output)
+ ;; Write to OUTPUT a compressed tarball containing DIRECTORY.
(unless tar-supports-sort?
(call-with-output-file ".file_list"
(lambda (port)
@@ -907,22 +899,97 @@ specifies modules in scope when evaluating SNIPPET."
(find-files directory
#:directories? #t
#:fail-on-error? #t)))))
- (apply invoke
- (string-append #+tar "/bin/tar")
- "cvfa" #$output
+
+ (apply invoke #+(file-append tar "/bin/tar")
+ "cvfa" output
;; Avoid non-determinism in the archive. Set the mtime
;; to 1 as is the case in the store (software like gzip
;; behaves differently when it stumbles upon mtime = 0).
"--mtime=@1"
- "--owner=root:0"
- "--group=root:0"
+ "--owner=root:0" "--group=root:0"
(if tar-supports-sort?
- `("--sort=name"
- ,directory)
+ `("--sort=name" ,directory)
'("--no-recursion"
- "--files-from=.file_list")))))))
+ "--files-from=.file_list"))))
+
+ ;; Encoding/decoding errors shouldn't be silent.
+ (fluid-set! %default-port-conversion-strategy 'error)
- (let ((name (tarxz-name original-file-name)))
+ (when #+locales
+ ;; First of all, install a UTF-8 locale so that UTF-8 file names
+ ;; are correctly interpreted. During bootstrap, LOCALES is #f.
+ (setenv "LOCPATH"
+ (string-append #+locales "/lib/locale/"
+ #+(and locales
+ (version-major+minor
+ (package-version locales)))))
+ (setlocale LC_ALL "en_US.utf8"))
+
+ (setenv "PATH"
+ (string-append #+xz "/bin"
+ (if #+comp
+ (string-append ":" #+comp "/bin")
+ "")))
+
+ (setenv "XZ_DEFAULTS" (string-join (%xz-parallel-args)))
+
+ ;; SOURCE may be either a directory, a tarball or a simple file.
+ (let ((name (strip-store-file-name #+source))
+ (command (and=> #+comp (cut string-append <> "/bin/"
+ (compressor #+source)))))
+ (if (file-is-directory? #+source)
+ (copy-recursively #+source name)
+ (cond
+ ((tarball? #+source)
+ (invoke (string-append #+tar "/bin/tar") "xvf" #+source))
+ ((and=> (compressor #+source) (cut string= "unzip" <>))
+ ;; Note: Referring to the store unzip here (#+unzip)
+ ;; would introduce a cycle.
+ (invoke "unzip" #+source))
+ (else
+ (copy-file #+source name)
+ (when command
+ (invoke command "--decompress" name))))))
+
+ (let* ((file (first-file "."))
+ (directory (if (file-is-directory? file)
+ file
+ ".")))
+ (format (current-error-port) "source is at '~a'~%" file)
+
+ (with-directory-excursion directory
+
+ (for-each apply-patch '#+patches)
+
+ #+(if snippet
+ #~(let ((module (make-fresh-user-module)))
+ (module-use-interfaces!
+ module
+ (map resolve-interface '#+modules))
+ ((@ (system base compile) compile)
+ '#+(if (pair? snippet)
+ (sexp->gexp snippet)
+ snippet)
+ #:to 'value
+ #:opts %auto-compilation-options
+ #:env module))
+ #~#t))
+
+ ;; If SOURCE is a directory (such as a checkout), return a
+ ;; directory. Otherwise create a tarball.
+ (cond
+ ((file-is-directory? #+source)
+ (copy-recursively directory #$output
+ #:log (%make-void-port "w")))
+ ((or #+comp (tarball? #+source))
+ (repack directory #$output))
+ (else ;single uncompressed file
+ (copy-file file #$output)))))))
+
+ (let ((name (if (or (checkout? original-file-name)
+ (not (compressor original-file-name)))
+ original-file-name
+ (tarxz-name original-file-name))))
(gexp->derivation name build
#:graft? #f
#:system system
@@ -987,6 +1054,98 @@ preserved, and only duplicate propagated inputs are removed."
((input rest ...)
(loop rest (cons input result) propagated first? seen)))))
+(define (lookup-input inputs name)
+ "Lookup NAME among INPUTS, an input list."
+ ;; Note: Currently INPUTS is assumed to be an input list that contains input
+ ;; labels. In the future, input labels will be gone and this procedure will
+ ;; check package names.
+ (match (assoc-ref inputs name)
+ ((obj) obj)
+ ((obj _) obj)
+ (#f #f)))
+
+(define (lookup-package-input package name)
+ "Look up NAME among PACKAGE's inputs. Return it if found, #f otherwise."
+ (lookup-input (package-inputs package) name))
+
+(define (lookup-package-native-input package name)
+ "Look up NAME among PACKAGE's native inputs. Return it if found, #f
+otherwise."
+ (lookup-input (package-native-inputs package) name))
+
+(define (lookup-package-propagated-input package name)
+ "Look up NAME among PACKAGE's propagated inputs. Return it if found, #f
+otherwise."
+ (lookup-input (package-propagated-inputs package) name))
+
+(define (lookup-package-direct-input package name)
+ "Look up NAME among PACKAGE's direct inputs. Return it if found, #f
+otherwise."
+ (lookup-input (package-direct-inputs package) name))
+
+(define (inputs-sans-labels inputs)
+ "Return INPUTS stripped of any input labels."
+ (map (match-lambda
+ ((label obj) obj)
+ ((label obj output) `(,obj ,output)))
+ inputs))
+
+(define (replace-input name replacement inputs)
+ "Replace input NAME by REPLACEMENT within INPUTS."
+ (map (lambda (input)
+ (match input
+ (((? string? label) . _)
+ (if (string=? label name)
+ (match replacement ;does REPLACEMENT specify an output?
+ ((_ _) (cons label replacement))
+ (_ (list label replacement)))
+ input))))
+ inputs))
+
+(define-syntax prepend
+ (lambda (s)
+ (syntax-violation 'prepend
+ "'prepend' may only be used within 'modify-inputs'"
+ s)))
+
+(define-syntax replace
+ (lambda (s)
+ (syntax-violation 'replace
+ "'replace' may only be used within 'modify-inputs'"
+ s)))
+
+(define-syntax modify-inputs
+ (syntax-rules (delete prepend append replace)
+ "Modify the given package inputs, as returned by 'package-inputs' & co.,
+according to the given clauses. The example below removes the GMP and ACL
+inputs of Coreutils and adds libcap:
+
+ (modify-inputs (package-inputs coreutils)
+ (delete \"gmp\" \"acl\")
+ (append libcap))
+
+Other types of clauses include 'prepend' and 'replace'."
+ ;; Note: This macro hides the fact that INPUTS, as returned by
+ ;; 'package-inputs' & co., is actually an alist with labels. Eventually,
+ ;; it will operate on list of inputs without labels.
+ ((_ inputs (delete name) clauses ...)
+ (modify-inputs (alist-delete name inputs)
+ clauses ...))
+ ((_ inputs (delete names ...) clauses ...)
+ (modify-inputs (fold alist-delete inputs (list names ...))
+ clauses ...))
+ ((_ inputs (prepend lst ...) clauses ...)
+ (modify-inputs (append (list lst ...) (inputs-sans-labels inputs))
+ clauses ...))
+ ((_ inputs (append lst ...) clauses ...)
+ (modify-inputs (append (inputs-sans-labels inputs) (list lst ...))
+ clauses ...))
+ ((_ inputs (replace name replacement) clauses ...)
+ (modify-inputs (replace-input name replacement inputs)
+ clauses ...))
+ ((_ inputs)
+ inputs)))
+
(define (package-direct-sources package)
"Return all source origins associated with PACKAGE; including origins in
PACKAGE's inputs."
@@ -1331,10 +1490,6 @@ matching package and returns a replacement for that package."
;;; Package derivations.
;;;
-(define %derivation-cache
- ;; Package to derivation-path mapping.
- (make-weak-key-hash-table 100))
-
(define (cache! cache package system thunk)
"Memoize in CACHE the return values of THUNK as the derivation of PACKAGE on
SYSTEM."
@@ -1362,56 +1517,51 @@ Return the cached result when available."
(#f (cache! cache package key thunk))
(value value)))
(#f
- (cache! cache package key thunk)))))
- ((_ package system body ...)
- (cached (=> %derivation-cache) package system body ...))))
-
-(define* (expand-input store package input system #:optional cross-system)
- "Expand INPUT, an input tuple, such that it contains only references to
-derivation paths or store paths. PACKAGE is only used to provide contextual
-information in exceptions."
- (define (intern file)
- ;; Add FILE to the store. Set the `recursive?' bit to #t, so that
- ;; file permissions are preserved.
- (add-to-store store (basename file) #t "sha256" file))
-
- (define derivation
- (if cross-system
- (cut package-cross-derivation store <> cross-system system
- #:graft? #f)
- (cut package-derivation store <> system #:graft? #f)))
+ (cache! cache package key thunk)))))))
- (match input
- (((? string? name) (? package? package))
- (list name (derivation package)))
- (((? string? name) (? package? package)
- (? string? sub-drv))
- (list name (derivation package)
- sub-drv))
- (((? string? name)
- (and (? string?) (? derivation-path?) drv))
- (list name drv))
- (((? string? name)
- (and (? string?) (? file-exists? file)))
- ;; Add FILE to the store. When FILE is in the sub-directory of a
- ;; store path, it needs to be added anyway, so it can be used as a
- ;; source.
- (list name (intern file)))
- (((? string? name) (? struct? source))
- ;; 'package-source-derivation' calls 'lower-object', which can throw
- ;; '&gexp-input-error'. However '&gexp-input-error' lacks source
- ;; location info, so we catch and rethrow here (XXX: not optimal
- ;; performance-wise).
- (guard (c ((gexp-input-error? c)
- (raise (condition
- (&package-input-error
- (package package)
- (input (gexp-error-invalid-input c)))))))
- (list name (package-source-derivation store source system))))
- (x
- (raise (condition (&package-input-error
- (package package)
- (input x)))))))
+(define* (expand-input package input system #:key target)
+ "Expand INPUT, an input tuple, to a name/<gexp-input> tuple. PACKAGE is
+only used to provide contextual information in exceptions."
+ (with-monad %store-monad
+ (match input
+ ;; INPUT doesn't need to be lowered here because it'll be lowered down
+ ;; the road in the gexp that refers to it. However, packages need to be
+ ;; special-cased to pass #:graft? #f (only the "tip" of the package
+ ;; graph needs to have #:graft? #t). Lowering them here also allows
+ ;; 'bag->derivation' to delete non-eq? packages that lead to the same
+ ;; derivation.
+ (((? string? name) (? package? package))
+ (mlet %store-monad ((drv (if target
+ (package->cross-derivation package
+ target system
+ #:graft? #f)
+ (package->derivation package system
+ #:graft? #f))))
+ (return (list name (gexp-input drv #:native? (not target))))))
+ (((? string? name) (? package? package) (? string? output))
+ (mlet %store-monad ((drv (if target
+ (package->cross-derivation package
+ target system
+ #:graft? #f)
+ (package->derivation package system
+ #:graft? #f))))
+ (return (list name (gexp-input drv output #:native? (not target))))))
+
+ (((? string? name) (? file-like? thing))
+ (return (list name (gexp-input thing #:native? (not target)))))
+ (((? string? name) (? file-like? thing) (? string? output))
+ (return (list name (gexp-input thing output #:native? (not target)))))
+ (((? string? name)
+ (and (? string?) (? file-exists? file)))
+ ;; Add FILE to the store. When FILE is in the sub-directory of a
+ ;; store path, it needs to be added anyway, so it can be used as a
+ ;; source.
+ (return (list name (gexp-input (local-file file #:recursive? #t)
+ #:native? (not target)))))
+ (x
+ (raise (condition (&package-input-error
+ (package package)
+ (input x))))))))
(define %bag-cache
;; 'eq?' cache mapping packages to system+target+graft?-dependent bags.
@@ -1459,45 +1609,51 @@ and return it."
(&package-error
(package package))))))))))))
-(define %graft-cache
- ;; 'eq?' cache mapping package objects to a graft corresponding to their
- ;; replacement package.
- (make-weak-key-hash-table 200))
+(define (input-graft system)
+ "Return a monadic procedure that, given a package with a graft, returns a
+graft, and #f otherwise."
+ (with-monad %store-monad
+ (match-lambda*
+ (((? package? package) output)
+ (let ((replacement (package-replacement package)))
+ (if replacement
+ ;; XXX: We should use a separate cache instead of abusing the
+ ;; object cache.
+ (mcached (mlet %store-monad ((orig (package->derivation package system
+ #:graft? #f))
+ (new (package->derivation replacement system
+ #:graft? #t)))
+ (return (graft
+ (origin orig)
+ (origin-output output)
+ (replacement new)
+ (replacement-output output))))
+ package 'graft output system)
+ (return #f))))
+ (_
+ (return #f)))))
-(define (input-graft store system)
- "Return a procedure that, given a package with a replacement and an output name,
-returns a graft, and #f otherwise."
- (match-lambda*
- (((? package? package) output)
- (let ((replacement (package-replacement package)))
- (and replacement
- (cached (=> %graft-cache) package (cons output system)
- (let ((orig (package-derivation store package system
- #:graft? #f))
- (new (package-derivation store replacement system
- #:graft? #t)))
- (graft
- (origin orig)
- (origin-output output)
- (replacement new)
- (replacement-output output)))))))))
-
-(define (input-cross-graft store target system)
+(define (input-cross-graft target system)
"Same as 'input-graft', but for cross-compilation inputs."
- (match-lambda*
- (((? package? package) output)
- (let ((replacement (package-replacement package)))
- (and replacement
- (let ((orig (package-cross-derivation store package target system
- #:graft? #f))
- (new (package-cross-derivation store replacement
- target system
- #:graft? #t)))
- (graft
- (origin orig)
- (origin-output output)
- (replacement new)
- (replacement-output output))))))))
+ (with-monad %store-monad
+ (match-lambda*
+ (((? package? package) output)
+ (let ((replacement (package-replacement package)))
+ (if replacement
+ (mlet %store-monad ((orig (package->cross-derivation package
+ target system
+ #:graft? #f))
+ (new (package->cross-derivation replacement
+ target system
+ #:graft? #t)))
+ (return (graft
+ (origin orig)
+ (origin-output output)
+ (replacement new)
+ (replacement-output output))))
+ (return #f))))
+ (_
+ (return #f)))))
(define* (fold-bag-dependencies proc seed bag
#:key (native? #t))
@@ -1532,7 +1688,7 @@ dependencies; otherwise, restrict to target dependencies."
((head . tail)
(loop tail result visited)))))
-(define* (bag-grafts store bag)
+(define* (bag-grafts bag)
"Return the list of grafts potentially applicable to BAG. Potentially
applicable grafts are collected by looking at direct or indirect dependencies
of BAG that have a 'replacement'. Whether a graft is actually applicable
@@ -1541,158 +1697,199 @@ to (see 'graft-derivation'.)"
(define system (bag-system bag))
(define target (bag-target bag))
- (define native-grafts
- (let ((->graft (input-graft store system)))
- (parameterize ((%current-system system)
- (%current-target-system #f))
- (fold-bag-dependencies (lambda (package output grafts)
- (match (->graft package output)
- (#f grafts)
- (graft (cons graft grafts))))
- '()
- bag))))
-
- (define target-grafts
- (if target
- (let ((->graft (input-cross-graft store target system)))
+ (mlet %store-monad
+ ((native-grafts
+ (let ((->graft (input-graft system)))
(parameterize ((%current-system system)
- (%current-target-system target))
+ (%current-target-system #f))
(fold-bag-dependencies (lambda (package output grafts)
- (match (->graft package output)
- (#f grafts)
- (graft (cons graft grafts))))
- '()
- bag
- #:native? #f)))
- '()))
-
- ;; We can end up with several identical grafts if we stumble upon packages
- ;; that are not 'eq?' but map to the same derivation (this can happen when
- ;; using things like 'package-with-explicit-inputs'.) Hence the
- ;; 'delete-duplicates' call.
- (delete-duplicates
- (append native-grafts target-grafts)))
-
-(define* (package-grafts store package
- #:optional (system (%current-system))
- #:key target)
+ (mlet %store-monad ((grafts grafts))
+ (>>= (->graft package output)
+ (match-lambda
+ (#f (return grafts))
+ (graft (return (cons graft grafts)))))))
+ (return '())
+ bag))))
+
+ (target-grafts
+ (if target
+ (let ((->graft (input-cross-graft target system)))
+ (parameterize ((%current-system system)
+ (%current-target-system target))
+ (fold-bag-dependencies
+ (lambda (package output grafts)
+ (mlet %store-monad ((grafts grafts))
+ (>>= (->graft package output)
+ (match-lambda
+ (#f (return grafts))
+ (graft (return (cons graft grafts)))))))
+ (return '())
+ bag
+ #:native? #f)))
+ (return '()))))
+
+ ;; We can end up with several identical grafts if we stumble upon packages
+ ;; that are not 'eq?' but map to the same derivation (this can happen when
+ ;; using things like 'package-with-explicit-inputs'.) Hence the
+ ;; 'delete-duplicates' call.
+ (return (delete-duplicates
+ (append native-grafts target-grafts)))))
+
+(define* (package-grafts* package
+ #:optional (system (%current-system))
+ #:key target)
"Return the list of grafts applicable to PACKAGE as built for SYSTEM and
TARGET."
(let* ((package (or (package-replacement package) package))
(bag (package->bag package system target)))
- (bag-grafts store bag)))
-
-(define* (bag->derivation store bag
- #:optional context)
+ (bag-grafts bag)))
+
+(define package-grafts
+ (store-lower package-grafts*))
+
+(define-inlinable (derivation=? drv1 drv2)
+ "Return true if DRV1 and DRV2 are equal."
+ (or (eq? drv1 drv2)
+ (string=? (derivation-file-name drv1)
+ (derivation-file-name drv2))))
+
+(define (input=? input1 input2)
+ "Return true if INPUT1 and INPUT2 are equivalent."
+ (match input1
+ ((label1 obj1 . outputs1)
+ (match input2
+ ((label2 obj2 . outputs2)
+ (and (string=? label1 label2)
+ (equal? outputs1 outputs2)
+ (or (and (derivation? obj1) (derivation? obj2)
+ (derivation=? obj1 obj2))
+ (equal? obj1 obj2))))))))
+
+(define* (bag->derivation bag #:optional context)
"Return the derivation to build BAG for SYSTEM. Optionally, CONTEXT can be
a package object describing the context in which the call occurs, for improved
error reporting."
(if (bag-target bag)
- (bag->cross-derivation store bag)
- (let* ((system (bag-system bag))
- (inputs (bag-transitive-inputs bag))
- (input-drvs (map (cut expand-input store context <> system)
- inputs))
- (paths (delete-duplicates
- (append-map (match-lambda
- ((_ (? package? p) _ ...)
- (package-native-search-paths
- p))
- (_ '()))
- inputs))))
-
- (apply (bag-build bag)
- store (bag-name bag) input-drvs
+ (bag->cross-derivation bag)
+ (mlet* %store-monad ((system -> (bag-system bag))
+ (inputs -> (bag-transitive-inputs bag))
+ (input-drvs (mapm %store-monad
+ (cut expand-input context <> system)
+ inputs))
+ (paths -> (delete-duplicates
+ (append-map (match-lambda
+ ((_ (? package? p) _ ...)
+ (package-native-search-paths
+ p))
+ (_ '()))
+ inputs))))
+ ;; It's possible that INPUTS contains packages that are not 'eq?' but
+ ;; that lead to the same derivation. Delete those duplicates to avoid
+ ;; issues down the road, such as duplicate entries in '%build-inputs'.
+ (apply (bag-build bag) (bag-name bag)
+ (delete-duplicates input-drvs input=?)
#:search-paths paths
#:outputs (bag-outputs bag) #:system system
(bag-arguments bag)))))
-(define* (bag->cross-derivation store bag
- #:optional context)
+(define* (bag->cross-derivation bag #:optional context)
"Return the derivation to build BAG, which is actually a cross build.
Optionally, CONTEXT can be a package object denoting the context of the call.
This is an internal procedure."
- (let* ((system (bag-system bag))
- (target (bag-target bag))
- (host (bag-transitive-host-inputs bag))
- (host-drvs (map (cut expand-input store context <> system target)
- host))
- (target* (bag-transitive-target-inputs bag))
- (target-drvs (map (cut expand-input store context <> system)
- target*))
- (build (bag-transitive-build-inputs bag))
- (build-drvs (map (cut expand-input store context <> system)
- build))
- (all (append build target* host))
- (paths (delete-duplicates
- (append-map (match-lambda
- ((_ (? package? p) _ ...)
- (package-search-paths p))
- (_ '()))
- all)))
- (npaths (delete-duplicates
- (append-map (match-lambda
- ((_ (? package? p) _ ...)
- (package-native-search-paths
- p))
- (_ '()))
- all))))
-
- (apply (bag-build bag)
- store (bag-name bag)
- #:native-drvs build-drvs
- #:target-drvs (append host-drvs target-drvs)
+ (mlet* %store-monad ((system -> (bag-system bag))
+ (target -> (bag-target bag))
+ (host -> (bag-transitive-host-inputs bag))
+ (host-drvs (mapm %store-monad
+ (cut expand-input context <>
+ system #:target target)
+ host))
+ (target* -> (bag-transitive-target-inputs bag))
+ (target-drvs (mapm %store-monad
+ (cut expand-input context <> system)
+ target*))
+ (build -> (bag-transitive-build-inputs bag))
+ (build-drvs (mapm %store-monad
+ (cut expand-input context <> system)
+ build))
+ (all -> (append build target* host))
+ (paths -> (delete-duplicates
+ (append-map (match-lambda
+ ((_ (? package? p) _ ...)
+ (package-search-paths p))
+ (_ '()))
+ all)))
+ (npaths -> (delete-duplicates
+ (append-map (match-lambda
+ ((_ (? package? p) _ ...)
+ (package-native-search-paths
+ p))
+ (_ '()))
+ all))))
+
+ (apply (bag-build bag) (bag-name bag)
+ #:build-inputs (delete-duplicates build-drvs input=?)
+ #:host-inputs (delete-duplicates host-drvs input=?)
+ #:target-inputs (delete-duplicates target-drvs input=?)
#:search-paths paths
#:native-search-paths npaths
#:outputs (bag-outputs bag)
#:system system #:target target
(bag-arguments bag))))
-(define* (package-derivation store package
- #:optional (system (%current-system))
- #:key (graft? (%graft?)))
+(define bag->derivation*
+ (store-lower bag->derivation))
+
+(define graft-derivation*
+ (store-lift graft-derivation))
+
+(define* (package->derivation package
+ #:optional (system (%current-system))
+ #:key (graft? (%graft?)))
"Return the <derivation> object of PACKAGE for SYSTEM."
;; Compute the derivation and cache the result. Caching is important
;; because some derivations, such as the implicit inputs of the GNU build
;; system, will be queried many, many times in a row.
- (cached package (cons system graft?)
- (let* ((bag (package->bag package system #f #:graft? graft?))
- (drv (bag->derivation store bag package)))
- (if graft?
- (match (bag-grafts store bag)
- (()
- drv)
- (grafts
- (let ((guile (package-derivation store (guile-for-grafts)
- system #:graft? #f)))
- ;; TODO: As an optimization, we can simply graft the tip
- ;; of the derivation graph since 'graft-derivation'
- ;; recurses anyway.
- (graft-derivation store drv grafts
- #:system system
- #:guile guile))))
- drv))))
-
-(define* (package-cross-derivation store package target
- #:optional (system (%current-system))
- #:key (graft? (%graft?)))
+ (mcached (mlet* %store-monad ((bag -> (package->bag package system #f
+ #:graft? graft?))
+ (drv (bag->derivation bag package)))
+ (if graft?
+ (>>= (bag-grafts bag)
+ (match-lambda
+ (()
+ (return drv))
+ (grafts
+ (mlet %store-monad ((guile (package->derivation
+ (guile-for-grafts)
+ system #:graft? #f)))
+ (graft-derivation* drv grafts
+ #:system system
+ #:guile guile)))))
+ (return drv)))
+ package system #f graft?))
+
+(define* (package->cross-derivation package target
+ #:optional (system (%current-system))
+ #:key (graft? (%graft?)))
"Cross-build PACKAGE for TARGET (a GNU triplet) from host SYSTEM (a Guix
system identifying string)."
- (cached package (list system target graft?)
- (let* ((bag (package->bag package system target #:graft? graft?))
- (drv (bag->derivation store bag package)))
- (if graft?
- (match (bag-grafts store bag)
- (()
- drv)
- (grafts
- (graft-derivation store drv grafts
- #:system system
- #:guile
- (package-derivation store (guile-for-grafts)
- system #:graft? #f))))
- drv))))
+ (mcached (mlet* %store-monad ((bag -> (package->bag package system target
+ #:graft? graft?))
+ (drv (bag->derivation bag package)))
+ (if graft?
+ (>>= (bag-grafts bag)
+ (match-lambda
+ (()
+ (return drv))
+ (grafts
+ (mlet %store-monad ((guile (package->derivation
+ (guile-for-grafts)
+ system #:graft? #f)))
+ (graft-derivation* drv grafts
+ #:system system
+ #:guile guile)))))
+ (return drv)))
+ package system target graft?))
(define* (package-output store package
#:optional (output "out") (system (%current-system)))
@@ -1740,11 +1937,11 @@ unless you know what you are doing."
out)
store))))
-(define package->derivation
- (store-lift package-derivation))
+(define package-derivation
+ (store-lower package->derivation))
-(define package->cross-derivation
- (store-lift package-cross-derivation))
+(define package-cross-derivation
+ (store-lower package->cross-derivation))
(define-gexp-compiler (package-compiler (package <package>) system target)
;; Compile PACKAGE to a derivation for SYSTEM, optionally cross-compiled for
@@ -1764,7 +1961,7 @@ unless you know what you are doing."
(content-hash-value hash)
name #:system system))
(($ <origin> uri method hash name (= force (patches ...)) snippet
- (flags ...) inputs (modules ...) guile-for-build)
+ flags inputs (modules ...) guile-for-build)
;; Patches and/or a snippet.
(mlet %store-monad ((source (method uri
(content-hash-algorithm hash)
diff --git a/guix/profiles.scm b/guix/profiles.scm
index ffdd5f57f6..1d354ecb78 100644
--- a/guix/profiles.scm
+++ b/guix/profiles.scm
@@ -7,7 +7,7 @@
;;; Copyright © 2016, 2018, 2019, 2021 Ricardo Wurmus <rekado@elephly.net>
;;; Copyright © 2016 Chris Marusich <cmmarusich@gmail.com>
;;; Copyright © 2017 Huang Ying <huang.ying.caritas@gmail.com>
-;;; Copyright © 2017 Maxim Cournoyer <maxim.cournoyer@gmail.com>
+;;; Copyright © 2017, 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;; Copyright © 2019 Kyle Meyer <kyle@kyleam.com>
;;; Copyright © 2019 Mathieu Othacehe <m.othacehe@gmail.com>
;;; Copyright © 2020 Danny Milosavljevic <dannym@scratchpost.org>
@@ -1180,6 +1180,52 @@ MANIFEST. Single-file bundles are required by programs such as Git and Lynx."
`((type . profile-hook)
(hook . emacs-subdirs))))
+(define (gdk-pixbuf-loaders-cache-file manifest)
+ "Return a derivation that produces a loaders cache file for every gdk-pixbuf
+loaders discovered in MANIFEST."
+ (define gdk-pixbuf ;lazy reference
+ (module-ref (resolve-interface '(gnu packages gtk)) 'gdk-pixbuf))
+
+ (mlet* %store-monad
+ ((gdk-pixbuf (manifest-lookup-package manifest "gdk-pixbuf"))
+ (librsvg (manifest-lookup-package manifest "librsvg"))
+ (gdk-pixbuf-bin -> (if (string? gdk-pixbuf)
+ (string-append gdk-pixbuf "/bin")
+ (file-append gdk-pixbuf "/bin"))))
+
+ (define build
+ (with-imported-modules (source-module-closure
+ '((guix build glib-or-gtk-build-system)))
+ #~(begin
+ (use-modules (guix build glib-or-gtk-build-system))
+ (setenv "PATH" (string-append #$gdk-pixbuf-bin ":" (getenv "PATH")))
+
+ (generate-gdk-pixbuf-loaders-cache
+ ;; XXX: MANIFEST-LOOKUP-PACKAGE transitively searches through
+ ;; every input referenced by the manifest, while MANIFEST-INPUTS
+ ;; only retrieves the immediate inputs as well as their
+ ;; propagated inputs; to avoid causing an empty output derivation
+ ;; we must ensure that the inputs contain at least one
+ ;; loaders.cache file. This is why we include gdk-pixbuf or
+ ;; librsvg when they are transitively found.
+ (list #$@(if gdk-pixbuf
+ (list gdk-pixbuf)
+ '())
+ #$@(if librsvg
+ (list librsvg)
+ '())
+ #$@(manifest-inputs manifest))
+ (list #$output)))))
+
+ (if gdk-pixbuf
+ (gexp->derivation "gdk-pixbuf-loaders-cache-file" build
+ #:local-build? #t
+ #:substitutable? #f
+ #:properties
+ '((type . profile-hook)
+ (hook . gdk-pixbuf-loaders-cache-file)))
+ (return #f))))
+
(define (glib-schemas manifest)
"Return a derivation that unions all schemas from manifest entries and
creates the Glib 'gschemas.compiled' file."
@@ -1799,10 +1845,10 @@ MANIFEST."
ghc-package-cache-file
ca-certificate-bundle
emacs-subdirs
+ gdk-pixbuf-loaders-cache-file
glib-schemas
gtk-icon-themes
gtk-im-modules
- texlive-configuration
xdg-desktop-database
xdg-mime-database))
diff --git a/guix/scripts/pack.scm b/guix/scripts/pack.scm
index 9e1f270dfb..38bc021665 100644
--- a/guix/scripts/pack.scm
+++ b/guix/scripts/pack.scm
@@ -5,6 +5,7 @@
;;; Copyright © 2018 Chris Marusich <cmmarusich@gmail.com>
;;; Copyright © 2018 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2020 Tobias Geerinckx-Rice <me@tobias.gr>
+;;; Copyright © 2020 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;; Copyright © 2020 Eric Bavier <bavier@posteo.net>
;;; Copyright © 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;;
@@ -27,6 +28,7 @@
#:use-module (guix scripts)
#:use-module (guix ui)
#:use-module (guix gexp)
+ #:use-module ((guix build utils) #:select (%xz-parallel-args))
#:use-module (guix utils)
#:use-module (guix store)
#:use-module ((guix status) #:select (with-status-verbosity))
@@ -79,29 +81,34 @@
compressor?
(name compressor-name) ;string (e.g., "gzip")
(extension compressor-extension) ;string (e.g., ".lz")
- (command compressor-command)) ;gexp (e.g., #~("/gnu/store/…/gzip" "-9n"))
+ (command compressor-command)) ;gexp (e.g., #~(list "/gnu/store/…/gzip"
+ ; "-9n" ))
(define %compressors
;; Available compression tools.
(list (compressor "gzip" ".gz"
- #~(#+(file-append gzip "/bin/gzip") "-9n"))
+ #~(list #+(file-append gzip "/bin/gzip") "-9n"))
(compressor "lzip" ".lz"
- #~(#+(file-append lzip "/bin/lzip") "-9"))
+ #~(list #+(file-append lzip "/bin/lzip") "-9"))
(compressor "xz" ".xz"
- #~(#+(file-append xz "/bin/xz") "-e"))
+ #~(append (list #+(file-append xz "/bin/xz")
+ "-e")
+ (%xz-parallel-args)))
(compressor "bzip2" ".bz2"
- #~(#+(file-append bzip2 "/bin/bzip2") "-9"))
+ #~(list #+(file-append bzip2 "/bin/bzip2") "-9"))
(compressor "zstd" ".zst"
;; The default level 3 compresses better than gzip in a
;; fraction of the time, while the highest level 19
;; (de)compresses more slowly and worse than xz.
- #~(#+(file-append zstd "/bin/zstd") "-3"))
+ #~(list #+(file-append zstd "/bin/zstd") "-3"))
(compressor "none" "" #f)))
;; This one is only for use in this module, so don't put it in %compressors.
(define bootstrap-xz
(compressor "bootstrap-xz" ".xz"
- #~(#+(file-append %bootstrap-coreutils&co "/bin/xz") "-e")))
+ #~(append (list #+(file-append %bootstrap-coreutils&co "/bin/xz")
+ "-e")
+ (%xz-parallel-args))))
(define (lookup-compressor name)
"Return the compressor object called NAME. Error out if it could not be
@@ -298,7 +305,7 @@ its source property."
(apply invoke tar "-cvf" #$output "."
(tar-base-options
#:tar tar
- #:compressor '#+(and=> compressor compressor-command)))))))
+ #:compressor #+(and=> compressor compressor-command)))))))
(define* (self-contained-tarball name profile
#:key target
@@ -574,11 +581,13 @@ the image."
,@(source-module-closure
`((guix docker)
(guix build store-copy)
+ (guix build utils) ;for %xz-parallel-args
(guix profiles)
(guix search-paths))
#:select? not-config?))
#~(begin
(use-modules (guix docker) (guix build store-copy)
+ (guix build utils)
(guix profiles) (guix search-paths)
(srfi srfi-1) (srfi srfi-19)
(ice-9 match))
@@ -625,7 +634,7 @@ the image."
#~(list (string-append #$profile "/"
#$entry-point)))
#:extra-files directives
- #:compressor '#+(compressor-command compressor)
+ #:compressor #+(compressor-command compressor)
#:creation-time (make-time time-utc 0 1))))))
(gexp->derivation (string-append name ".tar"
@@ -804,7 +813,7 @@ Section: misc
(apply invoke tar
`(,@(tar-base-options
#:tar tar
- #:compressor '#+(and=> compressor compressor-command))
+ #:compressor #+(and=> compressor compressor-command))
"-cvf" ,control-tarball-file-name
"control"
,@(if postinst-file '("postinst") '())
diff --git a/guix/scripts/style.scm b/guix/scripts/style.scm
new file mode 100644
index 0000000000..86a46f693c
--- /dev/null
+++ b/guix/scripts/style.scm
@@ -0,0 +1,548 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2021 Ludovic Courtès <ludo@gnu.org>
+;;;
+;;; This file is part of GNU Guix.
+;;;
+;;; GNU Guix is free software; you can redistribute it and/or modify it
+;;; under the terms of the GNU General Public License as published by
+;;; the Free Software Foundation; either version 3 of the License, or (at
+;;; your option) any later version.
+;;;
+;;; GNU Guix is distributed in the hope that it will be useful, but
+;;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;;; GNU General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
+
+;;; Commentary:
+;;;
+;;; This script updates package definitions so they use the "simplified" style
+;;; for input lists, as in:
+;;;
+;;; (package
+;;; ;; ...
+;;; (inputs (list foo bar baz)))
+;;;
+;;; Code:
+
+(define-module (guix scripts style)
+ #:autoload (gnu packages) (specification->package fold-packages)
+ #:use-module (guix scripts)
+ #:use-module ((guix scripts build) #:select (%standard-build-options))
+ #:use-module (guix combinators)
+ #:use-module (guix ui)
+ #:use-module (guix packages)
+ #:use-module (guix utils)
+ #:use-module (guix i18n)
+ #:use-module (guix diagnostics)
+ #:use-module (ice-9 control)
+ #:use-module (ice-9 match)
+ #:use-module (ice-9 rdelim)
+ #:use-module (srfi srfi-1)
+ #:use-module (srfi srfi-9)
+ #:use-module (srfi srfi-26)
+ #:use-module (srfi srfi-37)
+ #:export (guix-style))
+
+
+;;;
+;;; Comment-preserving reader.
+;;;
+
+;; A comment.
+(define-record-type <comment>
+ (comment str margin?)
+ comment?
+ (str comment->string)
+ (margin? comment-margin?))
+
+(define (read-with-comments port)
+ "Like 'read', but include <comment> objects when they're encountered."
+ ;; Note: Instead of implementing this functionality in 'read' proper, which
+ ;; is the best approach long-term, this code is a later on top of 'read',
+ ;; such that we don't have to rely on a specific Guile version.
+ (let loop ((blank-line? #t)
+ (return (const 'unbalanced)))
+ (match (read-char port)
+ ((? eof-object? eof)
+ eof) ;oops!
+ (chr
+ (cond ((eqv? chr #\newline)
+ (loop #t return))
+ ((char-set-contains? char-set:whitespace chr)
+ (loop blank-line? return))
+ ((memv chr '(#\( #\[))
+ (let/ec return
+ (let liip ((lst '()))
+ (liip (cons (loop (match lst
+ (((? comment?) . _) #t)
+ (_ #f))
+ (lambda ()
+ (return (reverse lst))))
+ lst)))))
+ ((memv chr '(#\) #\]))
+ (return))
+ ((eq? chr #\')
+ (list 'quote (loop #f return)))
+ ((eq? chr #\`)
+ (list 'quasiquote (loop #f return)))
+ ((eq? chr #\,)
+ (list (match (peek-char port)
+ (#\@
+ (read-char port)
+ 'unquote-splicing)
+ (_
+ 'unquote))
+ (loop #f return)))
+ ((eqv? chr #\;)
+ (unread-char chr port)
+ (comment (read-line port 'concat)
+ (not blank-line?)))
+ (else
+ (unread-char chr port)
+ (read port)))))))
+
+
+;;;
+;;; Comment-preserving pretty-printer.
+;;;
+
+(define* (pretty-print-with-comments port obj
+ #:key
+ (indent 0)
+ (max-width 78)
+ (long-list 5))
+ (let loop ((indent indent)
+ (column indent)
+ (delimited? #t) ;true if comes after a delimiter
+ (obj obj))
+ (match obj
+ ((? comment? comment)
+ (if (comment-margin? comment)
+ (begin
+ (display " " port)
+ (display (comment->string comment) port))
+ (begin
+ ;; When already at the beginning of a line, for example because
+ ;; COMMENT follows a margin comment, no need to emit a newline.
+ (unless (= column indent)
+ (newline port)
+ (display (make-string indent #\space) port))
+ (display (comment->string comment) port)))
+ (display (make-string indent #\space) port)
+ indent)
+ (('quote lst)
+ (unless delimited? (display " " port))
+ (display "'" port)
+ (loop indent (+ column (if delimited? 1 2)) #t lst))
+ (('quasiquote lst)
+ (unless delimited? (display " " port))
+ (display "`" port)
+ (loop indent (+ column (if delimited? 1 2)) #t lst))
+ (('unquote lst)
+ (unless delimited? (display " " port))
+ (display "," port)
+ (loop indent (+ column (if delimited? 1 2)) #t lst))
+ (('modify-inputs inputs clauses ...)
+ ;; Special-case 'modify-inputs' to have one clause per line and custom
+ ;; indentation.
+ (let ((head "(modify-inputs "))
+ (display head port)
+ (loop (+ indent 4)
+ (+ column (string-length head))
+ #t
+ inputs)
+ (let* ((indent (+ indent 2))
+ (column (fold (lambda (clause column)
+ (newline port)
+ (display (make-string indent #\space)
+ port)
+ (loop indent indent #t clause))
+ indent
+ clauses)))
+ (display ")" port)
+ (+ column 1))))
+ ((head tail ...)
+ (unless delimited? (display " " port))
+ (display "(" port)
+ (let* ((new-column (loop indent (+ 1 column) #t head))
+ (indent (+ indent (- new-column column)))
+ (long? (> (length tail) long-list)))
+ (define column
+ (fold2 (lambda (item column first?)
+ (define newline?
+ ;; Insert a newline if ITEM is itself a list, or if TAIL
+ ;; is long, but only if ITEM is not the first item.
+ (and (or (pair? item) long?)
+ (not first?) (not (comment? item))))
+
+ (when newline?
+ (newline port)
+ (display (make-string indent #\space) port))
+ (let ((column (if newline? indent column)))
+ (values (loop indent
+ column
+ (= column indent)
+ item)
+ (comment? item))))
+ (+ 1 new-column)
+ #t ;first
+ tail))
+ (display ")" port)
+ (+ column 1)))
+ (_
+ (let* ((str (object->string obj))
+ (len (string-length str)))
+ (if (> (+ column 1 len) max-width)
+ (begin
+ (newline port)
+ (display (make-string indent #\space) port)
+ (display str port)
+ (+ indent len))
+ (begin
+ (unless delimited? (display " " port))
+ (display str port)
+ (+ column (if delimited? 1 2) len))))))))
+
+(define (object->string* obj indent)
+ (call-with-output-string
+ (lambda (port)
+ (pretty-print-with-comments port obj
+ #:indent indent))))
+
+
+;;;
+;;; Simplifying input expressions.
+;;;
+
+(define (label-matches? label name)
+ "Return true if LABEL matches NAME, a package name."
+ (or (string=? label name)
+ (and (string-prefix? "python-" label)
+ (string-prefix? "python2-" name)
+ (string=? (string-drop label (string-length "python-"))
+ (string-drop name (string-length "python2-"))))))
+
+(define* (simplify-inputs location package str inputs
+ #:key (label-matches? label-matches?))
+ "Simplify the inputs field of PACKAGE (a string) at LOCATION; its current
+value is INPUTS the corresponding source code is STR. Return a string to
+replace STR."
+ (define (simplify-input-expression return)
+ (match-lambda
+ ((label ('unquote symbol)) symbol)
+ ((label ('unquote symbol) output)
+ (list 'quasiquote
+ (list (list 'unquote symbol) output)))
+ (_
+ ;; Expression doesn't look like a simple input.
+ (warning location (G_ "~a: complex expression, \
+bailing out~%")
+ package)
+ (return str))))
+
+ (define (simplify-input exp input return)
+ (define package* package)
+
+ (match input
+ ((or ((? string? label) (? package? package))
+ ((? string? label) (? package? package)
+ (? string?)))
+ ;; If LABEL doesn't match PACKAGE's name, then simplifying would incur
+ ;; a rebuild, and perhaps it would break build-side code relying on
+ ;; this specific label.
+ (if (label-matches? label (package-name package))
+ ((simplify-input-expression return) exp)
+ (begin
+ (warning location (G_ "~a: input label \
+'~a' does not match package name, bailing out~%")
+ package* label)
+ (return str))))
+ (_
+ (warning location (G_ "~a: non-trivial input, \
+bailing out~%")
+ package*)
+ (return str))))
+
+ (define (simplify-expressions exp inputs return)
+ ;; Simplify the expressions in EXP, which correspond to INPUTS, and return
+ ;; a list of expressions. Call RETURN with a string when bailing out.
+ (let loop ((result '())
+ (exp exp)
+ (inputs inputs))
+ (match exp
+ (((? comment? head) . rest)
+ (loop (cons head result) rest inputs))
+ ((head . rest)
+ (match inputs
+ ((input . inputs)
+ ;; HEAD (an sexp) and INPUT (an input tuple) are correlated.
+ (loop (cons (simplify-input head input return) result)
+ rest inputs))
+ (()
+ ;; If EXP and INPUTS have a different length, that
+ ;; means EXP is a non-trivial input list, for example
+ ;; with input-splicing, conditionals, etc.
+ (warning location (G_ "~a: input expression is too short~%")
+ package)
+ (return str))))
+ (()
+ ;; It's possible for EXP to contain fewer elements than INPUTS, for
+ ;; example in the case of input splicing. No bailout here. (XXX)
+ (reverse result)))))
+
+ (define inputs-exp
+ (call-with-input-string str read-with-comments))
+
+ (match inputs-exp
+ (('list _ ...) ;already done
+ str)
+ (('modify-inputs _ ...) ;already done
+ str)
+ (('quasiquote ;prepending inputs
+ (exp ...
+ ('unquote-splicing
+ ((and symbol (or 'package-inputs 'package-native-inputs
+ 'package-propagated-inputs))
+ arg))))
+ (let/ec return
+ (object->string*
+ (let ((things (simplify-expressions exp inputs return)))
+ `(modify-inputs (,symbol ,arg)
+ (prepend ,@things)))
+ (location-column location))))
+ (('quasiquote ;replacing an input
+ ((and exp ((? string? to-delete) ('unquote replacement)))
+ ('unquote-splicing
+ ('alist-delete (? string? to-delete)
+ ((and symbol
+ (or 'package-inputs 'package-native-inputs
+ 'package-propagated-inputs))
+ arg)))))
+ (let/ec return
+ (object->string*
+ (let ((things (simplify-expressions (list exp)
+ (list (car inputs))
+ return)))
+ `(modify-inputs (,symbol ,arg)
+ (replace ,to-delete ,replacement)))
+ (location-column location))))
+
+ (('quasiquote ;removing an input
+ (exp ...
+ ('unquote-splicing
+ ('alist-delete (? string? to-delete)
+ ((and symbol
+ (or 'package-inputs 'package-native-inputs
+ 'package-propagated-inputs))
+ arg)))))
+ (let/ec return
+ (object->string*
+ (let ((things (simplify-expressions exp inputs return)))
+ `(modify-inputs (,symbol ,arg)
+ (delete ,to-delete)
+ (prepend ,@things)))
+ (location-column location))))
+ (('fold 'alist-delete ;removing several inputs
+ ((and symbol
+ (or 'package-inputs 'package-native-inputs
+ 'package-propagated-inputs))
+ arg)
+ ('quote ((? string? to-delete) ...)))
+ (object->string*
+ `(modify-inputs (,symbol ,arg)
+ (delete ,@to-delete))
+ (location-column location)))
+ (('quasiquote ;removing several inputs and adding others
+ (exp ...
+ ('unquote-splicing
+ ('fold 'alist-delete
+ ((and symbol
+ (or 'package-inputs 'package-native-inputs
+ 'package-propagated-inputs))
+ arg)
+ ('quote ((? string? to-delete) ...))))))
+ (let/ec return
+ (object->string*
+ (let ((things (simplify-expressions exp inputs return)))
+ `(modify-inputs (,symbol ,arg)
+ (delete ,@to-delete)
+ (prepend ,@things)))
+ (location-column location))))
+ (('quasiquote (exp ...))
+ (let/ec return
+ (object->string*
+ `(list ,@(simplify-expressions exp inputs return))
+ (location-column location))))
+ (_
+ (warning location (G_ "~a: unsupported input style, \
+bailing out~%")
+ package)
+ str)))
+
+(define (edit-expression/dry-run properties rewrite-string)
+ "Like 'edit-expression' but display what would be edited without actually
+doing it."
+ (edit-expression properties
+ (lambda (str)
+ (unless (string=? (rewrite-string str) str)
+ (info (source-properties->location properties)
+ (G_ "would be edited~%")))
+ str)))
+
+(define* (simplify-package-inputs package
+ #:key (policy 'silent)
+ (edit-expression edit-expression))
+ "Edit the source code of PACKAGE to simplify its inputs field if needed.
+POLICY is a symbol that defines whether to simplify inputs; it can one of
+'silent (change only if the resulting derivation is the same), 'safe (change
+only if semantics are known to be unaffected), and 'always (fearlessly
+simplify inputs!). Call EDIT-EXPRESSION to actually edit the source of
+PACKAGE."
+ (for-each (lambda (field-name field)
+ (match (field package)
+ (()
+ #f)
+ (inputs
+ (match (package-field-location package field-name)
+ (#f
+ ;; If the location of FIELD-NAME is not found, it may be
+ ;; that PACKAGE inherits from another package.
+ #f)
+ (location
+ (edit-expression
+ (location->source-properties location)
+ (lambda (str)
+ (define matches?
+ (match policy
+ ('silent
+ ;; Simplify inputs only when the label matches
+ ;; perfectly, such that the resulting derivation
+ ;; is unchanged.
+ label-matches?)
+ ('safe
+ ;; If PACKAGE has no arguments, labels are known
+ ;; to have no effect: this is a "safe" change, but
+ ;; it may change the derivation.
+ (if (null? (package-arguments package))
+ (const #t)
+ label-matches?))
+ ('always
+ ;; Assume it's gonna be alright.
+ (const #t))))
+
+ (simplify-inputs location
+ (package-name package)
+ str inputs
+ #:label-matches? matches?))))))))
+ '(inputs native-inputs propagated-inputs)
+ (list package-inputs package-native-inputs
+ package-propagated-inputs)))
+
+(define (package-location<? p1 p2)
+ "Return true if P1's location is \"before\" P2's."
+ (let ((loc1 (package-location p1))
+ (loc2 (package-location p2)))
+ (and loc1 loc2
+ (if (string=? (location-file loc1) (location-file loc2))
+ (< (location-line loc1) (location-line loc2))
+ (string<? (location-file loc1) (location-file loc2))))))
+
+
+;;;
+;;; Options.
+;;;
+
+(define %options
+ ;; Specification of the command-line options.
+ (list (find (lambda (option)
+ (member "load-path" (option-names option)))
+ %standard-build-options)
+
+ (option '(#\n "dry-run") #f #f
+ (lambda (opt name arg result)
+ (alist-cons 'dry-run? #t result)))
+ (option '(#\e "expression") #t #f
+ (lambda (opt name arg result)
+ (alist-cons 'expression arg result)))
+ (option '("input-simplification") #t #f
+ (lambda (opt name arg result)
+ (let ((symbol (string->symbol arg)))
+ (unless (memq symbol '(silent safe always))
+ (leave (G_ "~a: invalid input simplification policy~%")
+ arg))
+ (alist-cons 'input-simplification-policy symbol
+ result))))
+
+ (option '(#\h "help") #f #f
+ (lambda args
+ (show-help)
+ (exit 0)))
+ (option '(#\V "version") #f #f
+ (lambda args
+ (show-version-and-exit "guix style")))))
+
+(define (show-help)
+ (display (G_ "Usage: guix style [OPTION]... [PACKAGE]...
+Update package definitions to the latest style.\n"))
+ (display (G_ "
+ -n, --dry-run display files that would be edited but do nothing"))
+ (display (G_ "
+ -L, --load-path=DIR prepend DIR to the package module search path"))
+ (display (G_ "
+ -e, --expression=EXPR consider the package EXPR evaluates to"))
+ (display (G_ "
+ --input-simplification=POLICY
+ follow POLICY for package input simplification, one
+ of 'silent', 'safe', or 'always'"))
+ (newline)
+ (display (G_ "
+ -h, --help display this help and exit"))
+ (display (G_ "
+ -V, --version display version information and exit"))
+ (newline)
+ (show-bug-report-information))
+
+(define %default-options
+ ;; Alist of default option values.
+ '((input-simplification-policy . silent)))
+
+
+;;;
+;;; Entry point.
+;;;
+
+(define-command (guix-style . args)
+ (category packaging)
+ (synopsis "update the style of package definitions")
+
+ (define (parse-options)
+ ;; Return the alist of option values.
+ (parse-command-line args %options (list %default-options)
+ #:build-options? #f))
+
+ (let* ((opts (parse-options))
+ (packages (filter-map (match-lambda
+ (('argument . spec)
+ (specification->package spec))
+ (('expression . str)
+ (read/eval str))
+ (_ #f))
+ opts))
+ (edit (if (assoc-ref opts 'dry-run?)
+ edit-expression/dry-run
+ edit-expression))
+ (policy (assoc-ref opts 'input-simplification-policy)))
+ (for-each (lambda (package)
+ (simplify-package-inputs package #:policy policy
+ #:edit-expression edit))
+ ;; Sort package by source code location so that we start editing
+ ;; files from the bottom and going upward. That way, the
+ ;; 'location' field of <package> records is not invalidated as
+ ;; we modify files.
+ (sort (if (null? packages)
+ (fold-packages cons '() #:select? (const #t))
+ packages)
+ (negate package-location<?)))))
diff --git a/guix/status.scm b/guix/status.scm
index f351a56d92..eefe18365f 100644
--- a/guix/status.scm
+++ b/guix/status.scm
@@ -381,6 +381,8 @@ the current build phase."
(G_ "building CA certificate bundle..."))
('emacs-subdirs
(G_ "listing Emacs sub-directories..."))
+ ('gdk-pixbuf-loaders-cache-file
+ (G_ "generating GdkPixbuf loaders cache..."))
('glib-schemas
(G_ "generating GLib schema cache..."))
('gtk-icon-themes
diff --git a/guix/store.scm b/guix/store.scm
index 7388953d15..a93e9596d9 100644
--- a/guix/store.scm
+++ b/guix/store.scm
@@ -1353,7 +1353,11 @@ on the build output of a previous derivation."
"Return a build handler that accumulates THINGS and returns an <unresolved>
object, only for build requests on EXPECTED-STORE."
(lambda (continue store things mode)
- (if (and (eq? store expected-store)
+ ;; Note: Do not compare STORE and EXPECTED-STORE with 'eq?' because
+ ;; 'cache-object-mapping' and similar functional "setters" change the
+ ;; store's object identity.
+ (if (and (eq? (store-connection-socket store)
+ (store-connection-socket expected-store))
(= mode (build-mode normal)))
(unresolved things continue)
(continue #t))))
diff --git a/guix/store/roots.scm b/guix/store/roots.scm
index 58653507f8..222f69c5c0 100644
--- a/guix/store/roots.scm
+++ b/guix/store/roots.scm
@@ -50,7 +50,7 @@
(define (gc-roots)
"Return the list of garbage collector roots (\"GC roots\"). This includes
-\"regular\" roots fount in %GC-ROOTS-DIRECTORY as well as indirect roots that
+\"regular\" roots found in %GC-ROOTS-DIRECTORY as well as indirect roots that
are user-controlled symlinks stored anywhere on the file system."
(define (regular? file)
(match file
diff --git a/guix/svn-download.scm b/guix/svn-download.scm
index e5fe8f1840..55ce0d7351 100644
--- a/guix/svn-download.scm
+++ b/guix/svn-download.scm
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2014, 2015, 2016, 2019 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2014, 2015, 2016, 2019, 2021 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2014 Sree Harsha Totakura <sreeharsha@totakura.in>
;;; Copyright © 2017, 2019, 2021 Ricardo Wurmus <rekado@elephly.net>
;;;
@@ -137,7 +137,7 @@ HASH-ALGO (a symbol). Use NAME as the file name, or a generic name if #f."
#$(svn-multi-reference-recursive? ref)
#:user-name #$(svn-multi-reference-user-name ref)
#:password #$(svn-multi-reference-password ref)))
- '#$(svn-multi-reference-locations ref)))))
+ '#$(sexp->gexp (svn-multi-reference-locations ref))))))
(mlet %store-monad ((guile (package->derivation guile system)))
(gexp->derivation (or name "svn-checkout") build
diff --git a/guix/tests.scm b/guix/tests.scm
index e1c194340c..4cd1ad6cf9 100644
--- a/guix/tests.scm
+++ b/guix/tests.scm
@@ -20,12 +20,13 @@
#:use-module ((guix config) #:select (%storedir %localstatedir))
#:use-module (guix store)
#:use-module (guix derivations)
+ #:use-module (guix gexp)
#:use-module (guix packages)
#:use-module (guix base32)
#:use-module (guix serialization)
#:use-module (guix monads)
#:use-module ((guix utils) #:select (substitute-keyword-arguments))
- #:use-module ((guix build utils) #:select (mkdir-p))
+ #:use-module ((guix build utils) #:select (mkdir-p compressor))
#:use-module ((gcrypt hash) #:hide (sha256))
#:use-module (guix build-system gnu)
#:use-module (gnu packages base)
@@ -60,7 +61,9 @@
dummy-package
dummy-origin
- gnu-make-for-tests))
+ gnu-make-for-tests
+
+ test-file))
;;; Commentary:
;;;
@@ -135,17 +138,21 @@ no external store to talk to."
(open-connection))
(const #f)))
- (dynamic-wind
- (const #t)
- (lambda ()
- ;; Since we're using a different store we must clear the
- ;; package-derivation cache.
- (hash-clear! (@@ (guix packages) %derivation-cache))
-
- (proc store))
- (lambda ()
- (when store
- (close-connection store))))))
+ (let ((store-variable (getenv "NIX_STORE_DIR")))
+ (dynamic-wind
+ (lambda ()
+ ;; This environment variable is set by 'pre-inst-env' but it
+ ;; influences '%store-directory' in (guix build utils), which is
+ ;; itself used in (guix packages). Thus, unset it before going any
+ ;; further.
+ (unsetenv "NIX_STORE_DIR"))
+ (lambda ()
+ (proc store))
+ (lambda ()
+ (when store-variable
+ (setenv "NIX_STORE_DIR" store-variable))
+ (when store
+ (close-connection store)))))))
(define-syntax-rule (with-external-store store exp ...)
"Evaluate EXP with STORE bound to the external store rather than the
@@ -439,6 +446,42 @@ default values, and with EXTRA-FIELDS set as specified."
(native-inputs '()) ;no need for 'pkg-config'
(inputs %bootstrap-inputs-for-tests))))
+
+;;;
+;;; Test utility procedures.
+
+(define (test-file store name content)
+ "Create a simple file in STORE with CONTENT (a string), compressed according
+to its file name extension. Return both its file name and its hash."
+ (let* ((ext (string-index-right name #\.))
+ (name-sans-ext (if ext
+ (string-take name (string-index-right name #\.))
+ name))
+ (comp (compressor name))
+ (command #~(if #+comp
+ (string-append #+%bootstrap-coreutils&co
+ "/bin/" #+comp)
+ #f))
+ (f (with-imported-modules '((guix build utils))
+ (computed-file name
+ #~(begin
+ (use-modules (guix build utils)
+ (rnrs io simple))
+ (with-output-to-file #+name-sans-ext
+ (lambda _
+ (format #t #+content)))
+ (when #+command
+ (invoke #+command #+name-sans-ext))
+ (copy-file #+name #$output)))))
+ (file-drv (run-with-store store (lower-object f)))
+ (file (derivation->output-path file-drv))
+ (file-drv-outputs (derivation-outputs file-drv))
+ (_ (build-derivations store (list file-drv)))
+ (file-hash (derivation-output-hash
+ (assoc-ref file-drv-outputs "out"))))
+ (values file file-hash)))
+
+;;;
;; Local Variables:
;; eval: (put 'call-with-derivation-narinfo 'scheme-indent-function 1)
;; eval: (put 'call-with-derivation-substitute 'scheme-indent-function 2)
diff --git a/guix/utils.scm b/guix/utils.scm
index 7a00640d85..9596ff8582 100644
--- a/guix/utils.scm
+++ b/guix/utils.scm
@@ -7,9 +7,11 @@
;;; Copyright © 2015 David Thompson <davet@gnu.org>
;;; Copyright © 2017 Mathieu Othacehe <m.othacehe@gmail.com>
;;; Copyright © 2018, 2020 Marius Bakke <marius@gnu.org>
-;;; Copyright © 2020 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2020, 2021 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2020 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;; Copyright © 2021 Simon Tournier <zimon.toutoune@gmail.com>
;;; Copyright © 2021 Chris Marusich <cmmarusich@gmail.com>
+;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be>
;;; Copyright © 2018 Steve Sprang <scs@stevesprang.com>
;;; Copyright © 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;;
@@ -35,11 +37,14 @@
#:use-module (srfi srfi-11)
#:use-module (srfi srfi-26)
#:use-module (srfi srfi-39)
+ #:use-module (srfi srfi-71)
#:use-module (ice-9 ftw)
#:use-module (rnrs io ports) ;need 'port-position' etc.
#:use-module ((rnrs bytevectors) #:select (bytevector-u8-set!))
#:use-module (guix memoization)
- #:use-module ((guix build utils) #:select (dump-port mkdir-p delete-file-recursively))
+ #:use-module ((guix build utils)
+ #:select (dump-port mkdir-p delete-file-recursively
+ call-with-temporary-output-file %xz-parallel-args))
#:use-module ((guix build syscalls) #:select (mkdtemp! fdatasync))
#:use-module ((guix combinators) #:select (fold2))
#:use-module (guix diagnostics) ;<location>, &error-location, etc.
@@ -48,6 +53,7 @@
#:use-module (ice-9 match)
#:use-module (ice-9 format)
#:use-module ((ice-9 iconv) #:prefix iconv:)
+ #:use-module (ice-9 vlist)
#:autoload (zlib) (make-zlib-input-port make-zlib-output-port)
#:use-module (system foreign)
#:re-export (<location> ;for backwards compatibility
@@ -65,7 +71,9 @@
&fix-hint
fix-hint?
- condition-fix-hint)
+ condition-fix-hint
+
+ call-with-temporary-output-file)
#:export (strip-keyword-arguments
default-keyword-arguments
substitute-keyword-arguments
@@ -78,13 +86,18 @@
%current-system
%current-target-system
package-name->name+version
+ target-linux?
+ target-hurd?
target-mingw?
target-x86-32?
target-x86-64?
target-arm32?
target-aarch64?
target-arm?
+ target-ppc32?
+ target-ppc64le?
target-powerpc?
+ target-riscv64?
target-64bit?
cc-for-target
cxx-for-target
@@ -106,7 +119,6 @@
tarball-sans-extension
compressed-file?
switch-symlinks
- call-with-temporary-output-file
call-with-temporary-directory
with-atomic-file-output
@@ -117,6 +129,7 @@
cache-directory
readlink*
+ go-to-location
edit-expression
filtered-port
@@ -248,6 +261,18 @@ a symbol such as 'xz."
'()))
(_ (error "unsupported compression scheme" compression))))
+(define (compressed-port compression input)
+ "Return an input port where INPUT is compressed according to COMPRESSION,
+a symbol such as 'xz."
+ (match compression
+ ((or #f 'none) (values input '()))
+ ('bzip2 (filtered-port `(,%bzip2 "-c") input))
+ ('xz (filtered-port `(,%xz "-c" ,@(%xz-parallel-args)) input))
+ ('gzip (filtered-port `(,%gzip "-c") input))
+ ('lzip (values (lzip-port 'make-lzip-input-port/compressed input)
+ '()))
+ (_ (error "unsupported compression scheme" compression))))
+
(define (call-with-decompressed-port compression port proc)
"Call PROC with a wrapper around PORT, a file port, that decompresses data
read from PORT according to COMPRESSION, a symbol such as 'xz."
@@ -327,43 +352,129 @@ a list of command-line arguments passed to the compression program."
(unless (every (compose zero? cdr waitpid) pids)
(error "compressed-output-port failure" pids))))))
+(define %source-location-map
+ ;; Maps inode/device tuples to "source location maps" used by
+ ;; 'go-to-location'.
+ (make-hash-table))
+
+(define (source-location-key/stamp stat)
+ "Return two values: the key for STAT in %SOURCE-LOCATION-MAP, and a stamp
+used to invalidate corresponding entries."
+ (let ((key (list (stat:ino stat) (stat:dev stat)))
+ (stamp (list (stat:mtime stat) (stat:mtimensec stat)
+ (stat:size stat))))
+ (values key stamp)))
+
+(define* (go-to-location port line column)
+ "Jump to LINE and COLUMN (both one-indexed) in PORT. Maintain a source
+location map such that this can boil down to seek(2) and a few read(2) calls,
+which can drastically speed up repetitive operations on large files."
+ (let* ((stat (stat port))
+ (key stamp (source-location-key/stamp stat))
+
+ ;; Look for an up-to-date source map for KEY. The map is a vlist
+ ;; where each entry gives the byte offset of the beginning of a line:
+ ;; element 0 is the offset of the first line, element 1 the offset of
+ ;; the second line, etc. The map is filled lazily.
+ (source-map (match (hash-ref %source-location-map key)
+ (#f
+ (vlist-cons 0 vlist-null))
+ ((cache-stamp ... map)
+ (if (equal? cache-stamp stamp) ;invalidate?
+ map
+ (vlist-cons 0 vlist-null)))))
+ (last (vlist-length source-map)))
+ ;; Jump to LINE, ideally via SOURCE-MAP.
+ (if (<= line last)
+ (seek port (vlist-ref source-map (- line 1)) SEEK_SET)
+ (let ((target line)
+ (offset (vlist-ref source-map (- last 1))))
+ (seek port offset SEEK_SET)
+ (let loop ((source-map (vlist-reverse source-map))
+ (line last))
+ (if (< line target)
+ (match (read-char port)
+ (#\newline
+ (loop (vlist-cons (ftell port) source-map)
+ (+ 1 line)))
+ ((? eof-object?)
+ (error "unexpected end of file" port line))
+ (chr (loop source-map line)))
+ (hash-set! %source-location-map key
+ `(,@stamp
+ ,(vlist-reverse source-map)))))))
+
+ ;; Read up to COLUMN.
+ (let ((target column))
+ (let loop ((column 1))
+ (when (< column target)
+ (match (read-char port)
+ (#\newline (error "unexpected end of line" port))
+ (#\tab (loop (+ 8 column)))
+ (chr (loop (+ 1 column)))))))
+
+ ;; Update PORT's position info.
+ (set-port-line! port (- line 1))
+ (set-port-column! port (- column 1))))
+
+(define (move-source-location-map! source target line)
+ "Move the source location map from SOURCE up to LINE to TARGET. SOURCE and
+TARGET must be stat buffers as returned by 'stat'."
+ (let* ((source-key (source-location-key/stamp source))
+ (target-key target-stamp (source-location-key/stamp target)))
+ (match (hash-ref %source-location-map source-key)
+ (#f #t)
+ ((_ ... source-map)
+ ;; Strip the source map and update the associated stamp.
+ (let ((source-map (vlist-take source-map (max line 1))))
+ (hash-remove! %source-location-map source-key)
+ (hash-set! %source-location-map target-key
+ `(,@target-stamp ,source-map)))))))
+
(define* (edit-expression source-properties proc #:key (encoding "UTF-8"))
"Edit the expression specified by SOURCE-PROPERTIES using PROC, which should
be a procedure that takes the original expression in string and returns a new
one. ENCODING will be used to interpret all port I/O, it default to UTF-8.
This procedure returns #t on success."
+ (define file (assq-ref source-properties 'filename))
+ (define line (assq-ref source-properties 'line))
+ (define column (assq-ref source-properties 'column))
+
(with-fluids ((%default-port-encoding encoding))
- (let* ((file (assq-ref source-properties 'filename))
- (line (assq-ref source-properties 'line))
- (column (assq-ref source-properties 'column))
- (in (open-input-file file))
- ;; The start byte position of the expression.
- (start (begin (while (not (and (= line (port-line in))
- (= column (port-column in))))
- (when (eof-object? (read-char in))
- (error (format #f "~a: end of file~%" in))))
- (ftell in)))
- ;; The end byte position of the expression.
- (end (begin (read in) (ftell in))))
- (seek in 0 SEEK_SET) ; read from the beginning of the file.
- (let* ((pre-bv (get-bytevector-n in start))
- ;; The expression in string form.
- (str (iconv:bytevector->string
- (get-bytevector-n in (- end start))
- (port-encoding in)))
- (post-bv (get-bytevector-all in))
- (str* (proc str)))
- ;; Verify the edited expression is still a scheme expression.
- (call-with-input-string str* read)
- ;; Update the file with edited expression.
- (with-atomic-file-output file
- (lambda (out)
- (put-bytevector out pre-bv)
- (display str* out)
- ;; post-bv maybe the end-of-file object.
- (when (not (eof-object? post-bv))
- (put-bytevector out post-bv))
- #t))))))
+ (call-with-input-file file
+ (lambda (in)
+ (let* ( ;; The start byte position of the expression.
+ (start (begin (go-to-location in (+ 1 line) (+ 1 column))
+ (ftell in)))
+ ;; The end byte position of the expression.
+ (end (begin (read in) (ftell in))))
+ (seek in 0 SEEK_SET) ; read from the beginning of the file.
+ (let* ((pre-bv (get-bytevector-n in start))
+ ;; The expression in string form.
+ (str (iconv:bytevector->string
+ (get-bytevector-n in (- end start))
+ (port-encoding in)))
+ (post-bv (get-bytevector-all in))
+ (str* (proc str)))
+ ;; Modify FILE only if there are changes.
+ (unless (string=? str* str)
+ ;; Verify the edited expression is still a scheme expression.
+ (call-with-input-string str* read)
+ ;; Update the file with edited expression.
+ (with-atomic-file-output file
+ (lambda (out)
+ (put-bytevector out pre-bv)
+ (display str* out)
+ ;; post-bv maybe the end-of-file object.
+ (when (not (eof-object? post-bv))
+ (put-bytevector out post-bv))
+ #t))
+
+ ;; Due to 'with-atomic-file-output', IN and FILE no longer share
+ ;; the same inode, but we can reassign the source map up to LINE
+ ;; to the new file.
+ (move-source-location-map! (stat in) (stat file)
+ (+ 1 line)))))))))
;;;
@@ -533,8 +644,23 @@ a character other than '@'."
(idx (values (substring spec 0 idx)
(substring spec (1+ idx))))))
+(define* (target-linux? #:optional (target (or (%current-target-system)
+ (%current-system))))
+ "Does the operating system of TARGET use the Linux kernel?"
+ (->bool (string-contains target "linux")))
+
+(define* (target-hurd? #:optional (target (or (%current-target-system)
+ (%current-system))))
+ "Does TARGET represent the GNU(/Hurd) system?"
+ (and (string-suffix? "-gnu" target)
+ (not (string-contains target "linux"))))
+
(define* (target-mingw? #:optional (target (%current-target-system)))
+ "Is the operating system of TARGET Windows?"
(and target
+ ;; The "-32" doesn't mean TARGET is 32-bit, as "x86_64-w64-mingw32"
+ ;; is a valid triplet (see the (gnu ci) module) and 'w64' and 'x86_64'
+ ;; are 64-bit.
(string-suffix? "-mingw32" target)))
(define* (target-x86-32? #:optional (target (or (%current-target-system)
@@ -567,10 +693,23 @@ architecture (x86_64)?"
(%current-system))))
(or (target-arm32? target) (target-aarch64? target)))
+(define* (target-ppc32? #:optional (target (or (%current-target-system)
+ (%current-system))))
+ (string-prefix? "powerpc-" target))
+
+(define* (target-ppc64le? #:optional (target (or (%current-target-system)
+ (%current-system))))
+ (string-prefix? "powerpc64le-" target))
+
(define* (target-powerpc? #:optional (target (or (%current-target-system)
(%current-system))))
(string-prefix? "powerpc" target))
+(define* (target-riscv64? #:optional (target (or (%current-target-system)
+ (%current-system))))
+ "Is the architecture of TARGET a 'riscv64' machine?"
+ (string-prefix? "riscv64" target))
+
(define* (target-64bit? #:optional (system (or (%current-target-system)
(%current-system))))
(any (cut string-prefix? <> system) '("x86_64" "aarch64" "mips64" "powerpc64")))
@@ -758,22 +897,6 @@ REPLACEMENT."
(substring str start index)
pieces))))))))
-(define (call-with-temporary-output-file proc)
- "Call PROC with a name of a temporary file and open output port to that
-file; close the file and delete it when leaving the dynamic extent of this
-call."
- (let* ((directory (or (getenv "TMPDIR") "/tmp"))
- (template (string-append directory "/guix-file.XXXXXX"))
- (out (mkstemp! template)))
- (dynamic-wind
- (lambda ()
- #t)
- (lambda ()
- (proc template out))
- (lambda ()
- (false-if-exception (close out))
- (false-if-exception (delete-file template))))))
-
(define (call-with-temporary-directory proc)
"Call PROC with a name of a temporary directory; close the directory and
delete it when leaving the dynamic extent of this call."
diff --git a/m4/guix.m4 b/m4/guix.m4
index 05d409a674..e778a56004 100644
--- a/m4/guix.m4
+++ b/m4/guix.m4
@@ -1,7 +1,7 @@
dnl GNU Guix --- Functional package management for GNU
dnl Copyright © 2012, 2013, 2014, 2015, 2016, 2018, 2019, 2020, 2021 Ludovic Courtès <ludo@gnu.org>
dnl Copyright © 2014 Mark H Weaver <mhw@netris.org>
-dnl Copyright © 2017 Efraim Flashner <efraim@flashner.co.il>
+dnl Copyright © 2017, 2020 Efraim Flashner <efraim@flashner.co.il>
dnl Copyright © 2021 Chris Marusich <cmmarusich@gmail.com>
dnl
dnl This file is part of GNU Guix.
@@ -89,7 +89,7 @@ courageous and port the GNU System distribution to it (see
# Currently only Linux-based systems are supported, and only on some
# platforms.
case "$guix_system" in
- x86_64-linux|i686-linux|armhf-linux|aarch64-linux|powerpc64le-linux)
+ x86_64-linux|i686-linux|armhf-linux|aarch64-linux|powerpc64le-linux|powerpc-linux)
;;
*)
if test "x$guix_courageous" = "xyes"; then
diff --git a/po/guix/POTFILES.in b/po/guix/POTFILES.in
index ee0adbcf3c..a8ce6c3e8f 100644
--- a/po/guix/POTFILES.in
+++ b/po/guix/POTFILES.in
@@ -141,5 +141,6 @@ guix/scripts/perform-download.scm
guix/scripts/refresh.scm
guix/scripts/repl.scm
guix/scripts/shell.scm
+guix/scripts/style.scm
guix/scripts/system/reconfigure.scm
nix/nix-daemon/guix-daemon.cc
diff --git a/tests/build-utils.scm b/tests/build-utils.scm
index 654b480ed9..6b131c0af8 100644
--- a/tests/build-utils.scm
+++ b/tests/build-utils.scm
@@ -1,6 +1,8 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2012, 2015, 2016, 2019, 2020 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2019 Ricardo Wurmus <rekado@elephly.net>
+;;; Copyright © 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
+;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -18,7 +20,7 @@
;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
-(define-module (test-build-utils)
+(define-module (test build-utils)
#:use-module (guix tests)
#:use-module (guix build utils)
#:use-module ((guix utils)
@@ -241,4 +243,49 @@ print('hello world')"))
"/some/other/path")))
#f)))))
+(test-equal "substitute*, text contains a NUL byte, UTF-8"
+ "c\0d"
+ (with-fluids ((%default-port-encoding "UTF-8")
+ (%default-port-conversion-strategy 'error))
+ ;; The GNU libc is locale sensitive. Depending on the value of LANG, the
+ ;; test could fail with "string contains #\\nul character: ~S" or "cannot
+ ;; convert wide string to output locale".
+ (setlocale LC_ALL "en_US.UTF-8")
+ (call-with-temporary-output-file
+ (lambda (file port)
+ (format port "a\0b")
+ (flush-output-port port)
+
+ (substitute* file
+ (("a") "c")
+ (("b") "d"))
+
+ (with-input-from-file file
+ (lambda _
+ (get-string-all (current-input-port))))))))
+
+(test-equal "search-input-file: exception if not found"
+ `((path)
+ (file . "does-not-exist"))
+ (guard (e ((search-error? e)
+ `((path . ,(search-error-path e))
+ (file . ,(search-error-file e)))))
+ (search-input-file '() "does-not-exist")))
+
+(test-equal "search-input-file: can find if existent"
+ (which "guile")
+ (search-input-file
+ `(("guile/bin" . ,(dirname (which "guile"))))
+ "guile"))
+
+(test-equal "search-input-file: can search in multiple directories"
+ (which "guile")
+ (call-with-temporary-directory
+ (lambda (directory)
+ (search-input-file
+ `(("irrelevant" . ,directory)
+ ("guile/bin" . ,(dirname (which "guile"))))
+ "guile"))))
+
+
(test-end)
diff --git a/tests/builders.scm b/tests/builders.scm
index fdcf38ded3..2853227465 100644
--- a/tests/builders.scm
+++ b/tests/builders.scm
@@ -1,5 +1,6 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2012, 2013, 2014, 2015, 2019 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2012, 2013, 2014, 2015, 2018, 2019, 2021 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2021 Lars-Dominik Braun <lars@6xq.net>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -17,22 +18,28 @@
;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
-(define-module (test-builders)
+(define-module (tests builders)
#:use-module (guix download)
#:use-module (guix build-system)
#:use-module (guix build-system gnu)
+ #:use-module (guix build gnu-build-system)
+ #:use-module (guix build utils)
+ #:use-module (guix build-system python)
+ #:use-module (guix grafts)
#:use-module (guix store)
+ #:use-module (guix monads)
#:use-module (guix utils)
#:use-module (guix base32)
#:use-module (guix derivations)
#:use-module (gcrypt hash)
#:use-module (guix tests)
- #:use-module ((guix packages)
- #:select (package?
- package-derivation package-native-search-paths))
+ #:use-module (guix packages)
#:use-module (gnu packages bootstrap)
#:use-module (ice-9 match)
+ #:use-module (ice-9 textual-ports)
#:use-module (srfi srfi-1)
+ #:use-module (srfi srfi-11)
+ #:use-module (srfi srfi-34)
#:use-module (srfi srfi-64))
;; Test the higher-level builders.
@@ -43,6 +50,9 @@
(define url-fetch*
(store-lower url-fetch))
+;; Globally disable grafts because they can trigger early builds.
+(%graft? #f)
+
(test-begin "builders")
@@ -78,4 +88,116 @@
(test-assert "gnu-build-system"
(build-system? gnu-build-system))
+(define unpack (assoc-ref %standard-phases 'unpack))
+
+(define compressors '(("gzip" . "gz")
+ ("xz" . "xz")
+ ("bzip2" . "bz2")
+ (#f . #f)))
+
+(for-each
+ (match-lambda
+ ((comp . ext)
+
+ (unless (network-reachable?) (test-skip 1)) ;for bootstrap binaries
+ (test-equal (string-append "gnu-build-system unpack phase, "
+ "single file (compression: "
+ (if comp comp "None") ")")
+ "expected text"
+ (let*-values
+ (((name) "test")
+ ((compressed-name) (if ext
+ (string-append name "." ext)
+ name))
+ ((file hash) (test-file %store compressed-name "expected text")))
+ (call-with-temporary-directory
+ (lambda (dir)
+ (with-directory-excursion dir
+ (unpack #:source file)
+ (call-with-input-file name get-string-all))))))))
+ compressors)
+
+
+;;;
+;;; Test the sanity-check phase of the Python build system.
+;;;
+
+(define* (make-python-dummy name #:key (setup-py-extra "")
+ (init-py "") (use-setuptools? #t))
+ (dummy-package (string-append "python-dummy-" name)
+ (version "0.1")
+ (build-system python-build-system)
+ (arguments
+ `(#:tests? #f
+ #:use-setuptools? ,use-setuptools?
+ #:phases
+ (modify-phases %standard-phases
+ (replace 'unpack
+ (lambda _
+ (mkdir-p "dummy")
+ (with-output-to-file "dummy/__init__.py"
+ (lambda _
+ (display ,init-py)))
+ (with-output-to-file "setup.py"
+ (lambda _
+ (format #t "\
+~a
+setup(
+ name='dummy-~a',
+ version='0.1',
+ packages=['dummy'],
+ ~a
+ )"
+ (if ,use-setuptools?
+ "from setuptools import setup"
+ "from distutils.core import setup")
+ ,name ,setup-py-extra))))))))))
+
+(define python-dummy-ok
+ (make-python-dummy "ok"))
+
+;; distutil won't install any metadata, so make sure our script does not fail
+;; on a otherwise fine package.
+(define python-dummy-no-setuptools
+ (make-python-dummy
+ "no-setuptools" #:use-setuptools? #f))
+
+(define python-dummy-fail-requirements
+ (make-python-dummy "fail-requirements"
+ #:setup-py-extra "install_requires=['nonexistent'],"))
+
+(define python-dummy-fail-import
+ (make-python-dummy "fail-import" #:init-py "import nonexistent"))
+
+(define python-dummy-fail-console-script
+ (make-python-dummy "fail-console-script"
+ #:setup-py-extra (string-append "entry_points={'console_scripts': "
+ "['broken = dummy:nonexistent']},")))
+
+(define (check-build-success store p)
+ (unless store (test-skip 1))
+ (test-assert (string-append "python-build-system: " (package-name p))
+ (let* ((drv (package-derivation store p)))
+ (build-derivations store (list drv)))))
+
+(define (check-build-failure store p)
+ (unless store (test-skip 1))
+ (test-assert (string-append "python-build-system: " (package-name p))
+ (let ((drv (package-derivation store p)))
+ (guard (c ((store-protocol-error? c)
+ (pk 'failure c #t))) ;good!
+ (build-derivations store (list drv))
+ #f)))) ;bad: it should have failed
+
+(with-external-store store
+ (for-each (lambda (p) (check-build-success store p))
+ (list
+ python-dummy-ok
+ python-dummy-no-setuptools))
+ (for-each (lambda (p) (check-build-failure store p))
+ (list
+ python-dummy-fail-requirements
+ python-dummy-fail-import
+ python-dummy-fail-console-script)))
+
(test-end "builders")
diff --git a/tests/cran.scm b/tests/cran.scm
index 70d2277198..e59b7daef7 100644
--- a/tests/cran.scm
+++ b/tests/cran.scm
@@ -117,15 +117,9 @@ Date/Publication: 2015-07-14 14:15:16
(? string? hash)))))
('properties ('quasiquote (('upstream-name . "My-Example"))))
('build-system 'r-build-system)
- ('inputs
- ('quasiquote
- (("cairo" ('unquote 'cairo)))))
+ ('inputs ('list 'cairo))
('propagated-inputs
- ('quasiquote
- (("r-bh" ('unquote 'r-bh))
- ("r-proto" ('unquote 'r-proto))
- ("r-rcpp" ('unquote 'r-rcpp))
- ("r-scales" ('unquote 'r-scales)))))
+ ('list 'r-bh 'r-proto 'r-rcpp 'r-scales))
('home-page "http://gnu.org/s/my-example")
('synopsis "Example package")
('description
diff --git a/tests/egg.scm b/tests/egg.scm
index 99dd0a3fc7..a7d3378dd7 100644
--- a/tests/egg.scm
+++ b/tests/egg.scm
@@ -1,5 +1,6 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2021 Xinglu Chen <public@yoctocell.xyz>
+;;; Copyright © 2021 Sarah Morgensen <iskarian@mgsn.dev>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -86,16 +87,9 @@
('build-system 'chicken-build-system)
('arguments ('quasiquote ('#:egg-name "foo")))
('native-inputs
- ('quasiquote
- (("chicken-test" ('unquote chicken-test))
- ("chicken-srfi-1" ('unquote chicken-srfi-1))
- ("chicken-begin-syntax" ('unquote chicken-begin-syntax)))))
- ('inputs
- ('quasiquote
- (("libgit2" ('unquote libgit2)))))
- ('propagated-inputs
- ('quasiquote
- (("chicken-datatype" ('unquote chicken-datatype)))))
+ ('list 'chicken-test 'chicken-srfi-1 'chicken-begin-syntax))
+ ('inputs ('list 'libgit2))
+ ('propagated-inputs ('list 'chicken-datatype))
('home-page "https://wiki.call-cc.org/egg/foo")
('synopsis "Example egg")
('description #f)
@@ -108,16 +102,9 @@
('source (? file-like? source))
('build-system 'chicken-build-system)
('arguments ('quasiquote ('#:egg-name "bar")))
- ('native-inputs
- ('quasiquote
- (("chicken-test" ('unquote chicken-test))
- ("chicken-begin-syntax" ('unquote chicken-begin-syntax)))))
- ('inputs
- ('quasiquote
- (("libgit2" ('unquote libgit2)))))
- ('propagated-inputs
- ('quasiquote
- (("chicken-datatype" ('unquote chicken-datatype)))))
+ ('native-inputs ('list 'chicken-test 'chicken-begin-syntax))
+ ('inputs ('list 'libgit2))
+ ('propagated-inputs ('list 'chicken-datatype))
('home-page "https://wiki.call-cc.org/egg/bar")
('synopsis "Example egg")
('description #f)
diff --git a/tests/gem.scm b/tests/gem.scm
index 751bba656f..c8fe15398e 100644
--- a/tests/gem.scm
+++ b/tests/gem.scm
@@ -2,6 +2,7 @@
;;; Copyright © 2015 David Thompson <davet@gnu.org>
;;; Copyright © 2016 Ricardo Wurmus <rekado@elephly.net>
;;; Copyright © 2018 Oleg Pykhalov <go.wigust@gmail.com>
+;;; Copyright © 2021 Sarah Morgensen <iskarian@mgsn.dev>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -93,10 +94,7 @@
('base32
"1a270mlajhrmpqbhxcqjqypnvgrq4pgixpv3w9gwp1wrrapnwrzk"))))
('build-system 'ruby-build-system)
- ('propagated-inputs
- ('quasiquote
- (("bundler" ('unquote 'bundler))
- ("ruby-bar" ('unquote 'ruby-bar)))))
+ ('propagated-inputs ('list 'bundler 'ruby-bar))
('synopsis "A cool gem")
('description "This package provides a cool gem")
('home-page "https://example.com")
@@ -132,9 +130,7 @@
('base32
"1a270mlajhrmpqbhxcqjqypnvgrq4pgixpv3w9gwp1wrrapnwrzk"))))
('build-system 'ruby-build-system)
- ('propagated-inputs
- ('quasiquote
- (('"bundler" ('unquote 'bundler)))))
+ ('propagated-inputs ('list 'bundler))
('synopsis "Another cool gem")
('description "Another cool gem")
('home-page "https://example.com")
@@ -165,10 +161,7 @@
('base32
"1a270mlajhrmpqbhxcqjqypnvgrq4pgixpv3w9gwp1wrrapnwrzk"))))
('build-system 'ruby-build-system)
- ('propagated-inputs
- ('quasiquote
- (("bundler" ('unquote 'bundler))
- ("ruby-bar" ('unquote 'ruby-bar)))))
+ ('propagated-inputs ('list 'bundler 'ruby-bar))
('synopsis "A cool gem")
('description "This package provides a cool gem")
('home-page "https://example.com")
diff --git a/tests/gexp.scm b/tests/gexp.scm
index 0758a49f5f..ad8e1d57b8 100644
--- a/tests/gexp.scm
+++ b/tests/gexp.scm
@@ -127,6 +127,13 @@
(null? (gexp-inputs exp))
(gexp->sexp* exp))))
+(test-equal "sexp->gexp"
+ '(a b (c d) e)
+ (let ((exp (sexp->gexp '(a b (c d) e))))
+ (and (gexp? exp)
+ (null? (gexp-inputs exp))
+ (gexp->sexp* exp))))
+
(test-equal "unquote"
'(display `(foo ,(+ 2 3)))
(let ((exp (gexp (display `(foo ,(+ 2 3))))))
@@ -434,6 +441,17 @@
'(system-binding)))
(x x)))))
+(test-assert "let-system in file-append"
+ (let ((mixed (file-append (let-system (system target)
+ (if (not target) grep sed))
+ "/bin"))
+ (grep (file-append grep "/bin"))
+ (sed (file-append sed "/bin")))
+ (and (equal? (gexp->sexp* #~(list #$mixed))
+ (gexp->sexp* #~(list #$grep)))
+ (equal? (gexp->sexp* #~(list #$mixed) "powerpc64le-linux-gnu")
+ (gexp->sexp* #~(list #$sed) "powerpc64le-linux-gnu")))))
+
(test-assert "ungexp + ungexp-native"
(let* ((exp (gexp (list (ungexp-native %bootstrap-guile)
(ungexp coreutils)
@@ -1463,6 +1481,42 @@ importing.* \\(guix config\\) from the host"
(string=? (readlink (string-append comp "/text"))
text)))))))
+(test-assert "lower-object, computed-file + grafts"
+ ;; The reference graph should refer to grafted packages when grafts are
+ ;; enabled. See <https://issues.guix.gnu.org/50676>.
+ (let* ((base (package
+ (inherit (dummy-package "trivial"))
+ (build-system trivial-build-system)
+ (arguments
+ `(#:guile ,%bootstrap-guile
+ #:builder (mkdir %output)))))
+ (pkg (package
+ (inherit base)
+ (version "1.1")
+ (replacement (package
+ (inherit base)
+ (version "9.9")))))
+ (exp #~(begin
+ (use-modules (ice-9 rdelim))
+ (let ((item (call-with-input-file "graph" read-line)))
+ (call-with-output-file #$output
+ (lambda (port)
+ (display item port))))))
+ (computed (computed-file "computed" exp
+ #:options
+ `(#:references-graphs (("graph" ,pkg)))))
+ (drv0 (package-derivation %store pkg #:graft? #t))
+ (drv1 (parameterize ((%graft? #t))
+ (run-with-store %store
+ (lower-object computed)))))
+ (build-derivations %store (list drv1))
+
+ ;; The graph obtained in COMPUTED should refer to the grafted version of
+ ;; PKG, not to PKG itself.
+ (string=? (call-with-input-file (derivation->output-path drv1)
+ get-string-all)
+ (derivation->output-path drv0))))
+
(test-equal "lower-object, computed-file, #:system"
'("mips64el-linux")
(run-with-store %store
diff --git a/tests/gremlin.scm b/tests/gremlin.scm
index b0bb7a8e49..9af899c89a 100644
--- a/tests/gremlin.scm
+++ b/tests/gremlin.scm
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2015, 2018 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2015, 2018, 2020 Ludovic Courtès <ludo@gnu.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -23,9 +23,12 @@
#:use-module (guix build gremlin)
#:use-module (srfi srfi-1)
#:use-module (srfi srfi-26)
+ #:use-module (srfi srfi-34)
#:use-module (srfi srfi-64)
#:use-module (rnrs io ports)
#:use-module (ice-9 popen)
+ #:use-module (ice-9 rdelim)
+ #:use-module (ice-9 regex)
#:use-module (ice-9 match))
(define %guile-executable
@@ -57,6 +60,44 @@
(string-take lib (string-contains lib ".so")))
(elf-dynamic-info-needed dyninfo))))))
+(unless (and %guile-executable (not (getenv "LD_LIBRARY_PATH"))
+ (file-needed %guile-executable) ;statically linked?
+ ;; When Guix has been built on a foreign distro, using a
+ ;; toolchain and libraries from that foreign distro, it is not
+ ;; unusual for the runpath to be empty.
+ (pair? (file-runpath %guile-executable)))
+ (test-skip 1))
+(test-assert "file-needed/recursive"
+ (let* ((needed (file-needed/recursive %guile-executable))
+ (pipe (dynamic-wind
+ (lambda ()
+ ;; Tell ld.so to list loaded objects, like 'ldd' does.
+ (setenv "LD_TRACE_LOADED_OBJECTS" "yup"))
+ (lambda ()
+ (open-pipe* OPEN_READ %guile-executable))
+ (lambda ()
+ (unsetenv "LD_TRACE_LOADED_OBJECTS")))))
+ (define ldd-rx
+ (make-regexp "^[[:blank:]]+([[:graph:]]+ => )?([[:graph:]]+) .*$"))
+
+ (define (read-ldd-output port)
+ ;; Read from PORT output in GNU ldd format.
+ (let loop ((result '()))
+ (match (read-line port)
+ ((? eof-object?)
+ (reverse result))
+ ((= (cut regexp-exec ldd-rx <>) m)
+ (if m
+ (loop (cons (match:substring m 2) result))
+ (loop result))))))
+
+ (define ground-truth
+ (remove (cut string-prefix? "linux-vdso.so" <>)
+ (read-ldd-output pipe)))
+
+ (and (zero? (close-pipe pipe))
+ (lset= string=? (pk 'truth ground-truth) (pk 'needed needed)))))
+
(test-equal "expand-origin"
'("OOO/../lib"
"OOO"
@@ -96,4 +137,49 @@
(close-pipe pipe)
str)))))))
+(unless c-compiler
+ (test-skip 1))
+(test-equal "set-file-runpath + file-runpath"
+ "hello\n"
+ (call-with-temporary-directory
+ (lambda (directory)
+ (with-directory-excursion directory
+ (call-with-output-file "t.c"
+ (lambda (port)
+ (display "int main () { puts(\"hello\"); }" port)))
+
+ (invoke c-compiler "t.c"
+ "-Wl,--enable-new-dtags" "-Wl,-rpath=/xxxxxxxxx")
+
+ (let ((original-runpath (file-runpath "a.out")))
+ (and (member "/xxxxxxxxx" original-runpath)
+ (guard (c ((runpath-too-long-error? c)
+ (string=? "a.out" (runpath-too-long-error-file c))))
+ (set-file-runpath "a.out" (list (make-string 777 #\y))))
+ (let ((runpath (delete "/xxxxxxxxx" original-runpath)))
+ (set-file-runpath "a.out" runpath)
+ (equal? runpath (file-runpath "a.out")))
+ (let* ((pipe (open-input-pipe "./a.out"))
+ (str (get-string-all pipe)))
+ (close-pipe pipe)
+ str)))))))
+
+(unless c-compiler
+ (test-skip 1))
+(test-equal "elf-dynamic-info-soname"
+ "libfoo.so.2"
+ (call-with-temporary-directory
+ (lambda (directory)
+ (with-directory-excursion directory
+ (call-with-output-file "t.c"
+ (lambda (port)
+ (display "// empty file" port)))
+ (invoke c-compiler "t.c"
+ "-shared" "-Wl,-soname,libfoo.so.2")
+ (let* ((dyninfo (elf-dynamic-info
+ (parse-elf (call-with-input-file "a.out"
+ get-bytevector-all))))
+ (soname (elf-dynamic-info-soname dyninfo)))
+ soname)))))
+
(test-end "gremlin")
diff --git a/tests/guix-build.sh b/tests/guix-build.sh
index 46c8afc901..86e41e2927 100644
--- a/tests/guix-build.sh
+++ b/tests/guix-build.sh
@@ -288,7 +288,7 @@ guix build --target=arm-linux-gnueabihf --dry-run \
-e '(@ (gnu packages base) coreutils)'
# Replacements.
-drv1=`guix build guix --with-input=guile@2.0=guile@2.2 -d`
+drv1=`guix build guix --with-input=guile-zstd=idutils -d`
drv2=`guix build guix -d`
test "$drv1" != "$drv2"
diff --git a/tests/guix-environment.sh b/tests/guix-environment.sh
index f4fc2e39ed..95fe95b437 100644
--- a/tests/guix-environment.sh
+++ b/tests/guix-environment.sh
@@ -199,7 +199,7 @@ then
# Make sure the bootstrap binaries are all listed where they belong.
grep -E "^export PATH=\"$profile/bin\"" "$tmpdir/a"
- grep -E "^export CPATH=\"$profile/include\"" "$tmpdir/a"
+ grep -E "^export C_INCLUDE_PATH=\"$profile/include\"" "$tmpdir/a"
grep -E "^export LIBRARY_PATH=\"$profile/lib\"" "$tmpdir/a"
for dep in bootstrap-binaries-0 gcc-bootstrap-0 glibc-bootstrap-0
do
@@ -213,8 +213,8 @@ then
# as returned by '--search-paths'.
guix environment --bootstrap --no-substitutes --pure \
-e '(@ (guix tests) gnu-make-for-tests)' \
- -- /bin/sh -c 'echo $PATH $CPATH $LIBRARY_PATH' > "$tmpdir/b"
- ( . "$tmpdir/a" ; echo $PATH $CPATH $LIBRARY_PATH ) > "$tmpdir/c"
+ -- /bin/sh -c 'echo $PATH $C_INCLUDE_PATH $LIBRARY_PATH' > "$tmpdir/b"
+ ( . "$tmpdir/a" ; echo $PATH $C_INCLUDE_PATH $LIBRARY_PATH ) > "$tmpdir/c"
cmp "$tmpdir/b" "$tmpdir/c"
rm "$tmpdir"/*
@@ -235,7 +235,7 @@ then
# Make sure the bootstrap binaries are all listed where they belong.
grep -E "^export PATH=\"$profile/bin\"" "$tmpdir/a"
- grep -E "^export CPATH=\"$profile/include\"" "$tmpdir/a"
+ grep -E "^export C_INCLUDE_PATH=\"$profile/include\"" "$tmpdir/a"
grep -E "^export LIBRARY_PATH=\"$profile/lib\"" "$tmpdir/a"
for dep in bootstrap-binaries-0 gcc-bootstrap-0 glibc-bootstrap-0 \
guile-bootstrap
diff --git a/tests/guix-shell.sh b/tests/guix-shell.sh
index d8cae9d614..23ff1c5bcf 100644
--- a/tests/guix-shell.sh
+++ b/tests/guix-shell.sh
@@ -97,9 +97,9 @@ then
profile=`grep "^export PATH" "$tmpdir/a" | sed -r 's|^.*="(.*)/bin"|\1|'`
# Make sure the bootstrap binaries are all listed where they belong.
- grep -E "^export PATH=\"$profile/bin\"" "$tmpdir/a"
- grep -E "^export CPATH=\"$profile/include\"" "$tmpdir/a"
- grep -E "^export LIBRARY_PATH=\"$profile/lib\"" "$tmpdir/a"
+ grep -E "^export PATH=\"$profile/bin\"" "$tmpdir/a"
+ grep -E "^export C_INCLUDE_PATH=\"$profile/include\"" "$tmpdir/a"
+ grep -E "^export LIBRARY_PATH=\"$profile/lib\"" "$tmpdir/a"
for dep in bootstrap-binaries-0 gcc-bootstrap-0 glibc-bootstrap-0
do
guix gc --references "$profile" | grep "$dep"
diff --git a/tests/hackage.scm b/tests/hackage.scm
index ba694661f3..189b9af173 100644
--- a/tests/hackage.scm
+++ b/tests/hackage.scm
@@ -2,6 +2,7 @@
;;; Copyright © 2015 Federico Beffa <beffa@fbengineering.ch>
;;; Copyright © 2019 Robert Vollmert <rob@vllmrt.net>
;;; Copyright © 2021 Xinglu Chen <public@yoctocell.xyz>
+;;; Copyright © 2021 Sarah Morgensen <iskarian@mgsn.dev>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -175,9 +176,7 @@ library
('base32
(? string? hash)))))
('build-system 'haskell-build-system)
- ('inputs
- ('quasiquote
- (("ghc-http" ('unquote 'ghc-http)))))
+ ('inputs ('list 'ghc-http))
('home-page "http://test.org")
('synopsis (? string?))
('description (? string?))
@@ -217,13 +216,8 @@ library
('base32
(? string? hash)))))
('build-system 'haskell-build-system)
- ('inputs
- ('quasiquote
- (("ghc-b" ('unquote 'ghc-b))
- ("ghc-http" ('unquote 'ghc-http)))))
- ('native-inputs
- ('quasiquote
- (("ghc-haskell-gi" ('unquote 'ghc-haskell-gi)))))
+ ('inputs ('list 'ghc-b 'ghc-http))
+ ('native-inputs ('list 'ghc-haskell-gi))
('home-page "http://test.org")
('synopsis (? string?))
('description (? string?))
@@ -342,9 +336,7 @@ executable cabal
('base32
(? string? hash)))))
('build-system 'haskell-build-system)
- ('inputs
- ('quasiquote
- (("ghc-http" ('unquote 'ghc-http)))))
+ ('inputs ('list 'ghc-http))
('arguments
('quasiquote
('#:cabal-revision
@@ -405,9 +397,7 @@ executable cabal
('base32
(? string? hash)))))
('build-system 'haskell-build-system)
- ('inputs
- ('quasiquote
- (("ghc-http" ('unquote 'ghc-http)))))
+ ('inputs ('list 'ghc-http))
('home-page "http://test.org")
('synopsis (? string?))
('description (? string?))
diff --git a/tests/lint.scm b/tests/lint.scm
index 9a91dd5426..e9663e69f9 100644
--- a/tests/lint.scm
+++ b/tests/lint.scm
@@ -380,6 +380,20 @@
`(("python-setuptools" ,python-setuptools))))))
(check-inputs-should-not-be-an-input-at-all pkg))))
+(test-assert "input labels: no warnings"
+ (let ((pkg (dummy-package "x"
+ (inputs `(("glib" ,glib)
+ ("pkg-config" ,pkg-config))))))
+ (null? (check-input-labels pkg))))
+
+(test-equal "input labels: one warning"
+ "label 'pkgkonfig' does not match package name 'pkg-config'"
+ (single-lint-warning-message
+ (let ((pkg (dummy-package "x"
+ (inputs `(("glib" ,glib)
+ ("pkgkonfig" ,pkg-config))))))
+ (check-input-labels pkg))))
+
(test-equal "explicit #:sh argument to 'wrap-program' is acceptable"
'()
(let* ((phases
@@ -586,7 +600,7 @@
(single-lint-warning-message (check-patch-headers pkg)))))
(test-equal "derivation: invalid arguments"
- "failed to create x86_64-linux derivation: (wrong-type-arg \"map\" \"Wrong type argument: ~S\" (invalid-module) ())"
+ "failed to create x86_64-linux derivation: (match-error \"match\" \"no matching pattern\" invalid-module)"
(match (let ((pkg (dummy-package "x"
(arguments
'(#:imported-modules (invalid-module))))))
diff --git a/tests/opam.scm b/tests/opam.scm
index 31b4ea41ff..b5f02f809b 100644
--- a/tests/opam.scm
+++ b/tests/opam.scm
@@ -1,6 +1,7 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2018 Julien Lepiller <julien@lepiller.eu>
;;; Copyright © 2021 Xinglu Chen <public@yoctocell.xyz>
+;;; Copyright © 2021 Sarah Morgensen <iskarian@mgsn.dev>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -101,13 +102,9 @@ url {
('base32
(? string? hash)))))
('build-system 'ocaml-build-system)
- ('propagated-inputs
- ('quasiquote
- (("ocaml-zarith" ('unquote 'ocaml-zarith)))))
+ ('propagated-inputs ('list 'ocaml-zarith))
('native-inputs
- ('quasiquote
- (("ocaml-alcotest" ('unquote 'ocaml-alcotest))
- ("ocamlbuild" ('unquote 'ocamlbuild)))))
+ ('list 'ocaml-alcotest 'ocamlbuild))
('home-page "https://example.org/")
('synopsis "Some example package")
('description "This package is just an example.")
diff --git a/tests/pack.scm b/tests/pack.scm
index e9b4c36e0e..98bfedf21c 100644
--- a/tests/pack.scm
+++ b/tests/pack.scm
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2017, 2018, 2019, 2020 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2017, 2018, 2019, 2020, 2021 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2018 Ricardo Wurmus <rekado@elephly.net>
;;; Copyright © 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;;
@@ -54,7 +54,7 @@
;; Compressor that uses the bootstrap 'gzip'.
((@ (guix scripts pack) compressor) "gzip"
".gz"
- #~(#+(file-append %bootstrap-coreutils&co "/bin/gzip") "-6n")))
+ #~(list #+(file-append %bootstrap-coreutils&co "/bin/gzip") "-6n")))
(define %tar-bootstrap %bootstrap-coreutils&co)
diff --git a/tests/packages.scm b/tests/packages.scm
index 266b5aeb7a..3506f94f91 100644
--- a/tests/packages.scm
+++ b/tests/packages.scm
@@ -1,6 +1,8 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021 Ludovic Courtès <ludo@gnu.org>
-;;; Copyright © Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
+;;; Copyright © 2018 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
+;;; Copyright © 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
+;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -17,13 +19,14 @@
;;; You should have received a copy of the GNU General Public License
;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
-(define-module (test-packages)
+(define-module (tests packages)
#:use-module (guix tests)
#:use-module (guix store)
#:use-module (guix monads)
#:use-module (guix grafts)
- #:use-module ((guix gexp) #:select (local-file local-file-file))
+ #:use-module (guix gexp)
#:use-module (guix utils)
+ #:use-module ((guix build utils) #:select (tarball?))
#:use-module ((guix diagnostics)
;; Rename the 'location' binding to allow proper syntax
;; matching when setting the 'location' field of a package.
@@ -32,6 +35,7 @@
(else name))))
#:use-module ((gcrypt hash) #:prefix gcrypt:)
#:use-module (guix derivations)
+ #:use-module (guix download)
#:use-module (guix packages)
#:use-module (guix grafts)
#:use-module (guix search-paths)
@@ -51,6 +55,7 @@
#:use-module (gnu packages version-control)
#:use-module (gnu packages xml)
#:use-module (srfi srfi-1)
+ #:use-module (srfi srfi-11)
#:use-module (srfi srfi-26)
#:use-module (srfi srfi-34)
#:use-module (srfi srfi-35)
@@ -133,7 +138,7 @@
;; inputs. See <https://bugs.gnu.org/35872>.
(let* ((dep (dummy-package "dep" (version "2")))
(old (dummy-package "foo" (version "1")
- (propagated-inputs `(("dep" ,dep)))))
+ (propagated-inputs (list dep))))
(drv (package-derivation %store old))
(tx (mock ((gnu packages) find-best-packages-by-name
(const (list old)))
@@ -221,7 +226,7 @@
(bar (dummy-package "bar" (version "0")
(replacement old)))
(new (dummy-package "foo" (version "1")
- (inputs `(("bar" ,bar)))))
+ (inputs (list bar))))
(tx (mock ((gnu packages) find-best-packages-by-name
(const (list new)))
(transaction-upgrade-entry
@@ -282,13 +287,13 @@
(test-assert "package-transitive-inputs"
(let* ((a (dummy-package "a"))
(b (dummy-package "b"
- (propagated-inputs `(("a" ,a)))))
+ (propagated-inputs (list a))))
(c (dummy-package "c"
- (inputs `(("a" ,a)))))
+ (inputs (list a))))
(d (dummy-package "d"
(propagated-inputs `(("x" "something.drv")))))
(e (dummy-package "e"
- (inputs `(("b" ,b) ("c" ,c) ("d" ,d))))))
+ (inputs (list b c d)))))
(and (null? (package-transitive-inputs a))
(equal? `(("a" ,a)) (package-transitive-inputs b))
(equal? `(("a" ,a)) (package-transitive-inputs c))
@@ -334,19 +339,19 @@
(b (dummy-package "b"
(build-system trivial-build-system)
(supported-systems '("x" "y"))
- (inputs `(("a" ,a)))))
+ (inputs (list a))))
(c (dummy-package "c"
(build-system trivial-build-system)
(supported-systems '("y" "z"))
- (inputs `(("b" ,b)))))
+ (inputs (list b))))
(d (dummy-package "d"
(build-system trivial-build-system)
(supported-systems '("x" "y" "z"))
- (inputs `(("b" ,b) ("c" ,c)))))
+ (inputs (list b c))))
(e (dummy-package "e"
(build-system trivial-build-system)
(supported-systems '("x" "y" "z"))
- (inputs `(("d" ,d))))))
+ (inputs (list d)))))
(list (package-transitive-supported-systems a)
(package-transitive-supported-systems b)
(package-transitive-supported-systems c)
@@ -376,13 +381,13 @@
(build-system trivial-build-system))))))
(let* ((a (dummy-package/no-implicit "a"))
(b (dummy-package/no-implicit "b"
- (propagated-inputs `(("a" ,a)))))
+ (propagated-inputs (list a))))
(c (dummy-package/no-implicit "c"
- (inputs `(("a" ,a)))))
+ (inputs (list a))))
(d (dummy-package/no-implicit "d"
- (native-inputs `(("b" ,b)))))
+ (native-inputs (list b))))
(e (dummy-package/no-implicit "e"
- (inputs `(("c" ,c) ("d" ,d))))))
+ (inputs (list c d)))))
(lset= eq?
(list a b c d e)
(package-closure (list e))
@@ -405,12 +410,11 @@
(u (dummy-origin))
(i (dummy-origin))
(a (dummy-package "a"))
- (b (dummy-package "b"
- (inputs `(("a" ,a) ("i" ,i)))))
+ (b (dummy-package "b" (inputs (list a i))))
(c (package (inherit b) (source o)))
(d (dummy-package "d"
(build-system trivial-build-system)
- (source u) (inputs `(("c" ,c))))))
+ (source u) (inputs (list c)))))
(test-assert "package-direct-sources, no source"
(null? (package-direct-sources a)))
(test-equal "package-direct-sources, #f source"
@@ -478,7 +482,7 @@
(supported-systems '("x86_64-linux"))))
(p (dummy-package "foo"
(build-system gnu-build-system)
- (inputs `(("d" ,d)))
+ (inputs (list d))
(supported-systems '("x86_64-linux" "armhf-linux")))))
(and (supported-package? p "x86_64-linux")
(not (supported-package? p "i686-linux"))
@@ -603,6 +607,11 @@
(build-derivations %store (list drv))
(call-with-input-file output get-string-all)))
+
+;;;
+;;; Source derivation with snippets.
+;;;
+
(unless (network-reachable?) (test-skip 1))
(test-equal "package-source-derivation, snippet"
"OK"
@@ -658,11 +667,96 @@
(and (build-derivations %store (list (pk 'snippet-drv drv)))
(call-with-input-file out get-string-all))))
+;; Note: lzip is not part of bootstrap-coreutils&co, so is not included to
+;; avoid having to rebuild the world.
+(define compressors '(("gzip" . "gz")
+ ("xz" . "xz")
+ ("bzip2" . "bz2")
+ (#f . #f)))
+
+(for-each
+ (match-lambda
+ ((comp . ext)
+ (unless (network-reachable?) (test-skip 1))
+ (test-equal (string-append "origin->derivation, single file with snippet "
+ "(compression: " (if comp comp "None") ")")
+ "2 + 2 = 4"
+ (let*-values
+ (((name) "maths")
+ ((compressed-name) (if comp
+ (string-append name "." ext)
+ name))
+ ((file hash) (test-file %store compressed-name "2 + 2 = 5"))
+ ;; Create an origin using the above computed file and its hash.
+ ((source) (origin
+ (method url-fetch)
+ (uri (string-append "file://" file))
+ (file-name compressed-name)
+ (patch-inputs `(("tar" ,%bootstrap-coreutils&co)
+ ("xz" ,%bootstrap-coreutils&co)
+ ("bzip2" ,%bootstrap-coreutils&co)
+ ("gzip" ,%bootstrap-coreutils&co)))
+ (patch-guile %bootstrap-guile)
+ (modules '((guix build utils)))
+ (snippet `(substitute* ,name
+ (("5") "4")))
+ (hash (content-hash hash))))
+ ;; Build origin.
+ ((drv) (run-with-store %store (origin->derivation source)))
+ ((out) (derivation->output-path drv)))
+ ;; Decompress the resulting tar.xz and return its content.
+ (and (build-derivations %store (list drv))
+ (if (tarball? out)
+ (let* ((bin #~(string-append #+%bootstrap-coreutils&co
+ "/bin"))
+ (f (computed-file
+ name
+ (with-imported-modules '((guix build utils))
+ #~(begin
+ (use-modules (guix build utils))
+ (setenv "PATH" #+bin)
+ (invoke "tar" "xvf" #+out)
+ (copy-file #+name #$output)))))
+ (drv (run-with-store %store (lower-object f)))
+ (_ (build-derivations %store (list drv))))
+ (call-with-input-file (derivation->output-path drv)
+ get-string-all))
+ (call-with-input-file out get-string-all)))))))
+ compressors)
+
(test-assert "return value"
(let ((drv (package-derivation %store (dummy-package "p"))))
(and (derivation? drv)
(file-exists? (derivation-file-name drv)))))
+(test-assert "package-derivation, inputs deduplicated"
+ (let* ((dep (dummy-package "dep"))
+ (p0 (dummy-package "p" (inputs (list dep))))
+ (p1 (package (inherit p0)
+ (inputs `(("dep" ,(package (inherit dep)))
+ ,@(package-inputs p0))))))
+ ;; Here P1 ends up with two non-eq? copies of DEP, under the same label.
+ ;; They should be deduplicated so that P0 and P1 lead to the same
+ ;; derivation rather than P1 ending up with duplicate entries in its
+ ;; '%build-inputs' variable.
+ (string=? (derivation-file-name (package-derivation %store p0))
+ (derivation-file-name (package-derivation %store p1)))))
+
+(test-assert "package-derivation, different system"
+ ;; Make sure the 'system' argument of 'package-derivation' is respected.
+ (let* ((system (if (string=? (%current-system) "x86_64-linux")
+ "aarch64-linux"
+ "x86_64-linux"))
+ (drv (package-derivation %store (dummy-package "p")
+ system #:graft? #f)))
+ (define right-system?
+ (mlambdaq (drv)
+ (and (string=? (derivation-system drv) system)
+ (every (compose right-system? derivation-input-derivation)
+ (derivation-inputs drv)))))
+
+ (right-system? drv)))
+
(test-assert "package-output"
(let* ((package (dummy-package "p"))
(drv (package-derivation %store package)))
@@ -690,7 +784,7 @@
(let ((dummy (dummy-package "foo" (inputs `(("x" ,(current-module)))))))
(test-equal "&package-input-error"
- (list dummy (current-module))
+ (list dummy `("x" ,(current-module)))
(guard (c ((package-input-error? c)
(list (package-error-package c)
(package-error-invalid-input c))))
@@ -701,7 +795,7 @@
(parameterize ((%graft? #f))
(let* ((dep (dummy-package "dep"))
(p (dummy-package "p"
- (inputs `(("dep" ,dep "non-existent"))))))
+ (inputs (list `(,dep "non-existent"))))))
(guard (c ((derivation-missing-output-error? c)
(and (string=? (derivation-missing-output c) "non-existent")
(equal? (package-derivation %store dep)
@@ -802,21 +896,47 @@
(build-derivations %store (list d))
#f)))
+(test-assert "trivial with #:allowed-references + grafts"
+ (let* ((g (package
+ (inherit %bootstrap-guile)
+ (replacement (package
+ (inherit %bootstrap-guile)
+ (version "9.9")))))
+ (p (package
+ (inherit (dummy-package "trivial"))
+ (build-system trivial-build-system)
+ (inputs (list g))
+ (arguments
+ `(#:guile ,g
+ #:allowed-references (,g)
+ #:builder (mkdir %output)))))
+ (d0 (package-derivation %store p #:graft? #f))
+ (d1 (parameterize ((%graft? #t))
+ (package-derivation %store p #:graft? #t))))
+ ;; D1 should be equal to D2 because there's nothing to graft. In
+ ;; particular, its #:disallowed-references should be lowered in the same
+ ;; way (ungrafted) whether or not #:graft? is true.
+ (string=? (derivation-file-name d1) (derivation-file-name d0))))
+
(test-assert "search paths"
(let* ((p (make-prompt-tag "return-search-paths"))
+ (t (make-parameter "guile-0"))
(s (build-system
- (name 'raw)
- (description "Raw build system with direct store access")
- (lower (lambda* (name #:key source inputs system target
- #:allow-other-keys)
- (bag
- (name name)
- (system system) (target target)
- (build-inputs inputs)
- (build
- (lambda* (store name inputs
+ (name 'raw)
+ (description "Raw build system with direct store access")
+ (lower (lambda* (name #:key source inputs system target
+ #:allow-other-keys)
+ (bag
+ (name name)
+ (system system) (target target)
+ (build-inputs inputs)
+ (build
+ (lambda* (name inputs
#:key outputs system search-paths)
- search-paths)))))))
+ (if (string=? name (t))
+ (abort-to-prompt p search-paths)
+ (gexp->derivation name
+ #~(mkdir #$output))))))))))
(x (list (search-path-specification
(variable "GUILE_LOAD_PATH")
(files '("share/guile/site/2.0")))
@@ -841,8 +961,10 @@
(lambda (k search-paths)
search-paths))))))
(and (null? (collect (package-derivation %store a)))
- (equal? x (collect (package-derivation %store b)))
- (equal? x (collect (package-derivation %store c)))))))
+ (parameterize ((t "guile-foo-0"))
+ (equal? x (collect (package-derivation %store b))))
+ (parameterize ((t "guile-bar-0"))
+ (equal? x (collect (package-derivation %store c))))))))
(test-assert "package-transitive-native-search-paths"
(let* ((sp (lambda (name)
@@ -853,12 +975,12 @@
(p1 (dummy-package "p1" (native-search-paths (sp "PATH1"))))
(p2 (dummy-package "p2"
(native-search-paths (sp "PATH2"))
- (inputs `(("p0" ,p0)))
- (propagated-inputs `(("p1" ,p1)))))
+ (inputs (list p0))
+ (propagated-inputs (list p1))))
(p3 (dummy-package "p3"
(native-search-paths (sp "PATH3"))
- (native-inputs `(("p0" ,p0)))
- (propagated-inputs `(("p2" ,p2))))))
+ (native-inputs (list p0))
+ (propagated-inputs (list p2)))))
(lset= string=?
'("PATH1" "PATH2" "PATH3")
(map search-path-specification-variable
@@ -912,7 +1034,7 @@
(dep* (package (inherit dep) (replacement new)))
(dummy (dummy-package "dummy"
(arguments '(#:implicit-inputs? #f))
- (inputs `(("dep" ,dep*))))))
+ (inputs (list dep*)))))
(equal? (package-grafts %store dummy)
(list (graft
(origin (package-derivation %store dep))
@@ -944,11 +1066,11 @@
(dep (package (inherit new) (version "0.0")))
(dep* (package (inherit dep) (replacement new)))
(prop (dummy-package "propagated"
- (propagated-inputs `(("dep" ,dep*)))
+ (propagated-inputs (list dep*))
(arguments '(#:implicit-inputs? #f))))
(dummy (dummy-package "dummy"
(arguments '(#:implicit-inputs? #f))
- (inputs `(("prop" ,prop))))))
+ (inputs (list prop)))))
(equal? (package-grafts %store dummy)
(list (graft
(origin (package-derivation %store dep))
@@ -961,16 +1083,16 @@
(dep (package (inherit new) (version "0") (replacement new)))
(p1 (dummy-package "intermediate1"
(arguments '(#:implicit-inputs? #f))
- (inputs `(("dep" ,dep)))))
+ (inputs (list dep))))
(p2 (dummy-package "intermediate2"
(arguments '(#:implicit-inputs? #f))
;; Here we copy DEP to have an equivalent package that is not
;; 'eq?' to DEP. This is similar to what happens with
;; 'package-with-explicit-inputs' & co.
- (inputs `(("dep" ,(package (inherit dep)))))))
+ (inputs (list (package (inherit dep))))))
(p3 (dummy-package "final"
(arguments '(#:implicit-inputs? #f))
- (inputs `(("p1" ,p1) ("p2" ,p2))))))
+ (inputs (list p1 p2)))))
(equal? (package-grafts %store p3)
(list (graft
(origin (package-derivation %store
@@ -988,8 +1110,7 @@
(p0* (package (inherit p0) (version "1.1")))
(p1 (dummy-package "p1"
(arguments '(#:implicit-inputs? #f))
- (inputs `(("p0" ,p0)
- ("p0:lib" ,p0 "lib"))))))
+ (inputs (list p0 `(,p0 "lib"))))))
(lset= equal? (pk (package-grafts %store p1))
(list (graft
(origin (package-derivation %store p0))
@@ -1037,7 +1158,7 @@
#t)))))
(p2r (dummy-package "P2"
(build-system trivial-build-system)
- (inputs `(("p1" ,p1)))
+ (inputs (list p1))
(arguments
`(#:guile ,%bootstrap-guile
#:builder (let ((out (assoc-ref %outputs "out")))
@@ -1058,7 +1179,7 @@
#t)))))
(p3 (dummy-package "p3"
(build-system trivial-build-system)
- (inputs `(("p2" ,p2)))
+ (inputs (list p2))
(arguments
`(#:guile ,%bootstrap-guile
#:builder (let ((out (assoc-ref %outputs "out")))
@@ -1116,18 +1237,18 @@
(bag (name name) (system system) (target target)
(build-inputs native-inputs)
(host-inputs inputs)
- (build (lambda* (store name inputs
- #:key system target
- #:allow-other-keys)
- (build-expression->derivation
- store "foo" '(mkdir %output))))))))
+ (build (lambda* (name inputs
+ #:key system target
+ #:allow-other-keys)
+ (gexp->derivation "foo"
+ #~(mkdir #$output))))))))
(bs (build-system
(name 'build-system-without-cross-compilation)
(description "Does not support cross compilation.")
(lower lower)))
(dep (dummy-package "dep" (build-system bs)))
(pkg (dummy-package "example"
- (native-inputs `(("dep" ,dep)))))
+ (native-inputs (list dep))))
(do-not-build (lambda (continue store lst . _) lst)))
(equal? (with-build-handler do-not-build
(parameterize ((%current-target-system "powerpc64le-linux-gnu")
@@ -1154,9 +1275,9 @@
(test-assert "package->bag, propagated inputs"
(let* ((dep (dummy-package "dep"))
(prop (dummy-package "prop"
- (propagated-inputs `(("dep" ,dep)))))
+ (propagated-inputs (list dep))))
(dummy (dummy-package "dummy"
- (inputs `(("prop" ,prop)))))
+ (inputs (list prop))))
(inputs (bag-transitive-inputs (package->bag dummy #:graft? #f))))
(match (assoc "dep" inputs)
(("dep" package)
@@ -1169,7 +1290,7 @@
`(("libxml2" ,libxml2))
'()))))
(pkg (dummy-package "foo"
- (native-inputs `(("dep" ,dep)))))
+ (native-inputs (list dep))))
(bag (package->bag pkg (%current-system) "i586-gnu")))
(equal? (parameterize ((%current-system "x86_64-linux"))
(bag-transitive-inputs bag))
@@ -1182,19 +1303,20 @@
`(("libxml2" ,libxml2))
'()))))
(pkg (dummy-package "foo"
- (native-inputs `(("dep" ,dep)))))
+ (native-inputs (list dep))))
(bag (package->bag pkg (%current-system) "foo86-hurd")))
(equal? (parameterize ((%current-target-system "foo64-gnu"))
(bag-transitive-inputs bag))
(parameterize ((%current-target-system #f))
(bag-transitive-inputs bag)))))
-(test-assert "bag->derivation"
+(test-assertm "bag->derivation"
(parameterize ((%graft? #f))
(let ((bag (package->bag gnu-make))
(drv (package-derivation %store gnu-make)))
(parameterize ((%current-system "foox86-hurd")) ;should have no effect
- (equal? drv (bag->derivation %store bag))))))
+ (mlet %store-monad ((bag-drv (bag->derivation bag)))
+ (return (equal? drv bag-drv)))))))
(test-assert "bag->derivation, cross-compilation"
(parameterize ((%graft? #f))
@@ -1203,7 +1325,8 @@
(drv (package-cross-derivation %store gnu-make target)))
(parameterize ((%current-system "foox86-hurd") ;should have no effect
(%current-target-system "foo64-linux-gnu"))
- (equal? drv (bag->derivation %store bag))))))
+ (mlet %store-monad ((bag-drv (bag->derivation bag)))
+ (return (equal? drv bag-drv)))))))
(when (or (not (network-reachable?)) (shebang-too-long?))
(test-skip 1))
@@ -1486,11 +1609,11 @@
(build-system trivial-build-system)))
(glib (dummy-package "glib"
(build-system trivial-build-system)
- (propagated-inputs `(("libffi" ,libffi)))))
+ (propagated-inputs (list libffi))))
(gobject (dummy-package "gobject-introspection"
(build-system trivial-build-system)
- (inputs `(("glib" ,glib)))
- (propagated-inputs `(("libffi" ,libffi)))))
+ (inputs (list glib))
+ (propagated-inputs (list libffi))))
(rewrite (package-input-rewriting/spec
`(("glib" . ,identity)))))
(and (= (length (package-transitive-inputs gobject))
@@ -1507,11 +1630,11 @@
(build-system trivial-build-system)))
(glib (dummy-package "glib"
(build-system trivial-build-system)
- (propagated-inputs `(("libffi" ,libffi)))))
+ (propagated-inputs (list libffi))))
(gobject (dummy-package "gobject-introspection"
(build-system trivial-build-system)
- (inputs `(("glib" ,glib)))
- (propagated-inputs `(("libffi" ,libffi)))))
+ (inputs (list glib))
+ (propagated-inputs (list libffi))))
(rewrite (package-input-rewriting `((,glib . ,glib)))))
(and (= (length (package-transitive-inputs gobject))
(length (package-transitive-inputs (rewrite gobject))))
@@ -1789,6 +1912,39 @@
(package-location (specification->package "guile@2"))
(specification->location "guile@2"))
+(test-eq "this-package-input, exists"
+ hello
+ (package-arguments
+ (dummy-package "a"
+ (inputs `(("hello" ,hello)))
+ (arguments (this-package-input "hello")))))
+
+(test-eq "this-package-input, exists in propagated-inputs"
+ hello
+ (package-arguments
+ (dummy-package "a"
+ (propagated-inputs `(("hello" ,hello)))
+ (arguments (this-package-input "hello")))))
+
+(test-eq "this-package-input, does not exist"
+ #f
+ (package-arguments
+ (dummy-package "a"
+ (arguments (this-package-input "hello")))))
+
+(test-eq "this-package-native-input, exists"
+ hello
+ (package-arguments
+ (dummy-package "a"
+ (native-inputs `(("hello" ,hello)))
+ (arguments (this-package-native-input "hello")))))
+
+(test-eq "this-package-native-input, does not exists"
+ #f
+ (package-arguments
+ (dummy-package "a"
+ (arguments (this-package-native-input "hello")))))
+
(test-end "packages")
;;; Local Variables:
diff --git a/tests/print.scm b/tests/print.scm
index 1527251b01..d9710d1ed3 100644
--- a/tests/print.scm
+++ b/tests/print.scm
@@ -61,8 +61,8 @@
(base32
"070pwb7brdcn1mfvplkd56vjc7lbz4iznzkqvfsakvgbv68k71ah"))))
(build-system (@ (guix build-system gnu) gnu-build-system))
- (inputs `(("coreutils" ,(@ (gnu packages base) coreutils))
- ("glibc" ,(@ (gnu packages base) glibc) "debug")))
+ (inputs (list (@ (gnu packages base) coreutils)
+ `(,(@ (gnu packages base) glibc) "debug")))
(home-page "http://gnu.org")
(synopsis "Dummy")
(description "This is a dummy package.")
diff --git a/tests/pypi.scm b/tests/pypi.scm
index ad869ac31f..1ea5f02643 100644
--- a/tests/pypi.scm
+++ b/tests/pypi.scm
@@ -249,13 +249,8 @@ Requires-Dist: pytest (>=3.1.0); extra == 'testing'
('base32
(? string? hash)))))
('build-system 'python-build-system)
- ('propagated-inputs
- ('quasiquote
- (("python-bar" ('unquote 'python-bar))
- ("python-foo" ('unquote 'python-foo)))))
- ('native-inputs
- ('quasiquote
- (("python-pytest" ('unquote 'python-pytest)))))
+ ('propagated-inputs ('list 'python-bar 'python-foo))
+ ('native-inputs ('list 'python-pytest))
('home-page "http://example.com")
('synopsis "summary")
('description "summary")
@@ -324,13 +319,8 @@ Requires-Dist: pytest (>=3.1.0); extra == 'testing'
('base32
(? string? hash)))))
('build-system 'python-build-system)
- ('propagated-inputs
- ('quasiquote
- (("python-bar" ('unquote 'python-bar))
- ("python-baz" ('unquote 'python-baz)))))
- ('native-inputs
- ('quasiquote
- (("python-pytest" ('unquote 'python-pytest)))))
+ ('propagated-inputs ('list 'python-bar 'python-baz))
+ ('native-inputs ('list 'python-pytest))
('home-page "http://example.com")
('synopsis "summary")
('description "summary")
@@ -426,13 +416,8 @@ Requires-Dist: pytest (>=3.1.0); extra == 'testing'
(? string? hash)))))
('properties ('quote (("upstream-name" . "foo-99"))))
('build-system 'python-build-system)
- ('propagated-inputs
- ('quasiquote
- (("python-bar" ('unquote 'python-bar))
- ("python-foo" ('unquote 'python-foo)))))
- ('native-inputs
- ('quasiquote
- (("python-pytest" ('unquote 'python-pytest)))))
+ ('propagated-inputs ('list 'python-bar 'python-foo))
+ ('native-inputs ('list 'python-pytest))
('home-page "http://example.com")
('synopsis "summary")
('description "summary")
diff --git a/tests/store.scm b/tests/store.scm
index de12f6831e..5df28adf0d 100644
--- a/tests/store.scm
+++ b/tests/store.scm
@@ -598,7 +598,8 @@
(d (build-expression->derivation
%store "foo" `(display ,s)
#:guile-for-build
- (package-derivation s %bootstrap-guile (%current-system)))))
+ (package-derivation %store %bootstrap-guile
+ (%current-system)))))
(guard (c ((store-protocol-error? c) #t))
(build-derivations %store (list d))))))))
"Here’s a Greek letter: λ."))
diff --git a/tests/style.scm b/tests/style.scm
new file mode 100644
index 0000000000..ada9197fc1
--- /dev/null
+++ b/tests/style.scm
@@ -0,0 +1,366 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2021 Ludovic Courtès <ludo@gnu.org>
+;;;
+;;; This file is part of GNU Guix.
+;;;
+;;; GNU Guix is free software; you can redistribute it and/or modify it
+;;; under the terms of the GNU General Public License as published by
+;;; the Free Software Foundation; either version 3 of the License, or (at
+;;; your option) any later version.
+;;;
+;;; GNU Guix is distributed in the hope that it will be useful, but
+;;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;;; GNU General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
+
+(define-module (tests-style)
+ #:use-module (guix packages)
+ #:use-module (guix scripts style)
+ #:use-module ((guix utils) #:select (call-with-temporary-directory))
+ #:use-module ((guix build utils) #:select (substitute*))
+ #:use-module (guix diagnostics)
+ #:use-module (gnu packages acl)
+ #:use-module (gnu packages multiprecision)
+ #:use-module (srfi srfi-1)
+ #:use-module (srfi srfi-64)
+ #:use-module (ice-9 match)
+ #:use-module (ice-9 rdelim)
+ #:use-module (ice-9 pretty-print))
+
+(define (call-with-test-package inputs proc)
+ (call-with-temporary-directory
+ (lambda (directory)
+ (call-with-output-file (string-append directory "/my-packages.scm")
+ (lambda (port)
+ (pretty-print
+ `(begin
+ (define-module (my-packages)
+ #:use-module (guix)
+ #:use-module (guix licenses)
+ #:use-module (gnu packages acl)
+ #:use-module (gnu packages base)
+ #:use-module (gnu packages multiprecision)
+ #:use-module (srfi srfi-1))
+
+ (define base
+ (package
+ (inherit coreutils)
+ (inputs '())
+ (native-inputs '())
+ (propagated-inputs '())))
+
+ (define (sdl-union . lst)
+ (package
+ (inherit base)
+ (name "sdl-union")))
+
+ (define-public my-coreutils
+ (package
+ (inherit base)
+ ,@inputs
+ (name "my-coreutils"))))
+ port)))
+
+ (proc directory))))
+
+(define test-directory
+ ;; Directory where the package definition lives.
+ (make-parameter #f))
+
+(define-syntax-rule (with-test-package fields exp ...)
+ (call-with-test-package fields
+ (lambda (directory)
+ (define file
+ (string-append directory "/my-packages.scm"))
+
+ ;; Run as a separate process to make sure FILE is reloaded.
+ (system* "guix" "style" "-L" directory "my-coreutils")
+ (system* "cat" file)
+
+ (load file)
+ (parameterize ((test-directory directory))
+ exp ...))))
+
+(define* (read-lines port line #:optional (count 1))
+ "Read COUNT lines from PORT, starting from LINE."
+ (let loop ((lines '())
+ (count count))
+ (cond ((< (port-line port) (- line 1))
+ (read-char port)
+ (loop lines count))
+ ((zero? count)
+ (string-concatenate-reverse lines))
+ (else
+ (match (read-line port 'concat)
+ ((? eof-object?)
+ (loop lines 0))
+ (line
+ (loop (cons line lines) (- count 1))))))))
+
+(define* (read-package-field package field #:optional (count 1))
+ (let* ((location (package-field-location package field))
+ (file (location-file location))
+ (line (location-line location)))
+ (call-with-input-file (if (string-prefix? "/" file)
+ file
+ (string-append (test-directory) "/"
+ file))
+ (lambda (port)
+ (read-lines port line count)))))
+
+
+(test-begin "style")
+
+(test-equal "nothing to rewrite"
+ '()
+ (with-test-package '()
+ (package-direct-inputs (@ (my-packages) my-coreutils))))
+
+(test-equal "input labels, mismatch"
+ (list `(("foo" ,gmp) ("bar" ,acl))
+ " (inputs `((\"foo\" ,gmp) (\"bar\" ,acl)))\n")
+ (with-test-package '((inputs `(("foo" ,gmp) ("bar" ,acl))))
+ (list (package-direct-inputs (@ (my-packages) my-coreutils))
+ (read-package-field (@ (my-packages) my-coreutils) 'inputs))))
+
+(test-equal "input labels, simple"
+ (list `(("gmp" ,gmp) ("acl" ,acl))
+ " (inputs (list gmp acl))\n")
+ (with-test-package '((inputs `(("gmp" ,gmp) ("acl" ,acl))))
+ (list (package-direct-inputs (@ (my-packages) my-coreutils))
+ (read-package-field (@ (my-packages) my-coreutils) 'inputs))))
+
+(test-equal "input labels, long list with one item per line"
+ (list (concatenate (make-list 4 `(("gmp" ,gmp) ("acl" ,acl))))
+ "\
+ (list gmp
+ acl
+ gmp
+ acl
+ gmp
+ acl
+ gmp
+ acl))\n")
+ (with-test-package '((inputs `(("gmp" ,gmp) ("acl" ,acl)
+ ("gmp" ,gmp) ("acl" ,acl)
+ ("gmp" ,gmp) ("acl" ,acl)
+ ("gmp" ,gmp) ("acl" ,acl))))
+ (list (package-direct-inputs (@ (my-packages) my-coreutils))
+ (read-package-field (@ (my-packages) my-coreutils) 'inputs 8))))
+
+(test-equal "input labels, sdl-union"
+ "\
+ (list gmp acl
+ (sdl-union 1 2 3 4)))\n"
+ (with-test-package '((inputs `(("gmp" ,gmp) ("acl" ,acl)
+ ("sdl-union" ,(sdl-union 1 2 3 4)))))
+ (read-package-field (@ (my-packages) my-coreutils) 'inputs 2)))
+
+(test-equal "input labels, output"
+ (list `(("gmp" ,gmp "debug") ("acl" ,acl))
+ " (inputs (list `(,gmp \"debug\") acl))\n")
+ (with-test-package '((inputs `(("gmp" ,gmp "debug") ("acl" ,acl))))
+ (list (package-direct-inputs (@ (my-packages) my-coreutils))
+ (read-package-field (@ (my-packages) my-coreutils) 'inputs))))
+
+(test-equal "input labels, prepend"
+ (list `(("gmp" ,gmp) ("acl" ,acl))
+ "\
+ (modify-inputs (package-propagated-inputs coreutils)
+ (prepend gmp acl)))\n")
+ (with-test-package '((inputs `(("gmp" ,gmp) ("acl" ,acl)
+ ,@(package-propagated-inputs coreutils))))
+ (list (package-inputs (@ (my-packages) my-coreutils))
+ (read-package-field (@ (my-packages) my-coreutils) 'inputs 2))))
+
+(test-equal "input labels, prepend + delete"
+ (list `(("gmp" ,gmp) ("acl" ,acl))
+ "\
+ (modify-inputs (package-propagated-inputs coreutils)
+ (delete \"gmp\")
+ (prepend gmp acl)))\n")
+ (with-test-package '((inputs `(("gmp" ,gmp)
+ ("acl" ,acl)
+ ,@(alist-delete "gmp"
+ (package-propagated-inputs coreutils)))))
+ (list (package-inputs (@ (my-packages) my-coreutils))
+ (read-package-field (@ (my-packages) my-coreutils) 'inputs 3))))
+
+(test-equal "input labels, prepend + delete multiple"
+ (list `(("gmp" ,gmp) ("acl" ,acl))
+ "\
+ (modify-inputs (package-propagated-inputs coreutils)
+ (delete \"foo\" \"bar\" \"baz\")
+ (prepend gmp acl)))\n")
+ (with-test-package '((inputs `(("gmp" ,gmp)
+ ("acl" ,acl)
+ ,@(fold alist-delete
+ (package-propagated-inputs coreutils)
+ '("foo" "bar" "baz")))))
+ (list (package-inputs (@ (my-packages) my-coreutils))
+ (read-package-field (@ (my-packages) my-coreutils) 'inputs 3))))
+
+(test-equal "input labels, replace"
+ (list '() ;there's no "gmp" input to replace
+ "\
+ (modify-inputs (package-propagated-inputs coreutils)
+ (replace \"gmp\" gmp)))\n")
+ (with-test-package '((inputs `(("gmp" ,gmp)
+ ,@(alist-delete "gmp"
+ (package-propagated-inputs coreutils)))))
+ (list (package-inputs (@ (my-packages) my-coreutils))
+ (read-package-field (@ (my-packages) my-coreutils) 'inputs 2))))
+
+(test-equal "input labels, 'safe' policy"
+ (list `(("gmp" ,gmp) ("acl" ,acl))
+ "\
+ (inputs (list gmp acl))\n")
+ (call-with-test-package '((inputs `(("GMP" ,gmp) ("ACL" ,acl)))
+ (arguments '())) ;no build system arguments
+ (lambda (directory)
+ (define file
+ (string-append directory "/my-packages.scm"))
+
+ (system* "guix" "style" "-L" directory "my-coreutils"
+ "--input-simplification=safe")
+
+ (load file)
+ (list (package-inputs (@ (my-packages) my-coreutils))
+ (read-package-field (@ (my-packages) my-coreutils) 'inputs)))))
+
+(test-equal "input labels, 'safe' policy, nothing changed"
+ (list `(("GMP" ,gmp) ("ACL" ,acl))
+ "\
+ (inputs `((\"GMP\" ,gmp) (\"ACL\" ,acl)))\n")
+ (call-with-test-package '((inputs `(("GMP" ,gmp) ("ACL" ,acl)))
+ ;; Non-empty argument list, so potentially unsafe
+ ;; input simplification.
+ (arguments
+ '(#:configure-flags
+ (assoc-ref %build-inputs "GMP"))))
+ (lambda (directory)
+ (define file
+ (string-append directory "/my-packages.scm"))
+
+ (system* "guix" "style" "-L" directory "my-coreutils"
+ "--input-simplification=safe")
+
+ (load file)
+ (list (package-inputs (@ (my-packages) my-coreutils))
+ (read-package-field (@ (my-packages) my-coreutils) 'inputs)))))
+
+(test-equal "input labels, margin comment"
+ (list `(("gmp" ,gmp))
+ `(("acl" ,acl))
+ " (inputs (list gmp)) ;margin comment\n"
+ " (native-inputs (list acl)) ;another one\n")
+ (call-with-test-package '((inputs `(("gmp" ,gmp)))
+ (native-inputs `(("acl" ,acl))))
+ (lambda (directory)
+ (define file
+ (string-append directory "/my-packages.scm"))
+
+ (substitute* file
+ (("\"gmp\"(.*)$" _ rest)
+ (string-append "\"gmp\"" (string-trim-right rest)
+ " ;margin comment\n"))
+ (("\"acl\"(.*)$" _ rest)
+ (string-append "\"acl\"" (string-trim-right rest)
+ " ;another one\n")))
+ (system* "cat" file)
+
+ (system* "guix" "style" "-L" directory "my-coreutils")
+
+ (load file)
+ (list (package-inputs (@ (my-packages) my-coreutils))
+ (package-native-inputs (@ (my-packages) my-coreutils))
+ (read-package-field (@ (my-packages) my-coreutils) 'inputs)
+ (read-package-field (@ (my-packages) my-coreutils) 'native-inputs)))))
+
+(test-equal "input labels, margin comment on long list"
+ (list (concatenate (make-list 4 `(("gmp" ,gmp) ("acl" ,acl))))
+ "\
+ (list gmp ;margin comment
+ acl
+ gmp ;margin comment
+ acl
+ gmp ;margin comment
+ acl
+ gmp ;margin comment
+ acl))\n")
+ (call-with-test-package '((inputs `(("gmp" ,gmp) ("acl" ,acl)
+ ("gmp" ,gmp) ("acl" ,acl)
+ ("gmp" ,gmp) ("acl" ,acl)
+ ("gmp" ,gmp) ("acl" ,acl))))
+ (lambda (directory)
+ (define file
+ (string-append directory "/my-packages.scm"))
+
+ (substitute* file
+ (("\"gmp\"(.*)$" _ rest)
+ (string-append "\"gmp\"" (string-trim-right rest)
+ " ;margin comment\n")))
+ (system* "cat" file)
+
+ (system* "guix" "style" "-L" directory "my-coreutils")
+
+ (load file)
+ (list (package-inputs (@ (my-packages) my-coreutils))
+ (read-package-field (@ (my-packages) my-coreutils) 'inputs 8)))))
+
+(test-equal "input labels, line comment"
+ (list `(("gmp" ,gmp) ("acl" ,acl))
+ "\
+ (inputs (list gmp
+ ;; line comment!
+ acl))\n")
+ (call-with-test-package '((inputs `(("gmp" ,gmp) ("acl" ,acl))))
+ (lambda (directory)
+ (define file
+ (string-append directory "/my-packages.scm"))
+
+ (substitute* file
+ ((",gmp\\)(.*)$" _ rest)
+ (string-append ",gmp)\n ;; line comment!\n" rest)))
+
+ (system* "guix" "style" "-L" directory "my-coreutils")
+
+ (load file)
+ (list (package-inputs (@ (my-packages) my-coreutils))
+ (read-package-field (@ (my-packages) my-coreutils) 'inputs 3)))))
+
+(test-equal "input labels, modify-inputs and margin comment"
+ (list `(("gmp" ,gmp) ("acl" ,acl) ("mpfr" ,mpfr))
+ "\
+ (modify-inputs (package-propagated-inputs coreutils)
+ (prepend gmp ;margin comment
+ acl ;another one
+ mpfr)))\n")
+ (call-with-test-package '((inputs
+ `(("gmp" ,gmp) ("acl" ,acl) ("mpfr" ,mpfr)
+ ,@(package-propagated-inputs coreutils))))
+ (lambda (directory)
+ (define file
+ (string-append directory "/my-packages.scm"))
+
+ (substitute* file
+ ((",gmp\\)(.*)$" _ rest)
+ (string-append ",gmp) ;margin comment\n" rest))
+ ((",acl\\)(.*)$" _ rest)
+ (string-append ",acl) ;another one\n" rest)))
+
+ (system* "guix" "style" "-L" directory "my-coreutils")
+
+ (load file)
+ (list (package-inputs (@ (my-packages) my-coreutils))
+ (read-package-field (@ (my-packages) my-coreutils) 'inputs 4)))))
+
+(test-end)
+
+;; Local Variables:
+;; eval: (put 'with-test-package 'scheme-indent-function 1)
+;; eval: (put 'call-with-test-package 'scheme-indent-function 1)
+;; End:
diff --git a/tests/utils.scm b/tests/utils.scm
index 2b7db73905..648e91f242 100644
--- a/tests/utils.scm
+++ b/tests/utils.scm
@@ -3,6 +3,7 @@
;;; Copyright © 2014 Eric Bavier <bavier@member.fsf.org>
;;; Copyright © 2016 Mathieu Lirzin <mthl@gnu.org>
;;; Copyright © 2021 Simon Tournier <zimon.toutoune@gmail.com>
+;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -289,6 +290,22 @@ skip these tests."
(string-closest "hello" '("kikoo" "helo" "hihihi" "halo"))
(string-closest "hello" '("aaaaa" "12345" "hellohello" "h"))))
+(test-equal "target-linux?"
+ '(#t #f #f #t)
+ (map target-linux?
+ '("i686-linux-gnu" "i686-w64-mingw32"
+ ;; Checking that "gnu" is present is not sufficient,
+ ;; as GNU/Hurd exists.
+ "i686-pc-gnu"
+ ;; Some targets have a suffix.
+ "arm-linux-gnueabihf")))
+
+(test-equal "target-mingw?"
+ '(#f #f #t)
+ (map target-mingw?
+ '("i686-linux-gnu" "i686-pc-gnu"
+ "i686-w64-mingw32")))
+
(test-equal "target-x86-32?"
'(#f #f #f #t #t #t #t #f)
;; These are (according to Wikipedia) two RISC architectures