all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Pjotr Prins <pjotr.public12@thebird.nl>
To: guix-devel <guix-devel@gnu.org>
Subject: [PATCH] build: ruby: Add 'gem-flags' key to ruby build system
Date: Mon, 13 Jul 2015 15:44:51 +0200	[thread overview]
Message-ID: <20150713134451.GA29236@thebird.nl> (raw)

[-- Attachment #1: Type: text/plain, Size: 215 bytes --]

Introducing gem-flags in preparation of ruby-nokogiri package

* guix/build-system/ruby.scm (build): add 'gem-flags' key
* guix/build/ruby-build-system.scm (build): use 'gem-flags' key

(this looks clean to me...)


[-- Attachment #2: 0001-build-ruby-Add-gem-flags-key-to-ruby-build-system.patch --]
[-- Type: text/x-diff, Size: 2257 bytes --]

From ce8cfeadc8a661ff0fe0b96dc241d0063ed49ba3 Mon Sep 17 00:00:00 2001
From: pjotrp <pjotr.public01@thebird.nl>
Date: Mon, 13 Jul 2015 15:32:36 +0200
Subject: [PATCH] build: ruby: Add 'gem-flags' key to ruby build system

* guix/build-system/ruby.scm (build): add 'gem-flags' key
* guix/build/ruby-build-system.scm (build): use 'gem-flags' key
---
 guix/build-system/ruby.scm       |    2 ++
 guix/build/ruby-build-system.scm |   11 +++++++----
 2 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/guix/build-system/ruby.scm b/guix/build-system/ruby.scm
index e4fda30..d601700 100644
--- a/guix/build-system/ruby.scm
+++ b/guix/build-system/ruby.scm
@@ -71,6 +71,7 @@
 
 (define* (ruby-build store name inputs
                      #:key
+                     (gem-flags ''())
                      (test-target "test")
                      (tests? #t)
                      (phases '(@ (guix build ruby-build-system)
@@ -95,6 +96,7 @@
                                (source
                                 source))
                    #:system ,system
+                   #:gem-flags ,gem-flags
                    #:test-target ,test-target
                    #:tests? ,tests?
                    #:phases ,phases
diff --git a/guix/build/ruby-build-system.scm b/guix/build/ruby-build-system.scm
index fce39b8..9cbc8a5 100644
--- a/guix/build/ruby-build-system.scm
+++ b/guix/build/ruby-build-system.scm
@@ -63,7 +63,8 @@ directory."
       (zero? (system* "rake" test-target))
       #t))
 
-(define* (install #:key source inputs outputs #:allow-other-keys)
+(define* (install #:key source inputs outputs (gem-flags '())
+                  #:allow-other-keys)
   (let* ((ruby-version
           (match:substring (string-match "ruby-(.*)\\.[0-9]$"
                                          (assoc-ref inputs "ruby"))
@@ -73,9 +74,11 @@ directory."
     (setenv "GEM_HOME" gem-home)
     (mkdir-p gem-home)
     (zero? (system* "gem" "install" "--local"
-                    "--bindir" (string-append out "/bin")))))
+                    "--bindir" (string-append out "/bin") "--"
+                    (string-join (cond (null? gem-flags)('())(gem-flags)))))))
 
 (define %standard-phases
   (modify-phases gnu:%standard-phases
-- 
1.7.10.4


             reply	other threads:[~2015-07-13 13:45 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-13 13:44 Pjotr Prins [this message]
2015-07-17 21:05 ` [PATCH] build: ruby: Add 'gem-flags' key to ruby build system Pjotr Prins
2015-07-18 15:20 ` Ludovic Courtès
2015-07-19  9:29   ` Pjotr Prins
2015-07-19 20:44     ` Ludovic Courtès
2015-07-20  6:37       ` Pjotr Prins
2015-07-20 17:43       ` Thompson, David

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=20150713134451.GA29236@thebird.nl \
    --to=pjotr.public12@thebird.nl \
    --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.