From: Ben Woodcroft <donttrustben@gmail.com>
To: guix-devel@gnu.org
Subject: [PATCH 1/2] guix: ruby-build-system: Extract gemspec during 'configure'.
Date: Sun, 22 May 2016 09:17:00 +1000 [thread overview]
Message-ID: <1463872621-17738-2-git-send-email-donttrustben@gmail.com> (raw)
In-Reply-To: <1463872621-17738-1-git-send-email-donttrustben@gmail.com>
* guix/build/ruby-build-system.scm [build]: Move extraction from here ...
[configure]: ... to here. New variable.
[first-gemspec]: New variable.
[standard-phases]: Add 'configure'.
---
guix/build/ruby-build-system.scm | 20 +++++++++++---------
1 file changed, 11 insertions(+), 9 deletions(-)
diff --git a/guix/build/ruby-build-system.scm b/guix/build/ruby-build-system.scm
index a4ac3b3..1861010 100644
--- a/guix/build/ruby-build-system.scm
+++ b/guix/build/ruby-build-system.scm
@@ -66,14 +66,13 @@ directory."
;; Use GNU unpack strategy for things that aren't gem archives.
(gnu:unpack #:source source)))
-(define* (build #:key source #:allow-other-keys)
- "Build a new gem using the gemspec from the SOURCE gem."
- (define (first-gemspec)
- (first-matching-file "\\.gemspec$"))
+(define (first-gemspec)
+ (first-matching-file "\\.gemspec$"))
- ;; Remove the original gemspec, if present, and replace it with a new one.
- ;; This avoids issues with upstream gemspecs requiring tools such as git to
- ;; generate the files list.
+(define* (configure #:key source #:allow-other-keys)
+ "Remove the original gemspec, if present, and replace it with a new one.
+This avoids issues with upstream gemspecs requiring tools such as git to
+generate the files list."
(when (gem-archive? source)
(let ((gemspec (or (false-if-exception (first-gemspec))
;; Make new gemspec if one wasn't shipped.
@@ -94,7 +93,10 @@ directory."
(write-char (read-char pipe) out))))
#t)
(lambda ()
- (close-pipe pipe))))))
+ (close-pipe pipe)))))))
+
+(define* (build #:key source #:allow-other-keys)
+ "Build a new gem using the gemspec from the SOURCE gem."
;; Build a new gem from the current working directory. This also allows any
;; dynamic patching done in previous phases to be present in the installed
@@ -133,7 +135,7 @@ GEM-FLAGS are passed to the 'gem' invokation, if present."
(define %standard-phases
(modify-phases gnu:%standard-phases
- (delete 'configure)
+ (replace 'configure configure)
(replace 'build build)
(replace 'unpack unpack)
(replace 'install install)
--
2.7.4
next prev parent reply other threads:[~2016-05-21 23:17 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-21 23:16 [PATCH 0/2]: ruby-build-system: Extract gemspec during configure Ben Woodcroft
2016-05-21 23:17 ` Ben Woodcroft [this message]
2016-05-24 12:14 ` [PATCH 1/2] guix: ruby-build-system: Extract gemspec during 'configure' Ricardo Wurmus
2016-05-25 12:42 ` Ben Woodcroft
2016-05-21 23:17 ` [PATCH 2/2] gnu: ruby-nokogiri: Update to 1.6.7.2 Ben Woodcroft
2016-05-22 2:14 ` [PATCH 0/2]: ruby-build-system: Extract gemspec during configure Thompson, David
2016-05-22 5:18 ` Ben Woodcroft
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1463872621-17738-2-git-send-email-donttrustben@gmail.com \
--to=donttrustben@gmail.com \
--cc=guix-devel@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 external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.