pull: Use the commit ID as the version string.
* guix/scripts/pull.scm (build-from-source): Add #:commit parameter. Pass it to BUILD. (build-and-install): Add #:commit and pass it to 'build-from-source'. (guix-pull): Pass #:commit to 'build-and-install'.
This commit is contained in:
parent
59a1627518
commit
3085b50200
|
@ -163,9 +163,10 @@ Download and deploy the latest version of Guix.\n"))
|
||||||
;; a makefile, and, similarly, is intended to always keep this name.
|
;; a makefile, and, similarly, is intended to always keep this name.
|
||||||
"build-aux/build-self.scm")
|
"build-aux/build-self.scm")
|
||||||
|
|
||||||
(define* (build-from-source source #:key verbose?)
|
(define* (build-from-source source
|
||||||
|
#:key verbose? commit)
|
||||||
"Return a derivation to build Guix from SOURCE, using the self-build script
|
"Return a derivation to build Guix from SOURCE, using the self-build script
|
||||||
contained therein."
|
contained therein. Use COMMIT as the version string."
|
||||||
;; Running the self-build script makes it easier to update the build
|
;; Running the self-build script makes it easier to update the build
|
||||||
;; procedure: the self-build script of the Guix-to-be-installed contains the
|
;; procedure: the self-build script of the Guix-to-be-installed contains the
|
||||||
;; right dependencies, build procedure, etc., which the Guix-in-use may not
|
;; right dependencies, build procedure, etc., which the Guix-in-use may not
|
||||||
|
@ -174,12 +175,13 @@ contained therein."
|
||||||
(build (primitive-load script)))
|
(build (primitive-load script)))
|
||||||
;; BUILD must be a monadic procedure of at least one argument: the source
|
;; BUILD must be a monadic procedure of at least one argument: the source
|
||||||
;; tree.
|
;; tree.
|
||||||
(build source #:verbose? verbose?)))
|
(build source #:verbose? verbose? #:version commit)))
|
||||||
|
|
||||||
(define* (build-and-install source config-dir
|
(define* (build-and-install source config-dir
|
||||||
#:key verbose?)
|
#:key verbose? commit)
|
||||||
"Build the tool from SOURCE, and install it in CONFIG-DIR."
|
"Build the tool from SOURCE, and install it in CONFIG-DIR."
|
||||||
(mlet* %store-monad ((source (build-from-source source
|
(mlet* %store-monad ((source (build-from-source source
|
||||||
|
#:commit commit
|
||||||
#:verbose? verbose?))
|
#:verbose? verbose?))
|
||||||
(source-dir -> (derivation->output-path source))
|
(source-dir -> (derivation->output-path source))
|
||||||
(to-do? (what-to-build (list source)))
|
(to-do? (what-to-build (list source)))
|
||||||
|
@ -280,6 +282,7 @@ certificates~%"))
|
||||||
(canonical-package guile-2.0)))))
|
(canonical-package guile-2.0)))))
|
||||||
(run-with-store store
|
(run-with-store store
|
||||||
(build-and-install checkout (config-directory)
|
(build-and-install checkout (config-directory)
|
||||||
|
#:commit commit
|
||||||
#:verbose? (assoc-ref opts 'verbose?)))))))))))
|
#:verbose? (assoc-ref opts 'verbose?)))))))))))
|
||||||
|
|
||||||
;;; pull.scm ends here
|
;;; pull.scm ends here
|
||||||
|
|
Loading…
Reference in New Issue