summaryrefslogtreecommitdiff
path: root/guix/store.scm
Commit message (Collapse)AuthorAge
* store: Prepend mirror.hydra.gnu.org to %DEFAULT-SUBSTITUTE-URLS.Ludovic Courtès2016-03-28
| | | | | | | | | | 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."
* build: Default to "https://mirror.hydra.gnu.org/" for substitutes.Ludovic Courtès2016-03-16
| | | | | | | | | | | * 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.
* store: 'references/substitutes' caches its results.Ludovic Courtès2016-03-14
| | | | | * guix/store.scm (%reference-cache): New variable. (references/substitutes): Use it.
* store: 'references/substitutes' correctly handles the order of substitutes.Ludovic Courtès2016-03-05
| | | | | | | | | | | | | | | 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.
* store: Add 'references/substitutes'.Ludovic Courtès2016-03-05
| | | | | | * guix/store.scm (references/substitutes): New procedure. * tests/store.scm ("references/substitutes missing reference info") ("references/substitutes with substitute info"): New tests.
* store: 'path-info-deriver' is #f when there is no deriver.Ludovic Courtès2016-02-26
| | | | | | | * 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.
* store: Clarify documentation of 'valid-path?'.Ludovic Courtès2016-02-25
| | | | | * guix/store.scm (valid-path?): Improve docstring. * doc/guix.texi (The Store): Update accordingly.
* store: Add monadic access to '%current-system'.Ludovic Courtès2016-02-12
| | | | | * guix/store.scm (current-system, set-current-system): New procedures. * tests/store.scm ("current-system"): New test.
* store: Allow clients to request multiple builds.Ludovic Courtès2015-12-08
| | | | | * guix/store.scm (set-build-options): Add #:rounds parameter and honor it. * tests/store.scm ("build multiple times"): New test.
* store: 'build-things' now supports older daemon protocols.Ludovic Courtès2015-12-04
| | | | | | | 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.
* store: Add mode parameter to 'build-paths'.Ludovic Courtès2015-12-03
| | | | | | | * 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.
* store: Update to the new daemon protocol.Ludovic Courtès2015-12-03
| | | | | * guix/store.scm (%protocol-version): Set minor to 14. (open-connection): Add 'cpu-affinity' parameter and honor it.
* store: Use the daemon's substitute URLs by default.Ludovic Courtès2015-10-28
| | | | | | | | | | | 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'.
* store: Add 'query-failed-paths' and 'clear-failed-paths' RPCs.Ludovic Courtès2015-09-28
| | | | | | | | | 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.
* store: Add 'set-build-options*'.Alex Kost2015-09-18
| | | | | | Suggested by: Ludovic Courtès <ludo@gnu.org>. * guix/store.scm (set-build-options*): New procedure.
* guix build: Add '--substitute-urls' client option.Ludovic Courtès2015-07-13
| | | | | | | | | | | * 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.
* store: 'run-with-store' initializes %CURRENT-TARGET-SYSTEM to #f.Ludovic Courtès2015-07-08
| | | | | * guix/store.scm (run-with-store): Set %CURRENT-TARGET-SYSTEM to #f. * tests/gexp.scm ("gexp->derivation vs. %current-target-system"): New test.
* store: Memoize 'add-to-store' based on the result of 'lstat', not 'stat'.Ludovic Courtès2015-06-19
| | | | | * guix/store.scm (add-to-store): Change 'stat' call to 'lstat'. Clarify docstring.
* store: Add 'verify-store' RPC.Ludovic Courtès2015-06-06
| | | | | | | | * 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.
* gc: ignore trailing slash or subdirectories for `guix gc -d'Cyrill Schenkel2015-05-26
| | | | | | | | | | 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>
* store: Add 'optimize-store' RPC.Ludovic Courtès2015-05-19
| | | | | * guix/store.scm (operation-id): Add 'optimize-store'. (optimize-store): New procedure.
* store: Add query-path-info operation.David Thompson2015-04-04
| | | | | | | | * 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.
* store: Default to a non-empty list of substituters.Ludovic Courtès2015-03-22
| | | | | | | | | 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.
* store: Remove debugging leftover.Ludovic Courtès2015-03-18
| | | | | * guix/store.scm (set-build-options): Remove leftover 'pk' call from 41c45e7.
* store: Add preliminary support for client-supplied substitute URLs.Ludovic Courtès2015-03-18
| | | | | | | | * guix/store.scm (set-build-options): Rename #:binary-caches to #:substitute-urls. Actually pass it in 'pairs' under the "substitute-urls" key. * guix/scripts/substitute-binary.scm (%cache-url): Add comment for "untrusted-substitute-urls".
* store: Attempt to decode build logs as UTF-8.Ludovic Courtès2015-03-05
| | | | | | | * guix/serialization.scm (read-maybe-utf8-string): New procedure. * guix/store.scm (process-stderr): Use it for the build log and errors. * tests/store.scm ("current-build-output-port, UTF-8", "current-build-output-port, UTF-8 + garbage"): New tests.
* store: Add optional 'references' parameter to 'text-file'.Ludovic Courtès2015-02-12
| | | | | | * guix/store.scm (text-file): Add optional 'references' parameter. Pass it to 'add-text-to-store'. * doc/guix.texi (The Store Monad): Adjust accordingly.
* store: Remove 'build-derivations'.Ludovic Courtès2015-02-02
| | | | | | | * guix/store.scm (build-derivations): Remove. * guix/derivations.scm (build-derivations): Write in terms of 'build-things'. * doc/guix.texi (Invoking guix build): Adjust text accordingly.
* store: Add 'build-things'.Ludovic Courtès2015-02-02
| | | | | | | | | | * guix/store.scm (operation-id): Rename 'build-derivations' to 'build-things', as per Nix commit 1aba0bf0. (build-derivations): Rename to... (build-things): ... this. Keep 'build-derivations' as an alias. (build): New procedure. * tests/store.scm ("build-things with output path", "substitute + build-things with output path"): New tests.
* store: Change 'run-with-store' to return a single value.Ludovic Courtès2015-01-21
| | | | | * guix/store.scm (run-with-store): Wrap 'run-with-state' in 'call-with-values'. Return only the first value.
* store: Change 'store-lower' to preserve the original procedure's documentation.Ludovic Courtès2015-01-18
| | | | | * guix/store.scm (preserve-documentation): New procedure. (store-lift, store-lower): Use it.
* store: Make '%store-monad' an alias for '%state-monad'.Ludovic Courtès2015-01-17
| | | | | | | | | | | | * guix/store.scm (define-alias): New macro. (%store-monad, store-return, store-bind): Define as aliases of the corresponding %STATE-MONAD part. (store-lift, text-file, interned-file): Return STORE as a second value. (run-with-store): Use 'run-with-state'. * guix/packages.scm (set-guile-for-build, package-file): Return STORE as a second value. * guix/monads.scm: Remove part of the module commentary.
* store: Remove unused variable.Ludovic Courtès2015-01-17
| | | | * guix/store.scm (export-paths): Remove unused variable 's'.
* store: Add #:recursive? parameter to 'export-paths'.Ludovic Courtès2015-01-17
| | | | | | | * guix/store.scm (export-paths): Add #:recursive? parameter and honor it. * tests/store.scm ("export/import incomplete", "export/import recursive"): New tests.
* store: Add 'store-lower'.Ludovic Courtès2015-01-14
| | | | | * guix/store.scm (store-lower): New procedure. * tests/store.scm ("store-lower"): New test.
* monads: Move '%store-monad' and related procedures where they belong.Ludovic Courtès2015-01-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This turns (guix monads) into a generic module for monads, and moves the store monad and related monadic procedures in their corresponding module. * guix/monads.scm (store-return, store-bind, %store-monad, store-lift, text-file, interned-file, package-file, package->derivation, package->cross-derivation, origin->derivation, imported-modules, compiled, modules, built-derivations, run-with-store): Move to... * guix/store.scm (store-return, store-bind, %store-monad, store-lift, text-file, interned-file): ... here. (%guile-for-build): New variable. (run-with-store): Moved from monads.scm. Remove default value for #:guile-for-build. * guix/packages.scm (default-guile): Export. (set-guile-for-build): New procedure. (package-file, package->derivation, package->cross-derivation, origin->derivation): Moved from monads.scm. * guix/derivations.scm (%guile-for-build): Remove. (imported-modules): Rename to... (%imported-modules): ... this. (compiled-modules): Rename to... (%compiled-modules): ... this. (built-derivations, imported-modules, compiled-modules): New procedures. * gnu/services/avahi.scm, gnu/services/base.scm, gnu/services/dbus.scm, gnu/services/dmd.scm, gnu/services/networking.scm, gnu/services/ssh.scm, gnu/services/xorg.scm, gnu/system/install.scm, gnu/system/linux-initrd.scm, gnu/system/shadow.scm, guix/download.scm, guix/gexp.scm, guix/git-download.scm, guix/profiles.scm, guix/svn-download.scm, tests/monads.scm: Adjust imports accordingly. * guix/monad-repl.scm (default-guile-derivation): New procedure. (store-monad-language, run-in-store): Use it. * build-aux/hydra/gnu-system.scm (qemu-jobs): Add explicit 'set-guile-for-build' call. * guix/scripts/archive.scm (derivation-from-expression): Likewise. * guix/scripts/build.scm (options/resolve-packages): Likewise. * guix/scripts/environment.scm (guix-environment): Likewise. * guix/scripts/system.scm (guix-system): Likewise. * doc/guix.texi (The Store Monad): Adjust module names accordingly.
* store: default to serial "scheduler"nebuli2014-11-23
| | | | | | * guix/store.scm (set-build-options): exchange default argument values Signed-off-by: Ludovic Courtès <ludo@gnu.org>
* store: Invalidate caches once GC has run.Ludovic Courtès2014-11-04
| | | | | | * guix/store.scm (run-gc): Add calls to 'hash-clear!'. * tests/store.scm ("add-text-to-store vs. delete-paths", "add-to-store vs. delete-paths"): New tests.
* Break module cycle involving (guix store) and (guix ui).Ludovic Courtès2014-10-09
| | | | | | | | | | | | | | | | | | | | Before, there was a cycle along the lines of: (guix store) -> (guix nar) -> (guix ui) -> (guix store) This caused problems, as discussed at: http://lists.gnu.org/archive/html/guix-devel/2014-10/msg00109.html This patch removes cycles in the (guix ...) modules. * guix/nar.scm (&nar-error, &nar-read-error, dump, write-contents, read-contents, %archive-version-1, write-file, restore-file): Move to... * guix/serialization.scm: ... here. * guix/store.scm: Remove dependency on (guix nar). * guix/scripts/hash.scm, guix/scripts/offload.scm, guix/scripts/substitute-binary.scm, tests/nar.scm, tests/store.scm, tests/substitute-binary.scm: Adjust accordingly.
* guix-register: Add '--state-directory' parameter.Ludovic Courtès2014-07-18
| | | | | | | | * nix/guix-register/guix-register.cc (GUIX_OPT_STATE_DIRECTORY): New macro. (parse_opt): Honor it. * tests/guix-register.sh: Add test with '--state-directory'. * guix/store.scm (register-path): Add #:state-directory parameter.
* store: Work around 'get-bytevector-n' bug that affects 'import-paths'.Ludovic Courtès2014-05-27
| | | | | | | Fixes <http://bugs.gnu.org/17591>. * guix/store.scm (process-stderr) <%stderr-read>: Use 'get-bytevector-n!' instead of 'get-bytevector-n'.
* store: Remove misleading 'setsockopt' call.Ludovic Courtès2014-05-25
| | | | | | | * guix/store.scm (open-connection): Remove misleading 'setsockopt' call, erroneously introduced in df1fab58. This would actually shrink the receive buffer from 124 KiB to 12 KiB, though it had little impact on performance.
* store: Flush the output when the build process emits '\r'.Ludovic Courtès2014-05-21
| | | | | | | | | This allows progress reports emitted by 'substitute-binary' to be correctly displayed. * guix/store.scm (%newlines): New variable. (process-stderr) <%stderr-next>: Flush (current-build-output-port) when S contains one of %NEWLINES.
* store: Change #:store parameter to #:prefix.Ludovic Courtès2014-05-18
| | | | * guix/store.scm (register-path): Change #:store to #:prefix.
* store: Add #:store parameter to 'register-path'.Ludovic Courtès2014-05-17
| | | | * guix/store.scm (register-path): Add #:store and honor it.
* store: (direct-store-path? (%store-prefix)) returns #f.Ludovic Courtès2014-04-28
| | | | | | * guix/store.scm (direct-store-path?): Return #f if PATH is (%store-prefix). * tests/store.scm ("direct-store-path?"): Add test.
* store: Add 'add-permanent-root' and 'remove-permanent-root'.Ludovic Courtès2014-04-12
| | | | | | | * guix/store.scm (add-indirect-root): Improve docstring. (%gc-roots-directory): New variable. (add-permanent-root, remove-permanent-root): New procedures. * tests/store.scm ("permanent root"): New test.
* store: Add 'hash-part->path'.Ludovic Courtès2014-03-14
| | | | | * guix/store.scm (hash-part->path): New procedure. * tests/store.scm ("hash-part->path"): New test.
* store: Add #:timeout build option.Ludovic Courtès2014-03-09
| | | | | | | | * guix/serialization.scm (write-string-pairs): New procedure. * guix/store.scm (write-arg): Add 'string-pairs' case. (set-build-options): Add 'timeout' keyword parameter. Honor it. * tests/derivations.scm ("build-expression->derivation and timeout"): New test.
* build: Change state and log directories to $localstatedir/.../guix.Ludovic Courtès2014-03-09
| | | | | | * daemon.am (libstore_a_CPPFLAGS): Change /nix to /guix. * guix/config.scm.in (%state-directory): Likewise. * guix/store.scm (log-file): Likewise.