rails.scm 24 KB

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