summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile.am3
-rw-r--r--doc/build.scm2
-rw-r--r--doc/guix.texi82
-rw-r--r--gnu/build/image.scm2
-rw-r--r--gnu/build/vm.scm4
-rw-r--r--gnu/local.mk34
-rw-r--r--gnu/packages/admin.scm40
-rw-r--r--gnu/packages/adns.scm4
-rw-r--r--gnu/packages/algebra.scm4
-rw-r--r--gnu/packages/android.scm9
-rw-r--r--gnu/packages/assembly.scm17
-rw-r--r--gnu/packages/audio.scm6
-rw-r--r--gnu/packages/autotools.scm28
-rw-r--r--gnu/packages/aux-files/python/sanity-check.py91
-rw-r--r--gnu/packages/aux-files/python/sitecustomize.py41
-rw-r--r--gnu/packages/backup.scm8
-rw-r--r--gnu/packages/base.scm166
-rw-r--r--gnu/packages/benchmark.scm2
-rw-r--r--gnu/packages/bioinformatics.scm160
-rw-r--r--gnu/packages/bison.scm17
-rw-r--r--gnu/packages/boost.scm39
-rw-r--r--gnu/packages/bootstrap.scm6
-rw-r--r--gnu/packages/build-tools.scm19
-rw-r--r--gnu/packages/cdrom.scm2
-rw-r--r--gnu/packages/certs.scm136
-rw-r--r--gnu/packages/check.scm253
-rw-r--r--gnu/packages/chez.scm18
-rw-r--r--gnu/packages/cmake.scm105
-rw-r--r--gnu/packages/commencement.scm329
-rw-r--r--gnu/packages/compression.scm60
-rw-r--r--gnu/packages/connman.scm2
-rw-r--r--gnu/packages/cpio.scm10
-rw-r--r--gnu/packages/cross-base.scm21
-rw-r--r--gnu/packages/crypto.scm2
-rw-r--r--gnu/packages/cups.scm43
-rw-r--r--gnu/packages/curl.scm16
-rw-r--r--gnu/packages/databases.scm12
-rw-r--r--gnu/packages/dbm.scm14
-rw-r--r--gnu/packages/debug.scm4
-rw-r--r--gnu/packages/display-managers.scm2
-rw-r--r--gnu/packages/django.scm79
-rw-r--r--gnu/packages/docbook.scm102
-rw-r--r--gnu/packages/ebook.scm4
-rw-r--r--gnu/packages/ed.scm4
-rw-r--r--gnu/packages/education.scm2
-rw-r--r--gnu/packages/emacs-xyz.scm2
-rw-r--r--gnu/packages/emulators.scm19
-rw-r--r--gnu/packages/engineering.scm24
-rw-r--r--gnu/packages/file.scm5
-rw-r--r--gnu/packages/fontutils.scm158
-rw-r--r--gnu/packages/game-development.scm2
-rw-r--r--gnu/packages/games.scm40
-rw-r--r--gnu/packages/gawk.scm4
-rw-r--r--gnu/packages/gcc.scm77
-rw-r--r--gnu/packages/gdb.scm7
-rw-r--r--gnu/packages/gettext.scm23
-rw-r--r--gnu/packages/ghostscript.scm3
-rw-r--r--gnu/packages/gimp.scm4
-rw-r--r--gnu/packages/gl.scm7
-rw-r--r--gnu/packages/glib.scm61
-rw-r--r--gnu/packages/gnome.scm44
-rw-r--r--gnu/packages/gnupg.scm8
-rw-r--r--gnu/packages/gpodder.scm3
-rw-r--r--gnu/packages/gps.scm2
-rw-r--r--gnu/packages/gtk.scm32
-rw-r--r--gnu/packages/guile-xyz.scm4
-rw-r--r--gnu/packages/guile.scm30
-rw-r--r--gnu/packages/ibus.scm13
-rw-r--r--gnu/packages/icu4c.scm8
-rw-r--r--gnu/packages/image.scm24
-rw-r--r--gnu/packages/inkscape.scm4
-rw-r--r--gnu/packages/jemalloc.scm4
-rw-r--r--gnu/packages/kerberos.scm7
-rw-r--r--gnu/packages/ld-wrapper.in3
-rw-r--r--gnu/packages/libevent.scm15
-rw-r--r--gnu/packages/libffi.scm23
-rw-r--r--gnu/packages/libidn.scm5
-rw-r--r--gnu/packages/libsigsegv.scm4
-rw-r--r--gnu/packages/linux.scm11
-rw-r--r--gnu/packages/lisp.scm8
-rw-r--r--gnu/packages/llvm.scm12
-rw-r--r--gnu/packages/machine-learning.scm47
-rw-r--r--gnu/packages/mail.scm4
-rw-r--r--gnu/packages/make-bootstrap.scm4
-rw-r--r--gnu/packages/man.scm27
-rw-r--r--gnu/packages/mate.scm5
-rw-r--r--gnu/packages/maths.scm88
-rw-r--r--gnu/packages/messaging.scm2
-rw-r--r--gnu/packages/mpd.scm6
-rw-r--r--gnu/packages/multiprecision.scm12
-rw-r--r--gnu/packages/music.scm17
-rw-r--r--gnu/packages/nettle.scm6
-rw-r--r--gnu/packages/networking.scm9
-rw-r--r--gnu/packages/nss.scm221
-rw-r--r--gnu/packages/onc-rpc.scm19
-rw-r--r--gnu/packages/openldap.scm42
-rw-r--r--gnu/packages/password-utils.scm4
-rw-r--r--gnu/packages/patches/bdb-5.3-atomics-on-gcc-9.patch22
-rw-r--r--gnu/packages/patches/boost-fix-transitive-linking.patch16
-rw-r--r--gnu/packages/patches/dbus-CVE-2020-12049.patch58
-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/findutils-test-rwlock-threads.patch38
-rw-r--r--gnu/packages/patches/fontconfig-hurd-path-max.patch17
-rw-r--r--gnu/packages/patches/ganeti-preserve-PYTHONPATH.patch21
-rw-r--r--gnu/packages/patches/glibc-bootstrap-system.patch38
-rw-r--r--gnu/packages/patches/glibc-dl-cache.patch140
-rw-r--r--gnu/packages/patches/icu4c-CVE-2020-10531.patch127
-rw-r--r--gnu/packages/patches/jsoncpp-fix-inverted-case.patch22
-rw-r--r--gnu/packages/patches/libtirpc-hurd-client.patch50
-rw-r--r--gnu/packages/patches/meson-for-build-rpath.patch24
-rw-r--r--gnu/packages/patches/nss-3.56-pkgconfig.patch187
-rw-r--r--gnu/packages/patches/nss-increase-test-timeout.patch4
-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/python-3-fix-tests.patch194
-rw-r--r--gnu/packages/patches/python-3-hurd-configure.patch27
-rw-r--r--gnu/packages/patches/python-3.8-fix-tests.patch42
-rw-r--r--gnu/packages/patches/python-babel-fix-parse-future-test.patch68
-rw-r--r--gnu/packages/patches/python-libxml2-python39-compat.patch94
-rw-r--r--gnu/packages/patches/python-pyflakes-fix-tests.patch40
-rw-r--r--gnu/packages/patches/python-typing-inspect-fix.patch38
-rw-r--r--gnu/packages/patches/tcsh-fix-autotest.patch11
-rw-r--r--gnu/packages/patches/zziplib-CVE-2018-16548.patch49
-rw-r--r--gnu/packages/patchutils.scm2
-rw-r--r--gnu/packages/perl-check.scm4
-rw-r--r--gnu/packages/perl.scm58
-rw-r--r--gnu/packages/photo.scm8
-rw-r--r--gnu/packages/plotutils.scm6
-rw-r--r--gnu/packages/presentation.scm4
-rw-r--r--gnu/packages/protobuf.scm17
-rw-r--r--gnu/packages/pulseaudio.scm8
-rw-r--r--gnu/packages/python-build.scm4
-rw-r--r--gnu/packages/python-check.scm60
-rw-r--r--gnu/packages/python-crypto.scm22
-rw-r--r--gnu/packages/python-web.scm55
-rw-r--r--gnu/packages/python-xyz.scm626
-rw-r--r--gnu/packages/python.scm488
-rw-r--r--gnu/packages/radio.scm6
-rw-r--r--gnu/packages/readline.scm19
-rw-r--r--gnu/packages/ruby.scm56
-rw-r--r--gnu/packages/scheme.scm6
-rw-r--r--gnu/packages/screen.scm2
-rw-r--r--gnu/packages/serialization.scm6
-rw-r--r--gnu/packages/shells.scm15
-rw-r--r--gnu/packages/simulation.scm36
-rw-r--r--gnu/packages/solidity.scm92
-rw-r--r--gnu/packages/spice.scm4
-rw-r--r--gnu/packages/sqlite.scm26
-rw-r--r--gnu/packages/statistics.scm21
-rw-r--r--gnu/packages/storage.scm7
-rw-r--r--gnu/packages/syndication.scm4
-rw-r--r--gnu/packages/task-management.scm4
-rw-r--r--gnu/packages/tex.scm1999
-rw-r--r--gnu/packages/texinfo.scm27
-rw-r--r--gnu/packages/text-editors.scm3
-rw-r--r--gnu/packages/tls.scm48
-rw-r--r--gnu/packages/tmux.scm4
-rw-r--r--gnu/packages/version-control.scm10
-rw-r--r--gnu/packages/video.scm2
-rw-r--r--gnu/packages/virtualization.scm84
-rw-r--r--gnu/packages/web.scm29
-rw-r--r--gnu/packages/wicd.scm5
-rw-r--r--gnu/packages/xdisorg.scm30
-rw-r--r--gnu/packages/xfce.scm2
-rw-r--r--gnu/packages/xml.scm58
-rw-r--r--gnu/packages/xorg.scm43
-rw-r--r--gnu/system/locale.scm3
-rw-r--r--gnu/system/shadow.scm8
-rw-r--r--gnu/system/vm.scm6
-rw-r--r--guix/build-system/cargo.scm2
-rw-r--r--guix/build-system/gnu.scm18
-rw-r--r--guix/build-system/meson.scm2
-rw-r--r--guix/build-system/python.scm8
-rw-r--r--guix/build-system/texlive.scm10
-rw-r--r--guix/build/copy-build-system.scm2
-rw-r--r--guix/build/emacs-build-system.scm16
-rw-r--r--guix/build/gnu-build-system.scm218
-rw-r--r--guix/build/gremlin.scm117
-rw-r--r--guix/build/lisp-utils.scm2
-rw-r--r--guix/build/maven/pom.scm2
-rw-r--r--guix/build/meson-build-system.scm2
-rw-r--r--guix/build/minify-build-system.scm11
-rw-r--r--guix/build/python-build-system.scm128
-rw-r--r--guix/build/rpath.scm59
-rw-r--r--guix/build/ruby-build-system.scm25
-rw-r--r--guix/build/texlive-build-system.scm42
-rw-r--r--guix/build/utils.scm187
-rw-r--r--guix/gexp.scm29
-rw-r--r--guix/packages.scm218
-rw-r--r--guix/profiles.scm48
-rw-r--r--guix/scripts/pack.scm27
-rw-r--r--guix/store/roots.scm2
-rw-r--r--guix/tests.scm43
-rw-r--r--guix/utils.scm43
-rw-r--r--tests/build-utils.scm24
-rw-r--r--tests/builders.scm121
-rw-r--r--tests/gremlin.scm66
-rw-r--r--tests/packages.scm85
200 files changed, 5533 insertions, 4784 deletions
diff --git a/Makefile.am b/Makefile.am
index ee05d79ca0..d72675abb2 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -219,7 +219,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 \
@@ -382,6 +381,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.
diff --git a/doc/build.scm b/doc/build.scm
index d77fc0a700..abdcf43d96 100644
--- a/doc/build.scm
+++ b/doc/build.scm
@@ -736,7 +736,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.texi b/doc/guix.texi
index e0f6921a90..03d012fd84 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -2772,8 +2772,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:
@@ -3512,24 +3512,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: python
-version: 3.3.5
+name: guile
+version: 3.0.2
+
+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
@@ -5598,11 +5600,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
@@ -7845,8 +7847,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
@@ -7858,6 +7861,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
@@ -8065,9 +8075,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:
@@ -8098,11 +8106,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
@@ -8443,12 +8451,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} @
@@ -33052,6 +33062,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/gnu/build/image.scm b/gnu/build/image.scm
index f6e5cb42f6..45eed0b298 100644
--- a/gnu/build/image.scm
+++ b/gnu/build/image.scm
@@ -61,7 +61,7 @@
(inexact->exact (ceiling (/ size 1024)))))
(define (estimate-partition-size root)
- "Given the ROOT directory, evalute and return its size. As this doesn't
+ "Given the ROOT directory, evaluate and return its size. As this doesn't
take the partition metadata size into account, take a 25% margin."
(* 1.25 (file-size root)))
diff --git a/gnu/build/vm.scm b/gnu/build/vm.scm
index bd59916bf3..253d9bcd31 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/local.mk b/gnu/local.mk
index b9b4b664e4..ac7c7c0f26 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -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, 2014, 2015, 2016, 2017, 2018, 2019, 2020 Andreas Enge <andreas@enge.fr>
# Copyright © 2016 Mathieu Lirzin <mthl@gnu.org>
# Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 Mark H Weaver <mhw@netris.org>
@@ -19,7 +19,7 @@
# Copyright © 2018 Amirouche Boubekki <amirouche@hypermove.net>
# Copyright © 2018, 2019, 2020, 2021 Oleg Pykhalov <go.wigust@gmail.com>
# Copyright © 2018 Stefan Stefanović <stefanx2ovic@gmail.com>
-# Copyright © 2018, 2020 Maxim Cournoyer <maxim.cournoyer@gmail.com>
+# Copyright © 2018, 2020, 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
# Copyright © 2019, 2020 Guillaume Le Vaillant <glv@posteo.net>
# Copyright © 2019, 2020 John Soo <jsoo1@asu.edu>
# Copyright © 2019 Jonathan Brielmaier <jonathan.brielmaier@web.de>
@@ -40,6 +40,7 @@
# 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>
#
# This file is part of GNU Guix.
#
@@ -514,6 +515,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 \
@@ -826,7 +828,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/aws-c-event-stream-cmake-prefix.patch \
+ %D%/packages/patches/aws-c-event-stream-cmake-prefix.patch \
%D%/packages/patches/aws-checksums-cmake-prefix.patch \
%D%/packages/patches/azr3.patch \
%D%/packages/patches/bash-reproducible-linux-pgrp-pipe.patch \
@@ -835,6 +837,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/bsd-games-2.17-64bit.patch \
%D%/packages/patches/bsd-games-add-configure-config.patch \
@@ -864,6 +867,7 @@ dist_patch_DATA = \
%D%/packages/patches/blender-2.79-oiio2.patch \
%D%/packages/patches/blender-2.79-python-3.7-fix.patch \
%D%/packages/patches/blender-2.79-python-3.8-fix.patch \
+ %D%/packages/patches/boost-fix-transitive-linking.patch \
%D%/packages/patches/bpftrace-disable-bfd-disasm.patch \
%D%/packages/patches/byobu-writable-status.patch \
%D%/packages/patches/calibre-no-updates-dialog.patch \
@@ -919,7 +923,6 @@ dist_patch_DATA = \
%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 \
@@ -932,6 +935,7 @@ dist_patch_DATA = \
%D%/packages/patches/diffutils-gets-undeclared.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 \
@@ -990,12 +994,10 @@ 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/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/fpc-reproducibility.patch \
%D%/packages/patches/fplll-std-fenv.patch \
%D%/packages/patches/freedink-engine-fix-sdl-hints.patch \
@@ -1008,7 +1010,6 @@ dist_patch_DATA = \
%D%/packages/patches/ganeti-drbd-compat.patch \
%D%/packages/patches/ganeti-haskell-pythondir.patch \
%D%/packages/patches/ganeti-os-disk-size.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/gash-utils-ls-test.patch \
@@ -1082,6 +1083,7 @@ 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-dl-cache.patch \
%D%/packages/patches/glibc-hidden-visibility-ldconfig.patch \
%D%/packages/patches/glibc-hurd-clock_gettime_monotonic.patch \
%D%/packages/patches/glibc-hurd-clock_t_centiseconds.patch \
@@ -1179,8 +1181,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 \
@@ -1217,7 +1217,6 @@ dist_patch_DATA = \
%D%/packages/patches/java-xerces-xjavac_taskdef.patch \
%D%/packages/patches/jfsutils-add-sysmacros.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/kdbusaddons-kinit-file-name.patch \
%D%/packages/patches/libffi-3.3-powerpc-fixes.patch \
@@ -1301,7 +1300,6 @@ 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/libusb-0.1-disable-tests.patch \
@@ -1357,7 +1355,6 @@ dist_patch_DATA = \
%D%/packages/patches/mediastreamer2-srtp2.patch \
%D%/packages/patches/mesa-skip-tests.patch \
%D%/packages/patches/mescc-tools-boot.patch \
- %D%/packages/patches/meson-for-build-rpath.patch \
%D%/packages/patches/metabat-fix-compilation.patch \
%D%/packages/patches/mhash-keygen-test-segfault.patch \
%D%/packages/patches/mingw-w64-6.0.0-gcc.patch \
@@ -1468,9 +1465,7 @@ dist_patch_DATA = \
%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-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 \
@@ -1527,10 +1522,7 @@ dist_patch_DATA = \
%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.9-fix-tests.patch \
- %D%/packages/patches/python-CVE-2018-14647.patch \
- %D%/packages/patches/python-CVE-2020-26116.patch \
+ %D%/packages/patches/python-3-hurd-configure.patch \
%D%/packages/patches/python-aionotify-0.2.0-py3.8.patch \
%D%/packages/patches/python-argcomplete-1.11.1-fish31.patch \
%D%/packages/patches/python-axolotl-AES-fix.patch \
@@ -1541,12 +1533,15 @@ dist_patch_DATA = \
%D%/packages/patches/python-keras-integration-test.patch \
%D%/packages/patches/python-pep8-stdlib-tokenize-compat.patch \
%D%/packages/patches/python-pyfakefs-remove-bad-test.patch \
+ %D%/packages/patches/python-pyflakes-fix-tests.patch \
%D%/packages/patches/python-flint-includes.patch \
+ %D%/packages/patches/python-libxml2-python39-compat.patch \
%D%/packages/patches/python-libxml2-utf8.patch \
%D%/packages/patches/python-mediafile-wavpack.patch \
%D%/packages/patches/python-memcached-syntax-warnings.patch \
%D%/packages/patches/python-mox3-python3.6-compat.patch \
%D%/packages/patches/python-testtools.patch \
+ %D%/packages/patches/python-typing-inspect-fix.patch \
%D%/packages/patches/python-onnx-use-system-googletest.patch \
%D%/packages/patches/python-packaging-test-arch.patch \
%D%/packages/patches/python2-parameterized-docstring-test.patch \
@@ -1757,8 +1752,7 @@ 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/yggdrasil-extra-config.patch \
- %D%/packages/patches/zziplib-CVE-2018-16548.patch
+ %D%/packages/patches/yggdrasil-extra-config.patch
MISC_DISTRO_FILES = \
%D%/packages/ld-wrapper.in
diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm
index b24d5601cf..759f12d657 100644
--- a/gnu/packages/admin.scm
+++ b/gnu/packages/admin.scm
@@ -35,6 +35,7 @@
;;; Copyright © 2020 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>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -544,7 +545,8 @@ or via the @code{facter} Ruby library.")
`(("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
@@ -620,7 +622,20 @@ re-executing them as necessary.")
(patches (search-patches "inetutils-hurd.patch"))
(sha256
(base32
- "05n65k4ixl85dc6rxc51b1b732gnmm8xnqi424dy9f1nz7ppb3xy"))))
+ "05n65k4ixl85dc6rxc51b1b732gnmm8xnqi424dy9f1nz7ppb3xy"))
+ (modules '((guix build utils)))
+ (snippet
+ '(begin
+ ;; Fix issues with GCC 10. Can be removed for versions > 1.9.4.
+ (substitute* "telnetd/utility.c"
+ (("int not42;")
+ "extern int not42;"))
+ (substitute* "ftpd/extern.h"
+ (("^jmp_buf errcatch;")
+ "extern jmp_buf errcatch;"))
+ (substitute* "ftpd/ftpd.c"
+ (("struct credentials cred;" all)
+ (string-append all "\njmp_buf errcatch;")))))))
(build-system gnu-build-system)
(arguments
`(#:configure-flags '("--localstatedir=/var"
@@ -641,10 +656,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))
@@ -1496,10 +1518,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?)
@@ -2696,7 +2715,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)))))
#t))
;; These are the tests that do not require network access.
@@ -2751,7 +2770,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)
@@ -3835,8 +3854,7 @@ support forum. It runs with the @code{/exec} command in most IRC clients.")
(modify-phases %standard-phases
(add-before 'build 'setenv-PATH
(lambda _
- (setenv "PYTHONPATH" (string-append "lib:" (getenv "PYTHONPATH")))
- #t)))))
+ (setenv "PYTHONPATH" "lib"))))))
(propagated-inputs
`(("python-pygobject" ,python-pygobject)
("python-pyudev" ,python-pyudev)))
diff --git a/gnu/packages/adns.scm b/gnu/packages/adns.scm
index 57f34942d5..a67a00284b 100644
--- a/gnu/packages/adns.scm
+++ b/gnu/packages/adns.scm
@@ -65,7 +65,7 @@ scripts.")
(define-public c-ares
(package
(name "c-ares")
- (version "1.16.0")
+ (version "1.16.1")
(source (origin
(method url-fetch)
(uri (string-append
@@ -73,7 +73,7 @@ scripts.")
".tar.gz"))
(sha256
(base32
- "129sm0wzij0mp8vdv68v18hnykcjb6ivi66wnqnnw598q7bql1fy"))))
+ "1kl6bzlcmxn0524h5qldlbh99wf96whhvk54w3p4igf3xk8150yh"))))
(build-system gnu-build-system)
(native-inputs
`(("pkg-config" ,pkg-config)))
diff --git a/gnu/packages/algebra.scm b/gnu/packages/algebra.scm
index 4699f766b5..546b058e71 100644
--- a/gnu/packages/algebra.scm
+++ b/gnu/packages/algebra.scm
@@ -245,7 +245,7 @@ the real span of the lattice.")
"14xs90wrw8mbdx08hxlbhiahp6kgjq6yh27zjw7fvhfjx5nr84f8"))))
(build-system gnu-build-system)
(native-inputs
- `(("texlive" ,(texlive-union
+ `(("texlive" ,(texlive-updmap.cfg
(list texlive-amsfonts)))))
(inputs `(("gmp" ,gmp)
("libx11" ,libx11)
@@ -717,6 +717,8 @@ binary.")
("ed" ,ed)
("flex" ,flex)
("texinfo" ,texinfo)))
+ (inputs
+ `(("readline" ,readline)))
(arguments
'(#:configure-flags
(list "--with-readline")
diff --git a/gnu/packages/android.scm b/gnu/packages/android.scm
index eb538f6540..f09d8e9522 100644
--- a/gnu/packages/android.scm
+++ b/gnu/packages/android.scm
@@ -4,7 +4,7 @@
;;; 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 Maxim Cournoyer <maxim.cournoyer@gmail.com>
+;;; Copyright © 2017, 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;; Copyright © 2018, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
;;; Copyright © 2018 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2019, 2020 Andreas Enge <andreas@enge.fr>
@@ -1026,13 +1026,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/assembly.scm b/gnu/packages/assembly.scm
index 55a1be8d54..307d261b82 100644
--- a/gnu/packages/assembly.scm
+++ b/gnu/packages/assembly.scm
@@ -9,6 +9,7 @@
;;; Copyright © 2020 Jakub Kądziołka <kuba@kadziolka.net>
;;; Copyright © 2020 Christopher Lemmer Webber <cwebber@dustycloud.org>
;;; Copyright © 2020 B. Wilson <elaexuotee@wilsonb.com>
+;;; Copyright © 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -452,19 +453,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
@@ -478,10 +479,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
@@ -496,8 +497,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)
@@ -524,8 +524,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/audio.scm b/gnu/packages/audio.scm
index 0ec163e932..565346db00 100644
--- a/gnu/packages/audio.scm
+++ b/gnu/packages/audio.scm
@@ -2023,9 +2023,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)
@@ -4636,7 +4636,7 @@ as is the case with audio plugins.")
(lambda* (#:key outputs #:allow-other-keys)
(let ((out (assoc-ref outputs "out")))
(wrap-script (string-append out "/bin/carla")
- `("PYTHONPATH" ":" prefix (,(getenv "PYTHONPATH"))))
+ `("GUIX_PYTHONPATH" ":" prefix (,(getenv "GUIX_PYTHONPATH"))))
#t))))))
(inputs
`(("alsa-lib" ,alsa-lib)
diff --git a/gnu/packages/autotools.scm b/gnu/packages/autotools.scm
index 09f4bf4122..abae71415f 100644
--- a/gnu/packages/autotools.scm
+++ b/gnu/packages/autotools.scm
@@ -6,7 +6,7 @@
;;; Copyright © 2015, 2017, 2018 Mark H Weaver <mhw@netris.org>
;;; Copyright © 2016 David Thompson <davet@gnu.org>
;;; Copyright © 2017 Nikita <nikita@n0.is>
-;;; Copyright © 2017, 2019 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2017, 2019, 2021 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
;;; Copyright © 2018 Ricardo Wurmus <rekado@elephly.net>
;;; Copyright © 2019 Pierre-Moana Levesque <pierre.moana.levesque@gmail.com>
@@ -205,9 +205,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
@@ -318,14 +318,14 @@ 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)
@@ -480,11 +480,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/python/sanity-check.py b/gnu/packages/aux-files/python/sanity-check.py
new file mode 100644
index 0000000000..355e55b240
--- /dev/null
+++ b/gnu/packages/aux-files/python/sanity-check.py
@@ -0,0 +1,91 @@
+# -*- 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:
+ # distutils (i.e. #:use-setuptools? #f) will not install any metadata.
+ 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
+ continue
+
+ # 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..65d3c7d554
--- /dev/null
+++ b/gnu/packages/aux-files/python/sitecustomize.py
@@ -0,0 +1,41 @@
+# -*- 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
+
+python_root = os.path.realpath(sys.executable).split('/bin/')[0]
+major_minor = '{}.{}'.format(sys.version_info[0], sys.version_info[1])
+site_packages_prefix = 'lib/python' + major_minor + '/site-packages'
+python_site = python_root + '/' + site_packages_prefix
+
+try:
+ all_sites_raw = os.environ['GUIX_PYTHONPATH'].split(':')
+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.
+sys_path_absolute = [os.path.realpath(p) for p in sys.path]
+index = sys_path_absolute.index(python_site)
+sys.path = sys.path[:index] + matching_sites + sys.path[index:]
diff --git a/gnu/packages/backup.scm b/gnu/packages/backup.scm
index 78c5b31bb5..c1e9de5595 100644
--- a/gnu/packages/backup.scm
+++ b/gnu/packages/backup.scm
@@ -212,7 +212,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)
@@ -223,7 +223,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)
@@ -784,8 +784,8 @@ 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")
diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm
index 9aa69cfe77..09cf401617 100644
--- a/gnu/packages/base.scm
+++ b/gnu/packages/base.scm
@@ -1,11 +1,11 @@
;;; 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>
;;; Copyright © 2014 Alex Kost <alezost@gmail.com>
;;; Copyright © 2014, 2015 Manolis Fragkiskos Ragkousis <manolis837@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, 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
;;; Copyright © 2016, 2018 Alex Vong <alexvong1995@gmail.com>
;;; Copyright © 2017 Rene Saavedra <rennes@openmailbox.org>
@@ -15,6 +15,7 @@
;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
;;; Copyright © 2018, 2019 Ricardo Wurmus <rekado@elephly.net>
;;; Copyright © 2020 Vitaliy Shatrov <D0dyBo0D0dyBo0@protonmail.com>
+;;; Copyright © 2020 Chris Marusich <cmmarusich@gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -37,6 +38,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)
@@ -96,14 +98,14 @@ 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
@@ -120,8 +122,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
@@ -144,7 +145,19 @@ including, for example, recursive directory searching.")
".tar.gz"))
(sha256
(base32
- "0alqagh0nliymz23kfjg6g9w3cr086k0sfni56gi8fhzqwa3xksk"))))
+ "0alqagh0nliymz23kfjg6g9w3cr086k0sfni56gi8fhzqwa3xksk"))
+ ;; 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)
(synopsis "Stream editor")
(native-inputs
@@ -161,14 +174,14 @@ implementation offers several extensions over the standard utility.")
(define-public tar
(package
(name "tar")
- (version "1.32")
+ (version "1.33")
(source (origin
(method url-fetch)
(uri (string-append "mirror://gnu/tar/tar-"
version ".tar.xz"))
(sha256
(base32
- "1n7xy657ii0sa42zx6944v2m4v9qrh6sqgmw17l3nch3y43sxlyh"))
+ "0zh6v6rsykgq615fk3pj271nrrbn05z59l8v64fl2fn83m5k9a36"))
(patches (search-patches "tar-skip-unreliable-tests.patch"
"tar-remove-wholesparse-check.patch"))))
(build-system gnu-build-system)
@@ -196,8 +209,7 @@ 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.
@@ -272,16 +284,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
@@ -293,8 +304,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
@@ -320,6 +330,7 @@ used to apply commands with arbitrarily long arguments.")
(patches (search-patches "coreutils-ls.patch"))))
(build-system gnu-build-system)
(inputs `(("acl" ,acl) ; TODO: add SELinux
+ ("attr" ,attr) ;for xattrs in ls, mv, etc
("gmp" ,gmp) ;bignums in 'expr', yay!
;; Do not use libcap when cross-compiling since it's not quite
@@ -365,15 +376,13 @@ 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))
+ (("#!/bin/sh") (string-append "#!" (which "sh"))))))
,@(if (hurd-target?)
`((add-after 'unpack 'remove-tests
(lambda _
(substitute* "Makefile.in"
;; this test hangs
- (("^ *tests/misc/timeout-group.sh.*") ""))
- #t)))
+ (("^ *tests/misc/timeout-group.sh.*") "")))))
'()))))
(synopsis "Core GNU utilities (file, text, shell)")
(description
@@ -418,8 +427,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
@@ -451,8 +459,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
@@ -486,20 +493,19 @@ 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")
+ (version "2.36")
(source (origin
(method url-fetch)
(uri (string-append "mirror://gnu/binutils/binutils-"
version ".tar.bz2"))
(sha256
(base32
- "1rin1f5c7wm4n3piky6xilcrpf2s0n3dd5vqq8irrxkcic3i1w49"))
+ "13cfscz165p0spals44nzdhjl8l9c9yyixysjajqrhksvj8gd7i0"))
(patches (search-patches "binutils-loongson-workaround.patch"))))
(build-system gnu-build-system)
@@ -524,17 +530,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
@@ -547,18 +543,6 @@ 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 '())))
-
;; FIXME: ath9k-firmware-htc-binutils.patch do not apply on 2.34 because of a
;; big refactoring of xtensa-modules.c (commit 567607c11fbf7105 upstream).
;; Keep this version around until the patch is updated.
@@ -579,7 +563,7 @@ included.")
(properties '())))
(define-public binutils-gold
- (package/inherit binutils+documentation
+ (package/inherit binutils
(name "binutils-gold")
(arguments
`(#:phases
@@ -587,8 +571,7 @@ included.")
(add-after 'patch-source-shebangs 'patch-more-shebangs
(lambda _
(substitute* "gold/Makefile.in"
- (("/bin/sh") (which "sh")))
- #t)))
+ (("/bin/sh") (which "sh"))))))
,@(substitute-keyword-arguments (package-arguments binutils)
; Upstream is aware of unrelocatable test failures on arm*.
((#:tests? _ #f)
@@ -687,24 +670,15 @@ the store.")
;; version 2.28, GNU/Hurd used a different glibc branch.
(package
(name "glibc")
- (version "2.31")
+ (version "2.32")
(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)))
+ "0di848ibffrnwq7g2dvgqrnn4xqhj3h96csn69q4da51ymafl9qn"))
(patches (search-patches "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"
@@ -712,7 +686,9 @@ the store.")
"glibc-supported-locales.patch"
"glibc-hurd-clock_t_centiseconds.patch"
"glibc-hurd-clock_gettime_monotonic.patch"
- "glibc-hurd-signal-sa-siginfo.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
@@ -785,6 +761,11 @@ the store.")
'("--disable-werror")
'()))
+ ;; Arrange so that /etc/rpc & co. go to $out/etc.
+ #:make-flags (list (string-append "sysconfdir="
+ (assoc-ref %outputs "out")
+ "/etc"))
+
#:tests? #f ; XXX
#:phases (modify-phases %standard-phases
(add-before
@@ -812,6 +793,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.*$")
@@ -847,9 +833,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)
@@ -887,8 +871,7 @@ the store.")
((out) static)))
(filter linker-script?
(map (cut string-append slib "/" <>)
- files)))
- #t)))
+ files))))))
,@(if (hurd-target?)
'((add-after 'install 'augment-libc.so
@@ -897,8 +880,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)))
@@ -939,6 +921,17 @@ 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.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"))))))
+
(define-public glibc-2.30
(package
(inherit glibc)
@@ -1096,8 +1089,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)
@@ -1237,8 +1229,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
@@ -1302,8 +1293,7 @@ command.")
(copy-recursively (string-append out "/share/zoneinfo-leaps")
(string-append out "/share/zoneinfo/right"))
(delete-file-recursively
- (string-append out "/share/zoneinfo-leaps"))
- #t)))
+ (string-append out "/share/zoneinfo-leaps")))))
(delete 'configure))))
(inputs `(("tzcode" ,(origin
(method url-fetch)
@@ -1331,7 +1321,7 @@ and daylight-saving rules.")
(hidden-package
(package
(inherit tzdata)
- (version "2019c")
+ (version "2020d")
(source (origin
(method url-fetch)
(uri (string-append
@@ -1339,7 +1329,7 @@ and daylight-saving rules.")
version ".tar.gz"))
(sha256
(base32
- "0z7w1yv37cfk8yhix2cillam091vgp1j4g8fv84261q9mdnq1ivr"))))
+ "1wxskk9mh1x2073n99qna2mq58mgi648mbq5dxlqfcrnvrbkk0cd"))))
(inputs
`(("tzcode" ,(origin
(method url-fetch)
@@ -1348,7 +1338,7 @@ and daylight-saving rules.")
version ".tar.gz"))
(sha256
(base32
- "1m3y2rnf1nggxxhxplab5zdd5whvar3ijyrv7lifvm82irkd7szn")))))))))
+ "1mgsckixmmk9qxzsflfxnp3999qi3ls72bgksclk01g852x51w3c")))))))))
(define-public libiconv
(package
@@ -1365,11 +1355,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/benchmark.scm b/gnu/packages/benchmark.scm
index 3470f3860b..6c04b23f43 100644
--- a/gnu/packages/benchmark.scm
+++ b/gnu/packages/benchmark.scm
@@ -103,7 +103,7 @@
"fiologparser.py"))
;; Make sure numpy et.al is found.
(wrap-program (string-append newbin "/fiologparser_hist.py")
- `("PYTHONPATH" ":" prefix (,(getenv "PYTHONPATH"))))
+ `("GUIX_PYTHONPATH" ":" prefix (,(getenv "GUIX_PYTHONPATH"))))
#t))))))
(outputs '("out" "utils"))
(inputs
diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm
index 39611d23f4..77af190659 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>
@@ -210,8 +210,7 @@ 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.
@@ -231,37 +230,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)
@@ -818,9 +802,7 @@ intended to behave exactly the same as the original BWK awk.")
"14w5i40gi25clrr7h4wa2pcpnyipya8hrqi7nq77553zc5wf0df0"))))
(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
@@ -846,10 +828,7 @@ intended to behave exactly the same as the original BWK awk.")
;; This issue still occurs on python2
(substitute* "pybedtools/test/test_issues.py"
(("def test_issue_303")
- "def _test_issue_303"))
- #t))
- ;; TODO: Remove phase after it's part of PYTHON-BUILD-SYSTEM.
- ;; build system.
+ "def _test_issue_303"))))
;; Force the Cythonization of C++ files to guard against compilation
;; problems.
(add-after 'unpack 'remove-cython-generated-files
@@ -861,30 +840,12 @@ intended to behave exactly the same as the original BWK awk.")
(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* ((cwd (getcwd))
- (build-root-directory (string-append cwd "/build/"))
- (build (string-append
- build-root-directory
- (find (cut string-prefix? "lib" <>)
- (scandir (string-append
- build-root-directory)))))
- (scripts (string-append
- build-root-directory
- (find (cut string-prefix? "scripts" <>)
- (scandir build-root-directory)))))
- (setenv "PYTHONPATH"
- (string-append build ":" (getenv "PYTHONPATH")))
- ;; Executable scripts such as 'intron_exon_reads.py' must be
- ;; available in the PATH.
- (setenv "PATH"
- (string-append scripts ":" (getenv "PATH"))))
;; The tests need to be run from elsewhere...
(mkdir-p "/tmp/test")
(copy-recursively "pybedtools/test" "/tmp/test")
@@ -1941,15 +1902,10 @@ multiple sequence alignments.")
(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)
@@ -1959,22 +1915,16 @@ multiple sequence alignments.")
(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 inputs outputs #:allow-other-keys)
+ (lambda _
;; This file contains tests that require a connection to the
;; internet.
(delete-file "tests/tabix_test.py")
- ;; FIXME: This test fails
+ ;; 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? "." <>))))))
+ (delete-file "tests/AlignedSegment_test.py")
;; Step out of source dir so python does not import from CWD.
(with-directory-excursion "tests"
(setenv "HOME" "/tmp")
@@ -2315,9 +2265,9 @@ gene predictor designed to work with assembled, aligned RNA-seq transcripts.")
(lambda* (#:key inputs outputs #:allow-other-keys)
;; Make sure 'couger' runs with the correct PYTHONPATH.
(let* ((out (assoc-ref outputs "out"))
- (path (getenv "PYTHONPATH")))
+ (path (getenv "GUIX_PYTHONPATH")))
(wrap-program (string-append out "/bin/couger")
- `("PYTHONPATH" ":" prefix (,path))))
+ `("GUIX_PYTHONPATH" ":" prefix (,path))))
#t)))))
(inputs
`(("python" ,python-2)
@@ -2980,19 +2930,14 @@ data and settings.")
(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)))))
+ #t)))))
(inputs
`(("boost" ,boost)
("cairo" ,cairo)
("rmath-standalone" ,rmath-standalone)))
(native-inputs
- `(("texlive" ,(texlive-union (list texlive-fonts-cm
- texlive-fonts-amsfonts
+ `(("texlive" ,(texlive-updmap.cfg (list texlive-cm
+ texlive-amsfonts
texlive-latex-doi
texlive-latex-examplep
@@ -6431,25 +6376,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)
@@ -10922,7 +10848,7 @@ matplotlib.use('Agg')
" line)))
;; Make sure GESS has all modules in its path
(wrap-script (string-append target "GESS.py")
- `("PYTHONPATH" ":" = (,target ,(getenv "PYTHONPATH"))))
+ `("GUIX_PYTHONPATH" ":" = (,target ,(getenv "GUIX_PYTHONPATH"))))
(mkdir-p bin)
(symlink (string-append target "GESS.py")
(string-append bin "GESS.py"))
@@ -11869,11 +11795,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)
@@ -13101,11 +13023,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"
@@ -13150,11 +13072,7 @@ in RNA-seq data.")
(delete-file "scanpy/tests/test_preprocessing.py")
(delete-file "scanpy/tests/test_read_10x.py")
- (setenv "PYTHONPATH"
- (string-append (getcwd) ":"
- (getenv "PYTHONPATH")))
- (invoke "pytest")
- #t)))))
+ (invoke "pytest"))))))
(propagated-inputs
`(("python-anndata" ,python-anndata)
("python-h5py" ,python-h5py)
@@ -14051,10 +13969,10 @@ datasets.")
(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 _
@@ -14128,7 +14046,7 @@ choosing which reads pass the filter.")
(add-after 'install 'wrap-programs
(lambda* (#:key outputs #:allow-other-keys)
(for-each (lambda (file)
- (wrap-program file `("PYTHONPATH" ":" prefix (,path))))
+ (wrap-program file `("GUIX_PYTHONPATH" ":" prefix (,path))))
(find-files "/share/nanopolish/scripts" "\\.py"))
(for-each (lambda (file)
(wrap-program file `("PERL5LIB" ":" prefix (,path))))
@@ -14343,7 +14261,7 @@ to an artifact/contaminant file.")
`(("openmpi" ,openmpi)
("zlib" ,zlib)))
(native-inputs
- `(("texlive" ,(texlive-union (list texlive-latex-graphics
+ `(("texlive" ,(texlive-updmap.cfg (list texlive-latex-graphics
texlive-latex-hyperref)))))
(home-page "https://www.ebi.ac.uk/~zerbino/velvet/")
(synopsis "Nucleic acid sequence assembler for very short reads")
diff --git a/gnu/packages/bison.scm b/gnu/packages/bison.scm
index 4c6da7d9b7..6e27de5a12 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.5")
(source
(origin
(method url-fetch)
@@ -41,7 +41,7 @@
version ".tar.xz"))
(sha256
(base32
- "1i57hbczvr8674z73775jxdd3y59qggs5lmfd60gmwm5i1gmpy1b"))))
+ "1aridd55c3alxw9ryqh91gq57zcjr8qmxwnh49k66v9rpk2kpig8"))))
(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/boost.scm b/gnu/packages/boost.scm
index b1ab8a4ec9..bc0e95b1ba 100644
--- a/gnu/packages/boost.scm
+++ b/gnu/packages/boost.scm
@@ -8,12 +8,14 @@
;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
;;; Copyright © 2018 Arun Isaac <arunisaac@systemreboot.net>
;;; Copyright © 2018, 2019 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>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -61,21 +63,17 @@
(define-public boost
(package
(name "boost")
- (version "1.72.0")
+ (version "1.75.0")
(source (origin
(method url-fetch)
(uri (string-append "https://dl.bintray.com/boostorg/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")))
+ ; Should be included in next Boost update
+ (patches (search-patches "boost-fix-transitive-linking.patch"))
(sha256
(base32
- "08h7cv61fd0lzb4z50xanfqn0pdgvizjrpd1kcdgj725pisb5jar"))))
+ "1js9zpij58l60kx46s3lxdp5207igppjnhqigwhbpdvd04gb6gcm"))))
(build-system gnu-build-system)
(inputs `(("icu4c" ,icu4c)
("zlib" ,zlib)))
@@ -83,7 +81,7 @@
`(("perl" ,perl)
,@(if (%current-target-system)
'()
- `(("python" ,python-wrapper)))
+ `(("python" ,python-minimal-wrapper)))
("tcsh" ,tcsh)))
(arguments
`(#:imported-modules ((guix build python-build-system)
@@ -124,8 +122,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"))
@@ -140,13 +137,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)
@@ -199,14 +192,6 @@ across a broad spectrum of applications.")
(license (license:x11-style "https://www.boost.org/LICENSE_1_0.txt"
"Some components have other similar licences."))))
-(define-public boost-with-python2
- (package
- (inherit boost)
- (name "boost-python2")
- (native-inputs
- `(("python" ,python-2)
- ,@(alist-delete "python" (package-native-inputs boost))))))
-
(define-public boost-with-python3
(deprecated-package "boost-with-python3" boost))
diff --git a/gnu/packages/bootstrap.scm b/gnu/packages/bootstrap.scm
index c39e60ec8b..fee2ae1199 100644
--- a/gnu/packages/bootstrap.scm
+++ b/gnu/packages/bootstrap.scm
@@ -5,6 +5,7 @@
;;; Copyright © 2018, 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
;;; Copyright © 2019 Carl Dong <contact@carldong.me>
;;; Copyright © 2019 Léo Le Bouter <lle-bout@zaclys.net>
+;;; Copyright © 2020 Jakub Kądziołka <kuba@kadziolka.net>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -740,9 +741,12 @@ exec ~a/bin/.gcc-wrapped -B~a/lib \
"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 63417e5b81..dc2411801c 100644
--- a/gnu/packages/build-tools.scm
+++ b/gnu/packages/build-tools.scm
@@ -216,7 +216,7 @@ files and generates build instructions for the Ninja build system.")
(define-public meson
(package
(name "meson")
- (version "0.53.2")
+ (version "0.56.2")
(source (origin
(method url-fetch)
(uri (string-append "https://github.com/mesonbuild/meson/"
@@ -224,7 +224,7 @@ files and generates build instructions for the Ninja build system.")
version ".tar.gz"))
(sha256
(base32
- "07y2hh9dfn1m9g4bsy49nbn3vdmd0b2iwr8bxg19fhqq6c7q73ry"))))
+ "1x47vc7023w8w90r6jda5hk2jsh68i66x49gckdgixw32fwvvf1w"))))
(build-system python-build-system)
(arguments
`(;; FIXME: Tests require many additional inputs, a fix for the RUNPATH
@@ -253,7 +253,7 @@ resembles Python.")
(define-public meson-0.55
(package
(inherit meson)
- (version "0.55.1")
+ (version "0.55.3")
(source (origin
(method url-fetch)
(uri (string-append "https://github.com/mesonbuild/meson/"
@@ -261,18 +261,7 @@ resembles Python.")
version ".tar.gz"))
(sha256
(base32
- "1070kjiirxxdfppmrhi3wsc6rykay1zlciqrzayjhjg0hkw42mrv"))))))
-
-(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)))))
+ "19cjy24mfaswxyvqmns6rd7hx05ybqb663zlgklspfr8l4jjmvbb"))))))
(define-public premake4
(package
diff --git a/gnu/packages/cdrom.scm b/gnu/packages/cdrom.scm
index a8da7ba48b..b2d593d823 100644
--- a/gnu/packages/cdrom.scm
+++ b/gnu/packages/cdrom.scm
@@ -1039,7 +1039,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/certs.scm b/gnu/packages/certs.scm
index b72d927c0d..5bdf3b5a4a 100644
--- a/gnu/packages/certs.scm
+++ b/gnu/packages/certs.scm
@@ -4,6 +4,8 @@
;;; Copyright © 2016, 2017 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>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -23,120 +25,82 @@
(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 build-system gnu)
#:use-module (guix build-system trivial)
#:use-module (gnu packages)
- #:use-module (gnu packages python)
+ #:use-module (gnu packages nss)
#:use-module (gnu packages perl)
#:use-module (gnu packages tls))
(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/")))
+ (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)
+ (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)
- (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))))))
-
+ (let ((certsdir (string-append %output "/etc/ssl/certs/")))
+ (with-directory-excursion "lib/ckfw/builtins/"
+ (unless (file-exists? "blacklist.txt")
+ (call-with-output-file "blacklist.txt" (const #t)))
+ ;; Extract selected single certificates from blob.
+ (invoke "certdata2pem")
+ ;; Copy .crt files into the output.
+ (for-each (cut install-file <> certsdir)
+ (find-files "." ".*\\.crt$")))
+ (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 7163086ae0..0c1085cac9 100644
--- a/gnu/packages/check.scm
+++ b/gnu/packages/check.scm
@@ -35,7 +35,7 @@
;;; Copyright © 2020 Josh Marshall <joshua.r.marshall.1991@gmail.com>
;;; Copyright © 2020 Vinicius Monego <monego@posteo.net>
;;; Copyright © 2020 Tanguy Le Carrour <tanguy@bioneland.org>
-;;; Copyright © 2020 Maxim Cournoyer <maxim.cournoyer@gmail.com>
+;;; Copyright © 2020, 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -931,39 +931,40 @@ standard library.")
(define-public python-pytest
(package
(name "python-pytest")
- (version "5.3.5")
+ (version "6.2.1")
(source
(origin
(method url-fetch)
(uri (pypi-uri "pytest" version))
(sha256
(base32
- "139i9cjhrv5aici3skq8iihvfb3lq0d8xb5j7qycr2hlk8cfjpqd"))))
+ "01n3jny7m05r6g7gphbkj2xdms75ql93x69crd377hlvi6qikr36"))))
(build-system python-build-system)
(arguments
`(#:phases
(modify-phases %standard-phases
(replace 'check
(lambda* (#:key (tests? #t) #:allow-other-keys)
+ (setenv "TERM" "dumb") ;attempt disabling markup tests
(if tests?
(invoke "pytest" "-vv" "-k"
(string-append
- ;; 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 involve 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`.
@@ -973,6 +974,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")
@@ -983,45 +985,6 @@ and many external plugins.")
(license license:expat)
(properties `((python2-variant . ,(delay python2-pytest))))))
-(define-public python-pytest-6
- (package
- (inherit (strip-python2-variant python-pytest))
- (version "6.1.2")
- (source
- (origin
- (method url-fetch)
- (uri (pypi-uri "pytest" version))
- (sha256
- (base32
- "0gl2sdm322vzmsh5k4f8kj9raiq2y7kdinnca4m45ifvii5fk9y0"))))
- (arguments
- `(#:phases
- (modify-phases %standard-phases
- (replace 'check
- (lambda* (#:key (tests? #t) #:allow-other-keys)
- (setenv "TERM" "dumb") ;attempt disabling markup tests
- (if tests?
- (invoke "pytest" "-vv" "-k"
- (string-append
- ;; This test involve 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~%"))
- #t)))))
- (propagated-inputs
- (append (alist-delete "python-py"
- (package-propagated-inputs python-pytest))
- `(("python-py" ,python-py-next))))
- (native-inputs
- (append (alist-delete "python-pytest"
- (package-native-inputs python-pytest))
- `(("python-pytest" ,python-pytest-6-bootstrap)
- ("python-toml" ,python-toml)
- ("python-iniconfig" ,python-iniconfig))))))
-
;; Pytest 4.x are the last versions that support Python 2.
(define-public python2-pytest
(package
@@ -1062,19 +1025,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
@@ -1266,20 +1222,25 @@ same arguments.")
#t))))
(build-system python-build-system)
(arguments
- '(#:tests? #f)) ;FIXME: Some tests are failing.
- ;; #:phases
- ;; (modify-phases %standard-phases
- ;; (delete 'check)
- ;; (add-after 'install 'check
- ;; (lambda* (#:key inputs outputs #:allow-other-keys)
- ;; (add-installed-pythonpath inputs outputs)
- ;; (zero? (system* "py.test" "-v")))))
+ '(#:tests? #f ; Lots of tests fail.
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'patch-setup-py
+ (lambda _
+ ;; Relax pytest requirement.
+ (substitute* "setup.py"
+ (("pytest>=6\\.0\\.0") "pytest"))))
+ (replace 'check
+ (lambda* (#:key tests? #:allow-other-keys)
+ (when tests?
+ (invoke "py.test" "-v")))))))
(native-inputs
`(("python-setuptools-scm" ,python-setuptools-scm)))
(propagated-inputs
`(("python-execnet" ,python-execnet)
("python-pytest" ,python-pytest)
- ("python-py" ,python-py)))
+ ("python-py" ,python-py)
+ ("python-pytest-forked" ,python-pytest-forked)))
(home-page
"https://github.com/pytest-dev/pytest-xdist")
(synopsis
@@ -1329,19 +1290,18 @@ timeout has been exceeded.")
(define-public python-pytest-forked
(package
(name "python-pytest-forked")
- (version "1.1.3")
+ (version "1.3.0")
(source
(origin
(method url-fetch)
(uri (pypi-uri "pytest-forked" version))
(sha256
(base32
- "000i4q7my2fq4l49n8idx2c812dql97qv6qpm2vhrrn9v6g6j18q"))))
+ "1jip9qh115zcg1rn7irqx5qycb9k248d5imy86f566md01zaraba"))))
(build-system python-build-system)
- (propagated-inputs
- `(("python-pytest" ,python-pytest)))
(native-inputs
- `(("python-setuptools-scm" ,python-setuptools-scm)))
+ `(("python-pytest" ,python-pytest)
+ ("python-setuptools-scm" ,python-setuptools-scm)))
(home-page
"https://github.com/pytest-dev/pytest-forked")
(synopsis
@@ -1560,7 +1520,12 @@ protocol.")))
(base32
"1vxj29bzz3rd4pcy51d05wng9q9dh4jq6wx92yklsm7i6h1ddw7w"))))
(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)))
@@ -1929,13 +1894,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.
@@ -1952,18 +1917,6 @@ 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")))
-
;; This is the last version of Hypothesis that supports Python 2.
(define-public python2-hypothesis
(let ((hypothesis (package-with-python2
@@ -1983,19 +1936,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
@@ -2045,7 +1998,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
@@ -2339,20 +2303,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
@@ -2591,48 +2545,35 @@ retried.")
(package-with-python2 python-flaky))
(define-public python-pyhamcrest
- ;; The latest release was in 2016 and its test suite does not work with recent
- ;; versions of Pytest. Just take the master branch for now, which seems stable.
- (let ((commit "25fdc5f00bdf3084335353bc9247253098ec4cf2")
- (revision "0"))
- (package
- (name "python-pyhamcrest")
- (version (git-version "1.9.0" revision commit))
- (source (origin
- ;; Tests not distributed from pypi release.
- (method git-fetch)
- (uri (git-reference
- (url "https://github.com/hamcrest/PyHamcrest")
- (commit commit)))
- (file-name (git-file-name name version))
- (sha256
- (base32
- "1miqmhhi68vaix8sqc1lvpvbm27bacffxh5anm5cbfsvk7g9n6f3"))))
- (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)))
- (propagated-inputs
- `(("python-six" ,python-six)))
- (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"))))))
- (home-page "http://hamcrest.org/")
- (synopsis "Hamcrest matchers for Python")
- (description
- "PyHamcrest is a framework for writing matcher objects,
- allowing you to declaratively define \"match\" rules.")
- (license license:bsd-3))))
-
-(define-public python2-pyhamcrest
- (package-with-python2 python-pyhamcrest))
+ (package
+ (name "python-pyhamcrest")
+ (version "2.0.2")
+ (source (origin
+ ;; Tests not distributed from pypi release.
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/hamcrest/PyHamcrest")
+ (commit (string-append "V" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "05kdzlhs2kvj82pfca13qszszcj6dyrk4b9pbr46x06sq2s4qyls"))))
+ (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
+ (replace 'check
+ (lambda _
+ (invoke "pytest" "-vv"))))))
+ (home-page "http://hamcrest.org/")
+ (synopsis "Hamcrest matchers for Python")
+ (description "PyHamcrest is a framework for writing matcher objects,
+allowing you to declaratively define \"match\" rules.")
+ (license license:bsd-3)))
(define-public unittest-cpp
(package
@@ -2802,13 +2743,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/chez.scm b/gnu/packages/chez.scm
index eac556c4d0..11cd04c161 100644
--- a/gnu/packages/chez.scm
+++ b/gnu/packages/chez.scm
@@ -88,7 +88,7 @@
("zlib:static" ,zlib "static")
("stex" ,stex)))
(native-inputs
- `(("texlive" ,(texlive-union (list texlive-latex-oberdiek
+ `(("texlive" ,(texlive-updmap.cfg (list texlive-latex-oberdiek
texlive-generic-epsf)))
("ghostscript" ,ghostscript)
("netpbm" ,netpbm)))
@@ -273,13 +273,13 @@ and 32-bit PowerPC architectures.")
(native-inputs
`(("chez-scheme" ,chez-scheme)
("ghostscript" ,ghostscript)
- ("texlive" ,(texlive-union (list texlive-latex-oberdiek
+ ("texlive" ,(texlive-updmap.cfg (list texlive-latex-oberdiek
texlive-generic-epsf
texlive-metapost
texlive-fonts-charter
- texlive-generic-pdftex
- texlive-context-base
- texlive-fonts-cm
+ texlive-pdftex
+ texlive-context
+ texlive-cm
texlive-tex-plain)))))
(arguments
`(#:make-flags (list (string-append "PREFIX=" %output)
@@ -290,12 +290,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)
@@ -338,7 +332,7 @@ programming in Scheme.")
(native-inputs
`(("chez-scheme" ,chez-scheme)
("chez-web" ,chez-web)
- ("texlive" ,(texlive-union (list texlive-generic-pdftex)))))
+ ("texlive" ,(texlive-updmap.cfg (list texlive-pdftex)))))
(arguments
`(#:tests? #f ; no tests
#:phases
diff --git a/gnu/packages/cmake.scm b/gnu/packages/cmake.scm
index ab74650066..bee721e15b 100644
--- a/gnu/packages/cmake.scm
+++ b/gnu/packages/cmake.scm
@@ -101,7 +101,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")))
@@ -114,20 +113,26 @@ using the CMake build system.")
;; This test requires network access.
"CTestTestUpload"
;; 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"
+ ;; This test requires the bundled libuv.
+ "BootstrapTest"))
(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.19.2")
(source (origin
(method url-fetch)
(uri (string-append "https://cmake.org/files/v"
@@ -135,7 +140,7 @@ using the CMake build system.")
"/cmake-" version ".tar.gz"))
(sha256
(base32
- "1z4bb8z6b4dvq5hrvajrf1hyybqay3xybyimf71w1jgcp180nxjz"))
+ "1w67w0ak6vf37501dlz9yhnzlvvpw1w10n2nm3hi7yxp4cxzvq73"))
(modules '((guix build utils)
(ice-9 ftw)))
(snippet
@@ -233,14 +238,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
@@ -286,9 +290,8 @@ and workspaces that can be used in the compiler environment of your choice.")
(define preserved-files ',%preserved-third-party-files))
exp))))))
(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
@@ -303,6 +306,15 @@ and workspaces that can be used in the compiler environment of your choice.")
#:phases
(modify-phases %standard-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
@@ -326,39 +338,6 @@ and workspaces that can be used in the compiler environment of your choice.")
(package
(inherit cmake-minimal)
(name "cmake")
- (version "3.19.2")
- ;; 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
- "1w67w0ak6vf37501dlz9yhnzlvvpw1w10n2nm3hi7yxp4cxzvq73"))
- (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.
@@ -380,42 +359,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 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"))
@@ -428,6 +372,9 @@ and workspaces that can be used in the compiler environment of your choice.")
(string-append doc html))
(delete-file-recursively (string-append out html))
#t)))))))
+ (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/commencement.scm b/gnu/packages/commencement.scm
index 432910d7a3..22ec5a04ec 100644
--- a/gnu/packages/commencement.scm
+++ b/gnu/packages/commencement.scm
@@ -1,14 +1,15 @@
;;; 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 © 2020 Timothy Sample <samplet@ngyro.com>
;;; Copyright © 2020 Guy Fleury Iteriteka <gfleury@disroot.org>
+;;; Copyright © 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -54,6 +55,7 @@
#: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)
@@ -115,8 +117,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"))))))
@@ -162,8 +163,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)))))
@@ -189,8 +189,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~%")
@@ -216,8 +215,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"))
@@ -246,8 +244,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)))))
@@ -437,8 +434,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")
@@ -572,8 +568,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"
@@ -635,13 +630,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")))
@@ -693,16 +686,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")))
@@ -758,8 +749,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"
@@ -772,8 +762,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)
@@ -788,20 +777,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")))
@@ -811,8 +796,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.
@@ -845,8 +829,7 @@ $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))
+ (chdir (string-append "tcc-" ,version))))
;; no patch yet
;; (add-after 'unpack 'apply-boot-patch
;; (lambda* (#:key inputs #:allow-other-keys)
@@ -857,8 +840,7 @@ $MES -e '(mescc)' module/mescc.scm -- \"$@\"
(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"))
@@ -918,57 +900,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.
@@ -1001,8 +934,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))))))
@@ -1038,8 +970,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")))
@@ -1047,16 +978,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))))
@@ -1104,14 +1035,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)
@@ -1183,8 +1112,7 @@ $MES -e '(mescc)' module/mescc.scm -- \"$@\"
(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)))
+ (system* "patch" "--force" "-p1" "-i" patch-file))))
(add-before 'configure 'setenv
(lambda* (#:key outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))
@@ -1232,8 +1160,7 @@ ac_cv_c_float_format='IEEE (little-endian)'
(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))))))
+ "libc.o" "libtcc1.o")))))))
(native-search-paths
(list (search-path-specification
(variable "C_INCLUDE_PATH")
@@ -1276,8 +1203,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.
@@ -1328,8 +1254,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"))
@@ -1344,8 +1269,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
@@ -1422,8 +1346,7 @@ ac_cv_c_float_format='IEEE (little-endian)'
(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)))
+ (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)
@@ -1440,8 +1363,7 @@ ac_cv_c_float_format='IEEE (little-endian)'
(("INSTALL = scripts/") "INSTALL = $(..)./scripts/")
(("BASH = ") (string-append
"SHELL = " shell "
- BASH = ")))
- #t))))))))
+ BASH = ")))))))))))
(define gcc-mesboot0
(package
@@ -1464,8 +1386,7 @@ ac_cv_c_float_format='IEEE (little-endian)'
(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"))
@@ -1542,14 +1463,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.
@@ -1586,8 +1505,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
@@ -1612,8 +1530,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
@@ -1676,8 +1593,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
@@ -1712,8 +1628,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
@@ -1744,8 +1659,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
@@ -1788,14 +1702,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")))
@@ -1803,8 +1715,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")))
@@ -1814,8 +1725,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)
@@ -1941,8 +1851,7 @@ ac_cv_c_float_format='IEEE (little-endian)'
(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))
+ (system* "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)
@@ -1966,8 +1875,7 @@ ac_cv_c_float_format='IEEE (little-endian)'
(package-full-name lib "-")
char-set:letter)
,(package-name lib)))
- (list gmp-boot mpfr-boot mpc-boot))
- #t)))
+ (list gmp-boot mpfr-boot mpc-boot)))))
(add-before 'configure 'setenv
(lambda* (#:key outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))
@@ -1985,8 +1893,8 @@ ac_cv_c_float_format='IEEE (little-endian)'
(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))))))))
+ (format (current-error-port) "LIBRARY_PATH=~a\n"
+ (getenv "LIBRARY_PATH"))))))))))
(define gcc-mesboot1
(package
@@ -2016,8 +1924,7 @@ ac_cv_c_float_format='IEEE (little-endian)'
(add-before 'unpack 'unpack-g++
(lambda _
(let ((source-g++ (assoc-ref %build-inputs "gcc-g++")))
- (invoke "tar" "xvf" source-g++))
- #t))
+ (invoke "tar" "xvf" source-g++))))
(replace 'setenv
(lambda _
(setenv "CONFIG_SHELL" (which "sh"))
@@ -2029,8 +1936,7 @@ ac_cv_c_float_format='IEEE (little-endian)'
;; 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))))))))
+ (setenv "CPLUS_INCLUDE_PATH" (getenv "C_INCLUDE_PATH"))))))))))
(define (%boot-mesboot2-inputs)
`(("gcc" ,gcc-mesboot1)
@@ -2171,8 +2077,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)
@@ -2224,8 +2129,7 @@ ac_cv_c_float_format='IEEE (little-endian)'
(replace 'unpack
(lambda* (#:key source #:allow-other-keys)
(invoke "tar" "xvf" source)
- (chdir (string-append "glibc-" ,version))
- #t))
+ (chdir (string-append "glibc-" ,version))))
(replace 'setenv
(lambda* (#:key inputs #:allow-other-keys)
(let* ((headers (assoc-ref inputs "headers"))
@@ -2247,15 +2151,13 @@ ac_cv_c_float_format='IEEE (little-endian)'
;; avoid -fstack-protector
(setenv "libc_cv_ssp" "false")
(substitute* "configure"
- (("/bin/pwd") "pwd"))
- #t)))
+ (("/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")))
- (and (apply invoke "make" make-flags)
- (copy-recursively kernel-headers out)
- #t))))
+ (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))
@@ -2284,8 +2186,7 @@ SHELL := " shell "
(invoke "make" (string-append (getcwd) "/sysd-sorted" ))
(substitute* "sysd-sorted"
((" sunrpc") " ")
- ((" nis") " "))
- #t)))))))))
+ ((" nis") " ")))))))))))
(define glibc-mesboot
(package
@@ -2306,9 +2207,8 @@ SHELL := " shell "
(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)))))))))))
+ (apply invoke "make" install-flags)
+ (copy-recursively kernel-headers out)))))))))))
(define (%boot-mesboot4-inputs)
`(("libc" ,glibc-mesboot)
@@ -2363,8 +2263,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"))
@@ -2379,7 +2278,6 @@ 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
@@ -2452,8 +2350,8 @@ exec " gcc "/bin/" program
":" 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))))))))))
+ (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
@@ -2526,8 +2424,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))))
@@ -2607,7 +2504,17 @@ exec " gcc "/bin/" program
((or "arm-linux" "aarch64-linux")
''("--disable-dependency-tracking"))
(_ ''()))
- ,flags)))))))
+ ,flags))
+ ((#:phases phases '%standard-phases)
+ `(modify-phases ,phases
+ (add-before 'check 'skip-fnmatch-test
+ (lambda _
+ ;; 'test-fnmatch' fails when using glibc-mesboot@2.16, due
+ ;; to incorrect handling of the [:alpha:] regexp character
+ ;; class. Ignore it.
+ (substitute* "gnulib-tests/Makefile"
+ (("^XFAIL_TESTS =")
+ "XFAIL_TESTS = test-fnmatch ")))))))))))
(define file
(package
@@ -2639,7 +2546,7 @@ exec " gcc "/bin/" program
(define gawk-boot0
(package
- (inherit patch)
+ (inherit gawk)
(source (bootstrap-origin (package-source gawk)))
(name "gawk-boot0")
(native-inputs '())
@@ -2752,8 +2659,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)
@@ -2788,8 +2694,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 '()))))
@@ -2877,8 +2782,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
@@ -2891,8 +2795,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
@@ -2904,8 +2807,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)))
@@ -2946,8 +2848,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)
@@ -3192,12 +3093,13 @@ memoized as a function of '%current-system'."
(delete-file-recursively "Modules/expat")
(substitute* "Modules/Setup.dist"
;; Link Expat instead of embedding the bundled one.
- (("^#pyexpat.*") "pyexpat pyexpat.c -lexpat\n"))
- #t)))))
+ (("^#pyexpat.*") "pyexpat pyexpat.c -lexpat\n")))))))
(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
@@ -3229,18 +3131,21 @@ memoized as a function of '%current-system'."
(("extensions\\.append\\(ctypes\\)") "")
;; Prevent the 'ossaudiodev' extension from being
;; built, since it requires Linux headers.
- (("'linux', ") ""))
- #t))
+ (("'linux', ") ""))))
(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))))))
+ (("/usr/include/")
+ (string-append libc "/include/")))))))
+ '())
+ (replace 'install-sitecustomize.py
+ ,(customize-site version))))
+ ((#:tests? _ #f) #f))))
+ (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
@@ -3287,9 +3192,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?)
@@ -3299,15 +3204,7 @@ 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)
@@ -3324,9 +3221,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"))))))
@@ -3374,9 +3268,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)
@@ -3439,16 +3331,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.
@@ -3615,8 +3505,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
diff --git a/gnu/packages/compression.scm b/gnu/packages/compression.scm
index d5fb7635ea..d6810364bf 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>
@@ -478,7 +478,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
@@ -487,7 +487,7 @@ compressed with pbzip2 can be decompressed with bzip2).")
version ".tar.gz")))
(sha256
(base32
- "0ibi2zsfaz6l756spjwc5rayf4ckgc9hwmy8qinppcyk4svz64mm"))))
+ "045s9agl3bpv3swlwydhgsqh7791957vmgw2plw8f1rks07r3x7n"))))
(build-system gnu-build-system)
(arguments
`(#:phases
@@ -809,6 +809,7 @@ decompression of some loosely related file formats used by Microsoft.")
("valgrind" ,valgrind)))
(arguments
`(#:test-target "test"
+ #:parallel-tests? #f ;occasional failures when running in parallel
#:make-flags (list (string-append "CC=" ,(cc-for-target))
(string-append "prefix=" (assoc-ref %outputs "out")))
#:phases
@@ -1429,14 +1430,14 @@ or junctions, and always follows hard links.")
(define-public zstd
(package
(name "zstd")
- (version "1.4.4")
+ (version "1.4.8")
(source
(origin
(method url-fetch)
(uri (string-append "https://github.com/facebook/zstd/releases/download/"
"v" version "/zstd-" version ".tar.gz"))
(sha256
- (base32 "05ckxap00qvc0j51d3ci38150cxsw82w7s9zgd5fgzspnzmp1vsr"))))
+ (base32 "094zqsj92iwz8glpgxjw96c43ib7adpjg5nm1082200mrabq4irj"))))
(build-system gnu-build-system)
(outputs '("out" ;1.2MiB executables and documentation
"lib" ;1.2MiB shared library and headers
@@ -1444,6 +1445,13 @@ 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))
(delete 'configure) ;no configure script
(add-after 'install 'adjust-library-locations
(lambda* (#:key outputs #:allow-other-keys)
@@ -1463,17 +1471,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"
@@ -1698,37 +1705,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"))))
- (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
diff --git a/gnu/packages/connman.scm b/gnu/packages/connman.scm
index 1331c849a0..4ddf6ab385 100644
--- a/gnu/packages/connman.scm
+++ b/gnu/packages/connman.scm
@@ -121,7 +121,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/cross-base.scm b/gnu/packages/cross-base.scm
index bea2d69876..c5b11b5e8a 100644
--- a/gnu/packages/cross-base.scm
+++ b/gnu/packages/cross-base.scm
@@ -527,32 +527,13 @@ 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)
diff --git a/gnu/packages/crypto.scm b/gnu/packages/crypto.scm
index 19041c7cbe..feea22a793 100644
--- a/gnu/packages/crypto.scm
+++ b/gnu/packages/crypto.scm
@@ -377,7 +377,7 @@ secure operations. ")
(lambda _
(invoke "./worgen" "8-12" "top1000.txt" "3-10" "top400nouns.txt"
"3-6" "top150adjectives.txt" "3-6")
- (invoke "./eschalot" "-r" "^guix|^guixsd")
+ (invoke "./eschalot" "-r" "^guix|^GuixSystem")
(invoke "./eschalot" "-r" "^gnu|^free")
(invoke "./eschalot" "-r" "^cyber|^hack")
(invoke "./eschalot" "-r" "^troll")))
diff --git a/gnu/packages/cups.scm b/gnu/packages/cups.scm
index 51efee5157..8393fe5fe4 100644
--- a/gnu/packages/cups.scm
+++ b/gnu/packages/cups.scm
@@ -7,6 +7,7 @@
;;; Copyright © 2017 Mark H Weaver <mhw@netris.org>
;;; Copyright © 2017–2020 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.5")
(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"))
+ "03zn534whjxi3s7g0srdib1qhvwk0f826c5bci17jl5zpk3myhm8"))
(modules '((guix build utils)))
(snippet
;; install backends, banners and filters to cups-filters output
@@ -196,17 +197,18 @@ 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))))))
@@ -219,6 +221,7 @@ driver is known to work with these printers:
("freetype" ,freetype)
("font-dejavu" ,font-dejavu) ; also needed by test suite
("ghostscript" ,ghostscript/cups)
+ ("grep" ,grep)
("ijs" ,ijs)
("dbus" ,dbus)
("lcms" ,lcms)
@@ -511,8 +514,7 @@ should only be used as part of the Guix cups-pk-helper service.")
(("^dat2drvdir =.*")
"dat2drvdir = $(pkglibexecdir)\n")
(("^locatedriverdir =.*")
- "locatedriverdir = $(pkglibexecdir)\n"))
- #t))))
+ "locatedriverdir = $(pkglibexecdir)\n"))))))
(build-system gnu-build-system)
(outputs (list "out" "ppd"))
(home-page "https://developers.hp.com/hp-linux-imaging-and-printing")
@@ -600,8 +602,7 @@ should only be used as part of the Guix cups-pk-helper service.")
(string-append "rulessystemdir = " out
"/lib/systemd/system"))
(("/etc/sane.d")
- (string-append out "/etc/sane.d")))
- #t)))
+ (string-append out "/etc/sane.d"))))))
(add-before 'configure 'fix-build-with-python-3.8
(lambda* (#:key inputs #:allow-other-keys)
(let ((python (assoc-ref inputs "python")))
@@ -612,15 +613,13 @@ should only be used as part of the Guix cups-pk-helper service.")
(setenv "C_INCLUDE_PATH"
(string-append python "/include/python"
(python:python-version python)
- ":" (getenv "C_INCLUDE_PATH"))))
- #t)))
+ ":" (getenv "C_INCLUDE_PATH")))))))
(add-after 'install 'install-models-dat
(lambda* (#:key outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))
(models-dir (string-append out
"/share/hplip/data/models")))
- (install-file "data/models/models.dat" models-dir))
- #t))
+ (install-file "data/models/models.dat" models-dir))))
(add-after 'install 'wrap-binaries
;; Scripts in /bin are all symlinks to .py files in /share/hplip.
;; Symlinks are immune to the Python build system's 'WRAP phase,
@@ -631,7 +630,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)))
@@ -640,19 +639,15 @@ 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)
- (eq? 'symlink (stat:type stat)))))
- #t)))))))
+ (eq? 'symlink (stat:type stat))))))))))))
;; Note that the error messages printed by the tools in the case of
;; missing dependencies are often downright misleading.
diff --git a/gnu/packages/curl.scm b/gnu/packages/curl.scm
index 52c2be2f80..2c5f5bcc45 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>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -42,7 +43,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)
@@ -67,14 +67,14 @@
"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
@@ -142,14 +142,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 kurly
(package
diff --git a/gnu/packages/databases.scm b/gnu/packages/databases.scm
index e24eb20608..95993841f0 100644
--- a/gnu/packages/databases.scm
+++ b/gnu/packages/databases.scm
@@ -1220,6 +1220,12 @@ developed in C/C++ to MariaDB and MySQL databases.")
"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")))
@@ -2872,11 +2878,7 @@ Memory-Mapped Database} (LMDB), a high-performance key-value store.")
(description
"Orator provides a simple ActiveRecord-like Object Relational Mapping
implementation for Python.")
- (license license:expat)
- (properties `((python2-variant . ,(delay python2-orator))))))
-
-(define-public python2-orator
- (package-with-python2 (strip-python2-variant python-orator)))
+ (license license:expat)))
(define-public virtuoso-ose
(package
diff --git a/gnu/packages/dbm.scm b/gnu/packages/dbm.scm
index 82647c0c28..d307914d41 100644
--- a/gnu/packages/dbm.scm
+++ b/gnu/packages/dbm.scm
@@ -1,9 +1,10 @@
;;; 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 © 2017, 2018 Marius Bakke <mbakke@fastmail.com>
;;; Copyright © 2018 Mark H Weaver <mhw@netris.org>
+;;; Copyright © 2020 Jakub Kądziołka <kuba@kadziolka.net>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -45,7 +46,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
@@ -108,7 +110,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)
@@ -130,14 +134,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.19")
(source (origin
(method url-fetch)
(uri (string-append "mirror://gnu/gdbm/gdbm-"
version ".tar.gz"))
(sha256
(base32
- "1p4ibds6z3ccy65lkmd6lm7js0kwifvl53r0fd759fjxgr917rl6"))))
+ "1g342f0xhh8xbc8p9vrr34clhxz57589k50dibhp5f9284hi5v9p"))))
(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 b3a000e6e3..2913c348f3 100644
--- a/gnu/packages/debug.scm
+++ b/gnu/packages/debug.scm
@@ -510,10 +510,10 @@ input. Zzuf's behaviour is deterministic, making it easy to reproduce bugs.")
(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/display-managers.scm b/gnu/packages/display-managers.scm
index b6e5ab7d19..a6a1c97360 100644
--- a/gnu/packages/display-managers.scm
+++ b/gnu/packages/display-managers.scm
@@ -192,7 +192,7 @@ Guix's logo. Based on Arch linux's archlinux-simplyblack theme.")
;; 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 aa4411c5a2..d4919ce7f1 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 Marius Bakke <marius@gnu.org>
+;;; Copyright © 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -74,23 +75,10 @@
(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 _
(with-directory-excursion "tests"
- (setenv "PYTHONPATH"
- (string-append "..:" (getenv "PYTHONPATH")))
(invoke "python" "runtests.py"
;; By default tests run in parallel, which may cause
;; various race conditions. Run sequentially for
@@ -322,23 +310,18 @@ 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)
@@ -705,9 +688,6 @@ project aims to bulk update given objects using one query over Django ORM.")
(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
@@ -766,14 +746,9 @@ 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"))))))))
+ (when tests?
+ (setenv "DJANGO_SETTINGS_MODULE" "tests.settings")
+ (invoke "django-admin" "test" "tests")))))))
(native-inputs
`(("python-django" ,python-django)))
(propagated-inputs
@@ -900,10 +875,8 @@ 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"))))))
+ (invoke "python" "django-admin.py"
+ "test" "--settings=settings"))))))
(native-inputs
`(("python-django" ,python-django)))
(home-page "https://github.com/jazzband/django-sortedm2m")
@@ -929,10 +902,8 @@ 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"))))))
+ (invoke "python" "django-admin.py" "test" "-v2"))))))
(native-inputs
`(("python-django" ,python-django)))
(home-page "https://github.com/django-compressor/django-appconf")
@@ -964,9 +935,7 @@ 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
@@ -1267,15 +1236,11 @@ to ElasticSearch.")
;; 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"
diff --git a/gnu/packages/docbook.scm b/gnu/packages/docbook.scm
index 889bb96010..f797c97cf3 100644
--- a/gnu/packages/docbook.scm
+++ b/gnu/packages/docbook.scm
@@ -27,12 +27,15 @@
#:use-module (gnu packages imagemagick)
#:use-module (gnu packages inkscape)
#:use-module (gnu packages tex)
+ #:use-module (gnu packages perl)
#:use-module (gnu packages python)
#:use-module (gnu packages base)
+ #:use-module (gnu packages web-browsers)
#:use-module (gnu packages xml)
#:use-module (guix licenses)
#:use-module (guix packages)
#:use-module (guix download)
+ #:use-module (guix build-system gnu)
#:use-module (guix build-system trivial)
#:use-module (guix build-system python))
@@ -168,15 +171,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
@@ -392,7 +397,7 @@ the in DocBook SGML DTDs.")
(build-system python-build-system)
;; TODO: Add xfig/transfig for fig2dev utility
(inputs
- `(("texlive" ,(texlive-union (list texlive-amsfonts
+ `(("texlive" ,(texlive-updmap.cfg (list texlive-amsfonts
texlive-latex-anysize
texlive-latex-appendix
texlive-latex-changebar
@@ -460,3 +465,88 @@ process. MathML 2.0 markups are supported too. It started as a clone of
DB2LaTeX.")
;; lib/contrib/which is under an X11 license
(license gpl2+)))
+
+(define-public docbook-utils
+ (package
+ (name "docbook-utils")
+ (version "0.6.14")
+ (source (origin
+ (method url-fetch)
+ ;; The original sources are not accessible anymore.
+ (uri (string-append "http://deb.debian.org/debian/pool/main/"
+ "d/docbook-utils/docbook-utils_"
+ version ".orig.tar.gz"))
+ (sha256
+ (base32
+ "1scj5vgw1xz872pq54a89blcxqqm11p90yzv8a9mqq57x27apyj8"))))
+ (build-system gnu-build-system)
+ (arguments
+ `(#:phases (modify-phases %standard-phases
+ (add-after 'unpack 'patch-build-system
+ (lambda _
+ (substitute* (find-files "." "\\.in$")
+ ;; Do not hard-code SGML_CATALOG_FILES.
+ ((".*SGML_CATALOG_FILES=/etc/sgml/catalog.*") "")
+ ;; Use OpenSP and OpenJade.
+ (("\\bjade\\b")
+ "openjade")
+ (("\\bnsgmls\\b")
+ "onsgmls"))
+ #t))
+ (add-after 'unpack 'patch-jw.in
+ ;; Do not override the SGML_CATALOG_FILES environment
+ ;; variable.
+ (lambda _
+ (substitute* "bin/jw.in"
+ ((".*SGML_CATALOG_FILES=`find.*")
+ "")
+ (("SGML_CATALOG_FILES=`echo.*")
+ ":\n")
+ (("SGML_CATALOG_FILES=\"\"")
+ ":")
+ (("\\bwhich\\b")
+ "command -v"))
+ #t))
+ (add-after 'unpack 'patch-txt-backend
+ (lambda _
+ ;; Locate lynx, links or w3m from the PATH, not from
+ ;; /usr/bin.
+ (substitute* "backends/txt"
+ (("CONVERT=/usr/bin/")
+ "CONVERT=")
+ (("\\[ -x /usr/bin/([^ ]+) \\]" dummy command)
+ (string-append "command -v " command " > /dev/null")))
+ #t)))))
+ ;; Propagated for convenience. All these tools are used at run time to
+ ;; provide the complete functionality of the docbook-utils commands.
+ (propagated-inputs
+ `(("texlive-jadetex" ,texlive-jadetex)
+ ("docbook-sgml" ,docbook-sgml-3.1)
+ ("docbook-dsssl" ,docbook-dsssl)
+ ("openjade" ,openjade)
+ ("opensp" ,opensp)
+ ("lynx" ,lynx)
+ ("perl-sgmls" ,perl-sgmls)))
+ (home-page "https://packages.debian.org/sid/docbook-utils")
+ (synopsis "DocBook converter to other formats")
+ (description "The docbook-utils package is a collection of utilities
+intended to ease the use of SGML and XML.
+@table @command
+@item jw
+Convert a SGML DocBook file to other formats such as Hyper Text Markup
+Language (HTML), Rich Text Format (RTF), PostScript (PS), man, Portable
+Document Format (PDF), TeX, Texinfo or plain text (txt). It can be used
+more conveniently via the following wrappers:
+@itemx docbook2dvi Convert a SGML DocBook file to the DVI format.
+@itemx docbook2html Convert a SGML DocBook file to an HTML document.
+@itemx docbook2man Convert a SGML DocBook file a man page.
+@itemx docbook2pdf Convert a SGML DocBook file to a PDF document.
+@itemx docbook2ps Convert a SGML DocBook file to a PS document.
+@itemx docbook2rtf Convert a SGML DocBook file to a RTF document.
+@itemx docbook2tex Convert a SGML DocBook file to a TeX document.
+@itemx docbook2texi Convert a SGML DocBook file to a Texinfo document.
+@itemx docbook2txt Convert a SGML DocBook file to a plain text document.
+@item sgmldiff
+Detect the differences in markup between two SGML files.
+@end table")
+ (license gpl2+)))
diff --git a/gnu/packages/ebook.scm b/gnu/packages/ebook.scm
index 47bbd1a789..34a04e505c 100644
--- a/gnu/packages/ebook.scm
+++ b/gnu/packages/ebook.scm
@@ -482,12 +482,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))))
#t)))))
(native-inputs
`(("desktop-file-utils" ,desktop-file-utils)
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 13372489f5..557c86976b 100644
--- a/gnu/packages/education.scm
+++ b/gnu/packages/education.scm
@@ -800,7 +800,7 @@ adjust the level of difficulty.")
`("PATH" prefix (,(string-append
(assoc-ref inputs "mpv")
"/bin")))
- `("PYTHONPATH" = ,site-packages)))
+ `("GUIX_PYTHONPATH" = ,site-packages)))
(find-files bin ".")))
#t)))))
(native-inputs
diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index be5b707b4c..b84af3fcc1 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -2192,7 +2192,7 @@ as a library for other Emacs packages.")
`(("perl" ,perl)))
(inputs
`(("ghostscript" ,ghostscript)
- ("texlive" ,(texlive-union (list texlive-amsfonts)))))
+ ("texlive" ,(texlive-updmap.cfg (list texlive-amsfonts)))))
(home-page "https://www.gnu.org/software/auctex/")
(synopsis "Integrated environment for TeX")
(description
diff --git a/gnu/packages/emulators.scm b/gnu/packages/emulators.scm
index e52a5fc4af..cd77047f3d 100644
--- a/gnu/packages/emulators.scm
+++ b/gnu/packages/emulators.scm
@@ -1975,17 +1975,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"
@@ -1998,7 +1987,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")
@@ -2011,7 +2000,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))
@@ -2032,10 +2021,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 11585f6234..7bbf732fc9 100644
--- a/gnu/packages/engineering.scm
+++ b/gnu/packages/engineering.scm
@@ -515,7 +515,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-fonts-amsfonts)))
("ghostscript" ,ghostscript)))
(arguments
`(#:make-flags '("CC=gcc" "RM=rm" "SHELL=sh" "all")
@@ -930,9 +930,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)))))
@@ -1193,9 +1193,9 @@ the 'showing the effect of'-style of operation.")
,(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)))))
@@ -2612,18 +2612,12 @@ comments.")))
"/include/shiboken2"))
#:phases
(modify-phases %standard-phases
- (add-before 'configure 'restore-pythonpath
- (lambda _
- (substitute* "src/Main/MainGui.cpp"
- (("_?putenv\\(\"PYTHONPATH=\"\\);") ""))
- #t))
(add-after 'install 'wrap-pythonpath
(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")))))
- #t)))))
+ (list "GUIX_PYTHONPATH"
+ 'prefix (list (getenv "GUIX_PYTHONPATH"))))))))))
(home-page "https://www.freecadweb.org/")
(synopsis "Your Own 3D Parametric Modeler")
(description
@@ -2920,9 +2914,7 @@ GUI.")
;; The GUI, which we elide, requires tcl and tk.
(native-inputs `(("autoconf" ,autoconf)
("automake" ,automake)
- ;; 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)
+ ("bison" ,bison)
("clisp" ,clisp)
("dejagnu" ,dejagnu)
("flex" ,flex)
diff --git a/gnu/packages/file.scm b/gnu/packages/file.scm
index bac951f9c5..bed272ae35 100644
--- a/gnu/packages/file.scm
+++ b/gnu/packages/file.scm
@@ -4,6 +4,7 @@
;;; Copyright © 2016, 2017 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.
;;;
@@ -30,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/fontutils.scm b/gnu/packages/fontutils.scm
index cacda2ed04..e966d5d271 100644
--- a/gnu/packages/fontutils.scm
+++ b/gnu/packages/fontutils.scm
@@ -12,6 +12,7 @@
;;; 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>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -36,6 +37,7 @@
#: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)
@@ -58,6 +60,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)
@@ -316,55 +319,61 @@ Font Format (WOFF).")
(license license:expat)))
(define-public fontconfig
- (package
- (name "fontconfig")
- (version "2.13.1")
- (source (origin
+ (hidden-package
+ (package
+ (name "fontconfig-minimal")
+ (version "2.13.93")
+ (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"))
+ "https://www.freedesktop.org/software/"
+ "fontconfig/release/fontconfig-" version ".tar.xz"))
(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;
+ "1850q4k80yxma5g3yxkvyv8i5a3xqzswwml8gjy3jmywx8qqd5pa"))))
+ (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)
+ ("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")
+
+ ;; Register fonts from user and system profiles.
+ (string-append "--with-add-fonts="
+ "~/.guix-profile/share/fonts,"
+ "/run/current-system/profile/share/fonts"))
+ #:phases
+ (modify-phases %standard-phases
+ (add-before 'check 'skip-problematic-tests
+ (lambda _
+ (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;
@@ -372,10 +381,44 @@ 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."))
+ (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 '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
@@ -420,14 +463,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")))
@@ -471,17 +514,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)))
diff --git a/gnu/packages/game-development.scm b/gnu/packages/game-development.scm
index 7080db423b..af177c7d4b 100644
--- a/gnu/packages/game-development.scm
+++ b/gnu/packages/game-development.scm
@@ -1403,7 +1403,7 @@ if __name__ == \"__main__\":
(lambda* (#:key inputs outputs #:allow-other-keys)
(wrap-program (string-append (assoc-ref outputs "out")
"/bin/renpy")
- `("PYTHONPATH" = (,(getenv "PYTHONPATH"))))
+ `("GUIX_PYTHONPATH" = (,(getenv "GUIX_PYTHONPATH"))))
#t)))))
(inputs
`(("python2-tkinter" ,python-2 "tk")
diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm
index e3e18bf09e..0404a34f0a 100644
--- a/gnu/packages/games.scm
+++ b/gnu/packages/games.scm
@@ -2100,9 +2100,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))
@@ -2176,9 +2176,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))
@@ -3626,9 +3626,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="
@@ -3655,30 +3658,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)
@@ -6981,7 +6969,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)
@@ -10250,7 +10238,7 @@ This package is part of the KDE games module.")
(lambda* (#:key outputs #:allow-other-keys)
(let ((out (assoc-ref outputs "out")))
(wrap-program (string-append out "/bin/kajongg")
- `("PYTHONPATH" ":" prefix (,(getenv "PYTHONPATH"))))
+ `("GUIX_PYTHONPATH" ":" prefix (,(getenv "GUIX_PYTHONPATH"))))
#t))))))
(native-inputs
`(("extra-cmake-modules" ,extra-cmake-modules)
diff --git a/gnu/packages/gawk.scm b/gnu/packages/gawk.scm
index d8494e9c1c..6b5eaa1f4c 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
diff --git a/gnu/packages/gcc.scm b/gnu/packages/gcc.scm
index 4d5aaa7070..9b2a5556f6 100644
--- a/gnu/packages/gcc.scm
+++ b/gnu/packages/gcc.scm
@@ -320,8 +320,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 _
@@ -329,8 +328,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
@@ -378,15 +376,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)
@@ -414,15 +410,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)))
@@ -450,8 +444,7 @@ 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-public gcc-5
;; Note: GCC >= 5 ships with .info files but 'make install' fails to install
@@ -483,11 +476,9 @@ Go. It also includes runtime support libraries for these languages.")
;;
;; 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))))
+ '(substitute* "libcc1/configure"
+ (("\\$gcc_cv_objdump -T")
+ "$OBJDUMP_FOR_TARGET -T")))))
(inputs
`(;; GCC5 needs <isl/band.h> which is removed in later versions.
("isl" ,isl-0.18)
@@ -653,16 +644,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 '())
@@ -704,8 +693,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-.*)"))))))))))
(define %generic-search-paths
;; This is the language-neutral search path for GCC. Entries in $CPATH are
@@ -759,8 +747,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
@@ -893,8 +880,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")))
@@ -903,8 +889,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
@@ -931,7 +916,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
@@ -942,7 +927,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
@@ -961,8 +946,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
@@ -1088,8 +1072,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/gdb.scm b/gnu/packages/gdb.scm
index 51b800d0d1..13c32d7918 100644
--- a/gnu/packages/gdb.scm
+++ b/gnu/packages/gdb.scm
@@ -5,6 +5,7 @@
;;; 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 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -118,6 +119,12 @@
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
diff --git a/gnu/packages/gettext.scm b/gnu/packages/gettext.scm
index bee33f2685..320c860fe6 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
@@ -239,12 +239,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))))
@@ -264,6 +266,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.
@@ -287,6 +296,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..19430d315a 100644
--- a/gnu/packages/ghostscript.scm
+++ b/gnu/packages/ghostscript.scm
@@ -9,6 +9,7 @@
;;; 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.
;;;
@@ -268,7 +269,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
diff --git a/gnu/packages/gimp.scm b/gnu/packages/gimp.scm
index 4d229a1fd9..fc8e0098bb 100644
--- a/gnu/packages/gimp.scm
+++ b/gnu/packages/gimp.scm
@@ -300,7 +300,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
@@ -579,7 +579,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 e378474147..6f06d27977 100644
--- a/gnu/packages/gl.scm
+++ b/gnu/packages/gl.scm
@@ -13,6 +13,7 @@
;;; 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>
;;;
;;; This file is part of GNU Guix.
@@ -359,6 +360,12 @@ also known as DXTn or DXTC) for Mesa.")
(("'u_format_test',") ""))
#t)))
'())
+ (add-after 'unpack 'fix-tests
+ (lambda _
+ ;; See <https://gitlab.freedesktop.org/mesa/mesa/-/issues/3181>.
+ (substitute* "src/compiler/glsl/glcpp/tests/084-unbalanced-parentheses.c.expected"
+ (("unexpected \\$end") "unexpected end of file"))
+ #t))
(add-before 'configure 'fix-dlopen-libnames
(lambda* (#:key inputs outputs #:allow-other-keys)
(let ((out (assoc-ref outputs "out")))
diff --git a/gnu/packages/glib.scm b/gnu/packages/glib.scm
index 9cc2b1b69e..fdbe6d0cdf 100644
--- a/gnu/packages/glib.scm
+++ b/gnu/packages/glib.scm
@@ -9,10 +9,12 @@
;;; Copyright © 2017 Petter <petter@mykolab.ch>
;;; Copyright © 2018, 2019 Tobias Geerinckx-Rice <me@tobias.gr>
;;; Copyright © 2018 Alex Vong <alexvong1995@gmail.com>
-;;; Copyright © 2019 Maxim Cournoyer <maxim.cournoyer@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 © 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>
;;;
;;; This file is part of GNU Guix.
@@ -58,7 +60,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)
@@ -90,7 +91,7 @@
(define dbus
(package
(name "dbus")
- (version "1.12.16")
+ (version "1.12.20")
(source (origin
(method url-fetch)
(uri (string-append
@@ -98,9 +99,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
@@ -190,24 +190,25 @@ shared NFS home directories.")
#t))))
(build-system meson-build-system)
(outputs '("out" ; everything
- "bin")) ; glib-mkenums, gtester, etc.; depends on Python
+ "bin" ; glib-mkenums, gtester, etc.; depends on Python
+ "debug"))
(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)
+ ("python" ,python-minimal-wrapper)
("perl" ,perl) ; needed by GIO tests
("tzdata" ,tzdata-for-tests))) ; for tests/gdatetime.c
(arguments
`(#:disallowed-references (,tzdata-for-tests)
+ #:configure-flags '("-Dselinux=disabled")
#:phases
(modify-phases %standard-phases
(add-after 'unpack 'patch-dbus-launch-path
@@ -331,11 +332,14 @@ shared NFS home directories.")
(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")))
+ (lambda* (#:key tests? #:allow-other-keys)
+ (if tests?
+ (begin
+ (setenv "MESON_TESTTHREADS"
+ (number->string (parallel-job-count)))
+ ;; Do not run tests marked as "flaky".
+ (invoke "meson" "test" "--no-suite" "flaky"))
+ #t)))
;; 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.
@@ -420,21 +424,18 @@ dynamic loading, and an object system.")
(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
@@ -552,7 +553,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")
diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
index 18ceb6def4..a08cacbbcf 100644
--- a/gnu/packages/gnome.scm
+++ b/gnu/packages/gnome.scm
@@ -895,7 +895,7 @@ cloud integration is offered through GNOME Online Accounts.")
`("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))))
+ `("GUIX_PYTHONPATH" = (,(getenv "GUIX_PYTHONPATH") ,pylib))))
#t)))))
(native-inputs
`(("desktop-file-utils" ,desktop-file-utils)
@@ -2680,7 +2680,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
@@ -6184,12 +6184,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)))
@@ -6557,7 +6557,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
@@ -6701,7 +6701,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
@@ -7160,11 +7160,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")))))
@@ -7525,12 +7525,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"))))
@@ -8432,7 +8432,7 @@ properties, screen resolution, and other GNOME parameters.")
(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
@@ -8446,7 +8446,7 @@ properties, screen resolution, and other GNOME parameters.")
(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)))
@@ -9227,7 +9227,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
@@ -9438,13 +9438,13 @@ desktop. It supports multiple calendars, month, week and year view.")
(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-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))))
+ `("GUIX_PYTHONPATH" ":" prefix (,python-path))))
#t)))))
(native-inputs
`(("gettext" ,gettext-minimal)
@@ -10047,8 +10047,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)
@@ -10380,7 +10380,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
@@ -10800,7 +10800,7 @@ advanced image management tool")
(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)))
(add-after 'wrap-program 'glib-or-gtk-wrap
@@ -11433,7 +11433,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
@@ -11493,7 +11493,7 @@ GTK+. It integrates well with the GNOME desktop environment.")
(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))))))
@@ -11875,7 +11875,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
diff --git a/gnu/packages/gnupg.scm b/gnu/packages/gnupg.scm
index 83dd1d1578..5eca1e8c62 100644
--- a/gnu/packages/gnupg.scm
+++ b/gnu/packages/gnupg.scm
@@ -81,7 +81,7 @@
(define-public libgpg-error
(package
(name "libgpg-error")
- (version "1.37")
+ (version "1.39")
(source
(origin
(method url-fetch)
@@ -89,7 +89,7 @@
version ".tar.bz2"))
(sha256
(base32
- "0qwpx8mbc2l421a22l0l1hpzkip9jng06bbzgxwpkkvk5bvnybdk"))))
+ "13r9vf6dyjab6jh2821fp2r6m624iy838j2s3kpr882rmvf6x0sa"))))
(build-system gnu-build-system)
(arguments
(if (%current-target-system)
@@ -131,14 +131,14 @@ Daemon and possibly more in the future.")
(define-public libgcrypt
(package
(name "libgcrypt")
- (version "1.8.5")
+ (version "1.8.7")
(source (origin
(method url-fetch)
(uri (string-append "mirror://gnupg/libgcrypt/libgcrypt-"
version ".tar.bz2"))
(sha256
(base32
- "1hvsazms1bfd769q0ngl0r9g5i4m9mpz9jmvvrdzyzk3rfa2ljiv"))))
+ "0j27jxhjay78by940d64778nxwbysxynv5mq6iq1nmlrh810zdq3"))))
(build-system gnu-build-system)
(propagated-inputs
`(("libgpg-error-host" ,libgpg-error)))
diff --git a/gnu/packages/gpodder.scm b/gnu/packages/gpodder.scm
index 44c356e2ff..cb7cc176c3 100644
--- a/gnu/packages/gpodder.scm
+++ b/gnu/packages/gpodder.scm
@@ -76,9 +76,6 @@
#t)))
(replace 'check
(lambda _
- ; The `unittest' target overrides the PYTHONPATH variable.
- (substitute* "makefile"
- (("PYTHONPATH=src/") "PYTHONPATH=${PYTHONPATH}:src/"))
(invoke "make" "unittest")))
;; 'msgmerge' introduces non-determinism by resetting the
;; POT-Creation-Date in .po files.
diff --git a/gnu/packages/gps.scm b/gnu/packages/gps.scm
index ca53ac3b73..b49ca85af2 100644
--- a/gnu/packages/gps.scm
+++ b/gnu/packages/gps.scm
@@ -280,7 +280,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")))
#t)))))
diff --git a/gnu/packages/gtk.scm b/gnu/packages/gtk.scm
index cd6f9bd7ce..384ee608d3 100644
--- a/gnu/packages/gtk.scm
+++ b/gnu/packages/gtk.scm
@@ -24,7 +24,7 @@
;;; 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>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -57,6 +57,7 @@
#:use-module (gnu packages algebra)
#:use-module (gnu packages autotools)
#:use-module (gnu packages base)
+ #:use-module (gnu packages build-tools)
#:use-module (gnu packages texinfo)
#:use-module (gnu packages check)
#:use-module (gnu packages compression)
@@ -555,7 +556,7 @@ highlighting and other features typical of a source code editor.")
(define-public gdk-pixbuf
(package
(name "gdk-pixbuf")
- (version "2.40.0")
+ (version "2.42.2")
(source (origin
(method url-fetch)
(uri (string-append "mirror://gnome/sources/" name "/"
@@ -563,26 +564,13 @@ highlighting and other features typical of a source code editor.")
name "-" version ".tar.xz"))
(sha256
(base32
- "1rnlx9yfw970maxi2x6niaxmih5la11q1ilr7gzshz2kk585k0hm"))))
+ "05ggmzwvrxq9w4zcvmrnnd6qplsmb4n95lj4q607c7arzlf6mil3"))))
(build-system meson-build-system)
(arguments
- `(#:configure-flags '("-Dinstalled_tests=false")
+ `(#:meson ,meson-0.55
+ #: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"))
@@ -1758,12 +1746,6 @@ information.")
(substitute* "tests/Makefile.in"
(("empty.sh sanity.sh") "empty.sh"))
#t))
- (add-before 'build 'set-HOME
- (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"
@@ -1784,7 +1766,7 @@ information.")
(let ((out (assoc-ref outputs "out")))
(for-each (lambda (prog)
(wrap-program prog
- `("PYTHONPATH" ":" prefix (,(getenv "PYTHONPATH")))))
+ `("GUIX_PYTHONPATH" ":" prefix (,(getenv "GUIX_PYTHONPATH")))))
(find-files (string-append out "/bin")))
#t))))
#:configure-flags
diff --git a/gnu/packages/guile-xyz.scm b/gnu/packages/guile-xyz.scm
index c6f25bbdfb..8dbed87c3f 100644
--- a/gnu/packages/guile-xyz.scm
+++ b/gnu/packages/guile-xyz.scm
@@ -3162,7 +3162,7 @@ API.")
("perl" ,perl)
("pkg-config" ,pkg-config)
("texinfo" ,texinfo)
- ("texlive" ,(texlive-union (list texlive-generic-epsf)))))
+ ("texlive" ,(texlive-updmap.cfg (list texlive-generic-epsf)))))
(inputs
`(("dbus-glib" ,dbus-glib)
("guile" ,guile-3.0)
@@ -3439,7 +3439,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
diff --git a/gnu/packages/guile.scm b/gnu/packages/guile.scm
index 0d6f13c97f..d38f63d110 100644
--- a/gnu/packages/guile.scm
+++ b/gnu/packages/guile.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 Cyril Roelandt <tipecaml@gmail.com>
;;; Copyright © 2014, 2016, 2018 David Thompson <davet@gnu.org>
;;; Copyright © 2014, 2017, 2018 Mark H Weaver <mhw@netris.org>
@@ -179,6 +179,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?)
@@ -245,7 +250,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
@@ -284,14 +290,14 @@ without requiring the source code to be rewritten.")
(package
(inherit guile-2.2)
(name "guile")
- (version "3.0.2")
+ (version "3.0.5")
(source (origin
(inherit (package-source guile-2.2))
(uri (string-append "mirror://gnu/guile/guile-"
version ".tar.xz"))
(sha256
(base32
- "12lziar4j27j9whqp2n18427q45y9ghq7gdd8lqhmj1k0lr7vi2k"))))
+ "1wah6fq1h8vmbpdadjych1mq8hyqkd7p015cbxm14ri37l1gnxid"))))
(arguments
;; XXX: JIT-enabled Guile crashes in obscure ways on GNU/Hurd.
(if (hurd-target?)
@@ -309,20 +315,8 @@ 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-with-extra-patches
- (package
- (inherit guile-3.0)
- (version "3.0.5")
- (source (origin
- (inherit (package-source guile-3.0))
- (uri (string-append "mirror://gnu/guile/guile-"
- version ".tar.xz"))
- (sha256
- (base32
- "1wah6fq1h8vmbpdadjych1mq8hyqkd7p015cbxm14ri37l1gnxid")))))
- ;; Remove on the next rebuild cycle.
- (search-patches "guile-2.2-skip-so-test.patch")))
+ ;; The latest 3.0.x version.
+ guile-3.0)
(define-public guile-next
(deprecated-package "guile-next" guile-3.0))
diff --git a/gnu/packages/ibus.scm b/gnu/packages/ibus.scm
index ecf33cb570..1ce826d65e 100644
--- a/gnu/packages/ibus.scm
+++ b/gnu/packages/ibus.scm
@@ -130,7 +130,7 @@
;; 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")))))
@@ -138,7 +138,6 @@
(inputs
`(("dbus" ,dbus)
("dconf" ,dconf)
- ("gconf" ,gconf)
("gtk2" ,gtk+-2)
("gtk+" ,gtk+)
("json-glib" ,json-glib)
@@ -193,8 +192,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" ":" prefix
- (,(getenv "PYTHONPATH")
+ `("GUIX_PYTHONPATH" ":" prefix
+ (,(getenv "GUIX_PYTHONPATH")
,(string-append (assoc-ref inputs "ibus")
"/lib/girepository-1.0")))
`("GI_TYPELIB_PATH" ":" prefix
@@ -271,8 +270,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")))))
@@ -734,7 +733,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 bf98fc3a40..1b5dd2dc14 100644
--- a/gnu/packages/icu4c.scm
+++ b/gnu/packages/icu4c.scm
@@ -1,7 +1,7 @@
;;; 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>
@@ -39,7 +39,7 @@
(define-public icu4c
(package
(name "icu4c")
- (version "66.1")
+ (version "67.1")
(source (origin
(method url-fetch)
(uri (string-append
@@ -48,10 +48,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 "1p6mhvxl0xr2n0g6xdps3mwzwlv6mjsz3xlpm793p9aiybb0ra4l"))))
(build-system gnu-build-system)
;; When cross-compiling, this package needs a source directory of a
;; native-build of itself.
diff --git a/gnu/packages/image.scm b/gnu/packages/image.scm
index 339bd7dcf2..958f1dcc59 100644
--- a/gnu/packages/image.scm
+++ b/gnu/packages/image.scm
@@ -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 Vinicius Monego <monego@posteo.net>
;;;
@@ -699,7 +700,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
@@ -829,8 +830,25 @@ test suite, including conformance tests (following Rec. ITU-T T.803 | ISO/IEC
(base32 "1dn98d2dfa1lqyxxmab6rrcv52dyhjr4g7i4xf2w54fqsx14ynrb"))))
(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
+ ;; To be re-enabled after upstream fixes the bug,
+ ;; https://github.com/uclouvain/openjpeg/issues/1264
+ (add-after 'unpack 'disable-failing-tests
+ (lambda _
+ (substitute* "tests/CMakeLists.txt"
+ (("add_subdirectory\\(nonregression\\)")
+ ""))
+ #t)))))
+ (native-inputs
+ `(("openjpeg-data" ,openjpeg-data))) ; Files for test-suite
(inputs
`(("lcms" ,lcms)
("libpng" ,libpng)
diff --git a/gnu/packages/inkscape.scm b/gnu/packages/inkscape.scm
index 075f901b2d..713a0056b1 100644
--- a/gnu/packages/inkscape.scm
+++ b/gnu/packages/inkscape.scm
@@ -79,7 +79,7 @@
("freetype" ,freetype)
("popt" ,popt)
("potrace" ,potrace)
- ("python" ,python-2)
+ ("python" ,python-wrapper)
("lcms" ,lcms)
("boost" ,boost)))
(native-inputs
@@ -258,7 +258,7 @@ 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")))))
#t)))))
(inputs
`(("aspell" ,aspell)
diff --git a/gnu/packages/jemalloc.scm b/gnu/packages/jemalloc.scm
index c4b87b540d..906330a4b6 100644
--- a/gnu/packages/jemalloc.scm
+++ b/gnu/packages/jemalloc.scm
@@ -1,6 +1,6 @@
;;; 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 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2017 Eric Bavier <bavier@member.fsf.org>
;;;
;;; This file is part of GNU Guix.
@@ -54,7 +54,7 @@
#t)))
,@(if (any (cute string-prefix? <> (or (%current-target-system)
(%current-system)))
- '("x64_64" "i686"))
+ '("x86_64" "i686"))
;; Transparent huge pages are only enabled by default on Intel processors
'()
'(#:configure-flags (list "--disable-thp")))))
diff --git a/gnu/packages/kerberos.scm b/gnu/packages/kerberos.scm
index 20ed94b33b..0f3ff96388 100644
--- a/gnu/packages/kerberos.scm
+++ b/gnu/packages/kerberos.scm
@@ -10,6 +10,7 @@
;;; 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 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -41,6 +42,7 @@
#: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:)
@@ -70,7 +72,10 @@
(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
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/libevent.scm b/gnu/packages/libevent.scm
index dab574a155..8ae7c4c131 100644
--- a/gnu/packages/libevent.scm
+++ b/gnu/packages/libevent.scm
@@ -41,7 +41,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 +49,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 +77,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 +85,7 @@ loop.")
".tar.gz"))
(sha256
(base32
- "0nkfqv69wfyy2bpga4d53iqydycpik8jp8x6q70353hia8mmv1gd"))))
+ "1sjs4324is7fp21an4aas2z4dwsvs6z4xwrmp72vwpq1s6wbfzjh"))))
(build-system gnu-build-system)
(arguments
'(#:configure-flags '("--disable-static")))
@@ -102,14 +103,14 @@ limited support for fork events.")
(define-public libuv
(package
(name "libuv")
- (version "1.35.0")
+ (version "1.38.1")
(source (origin
(method url-fetch)
(uri (string-append "https://dist.libuv.org/dist/v" version
"/libuv-v" version ".tar.gz"))
(sha256
(base32
- "0126mfmaw3s92dsga60sydgwjmzwg9cd36n127pydmisah17v50f"))))
+ "0iy6yp9nrxpj643w7la3kl3j59ni59b0l4v6n23a63s8kqkpvkhf"))))
(build-system gnu-build-system)
(arguments
'(#:configure-flags '("--disable-static")
diff --git a/gnu/packages/libffi.scm b/gnu/packages/libffi.scm
index 6c434bbe90..0f549bdbda 100644
--- a/gnu/packages/libffi.scm
+++ b/gnu/packages/libffi.scm
@@ -6,7 +6,7 @@
;;; 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,7 +51,8 @@
name "-" version ".tar.gz"))
(sha256
(base32
- "0mi0cpf8aa40ljjmzxb7im6dbj45bb0kllcd09xgmp834y9agyvj"))))
+ "0mi0cpf8aa40ljjmzxb7im6dbj45bb0kllcd09xgmp834y9agyvj"))
+ (patches (search-patches "libffi-3.3-powerpc-fixes.patch"))))
(build-system gnu-build-system)
(arguments
`(;; Prevent the build system from passing -march and -mtune to the
@@ -127,20 +128,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"
@@ -151,8 +142,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
@@ -175,8 +165,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..b46cdfc0a5 100644
--- a/gnu/packages/libidn.scm
+++ b/gnu/packages/libidn.scm
@@ -5,6 +5,7 @@
;;; 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.36")
(source (origin
(method url-fetch)
(uri (string-append "mirror://gnu/libidn/libidn-" version
".tar.gz"))
(sha256
(base32
- "07pyy0afqikfq51z5kbzbj9ldbd12mri0zvx0mfv3ds6bc0g26pi"))))
+ "0f20n634whpmdwr81c2r0vxxjwchgkvhsr1i8s2bm0ad6h473dhl"))))
(build-system gnu-build-system)
;; FIXME: No Java and C# libraries are currently built.
(arguments
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/linux.scm b/gnu/packages/linux.scm
index 9e31dfc5db..5f716c367a 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -1500,7 +1500,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.35.2")
(source (origin
(method url-fetch)
(uri (string-append "mirror://kernel.org/linux/utils/"
@@ -1508,7 +1508,7 @@ providing the system administrator with some help in common tasks.")
"util-linux-" version ".tar.xz"))
(sha256
(base32
- "1yfpy6bkab4jw61mpx48gfy24yrqp4a7arvpis8csrkk53fkxpnr"))
+ "12mm5qvkq1vpllfv99gq93lkxlvysp1yxgh1392dkg7nh8g47dr1"))
(patches (search-patches "util-linux-tests.patch"))
(modules '((guix build utils)))
(snippet
@@ -1526,7 +1526,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"
@@ -7689,7 +7692,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.scm b/gnu/packages/lisp.scm
index 69011a3197..60f346fde3 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, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
;;; Copyright © 2018 Benjamin Slade <slade@jnanam.net>
@@ -441,7 +441,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
@@ -513,10 +513,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")
diff --git a/gnu/packages/llvm.scm b/gnu/packages/llvm.scm
index 114654c628..9cfe97d543 100644
--- a/gnu/packages/llvm.scm
+++ b/gnu/packages/llvm.scm
@@ -487,7 +487,7 @@ output), and Binutils.")
(build-system cmake-build-system)
(outputs '("out" "opt-viewer"))
(native-inputs
- `(("python" ,python-2) ;bytes->str conversion in clang>=3.7 needs python-2
+ `(("python" ,python-wrapper)
("perl" ,perl)))
(inputs
`(("libffi" ,libffi)))
@@ -559,23 +559,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
@@ -584,7 +584,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))
diff --git a/gnu/packages/machine-learning.scm b/gnu/packages/machine-learning.scm
index 4e35e3e369..f8a0d11768 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 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.
;;;
@@ -217,20 +217,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"
@@ -241,8 +228,7 @@ classification.")
line
"\"-Wl,-rpath="
(assoc-ref outputs "out")
- "/lib\", ")))
- #t))
+ "/lib\", ")))))
(add-after 'enter-dir 'disable-broken-tests
(lambda _
(substitute* "tests/Makefile.am"
@@ -262,8 +248,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)))
@@ -1417,7 +1402,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}"))
@@ -1426,7 +1411,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
@@ -1550,10 +1535,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$")
@@ -1690,8 +1674,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")
@@ -1702,9 +1685,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")))
@@ -1730,15 +1710,13 @@ 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)
(setenv "LDFLAGS"
(string-append "-Wl,-rpath="
(assoc-ref outputs "out") "/lib"))
- (invoke "make" "tf_python_build_pip_package")
- #t))
+ (invoke "make" "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"))
@@ -1753,8 +1731,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
diff --git a/gnu/packages/mail.scm b/gnu/packages/mail.scm
index b3927bbafe..ddf0e6b177 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>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -1230,7 +1231,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")))))
@@ -3378,7 +3379,6 @@ which sends emails to HyperKitty, the official Mailman3 web archiver.")
(modify-phases %standard-phases
(replace 'check
(lambda _
- (setenv "PYTHONPATH" (string-append ".:" (getenv "PYTHONPATH")))
(invoke "example_project/manage.py" "test"
"--settings=hyperkitty.tests.settings_test"))))))
(propagated-inputs
diff --git a/gnu/packages/make-bootstrap.scm b/gnu/packages/make-bootstrap.scm
index b2d3e2a326..04fdbce429 100644
--- a/gnu/packages/make-bootstrap.scm
+++ b/gnu/packages/make-bootstrap.scm
@@ -375,10 +375,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
diff --git a/gnu/packages/man.scm b/gnu/packages/man.scm
index 894272b2b9..19ac321b06 100644
--- a/gnu/packages/man.scm
+++ b/gnu/packages/man.scm
@@ -34,6 +34,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)
@@ -257,9 +258,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.47.16")
(source
(origin
(method url-fetch)
@@ -267,18 +270,26 @@ Linux kernel and C library interfaces employed by user-space programs.")
version ".tar.xz"))
(sha256
(base32
- "08q5arxz4j4pyx5q4712c2rn7p7dw7as9xg38yvmsh1c3ynvpy5p"))))
+ "1x586h7wvripcay35kdh2kvydx84y8yy93ffjah2rqw6bc65iy1y"))))
(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)
- ))
+ ("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/mate.scm b/gnu/packages/mate.scm
index a9635d90fe..8360be0197 100644
--- a/gnu/packages/mate.scm
+++ b/gnu/packages/mate.scm
@@ -706,7 +706,7 @@ infamous 'Wanda the Fish'.")
(define-public atril
(package
(name "atril")
- (version "1.22.0")
+ (version "1.24.0")
(source
(origin
(method url-fetch)
@@ -714,7 +714,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="
@@ -758,6 +758,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
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index eff1480e62..3cd06b0815 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -327,8 +327,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
@@ -477,35 +477,38 @@ precision floating point numbers.")
(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"))
+ #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
+ '((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 '()))))))
(home-page "https://www.gnu.org/software/gsl/")
(synopsis "Numerical library for C and C++")
(description
@@ -2010,7 +2013,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)
@@ -3637,16 +3640,17 @@ parts of it.")
(define-public openblas
(package
(name "openblas")
- (version "0.3.9")
+ (version "0.3.13")
(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"))))
+ "14jxh0v3jfbw4mfjx4mcz4dd51lyq7pqvh9k8dg94539ypzjr2lj"))))
(build-system gnu-build-system)
(arguments
`(#:test-target "test"
@@ -4454,7 +4458,7 @@ set.")
`(("doc++" ,doc++)
("netpbm" ,netpbm)
("perl" ,perl) ; needed to run 'ppmquant' during tests
- ("texlive" ,(texlive-union (list texlive-xypic
+ ("texlive" ,(texlive-updmap.cfg (list texlive-xypic
texlive-cm
texlive-latex-hyperref
texlive-bibtex)))
@@ -4474,12 +4478,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
diff --git a/gnu/packages/messaging.scm b/gnu/packages/messaging.scm
index 8ddf70540a..9a9b694cbd 100644
--- a/gnu/packages/messaging.scm
+++ b/gnu/packages/messaging.scm
@@ -1021,7 +1021,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
diff --git a/gnu/packages/mpd.scm b/gnu/packages/mpd.scm
index 4138f4d2f6..0ffbed0eba 100644
--- a/gnu/packages/mpd.scm
+++ b/gnu/packages/mpd.scm
@@ -404,15 +404,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)
diff --git a/gnu/packages/multiprecision.scm b/gnu/packages/multiprecision.scm
index b3a5ec5894..4aa4c6be56 100644
--- a/gnu/packages/multiprecision.scm
+++ b/gnu/packages/multiprecision.scm
@@ -38,7 +38,7 @@
(define-public gmp
(package
(name "gmp")
- (version "6.2.0")
+ (version "6.2.1")
(source (origin
(method url-fetch)
(uri
@@ -46,7 +46,7 @@
version ".tar.xz"))
(sha256
(base32
- "09hmg8k63mbfrx1x3yy6y1yzbbq85kw5avbibhcgrg9z3ganr3i5"))
+ "1wml97fdmpcynsbw9yl77rj29qibfp652d0w3222zlfx5j8jjj7x"))
(patches (search-patches "gmp-faulty-test.patch"))))
(build-system gnu-build-system)
(native-inputs `(("m4" ,m4)))
@@ -113,13 +113,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>
@@ -134,14 +134,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
diff --git a/gnu/packages/music.scm b/gnu/packages/music.scm
index 1193c83a13..9599a9e659 100644
--- a/gnu/packages/music.scm
+++ b/gnu/packages/music.scm
@@ -1298,15 +1298,6 @@ 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"
@@ -1351,9 +1342,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" ,(texlive-updmap.cfg (list texlive-metapost
texlive-generic-epsf
- texlive-latex-lh
+ texlive-lh
texlive-latex-cyrillic)))
("texinfo" ,texinfo)
("texi2html" ,texi2html-1.82)
@@ -1720,9 +1711,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)
diff --git a/gnu/packages/nettle.scm b/gnu/packages/nettle.scm
index f5e7188ff0..fab5324a71 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 Mark H Weaver <mhw@netris.org>
-;;; Copyright © 2017 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2017, 2020, 2021 Efraim Flashner <efraim@flashner.co.il>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -75,14 +75,14 @@ themselves.")
;; 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")
+ (version "3.7")
(source (origin
(method url-fetch)
(uri (string-append "mirror://gnu/nettle/nettle-"
version ".tar.gz"))
(sha256
(base32
- "06clvkdfxhlbagn4afssylmn5vrak59dlmnvy8b2xc31hycs3k3m"))))
+ "0nn7rslvjbj5g04b5qnn251hrinb1b1cpv5wj7fi7gs4ni7gc0gh"))))
(arguments
(substitute-keyword-arguments (package-arguments nettle-2)
((#:configure-flags flags)
diff --git a/gnu/packages/networking.scm b/gnu/packages/networking.scm
index abaab60f31..97d7f91e88 100644
--- a/gnu/packages/networking.scm
+++ b/gnu/packages/networking.scm
@@ -621,7 +621,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))
@@ -3562,11 +3562,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/nss.scm b/gnu/packages/nss.scm
index 0444b47071..e054363e9f 100644
--- a/gnu/packages/nss.scm
+++ b/gnu/packages/nss.scm
@@ -5,6 +5,7 @@
;;; Copyright © 2017, 2018 Tobias Geerinckx-Rice <me@tobias.gr>
;;; Copyright © 2020 Marius Bakke <mbakke@fastmail.com>
;;; Copyright © 2020 Jonathan Brielmaier <jonathan.brielmaier@web.de>
+;;; Copyright © 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -24,6 +25,8 @@
(define-module (gnu packages nss)
#:use-module (guix packages)
#:use-module (guix download)
+ #:use-module (guix git-download)
+ #:use-module (guix hg-download)
#:use-module (guix build-system gnu)
#:use-module ((guix licenses) #:prefix license:)
#:use-module (gnu packages)
@@ -70,116 +73,124 @@ platform-neutral API for system level and libc-like functions. It is used
in the Mozilla clients.")
(license license:mpl2.0)))
+;;; Note: When updating, also test the build of the nss-certs package, which
+;;; uses the same source as nss.
(define-public nss
- (package
- (name "nss")
- (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"))
- ;; Create nss.pc and nss-config.
- (patches (search-patches "nss-3.56-pkgconfig.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))))
- (build-system gnu-build-system)
- (outputs '("out" "bin"))
- (arguments
- `(#:parallel-build? #f ; not supported
- #:make-flags
- (let* ((out (assoc-ref %outputs "out"))
- (nspr (string-append (assoc-ref %build-inputs "nspr")))
- (rpath (string-append "-Wl,-rpath=" out "/lib/nss")))
- (list "-C" "nss" (string-append "PREFIX=" out)
- "NSDISTMODE=copy"
- "NSS_USE_SYSTEM_SQLITE=1"
- (string-append "NSPR_INCLUDE_DIR=" nspr "/include/nspr")
- ;; Add $out/lib/nss to RPATH.
- (string-append "RPATH=" rpath)
- (string-append "LDFLAGS=" rpath)))
- #:modules ((guix build gnu-build-system)
- (guix build utils)
- (ice-9 ftw)
- (ice-9 match)
- (srfi srfi-26))
- #:phases
- (modify-phases %standard-phases
- (replace 'configure
- (lambda _
- (setenv "CC" "gcc")
- ;; 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))
- (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")
+ ;; Use the latest commit to get this fix:
+ ;; https://bugzilla.mozilla.org/show_bug.cgi?id=1686134, which caused test
+ ;; failures. A simple patch cannot be used, as git binary diffs is not
+ ;; supported.
+ (let ((revision "1")
+ (changeset "92dcda94c1d4688edad2c094d505cd253757c0d4"))
+ (package
+ (name "nss")
+ (version (git-version "3.61" revision changeset))
+ (source (origin
+ (method hg-fetch)
+ (uri (hg-reference
+ (url "https://hg.mozilla.org/projects/nss")
+ (changeset changeset)))
+ (sha256
+ (base32
+ "0j3hnsfw1855x150zgdyf3d6wapiph80rmbvc34ykpp3j347q5hb"))
+ (file-name (git-file-name name version))
+ ;; Create nss.pc and nss-config.
+ (patches (search-patches "nss-3.56-pkgconfig.patch"
+ "nss-increase-test-timeout.patch"))
+ (modules '((guix build utils)))
+ (snippet
+ '(begin
+ ;; Delete the bundled copy of these libraries.
+ (delete-file-recursively "lib/zlib")
+ (delete-file-recursively "lib/sqlite")))))
+ (build-system gnu-build-system)
+ (outputs '("out" "bin"))
+ (arguments
+ ;; Parallel builds are not supported (see:
+ ;; https://bugzilla.mozilla.org/show_bug.cgi?id=1640328).
+ `(#:parallel-build? #f
+ #:tests? #t ;requires at least one hour to run
+ #:make-flags
+ (let* ((out (assoc-ref %outputs "out"))
+ (nspr (string-append (assoc-ref %build-inputs "nspr")))
+ (rpath (string-append "-Wl,-rpath=" out "/lib/nss")))
+ (list (string-append "PREFIX=" out)
+ "NSDISTMODE=copy"
+ "NSS_USE_SYSTEM_SQLITE=1"
+ (string-append "NSPR_INCLUDE_DIR=" nspr "/include/nspr")
+ ;; Add $out/lib/nss to RPATH.
+ (string-append "RPATH=" rpath)
+ (string-append "LDFLAGS=" rpath)))
+ #:modules ((guix build gnu-build-system)
+ (guix build utils)
+ (ice-9 ftw)
+ (ice-9 match)
+ (srfi srfi-26))
+ #:phases
+ (modify-phases %standard-phases
+ (replace 'configure
+ (lambda _
+ (setenv "CC" "gcc")
+ ;; 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")))
+ (_
+ '()))))
+ (replace 'check
+ (lambda* (#:key tests? #:allow-other-keys)
+ (when tests?
+ ;; 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")
- ;; 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")))
- (replace 'install
- (lambda* (#:key outputs #:allow-other-keys)
- (let* ((out (assoc-ref outputs "out"))
- (bin (string-append (assoc-ref outputs "bin") "/bin"))
- (inc (string-append out "/include/nss"))
- (lib (string-append out "/lib/nss"))
- (obj (match (scandir "dist" (cut string-suffix? "OBJ" <>))
- ((obj) (string-append "dist/" obj)))))
- ;; Install nss-config to $out/bin.
- (install-file (string-append obj "/bin/nss-config")
- (string-append out "/bin"))
- (delete-file (string-append obj "/bin/nss-config"))
- ;; Install nss.pc to $out/lib/pkgconfig.
- (install-file (string-append obj "/lib/pkgconfig/nss.pc")
- (string-append out "/lib/pkgconfig"))
- (delete-file (string-append obj "/lib/pkgconfig/nss.pc"))
- (rmdir (string-append obj "/lib/pkgconfig"))
- ;; Install other files.
- (copy-recursively "dist/public/nss" inc)
- (copy-recursively (string-append obj "/bin") bin)
- (copy-recursively (string-append obj "/lib") lib)
- #t))))))
- (inputs
- `(("sqlite" ,sqlite)
- ("zlib" ,zlib)))
- (propagated-inputs `(("nspr" ,nspr))) ; required by nss.pc.
- (native-inputs `(("perl" ,perl)
- ("libfaketime" ,libfaketime))) ;for tests
+ ;; 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-01-22" "./tests/all.sh"))))
+ (replace 'install
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (bin (string-append (assoc-ref outputs "bin") "/bin"))
+ (inc (string-append out "/include/nss"))
+ (lib (string-append out "/lib/nss"))
+ (obj (match (scandir "../dist" (cut string-suffix? "OBJ" <>))
+ ((obj) (string-append "../dist/" obj)))))
+ ;; Install nss-config to $out/bin.
+ (install-file (string-append obj "/bin/nss-config")
+ (string-append out "/bin"))
+ (delete-file (string-append obj "/bin/nss-config"))
+ ;; Install nss.pc to $out/lib/pkgconfig.
+ (install-file (string-append obj "/lib/pkgconfig/nss.pc")
+ (string-append out "/lib/pkgconfig"))
+ (delete-file (string-append obj "/lib/pkgconfig/nss.pc"))
+ (rmdir (string-append obj "/lib/pkgconfig"))
+ ;; Install other files.
+ (mkdir-p inc)
+ (copy-recursively "../dist/public/nss" inc)
+ (copy-recursively (string-append obj "/bin") bin)
+ (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
- ;; 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
+ ;; 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
- (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
+ (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
support cross-platform development of security-enabled client and server
applications. Applications built with NSS can support SSL v2 and v3, TLS,
PKCS #5, PKCS #7, PKCS #11, PKCS #12, S/MIME, X.509 v3 certificates, and other
security standards.")
- (license license:mpl2.0)))
+ (license license:mpl2.0))))
diff --git a/gnu/packages/onc-rpc.scm b/gnu/packages/onc-rpc.scm
index 14ff13c038..02c8be02fa 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")
@@ -79,8 +75,7 @@ IPv4 and IPv6. ONC RPC is notably used by the network file system (NFS).")
(inherit libtirpc)
(name "libtirpc-hurd")
(source (origin (inherit (package-source libtirpc))
- (patches (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/openldap.scm b/gnu/packages/openldap.scm
index fb917882e7..d6a7aa2668 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.
;;;
@@ -228,7 +229,7 @@ servers from Python programs.")
`(#:modules ((srfi srfi-1)
(guix build gnu-build-system)
((guix build python-build-system)
- #:select (python-version))
+ #:select (add-installed-pythonpath))
(guix build utils))
#:imported-modules ((guix build python-build-system)
,@%gnu-build-system-modules)
@@ -259,8 +260,8 @@ servers from Python programs.")
(("'/usr/bin/certutil'")
(string-append "'" (which "certutil") "'"))
(("'/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")))
@@ -278,28 +279,21 @@ 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"))
- (pythondir (string-append
- out "/lib/python"
- (python-version (assoc-ref inputs "python"))
- "/site-packages/")))
+ (let* ((out (assoc-ref outputs "out")))
;; 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
@@ -308,27 +302,24 @@ 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/readnsstate"))))))))
(inputs
`(("bdb" ,bdb)
("cracklib" ,cracklib)
@@ -343,7 +334,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)
@@ -409,4 +400,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/password-utils.scm b/gnu/packages/password-utils.scm
index ef4bf535a4..50e98cd038 100644
--- a/gnu/packages/password-utils.scm
+++ b/gnu/packages/password-utils.scm
@@ -442,10 +442,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"
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/boost-fix-transitive-linking.patch b/gnu/packages/patches/boost-fix-transitive-linking.patch
new file mode 100644
index 0000000000..a42feab109
--- /dev/null
+++ b/gnu/packages/patches/boost-fix-transitive-linking.patch
@@ -0,0 +1,16 @@
+Patch from https://github.com/boostorg/boost_install/issues/47
+which should be included in the Boost 1.76 release.
+
+This patch prevents CMake from explicitly linking against Boost dependencies
+when building against the shared Boost libraries.
+--- a/tools/boost_install/boost-install.jam
++++ b/tools/boost_install/boost-install.jam
+@@ -483,7 +483,7 @@ rule generate-cmake-variant- ( target : sources * : properties * )
+
+ .info " deps3=" $(deps3) ;
+
+- if $(deps3)
++ if $(deps3) && $(link) = static
+ {
+ print.text
+
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/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/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-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/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/glibc-bootstrap-system.patch b/gnu/packages/patches/glibc-bootstrap-system.patch
index 39eb47ef26..fcaf17132d 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,4 +18,25 @@ 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 },
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/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/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/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/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/nss-3.56-pkgconfig.patch b/gnu/packages/patches/nss-3.56-pkgconfig.patch
index 91b6aef604..df3f474aec 100644
--- a/gnu/packages/patches/nss-3.56-pkgconfig.patch
+++ b/gnu/packages/patches/nss-3.56-pkgconfig.patch
@@ -1,25 +1,79 @@
-Description: Create nss.pc and nss-config
-Author: Lars Wendler <polynomial-c@gentoo.org>
-Source: http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/dev-libs/nss/files/nss-3.17.1-gentoo-fixups.patch
+From 1b3c48499abb000d708abe5f05413c1f4155e086 Mon Sep 17 00:00:00 2001
+From: Jory Pratt <anarchy@gentoo.org>
+Date: Mon, 8 Jun 2020 12:22:29 -0500
+Subject: [PATCH] Add pkg-config and nss-config for Gentoo
-Modifications:
- Change libdir from ${prefix}/lib64 to ${prefix}/lib/nss.
- Remove optional patching in nss/Makefile.
- Include -L$libdir in output from "nss-config --libs".
+Modifications to use with Guix and the latest NSS source checkout code: use
+'install' instead of 'ln -sf' and adapt the relative file names.
-Later adapted to apply cleanly to nss-3.53.
+---
+ Makefile | 15 +----
+ config/Makefile | 40 ++++++++++++
+ config/nss-config.in | 145 +++++++++++++++++++++++++++++++++++++++++++
+ config/nss.pc.in | 12 ++++
+ manifest.mn | 2 +-
+ 5 files changed, 200 insertions(+), 14 deletions(-)
+ create mode 100644 config/Makefile
+ create mode 100644 config/nss-config.in
+ create mode 100644 config/nss.pc.in
---- nss-3.21/nss/config/Makefile
-+++ nss-3.21/nss/config/Makefile
+diff --git a/Makefile b/Makefile
+index eb4ed1a..f979d90 100644
+--- a/Makefile
++++ b/Makefile
+@@ -4,6 +4,8 @@
+ # License, v. 2.0. If a copy of the MPL was not distributed with this
+ # file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
++default: nss_build_all
++
+ #######################################################################
+ # (1) Include initial platform-independent assignments (MANDATORY). #
+ #######################################################################
+@@ -48,12 +50,9 @@ include $(CORE_DEPTH)/coreconf/rules.mk
+ #######################################################################
+
+ nss_build_all:
+- $(MAKE) build_nspr
+ $(MAKE) all
+- $(MAKE) latest
+
+ nss_clean_all:
+- $(MAKE) clobber_nspr
+ $(MAKE) clobber
+
+ NSPR_CONFIG_STATUS = $(CORE_DEPTH)/../nspr/$(OBJDIR_NAME)/config.status
+@@ -138,16 +137,6 @@ $(NSPR_CONFIG_STATUS): $(NSPR_CONFIGURE)
+ --prefix='$(NSS_GYP_PREFIX)'
+ endif
+
+-build_nspr: $(NSPR_CONFIG_STATUS)
+- $(MAKE) -C $(CORE_DEPTH)/../nspr/$(OBJDIR_NAME)
+- $(MAKE) -C $(CORE_DEPTH)/../nspr/$(OBJDIR_NAME)/pr/tests
+-
+-install_nspr: build_nspr
+- $(MAKE) -C $(CORE_DEPTH)/../nspr/$(OBJDIR_NAME) install
+-
+-clobber_nspr: $(NSPR_CONFIG_STATUS)
+- $(MAKE) -C $(CORE_DEPTH)/../nspr/$(OBJDIR_NAME) clobber
+-
+ build_docs:
+ $(MAKE) -C $(CORE_DEPTH)/doc
+
+diff --git a/config/Makefile b/config/Makefile
+new file mode 100644
+index 0000000..aaf1991
+--- /dev/null
++++ b/config/Makefile
@@ -0,0 +1,40 @@
+CORE_DEPTH = ..
+DEPTH = ..
+
+include $(CORE_DEPTH)/coreconf/config.mk
+
-+NSS_MAJOR_VERSION = `grep "NSS_VMAJOR" ../lib/nss/nss.h | awk '{print $$3}'`
-+NSS_MINOR_VERSION = `grep "NSS_VMINOR" ../lib/nss/nss.h | awk '{print $$3}'`
-+NSS_PATCH_VERSION = `grep "NSS_VPATCH" ../lib/nss/nss.h | awk '{print $$3}'`
++NSS_MAJOR_VERSION = $(shell grep -F "NSS_VMAJOR" ../lib/nss/nss.h | awk '{print $$3}')
++NSS_MINOR_VERSION = $(shell grep -F "NSS_VMINOR" ../lib/nss/nss.h | awk '{print $$3}')
++NSS_PATCH_VERSION = $(shell grep -F "NSS_VPATCH" ../lib/nss/nss.h | awk '{print $$3}')
+PREFIX = /usr
+
+all: export libs
@@ -29,14 +83,14 @@ Later adapted to apply cleanly to nss-3.53.
+ mkdir -p $(DIST)/lib/pkgconfig
+ sed -e "s,@prefix@,$(PREFIX)," \
+ -e "s,@exec_prefix@,\$${prefix}," \
-+ -e "s,@libdir@,\$${prefix}/lib/nss," \
++ -e "s,@libdir@,\$${prefix}/lib64," \
+ -e "s,@includedir@,\$${prefix}/include/nss," \
+ -e "s,@NSS_MAJOR_VERSION@,$(NSS_MAJOR_VERSION),g" \
+ -e "s,@NSS_MINOR_VERSION@,$(NSS_MINOR_VERSION)," \
+ -e "s,@NSS_PATCH_VERSION@,$(NSS_PATCH_VERSION)," \
+ nss.pc.in > nss.pc
+ chmod 0644 nss.pc
-+ cp nss.pc $(DIST)/lib/pkgconfig
++ install nss.pc $(DIST)/lib/pkgconfig
+
+ # Create the nss-config script
+ mkdir -p $(DIST)/bin
@@ -46,14 +100,17 @@ Later adapted to apply cleanly to nss-3.53.
+ -e "s,@NSS_PATCH_VERSION@,$(NSS_PATCH_VERSION)," \
+ nss-config.in > nss-config
+ chmod 0755 nss-config
-+ cp nss-config $(DIST)/bin
++ install nss-config $(DIST)/bin
+
+libs:
+
+dummy: all export libs
+
---- nss-3.21/nss/config/nss-config.in
-+++ nss-3.21/nss/config/nss-config.in
+diff --git a/config/nss-config.in b/config/nss-config.in
+new file mode 100644
+index 0000000..3a957b8
+--- /dev/null
++++ b/config/nss-config.in
@@ -0,0 +1,145 @@
+#!/bin/sh
+
@@ -95,31 +152,31 @@ Later adapted to apply cleanly to nss-3.53.
+
+while test $# -gt 0; do
+ case "$1" in
-+ -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
++ -*=*) optarg=$(echo "$1" | sed 's/[-_a-zA-Z0-9]*=//') ;;
+ *) optarg= ;;
+ esac
+
+ case $1 in
+ --prefix=*)
-+ prefix=$optarg
++ prefix=${optarg}
+ ;;
+ --prefix)
+ echo_prefix=yes
+ ;;
+ --exec-prefix=*)
-+ exec_prefix=$optarg
++ exec_prefix=${optarg}
+ ;;
+ --exec-prefix)
+ echo_exec_prefix=yes
+ ;;
+ --includedir=*)
-+ includedir=$optarg
++ includedir=${optarg}
+ ;;
+ --includedir)
+ echo_includedir=yes
+ ;;
+ --libdir=*)
-+ libdir=$optarg
++ libdir=${optarg}
+ ;;
+ --libdir)
+ echo_libdir=yes
@@ -153,55 +210,58 @@ Later adapted to apply cleanly to nss-3.53.
+done
+
+# Set variables that may be dependent upon other variables
-+if test -z "$exec_prefix"; then
-+ exec_prefix=`pkg-config --variable=exec_prefix nss`
++if test -z "${exec_prefix}"; then
++ exec_prefix=$(pkg-config --variable=exec_prefix nss)
+fi
-+if test -z "$includedir"; then
-+ includedir=`pkg-config --variable=includedir nss`
++if test -z "${includedir}"; then
++ includedir=$(pkg-config --variable=includedir nss)
+fi
-+if test -z "$libdir"; then
-+ libdir=`pkg-config --variable=libdir nss`
++if test -z "${libdir}"; then
++ libdir=$(pkg-config --variable=libdir nss)
+fi
+
-+if test "$echo_prefix" = "yes"; then
-+ echo $prefix
++if test "${echo_prefix}" = "yes"; then
++ echo ${prefix}
+fi
+
-+if test "$echo_exec_prefix" = "yes"; then
-+ echo $exec_prefix
++if test "${echo_exec_prefix}" = "yes"; then
++ echo ${exec_prefix}
+fi
+
-+if test "$echo_includedir" = "yes"; then
-+ echo $includedir
++if test "${echo_includedir}" = "yes"; then
++ echo ${includedir}
+fi
+
-+if test "$echo_libdir" = "yes"; then
-+ echo $libdir
++if test "${echo_libdir}" = "yes"; then
++ echo ${libdir}
+fi
+
-+if test "$echo_cflags" = "yes"; then
-+ echo -I$includedir
++if test "${echo_cflags}" = "yes"; then
++ echo -I${includedir}
+fi
+
-+if test "$echo_libs" = "yes"; then
-+ libdirs=-L$libdir
-+ if test -n "$lib_ssl"; then
-+ libdirs="$libdirs -lssl${major_version}"
++if test "${echo_libs}" = "yes"; then
++ libdirs=""
++ if test -n "${lib_ssl}"; then
++ libdirs="${libdirs} -lssl${major_version}"
+ fi
-+ if test -n "$lib_smime"; then
-+ libdirs="$libdirs -lsmime${major_version}"
++ if test -n "${lib_smime}"; then
++ libdirs="${libdirs} -lsmime${major_version}"
+ fi
-+ if test -n "$lib_nss"; then
-+ libdirs="$libdirs -lnss${major_version}"
++ if test -n "${lib_nss}"; then
++ libdirs="${libdirs} -lnss${major_version}"
+ fi
-+ if test -n "$lib_nssutil"; then
-+ libdirs="$libdirs -lnssutil${major_version}"
++ if test -n "${lib_nssutil}"; then
++ libdirs="${libdirs} -lnssutil${major_version}"
+ fi
-+ echo $libdirs
++ echo ${libdirs}
+fi
+
---- nss-3.21/nss/config/nss.pc.in
-+++ nss-3.21/nss/config/nss.pc.in
+diff --git a/config/nss.pc.in b/config/nss.pc.in
+new file mode 100644
+index 0000000..03f1e39
+--- /dev/null
++++ b/config/nss.pc.in
@@ -0,0 +1,12 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
@@ -211,18 +271,23 @@ Later adapted to apply cleanly to nss-3.53.
+Name: NSS
+Description: Network Security Services
+Version: @NSS_MAJOR_VERSION@.@NSS_MINOR_VERSION@.@NSS_PATCH_VERSION@
-+Requires: nspr >= 4.8
-+Libs: -L${libdir} -lssl3 -lsmime3 -lnss3 -lnssutil3
++Requires: nspr >= 4.25
++Libs: -lssl3 -lsmime3 -lnss3 -lnssutil3
+Cflags: -I${includedir}
+
---- nss-3.21/nss/manifest.mn
-+++ nss-3.21/nss/manifest.mn
-@@ -10,7 +10,7 @@
-
+diff --git a/manifest.mn b/manifest.mn
+index dada8ab..72dc9b3 100644
+--- a/manifest.mn
++++ b/manifest.mn
+@@ -10,7 +10,7 @@ IMPORTS = nspr20/v4.8 \
+
RELEASE = nss
-
+
-DIRS = coreconf lib cmd cpputil gtests
-+DIRS = coreconf lib cmd cpputil gtests config
-
++DIRS = coreconf lib cmd cpputil config
+
lib: coreconf
cmd: lib
+--
+2.26.2
+
diff --git a/gnu/packages/patches/nss-increase-test-timeout.patch b/gnu/packages/patches/nss-increase-test-timeout.patch
index 55117c02e9..1f6dd42bd7 100644
--- a/gnu/packages/patches/nss-increase-test-timeout.patch
+++ b/gnu/packages/patches/nss-increase-test-timeout.patch
@@ -3,8 +3,8 @@ machine. Even a busy x86_64 machine can use more than 5s on some tests.
Increase timeouts to increase chances of a successful build.
---- a/nss/gtests/ssl_gtest/tls_connect.cc 2017-03-14 22:47:30.855813629 +0100
-+++ b/nss/gtests/ssl_gtest/tls_connect.cc 2017-03-14 22:48:49.042335273 +0100
+--- a/gtests/ssl_gtest/tls_connect.cc 2017-03-14 22:47:30.855813629 +0100
++++ b/gtests/ssl_gtest/tls_connect.cc 2017-03-14 22:48:49.042335273 +0100
@@ -245,7 +245,7 @@
ASSERT_TRUE_WAIT((client_->state() != TlsAgent::STATE_CONNECTING) &&
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/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.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-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-libxml2-python39-compat.patch b/gnu/packages/patches/python-libxml2-python39-compat.patch
new file mode 100644
index 0000000000..a707ea3434
--- /dev/null
+++ b/gnu/packages/patches/python-libxml2-python39-compat.patch
@@ -0,0 +1,94 @@
+https://gitlab.gnome.org/GNOME/libxml2/-/commit/e4fb36841800038c289997432ca547c9bfef9db1.patch
+
+From e4fb36841800038c289997432ca547c9bfef9db1 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= <miro@hroncok.cz>
+Date: Fri, 28 Feb 2020 12:48:14 +0100
+Subject: [PATCH] Parenthesize Py<type>_Check() in ifs
+
+In C, if expressions should be parenthesized.
+PyLong_Check, PyUnicode_Check etc. happened to expand to a parenthesized
+expression before, but that's not API to rely on.
+
+Since Python 3.9.0a4 it needs to be parenthesized explicitly.
+
+Fixes https://gitlab.gnome.org/GNOME/libxml2/issues/149
+---
+ python/libxml.c | 4 ++--
+ python/types.c | 12 ++++++------
+ 2 files changed, 8 insertions(+), 8 deletions(-)
+
+diff --git a/python/libxml.c b/python/libxml.c
+index bc676c4e..81e709f3 100644
+--- a/python/libxml.c
++++ b/python/libxml.c
+@@ -294,7 +294,7 @@ xmlPythonFileReadRaw (void * context, char * buffer, int len) {
+ lenread = PyBytes_Size(ret);
+ data = PyBytes_AsString(ret);
+ #ifdef PyUnicode_Check
+- } else if PyUnicode_Check (ret) {
++ } else if (PyUnicode_Check (ret)) {
+ #if PY_VERSION_HEX >= 0x03030000
+ Py_ssize_t size;
+ const char *tmp;
+@@ -359,7 +359,7 @@ xmlPythonFileRead (void * context, char * buffer, int len) {
+ lenread = PyBytes_Size(ret);
+ data = PyBytes_AsString(ret);
+ #ifdef PyUnicode_Check
+- } else if PyUnicode_Check (ret) {
++ } else if (PyUnicode_Check (ret)) {
+ #if PY_VERSION_HEX >= 0x03030000
+ Py_ssize_t size;
+ const char *tmp;
+diff --git a/python/types.c b/python/types.c
+index c2bafeb1..ed284ec7 100644
+--- a/python/types.c
++++ b/python/types.c
+@@ -602,16 +602,16 @@ libxml_xmlXPathObjectPtrConvert(PyObject *obj)
+ if (obj == NULL) {
+ return (NULL);
+ }
+- if PyFloat_Check (obj) {
++ if (PyFloat_Check (obj)) {
+ ret = xmlXPathNewFloat((double) PyFloat_AS_DOUBLE(obj));
+- } else if PyLong_Check(obj) {
++ } else if (PyLong_Check(obj)) {
+ #ifdef PyLong_AS_LONG
+ ret = xmlXPathNewFloat((double) PyLong_AS_LONG(obj));
+ #else
+ ret = xmlXPathNewFloat((double) PyInt_AS_LONG(obj));
+ #endif
+ #ifdef PyBool_Check
+- } else if PyBool_Check (obj) {
++ } else if (PyBool_Check (obj)) {
+
+ if (obj == Py_True) {
+ ret = xmlXPathNewBoolean(1);
+@@ -620,14 +620,14 @@ libxml_xmlXPathObjectPtrConvert(PyObject *obj)
+ ret = xmlXPathNewBoolean(0);
+ }
+ #endif
+- } else if PyBytes_Check (obj) {
++ } else if (PyBytes_Check (obj)) {
+ xmlChar *str;
+
+ str = xmlStrndup((const xmlChar *) PyBytes_AS_STRING(obj),
+ PyBytes_GET_SIZE(obj));
+ ret = xmlXPathWrapString(str);
+ #ifdef PyUnicode_Check
+- } else if PyUnicode_Check (obj) {
++ } else if (PyUnicode_Check (obj)) {
+ #if PY_VERSION_HEX >= 0x03030000
+ xmlChar *str;
+ const char *tmp;
+@@ -650,7 +650,7 @@ libxml_xmlXPathObjectPtrConvert(PyObject *obj)
+ ret = xmlXPathWrapString(str);
+ #endif
+ #endif
+- } else if PyList_Check (obj) {
++ } else if (PyList_Check (obj)) {
+ int i;
+ PyObject *node;
+ xmlNodePtr cur;
+--
+GitLab
+
diff --git a/gnu/packages/patches/python-pyflakes-fix-tests.patch b/gnu/packages/patches/python-pyflakes-fix-tests.patch
new file mode 100644
index 0000000000..48107c8253
--- /dev/null
+++ b/gnu/packages/patches/python-pyflakes-fix-tests.patch
@@ -0,0 +1,40 @@
+From c873a25136dfdb062855b595cdf0a992ac825adf Mon Sep 17 00:00:00 2001
+From: Louis Sautier <sautier.louis@gmail.com>
+Date: Sat, 3 Oct 2020 01:36:15 +0200
+Subject: [PATCH] Fix tests with Python 3.9, closes #549
+
+---
+ pyflakes/test/test_api.py | 8 ++++++--
+ 1 file changed, 6 insertions(+), 2 deletions(-)
+
+diff --git a/pyflakes/test/test_api.py b/pyflakes/test/test_api.py
+index 8e1e3c9c..906fb396 100644
+--- a/pyflakes/test/test_api.py
++++ b/pyflakes/test/test_api.py
+@@ -517,6 +515,8 @@ def foo(bar=baz, bax):
+ if ERROR_HAS_LAST_LINE:
+ if PYPY:
+ column = 7
++ elif sys.version_info >= (3, 9):
++ column = 21
+ elif sys.version_info >= (3, 8):
+ column = 9
+ else:
+@@ -545,6 +545,8 @@ def test_nonKeywordAfterKeywordSyntaxError(self):
+ if ERROR_HAS_LAST_LINE:
+ if PYPY:
+ column = 12
++ elif sys.version_info >= (3, 9):
++ column = 17
+ elif sys.version_info >= (3, 8):
+ column = 14
+ else:
+@@ -579,6 +581,8 @@ def test_invalidEscape(self):
+ 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-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/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/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 1354c860a5..444f458657 100644
--- a/gnu/packages/patchutils.scm
+++ b/gnu/packages/patchutils.scm
@@ -348,7 +348,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
diff --git a/gnu/packages/perl-check.scm b/gnu/packages/perl-check.scm
index ad8b166bd9..1b90a8d07b 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.002006")
(source
(origin
(method url-fetch)
@@ -981,7 +981,7 @@ bit more fine-grained control over test suites.")
".tar.gz"))
(sha256
(base32
- "16gkgpmr9hvkz382iaqd3500269lk2d44fqaw3dsrvc66nc36kss"))))
+ "1rgh6gs5kbbjh27zxxxi1g6zf69k7i9v65h49prhjpkcr7qgzybp"))))
(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 370783caf0..2f586ffb0e 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 Marius Bakke <marius@gnu.org>
;;; Copyright © 2017 Adriano Peluso <catonano@gmail.com>
;;; Copyright © 2017, 2018, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
;;; Copyright © 2017 Leo Famulari <leo@famulari.name>
@@ -88,18 +88,17 @@
;; Yeah, Perl... It is required early in the bootstrap process by Linux.
(package
(name "perl")
- (version "5.30.2")
+ (version "5.32.0")
(source (origin
(method url-fetch)
(uri (string-append "mirror://cpan/src/5.0/perl-"
version ".tar.gz"))
(sha256
(base32
- "128nfdxcvxfn5kq55qcfrx2851ys8hv794dcdxbyny8rm7w7vnv6"))
+ "1d6001cjnpxfv79000bx00vmv2nvdz7wrnyas451j908y7hirszg"))
(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
@@ -4968,6 +4967,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")
@@ -8394,13 +8412,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")
@@ -11036,7 +11080,7 @@ MYMETA.yml.")
(define-public perl-module-build
(package
(name "perl-module-build")
- (version "0.4229")
+ (version "0.4231")
(source
(origin
(method url-fetch)
@@ -11044,7 +11088,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)))
diff --git a/gnu/packages/photo.scm b/gnu/packages/photo.scm
index 5402826fd6..fc4467c0cb 100644
--- a/gnu/packages/photo.scm
+++ b/gnu/packages/photo.scm
@@ -156,13 +156,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"
@@ -655,10 +655,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)
diff --git a/gnu/packages/plotutils.scm b/gnu/packages/plotutils.scm
index f23b56728a..b34eb0d299 100644
--- a/gnu/packages/plotutils.scm
+++ b/gnu/packages/plotutils.scm
@@ -226,7 +226,7 @@ colors, styles, options and details.")
("perl" ,perl)
("texinfo" ,texinfo) ;For generating documentation
;; For the manual and the tests.
- ("texlive" ,(texlive-union (list texlive-amsfonts
+ ("texlive" ,(texlive-updmap.cfg (list texlive-amsfonts
texlive-epsf
texlive-etoolbox
texlive-latex-base
@@ -308,9 +308,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/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/protobuf.scm b/gnu/packages/protobuf.scm
index 61dee46d43..50caccce1e 100644
--- a/gnu/packages/protobuf.scm
+++ b/gnu/packages/protobuf.scm
@@ -4,7 +4,7 @@
;;; Copyright © 2016 Leo Famulari <leo@famulari.name>
;;; Copyright © 2017, 2018, 2019 Ricardo Wurmus <rekado@elephly.net>
;;; Copyright © 2017, 2018, 2019, 2020 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 Vinicius Monego <monego@posteo.net>
;;; Copyright © 2020 Brett Gilio <brettg@gnu.org>
;;;
@@ -255,26 +255,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/pulseaudio.scm b/gnu/packages/pulseaudio.scm
index ea61dd807c..fa9a111d40 100644
--- a/gnu/packages/pulseaudio.scm
+++ b/gnu/packages/pulseaudio.scm
@@ -99,10 +99,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)))
@@ -232,6 +233,7 @@ rates.")
("libltdl" ,libltdl)
("fftwf" ,fftwf)
("avahi" ,avahi)
+ ("webrtc-audio-processing", webrtc-audio-processing)
;; For the optional X11 modules.
("libice" ,libice)
diff --git a/gnu/packages/python-build.scm b/gnu/packages/python-build.scm
index 1ce6a3095a..65b90ddf40 100644
--- a/gnu/packages/python-build.scm
+++ b/gnu/packages/python-build.scm
@@ -37,14 +37,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
diff --git a/gnu/packages/python-check.scm b/gnu/packages/python-check.scm
index c23741825b..9849b16685 100644
--- a/gnu/packages/python-check.scm
+++ b/gnu/packages/python-check.scm
@@ -576,9 +576,6 @@ compliance.")
(modify-phases %standard-phases
(replace 'check
(lambda _
- (setenv "PYTHONPATH"
- (string-append (getcwd) ":"
- (getenv "PYTHONPATH")))
(invoke "pytest"))))))
(propagated-inputs
`(("python-isort" ,python-isort)
@@ -1075,7 +1072,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)
@@ -1096,6 +1093,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-eradicate
(package
(name "python-eradicate")
diff --git a/gnu/packages/python-crypto.scm b/gnu/packages/python-crypto.scm
index 1f491cc972..39b194b25e 100644
--- a/gnu/packages/python-crypto.scm
+++ b/gnu/packages/python-crypto.scm
@@ -24,6 +24,7 @@
;;; Copyright © 2020 Alexandros Theodotou <alex@zrythm.org>
;;; Copyright © 2020 Justus Winter <justus@sequoia-pgp.org>
;;; Copyright © 2020 Vinicius Monego <monego@posteo.net>
+;;; Copyright © 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -789,31 +790,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)))
diff --git a/gnu/packages/python-web.scm b/gnu/packages/python-web.scm
index ab3769b360..947c200253 100644
--- a/gnu/packages/python-web.scm
+++ b/gnu/packages/python-web.scm
@@ -26,7 +26,7 @@
;;; Copyright © 2018 Tomáš Čech <sleep_walker@gnu.org>
;;; Copyright © 2018, 2019 Nicolas Goaziou <mail@nicolasgoaziou.fr>
;;; Copyright © 2018 Mathieu Othacehe <m.othacehe@gmail.com>
-;;; Copyright © 2018, 2020 Maxim Cournoyer <maxim.cournoyer@gmail.com>
+;;; Copyright © 2018, 2020, 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;; Copyright © 2019 Vagrant Cascadian <vagrant@debian.org>
;;; Copyright © 2019 Brendan Tildesley <mail@brendan.scot>
;;; Copyright © 2019 Pierre Langlois <pierre.langlois@gmx.com>
@@ -122,12 +122,9 @@
(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")))
(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
@@ -250,9 +247,6 @@ comes with a SOCKS proxy client.")
'(#: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)
@@ -364,9 +358,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.
@@ -416,11 +407,6 @@ emit information from within their applications to the AWS X-Ray service.")
;; to avoid a dependency on 'git'.
(delete-file
"test/unit/module/maintenance/test_update_documentation.py")
- (setenv "PYTHONPATH"
- (string-append "./build/lib:"
- (getenv "PYTHONPATH")))
- (setenv "PATH" (string-append out "/bin:"
- (getenv "PATH")))
(invoke "python" "-m" "unittest" "discover"
"-s" "test")))))))
(native-inputs
@@ -706,9 +692,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
@@ -1380,9 +1363,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..).
@@ -2841,8 +2821,6 @@ minimum of WSGI.")
(modify-phases %standard-phases
(replace 'check
(lambda _
- (setenv "PYTHONPATH" (string-append "./build/lib:"
- (getenv "PYTHONPATH")))
(invoke "pytest" "-vv" "tests"))))))
(native-inputs
`(("python-pytest" ,python-pytest)))
@@ -2878,8 +2856,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)
@@ -3643,13 +3619,9 @@ for Flask.")
(lambda _
;; 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)
@@ -4373,7 +4345,8 @@ Python.")
(sha256
(base32 "0w22fapghmzk3xdasc4dn7h8sl58l08d1h5zbf72dh80drv1g9b9"))))
(propagated-inputs
- `(("python-unidecode" ,python-unidecode)))
+ `(("python-unidecode" ,python-unidecode)
+ ("python-text-unidecode" ,python-text-unidecode)))
(arguments
`(#:phases
(modify-phases %standard-phases
@@ -4529,12 +4502,9 @@ 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 _
- (setenv "PYTHONPATH"
- (string-append ".:" (getenv "PYTHONPATH")))
(invoke "pytest")))
(add-after 'install 'install-doc
(lambda* (#:key outputs #:allow-other-keys)
@@ -4551,8 +4521,7 @@ event loop. It is implemented in Cython and uses libuv under the hood.")
(copy-recursively "examples" examples)
(for-each (lambda (file)
(copy-file file (string-append doc "/" file)))
- '("README.rst" "NOTICE" "LICENSE" "THANKS")))
- #t)))))
+ '("README.rst" "NOTICE" "LICENSE" "THANKS"))))))))
(native-inputs
`(("binutils" ,binutils) ;; for ctypes.util.find_library()
("python-aiohttp" ,python-aiohttp)
@@ -5060,7 +5029,15 @@ Plus all the standard features of requests:
(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 e296e3c6e1..219624c848 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -53,7 +53,7 @@
;;; Copyright © 2018, 2019, 2020, 2021 Nicolas Goaziou <mail@nicolasgoaziou.fr>
;;; Copyright © 2018 Oleg Pykhalov <go.wigust@gmail.com>
;;; Copyright © 2018, 2019 Clément Lassieur <clement@lassieur.org>
-;;; Copyright © 2018, 2019, 2020 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 © 2015, 2018 Pjotr Prins <pjotr.guix@thebird.nl>
@@ -338,12 +338,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
@@ -530,13 +525,8 @@ to CommonMark.")
#t))
(replace 'check
(lambda _
- ;; 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"
- (invoke "pytest" "-vv" "-k" "not test_parse_url")
- #t)))))
+ (invoke "pytest" "-vv" "-k" "not test_parse_url"))))))
(home-page
"https://github.com/sbraz/pymediainfo")
(synopsis
@@ -715,15 +705,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
@@ -731,7 +722,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
@@ -842,14 +833,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")
@@ -1302,9 +1285,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
@@ -1808,14 +1788,14 @@ from the Python interpreter, or as a small part of a larger application.")
(define-public python-six
(package
(name "python-six")
- (version "1.14.0")
+ (version "1.15.0")
(source
(origin
(method url-fetch)
(uri (pypi-uri "six" version))
(sha256
(base32
- "02lw67hprv57hyg3cfy02y3ixjk3nzwc0dx3c4ynlvkfwkfdnsr3"))))
+ "0n82108wxn5giff50hd9ykjhd3zl7cndabdasi6568yvbh1rqqrh"))))
(build-system python-build-system)
(arguments
`(#:phases
@@ -1953,16 +1933,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
@@ -2472,14 +2454,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
@@ -2496,18 +2478,6 @@ server.")
code introspection, and logging.")
(license license:expat)))
-(define-public python-py-next
- (package
- (inherit python-py)
- (version "1.9.0")
- (source
- (origin
- (method url-fetch)
- (uri (pypi-uri "py" version))
- (sha256
- (base32
- "0hpk0gzd4v1pcnq7zinwg5n219czi23qghcswykqskkbwly8i9lw"))))))
-
(define-public python2-py
(package-with-python2 python-py))
@@ -2702,11 +2672,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)))
@@ -2822,8 +2790,6 @@ compare, diff, and patch JSON and JSON-like structures in Python.")
(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"))))))
(native-inputs
`(("python-setuptools_scm" ,python-setuptools-scm)
@@ -2955,9 +2921,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)))
@@ -3079,13 +3042,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
@@ -3186,36 +3149,61 @@ 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-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)
+ (arguments
+ `(#:python ,python-2
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'set-paths 'adjust-PYTHONPATH
+ (lambda* (#:key inputs #:allow-other-keys)
+ (let* ((python (assoc-ref inputs "python"))
+ (python-sitedir (string-append python "/lib/python2.7"
+ "/site-packages")))
+ ;; XXX: 'python2' always comes first on PYTHONPATH
+ ;; and shadows the 'setuptools' input. Move python2
+ ;; last: this should be fixed in python-build-system
+ ;; in a future rebuild cycle.
+ (setenv "PYTHONPATH"
+ (string-append (string-join (delete python-sitedir
+ (string-split
+ (getenv "PYTHONPATH")
+ #\:))
+ ":")
+ ":" python-sitedir))
+ (format #t "environment variable `PYTHONPATH' changed to `~a'~%"
+ (getenv "PYTHONPATH"))
+ #t))))))
+ (propagated-inputs
+ `(("python-contextlib2" ,python2-contextlib2)
+ ,@(package-propagated-inputs base))))))
+
(define-public python-markupsafe
(package
(name "python-markupsafe")
@@ -3229,21 +3217,10 @@ e.g. filters, callbacks and errbacks can all be promises.")
"0sqipg4fk7xbixqd8kq6rlkxj664d157bdwbh93farcphf92x1r9"))))
(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")))))))
+ (invoke "pytest" "-vv"))))))
(native-inputs
`(("python-pytest" ,python-pytest)))
(home-page "https://github.com/mitsuhiko/markupsafe")
@@ -3273,13 +3250,8 @@ for Python.")
(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
@@ -3706,17 +3678,14 @@ to deprecate classes, functions or methods.")
(add-after 'unpack 'disable-failing-tests
(lambda _
(substitute* "tests/Issue142.py"
- (("testDecodeJson") "disabled_testDecodeJson"))
- #t))
+ (("testDecodeJson")
+ "disabled_testDecodeJson"))))
(add-before 'check 'prepare-for-tests
(lambda _
(for-each (lambda (f)
(chmod f #o666))
(find-files "./tests"))
- (system* "python" "-m" "lib2to3" "-w" "-n" "tests")
- (setenv "PYTHONPATH"
- (string-append "./tests:" (getenv "PYTHONPATH")))
- #t)))))
+ (system* "python" "-m" "lib2to3" "-w" "-n" "tests"))))))
(propagated-inputs
`(("python-deprecated" ,python-deprecated)
("python-pyjwt" ,python-pyjwt)
@@ -4232,7 +4201,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)
@@ -4703,7 +4679,7 @@ color scales, and color space conversion easy. It has support for:
("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-fonts-cm-super
texlive-fonts-ec
texlive-generic-ifxetex
texlive-generic-pdftex
@@ -4769,7 +4745,7 @@ color scales, and color space conversion easy. It has support for:
(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")
@@ -5235,7 +5211,7 @@ toolkits.")
("python-ipykernel" ,python-ipykernel)
("python-mock" ,python-mock)
("graphviz" ,graphviz)
- ("texlive" ,(texlive-union (list texlive-amsfonts
+ ("texlive" ,(texlive-updmap.cfg (list texlive-amsfonts
texlive-latex-amsmath
texlive-latex-enumitem
texlive-latex-expdlist
@@ -5261,9 +5237,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.*")
@@ -5298,8 +5272,7 @@ 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))
@@ -5508,24 +5481,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)))
@@ -5604,14 +5565,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
@@ -6268,13 +6229,13 @@ PNG, PostScript, PDF, and SVG file output.")
(define-public python-decorator
(package
(name "python-decorator")
- (version "4.3.0")
+ (version "4.4.2")
(source
(origin
(method url-fetch)
(uri (pypi-uri "decorator" version))
(sha256
- (base32 "0308djallnh00v112y5b7nadl657ysmkp6vc8xn51d6yzc9zm7n3"))))
+ (base32 "1rxzhk5zwiggk45hl53zydvy70lk654kg0nc1p54090p402jz9p3"))))
(build-system python-build-system)
(home-page "https://pypi.org/project/decorator/")
(synopsis "Python module to simplify usage of decorators")
@@ -6529,13 +6490,13 @@ 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 "5.0.1")
(source (origin
(method url-fetch)
(uri (pypi-uri "setuptools_scm" version))
(sha256
(base32
- "083k93wi7mrmp1cn28hcbnr6sivbgls0y7zz2m5qzn1wg04a3f16"))))
+ "0ahlrxxkx2xhmxskx57gc96w3bdndflxx30304ihvm7ds136nny8"))))
(build-system python-build-system)
(home-page "https://github.com/pypa/setuptools_scm/")
(synopsis "Manage Python package versions in SCM metadata")
@@ -7030,7 +6991,8 @@ cluster down and deletes the throwaway profile.")
(replace 'check (lambda _ (invoke "pytest" "-vv" "traitlets"))))))
(propagated-inputs
`(("python-ipython-genutils" ,python-ipython-genutils)
- ("python-decorator" ,python-decorator)))
+ ("python-decorator" ,python-decorator)
+ ("python-six" ,python-six)))
(native-inputs
`(("python-pytest" ,python-pytest)))
(properties `((python2-variant . ,(delay python2-traitlets))))
@@ -7438,10 +7400,10 @@ 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
+ ("texlive" ,(texlive-updmap.cfg (list texlive-amsfonts
texlive-fonts-ec
texlive-generic-ifxetex
- texlive-generic-pdftex
+ texlive-pdftex
texlive-latex-capt-of
texlive-latex-cmap
texlive-latex-environ
@@ -8192,8 +8154,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)))
@@ -8349,10 +8309,10 @@ PEP 8.")
(uri (pypi-uri "pyflakes" version))
(sha256
(base32
- "1j3zqbiwkyicvww499bblq33x0bjpzdrxajhaysr7sk7x5gdgcim"))))
+ "1j3zqbiwkyicvww499bblq33x0bjpzdrxajhaysr7sk7x5gdgcim"))
+ (patches (search-patches "python-pyflakes-fix-tests.patch"))))
(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.")
@@ -8366,21 +8326,21 @@ PEP 8.")
(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
@@ -8515,10 +8475,6 @@ 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"))))))
(native-inputs
`(("python-flake8" ,python-flake8)
@@ -8561,14 +8517,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)
@@ -8975,14 +8931,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")
@@ -9605,6 +9554,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)
@@ -10678,14 +10628,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.")
@@ -11146,8 +11097,6 @@ text.")
#t))
(replace 'check
(lambda _
- (setenv "PYTHONPATH" (string-append "./build/lib:"
- (getenv "PYTHONPATH")))
(invoke "pytest" "-vv" "-m" "not network"
;; These tests require Docker.
"-k" "not test_terminate_job \
@@ -12559,12 +12508,6 @@ module in Python 3.5 and later.")
(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)
@@ -12733,13 +12676,6 @@ graphviz.")
#t)))
(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)))
@@ -12800,7 +12736,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)
@@ -13344,17 +13287,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)))
@@ -13379,6 +13320,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")
@@ -13388,7 +13337,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)
@@ -13637,7 +13587,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")
@@ -13954,14 +13905,9 @@ 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" "")
- #t)))))
+ (setenv "HOME" ""))))))
(native-inputs
`(("python-coverage" ,python-coverage)
("python-nose" ,python-nose)))
@@ -14088,8 +14034,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
@@ -14120,27 +14064,14 @@ Python to manipulate OpenDocument 1.2 files.")
"1ksqfai72dbcfbwx43pxl658j59mx2rvqypjy1fk0ax2qd6lccx6"))))
(build-system python-build-system)
(arguments
- `(#:modules ((guix build utils)
- (guix build python-build-system)
- (srfi srfi-1)
- (srfi srfi-26)
- (ice-9 ftw))
- #:phases
+ `(#:phases
(modify-phases %standard-phases
(add-before 'check 'set-cachedir
;; Tests require write access to $HOME by default
(lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t))
(replace 'check
(lambda _
- (let ((cwd (getcwd)))
- (setenv "PYTHONPATH"
- (string-append
- cwd "/build/"
- (find (cut string-prefix? "lib" <>)
- (scandir (string-append cwd "/build")))
- ":"
- (getenv "PYTHONPATH")))
- (invoke "pytest" "-v")))))))
+ (invoke "pytest" "-v"))))))
(native-inputs
`(("python-hypothesis" ,python-hypothesis)
("python-pytest-cov" ,python-pytest-cov)
@@ -14476,10 +14407,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)))
@@ -14508,16 +14435,6 @@ 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
@@ -14770,43 +14687,25 @@ 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/")
@@ -14905,9 +14804,6 @@ 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
@@ -15207,7 +15103,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)
@@ -15275,32 +15179,19 @@ and bit flag values.")
(define-public python-attrs
(package
(name "python-attrs")
- (version "19.3.0")
+ (version "20.3.0")
(source (origin
(method url-fetch)
(uri (pypi-uri "attrs" version))
(sha256
(base32
- "0wky4h28n7xnr6xv69p9z6kv8bzn50d10c3drmd9ds8gawbcxdzp"))))
+ "007pchhxk2nh6m2rgflkkij9xjwysq3fl7xr72cy8i4pw76s6al3"))))
(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
(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 "python" "-m" "pytest")))))))
+ (invoke "pytest"))))))
(native-inputs
`(("python-coverage" ,python-coverage)
("python-hypothesis" ,python-hypothesis)
@@ -15578,38 +15469,83 @@ version, is suitable to be include as a dependency in other projects.")
(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.")
- (license license:expat)
- (properties `((python2-variant . ,(delay python2-isort))))))
-
-(define-public python2-isort
- (let ((base (package-with-python2
- (strip-python2-variant python-isort))))
- (package (inherit base)
- (native-inputs
- `(("python2-futures" ,python2-futures)
- ,@(package-native-inputs base))))))
+ (license license:expat)))
(define-public python2-backports-functools-lru-cache
(package
@@ -16002,9 +15938,6 @@ 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")
@@ -16094,10 +16027,17 @@ information.")
(package/inherit
python-packaging
(name "python-packaging-bootstrap")
+ (arguments
+ (substitute-keyword-arguments (package-arguments python-packaging)
+ ((#:phases phases)
+ `(modify-phases ,phases
+ (add-after 'unpack 'fix-dependencies
+ (lambda* (#:key tests? #:allow-other-keys)
+ (substitute* "setup.py" (("\"six\"") ""))))))
+ ((#:tests? _ #f) #f)))
(native-inputs '())
(propagated-inputs
- `(("python-pyparsing" ,python-pyparsing)))
- (arguments '(#:tests? #f)))))
+ `(("python-pyparsing" ,python-pyparsing))))))
(define-public python2-packaging-bootstrap
(hidden-package
@@ -16106,7 +16046,8 @@ information.")
(name "python2-packaging-bootstrap")
(native-inputs '())
(propagated-inputs
- `(("python-pyparsing" ,python2-pyparsing)))
+ `(("python-pyparsing" ,python2-pyparsing)
+ ("python-six" ,python2-six-bootstrap)))
(arguments
`(#:tests? #f
,@(package-arguments python2-packaging))))))
@@ -16386,23 +16327,11 @@ 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/")
@@ -16725,19 +16654,13 @@ complex datatypes to and from native Python datatypes.")
(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
@@ -16772,9 +16695,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)
@@ -17297,7 +17217,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")
@@ -17832,17 +17753,7 @@ user's @file{~/Trash} directory.")
(license license:bsd-3)))
(define-public python2-send2trash
- (package
- (inherit (package-with-python2 (strip-python2-variant python-send2trash)))
- (arguments
- (substitute-keyword-arguments (package-arguments python-send2trash)
- ((#:phases phases)
- `(modify-phases ,phases
- (add-before 'check 'setenv
- (lambda _
- (setenv "PYTHONPATH"
- (string-append (getcwd) ":" (getenv "PYTHONPATH")))
- #t))))))))
+ (package-with-python2 (strip-python2-variant python-send2trash)))
(define-public python-pyfavicon
(package
@@ -18193,7 +18104,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)
@@ -18201,28 +18112,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")
@@ -18928,8 +18826,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?
@@ -18937,11 +18834,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)))
@@ -19626,20 +19519,11 @@ pure-Python.")
(build-system python-build-system)
(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"))
- #t))
(replace 'check
(lambda* (#:key tests? #:allow-other-keys)
(if tests?
(invoke "pytest" "-s" "-vv")
- (format #t "test suite not run~%"))
- #t)))))
+ (format #t "test suite not run~%")))))))
(native-inputs
`(;; For tests.
("python-psutil" ,python-psutil)
@@ -21056,8 +20940,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)
@@ -23069,7 +22951,7 @@ By default it uses the open Python vulnerability database Safety DB.")
(propagated-inputs
`(("wheel" ,python-wheel)))
(native-inputs
- `(("texlive" ,(texlive-union (list texlive-amsfonts
+ `(("texlive" ,(texlive-updmap.cfg (list texlive-amsfonts
texlive-fonts-ec
texlive-latex-hyperref
texlive-latex-oberdiek
@@ -23084,8 +22966,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")
diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index 27e9b70432..8e8f46467b 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -54,11 +54,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 © 2020 Greg Hogan <code@greghogan.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -95,65 +96,93 @@
#: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 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 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"))
- (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"))
+ (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"))
+ #t))))
(outputs '("out"
- "tk")) ;tkinter; adds 50 MiB to the closure
+ "tk")) ;tkinter; adds 50 MiB to the closure
(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
"--enable-unicode=ucs4"
;; Prevent the installed _sysconfigdata.py from retaining a reference
@@ -181,12 +210,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
@@ -204,38 +233,36 @@
"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
+ ,@(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
(lambda _
;; 'Lib/test/test_site.py' needs a valid $HOME
(setenv "HOME" (getcwd))
#t))
- (add-after
- 'unpack 'set-source-file-times-to-1980
+ (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
@@ -246,96 +273,98 @@
(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))))))
+ (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)))))))))
+ (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)))
+ (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/.*"
+ ,out)))
+ ;; 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")))
+ #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)))
+ (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
@@ -361,23 +390,24 @@ 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.1")
(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-fix-tests.patch"
- "python-3.8-fix-tests.patch"
+ "python-3-arm-alignment.patch"
"python-3-deterministic-build-info.patch"
+ "python-3-fix-tests.patch"
+ "python-3-hurd-configure.patch"
"python-3-search-paths.patch"))
(sha256
(base32
- "1ps5v323cp5czfshqjmbsqw7nvrdpcbk06f62jbzaqik4gfffii6"))
+ "1zq3k4ymify5ig739zyvx9s2ainvchxb1zpy139z74krr653y74r"))
(modules '((guix build utils)))
(snippet
'(begin
@@ -392,11 +422,8 @@ data types.")
((#: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,35 +457,17 @@ 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-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")))
@@ -467,87 +476,39 @@ data types.")
(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")))))
- '()))))))
+ (format #t "Compiling with optimization level: ~a\n" opt)
+ (lambda (file)
+ (apply invoke
+ `(,,(if (%current-target-system)
+ "python3"
+ '(string-append out
+ "/bin/python3"))
+ ,opt
+ "-m" "compileall"
+ "-f" ; force rebuild
+ "--invalidation-mode=unchecked-hash"
+ ;; Don't build lib2to3, because it's Python 2 code.
+ "-x" "lib2to3/.*"
+ ,out))))
+ (list "none" "-O" "-OO")))))
+ (replace 'install-sitecustomize.py
+ ,(customize-site version))))))
(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")))
- '()))
-
,@(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.1")
- (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
- "1zq3k4ymify5ig739zyvx9s2ainvchxb1zpy139z74krr653y74r"))
- (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)
@@ -814,9 +775,6 @@ ease from the desktop to a microcontroller or embedded system.")
"targetpypystandalone"))
;; 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/radio.scm b/gnu/packages/radio.scm
index c3f1c0c933..bbf7fb8d57 100644
--- a/gnu/packages/radio.scm
+++ b/gnu/packages/radio.scm
@@ -304,7 +304,7 @@ used by RDS Spy, and audio files containing @dfn{multiplex} signals (MPX).")
("python-scipy" ,python-scipy)
("python-sphinx" ,python-sphinx)
("swig" ,swig)
- ("texlive" ,(texlive-union (list texlive-amsfonts
+ ("texlive" ,(texlive-updmap.cfg (list texlive-amsfonts
texlive-latex-amsmath
;; TODO: Add newunicodechar.
texlive-latex-graphics)))
@@ -401,7 +401,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))
@@ -472,7 +472,7 @@ to access different radio hardware.")
("doxygen" ,doxygen)
("libtool" ,libtool)
("pkg-config" ,pkg-config)
- ("texlive" ,(texlive-union (list texlive-amsfonts
+ ("texlive" ,(texlive-updmap.cfg (list texlive-amsfonts
texlive-latex-amsmath
;; TODO: Add newunicodechar.
texlive-latex-graphics)))))
diff --git a/gnu/packages/readline.scm b/gnu/packages/readline.scm
index 8a36883347..b4c91675a4 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 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.
;;;
@@ -46,13 +46,8 @@
(list (readline-patch version seqno (base32 hash))
...))
-(define %patch-series-8.0
- (patch-series
- "8.0"
- (1 "0sfh7wn0pr743xspnb1zndxndlv9rc0hcg14cbw5cmyg6f4ykrfq")
- (2 "1xy8mv8xm8hsfixwp3ci9kfx3dii3y92cq27wwd0jq75y6zzxc1n")
- (3 "1vza7sxjcsr2z295ij12nzgncdil1vb6as3mqy4m7svi1chv5pcl")
- (4 "0k1rfx9w32lglxg564yvp0mw6jg6883p8ac2f2lxxqpf80m3vami")))
+(define %patch-series-8.1
+ '())
(define %patch-series-7.0
(patch-series
@@ -66,16 +61,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/ruby.scm b/gnu/packages/ruby.scm
index b811cbd2c4..2bd6fc21cf 100644
--- a/gnu/packages/ruby.scm
+++ b/gnu/packages/ruby.scm
@@ -89,7 +89,7 @@
license:gpl2+
license:gpl3+))
-(define-public ruby
+(define-public ruby-2.6
(package
(name "ruby")
(version "2.6.5")
@@ -147,7 +147,7 @@ a focus on simplicity and productivity.")
(define-public ruby-2.7
(package
- (inherit ruby)
+ (inherit ruby-2.6)
(version "2.7.2")
(source
(origin
@@ -204,7 +204,7 @@ a focus on simplicity and productivity.")
(define-public ruby-2.5
(package
- (inherit ruby)
+ (inherit ruby-2.6)
(version "2.5.8")
(source
(origin
@@ -223,7 +223,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
@@ -240,6 +240,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")
@@ -1228,14 +1230,6 @@ syntax to the minimum while remaining clear.")
`(#: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")
@@ -1434,17 +1428,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)
@@ -1566,15 +1550,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)
@@ -1616,14 +1591,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)
@@ -1745,15 +1712,6 @@ web pages.")
(("(.*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)
diff --git a/gnu/packages/scheme.scm b/gnu/packages/scheme.scm
index 6c30ed8bf6..e16f4dc1b9 100644
--- a/gnu/packages/scheme.scm
+++ b/gnu/packages/scheme.scm
@@ -123,10 +123,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")))
@@ -174,7 +170,7 @@
("autoconf" ,autoconf)
("automake" ,automake)
("libtool" ,libtool)
- ("texlive" ,(texlive-union (list texlive-tex-texinfo)))
+ ("texlive" ,(texlive-updmap.cfg (list texlive-tex-texinfo)))
("texinfo" ,texinfo)
("m4" ,m4)))
(inputs
diff --git a/gnu/packages/screen.scm b/gnu/packages/screen.scm
index 0491731e20..40584d7445 100644
--- a/gnu/packages/screen.scm
+++ b/gnu/packages/screen.scm
@@ -138,7 +138,7 @@ controlling terminal and attach to it later.")
(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/serialization.scm b/gnu/packages/serialization.scm
index fc0102caf0..86f6ac6a1c 100644
--- a/gnu/packages/serialization.scm
+++ b/gnu/packages/serialization.scm
@@ -10,6 +10,7 @@
;;; 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>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -285,16 +286,15 @@ that implements both the msgpack and msgpack-rpc specifications.")
(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"))
(sha256
(base32
- "037d1b1qdmn3rksmn1j71j26bv4hkjv7sn7da261k853xb5899sg"))))
+ "0qnx5y6c90fphl9mj9d20j2dfgy6s5yr5l0xnzid0vh71zrp6jwv"))))
(build-system cmake-build-system)
(arguments
`(#:configure-flags '("-DBUILD_SHARED_LIBS:BOOL=YES"
diff --git a/gnu/packages/shells.scm b/gnu/packages/shells.scm
index 5ee7add8b1..6e60907287 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>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -372,7 +373,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/.
@@ -382,7 +383,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)
@@ -407,6 +408,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"))
diff --git a/gnu/packages/simulation.scm b/gnu/packages/simulation.scm
index 45efd5c472..fe93e68076 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 Paul Garlick <pgarlick@tourbillion-technology.com>
+;;; Copyright © 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -267,16 +268,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
@@ -312,11 +310,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
@@ -350,8 +344,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
@@ -361,8 +353,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
@@ -402,8 +393,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
@@ -628,8 +617,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
@@ -671,14 +659,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"
@@ -690,8 +672,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
@@ -705,8 +686,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/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/spice.scm b/gnu/packages/spice.scm
index 92aeef7f79..7a7442e756 100644
--- a/gnu/packages/spice.scm
+++ b/gnu/packages/spice.scm
@@ -325,9 +325,7 @@ resolution scaling on graphical console window resize.")
"0vyvkk4b6xjwq1ccggql13c1x7g4y90clpkqw28257azgn2a1c8n"))))
(build-system gnu-build-system)
(arguments
- '(#:tests? #f ; TODO Tests require gnutls built with
- ; p11-kit
- #:phases
+ '(#:phases
(modify-phases %standard-phases
(add-after 'unpack 'patch-tests
(lambda* (#:key inputs #:allow-other-keys)
diff --git a/gnu/packages/sqlite.scm b/gnu/packages/sqlite.scm
index eeb77749d8..6186756f1a 100644
--- a/gnu/packages/sqlite.scm
+++ b/gnu/packages/sqlite.scm
@@ -1,5 +1,5 @@
;;; 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>
@@ -48,7 +48,7 @@
(define-public sqlite
(package
(name "sqlite")
- (version "3.31.1")
+ (version "3.34.0")
(source (origin
(method url-fetch)
(uri (let ((numeric-version
@@ -62,16 +62,12 @@
6 #\0))))))
(string-append "https://sqlite.org/2020/sqlite-autoconf-"
numeric-version ".tar.gz")))
+ (patches (search-patches "sqlite-hurd.patch"))
(sha256
(base32
- "1bj936svd8i5g25xd1bj52hj4zca01fgl3sqkj86z9q5pkz4wa32"))))
+ "1vlsvlp5nvhd5pdjpmdczfsv7mml2gsalykl6x3palbxwgxbfvdz"))))
(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
@@ -79,25 +75,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"))
diff --git a/gnu/packages/statistics.scm b/gnu/packages/statistics.scm
index 77cd629882..f6554e5fcc 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>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -337,7 +338,7 @@ 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
@@ -5733,25 +5734,15 @@ to any arbitrary string. In this case, it is up to you to set valid values.")
"18wpvfaa4c13d44cb4sw88c3c7403xdy5m8h82wfq8fjmcq3cmzn")))))))
(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 d53327df75..4c2fa21a78 100644
--- a/gnu/packages/storage.scm
+++ b/gnu/packages/storage.scm
@@ -168,10 +168,7 @@
"/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"))
@@ -190,7 +187,7 @@
(sitedir prettytable))))
(for-each (lambda (executable)
(wrap-program (string-append out "/bin/" executable)
- `("PYTHONPATH" ":" prefix (,PYTHONPATH))))
+ `("GUIX_PYTHONPATH" ":" prefix (,PYTHONPATH))))
scripts)
#t))))))
(outputs
diff --git a/gnu/packages/syndication.scm b/gnu/packages/syndication.scm
index 0e33f99910..016c5452dd 100644
--- a/gnu/packages/syndication.scm
+++ b/gnu/packages/syndication.scm
@@ -209,10 +209,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)
diff --git a/gnu/packages/task-management.scm b/gnu/packages/task-management.scm
index 3c0efe13e2..47a355213d 100644
--- a/gnu/packages/task-management.scm
+++ b/gnu/packages/task-management.scm
@@ -96,11 +96,11 @@ and querying data, exposing task data in multiple formats to other tools.")
(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/tex.scm b/gnu/packages/tex.scm
index bdf881f643..fa5a0c6404 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -35,6 +35,7 @@
#:use-module ((guix licenses) #:prefix license:)
#: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)
@@ -233,98 +234,105 @@ files from LOCATIONS with expected checksum HASH. CODE is not currently in use.
(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://git.archlinux.org/svntogit/packages.git"
- "/plain/trunk/" name "?h=packages/texlive-bin"
- "&id=" revision))
- (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 "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://git.archlinux.org/svntogit/packages.git"
+ "/plain/trunk/" name "?h=packages/texlive-bin"
+ "&id=" revision))
+ (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)
+ ("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
+ "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)
+ ("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-system-cairo"
"--with-system-freetype2"
"--with-system-gd"
@@ -344,108 +352,189 @@ files from LOCATIONS with expected checksum HASH. CODE is not currently in use.
"--with-system-zlib"
"--with-system-zziplib")
- ;; Disable tests on mips64/aarch64 to cope with a failure of luajiterr.test.
- ;; XXX FIXME fix luajit properly on mips64 and aarch64.
- #:tests? ,(let ((s (or (%current-target-system)
- (%current-system))))
- (not (or (string-prefix? "aarch64" s)
- (string-prefix? "mips64" 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.
+ ;; Disable tests on mips64/aarch64 to cope with a failure of luajiterr.test.
+ ;; XXX FIXME fix luajit properly on mips64 and aarch64.
+ #:tests? ,(let ((s (or (%current-target-system)
+ (%current-system))))
+ (not (or (string-prefix? "aarch64" s)
+ (string-prefix? "mips64" 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 '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 "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
+ '("texlive-scripts/source/rubibtex.sh"
+ "texlive-scripts/source/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 'postint
+ (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 (string-append (assoc-ref inputs "config")
+ "/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 texlive-docstrip
@@ -551,9 +640,9 @@ to adapt the plain e-TeX source file to work with XeTeX and LuaTeX.")
(define-public texlive-generic-tex-ini-files
(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)
@@ -589,11 +678,13 @@ 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)
+ (for-each (lambda (where)
+ (copy-recursively where (string-append mf where)))
+ (list "base" "misc" "config"))
#t))))))
(native-inputs
`(("texlive-bin" ,texlive-bin)))
@@ -603,6 +694,9 @@ to adapt the plain e-TeX source file to work with XeTeX and LuaTeX.")
build fonts using the Metafont system.")
(license license:knuth)))
+(define-public texlive-metafont-base
+ (deprecated-package "texlive-metafont-base" texlive-metafont))
+
(define-public texlive-fontinst
(let ((template (simple-texlive-package
"texlive-fontinst"
@@ -734,7 +828,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
@@ -778,7 +872,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
@@ -881,73 +975,69 @@ Computers & Typesetting series.")
(define-public texlive-fonts-lm
(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
+ "0lizrhdr4pirhh4ry44znddksd7akkxli2i6sddm5rzqljiqdy3v")
+ #: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-public texlive-fonts-knuth-lib
+ (deprecated-package "texlive-fonts-knuth-lib" texlive-knuth-lib))
(define-public texlive-fonts-latex
(package
@@ -976,7 +1066,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
@@ -1015,7 +1105,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")
@@ -1025,27 +1115,81 @@ 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-public texlive-latex-mflogo
+ (deprecated-package "texlive-latex-mflogo" texlive-mflogo))
(define-public texlive-mflogo-font
(package
@@ -1101,22 +1245,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")))
+ ;; Allow self fonts sources and other resources to be
+ ;; discovered.
+ (setenv "GUIX_TEXMF" (string-append (getenv "GUIX_TEXMF")
+ ":" (getcwd)))
+
(let ((build (string-append (getcwd) "/build-fonts")))
(mkdir-p build)
(with-directory-excursion "fonts/source/public/amsfonts"
@@ -1138,7 +1271,7 @@ Taco Hoekwater.")
;; 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
@@ -1151,10 +1284,9 @@ Taco Hoekwater.")
;; 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)
@@ -1189,19 +1321,16 @@ Taco Hoekwater.")
(("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
@@ -1265,7 +1394,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
@@ -1291,7 +1420,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")
@@ -2201,7 +2330,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"
@@ -2255,7 +2384,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")
@@ -2481,7 +2610,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"
@@ -2524,7 +2653,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"))
@@ -2560,7 +2692,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)
@@ -2837,29 +2969,103 @@ tables.")
(define-public texlive-latex-xcolor
(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/hylatex.ltx"
+ "/tex/latex/hyperref/minitoc-hyper.sty"
+ "/tex/latex/hyperref/ntheorem-hyper.sty"
+ "/tex/latex/hyperref/xr-hyper.sty")
+ (base32
+ "1074rnymyf7xj2ggajnijmy1p7avfjl216qyi86p38wg0qdf48zd"))))
+ (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-oberdiek" ,texlive-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
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
@@ -2867,11 +3073,14 @@ 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-public texlive-latex-hyperref
+ (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)
@@ -2902,6 +3111,9 @@ 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-public texlive-latex-oberdiek
+ (deprecated-package "texlive-latex-oberdiek" texlive-oberdiek))
+
(define-public texlive-latex-tools
(package
(name "texlive-latex-tools")
@@ -3050,58 +3262,84 @@ programming tools and kernel sup­port. Packages provided in this release are:
@end enumerate\n")
(license license:lppl1.3c+)))
-(define-public texlive-latex-fontspec
- (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")
- (description
- "Fontspec is a package for XeLaTeX and LuaLaTeX. It provides an
+(define-public texlive-fontspec
+ (let ((template (simple-texlive-package
+ "texlive-fontspec"
+ (list "/doc/latex/fontspec/"
+ "/source/latex/fontspec/"
+ "/tex/latex/fontspec/fontspec.cfg")
+ (base32
+ "1ksqhxlnqia4v85hbx0bw58cw77wfdhs33n1a1qmczd4b3zg4wp9"))))
+ (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-public texlive-latex-fontspec
+ (deprecated-package "texlive-latex-fontspec" texlive-fontspec))
+
+(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
+ "009dccv5lq7bq13431l4ihmagxvb3j1pb5bhidsbiyxi3wvi8y97")
+ #: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.
@@ -3141,97 +3379,38 @@ this bundle for use independent of ConTeXt.")
;; GPL version 2 only
(license license:gpl2)))
-(define-public texlive-luatex-luaotfload
- (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"))))
- (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
- #:phases
- (modify-phases %standard-phases
- (replace 'configure
- (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)))))
- (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
+;; 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
+ "04xlcc9k56kf9460dzxifnxbv5bkv7kcp9ijiqi054miybw1pymr")
+ #: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)))
+ ;; GPL version 2 only
+ (license license:gpl2))))
+
+(define-public texlive-luatex-luaotfload
+ (deprecated-package "texlive-luatex-luaotfload" texlive-luaotfload))
(define-public texlive-latex-amsmath
(package
@@ -3262,64 +3441,86 @@ 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
+ "1mv96i5372257zaciv06n1wwa7v09q0fa9pbq9kck826a0syidvs"))))
+ (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-public texlive-latex-amscls
+ (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
+ "07k9igpwa8sjxlmyxmcbffl8833qhrs34h70kgmakiix5jycznsd"))))
+ (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-public texlive-latex-babel
+ (deprecated-package "texlive-latex-babel" texlive-babel))
(define-public texlive-generic-babel-english
(package
@@ -3389,30 +3590,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
+(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 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
+ "1ql4gidwf5m5gwcwwmx7vj60lj4xygw02pm5mzin49nlwsa1vbnv"))))
+ (package
+ (inherit template)
+ (arguments
+ (substitute-keyword-arguments (package-arguments template)
+ ((#:tex-directory _ #t)
+ "latex/psnfss")
+ ((#:phases phases)
+ `(modify-phases ,phases
+ (add-after 'unpack 'chdir
+ (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.")
- (license license:lppl1.2+)))
+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-public texlive-latex-psnfss
+ (deprecated-package "texlive-latex-psnfss" texlive-psnfss))
;; For user profiles
(define-public texlive-base
@@ -3421,17 +3725,18 @@ 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
;; 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
@@ -3459,132 +3764,86 @@ It includes little more than the required set of LaTeX packages.")
'()
default-packages)))))
-;; 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
+ "0faqknqxs80qp9ywk0by5k85s0yalg97c4lja4q56lsyblrr4j7i"))))
+ (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))))))))
+
+;;; Deprecated.
+(define texlive-union texlive-updmap.cfg)
;; 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.")))
@@ -3954,7 +4213,7 @@ rotated.")
("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)
@@ -4271,7 +4530,7 @@ BibLaTeX, and is considered experimental.")
(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
@@ -4755,7 +5014,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
@@ -4790,7 +5049,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")
@@ -4972,7 +5231,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
@@ -5007,7 +5266,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")
@@ -5229,38 +5488,48 @@ 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-public texlive-fonts-stmaryrd
+ (deprecated-package "texlive-fonts-stmaryrd" texlive-stmaryrd))
(define-public texlive-latex-subfigure
(package
@@ -5480,6 +5749,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
@@ -5604,23 +5957,32 @@ 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)
+ (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") #t))))))
+ (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
@@ -5629,7 +5991,10 @@ 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-public texlive-latex-lh
+ (deprecated-package "texlive-latex-lh" texlive-lh))
(define-public texlive-marvosym
(package
@@ -5763,9 +6128,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)
@@ -5785,6 +6150,9 @@ 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-public texlive-latex-wasysym
+ (deprecated-package "texlive-latex-wasysym" texlive-wasysym))
+
(define-public texlive-latex-wrapfig
(package
(name "texlive-latex-wrapfig")
@@ -5914,49 +6282,24 @@ requires the suffix package, which in turn requires that it runs under
e-TeX.")
(license license:lppl1.3+)))
-(define-public texlive-generic-pdftex
+(define-public texlive-pdftex
(package
- (name "texlive-generic-pdftex")
- (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/"
- "/tex/generic/pdftex"))
- (revision %texlive-revision)))
- (file-name (string-append name "-" version "-checkout"))
- (sha256
- (base32
- "0k68zmqzs4qvrqxdwsrawbjb14hxqjfamq649azvai0jjxdpkljd"))))
- (build-system trivial-build-system)
- (arguments
- `(#:modules ((guix build utils))
- #:builder
- (begin
- (use-modules (guix build utils))
- (let ((target (string-append (assoc-ref %outputs "out")
- "/share/texmf-dist/tex/generic/pdftex"))
- (target-map (string-append (assoc-ref %outputs "out")
- "/share/texmf-dist/fonts/map/pdftex")))
- (mkdir-p target)
- (copy-recursively (assoc-ref %build-inputs "source") target)
- (mkdir-p target-map)
- (copy-recursively (assoc-ref %build-inputs "pdftex-map") target-map)
- #t))))
- (native-inputs
- `(("pdftex-map"
- ,(origin
- (method svn-fetch)
- (uri (svn-reference
- (url (string-append "svn://www.tug.org/texlive/tags/"
- %texlive-tag "/Master/texmf-dist/"
- "/fonts/map/pdftex"))
- (revision %texlive-revision)))
- (file-name (string-append name "-map-" version "-checkout"))
- (sha256
- (base32
- "03rfif2631pgd8g1ar4xblcdh078kky7fvw3kfsj5a47rxxgicp2"))))))
+ (inherit (simple-texlive-package
+ "texlive-pdftex"
+ (list "/doc/pdftex/"
+ "/doc/man/man1/pdfetex.1"
+ "/doc/man/man1/pdftex.1"
+
+ "/fonts/map/dvips/dummy-space/dummy-space.map"
+ "/fonts/tfm/public/pdftex/dummy-space.tfm"
+ "/fonts/type1/public/pdftex/dummy-space.pfb"
+ "/scripts/simpdftex/simpdftex"
+
+ "/tex/generic/config/pdftex-dvi.tex"
+ "/tex/generic/pdftex/")
+ (base32
+ "0wsgbl0jrqc1qzgf23dla6b95lv2h8x6xvs5466d8jdrih6pwriq")
+ #:trivial? #t))
(home-page "https://www.ctan.org/pkg/pdftex")
(synopsis "TeX extension for direct creation of PDF")
(description
@@ -5964,6 +6307,9 @@ 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 texlive-texmf
(package
(name "texlive-texmf")
@@ -5974,7 +6320,7 @@ directly generate PDF documents instead of DVI.")
`(("texlive-bin" ,texlive-bin)
("lua" ,lua)
("perl" ,perl)
- ("python" ,python-2) ; incompatible with Python 3 (print syntax)
+ ("python" ,python)
("ruby" ,ruby)
("tcsh" ,tcsh)))
(arguments
@@ -6047,7 +6393,7 @@ This package contains the complete tree of texmf-dist data.")
(version "20190410")
(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
@@ -6339,12 +6685,12 @@ develop documents with LaTeX, in a single application.")
(delete-file "book.pdf")
#t)))))
(native-inputs
- `(("texlive" ,(texlive-union (list texlive-amsfonts
+ `(("texlive" ,(texlive-updmap.cfg (list texlive-amsfonts
texlive-fonts-adobe-palatino
texlive-fonts-adobe-zapfding
- texlive-fonts-knuth-lib
+ texlive-knuth-lib
texlive-fonts-mflogo-font
- texlive-generic-pdftex)))
+ texlive-pdftex)))
("automake" ,automake)))
(home-page "https://www.gnu.org/software/teximpatient/")
(synopsis "Book on TeX, plain TeX and Eplain")
@@ -6409,7 +6755,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)))
@@ -7062,6 +7408,52 @@ supports advanced interactive documents. See the ConTeXt garden for a wealth
of support information.")
(license license:gpl2+)))
+(define-public texlive-context
+ (package
+ (inherit (simple-texlive-package
+ "texlive-context"
+ (list "/doc/context/"
+ ;; XXX Omitting /doc/man/man1/*.pdf
+ "/bibtex/bst/context/mkii/"
+ "/context/data/"
+
+ "/fonts/afm/hoekwater/context/contnav.afm"
+ "/fonts/cid/fontforge/Adobe-CNS1-4.cidmap"
+ "/fonts/cid/fontforge/Adobe-GB1-4.cidmap"
+ "/fonts/cid/fontforge/Adobe-Identity-0.cidmap"
+ "/fonts/cid/fontforge/Adobe-Japan1-5.cidmap"
+ "/fonts/cid/fontforge/Adobe-Japan1-6.cidmap"
+ "/fonts/cid/fontforge/Adobe-Japan2-0.cidmap"
+ "/fonts/cid/fontforge/Adobe-Korea1-2.cidmap"
+ "/fonts/enc/dvips/context/"
+ "/fonts/map/dvips/context/"
+ "/fonts/map/luatex/context/"
+ "/fonts/map/pdftex/context/"
+ "/fonts/misc/xetex/fontmapping/context/"
+ "/fonts/tfm/hoekwater/context/contnav.tfm"
+ "/fonts/type1/hoekwater/context/"
+
+ "/metapost/context/"
+ "/scripts/context/"
+ "/tex/context/"
+
+ "/tex/generic/context/luatex/"
+ "/tex/generic/context/ppchtex/"
+ "/tex/latex/context/")
+ (base32
+ "0cc8509hrc25ri4a8hshgasip5z4qlipx3nxdm97f1sr0l6ncxdr")
+ #:trivial? #t))
+ (home-page "https://www.ctan.org/pkg/context")
+ (synopsis "ConTeXt macro package")
+ (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-beamer
(package
(inherit (simple-texlive-package
@@ -7073,7 +7465,7 @@ of support information.")
#:trivial? #t))
(propagated-inputs
`(("texlive-latex-hyperref" ,texlive-latex-hyperref)
- ("texlive-latex-oberdiek" ,texlive-latex-oberdiek)
+ ("texlive-oberdiek" ,texlive-oberdiek)
("texlive-latex-etoolbox" ,texlive-latex-etoolbox)
("texlive-latex-pgf" ,texlive-latex-pgf)))
(home-page "https://www.ctan.org/pkg/beamer")
@@ -7117,58 +7509,45 @@ 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-generic-pdftex" ,texlive-generic-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-public texlive-latex-pdfx
+ (deprecated-package "texlive-latex-pdfx" texlive-pdfx))
(define-public texlive-ydoc
(let ((template (simple-texlive-package
diff --git a/gnu/packages/texinfo.scm b/gnu/packages/texinfo.scm
index dea26a6395..b53b56fbf2 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 052dfa1236..f05d1dcd44 100644
--- a/gnu/packages/text-editors.scm
+++ b/gnu/packages/text-editors.scm
@@ -650,7 +650,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/tls.scm b/gnu/packages/tls.scm
index 775e915534..ecfb34618e 100644
--- a/gnu/packages/tls.scm
+++ b/gnu/packages/tls.scm
@@ -15,6 +15,7 @@
;;; 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 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -58,6 +59,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)
@@ -181,10 +183,12 @@ living in the same process.")
(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
@@ -205,13 +209,26 @@ 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
+ #t))
+ (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"))
@@ -231,10 +248,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
@@ -244,7 +265,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
diff --git a/gnu/packages/tmux.scm b/gnu/packages/tmux.scm
index 95a31f80fd..1537080dd8 100644
--- a/gnu/packages/tmux.scm
+++ b/gnu/packages/tmux.scm
@@ -167,10 +167,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/version-control.scm b/gnu/packages/version-control.scm
index afbae86772..9e177c9196 100644
--- a/gnu/packages/version-control.scm
+++ b/gnu/packages/version-control.scm
@@ -619,12 +619,12 @@ everything from small to very large projects with speed and efficiency.")
(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)))
@@ -925,7 +925,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)))))
@@ -2605,7 +2605,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)
@@ -2650,7 +2650,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)
diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm
index 4c555a5622..9ded9559de 100644
--- a/gnu/packages/video.scm
+++ b/gnu/packages/video.scm
@@ -4127,7 +4127,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
diff --git a/gnu/packages/virtualization.scm b/gnu/packages/virtualization.scm
index 8da57cf6ab..5841bc98b2 100644
--- a/gnu/packages/virtualization.scm
+++ b/gnu/packages/virtualization.scm
@@ -15,7 +15,7 @@
;;; Copyright © 2020 Brice Waegeneire <brice@waegenei.re>
;;; Copyright © 2020 Mathieu Othacehe <m.othacehe@gmail.com>
;;; Copyright © 2020 Marius Bakke <mbakke@fastmail.com>
-;;; Copyright © 2020 Maxim Cournoyer <maxim.cournoyer@gmail.com>
+;;; Copyright © 2020, 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;; Copyright © 2020 Brett Gilio <brettg@gnu.org>
;;;
;;; This file is part of GNU Guix.
@@ -419,8 +419,7 @@ server and embedded PowerPC, and S390 guests.")
"ganeti-drbd-compat.patch"
"ganeti-os-disk-size.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
@@ -428,7 +427,6 @@ server and embedded PowerPC, and S390 guests.")
(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))
(ice-9 rdelim))
;; The default test target includes a lot of checks that are only really
@@ -475,8 +473,7 @@ server and embedded PowerPC, and S390 guests.")
(unless (file-exists? "vcs-version")
(call-with-output-file "vcs-version"
(lambda (port)
- (format port "v~a~%" ,version))))
- #t))
+ (format port "v~a~%" ,version))))))
(add-after 'unpack 'patch-absolute-file-names
(lambda _
(substitute* '("lib/utils/process.py"
@@ -502,8 +499,7 @@ server and embedded PowerPC, and S390 guests.")
(("ndisc6") (which "ndisc6"))
(("fping") (which "fping"))
(("grep") (which "grep"))
- (("ip addr") (string-append (which "ip") " addr")))
- #t))
+ (("ip addr") (string-append (which "ip") " addr")))))
(add-after 'unpack 'override-builtin-PATH
(lambda _
;; Ganeti runs OS install scripts and similar with a built-in
@@ -511,8 +507,7 @@ server and embedded PowerPC, and S390 guests.")
(substitute* "src/Ganeti/Constants.hs"
(("/sbin:/bin:/usr/sbin:/usr/bin")
"/run/setuid-programs:/run/current-system/profile/sbin:\
-/run/current-system/profile/bin"))
- #t))
+/run/current-system/profile/bin"))))
(add-after 'bootstrap 'patch-sphinx-version-detection
(lambda _
;; The build system runs 'sphinx-build --version' to verify that
@@ -520,8 +515,8 @@ server and embedded PowerPC, and S390 guests.")
;; .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'"))
- #t))
+ "$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>.
@@ -535,13 +530,11 @@ server and embedded PowerPC, and S390 guests.")
(("\\$\\(CABAL\\)")
"$(CABAL) --package-db=../package.conf.d")
(("\\$\\(GHC\\)")
- "$(GHC) -package-db=../package.conf.d"))
- #t))
+ "$(GHC) -package-db=../package.conf.d"))))
(add-after 'configure 'make-ghc-use-shared-libraries
(lambda _
(substitute* "Makefile"
- (("HFLAGS =") "HFLAGS = -dynamic -fPIC"))
- #t))
+ (("HFLAGS =") "HFLAGS = -dynamic -fPIC"))))
(add-after 'configure 'fix-installation-directories
(lambda _
(substitute* "Makefile"
@@ -551,8 +544,7 @@ server and embedded PowerPC, and S390 guests.")
;; Similarly, do not attempt to install the sample ifup scripts
;; to /etc/ganeti.
(("\\$\\(DESTDIR\\)\\$\\(ifupdir\\)")
- "$(DESTDIR)${prefix}$(ifupdir)"))
- #t))
+ "$(DESTDIR)${prefix}$(ifupdir)"))))
(add-before 'build 'adjust-tests
(lambda _
;; Disable tests that can not run. Do it early to prevent
@@ -571,37 +563,16 @@ server and embedded PowerPC, and S390 guests.")
"")
;; 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") ":")))
- #t))
+ ""))))
(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)
- #t)))
+ (invoke "python" "-m" "./autotools/build-bash-completion")))
(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")))
-
(substitute* "test/py/ganeti.utils.process_unittest.py"
;; This test attempts to run an executable with
;; RunCmd(..., reset_env=True), which fails because the default
@@ -623,8 +594,7 @@ server and embedded PowerPC, and S390 guests.")
(for-each (lambda (file)
(symlink "../../src/htools" file))
'("hspace" "hscan" "hinfo" "hbal" "hroller"
- "hcheck" "hail" "hsqueeze")))
- #t))
+ "hcheck" "hail" "hsqueeze")))))
(add-after 'install 'install-bash-completions
(lambda* (#:key outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))
@@ -653,21 +623,15 @@ server and embedded PowerPC, and S390 guests.")
(cons (basename (car (reverse (string-split
line #\ ))))
progs))
- (loop (read-line port) progs))))))))
- #t)))
- ;; 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".
+ (loop (read-line port) progs)))))))))))
+ ;; 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)
+ (lambda* (#:key 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"))))
+ (lib (string-append out "/lib")))
(define (shell-script? file)
(call-with-ascii-input-file file
(lambda (port)
@@ -688,11 +652,11 @@ server and embedded PowerPC, and S390 guests.")
(for-each (lambda (file)
(wrap-program file
- `("PYTHONPATH" ":" prefix (,PYTHONPATH))))
+ `("GUIX_PYTHONPATH" ":" prefix
+ (,(getenv "GUIX_PYTHONPATH")))))
(filter wrap?
(append (find-files (string-append lib "/ganeti"))
- (find-files sbin))))
- #t))))))
+ (find-files sbin))))))))))
(native-inputs
`(("haskell" ,ghc)
("cabal" ,cabal-install)
@@ -1385,9 +1349,9 @@ domains, their live performance and resource utilization statistics.")
(string-take (string-take-right
(assoc-ref inputs "python") 5) 3)
"/site-packages:"
- (getenv "PYTHONPATH"))))
+ (or (getenv "GUIX_PYTHONPATH") ""))))
(wrap-program (string-append out "/bin/crit")
- `("PYTHONPATH" ":" prefix (,path))))
+ `("GUIX_PYTHONPATH" ":" prefix (,path))))
#t)))))
(inputs
`(("protobuf" ,protobuf)
diff --git a/gnu/packages/web.scm b/gnu/packages/web.scm
index 879eb160ea..95043566a8 100644
--- a/gnu/packages/web.scm
+++ b/gnu/packages/web.scm
@@ -47,6 +47,7 @@
;;; 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>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -881,7 +882,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
@@ -889,7 +890,7 @@ libraries for working with JNLP applets.")
version ".tar.bz2"))
(sha256
(base32
- "1lp1mv8pjp5yziws66cy0dhpcam4bbjqhffk13v4vgdybp674pb4"))))
+ "1g8h18vh8gyxlwfmvdivdp1siad26ywj5zr4j4avgdyjg7wa147f"))))
(build-system gnu-build-system)
(arguments
`(#:configure-flags '("--disable-static")))
@@ -3730,16 +3731,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)
@@ -4359,14 +4358,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.
@@ -6433,23 +6432,13 @@ Instagram and YouTube.")
`(#:python ,python-2
#:phases
(modify-phases %standard-phases
- ;; Move the 'check phase to after 'install, so that the installed
- ;; library can be used
- (delete 'check)
- (add-after 'install 'check
+ (replace 'check
(lambda* (#:key outputs #:allow-other-keys)
(let ((out (assoc-ref outputs "out")))
- ;; Set PYTHONPATH so that the installed linkchecker is used
- (setenv "PYTHONPATH"
- (string-append out "/lib/python2.7/site-packages"
- ":"
- (getenv "PYTHONPATH")))
;; Remove this directory to avoid it being used when running
;; the tests
(delete-file-recursively "linkcheck")
-
- (invoke "py.test" "tests"))
- #t)))))
+ (invoke "py.test" "tests")))))))
(home-page "https://linkcheck.github.io/linkchecker")
(synopsis "Check websites for broken links")
(description "LinkChecker is a website validator. It checks for broken
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/xdisorg.scm b/gnu/packages/xdisorg.scm
index 6b4d3f4a8a..6038c0eacb 100644
--- a/gnu/packages/xdisorg.scm
+++ b/gnu/packages/xdisorg.scm
@@ -43,6 +43,7 @@
;;; Copyright © 2020 James Smith <jsubuntuxp@disroot.org>
;;; Copyright © 2020 B. Wilson <elaexuotee@wilsonb.com>
;;; Copyright © 2020 Zheng Junjie <873216071@qq.com>
+;;; Copyright © 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -509,7 +510,7 @@ following the mouse.")
(define-public pixman
(package
(name "pixman")
- (version "0.38.4")
+ (version "0.40.0")
(source
(origin
(method url-fetch)
@@ -518,13 +519,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
@@ -535,12 +540,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.104")
(source (origin
(method url-fetch)
(uri (string-append
@@ -548,7 +553,7 @@ rasterisation.")
version ".tar.xz"))
(sha256
(base32
- "08h2nnf4w96b4ql7485mvjgbbsb8rwc0qa93fdm1cq34pbyszq1z"))))
+ "1jqvx9c23hgwhq109zqj6vg3ng40pcvh3r1k2fn1a424qasxhsnn"))))
(build-system meson-build-system)
(arguments
`(#:configure-flags
@@ -1264,15 +1269,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"))
diff --git a/gnu/packages/xfce.scm b/gnu/packages/xfce.scm
index bc5fd9fee6..510e8efe4a 100644
--- a/gnu/packages/xfce.scm
+++ b/gnu/packages/xfce.scm
@@ -251,7 +251,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
diff --git a/gnu/packages/xml.scm b/gnu/packages/xml.scm
index 472dfedbb8..c462cffac3 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 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>
@@ -115,7 +115,7 @@ the entire document.")
(define-public expat
(package
(name "expat")
- (version "2.2.9")
+ (version "2.2.10")
(source (let ((dot->underscore (lambda (c) (if (char=? #\. c) #\_ c))))
(origin
(method url-fetch)
@@ -127,7 +127,7 @@ the entire document.")
"/expat-" version ".tar.xz")))
(sha256
(base32
- "1960mmgbb4cm64n1p0nz3hrs1pw03hkrfcw8prmnn4622mdrd9hy")))))
+ "1wi5bi4cbz069mnwkrc2whi4sslsgl6m5b7dk0zg0qsvif7m7zjx")))))
(build-system gnu-build-system)
(arguments
'(#:configure-flags '("--disable-static")))
@@ -175,24 +175,30 @@ hierarchical form with variable field lengths.")
(base32
"07xynh8hcxb2yb1fs051xrgszjvj37wnxvxgsj10rzmqzy9y3zma"))))
(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")
+ (substitute* (string-append src "/lib/libxml2.la")
(("^old_library='libxml2.a'") "old_library=''"))
#t))))))
(home-page "http://www.xmlsoft.org/")
@@ -294,8 +300,10 @@ It uses libxml2 to access the XML files.")
(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-python39-compat.patch"
+ "python-libxml2-utf8.patch")
+ (origin-patches (package-source libxml2))))))
(build-system python-build-system)
(outputs '("out"))
(arguments
@@ -2385,15 +2393,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
@@ -2410,13 +2421,13 @@ because lxml.etree already has it's own implementation of XPath 1.0.")
(define-public python-lxml
(package
(name "python-lxml")
- (version "4.4.2")
+ (version "4.5.2")
(source
(origin
(method url-fetch)
(uri (pypi-uri "lxml" version))
(sha256
- (base32 "01nvb5j8vs9nk4z5s3250b1m22b4d08kffa36if3g1mdygdrvxpg"))))
+ (base32 "1xhx76hr1w3lllfcg9a01f2y0zwyf59ijnvlh08299mjh8b3mhfd"))))
(build-system python-build-system)
(arguments
`(#:phases (modify-phases %standard-phases
@@ -2439,7 +2450,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)
@@ -2449,21 +2460,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/xorg.scm b/gnu/packages/xorg.scm
index ed98d1acd3..0aa87f850d 100644
--- a/gnu/packages/xorg.scm
+++ b/gnu/packages/xorg.scm
@@ -6,7 +6,7 @@
;;; 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>
@@ -2143,8 +2143,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)))
@@ -4733,9 +4740,13 @@ 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"
+ (string-append "--mandir="
+ (assoc-ref %outputs "doc")
+ "/share/man")
;; Disable zero malloc check that fails when cross-compiling.
,@(if (%current-target-system)
'("--disable-malloc0returnsnull")
@@ -5148,8 +5159,12 @@ 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"))))
(propagated-inputs
`(("xorgproto" ,xorgproto)
("libx11" ,libx11)
@@ -5270,6 +5285,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)
@@ -5281,8 +5297,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
@@ -5384,13 +5403,11 @@ over Xlib, including:
;; 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")
@@ -5460,17 +5477,17 @@ draggable titlebars and borders.")
(define-public libx11
(package
(name "libx11")
- (version "1.6.10")
+ (version "1.6.12")
(source
(origin
(method url-fetch)
(uri (string-append
- "mirror://xorg/individual/lib/libX11-"
+ "ftp://ftp.freedesktop.org/pub/xorg//individual/lib/libX11-"
version
".tar.bz2"))
(sha256
(base32
- "09k2pqmqbn2m1bpgl7jfxyqxaaxsnzbnp2bp8ycmqldqi5ln4j5g"))))
+ "1ivfzl1qwk8zh7gc0m5vb58gdxz11jwg7w3d356w16j1d5s2427i"))))
(build-system gnu-build-system)
(outputs '("out"
"doc")) ;8 MiB of man pages + XML
diff --git a/gnu/system/locale.scm b/gnu/system/locale.scm
index 689d238d1a..4771192cfb 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-2.29 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 1afae6b4ed..93a79b12d6 100644
--- a/gnu/system/vm.scm
+++ b/gnu/system/vm.scm
@@ -534,7 +534,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)
@@ -764,8 +764,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)
"-vga std"
diff --git a/guix/build-system/cargo.scm b/guix/build-system/cargo.scm
index 6c8edf6bac..ed69746a3b 100644
--- a/guix/build-system/cargo.scm
+++ b/guix/build-system/cargo.scm
@@ -217,7 +217,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
diff --git a/guix/build-system/gnu.scm b/guix/build-system/gnu.scm
index 6b481ad45c..abff7d6998 100644
--- a/guix/build-system/gnu.scm
+++ b/guix/build-system/gnu.scm
@@ -215,7 +215,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))
@@ -324,10 +324,15 @@ 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 %bootstrap-scripts
+ ;; Typical names of Autotools "bootstrap" scripts.
+ '("bootstrap" "bootstrap.sh" "autogen.sh"))
+
(define* (gnu-build store name input-drvs
#:key (guile #f)
(outputs '("out"))
(search-paths '())
+ (bootstrap-scripts (list 'quote %bootstrap-scripts))
(configure-flags ''())
(make-flags ''())
(out-of-source? #f)
@@ -337,11 +342,12 @@ standard packages used as implicit inputs of the GNU build system."
(parallel-tests? #t)
(patch-shebangs? #t)
(strip-binaries? #t)
- (strip-flags ''("--strip-debug"
+ (strip-flags ''("--strip-unneeded"
"--enable-deterministic-archives"))
(strip-directories ''("lib" "lib64" "libexec"
"bin" "sbin"))
(validate-runpath? #t)
+ (make-dynamic-linker-cache? #t)
(license-file-regexp %license-file-regexp)
(phases '%standard-phases)
(locale "en_US.utf8")
@@ -400,6 +406,7 @@ packages that must not be referenced."
search-paths)
#:phases ,phases
#:locale ,locale
+ #:bootstrap-scripts ,bootstrap-scripts
#:configure-flags ,configure-flags
#:make-flags ,make-flags
#:out-of-source? ,out-of-source?
@@ -410,6 +417,7 @@ packages that must not be referenced."
#:patch-shebangs? ,patch-shebangs?
#: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)))
@@ -484,6 +492,7 @@ is one of `host' or `target'."
(search-paths '())
(native-search-paths '())
+ (bootstrap-scripts (list 'quote %bootstrap-scripts))
(configure-flags ''())
(make-flags ''())
(out-of-source? #f)
@@ -492,11 +501,12 @@ is one of `host' or `target'."
(parallel-build? #t) (parallel-tests? #t)
(patch-shebangs? #t)
(strip-binaries? #t)
- (strip-flags ''("--strip-debug"
+ (strip-flags ''("--strip-unneeded"
"--enable-deterministic-archives"))
(strip-directories ''("lib" "lib64" "libexec"
"bin" "sbin"))
(validate-runpath? #t)
+ (make-dynamic-linker-cache? #t)
(license-file-regexp %license-file-regexp)
(phases '%standard-phases)
(locale "en_US.utf8")
@@ -567,6 +577,7 @@ platform."
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?
@@ -577,6 +588,7 @@ platform."
#:patch-shebangs? ,patch-shebangs?
#: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))))
diff --git a/guix/build-system/meson.scm b/guix/build-system/meson.scm
index b68bcb80de..e04223381e 100644
--- a/guix/build-system/meson.scm
+++ b/guix/build-system/meson.scm
@@ -55,7 +55,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
diff --git a/guix/build-system/python.scm b/guix/build-system/python.scm
index e39c06528e..2bb6fa87ca 100644
--- a/guix/build-system/python.scm
+++ b/guix/build-system/python.scm
@@ -2,6 +2,7 @@
;;; Copyright © 2013, 2014, 2015, 2016, 2017 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,6 +20,8 @@
;;; 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)
@@ -70,6 +73,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
@@ -156,6 +163,7 @@ 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)
diff --git a/guix/build-system/texlive.scm b/guix/build-system/texlive.scm
index 8bbca0ccb7..a8545757be 100644
--- a/guix/build-system/texlive.scm
+++ b/guix/build-system/texlive.scm
@@ -59,13 +59,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
diff --git a/guix/build/copy-build-system.scm b/guix/build/copy-build-system.scm
index a86f0cde29..ac4a62a074 100644
--- a/guix/build/copy-build-system.scm
+++ b/guix/build/copy-build-system.scm
@@ -58,7 +58,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.
diff --git a/guix/build/emacs-build-system.scm b/guix/build/emacs-build-system.scm
index 26ea59bc25..79a1a42c4a 100644
--- a/guix/build/emacs-build-system.scm
+++ b/guix/build/emacs-build-system.scm
@@ -105,23 +105,9 @@ 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"))
(site-lisp (string-append out %install-dir))
- ;; (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/gnu-build-system.scm b/guix/build/gnu-build-system.scm
index 2e7dff2034..66edd2de2d 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 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.
;;;
@@ -57,23 +58,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 +117,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 +136,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
@@ -158,17 +158,21 @@ working directory."
(copy-recursively source "."
#:keep-mtime? #t))
(begin
- (if (string-suffix? ".zip" source)
- (invoke "unzip" source)
- (invoke "tar" "xvf" source))
- (chdir (first-subdirectory "."))))
- #t)
-
-(define %bootstrap-scripts
- ;; Typical names of Autotools "bootstrap" scripts.
- '("bootstrap" "bootstrap.sh" "autogen.sh"))
-
-(define* (bootstrap #:key (bootstrap-scripts %bootstrap-scripts)
+ (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 #:key bootstrap-scripts
#:allow-other-keys)
"If the code uses Autotools and \"configure\" is missing, run
\"autoreconf\". Otherwise do nothing."
@@ -205,8 +209,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 +223,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 +235,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 +250,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 +380,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))
@@ -415,8 +413,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 +422,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 +511,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 +556,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 +576,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 +592,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 +608,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 +671,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 +680,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 +720,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 +852,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 +868,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 +896,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..a2d2169ddc 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))
@@ -232,6 +243,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 +432,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/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 c92d409d2b..dd61f659c2 100644
--- a/guix/build/maven/pom.scm
+++ b/guix/build/maven/pom.scm
@@ -243,7 +243,7 @@ to re-declare the namespaces in the top-level element."
(define* (fix-pom-dependencies pom-file inputs
#:key with-plugins? with-build-dependencies?
(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..cc2ba83889 100644
--- a/guix/build/meson-build-system.scm
+++ b/guix/build/meson-build-system.scm
@@ -100,7 +100,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/minify-build-system.scm b/guix/build/minify-build-system.scm
index 92158a033f..f7f51af301 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 "uglify-js" 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..1fc97d1398 100644
--- a/guix/build/python-build-system.scm
+++ b/guix/build/python-build-system.scm
@@ -6,6 +6,10 @@
;;; 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>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -27,6 +31,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 +133,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,37 +168,58 @@
(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)
@@ -194,25 +229,19 @@ when running checks after installing the package."
(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") ""))))))
+ (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)
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 +249,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,25 +265,38 @@ 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)
@@ -267,6 +304,9 @@ installed with setuptools."
(replace 'install install)
(add-after 'install 'check check)
(add-after 'install 'wrap wrap)
+ (add-before 'check 'add-install-to-pythonpath add-install-to-pythonpath)
+ (add-before 'check 'add-install-to-path add-install-to-path)
+ (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/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/texlive-build-system.scm b/guix/build/texlive-build-system.scm
index 841c631dae..4c255700bb 100644
--- a/guix/build/texlive-build-system.scm
+++ b/guix/build/texlive-build-system.scm
@@ -1,5 +1,6 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2017 Ricardo Wurmus <rekado@elephly.net>
+;;; Copyright © 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -40,39 +41,11 @@
(string-append "&" format)
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"))
- (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" <>)))))
+ (mkdir "build")
+ (for-each (cut compile-with-latex 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 +54,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/utils.scm b/guix/build/utils.scm
index 419c10195b..6c37021673 100644
--- a/guix/build/utils.scm
+++ b/guix/build/utils.scm
@@ -1,10 +1,12 @@
;;; 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 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>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -49,9 +51,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?
@@ -134,12 +141,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 +231,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 +372,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 +395,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 +422,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 +442,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)
@@ -746,6 +813,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 +856,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 +902,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 +955,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 +1001,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
@@ -1307,7 +1426,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/gexp.scm b/guix/gexp.scm
index 764c89a187..2735d25d0c 100644
--- a/guix/gexp.scm
+++ b/guix/gexp.scm
@@ -1559,7 +1559,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
@@ -1583,6 +1584,13 @@ TARGET, a GNU triplet."
(system base target)
(system base compile))
+ (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 '("." ".."))))
@@ -1598,17 +1606,14 @@ TARGET, a GNU triplet."
(ungexp (* total 2))
entry)
- (ungexp-splicing
- (if target
- (gexp ((with-target (ungexp target)
- (lambda ()
- (compile-file entry
- #:output-file output
- #:opts
- %auto-compilation-options)))))
- (gexp ((compile-file entry
- #:output-file output
- #:opts %auto-compilation-options)))))
+ (with-target (ungexp (or target (gexp %host-type)))
+ (lambda ()
+ (compile-file entry
+ #:output-file output
+ #:opts
+ `(,@%auto-compilation-options
+ ,@(optimizations-for-level
+ (ungexp optimization-level))))))
(+ 1 processed))))
diff --git a/guix/packages.scm b/guix/packages.scm
index 9305dabcec..67ef6ea146 100644
--- a/guix/packages.scm
+++ b/guix/packages.scm
@@ -1,10 +1,11 @@
;;; 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, 2017, 2018 Mark H Weaver <mhw@netris.org>
;;; Copyright © 2015 Eric Bavier <bavier@member.fsf.org>
;;; 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>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -22,6 +23,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)
@@ -608,20 +611,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.
@@ -634,11 +624,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"
@@ -652,17 +640,24 @@ specifies modules in scope when evaluating SNIPPET."
(lower-object patch system))))
(mlet %store-monad ((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"))
- (decomp -> (lookup-input decompression-type))
+ (comp -> (and=> (compressor source-file-name)
+ lookup-input))
(patches (sequence %store-monad
(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
@@ -688,66 +683,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)
@@ -756,22 +693,95 @@ 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"))))
- (let ((name (tarxz-name original-file-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"
+ (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.
+ ("unzip" (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)
+ '#+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")))
+ ((not #+comp)
+ (copy-file file #$output))
+ (else
+ (repack directory #$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
@@ -1408,6 +1418,22 @@ TARGET."
(bag (package->bag package system target)))
(bag-grafts store bag)))
+(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 drv1 . outputs1)
+ (match input2
+ ((label2 drv2 . outputs2)
+ (and (string=? label1 label2)
+ (equal? outputs1 outputs2)
+ (derivation=? drv1 drv2)))))))
+
(define* (bag->derivation store bag
#:optional context)
"Return the derivation to build BAG for SYSTEM. Optionally, CONTEXT can be
@@ -1426,9 +1452,12 @@ error reporting."
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)
- store (bag-name bag) input-drvs
+ store (bag-name bag)
+ (delete-duplicates input-drvs input=?)
#:search-paths paths
#:outputs (bag-outputs bag) #:system system
(bag-arguments bag)))))
@@ -1466,8 +1495,9 @@ This is an internal procedure."
(apply (bag-build bag)
store (bag-name bag)
- #:native-drvs build-drvs
- #:target-drvs (append host-drvs target-drvs)
+ #:native-drvs (delete-duplicates build-drvs input=?)
+ #:target-drvs (delete-duplicates (append host-drvs target-drvs)
+ input=?)
#:search-paths paths
#:native-search-paths npaths
#:outputs (bag-outputs bag)
diff --git a/guix/profiles.scm b/guix/profiles.scm
index ea8bc6e593..36cb30c191 100644
--- a/guix/profiles.scm
+++ b/guix/profiles.scm
@@ -1610,53 +1610,6 @@ the entries in MANIFEST."
`((type . profile-hook)
(hook . manual-database))))
-(define (texlive-configuration manifest)
- "Return a derivation that builds a TeXlive configuration for the entries in
-MANIFEST."
- (define entry->texlive-input
- (match-lambda
- (($ <manifest-entry> name version output thing deps)
- (if (string-prefix? "texlive-" name)
- (cons (gexp-input thing output)
- (append-map entry->texlive-input deps))
- '()))))
- (define build
- (with-imported-modules '((guix build utils)
- (guix build union))
- #~(begin
- (use-modules (guix build utils)
- (guix build union))
-
- ;; Build a modifiable union of all texlive inputs. We do this so
- ;; that TeX live can resolve the parent and grandparent directories
- ;; correctly. There might be a more elegant way to accomplish this.
- (union-build #$output
- '#$(append-map entry->texlive-input
- (manifest-entries manifest))
- #:create-all-directories? #t
- #:log-port (%make-void-port "w"))
- (let ((texmf.cnf (string-append
- #$output
- "/share/texmf-dist/web2c/texmf.cnf")))
- (when (file-exists? texmf.cnf)
- (substitute* texmf.cnf
- (("^TEXMFROOT = .*")
- (string-append "TEXMFROOT = " #$output "/share\n"))
- (("^TEXMF = .*")
- "TEXMF = $TEXMFROOT/share/texmf-dist\n"))))
- #t)))
-
- (with-monad %store-monad
- (if (any (cut string-prefix? "texlive-" <>)
- (map manifest-entry-name (manifest-entries manifest)))
- (gexp->derivation "texlive-configuration" build
- #:substitutable? #f
- #:local-build? #t
- #:properties
- `((type . profile-hook)
- (hook . texlive-configuration)))
- (return #f))))
-
(define %default-profile-hooks
;; This is the list of derivation-returning procedures that are called by
;; default when making a non-empty profile.
@@ -1668,7 +1621,6 @@ MANIFEST."
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 8ecdcb823f..169cbc2500 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>
;;;
;;; This file is part of GNU Guix.
@@ -26,6 +27,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))
@@ -77,29 +79,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
@@ -283,7 +290,7 @@ added to the pack."
#+@(if (compressor-command compressor)
#~("-I"
(string-join
- '#+(compressor-command compressor)))
+ #+(compressor-command compressor)))
#~())
"--format=gnu"
@@ -556,11 +563,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))
@@ -617,7 +626,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"
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/tests.scm b/guix/tests.scm
index fc3d521163..da75835099 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:
;;;
@@ -435,6 +438,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 a85e2f495c..edc3503c10 100644
--- a/guix/utils.scm
+++ b/guix/utils.scm
@@ -8,6 +8,7 @@
;;; 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 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -35,7 +36,9 @@
#: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 diagnostics) ;<location>, &error-location, etc.
#:use-module (ice-9 format)
@@ -59,7 +62,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
@@ -97,7 +102,6 @@
tarball-sans-extension
compressed-file?
switch-symlinks
- call-with-temporary-output-file
call-with-temporary-directory
with-atomic-file-output
@@ -225,7 +229,7 @@ a symbol such as 'xz."
(match compression
((or #f 'none) (values input '()))
('bzip2 (filtered-port `(,%bzip2 "-dc") input))
- ('xz (filtered-port `(,%xz "-dc") input))
+ ('xz (filtered-port `(,%xz "-dc" ,@(%xz-parallel-args)) input))
('gzip (filtered-port `(,%gzip "-dc") input))
('lzip (values (lzip-port 'make-lzip-input-port input)
'()))
@@ -233,6 +237,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."
@@ -286,7 +302,8 @@ program--e.g., '(\"--fast\")."
(match compression
((or #f 'none) (values output '()))
('bzip2 (filtered-output-port `(,%bzip2 "-c" ,@options) output))
- ('xz (filtered-output-port `(,%xz "-c" ,@options) output))
+ ('xz (filtered-output-port `(,%xz "-c" ,@(%xz-parallel-args)
+ ,@options) output))
('gzip (filtered-output-port `(,%gzip "-c" ,@options) output))
('lzip (values (lzip-port 'make-lzip-output-port output)
'()))
@@ -719,22 +736,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/tests/build-utils.scm b/tests/build-utils.scm
index 654b480ed9..31be7ff80f 100644
--- a/tests/build-utils.scm
+++ b/tests/build-utils.scm
@@ -1,6 +1,7 @@
;;; 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>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -18,7 +19,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 +242,25 @@ 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-end)
diff --git a/tests/builders.scm b/tests/builders.scm
index fdcf38ded3..2143c0738b 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 © 2021 Lars-Dominik Braun <lars@6xq.net>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -17,22 +18,26 @@
;;; 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 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-64))
;; Test the higher-level builders.
@@ -78,4 +83,112 @@
(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))
+ (not (false-if-exception (package-derivation store python-dummy-fail-requirements)))))
+
+(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/gremlin.scm b/tests/gremlin.scm
index b0bb7a8e49..9ddac14265 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,40 @@
(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?
+ (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 +133,31 @@
(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)))))))
+
(test-end "gremlin")
diff --git a/tests/packages.scm b/tests/packages.scm
index 2a290bc353..ff756c6001 100644
--- a/tests/packages.scm
+++ b/tests/packages.scm
@@ -1,6 +1,7 @@
;;; 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>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -17,13 +18,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 +34,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 +54,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)
@@ -578,6 +582,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"
@@ -633,11 +642,81 @@
(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 `(("dep" ,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-output"
(let* ((package (dummy-package "p"))
(drv (package-derivation %store package)))