mirror of
https://codeberg.org/guix/guix.git
synced 2025-10-02 02:15:12 +00:00
gnu: ruby-safe-yaml: Add missing require 'time'.
Patch ruby-safe-yaml to fix an issue that would lead to an error like this: uninitialized constant SafeYAML::Parse::Date::DateTime It's been reported upstream [1], and this patch was taken from the upstream Git repository. 1: https://github.com/dtao/safe_yaml/issues/80 * gnu/packages/ruby.scm (ruby-safe-yaml)[source]: Switch to the Git repository so that applying patches works and add a patch. [arguments]: Enable tests and add a phase to set the TZ environment variable, as one of the tests depends on a certian timezone. * gnu/packages/patches/ruby-safe-yaml-add-require-time.patch: New file. * gnu/local.mk (dist_patch_DATA): Add new patch file.
This commit is contained in:
parent
17098a493b
commit
28cf8dab3e
3 changed files with 45 additions and 8 deletions
|
@ -5849,19 +5849,36 @@ indentation will probably be an issue and hence this gem.")
|
|||
(package
|
||||
(name "ruby-safe-yaml")
|
||||
(version "1.0.4")
|
||||
(source (origin
|
||||
(method url-fetch)
|
||||
(uri (rubygems-uri "safe_yaml" version))
|
||||
(sha256
|
||||
(base32
|
||||
"1hly915584hyi9q9vgd968x2nsi5yag9jyf5kq60lwzi5scr7094"))))
|
||||
(source
|
||||
(origin
|
||||
;; TODO Fetch from the git repository so a patch can be applied
|
||||
(method git-fetch)
|
||||
(uri (git-reference
|
||||
(url "https://github.com/dtao/safe_yaml.git")
|
||||
(commit version)))
|
||||
(file-name (git-file-name name version))
|
||||
(sha256
|
||||
(base32
|
||||
"1wnln8xdy8g6kwdj4amm8773xwffqxpf2sxslk6jjh2wxsy1lrig"))
|
||||
(patches
|
||||
(search-patches "ruby-safe-yaml-add-require-time.patch"))))
|
||||
(build-system ruby-build-system)
|
||||
(native-inputs
|
||||
`(("ruby-rspec" ,ruby-rspec)
|
||||
("ruby-hashie" ,ruby-hashie)
|
||||
("ruby-heredoc-unindent" ,ruby-heredoc-unindent)))
|
||||
(arguments `(#:test-target "spec"
|
||||
#:tests? #f));; FIXME: one failure
|
||||
(arguments
|
||||
'(#:test-target "spec"
|
||||
#:phases
|
||||
(modify-phases %standard-phases
|
||||
(add-before 'check 'set-TZ
|
||||
(lambda _
|
||||
;; This test is dependent on the timezone
|
||||
;; spec/transform/to_date_spec.rb:35
|
||||
;; # SafeYAML::Transform::ToDate converts times to the local
|
||||
;; timezone
|
||||
(setenv "TZ" "UTC-11")
|
||||
#t)))))
|
||||
(home-page "https://github.com/dtao/safe_yaml")
|
||||
(synopsis "YAML parser")
|
||||
(description "The SafeYAML gem provides an alternative implementation of
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue