summaryrefslogtreecommitdiff
path: root/guix
Commit message (Collapse)AuthorAge
* gexp: 'gexp->script' uses #:guile also as the guile-for-build.Ludovic Courtès2021-03-30
| | | | | | | | 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-30
| | | | * guix/gexp.scm (load-path-expression): Add #:guile parameter and honor it.
* gexp: 'imported+compiled-modules' fully honors #:guile.Ludovic Courtès2021-03-30
| | | | | * guix/gexp.scm (imported+compiled-modules): Pass #:guile to 'imported-modules'.
* gexp: Do not add derivations to the object cache.Ludovic Courtès2021-03-30
| | | | | | | | | 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".
* gexp: Allowed/disallowed references and graphs never refer to grafted inputs.Ludovic Courtès2021-03-30
| | | | | | * guix/gexp.scm (lower-reference-graphs, lower-references): Wrap 'lower-object' call in 'without-grafting' since these things never refer to grafted inputs.
* grafts: Add 'without-grafting'.Ludovic Courtès2021-03-30
| | | | | * guix/grafts.scm (call-without-grafting): New procedure. (without-grafting): New macro.
* packages: Call 'bag-grafts' only on the tip of the package graph.Ludovic Courtès2021-03-30
| | | | | | | | | | | | 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.
* packages: 'expand-input' accepts any file-like object.Ludovic Courtès2021-03-30
| | | | | | * guix/packages.scm (expand-input)[valid?]: Remove. Call 'file-like?' instead of 'valid?'. Remove 'struct?' clause. * tests/packages.scm ("&package-input-error"): Adjust accordingly.
* packages: '%standard-patch-inputs' is not influenced by ↵Ludovic Courtès2021-03-30
| | | | | | | '%current-target-system'. * guix/packages.scm (%standard-patch-inputs): Parameterize %CURRENT-TARGET-SYSTEM around call to CANONICAL.
* build-system: Use 'input-tuples->gexp' and 'outputs->gexp'.Ludovic Courtès2021-03-30
| | | | | | | | * guix/gexp.scm (input-tuples->gexp, outputs->gexp): Make public. * guix/build-system/cargo.scm (cargo-build): Use them. * guix/build-system/gnu.scm (gnu-cross-build): Likewise. * guix/build-system/ocaml.scm (ocaml-build): Likewise. * guix/build-system/cmake.scm (cmake-cross-build): Likewise.
* build-system: Use 'sexp->gexp' for plain sexps.Ludovic Courtès2021-03-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reduces memory allocations and list traversals during 'gexp->sexp', 'gexp-inputs', etc. * guix/build-system/cargo.scm (cargo-build): Use 'sexp->gexp' for sexps known to not contain file-like objects. Change default #:phases to a symbol. * guix/build-system/cmake.scm (cmake-build, cmake-cross-build): Likewise. * guix/build-system/copy.scm (copy-build): Likewise. * guix/build-system/font.scm (font-build): Likewise. * guix/build-system/glib-or-gtk.scm (glib-or-gtk-build): Likewise. * guix/build-system/gnu.scm (%strip-flags, %strip-directories): New variables. (gnu-build): Use them. Use 'sexp->gexp' where appropriate. (gnu-cross-build): Likewise. * guix/build-system/meson.scm (meson-build): Likewise. * guix/build-system/perl.scm (perl-build): Likewise. * guix/build-system/python.scm (python-build): Likewise. * guix/build-system/ruby.scm (ruby-build): Likewise. * guix/build-system/scons.scm (scons-build): Likewise. * guix/build-system/texlive.scm (texlive-build): Likewise. * guix/build-system/trivial.scm (trivial-build): Likewise. * guix/build-system/waf.scm (waf-build): Likewise. * guix/build-system/android-ndk.scm (android-ndk-build): Likewise. * guix/build-system/ant.scm (ant-build): Likewise. * guix/build-system/asdf.scm (asdf-build/source, asdf-build): Likewise. * guix/build-system/chicken.scm (chicken-build): Likewise. * guix/build-system/clojure.scm (clojure-build): Likewise. (source->output-path, maybe-guile->guile): Remove. * guix/build-system/dub.scm (dub-build): Likewise. * guix/build-system/emacs.scm (emacs-build): Likewise. * guix/build-system/go.scm (go-build): Likewise. * guix/build-system/haskell.scm (haskell-build): Likewise. * guix/build-system/julia.scm (julia-build): Likewise. * guix/build-system/linux-module.scm (linux-module-build) (linux-module-build-cross): Likewise. * guix/build-system/maven.scm (maven-build): Likewise. * guix/build-system/minify.scm (minify-build): Likewise. * guix/build-system/node.scm (node-build): Likewise. * guix/build-system/qt.scm (qt-build, qt-cross-build): Likewise. * guix/build-system/r.scm (r-build): Likewise. * guix/build-system/rakudo.scm (rakudo-build): Likewise. * guix/build-system/renpy.scm (renpy-build): Likewise. * guix/packages.scm (patch-and-repack): Use 'sexp->gexp' when SNIPPET is a pair. * guix/svn-download.scm (svn-multi-fetch): Use 'sexp->gexp' for 'svn-multi-reference-locations'.
* gexp: Add 'sexp->gexp'.Ludovic Courtès2021-03-30
| | | | | * guix/gexp.scm (sexp->gexp): New procedure. * tests/gexp.scm ("sexp->gexp"): New test.
* packages: Default origin 'patch-flags' is a gexp.Ludovic Courtès2021-03-30
| | | | | | | | | | | Using a gexp instead of a list means that 'gexp->sexp' & co. do not need to scan that list for file-like objects. * guix/packages.scm (<origin>)[patch-flags]: Default to %DEFAULT-PATCH-FLAGS. (%default-patch-flags): New variable. (patch-and-repack): #:flags defaults to %DEFAULT-PATCH-FLAGS. (origin->derivation): Don't expect FLAGS to be a list.
* packages: Core procedures are written in monadic style.Ludovic Courtès2021-03-30
| | | | | | | | | | | | | | | | | | | | | This plays better with the functional object cache, which is no longer lost across calls to procedures created by 'store-lift'. * guix/packages.scm (input-graft, input-cross-graft): Remove 'store' parameter. Return a monadic procedure. (bag-grafts): Remove 'store' parameter and turn into a monadic procedure. (graft-derivation*): New procedure. (cached): Remove clause to match syntax without (=> CACHE). (package-grafts): Define using 'store-lower'. (package-grafts*): New procedure, from former 'package-grafts'. Remove 'store' parameter and turn into a monadic procedure. (package->derivation): Rewrite using 'mcached' and a monadic variant of the former 'package-derivation' procedure. (package->cross-derivation): Likewise. (package-derivation, package-cross-derivation): Rewrite in terms of 'store-lower'. (%graft-cache): Remove.
* packages: Simplify patch instantiation.Ludovic Courtès2021-03-30
| | | | | | * guix/packages.scm (patch-and-repack)[instantiate-patch]: Use 'local-file' instead of 'interned-file'. When PATCH is a struct, return it. Use 'let' instead of 'mlet'.
* packages: Turn 'bag->derivation' into a monadic procedure.Ludovic Courtès2021-03-30
| | | | | | | | | | | * guix/packages.scm (bag->derivation): Turn into a monadic procedure by remove 'store' parameter and removing the call to 'store-lower'. (bag->cross-derivation): Likewise. (bag->derivation*): New procedure. (package-derivation, package-cross-derivation): Use it instead of 'bag->derivation'. * tests/packages.scm ("bag->derivation"): Change to monadic style. ("bag->derivation, cross-compilation"): Likewise.
* build-system: Rewrite using gexps.Ludovic Courtès2021-03-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * guix/packages.scm (expand-input): Remove 'store', 'system', and 'cross-system' parameters; add #:native?. Rewrite to return name/gexp-input tuples. (bag->derivation): Adjust accordingly. Lower (bag-build bag). (bag->cross-derivation): Ditto. Instead of #:native-drvs and #:target-drvs, pass #:build-inputs, #:host-inputs, and #:target-inputs. (%derivation-cache): Remove. * gnu/packages/bootstrap.scm (raw-build): Turn into a monadic procedure. * gnu/packages/commencement.scm (glibc-final)[arguments]: Use 'gexp-input' for the #:allowed-references argument. * guix/build-system/cmake.scm (cmake-build): Remove 'store' parameter. Switch to the use of gexps and 'gexp->derivation'. (lower): Remove #:source from 'private-keywords'. * guix/build-system/glib-or-gtk.scm (glib-or-gtk-build, lower): Likewise. * guix/build-system/font.scm (font-build): Likewise. * guix/build-system/gnu.scm (gnu-build): Likewise, and remove 'canonicalize-reference'. (gnu-cross-build): Likewise, and expect #:build-inputs, #:host-inputs, and #:target-inputs instead of #:native-drvs and #:target-drvs. (lower): Likewise. * guix/build-system/perl.scm (perl-build, lower): Likewise. * guix/build-system/python.scm (python-build, lower): Likewise. * guix/build-system/ruby.scm (ruby-build, lower): Likewise. * guix/build-system/waf.scm (waf-build, lower): Likewise. * guix/build-system/trivial.scm (guile-for-build): Remove. (trivial-build): Remove 'store' parameter, change to gexps. (trivial-cross-build): Ditto, and change to #:build-inputs & co. * guix/build-system/cargo.scm (cargo-build): Change to 'gexp->derivation'. * guix/build-system/copy.scm (copy-build): Likewise. * guix/build-system/dune.scm (dune-build): Likewise. * guix/build-system/guile.scm (guile-build, guile-cross-build): Likewise. * guix/build-system/meson.scm (meson-build): Likewise. * guix/build-system/ocaml.scm (ocaml-build): Likewise. * guix/build-system/scons.scm (scons-build): Likewise. * guix/build-system/texlive.scm (texlive-build): Likewise. * guix/build-system/android-ndk.scm (android-ndk-build): Likewise. * guix/build-system/ant.scm (ant-build): Likewise. * guix/build-system/asdf.scm (asdf-build/source, asdf-build): Likewise. * guix/build-system/chicken.scm (chicken-build): Likewise. * guix/build-system/clojure.scm (clojure-build): Likewise. (source->output-path, maybe-guile->guile): Remove. * guix/build-system/dub.scm (dub-build): Likewise. * guix/build-system/emacs.scm (emacs-build): Likewise. * guix/build-system/go.scm (go-build): Likewise. * guix/build-system/haskell.scm (haskell-build): Likewise. * guix/build-system/julia.scm (julia-build): Likewise. * guix/build-system/linux-module.scm (linux-module-build) (linux-module-build-cross): Likewise. * guix/build-system/maven.scm (maven-build): Likewise. * guix/build-system/minify.scm (minify-build): Likewise. * guix/build-system/node.scm (node-build): Likewise. * guix/build-system/qt.scm (qt-build, qt-cross-build): Likewise. * guix/build-system/r.scm (r-build): Likewise. * guix/build-system/rakudo.scm (rakudo-build): Likewise. * guix/build-system/renpy.scm (renpy-build): Likewise. * tests/builders.scm ("gnu-build"): Call 'store-lower' on 'gnu-build'. Pass #:source parameter. * tests/packages.scm ("search paths"): Use 'abort-to-prompt' instead of a normal return from the 'build' method. ("package->bag, sensitivity to %current-target-system"): Change 'build' to match the new build system signature. squash! build-system: Rewrite using gexps. squash! build-system: Rewrite using gexps.
* gexp: Optimize 'with-build-variables'.Ludovic Courtès2021-03-30
| | | | | * guix/gexp.scm (input-tuples->gexp, outputs->gexp): New procedures. (with-build-variables): Use it.
* gexp: Add 'with-build-variables'.Ludovic Courtès2021-03-30
| | | | * guix/gexp.scm (with-build-variables): New procedure.
* Merge remote-tracking branch 'origin/master' into core-updatesEfraim Flashner2021-03-24
|\
| * 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.
| * download: 'tls-wrap' treats premature TLS termination as EOF.Ludovic Courtès2021-03-19
| | | | | | | | | | | | | | | | This is a backport of Guile commit 076276c4f580368b4106316a77752d69c8f1494a. * guix/build/download.scm (tls-wrap)[read!]: Wrap 'get-bytevector-n!' call in 'catch' and handle 'error/premature-termination' GnuTLS errors.
| * build-system/node: Remove unnecessary imports.Ludovic Courtès2021-03-19
| | | | | | | | * guix/build-system/node.scm: Remove unnecessary imports.
| * download: Autoload (guix build download).Ludovic Courtès2021-03-19
| | | | | | | | | | | | | | * guix/download.scm: Autoload (guix build download). (url-fetch): Rename to... (url-fetch*): ... this, locally, to allow for #:autoload. * guix/status.scm: Autoload (guix build download).
| * git-download: Autoload Guile-Git.Ludovic Courtès2021-03-19
| | | | | | | | * guix/git-download.scm: Autoload (git ...) modules.
| * guix package: Autoload Guile-JSON and (guix describe).Ludovic Courtès2021-03-19
| | | | | | | | | | | | * guix/scripts/build.scm: Autoload (guix import json). * guix/scripts/package.scm: Autoload (guix import json) and (guix describe).
| * guix describe: Autoload Guile-JSON.Ludovic Courtès2021-03-19
| | | | | | | | * guix/scripts/describe.scm: Autoload (json).
| * gnu-maintenance: Better handle empty #:directory for 'latest-html-release'.Ludovic Courtès2021-03-19
| | | | | | | | | | | | | | | | | | In particular, this makes sure we don't add a trailing slash when the user specified a 'release-monitoring-url' property for the 'generic-html' updater. * guix/gnu-maintenance.scm (latest-html-release): When DIRECTORY is empty, do not append it.
| * weather: Only show request statistics when requests were made.Christopher Baines2021-03-17
| | | | | | | | | | | | | | This avoids the script crashing if all data is fetched from the cache. * guix/scripts/weather.scm (report-server-coverage): Only show request statistics when some requests have been made.
| * import: gnome: Silence URL redirect messages.Ludovic Courtès2021-03-17
| | | | | | | | | | * guix/import/gnome.scm (latest-gnome-release): Pass #:log-port to 'http-fetch/cached'.
| * http-client: 'http-fetch' and 'http-fetch/cached' accept #:log-port.Ludovic Courtès2021-03-17
| | | | | | | | | | * guix/http-client.scm (http-fetch, http-fetch/cached): Add #:log-port and honor it.
| * import: gnome: Exclude version numbers that do not start with a digit.Ludovic Courtès2021-03-17
| | | | | | | | | | | | | | Fixes a bug whereby NetworkManager would be updated to version "rc2". * guix/import/gnome.scm (latest-gnome-release)[even-minor-version?]: Change catch-all case to return #f when the first part is not a digit.
| * scripts: weather: Provide more representative request statistics.Christopher Baines2021-03-17
| | | | | | | | | | | | | | | | | | | | Previously, the "seconds per request" and "requests per second" statistics really reported (cache lookups + requests) per second. By looking at the actual number of requests made within lookup-narinfos, a more representative value can be reported. * guix/scripts/weather.scm (let/time): Allow for multiple return values. (report-server-coverage): Alter the reporting of request statistics.
| * substitutes: lookup-narinfos: Return the number of requests made.Christopher Baines2021-03-17
| | | | | | | | | | | | | | | | | | As an additional value, in addition to the narinfos. This value is useful in the weather script for reporting how many requests to the substitute server were made. * guix/substitutes.scm (lookup-narinfos): Additionally return the number of requests made.
| * scripts: substitute: Tweak error reporting in process-substitution.Christopher Baines2021-03-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The call-with-connection-error-handling was added in 20c08a8a45d0f137ead7c05e720456b2aea44402, but that error handling was previously inside of open-connection-for-uri/maybe, which is related to (call-)with-cached-connection which was used in process-substitution, but only actually used with call-with-cached-connection when used in fetch-narinfos. There's some handling for similar errors within with-networking, which is used within process-substitution. * guix/scripts/substitute.scm (process-substitution): Remove call-with-connection-error-handling call.
| * scripts: substitute: Add back some error handling.Christopher Baines2021-03-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | In f50f5751fff4cfc6d5abba9681054569694b7a5c, the way fetch was called within process-substitution was changed. As call-with-cached-connection actually includes important error handling for the opening of a HTTP request, this change removed some error handling. This commit adds that back. Fixes <https://bugs.gnu.org/47157>. * guix/scripts/substitute.scm (call-with-cached-connection): New procedure. (with-cached-connection): New syntax rule. (process-substitution): Retry once for some errors when making HTTP requests to fetch substitutes.
| * gnu-maintenance: Add a timeout on FTP connection establishment.Ludovic Courtès2021-03-17
| | | | | | | | | | * guix/gnu-maintenance.scm (latest-ftp-release): Pass #:timeout to 'ftp-open'.
| * gnu-maintenance: Remove unused parameters of 'latest-ftp-release'.Ludovic Courtès2021-03-17
| | | | | | | | | | * guix/gnu-maintenance.scm (latest-ftp-release): Remove #:ftp-open, #:ftp-close, and #:keep-file?.
| * gnu-maintenance: Add 'generic-html' updater.Ludovic Courtès2021-03-17
| | | | | | | | | | | | | | | | | | | | | | This brings total updater coverage, as reported by 'guix refresh --list-updaters', from 78% to 88.3%. Among many other things, it covers freedesktop.org packages. * guix/gnu-maintenance.scm (html-updatable-package?) (latest-html-updatable-release): New procedures. (%generic-html-updater): New variable. * doc/guix.texi (Invoking guix refresh): Document it.
| * gnu-maintenance: 'latest-html-release' better computes version number.Ludovic Courtès2021-03-17
| | | | | | | | | | | | | | | | * guix/gnu-maintenance.scm (latest-html-release): Use 'tarball->version' rather than 'package-name->name+version' to extract the version number. This fixes problems with packages like 'netsurf' and 'libdom' that have "-src" in their tarball name, where "src" would be taken as the new version number.
| * gnu-maintenance: 'latest-html-release' can determine signature file name.Ludovic Courtès2021-03-17
| | | | | | | | | | | | | | | | | | | | | | * guix/gnu-maintenance.scm (latest-html-release): #:file->signature defaults to #f. [file->signature/guess]: New procedure. [url->release]: Use it when FILE->SIGNATURE is #f. Introduce 'links' variable. (url-prefix-rewrite): Check whether URL is true before calling 'string-prefix?'. (latest-savannah-release): Adjust comment about detached signatures.
| * gnu-maintenance: 'release-file?' rejects checksum files.Ludovic Courtès2021-03-17
| | | | | | | | | | * guix/gnu-maintenance.scm (release-file?): Reject ".md5sum", ".sha1sum", and ".sha256sum".
| * gnu-maintenance: 'latest-html-release' considers non-relative URLs.Ludovic Courtès2021-03-17
| | | | | | | | | | * guix/gnu-maintenance.scm (latest-html-release): Allow for URL to be an arbitrary URL rather than a relative URL reference.