summaryrefslogtreecommitdiff
path: root/guix/scripts/environment.scm
Commit message (Collapse)AuthorAge
* environment: Report "command not found" from the child process.Ludovic Courtès2022-08-04
| | | | | | | | | | | | | | | | | | | | Fixes a bug whereby, for example: guix shell bash -- bash -c xyz would erroneously print: guix shell: error: bash: command not found simply because the parent process could not distinguish that 127 from a "genuine" 127 used by convention for "command not found". * guix/scripts/environment.scm (launch-environment): Before exiting, report a "command not found" error and suggest a command name. (validate-exit-status): Remove. (launch-environment/fork): Remove call (launch-environment/container)[exit/status*]: Remove. Call 'exit/status' instead of it.
* scripts: Add --list-systems and --list-targets options.Mathieu Othacehe2022-05-22
| | | | | | | | | | | | | | | | | | | | | | | | | Also factorize the --system and --target build options. Check that the passed system and target arguments are known platforms. * doc/guix.texi (Additional Build Options): Document the new --list-systems and --list-targets options. * guix/scripts/build.scm (show-cross-build-options-help, show-emulated-build-options-help, list-systems, list-targets): New procedures. (%standard-cross-build-options, %standard-emulated-build-options): New variables. (show-help): Remove --system and --target entries and use show-cross-build-options-help and show-emulated-build-options-help procedures instead. (%options): Remove --system and --target entries and use %standard-cross-build-options and %standard-emulated-build-options variables instead. * guix/scripts/archive.scm (show-help, %options): Adapt them. * guix/scripts/environment.scm: Ditto. * guix/scripts/graph.scm: Ditto. * guix/scripts/pack.scm: Ditto. * guix/scripts/pull.scm: Ditto. * guix/scripts/size.scm: Ditto. * guix/scripts/weather.scm: Ditto. Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>
* environment: Export 'load-manifest'.Ludovic Courtès2022-04-04
| | | | | * guix/scripts/environment.scm (load-manifest): New procedure. (options/resolve-packages): Use it.
* environment: '--check' does nothing when used with '--container'.Ludovic Courtès2022-01-25
| | | | | | | | Partly fixes <https://issues.guix.gnu.org/53355>. Reported by Chris Marusich <cmmarusich@gmail.com>. * guix/scripts/environment.scm (guix-environment*): Warn and do nothing when both '--check' and '--container' are used.
* environment: Suggestion code gracefully handles empty "/bin" directories.Ludovic Courtès2021-12-10
| | | | | * guix/scripts/environment.scm (suggest-command-name): Handle the case where 'scandir' returns #f.
* environment: Fix ‘--check’ with exported PS1 variable.Thiago Jung Bauermann2021-11-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If your .bashrc (unnecessarily) exports PS1 and you’re in a non-login shell, Guix crashes: user@popigai:~$ guix shell --check coreutils guix shell: checking the environment variables visible from shell '/bin/bash'... Backtrace: 14 (primitive-load "/home/user/.config/guix/current/bin/g…") In guix/ui.scm: 2206:7 13 (run-guix . _) 2169:10 12 (run-guix-command _ . _) In ice-9/boot-9.scm: 1752:10 11 (with-exception-handler _ _ #:unwind? _ # _) 1752:10 10 (with-exception-handler _ _ #:unwind? _ # _) In guix/store.scm: 658:37 9 (thunk) 1320:8 8 (call-with-build-handler _ _) 1320:8 7 (call-with-build-handler #<procedure 7fe393b7c420 at g…> …) In guix/status.scm: 800:4 6 (call-with-status-report _ _) In guix/scripts/environment.scm: 951:12 5 (_) In guix/store.scm: 2119:24 4 (run-with-store #<store-connection 256.99 7fe39627e500> …) In guix/scripts/environment.scm: 521:35 3 (_ _) In unknown file: 2 (string=? ("PS1" . "${debian_chroot:+($debian_chroot)…") …) In ice-9/boot-9.scm: 1685:16 1 (raise-exception _ #:continuable? _) 1685:16 0 (raise-exception _ #:continuable? _) ice-9/boot-9.scm:1685:16: In procedure raise-exception: In procedure string=: Wrong type argument in position 1 (expecting string): ("PS1" . "${debian_chroot:+($debian_chroot)}\\[\\033[01;32m\\]\\u@\\h\\[\\033[00m\\]:\\[\\033[01;34m\\]\\w\\[\\033[00m\\]${EXTRA}\\$ ") user@popigai:~$ This is because the match pattern doesn’t expect `(vhash-assoc "PS1" actual)` to return a pair. * guix/scripts/environment.scm (validate-child-shell-environment): Change match pattern to expect a pair. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
* environment: Suggest command upon 'execlp' failure.Ludovic Courtès2021-11-06
| | | | | | | | | * guix/scripts/environment.scm (launch-environment): Call 'primitive-_exit' upon 'system-error. (suggest-command-name, validate-exit-status): New procedures. (launch-environment/fork): Call 'validate-exit-status'. (launch-environment/container)[exit/status*]: New procedure. Use it instead of 'exit/status'.
* environment: Fix broken file-local variable.Zhu Zihao2021-10-28
| | | | | | * guix/scripts/environment.scm (Local Variables): Add missing eval. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
* environment: Add '--check'.Ludovic Courtès2021-10-26
| | | | | | | | | | | | * guix/scripts/environment.scm (show-environment-options-help) (%options): Add '--check'. * guix/scripts/environment.scm (child-shell-environment) (validate-child-shell-environment): New procedures. (guix-environment*): Call 'validate-child-shell-environment' when 'check?' key is in OPTS. * doc/guix.texi (Invoking guix shell): Shorten footnote about Bash startup files. Document '--check' and mention startup files. (Invoking guix environment): Document '--check'.
* environment: Autoload some modules.Ludovic Courtès2021-10-25
| | | | | | This further speeds up the 'guix environment -p PROFILE' case. * guix/scripts/environment.scm: Autoload a bunch of modules.
* environment: Do not connect to the daemon when '--profile' is used.Ludovic Courtès2021-10-25
| | | | | | | | | This further speeds up the 'guix environment -p PROFILE' case. * guix/scripts/environment.scm (guix-environment*)[store-needed?]: New variable. [with-store/maybe]: New macro. Use it instead of 'with-store', and remove 'with-build-handler' form.
* environment: Skip derivation computation when '--profile' is used.Ludovic Courtès2021-10-25
| | | | | | * guix/scripts/environment.scm (guix-environment*): Bypass calls to 'package-derivation' and to 'manifest->derivation' when PROFILE is true.
* Add 'guix shell'.Ludovic Courtès2021-10-25
| | | | | | | | | | | | | | | | | | | | | | | * guix/scripts/shell.scm, tests/guix-shell.sh: New files. * Makefile.am (MODULES): Add 'shell.scm'. (SH_TESTS): Add 'tests/guix-shell.sh'. * guix/scripts/environment.scm (show-environment-options-help): New procedure. (show-help): Use it. (guix-environment*): New procedure. (guix-environment): Use it. * po/guix/POTFILES.in: Add it. * doc/guix.texi (Features): Refer to "guix shell" (Invoking guix package): Likewise. (Development): Likewise. (Invoking guix shell): New node. (Invoking guix environment): Add deprecation warning. (Debugging Build Failures): Use 'guix shell' in examples. (Invoking guix container): Refer to 'guix shell'. (Invoking guix processes, Virtualization Services): Adjust examples to use 'guix shell'. * doc/contributing.texi (Building from Git): Refer to 'guix shell'. * etc/completion/bash/guix: Handle "shell".
* profiles: Add 'package->development-manifest'.Ludovic Courtès2021-10-25
| | | | | | | | | * guix/profiles.scm (package->development-manifest): New procedure. * guix/scripts/environment.scm (input->manifest-entry) (package-environment-inputs): Remove. * guix/scripts/environment.scm (options/resolve-packages): Use 'package->development-manifest' instead of 'package-environment-inputs'. * tests/profiles.scm ("package->development-manifest"): New test.
* packages: Add 'package-development-inputs'.Ludovic Courtès2021-10-25
| | | | | | | | * guix/packages.scm (package-development-inputs): New procedure. * guix/scripts/environment.scm (package-environment-inputs): Use it. * tests/packages.scm ("package-development-inputs") ("package-development-inputs, cross-compilation"): New tests. * doc/guix.texi (package Reference): Document it.
* profiles: Add 'load-profile'.Ludovic Courtès2021-06-18
| | | | | | | | | * guix/profiles.scm (%precious-variables): New variable. (purify-environment, load-profile): New procedures. * guix/scripts/environment.scm (%precious-variables) (purify-environment, create-environment): Remove. (launch-environment): Call 'load-profile' instead of 'create-environment'. * tests/profiles.scm ("load-profile"): New test.
* scripts: Commands warn when passed zero arguments.Ludovic Courtès2021-05-28
| | | | | | | | | | | | | | | | This is a followup to 3f8326237df780404c172ef4127195cc20becd66. * guix/scripts/archive.scm (export-from-store): Warn then FILES is empty. * guix/scripts/build.scm (guix-build): Likewise. * guix/scripts/copy.scm (warn-if-empty): New procedure. (send-to-remote-host, retrieve-from-remote-host): Call it. * guix/scripts/edit.scm (guix-edit): Warn when SPECS is empty. * guix/scripts/environment.scm (guix-environment): Warn when MANIFEST has zero entries. * guix/scripts/graph.scm (guix-graph): Warn then ITEMS is empty. * guix/scripts/package.scm (process-actions): Warn when FILES and TRANS are both empty.
* environment: Allow compilation with Guile 2.2.Ludovic Courtès2021-03-01
| | | | | | | | Fixes <https://bugs.gnu.org/46826>. Reported by cage <cage-dev@twistfold.it>. * guix/scripts/environment.scm (guix-environment): Move 'manifest' definition before expression.
* environment: Allow starting from existing profile.Lars-Dominik Braun2021-02-11
| | | | | | | | * guix/scripts/environment.scm (%options): Add -p/--profile switch. (show-help): Document new switch. (guix-environment): Handle new 'profile switch. Signed-off-by: 宋文武 <iyzsong@member.fsf.org>
* environment: Fix '--root' option with relative file name.JOULAUD François2021-01-19
| | | | | | | | | | | | The path normalization of `--root` option of `guix environment` was buggy as it appended full argument after normalized directory. This patch fixes it. * guix/scripts/environment.scm (register-gc-root): Fix gc-root path normalization. * tests/guix-environment.sh: Add test. Co-authored-by: Ludovic Courtès <ludo@gnu.org>
* environment: Remove unused modules.guy fleury iteriteka2021-01-04
| | | | | | | * guix/scripts/environment.scm: Do not use (ice-9 format) and (ice-9 rdelim). Signed-off-by: Ludovic Courtès <ludo@gnu.org>
* transformations: Show '--help-transform' only where applicable.Ludovic Courtès2020-11-21
| | | | | | | | | | | | | | | | | | | | | | | | Fixes <https://bugs.gnu.org/44773>. Reported by Florian Pelz <pelzflorian@pelzflorian.de>. This fixes a regression introduced in 6701f64f7329cdbeda70bcaf38523c9098e5a938. * guix/transformations.scm (%transformation-options): Add "--help-transform". (show-transformation-options-help): Rename to... (show-transformation-options-help/detailed): ... this. (show-transformation-options-help): New public procedure. * guix/scripts/build.scm (show-build-options-help): Remove "--help-transform". (%standard-build-options): Likewise. (show-help): Call 'show-transformation-options-help'. * guix/scripts/environment.scm (show-help): Likewise. * guix/scripts/graph.scm (show-help): Likewise. * guix/scripts/install.scm (show-help): Likewise. * guix/scripts/pack.scm (show-help): Likewise. * guix/scripts/package.scm (show-help): Likewise. * guix/scripts/upgrade.scm (show-help): Likewise.
* guix build: Move transformation options to (guix transformations).Ludovic Courtès2020-10-31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * guix/transformations.scm: New file. * tests/scripts-build.scm: Rename to... * tests/transformations.scm: ... this. * Makefile.am (MODULES): Add 'guix/transformations.scm'. (SCM_TESTS): Adjust to rename. * guix/scripts/build.scm (numeric-extension?) (tarball-base-name, <downloaded-file>, download-to-store*) (compile-downloaded-file, package-with-source) (transform-package-source, evaluate-replacement-specs) (transform-package-inputs, transform-package-inputs/graft) (%not-equal, package-git-url, evaluate-git-replacement-specs) (transform-package-source-branch, transform-package-source-commit) (transform-package-source-git-url, package-dependents/spec) (package-toolchain-rewriting, transform-package-toolchain) (transform-package-with-debug-info, transform-package-tests) (%transformations, transformation-procedure, %transformation-options) (show-transformation-options-help, options->transformation) (package-transformations): Move to (guix transformations). * guix/scripts/environment.scm: Adjust accordingly. * guix/scripts/graph.scm: Likewise. * guix/scripts/install.scm: Likewise. * guix/scripts/pack.scm: Likewise. * guix/scripts/package.scm: Likewise. * guix/scripts/upgrade.scm: Likewise. * po/guix/POTFILES.in: Add 'guix/transformations.scm'.
* guix build: 'options->transformation' no longer takes a 'store' parameter.Ludovic Courtès2020-10-31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * guix/scripts/build.scm (transform-package-source) (transform-package-inputs, transform-package-inputs/graft) (transform-package-source-branch, transform-package-source-commit) (transform-package-source-git-url, transform-package-toolchain) (transform-package-with-debug-info, transform-package-tests): Remove 'store' parameter. (options->transformation, options->derivations): Adjust accordingly. * guix/scripts/environment.scm (options/resolve-packages): Likewise. * guix/scripts/graph.scm (guix-graph): Likewise. * guix/scripts/pack.scm (guix-pack): Likewise. * guix/scripts/package.scm (transaction-upgrade-entry): Likewise. (process-actions): Likewise. * tests/scripts-build.scm ("options->transformation, no transformations") ("options->transformation, with-source, replacement"): Adjust tests. ("options->transformation, with-source") ("options->transformation, with-source, with version") ("options->transformation, with-source, PKG=URI"): Use 'lower-object' to compute the store file name of the source. ("options->transformation, with-source, no matches"): Remove 'with-store' and adjust accordingly. ("options->transformation, with-input"): Likewise. ("options->transformation, with-graft"): Likewise. ("options->transformation, with-branch"): Likewise. ("options->transformation, with-commit"): Likewise. ("options->transformation, with-git-url"): Likewise. ("options->transformation, with-git-url + with-branch"): Likewise. ("options->transformation, with-c-toolchain"): Likewise. ("options->transformation, with-c-toolchain twice"): Likewise. ("options->transformation, with-c-toolchain, no effect"): Likewise. ("options->transformation, with-debug-info"): Likewise. ("options->transformation, without-tests"): Likewise.
* guix build: Move package transformation options behind '--help-transform'.Ludovic Courtès2020-10-20
| | | | | | | | | | | | | | | | | This change declutters the '--help' output. * guix/scripts/build.scm (show-build-options-help) (%standard-build-options): Add '--help-transform'. (show-transformation-options-help): Make private. (show-help): Remove call to 'show-transformation-options-help'. * guix/scripts/build.scm (show-help): Likewise. * guix/scripts/environment.scm (show-help): Likewise. * guix/scripts/graph.scm (show-help): Likewise. * guix/scripts/install.scm (show-help): Likewise. * guix/scripts/pack.scm (show-help): Likewise. * guix/scripts/package.scm (show-help): Likewise. * guix/scripts/upgrade.scm (show-help): Likewise. * doc/guix.texi (Package Transformation Options): Mention '--help-transform'.
* environment: Turn "lo" up in network-less containers.Ludovic Courtès2020-10-05
| | | | | | | | This is a followup to 0f53c801b91919380a924b402d1ff822bb1dc6ea. * guix/scripts/environment.scm (launch-environment/container): Add call to 'set-network-interface-up'. * tests/guix-environment-container.sh: Add test.
* environment: Provide /etc/hosts in containers without '--network'.Ludovic Courtès2020-10-02
| | | | | | | | Fixes <https://bugs.gnu.org/43762>. * guix/scripts/environment.scm (launch-environment/container): Create /etc/hosts when NETWORK? is false. * tests/guix-environment-container.sh: Add "localhost" resolution test.
* environment: '--link-profile' uses ~/.guix-profile for environment variables.Ludovic Courtès2020-09-21
| | | | | | | | | | | | | | | | | | | | | | | | Before this patch, we had: $ guix environment -CP --ad-hoc coreutils [env]$ echo $PATH /gnu/store/…-profile/bin [env]$ echo $GUIX_ENVIRONMENT /gnu/store/…-profile After this patch: $ guix environment -CP --ad-hoc coreutils [env]$ echo $PATH /home/ludo/.guix-profile/bin [env]$ echo $GUIX_ENVIRONMENT /home/ludo/.guix-profile * guix/scripts/environment.scm (launch-environment/container): When LINK-PROFILE? is true, pass ~/.guix-profile as the second argument to 'launch-environment'. * tests/guix-environment-container.sh: Adjust test accordingly. * doc/guix.texi (Invoking guix environment): Update accordingly.
* scripts: Use 'define-command' and have 'guix help' use that.Ludovic Courtès2020-09-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This changes 'guix help' to print a short synopsis for each command and to group commands by category. * guix/scripts.scm (synopsis, category): New variables. (define-command-categories, define-command): New macros. (%command-categories): New variable. * guix/ui.scm (<command>): New record type. (source-file-command): New procedure. (command-files): Return absolute file names. (commands): Return a list of <command> records. (show-guix-help)[display-commands, category-predicate]: New procedures. Display commands grouped in three categories. * guix/scripts/archive.scm (guix-archive): Use 'define-command'. * guix/scripts/authenticate.scm (guix-authenticate): Likewise. * guix/scripts/build.scm (guix-build): Likewise. * guix/scripts/challenge.scm (guix-challenge): Likewise. * guix/scripts/container.scm (guix-container): Likewise. * guix/scripts/copy.scm (guix-copy): Likewise. * guix/scripts/deploy.scm (guix-deploy): Likewise. * guix/scripts/describe.scm (guix-describe): Likewise. * guix/scripts/download.scm (guix-download): Likewise. * guix/scripts/edit.scm (guix-edit): Likewise. * guix/scripts/environment.scm (guix-environment): Likewise. * guix/scripts/gc.scm (guix-gc): Likewise. * guix/scripts/git.scm (guix-git): Likewise. * guix/scripts/graph.scm (guix-graph): Likewise. * guix/scripts/hash.scm (guix-hash): Likewise. * guix/scripts/import.scm (guix-import): Likewise. * guix/scripts/install.scm (guix-install): Likewise. * guix/scripts/lint.scm (guix-lint): Likewise. * guix/scripts/offload.scm (guix-offload): Likewise. * guix/scripts/pack.scm (guix-pack): Likewise. * guix/scripts/package.scm (guix-package): Likewise. * guix/scripts/perform-download.scm (guix-perform-download): Likewise. * guix/scripts/processes.scm (guix-processes): Likewise. * guix/scripts/publish.scm (guix-publish): Likewise. * guix/scripts/pull.scm (guix-pull): Likewise. * guix/scripts/refresh.scm (guix-refresh): Likewise. * guix/scripts/remove.scm (guix-remove): Likewise. * guix/scripts/repl.scm (guix-repl): Likewise. * guix/scripts/search.scm (guix-search): Likewise. * guix/scripts/show.scm (guix-show): Likewise. * guix/scripts/size.scm (guix-size): Likewise. * guix/scripts/substitute.scm (guix-substitute): Likewise. * guix/scripts/system.scm (guix-system): Likewise. * guix/scripts/time-machine.scm (guix-time-machine): Likewise. * guix/scripts/upgrade.scm (guix-upgrade): Likewise. * guix/scripts/weather.scm (guix-weather): Likewise.
* environment: Set USER and LOGNAME in containerLars-Dominik Braun2020-08-30
| | | | | | | * guix/scripts/environment.scm (launch-environment/container): Set username environment variables. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
* scripts: Pass #:verbosity to 'build-notifier'.Ludovic Courtès2020-08-03
| | | | | | | | | | | | | | | * guix/scripts/archive.scm (guix-archive): Pass #:verbosity to 'build-notifier'. * guix/scripts/build.scm (guix-build): Likewise. * guix/scripts/copy.scm (guix-copy): Likewise. * guix/scripts/deploy.scm (guix-deploy): Likewise. * guix/scripts/environment.scm (guix-environment): Likewise. * guix/scripts/pack.scm (guix-pack): Likewise. * guix/scripts/package.scm (guix-package*): Likewise. * guix/scripts/pull.scm (guix-pull): Likewise. * guix/scripts/system.scm (verbosity-level): New procedure. (process-action): Pass #:verbosity to 'build-notifier'. (guix-system): Use 'verbosity-level' for 'with-status-verbosity'.
* tests: Actually run 'tests/guix-environment-container.sh'.Ludovic Courtès2020-06-20
| | | | | | | | | This test was skipped since the switch to Guile 3 because 'assert-container-features' would be inlined and thus accessing it with @@ would fail with an unbound-variable error. * guix/scripts/environment.scm (assert-container-features): Export. * tests/guix-environment-container.sh: Use single '@'.
* Merge branch 'master' into core-updatesMarius Bakke2020-03-30
|\ | | | | | | | | | | | | | | | | | | | | Conflicts: gnu/packages/admin.scm gnu/packages/commencement.scm gnu/packages/guile.scm gnu/packages/linux.scm gnu/packages/package-management.scm gnu/packages/pulseaudio.scm gnu/packages/web.scm
| * '--dry-run' no longer implies '--no-grafts'.Ludovic Courtès2020-03-29
| | | | | | | | | | | | | | | | | | | | * guix/scripts/archive.scm (%options): "dry-run" option no longer adds 'graft? #f to RESULT. * guix/scripts/environment.scm (%options): Likewise. * guix/scripts/pack.scm (%options): Likewise. * guix/scripts/package.scm (%options): Likewise. * guix/scripts/pull.scm (%options): Likewise. * guix/scripts/system.scm (%options): Likewise.
* | Merge branch 'master' into core-updatesMarius Bakke2020-03-27
|\| | | | | | | | | | | | | | | | | | | | | | | Conflicts: gnu/packages/icu4c.scm gnu/packages/man.scm gnu/packages/python-xyz.scm guix/scripts/environment.scm guix/scripts/pack.scm guix/scripts/package.scm guix/scripts/pull.scm guix/store.scm
| * environment: Use 'with-build-handler'.Ludovic Courtès2020-03-25
| | | | | | | | | | | | | | * guix/scripts/environment.scm (build-environment): Remove. (guix-environment): Wrap 'with-status-verbosity' in 'with-build-handler'. Remove 'dry-run?' conditional. Use 'built-derivations' instead of 'build-environment'.
* | scripts: Refer to (default-guile) instead of 'guile-2.2'.Ludovic Courtès2020-03-17
|/ | | | | | | | | | | This is a followup to b6bee63bed4f013064c0d902e7c8b83ed7514ade. * guix/scripts/environment.scm (guix-environment): Use (default-guile) instead of (canonical-package guile-2.2) when parameterizing '%guile-for-build'. * guix/scripts/pack.scm (guix-pack): Likewise. * guix/scripts/package.scm (guix-package*): Likewise. * guix/scripts/pull.scm (guix-pull): Likewise.
* Use 'offload?' instead of 'build-hook?' internally.Ludovic Courtès2019-11-26
| | | | | | | | | | | | | | | | | | | | * guix/scripts/archive.scm (%default-options): Replace 'build-hook?' with 'offload?'. * guix/scripts/build.scm (set-build-options-from-command-line): Pass #:offload? instead of #:use-build-hook?. (%standard-build-options): Use the 'offload? key instead of 'build-hook?. (%default-options): Replace 'build-hook?' with 'offload?'. * guix/scripts/copy.scm (%default-options): Likewise. * guix/scripts/deploy.scm (%default-options): Likewise. * guix/scripts/environment.scm (%default-options): Likewise. * guix/scripts/pack.scm (%default-options): Likewise. * guix/scripts/package.scm (%default-options): Likewise. * guix/scripts/pull.scm (%default-options): Likewise. * guix/scripts/system.scm (%default-options): Likewise. * guix/scripts/time-machine.scm (%default-options): Likewise. * guix/store.scm (set-build-options): Have #:use-build-hook? default to *unspecified*. Add #:offload?. Add call to 'warn-about-deprecation' when #:use-build-hook? is specified.
* Merge branch 'master' into core-updatesRicardo Wurmus2019-10-06
|\
| * environment: '--container' honors '--preserve'.Ludovic Courtès2019-10-03
| | | | | | | | | | | | | | * guix/scripts/environment.scm (launch-environment/container): Add #:white-list parameter and honor it. (guix-environment): Pass #:white-list to 'launch-environment/container'. * tests/guix-environment-container.sh: Add test.
* | Merge branch 'master' into core-updatesLudovic Courtès2019-09-17
|\|
| * file-systems: Add /var/run/nscd to '%network-file-mappings'.Ludovic Courtès2019-09-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows containers created by "guix environment -CN" or by "guix system container -N" to talk to the host nscd. * gnu/system/file-systems.scm (%network-file-mappings): Add "/var/run/nscd". * gnu/build/shepherd.scm (default-mounts)[nscd-socket]: Remove. * gnu/system/linux-container.scm (container-script)[nscd-run-directory] [nscd-mapping, nscd-os, nscd-specs]: Remove. [script]: Filter out from SPECS bind-mounts where the device does not exist. * guix/scripts/environment.scm (launch-environment/container) [optional-mapping->fs]: New procedure. [mappings]: Remove %NETWORK-FILE-MAPPINGS. [file-systems]: Add %NETWORK-FILE-MAPPINGS here, filtered through 'optional-mapping->fs'.
* | Merge branch 'master' into core-updatesMarius Bakke2019-07-12
|\| | | | | | | | | | | | | | | | | Conflicts: gnu/local.mk gnu/packages/python-xyz.scm gnu/packages/xml.scm guix/gexp.scm po/guix/POTFILES.in
| * scripts: environment: Add --no-cwd.Carl Dong2019-07-08
| | | | | | | | | | | | | | | | | | | | | | | | | | * doc/guix.texi (Invoking guix environment): Add --no-cwd. * guix/scripts/environment.scm (show-help, %options): Add --no-cwd. (launch-environment/container): Add 'map-cwd?' param; only add mapping for cwd if #t. Only change to cwd within container if #t, otherwise home. (guix-environment): Error if --no-cwd without --container. Provide '(not no-cwd?)' to launch-environment/container as 'map-cwd?'. * tests/guix-environment.sh: Add test for no-cwd. Co-authored-by: Mike Gerwitz <mtg@gnu.org>
| * scripts: environment: Only rewrite user-specified mappings.Carl Dong2019-07-08
| | | | | | | | | | | | * guix/scripts/environment.scm (launch-environment/container): Only apply override-user-mappings to user-mappings and cwd. Do not apply to network configuration mapping and inputs.
* | gnu: bootstrap: Download the bootstrap bash, mkdir, tar, and xz binaries.Ludovic Courtès2019-06-14
|/ | | | | | | | | | | | | | | | | * gnu/packages/bootstrap.scm (%bootstrap-executables): New variable. (bootstrap-executable-url, bootstrap-executable): New procedure. (raw-build)[->store]: Use 'run-with-store' and 'origin->derivation'. Add calls to 'derivation->output-path', and remove the list of references passed to 'add-text-to-store' for BUILDER. Augment the list of #:inputs passed to 'derivation'. (package-from-tarball): Use 'bootstrap-executable' instead of 'search-bootstrap-binary'. (%bootstrap-glibc, %bootstrap-gcc, %bootstrap-mescc-tools) (%bootstrap-mes): Likewise. * guix/scripts/environment.scm (environment-bash): Use 'bootstrap-executable' instead of 'search-bootstrap-binary'. (guix-environment): Adjust CONTAINER? case accordingly. * po/guix/POTFILES.in: Add gnu/packages/bootstrap.scm.
* environment: Non ad-hoc mode also honors transformation options.Ludovic Courtès2019-05-07
| | | | | | | | | Fixes <https://bugs.gnu.org/35618>. Reported by Florent Pruvost <florent.pruvost@inria.fr>. * guix/scripts/environment.scm (options/resolve-packages): Add call to TRANSFORM in non "ad-hoc" case. * tests/guix-environment.sh: Add test.
* scripts: More commands default to verbosity level 1.Ludovic Courtès2019-04-04
| | | | | | | * guix/scripts/environment.scm (%default-options): Change 'verbosity' to 1. * guix/scripts/pack.scm (%default-options): Likewise. * guix/scripts/system.scm (guix-system): Likewise, except for the 'build' command.
* environment: '-C' creates namespaces where the user is not root.Ludovic Courtès2019-04-02
| | | | | | | | | * guix/scripts/environment.scm (launch-environment/container): Add UID and GID. Use them in PASSWD and GROUPS. Pass them as #:guest-uid and #:guest-gid to 'call-with-container'. * tests/guix-environment-container.sh: Test the inner UID. In '--user' test, replace hard-coded 0 with 1000. * doc/guix.texi (Invoking guix environment): Adjust accordingly.
* environment: Create /etc/group in containers.Ludovic Courtès2019-03-26
| | | | | | | | Reported by Pierre Neidhardt <mail@ambrevar.xyz>. * guix/scripts/environment.scm (launch-environment/container): Create GROUPS and call 'write-group'. * tests/guix-environment-container.sh: Test it.