summaryrefslogtreecommitdiff
path: root/guix
Commit message (Collapse)AuthorAge
* 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?'.
* build-system/qt: Wrappers set 'QTWEBENGINEPROCESS_PATH' if needed.Ludovic Courtès2021-04-08
| | | | | | | Suggested by Maxim Cournoyer <maxim.cournoyer@gmail.com>. * guix/build/qt-build-system.scm (variables-for-wrapping): Add "QTWEBENGINEPROCESS_PATH".
* build-system/qt: Wrappers only include relevant directories to XDG_DATA_DIRS.Ludovic Courtès2021-04-08
| | | | | | | | | | | 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.
* gnu-maintenance: 'sourceforge' updater reuses the same connection.Ludovic Courtès2021-04-08
| | | | | | | * 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.
* lint: refresh: Warn about missing or dysfunctional updaters.Ludovic Courtès2021-04-06
| | | | | | | 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.
* upstream: 'package-latest-release' tries all the matching updaters.Ludovic Courtès2021-04-06
| | | | | | | * 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').
* gnu-maintenance: Add 'sourceforge' updater.Ludovic Courtès2021-04-06
| | | | | | | | 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.
* 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.
* utils: 'tarball-sans-extension' recognizes ".tgz".Ludovic Courtès2021-04-05
| | | | * guix/utils.scm (tarball-sans-extension): Add ".tgz".
* gnu-maintenance: Remove unused procedure.Ludovic Courtès2021-04-05
| | | | * guix/gnu-maintenance.scm (savannah-package?): Remove.
* gnu-maintenance: 'generic-html' updates packages with the right property.Ludovic Courtès2021-04-05
| | | | | | | * 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.
* import: go: Replace underscores with hyphens in package names.Xinglu Chen2021-04-04
| | | | | | | | | | 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>
* git: Remove unused variables.Ludovic Courtès2021-04-02
| | | | | | | | 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.
* gnu: Add node-lts.Jelle Licht2021-04-02
| | | | | * gnu/packages/node.scm (node-lts): New variable. * guix/build-system/node.scm (default-node): Use it.
* build-system: Rewrite node build system.Jelle Licht2021-04-02
| | | | | | | | * 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>
* scripts: show: Replace 'args-fold*' by 'parse-command-line'.zimoun2021-04-01
| | | | | | | * guix/scripts/show.scm (define-command): Replace 'args-fold*' by 'parse-command-line'. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
* scripts: search: Replace 'args-fold*' by 'parse-command-line'.zimoun2021-04-01
| | | | | | | * guix/scripts/search.scm (define-command): Replace 'args-fold*' by 'parse-command-line'. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
* scripts: repl: Replace 'args-fold*' by 'parse-command-line'.zimoun2021-04-01
| | | | | | | * guix/scripts/repl.scm (define-command): Replace 'args-fold*' by 'parse-command-line'. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
* scripts: publish: Replace 'args-fold*' by 'parse-command-line'.zimoun2021-04-01
| | | | | | | * guix/scripts/publish.scm (define-command): Replace 'args-fold*' by 'parse-command-line'. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
* scripts: edit: Replace 'args-fold*' by 'parse-command-line'.zimoun2021-04-01
| | | | | | | * guix/scripts/edit.scm (define-command): Replace 'args-fold*' by 'parse-command-line'. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
* scripts: download: Replace 'args-fold*' by 'parse-command-line'.zimoun2021-04-01
| | | | | | | * guix/scripts/download.scm (define-command): Replace 'args-fold*' by 'parse-command-line'. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
* scripts: discover: Replace 'args-fold*' by 'parse-command-line'.zimoun2021-04-01
| | | | | | | * guix/scripts/discover.scm (define-command): Replace 'args-fold*' by 'parse-command-line'. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
* scripts: describe: Replace 'args-fold*' by 'parse-command-line'.zimoun2021-04-01
| | | | | | | * guix/scripts/describe.scm (define-command): Replace 'args-fold*' by 'parse-command-line'. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
* lint: Warn about single-character package names.Tobias Geerinckx-Rice via Bug reports for GNU Guix2021-04-01
| | | | | | | A common-sense exception is made for R. * guix/lint.scm (check-name): New procedure. (%local-checkers): Add it.
* scripts: Scripts that defaulted to -v2 now default to -v3.Ludovic Courtès2021-03-31
| | | | | | | | 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.
* status: Don't display download URLs for '--verbosity=1'.Ludovic Courtès2021-03-31
| | | | | | | | | | | | | 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.
* substitute: Emit a single newline upon completion.Ludovic Courtès2021-03-31
| | | | | | | | | 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.
* 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.
* scripts: import: cran: Add missing help for 'style' option.zimoun2021-03-29
| | | | | | | * guix/scripts/import/cran.scm (show-help): Add help message for 'style' option. Signed-off-by: Christopher Baines <mail@cbaines.net>
* Fix substitutes server discovery.Mathieu Othacehe2021-03-29
| | | | | | | This is a follow-up of bc3896db25c788c181c7bcd65754e7cd378e9d9f. * guix/scripts/substitute.scm (%local-substitute-urls): Test for "true" instead of "yes".
* gexp: 'gexp->script' uses #:guile also as the guile-for-build.Ludovic Courtès2021-03-29
| | | | | | | | 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'.
* gexp: Add #:guile parameter to 'load-path-expression'.Ludovic Courtès2021-03-29
| | | | * guix/gexp.scm (load-path-expression): Add #:guile parameter and honor it.
* gexp: 'imported+compiled-modules' fully honors #:guile.Ludovic Courtès2021-03-29
| | | | | * guix/gexp.scm (imported+compiled-modules): Pass #:guile to 'imported-modules'.
* build-system/julia: Turn on deprecation warnings.zimoun2021-03-29
| | | | | | * guix/build/julia-build-system.scm (check): Set option '--depwarn=yes'. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
* licenses: Add Free Art License 1.3.Felix Gruber2021-03-29
| | | | | | | * guix/licenses.scm (lal1.3): New variable. * guix/import/utils.scm (spdx-string->license): Add LAL-1.3. Signed-off-by: Guillaume Le Vaillant <glv@posteo.net>
* http-client: Don't drop failed query when reconnecting.Ludovic Courtès2021-03-28
| | | | | | | Reported by Christopher Baines <mail@cbaines.net>. * guix/http-client.scm (http-multiple-get): Change 2nd argument to 'drop' to PROCESSED when (false-if-networking-error ...) returns #f.
* http-client: 'http-multiple-get' is tail-recursive again.Ludovic Courtès2021-03-27
| | | | | | | | | | | | | | | Fixes <https://bugs.gnu.org/47283>. Commit 205833b72c5517915a47a50dbe28e7024dc74e57 made 'http-multiple-get' non-tail-recursive. Each recursive call would install an exception handler. As the number of iterations grows beyond 1,000, quadratic complexity of 'raise-exception' would show and we'd spend most of our time there. * guix/http-client.scm (false-if-networking-error): New macro. (http-multiple-get): Use it around 'write-request' and 'put-bytevector' calls, and around 'read-response' call, in lieu of the inline 'catch' forms.
* import: print: Improve origin method name guesswork.Ludovic Courtès2021-03-26
| | | | | | | | Fixes <https://bugs.gnu.org/47375>. Reported by Léo Le Bouter <lle-bout@zaclys.net>. * guix/import/print.scm (package->code): For METHOD, use 'variable-name' preferably, and call 'procedure-name' as a last resort.
* lint: archival: Gracefully handle packages with a #f hash value.Ludovic Courtès2021-03-26
| | | | | | | | Fixes <https://bugs.gnu.org/47293>. Reported by Luis Felipe. * guix/lint.scm (check-archival): Check whether 'content-hash-value' returns true.
* utils: Fix target-64bit? on powerpc64le-linux.Chris Marusich2021-03-23
| | | | | * guix/utils.scm (target-64bit?): Change the string from "ppc64" to "powerpc64", which matches Guix system names like "powerpc64le-linux".
* syscalls: Fix RNDADDTOENTCNT on powerpc64le-linux.Chris Marusich2021-03-23
| | | | | | | | | This fixes the failing test add-to-entropy-count in tests/syscalls.scm on powerpc64le-linux. * guix/build/syscalls.scm (RNDADDTOENTCNT): When %host-type starts with "powerpc64le", set this to #x80045201. Otherwise, set it to #x40045201 as before.
* syscalls: Fix clone on powerpc64le-linux.Chris Marusich2021-03-23
| | | | | | | This makes the clone procedure work correctly and fixes some test failures on powerpc64le-linux, including tests/containers.scm. * guix/build/syscalls.scm (clone): Add an entry for ppc64le.
* 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.
* utils: Add target-powerpc? procedure.Chris Marusich2021-03-23
| | | | * guix/utils.scm (target-powerpc?): New exported procedure.
* gnu-maintenance: Exclude GNU Radio from the 'gnu-ftp' updater predicate.Ludovic Courtès2021-03-21
| | | | | | | | 'gnu-ftp' would only list old GNU Radio releases since new releases are no longer uploaded to ftp.gnu.org. With this change, 'generic-html' is picked up instead. * guix/gnu-maintenance.scm (pure-gnu-package?): Return #f for GNU Radio.
* substitute: Choose compression method based on past CPU usage.Ludovic Courtès2021-03-21
| | | | | | | | | | | | | | | | | | This stems from the observation that substitute download can be CPU-bound when high-speed networks are in use: https://lists.gnu.org/archive/html/guix-devel/2020-12/msg00177.html * guix/narinfo.scm (decompresses-faster?): New procedure. (narinfo-best-uri): Add #:fast-decompression?. * guix/scripts/substitute.scm (%prefer-fast-decompression?): New variable. (call-with-cpu-usage-monitoring): New procedure. (with-cpu-usage-monitoring): New macro. (display-narinfo-data, process-substitution): Pass #:fast-decompression? to 'narinfo-best-uri'. (process-substitution): Wrap 'restore-file' call in 'with-cpu-usage-monitoring'. Set '%prefer-fast-decompression?'.
* 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.