gnu: Move content of openssl module into tls module.
[jackhill/guix/guix.git] / gnu / packages / ruby.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2014 Pjotr Prins <pjotr.guix@thebird.nl>
3 ;;; Copyright © 2014 Ludovic Courtès <ludo@gnu.org>
4 ;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
5 ;;; Copyright © 2014 David Thompson <davet@gnu.org>
6 ;;;
7 ;;; This file is part of GNU Guix.
8 ;;;
9 ;;; GNU Guix is free software; you can redistribute it and/or modify it
10 ;;; under the terms of the GNU General Public License as published by
11 ;;; the Free Software Foundation; either version 3 of the License, or (at
12 ;;; your option) any later version.
13 ;;;
14 ;;; GNU Guix is distributed in the hope that it will be useful, but
15 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
16 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 ;;; GNU General Public License for more details.
18 ;;;
19 ;;; You should have received a copy of the GNU General Public License
20 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
21
22 (define-module (gnu packages ruby)
23 #:use-module ((guix licenses) #:prefix license:)
24 #:use-module (gnu packages)
25 #:use-module (gnu packages compression)
26 #:use-module (gnu packages readline)
27 #:use-module (gnu packages autotools)
28 #:use-module (gnu packages libffi)
29 #:use-module (gnu packages gdbm)
30 #:use-module (gnu packages tls)
31 #:use-module (gnu packages version-control)
32 #:use-module (guix packages)
33 #:use-module (guix download)
34 #:use-module (guix git-download)
35 #:use-module (guix utils)
36 #:use-module (guix build-system gnu)
37 #:use-module (guix build-system ruby))
38
39 (define-public ruby
40 (package
41 (name "ruby")
42 (version "2.2.2")
43 (source
44 (origin
45 (method url-fetch)
46 (uri (string-append "http://cache.ruby-lang.org/pub/ruby/"
47 (version-major+minor version)
48 "/ruby-" version ".tar.xz"))
49 (sha256
50 (base32
51 "0qj48a8ji8qj1sllsrhb6y65frwr77bvr08xikj86w5mib8baczh"))))
52 (build-system gnu-build-system)
53 (arguments
54 `(#:test-target "test"
55 #:parallel-tests? #f
56 #:phases
57 (alist-cons-before
58 'configure 'replace-bin-sh
59 (lambda _
60 (substitute* '("Makefile.in"
61 "ext/pty/pty.c"
62 "io.c"
63 "lib/mkmf.rb"
64 "process.c"
65 "test/rubygems/test_gem_ext_configure_builder.rb"
66 "test/rdoc/test_rdoc_parser.rb"
67 "test/ruby/test_rubyoptions.rb"
68 "test/ruby/test_process.rb"
69 "test/ruby/test_system.rb"
70 "tool/rbinstall.rb")
71 (("/bin/sh") (which "sh"))))
72 %standard-phases)))
73 (inputs
74 `(("readline" ,readline)
75 ("openssl" ,openssl)
76 ("libffi" ,libffi)
77 ("gdbm" ,gdbm)
78 ("zlib" ,zlib)))
79 (native-search-paths
80 (list (search-path-specification
81 (variable "GEM_PATH")
82 (files (list (string-append "lib/ruby/gems/"
83 (version-major+minor version)
84 ".0"))))))
85 (synopsis "Programming language interpreter")
86 (description "Ruby is a dynamic object-oriented programming language with
87 a focus on simplicity and productivity.")
88 (home-page "https://ruby-lang.org")
89 (license license:ruby)))
90
91 (define-public ruby-2.1
92 (package (inherit ruby)
93 (version "2.1.6")
94 (source
95 (origin
96 (method url-fetch)
97 (uri (string-append "http://cache.ruby-lang.org/pub/ruby/"
98 (version-major+minor version)
99 "/ruby-" version ".tar.bz2"))
100 (sha256
101 (base32
102 "1sbcmbhadcxk0509svwxbm2vvgmpf3xjxr1397bgp9x46nz36lkv"))))
103 (arguments
104 `(#:test-target "test"
105 #:parallel-tests? #f
106 #:phases
107 (alist-cons-before
108 'configure 'replace-bin-sh
109 (lambda _
110 (substitute* '("Makefile.in"
111 "ext/pty/pty.c"
112 "io.c"
113 "lib/mkmf.rb"
114 "process.c")
115 (("/bin/sh") (which "sh"))))
116 %standard-phases)))
117 (native-search-paths
118 (list (search-path-specification
119 (variable "GEM_PATH")
120 (files (list (string-append "lib/ruby/gems/"
121 (version-major+minor version)
122 ".0"))))))))
123
124 (define-public ruby-1.8
125 (package (inherit ruby)
126 (version "1.8.7-p374")
127 (source
128 (origin
129 (method url-fetch)
130 (uri (string-append "http://cache.ruby-lang.org/pub/ruby/"
131 (version-major+minor version)
132 "/ruby-" version ".tar.bz2"))
133 (sha256
134 (base32
135 "1qq7khilwkayrhwmzlxk83scrmiqfi7lgsn4c63znyvz2c1lgqxl"))))
136 (native-search-paths '())
137 (arguments
138 `(#:test-target "test"
139 #:parallel-tests? #f
140 #:phases
141 (alist-cons-before
142 'configure 'replace-bin-sh
143 (lambda _
144 (substitute* '("Makefile.in"
145 "ext/pty/pty.c"
146 "io.c"
147 "lib/mkmf.rb"
148 "process.c")
149 (("/bin/sh") (which "sh"))))
150 %standard-phases)))))
151
152 (define-public ruby-hoe
153 (package
154 (name "ruby-hoe")
155 (version "3.13.1")
156 (source (origin
157 (method git-fetch)
158 (uri (git-reference
159 (url "https://github.com/seattlerb/hoe.git")
160 (commit "0c11836"))) ; no release tags :(
161 (sha256
162 (base32
163 "0i8dimf8kxcjgqj9x65bbi3l6hc9p9gbfbb1vmrz42764a4jjbz9"))) )
164 (build-system ruby-build-system)
165 (arguments
166 '(#:phases (alist-replace
167 'build
168 (lambda _ (zero? (system* "rake" "gem")))
169 %standard-phases)))
170 (synopsis "Ruby project management helper")
171 (description
172 "Hoe is a rake/rubygems helper for project Rakefiles. It helps manage,
173 maintain, and release projects and includes a dynamic plug-in system allowing
174 for easy extensibility. Hoe ships with plug-ins for all the usual project
175 tasks including rdoc generation, testing, packaging, deployment, and
176 announcement.")
177 (home-page "http://www.zenspider.com/projects/hoe.html")
178 (license license:expat)))
179
180 (define-public ruby-rake-compiler
181 (package
182 (name "ruby-rake-compiler")
183 (version "0.9.5")
184 (source (origin
185 (method url-fetch)
186 (uri (string-append
187 "https://github.com/rake-compiler/rake-compiler/archive/v"
188 version ".tar.gz"))
189 (file-name (string-append name "-" version ".tar.gz"))
190 (sha256
191 (base32
192 "07lk1vl0jqcaqwjjhmg0qshqwcxdyr5kscc9xxm13m03835xgpf3"))))
193 (build-system ruby-build-system)
194 (arguments
195 '(#:tests? #f ; needs cucumber
196 #:phases (modify-phases %standard-phases
197 (add-before 'build 'remove-cucumber-rake-task
198 (lambda _
199 ;; Remove cucumber test file because the
200 ;; dependencies are not available right now.
201 (delete-file "tasks/cucumber.rake")))
202 (replace 'build
203 (lambda _ (zero? (system* "rake" "gem")))))))
204 (synopsis "Building and packaging helper for Ruby native extensions")
205 (description "Rake-compiler proivides a framework for building and
206 packaging native C and Java extensions in Ruby.")
207 (home-page "https://github.com/rake-compiler/rake-compiler")
208 (license license:expat)))
209
210 (define-public ruby-i18n
211 (package
212 (name "ruby-i18n")
213 (version "0.6.11")
214 (source (origin
215 (method url-fetch)
216 (uri (string-append "https://github.com/svenfuchs/i18n/archive/v"
217 version ".tar.gz"))
218 (file-name (string-append name "-" version ".tar.gz"))
219 (sha256
220 (base32
221 "1fdhnhh1p5g8vibv44d770z8nq208zrms3m2nswdvr54072y1m6k"))))
222 (build-system ruby-build-system)
223 (arguments
224 '(#:tests? #f)) ; requires bundler
225 (synopsis "Internationalization library for Ruby")
226 (description "Ruby i18n is an internationalization and localization
227 solution for Ruby programs. It features translation and localization,
228 interpolation of values to translations, pluralization, customizable
229 transliteration to ASCII, flexible defaults, bulk lookup, lambdas as
230 translation data, custom key/scope separator, custom exception handlers, and
231 an extensible architecture with a swappable backend.")
232 (home-page "http://github.com/svenfuchs/i18n")
233 (license license:expat)))
234
235 ;; RSpec is the dominant testing library for Ruby projects. Even RSpec's
236 ;; dependencies use RSpec for their test suites! To avoid these circular
237 ;; dependencies, we disable tests for all of the RSpec-related packages.
238 (define ruby-rspec-support
239 (package
240 (name "ruby-rspec-support")
241 (version "3.2.2")
242 (source (origin
243 (method url-fetch)
244 (uri (string-append
245 "https://github.com/rspec/rspec-support/archive/v"
246 version ".tar.gz"))
247 (file-name (string-append name "-" version ".tar.gz"))
248 (sha256
249 (base32
250 "1pvzfrqgy0z0gwmdgjp9f2vz1d9c0cajyzfqj9z8i2ssxnzmj4bv"))))
251 (build-system ruby-build-system)
252 (arguments
253 '(#:tests? #f)) ; avoid dependency cycles
254 (synopsis "RSpec support library")
255 (description "Support utilities for RSpec gems.")
256 (home-page "https://github.com/rspec/rspec-support")
257 (license license:expat)))
258
259 (define-public ruby-rspec-core
260 (package
261 (name "ruby-rspec-core")
262 (version "3.2.3")
263 (source (origin
264 (method url-fetch)
265 (uri (string-append
266 "https://github.com/rspec/rspec-core/archive/v"
267 version ".tar.gz"))
268 (file-name (string-append name "-" version ".tar.gz"))
269 (sha256
270 (base32
271 "1clsa4lkh5c9c7xc3xa336ym00ycr67pchpg1bv4y3fz5hvzw8ki"))))
272 (build-system ruby-build-system)
273 (arguments
274 '(#:tests? #f)) ; avoid dependency cycles
275 (propagated-inputs
276 `(("ruby-rspec-support" ,ruby-rspec-support)))
277 (synopsis "RSpec core library")
278 (description "Rspec-core provides the RSpec test runner and example
279 groups.")
280 (home-page "https://github.com/rspec/rspec-core")
281 (license license:expat)))
282
283 (define ruby-diff-lcs-for-rspec
284 (package
285 (name "ruby-diff-lcs")
286 (version "1.2.5")
287 (source (origin
288 (method url-fetch)
289 (uri (string-append
290 "https://github.com/halostatue/diff-lcs/archive/v"
291 version ".tar.gz"))
292 (file-name (string-append name "-" version ".tar.gz"))
293 (sha256
294 (base32
295 "0kmfz2qdwbfjf97rx27hh9fm39mv3z9avjmvsajqnb5wxj2l5l4s"))))
296 (build-system ruby-build-system)
297 (arguments
298 '(#:tests? #f)) ; avoid dependency cycles
299 (synopsis "Compute the difference between two Enumerable sequences")
300 (description "Diff::LCS computes the difference between two Enumerable
301 sequences using the McIlroy-Hunt longest common subsequence (LCS) algorithm.
302 It includes utilities to create a simple HTML diff output format and a
303 standard diff-like tool.")
304 (home-page "https://github.com/halostatue/diff-lcs")
305 (license license:expat)))
306
307 (define-public ruby-rspec-expectations
308 (package
309 (name "ruby-rspec-expectations")
310 (version "3.2.1")
311 (source (origin
312 (method url-fetch)
313 (uri (string-append
314 "https://github.com/rspec/rspec-expectations/archive/v"
315 version ".tar.gz"))
316 (file-name (string-append name "-" version ".tar.gz"))
317 (sha256
318 (base32
319 "0h0rpprbh6h59gmksiyi1b8w6cvcai4wdbkikajwx3w1asxi6f7x"))))
320 (build-system ruby-build-system)
321 (arguments
322 '(#:tests? #f)) ; avoid dependency cycles
323 (propagated-inputs
324 `(("ruby-rspec-support" ,ruby-rspec-support)
325 ("ruby-diff-lcs" ,ruby-diff-lcs-for-rspec)))
326 (synopsis "RSpec expecations library")
327 (description "Rspec-expectations provides a simple API to express expected
328 outcomes of a code example.")
329 (home-page "https://github.com/rspec/rspec-expectations")
330 (license license:expat)))
331
332 (define-public ruby-rspec-mocks
333 (package
334 (name "ruby-rspec-mocks")
335 (version "3.2.1")
336 (source (origin
337 (method url-fetch)
338 (uri (string-append
339 "https://github.com/rspec/rspec-mocks/archive/v"
340 version ".tar.gz"))
341 (file-name (string-append name "-" version ".tar.gz"))
342 (sha256
343 (base32
344 "1xzxsg0idxkg7czmjgqq10lcd821ibw1hjzn404sk9j6rw0fbx2g"))))
345 (build-system ruby-build-system)
346 (arguments
347 '(#:tests? #f)) ; avoid dependency cycles
348 (propagated-inputs
349 `(("ruby-rspec-support" ,ruby-rspec-support)
350 ("ruby-diff-lcs" ,ruby-diff-lcs-for-rspec)))
351 (synopsis "RSpec stubbing and mocking library")
352 (description "Rspec-mocks provides RSpec's \"test double\" framework, with
353 support for stubbing and mocking.")
354 (home-page "https://github.com/rspec/rspec-mocks")
355 (license license:expat)))
356
357 (define-public ruby-rspec
358 (package
359 (name "ruby-rspec")
360 (version "3.2.0")
361 (source (origin
362 (method url-fetch)
363 (uri (string-append
364 "https://github.com/rspec/rspec/archive/v"
365 version ".tar.gz"))
366 (file-name (string-append name "-" version ".tar.gz"))
367 (sha256
368 (base32
369 "1jg38dbaknsdhiav5vnrwfccg524fwcg6sq1715441vx1xl6p54q"))))
370 (build-system ruby-build-system)
371 (arguments
372 '(#:tests? #f)) ; avoid dependency cycles
373 (propagated-inputs
374 `(("ruby-rspec-core" ,ruby-rspec-core)
375 ("ruby-rspec-mocks" ,ruby-rspec-mocks)
376 ("ruby-rspec-expectations" ,ruby-rspec-expectations)))
377 (synopsis "Behavior-driven development framework for Ruby")
378 (description "RSpec is a behavior-driven development (BDD) framework for
379 Ruby. This meta-package includes the RSpec test runner, along with the
380 expectations and mocks frameworks.")
381 (home-page "http://rspec.info/")
382 (license license:expat)))
383
384 ;; Bundler is yet another source of circular dependencies, so we must disable
385 ;; its test suite as well.
386 (define-public bundler
387 (package
388 (name "bundler")
389 (version "1.9.9")
390 (source (origin
391 (method url-fetch)
392 (uri (string-append "https://github.com/bundler/bundler/archive/v"
393 version ".tar.gz"))
394 (file-name (string-append name "-" version ".tar.gz"))
395 (sha256
396 (base32
397 "08flx3n9hb3yz8mm5k16cdz0sb7g774f6vxn6gc3wfh5la83vfyx"))))
398 (build-system ruby-build-system)
399 (arguments
400 '(#:tests? #f)) ; avoid dependency cycles
401 (synopsis "Ruby gem bundler")
402 (description "Bundler automatically downloads and installs a list of gems
403 specified in a \"Gemfile\", as well as their dependencies.")
404 (home-page "http://bundler.io/")
405 (license license:expat)))
406
407 (define-public ruby-useragent
408 (package
409 (name "ruby-useragent")
410 (version "0.13.3")
411 (source (origin
412 (method url-fetch)
413 (uri (string-append
414 "https://github.com/gshutler/useragent/archive/v"
415 version ".tar.gz"))
416 (file-name (string-append name "-" version ".tar.gz"))
417 (sha256
418 (base32
419 "1hj00fw06i0y3rwxxhxmnrqxhpnffv4zfqx2sqqpc5qc4fdvd2x9"))))
420 (build-system ruby-build-system)
421 (arguments
422 '(#:test-target "spec"))
423 (native-inputs
424 `(("ruby-rspec" ,ruby-rspec)
425 ("bundler" ,bundler)))
426 (synopsis "HTTP user agent parser for Ruby")
427 (description "UserAgent is a Ruby library that parses and compares HTTP
428 User Agents.")
429 (home-page "https://github.com/gshutler/useragent")
430 (license license:expat)))
431
432 (define-public ruby-bacon
433 (package
434 (name "ruby-bacon")
435 (version "1.2")
436 (source (origin
437 (method url-fetch)
438 (uri (string-append
439 "https://github.com/chneukirchen/bacon/archive/"
440 version ".tar.gz"))
441 (file-name (string-append name "-" version ".tar.gz"))
442 (sha256
443 (base32
444 "0g03fxilrrx17dijww68n1lq5d8s69hrxgpga8c1i2k35bzcw5jc"))))
445 (build-system ruby-build-system)
446 (arguments
447 `(#:phases (modify-phases %standard-phases
448 (add-before 'build 'generate-docs
449 (lambda _
450 ;; This rake task also tries to generate a ChangeLog
451 ;; file from the Git log, which we don't have. It fails
452 ;; but creates an empty file, allowing the rest of the
453 ;; build to succeed.
454 (zero? (system* "rake" "predist")))))))
455 (synopsis "Small RSpec clone")
456 (description "Bacon is a small RSpec clone providing all essential
457 features.")
458 (home-page "https://github.com/chneukirchen/bacon")
459 (license license:expat)))
460
461 (define-public ruby-arel
462 (package
463 (name "ruby-arel")
464 (version "6.0.0")
465 (source (origin
466 (method url-fetch)
467 (uri (string-append
468 "https://github.com/rails/arel/archive/v"
469 version ".tar.gz"))
470 (file-name (string-append name "-" version ".tar.gz"))
471 (sha256
472 (base32
473 "0fldwp2hmrmddx22xf7hdmybngzv97qnv5rvz3qw61m94ddd6w4n"))))
474 (build-system ruby-build-system)
475 (native-inputs
476 `(("bundler" ,bundler)))
477 (synopsis "SQL AST manager for Ruby")
478 (description "Arel is a SQL AST manager for Ruby. It simplifies the
479 generation of complex SQL queries and adapts to various relational database
480 implementations.")
481 (home-page "https://github.com/rails/arel")
482 (license license:expat)))
483
484 (define-public ruby-connection-pool
485 (package
486 (name "ruby-connection-pool")
487 (version "2.2.0")
488 (source (origin
489 (method url-fetch)
490 (uri (string-append
491 "https://github.com/mperham/connection_pool/archive/v"
492 version ".tar.gz"))
493 (file-name (string-append name "-" version ".tar.gz"))
494 (sha256
495 (base32
496 "02s5rwhmgy8qqns7a5y1daa0yaw38x6lzpwyvmy46h1yrj9mc6zf"))))
497 (build-system ruby-build-system)
498 (native-inputs
499 `(("bundler" ,bundler)))
500 (synopsis "Generic connection pool for Ruby")
501 (description "Connection_pool provides a generic connection pooling
502 interface for Ruby programs.")
503 (home-page "https://github.com/mperham/connection_pool")
504 (license license:expat)))
505
506 (define-public ruby-net-http-persistent
507 (package
508 (name "ruby-net-http-persistent")
509 (version "2.9.4")
510 (source (origin
511 (method url-fetch)
512 (uri (string-append
513 "https://github.com/drbrain/net-http-persistent/archive/v"
514 version ".tar.gz"))
515 (file-name (string-append name "-" version ".tar.gz"))
516 (sha256
517 (base32
518 "1q18vji31w8gfr6ajziqkqs8n5lzkw0bl00dm2a8s05zhavzw9j9"))))
519 (build-system ruby-build-system)
520 (arguments
521 '(#:phases (modify-phases %standard-phases
522 (replace 'build ; no gemspec
523 (lambda _ (zero? (system* "rake" "gem")))))))
524 (native-inputs
525 `(("ruby-connection-pool" ,ruby-connection-pool)
526 ("ruby-hoe" ,ruby-hoe)))
527 (synopsis "Persistent HTTP connection manager")
528 (description "Net::HTTP::Persistent manages persistent HTTP connections
529 using Net::HTTP, supporting reconnection and retry according to RFC 2616.")
530 (home-page "https://github.com/drbrain/net-http-persistent")
531 (license license:expat)))
532
533 (define-public ruby-minitest
534 (package
535 (name "ruby-minitest")
536 (version "5.7.0")
537 (source (origin
538 (method git-fetch)
539 ;; No release tarballs nor git tags. This is the commit
540 ;; corresponding to the addition of the release notes to
541 ;; History.rdoc.
542 (uri (git-reference
543 (url "https://github.com/seattlerb/minitest.git")
544 (commit "e975248")))
545 (sha256
546 (base32
547 "09xjiahk7q8hid1i39ahrmghaslpj9n36zna72i3ah7kf1bh2l01"))))
548 (build-system ruby-build-system)
549 (arguments
550 '(#:phases (modify-phases %standard-phases
551 (replace 'build ; no gemspec
552 (lambda _ (zero? (system* "rake" "gem")))))))
553 (native-inputs
554 `(("ruby-hoe" ,ruby-hoe)))
555 (synopsis "Small test suite library for Ruby")
556 (description "Minitest provides a complete suite of Ruby testing
557 facilities supporting TDD, BDD, mocking, and benchmarking.")
558 (home-page "https://github.com/seattlerb/minitest")
559 (license license:expat)))
560
561 (define-public ruby-minitest-sprint
562 (package
563 (name "ruby-minitest-sprint")
564 (version "1.1.0")
565 (source (origin
566 (method git-fetch)
567 ;; Same story as ruby-minitest.
568 (uri (git-reference
569 (url "https://github.com/seattlerb/minitest-sprint.git")
570 (commit "49c02bc")))
571 (sha256
572 (base32
573 "0rbmxz94lqg5vjz60p8v2bzq8adwvmx501amvk0l124sfwmw94ms"))))
574 (build-system ruby-build-system)
575 (arguments
576 '(#:phases (modify-phases %standard-phases
577 (replace 'build ; no gemspec
578 (lambda _ (zero? (system* "rake" "gem")))))))
579 (native-inputs
580 `(("ruby-hoe" ,ruby-hoe)
581 ("ruby-minitest" ,ruby-minitest)))
582 (synopsis "Fast test suite runner for minitest")
583 (description "Minitest-sprint is a test runner for minitest that makes it
584 easier to re-run individual failing tests.")
585 (home-page "https://github.com/seattlerb/minitest-sprint")
586 (license license:expat)))
587
588 (define-public ruby-minitest-bacon
589 (package
590 (name "ruby-minitest-bacon")
591 (version "1.0.2")
592 (source (origin
593 (method git-fetch)
594 ;; Same story as ruby-minitest.
595 (uri (git-reference
596 (url "https://github.com/seattlerb/minitest-bacon.git")
597 (commit "38551d5")))
598 (sha256
599 (base32
600 "19r9fm41i0mm1xncqls8frbj1i9nr3sq1cx2mh878r6kdl02d70h"))))
601 (build-system ruby-build-system)
602 (arguments
603 '(#:phases (modify-phases %standard-phases
604 (replace 'build ; no gemspec
605 (lambda _ (zero? (system* "rake" "gem")))))))
606 (native-inputs
607 `(("ruby-hoe" ,ruby-hoe)))
608 (inputs
609 `(("ruby-minitest" ,ruby-minitest)))
610 (synopsis "Bacon compatibility library for minitest")
611 (description "Minitest-bacon extends minitest with bacon-like
612 functionality, making it easier to migrate test suites from bacon to minitest.")
613 (home-page "https://github.com/seattlerb/minitest-bacon")
614 (license license:expat)))
615
616 (define-public ruby-daemons
617 (package
618 (name "ruby-daemons")
619 (version "1.2.2")
620 (source (origin
621 (method url-fetch)
622 (uri (string-append
623 "https://github.com/thuehlinger/daemons/archive/v"
624 version ".tar.gz"))
625 (file-name (string-append name "-" version ".tar.gz"))
626 (sha256
627 (base32
628 "1v5bpdvpvhk240pc7fkn44vfclppl44pp6wd42ipi5sd5lkk7zfd"))))
629 (build-system ruby-build-system)
630 (arguments
631 `(#:tests? #f)) ; no test suite
632 (synopsis "Daemonize Ruby programs")
633 (description "Daemons provides a way to wrap existing Ruby scripts to be
634 run as a daemon and to be controlled by simple start/stop/restart commands.")
635 (home-page "https://github.com/thuehlinger/daemons")
636 (license license:expat)))
637
638 (define-public ruby-git
639 (package
640 (name "ruby-git")
641 (version "1.2.9.1")
642 (source (origin
643 (method url-fetch)
644 (uri (string-append
645 "https://github.com/schacon/ruby-git/archive/v"
646 version ".tar.gz"))
647 (file-name (string-append name "-" version ".tar.gz"))
648 (sha256
649 (base32
650 "08zg20zc7f7yy34ix2qdd8jbiz7xhjc8alk370869sq3h75hs9jc"))))
651 (build-system ruby-build-system)
652 (arguments
653 '(#:phases (modify-phases %standard-phases
654 (add-before 'build 'patch-git-binary
655 (lambda* (#:key inputs #:allow-other-keys)
656 ;; Make the default git binary an absolute path to the
657 ;; store.
658 (let ((git (string-append (assoc-ref inputs "git")
659 "/bin/git")))
660 (substitute* '("lib/git/config.rb")
661 (("'git'")
662 (string-append "'" git "'")))
663 ;; Fix a test that expects the binary to be simply
664 ;; 'git'.
665 (substitute* '("tests/units/test_logger.rb")
666 (("def test_logger")
667 (string-append
668 "def test_logger\n"
669 "Git::Base.config.binary_path = 'git'")))
670 #t)))
671 (add-before 'check 'create-fake-home
672 (lambda _
673 ;; The test suite runs 'git config --global' commands,
674 ;; so a fake home directory is needed for them to
675 ;; succeed.
676 (let ((fake-home (string-append (getcwd) "/fake-home")))
677 (mkdir fake-home)
678 (setenv "HOME" fake-home)))))))
679 (inputs
680 `(("git" ,git)))
681 (synopsis "Ruby wrappers for Git")
682 (description "Ruby/Git is a Ruby library that can be used to create, read
683 and manipulate Git repositories by wrapping system calls to the git binary.")
684 (home-page "https://github.com/schacon/ruby-git")
685 (license license:expat)))
686
687 (define-public ruby-slop
688 (package
689 (name "ruby-slop")
690 (version "4.1.0")
691 (source (origin
692 (method url-fetch)
693 (uri (string-append
694 "https://github.com/leejarvis/slop/archive/v"
695 version ".tar.gz"))
696 (file-name (string-append name "-" version ".tar.gz"))
697 (sha256
698 (base32
699 "0cqs50a0b99kjd19xpln8jpnki07cjyp3l7wxbfr44ycasr6nznh"))))
700 (build-system ruby-build-system)
701 (native-inputs
702 `(("ruby-minitest" ,ruby-minitest)))
703 (synopsis "Ruby command line option parser")
704 (description "Slop provides a Ruby domain specific language for gathering
705 options and parsing command line flags.")
706 (home-page "https://github.com/leejarvis/slop")
707 (license license:expat)))
708
709 (define-public ruby-multipart-post
710 (package
711 (name "ruby-multipart-post")
712 (version "2.0.0")
713 (source (origin
714 (method url-fetch)
715 (uri (string-append
716 "https://github.com/nicksieger/multipart-post/archive/v"
717 version ".tar.gz"))
718 (file-name (string-append name "-" version ".tar.gz"))
719 (sha256
720 (base32
721 "03n271i3knfx4j9aingxzz2bajd379dw9nswsllviqc177lq1anm"))))
722 (build-system ruby-build-system)
723 (native-inputs
724 `(("bundler" ,bundler)))
725 (synopsis "Multipart POST library for Ruby")
726 (description "Multipart-Post Adds multipart POST capability to Ruby's
727 net/http library.")
728 (home-page "https://github.com/nicksieger/multipart-post")
729 (license license:expat)))