aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages/ruby.scm
diff options
context:
space:
mode:
authorMaxim Cournoyer <maxim.cournoyer@gmail.com>2020-07-14 22:25:41 -0400
committerMaxim Cournoyer <maxim.cournoyer@gmail.com>2020-07-17 23:01:33 -0400
commit97295c2aa4b7c2e9f5952b6e181812d8e34b769f (patch)
treea69dccd3d2215146a784e7a3a395a7dda67acbd5 /gnu/packages/ruby.scm
parentc7ab342a366a9372d9c6a670a460edaeb8c550a5 (diff)
downloadguix-97295c2aa4b7c2e9f5952b6e181812d8e34b769f.tar
guix-97295c2aa4b7c2e9f5952b6e181812d8e34b769f.tar.gz
gnu: Add ruby-standard.
* gnu/packages/ruby.scm (ruby-standard): New variable.
Diffstat (limited to 'gnu/packages/ruby.scm')
-rw-r--r--gnu/packages/ruby.scm52
1 files changed, 52 insertions, 0 deletions
diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm
index ce41b41b4e..e38f9afd22 100644
--- a/gnu/packages/ruby.scm
+++ b/gnu/packages/ruby.scm
@@ -1525,6 +1525,58 @@ only what they care about.")
(home-page "https://github.com/searls/gimme")
(license license:expat))))
+(define-public ruby-standard
+ (package
+ (name "ruby-standard")
+ (version "0.4.7")
+ (source
+ (origin
+ (method git-fetch) ;no test suite in distributed gem
+ (uri (git-reference
+ (url "https://github.com/testdouble/standard.git")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0ylx0lm2pbbgr5h7fban592w96bl3wxmvfcpcdfrhkxnpg5kiwgv"))))
+ (build-system ruby-build-system)
+ (arguments
+ ;; TODO: the tests are currently broken due to using a newer Rubocop.
+ `(#:tests? #f
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'relax-version-requiremens
+ (lambda _
+ (delete-file "Gemfile")
+ (delete-file "Gemfile.lock")
+ #t))
+ (replace 'replace-git-ls-files
+ (lambda _
+ ;; TODO: Remove after the fix of using 'cut' to better mimic the
+ ;; git ls-files output is merged in ruby-build-system.
+ (substitute* "standard.gemspec"
+ (("`git ls-files -z`")
+ "`find . -type f -not -regex '.*\\.gem$' -print0 \
+|sort -z|cut -zc3-`"))
+ #t)))))
+ (native-inputs
+ `(("ruby-gimme" ,ruby-gimme)
+ ("ruby-pry" ,ruby-pry)
+ ("ruby-simplecov" ,ruby-simplecov)))
+ (propagated-inputs
+ `(("ruby-rubocop" ,ruby-rubocop)
+ ("ruby-rubocop-performance" ,ruby-rubocop-performance)))
+ (synopsis "Ruby Style Guide, with linter & automatic code fixer")
+ (description "Standard is a port of StandardJS. Like StandardJS, it aims
+to save time in the following ways:
+@itemize
+@item No configuration.
+@item Automatically format code.
+@item Catch style issues and programmer errors early.
+@end itemize")
+ (home-page "https://github.com/testdouble/standard")
+ (license license:expat)))
+
(define-public ruby-ast
(package
(name "ruby-ast")