[bug#75737,v3,52/52] gnu: ruby-rspec-rails: Support ruby-sqlite3.

Message ID 20250131082029.26291-52-ngraves@ngraves.fr
State New
Headers
Series [bug#75737,v3,01/52] gnu: ruby-protobuf: Update to 3.10.9. |

Commit Message

Nicolas Graves Jan. 31, 2025, 8:20 a.m. UTC
  * gnu/packages/rails.scm (ruby-rspec-rails):
[arguments]<#:phases>: Patch sqlite3 versions in phase 'relax-requirements.
---
 gnu/packages/rails.scm | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)
  

Patch

diff --git a/gnu/packages/rails.scm b/gnu/packages/rails.scm
index 13d2541164..8fd80d33bb 100644
--- a/gnu/packages/rails.scm
+++ b/gnu/packages/rails.scm
@@ -372,8 +372,7 @@  (define-public ruby-rspec-rails
                     (commit (string-append "v" version))))
               (file-name (git-file-name name version))
               (sha256
-               (base32
-                "1ixm9h2sdd8varnkyxccxhp9dyr8fxk6q5ibrkrk2c83v2xa7bjc"))))
+               (base32 "1ixm9h2sdd8varnkyxccxhp9dyr8fxk6q5ibrkrk2c83v2xa7bjc"))))
     (build-system ruby-build-system)
     (arguments
      (list
@@ -396,6 +395,13 @@  (define-public ruby-rspec-rails
                 ((", :git => \"https://github.com/rspec.*")
                  "\n"))
               (setenv "RAILS_VERSION" #$%ruby-rails-version)
+              (substitute* '("Gemfile-rails-dependencies"
+                             "example_app_generator/generate_app.rb")
+                (("'sqlite3', .*")
+                 (string-append
+                  "'sqlite3', '~> "
+                  #$(package-version
+                     (this-package-native-input "ruby-sqlite3")) "'")))
               (substitute* "rspec-rails.gemspec"
                 (("'aruba',    '~> 0.14.12'")
                  "'aruba',    '>= 0.14.12'")