summaryrefslogtreecommitdiff
path: root/tests/guix-environment.sh
Commit message (Collapse)AuthorAge
* 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.