From: Danny Milosavljevic <dannym@scratchpost.org>
To: 31026@debbugs.gnu.org
Subject: [bug#31026] [PATCH 2/2] gnu: Factorize rust-bootstrapped-package.
Date: Mon, 2 Apr 2018 19:24:09 +0200 [thread overview]
Message-ID: <20180402172409.13230-2-dannym@scratchpost.org> (raw)
In-Reply-To: <20180402172409.13230-1-dannym@scratchpost.org>
* gnu/packages/rust.scm (rust-bootstrapped-package): New procedure.
(rust): Use rust-bootstrapped-package.
---
gnu/packages/rust.scm | 29 ++++++++++++++++++-----------
1 file changed, 18 insertions(+), 11 deletions(-)
diff --git a/gnu/packages/rust.scm b/gnu/packages/rust.scm
index 8ec748fa6..eaa8c4852 100644
--- a/gnu/packages/rust.scm
+++ b/gnu/packages/rust.scm
@@ -235,6 +235,18 @@ safety and thread safety guarantees.")
;; Dual licensed.
(license (list license:asl2.0 license:expat))))
+(define (rust-bootstrapped-package base-rust version checksum)
+ "Bootstrap rust VERSION with source checksum CHECKSUM using BASE-RUST."
+ (package
+ (inherit base-rust)
+ (version version)
+ (source
+ (rust-source version checksum))
+ (native-inputs
+ (alist-replace "cargo-bootstrap" (list base-rust "cargo")
+ (alist-replace "rustc-bootstrap" (list base-rust)
+ (package-native-inputs base-rust))))))
+
(define-public rust-1.23
(package
(inherit rust-1.19)
@@ -337,18 +349,13 @@ jemalloc = \"" jemalloc "/lib/libjemalloc_pic.a" "\"
#t)))))))))
(define-public rust
- (let ((base-rust rust-1.23))
+ (let ((base-rust
+ (rust-bootstrapped-package rust-1.23 "1.24.1"
+ "1vv10x2h9kq7fxh2v01damdq8pvlp5acyh1kzcda9sfjx12kv99y")))
(package
(inherit base-rust)
- (version "1.24.1")
- (source
- (rust-source version
- "1vv10x2h9kq7fxh2v01damdq8pvlp5acyh1kzcda9sfjx12kv99y"))
- (native-inputs
- (alist-replace "cargo-bootstrap" (list base-rust "cargo")
- (alist-replace "rustc-bootstrap" (list base-rust)
- (package-native-inputs base-rust))))
(arguments
(substitute-keyword-arguments (package-arguments base-rust)
- ((#:phases phases) `(modify-phases ,phases
- (delete 'fix-mtime-bug))))))))
+ ((#:phases phases)
+ `(modify-phases ,phases
+ (delete 'fix-mtime-bug))))))))
next prev parent reply other threads:[~2018-04-02 17:25 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-02 17:17 [bug#31026] [PATCH 0/2] Split off rust@1.19.0 Danny Milosavljevic
2018-04-02 17:24 ` [bug#31026] [PATCH 1/2] gnu: Add rust@1.19.0 Danny Milosavljevic
2018-04-02 17:24 ` Danny Milosavljevic [this message]
2018-04-02 18:19 ` [bug#31026] [PATCH 0/2] Split off rust@1.19.0 Nils Gillmann
2018-04-02 19:20 ` Danny Milosavljevic
2018-04-03 11:10 ` Nils Gillmann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180402172409.13230-2-dannym@scratchpost.org \
--to=dannym@scratchpost.org \
--cc=31026@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).