diff options
author | pjotrp <pjotr.public01@thebird.nl> | 2015-07-13 15:32:36 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2015-07-18 17:15:03 +0200 |
commit | 6e9f2913ba800e3488b95c661438f3981095a259 (patch) | |
tree | 37aa0232c156a4cb3f4cc85a674f898439fe632c | |
parent | 702675c51593f38b2d64812bb641711db569fd18 (diff) | |
download | guix-6e9f2913ba800e3488b95c661438f3981095a259.tar.gz |
build-system/ruby: Add #:gem-flags parameter.
* guix/build-system/ruby.scm (build): add 'gem-flags' key * guix/build/ruby-build-system.scm (build): use 'gem-flags' key * doc/guix.texi (Build Systems): Mention #:gem-flags. Co-authored-by: Ludovic Courtès <ludo@gnu.org>
-rw-r--r-- | doc/guix.texi | 3 | ||||
-rw-r--r-- | guix/build-system/ruby.scm | 2 | ||||
-rw-r--r-- | guix/build/ruby-build-system.scm | 12 |
3 files changed, 11 insertions, 6 deletions
diff --git a/doc/guix.texi b/doc/guix.texi index 0d24b12f8c..71b3b2d529 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -2458,7 +2458,8 @@ implements the RubyGems build procedure used by Ruby packages, which involves running @code{gem build} followed by @code{gem install}. Which Ruby package is used can be specified with the @code{#:ruby} -parameter. +parameter. A list of additional flags to be passed to the @command{gem} +command can be specified with the @code{#:gem-flags} parameter. @end defvr @defvr {Scheme Variable} waf-build-system diff --git a/guix/build-system/ruby.scm b/guix/build-system/ruby.scm index e4fda30cf3..135eda665b 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 fce39b8dfd..307ac919dd 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")) @@ -72,10 +73,11 @@ directory." (gem-home (string-append out "/lib/ruby/gems/" ruby-version ".0"))) (setenv "GEM_HOME" gem-home) (mkdir-p gem-home) - (zero? (system* "gem" "install" "--local" - (first-matching-file "\\.gem$") - ;; Executables should go into /bin, not /lib/ruby/gems. - "--bindir" (string-append out "/bin"))))) + (zero? (apply system* "gem" "install" "--local" + (first-matching-file "\\.gem$") + ;; Executables should go into /bin, not /lib/ruby/gems. + "--bindir" (string-append out "/bin") + gem-flags)))) (define %standard-phases (modify-phases gnu:%standard-phases |