summaryrefslogtreecommitdiff
path: root/guix
Commit message (Collapse)AuthorAge
* ssh: Fix type that broke offloading.Ludovic Courtès2021-05-11
| | | | | | | Reported by Simon Streit <simon@netpanic.org>. Regression introduced in 3270308eebe82075d2f02517c5a2b1599928495c. * guix/ssh.scm (remote-daemon-channel)[redirect]: Unquote SOCKET-NAME.
* guix: scripts system: Increase the size for generating Docker container images.Roel Janssen2021-05-10
| | | | * guix/scripts/system.scm: Override the default of 256.
* ssh: Honor GUIX_DAEMON_SOCKET on the target machine.Ludovic Courtès2021-05-08
| | | | | | | | | Fixes <https://bugs.gnu.org/48240>. Reported by Ricardo Wurmus <rekado@elephly.net>. * guix/ssh.scm (remote-daemon-channel)[redirect]: Define 'connect-to-daemon'. Use the same-named procedure from (guix store) when available, and honor GUIX_DAEMON_SOCKET.
* store: Export 'connect-to-daemon'.Ludovic Courtès2021-05-08
| | | | * guix/store.scm (connect-to-daemon): Make public. Improve docstring.
* ssh: 'connect-to-remote-daemon' raises a nicer message upon error.Ludovic Courtès2021-05-08
| | | | | * guix/ssh.scm (connect-to-remote-daemon): Catch 'store-connection-error?' and rethrow.
* store: 'open-connection' never returns #f.Ludovic Courtès2021-05-08
| | | | | * guix/store.scm (open-connection)[handshake-error]: New procedure. Call it in code paths that would previously return #f.
* weather: '--display-missing' shows the system type of missing items.Ludovic Courtès2021-05-08
| | | | | | * guix/scripts/weather.scm (store-item-system): New procedure. (report-server-coverage): Use it to print the system type of each missing item.
* build-system: asdf: Work around package-name->name+version bug.Guillaume Le Vaillant2021-05-08
| | | | | | | | | | | This patch modifies how the name of the main Common Lisp system is extracted from the full Guix package name to work around bug#48225 concerning the 'package-name->name+version' function. Fixes <https://issues.guix.gnu.org/41437>. * guix/build-system/asdf.scm (asdf-build): Fix 'systems' function. * guix/build/asdf-build-system.scm (main-system-name): Fix it.
* download: Restore error reporting.Timothy Sample2021-05-05
| | | | | | | | | | | Normal error reporting was disrupted by the introduction of Disarchive in commit fbc2a52a32ddc664db8ebab420c2e17b1432c744. In particular, running 'guix download' would succeed with a partially downloaded file. * guix/build/download.scm (disarchive-fetch/any): Return '#f' when Disarchive cannot be found, the specification cannot be found, or Disarchive fails due to an error.
* cvs-download: Fix module exportsKonrad Hinsen2021-05-05
| | | | | | | * guix/cvs-download.scm: Remove non-existent export cvs-reference-url, add cvs-reference-root-directory and cvs-reference-module Signed-off-by: Ludovic Courtès <ludo@gnu.org>
* swh: Adjust for compatibility with Guile 2.2's (web client).Ludovic Courtès2021-05-05
| | | | | | | Guile <= 2.2.7 did not support #:verify-certificate? so work around it. * guix/swh.scm (http-get*, http-post*) [! guile-3]: Add variant for Guile 2.2.
* profiles: texlive-configuration: Handle updmap.cfg conflict.Ricardo Wurmus2021-05-05
| | | | | | | | | The profile hook would fail when preparing an environment for a package using texlive-union, because the union already had a updmap.cfg file. Reported-by: Lars-Dominik Braun <ldb@leibniz-psychology.org>. * guix/profiles.scm (texlive-configuration): Delete updmap.cfg if it exists.
* build-system: emacs: Clarify %install-dir.Leo Prikler2021-05-05
| | | | | | | | The old comment is no longer adequate, see <https://lists.gnu.org/archive/html/guix-patches/2021-05/msg00113.html>. * guix/build/emacs-build-system.scm (%install-dir): Adjust comment to better reflect usage of this variable.
* ui: Suggest installing glibc-locales, not glibc-utf8-locales.Maxim Cournoyer2021-05-05
| | | | | | | | | | | Users (both old and new) struggling with locale warnings is a recurrent theme; part of it may be due to the glibc-utf8-locales package being misleading, as it only includes a subset of the UTF-8 locales. To prevent confusion, suggest installing the glibc-locales package instead. * guix/ui.scm (install-locale): Do not mention glibc-utf8-locales in the hint message. Use glibc-locales instead of glibc-utf8-locales in the provided example.
* status: Avoid abbreviation in messages.Ludovic Courtès2021-05-05
| | | | | | This is a followup to 68228d80dd575f0042d71b4563d82a8fef577a47. * guix/status.scm (hook-message): Spell out "sub-directories".
* profiles: texlive-configuration: Refresh font maps.Ricardo Wurmus2021-05-03
| | | | | * guix/profiles.scm (texlive-configuration): Run updmap to generate font maps necessary for pdflatex and other tools.
* android-repo-download: Add guile-json extension.Mathieu Othacehe2021-05-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This partially fixes: <https://issues.guix.gnu.org/48152>. The (guix build download-nar) module drags the (guix build download) module that autoloads (guix swh). [13/26] Loading './guix/swh.scm'... ;;; Failed to autoload swh-download-directory in (guix swh): ;;; no code for module (json) Backtrace: In srfi/srfi-1.scm: 460:18 19 (fold #<procedure 7ffff2c50760 at ice-9/eval.scm:336:1?> ?) In ice-9/eval.scm: 619:8 18 (_ #(#(#<directory (guix build utils) 7ffff318fd20>) # ?)) In ice-9/boot-9.scm: 2806:4 17 (save-module-excursion #<procedure 7ffff25b1a00 at ice-?>) In unknown file: 16 (primitive-load "./guix/swh.scm") In ice-9/eval.scm: 721:20 15 (primitive-eval (define-module (guix swh) #:use-module ?)) In ice-9/psyntax.scm: 1241:36 14 (expand-top-sequence ((define-module (guix swh) # # ?)) ?) 1233:19 13 (parse _ (("placeholder" placeholder)) ((top) #(# # ?)) ?) 285:10 12 (parse _ (("placeholder" placeholder)) (()) _ c&e (eval) ?) In ice-9/eval.scm: 293:34 11 (_ #<directory (guix build utils) 7ffff318fd20>) In ice-9/boot-9.scm: 3380:4 10 (define-module* _ #:filename _ #:pure _ #:version _ # _ ?) 2565:24 9 (call-with-deferred-observers #<procedure 7ffff2215230 ?>) 3393:24 8 (_) 222:29 7 (map1 (((guix base16)) ((guix build utils)) ((# ?) ?) ?)) 222:29 6 (map1 (((guix build utils)) ((guix build syscalls) ?) ?)) 222:29 5 (map1 (((guix build syscalls) #:select (mkdtemp!)) (#) ?)) 222:29 4 (map1 (((web uri)) ((web client)) ((web response)) (#) ?)) 222:29 3 (map1 (((web client)) ((web response)) ((json)) ((?)) ?)) 222:29 2 (map1 (((web response)) ((json)) ((srfi srfi-1)) ((?)) ?)) 222:17 1 (map1 (((json)) ((srfi srfi-1)) ((srfi srfi-9)) ((?)) ?)) 3300:6 0 (resolve-interface (json) #:select _ #:hide _ #:prefix _ ?) ice-9/boot-9.scm:3300:6: In procedure resolve-interface: no code for module (json) * guix/android-repo-download.scm (android-repo-fetch): Add guile-json extension.
* cvs-download: Add guile-json and gnutls extensions.Mathieu Othacehe2021-05-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This partially fixes: <https://issues.guix.gnu.org/48152>. The (guix build download-nar) module drags the (guix build download) module that autoloads (guix swh). [13/26] Loading './guix/swh.scm'... ;;; Failed to autoload swh-download-directory in (guix swh): ;;; no code for module (json) Backtrace: In srfi/srfi-1.scm: 460:18 19 (fold #<procedure 7ffff2c50760 at ice-9/eval.scm:336:1?> ?) In ice-9/eval.scm: 619:8 18 (_ #(#(#<directory (guix build utils) 7ffff318fd20>) # ?)) In ice-9/boot-9.scm: 2806:4 17 (save-module-excursion #<procedure 7ffff25b1a00 at ice-?>) In unknown file: 16 (primitive-load "./guix/swh.scm") In ice-9/eval.scm: 721:20 15 (primitive-eval (define-module (guix swh) #:use-module ?)) In ice-9/psyntax.scm: 1241:36 14 (expand-top-sequence ((define-module (guix swh) # # ?)) ?) 1233:19 13 (parse _ (("placeholder" placeholder)) ((top) #(# # ?)) ?) 285:10 12 (parse _ (("placeholder" placeholder)) (()) _ c&e (eval) ?) In ice-9/eval.scm: 293:34 11 (_ #<directory (guix build utils) 7ffff318fd20>) In ice-9/boot-9.scm: 3380:4 10 (define-module* _ #:filename _ #:pure _ #:version _ # _ ?) 2565:24 9 (call-with-deferred-observers #<procedure 7ffff2215230 ?>) 3393:24 8 (_) 222:29 7 (map1 (((guix base16)) ((guix build utils)) ((# ?) ?) ?)) 222:29 6 (map1 (((guix build utils)) ((guix build syscalls) ?) ?)) 222:29 5 (map1 (((guix build syscalls) #:select (mkdtemp!)) (#) ?)) 222:29 4 (map1 (((web uri)) ((web client)) ((web response)) (#) ?)) 222:29 3 (map1 (((web client)) ((web response)) ((json)) ((?)) ?)) 222:29 2 (map1 (((web response)) ((json)) ((srfi srfi-1)) ((?)) ?)) 222:17 1 (map1 (((json)) ((srfi srfi-1)) ((srfi srfi-9)) ((?)) ?)) 3300:6 0 (resolve-interface (json) #:select _ #:hide _ #:prefix _ ?) ice-9/boot-9.scm:3300:6: In procedure resolve-interface: no code for module (json) * guix/cvs-download.scm (cvs-fetch): Add guile-json and gnutls as extensions.
* hg-download: Add guile-json and gnutls extensions.Mathieu Othacehe2021-05-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This partially fixes: <https://issues.guix.gnu.org/48152>. The (guix build download-nar) module drags the (guix build download) module that autoloads (guix swh). [13/26] Loading './guix/swh.scm'... ;;; Failed to autoload swh-download-directory in (guix swh): ;;; no code for module (json) Backtrace: In srfi/srfi-1.scm: 460:18 19 (fold #<procedure 7ffff2c50760 at ice-9/eval.scm:336:1?> ?) In ice-9/eval.scm: 619:8 18 (_ #(#(#<directory (guix build utils) 7ffff318fd20>) # ?)) In ice-9/boot-9.scm: 2806:4 17 (save-module-excursion #<procedure 7ffff25b1a00 at ice-?>) In unknown file: 16 (primitive-load "./guix/swh.scm") In ice-9/eval.scm: 721:20 15 (primitive-eval (define-module (guix swh) #:use-module ?)) In ice-9/psyntax.scm: 1241:36 14 (expand-top-sequence ((define-module (guix swh) # # ?)) ?) 1233:19 13 (parse _ (("placeholder" placeholder)) ((top) #(# # ?)) ?) 285:10 12 (parse _ (("placeholder" placeholder)) (()) _ c&e (eval) ?) In ice-9/eval.scm: 293:34 11 (_ #<directory (guix build utils) 7ffff318fd20>) In ice-9/boot-9.scm: 3380:4 10 (define-module* _ #:filename _ #:pure _ #:version _ # _ ?) 2565:24 9 (call-with-deferred-observers #<procedure 7ffff2215230 ?>) 3393:24 8 (_) 222:29 7 (map1 (((guix base16)) ((guix build utils)) ((# ?) ?) ?)) 222:29 6 (map1 (((guix build utils)) ((guix build syscalls) ?) ?)) 222:29 5 (map1 (((guix build syscalls) #:select (mkdtemp!)) (#) ?)) 222:29 4 (map1 (((web uri)) ((web client)) ((web response)) (#) ?)) 222:29 3 (map1 (((web client)) ((web response)) ((json)) ((?)) ?)) 222:29 2 (map1 (((web response)) ((json)) ((srfi srfi-1)) ((?)) ?)) 222:17 1 (map1 (((json)) ((srfi srfi-1)) ((srfi srfi-9)) ((?)) ?)) 3300:6 0 (resolve-interface (json) #:select _ #:hide _ #:prefix _ ?) ice-9/boot-9.scm:3300:6: In procedure resolve-interface: no code for module (json) * guix/hg-download.scm (hg-fetch): Add guile-json and gnutls as extensions.
* build-system: emacs: Use subdirectories again.Leo Prikler2021-05-01
| | | | | | | | | | | | | | With this, Emacs libraries are installed in the ELPA_NAME-VERSION subdirectory of site-lisp and potential subdirectories should no longer collide. * guix/build/emacs-build-system.scm (add-source-to-load-path): Rename to... (expand-load-path): ... this. Also expand lone subdirectories of site-lisp. (%standard-phases): Adjust accordingly. (elpa-directory): New variable. Export it publicly for use in other build systems. (build, patch-el-files, make-autoloads): Use ELPA name and version to construct subdirectories of %install-dir. (install): Install in subdirectory.
* profiles: Add hook for Emacs subdirs.Leo Prikler2021-05-01
| | | | | | * guix/profiles.scm (emacs-subdirs): New variable. (%default-profile-hooks): Add it here. * guix/status.scm (hook-message): Add a message for emacs-subdirs.
* download: Use Disarchive as a last resort.Timothy Sample2021-04-29
| | | | | | | | | | | | | | | | | | | | | | This is a fixed version of 66b14dccdd0d83c875ce3a8d50ceab8b6f0a3ce2, which was reverted in e74250c3c535b75dd2225a26df51febb7ed94654. * guix/download.scm (%disarchive-mirrors): New variable. (%disarchive-mirror-file): New variable. (built-in-download): Add 'disarchive-mirrors' keyword argument and pass its value along to the 'builtin:download' derivation. (url-fetch): Pass '%disarchive-mirror-file' to 'built-in-download'. * guix/scripts/perform-download.scm (perform-download): Read Disarchive mirrors from the environment and pass them to 'url-fetch'. * guix/build/download.scm (disarchive-fetch/any): New procedure. (url-fetch): Add 'disarchive-mirrors' keyword argument, use it to make a list of URIs, and use the new procedure to fetch the file if all other methods fail. * build-aux/build-self.scm (build-program)[select?]: Exclude '(guix build download)'. * guix/self.scm (compiled-guix)[*core-modules*]: Add 'guile-json' to the list of extensions.
* 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.
* packages: 'package-with-patches' preserves package location.Ludovic Courtès2021-04-29
| | | | | * guix/packages.scm (package-with-patches): Preserve the 'location' field of ORIGINAL.
* Revert "download: Use Disarchive as a last resort."Timothy Sample2021-04-28
| | | | | This reverts commit 66b14dccdd0d83c875ce3a8d50ceab8b6f0a3ce2, which broke 'guix pull'.
* download: Use Disarchive as a last resort.Timothy Sample2021-04-27
| | | | | | | | | | | | | | | * guix/download.scm (%disarchive-mirrors): New variable. (%disarchive-mirror-file): New variable. (built-in-download): Add 'disarchive-mirrors' keyword argument and pass its value along to the 'builtin:download' derivation. (url-fetch): Pass '%disarchive-mirror-file' to 'built-in-download'. * guix/scripts/perform-download.scm (perform-download): Read Disarchive mirrors from the environment and pass them to 'url-fetch'. * guix/build/download.scm (disarchive-fetch/any): New procedure. (url-fetch): Add 'disarchive-mirrors' keyword argument, use it to make a list of URIs, and use the new procedure to fetch the file if all other methods fail.
* swh: Add a directory download procedure.Timothy Sample2021-04-27
| | | | | | * guix/swh.scm (swh-directory-download): New procedure (with implementation extracted from 'swh-download'). (swh-download): Use it to download the revision directory.
* http-client: Remove exception mishandling in 'http-multiple-get'.Ludovic Courtès2021-04-24
| | | | | | | | | | | | | | Partly fixes <https://bugs.gnu.org/47867>. Reported by Florian Pelz <pelzflorian@pelzflorian.de>. The non-tail recursive call to 'connect' could cause requests to be processed twice, with 'p' possibly closed the second time. Regression introduced in 205833b72c5517915a47a50dbe28e7024dc74e57 and carried over in 45fce38fb0b6c6796906149ade145b8d3594c1c6. * guix/http-client.scm (http-multiple-get): Remove call to 'close-port' and recursive call to 'connect' when the 'write-request' block returns #f.
* http-client, substitute: Gracefully handle GnuTLS EAGAIN/EINTR.Ludovic Courtès2021-04-24
| | | | | | | | | | | | | | Partly fixes <https://bugs.gnu.org/47867>. Reported by Florian Pelz <pelzflorian@pelzflorian.de>. In GnuTLS up to 3.7.1 included, GNUTLS_E_AGAIN and GNUTLS_E_INTERRUPTED are not handled by 'write_to_session_record_port' and could be thrown at the caller. This patch works around that by dropping connections altogether and restarting when this happens. * guix/http-client.scm (false-if-networking-error): Swallow ERROR/AGAIN and ERROR/INTERRUPTED. * guix/scripts/substitute.scm (call-with-cached-connection): Likewise.
* import: pypi: Clarify docstring of parse-requires.txtRovanion Luckey2021-04-22
| | | | | | | * guix/import/pypi.scm (parse-requires.txt): Document the parameter more explicitly. Signed-off-by: Leo Famulari <leo@famulari.name>
* status: Separate downloads upon '--verbosity=2'.Ludovic Courtès2021-04-23
| | | | | | | | | | | | | | | | | | | | This is a followup to 1fa4aff1fbb46bbb9df8486ca12bfcfe6144458a, reintroducing the newline previously emitted by 'guix substitute' upon download completion. With this change, with '--verbosity=2', each download occupies three lines again, like so: --8<---------------cut here---------------start------------->8--- downloading from https://ci.guix.gnu.org/nar/lzip/…-jsoncpp-1.9.2 ... jsoncpp-1.9.2 93KiB 4.2MiB/s 00:00 [##################] 100.0% --8<---------------cut here---------------end--------------->8--- This makes the output more readable. * guix/status.scm (print-build-event): When PRINT-URLS? is true, print a blank line after the download.
* import: go: Autoload (htmlprag).Ludovic Courtès2021-04-23
| | | | | | | Fixes <https://bugs.gnu.org/47924>. Reported by Carl Dong <contact@carldong.me>. * guix/import/go.scm: Autoload (htmlprag).
* import: go: Do not set '%strict-tokenizer?' from the top level.Ludovic Courtès2021-04-23
| | | | | | | | | | This avoids interference with other users of (htmlprag) and makes the intent clearer. * guix/import/go.scm <top level>: Remove call to '%strict-tokenizer?'. (go-package-licenses, go-package-description) (go-package-synopsis, fetch-module-meta-data): Pass #:strict? #t to 'html->sxml'.
* cve: Gracefully handle bogus CVE entries.Ludovic Courtès2021-04-21
| | | | | | | | | Fixes <https://bugs.gnu.org/47941>. Reported by Jack Hill <jackhill@jackhill.us>. * guix/cve.scm (reference-data->cve-references): Gracefully handle lack of "reference_data". (cpe-match->cve-configuration): Gracefully handle lack of "cpe23Uri".
* 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.
* guix: ci: Rename the checkout 'input' field.Mathieu Othacehe2021-04-20
| | | | | | | The checkout "input" field has been renamed "channel" in Cuirass 1.0 release. * guix/ci.scm (<checkout>)[input]: Rename it into ... [channel]: ... this new field.
* 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>
* git-download: Call 'libgit2-init!'.Ludovic Courtès2021-04-16
| | | | | | | | | | Fixes <https://bugs.gnu.org/47797>. Reported by Ingo Ruhnke <grumbel@gmail.com> and Nicolò Balzarotti <anothersms@gmail.com>. Regression introduced in c1940fde43c7aca37d67589cc5cb248086d17d56. * guix/git-download.scm (git-predicate): Add call to 'libgit2-init!'.
* 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.
* git: Honor proxy settings when fetching submodules.Ludovic Courtès2021-04-14
| | | | | | | | Fixes <https://bugs.gnu.org/44593>. * guix/git.scm (update-submodules): Add #:fetch-options and honor it. (update-cached-checkout): Pass #:fetch-options to 'update-submodules'. * doc/guix.texi (Requirements): Adjust comment about Guile-Git.
* channels: Build user channels with '-O1'.Ludovic Courtès2021-04-12
| | | | | | | | This should noticeably speed up compilation for channels with many files. * guix/channels.scm (standard-module-derivation)[build]: Define 'optimizations-for-level' and '-O1'. Pass #:optimization-options to 'compile-files'.
* 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>
* scripts: system: Default to -v3 when building a system.Mark H Weaver2021-04-11
| | | | | | | This is a followup to 8f9052d5434a3a11e7b4ff14d6b0090256e08aa4. * guix/scripts/system.scm (verbosity-level): Change the default from 2 to 3 when building a system.
* git: Update cached checkout to the remote HEAD by default.Kyle Meyer2021-04-10
| | | | | | | | | | | | | | | | | | Fixes <https://bugs.gnu.org/45187>. Reported by Ricardo Wurmus <rekado@elephly.net>. update-cached-checkout hard codes "master" as the default branch, leading to a failure when the clone doesn't have a "master" branch. Instead use the remote HEAD symref as an indicator of what the primary branch is. * guix/git.scm (resolve-reference): Support resolving symrefs. (update-cached-checkout, latest-repository-commit): Change the default for REF to the empty list and translate it to the remote HEAD symref. (<git-checkout>): Change branch field's default to #f. (git-checkout-compiler): When branch and commit fields are both #f, call latest-repository-commit* with the empty list as the ref. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
* build-system/qt: Fix wrapping with QTWEBENGINEPROCESS_PATH.Maxim Cournoyer2021-04-10
| | | | | | | | | | | This is a follow up commit to 06eb21856f, which added QTWEBENGINEPROCESS_PATH to the list of wrapped variables. Unfortunately it wouldn't be set, as its value is a plain file rather than a directory, and the code only checked for directories. * guix/build/qt-build-system.scm (variables-for-wrapping): Define a file type entry for each variable definition, and use it to determine if we should look for directories versus plain files.
* import: go: Append version to symbol name in the pinned version mode.Maxim Cournoyer2021-04-09
| | | | | | | | | | | | | | | | | | | This allows importing packages with complicated version specific dependency chains without the package symbol names colliding. * doc/guix.texi (Invoking guix import): Document the --pin-versions option. Mention that a specific version can be imported. Remove the experimental warning. * guix/import/go.scm (go-module->guix-package-name)[version]: Add optional argument. Rewrite the character translation in terms of string-map. (go-module->guix-package): Conditionally use dependencies whose symbol include their version, based no the value of the PIN-VERSIONS? argument. * guix/import/utils.scm (package->definition): Add a new case where the full version string is appended to the package symbol. * guix/scripts/import.scm (guix-import): Correctly print forms starting with '(define-public [...]'. * guix/scripts/import/go.scm (guix-import-go): Conditionally include the version in the package symbols defined.
* 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.
* import: utils: Refactor maybe-inputs and add maybe-propagated-inputs.Maxim Cournoyer2021-04-09
| | | | | | | * guix/import/utils.scm (maybe-inputs)[type]: New argument. Update docstring. The argument is used to derive the input field name to use. (maybe-native-inputs): Adjust to use the above. (maybe-propagated-inputs): New procedure.
* 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?'.