[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
01/10: guix: ruby-build-system: Extract gemspec during 'extract-gemspec'
From: |
Ben Woodcroft |
Subject: |
01/10: guix: ruby-build-system: Extract gemspec during 'extract-gemspec'. |
Date: |
Wed, 25 May 2016 12:41:27 +0000 (UTC) |
benwoodcroft pushed a commit to branch master
in repository guix.
commit 25c288cbf12925e0f079a2ebb0247a21e14dc6b8
Author: Ben Woodcroft <address@hidden>
Date: Sun May 22 08:46:39 2016 +1000
guix: ruby-build-system: Extract gemspec during 'extract-gemspec'.
* guix/build/ruby-build-system.scm (build): Move extraction from here ...
(extract-gemspec): ... to here. New variable.
(first-gemspec): New variable.
(%standard-phases): Add 'extract-gemspec' phase.
---
guix/build/ruby-build-system.scm | 19 +++++++++++--------
1 file changed, 11 insertions(+), 8 deletions(-)
diff --git a/guix/build/ruby-build-system.scm b/guix/build/ruby-build-system.scm
index a4ac3b3..79ac380 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* (extract-gemspec #: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
@@ -134,6 +136,7 @@ GEM-FLAGS are passed to the 'gem' invokation, if present."
(define %standard-phases
(modify-phases gnu:%standard-phases
(delete 'configure)
+ (add-before 'build 'extract-gemspec extract-gemspec)
(replace 'build build)
(replace 'unpack unpack)
(replace 'install install)
- branch master updated (2301195 -> 803bcc8), Ben Woodcroft, 2016/05/25
- 02/10: gnu: ruby-nokogiri: Update to 1.6.7.2., Ben Woodcroft, 2016/05/25
- 04/10: gnu: ruby-shoulda-matchers: Update to 3.1.1., Ben Woodcroft, 2016/05/25
- 08/10: gnu: Add ruby-sequel., Ben Woodcroft, 2016/05/25
- 09/10: gnu: Add ruby-minitest-hooks., Ben Woodcroft, 2016/05/25
- 10/10: gnu: ruby-mime-types: Update to 3.1., Ben Woodcroft, 2016/05/25
- 05/10: gnu: ruby-mime-types-data: Update to 3.2016.0221., Ben Woodcroft, 2016/05/25
- 03/10: gnu: ruby-domain-name: Update to 0.5.20160310., Ben Woodcroft, 2016/05/25
- 07/10: gnu: ruby-nokogumbo: Update to 1.4.7-1., Ben Woodcroft, 2016/05/25
- 01/10: guix: ruby-build-system: Extract gemspec during 'extract-gemspec'.,
Ben Woodcroft <=
- 06/10: gnu: ruby-mini-portile-2: Update to 2.1.0., Ben Woodcroft, 2016/05/25