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> |
7e309d0c | 4 | ;;; Copyright © 2019 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") | |
22468de4 | 183 | (version "5.2.2.1") |
29fa6d84 CB |
184 | (source |
185 | (origin | |
186 | (method url-fetch) | |
187 | (uri (rubygems-uri "activemodel" version)) | |
188 | (sha256 | |
189 | (base32 | |
22468de4 | 190 | "1idmvqvpgri34k31s44pjb88rc3jad3yxra7fd1kpidpnv5f3v65")))) |
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") | |
0fb8ed17 | 208 | (version "5.2.2.1") |
13cf6aee CB |
209 | (source |
210 | (origin | |
211 | (method url-fetch) | |
212 | (uri (rubygems-uri "activerecord" version)) | |
213 | (sha256 | |
214 | (base32 | |
0fb8ed17 | 215 | "1c5cz9v7ggpqjxf0fqs1xhy1pb9m34cp31pxarhs9aqb71qjl98v")))) |
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") | |
263 | (version "1.0.4") | |
264 | (source | |
265 | (origin | |
266 | (method url-fetch) | |
267 | (uri (rubygems-uri "rails-html-sanitizer" version)) | |
268 | (sha256 | |
269 | (base32 | |
270 | "1gv7vr5d9g2xmgpjfq4nxsqr70r9pr042r9ycqqnfvw5cz9c7jwr")))) | |
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") | |
288 | (version "2.0.2") | |
289 | (source | |
290 | (origin | |
291 | (method git-fetch) | |
292 | (uri (git-reference | |
293 | (url "https://github.com/rails/rails-dom-testing.git") | |
294 | (commit (string-append "v" version)))) | |
295 | (file-name (git-file-name name version)) | |
296 | (sha256 | |
297 | (base32 | |
298 | "0zrg6x1w3wjgklbhcphjmggl11jx5s8cl21qjqij7wknm412i5wl")))) | |
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 CB |
311 | |
312 | (define-public ruby-actionview | |
313 | (package | |
314 | (name "ruby-actionview") | |
e8df5a50 | 315 | (version "5.2.2.1") |
1c48c539 CB |
316 | (source |
317 | (origin | |
318 | (method url-fetch) | |
319 | (uri (rubygems-uri "actionview" version)) | |
320 | (sha256 | |
321 | (base32 | |
e8df5a50 | 322 | "0832vlx37rly8ryfgi01b20mld8b3bv9cg62n5wax4zpzgn6jdxb")))) |
1c48c539 CB |
323 | (build-system ruby-build-system) |
324 | (arguments | |
325 | '(;; No included tests | |
326 | #:tests? #f)) | |
327 | (propagated-inputs | |
328 | `(("ruby-activesupport" ,ruby-activesupport) | |
329 | ("ruby-builder" ,ruby-builder) | |
330 | ("ruby-erubi" ,ruby-erubi) | |
331 | ("ruby-rails-dom-testing" ,ruby-rails-dom-testing) | |
332 | ("ruby-rails-html-sanitizer" ,ruby-rails-html-sanitizer))) | |
333 | (synopsis "Conventions and helpers for building web pages") | |
334 | (description | |
335 | "ActionView provides conventions and helpers for building web pages in | |
336 | Ruby.") | |
337 | (home-page "https://rubyonrails.org/") | |
338 | (license license:expat))) | |
7b062e98 CB |
339 | |
340 | (define-public ruby-actionpack | |
341 | (package | |
342 | (name "ruby-actionpack") | |
24c704af | 343 | (version "5.2.2.1") |
7b062e98 CB |
344 | (source |
345 | (origin | |
346 | (method url-fetch) | |
347 | (uri (rubygems-uri "actionpack" version)) | |
348 | (sha256 | |
349 | (base32 | |
24c704af | 350 | "1lxqzxa728dqg42yw0q4hqkaawqagiw1k0392an2ghjfgb16pafx")))) |
7b062e98 CB |
351 | (build-system ruby-build-system) |
352 | (arguments | |
353 | '(;; No included tests | |
354 | #:tests? #f)) | |
355 | (propagated-inputs | |
356 | `(("ruby-actionview" ,ruby-actionview) | |
357 | ("ruby-activesupport" ,ruby-activesupport) | |
358 | ("ruby-rack" ,ruby-rack) | |
359 | ("ruby-rack-test" ,ruby-rack-test) | |
360 | ("ruby-rails-dom-testing" ,ruby-rails-dom-testing) | |
361 | ("ruby-rails-html-sanitizer" ,ruby-rails-html-sanitizer))) | |
362 | (synopsis "Conventions for building and testing MVC web applications") | |
363 | (description | |
364 | "ActionPack provides conventions for building and testing MVC web | |
365 | applications. These work with any Rack-compatible server.") | |
366 | (home-page "https://rubyonrails.org/") | |
367 | (license license:expat))) | |
937c8862 CB |
368 | |
369 | (define-public ruby-actioncable | |
370 | (package | |
371 | (name "ruby-actioncable") | |
2a737e80 | 372 | (version "5.2.2.1") |
937c8862 CB |
373 | (source |
374 | (origin | |
375 | (method url-fetch) | |
376 | (uri (rubygems-uri "actioncable" version)) | |
377 | (sha256 | |
378 | (base32 | |
2a737e80 | 379 | "1x5fxhsr2mxq5r6258s48xsn7ld081d3qaavppvj7yp7w9vqn871")))) |
937c8862 CB |
380 | (build-system ruby-build-system) |
381 | (arguments | |
382 | '(;; No included tests | |
383 | #:tests? #f)) | |
384 | (propagated-inputs | |
385 | `(("ruby-actionpack" ,ruby-actionpack) | |
386 | ("ruby-nio4r" ,ruby-nio4r) | |
387 | ("ruby-websocket-driver" ,ruby-websocket-driver))) | |
388 | (synopsis "Integrate integrates WebSockets with Rails applications") | |
389 | (description | |
390 | "Action Cable integrates WebSockets with Rails applications. Through | |
391 | WebSockets it allows for real-time features in web applications.") | |
392 | (home-page "https://rubyonrails.org/") | |
393 | (license license:expat))) | |
ca09c4b5 CB |
394 | |
395 | (define-public ruby-activejob | |
396 | (package | |
397 | (name "ruby-activejob") | |
fbc2309f | 398 | (version "5.2.2.1") |
ca09c4b5 CB |
399 | (source |
400 | (origin | |
401 | (method url-fetch) | |
402 | (uri (rubygems-uri "activejob" version)) | |
403 | (sha256 | |
404 | (base32 | |
fbc2309f | 405 | "1zma452lc3qp4a7r10zbdmsci0kv9a3gnk4da2apbdrc8fib5mr3")))) |
ca09c4b5 CB |
406 | (build-system ruby-build-system) |
407 | (arguments | |
408 | '(;; No included tests | |
409 | #:tests? #f)) | |
410 | (propagated-inputs | |
411 | `(("ruby-activesupport" ,ruby-activesupport) | |
412 | ("ruby-globalid" ,ruby-globalid))) | |
413 | (synopsis "Declare job classes for multiple backends") | |
414 | (description | |
415 | "ActiveJob allows declaring job classes in a common way across Rails | |
416 | applications.") | |
417 | (home-page "https://rubyonrails.org/") | |
418 | (license license:expat))) | |
0fc30899 | 419 | |
07884945 CB |
420 | (define-public ruby-activestorage |
421 | (package | |
422 | (name "ruby-activestorage") | |
e16dd189 | 423 | (version "5.2.2.1") |
07884945 CB |
424 | (source |
425 | (origin | |
426 | (method url-fetch) | |
427 | (uri (rubygems-uri "activestorage" version)) | |
428 | (sha256 | |
429 | (base32 | |
e16dd189 | 430 | "155xpbzrz0kr0argx0vsh5prvadd2h1g1m61kdiabvfy2iygc02n")))) |
07884945 CB |
431 | (build-system ruby-build-system) |
432 | (arguments | |
433 | '(;; No included tests | |
434 | #:tests? #f)) | |
435 | (propagated-inputs | |
436 | `(("ruby-actionpack" ,ruby-actionpack) | |
437 | ("ruby-activerecord" ,ruby-activerecord) | |
438 | ("ruby-marcel" ,ruby-marcel))) | |
439 | (synopsis "Integrate file storage services in to Rails applications") | |
440 | (description | |
441 | "ActiveStorage integrates file storage services with Rails applications, | |
442 | allowing files to be attached to ActiveRecord models..") | |
443 | (home-page "https://rubyonrails.org/") | |
444 | (license license:expat))) | |
445 | ||
0fc30899 CB |
446 | (define-public ruby-actionmailer |
447 | (package | |
448 | (name "ruby-actionmailer") | |
5be0aedf | 449 | (version "5.2.2.1") |
0fc30899 CB |
450 | (source |
451 | (origin | |
452 | (method url-fetch) | |
453 | (uri (rubygems-uri "actionmailer" version)) | |
454 | (sha256 | |
455 | (base32 | |
5be0aedf | 456 | "10n2v2al68rsq5ghrdp7cpycsc1q0m19fcd8cd5i528n30nl23iw")))) |
0fc30899 CB |
457 | (build-system ruby-build-system) |
458 | (arguments | |
459 | '(;; No included tests | |
460 | #:tests? #f)) | |
461 | (propagated-inputs | |
462 | `(("ruby-actionpack" ,ruby-actionpack) | |
463 | ("ruby-actionview" ,ruby-actionview) | |
464 | ("ruby-activejob" ,ruby-activejob) | |
465 | ("ruby-mail" ,ruby-mail) | |
466 | ("ruby-rails-dom-testing" ,ruby-rails-dom-testing))) | |
467 | (synopsis "Work with emails using the controller/view pattern") | |
468 | (description | |
469 | "Compose, deliver, receive, and test emails using the controller/view | |
470 | pattern. Including support for multipart email and attachments.") | |
471 | (home-page "https://rubyonrails.org/") | |
472 | (license license:expat))) | |
c8f079ca CB |
473 | |
474 | (define-public ruby-railties | |
475 | (package | |
476 | (name "ruby-railties") | |
1835fc26 | 477 | (version "5.2.2.1") |
c8f079ca CB |
478 | (source |
479 | (origin | |
480 | (method url-fetch) | |
481 | (uri (rubygems-uri "railties" version)) | |
482 | (sha256 | |
483 | (base32 | |
1835fc26 | 484 | "0al6mvh2jvr3n7cxkx0yvhgiiarby6gxc93vl5xg1yxkvx27qzd6")))) |
c8f079ca CB |
485 | (build-system ruby-build-system) |
486 | (arguments | |
487 | '(;; No included tests | |
488 | #:tests? #f)) | |
489 | (propagated-inputs | |
490 | `(("ruby-actionpack" ,ruby-actionpack) | |
491 | ("ruby-activesupport" ,ruby-activesupport) | |
492 | ("ruby-method-source" ,ruby-method-source) | |
493 | ("ruby-thor" ,ruby-thor))) | |
494 | (synopsis "Rails internals, including application bootup and generators") | |
495 | (description | |
496 | "@code{railties} provides the core Rails internals including handling | |
497 | application bootup, plugins, generators, and Rake tasks.") | |
498 | (home-page "https://rubyonrails.org/") | |
499 | (license license:expat))) | |
80c4bfa6 CB |
500 | |
501 | (define-public ruby-sprockets-rails | |
502 | (package | |
503 | (name "ruby-sprockets-rails") | |
504 | (version "3.2.1") | |
505 | (source | |
506 | (origin | |
507 | (method url-fetch) | |
508 | (uri (rubygems-uri "sprockets-rails" version)) | |
509 | (sha256 | |
510 | (base32 | |
511 | "0ab42pm8p5zxpv3sfraq45b9lj39cz9mrpdirm30vywzrwwkm5p1")))) | |
512 | (build-system ruby-build-system) | |
513 | (arguments | |
514 | '(;; No included tests | |
515 | #:tests? #f)) | |
516 | (propagated-inputs | |
517 | `(("ruby-actionpack" ,ruby-actionpack) | |
518 | ("ruby-activesupport" ,ruby-activesupport) | |
519 | ("ruby-sprockets" ,ruby-sprockets))) | |
520 | (synopsis "Sprockets Rails integration") | |
521 | (description | |
522 | "Provides Sprockets implementation for the Rails Asset Pipeline.") | |
523 | (home-page | |
524 | "https://github.com/rails/sprockets-rails") | |
525 | (license license:expat))) | |
a3dbfbbd | 526 | |
ae9d1ab4 CB |
527 | (define-public ruby-web-console |
528 | (package | |
529 | (name "ruby-web-console") | |
530 | (version "3.7.0") | |
531 | (source | |
532 | (origin | |
533 | ;; Download from GitHub as test files are not provided in the gem. | |
534 | (method git-fetch) | |
535 | (uri (git-reference | |
536 | (url "https://github.com/rails/web-console.git") | |
537 | (commit (string-append "v" version)))) | |
538 | (file-name (git-file-name name version)) | |
539 | (sha256 | |
540 | (base32 | |
541 | "0ir999p8cnm3l3zwbgpwxxcq1vwkj8d0d3r24362cyaf4v1rglq2")))) | |
542 | (build-system ruby-build-system) | |
543 | (arguments | |
544 | '(#:phases | |
545 | (modify-phases %standard-phases | |
546 | (add-after 'unpack 'patch-Gemfile | |
547 | (lambda _ | |
548 | (substitute* "Gemfile" | |
549 | ;; Remove the github bit from the Gemfile, so that the Guix | |
550 | ;; packages are used. | |
551 | ((", github: .*") "\n") | |
552 | ;; The usual methods of not loading this group don't work, so | |
553 | ;; patch the Gemfile. | |
554 | (("group :development") "[].each") | |
555 | ;; tzinfo-data is propagated by ruby-activesupport, but it | |
556 | ;; needs to be in the Gemfile to become available. | |
557 | (("group :test do") "group :test do\n gem 'tzinfo-data'")) | |
ae9d1ab4 CB |
558 | #t))))) |
559 | (propagated-inputs | |
560 | `(("ruby-actionview" ,ruby-actionview) | |
561 | ("ruby-activemodel" ,ruby-activemodel) | |
562 | ("ruby-bindex" ,ruby-bindex) | |
563 | ("ruby-railties" ,ruby-railties))) | |
564 | (native-inputs | |
565 | `(("bundler" ,bundler) | |
566 | ("ruby-rails" ,ruby-rails) | |
567 | ("ruby-mocha" ,ruby-mocha) | |
568 | ("ruby-simplecov" ,ruby-simplecov))) | |
569 | (synopsis "Debugging tool for your Ruby on Rails applications") | |
570 | (description | |
571 | "This package allows you to create an interactive Ruby session in your | |
572 | browser. Those sessions are launched automatically in case of an error and | |
573 | can also be launched manually in any page.") | |
574 | (home-page "https://github.com/rails/web-console") | |
575 | (license license:expat))) | |
576 | ||
ad6471d4 CB |
577 | (define-public ruby-with-advisory-lock |
578 | (package | |
579 | (name "ruby-with-advisory-lock") | |
580 | (version "4.0.0") | |
581 | (source | |
582 | (origin | |
583 | (method url-fetch) | |
584 | (uri (rubygems-uri "with_advisory_lock" version)) | |
585 | (sha256 | |
586 | (base32 | |
587 | "1k37hxgmaqgsd54gplm5xim9nw3ghvqsbzaw7q4q64ha1nbd9a41")))) | |
588 | (build-system ruby-build-system) | |
589 | (arguments | |
590 | '(#:tests? #f)) ; TODO Tests require a running MySQL service | |
591 | (propagated-inputs | |
592 | `(("ruby-activerecord" ,ruby-activerecord))) | |
593 | (native-inputs | |
594 | `(("bundler" ,bundler) | |
595 | ("ruby-yard" ,ruby-yard) | |
596 | ("ruby-mysql2" ,ruby-mysql2))) | |
597 | (synopsis "Advisory locking for ActiveRecord") | |
598 | (description | |
599 | "The With advisory lock gem adds advisory locking to ActiveRecord for | |
52beae7b | 600 | PostgreSQL and MySQL. SQLite is also supported, but this uses the file system |
ad6471d4 CB |
601 | for locks.") |
602 | (home-page "https://closuretree.github.io/with_advisory_lock/") | |
603 | (license license:expat))) | |
604 | ||
a3dbfbbd CB |
605 | (define-public ruby-rails |
606 | (package | |
607 | (name "ruby-rails") | |
e2fbc272 | 608 | (version "5.2.2.1") |
a3dbfbbd CB |
609 | (source |
610 | (origin | |
611 | (method url-fetch) | |
612 | (uri (rubygems-uri "rails" version)) | |
613 | (sha256 | |
614 | (base32 | |
e2fbc272 | 615 | "1jxmwrykwgbn116hhmi7h75hcsdifhj89wk12m7ch2f3mn1lrmp9")))) |
a3dbfbbd CB |
616 | (build-system ruby-build-system) |
617 | (arguments | |
618 | '(#:phases | |
619 | (modify-phases %standard-phases | |
620 | ;; This gem acts as glue between the gems that actually make up | |
621 | ;; Rails. The important thing to check is that the gemspec matches up | |
622 | ;; with the Guix packages and Rubygems can successfully activate the | |
623 | ;; Rails gem. | |
624 | ;; | |
625 | ;; The following check phase tests this. | |
626 | (delete 'check) | |
627 | (add-after 'install 'check | |
628 | (lambda* (#:key tests? outputs #:allow-other-keys) | |
629 | (setenv "GEM_PATH" | |
630 | (string-append | |
631 | (getenv "GEM_PATH") | |
632 | ":" | |
633 | (assoc-ref outputs "out") "/lib/ruby/vendor_ruby")) | |
634 | (when tests? | |
635 | (invoke "ruby" "-e" "gem 'rails'")) | |
636 | #t))))) | |
637 | (propagated-inputs | |
638 | `(("ruby-activesupport" ,ruby-activesupport) | |
639 | ("ruby-actionpack" ,ruby-actionpack) | |
640 | ("ruby-actionview" ,ruby-actionview) | |
641 | ("ruby-activemodel" ,ruby-activemodel) | |
642 | ("ruby-activerecord" ,ruby-activerecord) | |
643 | ("ruby-actionmailer" ,ruby-actionmailer) | |
644 | ("ruby-activejob" ,ruby-activejob) | |
645 | ("ruby-actioncable" ,ruby-actioncable) | |
646 | ("ruby-activestorage" ,ruby-activestorage) | |
647 | ("ruby-railties" ,ruby-railties) | |
648 | ("bundler" ,bundler) | |
649 | ("ruby-sprockets-rails" ,ruby-sprockets-rails))) | |
650 | (synopsis "Full-stack web framework optimized for programmer happiness") | |
651 | (description | |
652 | "Ruby on Rails is a full-stack web framework optimized for programmer | |
653 | happiness and sustainable productivity. It encourages beautiful code by | |
654 | favoring convention over configuration.") | |
655 | (home-page "https://rubyonrails.org/") | |
656 | (license license:expat))) |