* 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.
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.
* guix/profiles.scm (manifest-search-paths): New procedure.
(profile-derivation)[builder]: Use it.
* guix/build/profiles.scm (build-etc/profile): Remove $PATH.
* 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.
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.
* guix/build/profiles.scm (ensure-writable-directory): Export.
* guix/profiles.scm (gtk-icon-themes)[build]: Remove '@@' form and use (guix
build profiles).
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.
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.
* 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.