File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -338,6 +338,8 @@ output directory.
338338EOF
339339}
340340
341+ guix-prefetch ' 1h00qp4z5k6lfz310xjwsmqs8fwxi6ngas51169cafz4h9fmc68y' ' https://archives.boost.io/release/1.80.0/source/boost_1_80_0.tar.bz2'
342+
341343# Deterministically build Bitcoin Core
342344# shellcheck disable=SC2153
343345for host in $HOSTS ; do
Original file line number Diff line number Diff line change @@ -60,6 +60,37 @@ time-machine() {
6060 -- " $@ "
6161}
6262
63+ # ###############
64+ guix_prefetch_temp=
65+ trap ' test -n "$guix_prefetch_temp" && rm -rf -- "$guix_prefetch_temp"' EXIT
66+
67+ guix-prefetch () {
68+ local hash=" $1 " uri=" $2 "
69+ test -n " $guix_prefetch_temp " || guix_prefetch_temp=" $( mktemp) "
70+ cat > " $guix_prefetch_temp " << EOF
71+ (use-modules (guix packages)
72+ (guix download)
73+ (guix build-system trivial)
74+ (guix licenses))
75+
76+ (define-public dummy
77+ (package
78+ (name "dummy")
79+ (version "0")
80+ (source (origin
81+ (method url-fetch)
82+ (uri "${uri} ")
83+ (sha256 (base32 "${hash} "))))
84+ (build-system trivial-build-system)
85+ (synopsis "")
86+ (description "")
87+ (home-page "")
88+ (license gpl3+)))
89+
90+ dummy
91+ EOF
92+ guix build -f " $guix_prefetch_temp " --source
93+ }
6394
6495# ###############
6596# Set common variables
You can’t perform that action at this time.
0 commit comments