mirror of
https://codeberg.org/guix/guix.git
synced 2025-10-02 02:15:12 +00:00
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.
This commit is contained in:
parent
4ab9f96a5c
commit
e83c6d009f
4 changed files with 145 additions and 196 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue