summaryrefslogtreecommitdiff
path: root/guix
Commit message (Collapse)AuthorAge
* utils: Define a target-x86-32? and target-x86-64? predicate.Maxime Devos2021-11-07
| | | | | | | * guix/utils.scm (target-x86-32?, target-x86-64?): New predicates. * tests/utils.scm ("target-x86-32?", "target-x86-64?"): New tests. Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>
* environment: Suggest command upon 'execlp' failure.Ludovic Courtès2021-11-06
| | | | | | | | | * guix/scripts/environment.scm (launch-environment): Call 'primitive-_exit' upon 'system-error. (suggest-command-name, validate-exit-status): New procedures. (launch-environment/fork): Call 'validate-exit-status'. (launch-environment/container)[exit/status*]: New procedure. Use it instead of 'exit/status'.
* profiles: Build the man database only if 'man-db' is in the profile.Ludovic Courtès2021-11-06
| | | | | | | | | | | This allows us to skip the expensive man-db profile hook in most cases. Suggested by Liliana Marie Prikler <liliana.prikler@gmail.com>. * guix/profiles.scm (manual-database/optional): New procedure. (%default-profile-hooks): Use it instead of 'manual-database'. * doc/guix.texi (Documentation): Add footnote about 'man -k' database creation.
* import: elpa: Work around Guile 3.0.[5-7] compiler bug.Ludovic Courtès2021-11-06
| | | | | | | | Fixes <https://issues.guix.gnu.org/49006>. Reported by Xinglu Chen <public@yoctocell.xyz>. * guix/import/elpa.scm (elpa-package->sexp)[melpa-recipe]: Add call to 'identity'.
* import: stackage: Update to release 18.14.Lars-Dominik Braun2021-11-02
| | | | * guix/import/stackage.scm (%default-lts-version): Update to 18.14.
* ui: Use DISPLAY in SHOW-GUIX-HELP.Tobias Geerinckx-Rice2021-10-31
| | | | * guix/ui.scm (show-guix-help): Use DISPLAY where FORMAT isn't needed.
* ui: Add top-level options to help text.Tobias Geerinckx-Rice2021-10-31
| | | | | | | This also makes automated ‘guix --h<Tab>’ completion possible. * guix/ui.scm (show-guix-help): Document that an OPTION's an option, and all valid options.
* home: import: Avoid duplication of 'manifest->code'.Ludovic Courtès2021-10-31
| | | | | | | | | | * guix/scripts/home/import.scm (manifest->code): Remove. (manifest+configuration-files->code): New procedure. (import-manifest): Use 'manifest+configuration-files->code' instead of 'manifest->code'. * tests/home-import.scm (eval-test-with-home-environment): Likewise. (match-home-environment-transformations): New procedure. ("manifest->code: No services, package transformations"): New test.
* home: import: Factorize triplicated 'version-spec' procedure.Ludovic Courtès2021-10-31
| | | | | | | | | | * guix/scripts/package.scm (manifest-entry-version-prefix): New procedure, moved from... (export-manifest)[version-spec]: ... here. Adjust caller. * tests/home-import.scm (version-spec): Remove. (eval-test-with-home-environment): Use 'manifest-entry-version-prefix' instead. * guix/scripts/home/import.scm (import-manifest): Likewise.
* home: import: Clarify "destination directory".Ludovic Courtès2021-10-31
| | | | | | | | Suggested by Liliana Marie Prikler <liliana.prikler@gmail.com>. * guix/scripts/home/import.scm (configurations+modules): Rename 'destination-directory' to 'configuration-directory'. Improve docstring.
* home: import: Compare procedures with 'eq?'.Ludovic Courtès2021-10-31
| | | | | | | | 'procedure-name' is a debugging aid and cannot be reliably used to check for procedure equality. * guix/scripts/home/import.scm (configurations+modules): Remove use of 'procedure-name'.
* guix home: import: Call ‘local-file’ with ‘name’Xinglu Chen2021-10-31
| | | | | | | | | | | | Set the name of the file to just the basename of the file passed to ‘local-file’. * guix/scripts/home/import.scm (basename+remove-dots): New procedure. (generate-bash-configuration+modules): Use it. * tests/home-import.scm (match-home-environment-bash-service): Adjust accordingly. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
* Add tests for ‘guix home import’.Xinglu Chen2021-10-31
| | | | | | | * tests/home-import.scm: New file. * Makefile.am (SCM_TESTS): Add it. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
* guix home: import: Delete duplicate modules when importing.Xinglu Chen2021-10-31
| | | | | | | | | Two different services might require the same module(s), so delete duplicates when generating the ‘use-modules’ form. * import.scm (manifest->code): Delete duplicate modules. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
* guix home: import: Don’t use 'slurp-file-gexp'.Xinglu Chen2021-10-31
| | | | | | | | | ‘slurp-file-gexp’ is not a bound procedure. * guix/scripts/home/import.scm (generate-bash-configuration+modules): Don’t use ‘slurp-file-gexp’. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
* guix home: import: Fix module name for Bash service.Xinglu Chen2021-10-31
| | | | | | | * guix/scripts/home/import.scm (generate-bash-configuration+modules): Change (gnu home-services bash) to (gnu home-services shells); add (guix gexp). Signed-off-by: Ludovic Courtès <ludo@gnu.org>
* guix home: import: Allow multiple modules to be imported for each service.Xinglu Chen2021-10-31
| | | | | | | | | | | | | | | | | | Previously, only one module could be imported for each service, e.g., only (gnu home-services shell) could be imported when generating the Bash service declaration. However, for some services, multiple modules might need to be imported in order for it to work. * guix/scripts/home/import.scm (generate-bash-module+configuration): Rename to ... (generate-bash-configuration+modules): ... this. (%files-configurations-alist): Rename to ... (%files+configurations-alist): ... this. (modules+configurations): Rename to ... (configurations+modules): ... this. (manifest->code): Adjust accordingly. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
* guix home: import: Make the user to specify a destination directory.Xinglu Chen2021-10-31
| | | | | | | | | | | | | | | | | | | | | | | | | | | Copy the appropriate the relevant configuration files to the destination directory, and call ‘local-file’ on them. Without this, ‘guix home import’ will generate a service declaration like this (service home-bash-service-type (home-bash-configuration (bashrc (list (slurp-file-gexp (local-file "/home/yoctocell/.bashrc")))))) but when running ‘guix home reconfigure’, the ~/.bashrc file would be moved, so when running ‘guix home reconfigure’ for the second time, it would read the ~/.bashrc which is itself a symlink to a file the store. * guix/scripts/home/import.scm (generate-bash-module+configuration): Take ‘destination-directory’ parameter (modules+configurations): Copy the user’s configuration file to ‘%destination-directory’. * guix/scripts/home.scm (process-command): Adjust accordingly; create ‘destination’ if it doesn’t exist. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
* shell: Error out when an unauthorized guix.scm/manifest.scm is found.Ludovic Courtès2021-10-30
| | | | | | | | | | | The previous behavior was confusing: a warning would be printed and 'guix shell' would go on starting an empty environment. Reported by Tobias Geerinckx-Rice <me@tobias.gr>. * guix/scripts/shell.scm (auto-detect-manifest): Change "not loading" case from warning to error. * tests/guix-shell.sh: Adjust accordingly.
* packages: Optionally validate Texinfo markup at expansion time.Ludovic Courtès2021-10-28
| | | | | * guix/packages.scm (validate-texinfo): New macro. (<package>)[synopsis, description]: Add 'sanitize' property.
* ui: Gracefully handle invalid Texinfo markup in package blurbs.Ludovic Courtès2021-10-28
| | | | | | | | Previously 'guix search' & co. would crash when encountering invalid Texinfo. * guix/ui.scm (texi->plain-text*): New procedure. (package-field-string, package->recutils): Use it.
* store: 'map/accumulate-builds' handler checks the store received.Ludovic Courtès2021-10-28
| | | | | | | | | | | This is a followup to b19250eec6f92308f237a09a43e8e3e2355345b9, providing a proper fix for <https://issues.guix.gnu.org/46756>. * guix/remote.scm (remote-eval): Revert b19250eec6f92308f237a09a43e8e3e2355345b9. * guix/store.scm (build-accumulator): Turn into a procedure. Call CONTINUE when the store is not eq? to the initial store. (map/accumulate-builds): Adjust accordingly. * tests/store.scm ("map/accumulate-builds and different store"): New test.
* import: cran: Use the standard diagnostic procedures.Ludovic Courtès2021-10-28
| | | | | * guix/import/cran.scm (bioconductor-packages-list) (fetch-description): Use 'warning' instead of 'format'.
* environment: Fix broken file-local variable.Zhu Zihao2021-10-28
| | | | | | * guix/scripts/environment.scm (Local Variables): Add missing eval. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
* remote: Really build things remotely when #:build-locally? is #false.Ludovic Courtès2021-10-28
| | | | | | | | | | Fixes <https://issues.guix.gnu.org/46756>. Reported by pkill9 <pkill9@runbox.com>, Maxim Cournoyer <maxim.cournoyer@gmail.com>, and Katherine Cox-Buday <cox.katherine.e@gmail.com>. * guix/remote.scm (remote-eval): When BUILD-LOCALLY? is false, wrap 'build-derivations' call in 'with-build-handler'.
* syscalls: Gracefully handle failure to load libc's libutil.Ludovic Courtès2021-10-26
| | | | | | | | | | | | In particular, libutil is not found when running code on a statically-linked Guile. Reported by mahmooz on #guix. * guix/build/syscalls.scm (syscall->procedure): Add #:library parameter and honor it. (openpty, login-tty): Use 'syscall->procedure' instead of calling 'dynamic-link' directly.
* shell: Suggest running '--check' once for interactive use.Ludovic Courtès2021-10-26
| | | | | | * guix/scripts/shell.scm (hint-directory, hint-file, record-hint) (hint-given?): New procedures. (guix-shell): Record and probe the 'shell-check' hint.
* environment: Add '--check'.Ludovic Courtès2021-10-26
| | | | | | | | | | | | * guix/scripts/environment.scm (show-environment-options-help) (%options): Add '--check'. * guix/scripts/environment.scm (child-shell-environment) (validate-child-shell-environment): New procedures. (guix-environment*): Call 'validate-child-shell-environment' when 'check?' key is in OPTS. * doc/guix.texi (Invoking guix shell): Shorten footnote about Bash startup files. Document '--check' and mention startup files. (Invoking guix environment): Document '--check'.
* syscalls: Add 'openpty' and 'login-tty'.Ludovic Courtès2021-10-26
| | | | | * guix/build/syscalls.scm (openpty, login-pty): New procedures. * tests/syscalls.scm ("openpty", "openpty + login-tty"): New tests.
* packages: Optimize 'package-transitive-supported-systems'.Ludovic Courtès2021-10-26
| | | | | | | | | | | | | With this change, the wall-clock time of: ./pre-inst-env guile -c '(use-modules (gnu) (guix)(ice-9 time)) (time (pk (fold-packages (lambda (p r)(supported-package? p)(+ 1 r)) 0)))' goes from 3.2s to 2.0s, a 37% improvement. * guix/packages.scm (package-transitive-supported-systems): Change 'supported-systems' to 'supported-systems-procedure', returning an 'mlambdaq' instead of the original 'mlambda'. Add 'procs'. Adjust body accordingly.
* shell: Maintain a profile cache.Ludovic Courtès2021-10-25
| | | | | | | | | | | | | | | | | | | | | | | shell: Maintain a profile cache. With this change, running "guix shell" (no arguments) is equivalent to: guix environment -r ~/.cache/guix/profiles/some-root -l guix.scm This is the cache miss. On cache hit, it's equivalent to: guix environment -p ~/.cache/guix/profiles/some-root ... which can run in 0.1s. * guix/scripts/shell.scm (options-with-caching): New procedure. (parse-args): Use it. (%profile-cache-directory): New variable. (profile-cache-key, profile-cached-gc-root): New procedures. (show-help, %options): Add '--rebuild-cache'. (guix-shell)[cache-entries, entry-expiration]: New procedures. Add call to 'maybe-remove-expired-cache-entries'. * doc/guix.texi (Invoking guix shell): Document '--rebuild-cache'.
* cache: Gracefully handle non-existent cache.Ludovic Courtès2021-10-25
| | | | | * guix/cache.scm (maybe-remove-expired-cache-entries): Ignore ENOENT when writing EXPIRY-FILE.
* environment: Autoload some modules.Ludovic Courtès2021-10-25
| | | | | | This further speeds up the 'guix environment -p PROFILE' case. * guix/scripts/environment.scm: Autoload a bunch of modules.
* environment: Do not connect to the daemon when '--profile' is used.Ludovic Courtès2021-10-25
| | | | | | | | | This further speeds up the 'guix environment -p PROFILE' case. * guix/scripts/environment.scm (guix-environment*)[store-needed?]: New variable. [with-store/maybe]: New macro. Use it instead of 'with-store', and remove 'with-build-handler' form.
* environment: Skip derivation computation when '--profile' is used.Ludovic Courtès2021-10-25
| | | | | | * guix/scripts/environment.scm (guix-environment*): Bypass calls to 'package-derivation' and to 'manifest->derivation' when PROFILE is true.
* shell: By default load the local 'manifest.scm' or 'guix.scm' file.Ludovic Courtès2021-10-25
| | | | | | | | * guix/scripts/shell.scm (parse-args): Add call to 'auto-detect-manifest'. (authorized-directory-file, authorized-shell-directory?) (find-file-in-parent-directories, auto-detect-manifest): New procedures. * tests/guix-shell.sh: Add test. * doc/guix.texi (Invoking guix shell): Document it.
* Add 'guix shell'.Ludovic Courtès2021-10-25
| | | | | | | | | | | | | | | | | | | | | | | * guix/scripts/shell.scm, tests/guix-shell.sh: New files. * Makefile.am (MODULES): Add 'shell.scm'. (SH_TESTS): Add 'tests/guix-shell.sh'. * guix/scripts/environment.scm (show-environment-options-help): New procedure. (show-help): Use it. (guix-environment*): New procedure. (guix-environment): Use it. * po/guix/POTFILES.in: Add it. * doc/guix.texi (Features): Refer to "guix shell" (Invoking guix package): Likewise. (Development): Likewise. (Invoking guix shell): New node. (Invoking guix environment): Add deprecation warning. (Debugging Build Failures): Use 'guix shell' in examples. (Invoking guix container): Refer to 'guix shell'. (Invoking guix processes, Virtualization Services): Adjust examples to use 'guix shell'. * doc/contributing.texi (Building from Git): Refer to 'guix shell'. * etc/completion/bash/guix: Handle "shell".
* profiles: Add 'package->development-manifest'.Ludovic Courtès2021-10-25
| | | | | | | | | * guix/profiles.scm (package->development-manifest): New procedure. * guix/scripts/environment.scm (input->manifest-entry) (package-environment-inputs): Remove. * guix/scripts/environment.scm (options/resolve-packages): Use 'package->development-manifest' instead of 'package-environment-inputs'. * tests/profiles.scm ("package->development-manifest"): New test.
* packages: Add 'package-development-inputs'.Ludovic Courtès2021-10-25
| | | | | | | | * guix/packages.scm (package-development-inputs): New procedure. * guix/scripts/environment.scm (package-environment-inputs): Use it. * tests/packages.scm ("package-development-inputs") ("package-development-inputs, cross-compilation"): New tests. * doc/guix.texi (package Reference): Document it.
* lint: Add description check for common typos.Vagrant Cascadian2021-10-24
| | | | | | | | | Fixes: https://issues.guix.gnu.org/44675 * guix/lint.scm (check-description-typo): Add check for occurences of "This packages", "This modules", "allows to" and "permits to" in package descriptions. * tests/lint.scm: Add tests for "This packages" and "allows to".
* guix: packages: Add comment on license field.jgart via Guix-patches via2021-10-22
| | | | | | | * guix/packages/packages.scm (<package>): Add comment about the type that the license field expects as part of a package record. Signed-off-by: Tobias Geerinckx-Rice <me@tobias.gr>
* build-system/go: Fix building on host's secondary architecture.Efraim Flashner2021-10-18
| | | | | | | | | | | Before when building for i686-linux on x86_64-linux GOARCH would be set to amd64, not 386. * guix/build-system/go.scm (go-build): Set goarch and goos to #f when not cross-compiling. * guix/build/go-build-system.scm (setup-go-environment): Set GOARCH according to the calculated goarch or using GOHOSTARCH and GOOS according to the calculated goos or using GOHOSTOS.
* maint: Factorize po xref translation.Julien Lepiller2021-10-17
| | | | | | | | | | | | | This ensures we use the same method in "make" as in "guix/self.scm". * Makefile.am: Build guix/build/po.scm. * build-aux/convert-xref.scm: New file. * doc/local.mk (xref_command): Use it. * guix/self.scm (translate-cross-references): Move it... * guix/build/po.scm: Parse comments and flags separately to find fuzzy flags. (translate-cross-references): ...here. (parse-tree->assoc): Ignore fuzzy entries.
* build-system/minetest: Install config.txt and _config.txt.Vivien Kraus2021-10-16
| | | | | | | * guix/build/minetest-build-system.scm (mod-install-plan): Add "config.txt" and "_config.txt" to the list of installed files. Signed-off-by: Tobias Geerinckx-Rice <me@tobias.gr>
* build-system/minetest: Gather whole failing test output.Vivien Kraus2021-10-16
| | | | | | | * guix/build/minetest-build-system.scm (check): Gather the whole output when a test fails. Signed-off-by: Tobias Geerinckx-Rice <me@tobias.gr>
* refresh: Report suggested input changes with 'info'.Ludovic Courtès2021-10-15
| | | | | | * guix/scripts/refresh.scm (update-package): Define 'field', 'name', 'loc', and 'change-name'. Use 'info' rather than 'format' to report suggested input changes.
* import: pypi: Remove leftover 'pk' call.Ludovic Courtès2021-10-15
| | | | | | | This is a followup to 7b75f90c5b0da896c486cae23d19d43e2a03bb56. * guix/import/pypi.scm (make-pypi-sexp)[maybe-upstream-name]: Remove leftover 'pk' call.
* import: pypi: Support 'input-changes'.Xinglu Chen2021-10-15
| | | | | | * guix/import/pypi.scm (latest-release): Specify the ‘input-changes’ field. Co-authored-by: Ludovic Courtès <ludo@gnu.org>
* swh: Allows token from Software Heritage authentication service.zimoun2021-10-15
| | | | | | | | | The token is provided using the environment variable GUIX_SWH_TOKEN. * guix/swh.scm (%swh-token): New variable. (call): Use it. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
* download: "GUIX_DOWNLOAD_FALLBACK_TEST=none" disables fallback mechanisms.Ludovic Courtès2021-10-15
| | | | | * guix/download.scm (url-fetch*): Handle (%download-fallback-test) set to 'none.