summaryrefslogtreecommitdiff
path: root/tests
Commit message (Collapse)AuthorAge
* records: Support field sanitizers.Ludovic Courtès2021-08-12
| | | | | | | | | | * guix/records.scm (make-syntactic-constructor): Add #:sanitizers. [field-sanitizer]: New procedure. [wrap-field-value]: Honor F's sanitizer. (define-record-type*)[field-sanitizer]: New procedure. Pass #:sanitizer to 'make-syntactic-constructor'. * tests/records.scm ("define-record-type* & sanitize") ("define-record-type* & sanitize & thunked"): New tests.
* transformations: 'with-patch' works on non-origin sources.Ludovic Courtès2021-08-11
| | | | | | | | | | | Fixes <https://issues.guix.gnu.org/49697>. Reported by Philippe Swartvagher <philippe.swartvagher@inria.fr>. * guix/transformations.scm (patched-source): New procedure. (transform-package-patches)[package-with-extra-patches]: Use it when (package-source p) is not an origin. * tests/transformations.scm ("options->transformation, with-commit + with-patch"): New test.
* Reinstate "services: Add a service for Jami."Maxim Cournoyer2021-08-02
| | | | | | | | | | | | | This reverts commit 4673f817938d9d2b1b40a072ab2e0c44a32ccc97, which reverted commit 69dcc24c9f0cdfea674eb690e7755d26a25ced2b with the fix detailed below. Thanks to Christopher Baines for reporting the failure and proposing a fix. * guix/self.scm (compiled-guix) [*system-test-modules*]: Add the test data files via the 'extra-files' argument. * gnu/local.mk (dist_patch_DATA): Move the tests/data/jami-dummy-account.dat file to... * gnu/local.mk (MODULES_NOT_COMPILED): ... here.
* Revert "services: Add a service for Jami."Maxim Cournoyer2021-08-02
| | | | | This reverts commit 69dcc24c9f0cdfea674eb690e7755d26a25ced2b. It broke 'guix pull'.
* services: Add a service for Jami.Maxim Cournoyer2021-08-02
| | | | | | | | | | | | | | | | | | | | | | * gnu/services/telephony.scm (string-or-computed-file?) (string-list?, account-fingerprint-list?): New procedures. (maybe-string-list, maybe-account-fingerprint-list) (maybe-boolean, maybe-string, jami-account-list): New configuration field types. (serialize-string-list, serialize-boolean, serialize-string) (jami-account, jami-account->alist, jami-configuration) (jami-account-list?, jami-account-list-maybe): New procedures. (%jami-accounts): New variable. (jami-configuration->command-line-arguments): New procedure. (jami-dbus-session-activation, jami-shepherd-services): New procedures. (jami-service-type): New variable. * gnu/build/jami-service.scm: New file. * gnu/tests/data/jami-dummy-account.dat: Likewise. * gnu/tests/telephony.scm: Likewise. * gnu/local.mk (GNU_SYSTEM_MODULES): Register them. * Makefile.am (SCM_TESTS): Register the test file. (dist_patch_DATA): Register the new data file. * doc/guix.texi (Telephony Services): Document it.
* pack: Streamline how files are included in tarballs.Maxim Cournoyer2021-07-18
| | | | | | | | | | | | | | | | | | | | | | Thanks to Guillem Jover <guillem@debian.org> on the OFTC's #debian-dpkg channel for helping with troubleshooting. Letting GNU Tar recursively walk the complete files hierarchy side-steps the risks associated with providing a list of file names: 1. Duplicated files in the archive (recorded as hard links by GNU Tar) 2. Missing parent directories. The above would cause dpkg to malfunction, for example by aborting early and skipping triggers when there were missing parent directories. * guix/scripts/pack.scm (self-contained-tarball/builder): Do not call POPULATE-SINGLE-PROFILE-DIRECTORY, which creates extraneous files such as /root. Instead, call POPULATE-STORE and INSTALL-DATABASE-AND-GC-ROOTS individually to more precisely generate the file system. Replace the list of files by the current directory, "." and streamline the way options are passed. * gnu/system/file-systems.scm (reduce-directories): Remove procedure. * tests/file-systems.scm ("reduce-directories"): Remove test.
* pack: Allow embedding custom control files in deb packs.Maxim Cournoyer2021-07-18
| | | | | | | | | | | | | | | | | * guix/scripts/pack.scm (self-contained-tarball/builder) [extra-options]: New argument. (self-contained-tarball, squashfs-image, docker-image) (debian-archive): Likewise. Remove two TODO comments. Document EXTRA-OPTIONS. Use the custom control files when provided. (%deb-format-options): New variable. (show-deb-format-options, show-deb-format-options/detailed): New procedures. (%options): Register new options. (show-help): Augment with new usage. (guix-pack): Validate and propagate new argument values. * doc/guix.texi (Invoking guix pack)[deb]: Document how to list advanced options. Add an example. * tests/pack.scm (deb archive...): Provide extra-options to the debian-archive procedure, and validate that the provided files are embedded in the pack.
* import: go: Upgrade go.mod parser.Sarah Morgensen2021-07-18
| | | | | | | | | | | | | | | | | | | | | | | | | Upgrade the go.mod parser to handle the full go.mod spec, and to gracefully handle unexpected/malformed syntax. Restructure parser usage, making the parse tree available for other uses. guix/import/go.scm (parse-go.mod): Parse using (ice-9 peg) instead of regex matching for more robustness. Return a list of directives. (go.mod-directives): New procedure. (go.mod-requirements): Likewise. (go-module->guix-package): Use it. (%go.mod-replace-directive-rx): Remove unused variable. tests/go.scm (testing-parse-mod): Adjust accordingly. (go.mod-requirements) (fixture-go-mod-unparseable) (fixture-go-mod-retract) (fixture-go-mod-strings): New variables. ("parse-go.mod: simple") ("parse-go.mod: comments and unparseable lines") ("parse-go.mod: retract") ("parse-go.mod: raw strings and quoted strings") ("parse-go.mod: complete"): New tests. Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
* tests/go: Remove unused variable.Maxim Cournoyer2021-07-17
| | | | | * tests/go.scm: Delete extraneous newline. (fixture-latest-for-go-check): Remove variable.
* lint: Check for leading whitespace in description.Brice Waegeneire2021-07-13
| | | | | * guix/lint.scm (check-description-style): Check for leading whitespace. * tests/lint.scm: ("description: leading whitespace"): New test.
* lint: Lint usages of 'wrap-program' without a "bash" input.Maxime Devos2021-07-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | When using 'wrap-program', "bash" (or "bash-minimal") should be in inputs. Otherwise, when cross-compiling, 'wrap-program' will use a native bash instead of the cross bash and the 'patch-shebangs' won't be able to correct this. Tobias Geerinckx-Rice is added to the copyright lines because a part of the "straw-viewer" package definition is included. This linter detects 365 problematic package definitions at time of writing. * guix/lint.scm (report-wrap-program-error): New procedure. (check-wrapper-inputs): New linter. (%local-checkers)[wrapper-inputs]: Add the new linter. ("explicit #:sh argument to 'wrap-program' is acceptable") ("'check-wrapper-inputs' detects 'wrap-program' without \"bash\" in inputs") ("'check-wrapper-inputs' detects 'wrap-qt-program' without \"bash\" in inputs") ("\"bash\" in 'inputs' satisfies 'check-wrapper-inputs'") ("\"bash-minimal\" in 'inputs' satisfies 'check-wrapper-inputs'") ("'cut' doesn't hide bad usages of 'wrap-program'") ("bogus phase specifications don't crash the linter"): New tests. Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>
* lint: Verify if #:tests? is respected in the 'check' phase.Maxime Devos2021-06-30
| | | | | | | | | | | | | | | | | | | | | | | There have been a few patches to the mailing list lately not respecting this, and this linter detects 630 package definitions that could be modified to support the --without-tests package transformation. * guix/lint.scm (check-optional-tests): New linter. (%local-checkers)[optional-tests]: Add it. * tests/lint.scm (package-with-phase-changes): New procedure. ("optional-tests: no check phase") ("optional-tests: check hase respects #:tests?") ("optional-tests: check phase ignores #:tests?") ("optional-tests: do not crash when #:phases is invalid") ("optional-tests: allow G-exps (no warning)") ("optional-tests: allow G-exps (warning)") ("optional-tests: complicated 'check' phase") ("optional-tests: 'check' phase is not first phase"): New tests. Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>
* guix: gexp: Define gexp->approximate-sexp.Maxime Devos2021-06-30
| | | | | | | | | | | | | It will be used in the 'optional-tests' linter. * guix/gexp.scm (gexp->approximate-sexp): New procedure. * tests/gexp.scm ("no references", "unquoted gexp", "unquoted gexp (native)") ("spliced gexp", "unspliced gexp, approximated") ("unquoted gexp, approximated"): Test it. * doc/gexp.scm ("G-Expressions"): Document it. Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>
* pack: Add support for the deb format.Maxim Cournoyer2021-06-29
| | | | | | | | | | | * .dir-locals.el (scheme-mode)[gexp->derivation]: Define indentation rule. * guix/scripts/pack.scm (debian-archive): New procedure. (%formats): Register the new deb format. (show-formats): Add it to the usage string. * tests/pack.scm (%ar-bootstrap): New variable. (deb archive with symlinks): New test. * doc/guix.texi (Invoking guix pack): Document it. * NEWS: Add news entry.
* tests: pack: Fix compressor extension.Maxim Cournoyer2021-06-29
| | | | | * tests/pack.scm (%gzip-compressor): Add the missing leading period to the gzip compressor file extension.
* pack: Prevent duplicate files in tar archives.Maxim Cournoyer2021-06-29
| | | | | | | | | | | | | | Tar translate duplicate files in the archive into hard links. These can cause problems, as not every tool support them; for example dpkg doesn't. * gnu/system/file-systems.scm (reduce-directories): New procedure. (file-prefix?): Lift the restriction on file prefix. The procedure can be useful for comparing relative file names. Adjust doc. (file-name-depth): New procedure, extracted from ... (btrfs-store-subvolume-file-name): ... here. * guix/scripts/pack.scm (self-contained-tarball/builder): Use reduce-directories. * tests/file-systems.scm ("reduce-directories"): New test.
* services: configuration: Allow specifying prefix for serializer names.Xinglu Chen2021-06-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sometimes two configurations might have the same types for their field values, but the values might be serialized in two completely different ways (e.g. because the two programs have different configuration languages). An example of this would be the ‘serialize-boolean’ procedure in (gnu services mail) and (gnu services getmail). They both serialize a boolean value, but because the Dovecot’s configuration language has a different syntax to the configuration language for Getmail, two different procedures have to be defined. One way to workaround this would be to specify custom serializers for many fields in order to separate the serialization of the values that have the same type but serialize in different ways. This could get very tedious, especially if there are many configurations in the same module. Another way would be to move one of the configurations to its own module, like what was done with (gnu services getmail). However, this would mean that there would be multiple modules containing configurations for related programs, e.g. we have (gnu services mail) and (gnu services getmail), it doesn’t make much sense to keep the Getmail configuration in its own module. This patch will allow one to write something like this: (define-configuration foo-configuration (bar (string "bob") "Option bar.") (prefix bar-)) and the value of the ‘bar’ field would be serialized using a procedure named ‘bar-serialize-string’ instead of just ‘serialize-string’. * gnu/services/configuration.scm (define-maybe-helper): Accept ‘prefix’ argument for using serializer with custom prefix. (define-maybe): Pattern match on ‘prefix’ literal. (define-configuration-helper): Accept ‘prefix’ argument for using serializer with custom prefix. (define-configuration): Pattern match on ‘prefix’ literal. * tests/services/configuration.scm ("serialize-configuration with prefix"): New test. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
* import: hackage: Support "common" field and importsPhilip Munksgaard2021-06-25
| | | | | | | | | | | | | Fixes <https://issues.guix.gnu.org/48701>. * guix/import/cabal.scm (make-cabal-parser): Modify. (is-common): New variable. (lex-common): New procedure. (is-id): Modify. (eval-cabal): Modify. * tests/hackage.scm ("hackage->guix-package test cabal import") New test. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
* profiles: Build union of inputs in the right order.Ludovic Courtès2021-06-22
| | | | | | | | | | | | | | | | Fixes <https://bugs.gnu.org/49102>. Reported by Mathieu Othacehe <othacehe@gnu.org> and Tobias Geerinckx-Rice <me@tobias.gr>. Fixes a regression introduced in 8cef92d0633850d97c1a1d4521812268f56672be, whereby in case of file collisions, the "wrong" one would take precedence. * guix/build/profiles.scm (manifest-sexp->inputs+search-paths): Perform a breadth-first traversal. Reverse INPUTS and SEARCH-PATHS in the base case. * tests/profiles.scm ("profile-derivation, ordering & collisions"): New test.
* profiles: Add 'load-profile'.Ludovic Courtès2021-06-18
| | | | | | | | | * guix/profiles.scm (%precious-variables): New variable. (purify-environment, load-profile): New procedures. * guix/scripts/environment.scm (%precious-variables) (purify-environment, create-environment): Remove. (launch-environment): Call 'load-profile' instead of 'create-environment'. * tests/profiles.scm ("load-profile"): New test.
* lint: Check for trailing whitespace in description.Xinglu Chen2021-06-08
| | | | | | | * guix/lint.scm (check-description-style): Check for trailing whitespace. * tests/lint.scm: ("description: trailing whitespace"): New test. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
* lint: Check for trailing whitespace in synopsis.Xinglu Chen2021-06-08
| | | | | | | * guix/lint.scm (check-synopsis-style): Check for trailing whitespace. * tests/lint.scm ("synopsis: contains trailing whitespace"): New test. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
* store: Remove 'references/substitutes'.Ludovic Courtès2021-06-08
| | | | | | | | | This procedure lost its only user in commit 710854304b1ab29332edcb76f3de532e0724c197. * guix/store.scm (references/substitutes): Remove. * tests/store.scm ("references/substitutes missing reference info") ("references/substitutes with substitute info"): Remove.
* lint: tests-true: Check if tests are enabled when cross-compiling.Maxime Devos2021-06-06
| | | | | | | | | | | * guix/lint.scm (check-tests-true): New linter. (%local-checkers)[tests-true]: Add it. * tests/lint.scm ("tests-true: #:tests? must not be set to #t") ("tests-true: absent #:tests? is acceptable") ("tests-true: #:tests? #f is acceptable") ("tests-true: #:tests? #t acceptable when compiling natively"): Test it. Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>
* import: Add CHICKEN egg importer.Xinglu Chen2021-06-03
| | | | | | | | | | | | * guix/import/egg.scm: New file. * guix/scripts/import/egg.scm: New file. * tests/egg.scm: New file. * Makefile.am (MODULES, SCM_TESTS): Register them. * po/guix/POTFILES.in: Likewise. * guix/scripts/import.scm (importers): Add egg importer. * doc/guix.texi (Invoking guix import, Invoking guix refresh): Document it. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
* gnu-maintenance: 'release-file?' accepts 'v' prefix as in "PKG-v1.2.tgz".Ludovic Courtès2021-05-28
| | | | | | * guix/gnu-maintenance.scm (%tarball-rx, %package-name-rx): Accept 'v' and 'V' prefixes. Accept ".tgz" extension. * tests/gnu-maintenance.scm ("release-file?"): Add test.
* import: opam: Generate license for package.Xinglu Chen2021-05-28
| | | | | | | | | * guix/import/opam.scm (opam->guix-package): Generate license for the ‘license’ field. * tests/opam.scm (test-opam-file): Update accordingly. ("opam->guix-package"): Likewise. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
* import: hackage: Prefix licenses with 'license:'.Xinglu Chen2021-05-22
| | | | | | | | | * guix/import/hackage.scm (string->license): Prefix the value of the license field with ‘license:’. * tests/hackage.scm (match-ghc-foo, match-ghc-foo-6, match-ghc-foo-revision): Adjust accordingly. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
* lint: archival: Lookup content in Disarchive database.Ludovic Courtès2021-05-22
| | | | | | | | | | | * guix/lint.scm (lookup-disarchive-spec): New procedure. (check-archival): When 'lookup-content' returns #f, call 'lookup-disarchive-spec'. Call 'lookup-directory' on the result of 'lookup-directory'. * guix/download.scm (%disarchive-mirrors): Make public. * tests/lint.scm ("archival: missing content"): Set '%disarchive-mirrors'. ("archival: content unavailable but disarchive available"): New test.
* services: configuration: Add a define-maybe/no-serialization syntax.Maxim Cournoyer2021-05-17
| | | | | | | | | | | | | | | | | | | | | | | | | | Before this change, using define-maybe along define-configuration with the no-serialization syntactic keyword would result in the following warning: warning: possibly unbound variable `VARIABLE-NAME' This change introduces the define-maybe/no-serialization variant that does away with defining a serialization helper procedure, which makes it possible to avoid the above warning. * gnu/services/configuration.scm (define-maybe/no-serialization): New syntax. (define-maybe-helper): New procedure. (define-maybe): Define syntax using the above procedure. * tests/services/configuration.scm (tests): Fix module name. (custom-number-serializer): Do not print to standard output. (maybe-number?, serialize-maybe-number): New procedures defined via the define-maybe macro. (config-with-maybe-number): New configuration. (serialize-number): New procedure. ("maybe value serialization"): New test. (maybe-string?): New procedure defined via the define-maybe/no-serialization macro. (config-with-maybe-string/no-serialization): New configuration. ("maybe value without serialization no procedure bound"): New test.
* publish: Add '--negative-ttl'.Ludovic Courtès2021-05-16
| | | | | | | | | * guix/scripts/publish.scm (show-help, %options): Add '--negative-ttl'. (render-narinfo, render-narinfo/cached, make-request-handler): Add #:negative-ttl and honor it. (run-publish-server): Add #:narinfo-negative-ttl and honor it. (guix-publish): Honor '--negative-ttl'. * tests/publish.scm ("negative TTL", "no negative TTL"): New tests.
* inferior: Support querying package replacements.Christopher Baines2021-05-15
| | | | | | | | I'm looking at this to help with adding support for looking up package replacements to store in the Guix Data Service. * guix/inferior.scm (inferior-package-replacement): New procedure. * tests/inferior.scm ("inferior-package-replacement"): New test.
* services: configuration: Add tests.Maxim Cournoyer2021-05-08
| | | | | * tests/services/configuration.scm: New file. * Makefile.am (SCM_TESTS): Register it.
* tests: go: Remove duplicate go-version->git-ref test.Maxim Cournoyer2021-05-05
| | | | | | | | | | The duplicate test being removed has not much value given that go-version->git-ref is a no-op for version strings not matching the %go-pseudo-version-rx regexp; that case is already tested by the test above. * tests/go.scm ("go-version omited 'v' character"): Remove test. Reported-by: Tobias Geerinckx-Rice <me@tobias.gr>
* tests: go: Fix typos in test descriptions.Tobias Geerinckx-Rice2021-05-04
| | | | * tests/go.scm: Fix ‘embeded’ typos.
* inferior: Make sure test refers to guile@3.0.Ludovic Courtès2021-04-29
| | | | | * tests/inferior.scm ("inferior-package-inputs"): Compare with GUILE-3.0-LATEST since that's what 'lookup-inferior-packages' returns.
* diagnostics, ui: Adjust to 'read-error' and 'syntax-error' in Guile 3.0.6.Ludovic Courtès2021-04-29
| | | | | | | | | | | | | * guix/diagnostics.scm (source-properties->location): Add clause for vectors. * guix/ui.scm (report-load-error): Tweak 'read-error' handling for 3.0.6. * tests/guix-package.sh: Relax regexp for the "unbound variable" diagnostic check. * tests/guix-system.sh: Adjust "missing closing paren" check for 3.0.6. * tests/records.scm (location-alist): New procedure. ("define-record-type* & wrong field specifier") ("define-record-type* & wrong field specifier, identifier") ("define-record-type* & duplicate initializers"): Use it.
* import: Remove Nix importer.Ludovic Courtès2021-04-20
| | | | | | | | | | | | | | | | This importer has suffered from bitrot and no longer works with current Nix and Nixpkgs. See <https://bugs.gnu.org/32339> and <https://bugs.gnu.org/36255>. * guix/import/snix.scm, guix/scripts/import/nix.scm, tests/snix.scm: Remove. * Makefile.am (MODULES, SCM_TESTS): Remove them. * guix/scripts/import.scm (importers): Remove "nix". * build-aux/test-env.in: Remove NIXPKGS variable. * configure.ac: Remove '--with-nixpkgs' option. * doc/guix.texi (Invoking guix import): Remove bit about "guix import nix". * etc/completion/fish/guix.fish: Likewise.
* lint: Warn about underscores in package names.Xinglu Chen2021-04-16
| | | | | | | | | | | As per section '16.4.2 Package Naming' in the manual, use hyphens instead of underscores in package names. * guix/lint.scm (check-name): Check whether the package name contains underscores. * tests/lint.scm ("name: use underscore in package name"): New test. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
* grafts: Support rewriting UTF-16 and UTF-32 store references.Mark H Weaver2021-04-15
| | | | | | | | Partially fixes <https://bugs.gnu.org/33848>. * guix/build/graft.scm (replace-store-references): Add support for finding and rewriting UTF-16 and UTF-32 store references. * tests/grafts.scm: Add tests.
* Add (guix ipfs).Ludovic Courtès2021-04-12
| | | | | | | | | | | | | | | | This module allows for communicating with the IPFS gateway over the HTTP interface. The commit has been cherry-picked from <https://issues.guix.gnu.org/33899>. The procedures for adding and restoring file trees have been removed as according to a reply issue 33899, a different format will be used. The procedure 'add-data' has been exported as it will be used in the system test for IPFS. * guix/ipfs.scm: New file. * Makefile.am (MODULES): Add it. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
* import: go: Add an option to use pinned versions.Maxim Cournoyer2021-04-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The ability to pin versions is handy when having to deal to packages that bootstrap themselves through a chain of former versions. Not using pinned versions in these case could introduce dependency cycles. * guix/build-system/go.scm (guix) (%go-version-rx): Rename to... (%go-pseudo-version-rx): ... this. Simplify the regular expression, which in turns makes it more robust. * guix/build-system/go.scm (go-version->git-ref): Adjust following the above rename. (go-pseudo-version?): New predicate. (go-module-latest-version): Rename to ... (go-module-version-string): ... this. Rename goproxy-url argument to just goproxy. Add a VERSION keyword argument, update docstring and adjust to have it used. (go-module-available-versions): New procedure. (%go.mod-require-directive-rx): Document regexp. (parse-go.mod): Harmonize the way dependencies are recorded to a list of lists rather than a list of pairs, as done for other importers. Rewrite to directly pass multiple values rather than a record object. Filter the replaced modules in a functional style. (go-module->guix-package): Add docstring. [version, pin-versions?]: New arguments. Rename the GOPROXY-URL argument to GOPROXY. Adjust to the new returned value of fetch-go.mod, which is a string. Fail when the provided version doesn't exist. Return a list dependencies and their versions when in pinned versions mode, else just the dependencies. (go-module-recursive-import)[version, pin-versions?]: New arguments. Honor the new arguments and guard against network errors. * guix/scripts/import/go.scm (%default-options): Register a default value for the goproxy argument. (show-help): Document that a version can be specified. Remove the --version argument and add a --pin-versions argument. (%options)[version]: Remove option. [pin-versions]: Add option. (guix-import-go): Adjust so the version provided from the module name is honored, along the new pin-versions? argument. * tests/go.scm: Adjust and add new tests.
* import: go: Improve synopsis and description parsing.Maxim Cournoyer2021-04-09
| | | | | | | | | | | | | | | | | | | | | | * guix/import/go.scm (%strict-tokenizer?): Set parameter to #t. (go-path-escape): Redefine to prevent inlining. (http-get*): Replace by ... (http-fetch*): this ... (json-fetch*): New procedure. (go.pkg.dev-info): Use http-fetch*. (go-package-licenses): Rewrite in terms of go.pkg.dev-info. (go-package-description): Likewise. (go-package-synopsis): Likewise. (fetch-go.mod): Use the memoized http-fetch*. (parse-go.mod): Adjust to receive content as a string. (fetch-module-meta-data): Adjust to use http-fetch*. (go-module->guix-package): Adjust to the modified fetch-go.mod return value. [inputs]: Use propagated inputs, which is the most common situations for Go libraries. [description]: Beautify description. [licenses]: Do no check for #f. The result of the license parsing is always a list. * tests/go.scm: Adjust following above changes.
* daemon: 'guix substitute' replies on FD 4.Ludovic Courtès2021-04-09
| | | | | | | | | | | | | | | | | | | | | | | This avoids the situation where error messages would unintentionally go to stderr and be wrongfully interpreted as a reply by the daemon. Fixes <https://bugs.gnu.org/46362>. This is a followup to ee3226e9d54891c7e696912245e4904435be191c. * guix/scripts/substitute.scm (display-narinfo-data): Add 'port' parameter and honor it. (process-query): Likewise. (process-substitution): Likewise. (%error-to-file-descriptor-4?, with-redirected-error-port): Remove. (%reply-file-descriptor): New variable. (guix-substitute): Remove use of 'with-redirected-error-port'. Define 'reply-port' and pass it to 'process-query' and 'process-substitution'. * nix/libstore/build.cc (SubstitutionGoal::handleChildOutput): Swap 'builderOut' and 'fromAgent'. * nix/libstore/local-store.cc (LocalStore::getLineFromSubstituter): Likewise. * tests/substitute.scm <top level>: Set '%reply-file-descriptor' rather than '%error-to-file-descriptor-4?'.
* gnu-maintenance: Recognize more source tarball naming schemes.Ludovic Courtès2021-04-05
| | | | | | | | * guix/gnu-maintenance.scm (%package-name-rx): Add ".src" and ".orig" suffixes. * tests/gnu-maintenance.scm ("release-file?"): Add mpg321 and bvi examples. ("tarball->version"): New test.
* tests: Make 'publish' test umask-insensitive.Cees de Groot2021-03-31
| | | | | | | | | | Fixes <https://bugs.gnu.org/47239>. Reported by Konrad Hinsen <konrad.hinsen@fastmail.net>. * tests/publish.scm ("with cache"): Pass the result of 'stat:perms' to 'logand' to be umask-insensitive. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
* gnu-maintenance: Recognize "-source" tarball suffix.Ludovic Courtès2021-03-29
| | | | | | | | Fixes <https://bugs.gnu.org/47398>. Reported by Léo Le Bouter <lle-bout@zaclys.net>. * guix/gnu-maintenance.scm (%tarball-rx): Add "-[Ss]ource" suffix. * tests/gnu-maintenance.scm ("release-file?"): Add exiv2 example.
* Add powerpc64le-linux as a supported Guix architecture.Chris Marusich2021-03-23
| | | | | | | | | | | This makes powerpc64le-linux a supported architecture for Guix, but not for Guix System. * Makefile.am (SUPPORTED_SYSTEMS): Add an entry for powerpc64le-linux. * etc/guix-install.sh (chk_sys_arch): Same. * guix/packages.scm (%supported-systems): Same. * m4/guix.m4 (GUIX_ASSERT_SUPPORTED_SYSTEM): Same. * tests/guix-build.sh (all_systems): Same.
* gnu-maintenance: Accept underscores as package/version separators.Ludovic Courtès2021-03-20
| | | | | | | | | Fixes <https://bugs.gnu.org/47256>. Reported by Léo Le Bouter <lle-bout@zaclys.net>. * guix/gnu-maintenance.scm (%tarball-rx, %package-name-rx): Accept underscore as the package/version separator in tarball names. * tests/gnu-maintenance.scm ("release-file?"): Add "mediainfo" test.
* tests: Make the STORE test more robust in a "pure" environment.Leo Famulari2021-03-18
| | | | | | | | Otherwise, the test crashes (not fails) when run in `guix environment --pure guix`. Fixes <https://bugs.gnu.org/46445>. * tests/store.scm (%shell): Fallback to "/bin/sh".