summaryrefslogtreecommitdiff
path: root/guix
AgeCommit message (Collapse)Author
2022-08-10read-print: Remove unused procedure.Ludovic Courtès
* guix/read-print.scm (combine-vertical-space): Remove.
2022-08-10read-print: Report missing closing parens instead of looping.Ludovic Courtès
Fixes <https://issues.guix.gnu.org/57093>. Reported by Mohammed AMAR-BENSABER <renken@shione.net>. Previously 'read-with-comments' would enter an infinite loop. * guix/read-print.scm (read-with-comments)[missing-closing-paren-error]: New procedure. Call it when 'loop' as called from 'liip' returns EOF. * tests/read-print.scm ("read-with-comments: missing closing paren"): New test.
2022-08-10ssh: 'open-ssh-session' gracefully handles connection timeouts.Ludovic Courtès
* guix/ssh.scm (open-ssh-session): Add case for 'again.
2022-08-10gnu: system: file-systems: Add shared flag.Oleg Pykhalov
* gnu/build/file-systems.scm (mount-flags->bit-mask, mount-file-system): Handle shared flag. * gnu/system/file-systems.scm (invalid-file-system-flags): Add shared to known flags. * guix/build/syscalls.scm (MS_SHARED): New variable. * doc/guix.texi (File Systems): Document shared flag.
2022-08-09channels: Consider news files as UTF-8-encoded by default.Ludovic Courtès
Partly fixes <https://issues.guix.gnu.org/57039>. Reported by Pierre-Henry Fröhring <contact@phfrohring.com>. Previously, news file would be read using the current locale encoding. This could lead to a test failure in 'tests/channels.scm' (in a test that expects some Unicode-capable encoding) in case tests were run in a non-Unicode locale. * guix/channels.scm (channel-news-for-commit): Make port for NEWS-FILE UTF-8 by default.
2022-08-09tests: git: Write files as UTF-8.Ludovic Courtès
* guix/tests/git.scm (populate-git-repository): Add call to 'set-port-encoding!' in 'add' case.
2022-08-09channels: Add 'repository->guix-channel'.Ludovic Courtès
* guix/channels.scm (repository->guix-channel): New procedure. * guix/scripts/describe.scm (display-checkout-info): Use it instead of the (git) interface, and adjust accordingly.
2022-08-09build-system/channel: Accept a channel or instance as the source.Ludovic Courtès
* guix/build-system/channel.scm (latest-channel-instances*): New variable. (build-channels): New procedure, with code formerly in 'channel-build-system', augmented with clauses for when SOURCE is a channel instance or a channel. * doc/guix.texi (Build Systems): Adjust accordingly.
2022-08-09build-system: Add 'channel-build-system'.Ludovic Courtès
* gnu/ci.scm (channel-build-system, channel-source->package): Remove. * gnu/packages/package-management.scm (channel-source->package): New procedure, moved from (gnu ci). * guix/build-system/channel.scm: New file, with code moved from (gnu ci). * doc/guix.texi (Build Systems): Document it.
2022-08-08read-print: Add 'case' and 'cond' special forms.Ludovic Courtès
* guix/read-print.scm (%special-forms): Add 'case' and 'cond'. * tests/read-print.scm: Add tests.
2022-08-08read-print: Support printing multi-line comments.Ludovic Courtès
* guix/read-print.scm (%not-newline): New variable. (print-multi-line-comment): New procedure. (pretty-print-with-comments): Use it. * tests/read-print.scm ("pretty-print-with-comments, multi-line comment"): New test.
2022-08-08style: Add '--whole-file' option.Ludovic Courtès
* guix/scripts/style.scm (format-whole-file): New procedure. (%options, show-help): Add '--whole-file'. (guix-style): Honor it. * tests/guix-style.sh: New file. * Makefile.am (SH_TESTS): Add it. * doc/guix.texi (Invoking guix style): Document it.
2022-08-08read-print: 'canonicalize-comment' leaves top-level comments unchanged.Ludovic Courtès
This lets users use three leading semicolons, for instance, in top-level comments. * guix/read-print.scm (canonicalize-comment): Add INDENT parameter and honor it. (pretty-print-with-comments): Change default value of #:format-comment. Call FORMAT-COMMENT with INDENT as the second argument. * tests/read-print.scm: Adjust test accordingly.
2022-08-08read-print: Add code to read and write sequences of expressions/blanks.Ludovic Courtès
* guix/read-print.scm (read-with-comments): Add #:blank-line? and honor it. (read-with-comments/sequence, pretty-print-with-comments/splice): New procedures. * tests/read-print.scm (test-pretty-print/sequence): New macro. Add tests using it.
2022-08-08read-print: Recognize page breaks.Ludovic Courtès
* guix/read-print.scm (<page-break>, page-break?, page-break) (char-set:whitespace-sans-page-break): New variables. (space?): New procedure. (read-vertical-space): Use it. (read-until-end-of-line): New procedure. (read-with-comments): Add #\page case. (pretty-print-with-comments): Add 'page-break?' case. * tests/read-print.scm ("read-with-comments: top-level page break"): New test. Add round-trip test with page break within an sexp.
2022-08-08read-print: Read and render vertical space.Ludovic Courtès
* guix/read-print.scm (<vertical-space>, vertical-space?) (vertical-space, vertical-space-height): New variables. (combine-vertical-space, canonicalize-vertical-space) (read-vertical-space): New procedures. (read-with-comments): Use it in the #\newline case. (pretty-print-with-comments): Add #:format-vertical-space and honor it. Add case for 'vertical-space?'. * guix/scripts/style.scm (format-package-definition): Pass #:format-vertical-space to 'object->string*'. * tests/read-print.scm ("read-with-comments: list with blank line") ("read-with-comments: list with multiple blank lines") ("read-with-comments: top-level blank lines") ("pretty-print-with-comments, canonicalize-vertical-space"): New tests. Add a couple of additional round-trip tests.
2022-08-08read-print: Introduce <blank> parent class of <comment>.Ludovic Courtès
* guix/read-print.scm (<blank>, blank?): New record type. (<comment>): Redefine using the record interface. (read-with-comments, pretty-print-with-comments): Change some uses of 'comment?' to 'blank?'. * guix/scripts/style.scm (simplify-inputs)[simplify-expressions]: Use 'blank?' instead of 'comment?'.
2022-08-08read-print: Expose comment constructor.Ludovic Courtès
* guix/read-print.scm (<comment>): Rename constructor to 'string->comment'. (comment): New procedure. (read-with-comments, canonicalize-comment): Use 'string->comment' instead of 'comment'.
2022-08-08read-print: Add System and Home special forms.Ludovic Courtès
* guix/read-print.scm (%special-forms): Add System and Home forms. (%newline-forms): Add 'services'.
2022-08-08style: Move reader and printer to (guix read-print).Ludovic Courtès
* guix/scripts/style.scm (<comment>, read-with-comments) (vhashq, %special-forms, %newline-forms, prefix?) (special-form-lead, newline-form?, escaped-string) (string-width, canonicalize-comment, pretty-print-with-comments) (object->string*): Move to... * guix/read-print.scm: ... here. New file. * guix/scripts/import.scm: Adjust accordingly. * tests/style.scm: Move 'test-pretty-print' and tests to... * tests/read-print.scm: ... here. New file. * Makefile.am (MODULES): Add 'guix/read-print.scm'. (SCM_TESTS): Add 'tests/read-print.scm'.
2022-08-08lint: Add '-e'.Ludovic Courtès
* guix/scripts/lint.scm (show-help, %options): Add '-e'. (guix-lint): Call 'specification->package' while traversing OPTS. Add case for 'expression pair. Adjust 'for-each' loop to expect packages. * doc/guix.texi (Invoking guix lint): Document it.
2022-08-06build-system/perl: Support cross-compilation of some Perl packages.Maxime Devos
* guix/build-system/perl.scm: Add info on cross-compilation. (lower)[private-keywords]: Remove #:target when cross-compiling. (lower)[target]: Set. (host-inputs)[perl]: New entry. (host-inputs)[(standard-packages)]: Move to ... (build-inputs)[(standard-packages)]: ... here when cross-compiling. (build-inputs)[standard-cross-packages]: Add when cross-compiling. (target-inputs): New entry when cross-compiling. (build): Use perl-cross-build when cross-compiling. (perl-cross-build): New procedure. Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>
2022-08-05guix system: Remove unused 'read-operating-system' procedure.Ludovic Courtès
* guix/scripts/system.scm (read-operating-system): Remove. * gnu/ci.scm: Remove unused (guix scripts system) import.
2022-08-05utils: Add target-mips64el?.Vivien Kraus
* guix/utils.scm (target-mips64el?): New function. It detects whether the target system is mips64el. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2022-08-05utils: Add as-for-target.Antero Mejr
* guix/utils.scm (as-for-target): New function. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2022-08-04build: qt-utils: Fix another regression.Maxim Cournoyer
This fixes another regression introduced with 1f466ed6be932526fc69e72ffd50390691d0d382, which affected the packages bitmask, hime, hime, nimf and vorta. The fix is to provide a default qt-major-version when #:qtbase is missing, such as when borrowing the qt-wrap phase in a package not using the Qt build system. * guix/build/qt-utils.scm (wrap-all-qt-programs)[qt-major-version]: Fall-back to %default-qt-major-version when #:qtbase is #f. Reported-by: John Kehayias <john.kehayias@protonmail.com> and others.
2022-08-04environment: Report "command not found" from the child process.Ludovic Courtès
Fixes a bug whereby, for example: guix shell bash -- bash -c xyz would erroneously print: guix shell: error: bash: command not found simply because the parent process could not distinguish that 127 from a "genuine" 127 used by convention for "command not found". * guix/scripts/environment.scm (launch-environment): Before exiting, report a "command not found" error and suggest a command name. (validate-exit-status): Remove. (launch-environment/fork): Remove call (launch-environment/container)[exit/status*]: Remove. Call 'exit/status' instead of it.
2022-08-04guix build: Print hints when -s or --target is passed an invalid string.Ludovic Courtès
* guix/scripts/build.scm (%standard-cross-build-options) (%standard-native-build-options): Print hints when the target/system is not found.
2022-08-03download: Do not wrap TLS port on GnuTLS >= 3.7.7.Ludovic Courtès
The custom input/output port wrapping the TLS session record port would introduce overhead, and it would also prevent its uses in a non-blocking context--e.g., with Fibers. The port close mechanism added in GnuTLS 3.7.7 allows us to get rid of that wrapper. * guix/build/download.scm (wrap-record-port-for-gnutls<3.7.7): New procedure, with code formerly in 'tls-wrap'. (tls-wrap): Check for 'set-session-record-port-close!' and use it when available; otherwise call 'wrap-record-port-for-gnutls<3.7.7'.
2022-08-03build-system: asdf: Add asd-operation parameter.Guillaume Le Vaillant
The 'asd-operation' parameter can be used to specify the ASDF operation to use in the build phase. It's default value is "load-system". * guix/build-system/asdf.scm (package-with-build-system, asdf-build): Add 'asd-operation' parameter. * guix/build/asdf-buid-system.scm (build): Add 'asd-operation' parameter and use it. * guix/build/lisp-utils.scm (compile-systems): Add 'asd-operation' parameter and use it.
2022-08-03build-system: asdf: Let ASDF locate the .asd files.Pierre Neidhardt
This approach has many benefits: - It simplifies the build system. - The package definitions are easier to write. - It fixes a bug with systems that call asdf:clear-system which would cause the load to fail. See for instance test systems using Prove. * guix/build-system/asdf.scm (package-with-build-system): Remove 'asd-files' and replace 'test-asd-file' by 'asd-test-systems'. (lower): Same. * guix/build/asdf-build-system.scm (source-asd-file): Remove since ASDF does it better than us. (find-asd-files): Same. (build): Remove unused asd-files argument. (check): Remove asd-files argument and replace asd-systems by asd-test-systems. * guix/build/lisp-utils.scm (compile-systems): Call to ASDF to find the systems. (test-system): Same. Signed-off-by: Guillaume Le Vaillant <glv@posteo.net>
2022-08-03guix: build: Switch from asdf:compile-system to asdf:load-system.Pierre Neidhardt
According to the ASDF manual: This will make sure all the files in the system are compiled, but not necessarily load any of them in the current image; on most systems, it will _not_ load all compiled files in the current image. This function exists for symmetry with 'load-system' but is not recommended unless you are writing build scripts and know what you're doing. * guix/build/lisp-utils.scm (compile-systems): Switch from asdf:compile-system to asdf:load-system. Signed-off-by: Guillaume Le Vaillant <glv@posteo.net>
2022-08-01build-system: qt: Ensure a default value is provided for #:qtbase.Maxim Cournoyer
* guix/build-system/qt.scm (qt-build)[qtbase]: Specify a default value. Lower it using ungexp-native. (qt-cross-build): Likewise. Reported-by: Maxime Devos <maximedevos@telenet.be> and others.
2022-08-01download: 'url-fetch' closes its HTTP/HTTPS port.Ludovic Courtès
* guix/build/download.scm (url-fetch)[fetch]: In the http/https case, close PORT before returning.
2022-07-31build: qt: Add qtbase argument and wrap Qt environment variables exactly.Maxim Cournoyer
* guix/build-system/qt.scm (default-qtbase): New variable. (lower) <#:qtbase>: Add argument... [build-inputs]: ... and propagate it here. (qt-build): Add qtbase argument. (qt-cross-build): Likewise. * guix/build/qt-utils.scm (%default-qt-major-version): New variable. (variables-for-wrapping): Add qt-major-version argument, and use it to format the various path prefixes. Wrap QT environment variables exactly. (wrap-qt-program*): Add qt-major-version argument, and pass it to variables-for-wrapping. (wrap-qt-program): Add qt-major-version argument, and pass it to wrap-qt-program*. (wrap-all-qt-programs): Add qtbase argument, and extract the major version from it, passing it to wrap-qt-program*.
2022-07-31gnu: qttools: Rename to qttools-5.Maxim Cournoyer
Automated with: git grep -l qttools | xargs sed 's/\bqttools\b/\0-5/g' -i git checkout NEWS
2022-08-01guix gc: '--delete-generations' now deletes old Home generations.Ludovic Courtès
This reverts commit 24c0518dd404cbb3c434fb6704f4f551bbc78693, thereby reinstating ba22560627f848f40891a56355ff26b6de1380bc, with an additional fix in (guix self). Fixes <https://issues.guix.gnu.org/56722>. Reported by "(" <paren@disroot.org>. * guix/scripts/gc.scm (guix-gc)[delete-generations]: Add call to 'home-generation-base'. * guix/self.scm (compiled-guix)[*core-cli-modules*]: Remove (guix scripts gc). * doc/guix.texi (Invoking guix gc): Document the change.
2022-07-24download: Refresh KDE mirror list.Tobias Geerinckx-Rice
* guix/download.scm (%mirrors)[kde]: Update list, using HTTPS wherever possible.
2022-07-17Revert "guix gc: '--delete-generations' now deletes old Home generations."Tobias Geerinckx-Rice
This reverts commit ba22560627f848f40891a56355ff26b6de1380bc.
2022-07-23gnu: clojure: Update to 1.11.1.r0man
This patch updates Clojure to 1.11.1. It also adds the 'reset-class-timestamps phase to the Clojure build system. This phase makes sure the timestamp of compiled class files is set to a later point in time than the timestamp of the corresponding Clojure source files. If the timestamps of the class and source files are the same, the Clojure compiler will compile the sources again which can lead to issues. This problem has been discussed here [1]. The suggested solution was to keep/adjust the timestamps of the class files. [1] https://www.mail-archive.com/clojure@googlegroups.com/msg99928.html * gnu/packages/clojure.scm (clojure): Update to 1.11.1 and update all of LIBRARIES accordingly. [arguments]: In 'unpack-library-sources' phase, copy from "core-specs-alpha-src" and "spec-alpha-src" as well. Add phases 'closure-spec-skip-macros', 'clojure-spec-compile', 'maven-classpath-properties', and 'reset-class-timestamps'. * guix/build/clojure-build-system.scm (regular-jar-file?) (reset-class-timestamps): New procedures. (%standard-phases): Add 'reset-class-timestamps' phase. Co-authored-by: Ludovic Courtès <ludo@gnu.org>
2022-07-23guix gc: '--delete-generations' now deletes old Home generations.Ludovic Courtès
Previously, 'guix gc -d4m' would ignore Home generations. With this change, they are treated like profiles and generations that match the pattern are deleted. * guix/scripts/gc.scm (guix-gc)[delete-generations]: Add call to 'home-generation-base'. * doc/guix.texi (Invoking guix gc): Document the change.
2022-07-23deploy: Honor '--dry-run'.Ludovic Courtès
* guix/scripts/deploy.scm (%options): Add "dry-run". (show-what-to-deploy): Add #:dry-run? and honor it. (guix-deploy): Honor --dry-run.
2022-07-19import: Enable recursive import for texlive packages.Ricardo Wurmus
* guix/import/texlive.scm (tlpdb->package): Add VERSION argument; include explicit version field in output. (texlive->guix-package): Set default value for VERSION argument; adjust call of tlpdb->package. (texlive-recursive-import): Accept REPO and VERSION keyword arguments. * guix/import/utils.scm (package->definition): Add a clause to deal with output from tlpdb->package. * guix/scripts/import/texlive.scm (%options): Add "recursive" option. (guix-import-texlive): Honor "recursive" option. * doc/guix.texi (Using TeX and LaTeX): Mention "recursive" option.
2022-07-19system: Add -I, --list-installed option.Antero Mejr
* guix/scripts/system.scm (display-system-generation): Add #:list-installed-regex and honor it. (list-generations): Likewise. (show-help, %options): Add "--list-installed". (process-command): For 'describe' and 'list-generation', honor the 'list-installed option. * doc/guix.texi (Invoking Guix System): Add information for --list-installed flag. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2022-07-19home: Add -I, --list-installed option.Antero Mejr
* guix/scripts/package.scm (list-installed): New procedure. * guix/scripts/home.scm (%options, show-help): Add '--list-installed'. (process-command): For 'describe' and 'list-generations', honor the 'list-installed option. (display-home-environment-generation): Add #:list-installed-regex and honor it. (list-generations): Likewise. * guix/scripts/utils.scm (pretty-print-table): New argument "left-pad". * doc/guix.texi (Invoking Guix Home): Add information and example for --list-installed flag. Co-authored-by: Ludovic Courtès <ludo@gnu.org>
2022-07-19upstream: Sort '%updaters' alphabetically.Ludovic Courtès
Previously the output of 'guix refresh --list-updaters' would be non-deterministic, and likewise the order in which updaters are tried would be non-deterministic. Reported by zimoun <zimon.toutoune@gmail.com>. * guix/upstream.scm (%updaters): Add call to 'sort'.
2022-07-15import: pypi: Fix coding style.Hartmut Goebel
I missed this remark from the review when pushing the last change. * guix/import/pypi.scm(python->package-name): Replace the trailing '#t'-case by a 'else'.
2022-07-15import: pypi: Add special treatment for Tryton package names,Hartmut Goebel
Trytond modules are Python packages, and treated like this in guix. Anyhow, since they are add-ons for the “Trytond“ application, their guix package name do not get the "python-" prefix like other Python modules, (see also https://issues.guix.gnu.org/46057#1). This change disables adding the "python-" prefix to the guix package name for Trytond modules when importing and updating, thus inhibiting irritating messages like in this example: $ guix refresh -u trytond-party … trytond-party: consider adding this propagated input: python-trytond-country trytond-party: consider removing this propagated input: trytond-country Handling this special case seems appropriate since (as of now) there are about 165 packages for Trytond and the number is growing. * guix/import/pypi.scm(python->package-name): Don't add "python-" prefix for trytond packages.
2022-07-15import: egg: Fix updater.Hartmut Goebel
'egg-source-url' did not return the URL, but the quoted expression. This did break the updater, which expects the URL as a string. * guix/import/egg.scm(egg-source-url): Remove. (egg->guix-package)[egg-content]: Use quoted expression directly. (latest-release): Call egg-uri instead of egg-source-url.
2022-07-15monad-repl: Add "build", "lower", and "verbosity" commands.Ludovic Courtès
Fixes <https://issues.guix.gnu.org/56114>. Reported by Maxime Devos <maximedevos@telenet.be>. * guix/monad-repl.scm (%build-verbosity): New variable. (evaluate/print-with-store): New procedure. (run-in-store): Rewrite in terms of 'evaluate/print-with-store'. (verbosity, lower, build): New meta-commands. * doc/guix.texi (Using Guix Interactively): New node. (The Store Monad): Link to it. (Invoking guix repl): Likewise. * doc/contributing.texi (Running Guix Before It Is Installed): Refer to it. (The Perfect Setup): Suggest 'guix install' rather than 'guix package -i'.