summaryrefslogtreecommitdiff
path: root/guix/build/profiles.scm
Commit message (Collapse)AuthorAge
* profiles: Build union of inputs in the right order.Ludovic Courtès2021-06-22
| | | | | | | | | | | | | | | | Fixes <https://bugs.gnu.org/49102>. Reported by Mathieu Othacehe <othacehe@gnu.org> and Tobias Geerinckx-Rice <me@tobias.gr>. Fixes a regression introduced in 8cef92d0633850d97c1a1d4521812268f56672be, whereby in case of file collisions, the "wrong" one would take precedence. * guix/build/profiles.scm (manifest-sexp->inputs+search-paths): Perform a breadth-first traversal. Reverse INPUTS and SEARCH-PATHS in the base case. * tests/profiles.scm ("profile-derivation, ordering & collisions"): New test.
* profiles: Move some of the work to the build side.Ludovic Courtès2021-06-12
| | | | | | | | | | | | | | | | | | | | | | When running: guix environment --ad-hoc gnome --no-grafts --search-paths this reduces wall-clock time by ~5%. The number of object cache lookups goes down from 96K to 89K. (Note that 'gnome' is an interesting example because it has many propagated inputs, which themselves have propagated inputs too, which would lead to a long input list and a long manifest in the 'profile-derivation' gexp.) * guix/profiles.scm (profile-derivation)[inputs, search-paths]: Remove. [extra-inputs]: New variable. [builder]: Adjust call to 'build-profile'. * guix/build/profiles.scm (manifest-sexp->inputs+search-paths): New procedure. (build-profile): Remove 'inputs' parameter; make 'manifest' the 2nd positional parameter and add #:extra-inputs. Call 'manifest-sexp->inputs+search-paths' to obtain 'inputs' and 'search-paths'.
* profiles: Fix typo in manifest comment.Ludovic Courtès2021-02-22
| | | | * guix/build/profiles.scm (build-profile): Fix typo.
* guix package: Add '--export-manifest'.Ludovic Courtès2021-02-01
| | | | | | | | | * guix/scripts/package.scm (export-manifest): New procedure. (show-help, %options): Add '--export-manifest'. (process-query): Honor it. * guix/build/profiles.scm (build-profile): Mention it. * tests/guix-package.sh: Test it. * doc/guix.texi (Invoking guix package): Document it.
* profiles: Add comment at the top of 'manifest' file.Ludovic Courtès2020-06-17
| | | | | * guix/build/profiles.scm (build-profile): Add comment at the top of MANIFEST-FILE.
* profiles: Allow a profile to be added as an entry of another profile.Ludovic Courtès2019-01-20
| | | | | | | * guix/build/profiles.scm (build-etc/profile): When 'OUTPUT/etc/profile' already exists, delete it first. (build-profile): Likewise for 'OUTPUT/manifest'. * tests/profiles.scm ("profile in profile"): New test.
* profiles: Correctly deal with etc/ being a relative symlink.Ludovic Courtès2018-09-11
| | | | | | | | | | | | Fixes <https://bugs.gnu.org/32686>. Reported by Oleg Pykhalov <go.wigust@gmail.com>. * guix/build/profiles.scm (ensure-writable-directory): Add #:symlink. [absolute?]: New procedure. [unsymlink]: Use it to determine how to resolve readlink's result. (build-profile): Pass SYMLINK to 'ensure-writable-directory'. * tests/profiles.scm ("profile-derivation when etc/ is a relative symlink"): New test.
* profiles: Factorize 'manifest-search-paths'.Ludovic Courtès2018-07-11
| | | | | | * guix/profiles.scm (manifest-search-paths): New procedure. (profile-derivation)[builder]: Use it. * guix/build/profiles.scm (build-etc/profile): Remove $PATH.
* profiles: Optionally use relative file names for symlink targets.Ludovic Courtès2018-05-10
| | | | | | | | | | * guix/build/union.scm (symlink-relative): New procedure. * guix/build/profiles.scm: Re-export it. (build-profile): Add #:symlink and pass it to 'union-build'. * guix/profiles.scm (profile-derivation): Add #:relative-symlinks?. Pass #:symlink to 'build-profile'. * tests/profiles.scm ("profile-derivation relative symlinks, one entry") ("profile-derivation relative symlinks, two entries"): New tests.
* Add semicolon in commands that set GUIX_PROFILE.Ludovic Courtès2017-11-20
| | | | | | | | | | | Fixes <https://bugs.gnu.org/28223>. Reported by Rosebud Uplink <Uplink.Introversion@outlook.com>. * doc/guix.texi (Binary Installation): Add missing semicolon after 'GUIX_PROFILE=' line. (Invoking guix package): Likewise. * gnu/system.scm (operating-system-etc-service)[profile]: Likewise. * guix/build/profiles.scm (build-etc/profile): Likewise.
* profiles: Slightly improve the instructions in 'etc/profile'.Ludovic Courtès2017-04-07
| | | | | * guix/build/profiles.scm (build-etc/profile): Fix typo in comment. Add backslash in the generated shell comment.
* search-paths: Allow specs with #f as their separator.Ludovic Courtès2017-01-23
| | | | | | | | | | | | | | | | | | | | | This adds support for single-entry search paths. Fixes <http://bugs.gnu.org/25422>. Reported by Leo Famulari <leo@famulari.name>. * guix/search-paths.scm (<search-path-specification>)[separator]: Document as string or #f. (evaluate-search-paths): Add case for SEPARATOR as #f. (environment-variable-definition): Handle SEPARATOR being #f. * guix/build/utils.scm (list->search-path-as-string): Add case for SEPARATOR as #f. (search-path-as-string->list): Likewise. * guix/build/profiles.scm (abstract-profile): Likewise. * tests/search-paths.scm: New file. * Makefile.am (SCM_TESTS): Add it. * tests/packages.scm ("--search-paths with single-item search path"): New test. * gnu/packages/version-control.scm (git)[native-search-paths](separator): New field.
* profiles: Export 'ensure-writable-directory' and use it.Ludovic Courtès2015-05-27
| | | | | | * guix/build/profiles.scm (ensure-writable-directory): Export. * guix/profiles.scm (gtk-icon-themes)[build]: Remove '@@' form and use (guix build profiles).
* profiles: Gracefully deal with packages containing an etc/ symlink.Ludovic Courtès2015-05-18
| | | | | | | | | | | | | This fixes a bug whereby 'guix package -i gcc-toolchain' would fail in 'build-profile'. This is because in 'gcc-toolchain', etc/ is a symlink, and so the 'scandir' call in 'unsymlink' would return #f instead of returning a list. Reported by Andreas Enge <andreas.enge@inria.fr>. * guix/build/profiles.scm (ensure-writable-directory)[unsymlink]: Append "/" to TARGET before calling 'scandir'. * tests/profiles.scm ("etc/profile when etc/ is a symlink"): New test.
* profiles: Ensure the profile's etc/ directory is writable.Ludovic Courtès2015-05-08
| | | | | | | | | Reported by 宋文武 <iyzsong@gmail.com>. * guix/build/profiles.scm (build-etc/profile, ensure-writable-directory): New procedures. (build-profile): Use them. * tests/profiles.scm ("etc/profile when etc/ already exists"): New test.
* profiles: Generate an 'etc/profile' file.Ludovic Courtès2015-05-06
| | | | | | | | | | | | | | Suggested by 宋文武 <iyzsong@gmail.com> in <http://bugs.gnu.org/20255>. * guix/build/profiles.scm (abstract-profile, write-environment-variable-definition): New procedures. (build-profile): Add #:search-paths parameter. Create OUTPUT/etc/profile. * guix/profiles.scm (profile-derivation)[builder]: Add 'search-paths' variable and pass it to 'build-profile'. Adjust #:modules argument. * tests/profiles.scm ("etc/profile"): New test. * doc/guix.texi (Invoking guix package): Mention etc/profile.
* profiles: Move build code to (guix build profiles).Ludovic Courtès2015-05-06
* guix/build/profiles.scm: New file. * Makefile.am (MODULES): Add it. * guix/profiles.scm (profile-derivation)[builder]: Call out to 'build-profile'. Add (guix build profiles) to the #:modules argument.