~ruther/guix-local

76ae915ec852739644a85bce026e716553eb8790 — pjotrp 10 years ago 795c01f
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>
1 files changed, 9 insertions(+), 2 deletions(-)

M guix/build/ruby-build-system.scm
M guix/build/ruby-build-system.scm => guix/build/ruby-build-system.scm +9 -2
@@ 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?