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> |
90322fdb MJ |
4 | ;;; |
5 | ;;; This file is part of GNU Guix. | |
6 | ;;; | |
7 | ;;; GNU Guix is free software; you can redistribute it and/or modify it | |
8 | ;;; under the terms of the GNU General Public License as published by | |
9 | ;;; the Free Software Foundation; either version 3 of the License, or (at | |
10 | ;;; your option) any later version. | |
11 | ;;; | |
12 | ;;; GNU Guix is distributed in the hope that it will be useful, but | |
13 | ;;; WITHOUT ANY WARRANTY; without even the implied warranty of | |
14 | ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
15 | ;;; GNU General Public License for more details. | |
16 | ;;; | |
17 | ;;; You should have received a copy of the GNU General Public License | |
18 | ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. | |
19 | ||
20 | (define-module (gnu packages rails) | |
21 | #:use-module ((guix licenses) #:prefix license:) | |
22 | #:use-module (guix download) | |
24412de4 | 23 | #:use-module (guix git-download) |
90322fdb MJ |
24 | #:use-module (guix packages) |
25 | #:use-module (gnu packages ruby) | |
26 | #:use-module (guix build-system ruby)) | |
27 | ||
3aeb6e1d MJ |
28 | (define-public ruby-spring |
29 | (package | |
30 | (name "ruby-spring") | |
29f49403 | 31 | (version "1.7.2") |
3aeb6e1d MJ |
32 | (source |
33 | (origin | |
34 | (method url-fetch) | |
35 | (uri | |
36 | (string-append "https://github.com/rails/spring/archive/v" | |
37 | version ".tar.gz")) | |
38 | (file-name (string-append name "-" version ".tar.gz")) | |
39 | (sha256 | |
40 | (base32 | |
29f49403 | 41 | "1dd58y0cpsm2izj74yscn0ybfygmgcbbfdw1891g7cq41aai4b35")))) |
3aeb6e1d MJ |
42 | (build-system ruby-build-system) |
43 | (arguments | |
44 | `(#:test-target "test:unit" | |
45 | #:phases | |
46 | (modify-phases %standard-phases | |
47 | (add-before 'check 'remove-bump | |
48 | (lambda _ | |
49 | (substitute* "spring.gemspec" | |
29f49403 BW |
50 | (("gem.add_development_dependency 'bump'") "") |
51 | (("gem.add_development_dependency 'activesupport'.*") | |
52 | "gem.add_development_dependency 'activesupport'\n")) | |
3aeb6e1d MJ |
53 | (substitute* "Rakefile" |
54 | (("require \\\"bump/tasks\\\"") "")) | |
55 | #t))))) | |
56 | (native-inputs | |
57 | `(("bundler" ,bundler) | |
58 | ("ruby-activesupport" ,ruby-activesupport))) | |
59 | (synopsis "Ruby on Rails application preloader") | |
60 | (description | |
61 | "Spring is a Ruby on Rails application preloader. It speeds up | |
62 | development by keeping your application running in the background so the | |
63 | application does need to boot it every time you run a test, rake task or | |
64 | migration.") | |
65 | (home-page "https://github.com/rails/spring") | |
66 | (license license:expat))) | |
67 | ||
a7749465 CB |
68 | (define-public ruby-sass-rails |
69 | (package | |
70 | (name "ruby-sass-rails") | |
71 | (version "5.0.7") | |
72 | (source | |
73 | (origin | |
74 | (method url-fetch) | |
75 | (uri (rubygems-uri "sass-rails" version)) | |
76 | (sha256 | |
77 | (base32 | |
78 | "1wa63sbsimrsf7nfm8h0m1wbsllkfxvd7naph5d1j6pbc555ma7s")))) | |
79 | (build-system ruby-build-system) | |
80 | (arguments | |
81 | '(#:tests? #f)) ; No included tests | |
82 | (propagated-inputs | |
83 | `(("ruby-railties" ,ruby-railties) | |
84 | ("ruby-sass" ,ruby-sass) | |
85 | ("ruby-sprockets" ,ruby-sprockets) | |
86 | ("ruby-sprockets-rails" ,ruby-sprockets-rails) | |
87 | ("ruby-tilt" ,ruby-tilt))) | |
88 | (synopsis "Sass adapter for the Rails asset pipeline") | |
89 | (description | |
90 | "This library integrates the SASS stylesheet language into Ruby on | |
91 | Rails.") | |
92 | (home-page "https://github.com/rails/sass-rails") | |
93 | (license license:expat))) | |
94 | ||
90322fdb MJ |
95 | (define-public ruby-debug-inspector |
96 | (package | |
97 | (name "ruby-debug-inspector") | |
eec0c587 | 98 | (version "0.0.3") |
90322fdb MJ |
99 | (source |
100 | (origin | |
101 | (method url-fetch) | |
102 | (uri (rubygems-uri "debug_inspector" version)) | |
103 | (sha256 | |
104 | (base32 | |
eec0c587 | 105 | "0vxr0xa1mfbkfcrn71n7c4f2dj7la5hvphn904vh20j3x4j5lrx0")))) |
90322fdb MJ |
106 | (build-system ruby-build-system) |
107 | (arguments | |
108 | `(#:phases | |
109 | (modify-phases %standard-phases | |
110 | (replace 'check | |
111 | (lambda _ | |
9923d5a4 TGR |
112 | (invoke "rake" "compile") |
113 | (invoke "ruby" "-Ilib" "-e" | |
114 | (string-append | |
115 | "require 'debug_inspector'; RubyVM::DebugInspector." | |
116 | "open{|dc| p dc.backtrace_locations}"))))))) | |
90322fdb MJ |
117 | (synopsis "Ruby wrapper for the MRI 2.0 debug_inspector API") |
118 | (description | |
119 | "This package provides a Ruby wrapper for the MRI 2.0 debug_inspector | |
120 | API.") | |
121 | (home-page | |
122 | "https://github.com/banister/debug_inspector") | |
123 | (license license:expat))) | |
29fa6d84 CB |
124 | |
125 | (define-public ruby-activemodel | |
126 | (package | |
127 | (name "ruby-activemodel") | |
22468de4 | 128 | (version "5.2.2.1") |
29fa6d84 CB |
129 | (source |
130 | (origin | |
131 | (method url-fetch) | |
132 | (uri (rubygems-uri "activemodel" version)) | |
133 | (sha256 | |
134 | (base32 | |
22468de4 | 135 | "1idmvqvpgri34k31s44pjb88rc3jad3yxra7fd1kpidpnv5f3v65")))) |
29fa6d84 CB |
136 | (build-system ruby-build-system) |
137 | (arguments | |
138 | '(;; No included tests | |
139 | #:tests? #f)) | |
140 | (propagated-inputs | |
141 | `(("ruby-activesupport" ,ruby-activesupport))) | |
142 | (synopsis "Toolkit for building modeling frameworks like Active Record") | |
143 | (description | |
144 | "This package provides a toolkit for building modeling frameworks like | |
145 | Active Record. ActiveSupport handles attributes, callbacks, validations, | |
146 | serialization, internationalization, and testing.") | |
147 | (home-page "https://rubyonrails.org/") | |
148 | (license license:expat))) | |
13cf6aee CB |
149 | |
150 | (define-public ruby-activerecord | |
151 | (package | |
152 | (name "ruby-activerecord") | |
0fb8ed17 | 153 | (version "5.2.2.1") |
13cf6aee CB |
154 | (source |
155 | (origin | |
156 | (method url-fetch) | |
157 | (uri (rubygems-uri "activerecord" version)) | |
158 | (sha256 | |
159 | (base32 | |
0fb8ed17 | 160 | "1c5cz9v7ggpqjxf0fqs1xhy1pb9m34cp31pxarhs9aqb71qjl98v")))) |
13cf6aee CB |
161 | (build-system ruby-build-system) |
162 | (arguments | |
163 | '(;; No included tests | |
164 | #:tests? #f)) | |
165 | (propagated-inputs | |
166 | `(("ruby-activemodel" ,ruby-activemodel) | |
167 | ("ruby-activesupport" ,ruby-activesupport) | |
168 | ("ruby-arel" ,ruby-arel))) | |
169 | (synopsis "Ruby library to connect to relational databases") | |
170 | (description | |
171 | "Active Record connects classes to relational database table to establish | |
172 | an almost zero-configuration persistence layer for applications.") | |
173 | (home-page "https://rubyonrails.org") | |
174 | (license license:expat))) | |
ab654da5 CB |
175 | |
176 | (define-public ruby-rails-html-sanitizer | |
177 | (package | |
178 | (name "ruby-rails-html-sanitizer") | |
179 | (version "1.0.4") | |
180 | (source | |
181 | (origin | |
182 | (method url-fetch) | |
183 | (uri (rubygems-uri "rails-html-sanitizer" version)) | |
184 | (sha256 | |
185 | (base32 | |
186 | "1gv7vr5d9g2xmgpjfq4nxsqr70r9pr042r9ycqqnfvw5cz9c7jwr")))) | |
187 | (build-system ruby-build-system) | |
188 | (arguments | |
189 | '(;; No included tests | |
190 | #:tests? #f)) | |
191 | (propagated-inputs | |
192 | `(("ruby-loofah" ,ruby-loofah))) | |
193 | (synopsis "HTML sanitization for Rails applications") | |
194 | (description | |
195 | "This gem is used to handle HTML sanitization in Rails applications. If | |
196 | you need similar functionality in non Rails apps consider using Loofah | |
197 | directly.") | |
198 | (home-page "https://github.com/rails/rails-html-sanitizer") | |
199 | (license license:expat))) | |
24412de4 CB |
200 | |
201 | (define-public ruby-rails-dom-testing | |
202 | (package | |
203 | (name "ruby-rails-dom-testing") | |
204 | (version "2.0.2") | |
205 | (source | |
206 | (origin | |
207 | (method git-fetch) | |
208 | (uri (git-reference | |
209 | (url "https://github.com/rails/rails-dom-testing.git") | |
210 | (commit (string-append "v" version)))) | |
211 | (file-name (git-file-name name version)) | |
212 | (sha256 | |
213 | (base32 | |
214 | "0zrg6x1w3wjgklbhcphjmggl11jx5s8cl21qjqij7wknm412i5wl")))) | |
215 | (build-system ruby-build-system) | |
216 | (native-inputs | |
217 | `(("bundler" ,bundler))) | |
218 | (propagated-inputs | |
219 | `(("ruby-activesupport" ,ruby-activesupport) | |
220 | ("ruby-nokogiri" ,ruby-nokogiri))) | |
221 | (synopsis "Compare HTML DOMs and assert certain elements exists") | |
222 | (description | |
223 | "This gem can compare HTML and assert certain elements exists. This is | |
224 | useful when writing tests.") | |
225 | (home-page "https://github.com/rails/rails-dom-testing") | |
226 | (license license:expat))) | |
1c48c539 CB |
227 | |
228 | (define-public ruby-actionview | |
229 | (package | |
230 | (name "ruby-actionview") | |
e8df5a50 | 231 | (version "5.2.2.1") |
1c48c539 CB |
232 | (source |
233 | (origin | |
234 | (method url-fetch) | |
235 | (uri (rubygems-uri "actionview" version)) | |
236 | (sha256 | |
237 | (base32 | |
e8df5a50 | 238 | "0832vlx37rly8ryfgi01b20mld8b3bv9cg62n5wax4zpzgn6jdxb")))) |
1c48c539 CB |
239 | (build-system ruby-build-system) |
240 | (arguments | |
241 | '(;; No included tests | |
242 | #:tests? #f)) | |
243 | (propagated-inputs | |
244 | `(("ruby-activesupport" ,ruby-activesupport) | |
245 | ("ruby-builder" ,ruby-builder) | |
246 | ("ruby-erubi" ,ruby-erubi) | |
247 | ("ruby-rails-dom-testing" ,ruby-rails-dom-testing) | |
248 | ("ruby-rails-html-sanitizer" ,ruby-rails-html-sanitizer))) | |
249 | (synopsis "Conventions and helpers for building web pages") | |
250 | (description | |
251 | "ActionView provides conventions and helpers for building web pages in | |
252 | Ruby.") | |
253 | (home-page "https://rubyonrails.org/") | |
254 | (license license:expat))) | |
7b062e98 CB |
255 | |
256 | (define-public ruby-actionpack | |
257 | (package | |
258 | (name "ruby-actionpack") | |
24c704af | 259 | (version "5.2.2.1") |
7b062e98 CB |
260 | (source |
261 | (origin | |
262 | (method url-fetch) | |
263 | (uri (rubygems-uri "actionpack" version)) | |
264 | (sha256 | |
265 | (base32 | |
24c704af | 266 | "1lxqzxa728dqg42yw0q4hqkaawqagiw1k0392an2ghjfgb16pafx")))) |
7b062e98 CB |
267 | (build-system ruby-build-system) |
268 | (arguments | |
269 | '(;; No included tests | |
270 | #:tests? #f)) | |
271 | (propagated-inputs | |
272 | `(("ruby-actionview" ,ruby-actionview) | |
273 | ("ruby-activesupport" ,ruby-activesupport) | |
274 | ("ruby-rack" ,ruby-rack) | |
275 | ("ruby-rack-test" ,ruby-rack-test) | |
276 | ("ruby-rails-dom-testing" ,ruby-rails-dom-testing) | |
277 | ("ruby-rails-html-sanitizer" ,ruby-rails-html-sanitizer))) | |
278 | (synopsis "Conventions for building and testing MVC web applications") | |
279 | (description | |
280 | "ActionPack provides conventions for building and testing MVC web | |
281 | applications. These work with any Rack-compatible server.") | |
282 | (home-page "https://rubyonrails.org/") | |
283 | (license license:expat))) | |
937c8862 CB |
284 | |
285 | (define-public ruby-actioncable | |
286 | (package | |
287 | (name "ruby-actioncable") | |
2a737e80 | 288 | (version "5.2.2.1") |
937c8862 CB |
289 | (source |
290 | (origin | |
291 | (method url-fetch) | |
292 | (uri (rubygems-uri "actioncable" version)) | |
293 | (sha256 | |
294 | (base32 | |
2a737e80 | 295 | "1x5fxhsr2mxq5r6258s48xsn7ld081d3qaavppvj7yp7w9vqn871")))) |
937c8862 CB |
296 | (build-system ruby-build-system) |
297 | (arguments | |
298 | '(;; No included tests | |
299 | #:tests? #f)) | |
300 | (propagated-inputs | |
301 | `(("ruby-actionpack" ,ruby-actionpack) | |
302 | ("ruby-nio4r" ,ruby-nio4r) | |
303 | ("ruby-websocket-driver" ,ruby-websocket-driver))) | |
304 | (synopsis "Integrate integrates WebSockets with Rails applications") | |
305 | (description | |
306 | "Action Cable integrates WebSockets with Rails applications. Through | |
307 | WebSockets it allows for real-time features in web applications.") | |
308 | (home-page "https://rubyonrails.org/") | |
309 | (license license:expat))) | |
ca09c4b5 CB |
310 | |
311 | (define-public ruby-activejob | |
312 | (package | |
313 | (name "ruby-activejob") | |
fbc2309f | 314 | (version "5.2.2.1") |
ca09c4b5 CB |
315 | (source |
316 | (origin | |
317 | (method url-fetch) | |
318 | (uri (rubygems-uri "activejob" version)) | |
319 | (sha256 | |
320 | (base32 | |
fbc2309f | 321 | "1zma452lc3qp4a7r10zbdmsci0kv9a3gnk4da2apbdrc8fib5mr3")))) |
ca09c4b5 CB |
322 | (build-system ruby-build-system) |
323 | (arguments | |
324 | '(;; No included tests | |
325 | #:tests? #f)) | |
326 | (propagated-inputs | |
327 | `(("ruby-activesupport" ,ruby-activesupport) | |
328 | ("ruby-globalid" ,ruby-globalid))) | |
329 | (synopsis "Declare job classes for multiple backends") | |
330 | (description | |
331 | "ActiveJob allows declaring job classes in a common way across Rails | |
332 | applications.") | |
333 | (home-page "https://rubyonrails.org/") | |
334 | (license license:expat))) | |
0fc30899 | 335 | |
07884945 CB |
336 | (define-public ruby-activestorage |
337 | (package | |
338 | (name "ruby-activestorage") | |
e16dd189 | 339 | (version "5.2.2.1") |
07884945 CB |
340 | (source |
341 | (origin | |
342 | (method url-fetch) | |
343 | (uri (rubygems-uri "activestorage" version)) | |
344 | (sha256 | |
345 | (base32 | |
e16dd189 | 346 | "155xpbzrz0kr0argx0vsh5prvadd2h1g1m61kdiabvfy2iygc02n")))) |
07884945 CB |
347 | (build-system ruby-build-system) |
348 | (arguments | |
349 | '(;; No included tests | |
350 | #:tests? #f)) | |
351 | (propagated-inputs | |
352 | `(("ruby-actionpack" ,ruby-actionpack) | |
353 | ("ruby-activerecord" ,ruby-activerecord) | |
354 | ("ruby-marcel" ,ruby-marcel))) | |
355 | (synopsis "Integrate file storage services in to Rails applications") | |
356 | (description | |
357 | "ActiveStorage integrates file storage services with Rails applications, | |
358 | allowing files to be attached to ActiveRecord models..") | |
359 | (home-page "https://rubyonrails.org/") | |
360 | (license license:expat))) | |
361 | ||
0fc30899 CB |
362 | (define-public ruby-actionmailer |
363 | (package | |
364 | (name "ruby-actionmailer") | |
5be0aedf | 365 | (version "5.2.2.1") |
0fc30899 CB |
366 | (source |
367 | (origin | |
368 | (method url-fetch) | |
369 | (uri (rubygems-uri "actionmailer" version)) | |
370 | (sha256 | |
371 | (base32 | |
5be0aedf | 372 | "10n2v2al68rsq5ghrdp7cpycsc1q0m19fcd8cd5i528n30nl23iw")))) |
0fc30899 CB |
373 | (build-system ruby-build-system) |
374 | (arguments | |
375 | '(;; No included tests | |
376 | #:tests? #f)) | |
377 | (propagated-inputs | |
378 | `(("ruby-actionpack" ,ruby-actionpack) | |
379 | ("ruby-actionview" ,ruby-actionview) | |
380 | ("ruby-activejob" ,ruby-activejob) | |
381 | ("ruby-mail" ,ruby-mail) | |
382 | ("ruby-rails-dom-testing" ,ruby-rails-dom-testing))) | |
383 | (synopsis "Work with emails using the controller/view pattern") | |
384 | (description | |
385 | "Compose, deliver, receive, and test emails using the controller/view | |
386 | pattern. Including support for multipart email and attachments.") | |
387 | (home-page "https://rubyonrails.org/") | |
388 | (license license:expat))) | |
c8f079ca CB |
389 | |
390 | (define-public ruby-railties | |
391 | (package | |
392 | (name "ruby-railties") | |
1835fc26 | 393 | (version "5.2.2.1") |
c8f079ca CB |
394 | (source |
395 | (origin | |
396 | (method url-fetch) | |
397 | (uri (rubygems-uri "railties" version)) | |
398 | (sha256 | |
399 | (base32 | |
1835fc26 | 400 | "0al6mvh2jvr3n7cxkx0yvhgiiarby6gxc93vl5xg1yxkvx27qzd6")))) |
c8f079ca CB |
401 | (build-system ruby-build-system) |
402 | (arguments | |
403 | '(;; No included tests | |
404 | #:tests? #f)) | |
405 | (propagated-inputs | |
406 | `(("ruby-actionpack" ,ruby-actionpack) | |
407 | ("ruby-activesupport" ,ruby-activesupport) | |
408 | ("ruby-method-source" ,ruby-method-source) | |
409 | ("ruby-thor" ,ruby-thor))) | |
410 | (synopsis "Rails internals, including application bootup and generators") | |
411 | (description | |
412 | "@code{railties} provides the core Rails internals including handling | |
413 | application bootup, plugins, generators, and Rake tasks.") | |
414 | (home-page "https://rubyonrails.org/") | |
415 | (license license:expat))) | |
80c4bfa6 CB |
416 | |
417 | (define-public ruby-sprockets-rails | |
418 | (package | |
419 | (name "ruby-sprockets-rails") | |
420 | (version "3.2.1") | |
421 | (source | |
422 | (origin | |
423 | (method url-fetch) | |
424 | (uri (rubygems-uri "sprockets-rails" version)) | |
425 | (sha256 | |
426 | (base32 | |
427 | "0ab42pm8p5zxpv3sfraq45b9lj39cz9mrpdirm30vywzrwwkm5p1")))) | |
428 | (build-system ruby-build-system) | |
429 | (arguments | |
430 | '(;; No included tests | |
431 | #:tests? #f)) | |
432 | (propagated-inputs | |
433 | `(("ruby-actionpack" ,ruby-actionpack) | |
434 | ("ruby-activesupport" ,ruby-activesupport) | |
435 | ("ruby-sprockets" ,ruby-sprockets))) | |
436 | (synopsis "Sprockets Rails integration") | |
437 | (description | |
438 | "Provides Sprockets implementation for the Rails Asset Pipeline.") | |
439 | (home-page | |
440 | "https://github.com/rails/sprockets-rails") | |
441 | (license license:expat))) | |
a3dbfbbd | 442 | |
ae9d1ab4 CB |
443 | (define-public ruby-web-console |
444 | (package | |
445 | (name "ruby-web-console") | |
446 | (version "3.7.0") | |
447 | (source | |
448 | (origin | |
449 | ;; Download from GitHub as test files are not provided in the gem. | |
450 | (method git-fetch) | |
451 | (uri (git-reference | |
452 | (url "https://github.com/rails/web-console.git") | |
453 | (commit (string-append "v" version)))) | |
454 | (file-name (git-file-name name version)) | |
455 | (sha256 | |
456 | (base32 | |
457 | "0ir999p8cnm3l3zwbgpwxxcq1vwkj8d0d3r24362cyaf4v1rglq2")))) | |
458 | (build-system ruby-build-system) | |
459 | (arguments | |
460 | '(#:phases | |
461 | (modify-phases %standard-phases | |
462 | (add-after 'unpack 'patch-Gemfile | |
463 | (lambda _ | |
464 | (substitute* "Gemfile" | |
465 | ;; Remove the github bit from the Gemfile, so that the Guix | |
466 | ;; packages are used. | |
467 | ((", github: .*") "\n") | |
468 | ;; The usual methods of not loading this group don't work, so | |
469 | ;; patch the Gemfile. | |
470 | (("group :development") "[].each") | |
471 | ;; tzinfo-data is propagated by ruby-activesupport, but it | |
472 | ;; needs to be in the Gemfile to become available. | |
473 | (("group :test do") "group :test do\n gem 'tzinfo-data'")) | |
474 | #t)) | |
475 | (add-after 'unpack 'fix-mocha-minitest-require | |
476 | (lambda _ | |
477 | (substitute* "test/test_helper.rb" | |
478 | ;; This chanegd in recent versions of Mocha | |
479 | (("mocha/minitest") "mocha/mini_test")) | |
480 | #t))))) | |
481 | (propagated-inputs | |
482 | `(("ruby-actionview" ,ruby-actionview) | |
483 | ("ruby-activemodel" ,ruby-activemodel) | |
484 | ("ruby-bindex" ,ruby-bindex) | |
485 | ("ruby-railties" ,ruby-railties))) | |
486 | (native-inputs | |
487 | `(("bundler" ,bundler) | |
488 | ("ruby-rails" ,ruby-rails) | |
489 | ("ruby-mocha" ,ruby-mocha) | |
490 | ("ruby-simplecov" ,ruby-simplecov))) | |
491 | (synopsis "Debugging tool for your Ruby on Rails applications") | |
492 | (description | |
493 | "This package allows you to create an interactive Ruby session in your | |
494 | browser. Those sessions are launched automatically in case of an error and | |
495 | can also be launched manually in any page.") | |
496 | (home-page "https://github.com/rails/web-console") | |
497 | (license license:expat))) | |
498 | ||
ad6471d4 CB |
499 | (define-public ruby-with-advisory-lock |
500 | (package | |
501 | (name "ruby-with-advisory-lock") | |
502 | (version "4.0.0") | |
503 | (source | |
504 | (origin | |
505 | (method url-fetch) | |
506 | (uri (rubygems-uri "with_advisory_lock" version)) | |
507 | (sha256 | |
508 | (base32 | |
509 | "1k37hxgmaqgsd54gplm5xim9nw3ghvqsbzaw7q4q64ha1nbd9a41")))) | |
510 | (build-system ruby-build-system) | |
511 | (arguments | |
512 | '(#:tests? #f)) ; TODO Tests require a running MySQL service | |
513 | (propagated-inputs | |
514 | `(("ruby-activerecord" ,ruby-activerecord))) | |
515 | (native-inputs | |
516 | `(("bundler" ,bundler) | |
517 | ("ruby-yard" ,ruby-yard) | |
518 | ("ruby-mysql2" ,ruby-mysql2))) | |
519 | (synopsis "Advisory locking for ActiveRecord") | |
520 | (description | |
521 | "The With advisory lock gem adds advisory locking to ActiveRecord for | |
522 | PostgreSQL and MySQL. SQLite is also supported, but this uses the filesystem | |
523 | for locks.") | |
524 | (home-page "https://closuretree.github.io/with_advisory_lock/") | |
525 | (license license:expat))) | |
526 | ||
a3dbfbbd CB |
527 | (define-public ruby-rails |
528 | (package | |
529 | (name "ruby-rails") | |
e2fbc272 | 530 | (version "5.2.2.1") |
a3dbfbbd CB |
531 | (source |
532 | (origin | |
533 | (method url-fetch) | |
534 | (uri (rubygems-uri "rails" version)) | |
535 | (sha256 | |
536 | (base32 | |
e2fbc272 | 537 | "1jxmwrykwgbn116hhmi7h75hcsdifhj89wk12m7ch2f3mn1lrmp9")))) |
a3dbfbbd CB |
538 | (build-system ruby-build-system) |
539 | (arguments | |
540 | '(#:phases | |
541 | (modify-phases %standard-phases | |
542 | ;; This gem acts as glue between the gems that actually make up | |
543 | ;; Rails. The important thing to check is that the gemspec matches up | |
544 | ;; with the Guix packages and Rubygems can successfully activate the | |
545 | ;; Rails gem. | |
546 | ;; | |
547 | ;; The following check phase tests this. | |
548 | (delete 'check) | |
549 | (add-after 'install 'check | |
550 | (lambda* (#:key tests? outputs #:allow-other-keys) | |
551 | (setenv "GEM_PATH" | |
552 | (string-append | |
553 | (getenv "GEM_PATH") | |
554 | ":" | |
555 | (assoc-ref outputs "out") "/lib/ruby/vendor_ruby")) | |
556 | (when tests? | |
557 | (invoke "ruby" "-e" "gem 'rails'")) | |
558 | #t))))) | |
559 | (propagated-inputs | |
560 | `(("ruby-activesupport" ,ruby-activesupport) | |
561 | ("ruby-actionpack" ,ruby-actionpack) | |
562 | ("ruby-actionview" ,ruby-actionview) | |
563 | ("ruby-activemodel" ,ruby-activemodel) | |
564 | ("ruby-activerecord" ,ruby-activerecord) | |
565 | ("ruby-actionmailer" ,ruby-actionmailer) | |
566 | ("ruby-activejob" ,ruby-activejob) | |
567 | ("ruby-actioncable" ,ruby-actioncable) | |
568 | ("ruby-activestorage" ,ruby-activestorage) | |
569 | ("ruby-railties" ,ruby-railties) | |
570 | ("bundler" ,bundler) | |
571 | ("ruby-sprockets-rails" ,ruby-sprockets-rails))) | |
572 | (synopsis "Full-stack web framework optimized for programmer happiness") | |
573 | (description | |
574 | "Ruby on Rails is a full-stack web framework optimized for programmer | |
575 | happiness and sustainable productivity. It encourages beautiful code by | |
576 | favoring convention over configuration.") | |
577 | (home-page "https://rubyonrails.org/") | |
578 | (license license:expat))) |