[bug#34222,13/15] gnu: Add ruby-unicode-display-width.

Message ID 20190127170820.28937-13-mail@cbaines.net
State Accepted
Commit d8c189ed56d20c2eeb52710b197f52b3472103c8
Headers show
Series Add ruby-rubocop and dependencies. | expand

Checks

Context Check Description
cbaines/applying patch success Successfully applied
cbaines/applying patch success Successfully applied
cbaines/applying patch success Successfully applied
cbaines/applying patch success Successfully applied

Commit Message

Christopher Baines Jan. 27, 2019, 5:08 p.m. UTC
Required for ruby-rubocop.

* gnu/packages/ruby.scm (ruby-unicode-display-width): New variable.
---
 gnu/packages/ruby.scm | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)

Comments

Ricardo Wurmus Jan. 27, 2019, 5:39 p.m. UTC | #1
Christopher Baines <mail@cbaines.net> writes:

> Required for ruby-rubocop.
>
> * gnu/packages/ruby.scm (ruby-unicode-display-width): New variable.

LGTM!

Patch

diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm
index ccc58effa0..c455bd5f7b 100644
--- a/gnu/packages/ruby.scm
+++ b/gnu/packages/ruby.scm
@@ -4979,6 +4979,28 @@  requests.  This is useful when testing software.")
     (home-page "https://github.com/bblimke/webmock")
     (license license:expat)))
 
+(define-public ruby-unicode-display-width
+  (package
+    (name "ruby-unicode-display-width")
+    (version "1.4.1")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (rubygems-uri "unicode-display_width" version))
+       (sha256
+        (base32
+         "0bq528fibi8s0jmxz0xzlgzggdq0x4fx46wfqz49478pv8gb2diq"))))
+    (build-system ruby-build-system)
+    (arguments
+     '(;; Test data not included.
+       #:tests? #f))
+    (synopsis "Determine the monospace display width of Ruby strings")
+    (description
+     "@code{Unicode::DisplayWidth} is a Ruby library which can determine the
+display width of strings in Ruby.")
+    (home-page "https://github.com/janlelis/unicode-display_width")
+    (license license:expat)))
+
 (define-public ruby-domain-name
   (package
     (name "ruby-domain-name")