me
/
guix
Archived
1
0
Fork 0

gnu: ruby-activesupport: Update to 7.0.4.3.

* gnu/packages/ruby.scm (ruby-activesupport): Move to...
* gnu/packages/rails.scm (ruby-activesupport): ... here.
(%ruby-rails-version, ruby-rails-monorepo): New variables.
(ruby-activesupport): Update to 7.0.4.3.
[arguments]: Use gexps.  Add the delete-gemfiles, chdir, check-setup and
delete-problematic-tests phases.  Delete check phase override.
[native-inputs]: New field.
[propagated-inputs]: Remove ruby-zeitwerk.  Replace ruby-minitest with
ruby-minitest-5.15.
[home-page]: Update URL.
master
Maxim Cournoyer 2023-03-02 11:04:35 -05:00
parent 7d325537ed
commit 365de8cfd2
No known key found for this signature in database
GPG Key ID: 1260E46482E63562
3 changed files with 85 additions and 33 deletions

View File

@ -49,6 +49,7 @@
#:use-module (gnu packages python-check)
#:use-module (gnu packages python-xyz)
#:use-module (gnu packages rpc)
#:use-module (gnu packages rails)
#:use-module (gnu packages ruby)
#:use-module (srfi srfi-1))

View File

@ -2,6 +2,7 @@
;;; Copyright © 2016 Matthew Jordan <matthewjordandevops@yandex.com>
;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
;;; Copyright © 2019, 2021, 2022 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@ -24,10 +25,93 @@
#:use-module (guix download)
#:use-module (guix git-download)
#:use-module (guix packages)
#:use-module (gnu packages base)
#:use-module (gnu packages databases)
#:use-module (gnu packages node)
#:use-module (gnu packages ruby)
#:use-module (guix build-system ruby))
(define %ruby-rails-version "7.0.4.3")
(define ruby-rails-monorepo
(origin
(method git-fetch)
(uri (git-reference
(url "https://github.com/rails/rails")
(commit (string-append "v" %ruby-rails-version))))
(file-name (git-file-name "ruby-rails" %ruby-rails-version))
(sha256
(base32
"0f5f8r8wdmdmbyl07b0z555arai4ys2j8dj3fy0mq63y9bfhcqqk"))))
(define-public ruby-activesupport
(package
(name "ruby-activesupport")
(version %ruby-rails-version)
(source ruby-rails-monorepo)
(build-system ruby-build-system)
(arguments
(list
#:phases
#~(modify-phases %standard-phases
(add-after 'unpack 'delete-gemfiles
(lambda _
(delete-file "Gemfile")
(delete-file "Gemfile.lock")))
(add-after 'delete-gemfiles 'chdir
(lambda _
(chdir "activesupport")))
(add-before 'check 'check-setup
(lambda* (#:key native-inputs inputs #:allow-other-keys)
;; Multiple tests require to set the timezone.
(setenv "TZDIR" (search-input-directory (or native-inputs inputs)
"share/zoneinfo"))
;; The test suite requires a memcached and a redis server.
(invoke "memcached" "-d")
(invoke "redis-server" "--daemonize" "yes")))
(add-before 'check 'delete-problematic-tests
(lambda _
;; These tests fail non-deterministically.
(substitute* "test/cache/behaviors.rb"
((".*behaviors/cache_store_behavior.*")
"")
((".*behaviors/encoded_key_cache_behavior.*")
""))
(delete-file "test/evented_file_update_checker_test.rb")
;; These tests require cache_store_behavior, disabled above.
(delete-file "test/cache/stores/file_store_test.rb")
(delete-file "test/cache/stores/mem_cache_store_test.rb")
(delete-file "test/cache/stores/memory_store_test.rb")
(delete-file "test/cache/stores/redis_cache_store_test.rb"))))))
(native-inputs
(list memcached
redis
ruby-builder
ruby-connection-pool
ruby-dalli
ruby-hiredis
ruby-libxml
ruby-listen
ruby-rack
ruby-redis
ruby-rexml
tzdata-for-tests))
(propagated-inputs
(list ruby-concurrent
ruby-i18n
;; This is sub-optimal, but apparently necessary (see:
;; https://github.com/rails/rails/commit/
;; 9766eb4a833c26c64012230b96dd1157ebb8e8a2).
ruby-minitest-5.15
ruby-tzinfo
ruby-tzinfo-data))
(synopsis "Ruby on Rails utility library")
(description "ActiveSupport is a toolkit of support libraries and Ruby
core extensions extracted from the Rails framework. It includes support for
multibyte strings, internationalization, time zones, and testing.")
(home-page "https://rubyonrails.org/")
(license license:expat)))
(define-public ruby-spring
(package
(name "ruby-spring")

View File

@ -6547,39 +6547,6 @@ you about the changes.")
documents and fragments. It's built on top of Nokogiri and libxml2.")
(license license:expat)))
(define-public ruby-activesupport
(package
(name "ruby-activesupport")
(version "6.1.3")
(source
(origin
(method url-fetch)
(uri (rubygems-uri "activesupport" version))
(sha256
(base32
"00a4db64g8w5yyk6hzak2nqrmdfvyh5zc9cvnm9gglwbi87ss28h"))))
(build-system ruby-build-system)
(arguments
`(#:phases
(modify-phases %standard-phases
(replace 'check
(lambda _
;; There are no tests, instead attempt to load the library.
(invoke "ruby" "-Ilib" "-r" "active_support"))))))
(propagated-inputs
(list ruby-concurrent
ruby-i18n
ruby-minitest
ruby-tzinfo
ruby-tzinfo-data
ruby-zeitwerk))
(synopsis "Ruby on Rails utility library")
(description "ActiveSupport is a toolkit of support libraries and Ruby
core extensions extracted from the Rails framework. It includes support for
multibyte strings, internationalization, time zones, and testing.")
(home-page "https://www.rubyonrails.org")
(license license:expat)))
(define-public ruby-crass
(package
(name "ruby-crass")