summaryrefslogtreecommitdiff
path: root/guix
Commit message (Collapse)AuthorAge
* read-print: Add 'case' and 'cond' special forms.Ludovic Courtès2022-08-08
| | | | | * guix/read-print.scm (%special-forms): Add 'case' and 'cond'. * tests/read-print.scm: Add tests.
* read-print: Support printing multi-line comments.Ludovic Courtès2022-08-08
| | | | | | | | * 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.
* style: Add '--whole-file' option.Ludovic Courtès2022-08-08
| | | | | | | | | * 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.
* read-print: 'canonicalize-comment' leaves top-level comments unchanged.Ludovic Courtès2022-08-08
| | | | | | | | | | | 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.
* read-print: Add code to read and write sequences of expressions/blanks.Ludovic Courtès2022-08-08
| | | | | | | | * 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.
* read-print: Recognize page breaks.Ludovic Courtès2022-08-08
| | | | | | | | | | | | | * 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.
* read-print: Read and render vertical space.Ludovic Courtès2022-08-08
| | | | | | | | | | | | | | | | | * 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.
* read-print: Introduce <blank> parent class of <comment>.Ludovic Courtès2022-08-08
| | | | | | | | | * 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?'.
* read-print: Expose comment constructor.Ludovic Courtès2022-08-08
| | | | | | | | * guix/read-print.scm (<comment>): Rename constructor to 'string->comment'. (comment): New procedure. (read-with-comments, canonicalize-comment): Use 'string->comment' instead of 'comment'.
* read-print: Add System and Home special forms.Ludovic Courtès2022-08-08
| | | | | * guix/read-print.scm (%special-forms): Add System and Home forms. (%newline-forms): Add 'services'.
* style: Move reader and printer to (guix read-print).Ludovic Courtès2022-08-08
| | | | | | | | | | | | | | * 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'.
* lint: Add '-e'.Ludovic Courtès2022-08-08
| | | | | | | * 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.
* build-system/perl: Support cross-compilation of some Perl packages.Maxime Devos2022-08-06
| | | | | | | | | | | | | | | * 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>
* guix system: Remove unused 'read-operating-system' procedure.Ludovic Courtès2022-08-05
| | | | | * guix/scripts/system.scm (read-operating-system): Remove. * gnu/ci.scm: Remove unused (guix scripts system) import.
* utils: Add target-mips64el?.Vivien Kraus2022-08-05
| | | | | | | * guix/utils.scm (target-mips64el?): New function. It detects whether the target system is mips64el. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
* utils: Add as-for-target.Antero Mejr2022-08-05
| | | | | | * guix/utils.scm (as-for-target): New function. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
* build: qt-utils: Fix another regression.Maxim Cournoyer2022-08-04
| | | | | | | | | | | | | | | 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.
* environment: Report "command not found" from the child process.Ludovic Courtès2022-08-04
| | | | | | | | | | | | | | | | | | | | 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.
* guix build: Print hints when -s or --target is passed an invalid string.Ludovic Courtès2022-08-04
| | | | | | * guix/scripts/build.scm (%standard-cross-build-options) (%standard-native-build-options): Print hints when the target/system is not found.
* download: Do not wrap TLS port on GnuTLS >= 3.7.7.Ludovic Courtès2022-08-03
| | | | | | | | | | | | 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'.
* build-system: asdf: Add asd-operation parameter.Guillaume Le Vaillant2022-08-03
| | | | | | | | | | | | 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.
* build-system: asdf: Let ASDF locate the .asd files.Pierre Neidhardt2022-08-03
| | | | | | | | | | | | | | | | | | | | | | | | 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>
* guix: build: Switch from asdf:compile-system to asdf:load-system.Pierre Neidhardt2022-08-03
| | | | | | | | | | | | | | | 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>
* build-system: qt: Ensure a default value is provided for #:qtbase.Maxim Cournoyer2022-08-01
| | | | | | | | * 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.
* download: 'url-fetch' closes its HTTP/HTTPS port.Ludovic Courtès2022-08-01
| | | | | * guix/build/download.scm (url-fetch)[fetch]: In the http/https case, close PORT before returning.
* build: qt: Add qtbase argument and wrap Qt environment variables exactly.Maxim Cournoyer2022-07-31
| | | | | | | | | | | | | | | | | * 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*.
* gnu: qttools: Rename to qttools-5.Maxim Cournoyer2022-07-31
| | | | | | | Automated with: git grep -l qttools | xargs sed 's/\bqttools\b/\0-5/g' -i git checkout NEWS
* guix gc: '--delete-generations' now deletes old Home generations.Ludovic Courtès2022-08-01
| | | | | | | | | | | | | | | 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.
* download: Refresh KDE mirror list.Tobias Geerinckx-Rice2022-07-24
| | | | | * guix/download.scm (%mirrors)[kde]: Update list, using HTTPS wherever possible.
* Revert "guix gc: '--delete-generations' now deletes old Home generations."Tobias Geerinckx-Rice2022-07-17
| | | | This reverts commit ba22560627f848f40891a56355ff26b6de1380bc.
* gnu: clojure: Update to 1.11.1.r0man2022-07-23
| | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* guix gc: '--delete-generations' now deletes old Home generations.Ludovic Courtès2022-07-23
| | | | | | | | | | 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.
* deploy: Honor '--dry-run'.Ludovic Courtès2022-07-23
| | | | | | * guix/scripts/deploy.scm (%options): Add "dry-run". (show-what-to-deploy): Add #:dry-run? and honor it. (guix-deploy): Honor --dry-run.
* import: Enable recursive import for texlive packages.Ricardo Wurmus2022-07-19
| | | | | | | | | | | | | * 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.
* system: Add -I, --list-installed option.Antero Mejr2022-07-19
| | | | | | | | | | | | | * 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>
* home: Add -I, --list-installed option.Antero Mejr2022-07-19
| | | | | | | | | | | | | | | * 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>
* upstream: Sort '%updaters' alphabetically.Ludovic Courtès2022-07-19
| | | | | | | | | | 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'.
* import: pypi: Fix coding style.Hartmut Goebel2022-07-15
| | | | | | | 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'.
* import: pypi: Add special treatment for Tryton package names,Hartmut Goebel2022-07-15
| | | | | | | | | | | | | | | | | | | | 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.
* import: egg: Fix updater.Hartmut Goebel2022-07-15
| | | | | | | | | '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.
* monad-repl: Add "build", "lower", and "verbosity" commands.Ludovic Courtès2022-07-15
| | | | | | | | | | | | | | | | 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'.
* shell: Ignore cached profiles when using '--export-manifest'.Ludovic Courtès2022-07-15
| | | | | | | | | | Fixes <https://issues.guix.gnu.org/56539>. Fixes a bug where "guix shell -D pkg --export-manifest" would provide the expansion of PKG's dependencies instead of a call to 'package-development-manifest' if that profile happened to be cached. * guix/scripts/shell.scm (profile-cached-gc-root): Add clause for 'export-manifest?.
* style: Gracefully handle failure to locate a source file.Ludovic Courtès2022-07-12
| | | | | * guix/scripts/style.scm (absolute-location): Raise an error when 'search-path' returns #f.
* import: github: Use correct URL scheme.Hartmut Goebel2022-07-11
| | | | | | | | | | This effects packages hosted at github with source-uri like …/releases/download/REPO-VERSION/REPO-VERSION.EXT. E.g. ‘guix refresh udisks’ would fail to find the new release of ‘udisks’ before this change. * guix/import/github.scm(updated-url): For one one of the cases add missing 'prefix' and set new version.
* monads: Add 'mparameterize'.Ludovic Courtès2022-07-10
| | | | | | | * etc/system-tests.scm (mparameterize): Move to... * guix/monads.scm (mparameterize): ... here. * tests/monads.scm ("mparameterize"): New test. * .dir-locals.el (c-mode): Add it.
* channels: Emit version 3 profiles.Ludovic Courtès2022-07-08
| | | | | | | | | | | | | | | | | Fixes <https://issues.guix.gnu.org/56441>. Reported by zimoun <zimon.toutoune@gmail.com>. Fixes a bug introduced in 4ff12d1de7cd617b791996ee7ca1240660b4c20e with version 4 of the manifest format. A new 'guix time-machine' would create a v4 manifest; when targeting an old revision (v3), 'generate-package-cache' would fail to read that manifest and abort. Furthermore, an old Guix living in a new profile with a v4 manifest would be unable to describe itself via (guix describe). * guix/channels.scm (package-cache-file): Add 'format-version' field to PROFILE. (channel-instances->derivation): Pass #:format-version to 'profile-derivation'.
* profiles: Support the creation of profiles with version 3 manifests.Ludovic Courtès2022-07-08
| | | | | | | | | | | | * guix/profiles.scm (%manifest-format-version): New variable. (manifest->gexp): Add optional 'format-version' parameter. [optional, entry->gexp]: Honor it. (profile-derivation): Add #:format-version parameter and honor it. (<profile>)[format-version]: New field. (profile-compiler): Honor it. * guix/build/profiles.scm (manifest-sexp->inputs+search-paths): Support both versions 3 and 4. Remove unused 'properties' variable. * tests/profiles.scm ("profile-derivation format version 3"): New test.
* profiles: Remove support for reading versions 0 and 1.Ludovic Courtès2022-07-08
| | | | | | | | | | Version 2 was introduced in commit dedb17ad010ee9ef67f3f4f3997dd17f226c8090 (May 2015), which made it into Guix 0.9.0. * guix/profiles.scm (find-package): Remove. (sexp->manifest)[infer-search-paths]: Remove. Remove clauses for versions 0 and 1.
* guix: inferior: Fix the behaviour of open-inferior #:error-port.Christopher Baines2022-07-08
| | | | | | | | | | | I'm looking at this as the Guix Data Service uses this behaviour to record and display logs from inferior processes. * guix/inferior.scm (open-bidirectional-pipe): Call dup2 for file descriptor 2, passing either the file number for the current error port, or a file descriptor for /dev/null. * tests/inferior.scm ("#:error-port stderr", "#:error-port pipe"): Add two new tests that cover some of the #:error-port behaviour.
* style: For 'let' and similar forms, emit one binding per line.Ludovic Courtès2022-07-04
| | | | | | | | | | | | | | | | | | Previously, 'let' bindings could be rendered like this: (let ((x 1) (y 2) (z 3)) ...) With this change, each bindings goes in its own line. Partly fixes <https://issues.guix.gnu.org/56297>. Reported by Maxime Devos <maximedevos@telenet.be>. * guix/scripts/style.scm (pretty-print-with-comments)[list-of-lists?]: New procedure. Use it. * tests/style.scm: Add tests with 'let' and 'substitute-keyword-arguments'.