aboutsummaryrefslogtreecommitdiff
path: root/nix
Commit message (Collapse)AuthorAge
* Fix remaining references to "substitute-binary".Taylan Ulrich Bayırlı/Kammer2015-03-26
| | | | | | | | * nix/nix-daemon/guix-daemon.cc (main): Change substitute-binary to substitute. * po/guix/POTFILES.in: Likewise. * tests/guix-daemon.sh: Likewise. * tests/guix-system.sh: Likewise.
* Rename 'guix substitute-binary' to 'guix substitute'.Ludovic Courtès2015-03-25
| | | | | | | | | | | | | | | | | | | * guix/scripts/substitute-binary.scm: Rename to... * guix/scripts/substitute.scm: ... this. Adjust module name, entry point, comments, and help string accordingly. * nix/scripts/substitute-binary.in: Rename to... * nix/scripts/substitute.in: ... this. * pre-inst-env.in (NIX_SUBSTITUTERS): Adjust accordingly. * tests/substitute-binary.scm: Rename to... * tests/substitute.scm: ... this. Adjust references to (guix scripts substitute) accordingly. * guix/ui.scm (show-guix-help)[internal?]: Change "substitute-binary" to "substitute". * Makefile.am (MODULES, SCM_TESTS): Adjust to file renames. * daemon.am (nodist_pkglibexec_SCRIPTS): Likewise. * config-daemon.ac: Likewise. * guix/tests.scm (call-with-derivation-narinfo): Adjust comments and docstring.
* daemon: Flush upon '\r' when reading the substituter's stderr.Ludovic Courtès2015-02-07
| | | | | * nix/libstore/local-store.cc (LocalStore::getLineFromSubstituter): Flush when the line contains '\r'.
* build: Make 'chroot' a hard requirement.Ludovic Courtès2015-02-04
| | | | | | * config-daemon.ac: Error out when $ac_cv_func_chroot is not "yes". * nix/nix-daemon/guix-daemon.cc (options): Remove #ifdef HAVE_CHROOT. (main): Likewise.
* Merge commit a1dd396cc02922372314c35c8035a38bfeea08df of branch 'nix'.Ludovic Courtès2015-01-04
|
* Remove 'nix-upstream' submodule.Ludovic Courtès2014-12-19
| | | | | | * nix/sync-with-upstream: Remove. * bootstrap: Remove uses of 'git submodule' and 'sync-with-usptream'. * .gitmodules: Remove.
* Merge branch 'nix' into 'master'.Ludovic Courtès2014-12-19
|
* daemon: Default to '--cores=0'.Ludovic Courtès2014-11-30
| | | | | | | Suggested by Deck Pickard <deck.r.pickard@gmail.com>. * nix/nix-daemon/guix-daemon.cc (main): Set 'settings.buildCores' to 0. * doc/guix.texi (Invoking guix-daemon): Adjust accordingly.
* guix-register: Do not attempt to create NIX_STORE_DIR.Ludovic Courtès2014-11-02
| | | | | | | | Fixes <http://bugs.gnu.org/18689>. Reported by Philip Woods <elzairthesorcerer@gmail.com>. * nix/guix-register/guix-register.cc (main): Move 'store' instantiation above 'settings.nixStore' assignment.
* daemon: Add '--substitute-urls' option.Ludovic Courtès2014-10-09
| | | | | | | | | | | | | | | * nix/nix-daemon/guix-daemon.cc (GUIX_OPT_SUBSTITUTE_URLS): New macro. (GUIX_OPT_NO_BUILD_HOOK, GUIX_OPT_GC_KEEP_OUTPUTS, GUIX_OPT_GC_KEEP_DERIVATIONS): Renumber. (options): Add '--substitute-urls'. (parse_opt): Honor it. (main): Add 'settings.set' call for the default "substitute-urls" value. * guix/scripts/substitute-binary.scm (daemon-options, find-daemon-option): New procedures. (%cache-url): Define based on the "substitute-urls" daemon option. * doc/guix.texi (Invoking guix-daemon): Document '--substitute-urls'. (Substitutes): Mention it.
* sync-with-upstream: Generate 'nix/AUTHORS'.Ludovic Courtès2014-09-01
| | | | * nix/sync-with-upstream: Use 'git shortlog' to generate nix/AUTHORS.
* daemon: Rename '--disable-store-optimization' to '--disable-deduplication'.Ludovic Courtès2014-08-31
| | | | | | | | | | * nix/nix-daemon/guix-daemon.cc (GUIX_OPT_DISABLE_STORE_OPTIMIZATION): Rename to... (GUIX_OPT_DISABLE_DEDUPLICATION): ... this. Adjust user accordingly. (options): Add "disable-deduplication". Make "disable-store-optimization" a hidden alias. * doc/guix.texi (Invoking guix-daemon): Adjust to new option name. Add index entry. Improve description.
* daemon: Really enable automatic deduplication by default.Ludovic Courtès2014-08-31
| | | | | | * nix/nix-daemon/guix-daemon.cc (main): Set 'autoStoreOptimise' to true. Add 'printMsg' call. * tests/derivations.scm ("identical files are deduplicated"): New test.
* guix-register: By default, attempt to deduplicate registered items.Ludovic Courtès2014-08-25
| | | | | | | | | | | | | * nix/guix-register/guix-register.cc (GUIX_OPT_DEDUPLICATE): New macro. (options): Add --no-deduplication. (deduplication): New variable. (parse_opt): Handle GUIX_OPT_DEDUPLICATE. (register_validity): Add 'optimize' parameter and honor it. (main): Move 'store' instanatiation after 'settings.nixStore' assignment. * tests/guix-register.sh: Add test for deduplication. * guix/nar.scm (finalize-store-file): Update comment above 'register-path' call.
* 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.
* guix-register: Add explicit libgcrypt initialization.Ludovic Courtès2014-06-29
| | | | | * nix/guix-register/guix-register.cc (main): Add calls to 'gcry_check_version' and 'gcry_control', to appease libgcrypt.
* list-runtime-roots: Don't display a backtrace on 2.0.5 when lsof is lacking.Ludovic Courtès2014-05-16
| | | | | | * nix/scripts/list-runtime-roots.in (lsof-roots): Fix typo in 'catch' tag. Add 'parent' variable. Wrap 'open-pipe*' call in 'catch'. Reported by Andreas Enge <andreas@enge.fr>.
* daemon: Don't abort when $PATH is undefined.Ludovic Courtès2014-04-09
| | | | | | | * nix/nix-daemon/guix-daemon.cc (main): Check whether getenv ("PATH") returns NULL before blindly initializing 'search_path'. Before that 'guix-daemon' would abort when run in an environment where 'PATH' is undefined.
* daemon: Clear $NIX_SUBSTITUTERS when passed '--no-substitutes'.Ludovic Courtès2014-03-27
| | | | | | | | * nix/nix-daemon/guix-daemon.cc (main): When --no-substitutes is used, clear NIX_SUBSTITUTERS. Before that, and after 89faa5c75cb3a419c6d02c51f56955275b7ae351, '--no-substitutes' would lead to attempts to use 'download-using-manifests.pl', which in practice would gracelessly fail.
* daemon: Change some options via 'settings.set'.Ludovic Courtès2014-03-27
| | | | | | | * nix/nix-daemon/guix-daemon.cc (parse_opt): Use 'settings.set' instead of direct field access for 'buildCores', 'maxBuildJobs', and 'useSubstitutes'. (main): Call 'settings.update' after 'argp_parse'.
* daemon: Really override the substituters setting.Ludovic Courtès2014-03-20
| | | | | | | | Reported by Andreas Enge <andreas@enge.fr>: <https://lists.gnu.org/archive/html/guix-devel/2014-03/msg00211.html>. * nix/nix-daemon/guix-daemon.cc (main): Set the 'NIX_SUBSTITUTERS' env. var. Leave 'settings.substituters' unchanged.
* daemon: Add '--gc-keep-outputs' and '--gc-keep-derivations'.Ludovic Courtès2014-02-06
| | | | | | | | | | | * nix/nix-daemon/guix-daemon.cc (GUIX_OPT_GC_KEEP_OUTPUTS, GUIX_OPT_GC_KEEP_DERIVATIONS): New macros. (options): Add 'gc-keep-outputs' and 'gc-keep-derivations'. (string_to_bool): New function. (parse_opt): Honor GUIX_OPT_GC_KEEP_DERIVATIONS and GUIX_OPT_GC_KEEP_OUTPUTS. * doc/guix.texi (Invoking guix-daemon): Document --gc-keep-outputs and --gc-keep-derivations.
* Add 'guix offload' as a daemon build hook.Ludovic Courtès2014-01-24
| | | | | | | | | | | | | | | | | | | | | | | | * nix/nix-daemon/guix-daemon.cc (GUIX_OPT_NO_BUILD_HOOK): New macro. (options): Add '--no-build-hook'. (parse_opt): Handle it. (main)[HAVE_DAEMON_OFFLOAD_HOOK]: Set 'useBuildHook' by default. Set $NIX_BUILD_HOOK to our offload hook unless otherwise specified. [!HAVE_DAEMON_OFFLOAD_HOOK]: Clear 'useBuildHook'. * pre-inst-env.in: Set and export NIX_BUILD_HOOK. * nix/scripts/offload.in, guix/scripts/offload.scm: New files. * guix/ui.scm (show-guix-help)[internal?]: Add "offload". * config-daemon.ac: Call 'GUIX_CHECK_UNBUFFERED_CBIP'. Instantiate 'nix/scripts/offload'. Set 'BUILD_DAEMON_OFFLOAD' conditional, and optionally define 'HAVE_DEAMON_OFFLOAD_HOOK' cpp macro. * daemon.am (nodist_pkglibexec_SCRIPTS)[BUILD_DAEMON_OFFLOAD]: Add it. * Makefile.am (MODULES)[BUILD_DAEMON_OFFLOAD]: Add 'guix/scripts/offload.scm'. (EXTRA_DIST)[!BUILD_DAEMON_OFFLOAD]: Likewise. * m4/guix.m4 (GUIX_CHECK_UNBUFFERED_CBIP): New macro. * doc/guix.texi (Setting Up the Daemon): Move most of the body to... (Build Environment Setup): ... this. New subsection. (Daemon Offload Setup): New subsection.
* guix-register: Support registration in the current store, without '--prefix'.Ludovic Courtès2014-01-24
| | | | | | | * nix/guix-register/guix-register.cc (register_validity): Leave 'info.path' unmodified when PREFIX is empty. (main): Call 'settings.processEnvironment' early on. Leave 'settings.nixStore' unmodified when PREFIX is empty.
* daemon: Implement signed archive import/export.Ludovic Courtès2013-12-20
| | | | | | | | | | | | | | | | | | | | | * 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.
* sync-with-upstream: Work around limitation of dash.Ludovic Courtès2013-12-19
| | | | | | Reported by Andreas Enge <andreas@enge.fr>. * nix/sync-with-upstream: Expand use of {cc,hh}, to placate dash.
* daemon: Fix 'HashSink::currentHash()'.Ludovic Courtès2013-12-19
| | | | | | | | | | | | | Before that, calls to 'HashSink::currentHash()' would eventually lead to a segfault because the underlying gcrypt handle has been closed. (Note that this method is only used via 'importPaths' and 'exportPath', though.) * nix/libutil/gcrypt-hash.hh (struct guix_hash_context): Add a constructor and a copy constructor; move out of 'extern "C"'. * nix/libutil/gcrypt-hash.cc (guix_hash_final): Clear 'md_handle' upon exit. * nix/sync-with-upstream (top_srcdir): Change hash.{cc,hh} to read 'struct Ctx' instead of 'union Ctx'.
* daemon: Add libgcrypt call to state that the initialization is over.Ludovic Courtès2013-12-19
| | | | * nix/nix-daemon/guix-daemon.cc (main): Add 'gcry_control' call.
* list-runtime-roots: List files referenced by environment variables.Ludovic Courtès2013-10-29
| | | | | | | | Inspired by <https://github.com/NixOS/nix/compare/772b70952f75...4ddd077bfa9a>. * nix/scripts/list-runtime-roots.in (%store-directory): New variable. (proc-environ-roots): New procedure. (<top-level>): Use it.
* daemon: Set the umask to 022 when starting.Ludovic Courtès2013-10-10
| | | | | * nix/nix-daemon/guix-daemon.cc (main): Add 'umask' call. * test-env.in: Remove use of 'umask'.
* guix-register: Allow the initial directory creation to proceed.Ludovic Courtès2013-09-24
| | | | | | | | | | This fixes a bug whereby 'guix-register' would bail out when trying to create NIX_STORE_DIR/.links when NIX_STORE_DIR is read-only. * nix/guix-register/guix-register.cc (parse_opt): Initialize 'settings.nixStore' to PREFIX + NIX_STORE_DIR. (main): Change 'settings.nixStore' once the 'LocalStore' has been instantiated.
* guix-register: Expect closures to refer to the original store.Ludovic Courtès2013-09-23
| | | | | | | | | | * nix/guix-register/guix-register.cc (prefix): New variable. (parse_opt): Use it. (register_validity): Change 'info.path' to the final store name. Hash the final under its real path. * tests/guix-register.sh: Adjust the contents of $closure accordingly. Rename 'NIX_LOCALSTATE_DIR' to 'NIX_STATE_DIR'. Don't try to call 'valid-path?'. Add test using 'sqlite3'.
* Add 'guix-register'.Ludovic Courtès2013-09-23
| | | | | | | | | | * nix/guix-register/guix-register.cc, tests/guix-register.sh: New files. * Makefile.am (SH_TESTS)[BUILD_DAEMON]: Add tests/guix-register.sh. * daemon.am (sbin_PROGRAMS, guix_register_SOURCES, guix_register_CPPFLAGS, guix_register_LDADD): New variables. * test-env.in: Export 'storedir', 'prefix', 'datarootdir', 'datadir', and 'localstatedir'.
* daemon: Use 'int' instead of the internal 'gcry_md_algo_t' type.Ludovic Courtès2013-09-12
| | | | | | | | | | Fixes compilation with the forthcoming libgcrypt 1.6.x. Reported by Matthias Wachs <wachs@net.in.tum.de> and NIIBE Yutaka <gniibe@fsij.org>. * nix/libutil/gcrypt-hash.cc (guix_hash_init, guix_hash_final): Use 'int' as the type of the 'algo' parameter. * nix/libutil/gcrypt-hash.hh: Update declarations accordingly.
* daemon: Make argp usage compatible with libc on GNU/Hurd.Ludovic Courtès2013-07-04
| | | | | | | * nix/nix-daemon/guix-daemon.cc (parse_opt): Cast return value to `error_t' for the sake of GNU/Hurd. Reported by Matthew Lien <bluet@bluet.org> at <http://lists.gnu.org/archive/html/bug-guix/2013-07/msg00002.html>.
* build: Fix `sync-with-upstream'.Ludovic Courtès2013-06-18
| | | | * nix/sync-with-upstream: Remove schema.sql.hh.
* daemon: Add `--no-substitutes'.Ludovic Courtès2013-04-18
| | | | | | | | | | Suggested by Mark H. Weaver. * nix/nix-daemon/guix-daemon.cc (GUIX_OPT_NO_SUBSTITUTES): New macro. (options): Add `--no-substitutes'. (parse_opt): Add `GUIX_OPT_NO_SUBSTITUTES' case. (main): Leave `settings.substituters' empty when `settings.useSubstitutes' is false.
* daemon: Really enable the substituter by default.Ludovic Courtès2013-04-18
| | | | | * nix/nix-daemon/guix-daemon.cc (main): Really enable the substituter by default. Reported by Mark H. Weaver.
* Add preliminary binary substituter.Ludovic Courtès2013-04-03
| | | | | | | | | | | | | | | | | | * guix/scripts/substitute-binary.scm: New file. * Makefile.am (MODULES): Add it. * nix/scripts/substitute-binary.in: New file. * config-daemon.ac: Produce nix/scripts/substitute-binary. * daemon.am (nodist_pkglibexec_SCRIPTS): Add nix/scripts/substitute-binary. * guix/store.scm (substitutable-path-info): Use the `query-substitutable-path-infos' RPC. * nix/nix-daemon/guix-daemon.cc (main): Honor `NIX_SUBSTITUTERS'. * pre-inst-env.in: Set `NIX_SUBSTITUTERS'. * test-env.in: Leave `NIX_SUBSTITUTERS' unchanged. Set `GUIX_BINARY_SUBSTITUTE_URL, and create $NIX_STATE_DIR/substituter-data. Run `guix-daemon' within `./pre-inst-env'. * tests/store.scm ("substitute query"): New test.
* daemon: Add `--listen'.Ludovic Courtès2013-02-19
| | | | | | | * nix/nix-daemon/guix-daemon.cc (GUIX_OPT_LISTEN): New macro. (options): Add `--listen'. (parse_opt): Handle it. * doc/guix.texi (Invoking guix-daemon): Mention it.
* Merge branch 'core-updates'Ludovic Courtès2013-01-11
|\ | | | | | | | | Conflicts: guix/build/union.scm
| * Update a few more license headers.Ludovic Courtès2013-01-06
| | | | | | | | | | * distro/packages/openssl.scm, m4/guix.m4, nix/sync-with-upstream: Update headers.
* | daemon: Fix warning message when running as root without a build user group.Ludovic Courtès2013-01-09
| | | | | | | | | | * nix/nix-daemon/guix-daemon.cc (main): Fix warning message when running as root without `--build-users-group'.
* | guix-daemon: Rename `--build-cores' for consistency with `guix-build'.Ludovic Courtès2013-01-09
|/ | | | | | * nix/nix-daemon/guix-daemon.cc (options): Change `--build-cores' to `--cores', and `-C' to `-c'. (parse_opt): Adjust accordingly.
* Update license headers.Ludovic Courtès2013-01-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change all license headers, except guix/build/* and ld-wrapper.scm, with this code: (use-modules (guix build utils) (srfi srfi-1)) (fluid-set! %default-port-encoding "UTF-8") (substitute* (remove (lambda (f) (or (string-contains f ".tar.") (string-contains f ".git/") (string-contains f ".so") (string-suffix? ".o" f) (string-suffix? ".a" f) (string-suffix? ".go" f) (string-suffix? ".pdf" f) (string-suffix? ".png" f) (string-suffix? ".info" f) (equal? (basename f) "guix-daemon") (equal? (basename f) "nix-setuid-helper") (string-contains f "nix-upstream/") (string-contains f "distro/packages/bootstrap/"))) (find-files "." "\\.[a-z]+$")) (("^([[:graph:]]+) This file is part of Guix." _ comment-start) (string-append comment-start " This file is part of GNU Guix.")) (("^([[:graph:]]+) Guix --- Nix package management.*" _ comment-start) (string-append comment-start " GNU Guix --- Functional package management for GNU\n")) (("^([[:graph:]]+) Guix is " _ comment-start) (string-append comment-start " GNU Guix is ")) (("^([[:graph:]]+) along with Guix." _ comment-start) (string-append comment-start " along with GNU Guix.")) (("^([[:graph:]]+) Copyright \\(C\\)" _ comment-start) (string-append comment-start " Copyright ©"))) Change headers using C-style comments manually.
* daemon: Show the chroot contents upon `--debug'.Ludovic Courtès2013-01-02
| | | | | * nix/nix-daemon/guix-daemon.cc (main)[HAVE_CHROOT]: Display the contents of `settings.dirsInChroot' at `lvlDebug'.
* daemon: Properly initialize libgcrypt.Ludovic Courtès2013-01-02
| | | | * nix/nix-daemon/guix-daemon.cc (main): Call `gcry_check_version'.
* daemon: Gracefully handle Nix errors.Ludovic Courtès2012-12-16
| | | | | * nix/nix-daemon/guix-daemon.cc (main): Run Nix code in an exception handler; gracefully print error messages, and exit with EXIT_FAILURE.
* daemon: Warn against running as root without `--build-users-group'.Ludovic Courtès2012-12-16
| | | | | | * nix/nix-daemon/guix-daemon.cc (main): Recommend using `--build-users-group' when running as root without a build users group.
* daemon: Add `--chroot-directory'.Ludovic Courtès2012-12-16
| | | | | | * nix/nix-daemon/guix-daemon.cc (GUIX_OPT_CHROOT_DIR): New macro. (options): Add `--chroot-directory'. (parse_opt): Handle it.