aboutsummaryrefslogtreecommitdiff
path: root/guix/build
diff options
context:
space:
mode:
authorpjotrp <pjotr.public01@thebird.nl>2015-07-05 18:00:22 +0200
committerDavid Thompson <dthompson2@worcester.edu>2015-07-07 08:54:29 -0400
commit76ae915ec852739644a85bce026e716553eb8790 (patch)
tree6c53746d4f5571da25b36057cd4bd1099890050b /guix/build
parent795c01f31d07f1d1afabcd2e6a907286befda8b9 (diff)
downloadgnu-guix-76ae915ec852739644a85bce026e716553eb8790.tar
gnu-guix-76ae915ec852739644a85bce026e716553eb8790.tar.gz
build: ruby: Run 'rake gem' when gemspec is missing.
* guix/build/ruby-build-system.scm (build): Run 'rake gem' when there is no gemspec in the source tree. Co-Authored-By: David Thompson <davet@gnu.org>
Diffstat (limited to 'guix/build')
-rw-r--r--guix/build/ruby-build-system.scm11
1 files changed, 9 insertions, 2 deletions
diff --git a/guix/build/ruby-build-system.scm b/guix/build/ruby-build-system.scm
index 531cf382ae..fce39b8dfd 100644
--- a/guix/build/ruby-build-system.scm
+++ b/guix/build/ruby-build-system.scm
@@ -1,5 +1,6 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2014 David Thompson <davet@gnu.org>
+;;; Copyright © 2015 David Thompson <davet@gnu.org>
+;;; Copyright © 2015 Pjotr Prins <pjotr.public01@thebird.nl>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -49,7 +50,13 @@ directory."
(define build
(lambda _
- (zero? (system* "gem" "build" (first-matching-file "\\.gemspec$")))))
+ (match (find-files "." "\\.gemspec$")
+ ;; No gemspec, try 'rake gem' instead.
+ (()
+ (zero? (system* "rake" "gem")))
+ ;; Build the first matching gemspec.
+ ((gemspec . _)
+ (zero? (system* "gem" "build" gemspec))))))
(define* (check #:key tests? test-target #:allow-other-keys)
(if tests?