Commit graph

81404 commits

Author SHA1 Message Date
Ludovic Courtès 9b4c3c675c
news: Add news entry for simplified package inputs.
* etc/news.scm: Add entry.
2021-07-11 01:06:04 +02:00
Ludovic Courtès ab270bf2e9
import: elpa: Emit new-style package inputs.
* guix/import/elpa.scm (elpa-package->sexp)[dependencies]: Turn into a
list of symbols.
[maybe-inputs]: Wrap in 'list' instead of 'quasiquote'.
2021-07-11 00:49:16 +02:00
Ludovic Courtès ff992fcfaf
import: print: Emit new-style package inputs when possible.
* guix/import/print.scm (redundant-input-labels?): New procedure.
(package->code)[package-lists->code]: Rename to...
[inputs->code]: ... this.  When 'redundant-input-labels?' returns true,
emit label-less inputs.  Adjust callers to new name.
* tests/print.scm (pkg-with-inputs): Adjust accordingly.
2021-07-11 00:49:16 +02:00
Ludovic Courtès aa6921634b
import: cran: Emit new-style package inputs.
* guix/import/cran.scm (format-inputs): Emit symbols or
'specification->package' calls.
(maybe-inputs): Wrap in 'list' instead of 'quasiquote'.
* tests/cran.scm ("description->package"): Adjust accordingly.
2021-07-11 00:49:16 +02:00
Ludovic Courtès 52a9a0712a
import: pypi: Emit new-style package inputs.
* guix/import/pypi.scm (maybe-inputs): Wrap PACKAGE-INPUTS in 'list'
instead of 'quasiquote'.
(compute-inputs)[requirement->package-name/sort]: Return a list of symbols.
* tests/pypi.scm ("pypi->guix-package, no wheel")
("pypi->guix-package, wheels"): Adjust accordingly.
2021-07-11 00:49:15 +02:00
Ludovic Courtès 7b7b8c909b
packages: 'hidden-package' inherits the original package location.
* guix/packages.scm (hidden-package): Inherit 'location' from P.
2021-07-11 00:49:15 +02:00
Ludovic Courtès f23803af20
Add 'guix style'.
* guix/scripts/style.scm, tests/style.scm: New files.
* Makefile.am (MODULES, SCM_TESTS): Add them.
* po/guix/POTFILES.in: Add 'guix/scripts/style.scm'.
* doc/guix.texi (Invoking guix style): New node.
(package Reference): Reference it.
(Invoking guix lint): Likewise.
2021-07-11 00:49:15 +02:00
Ludovic Courtès 73b08ad1a3
utils: 'edit-expression' copies part of the original source map.
* guix/utils.scm (source-location-key/stamp): New procedure.
(go-to-location): Use it.
(move-source-location-map!): New procedure.
(edit-expression): Call it.
2021-07-11 00:49:15 +02:00
Ludovic Courtès f05433f208
utils: 'edit-expression' modifies the file only if necessary.
* guix/utils.scm (edit-expression): Check whether STR* equals STR.
2021-07-11 00:49:15 +02:00
Ludovic Courtès ef1432f064
utils: Add 'go-to-location' with source location caching.
* guix/utils.scm (%source-location-map): New variable.
(go-to-location): New procedure.
(edit-expression): Use it instead of custom loop.
* guix/packages.scm (package-field-location)[goto]: Remove.
Use 'go-to-location' instead of 'goto'.
2021-07-11 00:49:15 +02:00
Ludovic Courtès 4dcc606766
utils: 'edit-expression' no longer leaks file ports.
* guix/utils.scm (edit-expression): Use 'call-with-input-file' to make
sure IN gets closed.
2021-07-11 00:49:14 +02:00
Ludovic Courtès 2f73ea3487
gnu: Change inputs of core packages to plain lists.
This is transparent: the resulting derivations are unchanged.

* gnu/packages/base.scm (grep, sed, tar, patch, diffutils, glibc/hurd-headers)
(coreutils, gnu-make, make-glibc-utf8-locales): Change input fields to
plain package lists and use 'modify-inputs'.
* gnu/packages/guile.scm (guile-1.8, guile-json-1, guile-json-3)
(guile-gdbm-ffi, guile-sqlite3, guile-bytestructures)
(guile-git, guile-zlib, guile-lzlib, guile-zstd, guile-next): Likewise.
* gnu/packages/mes.scm (nyacc-0.86, nyacc-0.99)
(nyacc, nyacc-1.00.2, mes-0.19, mes, m2-planet): Likewise.
2021-07-11 00:49:14 +02:00
Ludovic Courtès 04b2f3dd80
packages: Add 'modify-inputs'.
* guix/packages.scm (inputs-sans-labels, replace-input): New procedures.
(prepend, replace, modify-inputs): New macros.
* doc/guix.texi (Defining Package Variants): Document 'modify-inputs'.
* dir-locals.el: Add 'modify-inputs' and its keywords.
2021-07-11 00:49:14 +02:00
Ludovic Courtès ba32f63638
packages: Add 'lookup-package-input' & co.
* guix/packages.scm (lookup-input, lookup-package-input)
(lookup-package-native-input, lookup-package-propagated-input)
(lookup-package-direct-input): New procedures.
* doc/guix.texi (package Reference): Document them.
2021-07-11 00:49:14 +02:00
Ludovic Courtès b7f1b4c1d0
lint: Add 'input-labels' checker.
* guix/lint.scm (check-input-labels): New procedure.
(%local-checkers): Add 'input-labels' checker.
* tests/lint.scm ("input labels: no warnings")
("input labels: one warning"): New tests.
* doc/guix.texi (Invoking guix lint): Mention it.
2021-07-11 00:49:14 +02:00
Ludovic Courtès 8524349f78
packages: Allow inputs to be plain package lists.
* guix/packages.scm (add-input-label, sanitize-inputs): New procedures.
(<package>)[inputs, propagated-inputs, native-inputs]: Add 'sanitize' property.
* doc/guix.texi (Defining Packages, package Reference):
(Defining Package Variants): Adjust examples accordingly.
* tests/packages.scm ("transaction-upgrade-entry, zero upgrades, propagated inputs")
("transaction-upgrade-entry, grafts")
("package-transitive-inputs")
("package-transitive-supported-systems")
("package-closure")
("supported-package?")
("package-derivation, inputs deduplicated")
("package-transitive-native-search-paths")
("package-grafts, indirect grafts")
("package-grafts, indirect grafts, propagated inputs")
("package-grafts, same replacement twice")
("package-grafts, dependency on several outputs")
("replacement also grafted")
("package->bag, sensitivity to %current-target-system")
("package->bag, propagated inputs")
("package->bag, sensitivity to %current-system")
("package-input-rewriting/spec, identity")
("package-input-rewriting, identity"): Use the label-less input style.
2021-07-11 00:49:14 +02:00
Ludovic Courtès 8be1632199
records: Support field sanitizers.
* guix/records.scm (make-syntactic-constructor): Add #:sanitizers.
[field-sanitizer]: New procedure.
[wrap-field-value]: Honor F's sanitizer.
(define-record-type*)[field-sanitizer]: New procedure.
Pass #:sanitizer to 'make-syntactic-constructor'.
* tests/records.scm ("define-record-type* & sanitize")
("define-record-type* & sanitize & thunked"): New tests.
2021-07-11 00:49:14 +02:00
Ludovic Courtès 2a3cd4ee35
environment: Adjust to earlier 'gcc-bootstrap' search paths changes.
This is a followup to fe6775f52b.

* tests/guix-environment.sh: Expect C_INCLUDE_PATH rather than CPATH in
environment containing 'gcc-bootstrap'.
2021-07-11 00:46:54 +02:00
Ludovic Courtès 152b167cfa
pack: Adjust test to earlier <compressor> changes.
This is a followup to 5a0997ef7f, which
broke the "self-contained tarball" test.

* tests/pack.scm (%gzip-compressor): Add 'list' in third field.
2021-07-11 00:39:56 +02:00
Ludovic Courtès ac815ecd63
ci: Build commencement packages supported on the target system.
This is a followup to df49fe2a13.

* gnu/ci.scm (%bootstrap-packages): Rename to...
(commencement-packages): ... this, and turn into a procedure.  Filter
packages that pass 'supported-package?'.
(cuirass-jobs): Adjust accordingly.
2021-07-10 19:59:31 +02:00
Julien Lepiller 80506bc6da
gnu: python-pyyaml: Fix build.
python-cython is required to generate the C source for the libyaml
extension, which is required for the `_yaml' module to work.  This in
turn lets the `sanity-check' phase succeed.

* gnu/packages/python-xyz.scm (python-pyyaml)[inputs]: Add
python-cython.
2021-07-10 01:39:07 +02:00
Ludovic Courtès c823b95825
gnu: coreutils: Patch broken Gnulib tests.
Fixes <https://bugs.gnu.org/49459>.

* gnu/packages/patches/coreutils-gnulib-tests.patch: New file.
* gnu/local.mk (dist_patch_DATA): Add it.
* gnu/packages/base.scm (coreutils)[source]: Use it.
2021-07-10 01:31:42 +02:00
Mathieu Othacehe df49fe2a13
ci: Add bootstrap packages to the core subset.
* gnu/ci.scm (%bootstrap-packages): New variable.
(cuirass-jobs): Add it to the core subset.
2021-07-09 14:12:40 +02:00
Brice Waegeneire 7bb9c3ebbb
gnu: kmod: Add zstd support.
* gnu/packages/linux.scm (kmod)[inputs]: Add zstd:lib.
[arguments]: Enable zstd support.

Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>
2021-07-08 19:21:11 +02:00
Brice Waegeneire 25041719da
gnu: kmod: Update to 29.
* gnu/packages/linux.scm (kmod): Update to 29.

Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>
2021-07-08 19:20:46 +02:00
Matthew James Kraai 64b8e004fd
gnu: xkbcomp: Update to 1.4.5.
* gnu/packages/xorg.scm (xkbcomp): Update to 1.4.5.

Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>
2021-07-08 16:18:10 +02:00
Ludovic Courtès f670c11c5b
gnu: libdatrie: Turn configure flags into a gexp.
* gnu/packages/gtk.scm (libdatrie)[arguments]: Turn #:configure-flags
into a gexp.
2021-07-08 14:15:20 +02:00
Ludovic Courtès 5f919605e9
gnu: libdatrie: Run tests sequentially.
Fixes <https://bugs.gnu.org/49463>.

* gnu/packages/gtk.scm (libdatrie)[arguments]: Add #:parallel-tests?.
2021-07-08 14:12:05 +02:00
Ludovic Courtès 7a9f4822c0
utils: Add 'search-input-directory'.
* guix/build/utils.scm (search-input-directory): New procedure.
* doc/guix.texi (Build Utilities): Document it next to
'search-input-file'.  Tweak wording.
2021-07-08 00:28:57 +02:00
Maxime Devos 198df03756
build-system/gnu: patch-shebangs: Also patch shebangs in "/libexec".
Shebangs in "/bin" and "/sbin" subdirectories are currently
patched by patch-shebangs. But shebangs in "/libexec" currently
aren't, even though they occasionally need to be. E.g. when using
wrap-program on an executable in "libexec" without an explicit #:sh
when cross-compiling.

* guix/build/gnu-build-system.scm (patch-shebangs):
  Add "/libexec" to 'bin-directories'.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2021-07-08 00:28:57 +02:00
Ludovic Courtès 285f3b58c6
gnu: guile: Skip 'test-stack-overflow'.
* gnu/packages/guile.scm (guile-3.0)[arguments]: Add
'disable-stack-overflow-test' phase.
2021-07-08 00:28:57 +02:00
Ludovic Courtès 145a5a5797
gnu: glibc: Fix cross-compilation to powerpc64le-linux-gnu.
Fixes <https://bugs.gnu.org/49417>.
Reported by Maxime Devos <maximedevos@telenet.be>.

* gnu/packages/patches/glibc-cross-objcopy.patch: New file.
* gnu/local.mk (dist_patch_DATA): Add it.
* gnu/packages/base.scm (glibc)[source]: Use it.
2021-07-08 00:28:56 +02:00
Chris Marusich 68b0e0d511
gnu: Disable more LuaJIT components on powerpc64le systems.
Fixes: <https://bugs.gnu.org/49218>.

* gnu/packages/tex.scm (texlive-bin)[#:configure-flags]: Add
"--disable-luajithbtex" on powerpc64le systems.
(texlive-latex-base)[#:phases][build]: Add "mfluajit" to the disabled-formats
list on powerpc64le systems.
2021-07-06 17:54:20 -07:00
Efraim Flashner 4407ad0fd7
gnu: bc: Don't duplicate bootstrap phase.
* gnu/packages/algebra.scm (bc)[arguments]: Use custom 'autoconf phase
to replace standard 'bootstrap phase.
2021-07-06 12:49:52 +03:00
Ludovic Courtès eeedb328da
gnu: gcc: Fix cross-compilation.
This fixes cross-compilation of GCC, as in:

  guix build --target=aarch64-linux-gnu -e '(@ (gnu packages gcc) gcc-10)'

* gnu/packages/gcc.scm (gcc-canadian-cross-objdump-snippet): New variable.
(gcc-5)[source]: Use it instead of inline 'snippet'.
(gcc-8)[source]: Add 'modules' and 'snippet'.
(gcc-9)[source]: Likewise.
(gcc-10)[source]: Likewise.
(gcc-11)[source]: Likewise.
2021-07-06 08:50:31 +02:00
Ludovic Courtès dbacdb8c03
gnu: bootstrap-tarballs: Turn builder into a gexp.
* gnu/packages/make-bootstrap.scm (%bootstrap-tarballs)[arguments]: Turn
 #:builder into a gexp.
2021-07-05 23:57:20 +02:00
Ludovic Courtès 8740a62b6b
gnu: bootstrap-tarballs: Fix build.
* gnu/packages/make-bootstrap.scm (%bootstrap-tarballs)[arguments]: Make
'use-modules' the first expression.  Failing that, 'match' would not be
properly expanded when running on Guile 3.0.
2021-07-05 22:18:23 +02:00
Ludovic Courtès 6265c004cb
gnu: texlive: Fix Texinfo markup in descriptions.
* gnu/packages/tex.scm (texlive-latex-atveryend)[description]: Fix
Texinfo markup.
(texlive-generic-etexcmds)[description]: Likewise.
(texlive-generic-kvdefinekeys)[description]: Likewise.
2021-07-05 16:54:25 +02:00
Ludovic Courtès 87d37a02f7
tests: Fix typo in 'tests/store.scm'.
This typo had always been there since the test was introduced in commit
ce72c78074.  Presumably, it became visible
with 9e5812ac59, where caching was no
longer global and thus the 'store' argument of 'package-derivation' was
actually being used.

* tests/store.scm ("current-build-output-port, UTF-8"): Refer to
'%store' rather than 's' in 'package-derivation' call.
2021-07-05 16:43:37 +02:00
Ludovic Courtès 7d8c8b3194
build-system/trivial: Honor build inputs when cross-compiling.
Fixes a regression introduced in
7d873f194c whereby host inputs would be
missing altogether from '%build-inputs', which broke cross-compilation.

* guix/build-system/trivial.scm (trivial-cross-build): Append
HOST-INPUTS to the 'with-build-variables' argument.
2021-07-05 16:26:54 +02:00
Ludovic Courtès 9ac9df25a1
ci: Change "core" subset to include the latest GCC and Guile.
* gnu/ci.scm (%core-packages): Replace GCC-7 by GCC-11 and GUILE-2.0 by
GUILE-3.0.
2021-07-05 16:09:03 +02:00
Ludovic Courtès d8fdd1c74a
tests: Adjust Python "sanity" check tests.
This is a followup to 09448c0994.

The 'check-build-failure' procedure would not actually check anything
since it did not call 'build-derivations'.  However, it was throwing an
exception for unrelated reasons, so the tests would pass.

* tests/builders.scm (check-build-failure): Use 'guard' instead of
'false-if-exception'.  Call 'build-derivations' to actually check for
build failures.
2021-07-05 15:41:45 +02:00
Ludovic Courtès 99ea6a2996
tests: Unset NIX_STORE_DIR when running external tests.
This is a followup to cfcead2e51 and
47a6a938c3, which made (guix packages)
dependent on the value of NIX_STORE_DIR.

* guix/tests.scm (call-with-external-store): Unset NIX_STORE_DIR before
calling PROC.
2021-07-05 15:34:24 +02:00
Sarah Morgensen 5318bade32
gnu: custom-gcc: Update regex for removing executables.
Do not match "gccgo". Match "gcov-dump" and "gcov-tool", as well as
"lto-dump" (which was introduced in GCC 10).

* gnu/packages/gcc.scm (custom-gcc)[arguments]: Update regex used for
matching broken or conflicting executables.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2021-07-05 13:12:03 +02:00
Ludovic Courtès a159586f8a
gnu: bison-boot0: Replace 'posix_spawn' on non-x86 platforms.
* gnu/packages/commencement.scm (bison-boot0)[arguments]: Pass #:configure-flags
on non-x86 platforms.
2021-07-05 12:53:05 +02:00
Ludovic Courtès 8a48302318
build-system/gnu: Define '%build-inputs' when cross-compiling.
Reported by Maxime Devos.

* guix/build-system/gnu.scm (gnu-cross-build)[builder]: Define
'%build-inputs' as it existed before
7d873f194c.
2021-07-05 12:35:29 +02:00
Thiago Jung Bauermann 04f9f9158d
build-system/texlive: Change default format to pdftex
LuaTeX has a bug where sometimes it corrupts the heap and aborts. This
causes the build of texlive packages to fail at random. The problem is
being tracked at https://issues.guix.gnu.org/48064.

While a fix isn't found, switch the default TeX format (and consequently
also the engine) to pdftex to avoid the issue.

* guix/build-system/texlive.scm (texlive-build): Change default value of
the ‘tex-format’ key parameter to “pdftex”.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2021-07-05 11:13:46 +02:00
Ludovic Courtès 949ed7aae1
gnu: glibc: Fix cross-compilation to aarch64-linux-gnu.
Fixes <https://bugs.gnu.org/49113>.
Reported by Maxime Devos <maximedevos@telenet.be>.

Previously, the cross-compiled libc.so linker script would read:

  OUTPUT_FORMAT(elf64-little)

instead of:

  OUTPUT_FORMAT(elf64-littleaarch64)

This is because glibc 2.33 runs "objdump -f" instead of
"aarch64-linux-gnu-objdump -f" to determine the output format.

* gnu/packages/patches/glibc-cross-objdump.patch: New file.
* gnu/local.mk (dist_patch_DATA): Add it.
* gnu/packages/base.scm (glibc)[source]: Use it.
2021-07-04 22:10:06 +02:00
Raghav Gururajan 9d9a8b079a
gnu: glib-networking: Disable openssl support.
Revert openssl support enabled in a1dd57ce83,
as GnuTLS is preferred over OpenSSL in Guix.

* gnu/packages/gnome.scm (glib-networking)[arguments](openssl): Remove flag.
[inputs]: Remove openssl.
2021-07-03 21:55:15 -04:00
Ludovic Courtès f436723ce7
gnu: make-boot0: Build with "--disable-posix-spawn".
Fixes <https://bugs.gnu.org/49367>.

* gnu/packages/commencement.scm (gnu-make-boot0)[arguments]: Pass
"--disable-posix-spawn" on non-x86.
2021-07-04 00:08:33 +02:00