mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2025-01-13 14:40:21 -05:00
hg-download: Use ‘swh-download-directory-by-nar-hash’.
This allows content-addressed access to the checkout, which is preferable. * guix/hg-download.scm (hg-fetch): Add call to ‘swh-download-directory-by-nar-hash’ before ‘swh-download’ call. Change-Id: I2afc8badc1f8bb2c8bdd3a47abbb72d455d93e64
This commit is contained in:
parent
ddd455c0dd
commit
2a9f817ffd
1 changed files with 6 additions and 4 deletions
|
@ -1,5 +1,5 @@
|
|||
;;; GNU Guix --- Functional package management for GNU
|
||||
;;; Copyright © 2014, 2015, 2016, 2017, 2019 Ludovic Courtès <ludo@gnu.org>
|
||||
;;; Copyright © 2014-2017, 2019, 2024 Ludovic Courtès <ludo@gnu.org>
|
||||
;;; Copyright © 2016 Ricardo Wurmus <rekado@elephly.net>
|
||||
;;; Copyright © 2021 Xinglu Chen <public@yoctocell.xyz>
|
||||
;;;
|
||||
|
@ -117,9 +117,11 @@ (define build
|
|||
(parameterize ((%verify-swh-certificate? #f))
|
||||
(format (current-error-port)
|
||||
"Trying to download from Software Heritage...~%")
|
||||
(swh-download #$(hg-reference-url ref)
|
||||
#$(hg-reference-changeset ref)
|
||||
#$output)))))))
|
||||
(or (swh-download-directory-by-nar-hash #$hash '#$hash-algo
|
||||
#$output)
|
||||
(swh-download #$(hg-reference-url ref)
|
||||
#$(hg-reference-changeset ref)
|
||||
#$output))))))))
|
||||
|
||||
(mlet %store-monad ((guile (package->derivation guile system)))
|
||||
(gexp->derivation (or name "hg-checkout") build
|
||||
|
|
Loading…
Reference in a new issue