summary refs log tree commit diff
path: root/gnu/packages/ruby.scm
diff options
context:
space:
mode:
authorMaxim Cournoyer <maxim.cournoyer@gmail.com>2020-07-14 22:29:02 -0400
committerMaxim Cournoyer <maxim.cournoyer@gmail.com>2020-07-17 23:01:29 -0400
commitfe9993b19c93359e336fc9c8ca9e99634abd59a9 (patch)
tree955a418e896129c3b2081f5840457213569c809c /gnu/packages/ruby.scm
parent9c1715581fa4e7f0d851cd51288c554d08d06cc4 (diff)
downloadguix-fe9993b19c93359e336fc9c8ca9e99634abd59a9.tar.gz
gnu: ruby-coveralls: Strip exact versions from gemspec file.
* gnu/packages/ruby.scm (ruby-coveralls)[phases]: New
'strip-version-requirements phase.
Diffstat (limited to 'gnu/packages/ruby.scm')
-rw-r--r--gnu/packages/ruby.scm16
1 files changed, 14 insertions, 2 deletions
diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm
index 8acb589c46..4b5b577c06 100644
--- a/gnu/packages/ruby.scm
+++ b/gnu/packages/ruby.scm
@@ -7186,8 +7186,20 @@ software development workflow.")
          "1mv4fn5lfxhy7bc2f1lpnc5yp9mvv97az77j4r7jgrxcqwn8fqxc"))))
     (build-system ruby-build-system)
     ;; The test suite depends on ruby-vcr, which cannot be included in Guix
-    ;; because of its nonfree, Hippocratic derived license.
-    (arguments '(#:tests? #f))
+    ;; because of its nonfree, Hippocratic-derived license.
+    (arguments
+     `(#:tests? #f
+       #:phases (modify-phases %standard-phases
+                  (add-after 'extract-gemspec 'strip-version-requirements
+                    ;; Keeping strict version requirements can cause problems
+                    ;; to users of the library, such as: Gem::ConflictError:
+                    ;; Unable to activate coveralls-0.8.23, because
+                    ;; simplecov-0.17.1 conflicts with simplecov (~> 0.16.1).
+                    (lambda _
+                      (substitute* "coveralls-ruby.gemspec"
+                        (("(.*add_.*dependency\\([^,]+), .*" _ stripped)
+                         (string-append stripped ")\n")))
+                      #t)))))
     (propagated-inputs
      `(("ruby-json" ,ruby-json)
        ("ruby-term-ansicolor" ,ruby-term-ansicolor)