summaryrefslogtreecommitdiff
path: root/tests/guix-environment.sh
Commit message (Collapse)AuthorAge
* environment: Document that '--manifest' can be repeated.Ludovic Courtès2019-11-22
| | | | | | * tests/guix-environment.sh: Test 'guix environment' with two '-m' options. * doc/guix.texi (Invoking guix environment): Explain that '-m' can be passed multiple times.
* Merge branch 'master' into core-updatesMark H Weaver2019-08-22
|\
| * tests: Move 'guix environment -C --no-cwd' test where it belongs.Ludovic Courtès2019-08-17
| | | | | | | | | | | | | | | | | | | | This ensures that this test is skipped in contexts where user namespaces are not supported, instead of failing. This is a followup to commit b6dc08393e6a8313b88ce422fc3c1e4e9c0efc6f. * tests/guix-environment.sh: Move '--container --no-cwd' test to... * tests/guix-environment-container.sh: ... here.
* | 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>
* | tests: Make builds less expensive.Ludovic Courtès2019-06-14
|/ | | | | | | | | | | | | | | | | | The switch to the reduced bootstrap broke build time assumptions made by tests, notably the assumption that GNU-MAKE-BOOT0 was cheap to build. This commit adjusts this to make these tests cheaper. * gnu/packages/bootstrap.scm (%bootstrap-inputs-for-tests): New variable. * guix/tests.scm (gnu-make-for-tests): New variable. * tests/guix-environment.sh: Use GNU-MAKE-FOR-TESTS instead of GNU-MAKE-BOOT0. Remove test with FINDUTILS-BOOT0. * tests/guix-package-net.sh (boot_make): Use GNU-MAKE-FOR-TESTS. * tests/packages.scm ("GNU Make, bootstrap"): Likewise. * tests/profiles.scm ("profile-derivation relative symlinks, two entries"): Likewise. * tests/union.scm (%bootstrap-inputs): Remove. ("union-build"): Use %BOOTSTRAP-INPUTS-FOR-TESTS instead of %BOOTSTRAP-INPUTS.
* 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.
* environment: Rename '--inherit' to '--preserve'.Ludovic Courtès2019-03-04
| | | | | | | | | Suggested by Eric Bavier and Ricardo Wurmus. * guix/scripts/environment.scm (show-help, %options): Emit a deprecation warning for "--inherit" and add -E/--preserve. * tests/guix-environment.sh: Adjust accordingly. * doc/guix.texi (Invoking guix environment): Update accordingly.
* environment: Remove deprecated -E/--exec option.Ludovic Courtès2019-03-04
| | | | | | * guix/scripts/environment.scm (%options): Remove "--exec", which was deprecated in commit 1de2fe95e017c42aacbaa34f5dab8d48249cc064 in 2015. * tests/guix-environment.sh: Remove use of '-E'.
* environment: Add '--inherit'.Ludovic Courtès2019-02-16
| | | | | | | | | | | | | * guix/scripts/environment.scm (purify-environment): Add 'white-list' parameter and honor it. (create-environment): Add #:white-list parameter and honor it. (launch-environment): Likewise. (launch-environment/fork): Likewise. (show-help, %options): Add '--inherit'. (guix-environment): Define 'white-list' and pass it to 'launch-environment/fork'. * tests/guix-environment.sh: Test '--inherit'. * doc/guix.texi (Invoking guix environment): Document it.
* environment: Support package transformation options.Ludovic Courtès2018-12-17
| | | | | | | | | | | | | | Fixes <https://bugs.gnu.org/33776>. Reported by Adrien Guilbaud <adrien.guilbaud@inria.fr>. * guix/scripts/environment.scm (show-help): Add call to 'show-transformation-options-help'. (%options): Add %TRANSFORMATION-OPTIONS. (options/resolve-packages): Add 'store' parameter. [transform, package->manifest-entry*]: New procedures. Use 'package->manifest-entry*' instead of 'package->manifest-entry'. (guix-environment): Move definition of 'manifest' within 'with-store'. * tests/guix-environment.sh: Add test.
* environment: Add --manifest option.David Thompson2018-02-21
| | | | | | | * guix/scripts/environment.scm (show-help, %options): Add -m/--manifest. (options/resolve-packages): Handle manifests. * tests/guix-envronment.sh: Add a test. * doc/guix.texi (Invoking guix environment): Document it.
* environment: Disable profile collision checks.Ludovic Courtès2017-06-21
| | | | | | | | | | | Reported by Efraim Flashner. This is a followup to a654dc4bcf7c8e205bdefa1a1d5f23444dd22778. * guix/profiles.scm (profile-derivation): Add #:allow-collisions? and honor it. * guix/scripts/environment.scm (inputs->profile-derivation): Pass #:allow-collisions? #f to 'profile-derivation'. * tests/guix-environment.sh: Test "guix environment guix".
* guix environment, build: Allow absolute file names with '--root'.Ludovic Courtès2017-01-19
| | | | | | | | | Reported by Chris Webber. * guix/scripts/build.scm (register-root): If ROOT is absolute, keep it as is. * guix/scripts/environment.scm (register-gc-root): Likewise. * tests/guix-environment.sh (expected): Add test.
* environment: Add '--root' option.Ludovic Courtès2016-12-20
| | | | | | | | | * guix/scripts/environment.scm (show-help, %options): Add --root. (register-gc-root): New procedure. (guix-environment): Call 'register-gc-root' when OPTS has a 'gc-root' option. * doc/guix.texi (Invoking guix environment): Document it. * tests/guix-environment.sh: Add tests.
* environment: Set 'GUIX_ENVIRONMENT' to the profile.Ludovic Courtès2016-07-26
| | | | | | | * guix/scripts/environment.scm (create-environment): Set 'GUIX_ENVIRONMENT' to PROFILE. * tests/guix-environment.sh: Test it. * doc/guix.texi (Invoking guix environment): Document it.
* profiles: 'profile-derivation' now honors #:system.Ludovic Courtès2016-06-05
| | | | | | | | | Fixes <http://bugs.gnu.org/23682>. Reported by Ander GM <anthk@openmailbox.org>. * guix/profiles.scm (profile-derivation): Pass #:system to 'gexp->derivation'. * tests/guix-environment.sh: Add 'guix environment -s' test.
* scripts: environment: Build environments as profiles.David Thompson2016-02-12
| | | | | | | | | | | | | | | | | | | | | | | | | Fixes <http://bugs.gnu.org/19816>. * guix/scripts/environment.scm (evaluate-input-search-paths) (build-inputs): Delete. (evaluate-profile-search-paths, strip-input-name) (package-or-package+output?, package-environment-inputs) (build-environment, inputs->profile-derivations): New procedures. (create-environment, show-search-paths, launch-environment) (launch-environment/container): Replace 'inputs' argument with 'profile' argument. (package+propagated-inputs): Strip off names off of input tuples. (options/resolve-packages): Handle input tuples that specify an output in expressions. (guix-environment): Convert inputs into a profile to use in the environment. Remove non-package inputs such as origins from environment inputs. * doc/guix.texi ("invoking guix environment"): Document package+output tuples for --expression option. * tests/guix-environment.sh: Update tests. * tests/guix-environment-container.sh: Likewise. Co-authored-by: Ludovic Courtès <ludo@gnu.org>
* tests: Set 'SHELL' for 'guix environment'.Ludovic Courtès2015-11-02
| | | | * tests/guix-environment.sh: Export 'SHELL'.
* scripts: environment: Allow lists of packages in expressions.David Thompson2015-10-30
| | | | | | | * guix/scripts/environment.scm (options/resolve-packages): Match against lists of packages when evaluating expressions. * tests/guix-environment.sh: Add test. * doc/guix.texi ("invoking guix environment"): Add docs.
* scripts: environment: Allow mixing regular and ad-hoc packages.David Thompson2015-10-29
| | | | | | | | | | | | | | | | | This patch changes the --ad-hoc flag to be positional. That is, the packages that appear before --ad-hoc are interpreted as packages whose inputs should be in the environment; the packages that appear after are interpreted as packages to be directly added to the environment. * guix/scripts/environment.scm (tag-package-arg, compact): New procedures. (%options): Tweak the handlers for --load and --expression options. (options/resolve-packages): Preserve package mode tag. (parse-args): Tweak argument handler to use package tagging procedure. (guix-environment): Apply ad-hoc behavior on a per package basis. * tests/guix-environment.sh: Add test. * doc/guix.texi ("invoking guix environment"): Document new behavior of --ad-hoc.
* scripts: environment: Use system* instead of system.David Thompson2015-10-09
| | | | | | | | | | | | | | | | This allows for direct program invokation without needing a shell to act as a command interpreter. * guix/scripts/environment.scm (%default-shell): New variable. (show-help): Adjust description. Remove '--exec' reference. (%default-options): Use '%default-shell'. (%options): Adjust '--exec' to run command via the default shell. (parse-args): New procedure. (guix-environment): Use 'parse-args'. Use 'system*' instead of 'system'. * tests/guix-environment.sh: Add test for '--' command invokation. * doc/guix.texi ("Invoking guix environment"): Use new syntax. Remove '--exec' documentation.
* tests: Test the exit code of 'guix environment'.Ludovic Courtès2015-07-08
| | | | | | This is a followup to d2cef62. * tests/guix-environment.sh: Add test for the exit code.
* environment: For --ad-hoc, allow users to specify an output.Ludovic Courtès2015-07-01
| | | | | | | | | | | | * guix/scripts/environment.scm (package+propagated-inputs): Add 'output' parameter. Use it in return value. (options/resolve-packages): Use 'append-map' instead of 'map'. For 'load' and 'expression', return all the outputs of the resulting package. For 'package', use 'specification->package+output' instead of 'specification->package'. (guix-environment): Adjust uses of PACKAGES accordingly. * doc/guix.texi (Invoking guix environment): Document it. * tests/guix-environment.sh: Add test for --ad-hoc guile-bootstrap:out.
* environment: Add only the specified outputs of the dependencies.Ludovic Courtès2015-07-01
| | | | | | | | | | | | | | | | | | | | Before that, 'guix environment guile' (for instance) would define environment variables that would refer to the "include" output of Bash, the "debug" output of libgc, etc., even though these are not listed as inputs in the recipe of 'guile'. * guix/gexp.scm (lower-inputs): Export. * guix/scripts/environment.scm (evaluate-input-search-paths): Remove 'derivations' parameter; add 'search-paths'. Expect 'inputs' to be a list of tuples. Adjust callers. (create-environment): Remove 'derivations' parameter; add 'search-paths'. (show-search-paths): Likewise. (package+propagated-inputs): New procedure. (packages->transitive-inputs, packages+propagated-inputs): Remove. (build-inputs): Expect INPUTS to be a list of derivation tuples. (guix-environment): Compute INPUTS using 'package+propagated-inputs', 'package->bag', and 'bag-transitive-inputs'. Move 'run-with-store' higher. * tests/guix-environment.sh: Add test with FINDUTILS-BOOT0.
* tests: Add tests for 'guix environment'.Ludovic Courtès2015-07-01
* tests/guix-environment.sh: New file. * Makefile.am (SH_TESTS): Add it.