summaryrefslogtreecommitdiff
path: root/guix
AgeCommit message (Collapse)Author
2021-04-12Add (guix ipfs).Ludovic Courtès
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>
2021-04-11scripts: system: Default to -v3 when building a system.Mark H Weaver
This is a followup to 8f9052d5434a3a11e7b4ff14d6b0090256e08aa4. * guix/scripts/system.scm (verbosity-level): Change the default from 2 to 3 when building a system.
2021-04-10git: Update cached checkout to the remote HEAD by default.Kyle Meyer
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>
2021-04-10build-system/qt: Fix wrapping with QTWEBENGINEPROCESS_PATH.Maxim Cournoyer
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.
2021-04-09import: go: Append version to symbol name in the pinned version mode.Maxim Cournoyer
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.
2021-04-09import: go: Add an option to use pinned versions.Maxim Cournoyer
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.
2021-04-09import: go: Improve synopsis and description parsing.Maxim Cournoyer
* 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.
2021-04-09import: utils: Refactor maybe-inputs and add maybe-propagated-inputs.Maxim Cournoyer
* 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.
2021-04-09daemon: 'guix substitute' replies on FD 4.Ludovic Courtès
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?'.
2021-04-09build-system/gnu: Give #:bootstrap-scripts a valid default.Ludovic Courtès
Commit 9cfc93be30c516fd6fa32915c61c06e03f23a011 changed the default value of #:bootstrap-scripts to #f, which is invalid (it must be a list of strings). That default value was used by build systems that inherit phases from 'gnu-build-system', such as 'qt-build-system', which would lead to wrong-type-arg errors in the 'boostrap' phase. Reported by Raghav Gururajan <rg@raghavgururajan.name>. * guix/build/gnu-build-system.scm (%bootstrap-scripts): New variable. (bootstrap): Change #:bootstrap-scripts to default to it. * guix/build-system/gnu.scm (%bootstrap-scripts): Change value. (gnu-build): #:bootstrap-scripts defaults to %bootstrap-scripts. Remove call to 'sexp->gexp'. (gnu-cross-build): Likewise.
2021-04-08build-system/qt: Wrappers set 'QTWEBENGINEPROCESS_PATH' if needed.Ludovic Courtès
Suggested by Maxim Cournoyer <maxim.cournoyer@gmail.com>. * guix/build/qt-build-system.scm (variables-for-wrapping): Add "QTWEBENGINEPROCESS_PATH".
2021-04-08build-system/qt: Wrappers only include relevant directories to XDG_DATA_DIRS.Ludovic Courtès
Fixes <https://bugs.gnu.org/47569>. Previously the wrapper's XDG_DATA_DIRS would contain any input that had a /share sub-directory, which is usually all build-time inputs. * guix/build/qt-build-system.scm (variables-for-wrapping)[collect-sub-dirs]: Add 'selectors' parameter and honor it. Change caller to handle selectors. Add selectors for /share.
2021-04-08gnu-maintenance: 'sourceforge' updater reuses the same connection.Ludovic Courtès
* guix/gnu-maintenance.scm (latest-sourceforge-release): Call 'open-socket-for-uri' upfront. Pass #:port and #:keep-alive? to 'http-head'. Wrap body in 'dynamic-wind' and call 'close-port' upon exit.
2021-04-06lint: refresh: Warn about missing or dysfunctional updaters.Ludovic Courtès
This feedback should help us improve updaters. * guix/lint.scm (check-for-updates): Return a warning when PACKAGE lacks an updater or when the updater returns #f.
2021-04-06upstream: 'package-latest-release' tries all the matching updaters.Ludovic Courtès
* guix/upstream.scm (package-latest-release): Try UPDATERS until one of them returns an upstream source. This is useful for packages with several matching updaters, such a zlib ('sourceforge' and 'generic-html').
2021-04-06gnu-maintenance: Add 'sourceforge' updater.Ludovic Courtès
This updater currently covers 2.4% of the packages. * guix/gnu-maintenance.scm (latest-sourceforge-release): New procedure. (%sourceforge-updater): New variable. * doc/guix.texi (Invoking guix refresh): Document it.
2021-04-05gnu-maintenance: Recognize more source tarball naming schemes.Ludovic Courtès
* 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.
2021-04-05utils: 'tarball-sans-extension' recognizes ".tgz".Ludovic Courtès
* guix/utils.scm (tarball-sans-extension): Add ".tgz".
2021-04-05gnu-maintenance: Remove unused procedure.Ludovic Courtès
* guix/gnu-maintenance.scm (savannah-package?): Remove.
2021-04-05gnu-maintenance: 'generic-html' updates packages with the right property.Ludovic Courtès
* guix/gnu-maintenance.scm (html-updatable-package?): Return true for packages with a 'release-monitoring-url' property. This allows us to cater for packages with source fetched over, say, FTP, but with an HTML page to monitor.
2021-04-04import: go: Replace underscores with hyphens in package names.Xinglu Chen
As per section '16.4.2 Package Naming' in the manual, use hypens instead of underscores in package names. * guix/import/go.scm (go-module->guix-package-name): Replace underscores with hyphens. Signed-off-by: Leo Famulari <leo@famulari.name>
2021-04-02git: Remove unused variables.Ludovic Courtès
This is a followup to 298f9d29d6c26e408a90d08d147d926aa6f81ab3, which left those variables despite being unnecessary. * guix/git.scm (clone*, update-cached-checkout): Remove unused 'auth-method' variable.
2021-04-02gnu: Add node-lts.Jelle Licht
* gnu/packages/node.scm (node-lts): New variable. * guix/build-system/node.scm (default-node): Use it.
2021-04-02build-system: Rewrite node build system.Jelle Licht
* guix/build/node-build-system.scm: Rewrite it. * guix/build-system/node.scm: Adjust accordingly. * gnu/packages/node-xyz.scm (node-semver): Likewise. Co-authored-by: Timothy Sample <samplet@ngyro.com>
2021-04-01build-system/qt: Convert phases to a gexp if needed.Ludovic Courtès
Fixes a bug whereby the "/gnu/store/.*qmlcachegen" string in the 'ktouch' phases would incorrectly be interpreted as a store item, leading to an error while trying to build it: $ ./pre-inst-env guix build ktouch -d --no-grafts guix build: error: path ‘/gnu/store/.*qmlcachegen’ is not valid Reported by Christopher Baines. * guix/build-system/qt.scm (qt-build)[builder]: If PHASES is a pair, pass it to 'sexp->gexp'.
2021-04-01build-system/android-ndk: Pass #:bootstrap-scripts to build phases.Ludovic Courtès
Fixes a regression introduced in 9cfc93be30c516fd6fa32915c61c06e03f23a011. * guix/build-system/android-ndk.scm (android-ndk-build): Pass #:bootstrap-scripts to 'android-ndk-build'.
2021-04-01build-system/android-ndk: Fix reference to "android-build".Ludovic Courtès
Regression introduced in 7d873f194ca69d6096d28d7a224ab78e83e34fe1. * guix/build-system/android-ndk.scm (android-ndk-build): Call 'gexp-input-thing' on the item taken from INPUTS.
2021-04-01scripts: show: Replace 'args-fold*' by 'parse-command-line'.zimoun
* guix/scripts/show.scm (define-command): Replace 'args-fold*' by 'parse-command-line'. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2021-04-01scripts: search: Replace 'args-fold*' by 'parse-command-line'.zimoun
* guix/scripts/search.scm (define-command): Replace 'args-fold*' by 'parse-command-line'. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2021-04-01scripts: repl: Replace 'args-fold*' by 'parse-command-line'.zimoun
* guix/scripts/repl.scm (define-command): Replace 'args-fold*' by 'parse-command-line'. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2021-04-01scripts: publish: Replace 'args-fold*' by 'parse-command-line'.zimoun
* guix/scripts/publish.scm (define-command): Replace 'args-fold*' by 'parse-command-line'. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2021-04-01scripts: edit: Replace 'args-fold*' by 'parse-command-line'.zimoun
* guix/scripts/edit.scm (define-command): Replace 'args-fold*' by 'parse-command-line'. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2021-04-01scripts: download: Replace 'args-fold*' by 'parse-command-line'.zimoun
* guix/scripts/download.scm (define-command): Replace 'args-fold*' by 'parse-command-line'. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2021-04-01scripts: discover: Replace 'args-fold*' by 'parse-command-line'.zimoun
* guix/scripts/discover.scm (define-command): Replace 'args-fold*' by 'parse-command-line'. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2021-04-01scripts: describe: Replace 'args-fold*' by 'parse-command-line'.zimoun
* guix/scripts/describe.scm (define-command): Replace 'args-fold*' by 'parse-command-line'. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2021-04-01lint: Warn about single-character package names.Tobias Geerinckx-Rice via Bug reports for GNU Guix
A common-sense exception is made for R. * guix/lint.scm (check-name): New procedure. (%local-checkers): Add it.
2021-03-31scripts: Scripts that defaulted to -v2 now default to -v3.Ludovic Courtès
This is a followup to e45ef9a648c155c35b51e6b15049a1bd5416f0a1. * guix/scripts/archive.scm (%default-options): Change 'verbosity' to 3. * guix/scripts/build.scm (%default-options): Likewise. * guix/scripts/copy.scm (%default-options): Likewise.
2021-03-31status: Don't display download URLs for '--verbosity=1'.Ludovic Courtès
With this change, each substitute occupies a single line of output (instead of two) when using '-v1', the default for 'guix package' & co. * guix/status.scm (print-build-event): Add #:print-urls? and honor it. (print-build-event/quiet): Pass #:print-urls? #f. (print-build-event/quiet-with-urls): New procedure. (logger-for-level): Add case for LEVEL 2. * doc/guix.texi (Common Build Options): Adjust '--verbosity' documentation.
2021-03-31substitute: Emit a single newline upon completion.Ludovic Courtès
The immediate effect is that, with '--verbosity=1', only two lines are displayed for each substitute, instead of two lines followed by an empty line. * guix/scripts/substitute.scm (process-substitution): Emit a single newline upon completion when PRINT-BUILD-TRACE? is true.
2021-03-31build-system/scons: Use 'with-build-variables'.Ludovic Courtès
This brings back the '%build-inputs' and '%outputs' global variables, which some packages such as 'serf' expect. * guix/build-system/scons.scm (scons-build): Use 'with-build-variables'.
2021-03-31build-system/scons: Fix typo.Ludovic Courtès
Typo introduced in 7d873f194ca69d6096d28d7a224ab78e83e34fe1. * guix/build-system/scons.scm (scons-build): Use #$name rather than ,name.
2021-03-31gexp: 'compiled-modules' honors extensions.Ludovic Courtès
Fixes a regression introduced in 2eafeb2f3d661061bc412c3f27c90202e4532532 whereby extensions would not be added as inputs of the resulting derivation. * guix/gexp.scm (compiled-modules): Append EXTENSIONS to the second argument of 'gexp-with-hidden-inputs'.
2021-03-30gexp: 'compiled-modules' gets source and parameters an environment variables.Ludovic Courtès
This reduces the number of 'add-text-to-store' RPCs by 15 (out of 3336) oin "guix build -d --no-grafts libreoffice". * guix/gexp.scm (gexp-with-hidden-inputs): New procedure. (compiled-modules): Use it. Pass #:script-name. Augment #:env-vars.
2021-03-30gexp: 'gexp->script' uses #:guile also as the guile-for-build.Ludovic Courtès
Previously 'gexp->script' would unconditionally use the default #:guile-for-build value of 'gexp->derivation'. * guix/gexp.scm (gexp->script): Pass #:guile to 'load-path-expression'. Pass #:guile-for-build to 'gexp->derivation'.
2021-03-30gexp: Add #:guile parameter to 'load-path-expression'.Ludovic Courtès
* guix/gexp.scm (load-path-expression): Add #:guile parameter and honor it.
2021-03-30gexp: 'imported+compiled-modules' fully honors #:guile.Ludovic Courtès
* guix/gexp.scm (imported+compiled-modules): Pass #:guile to 'imported-modules'.
2021-03-30gexp: Do not add derivations to the object cache.Ludovic Courtès
That was needlessly making the object cache grow. * guix/gexp.scm (lower-object, lower+expand-object): Bypass the object cache when OBJ is a derivation. This almost halves the number of cache lookups and reduces the number of entries from 3.4K to 2.6K when doing "guix build libreoffice -d --no-grafts".
2021-03-30gexp: Allowed/disallowed references and graphs never refer to grafted inputs.Ludovic Courtès
* guix/gexp.scm (lower-reference-graphs, lower-references): Wrap 'lower-object' call in 'without-grafting' since these things never refer to grafted inputs.
2021-03-30grafts: Add 'without-grafting'.Ludovic Courtès
* guix/grafts.scm (call-without-grafting): New procedure. (without-grafting): New macro.
2021-03-30packages: Call 'bag-grafts' only on the tip of the package graph.Ludovic Courtès
This reinstates pre-gexp behavior where 'expand-input' would explicitly pass #:graft? #f in recursive calls, thereby preventing redundant calls to 'bag-grafts'. * guix/packages.scm (expand-input): Turn into a monadic procedure. Lower INPUT when it's a package, passing #:graft? #f. (bag->derivation, bag->cross-derivation): Adjust accordingly. * tests/packages.scm ("search paths"): Adjust so BUILD aborts only when passed the package of interest.