~ruther/guix-local

39c890cacf59fde6769e951d7928734411cfc5cd — Ludovic Courtès 1 year, 8 months ago 9e07d88
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
2 files changed, 6 insertions(+), 34 deletions(-)

M gnu/tests/base.scm
M gnu/tests/foreign.scm
M gnu/tests/base.scm => gnu/tests/base.scm +3 -1
@@ 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

M gnu/tests/foreign.scm => gnu/tests/foreign.scm +3 -33
@@ 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.