summaryrefslogtreecommitdiff
path: root/guix/store.scm
AgeCommit message (Collapse)Author
2015-07-13guix build: Add '--substitute-urls' client option.Ludovic Courtès
* 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.
2015-07-08store: 'run-with-store' initializes %CURRENT-TARGET-SYSTEM to #f.Ludovic Courtès
* guix/store.scm (run-with-store): Set %CURRENT-TARGET-SYSTEM to #f. * tests/gexp.scm ("gexp->derivation vs. %current-target-system"): New test.
2015-06-19store: Memoize 'add-to-store' based on the result of 'lstat', not 'stat'.Ludovic Courtès
* guix/store.scm (add-to-store): Change 'stat' call to 'lstat'. Clarify docstring.
2015-06-06store: Add 'verify-store' RPC.Ludovic Courtès
* 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.
2015-05-26gc: ignore trailing slash or subdirectories for `guix gc -d'Cyrill Schenkel
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>
2015-05-19store: Add 'optimize-store' RPC.Ludovic Courtès
* guix/store.scm (operation-id): Add 'optimize-store'. (optimize-store): New procedure.
2015-04-04store: Add query-path-info operation.David Thompson
* 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.
2015-03-22store: Default to a non-empty list of substituters.Ludovic Courtès
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.
2015-03-18store: Remove debugging leftover.Ludovic Courtès
* guix/store.scm (set-build-options): Remove leftover 'pk' call from 41c45e7.
2015-03-18store: Add preliminary support for client-supplied substitute URLs.Ludovic Courtès
* 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".
2015-03-05store: Attempt to decode build logs as UTF-8.Ludovic Courtès
* 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.
2015-02-12store: Add optional 'references' parameter to 'text-file'.Ludovic Courtès
* guix/store.scm (text-file): Add optional 'references' parameter. Pass it to 'add-text-to-store'. * doc/guix.texi (The Store Monad): Adjust accordingly.
2015-02-02store: Remove 'build-derivations'.Ludovic Courtès
* 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.
2015-02-02store: Add 'build-things'.Ludovic Courtès
* 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.
2015-01-21store: Change 'run-with-store' to return a single value.Ludovic Courtès
* guix/store.scm (run-with-store): Wrap 'run-with-state' in 'call-with-values'. Return only the first value.
2015-01-18store: Change 'store-lower' to preserve the original procedure's documentation.Ludovic Courtès
* guix/store.scm (preserve-documentation): New procedure. (store-lift, store-lower): Use it.
2015-01-17store: Make '%store-monad' an alias for '%state-monad'.Ludovic Courtès
* 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.
2015-01-17store: Remove unused variable.Ludovic Courtès
* guix/store.scm (export-paths): Remove unused variable 's'.
2015-01-17store: Add #:recursive? parameter to 'export-paths'.Ludovic Courtès
* guix/store.scm (export-paths): Add #:recursive? parameter and honor it. * tests/store.scm ("export/import incomplete", "export/import recursive"): New tests.
2015-01-14store: Add 'store-lower'.Ludovic Courtès
* guix/store.scm (store-lower): New procedure. * tests/store.scm ("store-lower"): New test.
2015-01-14monads: Move '%store-monad' and related procedures where they belong.Ludovic Courtès
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.
2014-11-23store: default to serial "scheduler"nebuli
* guix/store.scm (set-build-options): exchange default argument values Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2014-11-04store: Invalidate caches once GC has run.Ludovic Courtès
* 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.
2014-10-09Break module cycle involving (guix store) and (guix ui).Ludovic Courtès
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.
2014-07-18guix-register: Add '--state-directory' parameter.Ludovic Courtès
* 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.
2014-05-27store: Work around 'get-bytevector-n' bug that affects 'import-paths'.Ludovic Courtès
Fixes <http://bugs.gnu.org/17591>. * guix/store.scm (process-stderr) <%stderr-read>: Use 'get-bytevector-n!' instead of 'get-bytevector-n'.
2014-05-25store: Remove misleading 'setsockopt' call.Ludovic Courtès
* 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.
2014-05-21store: Flush the output when the build process emits '\r'.Ludovic Courtès
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.
2014-05-18store: Change #:store parameter to #:prefix.Ludovic Courtès
* guix/store.scm (register-path): Change #:store to #:prefix.
2014-05-17store: Add #:store parameter to 'register-path'.Ludovic Courtès
* guix/store.scm (register-path): Add #:store and honor it.
2014-04-28store: (direct-store-path? (%store-prefix)) returns #f.Ludovic Courtès
* guix/store.scm (direct-store-path?): Return #f if PATH is (%store-prefix). * tests/store.scm ("direct-store-path?"): Add test.
2014-04-12store: Add 'add-permanent-root' and 'remove-permanent-root'.Ludovic Courtès
* 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.
2014-03-14store: Add 'hash-part->path'.Ludovic Courtès
* guix/store.scm (hash-part->path): New procedure. * tests/store.scm ("hash-part->path"): New test.
2014-03-09store: Add #:timeout build option.Ludovic Courtès
* 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.
2014-03-09build: Change state and log directories to $localstatedir/.../guix.Ludovic Courtès
* daemon.am (libstore_a_CPPFLAGS): Change /nix to /guix. * guix/config.scm.in (%state-directory): Likewise. * guix/store.scm (log-file): Likewise.
2014-03-07store: 'export-paths' doesn't export references of the given files.Ludovic Courtès
This fixes a regression introduced in 99fbddf9a623757e39d88bfb431f8f7d6f24b75b ("store: Change 'export-paths' to always export in topological order.") * guix/store.scm (export-paths): Define 'ordered' variable. Iterate over it. * tests/store.scm ("export/import paths, ensure topological order"): Add 'file0'. Adjust accordingly.
2014-02-27store: Use 'when' instead of 'if' in effectful context.Ludovic Courtès
* guix/store.scm (set-build-options): Use 'when' instead of 'if'.
2014-02-12store: Add comments for the stracer.Ludovic Courtès
* guix/store.scm (%worker-magic-1, %worker-magic-2): Add comments.
2014-02-10store: Change 'export-paths' to always export in topological order.Ludovic Courtès
* guix/store.scm (export-paths): Pass PATHS through 'topologically-sorted' before iterating. * tests/store.scm ("export/import paths, ensure topological order"): New test.
2014-01-24store: Add 'topologically-sorted'.Ludovic Courtès
* guix/store.scm (topologically-sorted): New procedure. * tests/store.scm ("topologically-sorted, one item", "topologically-sorted, several items", "topologically-sorted, more difficult"): New tests.
2014-01-24store: Add 'with-store' convenience macro.Ludovic Courtès
* guix/store.scm (with-store): New macro.
2014-01-24store: Add 'register-path' procedure.Ludovic Courtès
* guix/store.scm (register-path): New procedure. * tests/store.scm ("register-path"): New test. * guix/config.scm.in (%guix-register-program): New variable. * configure.ac: Compute and substitute 'guix_sbindir'. Compute 'guix_prefix'. * pre-inst-env.in: Define 'GUIX_REGISTER'.
2014-01-24store: Add comments for the %stderr constants.Ludovic Courtès
* guix/store.scm (process-stderr): Add comments for the various constants, to help when stracing.
2014-01-08config: '%store-directory' always honors $NIX_STORE_DIR.Ludovic Courtès
* guix/config.scm.in (%store-directory): Honor $NIX_STORE_DIR. * guix/store.scm (%store-prefix): Use %store-directory directly.
2014-01-08config: '%state-directory' always honors $NIX_STATE_DIR.Ludovic Courtès
* guix/config.scm.in (%state-directory): Honor $NIX_STATE_DIR. * guix/scripts/package.scm (%profile-directory): Use %state-directory directly. * guix/store.scm (%default-socket-path, log-file): Likewise.
2014-01-08store: Fix 'log-file' to support uncompressed logs.Ludovic Courtès
* guix/store.scm (log-file): Report the file without '.bz2' if it exists.
2013-12-20daemon: Implement signed archive import/export.Ludovic Courtès
* guix/scripts/authenticate.scm, nix/scripts/guix-authenticate.in, tests/signing-key.pub, tests/signing-key.sec: New files. * po/POTFILES.in: Add 'guix/scripts/authenticate.scm'. * guix/store.scm (dump-port): New procedure. (process-stderr): Add 'user-port' optional parameter. Handle the %STDERR-WRITE and %STDERR-READ cases as expected. (import-paths, export-path, export-paths): New procedures. * tests/store.scm ("export/import several paths", "import corrupt path"): New tests. * Makefile.am (MODULES): Add 'guix/scripts/authenticate.scm'. (EXTRA_DIST): Add 'tests/signing-key.{pub,sec}'. * daemon.am (libstore_a_CPPFLAGS)[-DNIX_CONF_DIR]: Change 'NIX_CONF_DIR' to .../guix. Change 'OPENSSL_PATH' to 'guix-authenticate'. * config-daemon.ac: Instantiate 'nix/scripts/guix-authenticate'. * nix/nix-daemon/guix-daemon.cc (main): Augment $PATH to include 'settings.nixLibexecDir'. * test-env.in: Export 'NIX_CONF_DIR' and 'NIX_LIBEXEC_DIR'. Populate $NIX_CONF_DIR.
2013-12-11store: Optimize 'store-path-package-name' and 'store-path-hash-part'.Ludovic Courtès
* guix/store.scm (store-regexp*): New procedure. (store-path-package-name, store-path-hash-part): Use it.
2013-11-13store: Make 'direct-store-path?' public.Ludovic Courtès
* guix/store.scm (direct-store-path?): New procedure. * guix/derivations.scm (derivation)[direct-store-path?]: Remove. * tests/store.scm ("direct-store-path?"): New test.
2013-11-12store: Add 'log-file' procedure.Ludovic Courtès
* guix/store.scm (log-file): New procedure. * tests/store.scm ("log-file, derivation", "log-file, output file name"): New tests.