[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
164/229: gnu: Add ruby-importmap-rails.
From: |
guix-commits |
Subject: |
164/229: gnu: Add ruby-importmap-rails. |
Date: |
Tue, 28 Mar 2023 22:29:18 -0400 (EDT) |
apteryx pushed a commit to branch master
in repository guix.
commit 2a70f3030a8034e2c637ba90c1555211ed1f77f5
Author: Maxim Cournoyer <maxim.cournoyer@gmail.com>
AuthorDate: Fri Mar 10 15:44:10 2023 -0500
gnu: Add ruby-importmap-rails.
* gnu/packages/rails.scm (ruby-importmap-rails-bootstrap): New private
variable.
(ruby-importmap-rails): New variable.
---
gnu/packages/rails.scm | 73 ++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 73 insertions(+)
diff --git a/gnu/packages/rails.scm b/gnu/packages/rails.scm
index 802c4b9dec..4abecb8409 100644
--- a/gnu/packages/rails.scm
+++ b/gnu/packages/rails.scm
@@ -26,6 +26,7 @@
#:use-module (guix download)
#:use-module (guix git-download)
#:use-module (guix packages)
+ #:use-module (guix utils)
#:use-module (gnu packages base)
#:use-module (gnu packages databases)
#:use-module (gnu packages node)
@@ -795,6 +796,78 @@ support for YAML, to optimize and cache expensive
computations.")
(home-page "https://github.com/Shopify/bootsnap")
(license license:expat)))
+;;; A private variant used to bootstrap railties.
+(define ruby-importmap-rails-bootstrap
+ (package
+ (name "ruby-importmap-rails-bootstrap")
+ (version "1.1.5")
+ (source (origin
+ (method git-fetch) ;for tests
+ (uri (git-reference
+ (url "https://github.com/rails/importmap-rails")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1d8pqqqrvsnm8rpr7qkpcxpscif61xymi509v1c62laadvhcmklg"))))
+ (build-system ruby-build-system)
+ (arguments (list #:tests? #f)) ;avoid all extra dependencies
+ ;; Leave out ruby-railties, for bootstrapping purposes.
+ (propagated-inputs (list ruby-actionpack))
+ (synopsis "Tool to manage modern JavaScript in Rails")
+ (description "Import maps can import JavaScript modules using logical
+names that map to versioned/digested files -- directly from the browser. It
+makes it possible to build modern JavaScript applications using JavaScript
+libraries made for ES modules (ESM) without the need for transpiling or
+bundling, which removes the need for Webpack, Yarn, npm, or any other part of
+the JavaScript toolchain. All that is needed is the asset pipeline that is
+already included in Rails.")
+ (home-page "https://github.com/rails/importmap-rails")
+ (license license:expat)))
+
+(define-public ruby-importmap-rails
+ (package/inherit ruby-importmap-rails-bootstrap
+ (name "ruby-importmap-rails")
+ (arguments
+ (list #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'extract-gemspec 'relax-requirements
+ (lambda _
+ (delete-file "gemfiles/rails_7_propshaft.gemfile.lock")
+ (substitute* "gemfiles/rails_7_propshaft.gemfile"
+ ;; Remove appraisal, and add tzinfo-data, which needs to
+ ;; be in the Gemfile to become available.
+ ((".*appraisal.*")
+ "gem 'tzinfo-data'\n")
+ ;; This gem is for managing *installation* of
+ ;; webdrivers... we do not want that.
+ ((".*gem \"webdrivers\".*") ""))))
+ (add-before 'check 'set-BUNDLE_GEMFILE
+ (lambda _
+ ;; The default Gemfile is for Rails 6.
+ (setenv "BUNDLE_GEMFILE"
+ "gemfiles/rails_7_propshaft.gemfile")))
+ (add-before 'check 'disable-problematic-tests
+ (lambda _
+ ;; The integration tests require networking; disable them.
+ (delete-file "test/npm_integration_test.rb")
+ (delete-file "test/packager_integration_test.rb"))))))
+ (native-inputs
+ (list ruby-byebug
+ ruby-capybara
+ ruby-propshaft
+ ruby-rails
+ ruby-rexml
+ ruby-selenium-webdriver
+ ruby-sqlite3
+ ruby-stimulus-rails
+ ruby-turbo-rails
+ ruby-tzinfo
+ ruby-tzinfo-data))
+ (propagated-inputs
+ (list ruby-actionpack
+ ruby-railties))))
+
(define-public ruby-marcel
(package
(name "ruby-marcel")
- 152/229: gnu: Add ruby-date., (continued)
- 152/229: gnu: Add ruby-date., guix-commits, 2023/03/28
- 157/229: gnu: ruby-actionmailer: Update to 7.0.4.3., guix-commits, 2023/03/28
- 58/229: gnu: Add ruby-bcrypt., guix-commits, 2023/03/28
- 103/229: gnu: ruby-pry-byebug: Update to 3.10.1., guix-commits, 2023/03/28
- 105/229: gnu: Remove ruby-chandler., guix-commits, 2023/03/28
- 108/229: gnu: ruby-maxitest: Update to 4.4.1., guix-commits, 2023/03/28
- 126/229: gnu: Add ruby-bake., guix-commits, 2023/03/28
- 135/229: gnu: Add ruby-rack-session., guix-commits, 2023/03/28
- 154/229: gnu: Add ruby-net-pop., guix-commits, 2023/03/28
- 136/229: gnu: ruby-rubyzip: Update to 2.3.2., guix-commits, 2023/03/28
- 164/229: gnu: Add ruby-importmap-rails.,
guix-commits <=
- 174/229: gnu: Add ruby-arr-pm., guix-commits, 2023/03/28
- 179/229: gnu: Add fpm., guix-commits, 2023/03/28
- 182/229: gnu: ruby-temple: Update to 0.10.0., guix-commits, 2023/03/28
- 141/229: gnu: Add ruby-websocket-eventmachine-server., guix-commits, 2023/03/28
- 142/229: gnu: Add ruby-websocket-client-simple., guix-commits, 2023/03/28
- 144/229: gnu: ruby-mini-mime: Update to 1.1.2., guix-commits, 2023/03/28
- 145/229: gnu: ruby-marcel: Update to 1.0.2., guix-commits, 2023/03/28
- 148/229: gnu: ruby-activestorage: Update to 7.0.4.3., guix-commits, 2023/03/28
- 149/229: gnu: ruby-actiontext: Update to 7.0.4.3., guix-commits, 2023/03/28
- 153/229: gnu: Add ruby-net-imap., guix-commits, 2023/03/28