aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages/rails.scm
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2019-01-28 16:41:37 +0000
committerChristopher Baines <mail@cbaines.net>2019-02-14 21:38:03 +0000
commita3dbfbbd0444f7eef23494c1110eecb5784a53b4 (patch)
treed1aeb884217eb386511b71bfb201864eb029c597 /gnu/packages/rails.scm
parent078849455edf086cc5f17aca1d5fc9a5aeb5dce5 (diff)
downloadguix-a3dbfbbd0444f7eef23494c1110eecb5784a53b4.tar
guix-a3dbfbbd0444f7eef23494c1110eecb5784a53b4.tar.gz
gnu: Add ruby-rails.
* gnu/packages/rails.scm (ruby-rails): New variable.
Diffstat (limited to 'gnu/packages/rails.scm')
-rw-r--r--gnu/packages/rails.scm53
1 files changed, 53 insertions, 0 deletions
diff --git a/gnu/packages/rails.scm b/gnu/packages/rails.scm
index a45dca65d1..2d7ccceff7 100644
--- a/gnu/packages/rails.scm
+++ b/gnu/packages/rails.scm
@@ -412,3 +412,56 @@ application bootup, plugins, generators, and Rake tasks.")
(home-page
"https://github.com/rails/sprockets-rails")
(license license:expat)))
+
+(define-public ruby-rails
+ (package
+ (name "ruby-rails")
+ (version "5.2.2")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (rubygems-uri "rails" version))
+ (sha256
+ (base32
+ "1m9cszds68dsiycciiayd3c9g90s2yzn1izkr3gpgqkfw6dmvzyr"))))
+ (build-system ruby-build-system)
+ (arguments
+ '(#:phases
+ (modify-phases %standard-phases
+ ;; This gem acts as glue between the gems that actually make up
+ ;; Rails. The important thing to check is that the gemspec matches up
+ ;; with the Guix packages and Rubygems can successfully activate the
+ ;; Rails gem.
+ ;;
+ ;; The following check phase tests this.
+ (delete 'check)
+ (add-after 'install 'check
+ (lambda* (#:key tests? outputs #:allow-other-keys)
+ (setenv "GEM_PATH"
+ (string-append
+ (getenv "GEM_PATH")
+ ":"
+ (assoc-ref outputs "out") "/lib/ruby/vendor_ruby"))
+ (when tests?
+ (invoke "ruby" "-e" "gem 'rails'"))
+ #t)))))
+ (propagated-inputs
+ `(("ruby-activesupport" ,ruby-activesupport)
+ ("ruby-actionpack" ,ruby-actionpack)
+ ("ruby-actionview" ,ruby-actionview)
+ ("ruby-activemodel" ,ruby-activemodel)
+ ("ruby-activerecord" ,ruby-activerecord)
+ ("ruby-actionmailer" ,ruby-actionmailer)
+ ("ruby-activejob" ,ruby-activejob)
+ ("ruby-actioncable" ,ruby-actioncable)
+ ("ruby-activestorage" ,ruby-activestorage)
+ ("ruby-railties" ,ruby-railties)
+ ("bundler" ,bundler)
+ ("ruby-sprockets-rails" ,ruby-sprockets-rails)))
+ (synopsis "Full-stack web framework optimized for programmer happiness")
+ (description
+ "Ruby on Rails is a full-stack web framework optimized for programmer
+happiness and sustainable productivity. It encourages beautiful code by
+favoring convention over configuration.")
+ (home-page "https://rubyonrails.org/")
+ (license license:expat)))