From mboxrd@z Thu Jan 1 00:00:00 1970 From: Pjotr Prins Subject: [PATCH] build: ruby: Add 'gem-flags' key to ruby build system Date: Mon, 13 Jul 2015 15:44:51 +0200 Message-ID: <20150713134451.GA29236@thebird.nl> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="zYM0uCDKw75PZbzx" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:35262) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZEe3N-000579-FY for guix-devel@gnu.org; Mon, 13 Jul 2015 09:45:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZEe3J-0001bQ-PY for guix-devel@gnu.org; Mon, 13 Jul 2015 09:45:53 -0400 Received: from mail.thebird.nl ([95.154.246.10]:42239) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZEe3J-0001bH-Jg for guix-devel@gnu.org; Mon, 13 Jul 2015 09:45:49 -0400 Content-Disposition: inline List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: guix-devel --zYM0uCDKw75PZbzx Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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...) --zYM0uCDKw75PZbzx Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="0001-build-ruby-Add-gem-flags-key-to-ruby-build-system.patch" >From ce8cfeadc8a661ff0fe0b96dc241d0063ed49ba3 Mon Sep 17 00:00:00 2001 From: pjotrp 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 --zYM0uCDKw75PZbzx--