Commit Graph

6824 Commits

Author SHA1 Message Date
Liliana Marie Prikler 2f4071b0b2
guix: ui: Add default synopsis for “doc” output.
* guix/ui.scm (package->recutils)[%default-output-synopses]: Add “doc”.
2022-11-05 10:23:24 +01:00
Liliana Marie Prikler 2c8b1be0d5
guix: ui: Improve missing output descriptions.
The current reference to Intel's Appendix H appears too obscure and confusing.

* guix/ui.scm (package->recutils)[output->recutils]: Replace “see Appendix H”
with “[description missing]”.
2022-11-05 10:23:23 +01:00
Liliana Marie Prikler 9eb80094ae
guix: ui: Handle single outputs.
The current code says "out" contains "everything else", even if there's no
other output to contain anything.

* guix/ui.scm (package->recutils)[default-output-synopses]: New variable.
[output->recutils]: Take default synopses as argument.
["outputs"]: Distinguish single and multiple outputs.
2022-11-05 10:23:23 +01:00
Timotej Lazar fd83edf8a1
build-system/scons: Allow using a G-exp for scons-flags.
* guix/build-system/scons.scm (scons-build): Only call sexp->gexp on
scons-flags when scons-flags is a pair.

Signed-off-by: Christopher Baines <mail@cbaines.net>
2022-11-03 18:08:55 +01:00
Maxim Cournoyer b42b0e6d62
profiles: info-dir-file: Remove install-info '--silent' option.
Relates to <https://issues.guix.gnu.org/58821>.

Revert 4fef1e850e, which silenced useful
information such as the following warning:

   install-info: warning: no info dir entry in
   `/gnu/store/...-rottlog-0.72.2/share/info/rottlog.info.gz'

Rationale: profile hooks output is now hidden by default, and can be made
visible via the --verbosity option.
2022-10-27 23:34:45 -04:00
Marius Bakke e944734ef9
build-system/pyproject: Always run tests verbosely for supported backends.
* guix/build-system/pyproject.scm (pyproject-build): Default to '() instead of
 #false for TEST-FLAGS.
* guix/build/pyproject-build-system.scm (check): Unconditionally enable
verbose test flags.
* doc/guix.texi (Build Systems): Document this change.
* gnu/packages/fontutils.scm (python-glyphslib)[arguments]: Remove verbosity
from #:test-flags.
* gnu/packages/pdf.scm (python-pydyf, weasyprint)[arguments]: Likewise.
* gnu/packages/python-web.scm (python-openapi-spec-validator)[arguments]: Likewise.
* gnu/packages/python-xyz.scm (python-path, python-tempora)[arguments]: Likewise.
2022-10-27 21:30:03 +02:00
Marius Bakke 6ef998d54e
build-system/pyproject: Adjust indentation.
* guix/build/pyproject-build-system.scm: Adjust indentation.
2022-10-27 21:30:03 +02:00
Lars-Dominik Braun 400a7a4c80
build-system: Add pyproject-build-system.
This is an experimental build system based on python-build-system
that implements PEP 517-compliant builds.

* doc/guix.texi (Build Systems): Add pyproject-build-system section.
* doc/contributing.texi (Python Modules): Mention pyproject.toml and the
PYTHON-TOOLCHAIN package, as well as differences to python-build-system.
* guix/build-system/pyproject.scm,
guix/build/pyproject-build-system.scm,
gnu/packages/aux-files/python/sanity-check-next.py,
gnu/packages/python-commencement.scm: New files.
* Makefile.am (MODULES): Register the new build systems.
* gnu/local.mk (GNU_SYSTEM_MODULES): Add python-commencement.scm.
* gnu/packages/python.scm (python-sans-pip, python-sans-pip-wrapper): New
variables.

Co-authored-by: Marius Bakke <marius@gnu.org>
2022-10-27 19:43:06 +02:00
Efraim Flashner 6ff203663e
Merge remote-tracking branch 'origin/master' into staging 2022-10-25 21:50:59 +03:00
Efraim Flashner 408a4ed071
build-system/cargo: Unpack crates less verbosely.
* guix/build/cargo-build-system.scm (configure): Print the crate being
unpacked but don't print the contents of each crate.
2022-10-20 12:23:52 +03:00
Ludovic Courtès 863c228bfd
grafts: Rewrite using gexps.
Fixes <https://issues.guix.gnu.org/58419>.

* guix/grafts.scm (graft-derivation/shallow): Rewrite using gexps and
remove 'store' parameter.
(graft-derivation/shallow*): New variable.
(cumulative-grafts): Use it instead of 'graft-derivation/shallow'.
2022-10-22 01:49:57 +02:00
Ludovic Courtès a3619079f9
Remove now unnecessary uses of (guix grafts).
These modules would use (guix grafts) just to access '%graft?' and
related bindings, which are now in (guix store).

* gnu/ci.scm,
guix/gexp.scm,
guix/lint.scm,
guix/scripts.scm,
guix/scripts/archive.scm,
guix/scripts/build.scm,
guix/scripts/challenge.scm,
guix/scripts/deploy.scm,
guix/scripts/environment.scm,
guix/scripts/home.scm,
guix/scripts/pack.scm,
guix/scripts/package.scm,
guix/scripts/pull.scm,
guix/scripts/size.scm,
guix/scripts/system.scm,
guix/scripts/weather.scm,
tests/builders.scm,
tests/channels.scm,
tests/cpan.scm,
tests/derivations.scm,
tests/gexp.scm,
tests/graph.scm,
tests/guix-daemon.sh,
tests/monads.scm,
tests/pack.scm,
tests/packages.scm,
tests/profiles.scm,
tests/system.scm: Remove #:use-module (guix grafts).
2022-10-22 01:46:55 +02:00
Ludovic Courtès 5f0febcd45
grafts: Move '%graft?' and related bindings to (guix store).
The goal is to allow (guix grafts) to use (guix gexp) without
introducing a cycle between these two modules.

* guix/grafts.scm (%graft?, call-without-grafting, without-grafting)
(set-grafting, grafting?): Move to...
* guix/store.scm: ... here.
2022-10-22 01:46:54 +02:00
Ludovic Courtès b544f46098
build-system/python: Disable grafts.
This is consistent with what 'gnu-build' does and makes sure origins
aren't getting lowered with #:graft? #t in one case and not in the
other.

This is a followup to df46bef48e and
dada5e86ed.

* guix/build-system/python.scm (python-build): Pass #:graft? #f.
2022-10-22 01:46:54 +02:00
Ludovic Courtès e0b414fc59
lint: source: Handle <svn-multi-reference> origins.
This is a followup to 2383e14518.

* guix/lint.scm (svn-reference-uri-with-userinfo): Accept REF being
an <svn-multi-reference> record.
(check-source): Handle 'svn-multi-reference?' origins like
'svn-reference?' origins.
2022-10-20 23:07:38 +02:00
Ludovic Courtès 6352e3a17b
syscalls: Define 'MS_NODIRATIME' and recognize "nodiratime".
Fixes <https://issues.guix.gnu.org/58663>.

This is a followup to b665dd4a99 and
dcb640f02b, allowing "nodiratime" to be
preserved for bind mounts.

* guix/build/syscalls.scm (MS_NODIRATIME): New variable.
(option-string->mount-flags): Recognize it.
(statfs-flags->mount-flags): Likewise.
2022-10-20 23:07:37 +02:00
Ludovic Courtès 4056cd9480
ci: Add 'start-time' and 'stop-time' to <build> records.
* guix/ci.scm (seconds->date): New procedure.
(<build>)[start-time, stop-time]: New fields.
(build-duration): New procedure.
2022-10-20 23:07:37 +02:00
Ludovic Courtès c5d83bee93
environment: Update docstring of 'launch-environment'.
This is a followup to 78d55b703d.
Reported by Maxim Cournoyer.

* guix/scripts/environment.scm (launch-environment): Update docstring.
2022-10-20 23:07:37 +02:00
Ludovic Courtès 6476f33f31
self: Switch to Guile-GnuTLS.
* guix/self.scm (specification->package, compiled-guix): Replace
"gnutls" with "guile-gnutls".
2022-10-18 14:27:01 +02:00
Ludovic Courtès 2383e14518
lint: source: Add check for <svn-reference> over HTTP(S).
* guix/lint.scm (svn-reference-uri-with-userinfo): New procedure.
(check-source): Add 'svn-reference?' clause.
* tests/lint.scm ("source: svn-reference, HTTP 200")
("source: svn-reference, HTTP 404"): New tests.
2022-10-17 23:15:08 +02:00
Ludovic Courtès ec73570be5
lint: 'probe-uri' honors the 'userinfo' part of URIs.
* guix/lint.scm (probe-uri): Honor the 'userinfo' part of URI.
2022-10-17 23:15:08 +02:00
Ludovic Courtès 257917d08b
svn-download: Add missing exports.
* guix/svn-download.scm: Export more <svn-reference> and
<svn-multi-reference> accessors.
2022-10-17 23:15:08 +02:00
Ludovic Courtès dada5e86ed
build-system/qt: Disable grafts.
Fixes <https://issues.guix.gnu.org/58567>.
Reported by Marius Bakke <marius@gnu.org>.

This is a followup to df46bef48e.

* guix/build-system/qt.scm (qt-build, qt-cross-build): Pass #:graft? #f
to 'gexp->derivation'.
2022-10-17 23:15:07 +02:00
Ludovic Courtès 30ac571eac
svn-download: Pass multi-fetch parameters through environment variables.
* guix/svn-download.scm (svn-multi-fetch)[build]: Check for environment
variables instead of splicing REF fields.
Pass #:script-name and #:env-vars to 'gexp->derivation'.
2022-10-17 23:15:07 +02:00
Ludovic Courtès 8599fccef8
svn-download: Pass parameters through environment variables.
This ensures a single "svn-download" script is created in the store for
all the origins that use 'svn-fetch'.

* guix/svn-download.scm (svn-fetch)[build]: Check for environment
variables instead of splicing REF fields.
Pass #:script-name and #:env-vars to 'gexp->derivation'.
2022-10-17 23:15:07 +02:00
Ludovic Courtès 8c90196f1a
read-print: Recognize 'define-record-type' and 'define-record-type*'.
* guix/read-print.scm (%special-forms): Add 'define-record-type' and
'define-record-type*'.
2022-10-17 10:00:50 +02:00
Ludovic Courtès f36522416e
channels: Interpret the 'commit' field of channel as a tag or commit.
Previously the 'commit' field would always be interpreted as a commit
ID.  This change adds flexibility, allowing for things like:

  guix time-machine --commit=v1.2.0 -- describe

* guix/channels.scm (channel-reference): Use 'tag-or-commit' rather than 'commit'.
* guix/inferior.scm (channel-full-commit): Likewise.
* doc/guix.texi (Invoking guix pull): Document it.
(Invoking guix time-machine): Likewise.
2022-10-17 09:37:27 +02:00
Ludovic Courtès 46f7011591
git: 'update-cached-checkout' returns the commit ID when given a tag.
Previously, starting with commit
efa578ecae, 'update-cached-checkout' would
return the OID of the annotated tag the tag points to.  With this change
it returns the OID of the commit object in all cases.

* guix/git.scm (resolve-reference): In the 'tag' case, call
'tag-target-id' and 'tag-lookup' when OID designates an annotated tag.
* tests/git.scm ("update-cached-checkout, tag"): New test.
2022-10-17 09:37:27 +02:00
Julien Lepiller 82b0f3755d
guix: Fix typos.
These typos were found and reported through weblate.

* gnu/packages/audio.scm (wildmidi)[description]: Fix typo.
* gnu/packages/games.scm (cgoban)[description]: Fix typo.
* gnu/services/version-control.scm (gitolite-service-type)[description]:
  Fix typo.
* gnu/installer/newt/substitutes.scm (run-substitutes-page): Remove full
  stop at end of title.
* gnu/machine/ssh.scm (machine-ssh-configuration-system): Move
  punctuation outside of quotes.
* guix/scripts/home.scm (process-action): Remove trailing space before
  newline.
* guix/scripts/system.scm (show-help): Fix typo.
* guix/scripts/environment.scm (with-store/maybe): Fix typo.
2022-10-17 07:29:09 +02:00
Ludovic Courtès 26965563ef
git: 'update-cached-checkout' recognizes truncated commit IDs.
Fixes a regression introduced in
602527ab97 that broke
'tests/guix-build-branch.sh'.

* guix/git.scm (resolve-reference): Revert change from
602527ab97.
2022-10-15 00:44:09 +02:00
Liliana Marie Prikler 8b809a31fa
guix: emacs-utils: Support disabling native-compilation.
* guix/build/emacs-utils.scm (emacs-batch-disable-compilation): Add ‘native?’
argument and honour it.
2022-10-14 20:41:33 +02:00
Nicolas Goaziou 00fa377710
build: emacs-utils: Fix `emacs-substitute-variables'.
* guix/build/emacs-utils.scm (emacs-substitute-variables): Fix the regexp
matching variable name.

With end-of-word regexp ("\>"), the previous regexp may match the prefix of
a variable only, effectively deleting the rest of its name.

For example,

  (emacs-substitute-variables "file.el"
    ("foo" ...))

could match (defvar foo-bar ...) and replace it with (defvar foo ...).
2022-10-13 22:16:32 +02:00
Ludovic Courtès 8b192c5550
shell: Handle '--emulate-fhs' in 'guix shell', not in 'guix environment'.
Previously, using 'guix shell -CF coreutils' twice (such that the
profile is cache) would result in:

  guix shell: error: '--profile' cannot be used with package options

This patch fixes it by moving argument handling to (guix scripts shell),
before 'options-with-caching' is called.

* guix/scripts/environment.scm (show-environment-options-help)
(%options): Remove '--emulate-fhs'.
(guix-environment*): Pass OPTS as-is to 'options/resolve-packages'.
* guix/scripts/shell.scm (show-help, %options): Add '--emulate-fhs'.
Add the (expression . ...) component to RESULT right from the argument
handler.
* tests/guix-environment-container.sh: Change '--emulate-fhs' tests to
use 'guix shell' instead of 'guix environment'.
2022-10-13 15:56:56 +02:00
John Kehayias c7ba5f38b8
environment: Add '--emulate-fhs'.
* guix/scripts/environment.scm (show-environment-options-help, %options): Add
'--emulate-fhs'.
(setup-fhs): New procedure.  Setup for the Filesystem Hierarchy Standard (FHS)
container.  Defines and uses FHS-SYMLINKS and LINK-CONTENTS to create FHS
expected directories and creates /etc/ld.so.conf.
(launch-environment): Add 'emulate-fhs?' key and implement it to set $PATH and
generate /etc/ld.so.cache before calling COMMAND.
(launch-environment/container): Add 'emulate-fhs?' and 'setup-hook' keys and
implement them.  Define and use FHS-MAPPINGS, to set up additional bind mounts
in the container to follow FHS expectations.
(guix-environment*): Add glibc-for-fhs to the container packages when
'emulate-fhs?' key is in OPTS.
* doc/guix.texi (Invoking guix shell): Document '--emulate-fhs'.
(Invoking guix environment): Document '--emulate-fhs'.
* tests/guix-environment-container.sh: Add tests for '--emulate-fhs'.

Co-authored-by: Ludovic Courtès <ludo@gnu.org>
2022-10-13 09:19:08 +02:00
Ludovic Courtès 22b9734b67
Revert "guix system: Remove unused 'read-operating-system' procedure."
This reverts commit d11a432adf.

The 'read-operating-system' is used in Emacs-Guix.
2022-10-11 16:05:31 +02:00
Ludovic Courtès 602527ab97
git: Factorize 'commit-id?' predicate.
* guix/git.scm (commit-id?): New procedure, copied from (guix swh).
(resolve-reference): Use it instead of inline code.
* guix/inferior.scm (channel-full-commit): Likewise.
2022-10-11 16:05:31 +02:00
Ludovic Courtès 7d9fd1d7b7
guix import: Add a blank line after each package definition.
Starting from commit 371a83b764, 'guix
import crate -r' (or similar) would no longer print a blank line in
between definitions.  This patch fixes it.

Reported by jgart <jgart@dismail.de>.

* guix/scripts/import.scm (guix-import): Add second 'newline' call.
2022-10-11 16:05:31 +02:00
Ludovic Courtès b6bc4c109b
packages: Raise an exception for invalid 'license' values.
This is written in such a way that the type check turns into a no-op at
macro-expansion time for trivial cases:

  > ,optimize (validate-license gpl3+)
  $18 = gpl3+
  > ,optimize (validate-license (list gpl3+ gpl2+))
  $19 = (list gpl3+ gpl2+)

* guix/packages.scm (valid-license-value?, validate-license): New
macros.
(<package>)[license]: Add 'sanitize' option.
(&package-license-error): New error condition type.
* tests/packages.scm ("license type checking"): New test.
2022-10-10 11:16:07 +02:00
Ludovic Courtès 79b390a207
licenses: Let 'license?' expand to #t in trivial cases.
With this change, we have:

  > ,expand (license? gpl3+)
  $2 = #t
  > ,expand (license? something-else)
  $3 = (let ((obj something-else))
    (and ((@@ (srfi srfi-9) struct?) obj)
	 ((@@ (srfi srfi-9) eq?)
	  ((@@ (srfi srfi-9) struct-vtable) obj)
	  (@@ (guix licenses) <license>))))

* guix/licenses.scm (define-license-predicate)
(begin-license-definitions): New macros
<top level>: Wrap definitions in 'begin-license-definitions'.
2022-10-10 11:16:06 +02:00
Ricardo Wurmus 7d04f3ad28
import/utils: beautify-description: Update to pass tests.
* guix/import/utils.scm (beautify-description): Remove single quote wrapping;
escape @; exclude common abbreviations and titles from double-spacing; detect
more sentence fragments.
2022-10-05 23:59:48 +02:00
Ludovic Courtès 5bc4b8e8e3
channels: Warn about missing introductions.
* guix/channels.scm (latest-channel-instance): Warn when CHANNEL has no
introduction and CHECKOUT contains '.guix-authorizations'.
2022-10-04 18:15:35 +02:00
Andrew Tropin 64213a0b66
deploy: Fix error message.
* guix/scripts/deploy.scm (guix-deploy): Fix error message.
2022-10-04 16:46:33 +04:00
Maxim Cournoyer 9945f9419d
gnu-maintenance: Remove retired 'gforge.inria.fr' site.
* guix/gnu-maintenance.scm (html-updatable-package?): Remove "gforge.inria.fr".
2022-10-03 11:16:13 -04:00
Ludovic Courtès 4bd75d79e5
read-print: Fix indentation rule for 'match-lambda*'.
Fixes <https://issues.guix.gnu.org/58040>.
Reported by Maxime Devos <maximedevos@telenet.be>.

* guix/read-print.scm (%special-forms): Set 'match-lambda*' parameter
count to 1.
2022-10-02 22:27:55 +02:00
Ludovic Courtès 6a04bc8a6d
transformations: Switch to SRFI-71.
* guix/transformations.scm (package-with-source)
(evaluate-source-replacement-specs): Use SRFI-71 'let' instead of
'let-values'.
2022-10-02 22:14:45 +02:00
Zhu Zihao 9022b942ec
scripts: build: Format strings before calling display-hint.
* guix/scripts/build.scm(%standard-cross-build-options): Format hint string.
%standard-cross-build-options: Ditto.

Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>
2022-09-30 16:04:46 +02:00
Ludovic Courtès 28ade1bab2
transformations: '--with-source' now operates in depth.
The '--with-source' option is the first one that was implemented, and
it's the only one that would operate only on leaf packages rather than
traversing the dependency graph.  This change makes it consistent with
the rest of the transformation options.

* guix/transformations.scm (evaluate-source-replacement-specs): New
procedure.
(transform-package-source): Rewrite using it.
* tests/transformations.scm ("options->transformation, with-source, no
matches"): Rewrite since we no longer get a warning.
("options->transformation, with-source, in depth"): New test.
* doc/guix.texi (Package Transformation Options): Adjust examples.
2022-09-29 22:59:49 +02:00
itd 8b2119a5e4
import: print: Quasiquote properties
* guix/import/print.scm (package->code): Quasiquote properties.
* tests/print.scm (pkg-with-properties, pkg-with-properties-source):
New variables.
("package with properties"): New test

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2022-09-29 22:59:48 +02:00
itd 61bd7bf469
import/utils: alist->package: Include properties.
* guix/import/utils.scm (alist->package): Process properties field in input
data and include it in the generated package.
* tests/import-utils.scm ("alist->package with properties"): New test.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2022-09-29 22:59:48 +02:00
Ludovic Courtès 8bd4126917
substitute: Retry downloading when a nar is unavailable.
Fixes <https://issues.guix.gnu.org/57978>
Reported by Attila Lendvai <attila@lendvai.name>.

Previously, if a narinfo was available but its corresponding nar was
missing (for instance because the narinfo was cached and the server
became unreachable in the meantime), 'guix substitute --substitute'
would try to download the nar from its preferred location and abort when
that fails.  This change forces one retry with each of the URLs.

* guix/scripts/substitute.scm (download-nar): Do not catch
'http-get-error?' exceptions.
(system-error?, network-error?, process-substitution/fallback): New
procedures.
(process-substitution): Call 'process-substitution/fallback' upon
'network-error?'.
* tests/substitute.scm ("substitute, first URL has narinfo but lacks nar, second URL unauthorized")
("substitute, first URL has narinfo but nar is 404, both URLs authorized")
("substitute, first URL has narinfo but nar is 404, one URL authorized")
("substitute, narinfo is available but nar is missing"): New tests.
2022-09-28 22:28:27 +02:00