diff --git a/guix/scripts/pack.scm b/guix/scripts/pack.scm index 6d5d745bc..45eeb2e7b 100644 --- a/guix/scripts/pack.scm +++ b/guix/scripts/pack.scm @@ -98,8 +98,25 @@ found." (define guile-sqlite3&co ;; Guile-SQLite3 and its propagated inputs. - (cons guile-sqlite3 - (package-transitive-propagated-inputs guile-sqlite3))) + (make-parameter + (cons guile-sqlite3 + (package-transitive-propagated-inputs guile-sqlite3)))) + +(define guile-sqlite3/mock + ;; Mock of Guile-SQLite3 used by '--bootstrap', for testing purposes. + (computed-file "guile-sqlite3-mock" + (with-imported-modules '((guix build utils)) + #~(begin + (use-modules (guix build utils)) + + (let ((modules (string-append + #$output "/share/guile/site/2.0"))) + (mkdir-p modules) + (call-with-output-file (string-append modules + "/sqlite3.scm") + (lambda (port) + (display "(define-module (sqlite3))\n" port)))))) + #:guile %bootstrap-guile)) (define* (self-contained-tarball name profile #:key target @@ -134,7 +151,7 @@ added to the pack." (guix build store-copy) (gnu build install)) #:select? not-config?)) - (with-extensions guile-sqlite3&co + (with-extensions (guile-sqlite3&co) #~(begin (use-modules (guix build utils) ((guix build union) #:select (relative-file-name)) @@ -267,7 +284,7 @@ added to the pack." (guix build store-copy) (gnu build install)) #:select? not-config?)) - (with-extensions guile-sqlite3&co + (with-extensions (guile-sqlite3&co) #~(begin (use-modules (guix build utils) (gnu build install) @@ -717,6 +734,9 @@ Create a bundle of PACKAGE.\n")) (set-build-options-from-command-line store opts) (parameterize ((%graft? (assoc-ref opts 'graft?)) + (guile-sqlite3&co (if (assoc-ref opts 'bootstrap?) + (list guile-sqlite3/mock) + (guile-sqlite3&co))) (%guile-for-build (package-derivation store (if (assoc-ref opts 'bootstrap?)