summaryrefslogtreecommitdiff
path: root/guix
AgeCommit message (Collapse)Author
2019-09-08import: github: Fix incorrect no-release case.Ludovic Courtès
This is a followup to 81c3dc32244a17241d74eea9fa265edfcb326f6d. Since that commit, when /releases returned an empty JSON array, we would not fall back to /tags because of the incorrect match. * guix/import/github.scm (fetch-releases-or-tags): Match the empty vector instead of the empty list.
2019-09-08daemon: Invoke 'guix gc --list-busy' instead of 'list-runtime-roots'.Ludovic Courtès
* nix/scripts/list-runtime-roots.in: Remove. * guix/store/roots.scm (%proc-directory): New variable. (proc-file-roots, proc-exe-roots, proc-cwd-roots) (proc-fd-roots, proc-maps-roots, proc-environ-roots) (referenced-files, canonicalize-store-item, busy-store-items): New procedures, taken from 'list-runtime-roots.in'. * nix/libstore/globals.hh (Settings)[guixProgram]: New field. * nix/libstore/globals.cc (Settings::processEnvironment): Initialize 'guixProgram'. * nix/libstore/gc.cc (addAdditionalRoots): Drop code related to 'NIX_ROOT_FINDER'. Run "guix gc --list-busy". * nix/local.mk (nodist_pkglibexec_SCRIPTS): Remove 'scripts/list-runtime-roots'. * config-daemon.ac: Don't output nix/scripts/list-runtime-roots. * build-aux/pre-inst-env.in: Don't set 'NIX_ROOT_FINDER'. Set 'GUIX'. * doc/guix.texi (Invoking guix gc): Document '--list-busy'. * guix/scripts/gc.scm (show-help, %options): Add "--list-busy". (guix-gc)[list-busy]: New procedure. Handle the 'list-busy' action.
2019-09-05download: Pass 'http_proxy' et al. to git, hg, etc.Ludovic Courtès
This allows 'git-fetch' etc. origins to honor the proxy and locale of the daemon. * guix/bzr-download.scm (bzr-fetch): Pass #:leaked-env-vars to 'gexp->derivation'. * guix/cvs-download.scm (cvs-fetch): Likewise. * guix/git-download.scm (git-fetch): Likewise. * guix/hg-download.scm (hg-fetch): Likewise. * guix/svn-download.scm (svn-multi-fetch): Likewise.
2019-09-05build-system/asdf: Add option to compress programs.Pierre Neidhardt
* guix/build/lisp-utils.scm (build-program): Add `compress?' key argument. (generate-executable-for-system): Same. (generate-executable): Same.
2019-09-05build-system/julia: Avoid module cycles.Marius Bakke
* guix/build-system/julia.scm: Remove unused imports. (lower)[julia]: Default to (DEFAULT-JULIA).
2019-09-04build-system/julia: Fix syntax error.Ricardo Wurmus
* guix/build-system/julia.scm: Fix invalid module reference.
2019-09-04import: opam: Use propagated-inputs instead of inputs.Julien Lepiller
* guix/import/opam.scm (opam->guix-package): Use propagated-inputs instead of inputs.
2019-09-04import: opam: Remove initial "v" in some version numbers.Julien Lepiller
* guix/import/opam.scm (opam-fetch): Remove initial "v" in some version numbers.
2019-09-04build: Add julia-build-system.nixo
* guix/build/julia-build-system.scm: New file. * guix/build-system/julia.scm: New file. * Makefile.am (MODULES): Add them. * doc/guix.texi (Build Systems): Document julia-build-system. Signed-off-by: Julien Lepiller <julien@lepiller.eu>
2019-09-04import: crate: Correct interpretation of dual-licensing strings.Ludovic Courtès
* guix/import/crate.scm (%dual-license-rx): New variable. (crate->guix-package)[string->license]: Rewrite to match it. * tests/crate.scm (test-crate): Adjust "license" field to current practice.
2019-09-04import: crate: Separate crates.io API from actual conversion.Ludovic Courtès
This provides a clean separation between bindings to the https://crates.io/api/v1 API and actual conversion to Guix package sexps. As a side-effect, it fixes things like "guix import blake2-rfc", "guix refresh -t crates", etc. * guix/import/crate.scm (<crate>, <crate-version>, <crate-dependency>): New record types. (lookup-crate, crate-version-dependencies): New procedures. (crate-fetch): Remove. (crate->guix-package): Rewrite to use the new API. (latest-release): Likewise. * guix/build-system/cargo.scm (%crate-base-url): New variable. * tests/crate.scm (test-crate): Update accordingly. fixlet
2019-09-04ci: Use (guix json) and adjust for Guile-JSON 3.x.Ludovic Courtès
This is in part a followup to 81c3dc32244a17241d74eea9fa265edfcb326f6d. * guix/ci.scm (<build>, <checkout>, <evaluation>): Define using 'define-json-mapping'. (json->build, json->checkout, json->evaluation): Remove. (queued-builds, latest-builds, latest-evaluations): Pass JSON arrays through 'vector->list' to adjust for Guile-JSON 3.x. (evaluations-for-commit): Fix typo to really export.
2019-09-04Add (guix json).Ludovic Courtès
* guix/swh.scm (define-json-reader, define-json-mapping): Move to... * guix/json.scm: ... here. New file. * Makefile.am (MODULES): Add it.
2019-09-04deploy: Add missing store options.Ludovic Courtès
* guix/scripts/deploy.scm (%default-options): Add missing options such as 'print-build-trace?', etc.
2019-09-02lint: Add 'archival' checker.Ludovic Courtès
* guix/lint.scm (check-archival): New procedure. (%network-dependent-checkers): Add 'archival' checker. * tests/lint.scm ("archival: missing content") ("archival: content available") ("archival: missing revision") ("archival: revision available") ("archival: rate limit reached"): New tests. * doc/guix.texi (Invoking guix lint): Document it.
2019-09-02swh: Make 'commit-id?' public.Ludovic Courtès
* guix/swh.scm (commit-id?): Make public.
2019-09-02swh: Add hooks for rate limiting handling.Ludovic Courtès
* guix/swh.scm (%allow-request?, %save-rate-limit-reset-time) (%general-rate-limit-reset-time): New variables. (request-rate-limit-reached?, update-rate-limit-reset-time!): New procedures. (call): Call '%allow-request?'. Change 'swh-error' protocol to pass METHOD in addition to URL. * tests/swh.scm ("rate limit reached") ("%allow-request? and request-rate-limit-reached?"): New tests.
2019-09-02tests: 'with-http-server' accepts multiple responses.Ludovic Courtès
* guix/tests/http.scm (call-with-http-server): Replace 'code' and 'data' parameters with 'responses+data'. Compute RESPONSES as a function of that. Remove #:headers parameter. [http-write]: Quit only when RESPONSES is empty. [server-body]: Get the response and data from RESPONSES, and set it to point to the rest. (with-http-server): Adjust accordingly. * tests/derivations.scm ("'download' built-in builder") ("'download' built-in builder, invalid hash") ("'download' built-in builder, not found") ("'download' built-in builder, check mode"): Adjust to new 'with-http-server' interface. * tests/lint.scm ("home-page: 200") ("home-page: 200 but short length") ("home-page: 404", "home-page: 301, invalid"): ("home-page: 301 -> 200", "home-page: 301 -> 404") ("source: 200", "source: 200 but short length") ("source: 404", "source: 404 and 200") ("source: 301 -> 200", "source: 301 -> 404"): ("github-url", github-url): Likewise. * tests/swh.scm (with-json-result) ("lookup-origin, not found"): Likewise.
2019-09-02import: cran: Only use the git import with what looks like a URL.Ricardo Wurmus
* guix/import/cran.scm (fetch-description): Abort if the argument does not look like a URL.
2019-09-02import: cran: Retry failed git imports on Bioconductor.Ricardo Wurmus
* guix/import/cran.scm (cran->guix-package): Retry failed git imports on Bioconductor.
2019-09-02build/cargo-build-system: Use invoke.Efraim Flashner
* guix/build/cargo-build-system.scm (crate-src?, build, check, install): Use 'invoke'.
2019-08-31lint: Gracefully handle errors from 'connect' & co.Ludovic Courtès
* guix/lint.scm (call-with-networking-fail-safe): Add case for 'system-error' as typically raised by 'connect' & co.
2019-08-30guix system: Reinstalling the bootloader preserves extra menu entries.Ludovic Courtès
Fixes <https://bugs.gnu.org/36876>. Reported by Jesse Gibbons <jgibbons2357@gmail.com>. Previously 'guix system delete-generations' or 'switch-generation' would lose the extra bootloader menu entries specified in the current system's configuration. This fixes that. * guix/scripts/system.scm (reinstall-bootloader): Turn PARAMS into a single <boot-parameters>. Adjust ENTRIES to include extra menu entries specified in PARAMS.
2019-08-30lint: formatting: Reporters return #f or a warning.Ludovic Courtès
* guix/lint.scm (report-tabulations, report-trailing-white-space) (report-long-line, report-lone-parentheses): Return #f instead of *unspecified* when there are no warnings. (report-formatting-issues): Use 'filter-map' instead of 'map' + 'filter'.
2019-08-29import: cran: Add support for git repositories.Ricardo Wurmus
* guix/import/cran.scm (vcs-file?): New procedure. (download): Support downloading from git. (fetch-description): Add a clause for the 'git repository type. (files-match-pattern?): New procedure. (tarball-files-match-pattern?): Implement in terms of FILES-MATCH-PATTERN?. (directory-needs-fortran?, directory-needs-zlib?, directory-needs-pkg-config?): New procedures. (needs-fortran?, needs-zlib?, needs-pkg-config?): Rename these procedures... (tarball-needs-fortran?, tarball-needs-zlib?, tarball-needs-pkg-config?): ...to this, and use them. (file-hash): New procedure. (description->package): Handle the 'git repository type. * guix/import/utils.scm (package->definition): Handle package expression inside of a let. * guix/scripts/import.scm (guix-import): Handle let expressions. * doc/guix.texi (Invoking guix import): Document it.
2019-08-29import: cran: guix-import-cran: Use (guix import utils).Ricardo Wurmus
* guix/scripts/import/cran.scm (guix-import-cran): Use PACKAGE->DEFINITION from (guix import utils) instead of custom procedure.
2019-08-28deploy: Do not quote error messages.Ludovic Courtès
* guix/scripts/deploy.scm (guix-deploy): Do not quote the message.
2019-08-28remote, ssh: Show the command exit status upon failure.Ludovic Courtès
* guix/remote.scm (remote-pipe-for-gexp): Show the exit status in error message. * guix/ssh.scm (remote-inferior): Likewise.
2019-08-28diagnostics: Avoid highlighting complete messages.Ludovic Courtès
* guix/diagnostics.scm (%highlight-argument): Don't highlight ARG if it contains white space.
2019-08-28lint: Log diagnostics with 'info', not 'warning'.Ludovic Courtès
* guix/scripts/lint.scm (emit-warnings): Use 'info', not 'warning'. This removes the unhelpful "warning:" prefix that commit 3d33c93cef67d88bdc9409959f3c1f3857af09cf introduced.
2019-08-28swh: Correctly handle visits without a snapshot.Ludovic Courtès
As discussed at <https://sympa.inria.fr/sympa/arc/swh-devel/2019-08/msg00016.html>. * guix/swh.scm (string*): New procedure. (<visit>)[snapshot-url]: Pass 'string*' as the conversion procedure. [status]: Pass 'string->symbol' as the conversion procedure. (visit-snapshot): Return #f when 'visit-snapshot-url' returns #f. (lookup-origin-revision): Filter to visits for which 'visit-snapshot-url' is true.
2019-08-28swh: 'swh-download' prints debugging info.Ludovic Courtès
* guix/git-download.scm (git-fetch): Print a message before calling 'swh-download'. * guix/swh.scm (swh-download): Add #:log-port. Write debugging messages to LOG-PORT.
2019-08-28build/cargo-build-system: Remove 'update-cargo-lock phase.Efraim Flashner
* guix/build/cargo-build-system.scm (update-cargo-lock): Remove procedure. (configure): Delete Cargo.lock file if it exists. (%standard-phases): Remove 'update-cargo-lock. * doc/guix.texi (Build System)[cargo-build-system]: Remove references to the 'update-cargo-lock phase.
2019-08-28lint: Correct use of 'with-networking-fail-safe'.Ludovic Courtès
Fixes <https://bugs.gnu.org/37160>. Reported by Jonathan Brielmaier <jonathan.brielmaier@web.de>. * guix/lint.scm (check-for-updates): Make sure the first argument to 'with-networking-fail-safe' is the whole error message.
2019-08-27pack: Create /tmp in Docker images.Ludovic Courtès
Fixes <https://bugs.gnu.org/37161>. * guix/scripts/pack.scm (docker-image)[build]: Add a 'directory' entry for "/tmp" to DIRECTIVES. * tests/pack.scm ("docker-image + localstatedir"): Test the presence of /tmp. * gnu/tests/docker.scm (run-docker-test)["Load docker image and run it"]: Test the presence and permission bits of "/tmp".
2019-08-27docker: Take a list of directives instead of a list of symlinks.Ludovic Courtès
* guix/docker.scm (symlink-source, topmost-component): Remove. (directive-file): New procedure. (build-docker-image): Remove #:symlinks and add #:extra-files. Make a sub-directory "extra" and call 'evaluate-populate-directive' for EXTRA-FILES in that directory. * guix/scripts/pack.scm (docker-image)[build](symlink->directives, directives): New procedures. Pass #:extra-files instead of #:symlinks to 'build-docker-image'.
2019-08-27import: github: 'github-package?' uses 'package-upstream-name'.Ludovic Courtès
* guix/import/github.scm (updated-github-url): Use 'package-upstream-name' instead of 'package-name'. This allows 'github-package?' to match more packages, given an appropriate upstream name.
2019-08-26Merge branch 'wip-binaries'Mark H Weaver
2019-08-26packages: Apply target triplet in bag-transitive-host-inputs.David Thompson
Fixes a bug where propagated inputs that should be cross-compiled are instead compiled for the host system. * guix/packages.scm (bag-transitive-host-inputs): Call transitive-inputs in the context of the bag's target system triplet.
2019-08-23swh: 'swh-download' checks return value of 'vault-fetch'.Ludovic Courtès
Reported by Björn Höfling <bjoern.hoefling@bjoernhoefling.de> in <https://bugs.gnu.org/36931>. * guix/swh.scm (swh-download): Check whether 'vault-fetch' return false before calling 'dump-port'.
2019-08-23pack: '-R' honors the requested output.Ludovic Courtès
Fixes <https://bugs.gnu.org/36925>. Reported by Jesse Gibbons <jgibbons2357@gmail.com>. * guix/scripts/pack.scm (wrapped-package): Add 'output*' parameter. [build]: Define 'input' and 'target'; use them instead of #$package and #$output, respectively. (wrapped-manifest-entry): New procedure. (map-manifest-entries): Call PROC directly. (guix-pack): Pass WRAPPED-MANIFEST-ENTRY to 'map-manifest-entries'.
2019-08-22Revert "import: utils: Add hash-ref*."Mark H Weaver
This reverts commit 8a3b11d1eb21e54b4f3a3cbceffed8ce2c11512e.
2019-08-22Revert "import: cpan: Adapt for the change to guile-json version 3."Mark H Weaver
This reverts commit 01ce7af25add55514f737af48ea6c127bedfde67.
2019-08-21import: cpan: Adapt for the change to guile-json version 3.Christopher Baines
In guile-json version 3, JSON objects are represented as hash tables, rather than alists. * guix/import/cpan.scm (string->license): Change the match expression to match on lists, rather than vectors. (module->dist-name, cpan-source-url, cpan-version): Change assoc-ref to hash-ref. (cpan-module->sexp): Change assoc-ref to hash-ref, and assoc-ref* to hash-ref*. * tests/cpan.scm ("source-url-http", "source-url-https"): Convert the alist to a hash table.
2019-08-21import: utils: Add hash-ref*.Christopher Baines
With the change to guile-json version 3, JSON objects are represented as hash tables, rather than alists. The cpan importer uses assoc-ref* on a hash table, so add an equivalent function for hash tables. * guix/import/utils.scm (hash-ref*): New procedure.
2019-08-17upstream: Gracefully handle archive type changes.Ludovic Courtès
Previously, if the currently used archive type (e.g., "bz2") was unavailable for the new version, 'guix refresh -u' would crash instead of updating to the archive with the new type. * guix/upstream.scm (package-update/url-fetch): When URL is #f, pick the first of URLS; likewise for SIGNATURE-URL.
2019-08-17refresh: Use the standard diagnostic procedures.Ludovic Courtès
* guix/scripts/refresh.scm (warn-no-updater): Use 'warning' instead of 'format'. (update-package): Use 'info' and 'warning' instead of 'format'.
2019-08-17import: gnome: Update for Guile-JSON 3.x.Ludovic Courtès
This is a followup to 81c3dc32244a17241d74eea9fa265edfcb326f6d. * guix/import/gnome.scm (jsonish->upstream-source): Use 'assoc-ref' instead of 'hash-ref'. (latest-gnome-release): Match a vector containing an alist, not a hash table. Use 'fold' instead of 'hash-fold' over RELEASES.
2019-08-17derivations: Fix typo in docstring.Ludovic Courtès
* guix/derivations.scm (derivation-build-plan): Fix typo in the docstring.
2019-08-16derivations: Delete duplicate inputs when computing derivation hash.Ludovic Courtès
Fixes <https://bugs.gnu.org/36777>. Reported by Carl Dong <contact@carldong.me>. * guix/derivations.scm (derivation/masked-inputs): Call 'delete-duplicates' on INPUTS. * tests/derivations.scm ("derivation with duplicate fixed-output inputs"): New test.