tests: Factorize ‘%hello-dependencies-manifest’.

* gnu/tests/base.scm (%hello-dependencies-manifest): Export.
* gnu/tests/foreign.scm (%installation-tarball-manifest): Use it.

Change-Id: Id92232f479ab5d1f0c48036b0546e3745aa63e52
This commit is contained in:
Ludovic Courtès 2025-02-27 23:13:26 +01:00
parent 9e07d889c4
commit 39c890cacf
No known key found for this signature in database
GPG key ID: 090B11993D9AEBB5
2 changed files with 6 additions and 34 deletions

View file

@ -60,6 +60,8 @@
%test-root-unmount
%test-cleanup
%test-activation
%hello-dependencies-manifest
%test-guix-daemon))
(define %simple-os
@ -998,7 +1000,7 @@ non-ASCII names from /tmp.")
(item (with-parameters ((%graft? #f))
(manifest-entry-item entry)))))
(define %hello-dependencies-manifest ;TODO: Share with (gnu tests foreign).
(define %hello-dependencies-manifest
;; Build dependencies of 'hello' needed to test 'guix build hello'.
(concatenate-manifests
(list (map-manifest-entries

View file

@ -26,6 +26,8 @@
#:autoload (guix store) (%store-prefix %store-monad %graft?)
#:use-module (gnu compression)
#:use-module (gnu tests)
#:use-module ((gnu tests base)
#:select (%hello-dependencies-manifest))
#:use-module (gnu packages base)
#:use-module (gnu packages bootstrap)
#:use-module (gnu packages guile)
@ -140,39 +142,7 @@ system is expected to be on DEVICE."
;; Manifest of the Guix installation tarball.
(concatenate-manifests
(list (packages->manifest (list guix))
;; Include the dependencies of 'hello' in addition to 'guix' so that
;; we can test 'guix build hello'.
(map-manifest-entries
manifest-entry-without-grafts
(package->development-manifest hello))
;; Add the source of 'hello'.
(manifest
(list (manifest-entry
(name "hello-source")
(version (package-version hello))
(item (let ((file (origin-actual-file-name
(package-source hello))))
(computed-file
"hello-source"
#~(begin
;; Put the tarball in a subdirectory since
;; profile union crashes otherwise.
(mkdir #$output)
(mkdir (in-vicinity #$output "src"))
(symlink #$(package-source hello)
(in-vicinity #$output
(string-append "src/"
#$file))))))))))
;; Include 'guile-final', which is needed when building derivations
;; such as that of 'hello' but missing from the development manifest.
;; Add '%bootstrap-guile', used by 'guix install --bootstrap'.
(map-manifest-entries
manifest-entry-without-grafts
(packages->manifest (list (canonical-package guile-3.0)
%bootstrap-guile))))))
%hello-dependencies-manifest)))
(define %guix-install-script
;; The 'guix-install.sh' script.