guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] build: ruby: Add 'gem-flags' key to ruby build system


From: Pjotr Prins
Subject: Re: [PATCH] build: ruby: Add 'gem-flags' key to ruby build system
Date: Fri, 17 Jul 2015 23:05:21 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

Can this patch go in? I sent it 4 days ago. It allows building
extensions for Ruby gems, by passing in flags to gem, as shown in the
Nokogiri patch. Even without accepting Nokogiri, this is valuable for 
building and installing gems.

Pj.

On Mon, Jul 13, 2015 at 03:44:51PM +0200, Pjotr Prins wrote:
> 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...)
> 

> From ce8cfeadc8a661ff0fe0b96dc241d0063ed49ba3 Mon Sep 17 00:00:00 2001
> From: pjotrp <address@hidden>
> 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 via email to

[Prev in Thread] Current Thread [Next in Thread]