diff options
author | David Thompson <dthompson2@worcester.edu> | 2015-07-26 22:01:54 -0400 |
---|---|---|
committer | David Thompson <dthompson2@worcester.edu> | 2015-08-18 17:58:13 -0400 |
commit | e83c6d009fb0cdefe7c4fa66c8a8c6b1c2071d61 (patch) | |
tree | 3cab1b53efe710a0775b234d06953abba6fe09bb /guix/build-system | |
parent | 4ab9f96a5cfec1258e657dc3fc72033c058b9bda (diff) | |
download | gnu-guix-e83c6d009fb0cdefe7c4fa66c8a8c6b1c2071d61.tar gnu-guix-e83c6d009fb0cdefe7c4fa66c8a8c6b1c2071d61.tar.gz |
build: ruby: Rewrite build system to use gem archives.
Co-Authored-By: Pjotr Prins <pjotr.public01@thebird.nl>
* guix/build-system/ruby.scm (lower): Remove git dependency.
(rubygems-uri): New procedure.
* guix/build/ruby-build-system (gitify): Delete.
(unpack): Use 'gem unpack' utility.
(check): Add docstring.
(build): Repack modified gem.
(install): Rebuild unpacked gem and install it.
(%standard-phases): Remove gitify and build phases.
* gnu/packages/ruby.scm (ruby-hoe, ruby-rake-compiler, ruby-i18n,
ruby-rspec-support, ruby-rspec-core, ruby-diff-lcs-for-rspec,
ruby-rspec-expectations, ruby-rspec-mocks, ruby-rspec, bundler,
ruby-useragent, ruby-bacon, ruby-arel, ruby-connection-pool,
ruby-net-http-persistent, ruby-minitest, ruby-minitest-sprint,
ruby-minitest-bacon, ruby-daemons, ruby-git, ruby-slop,
ruby-multipart-post): Convert to new build system.
* doc/guix.texi (ruby-build-system): Document the gem archive requirement.
Diffstat (limited to 'guix/build-system')
-rw-r--r-- | guix/build-system/ruby.scm | 40 |
1 files changed, 22 insertions, 18 deletions
diff --git a/guix/build-system/ruby.scm b/guix/build-system/ruby.scm index 135eda665b..8142e8551a 100644 --- a/guix/build-system/ruby.scm +++ b/guix/build-system/ruby.scm @@ -26,10 +26,16 @@ #:use-module (guix build-system) #:use-module (guix build-system gnu) #:use-module (ice-9 match) - #:export (%ruby-build-system-modules + #:export (rubygems-uri + %ruby-build-system-modules ruby-build ruby-build-system)) +(define (rubygems-uri name version) + "Return a URI string for the gem archive for the release corresponding to +NAME and VERSION." + (string-append "https://rubygems.org/downloads/" name "-" version ".gem")) + (define %ruby-build-system-modules ;; Build-side modules imported by default. `((guix build ruby-build-system) @@ -50,24 +56,22 @@ (define private-keywords '(#:source #:target #:ruby #:inputs #:native-inputs)) - (let ((version-control (resolve-interface '(gnu packages version-control)))) - (and (not target) ;XXX: no cross-compilation - (bag - (name name) - (system system) - (host-inputs `(,@(if source - `(("source" ,source)) - '()) - ,@inputs + (and (not target) ;XXX: no cross-compilation + (bag + (name name) + (system system) + (host-inputs `(,@(if source + `(("source" ,source)) + '()) + ,@inputs - ;; Keep the standard inputs of 'gnu-build-system'. - ,@(standard-packages))) - (build-inputs `(("ruby" ,ruby) - ("git" ,(module-ref version-control 'git)) - ,@native-inputs)) - (outputs outputs) - (build ruby-build) - (arguments (strip-keyword-arguments private-keywords arguments)))))) + ;; Keep the standard inputs of 'gnu-build-system'. + ,@(standard-packages))) + (build-inputs `(("ruby" ,ruby) + ,@native-inputs)) + (outputs outputs) + (build ruby-build) + (arguments (strip-keyword-arguments private-keywords arguments))))) (define* (ruby-build store name inputs #:key |