Commit | Line | Data |
---|---|---|
90322fdb MJ |
1 | ;;; GNU Guix --- Functional package management for GNU |
2 | ;;; Copyright © 2016 Matthew Jordan <matthewjordandevops@yandex.com> | |
9923d5a4 | 3 | ;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr> |
945d5d03 | 4 | ;;; Copyright © 2019, 2021 Efraim Flashner <efraim@flashner.co.il> |
90322fdb MJ |
5 | ;;; |
6 | ;;; This file is part of GNU Guix. | |
7 | ;;; | |
8 | ;;; GNU Guix is free software; you can redistribute it and/or modify it | |
9 | ;;; under the terms of the GNU General Public License as published by | |
10 | ;;; the Free Software Foundation; either version 3 of the License, or (at | |
11 | ;;; your option) any later version. | |
12 | ;;; | |
13 | ;;; GNU Guix is distributed in the hope that it will be useful, but | |
14 | ;;; WITHOUT ANY WARRANTY; without even the implied warranty of | |
15 | ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
16 | ;;; GNU General Public License for more details. | |
17 | ;;; | |
18 | ;;; You should have received a copy of the GNU General Public License | |
19 | ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. | |
20 | ||
21 | (define-module (gnu packages rails) | |
22 | #:use-module ((guix licenses) #:prefix license:) | |
23 | #:use-module (guix download) | |
24412de4 | 24 | #:use-module (guix git-download) |
90322fdb | 25 | #:use-module (guix packages) |
1d672a6a | 26 | #:use-module (gnu packages node) |
90322fdb MJ |
27 | #:use-module (gnu packages ruby) |
28 | #:use-module (guix build-system ruby)) | |
29 | ||
3aeb6e1d MJ |
30 | (define-public ruby-spring |
31 | (package | |
32 | (name "ruby-spring") | |
29f49403 | 33 | (version "1.7.2") |
3aeb6e1d MJ |
34 | (source |
35 | (origin | |
7e309d0c EF |
36 | (method git-fetch) |
37 | (uri (git-reference | |
38 | (url "https://github.com/rails/spring") | |
39 | (commit (string-append "v" version)))) | |
40 | (file-name (git-file-name name version)) | |
3aeb6e1d MJ |
41 | (sha256 |
42 | (base32 | |
7e309d0c | 43 | "0smwrndjmnr7g7jjskw05zin3gh6kx5db6yrkiqi6i9wl5mrn9n5")))) |
3aeb6e1d MJ |
44 | (build-system ruby-build-system) |
45 | (arguments | |
46 | `(#:test-target "test:unit" | |
47 | #:phases | |
48 | (modify-phases %standard-phases | |
49 | (add-before 'check 'remove-bump | |
50 | (lambda _ | |
51 | (substitute* "spring.gemspec" | |
29f49403 BW |
52 | (("gem.add_development_dependency 'bump'") "") |
53 | (("gem.add_development_dependency 'activesupport'.*") | |
54 | "gem.add_development_dependency 'activesupport'\n")) | |
3aeb6e1d MJ |
55 | (substitute* "Rakefile" |
56 | (("require \\\"bump/tasks\\\"") "")) | |
57 | #t))))) | |
58 | (native-inputs | |
59 | `(("bundler" ,bundler) | |
60 | ("ruby-activesupport" ,ruby-activesupport))) | |
61 | (synopsis "Ruby on Rails application preloader") | |
62 | (description | |
63 | "Spring is a Ruby on Rails application preloader. It speeds up | |
64 | development by keeping your application running in the background so the | |
65 | application does need to boot it every time you run a test, rake task or | |
66 | migration.") | |
67 | (home-page "https://github.com/rails/spring") | |
68 | (license license:expat))) | |
69 | ||
a7749465 CB |
70 | (define-public ruby-sass-rails |
71 | (package | |
72 | (name "ruby-sass-rails") | |
73 | (version "5.0.7") | |
74 | (source | |
75 | (origin | |
76 | (method url-fetch) | |
77 | (uri (rubygems-uri "sass-rails" version)) | |
78 | (sha256 | |
79 | (base32 | |
80 | "1wa63sbsimrsf7nfm8h0m1wbsllkfxvd7naph5d1j6pbc555ma7s")))) | |
81 | (build-system ruby-build-system) | |
82 | (arguments | |
83 | '(#:tests? #f)) ; No included tests | |
84 | (propagated-inputs | |
85 | `(("ruby-railties" ,ruby-railties) | |
86 | ("ruby-sass" ,ruby-sass) | |
87 | ("ruby-sprockets" ,ruby-sprockets) | |
88 | ("ruby-sprockets-rails" ,ruby-sprockets-rails) | |
89 | ("ruby-tilt" ,ruby-tilt))) | |
90 | (synopsis "Sass adapter for the Rails asset pipeline") | |
91 | (description | |
92 | "This library integrates the SASS stylesheet language into Ruby on | |
93 | Rails.") | |
94 | (home-page "https://github.com/rails/sass-rails") | |
95 | (license license:expat))) | |
96 | ||
90322fdb MJ |
97 | (define-public ruby-debug-inspector |
98 | (package | |
99 | (name "ruby-debug-inspector") | |
eec0c587 | 100 | (version "0.0.3") |
90322fdb MJ |
101 | (source |
102 | (origin | |
103 | (method url-fetch) | |
104 | (uri (rubygems-uri "debug_inspector" version)) | |
105 | (sha256 | |
106 | (base32 | |
eec0c587 | 107 | "0vxr0xa1mfbkfcrn71n7c4f2dj7la5hvphn904vh20j3x4j5lrx0")))) |
90322fdb MJ |
108 | (build-system ruby-build-system) |
109 | (arguments | |
110 | `(#:phases | |
111 | (modify-phases %standard-phases | |
112 | (replace 'check | |
113 | (lambda _ | |
9923d5a4 TGR |
114 | (invoke "rake" "compile") |
115 | (invoke "ruby" "-Ilib" "-e" | |
116 | (string-append | |
117 | "require 'debug_inspector'; RubyVM::DebugInspector." | |
118 | "open{|dc| p dc.backtrace_locations}"))))))) | |
90322fdb MJ |
119 | (synopsis "Ruby wrapper for the MRI 2.0 debug_inspector API") |
120 | (description | |
121 | "This package provides a Ruby wrapper for the MRI 2.0 debug_inspector | |
122 | API.") | |
123 | (home-page | |
124 | "https://github.com/banister/debug_inspector") | |
125 | (license license:expat))) | |
29fa6d84 | 126 | |
1d672a6a CB |
127 | (define-public ruby-autoprefixer-rails |
128 | (package | |
129 | (name "ruby-autoprefixer-rails") | |
130 | (version "9.4.7") | |
131 | (source | |
132 | (origin | |
133 | (method url-fetch) | |
134 | (uri (rubygems-uri "autoprefixer-rails" version)) | |
135 | (sha256 | |
136 | (base32 | |
137 | "0fxbfl3xrrjj84n98x24yzxbz4nvm6c492dxj41kkrl9z97ga13i")))) | |
138 | (build-system ruby-build-system) | |
139 | (arguments | |
140 | '(#:test-target "spec" | |
141 | #:phases | |
142 | (modify-phases %standard-phases | |
143 | (add-after 'extract-gemspec 'remove-unnecessary-dependencies | |
144 | (lambda _ | |
145 | ;; Remove the testing of compass, as it's use is deprecated, and | |
146 | ;; it's unpackaged for Guix | |
147 | (substitute* "autoprefixer-rails.gemspec" | |
148 | ((".*%q<compass>.*") "\n") | |
149 | (("\"spec/compass_spec\\.rb\"\\.freeze, ") "")) | |
150 | (delete-file "spec/compass_spec.rb") | |
151 | ||
152 | (substitute* "Gemfile" | |
153 | ;; Remove overly strict requirement on sprockets | |
154 | ((", '>= 4\\.0\\.0\\.beta1'") "") | |
155 | ;; The mini_racer gem isn't packaged yet, and it's not directly | |
156 | ;; required, as other backends for ruby-execjs can be used. | |
157 | (("gem 'mini_racer'") "") | |
158 | ;; For some reason, this is required for the gems to be picked | |
159 | ;; up | |
160 | (("gemspec") "gemspec\ngem 'tzinfo-data'\ngem 'sass'")) | |
161 | #t))))) | |
162 | (native-inputs | |
163 | `(("bundler" ,bundler) | |
164 | ("ruby-rails" ,ruby-rails) | |
165 | ("ruby-rspec-rails" ,ruby-rspec-rails) | |
166 | ;; This is needed for a test, but I'm unsure why | |
167 | ("ruby-sass" ,ruby-sass) | |
168 | ;; This is used as the ruby-execjs runtime | |
169 | ("node" ,node))) | |
170 | (propagated-inputs | |
171 | `(("ruby-execjs" ,ruby-execjs))) | |
172 | (synopsis "Parse CSS and add vendor prefixes to CSS rules") | |
173 | (description | |
174 | "This gem provides Ruby and Ruby on Rails integration with Autoprefixer, | |
175 | which can parse CSS and add vendor prefixes to CSS rules using values from the | |
176 | Can I Use website.") | |
177 | (home-page "https://github.com/ai/autoprefixer-rails") | |
178 | (license license:expat))) | |
179 | ||
29fa6d84 CB |
180 | (define-public ruby-activemodel |
181 | (package | |
182 | (name "ruby-activemodel") | |
3c548c3e | 183 | (version "6.1.3") |
29fa6d84 CB |
184 | (source |
185 | (origin | |
186 | (method url-fetch) | |
187 | (uri (rubygems-uri "activemodel" version)) | |
188 | (sha256 | |
189 | (base32 | |
3c548c3e | 190 | "07m85r00cd1dzxg65zr9wjrdqppw51b5ka9c5mrz92vnw18kfb70")))) |
29fa6d84 CB |
191 | (build-system ruby-build-system) |
192 | (arguments | |
193 | '(;; No included tests | |
194 | #:tests? #f)) | |
195 | (propagated-inputs | |
196 | `(("ruby-activesupport" ,ruby-activesupport))) | |
197 | (synopsis "Toolkit for building modeling frameworks like Active Record") | |
198 | (description | |
199 | "This package provides a toolkit for building modeling frameworks like | |
200 | Active Record. ActiveSupport handles attributes, callbacks, validations, | |
201 | serialization, internationalization, and testing.") | |
202 | (home-page "https://rubyonrails.org/") | |
203 | (license license:expat))) | |
13cf6aee CB |
204 | |
205 | (define-public ruby-activerecord | |
206 | (package | |
207 | (name "ruby-activerecord") | |
3c548c3e | 208 | (version "6.1.3") |
13cf6aee CB |
209 | (source |
210 | (origin | |
211 | (method url-fetch) | |
212 | (uri (rubygems-uri "activerecord" version)) | |
213 | (sha256 | |
214 | (base32 | |
3c548c3e | 215 | "03kr6vslwd9iw89jidjpjlp7prr2rf7kpsfa4fz03g9by0kliivs")))) |
13cf6aee CB |
216 | (build-system ruby-build-system) |
217 | (arguments | |
218 | '(;; No included tests | |
219 | #:tests? #f)) | |
220 | (propagated-inputs | |
221 | `(("ruby-activemodel" ,ruby-activemodel) | |
222 | ("ruby-activesupport" ,ruby-activesupport) | |
223 | ("ruby-arel" ,ruby-arel))) | |
224 | (synopsis "Ruby library to connect to relational databases") | |
225 | (description | |
226 | "Active Record connects classes to relational database table to establish | |
227 | an almost zero-configuration persistence layer for applications.") | |
228 | (home-page "https://rubyonrails.org") | |
229 | (license license:expat))) | |
ab654da5 | 230 | |
87688ff3 CB |
231 | (define-public ruby-rspec-rails |
232 | (package | |
233 | (name "ruby-rspec-rails") | |
234 | (version "3.8.2") | |
235 | (source | |
236 | (origin | |
237 | (method url-fetch) | |
238 | (uri (rubygems-uri "rspec-rails" version)) | |
239 | (sha256 | |
240 | (base32 | |
241 | "1pf6n9l4sw1arlax1bdbm1znsvl8cgna2n6k6yk1bi8vz2n73ls1")))) | |
242 | (build-system ruby-build-system) | |
243 | (arguments | |
244 | '(#:tests? #f)) ; No included tests | |
245 | (propagated-inputs | |
246 | `(("ruby-actionpack" ,ruby-actionpack) | |
247 | ("ruby-activesupport" ,ruby-activesupport) | |
248 | ("ruby-railties" ,ruby-railties) | |
249 | ("ruby-rspec-core" ,ruby-rspec-core) | |
250 | ("ruby-rspec-expectations" ,ruby-rspec-expectations) | |
251 | ("ruby-rspec-mocks" ,ruby-rspec-mocks) | |
252 | ("ruby-rspec-support" ,ruby-rspec-support))) | |
253 | (synopsis "Use RSpec to test Ruby on Rails applications") | |
254 | (description | |
255 | "This package provides support for using RSpec to test Ruby on Rails | |
256 | applications, in pace of the default Minitest testing library.") | |
257 | (home-page "https://github.com/rspec/rspec-rails") | |
258 | (license license:expat))) | |
259 | ||
ab654da5 CB |
260 | (define-public ruby-rails-html-sanitizer |
261 | (package | |
262 | (name "ruby-rails-html-sanitizer") | |
6519e611 | 263 | (version "1.3.0") |
ab654da5 CB |
264 | (source |
265 | (origin | |
266 | (method url-fetch) | |
267 | (uri (rubygems-uri "rails-html-sanitizer" version)) | |
268 | (sha256 | |
269 | (base32 | |
6519e611 | 270 | "1icpqmxbppl4ynzmn6dx7wdil5hhq6fz707m9ya6d86c7ys8sd4f")))) |
ab654da5 CB |
271 | (build-system ruby-build-system) |
272 | (arguments | |
273 | '(;; No included tests | |
274 | #:tests? #f)) | |
275 | (propagated-inputs | |
276 | `(("ruby-loofah" ,ruby-loofah))) | |
277 | (synopsis "HTML sanitization for Rails applications") | |
278 | (description | |
279 | "This gem is used to handle HTML sanitization in Rails applications. If | |
280 | you need similar functionality in non Rails apps consider using Loofah | |
281 | directly.") | |
282 | (home-page "https://github.com/rails/rails-html-sanitizer") | |
283 | (license license:expat))) | |
24412de4 CB |
284 | |
285 | (define-public ruby-rails-dom-testing | |
286 | (package | |
287 | (name "ruby-rails-dom-testing") | |
945d5d03 | 288 | (version "2.0.3") |
24412de4 CB |
289 | (source |
290 | (origin | |
291 | (method git-fetch) | |
292 | (uri (git-reference | |
b0e7b699 | 293 | (url "https://github.com/rails/rails-dom-testing") |
24412de4 CB |
294 | (commit (string-append "v" version)))) |
295 | (file-name (git-file-name name version)) | |
296 | (sha256 | |
297 | (base32 | |
945d5d03 | 298 | "17vdh273cmmfpzy5m546dd13zqmimv54jjx0f7sl0zi5lwz0gnck")))) |
24412de4 CB |
299 | (build-system ruby-build-system) |
300 | (native-inputs | |
301 | `(("bundler" ,bundler))) | |
302 | (propagated-inputs | |
303 | `(("ruby-activesupport" ,ruby-activesupport) | |
304 | ("ruby-nokogiri" ,ruby-nokogiri))) | |
305 | (synopsis "Compare HTML DOMs and assert certain elements exists") | |
306 | (description | |
307 | "This gem can compare HTML and assert certain elements exists. This is | |
308 | useful when writing tests.") | |
309 | (home-page "https://github.com/rails/rails-dom-testing") | |
310 | (license license:expat))) | |
1c48c539 | 311 | |
3c548c3e EF |
312 | (define-public ruby-actiontext |
313 | (package | |
314 | (name "ruby-actiontext") | |
315 | (version "6.1.3") | |
316 | (source | |
317 | (origin | |
318 | (method url-fetch) | |
319 | (uri (rubygems-uri "actiontext" version)) | |
320 | (sha256 | |
321 | (base32 | |
322 | "04k4z4xj40sbzbgx0x9m6i8k0nc22jb6dkrlslj16p2z2dfnwhqg")))) | |
323 | (build-system ruby-build-system) | |
324 | (arguments | |
325 | '(;; No included tests | |
326 | #:tests? #f)) | |
327 | (propagated-inputs | |
328 | `(("ruby-actionpack" ,ruby-actionpack) | |
329 | ("ruby-activerecord" ,ruby-activerecord) | |
330 | ("ruby-activestorage" ,ruby-activestorage) | |
331 | ("ruby-activesupport" ,ruby-activesupport) | |
332 | ("ruby-nokogiri" ,ruby-nokogiri))) | |
333 | (synopsis "Edit and display rich text in Rails applications") | |
334 | (description | |
335 | "ActionText edits and displays rich text in Rails applications.") | |
336 | (home-page "https://rubyonrails.org") | |
337 | (license license:expat))) | |
338 | ||
1c48c539 CB |
339 | (define-public ruby-actionview |
340 | (package | |
341 | (name "ruby-actionview") | |
3c548c3e | 342 | (version "6.1.3") |
1c48c539 CB |
343 | (source |
344 | (origin | |
345 | (method url-fetch) | |
346 | (uri (rubygems-uri "actionview" version)) | |
347 | (sha256 | |
348 | (base32 | |
3c548c3e | 349 | "1s5kc1abi7id1g54lz1npgc42zl7pbz172wp8pi7j3s7qljafzw5")))) |
1c48c539 CB |
350 | (build-system ruby-build-system) |
351 | (arguments | |
352 | '(;; No included tests | |
353 | #:tests? #f)) | |
354 | (propagated-inputs | |
355 | `(("ruby-activesupport" ,ruby-activesupport) | |
356 | ("ruby-builder" ,ruby-builder) | |
357 | ("ruby-erubi" ,ruby-erubi) | |
358 | ("ruby-rails-dom-testing" ,ruby-rails-dom-testing) | |
359 | ("ruby-rails-html-sanitizer" ,ruby-rails-html-sanitizer))) | |
360 | (synopsis "Conventions and helpers for building web pages") | |
361 | (description | |
362 | "ActionView provides conventions and helpers for building web pages in | |
363 | Ruby.") | |
364 | (home-page "https://rubyonrails.org/") | |
365 | (license license:expat))) | |
7b062e98 CB |
366 | |
367 | (define-public ruby-actionpack | |
368 | (package | |
369 | (name "ruby-actionpack") | |
3c548c3e | 370 | (version "6.1.3") |
7b062e98 CB |
371 | (source |
372 | (origin | |
373 | (method url-fetch) | |
374 | (uri (rubygems-uri "actionpack" version)) | |
375 | (sha256 | |
376 | (base32 | |
3c548c3e | 377 | "030yyaskzlic5cp4d9zbwwr3rhf4k6hsls44a7ihsfd6r8mlivq5")))) |
7b062e98 CB |
378 | (build-system ruby-build-system) |
379 | (arguments | |
380 | '(;; No included tests | |
381 | #:tests? #f)) | |
382 | (propagated-inputs | |
383 | `(("ruby-actionview" ,ruby-actionview) | |
384 | ("ruby-activesupport" ,ruby-activesupport) | |
385 | ("ruby-rack" ,ruby-rack) | |
386 | ("ruby-rack-test" ,ruby-rack-test) | |
387 | ("ruby-rails-dom-testing" ,ruby-rails-dom-testing) | |
388 | ("ruby-rails-html-sanitizer" ,ruby-rails-html-sanitizer))) | |
389 | (synopsis "Conventions for building and testing MVC web applications") | |
390 | (description | |
391 | "ActionPack provides conventions for building and testing MVC web | |
392 | applications. These work with any Rack-compatible server.") | |
393 | (home-page "https://rubyonrails.org/") | |
394 | (license license:expat))) | |
937c8862 CB |
395 | |
396 | (define-public ruby-actioncable | |
397 | (package | |
398 | (name "ruby-actioncable") | |
3c548c3e | 399 | (version "6.1.3") |
937c8862 CB |
400 | (source |
401 | (origin | |
402 | (method url-fetch) | |
403 | (uri (rubygems-uri "actioncable" version)) | |
404 | (sha256 | |
405 | (base32 | |
3c548c3e | 406 | "1cgb1l0gml1vklxka2djpi5q5b4bgzgm5pahzfjvvgm5vzvrvi9v")))) |
937c8862 CB |
407 | (build-system ruby-build-system) |
408 | (arguments | |
409 | '(;; No included tests | |
410 | #:tests? #f)) | |
411 | (propagated-inputs | |
412 | `(("ruby-actionpack" ,ruby-actionpack) | |
3c548c3e | 413 | ("ruby-activesupport" ,ruby-activesupport) |
937c8862 CB |
414 | ("ruby-nio4r" ,ruby-nio4r) |
415 | ("ruby-websocket-driver" ,ruby-websocket-driver))) | |
416 | (synopsis "Integrate integrates WebSockets with Rails applications") | |
417 | (description | |
418 | "Action Cable integrates WebSockets with Rails applications. Through | |
419 | WebSockets it allows for real-time features in web applications.") | |
420 | (home-page "https://rubyonrails.org/") | |
421 | (license license:expat))) | |
ca09c4b5 CB |
422 | |
423 | (define-public ruby-activejob | |
424 | (package | |
425 | (name "ruby-activejob") | |
3c548c3e | 426 | (version "6.1.3") |
ca09c4b5 CB |
427 | (source |
428 | (origin | |
429 | (method url-fetch) | |
430 | (uri (rubygems-uri "activejob" version)) | |
431 | (sha256 | |
432 | (base32 | |
3c548c3e | 433 | "175d8q0achdlsxjsvq0w9znvfqfkgbj75kbmdrvg4fb277wwplmf")))) |
ca09c4b5 CB |
434 | (build-system ruby-build-system) |
435 | (arguments | |
436 | '(;; No included tests | |
437 | #:tests? #f)) | |
438 | (propagated-inputs | |
439 | `(("ruby-activesupport" ,ruby-activesupport) | |
440 | ("ruby-globalid" ,ruby-globalid))) | |
441 | (synopsis "Declare job classes for multiple backends") | |
442 | (description | |
443 | "ActiveJob allows declaring job classes in a common way across Rails | |
444 | applications.") | |
445 | (home-page "https://rubyonrails.org/") | |
446 | (license license:expat))) | |
0fc30899 | 447 | |
07884945 CB |
448 | (define-public ruby-activestorage |
449 | (package | |
450 | (name "ruby-activestorage") | |
3c548c3e | 451 | (version "6.1.3") |
07884945 CB |
452 | (source |
453 | (origin | |
454 | (method url-fetch) | |
455 | (uri (rubygems-uri "activestorage" version)) | |
456 | (sha256 | |
457 | (base32 | |
3c548c3e | 458 | "0gkxvbi5w8zmdxpiyz3b10kzz8cxqqh9bj81sjl3fp8wa3v2ld4i")))) |
07884945 CB |
459 | (build-system ruby-build-system) |
460 | (arguments | |
461 | '(;; No included tests | |
462 | #:tests? #f)) | |
463 | (propagated-inputs | |
464 | `(("ruby-actionpack" ,ruby-actionpack) | |
3c548c3e | 465 | ("ruby-activejob" ,ruby-activejob) |
07884945 | 466 | ("ruby-activerecord" ,ruby-activerecord) |
3c548c3e EF |
467 | ("ruby-activesupport" ,ruby-activesupport) |
468 | ("ruby-marcel" ,ruby-marcel) | |
469 | ("ruby-mimemagic" ,ruby-mimemagic))) | |
07884945 CB |
470 | (synopsis "Integrate file storage services in to Rails applications") |
471 | (description | |
472 | "ActiveStorage integrates file storage services with Rails applications, | |
3c548c3e | 473 | allowing files to be attached to ActiveRecord models.") |
07884945 CB |
474 | (home-page "https://rubyonrails.org/") |
475 | (license license:expat))) | |
476 | ||
3c548c3e EF |
477 | (define-public ruby-actionmailbox |
478 | (package | |
479 | (name "ruby-actionmailbox") | |
480 | (version "6.1.3") | |
481 | (source | |
482 | (origin | |
483 | (method url-fetch) | |
484 | (uri (rubygems-uri "actionmailbox" version)) | |
485 | (sha256 | |
486 | (base32 | |
487 | "0wv2p24xn4f0kj8kiyagkn934hzrcp98vzjqxwd4r75qq0cijadp")))) | |
488 | (build-system ruby-build-system) | |
489 | (arguments | |
490 | '(;; No included tests | |
491 | #:tests? #f)) | |
492 | (propagated-inputs | |
493 | `(("ruby-actionpack" ,ruby-actionpack) | |
494 | ("ruby-activejob" ,ruby-activejob) | |
495 | ("ruby-activerecord" ,ruby-activerecord) | |
496 | ("ruby-activestorage" ,ruby-activestorage) | |
497 | ("ruby-activesupport" ,ruby-activesupport) | |
498 | ("ruby-mail" ,ruby-mail))) | |
499 | (synopsis "Receive and process incoming emails in Rails applications") | |
500 | (description | |
501 | "ActionMailbox receives and processes incoming emails in Rails applications.") | |
502 | (home-page "https://rubyonrails.org") | |
503 | (license license:expat))) | |
504 | ||
0fc30899 CB |
505 | (define-public ruby-actionmailer |
506 | (package | |
507 | (name "ruby-actionmailer") | |
3c548c3e | 508 | (version "6.1.3") |
0fc30899 CB |
509 | (source |
510 | (origin | |
511 | (method url-fetch) | |
512 | (uri (rubygems-uri "actionmailer" version)) | |
513 | (sha256 | |
514 | (base32 | |
3c548c3e | 515 | "0lic4mc6wqi3p9ipdqljl64vd9ndabm0k8hww0m07sfdhwsl5ba9")))) |
0fc30899 CB |
516 | (build-system ruby-build-system) |
517 | (arguments | |
518 | '(;; No included tests | |
519 | #:tests? #f)) | |
520 | (propagated-inputs | |
521 | `(("ruby-actionpack" ,ruby-actionpack) | |
522 | ("ruby-actionview" ,ruby-actionview) | |
523 | ("ruby-activejob" ,ruby-activejob) | |
3c548c3e | 524 | ("ruby-activesupport" ,ruby-activesupport) |
0fc30899 CB |
525 | ("ruby-mail" ,ruby-mail) |
526 | ("ruby-rails-dom-testing" ,ruby-rails-dom-testing))) | |
527 | (synopsis "Work with emails using the controller/view pattern") | |
528 | (description | |
529 | "Compose, deliver, receive, and test emails using the controller/view | |
530 | pattern. Including support for multipart email and attachments.") | |
531 | (home-page "https://rubyonrails.org/") | |
532 | (license license:expat))) | |
c8f079ca CB |
533 | |
534 | (define-public ruby-railties | |
535 | (package | |
536 | (name "ruby-railties") | |
3c548c3e | 537 | (version "6.1.3") |
c8f079ca CB |
538 | (source |
539 | (origin | |
540 | (method url-fetch) | |
541 | (uri (rubygems-uri "railties" version)) | |
542 | (sha256 | |
543 | (base32 | |
3c548c3e | 544 | "1685y5dcfgcq0b38j13vrpkhiiblmrl64wa9w065669bkgmkw4ra")))) |
c8f079ca CB |
545 | (build-system ruby-build-system) |
546 | (arguments | |
547 | '(;; No included tests | |
548 | #:tests? #f)) | |
549 | (propagated-inputs | |
550 | `(("ruby-actionpack" ,ruby-actionpack) | |
551 | ("ruby-activesupport" ,ruby-activesupport) | |
552 | ("ruby-method-source" ,ruby-method-source) | |
3c548c3e | 553 | ("ruby-rake" ,ruby-rake) |
c8f079ca CB |
554 | ("ruby-thor" ,ruby-thor))) |
555 | (synopsis "Rails internals, including application bootup and generators") | |
556 | (description | |
557 | "@code{railties} provides the core Rails internals including handling | |
558 | application bootup, plugins, generators, and Rake tasks.") | |
559 | (home-page "https://rubyonrails.org/") | |
560 | (license license:expat))) | |
80c4bfa6 CB |
561 | |
562 | (define-public ruby-sprockets-rails | |
563 | (package | |
564 | (name "ruby-sprockets-rails") | |
565 | (version "3.2.1") | |
566 | (source | |
567 | (origin | |
568 | (method url-fetch) | |
569 | (uri (rubygems-uri "sprockets-rails" version)) | |
570 | (sha256 | |
571 | (base32 | |
572 | "0ab42pm8p5zxpv3sfraq45b9lj39cz9mrpdirm30vywzrwwkm5p1")))) | |
573 | (build-system ruby-build-system) | |
574 | (arguments | |
575 | '(;; No included tests | |
576 | #:tests? #f)) | |
577 | (propagated-inputs | |
578 | `(("ruby-actionpack" ,ruby-actionpack) | |
579 | ("ruby-activesupport" ,ruby-activesupport) | |
580 | ("ruby-sprockets" ,ruby-sprockets))) | |
581 | (synopsis "Sprockets Rails integration") | |
582 | (description | |
583 | "Provides Sprockets implementation for the Rails Asset Pipeline.") | |
584 | (home-page | |
585 | "https://github.com/rails/sprockets-rails") | |
586 | (license license:expat))) | |
a3dbfbbd | 587 | |
ae9d1ab4 CB |
588 | (define-public ruby-web-console |
589 | (package | |
590 | (name "ruby-web-console") | |
fa0a2441 | 591 | (version "4.1.0") |
ae9d1ab4 CB |
592 | (source |
593 | (origin | |
594 | ;; Download from GitHub as test files are not provided in the gem. | |
595 | (method git-fetch) | |
596 | (uri (git-reference | |
b0e7b699 | 597 | (url "https://github.com/rails/web-console") |
ae9d1ab4 CB |
598 | (commit (string-append "v" version)))) |
599 | (file-name (git-file-name name version)) | |
600 | (sha256 | |
601 | (base32 | |
fa0a2441 | 602 | "0azk8nmimnjbh74vxgwcj9jr588rj7kb5rrlclcjfjsw9jqjzckc")))) |
ae9d1ab4 CB |
603 | (build-system ruby-build-system) |
604 | (arguments | |
605 | '(#:phases | |
606 | (modify-phases %standard-phases | |
607 | (add-after 'unpack 'patch-Gemfile | |
608 | (lambda _ | |
609 | (substitute* "Gemfile" | |
610 | ;; Remove the github bit from the Gemfile, so that the Guix | |
611 | ;; packages are used. | |
612 | ((", github: .*") "\n") | |
613 | ;; The usual methods of not loading this group don't work, so | |
614 | ;; patch the Gemfile. | |
615 | (("group :development") "[].each") | |
616 | ;; tzinfo-data is propagated by ruby-activesupport, but it | |
617 | ;; needs to be in the Gemfile to become available. | |
618 | (("group :test do") "group :test do\n gem 'tzinfo-data'")) | |
ae9d1ab4 CB |
619 | #t))))) |
620 | (propagated-inputs | |
621 | `(("ruby-actionview" ,ruby-actionview) | |
622 | ("ruby-activemodel" ,ruby-activemodel) | |
623 | ("ruby-bindex" ,ruby-bindex) | |
624 | ("ruby-railties" ,ruby-railties))) | |
625 | (native-inputs | |
626 | `(("bundler" ,bundler) | |
627 | ("ruby-rails" ,ruby-rails) | |
628 | ("ruby-mocha" ,ruby-mocha) | |
629 | ("ruby-simplecov" ,ruby-simplecov))) | |
630 | (synopsis "Debugging tool for your Ruby on Rails applications") | |
631 | (description | |
632 | "This package allows you to create an interactive Ruby session in your | |
633 | browser. Those sessions are launched automatically in case of an error and | |
634 | can also be launched manually in any page.") | |
635 | (home-page "https://github.com/rails/web-console") | |
636 | (license license:expat))) | |
637 | ||
ad6471d4 CB |
638 | (define-public ruby-with-advisory-lock |
639 | (package | |
640 | (name "ruby-with-advisory-lock") | |
641 | (version "4.0.0") | |
642 | (source | |
643 | (origin | |
644 | (method url-fetch) | |
645 | (uri (rubygems-uri "with_advisory_lock" version)) | |
646 | (sha256 | |
647 | (base32 | |
648 | "1k37hxgmaqgsd54gplm5xim9nw3ghvqsbzaw7q4q64ha1nbd9a41")))) | |
649 | (build-system ruby-build-system) | |
650 | (arguments | |
651 | '(#:tests? #f)) ; TODO Tests require a running MySQL service | |
652 | (propagated-inputs | |
653 | `(("ruby-activerecord" ,ruby-activerecord))) | |
654 | (native-inputs | |
655 | `(("bundler" ,bundler) | |
656 | ("ruby-yard" ,ruby-yard) | |
657 | ("ruby-mysql2" ,ruby-mysql2))) | |
658 | (synopsis "Advisory locking for ActiveRecord") | |
659 | (description | |
660 | "The With advisory lock gem adds advisory locking to ActiveRecord for | |
52beae7b | 661 | PostgreSQL and MySQL. SQLite is also supported, but this uses the file system |
ad6471d4 CB |
662 | for locks.") |
663 | (home-page "https://closuretree.github.io/with_advisory_lock/") | |
664 | (license license:expat))) | |
665 | ||
a3dbfbbd CB |
666 | (define-public ruby-rails |
667 | (package | |
668 | (name "ruby-rails") | |
3c548c3e | 669 | (version "6.1.3") |
a3dbfbbd CB |
670 | (source |
671 | (origin | |
672 | (method url-fetch) | |
673 | (uri (rubygems-uri "rails" version)) | |
674 | (sha256 | |
675 | (base32 | |
3c548c3e | 676 | "0hdancysa617lzyy5gmrcmnpgyb1mz1lawy0l34ycz2wary7y2bz")))) |
a3dbfbbd CB |
677 | (build-system ruby-build-system) |
678 | (arguments | |
679 | '(#:phases | |
680 | (modify-phases %standard-phases | |
681 | ;; This gem acts as glue between the gems that actually make up | |
682 | ;; Rails. The important thing to check is that the gemspec matches up | |
683 | ;; with the Guix packages and Rubygems can successfully activate the | |
684 | ;; Rails gem. | |
685 | ;; | |
686 | ;; The following check phase tests this. | |
687 | (delete 'check) | |
688 | (add-after 'install 'check | |
689 | (lambda* (#:key tests? outputs #:allow-other-keys) | |
690 | (setenv "GEM_PATH" | |
691 | (string-append | |
692 | (getenv "GEM_PATH") | |
693 | ":" | |
694 | (assoc-ref outputs "out") "/lib/ruby/vendor_ruby")) | |
695 | (when tests? | |
696 | (invoke "ruby" "-e" "gem 'rails'")) | |
697 | #t))))) | |
698 | (propagated-inputs | |
3c548c3e EF |
699 | `(("ruby-actioncable" ,ruby-actioncable) |
700 | ("ruby-actionmailbox" ,ruby-actionmailbox) | |
701 | ("ruby-actionmailer" ,ruby-actionmailer) | |
a3dbfbbd | 702 | ("ruby-actionpack" ,ruby-actionpack) |
3c548c3e | 703 | ("ruby-actiontext" ,ruby-actiontext) |
a3dbfbbd | 704 | ("ruby-actionview" ,ruby-actionview) |
3c548c3e | 705 | ("ruby-activejob" ,ruby-activejob) |
a3dbfbbd CB |
706 | ("ruby-activemodel" ,ruby-activemodel) |
707 | ("ruby-activerecord" ,ruby-activerecord) | |
a3dbfbbd | 708 | ("ruby-activestorage" ,ruby-activestorage) |
3c548c3e | 709 | ("ruby-activesupport" ,ruby-activesupport) |
a3dbfbbd | 710 | ("bundler" ,bundler) |
3c548c3e | 711 | ("ruby-railties" ,ruby-railties) |
a3dbfbbd CB |
712 | ("ruby-sprockets-rails" ,ruby-sprockets-rails))) |
713 | (synopsis "Full-stack web framework optimized for programmer happiness") | |
714 | (description | |
715 | "Ruby on Rails is a full-stack web framework optimized for programmer | |
716 | happiness and sustainable productivity. It encourages beautiful code by | |
717 | favoring convention over configuration.") | |
718 | (home-page "https://rubyonrails.org/") | |
719 | (license license:expat))) |