aboutsummaryrefslogtreecommitdiff
path: root/guix/store.scm
Commit message (Expand)AuthorAge
* store: Use 'TCP_NODELAY' when connecting to a daemon over PF_INET.•••* guix/store.scm (open-inet-socket): Add 'cond-expand' form to define 'TCP_NODELAY' when needed. Add call to 'setsockopt' after 'connect'. Ludovic Courtès2017-05-07
* store: Use 'write-bytevector' instead of hand-coded equivalent.•••* guix/store.scm (process-stderr): Use 'write-bytevector' in the %STDERR-READ case. Ludovic Courtès2017-05-04
* store: Add store path computation procedures.•••* guix/derivations.scm (compressed-hash, store-path) (output-path, fixed-output-path): Move to... * guix/store.scm: ... here. Ludovic Courtès2017-05-04
* monads: Add a template and specialization mechanism for monadic procedures.•••* guix/monads.scm (%templates, %template-instances): New variables. (register-template!, register-template-instance!): New procedures. (template-directory, define-template): New macro. (foldm, sequence, anym): Define using 'define-template'. Avoid replace ellipses with dots. (mapm): Likewise, but do not use 'foldm'. * guix/store.scm: Add 'template-directory' invocation. Ludovic Courtès2017-05-02
* store: Support 'ssh://' URIs in 'GUIX_DAEMON_SOCKET'.•••This allows 'guix' commands to talk to a remote store over SSH. * guix/store.scm (connect-to-daemon)[connect]: Call 'resolve-interface' for unknown URI schemes. * guix/store/ssh.scm: New file. * Makefile.am (MODULES): Add it. * doc/guix.texi (The Store): Document it. Mark remote access as experimental. Ludovic Courtès2017-04-21
* store: Add support for remote connections via 'guix://' URIs.•••* guix/store.scm (open-inet-socket): New procedure. (connect-to-daemon): Support the 'guix' URI scheme. * doc/guix.texi (The Store): Document it. Ludovic Courtès2017-04-21
* store: Add 'system-error-to-connection-error' macro.•••* guix/store.scm (system-error-to-connection-error): New macro. (open-unix-domain-socket): Use it instead of 'catch'. Ludovic Courtès2017-04-21
* store: 'GUIX_DAEMON_SOCKET' can now be a URI.•••* guix/store.scm (%daemon-socket-file): Rename to... (%daemon-socket-uri): ... this. (connect-to-daemon): New procedure. (open-connection): Rename 'file' to 'uri'. Use 'connect-to-daemon' instead of 'open-unix-domain-socket'. * guix/tests.scm (open-connection-for-tests): Rename 'file' to 'uri'. * tests/guix-build.sh: Add tests. * tests/store.scm ("open-connection with file:// URI"): New tests. Ludovic Courtès2017-04-21
* utils: Move base16 procedures to (guix base16).•••* guix/utils.scm (bytevector->base16-string, base16-string->bytevector): Move to... * guix/base16.scm: ... here. New file. * tests/utils.scm ("bytevector->base16-string->bytevector"): Move to... * tests/base16.scm: ... here. New file. * Makefile.am (MODULES): Add guix/base16.scm. (SCM_TESTS): Add tests/base16.scm. * build-aux/download.scm, guix/derivations.scm, guix/docker.scm, guix/import/snix.scm, guix/pk-crypto.scm, guix/scripts/authenticate.scm, guix/scripts/download.scm, guix/scripts/hash.scm, guix/store.scm, tests/hash.scm, tests/pk-crypto.scm: Adjust imports accordingly. Ludovic Courtès2017-03-16
* store: Add 'add-data-to-store'.•••* guix/serialization.scm (write-bytevector): New procedure. (write-string): Rewrite in terms of 'write-bytevector'. * guix/store.scm (write-arg): Add 'bytevector' case. (add-data-to-store): New procedure, from former 'add-text-to-store'. (add-text-to-store): Rewrite in terms of 'add-data-to-store'. * tests/store.scm ("add-data-to-store"): New test. Ludovic Courtès2017-01-30
* Use 'mlambda' instead of 'memoize'.•••* gnu/packages.scm (find-newest-available-packages): Use 'mlambda' instead of (memoize (lambda ...) ...). * gnu/packages/bootstrap.scm (package-with-bootstrap-guile): Likewise. * guix/build-system/gnu.scm (package-with-explicit-inputs)[rewritten-input]: Likewise. * guix/build-system/python.scm (package-with-explicit-python)[transform]: Likewise. * guix/derivations.scm (derivation->string): Likewise. * guix/gnu-maintenance.scm (gnu-package?): Likewise. * guix/modules.scm (module-file-dependencies): Likewise. * guix/scripts/graph.scm (standard-package-set): Likewise. * guix/scripts/lint.scm (official-gnu-packages*): Likewise. * guix/store.scm (store-regexp*): Likewise. * guix/utils.scm (location): Likewise. Ludovic Courtès2017-01-28
* Add (guix memoization).•••* guix/combinators.scm (memoize): Remove. * guix/memoization.scm: New file. * Makefile.am (MODULES): Add it. * gnu/packages.scm, gnu/packages/bootstrap.scm, guix/build-system/gnu.scm, guix/build-system/python.scm, guix/derivations.scm, guix/gnu-maintenance.scm, guix/import/cran.scm, guix/import/elpa.scm, guix/modules.scm, guix/scripts/build.scm, guix/scripts/graph.scm, guix/scripts/lint.scm, guix/store.scm, guix/utils.scm: Adjust imports accordingly. Ludovic Courtès2017-01-28
* daemon: Client settings no longer override daemon settings.•••Fixes <http://bugs.gnu.org/20217>. * nix/libstore/worker-protocol.hh (PROTOCOL_VERSION): Bump to 0x161. * nix/nix-daemon/nix-daemon.cc (performOp): "build-max-jobs", "build-max-silent-time", and "build-cores" are no longer read upfront; instead, read them from the key/value list at the end. * nix/nix-daemon/guix-daemon.cc (main): Explicitly set 'settings.maxBuildJobs'. * guix/store.scm (%protocol-version): Bump to #x161. (set-build-options): #:max-build-jobs, #:max-silent-time, and #:build-cores now default to #f. Adjust handshake to new protocol. * tests/store.scm ("build-cores"): New test. * tests/guix-daemon.sh: Add test for default "build-cores" value. Ludovic Courtès2017-01-15
* store: 'open-connection' no longer raises '&nar-error' for protocol errors.•••* guix/store.scm (open-connection): Guard body against 'nar-error?' and re-raise as '&nix-connection-error'. * tests/store.scm ("connection handshake error"): New test. Ludovic Courtès2016-12-08
* store: Increase buffering for the '%stderr-write' upcall.•••* guix/store.scm (process-stderr) <%stderr-write>: Pass #:buffer-size to 'dump-port'. Ludovic Courtès2016-12-01
* store: 'open-connection' can taken an open port.•••* guix/store.scm (open-unix-domain-socket): New procedure. (open-connection): Add #:port parameter and honor it. Ludovic Courtès2016-11-25
* store: Add 'references*'.•••* guix/store.scm (references*): New procedure. * guix/profiles.scm (manifest-lookup-package)[references*]: Remove. * guix/scripts/system.scm (references*): Remove. * tests/gexp.scm ("gexp->file", "gexp->file + file-append") ("gexp->derivation", "gexp->derivation, cross-compilation") ("gexp->derivation, ungexp + ungexp-native") ("scheme-file", "text-file*", "mixed-text-file"): Remove 'references*' instead of (store-lift references). Ludovic Courtès2016-11-19
* daemon: Add 'built-in-builders' RPC.•••* nix/libstore/builtins.cc (builtinBuilderNames): New function. * nix/libstore/builtins.hh (builtinBuilderNames): New declaration. * nix/libstore/worker-protocol.hh (PROTOCOL_VERSION): Bump to 0x160. (WorkerOp)[wopBuiltinBuilders]: New value. * nix/nix-daemon/nix-daemon.cc (performOp): Handle it. * guix/store.scm (operation-id)[built-in-builders]: New value. * guix/store.scm (read-arg): Add 'string-list'. (built-in-builders): New procedure. * tests/derivations.scm ("built-in-builders"): New test. Ludovic Courtès2016-11-16
* Use (ice-9 binary-ports) instead of (rnrs io ports).•••This reduces the closure of (guix ui) from 123 to 106 modules. * guix/derivations.scm: Use (ice-9 binary-ports) instead of (rnrs io ports). (map-derivation)[substitute-file]: Use 'read-string' instead of 'get-string-all'. * guix/ftp-client.scm: Likewise. * guix/hash.scm: Likewise. * guix/http-client.scm: Likewise. * guix/pki.scm (ensure-acl, current-acl): Likewise. * guix/scripts/archive.scm (authorize-key)[read-key]: Likewise. * guix/scripts/authenticate.scm (read-canonical-sexp) (read-hash-data): Likewise. * guix/scripts/download.scm: Likewise. * guix/scripts/offload.scm (register-gc-root, remove-gc-roots) (send-files): Likewise. * guix/scripts/publish.scm (lazy-read-file-sexp): Likewise. * guix/scripts/refresh.scm: Likewise. * guix/scripts/substitute.scm (check-acl-initialized): Likewise. * guix/serialization.scm (read-maybe-utf8-string): Likewise. * guix/scripts/hash.scm (guix-hash): Use 'force-output' instead of 'flush-output-port'. * guix/store.scm (process-stderr): Likewise. * guix/tests.scm: Likewise. * guix/utils.scm: Use (ice-9 binary-ports) and autoload (rnrs io ports) for 'make-custom-binary-input-port'. Ludovic Courtès2016-10-19
* build: Substitute URLs now default to "mirror.hydra.gnu.org" alone.•••* config-daemon.ac: Remove "hydra.gnu.org" from 'guix_substitute_urls'. * guix/store.scm (%default-substitute-urls): Remove "hydra.gnu.org". Ludovic Courtès2016-07-16
* store: 'register-path' no longer swallows 'system-error' exceptions.•••* guix/store.scm (register-path): Do not catch 'system-error'. Ludovic Courtès2016-06-20
* store: Add #:select? parameter to 'add-to-store'.•••* guix/store.scm (write-arg): Remove 'file' case. (true): New procedure. (add-to-store): Add #:select? parameter and honor it. Use hand-coded stub instead of 'operation'. (interned-file): Add #:select? parameter and honor it. * doc/guix.texi (The Store Monad): Adjust 'interned-file' documentation accordingly. Ludovic Courtès2016-06-15
* store: 'requisites' now takes a list of store items.•••* guix/store.scm (fold-path): Change 'path' to 'paths' and adjust body accordingly. (requisites): Likewise. * guix/scripts/environment.scm (inputs->requisites): Adjust user accordingly. * guix/scripts/size.scm (requisites*): Likewise. * guix/scripts/gc.scm (guix-gc): Likewise. * tests/store.scm ("requisites"): Likewise. Ludovic Courtès2016-05-24
* store: Clarify 'query-path-hash' docstring.•••* guix/store.scm (query-path-hash): Clarify docstring. Ludovic Courtès2016-05-17
* utils: Move combinators to (guix combinators).•••* guix/utils.scm (compile-time-value, memoize, fold2) (fold-tree, fold-tree-leaves): Move to... * guix/combinators: ... here. New file. * tests/utils.scm ("fold2, 1 list", "fold2, 2 lists") (fold-tree tests): Move to... * tests/combinators.scm: ... here. New file. * Makefile.am (MODULES, SCM_TESTS): Add them. * gnu/packages.scm, gnu/packages/bootstrap.scm, gnu/services/herd.scm, guix/build-system/gnu.scm, guix/build-system/python.scm, guix/derivations.scm, guix/gnu-maintenance.scm, guix/import/elpa.scm, guix/scripts/archive.scm, guix/scripts/build.scm, guix/scripts/graph.scm, guix/scripts/lint.scm, guix/scripts/size.scm, guix/scripts/substitute.scm, guix/serialization.scm, guix/store.scm, guix/ui.scm: Adjust imports accordingly. Ludovic Courtès2016-05-04
* substitute: Install the client's locale.•••* guix/store.scm (set-build-options): Add #:locale parameter and honor it. * guix/scripts/substitute.scm (guix-substitute): Install the client's locale. Ludovic Courtès2016-04-20
* substitute: Honor the number of columns of the client terminal.•••* guix/store.scm (set-build-options): Add #:terminal-columns parameter and honor it. * guix/scripts/substitute.scm (client-terminal-columns): New procedure. (guix-substitute): Use it to parameterize 'current-terminal-columns'. Ludovic Courtès2016-04-15
* store: Prepend mirror.hydra.gnu.org to %DEFAULT-SUBSTITUTE-URLS.•••This allows GuixSD to default to the right list of URLs, with mirror.hydra.gnu.org coming first. Reported by Chris Marusich <cmmarusich@gmail.com>. * guix/store.scm (%default-substitute-urls): Prepend "mirror.hydra.gnu.org." Ludovic Courtès2016-03-28
* build: Default to "https://mirror.hydra.gnu.org/" for substitutes.•••* config-daemon.ac: Check for (gnutls) and define 'GUIX_SUBSTITUTE_URLS'. * nix/nix-daemon/guix-daemon.cc (main): Use GUIX_SUBSTITUTE_URLS. * guix/store.scm (%default-substitute-urls): Use 'https' when (gnutls) is available. * doc/guix.texi (Binary Installation): Mention mirrors (Invoking guix-daemon): Mention mirror.hydra.gnu.org. (Substitutes): Mention mirrors. (Invoking guix archive): Show https URLs. Ludovic Courtès2016-03-16
* store: 'references/substitutes' caches its results.•••* guix/store.scm (%reference-cache): New variable. (references/substitutes): Use it. Ludovic Courtès2016-03-14
* store: 'references/substitutes' correctly handles the order of substitutes.•••Before that, 'references/substitutes' would assume that 'substitutable-path-info' would return things in the same order as its arguments, which is not the case. Thus, it would sometimes provide incorrect reference information, occasionally leading to infinite loop (because dependency information would denote cycles.) Fixes <http://bugs.gnu.org/22914>. Reported by Eric Bavier <ericbavier@openmailbox.org>. * guix/store.scm (references/substitutes): Make ITEMS the first argument of the loop; match on it. Use 'any' to find a matching substitute. (substitutable-path-info): Clarify docstring about ordering. Ludovic Courtès2016-03-05
* store: Add 'references/substitutes'.•••* guix/store.scm (references/substitutes): New procedure. * tests/store.scm ("references/substitutes missing reference info") ("references/substitutes with substitute info"): New tests. Ludovic Courtès2016-03-05
* store: 'path-info-deriver' is #f when there is no deriver.•••* guix/store.scm (read-path-info): Use #f when we get the empty string for DERIVER. * guix/scripts/publish.scm (narinfo-string): Adjust accordingly. * tests/store.scm ("path-info-deriver"): New test. Ludovic Courtès2016-02-26
* store: Clarify documentation of 'valid-path?'.•••* guix/store.scm (valid-path?): Improve docstring. * doc/guix.texi (The Store): Update accordingly. Ludovic Courtès2016-02-25
* store: Add monadic access to '%current-system'.•••* guix/store.scm (current-system, set-current-system): New procedures. * tests/store.scm ("current-system"): New test. Ludovic Courtès2016-02-12
* store: Allow clients to request multiple builds.•••* guix/store.scm (set-build-options): Add #:rounds parameter and honor it. * tests/store.scm ("build multiple times"): New test. Ludovic Courtès2015-12-08
* store: 'build-things' now supports older daemon protocols.•••This is a followup to d203d3d. * guix/store.scm (build-things): Add 'build/old'. Use it when STORE's minor version is less than 15. Ludovic Courtès2015-12-04
* store: Add mode parameter to 'build-paths'.•••* guix/store.scm (%protocol-version): Set minor to 15. (build-mode): New enumerate type. (build-things): Add 'mode' parameter; pass it to the RPC. * tests/store.scm ("build-things, check mode"): New check. Ludovic Courtès2015-12-03
* store: Update to the new daemon protocol.•••* guix/store.scm (%protocol-version): Set minor to 14. (open-connection): Add 'cpu-affinity' parameter and honor it. Ludovic Courtès2015-12-03
* store: Use the daemon's substitute URLs by default.•••Partly fixes <http://bugs.gnu.org/20217>. * guix/store.scm (set-build-options): Change #:substitute-urls to default to #f. Send the 'substitute-urls' pair only if SUBSTITUTE-URLS is true. * guix/scripts/build.scm (set-build-options-from-command-line): Do not default to %DEFAULT-SUBSTITUTE-URLS for #:substitute-urls. * guix/scripts/size.scm (%default-options): Remove 'substitute-urls'. Ludovic Courtès2015-10-28
* store: Add 'query-failed-paths' and 'clear-failed-paths' RPCs.•••Suggested by Mark H Weaver <mhw@netris.org>. * guix/store.scm (query-failed-paths, clear-failed-paths): New procedures. * tests/guix-daemon.sh: Add test with daemon started with --cache-failures. Ludovic Courtès2015-09-28
* store: Add 'set-build-options*'.•••Suggested by: Ludovic Courtès <ludo@gnu.org>. * guix/store.scm (set-build-options*): New procedure. Alex Kost2015-09-18
* guix build: Add '--substitute-urls' client option.•••* guix/scripts/build.scm (%standard-build-options, show-build-options-help): Add --substitute-urls=URLS. (set-build-options-from-command-line): Honor it. * guix/store.scm (%default-substitute-urls): Make public. * doc/guix.texi (Substitutes): Add xref to the client --substitute-urls option. (Invoking guix build): Document it. (Invoking guix-daemon): Add 'daemon-substitute-urls' anchor. Ludovic Courtès2015-07-13
* store: 'run-with-store' initializes %CURRENT-TARGET-SYSTEM to #f.•••* guix/store.scm (run-with-store): Set %CURRENT-TARGET-SYSTEM to #f. * tests/gexp.scm ("gexp->derivation vs. %current-target-system"): New test. Ludovic Courtès2015-07-08
* store: Memoize 'add-to-store' based on the result of 'lstat', not 'stat'.•••* guix/store.scm (add-to-store): Change 'stat' call to 'lstat'. Clarify docstring. Ludovic Courtès2015-06-19
* store: Add 'verify-store' RPC.•••* guix/store.scm (operation-id): Add 'verify-store'. (verify-store): New procedure. (set-build-options): Adjust comment. * tests/store.scm ("verify-store", "verify-store + check-contents"): New tests. Ludovic Courtès2015-06-06
* gc: ignore trailing slash or subdirectories for `guix gc -d'•••Fixes <http://bugs.gnu.org/19757>. * guix/scripts/gc.scm (guix-gc): Convert paths to direct store paths. * guix/store.scm (direct-store-path): Get rid of subdirectories in store path. * tests/guix-gc.sh: New tests. Co-authored-by: Ludovic Courtès <ludo@gnu.org> Cyrill Schenkel2015-05-26
* store: Add 'optimize-store' RPC.•••* guix/store.scm (operation-id): Add 'optimize-store'. (optimize-store): New procedure. Ludovic Courtès2015-05-19
* store: Add query-path-info operation.•••* guix/store.scm (<path-info>): New record type. (read-path-info): New procedure. (read-arg): Add 'path-info' syntax. (query-path-info): New variable. * tests/store.scm ("query-path-info"): New test. David Thompson2015-04-04
* store: Default to a non-empty list of substituters.•••Fixes <http://bugs.gnu.org/20163>. Reported by Mark H Weaver <mhw@netris.org>. * guix/store.scm (%default-substitute-urls): New variable. (set-build-options): Change default value of #:substitute-urls to %DEFAULT-SUBSTITUTE-URLS. Ludovic Courtès2015-03-22