1(use-modules
2 ((guix licenses) #:prefix license:)
3 (guix packages)
4 (guix download)
5 (guix git-download)
6 (guix build-system ruby)
7 (guix build-system copy)
8 (gnu packages ruby)
9 (gnu packages tls)
10 (gnu packages databases)
11 (ice-9 rdelim)
12 (ice-9 popen))
13
14(define-public ruby-eventmachine-openssl
15 (package
16 (inherit ruby-eventmachine)
17 (inputs `(("openssl" ,openssl)))))
18
19(define-public ruby-sucker-punch
20 (package
21 (name "ruby-sucker-punch")
22 (version "2.0.0")
23 (source
24 (origin
25 (method url-fetch)
26 (uri (rubygems-uri "sucker_punch" version))
27 (sha256
28 (base32
29 "008vv7gpv2nm5n1njzvabd3aagbywc240y23vifvq6plir53ybay"))))
30 (build-system ruby-build-system)
31 (arguments
32 `(#:phases
33 (modify-phases %standard-phases
34 (add-after 'extract-gemspec 'less-strict-dependencies
35 (lambda _
36 (substitute* "sucker_punch.gemspec"
37 (("1.0.0") "1.0"))
38 #t)))))
39 (propagated-inputs
40 `(("ruby-concurrent" ,ruby-concurrent)))
41 (native-inputs
42 `(("ruby-pry" ,ruby-pry)))
43 (synopsis
44 "Asynchronous processing library for Ruby")
45 (description
46 "Asynchronous processing library for Ruby")
47 (home-page
48 "https://github.com/brandonhilkert/sucker_punch")
49 (license license:expat)))
50
51(define-public ruby-countdownlatch
52 (package
53 (name "ruby-countdownlatch")
54 (version "1.0.0")
55 (source
56 (origin
57 (method url-fetch)
58 (uri (rubygems-uri "countdownlatch" version))
59 (sha256
60 (base32
61 "1v6pbay6z07fp7yvnba1hmyacbicvmjndd8rn2h1b5rmpcb5s0j3"))))
62 (build-system ruby-build-system)
63 (synopsis
64 "A synchronization aid that allows one or more threads to wait until a set of operations being performed in other threads completes")
65 (description
66 "This package provides a synchronization aid that allows one or more threads to wait until a set of operations being performed in other threads completes")
67 (home-page
68 "https://github.com/benlangfeld/countdownlatch")
69 (license license:expat)))
70
71(define-public ruby-blather
72 (package
73 (name "ruby-blather")
74 (version "37fb26593aa776dd91965796e4d9ff79b05f334a")
75 (source
76 (origin
77 (method git-fetch)
78 ;; Download from GitHub because the rubygems version requires old
79 ;; version of bundler Rakefile.
80 (uri (git-reference
81 (url "https://github.com/adhearsion/blather")
82 (commit version)))
83 (file-name (git-file-name name version))
84 (sha256
85 (base32
86 "0k9viwpbd4ifmiv22x2vh2vvc5wgvcxg7x7bwn5nkc5aspisxlq2"))))
87 (build-system ruby-build-system)
88 (arguments
89 `(#:phases
90 (modify-phases %standard-phases
91 (add-after 'extract-gemspec 'less-strict-dependencies
92 (lambda _
93 (substitute* "blather.gemspec"
94 ((".*guard-rspec.*") "\n")
95 ((".*bluecloth.*") "\n"))
96 #t)))))
97 (propagated-inputs
98 `(("ruby-activesupport" ,ruby-activesupport)
99 ("ruby-eventmachine" ,ruby-eventmachine)
100 ("ruby-niceogiri" ,ruby-niceogiri)
101 ("ruby-nokogiri" ,ruby-nokogiri)
102 ("ruby-sucker-punch" ,ruby-sucker-punch)))
103 (native-inputs
104 `(("ruby-rspec" ,ruby-rspec)
105 ("ruby-yard" ,ruby-yard)
106 ("ruby-countdownlatch" ,ruby-countdownlatch)
107 ("ruby-rb-fsevent" ,ruby-rb-fsevent)
108 ("ruby-mocha" ,ruby-mocha)))
109 (synopsis
110 "An XMPP DSL for Ruby written on top of EventMachine and Nokogiri")
111 (description
112 "An XMPP DSL for Ruby written on top of EventMachine and Nokogiri")
113 (home-page "http://adhearsion.com/blather")
114 (license license:expat)))
115
116(define-public ruby-braintree
117 (package
118 (name "ruby-braintree")
119 (version "4.4.0")
120 (source
121 (origin
122 (method git-fetch)
123 ;; Download from GitHub because the rubygems version does not contain
124 ;; Rakefile.
125 (uri (git-reference
126 (url "https://github.com/braintree/braintree_ruby")
127 (commit version)))
128 (file-name (git-file-name name version))
129 (sha256
130 (base32
131 "0dzf26yhmlf65464nranvqg5rzhrc8gfaqbg3p4ld3abz8ccnw08"))))
132 (build-system ruby-build-system)
133 (arguments
134 `(#:test-target "test:unit"
135 #:phases
136 (modify-phases %standard-phases
137 (add-after 'unpack 'less-strict-dependencies
138 (lambda _
139 (substitute* "Gemfile"
140 (("gem \"libxml-ruby\", \"3.2.0\"") "gem \"libxml-ruby\", \"~> 3.0.0\"")
141 (("gem \"rspec\", \"3.9.0\"") "gem \"rspec\", \"~> 3.8.0\"")
142 (("gem \"rubocop\", \"~>1.12.0\"") "gem \"rubocop\", \"~> 1.10.0\""))
143 #t)))))
144 (propagated-inputs
145 `(("ruby-builder" ,ruby-builder)
146 ("ruby-rexml" ,ruby-rexml)))
147 (native-inputs
148 `(("ruby-rspec" ,ruby-rspec)
149 ("ruby-libxml" ,ruby-libxml)
150 ("ruby-pry" ,ruby-pry)
151 ("ruby-rake" ,ruby-rake)
152 ("ruby-webrick" ,ruby-webrick)
153 ("ruby-rubocop" ,ruby-rubocop)))
154 (synopsis
155 "Resources and tools for developers to integrate Braintree's global payments platform.")
156 (description
157 "Resources and tools for developers to integrate Braintree's global payments platform.")
158 (home-page "https://www.braintreepayments.com/")
159 (license license:expat)))
160
161(define-public ruby-value-semantics
162 (package
163 (name "ruby-value-semantics")
164 (version "3.6.1")
165 (source
166 (origin
167 (method url-fetch)
168 (uri (rubygems-uri "value_semantics" version))
169 (sha256
170 (base32
171 "1vdwai8wf6r1fkvdpyz1vzxm89q7ghjvb3pqpg2kvwibwzd99dnx"))))
172 (build-system ruby-build-system)
173 (arguments
174 `(#:phases
175 (modify-phases %standard-phases
176 (replace 'check
177 (lambda _
178 (invoke "rspec")
179 #t)))))
180 (native-inputs
181 `(("ruby-rspec" ,ruby-rspec)))
182 (synopsis
183 "
184 Generates modules that provide conventional value semantics for a given set of attributes.
185 The behaviour is similar to an immutable `Struct` class,
186 plus extensible, lightweight validation and coercion.
187 ")
188 (description
189 "
190 Generates modules that provide conventional value semantics for a given set of attributes.
191 The behaviour is similar to an immutable `Struct` class,
192 plus extensible, lightweight validation and coercion.
193 ")
194 (home-page
195 "https://github.com/tomdalling/value_semantics")
196 (license license:expat)))
197
198(define-public ruby-promise.rb
199 (package
200 (name "ruby-promise.rb")
201 (version "0.7.4")
202 (source
203 (origin
204 (method url-fetch)
205 (uri (rubygems-uri "promise.rb" version))
206 (sha256
207 (base32
208 "0a819sikcqvhi8hck1y10d1nv2qkjvmmm553626fmrh51h2i089d"))))
209 (build-system ruby-build-system)
210 (arguments
211 `(#:test-target "spec"
212 #:phases
213 (modify-phases %standard-phases
214 (add-after 'extract-gemspec 'less-strict-dependencies
215 (lambda _
216 (substitute* "Rakefile"
217 (("if Gem.ruby_version.*") "if false\n"))
218 (substitute* "spec/spec_helper.rb"
219 ((".*devtools/spec_helper.*") "\n"))
220 #t)))))
221 (native-inputs
222 `(("ruby-rspec" ,ruby-rspec)
223 ("ruby-rspec-its" ,ruby-rspec-its)
224 ("ruby-awesome-print" ,ruby-awesome-print)
225 ("ruby-fuubar" ,ruby-fuubar)))
226 (synopsis "Promises/A+ for Ruby")
227 (description "Promises/A+ for Ruby")
228 (home-page "https://github.com/lgierth/promise")
229 (license license:unlicense)))
230
231(define-public ruby-multicodecs
232 (package
233 (name "ruby-multicodecs")
234 (version "0.2.1")
235 (source
236 (origin
237 (method url-fetch)
238 (uri (rubygems-uri "multicodecs" version))
239 (sha256
240 (base32
241 "0drq267di57l9zqw6zvqqimilz42rbc8z7392dwkk8wslq30s7v8"))))
242 (build-system ruby-build-system)
243 (synopsis
244 "This gem provides a PORO of the multicodec table for use with other
245 multiformat ruby gems.")
246 (description
247 "This gem provides a PORO of the multicodec table for use with other
248 multiformat ruby gems.")
249 (home-page
250 "https://github.com/SleeplessByte/ruby-multicodec")
251 (license license:expat)))
252
253(define-public ruby-multihashes
254 (package
255 (name "ruby-multihashes")
256 (version "0.2.0")
257 (source
258 (origin
259 (method url-fetch)
260 (uri (rubygems-uri "multihashes" version))
261 (sha256
262 (base32
263 "17wiyy3fiv8rpgdv9ca01yncsmaaf8yg15bg18wc7m9frss1vgqg"))))
264 (build-system ruby-build-system)
265 (propagated-inputs
266 `(("ruby-multicodecs" ,ruby-multicodecs)))
267 (synopsis
268 "A simple, low-level multihash (https://github.com/jbenet/multihash) implementation for ruby.")
269 (description
270 "This package provides a simple, low-level multihash (https://github.com/jbenet/multihash) implementation for ruby.")
271 (home-page
272 "https://github.com/neocities/ruby-multihashes")
273 (license license:expat)))
274
275(define-public ruby-lazy-object
276 (package
277 (name "ruby-lazy-object")
278 (version "0.0.3")
279 (source
280 (origin
281 (method url-fetch)
282 (uri (rubygems-uri "lazy_object" version))
283 (sha256
284 (base32
285 "08px15lahc28ik9smvw1hgamf792gd6gq0s4k94yq1h7jq25wjn8"))))
286 (build-system ruby-build-system)
287 (arguments
288 '(#:test-target "spec"))
289 (synopsis
290 "It's an object wrapper that forwards all calls to the reference object. This object is not created until the first method dispatch.")
291 (description
292 "It's an object wrapper that forwards all calls to the reference object. This object is not created until the first method dispatch.")
293 (home-page "")
294 (license license:expat)))
295
296(define-public ruby-citrus
297 (package
298 (name "ruby-citrus")
299 (version "3.0.2")
300 (source
301 (origin
302 (method git-fetch)
303 ;; Download from GitHub because the rubygems version does not contain
304 ;; files needed for tests
305 (uri (git-reference
306 (url "https://github.com/mjackson/citrus")
307 (commit (string-append "v" version))))
308 (file-name (git-file-name name version))
309 (sha256
310 (base32
311 "197wrgqrddgm1xs3yvjvd8vkvil4h4mdrcp16jmd4b57rxrrr769"))))
312 (build-system ruby-build-system)
313 (synopsis "Parsing Expressions for Ruby")
314 (description "Parsing Expressions for Ruby")
315 (home-page "http://mjackson.github.io/citrus")
316 (license license:expat)))
317
318(define-public ruby-cbor
319 (package
320 (name "ruby-cbor")
321 (version "0.5.9.6")
322 (source
323 (origin
324 (method url-fetch)
325 (uri (rubygems-uri "cbor" version))
326 (sha256
327 (base32
328 "0511idr8xps9625nh3kxr68sdy6l3xy2kcz7r57g47fxb1v18jj3"))))
329 (build-system ruby-build-system)
330 (arguments
331 '(#:test-target "spec"))
332 (native-inputs
333 `(("ruby-rspec" ,ruby-rspec)
334 ("ruby-rake-compiler" ,ruby-rake-compiler)
335 ("ruby-yard" ,ruby-yard)))
336 (synopsis
337 "CBOR is a library for the CBOR binary object representation format, based on Sadayuki Furuhashi's MessagePack library.")
338 (description
339 "CBOR is a library for the CBOR binary object representation format, based on Sadayuki Furuhashi's MessagePack library.")
340 (home-page "http://cbor.io/")
341 (license license:asl2.0)))
342
343(define-public ruby-gem-release
344 (package
345 (name "ruby-gem-release")
346 (version "2.2.2")
347 (source
348 (origin
349 (method url-fetch)
350 (uri (rubygems-uri "gem-release" version))
351 (sha256
352 (base32
353 "108rrfaiayi14zrqbb6z0cbwcxh8n15am5ry2a86v7c8c3niysq9"))))
354 (build-system ruby-build-system)
355 (arguments
356 ;; No rakefile
357 `(#:tests? #f))
358 (synopsis
359 "Release your ruby gems with ease. (What a bold statement for such a tiny plugin ...)")
360 (description
361 "Release your ruby gems with ease. (What a bold statement for such a tiny plugin ...)")
362 (home-page
363 "https://github.com/svenfuchs/gem-release")
364 (license license:expat)))
365
366(define-public ruby-base32
367 (package
368 (name "ruby-base32")
369 (version "0.3.4")
370 (source
371 (origin
372 (method url-fetch)
373 (uri (rubygems-uri "base32" version))
374 (sha256
375 (base32
376 "1fjs0l3c5g9qxwp43kcnhc45slx29yjb6m6jxbb2x1krgjmi166b"))))
377 (build-system ruby-build-system)
378 (native-inputs
379 `(("ruby-gem-release" ,ruby-gem-release)))
380 (synopsis
381 "Ruby extension for base32 encoding and decoding")
382 (description
383 "Ruby extension for base32 encoding and decoding")
384 (home-page "https://github.com/stesla/base32")
385 (license license:expat)))
386
387(define-public ruby-dhall
388 (package
389 (name "ruby-dhall")
390 (version "0.5.3.fixed")
391 (source
392 (origin
393 (method url-fetch)
394 (uri (rubygems-uri "dhall" version))
395 (sha256
396 (base32
397 "1qn7fpiakzpllks43m7r3wh6a2rypxgg02y09zzk27lhqv6bbbrz"))))
398 (build-system ruby-build-system)
399 (arguments
400 ;; No test in gem archive
401 `(#:tests? #f))
402 (propagated-inputs
403 `(("ruby-base32" ,ruby-base32)
404 ("ruby-cbor" ,ruby-cbor)
405 ("ruby-citrus" ,ruby-citrus)
406 ("ruby-lazy-object" ,ruby-lazy-object)
407 ("ruby-multihashes" ,ruby-multihashes)
408 ("ruby-promise.rb" ,ruby-promise.rb)
409 ("ruby-value-semantics" ,ruby-value-semantics)))
410 (synopsis
411 "This is a Ruby implementation of the Dhall configuration language. Dhall is a powerful, but safe and non-Turing-complete configuration language. For more information, see: https://dhall-lang.org")
412 (description
413 "This is a Ruby implementation of the Dhall configuration language. Dhall is a powerful, but safe and non-Turing-complete configuration language. For more information, see: https://dhall-lang.org")
414 (home-page
415 "https://git.sr.ht/~singpolyma/dhall-ruby")
416 (license license:gpl3)))
417
418(define-public ruby-money
419 (package
420 (name "ruby-money")
421 (version "6.16.0")
422 (source
423 (origin
424 (method url-fetch)
425 (uri (rubygems-uri "money" version))
426 (sha256
427 (base32
428 "0jkmsj5ymadik7bvl670bqwmvhsdyv7hjr8gq9z293hq35gnyiyg"))))
429 (build-system ruby-build-system)
430 (arguments
431 ;; No rakefile
432 `(#:tests? #f))
433 (propagated-inputs `(("ruby-i18n" ,ruby-i18n)))
434 (synopsis
435 "A Ruby Library for dealing with money and currency conversion.")
436 (description
437 "This package provides a Ruby Library for dealing with money and currency conversion.")
438 (home-page "https://rubymoney.github.io/money")
439 (license license:expat)))
440
441(define-public ruby-monetize
442 (package
443 (name "ruby-monetize")
444 (version "1.11.0")
445 (source
446 (origin
447 (method url-fetch)
448 (uri (rubygems-uri "monetize" version))
449 (sha256
450 (base32
451 "0cna2myxdbwfq0gn6k2hgrh368dq7wld3jklm96443ysykd0difn"))))
452 (build-system ruby-build-system)
453 (arguments
454 '(#:test-target "spec"))
455 (native-inputs
456 `(("ruby-rspec" ,ruby-rspec)))
457 (propagated-inputs `(("ruby-money" ,ruby-money)))
458 (synopsis
459 "A library for converting various objects into `Money` objects.")
460 (description
461 "This package provides a library for converting various objects into `Money` objects.")
462 (home-page
463 "https://github.com/RubyMoney/monetize")
464 (license license:expat)))
465
466(define-public ruby-money-open-exchange-rates
467 (package
468 (name "ruby-money-open-exchange-rates")
469 (version "1.4.0")
470 (source
471 (origin
472 (method git-fetch)
473 ;; Download from GitHub because the rubygems version does not contain
474 ;; Rakefile.
475 (uri (git-reference
476 (url "https://github.com/spk/money-open-exchange-rates")
477 (commit (string-append "v" version))))
478 (file-name (git-file-name name version))
479 (sha256
480 (base32
481 "11xwqli8snr19k48yh8h77sal5vxd4snzq9gxg08v61f0574m3gw"))))
482 (build-system ruby-build-system)
483 (propagated-inputs `(("ruby-money" ,ruby-money)))
484 (native-inputs
485 `(("ruby-minitest" ,ruby-minitest)
486 ("ruby-mocha" ,ruby-mocha)
487 ("ruby-timecop" ,ruby-timecop)
488 ("ruby-webmock" ,ruby-webmock)
489 ("ruby-monetize" ,ruby-monetize)
490 ("ruby-rake" ,ruby-rake)
491 ("ruby-rubocop" ,ruby-rubocop)))
492 (synopsis
493 "A gem that calculates the exchange rate using published rates from open-exchange-rates. Compatible with the money gem.")
494 (description
495 "This package provides a gem that calculates the exchange rate using published rates from open-exchange-rates. Compatible with the money gem.")
496 (home-page
497 "http://github.com/spk/money-open-exchange-rates")
498 (license license:expat)))
499
500(define-public ruby-roda
501 (package
502 (name "ruby-roda")
503 (version "3.47.0")
504 (source
505 (origin
506 (method url-fetch)
507 (uri (rubygems-uri "roda" version))
508 (sha256
509 (base32
510 "1g3zs4bk8hqii15ci1hsykcsya88vr2qv63gp1qbcx4bm14l8lkl"))))
511 (build-system ruby-build-system)
512 (arguments
513 ;; No rakefile
514 `(#:tests? #f))
515 (propagated-inputs `(("ruby-rack" ,ruby-rack)))
516 (synopsis "Routing tree web toolkit")
517 (description "Routing tree web toolkit")
518 (home-page "http://roda.jeremyevans.net")
519 (license license:expat)))
520
521(define-public ruby-nori
522 (package
523 (name "ruby-nori")
524 (version "2.6.0")
525 (source
526 (origin
527 (method url-fetch)
528 (uri (rubygems-uri "nori" version))
529 (sha256
530 (base32
531 "066wc774a2zp4vrq3k7k8p0fhv30ymqmxma1jj7yg5735zls8agn"))))
532 (build-system ruby-build-system)
533 (arguments
534 ;; Tests require too old version of rspec
535 `(#:tests? #f))
536 (native-inputs
537 `(("ruby-rspec" ,ruby-rspec)
538 ("ruby-rake" ,ruby-rake)
539 ("ruby-nokogiri" ,ruby-nokogiri)))
540 (synopsis "XML to Hash translator")
541 (description "XML to Hash translator")
542 (home-page "https://github.com/savonrb/nori")
543 (license license:expat)))
544
545(define-public ruby-faraday-middleware
546 (package
547 (name "ruby-faraday-middleware")
548 (version "1.1.0")
549 (source
550 (origin
551 (method url-fetch)
552 (uri (rubygems-uri "faraday_middleware" version))
553 (sha256
554 (base32
555 "0kgcphf7n74l3wlcvxafcp6a4l18b1bf4qslvz5dqj6v3gc8h8j4"))))
556 (build-system ruby-build-system)
557 (arguments
558 ;; No rakefile
559 `(#:tests? #f))
560 (propagated-inputs
561 `(("ruby-faraday" ,ruby-faraday)))
562 (synopsis "Various middleware for Faraday")
563 (description "Various middleware for Faraday")
564 (home-page
565 "https://github.com/lostisland/faraday_middleware")
566 (license license:expat)))
567
568(define-public ruby-bandwidth-iris
569 (package
570 (name "ruby-bandwidth-iris")
571 (version "list-port-ins")
572 (source
573 (origin
574 (method git-fetch)
575 (uri (git-reference
576 (url "https://github.com/singpolyma/ruby-bandwidth-iris")
577 (commit version)))
578 (sha256
579 (base32
580 "0vab3fbkps6kvkph38ssfk7s9j646l4gz8p1q4glvi26js0v9rhc"))))
581 (build-system ruby-build-system)
582 (arguments
583 ; Tests don't require helper for some reason, so all fail...
584 '(#:tests? #f))
585 (propagated-inputs
586 `(("ruby-activesupport" ,ruby-activesupport)
587 ("ruby-builder" ,ruby-builder)
588 ("ruby-faraday" ,ruby-faraday)
589 ("ruby-faraday-middleware"
590 ,ruby-faraday-middleware)
591 ("ruby-nori" ,ruby-nori)))
592 (native-inputs
593 `(("ruby-rspec" ,ruby-rspec)
594 ("ruby-yard" ,ruby-yard)))
595 (synopsis
596 "Gem for integrating to Bandwidth's Iris API")
597 (description
598 "Gem for integrating to Bandwidth's Iris API")
599 (home-page
600 "https://github.com/bandwidthcom/ruby-bandwidth-iris")
601 (license license:expat)))
602
603(define-public ruby-sentry-core
604 (package
605 (name "ruby-sentry-core")
606 (version "4.3.1")
607 (source
608 (origin
609 (method url-fetch)
610 (uri (rubygems-uri "sentry-ruby-core" version))
611 (sha256
612 (base32
613 "13z35s9mflh3v775a0scsnqhscz9q46kaak38y7zmx32z7sg2a3a"))))
614 (build-system ruby-build-system)
615 (arguments
616 ; No rakefile in gem
617 '(#:tests? #f))
618 (propagated-inputs
619 `(("ruby-concurrent" ,ruby-concurrent)
620 ("ruby-faraday" ,ruby-faraday)))
621 (synopsis
622 "A gem that provides a client interface for the Sentry error logger")
623 (description
624 "This package provides a gem that provides a client interface for the Sentry error logger")
625 (home-page
626 "https://github.com/getsentry/sentry-ruby")
627 (license license:expat)))
628
629(define-public ruby-sentry
630 (package
631 (name "ruby-sentry")
632 (version "4.3.1")
633 (source
634 (origin
635 (method url-fetch)
636 (uri (rubygems-uri "sentry-ruby" version))
637 (sha256
638 (base32
639 "101q3141xfkmh7vi8h4sjqqmxcx90xhyq51lmfnhfiwgii7cn9k8"))))
640 (build-system ruby-build-system)
641 (arguments
642 ; No rakefile in gem
643 '(#:tests? #f))
644 (propagated-inputs
645 `(("ruby-concurrent" ,ruby-concurrent)
646 ("ruby-faraday" ,ruby-faraday)
647 ("ruby-sentry-core" ,ruby-sentry-core)))
648 (synopsis
649 "A gem that provides a client interface for the Sentry error logger")
650 (description
651 "This package provides a gem that provides a client interface for the Sentry error logger")
652 (home-page
653 "https://github.com/getsentry/sentry-ruby")
654 (license license:expat)))
655
656(define-public ruby-webrick
657 (package
658 (name "ruby-webrick")
659 (version "1.7.0")
660 (source
661 (origin
662 (method url-fetch)
663 (uri (rubygems-uri "webrick" version))
664 (sha256
665 (base32
666 "1d4cvgmxhfczxiq5fr534lmizkhigd15bsx5719r5ds7k7ivisc7"))))
667 (build-system ruby-build-system)
668 (synopsis
669 "WEBrick is an HTTP server toolkit that can be configured as an HTTPS server, a proxy server, and a virtual-host server.")
670 (description
671 "WEBrick is an HTTP server toolkit that can be configured as an HTTPS server, a proxy server, and a virtual-host server.")
672 (home-page "https://github.com/ruby/webrick")
673 (license #f)))
674
675(define-public ruby-interception
676 (package
677 (name "ruby-interception")
678 (version "0.5")
679 (source
680 (origin
681 (method url-fetch)
682 (uri (rubygems-uri "interception" version))
683 (sha256
684 (base32
685 "01vrkn28psdx1ysh5js3hn17nfp1nvvv46wc1pwqsakm6vb1hf55"))))
686 (build-system ruby-build-system)
687 (native-inputs
688 `(("ruby-rspec" ,ruby-rspec)))
689 (synopsis
690 "Provides a cross-platform ability to intercept all exceptions as they are raised.")
691 (description
692 "This package provides a cross-platform ability to intercept all exceptions as they are raised.")
693 (home-page
694 "http://github.com/ConradIrwin/interception")
695 (license license:expat)))
696
697(define-public ruby-pry-rescue
698 (package
699 (name "ruby-pry-rescue")
700 (version "1.5.2")
701 (source
702 (origin
703 (method url-fetch)
704 (uri (rubygems-uri "pry-rescue" version))
705 (sha256
706 (base32
707 "1wn72y8y3d3g0ng350ld92nyjln012432q2z2iy9lhwzjc4dwi65"))))
708 (build-system ruby-build-system)
709 (arguments
710 `(#:phases
711 (modify-phases %standard-phases
712 (add-after 'unpack 'nuke-bad-test
713 (lambda _
714 (substitute* "spec/source_location_spec.rb"
715 (("time = Time.now") "skip"))
716 #t)))))
717 (propagated-inputs
718 `(("ruby-interception" ,ruby-interception)
719 ("ruby-pry" ,ruby-pry)))
720 (native-inputs
721 `(("ruby-rspec" ,ruby-rspec)
722 ("ruby-pry-stack-explorer" ,ruby-pry-stack-explorer)))
723 (synopsis
724 "Allows you to wrap code in Pry::rescue{ } to open a pry session at any unhandled exceptions")
725 (description
726 "Allows you to wrap code in Pry::rescue{ } to open a pry session at any unhandled exceptions")
727 (home-page
728 "https://github.com/ConradIrwin/pry-rescue")
729 (license license:expat)))
730
731(define-public ruby-rantly
732 (package
733 (name "ruby-rantly")
734 (version "2.0.0")
735 (source
736 (origin
737 (method url-fetch)
738 (uri (rubygems-uri "rantly" version))
739 (sha256
740 (base32
741 "11407cg0dzz83jsschnrpi9cqwz8b04q6bj6qj3m70ay52y222ix"))))
742 (build-system ruby-build-system)
743 (native-inputs
744 `(("ruby-rubocop" ,ruby-rubocop)
745 ("ruby-simplecov" ,ruby-simplecov)))
746 (synopsis
747 "Ruby Imperative Random Data Generator and Quickcheck")
748 (description
749 "Ruby Imperative Random Data Generator and Quickcheck")
750 (home-page "https://github.com/rantly-rb/rantly")
751 (license license:expat)))
752
753(define-public ruby-em-promise.rb
754 (package
755 (name "ruby-em-promise.rb")
756 (version "0.0.5")
757 (source (origin
758 (method url-fetch)
759 (uri (rubygems-uri "em_promise.rb" version))
760 (sha256
761 (base32
762 "00rkmacyf6i2gq0giaxzwr24ygrwwzndrq7kkbpqcq9glk01w692"))))
763 (build-system ruby-build-system)
764 (arguments
765 ;; No rakefile
766 `(#:tests? #f))
767 (propagated-inputs (list ruby-eventmachine ruby-promise.rb))
768 (synopsis "A subclass of promise.rb Promise for EventMachine.")
769 (description
770 "This package provides a subclass of promise.rb Promise for EventMachine.")
771 (home-page "https://git.singpolyma.net/em_promise.rb")
772 (license #f)))
773
774(define-public ruby-em-socksify
775 (package
776 (name "ruby-em-socksify")
777 (version "0.3.2")
778 (source (origin
779 (method url-fetch)
780 (uri (rubygems-uri "em-socksify" version))
781 (sha256
782 (base32
783 "0rk43ywaanfrd8180d98287xv2pxyl7llj291cwy87g1s735d5nk"))))
784 (build-system ruby-build-system)
785 (arguments
786 ;; Tests are broken
787 `(#:tests? #f))
788 (propagated-inputs (list ruby-eventmachine))
789 (synopsis "Transparent proxy support for any EventMachine protocol")
790 (description "Transparent proxy support for any EventMachine protocol")
791 (home-page "https://github.com/igrigorik/em-socksify")
792 (license license:expat)))
793
794(define-public ruby-rspec-collection-matchers
795 (package
796 (name "ruby-rspec-collection-matchers")
797 (version "1.2.0")
798 (source (origin
799 (method url-fetch)
800 (uri (rubygems-uri "rspec-collection_matchers" version))
801 (sha256
802 (base32
803 "1864xlxl7mi6mvjyp85a0gc10cyvpf6bj8lc86sf8737wlzn12ks"))))
804 (build-system ruby-build-system)
805 (arguments
806 ;; No rakefile
807 `(#:tests? #f))
808 (propagated-inputs (list ruby-rspec-expectations))
809 (synopsis
810 "Collection cardinality matchers, extracted from rspec-expectations")
811 (description
812 "Collection cardinality matchers, extracted from rspec-expectations")
813 (home-page "https://github.com/rspec/rspec-collection_matchers")
814 (license license:expat)))
815
816(define-public ruby-cookiejar
817 (package
818 (name "ruby-cookiejar")
819 (version "0.3.3")
820 (source (origin
821 (method url-fetch)
822 (uri (rubygems-uri "cookiejar" version))
823 (sha256
824 (base32
825 "0q0kmbks9l3hl0wdq744hzy97ssq9dvlzywyqv9k9y1p3qc9va2a"))))
826 (build-system ruby-build-system)
827 (native-inputs
828 `(("ruby-rspec" ,ruby-rspec)
829 ("ruby-rspec-collection-matchers" ,ruby-rspec-collection-matchers)
830 ("ruby-yard" ,ruby-yard)))
831 (synopsis
832 "Allows for parsing and returning cookies in Ruby HTTP client code")
833 (description
834 "Allows for parsing and returning cookies in Ruby HTTP client code")
835 (home-page "http://alkaline-solutions.com")
836 (license #f)))
837
838(define-public ruby-em-http-request
839 (package
840 (name "ruby-em-http-request")
841 (version "1.1.7")
842 (source (origin
843 (method url-fetch)
844 (uri (rubygems-uri "em-http-request" version))
845 (sha256
846 (base32
847 "1azx5rgm1zvx7391sfwcxzyccs46x495vb34ql2ch83f58mwgyqn"))))
848 (build-system ruby-build-system)
849 (arguments
850 ;; Tests need a whole other set of dependencies
851 `(#:tests? #f))
852 (propagated-inputs (list ruby-addressable ruby-cookiejar ruby-em-socksify
853 ruby-eventmachine ruby-http-parser.rb))
854 (synopsis "EventMachine based, async HTTP Request client")
855 (description "EventMachine based, async HTTP Request client")
856 (home-page "http://github.com/igrigorik/em-http-request")
857 (license license:expat)))
858
859(define-public ruby-em-synchrony
860 (package
861 (name "ruby-em-synchrony")
862 (version "1.0.6")
863 (source (origin
864 (method url-fetch)
865 (uri (rubygems-uri "em-synchrony" version))
866 (sha256
867 (base32
868 "1jh6ygbcvapmarqiap79i6yl05bicldr2lnmc46w1fyrhjk70x3f"))))
869 (build-system ruby-build-system)
870 (arguments
871 ;; Tests need a whole other set of dependencies
872 `(#:tests? #f))
873 (propagated-inputs (list ruby-eventmachine))
874 (synopsis "Fiber aware EventMachine libraries")
875 (description "Fiber aware EventMachine libraries")
876 (home-page "http://github.com/igrigorik/em-synchrony")
877 (license license:expat)))
878
879;;;;
880
881(define %source-dir (dirname (current-filename)))
882(define %git-dir (string-append %source-dir "/.git"))
883
884; Bake a template by eval'ing the leaves
885(define-public (bake tmpl)
886 (list
887 (car tmpl)
888 (cons (caadr tmpl) (map
889 (lambda (x) (list (car x) (eval (cadr x) (current-module))))
890 (cdadr tmpl)))))
891
892; double-escaped template of the jmp-pay sexp
893; This allows us to bake the expression without doing a full eval to a record,
894; so it can be written
895(define-public jmp-pay-template
896 '((package-input-rewriting `((,ruby-eventmachine . ,ruby-eventmachine-openssl)))
897 (package
898 (name "jmp-pay")
899 (version (read-line (open-pipe* OPEN_READ "git" "--git-dir" %git-dir "describe" "--always" "--dirty")))
900 (source
901 `(origin
902 (method git-fetch)
903 (uri (git-reference
904 (recursive? #t)
905 (url "https://git.singpolyma.net/jmp-pay")
906 (commit ,(read-line (open-pipe* OPEN_READ "git" "--git-dir" %git-dir "rev-parse" "HEAD")))))
907 (file-name (git-file-name name version))
908 (sha256
909 (base32
910 ,(read-line (open-pipe* OPEN_READ "guix" "hash" "-rx" %source-dir))))))
911 (build-system 'copy-build-system)
912 (arguments
913 ''(#:install-plan '(("." "share/jmp-pay"))
914 #:phases
915 (modify-phases %standard-phases
916 (add-after 'install 'wrap
917 (lambda* (#:key outputs #:allow-other-keys)
918 (use-modules (ice-9 ftw))
919 (let* ((out (assoc-ref outputs "out"))
920 (appbindir (string-append out "/share/jmp-pay/bin/"))
921 (bindir (string-append out "/bin/")))
922 (for-each (lambda (bin)
923 (mkdir-p bindir)
924 (let ((binstub (string-append bindir bin)))
925 (call-with-output-file binstub
926 (lambda (port)
927 (format port
928 "#!~a~%ENV['GEM_PATH'] = ['~a', ENV['GEM_PATH']].compact.join(':')~%Gem.clear_paths~%load '~a~a'~%"
929 (which "ruby")
930 (getenv "GEM_PATH")
931 appbindir
932 bin)))
933 (chmod binstub #o755)))
934 (scandir appbindir
935 (lambda (f) (eq? 'regular (stat:type (stat (string-append appbindir f))))))))
936 #t))
937 (add-before 'install 'check
938 (lambda _
939 (invoke "rake" "test")
940 #t)))))
941 (propagated-inputs
942 '`(("ruby-blather" ,ruby-blather)
943 ("ruby-braintree" ,ruby-braintree)
944 ("ruby-dhall" ,ruby-dhall)
945 ("ruby-money-open-exchange-rates" ,ruby-money-open-exchange-rates)
946 ("ruby-pg" ,ruby-pg)
947 ("ruby-redis" ,ruby-redis)
948 ("ruby-roda" ,ruby-roda)
949 ("ruby-em-promise.rb" ,ruby-em-promise.rb)
950 ("ruby-em-synchrony" ,ruby-em-synchrony)
951 ("ruby-em-http-request" ,ruby-em-http-request)
952 ("ruby-bandwidth-iris" ,ruby-bandwidth-iris)
953 ("ruby-mail" ,ruby-mail)
954 ("ruby-sentry" ,ruby-sentry)
955 ("ruby" ,ruby) ;; Normally ruby-build-system adds this for us
956 ("ruby-slim" ,ruby-slim)))
957 (native-inputs
958 '`(("ruby-rantly" ,ruby-rantly)
959 ("ruby-rake" ,ruby-rake)
960 ("ruby-webmock" ,ruby-webmock)))
961 (synopsis
962 "Payment infrastructure for JMP.chat")
963 (description
964 "Web service and cronjobs for payment handling")
965 (home-page
966 "https://git.singpolyma.net/jmp-pay")
967 (license 'license:agpl3))))
968
969; Baked version of jmp-pay-template with leaves eval'd
970(define-public jmp-pay-baked
971 (bake jmp-pay-template))
972
973; Build clean from git the version from a local clone
974; To build whatever is sitting in local use:
975; guix build --with-source=$PWD -f guix.scm
976
977(eval jmp-pay-baked (current-module))