summaryrefslogtreecommitdiff
path: root/guix
AgeCommit message (Collapse)Author
2023-06-09records: Remove "guix" from error message.Ludovic Courtès
* guix/records.scm (map-fields): Tweak error message.
2023-06-09tests: Ensure 'elpa' test does not access the network.Ludovic Courtès
Previously it would try to access the real elpa.gnu.org. This would succeed when network is available because "taxy-magit-section" is an existing package. * guix/import/elpa.scm (elpa-repository) (package-from-elpa-repository?): Recognize 'gnu/http. * tests/elpa.scm ("package-latest-release"): Use 'http' instead of 'https'. Change "taxy-magit-section" to "fake-taxy-magit-section".
2023-06-09import: stackage: Updater resolves inputs lazily.Ludovic Courtès
Fixes the "haskell-stackage" test in 'tests/lint.scm', which started failing with e6223017d95bc615b2648f0798d9a3904d5b5f57 because the extra HTTP GETs induced by the 'haskell-fetch' calls would fail. * guix/import/stackage.scm (latest-lts-release): Call 'hackage-fetch' and its continuation from within 'inputs', which is delayed. Pass it NAME-VERSION instead of HACKAGE-NAME-VERSION.
2023-06-08substitute: Gracefully retry after failed partial downloads.Ludovic Courtès
Fixes <https://issues.guix.gnu.org/63443>. Reported by Attila Lendvai <attila@lendvai.name>. * guix/scripts/substitute.scm (catch-system-error): New macro. (download-nar): Add call to 'delete-file-recursively'. * tests/substitute.scm ("substitute, previous partial download around"): New test.
2023-06-08substitute: Delete cached narinfos more than two-month old.Ludovic Courtès
This allows 'guix substitute' to shrink the cache a bit more, which saves space and improves performance of cache-cleanup phases since fewer entries need to be traversed. * guix/scripts/substitute.scm (cached-narinfo-expiration-time): Define 'max-ttl' and use it as an upper bound.
2023-06-08import: Gracefully handle EPIPE.Ludovic Courtès
Previously, "guix import pypi f3 | head -3" would print a backtrace. * guix/scripts/import.scm (guix-import): Wrap 'pretty-print-with-comments' call in 'leave-on-EPIPE'.
2023-06-06records: Use SRFI-11 instead of SRFI-71, for Guile 2.0 compatibility.Ludovic Courtès
This fixes a failure of 'tests/packages.scm' introduced in b88e38d4b51b9aa0e857baeb614c000e491ad309: some of the tests import (guix records) on the build side, which uses '%bootstrap-guile' (Guile 2.0) where SRFI-71 is unavailable. * guix/records.scm (match-record-inner): Use SRFI-11 instead of SRFI-71.
2023-06-05import/cran: Ensure current package is not among inputs.Ricardo Wurmus
* guix/import/cran.scm (cran-package-inputs): Remove the current package from the result.
2023-06-04channels: Raise an error if dependency's introduction is malformedJosselin Poiret
* guix/channels.scm (sexp->channel-introduction): Do it.
2023-06-04build-system: New agda-build-system.Josselin Poiret
* guix/build-system/agda.scm: New file. * guix/build/agda-build-system.scm: New file. * Makefile.am (MODULES): Register them. * doc/guix.texi (Build Systems): Add documentation for agda-build-system.
2023-06-04build-system/haskell: Export default-haskell.Josselin Poiret
* guix/build-system/haskell.scm: Export default-haskell.
2023-06-04records: match-record: Do not show internal form.Josselin Poiret
* guix/records.scm (lookup-field+wrapper): Attach source properties to the field syntax object instead.
2023-06-04records: Add MATCH-RECORD-LAMBDA.(unmatched-parenthesis ew syntax
* guix/records.scm (match-record-lambda): New syntax. * tests/records.scm ("match-record-lambda"): New test. Signed-off-by: Josselin Poiret <dev@jpoiret.xyz>
2023-06-04records: match-record: Support thunked and delayed fields.(unmatched-parenthesis d
* guix/records.scm (match-record): Unwrap matched thunked and delayed fields. * tests/records.scm ("match-record, thunked field", "match-record, delayed field"): New tests. Signed-off-by: Josselin Poiret <dev@jpoiret.xyz>
2023-06-04records: match-record: Raise a syntax error if TYPE is nonexistent.(unmatched-parenthesis
* guix/records.scm (match-record): Raise a human-compherensible syntax error if the given record type identifier is unbound. Co-authored-by: Josselin Poiret <dev@jpoiret.xyz> Signed-off-by: Josselin Poiret <dev@jpoiret.xyz>
2023-06-02environment: Fix unbound-variable bug with '--symlink'.Ludovic Courtès
Fixes <https://issues.guix.gnu.org/63845>. Reported by Maxim Cournoyer <maxim.cournoyer@gmail.com>. * guix/scripts/environment.scm (launch-environment/container): Reference 'evaluate-populate-directive' before calling 'call-with-container'.
2023-06-02read-print: Add 'package/inherit' special form.Ludovic Courtès
* guix/read-print.scm (%special-forms): Add 'package/inherit'.
2023-06-02ci: Reify the timestamps of evaluations.Ludovic Courtès
* guix/ci.scm (<evaluation>)[start-time, checkout-time, completion-time]: New fields.
2023-06-02import/cran: string->license: Add another case for GPLv3+.Ricardo Wurmus
* guix/import/cran.scm (string->license): Translate "GPL (>=3)" to gpl3+.
2023-06-02import/cran: Libraries should not use CRAN-GUIX-NAME.Ricardo Wurmus
* guix/import/cran.scm (source-dir->dependencies): Do not use CRAN-GUIX-NAME when processing result of NEEDED-LIBRARIES-IN-DIRECTORY.
2023-06-02import/cran: Also search Makevars file for libraries.Ricardo Wurmus
* guix/import/cran.scm (needed-libraries-in-directory): Look at Makevars in addition to Makevars.in for libraries.
2023-05-31upstream: Honor package properties for ignored and extra inputs.Ludovic Courtès
* guix/upstream.scm (update-package-inputs)[filtered-inputs] [regular-inputs, native-inputs, propagated-inputs]: New procedures. Use them in 'update-field' calls. * tests/guix-refresh.sh (GUIX_TEST_UPDATER_TARGETS): Add "libreoffice" to the dependencies of "the-test-package". Add 'updater-ignored-inputs' property to "the-test-package". * doc/guix.texi (Invoking guix refresh): Document it.
2023-05-31import: gem: Updater provides input list.Ludovic Courtès
* guix/import/gem.scm (import-release): Add 'inputs' field. * tests/gem.scm ("package-latest-release"): New test.
2023-05-31import: gem: Factorize "bundler" special case for name mapping.Ludovic Courtès
* guix/import/gem.scm (ruby-package-name): Add "bundler" special case. (gem->guix-package): Adjust accordingly. * tests/gem.scm ("gem-recursive-import") ("gem-recursive-import with a specific version"): Remove "ruby-bundler" from the expected packages.
2023-05-31import: elpa: Updater provides input list.Ludovic Courtès
* guix/import/elpa.scm (elpa-dependency->upstream-input): New procedure. (latest-release): Add 'inputs' field. * tests/elpa.scm ("package-latest-release"): New test.
2023-05-31import: cpan: Updater provides input list.Ludovic Courtès
* guix/import/cpan.scm (latest-release): Add 'inputs' field. * tests/cpan.scm ("package-latest-release"): New test.
2023-05-31import: cpan: Represent dependencies as <upstream-input> records.Ludovic Courtès
* guix/import/cpan.scm (cpan-name->downstream-name) (cran-dependency->upstream-input, cran-module-inputs): New procedures. (cpan-module->sexp)[guix-name, convert-inputs]: Remove. [maybe-inputs]: Adjust to deal with <upstream-input>. Use 'cpan-name->downstream-name' instead of 'guix-name'. Add call to 'cpan-module-inputs' and adjust calls to 'maybe-inputs'. No longer emit input labels. * tests/cpan.scm ("cpan->guix-package"): Adjust test accordingly.
2023-05-31import: cpan: Remove unary 'string-append' call.Ludovic Courtès
* guix/import/cpan.scm (package->upstream-name): Remove useless 'string-append'.
2023-05-31upstream: Remove <upstream-input-change> and related code.Ludovic Courtès
* guix/upstream.scm (<upstream-input-change>): Remove. (changed-inputs): Remove. * tests/upstream.scm (test-package, test-new-package) ("changed-inputs returns no changes") ("changed-inputs returns changes to plain input list") ("changed-inputs returns changes to all plain input lists"): Remove.
2023-05-31upstream: 'update-package-source' edits input fields.Ludovic Courtès
Previously, 'guix refresh r-ggplot2 -u' and similar commands would print of list of input changes that would have to be made manually. With this change, 'guix refresh -u' takes care of updating input fields automatically. * guix/upstream.scm (update-package-inputs): New procedure. (update-package-source): Call it when 'upstream-source-inputs' returns true. * guix/scripts/refresh.scm (update-package): Remove iteration over the result of 'changed-inputs'. * guix/import/test.scm (available-updates): Add support for input lists. * tests/guix-refresh.sh (GUIX_TEST_UPDATER_TARGETS): Add input list for "the-test-package". Make sure 'guix refresh -u' updates 'inputs' accordingly. * doc/guix.texi (Invoking guix refresh): Mention it.
2023-05-31diagnostics: Factorize 'absolute-location'.Ludovic Courtès
* guix/scripts/style.scm (absolute-location): Move to... * guix/diagnostics.scm (absolute-location): ... here. * guix/upstream.scm (update-package-source): Use it.
2023-05-31upstream: Replace 'input-changes' field by 'inputs'.Ludovic Courtès
Returning the expected list of inputs rather than changes relative to the current package definition is less ambiguous and offers more possibilities for further processing. * guix/upstream.scm (<upstream-source>)[input-changes]: Remove. [inputs]: New field. (<upstream-input>): New record type. * guix/upstream.scm (upstream-input-type-predicate) (input-type-filter, upstream-source-regular-inputs) (upstream-source-native-inputs, upstream-source-propagated-inputs): New procedures. (changed-inputs): Expect an <upstream-source> as its second argument. Adjust accordingly. * guix/import/pypi.scm (distribution-sha256): New procedure. (maybe-inputs): Expect a list of <upstream-input>. (compute-inputs): Rewrite to return a list of <upstream-input>. (pypi-package-inputs, pypi-package->upstream-source): New procedures. (make-pypi-sexp): Use it. * guix/import/stackage.scm (latest-lts-release): Define 'cabal'. Replace 'input-changes' field by 'inputs'. * guix/scripts/refresh.scm (update-package): Use 'changed-inputs' instead of 'upstream-source-input-changes'. * tests/cran.scm ("description->package"): Adjust order of inputs. * tests/pypi.scm (default-sha256, default-sha256/base32): New variables. (foo-json): Add 'digests' entry. ("pypi->guix-package, no wheel"): Check HASH against DEFAULT-SHA256/BASE32. ("pypi->guix-package, wheels"): Likewise. ("pypi->guix-package, no usable requirement file."): Likewise. ("pypi->guix-package, package name contains \"-\" followed by digits"): Likewise. ("package-latest-release"): New test. * tests/upstream.scm (test-package-sexp): Remove. ("changed-inputs returns no changes"): Rewrite to use <upstream-source>. (test-new-package-sexp): Remove. ("changed-inputs returns changes to plain input list"): Rewrite. ("changed-inputs returns changes to all plain input lists"): Likewise. ("changed-inputs returns changes to labelled input list") ("changed-inputs returns changes to all labelled input lists"): Remove. * guix/import/cran.scm (maybe-inputs): Expect PACKAGE-INPUTS to be a list of <upstream-input>. (source-dir->dependencies): Return a list of <upstream-input>. (vignette-builders): Likewise. (uri-helper, cran-package-source-url) (cran-package-propagated-inputs, cran-package-inputs): New procedures. (description->package): Use them instead of local definitions. (latest-cran-release): Replace 'input-changes' field by 'inputs'. (latest-bioconductor-release): Likewise. (format-inputs): Remove. * guix/import/hackage.scm (cabal-package-inputs): New procedure. (hackage-module->sexp): Use it. [maybe-inputs]: Expect a list of <upstream-input>.
2023-05-31import: json: Add #:timeout to 'json-fetch'.Ludovic Courtès
* guix/import/json.scm (json-fetch): Add #:timeout and pass it to 'http-fetch'.
2023-05-31import: utils: 'call-with-networking-exception-handler' doesn't unwind.Ludovic Courtès
That way backtraces show where the error actually originates from. * guix/import/utils.scm (call-with-networking-exception-handler): Rewrite using 'with-exception-handler'.
2023-05-31tests: pypi: Rewrite tests using a local HTTP server.Ludovic Courtès
* guix/import/pypi.scm (%pypi-base-url): New variable. (pypi-fetch): Use it. * tests/pypi.scm (foo-json): Compute URLs relative to '%local-url'. (test-json-1, test-json-2, test-source-hash): Remove. (file-dump): New procedure. (with-pypi): New macro. ("pypi->guix-package, no wheel") ("pypi->guix-package, wheels") ("pypi->guix-package, no usable requirement file.") ("pypi->guix-package, package name contains \"-\" followed by digits"): Rewrite using 'with-pypi'.
2023-05-31tests: http: Allow responses to specify a path.Ludovic Courtès
* guix/tests/http.scm (%local-url): Add #:path parameter and honor it. (call-with-http-server)[responses]: Add extra clause with 'path'. [bad-request]: New variable. [server-body]: Handle three-element clauses. Wrap 'run-server' call in 'parameterize'.
2023-05-31transformations: Add "--tune" to "--help-transform".Ludovic Courtès
* guix/transformations.scm (show-transformation-options-help/detailed): Add '--tune'.
2023-05-31guix gc: Round MiBs in user feedback.Remco van 't Veer
* guix/scripts/gc.scm (guix-gc): Round MiBs in user feedback. Signed-off-by: Florian Pelz <pelzflorian@pelzflorian.de>
2023-05-30substitute: If a server's nar URL is 404, try the next one(s).Ludovic Courtès
If a substitute server advertises in its narinfo, for example, both a /zstd and a /lzip URL but the /zstd URL is unreachable, try the /lzip URL. Fixes <https://issues.guix.gnu.org/63634>. * guix/narinfo.scm (narinfo-preferred-uris): New procedure. (narinfo-best-uri): Rebase on top of it. * guix/scripts/substitute.scm (download-nar)[try-fetch]: New procedure. Use 'narinfo-preferred-uris' and 'try-fetch' to attempt all the URLs of NARINFO. * tests/substitute.scm (request-substitution): Remove 'parameterize'. Delete DESTINATION. ("substitute, preferred nar URL is 404, other is 200"): New test.
2023-05-25self: Install 'guix-daemon.cil'.Ludovic Courtès
* guix/self.scm (selinux-policy): New procedure. (miscellaneous-files): Add 'daemon' parameter. Add 'guix-daemon.cil'. (compiled-guix): Adjust call to 'miscellaneous-files'.
2023-05-24self: Build against "graphviz-minimal".Ludovic Courtès
Fixes <https://issues.guix.gnu.org/63050>. Reported by Andreas Enge <andreas@enge.fr>. * guix/self.scm (%packages): Change "graphviz" to refer to "graphviz-minimal". Add "font-ghostscript". (info-manual): Define 'font-ghostscript'. [build]: Set XDG_DATA_DIRS.
2023-05-22substitute: Rethrow with 'raise-exception', not 'throw'.Ludovic Courtès
Rethrowing with 'throw' doesn't work as intended when the exception being rethrown is a SRFI-34 exception. Fixes <https://issues.guix.gnu.org/55820>. * guix/scripts/substitute.scm (kind-and-args-exception?): New variable. (call-with-cached-connection): Rewrite using 'guard' instead of 'catch' and 'raise' instead of 'throw'. (system-error?): Use 'kind-and-args-exception?' instead of local definition.
2023-05-18style: Add 'arguments' styling rule.Ludovic Courtès
* guix/scripts/style.scm (unquote->ungexp, gexpify-argument-value) (quote-argument-value, gexpify-argument-tail) (gexpify-package-arguments): New procedures. (%gexp-keywords): New variable. (%options): Add "arguments" case for 'styling-procedure. (show-stylings): Update. * tests/style.scm ("gexpify arguments, already gexpified") ("gexpify arguments, non-gexp arguments, margin comment") ("gexpify arguments, phases and flags") ("gexpify arguments, append arguments") ("gexpify arguments, substitute-keyword-arguments") ("gexpify arguments, append substitute-keyword-arguments"): New tests. * doc/guix.texi (package Reference): For 'arguments', add compatibility note and link to 'guix style'. (Invoking guix style): Document the 'arguments' styling rule.
2023-05-18refresh: Honor '--key-server'.Ludovic Courtès
Previously, the '--key-server' option would be ignored in an invocation like: ./pre-inst-env guix refresh python-scipy=1.8.1 -t pypi -u \ --key-server=pgp.mit.edu * guix/upstream.scm (download-tarball): Add #:key-server parameter and pass it to 'gnupg-verify*'. (package-update/url-fetch, package-update/git-fetch) (package-update): Likewise. * guix/scripts/refresh.scm (update-package): Add #:key-server and pass it down to 'package-update'. (guix-refresh): Pass #:key-server to 'update-package'.
2023-05-17scripts: import: elpa: Return consistent error code.Simon Tournier
Fixes <https://bug.gnu.org/58308>. Reported by Ricardo Wurmus. * guix/scripts/import/elpa.scm (guix-import-elpa): Return consistent error code independently of the 'recursive' option. Signed-off-by: Josselin Poiret <dev@jpoiret.xyz>
2023-05-17scripts: import: elpa: Warn when version is specified.Simon Tournier
* guix/scripts/import/elpa.scm (guix-import-elpa): Warn when version is specified. Signed-off-by: Josselin Poiret <dev@jpoiret.xyz>
2023-05-11download: Refer to the 'guile-gnutls' package and not 'gnutls'.Ludovic Courtès
This reinstates c625e5b64d0a6cb7ffbf2ef971d4c990b1f5c5c1, which was reverted due to a circular dependency: https://issues.guix.gnu.org/63331 This is a followup to 305794762cbb57d252d5305b69a18cec6528baef, which removed Guile bindings from 'gnutls'. * guix/android-repo-download.scm (android-repo-fetch): Refer to 'guile-gnutls instead of 'gnutls. * guix/cvs-download.scm (cvs-fetch): Likewise. * guix/git-download.scm (git-fetch): Likewise. * guix/hg-download.scm (hg-fetch): Likewise.
2023-05-09Merge branch 'rust-team'Efraim Flashner
2023-05-09gnu: gcc: Update cpu tuning architectures.Efraim Flashner
* gnu/packages/gcc.scm (%gcc-7.5-armhf-micro-architectures): Add missing micro-architecture. (%gcc-10-armhf-micro-architectures): Adjust accordingly. (%gcc-11-aarch64-micro-architectures): Add missing micro-architecture. (%gcc-12-aarch64-micro-architectures, %gcc-12-armhf-micro-architectures, %gcc-12-x86_64-micro-architectures, %gcc-13-aarch64-micro-architectures, %gcc-13-armhf-micro-architectures, %gcc-13-x86_64-micro-architectures): New variables. (gcc-12)[properties]: Use new compiler-cpu-architectures. * guix/cpu.scm (cpu->gcc-architecture): Update entries for Intel, AMD, x86_64 fallback and aarch64.
2023-05-07gnu: rust: Update to 1.67.Efraim Flashner
* gnu/packages/rust.scm (rust): Update to 1.67. [arguments]: Add a phase to skip tests requiring mercurial. Extend the custom 'patch-process-tests phase. (rust-1.64)[arguments]: Adjust 'patch-cargo-checksums phase to patch another file. * guix/build/cargo-build-system.scm (package): Adjust to remove Cargo.toml.orig file if it exists.