You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

11641 lines
417 KiB

;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2014, 2015 Pjotr Prins <pjotr.guix@thebird.nl>
;;; Copyright © 2014, 2015, 2016, 2017 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
;;; Copyright © 2014, 2015 David Thompson <davet@gnu.org>
;;; Copyright © 2015, 2019 Ricardo Wurmus <rekado@elephly.net>
;;; Copyright © 2015, 2016, 2017 Ben Woodcroft <donttrustben@gmail.com>
;;; Copyright © 2017 Nikita <nikita@n0.is>
;;; Copyright © 2017, 2019, 2020 Marius Bakke <mbakke@fastmail.com>
;;; Copyright © 2017, 2018, 2019 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2017, 2018, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
;;; Copyright © 2017 Clément Lassieur <clement@lassieur.org>
;;; Copyright © 2017, 2018, 2019 Christopher Baines <mail@cbaines.net>
;;; Copyright © 2018 Vasile Dumitrascu <va511e@yahoo.com>
;;; Copyright © 2018 Alex Vong <alexvong1995@gmail.com>
;;; Copyright © 2019 Pierre Neidhardt <mail@ambrevar.xyz>
;;; Copyright © 2019 Mikhail Kirillov <w96k.ru@gmail.com>
;;; Copyright © 2019 Jelle Licht <jlicht@fsfe.org>
;;; Copyright © 2019 Brian Leung <bkleung89@gmail.com>
;;; Copyright © 2019 Collin J. Doering <collin@rekahsoft.ca>
;;; Copyright © 2019 Diego N. Barbato <dnbarbato@posteo.de>
;;; Copyright © 2019 Brett Gilio <brettg@posteo.de>
;;; Copyright © 2020 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
;;; GNU Guix is free software; you can redistribute it and/or modify it
;;; under the terms of the GNU General Public License as published by
;;; the Free Software Foundation; either version 3 of the License, or (at
;;; your option) any later version.
;;;
;;; GNU Guix is distributed in the hope that it will be useful, but
;;; WITHOUT ANY WARRANTY; without even the implied warranty of
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;;; GNU General Public License for more details.
;;;
;;; You should have received a copy of the GNU General Public License
;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
(define-module (gnu packages ruby)
#:use-module ((guix licenses) #:prefix license:)
#:use-module (gnu packages)
#:use-module (gnu packages base)
#:use-module (gnu packages bison)
#:use-module (gnu packages c)
#:use-module (gnu packages check)
#:use-module (gnu packages compression)
#:use-module (gnu packages crypto)
#:use-module (gnu packages databases)
#:use-module (gnu packages dbm)
#:use-module (gnu packages rails)
#:use-module (gnu packages readline)
#:use-module (gnu packages autotools)
#:use-module (gnu packages haskell-xyz)
#:use-module (gnu packages java)
#:use-module (gnu packages libffi)
#:use-module (gnu packages libidn)
#:use-module (gnu packages linux)
#:use-module (gnu packages lsof)
#:use-module (gnu packages maths)
#:use-module (gnu packages ncurses)
#:use-module (gnu packages networking)
#:use-module (gnu packages node)
#:use-module (gnu packages protobuf)
#:use-module (gnu packages python)
#:use-module (gnu packages python-xyz)
#:use-module (gnu packages ragel)
#:use-module (gnu packages rsync)
#:use-module (gnu packages sqlite)
#:use-module (gnu packages tls)
#:use-module (gnu packages version-control)
#:use-module (guix packages)
#:use-module (guix download)
#:use-module (guix git-download)
#:use-module (guix utils)
#:use-module (guix build-system gnu)
#:use-module (gnu packages xml)
#:use-module (gnu packages web)
#:use-module (guix build-system ruby)
#:use-module ((srfi srfi-1) #:select (alist-delete)))
(define %prawn-project-licenses
;; This set of licenses applies to most (all?) components of the Prawn
;; project (it is triple licensed).
(list license:ruby
license:gpl2+
license:gpl3+))
(define-public ruby
(package
(name "ruby")
(version "2.6.5")
(source
(origin
(method url-fetch)
(uri (string-append "http://cache.ruby-lang.org/pub/ruby/"
(version-major+minor version)
"/ruby-" version ".tar.xz"))
(sha256
(base32
"0qhsw2mr04f3lqinkh557msr35pb5rdaqy4vdxcj91flgxqxmmnm"))
(modules '((guix build utils)))
(snippet `(begin
;; Remove bundled libffi
(delete-file-recursively "ext/fiddle/libffi-3.2.1")
#t))))
(build-system gnu-build-system)
(arguments
`(#:test-target "test"
#:configure-flags '("--enable-shared") ; dynamic linking
#:phases
(modify-phases %standard-phases
(add-before 'configure 'replace-bin-sh-and-remove-libffi
(lambda _
(substitute* '("Makefile.in"
"ext/pty/pty.c"
"io.c"
"lib/mkmf.rb"
"process.c"
"test/rubygems/test_gem_ext_configure_builder.rb"
"test/rdoc/test_rdoc_parser.rb"
"test/ruby/test_rubyoptions.rb"
"test/ruby/test_process.rb"
"test/ruby/test_system.rb"
"tool/rbinstall.rb")
(("/bin/sh") (which "sh")))
#t)))))
(inputs
`(("readline" ,readline)
("openssl" ,openssl)
("libffi" ,libffi)
("gdbm" ,gdbm)))
(propagated-inputs
`(("zlib" ,zlib)))
(native-search-paths
(list (search-path-specification
(variable "GEM_PATH")
(files (list (string-append "lib/ruby/vendor_ruby"))))))
(synopsis "Programming language interpreter")
(description "Ruby is a dynamic object-oriented programming language with
a focus on simplicity and productivity.")
(home-page "https://www.ruby-lang.org")
(license license:ruby)))
(define-public ruby-2.7
(package
(inherit ruby)
(version "2.7.1")
(source
(origin
(method url-fetch)
(uri (string-append "http://cache.ruby-lang.org/pub/ruby/"
(version-major+minor version)
"/ruby-" version ".tar.gz"))
(sha256
(base32
"0674x98f542y02r7n2yv2qhmh97blqhi2mvh2dn5f000vlxlh66l"))
(modules '((guix build utils)))
(snippet `(begin
;; Remove bundled libffi
(delete-file-recursively "ext/fiddle/libffi-3.2.1")
#t))))
(arguments
`(#:test-target "test"
#:configure-flags '("--enable-shared") ; dynamic linking
#:phases
(modify-phases %standard-phases
(add-before 'configure 'replace-bin-sh-and-remove-libffi
(lambda _
(substitute* '("configure.ac"
"template/Makefile.in"
"lib/rubygems/installer.rb"
"ext/pty/pty.c"
"io.c"
"lib/mkmf.rb"
"process.c"
"test/rubygems/test_gem_ext_configure_builder.rb"
"test/rdoc/test_rdoc_parser.rb"
"test/ruby/test_rubyoptions.rb"
"test/ruby/test_process.rb"
"test/ruby/test_system.rb"
"tool/rbinstall.rb")
(("/bin/sh") (which "sh")))
#t)))))
(native-inputs
`(("autoconf" ,autoconf)))))
(define-public ruby-2.5
(package
(inherit ruby)
(version "2.5.8")
(source
(origin
(method url-fetch)
(uri (string-append "http://cache.ruby-lang.org/pub/ruby/"
(version-major+minor version)
"/ruby-" version ".tar.xz"))
(sha256
(base32
"0vad5ah1lrdhxsyqr5iqc8c7r7qczpmm76cz8rsf4crimpzv5483"))
(modules '((guix build utils)))
(snippet `(begin
;; Remove bundled libffi
(delete-file-recursively "ext/fiddle/libffi-3.2.1")
#t))))))
(define-public ruby-2.4
(package
(inherit ruby)
(version "2.4.10")
(source
(origin
(method url-fetch)
(uri (string-append "http://cache.ruby-lang.org/pub/ruby/"
(version-major+minor version)
"/ruby-" version ".tar.xz"))
(sha256
(base32
"1prhqlgik1zmw9lakl6hkriqslspw48pvhxff17h7ns42p8qwrnm"))
(modules '((guix build utils)))
(snippet `(begin
;; Remove bundled libffi
(delete-file-recursively "ext/fiddle/libffi-3.2.1")
#t))))))
(define-public mruby
(package
(name "mruby")
(version "2.0.0")
(source
(origin
(method git-fetch)
(uri (git-reference
(url "https://github.com/mruby/mruby")
(commit version)))
(file-name (git-file-name name version))
(sha256
(base32
"1r6w1asjshff43ymdwa6xmrkggza99mi2kw88k7ic6ag2j81hcj5"))))
(build-system gnu-build-system)
(arguments
`(#:test-target "test"
#:phases
(modify-phases %standard-phases
(delete 'configure)
(add-after 'unpack 'enable-verbose-tests
(lambda _
(substitute* "Makefile"
(("ruby ./minirake" m)
(string-append m " --verbose")))
#t))
(add-after 'unpack 'disable-broken-tests
(lambda _
(substitute* "mrbgems/mruby-io/test/io.rb"
(("assert\\('IO.popen.+$" m)
(string-append m "skip \"Hangs in the Guix build environment\"\n"))
(("assert\\('IO#isatty.+$" m)
(string-append m "skip \"Disable for Guix; there is no /dev/tty\"\n"))
;; This one is really weird. The *expected* output is all wrong.
(("assert\\('`cmd`.*" m)
(string-append m "skip \"Disable for Guix\"\n"))
(("echo foo")
(string-append (which "echo") " foo")))
#t))
;; There is no install target
(replace 'install
(lambda* (#:key outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))
(bin (string-append out "/bin"))
(lib (string-append out "/lib")))
(mkdir-p bin)
(copy-recursively "build/host/bin" bin)
(mkdir-p lib)
(copy-recursively "build/host/lib" lib))
#t)))))
(native-inputs
`(("ruby" ,ruby)
("bison" ,bison)))
(home-page "https://github.com/mruby/mruby")
(synopsis "Lightweight Ruby")
(description "mruby is the lightweight implementation of the Ruby
language. Its syntax is Ruby 1.9 compatible. mruby can be linked and
embedded within your application.")
(license license:expat)))
(define-public ruby-commander
(package
(name "ruby-commander")
(version "4.4.7")
(source
(origin
(method url-fetch)
(uri (rubygems-uri "commander" version))
(sha256
(base32
"1pxakz596fjqak3cdbha6iva1dlqis86i3kjrgg6lf3sp8i5vhwg"))))
(build-system ruby-build-system)
(arguments
`(#:test-target "spec"
#:phases
(modify-phases %standard-phases
;; Don't run or require rubocop, the code linting tool, as this is a
;; bit unnecessary.
(add-after 'unpack 'dont-run-rubocop
(lambda _
(substitute* "Rakefile"
((".*rubocop.*") "")
((".*RuboCop.*") ""))
#t)))))
(propagated-inputs
`(("ruby-highline" ,ruby-highline)))
(native-inputs
`(("bundler" ,bundler)
("ruby-rspec-core" ,ruby-rspec-core)
("ruby-rspec-expectations" ,ruby-rspec-expectations)
("ruby-rspec-mocks" ,ruby-rspec-mocks)
("ruby-simplecov" ,ruby-simplecov)))
(home-page "https://github.com/commander-rb/commander")
(synopsis "Library for building Ruby command-line executables")
(description
"Commander aims to be a complete solution for Ruby command-line
executables. Commander bridges the gap between other terminal related
libraries (OptionParser, HighLine), while providing many new features, and an
elegant API.")
(license license:expat)))
(define-public ruby-highline
(package
(name "ruby-highline")
(version "2.0.1")
(source
(origin
(method url-fetch)
(uri (rubygems-uri "highline" version))
(sha256
(base32
"0gr6pckj2jayxw1gdgh9193j5jag5zrrqqlrnl4jvcwpyd3sn2zc"))))
(build-system ruby-build-system)
(arguments
`(#:tests? #f)) ;; TODO: NameError: uninitialized constant SPEC
(native-inputs
`(("bundler" ,bundler)
("ruby-code-statistics" ,ruby-code-statistics)))
(synopsis
"HighLine helps you build command-line interfaces")
(description
"HighLine provides a high-level IO library that provides validation,
type conversion, and more for command-line interfaces. HighLine also includes
a menu system for providing multiple options to the user.")
(home-page "https://github.com/JEG2/highline")
(license (list license:gpl2 license:ruby))))
(define-public ruby-hoe
(package
(name "ruby-hoe")
(version "3.21.0")
(source (origin
(method url-fetch)
(uri (rubygems-uri "hoe" version))
(sha256
(base32
"0qid0n56mgsjvq5ksxajv0gb92akky8imwgvw22ajms5g4fd6nf4"))))
(build-system ruby-build-system)
(arguments
'(#:phases
(modify-phases %standard-phases
;; One of the tests fails if the SOURCE_DATE_EPOCH environment
;; variable is set, so unset it for the duration of the tests.
;;
;; TestHoe#test_possibly_better
;; [/tmp/guix-build-ruby-hoe-3.20.0.drv-0/gem/test/test_hoe.rb:250]:
;; Expected: 2019-11-12 00:00:00 UTC
;; Actual: 1970-01-01 00:00:00 UTC
(add-before 'check 'unset-SOURCE-DATE-EPOCH
(lambda _
(unsetenv "SOURCE_DATE_EPOCH")
#t))
(add-after 'check 'set-SOURCE-DATE-EPOCH-again
(lambda _
(setenv "SOURCE_DATE_EPOCH" "1")
#t)))))
(synopsis "Ruby project management helper")
(description
"Hoe is a rake/rubygems helper for project Rakefiles. It helps manage,
maintain, and release projects and includes a dynamic plug-in system allowing
for easy extensibility. Hoe ships with plug-ins for all the usual project
tasks including rdoc generation, testing, packaging, deployment, and
announcement.")
(home-page "https://www.zenspider.com/projects/hoe.html")
(license license:expat)))
(define-public ruby-rake-compiler
(package
(name "ruby-rake-compiler")
(version "1.1.0")
(source (origin
(method url-fetch)
(uri (rubygems-uri "rake-compiler" version))
(sha256
(base32
"0l4hg21v0phfrfsc2hilgmwvn2imxr0byqh8dv16bya1s5d3km0q"))))
(build-system ruby-build-system)
(arguments
'(#:tests? #f)) ; needs cucumber
(synopsis "Building and packaging helper for Ruby native extensions")
(description "Rake-compiler provides a framework for building and
packaging native C and Java extensions in Ruby.")
(home-page "https://github.com/rake-compiler/rake-compiler")
(license license:expat)))
(define-public ruby-rsync
(package
(name "ruby-rsync")
(version "1.0.9")
(source
(origin
(method url-fetch)
(uri (rubygems-uri "rsync" version))
(sha256
(base32
"0p8b27q1gvxilqfq2528xpwglzcm2myikkjxpqk7mwbwg9r6knxv"))))
(build-system ruby-build-system)
(arguments
'(#:test-target "spec"
#:phases
(modify-phases %standard-phases
(add-after 'unpack 'remove-coveralls-requirement
(lambda _
(substitute* "spec/spec_helper.rb"
(("require 'coveralls'") "")
(("Coveralls.wear!") ""))
#t)))))
(native-inputs
`(("bundler" ,bundler)
("rsync" ,rsync)
("ruby-rspec-core" ,ruby-rspec-core)
("ruby-rspec-expectations" ,ruby-rspec-expectations)
("ruby-rspec-mocks" ,ruby-rspec-mocks)))
(home-page "https://github.com/jbussdieker/ruby-rsync")
(synopsis "Ruby wrapper around rsync")
(description
"Ruby Rsync is a Ruby library that can synchronize files between remote
hosts by wrapping the @file{rsync} binary.")
(license license:expat)))
(define-public ruby-i18n
(package
(name "ruby-i18n")
(version "1.7.0")
(source (origin
(method url-fetch)
(uri (rubygems-uri "i18n" version))
(sha256
(base32
"0hmypvx9iyc0b4hski7aic2xzm09cg1c7q1qlpnk3k8s5acxzyhl"))))
(build-system ruby-build-system)
(arguments
'(#:tests? #f)) ; no tests
(propagated-inputs `(("concurrent-ruby" ,ruby-concurrent)))
(synopsis "Internationalization library for Ruby")
(description "Ruby i18n is an internationalization and localization
solution for Ruby programs. It features translation and localization,
interpolation of values to translations, pluralization, customizable
transliteration to ASCII, flexible defaults, bulk lookup, lambdas as
translation data, custom key/scope separator, custom exception handlers, and
an extensible architecture with a swappable backend.")
(home-page "https://github.com/ruby-i18n/i18n")
(license license:expat)))
(define-public ruby-iruby
(package
(name "ruby-iruby")
(version "0.3")
(source
(origin
(method url-fetch)
(uri (rubygems-uri "iruby" version))
(sha256
(base32
"1wdf2c0x8y6cya0n3y0p3p7b1sxkb2fdavdn2k58rf4rs37s7rzn"))))
(build-system ruby-build-system)
(arguments
;; TODO: Tests currently fail.
;;
;; Finished in 1.764405s, 1.1335 runs/s, 5.1009 assertions/s.
;;
;; 1) Failure:
;; IntegrationTest#test_interaction [/tmp/guix-build-ruby-iruby-0.3.drv-0/gem/test/integration_test.rb:25]:
;; In [ expected
;;
;; 2 runs, 9 assertions, 1 failures, 0 errors, 0 skips
'(#:tests? #f
#:phases
(modify-phases %standard-phases
(add-after 'unpack 'patch-ipython
(lambda* (#:key inputs #:allow-other-keys)
(substitute* "lib/iruby/command.rb"
(("version = `")
(string-append
"version = `"
(assoc-ref inputs "python-ipython")
"/bin/"))
(("Kernel\\.exec\\('")
(string-append
"Kernel.exec('"
(assoc-ref inputs "python-ipython")
"/bin/")))
#t)))))
(inputs
`(("python-ipython" ,python-ipython)))
(propagated-inputs
`(("ruby-bond" ,ruby-bond)
("ruby-data_uri" ,ruby-data_uri)
("ruby-mimemagic" ,ruby-mimemagic)
("ruby-multi-json" ,ruby-multi-json)
("ruby-cztop" ,ruby-cztop)
;; Optional inputs
("ruby-pry" ,ruby-pry)))
(synopsis "Ruby kernel for Jupyter/IPython")
(description
"This package provides a Ruby kernel for Jupyter/IPython frontends (e.g.
notebook).")
(home-page "https://github.com/SciRuby/iruby")
(license license:expat)))
;; RSpec is the dominant testing library for Ruby projects. Even RSpec's
;; dependencies use RSpec for their test suites! To avoid these circular
;; dependencies, we disable tests for all of the RSpec-related packages.
(define-public ruby-rspec-support
(package
(name "ruby-rspec-support")
(version "3.8.0")
(source (origin
(method url-fetch)
(uri (rubygems-uri "rspec-support" version))
(sha256
(base32
"0p3m7drixrlhvj2zpc38b11x145bvm311x6f33jjcxmvcm0wq609"))))
(build-system ruby-build-system)
(arguments
'(#:tests? #f)) ; avoid dependency cycles
(synopsis "RSpec support library")
(description "Support utilities for RSpec gems.")
(home-page "https://github.com/rspec/rspec-support")
(license license:expat)))
(define-public ruby-rspec-core
(package
(name "ruby-rspec-core")
(version "3.8.0")
(source (origin
(method url-fetch)
(uri (rubygems-uri "rspec-core" version))
(sha256
(base32
"1p1s5bnbqp3sxk67y0fh0x884jjym527r0vgmhbm81w7aq6b7l4p"))))
(build-system ruby-build-system)
(arguments
'(#:tests? #f)) ; avoid dependency cycles
(propagated-inputs
`(("ruby-rspec-support" ,ruby-rspec-support)))
(synopsis "RSpec core library")
(description "Rspec-core provides the RSpec test runner and example
groups.")
(home-page "https://github.com/rspec/rspec-core")
(license license:expat)))
(define-public ruby-rspec-core-2
(package (inherit ruby-rspec-core)
(version "2.14.8")
(source (origin
(method url-fetch)
(uri (rubygems-uri "rspec-core" version))
(sha256
(base32
"0psjy5kdlz3ph39br0m01w65i1ikagnqlg39f8p65jh5q7dz8hwc"))))
(propagated-inputs `())))
(define-public ruby-diff-lcs
(package
(name "ruby-diff-lcs")
(version "1.3")
(source (origin
(method url-fetch)
(uri (rubygems-uri "diff-lcs" version))
(sha256
(base32
"18w22bjz424gzafv6nzv98h0aqkwz3d9xhm7cbr1wfbyas8zayza"))))
(build-system ruby-build-system)
(arguments
'(#:tests? #f)) ; avoid dependency cycles
(synopsis "Compute the difference between two Enumerable sequences")
(description "Diff::LCS computes the difference between two Enumerable
sequences using the McIlroy-Hunt longest common subsequence (LCS) algorithm.
It includes utilities to create a simple HTML diff output format and a
standard diff-like tool.")
(home-page "https://github.com/halostatue/diff-lcs")
(license license:expat)))
(define-public ruby-rspec-expectations
(package
(name "ruby-rspec-expectations")
(version "3.8.2")
(source (origin
(method url-fetch)
(uri (rubygems-uri "rspec-expectations" version))
(sha256
(base32
"18l21hy1zdc2pgc2yb17k3n2al1khpfr0z6pijlm852iz6vj0dkm"))))
(build-system ruby-build-system)
(arguments
'(#:tests? #f)) ; avoid dependency cycles
(propagated-inputs
`(("ruby-rspec-support" ,ruby-rspec-support)
("ruby-diff-lcs" ,ruby-diff-lcs)))
(synopsis "RSpec expectations library")
(description "Rspec-expectations provides a simple API to express expected
outcomes of a code example.")
(home-page "https://github.com/rspec/rspec-expectations")
(license license:expat)))
(define-public ruby-rspec-expectations-2
(package (inherit ruby-rspec-expectations)
(version "2.14.5")
(source (origin
(method url-fetch)
(uri (rubygems-uri "rspec-expectations" version))
(sha256
(base32
"1ni8kw8kjv76jvwjzi4jba00k3qzj9f8wd94vm6inz0jz3gwjqf9"))))
(propagated-inputs
`(("ruby-diff-lcs" ,ruby-diff-lcs)))))
(define-public ruby-sorcerer
(package
(name "ruby-sorcerer")
(version "2.0.1")
(source
(origin
(method url-fetch)
(uri (rubygems-uri "sorcerer" version))
(sha256
(base32
"0d32ha9pp9slpmsm027pkdpbr9vc5jn2m8rl6hwwx6a87m8cr58h"))))
(build-system ruby-build-system)
(synopsis "Ripper-style abstract syntax tree to Ruby source generator")
(description "Sorcerer generates Ruby code from a Ripper-like abstract
syntax tree (i.e. S-Expressions). Sorcerer is targeted mainly at small
snippets of Ruby code, expressable in a single line. Longer examples may be
re-sourced, but they will be rendered in a single line format.")
(home-page "https://github.com/rspec-given/sorcerer")
(license license:expat)))
(define-public ruby-given-core
(package
(name "ruby-given-core")
(version "3.8.0")
(source
(origin
(method url-fetch)
(uri (rubygems-uri "given_core" version))
(sha256
(base32
"1lzyqllbbv6as3qgwz2007mvy7wy247bgkch9adnmh1zfa73bkrg"))))
(build-system ruby-build-system)
(arguments '(#:tests? #f)) ;no test suite for the core package
(propagated-inputs
`(("ruby-sorcerer" ,ruby-sorcerer)))
(synopsis "Core abstractions used by rspec-given and minitest-given")
(description "Given_core is the basic functionality behind rspec-given and
minitest-given, extensions that allow the use of Given/When/Then terminology
when defining specifications.")
(home-page "https://github.com/rspec-given/rspec-given")
(license license:expat)))
(define-public ruby-rspec-given
(package
(name "ruby-rspec-given")
(version "3.8.0")
(source
(origin
(method url-fetch)
(uri (rubygems-uri "rspec-given" version))
(sha256
(base32
"1783bazja10kbha8hk15khvybsq88siyax02cpkk688604h54nji"))))
(build-system ruby-build-system)
(arguments
`(#:test-target "rs"
#:phases
(modify-phases %standard-phases
(add-after 'unpack 'fix-rakefile
(lambda _
(substitute* '("Rakefile" "rakelib/gemspec.rake")
(("require '\\./lib/given/.*") "")
(("Given::VERSION") (format #f "~s" ,version))
;; Fix the error: "cannot load such file -- example_helper"
(("sh \"rspec")
"sh \"rspec -Ilib:examples"))
#t))
(add-after 'extract-gemspec 'delete-failing-tests
;; See: https://github.com/jimweirich/rspec-given/issues/57.
(lambda _
(substitute* ".gemspec"
(("\"spec/lib/given/natural_assertion_spec.rb\".freeze, ")
"")
(("\"examples/integration/failing_messages_spec.rb\".freeze, ")
""))
(delete-file "spec/lib/given/natural_assertion_spec.rb")
(delete-file "examples/integration/failing_messages_spec.rb")
#t)))))
(native-inputs
`(("ruby-rspec" ,ruby-rspec)
("ruby-minitest" ,ruby-minitest)))
(propagated-inputs
`(("ruby-given-core" ,ruby-given-core)
("ruby-rspec" ,ruby-rspec)))
(synopsis "Given/When/Then for RSpec and Minitest")
(description "Given is an RSpec extension that allows the use of
Given/When/Then terminology when defining specifications, in a way similar to
the Cucumber Gherkin language.")
(home-page "https://github.com/rspec-given/rspec-given")
(license license:expat)))
(define-public ruby-rspec-its
(package
(name "ruby-rspec-its")
(version "1.3.0")
(source
(origin
(method git-fetch)
(uri (git-reference
(url "https://github.com/rspec/rspec-its")
(commit (string-append "v" version))))
(file-name (git-file-name name version))
(sha256
(base32
"02mlsc9d4d1cjj5vahi8v3q8hyn9fyiv8nnlidhgfh186qp20g1p"))))
(build-system ruby-build-system)
(arguments
`(#:test-target "spec"
#:phases
(modify-phases %standard-phases
(add-after 'unpack 'dont-install-gems-from-gemfile
(lambda _
(substitute* "Gemfile"
(("rspec rspec-core rspec-expectations rspec-mocks rspec-support")
""))
#t))
(add-before 'build 'loosen-ffi-requirement
(lambda _
;; Accept any version of ruby-ffi.
(substitute* "Gemfile"
((" gem 'ffi', '~> 1\\.9\\.25'")
" gem 'ffi'"))
#t))
(add-before 'build 'remove-unnecessary-dependency-versions-from-gemfile
(lambda _
(substitute* "rspec-its.gemspec"
(("rake.*") "rake'\n")
(("spec.add_development_dependency 'cucumber'.*")
"spec.add_development_dependency 'cucumber'\n")
(("bundler.*") "bundler'\n")
(("\"aruba.*") "'aruba'\n"))
#t)))))
(propagated-inputs
`(("ruby-rspec-core" ,ruby-rspec-core)
("ruby-rspec-expectations" ,ruby-rspec-expectations)))
(native-inputs
`(("bundler" ,bundler)
("ruby-cucumber" ,ruby-cucumber)
("ruby-ffi" ,ruby-ffi)
("ruby-aruba" ,ruby-aruba)))
(synopsis "RSpec extension that provides the @code{its} method")
(description
"RSpec::Its provides the its method as a short-hand to specify the expected
value of an attribute. For example, one can use @code{its(:size)\\{should
eq(1)\\}}.")
(home-page "https://github.com/rspec/rspec-its")
(license license:expat)))
;;; This variant is used to break a cycle with ruby-protobuf.
(define-public ruby-rspec-its-minimal
(hidden-package
(package
(inherit ruby-rspec-its)
(arguments
(substitute-keyword-arguments (package-arguments ruby-rspec-its)
((#:tests? _ #f) #f)))
(native-inputs '()))))
(define-public ruby-rspec-mocks
(package
(name "ruby-rspec-mocks")
(version "3.8.0")
(source (origin
(method url-fetch)
(uri (rubygems-uri "rspec-mocks" version))
(sha256
(base32
"06y508cjqycb4yfhxmb3nxn0v9xqf17qbd46l1dh4xhncinr4fyp"))))
(build-system ruby-build-system)
(arguments
'(#:tests? #f)) ; avoid dependency cycles
(propagated-inputs
`(("ruby-rspec-support" ,ruby-rspec-support)
("ruby-diff-lcs" ,ruby-diff-lcs)))
(synopsis "RSpec stubbing and mocking library")
(description "Rspec-mocks provides RSpec's \"test double\" framework, with
support for stubbing and mocking.")
(home-page "https://github.com/rspec/rspec-mocks")
(license license:expat)))
(define-public ruby-rspec-mocks-2
(package (inherit ruby-rspec-mocks)
(version "2.14.6")
(source (origin
(method url-fetch)
(uri (rubygems-uri "rspec-mocks" version))
(sha256
(base32
"1fwsmijd6w6cmqyh4ky2nq89jrpzh56hzmndx9wgkmdgfhfakv30"))))
(propagated-inputs
`(("ruby-diff-lcs" ,ruby-diff-lcs)))))
(define-public ruby-rspec-rerun
(package
(name "ruby-rspec-rerun")
(version "1.1.0")
(source
(origin
(method url-fetch)
(uri (rubygems-uri "rspec-rerun" version))
(sha256
(base32
"1gy7znkcaqhpccfnk2nvaqbsvgxy3q57cmjwkl9fi1zabaq5lbkj"))))
(build-system ruby-build-system)
(arguments
'(;; No included tests
#:tests? #f))
(propagated-inputs `(("ruby-rspec" ,ruby-rspec)))
(synopsis "Track failed RSpec tests to re-run them")
(description
"This package provides an automated way to track, and then re-run failed
RSpec tests.")
(home-page "https://github.com/dblock/rspec-rerun")
(license license:expat)))
(define-public ruby-rspec-wait
(package
(name "ruby-rspec-wait")
(version "0.0.9")
(source
(origin
(method url-fetch)
(uri (rubygems-uri "rspec-wait" version))
(sha256
(base32
"0gvj1bp5ccx001dyvcgk2j49s5sl6vs9fdaqqb08z3bd1554hsww"))))
(build-system ruby-build-system)
(arguments
'(#:phases
(modify-phases %standard-phases
(replace 'check
(lambda _
(invoke "rake" "spec"))))))
(native-inputs
`(("bundler" ,bundler)))
(propagated-inputs
`(("ruby-rspec" ,ruby-rspec)))
(home-page "https://github.com/laserlemon/rspec-wait")
(synopsis "Wait for conditions in RSpec")
(description
"RSpec::Wait strives to make it easier to test asynchronous or slow
interactions.")
(license license:expat)))
(define-public ruby-rspec
(package
(name "ruby-rspec")
(version "3.8.0")
(source (origin
(method url-fetch)
(uri (rubygems-uri "rspec" version))
(sha256
(base32
"15ppasvb9qrscwlyjz67ppw1lnxiqnkzx5vkx1bd8x5n3dhikxc3"))))
(build-system ruby-build-system)
(arguments
'(#:tests? #f)) ; avoid dependency cycles
(propagated-inputs
`(("ruby-rspec-core" ,ruby-rspec-core)
("ruby-rspec-mocks" ,ruby-rspec-mocks)
("ruby-rspec-expectations" ,ruby-rspec-expectations)))
(synopsis "Behavior-driven development framework for Ruby")
(description "RSpec is a behavior-driven development (BDD) framework for
Ruby. This meta-package includes the RSpec test runner, along with the
expectations and mocks frameworks.")
(home-page "https://rspec.info/")
(license license:expat)))
(define-public ruby-rspec-2
(package (inherit ruby-rspec)
(version "2.14.1")
(source (origin
(method url-fetch)
(uri (rubygems-uri "rspec" version))
(sha256
(base32
"134y4wzk1prninb5a0bhxgm30kqfzl8dg06af4js5ylnhv2wd7sg"))))
(propagated-inputs
`(("ruby-rspec-core" ,ruby-rspec-core-2)
("ruby-rspec-mocks" ,ruby-rspec-mocks-2)
("ruby-rspec-expectations" ,ruby-rspec-expectations-2)))))
;; Bundler is yet another source of circular dependencies, so we must disable
;; its test suite as well.
(define-public bundler
(package
(name "bundler")
(version "2.1.4")
(source (origin
(method url-fetch)
(uri (rubygems-uri "bundler" version))
(sha256
(base32
"12glbb1357x91fvd004jgkw7ihlkpc9dwr349pd7j83isqhls0ah"))))
(build-system ruby-build-system)
(arguments
'(#:tests? #f)) ; avoid dependency cycles
(synopsis "Ruby gem bundler")
(description "Bundler automatically downloads and installs a list of gems
specified in a \"Gemfile\", as well as their dependencies.")
(home-page "https://bundler.io/")
(license license:expat)))
(define-public ruby-builder
(package
(name "ruby-builder")
(version "3.2.3")
(source (origin
(method url-fetch)
(uri (rubygems-uri "builder" version))
(sha256
(base32
"0qibi5s67lpdv1wgcj66wcymcr04q6j4mzws6a479n0mlrmh5wr1"))))
(build-system ruby-build-system)
(arguments
`(#:phases
(modify-phases %standard-phases
(add-after 'unpack 'do-not-use-rvm
(lambda _
(substitute* "rakelib/tags.rake"
(("RVM_GEMDIR = .*") "RVM_GEMDIR = 'no-rvm-please'\n"))
#t)))))
(synopsis "Ruby library to create structured data")
(description "Builder provides a number of builder objects that make it
easy to create structured data. Currently the following builder objects are
supported: XML Markup and XML Events.")
(home-page "https://github.com/jimweirich/builder")
(license license:expat)))
(define-public ruby-bump
(package
(name "ruby-bump")
(version "0.7.0")
(source
(origin
(method url-fetch)
(uri (rubygems-uri "bump" version))
(sha256
(base32
"1xinbr9rzh6cj75x24niwgqcnbhdxc68a8bc41lk8xv6fd906fym"))))
(build-system ruby-build-system)
(arguments
'(;; No included tests
#:tests? #f))
(synopsis "Tool for working with Rubygems")
(description
"Bump provides commands to manage Rubygem versioning, updating to the
next patch version for example.")
(home-page "https://github.com/gregorym/bump")
(license license:expat)))
(define-public ruby-rjb
(package
(name "ruby-rjb")
(version "1.5.5")
(source (origin
(method url-fetch)
(uri (rubygems-uri "rjb" version))
(sha256
(base32
"1ppj8rbicj3w0nhh7f73mflq19yd7pzdzkh2a91hcvphriy5b0ca"))))
(build-system ruby-build-system)
(arguments
`(#:tests? #f ; no rakefile
#:phases
(modify-phases %standard-phases
(add-before 'build 'set-java-home
(lambda* (#:key inputs #:allow-other-keys)
(setenv "JAVA_HOME" (assoc-ref inputs "jdk"))
#t)))))
(native-inputs
`(("jdk" ,icedtea "jdk")))
(synopsis "Ruby-to-Java bridge using the Java Native Interface")
(description "RJB is a bridge program that connects Ruby and Java via the
Java Native Interface.")
(home-page "https://www.artonx.org/collabo/backyard/?RubyJavaBridge")
(license license:lgpl2.1+)))
(define-public ruby-log4r
(package
(name "ruby-log4r")
(version "1.1.10")
(source
(origin
(method url-fetch)
(uri (rubygems-uri "log4r" version))
(sha256
(base32
"0ri90q0frfmigkirqv5ihyrj59xm8pq5zcmf156cbdv4r4l2jicv"))))
(build-system ruby-build-system)
(arguments
'(#:tests? #f)) ; no Rakefile in gem
(synopsis "Flexible logging library for Ruby")
(description "Comprehensive and flexible logging library written
in Ruby for use in Ruby programs. It features a hierarchical logging
system of any number of levels, custom level names, logger
inheritance, multiple output destinations per log event, execution
tracing, custom formatting, thread safteyness, XML and YAML
configuration, and more.")
(home-page "http://log4r.rubyforge.org/")
(license license:bsd-3)))
(define-public ruby-atoulme-antwrap
(package
(name "ruby-atoulme-antwrap")
(version "0.7.5")
(source (origin
(method url-fetch)
(uri (rubygems-uri "atoulme-Antwrap" version))
(sha256
(base32
"05s3iw44lqa81f8nfy5f0xjj808600h82zb9bsh46b9kcq2w2kmz"))))
(build-system ruby-build-system)
;; Test data required for most of the tests are not included.
(arguments `(#:tests? #f))
(native-inputs
`(("ruby-hoe" ,ruby-hoe)))
(inputs
`(("ruby-rjb" ,ruby-rjb)))
(synopsis "Ruby wrapper for the Ant build tool")
(description "Antwrap is a Ruby module that wraps the Apache Ant build
tool. Antwrap can be used to invoke Ant tasks from a Ruby or a JRuby
script.")
(home-page "http://rubyforge.org/projects/antwrap/")
(license license:expat)))
(define-public ruby-atoulme-saikuro
(package
(name "ruby-atoulme-saikuro")
(version "1.2.1")
(source (origin
(method url-fetch)
(uri (rubygems-uri "atoulme-Saikuro" version))
(sha256
(base32
"0kvd2nsxffbza61d3q4j94wrbnbv50r1zy3a7q26f6k706fw1f19"))))
(build-system ruby-build-system)
;; FIXME: There are no unit tests. The tests are demonstrations of the
;; "saikuro" tool.
(arguments `(#:tests? #f))
(synopsis "Cyclomatic complexity analyzer")
(description "Saikuro is a Ruby cyclomatic complexity analyzer. When
given Ruby source code Saikuro will generate a report listing the cyclomatic
complexity of each method found. In addition, Saikuro counts the number of
lines per method and can generate a listing of the number of tokens on each
line of code.")
(home-page "http://www.github.com/atoulme/Saikuro")
;; File headers contain the BSD-3 license and the README.rdoc says that
;; "Saikuro uses the BSD license", but the LICENSE file contains the text
;; of the Expat license.
(license license:bsd-3)))
(define-public ruby-pandoc-ruby
(package
(name "ruby-pandoc-ruby")
(version "2.1.4")
(source
(origin
(method git-fetch) ;the gem lacks many test files
(uri (git-reference
(url "https://github.com/xwmx/pandoc-ruby")
(commit version)))
(file-name (git-file-name name version))
(sha256
(base32
"03a11clhycyn0jhc7g9davpqd83sn60jqwjy1y145ag9sq6sp935"))))
(build-system ruby-build-system)
(arguments
`(#:phases
(modify-phases %standard-phases
(add-after 'unpack 'disable-failing-tests
;; TODO: Remove this phase after ghc-pandoc gets upgraded to 2.9.2+
;; (see: https://github.com/xwmx/pandoc-ruby/issues/39).
(lambda _
(substitute* "test/test_conversions.rb"
(("next if from == to.*" all)
(string-append
all
" next if ['plain', 'beamer'].include? to\n")))
#t))
(add-after 'unpack 'patch-pandoc-path
(lambda* (#:key inputs #:allow-other-keys)
(let ((pandoc (string-append (assoc-ref inputs "ghc-pandoc")
"/bin/pandoc")))
(substitute* "lib/pandoc-ruby.rb"
(("@@pandoc_path = 'pandoc'")
(format #f "@@pandoc_path = '~a'" pandoc)))
(substitute* "test/test_pandoc_ruby.rb"
(("('|\")pandoc" _ quote)
(string-append quote pandoc))
(("\\^pandoc")
".*pandoc"))
#t)))
(add-after 'extract-gemspec 'remove-Gemfile.lock
(lambda _
(delete-file "Gemfile.lock")
(substitute* "pandoc-ruby.gemspec"
(("Gemfile\\.lock") ""))
#t)))))
(native-inputs
`(("ruby-mocha" ,ruby-mocha)))
(inputs
`(("ghc-pandoc" ,ghc-pandoc)))
(synopsis "Ruby wrapper for Pandoc")
(description "PandocRuby is a wrapper for Pandoc, a Haskell library with
command line tools for converting one markup format to another. Pandoc can
convert documents from a variety of formats including markdown,
reStructuredText, textile, HTML, DocBook, LaTeX, and MediaWiki markup to a
variety of other formats, including markdown, reStructuredText, HTML, LaTeX,
ConTeXt, PDF, RTF, DocBook XML, OpenDocument XML, ODT, GNU Texinfo, MediaWiki
markup, groff man pages, HTML slide shows, EPUB, Microsoft Word docx, and
more.")
(home-page "https://github.com/xwmx/pandoc-ruby")
(license license:expat)))
(define-public ruby-slim
(package
(name "ruby-slim")
(version "4.1.0")
(source
(origin
(method url-fetch)
(uri (rubygems-uri "slim" version))
(sha256
(base32
"0gjx30g84c82qzg32bd7giscvb4206v7mvg56kc839w9wjagn36n"))))
(build-system ruby-build-system)
(arguments
`(#:phases
(modify-phases %standard-phases
;; See: https://github.com/slim-template/slim/issues/857 and
;; https://github.com/slim-template/slim/issues/858.
(add-after 'unpack 'skip-broken-tests
(lambda _
(substitute* "test/core/test_embedded_engines.rb"
(("def test_render_with_markdown")
"def skipped_test_render_with_markdown"))
(substitute* "test/translator/test_translator.rb"
(("raise (\"Missing test for.*)" _ tail)
(string-append "print " tail)))
#t))
;; See: https://salsa.debian.org/ruby-team/ruby-slim/-/commit/
;; 824862bd99d1675bc699d8fc71ba965a785c1f44.
(add-after 'unpack 'prevent-bundler-interference
(lambda _
(substitute* "Rakefile"
(("require 'bundler/setup'") "nil")
(("Bundler::GemHelper\\.install_tasks") "nil"))
#t)))))
(native-inputs
`(("ruby-rack-test" ,ruby-rack-test)
("ruby-sinatra" ,ruby-sinatra)))
(propagated-inputs
`(("ruby-temple" ,ruby-temple)
("ruby-tilt" ,ruby-tilt)))
(synopsis "Minimalist template language for Ruby")
(description "Slim is a template language for Ruby that aims to reduce the
syntax to the minimum while remaining clear.")
(home-page "http://slim-lang.com/")
(license license:expat)))
(define-public ruby-asciidoctor
(package
(name "ruby-asciidoctor")
(version "2.0.10")
(source
(origin
(method git-fetch) ;the gem release lacks a Rakefile
(uri (git-reference
(url "https://github.com/asciidoctor/asciidoctor")
(commit (string-append "v" version))))
(file-name (git-file-name name version))
(sha256
(base32
"0jaxpnsdnx3qyjw5p2lsx1swny12q1i2vxw2kgdp4vlsyjv95z95"))))
(build-system ruby-build-system)
(arguments
`(#:test-target "test:all"
#:phases
(modify-phases %standard-phases
(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* "asciidoctor.gemspec"
(("`git ls-files -z`")
"`find . -type f -print0 |sort -z|cut -zc3-`"))
#t))
(add-after 'extract-gemspec 'strip-version-requirements
(lambda _
(delete-file "Gemfile")
(substitute* "asciidoctor.gemspec"
(("(.*add_.*dependency '[_A-Za-z0-9-]+').*" _ stripped)
(string-append stripped "\n")))
#t)))))
(native-inputs
`(("ruby-erubis" ,ruby-erubis)
("ruby-minitest" ,ruby-minitest)
("ruby-nokogiri" ,ruby-nokogiri)
("ruby-asciimath" ,ruby-asciimath)
("ruby-coderay" ,ruby-coderay)
("ruby-cucumber" ,ruby-cucumber)
("ruby-haml" ,ruby-haml)
("ruby-rouge" ,ruby-rouge)
("ruby-rspec-expectations" ,ruby-rspec-expectations)
("ruby-simplecov" ,ruby-simplecov)
("ruby-slim" ,ruby-slim)
("ruby-tilt" ,ruby-tilt)))
(synopsis "Converter from AsciiDoc content to other formats")
(description "Asciidoctor is a text processor and publishing toolchain for
converting AsciiDoc content to HTML5, DocBook 5 (or 4.5), PDF, and other
formats.")
(home-page "https://asciidoctor.org")
(license license:expat)))
(define-public ruby-prawn-icon
(package
(name "ruby-prawn-icon")
(version "2.5.0")
(source
(origin
(method url-fetch)
(uri (rubygems-uri "prawn-icon" version))
(sha256
(base32
"1ivkdf8rdf92hhy97vbmc2a4w97vcvqd58jcj4z9hz3hfsb1526w"))))
(build-system ruby-build-system)
(arguments
`(#:test-target "spec"
#:phases (modify-phases %standard-phases
(add-after 'unpack 'remove-unnecessary-dependencies
(lambda _
(substitute* '("Rakefile" "spec/spec_helper.rb")
((".*[Bb]undler.*") "")
(("^require 'rubocop.*") "")
(("^RuboCop.*") ""))
#t)))))
(native-inputs
`(("ruby-pdf-inspector" ,ruby-pdf-inspector)
("ruby-pdf-reader" ,ruby-pdf-reader)
("ruby-rspec" ,ruby-rspec)
("ruby-simplecov" ,ruby-simplecov)))
(propagated-inputs
`(("ruby-prawn" ,ruby-prawn)))
(synopsis "Icon fonts for use with the Prawn PDF toolkit")
(description "@code{Prawn::Icon} provides various icon fonts including
FontAwesome, PaymentFont and Foundation Icons for use with the Prawn PDF
toolkit.")
(home-page "https://github.com/jessedoyle/prawn-icon/")
(license %prawn-project-licenses)))
(define-public ruby-css-parser
(package
(name "ruby-css-parser")
(version "1.7.1")
(source
(origin
(method url-fetch)
(uri (rubygems-uri "css_parser" version))
(sha256
(base32
"04c4dl8cm5rjr50k9qa6yl9r05fk9zcb1zxh0y0cdahxlsgcydfw"))))
(build-system ruby-build-system)
(arguments `(#:tests? #f)) ;gem doesn't ship with test suite
(propagated-inputs
`(("ruby-addressable" ,ruby-addressable)))
(synopsis "Ruby Cascading Style Sheets (CSS) parser")
(description "This package allows loading, parsing and cascading Cascading
Style Sheets (CSS) rule sets in Ruby.")
(home-page "https://github.com/premailer/css_parser")
(license license:expat)))
(define-public ruby-prawn-svg
(package
(name "ruby-prawn-svg")
(version "0.30.0")
(source
(origin
(method url-fetch)
(uri (rubygems-uri "prawn-svg" version))
(sha256
(base32
"0df3l49cy3xpwi0b73hmi2ykbjg9kjwrvhk0k3z7qhh5ghmmrn77"))))
(build-system ruby-build-system)
(arguments
`(#:phases (modify-phases %standard-phases
(add-after 'unpack 'do-not-use-bundler
(lambda _
(substitute* "spec/spec_helper.rb"
((".*[Bb]undler.*") ""))
#t))
(replace 'check
(lambda* (#:key tests? #:allow-other-keys)
(when tests?
(invoke "rspec" "-Ilib" "-rprawn-svg"))
#t)))))
(native-inputs
`(("ruby-rspec" ,ruby-rspec)))
(propagated-inputs
`(("ruby-css-parser" ,ruby-css-parser)
("ruby-prawn" ,ruby-prawn)))
(synopsis "SVG renderer for the Prawn PDF library")
(description "This library allows rendering Scalable Vector Graphics (SVG)
graphics directly into a Portable Document Format (PDF) document using the
Prawn module.")
(home-page "https://github.com/mogest/prawn-svg")
(license license:expat)))
(define-public ruby-prawn-templates
(package
(name "ruby-prawn-templates")
(version "0.1.2")
(source
(origin
(method git-fetch)
(uri (git-reference
(url "https://github.com/prawnpdf/prawn-templates.git")
(commit version)))
(file-name (git-file-name name version))
(sha256
(base32
"0wll54wxxwixpwazfn4ffbqvqbfrl01cfsv8y11vnlzy7isx5xvl"))))
(build-system ruby-build-system)
(arguments
`(#:phases (modify-phases %standard-phases
(add-after 'unpack 'do-not-use-bundler
(lambda _
(substitute* "spec/spec_helper.rb"
((".*[Bb]undler.*") ""))
#t))
(replace 'check
(lambda* (#:key tests? #:allow-other-keys)
(when tests?
(invoke "rspec"))
#t)))))
(native-inputs
`(("ruby-pdf-inspector" ,ruby-pdf-inspector)
("ruby-rspec" ,ruby-rspec)))
(propagated-inputs
`(("ruby-pdf-reader" ,ruby-pdf-reader)
("ruby-prawn" ,ruby-prawn)))
(synopsis "Prawn extension to include or combine PDF documents")
(description "This @strong{unmaintained} package provides a Prawn
extension that allows including other Portable Document Format (PDF) documents
as background or combining several PDF documents into one. This functionality
used to be part of Prawn itself, but was extracted from Prawn 0.15.0 because
of its many longstanding issues.")
(home-page "https://github.com/prawnpdf/prawn-templates")
(license %prawn-project-licenses)))
(define-public ruby-polyglot
(package
(name "ruby-polyglot")
(version "0.3.5")
(source
(origin
(method url-fetch)
(uri (rubygems-uri "polyglot" version))
(sha256
(base32
"1bqnxwyip623d8pr29rg6m8r0hdg08fpr2yb74f46rn1wgsnxmjr"))))
(build-system ruby-build-system)
(arguments `(#:tests? #f)) ;no test suite
(synopsis "Augment @code{require} to load non-Ruby file types")
(description "The Polyglot library allows a Ruby module to register a
loader for the file type associated with a filename extension, and it augments
@code{require} to find and load matching files.")
(home-page "https://github.com/cjheath/polyglot")
(license license:expat)))
(define-public ruby-treetop
(package
(name "ruby-treetop")
(version "1.6.10")
(source
(origin
(method git-fetch) ;no test suite in distributed gem
(uri (git-reference
(url "https://github.com/cjheath/treetop.git")
(commit (string-append "v" version))))
(file-name (git-file-name name version))
(sha256
(base32
"1dmk94z6ivhrz5hsq68vl5vgydhkz89n394rha1ymddw3rymbfcv"))))
(build-system ruby-build-system)
(arguments
`(#:test-target "spec"
#:phases
(modify-phases %standard-phases
(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* "treetop.gemspec"
(("`git ls-files -z`")
"`find . -type f -print0 |sort -z|cut -zc3-`"))
#t)))))
(native-inputs
`(("ruby-activesupport" ,ruby-activesupport)
("ruby-rr" ,ruby-rr)
("ruby-rspec" ,ruby-rspec)))
(propagated-inputs
`(("ruby-polyglot" ,ruby-polyglot)))
(synopsis "Ruby-based parsing DSL based on parsing expression grammars")
(description "This package provides a Ruby-based Parsing Expression
Grammar (PEG) parser generator Domain Specific Language (DSL).")
(home-page "https://github.com/cjheath/treetop")
(license license:expat)))
(define-public ruby-rubocop-performance
(package
(name "ruby-rubocop-performance")
(version "1.7.1")
(source
(origin
(method url-fetch)
(uri (rubygems-uri "rubocop-performance" version))
(sha256
(base32
"04r8d4x62ygv17spvz9yyfxbmbf8qxwhijs0xycfvzr0q4pyg9sw"))))
(build-system ruby-build-system)
(arguments
`(#:tests? #f)) ;no test suite in the distributed gem
(propagated-inputs
`(("ruby-rubocop" ,ruby-rubocop)))
(synopsis "Performance optimizations checkers for Ruby code")
(description "This package provides a collection of RuboCop cops to check
for performance optimizations in Ruby code.")
(home-page "https://docs.rubocop.org/rubocop-performance/")
(license license:expat)))
(define-public ruby-gimme
(let ((revision "1")
(commit "4e71f0236f1271871916dd403261d26533db34c0"))
(package
(name "ruby-gimme")
(version (git-version "0.5.0" revision commit))
(source
(origin
(method git-fetch)
(uri (git-reference
(url "https://github.com/searls/gimme.git")
(commit commit)))
(file-name (git-file-name name version))
(sha256
(base32
"0hrd32ygvf3i7h47ak8f623cz8ns9q7g60nnnvvlnywbggjaz3h6"))))
(build-system ruby-build-system)
(native-inputs
`(("ruby-coveralls" ,ruby-coveralls)
("ruby-cucumber" ,ruby-cucumber)
("ruby-pry" ,ruby-pry)
("ruby-simplecov" ,ruby-simplecov)
("ruby-rspec-given" ,ruby-rspec-given)))
(arguments
`(;; The cucumber task fails with error: "index 3 out of matches
;; (IndexError)", apparently due to our newer Cucumber version.
;; TODO: Try the "default" task with a future release.
#:test-target "spec"
#:phases
(modify-phases %standard-phases
(add-after 'extract-gemspec 'prepare-for-tests
(lambda _
;; Delete failing tests (possibly due to our newer rspec
;; version).
(delete-file "spec/gimme/gives_class_methods_spec.rb")
(delete-file "spec/gimme/rspec_adapter_spec.rb")
(delete-file "spec/gimme/verifies_class_methods_spec.rb")
;; Fix duplicate version requirements and de-register files.
(delete-file "Gemfile")
(delete-file "Gemfile.lock")
(substitute* "gimme.gemspec"
((".*\"Gemfile\".*") "")
((".*\"Gemfile\\.lock\",.*") "")
((".*(rspec|cucumber).*\">= 0\".*") "")
(("\"spec/gimme/gives_class_methods_spec.rb\",") "")
(("\"spec/gimme/rspec_adapter_spec.rb\",") "")
(("\"spec/gimme/verifies_class_methods_spec.rb\",") "")
;; All of these gems relate to development, and are
;; unnecessary when running the tests.
((".*(add|gem).*guard-.*") "")
((".*(add|gem).*jeweler.*") "")
((".*(add|gem).*pry.*") "")
((".*(add|gem).*growl.*") "")
((".*(add|gem).*rb-fsevent.*") ""))
#t)))))
(synopsis "Lightweight test double library for Ruby")
(description "Gimme is a very lightweight test double library for Ruby,
based on Mockito (a mocking framework for Java). It is an opinionated (but
not noisy) means to facilitate test-driving by enabling the authors to specify
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-chunky-png
;; There hasn't been a release since 2018/11/21 and there are test failures
;; in that release, so use the latest commit.
(let ((revision "1")
(commit "143b9cd1412e49edd4f8b661c7cd9b22941f43c0"))
(package
(name "ruby-chunky-png")
(version (git-version "1.3.11" revision commit))
(source
(origin
(method git-fetch)
(uri (git-reference
(url "https://github.com/wvanbergen/chunky_png.git")
(commit commit)))
(file-name (git-file-name name version))
(sha256
(base32
"0wbcgfzymbpmmxsb04arc49a2icki6f2fc6d6sqgg8369mc67g9z"))))
(build-system ruby-build-system)
(arguments
`(#:test-target "spec"
#:phases
(modify-phases %standard-phases
(add-after 'unpack 'disable-bundler
(lambda _
(substitute* (find-files "." "\\.rb$")
(("require.*bundler/setup.*") ""))
#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* "chunky_png.gemspec"
(("`git ls-files`")
"`find . -type f -not -regex '.*\\.gem$' |sort |cut -c3-`"))
#t)))))
(native-inputs
`(("bundler" ,bundler)
("ruby-rspec" ,ruby-rspec)
("ruby-standard" ,ruby-standard)
("ruby-yard" ,ruby-yard)))
(synopsis "Ruby library to handle PNG images")
(description "ChunkyPNG is a pure Ruby library that can read and write
Portable Network Graphics (PNG) images without depending on an external image
library. It tries to be memory efficient and reasonably fast. It has
features such as:
@itemize
@item
Decoding support for any image that the PNG standard allows. This includes all
standard color modes, all bit depths, all transparency, and interlacing and
filtering options.
@item
Encoding support for images of all color modes (true color, grayscale, and
indexed) and transparency for all these color modes. The best color mode is
chosen automatically, based on the amount of used colors.
@item Read/write access to the image's pixels.
@item Read/write access to all image metadata that is stored in chunks.
@item
Memory efficiency: @code{fixnum} are used, i.e. 4 or 8 bytes of memory per
pixel, depending on the hardware).
@item
Performance: ChunkyPNG is reasonably fast for Ruby standards, by only using
integer math and a highly optimized saving routine.
@item Interoperability with RMagick.
@end itemize")
(home-page "https://github.com/wvanbergen/chunky_png/wiki")
(license license:expat))))
(define-public ruby-text-hyphen
(package
(name "ruby-text-hyphen")
(version "1.4.1")
(source
(origin
(method url-fetch)
(uri (rubygems-uri "text-hyphen" version))
(sha256
(base32
"1gj4awvs9ryf960m0iawg43jyjmfwcqgfwrbcfp890a57b9ag7q1"))))
(build-system ruby-build-system)
(native-inputs
`(("ruby-hoe" ,ruby-hoe)))
(synopsis "Ruby library to hyphenate words in various languages")
(description "Text::Hyphen is a Ruby library to hyphenate words in various
languages using Ruby-fied versions of TeX hyphenation patterns. It will
properly hyphenate various words according to the rules of the language the
word is written in. The algorithm is based on that of the TeX typesetting
system by Donald E. Knuth.")
(home-page "https://github.com/halostatue/text-hyphen")
;; The whole is licensed under the Expat license, but parts use various
;; versions of the LaTeX Project Public License.
(license license:expat)))
(define-public ruby-open-uri-cached
(package
(name "ruby-open-uri-cached")
(version "0.0.5")
(source
(origin
(method url-fetch)
(uri (rubygems-uri "open-uri-cached" version))
(sha256
(base32
"13xy2vhrgz9mdxhklw5fszhamsdxh8ysf3l40g92hqm4hm288wap"))))
(build-system ruby-build-system)
(arguments
`(#:tests? #f)) ;no test suite
(synopsis "OpenURI with transparent disk caching")
(description "OpenURI with transparent disk caching, which is
useful to avoid making excessive queries, for example when scraping
web pages.")
(home-page "https://github.com/tigris/open-uri-cached")
(license license:expat)))
(define-public ruby-asciidoctor-pdf
;; Use the latest commit, as the last tag doesn't build with the
;; latest Ruby dependencies in Guix.
(let ((revision "1")
(commit "d257440df895d1595a3825ef58b32e4b290ba1c3"))
(package
(name "ruby-asciidoctor-pdf")
(version (git-version "1.5.3" revision commit))
(source
(origin
(method git-fetch) ;no test suite in the distributed gem
(uri (git-reference
(url "https://github.com/asciidoctor/asciidoctor-pdf.git")
(commit commit)))
(file-name (git-file-name name version))
(sha256
(base32
"1563d11ghzsrsg4inwfwj6b9hb5sk5b429f49fwq5qg3sq76kgjj"))))
(build-system ruby-build-system)
(arguments
`(#:test-target "spec"
#:phases
(modify-phases %standard-phases
(add-after 'unpack 'remove-failing-tests
;; Two tests module fail for unknown reasons, *only* when
;; ran in the build container (see:
;; https://github.com/asciidoctor/asciidoctor-pdf/issues/1725#issuecomment-658777965).
(lambda _
(delete-file "spec/audio_spec.rb")
(delete-file "spec/video_spec.rb")
#t))
(add-after 'extract-gemspec 'strip-version-requirements
(lambda _
(substitute* "asciidoctor-pdf.gemspec"
(("(.*add_.*dependency '[_A-Za-z0-9-]+').*" _ stripped)
(string-append stripped "\n")))
#t))
(replace 'replace-git-ls-files
;; TODO: Remove after the fix of using 'cut' to better mimic the
;; git ls-files output is merged in ruby-build-system.
(lambda _
(substitute* "asciidoctor-pdf.gemspec"
(("`git ls-files -z`")
"`find . -type f -not -regex '.*\\.gem$' -print0 \
|sort -z|cut -zc3-`"))
#t))
;; The tests rely on the Gem being installed, so move the check phase
;; after the install phase.
(delete 'check)
(add-after 'install 'check
(lambda* (#:key outputs tests? #:allow-other-keys)
(let ((new-gem (string-append (assoc-ref outputs "out")
"/lib/ruby/vendor_ruby")))
(setenv "GEM_PATH"
(string-append (getenv "GEM_PATH") ":" new-gem))
(when tests?
(invoke "rspec" "-t" "~visual" "-t" "~cli" "-t" "~network"))
#t))))))
(native-inputs
`(("ruby-chunky-png" ,ruby-chunky-png)
("ruby-coderay" ,ruby-coderay)
("ruby-pdf-inspector" ,ruby-pdf-inspector)
("ruby-rouge" ,ruby-rouge)
("ruby-rspec" ,ruby-rspec)))
(propagated-inputs
`(("ruby-asciidoctor" ,ruby-asciidoctor)
("ruby-concurrent-ruby" ,ruby-concurrent)
("ruby-open-uri-cached" ,ruby-open-uri-cached)
("ruby-prawn" ,ruby-prawn)
("ruby-prawn-icon" ,ruby-prawn-icon)
("ruby-prawn-svg" ,ruby-prawn-svg)
("ruby-prawn-table" ,ruby-prawn-table)
("ruby-prawn-templates" ,ruby-prawn-templates)
("ruby-safe-yaml" ,ruby-safe-yaml)
("ruby-text-hyphen" ,ruby-text-hyphen)
("ruby-thread-safe" ,ruby-thread-safe)
("ruby-treetop" ,ruby-treetop)
("ruby-ttfunk" ,ruby-ttfunk)))
(synopsis"AsciiDoc to Portable Document Format (PDF)} converter")
(description "Asciidoctor PDF is an extension for Asciidoctor that
converts AsciiDoc documents to Portable Document Format (PDF) using the Prawn
PDF library. It has features such as:
@itemize
@item Direct AsciiDoc to PDF conversion
@item Configuration-driven theme (style and layout)
@item Scalable Vector Graphics (SVG) support
@item PDF document outline (i.e., bookmarks)
@item Table of contents page(s)
@item Document metadata (title, authors, subject, keywords, etc.)
@item Internal cross reference links
@item Syntax highlighting with Rouge, Pygments, or CodeRay
@item Page numbering
@item Customizable running content (header and footer)
@item
“Keep together” blocks (i.e., page breaks avoided in certain block content)
@item Orphaned section titles avoided
@item Autofit verbatim blocks (as permitted by base_font_size_min setting)
@item Table border settings honored
@item Font-based icons
@item Custom TrueType (TTF) fonts
@item Double-sided printing mode (margins alternate on recto and verso pages)
@end itemize")
(home-page "https://asciidoctor.org/docs/asciidoctor-pdf")
(license license:expat))))
(define-public ruby-ast
(package
(name "ruby-ast")
(version "2.4.1")
(source
(origin
(method git-fetch) ;no test included in gem from v2.4.1
(uri (git-reference
(url "https://github.com/whitequark/ast")
(commit (string-append "v" version))))
(file-name (git-file-name name version))
(sha256
(base32
"0k8vya256chimy473g818gim06m5rjgh6mz5sc5g8xz3csh3rysi"))))
(build-system ruby-build-system)
(arguments
'(#:phases
(modify-phases %standard-phases
(add-after 'unpack 'remove-coveralls-requirement
(lambda _
(substitute* "test/helper.rb"
(("require 'coveralls'") "")
(("Coveralls::SimpleCov::Formatter") ""))
#t))
(add-after 'extract-gemspec 'remove-unnecessary-requirements
(lambda _
(substitute* "ast.gemspec"
((".*coveralls.*") "\n")
(("%q<rest-client>.*") "%q<rest-client>.freeze, [\">= 0\"])\n")
(("%q<mime-types>.*") "%q<mime-types>.freeze, [\">= 0\"])\n")
(("%q<rake>.*") "%q<rake>.freeze, [\">= 0\"])\n"))
#t)))))
(native-inputs
`(("bundler" ,bundler)
("ruby-simplecov" ,ruby-simplecov)
("ruby-json-pure" ,ruby-json-pure)
("ruby-mime-times" ,ruby-mime-types)
("ruby-yard" ,ruby-yard)
("ruby-kramdown" ,ruby-kramdown)
("ruby-rest-client" ,ruby-rest-client)
("ruby-bacon" ,ruby-bacon)
("ruby-bacon-colored-output" ,ruby-bacon-colored-output)
("ruby-racc" ,ruby-racc)))
(synopsis "Library for working with Abstract Syntax Trees")
(description
"@code{ast} is a Ruby library for working with Abstract Syntax Trees.
It does this through immutable data structures.")
(home-page "https://whitequark.github.io/ast/")
(license license:expat)))
(define-public ruby-sporkmonger-rack-mount
;; Testing the addressable gem requires a newer commit than that released, so
;; use an up to date version.
(let ((revision "1")
(commit "076aa2c47d9a4c081f1e9bcb56a826a9e72bd5c3"))
(package
(name "ruby-sporkmonger-rack-mount")
(version (git-version "0.8.3" revision commit))
(source (origin
(method git-fetch)
(uri (git-reference
(url "https://github.com/sporkmonger/rack-mount")
(commit commit)))
(file-name (git-file-name name version))
(sha256
(base32
"1scx273g3xd93424x9lxc4zyvcp2niknbw5mkz6wkivpf7xsyxdq"))))
(build-system ruby-build-system)
(arguments
;; Tests currently fail so disable them.
;; https://github.com/sporkmonger/rack-mount/pull/1
`(#:tests? #f))
(propagated-inputs `(("ruby-rack" ,ruby-rack)))
(synopsis "Stackable dynamic tree based Rack router")
(description
"@code{Rack::Mount} supports Rack's @code{X-Cascade} convention to
continue trying routes if the response returns pass. This allows multiple
routes to be nested or stacked on top of each other.")
(home-page "https://github.com/sporkmonger/rack-mount")
(license license:expat))))
(define-public ruby-ci-reporter
(package
(name "ruby-ci-reporter")
(version "2.0.0")
(source (origin
(method url-fetch)
(uri (rubygems-uri "ci_reporter" version))
(sha256
(base32
"17fm20jmw3ajdryhkkxpjahcfx7bgswqzxrskivlkns2718ayyyg"))))
(build-system ruby-build-system)
(arguments
`(#:test-target "rspec"))
(propagated-inputs
`(("ruby-builder" ,ruby-builder)))
(native-inputs
`(("bundler" ,bundler)
("ruby-rspec" ,ruby-rspec)))
(synopsis "Generate XML reports of runs test")
(description
"@code{CI::Reporter} is an add-on to Ruby testing frameworks that allows
you to generate XML reports of your test runs. The resulting files can be
read by a continuous integration system that understands Ant's JUnit report
format.")
(home-page "https://github.com/nicksieger/ci_reporter")
(license license:expat)))
(define-public ruby-contracts
(package
(name "ruby-contracts")
(version "0.16.0")
(source
(origin
(method url-fetch)
(uri (rubygems-uri "contracts" version))
(sha256
(base32
"119f5p1n6r5svbx8h09za6a4vrsnj5i1pzr9cqdn9hj3wrxvyl3a"))))
(build-system ruby-build-system)
(arguments
'(#:test-target "spec"
#:phases
(modify-phases %standard-phases
;; Don't run or require rubocop, the code linting tool, as this is a
;; bit unnecessary.
(add-after 'unpack 'dont-run-rubocop
(lambda _
(substitute* "Rakefile"
((".*rubocop.*") "")
((".*RuboCop.*") ""))
#t)))))
(native-inputs
`(("ruby-rspec" ,ruby-rspec)))
(synopsis "Method contracts for Ruby")
(description
"This library provides contracts for Ruby. A contract describes the
correct inputs and output for a method, and will raise an error if a incorrect
value is found.")
(home-page "https://github.com/egonSchiele/contracts.ruby")
(license license:bsd-2)))
(define-public ruby-crack
(package
(name "ruby-crack")
(version "0.4.3")
(source
(origin
(method url-fetch)
(uri (rubygems-uri "crack" version))
(sha256
(base32
"0abb0fvgw00akyik1zxnq7yv391va148151qxdghnzngv66bl62k"))))
(build-system ruby-build-system)
(arguments
`(#:phases
(modify-phases %standard-phases
(replace 'check
(lambda* (#:key tests? #:allow-other-keys)
(when tests?
(for-each (lambda (file)
(display file)(display "\n")
(invoke "ruby" "-Ilib" "-Itest" "-rrubygems" file))
(find-files "test" ".*rb$")))
#t)))))
(propagated-inputs
`(("ruby-safe-yaml" ,ruby-safe-yaml)))
(synopsis "Simple JSON and XML parsing for Ruby")
(description
"@code{crack} provides really simple JSON and XML parsing, extracted from
code in Merb and Rails.")
(home-page "https://github.com/jnunemaker/crack")
(license license:expat)))
(define-public ruby-cliver
(package
(name "ruby-cliver")
(version "0.3.2")
(source
(origin
(method url-fetch)
(uri (rubygems-uri "cliver" version))
(sha256
(base32
"096f4rj7virwvqxhkavy0v55rax10r4jqf8cymbvn4n631948xc7"))))
(build-system ruby-build-system)
(arguments
'(#:phases
(modify-phases %standard-phases
;; Avoid a incompatibility between rspec@2 and rake. Using rspec@3
;; would be nice, but the tests look to be incompatible:
;;
;; NoMethodError: undefined method `last_comment'
(replace 'check
(lambda* (#:key tests? #:allow-other-keys)
(when tests?
(invoke "rspec"))
#t)))))
(native-inputs
`(("bundler" ,bundler)
("ruby-rspec" ,ruby-rspec-2)))
(synopsis "Assertions for command-line dependencies in Ruby")
(description
"@code{cliver} provides a way to detect missing command-line
dependencies, including versions.")
(home-page "https://github.com/yaauie/cliver")
(license license:expat)))
(define-public ruby-czmq-ffi-gen
(package
(name "ruby-czmq-ffi-gen")
(version "0.13.0")
(source
(origin
(method url-fetch)
(uri (rubygems-uri "czmq-ffi-gen" version))
(sha256
(base32
"1yf719dmf4mwks1hqdsy6i5kzfvlsha69sfnhb2fr2cgk2snbys3"))))
(build-system ruby-build-system)
(arguments
'(#:tests? #f ;; Tests are not included in the release on rubygems.org
#:phases
(modify-phases %standard-phases
(add-after 'unpack 'patch-lib_dirs
(lambda* (#:key inputs #:allow-other-keys)
(substitute* "lib/czmq-ffi-gen/czmq/ffi.rb"
(("lib\\_dirs = \\[.*\\]")
(string-append "lib_dirs = ['"
(assoc-ref inputs "czmq") "/lib"
"']")))
(substitute* "lib/czmq-ffi-gen/libzmq.rb"
(("lib\\_dirs = \\[.*\\]")
(string-append "lib_dirs = ['"
(assoc-ref inputs "zeromq") "/lib"
"']"))))))))
(inputs
`(("zeromq" ,zeromq)
("czmq" ,czmq)))
(propagated-inputs `(("ruby-ffi" ,ruby-ffi)))
(synopsis "Low-level Ruby bindings for CZMQ (generated using zproject)")
(description
"These Ruby bindings are not intended to be directly used, but rather
used by higher level bindings like those provided by CZTop.")
(home-page
"https://github.com/paddor/czmq-ffi-gen")
(license license:isc)))
(define-public ruby-cztop
(package
(name "ruby-cztop")
(version "0.12.2")
(source
(origin
(method url-fetch)
(uri (rubygems-uri "cztop" version))
(sha256
(base32
"0yqbpaiw5d7f271d73lyrsh8xpx6n4zi6xqwfgi00dacxrq3s3fa"))))
(build-system ruby-build-system)
(arguments
'(#:test-target "spec"
#:phases
(modify-phases %standard-phases
(add-after 'unpack 'patch-lib_paths
(lambda* (#:key inputs #:allow-other-keys)
(substitute* "lib/cztop/poller/zmq.rb"
(("lib\\_paths = \\[.*\\]")
(string-append "lib_paths = ['"
(assoc-ref inputs "zeromq") "/lib"
"']"))))))))
(native-inputs
`(("bundler" ,bundler)
("ruby-rspec" ,ruby-rspec)))
(inputs
`(("zeromq" ,zeromq)))
(propagated-inputs
`(("ruby-czmq-ffi-gen" ,ruby-czmq-ffi-gen)))
(synopsis "CZMQ Ruby bindings")
(description
"CZMQ Ruby bindings, based on the generated low-level FFI bindings of
CZMQ. The focus of of CZTop is on being easy to use and providing first class
support for security mechanisms.")
(home-page "https://github.com/paddor/cztop")
(license license:isc)))
(define-public ruby-saikuro-treemap
(package
(name "ruby-saikuro-treemap")
(version "0.2.0")
(source (origin
(method url-fetch)
(uri (rubygems-uri "saikuro_treemap" version))
(sha256
(base32
"0w70nmh43mwfbpq20iindl61siqqr8acmf7p3m7n5ipd61c24950"))))
(build-system ruby-build-system)
;; Some of the tests fail because the generated JSON has keys in a
;; different order. This is a problem with the test suite rather than any
;; of the involved libraries.
(arguments `(#:tests? #f))
(propagated-inputs
`(("ruby-json-pure" ,ruby-json-pure)
("ruby-atoulme-saikuro" ,ruby-atoulme-saikuro)))
(synopsis "Generate complexity treemap based on saikuro analysis")
(description
"This gem generates a treemap showing the complexity of Ruby code on
which it is run. It uses Saikuro under the covers to analyze Ruby code
complexity.")
(home-page "https://github.com/ThoughtWorksStudios/saikuro_treemap")
(license license:expat)))
(define-public ruby-oauth2
(package
(name "ruby-oauth2")
(version "1.4.2")
(source
(origin
(method url-fetch)
(uri (rubygems-uri "oauth2" version))
(sha256
(base32 "15i9z4j5pcjkr30lkcd79xzbr4kpmy0bqgwa436fqyqk646fv036"))))
(build-system ruby-build-system)
(arguments
'(#:tests? #f)) ; no included tests
(propagated-inputs
`(("ruby-faraday" ,ruby-faraday)
("ruby-jwt" ,ruby-jwt)
("ruby-multi-json" ,ruby-multi-json)
("ruby-multi-xml" ,ruby-multi-xml)
("ruby-rack" ,ruby-rack)))
(synopsis "Ruby wrapper for the OAuth 2.0")
(description
"This package provides a Ruby wrapper for the OAuth 2.0 protocol built
with a similar style to the original OAuth spec.")
(home-page "https://github.com/oauth-xx/oauth2")
(license license:expat)))
(define-public ruby-omniauth
(package
(name "ruby-omniauth")
(version "1.9.1")
(source
(origin
(method url-fetch)
(uri (rubygems-uri "omniauth" version))
(sha256
(base32 "002vi9gwamkmhf0dsj2im1d47xw2n1jfhnzl18shxf3ampkqfmyz"))))
(build-system ruby-build-system)
(arguments
'(#:tests? #f)) ; No included tests
(propagated-inputs
`(("ruby-hashie" ,ruby-hashie)
("ruby-rack" ,ruby-rack)))
(synopsis "Generalized Rack framework for multiple-provider authentication")
(description
"This package provides a generalized Rack framework for multiple-provider
authentication.")
(home-page "https://github.com/omniauth/omniauth")
(license license:expat)))
(define-public ruby-omniauth-oauth2
(package
(name "ruby-omniauth-oauth2")
(version "1.6.0")
(source
(origin
(method url-fetch)
(uri (rubygems-uri "omniauth-oauth2" version))
(sha256
(base32
"11mi36l9d97r77q99jnafdc1yaa0a9wahhpp7dj7ank8q52g7g79"))))
(build-system ruby-build-system)
(arguments
'(#:phases
(modify-phases %standard-phases
(add-after 'unpack 'remove-unnecessary-dependencies
(lambda _
;; The coveralls gem submits coverage information to an online
;; service, and is unnecessary when running the tests
(substitute* "Gemfile"
((".*coveralls\"") ""))
(substitute* "spec/helper.rb"
(("require \"coveralls\"") "")
(("Coveralls::SimpleCov::Formatter") ""))
#t)))))
(propagated-inputs
`(("ruby-oauth2" ,ruby-oauth2)
("ruby-omniauth" ,ruby-omniauth)))
(native-inputs
`(("bundler" ,bundler)
("ruby-rspec" ,ruby-rspec)
("ruby-simplecov" ,ruby-simplecov)
("ruby-rack-test" ,ruby-rack-test)
("ruby-webmock" ,ruby-webmock-2)))
(synopsis "Abstract OAuth2 strategy for OmniAuth")
(description
"This library provides a generic OAuth2 strategy for OmniAuth. It
doesn't provide a way to gather user information, so should be used as a
building block for authentication strategies.")
(home-page "https://github.com/omniauth/omniauth-oauth2")
(license license:expat)))
(define-public ruby-open4
(package
(name "ruby-open4")
(version "1.3.4")
(source
(origin
(method url-fetch)
(uri (rubygems-uri "open4" version))
(sha256
(base32
"1cgls3f9dlrpil846q0w7h66vsc33jqn84nql4gcqkk221rh7px1"))))
(build-system ruby-build-system)
(arguments
'(#:phases
(modify-phases %standard-phases
(add-after 'unpack 'patch
(lambda _
(substitute* "rakefile"
;; Update the Rakefile so it works
(("-rubygems") "-rrubygems")
(("Config") "RbConfig"))
#t))
(add-before 'check 'set-LIB
(lambda _
;; This is used in the rakefile when running the tests
(setenv "LIB" "open4")
#t)))))
(synopsis "Open child processes from Ruby and manage them easily")
(description
"@code{Open4} is a Ruby library to run child processes and manage their
input and output.")
(home-page "https://github.com/ahoward/open4")
(license license:ruby)))
(define-public ruby-options
(package
(name "ruby-options")
(version "2.3.2")
(source
(origin
(method url-fetch)
(uri (rubygems-uri "options" version))
(sha256
(base32
"1s650nwnabx66w584m1cyw82icyym6hv5kzfsbp38cinkr5klh9j"))))
(build-system ruby-build-system)
(arguments
'(#:tests? #f ;; TODO: NameError: uninitialized constant Config
#:phases
(modify-phases %standard-phases
(add-before 'check 'set-LIB
(lambda _
;; This is used in the Rakefile, and setting it avoids an issue
;; with running the tests.
(setenv "LIB" "options")
#t)))))
(synopsis "Ruby library to parse options from *args cleanly")
(description
"The @code{options} library helps with parsing keyword options in Ruby
functions.")
(home-page "https://github.com/ahoward/options")
(license license:ruby)))
(define-public ruby-erubi
(package
(name "ruby-erubi")
(version "1.8.0")
(source
(origin
(method url-fetch)
(uri (rubygems-uri "erubi" version))
(sha256
(base32
"1kagnf6ziahj0d781s6ryy6fwqwa3ad4xbzzj84p9m4nv4c2jir1"))))
(build-system ruby-build-system)
(synopsis "ERB template engine for Ruby")
(description
"Erubi is a ERB template engine for Ruby. It is a simplified fork of
Erubis")
(home-page "https://github.com/jeremyevans/erubi")
(license license:expat)))
(define-public ruby-erubis
(package
(name "ruby-erubis")
(version "2.7.0")
(source
(origin
(method url-fetch)
(uri (rubygems-uri "erubis" version))
(sha256
(base32
"1fj827xqjs91yqsydf0zmfyw9p4l2jz5yikg3mppz6d7fi8kyrb3"))))
(build-system ruby-build-system)
(arguments
'(#:tests? #f)) ; tests do not run properly with Ruby 2.0
(synopsis "Implementation of embedded Ruby (eRuby)")
(description
"Erubis is a fast implementation of embedded Ruby (eRuby) with several
features such as multi-language support, auto escaping, auto trimming spaces
around @code{<% %>}, a changeable embedded pattern, and Ruby on Rails
support.")
(home-page "http://www.kuwata-lab.com/erubis/")
(license license:expat)))
(define-public ruby-execjs
(package
(name "ruby-execjs")
(version "2.7.0")
(source
(origin
;; fetch from github as the gem does not contain testing code
(method git-fetch)
(uri (git-reference
(url "https://github.com/rails/execjs")
(commit (string-append "v" version))))
(file-name (git-file-name name version))
(sha256
(base32
"0c0vd2mmqq3ar4plbwi2wsbr31vn4h45i19r5km66skydnnbp1y6"))))
(build-system ruby-build-system)
(native-inputs
`(("bundler" ,bundler)
;; The test suite tests all the available backends. Currenly, this just
;; means the node backend.
;;
;; PASSED: test:node
;; SKIPPED: test:duktape, ;; test:javascriptcore, test:jscript,
;; test:miniracer, test:rubyracer, ;; test:rubyrhino, test:v8
("node" ,node)))
(synopsis "Run JavaScript code from Ruby")
(description
"ExecJS lets you run JavaScript code from Ruby. It automatically picks a
runtime to evaluate your JavaScript program, then returns the result to you as
a Ruby object.")
(home-page "https://github.com/rails/execjs")
(license license:expat)))
(define-public ruby-fakefs
(package
(name "ruby-fakefs")
(version "1.2.2")
(home-page "https://github.com/fakefs/fakefs")
(source (origin
;; The Rubygems release does not contain tests.
(method git-fetch)
(uri (git-reference
(url home-page)
(commit (string-append "v" version))))
(file-name (git-file-name name version))
(sha256
(base32
"008dq9knyip2bfbl0mrk8b8r7bv0k3bf128wcfqsgy1rqal4mgwk"))))
(build-system ruby-build-system)
(arguments
'(#:phases (modify-phases %standard-phases
(replace 'replace-git-ls-files
(lambda _
(substitute* "fakefs.gemspec"
(("`git ls-files lib README.md LICENSE`")
"`find lib README.md LICENSE -type f | sort`"))
#t))
(add-before 'check 'remove-version-constraints
(lambda _
;; Drop hard version requirements for test dependencies.
(substitute* "fakefs.gemspec"
(("(.*add_development_dependency .*), .*" _ dep)
(string-append dep "\n")))
#t)))))
(native-inputs
`(("ruby-bump" ,ruby-bump)
("ruby-maxitest" ,ruby-maxitest)
("ruby-rubocop" ,ruby-rubocop)
("ruby-rspec" ,ruby-rspec)))
(synopsis "Fake file system for Ruby")
(description
"This package provides a fake file system for use in test suites. It
avoids the need for manually creating temporary directories, or dealing
with platform intricacies in @code{File} and @code{FileUtils}.")
(license license:expat)))
(define-public ruby-orderedhash
(package
(name "ruby-orderedhash")
(version "0.0.6")
(source (origin
(method url-fetch)
(uri (rubygems-uri "orderedhash" version))
(sha256
(base32
"0fryy7f9jbpx33jq5m402yqj01zcg563k9fsxlqbhmq638p4bzd7"))))
(build-system ruby-build-system)
(arguments
'(#:tests? #f)) ; no test suite
(synopsis "Ruby library providing an order-preserving hash")
(description "Orderedhash is a Ruby library providing a hash
implementation that preserves the order of items and features some array-like
extensions.")
(home-page "http://codeforpeople.com/lib/ruby/orderedhash/")
(license license:public-domain)))
(define-public ruby-libxml
(package
(name "ruby-libxml")
(version "3.0.0")
(source
(origin
(method url-fetch)
(uri (rubygems-uri "libxml-ruby" version))
(sha256
(base32
"0xy8wmjwjcnv36zi042678ncjzpxvy351ccbv7mzkns2n3kxfp54"))))
(build-system ruby-build-system)
(inputs
`(("zlib" ,zlib)
("libxml2" ,libxml2)))
(arguments
'(#:tests? #f ; test suite hangs for unknown reason
#:gem-flags
(list "--"
(string-append "--with-xml2-include="
(assoc-ref %build-inputs "libxml2")
"/include/libxml2" ))))
(synopsis "Ruby bindings for GNOME Libxml2")
(description "The Libxml-Ruby project provides Ruby language bindings for
the GNOME Libxml2 XML toolkit.")
(home-page "https://xml4r.github.com/libxml-ruby")
(license license:expat)))
(define-public ruby-lino
(package
(name "ruby-lino")
(version "1.1.0")
(source
(origin
(method url-fetch)
(uri (rubygems-uri "lino" version))
(sha256
(base32
"11d29g0fk372b9fcpyr0k6hxm2b4j4igpysmi542hgbbgqgp9cd3"))))
(build-system ruby-build-system)
(arguments
'(#:tests? #f)) ; No included tests
(propagated-inputs
`(("ruby-hamster" ,ruby-hamster)
("ruby-open4" ,ruby-open4)))
(synopsis "Build and execute commands in Ruby")
(description
"@code{Lino} provides an interface to run external commands. It provides
an interface to add options as well as managing the standard input, output and
error streams.")
(home-page "https://github.com/tobyclemson/lino")
(license license:expat)))
(define-public ruby-xml-simple
(package
(name "ruby-xml-simple")
(version "1.1.5")
(source (origin
(method url-fetch)
(uri (rubygems-uri "xml-simple" version))
(sha256
(base32
"0xlqplda3fix5pcykzsyzwgnbamb3qrqkgbrhhfz2a2fxhrkvhw8"))))
(build-system ruby-build-system)
(arguments
'(#:tests? #f)) ; no test suite
(synopsis "Simple Ruby library for XML processing")
(description "This library provides a simple API for XML processing in
Ruby.")
(home-page "https://github.com/maik/xml-simple")
(license license:ruby)))
(define-public ruby-thor
(package
(name "ruby-thor")
(version "1.0.1")
(source (origin
;; Pull from git because the gem has no tests.
(method git-fetch)
(uri (git-reference
(url "https://github.com/erikhuda/thor")
(commit (string-append "v" version))))
(file-name (git-file-name name version))
(sha256
(base32
"1anrx5vynk57hn5c8ig5pgkmcsbj9q5mvckd5rviw1jid7n89k57"))))
(build-system ruby-build-system)
(arguments
'(#:phases (modify-phases %standard-phases
(add-after 'unpack 'fix-readline-tests
(lambda _
;; Ensure Readline is initialized before running the
;; test to avoid a type clash with the mock ::Readline.
;; See <https://github.com/erikhuda/thor/pull/717>.
(substitute* "spec/line_editor/readline_spec.rb"
(("unless defined\\? ::Readline" all)
(string-append "Thor::LineEditor::Readline.available?\n"
all)))
#t))
(add-after 'unpack 'remove-coveralls-dependency
(lambda _
;; Do not hook the test suite into the online
;; coveralls service.
(substitute* "Gemfile"
((".*coveralls.*") ""))
(substitute* "spec/helper.rb"
(("require \"coveralls\"") "")
(("Coveralls::SimpleCov::Formatter") "")
;; Also drop the WebMock dependency which is only
;; present to allow a coveralls.io connection, and
;; would otherwise introduce a circular dependency.
(("require \"webmock/rspec\"") "")
(("WebMock\\.disable_net_connect.*") ""))
#t))
(add-after 'unpack 'disable-network-tests
(lambda _
;; These tests attempt to look up example.com.
(substitute* "spec/actions/file_manipulation_spec.rb"
(("it \"accepts (https?) remote sources" _ proto)
(string-append "xit \"accepts " proto " remote sources")))
#t))
(add-after 'unpack 'disable-quality-tests
(lambda _
;; These tests attempt to check the git repository for
;; tabs vs spaces, double vs single quotes, etc, and
;; depend on the git checkout.
(delete-file "spec/quality_spec.rb")
#t))
(add-before 'check 'make-files-writable
(lambda _
;; The tests needs rw access to the test suite.
(for-each make-file-writable (find-files "spec"))
#t))
(replace 'check
(lambda _
(invoke "rspec" "spec"))))))
(native-inputs
`(("ruby-rspec" ,ruby-rspec)
("ruby-simplecov" ,ruby-simplecov)))
(synopsis "Ruby toolkit for building command-line interfaces")
(description "Thor is a toolkit for building powerful command-line
interfaces.")
(home-page "http://whatisthor.com/")
(license license:expat)))
(define-public ruby-lumberjack
(package
(name "ruby-lumberjack")
(version "1.0.13")
(source (origin
(method url-fetch)
(uri (rubygems-uri "lumberjack" version))
(sha256
(base32
"06im7gcg42x77yhz2w5da2ly9xz0n0c36y5ks7xs53v0l9g0vf5n"))))
(build-system ruby-build-system)
(native-inputs
`(("ruby-rspec" ,ruby-rspec)
("ruby-timecop" ,ruby-timecop)))
(synopsis "Logging utility library for Ruby")
(description "Lumberjack is a simple logging utility that can be a drop in
replacement for Logger or ActiveSupport::BufferedLogger. It provides support
for automatically rolling log files even with multiple processes writing the
same log file.")
(home-page "https://github.com/bdurand/lumberjack")
(license license:expat)))
(define-public ruby-rbnacl
(package
(name "ruby-rbnacl")
(version "6.0.1")
(source
(origin
(method url-fetch)
(uri (rubygems-uri "rbnacl" version))
(sha256
(base32
"0ajxy5kj2jw09wdsla3jmha8w07vj5l14288xr9djpl327g3lzhn"))))
(build-system ruby-build-system)
(arguments
`(#:phases
(modify-phases %standard-phases
(add-after 'unpack 'remove-unnecessary-dependencies
(lambda _
;; Coveralls relates to a network service, and Rubocop to code
;; linting and both are unnecessary to run the tests
(substitute* "Gemfile"
((".*rubocop.*") "\n")
((".*guard-rspec.*") "\n")
((".*coveralls.*") "\n"))
(substitute* "spec/spec_helper.rb"
(("require \"coveralls\"") "")
(("Coveralls.wear!") ""))
#t))
(add-after 'unpack 'use-libsodium-from-store
(lambda* (#:key inputs #:allow-other-keys)
(substitute* '("lib/rbnacl/init.rb"
"lib/rbnacl/sodium.rb")
(("ffi_lib \\[.+\\]")
(string-append "ffi_lib [\""
(assoc-ref inputs "libsodium") "/lib/libsodium.so"
"\"]")))
#t))
;; Run Rspec directly to avoid the Rubocop dependency in the Rakefile
(replace 'check
(lambda* (#:key tests? #:allow-other-keys)
(when tests?
(invoke "rspec"))
#t)))))
(propagated-inputs
`(("ruby-ffi" ,ruby-ffi)))
(inputs
`(("libsodium" ,libsodium)))
(native-inputs
`(("bundler" ,bundler)
("ruby-rspec" ,ruby-rspec)))
(synopsis "Ruby FFI binding to libsodium")
(description
"This package provides Ruby FFI bindings to the Networking and
Cryptography (NaCl) library, also known as libsodium. This provides a
high-level toolkit for building cryptographic systems and protocols.")
(home-page "https://github.com/crypto-rb/rbnacl")
(license license:expat)))
(define-public ruby-nenv
(package
(name "ruby-nenv")
(version "0.3.0")
(source (origin
(method url-fetch)
(uri (rubygems-uri "nenv" version))
(sha256
(base32
"0r97jzknll9bhd8yyg2bngnnkj8rjhal667n7d32h8h7ny7nvpnr"))))
(build-system ruby-build-system)
(arguments
`(#:tests? #f)) ; no tests included
(native-inputs
`(("ruby-rspec" ,ruby-rspec)
("bundler" ,bundler)))
(synopsis "Ruby interface for modifying the environment")
(description "Nenv provides a convenient wrapper for Ruby's ENV to modify
and inspect the environment.")
(home-page "https://github.com/e2/nenv")
(license license:expat)))
(define-public ruby-ptools
(package
(name "ruby-ptools")
(version "1.3.5")
(source (origin
(method url-fetch)
(uri (rubygems-uri "ptools" version))
(sha256
(base32
"1jb1h1nsk9zwykpniw8filbsk26kjsdlpk5wz6w0zyamcd41h87j"))))
(build-system ruby-build-system)
(arguments
'(#:phases (modify-phases %standard-phases
(add-after 'unpack 'patch-/bin/ls
(lambda _
(substitute* "test/test_binary.rb"
(("/bin/ls")
(which "ls")))
#t))
(add-before 'install 'create-gem
(lambda _
;; Do not attempt to sign the gem.
(substitute* "Rakefile"
(("spec\\.signing_key = .*")
""))
(invoke "rake" "gem:create"))))))
(synopsis "Extra methods for Ruby's @code{File} class")
(description
"The @dfn{ptools} (power tools) library extends Ruby's core @code{File}
class with many additional methods modelled after common POSIX tools, such as
@code{File.which} for finding executables, @code{File.tail} to print the last
lines of a file, @code{File.wc} to count words, and so on.")
(home-page "https://github.com/djberg96/ptools")
(license license:artistic2.0)))
(define-public ruby-permutation
(package
(name "ruby-permutation")
(version "0.1.8")
(source (origin
(method url-fetch)
(uri (rubygems-uri "permutation" version))
(sha256
(base32
"13crwk2vfbzv99czva7881027dbcnidihmvx2jc58z2vm3bp9sl8"))))
(build-system ruby-build-system)
(arguments
`(#:phases
(modify-phases %standard-phases
(add-after 'unpack 'fix-rakefile
(lambda _
(substitute* "Rakefile"
(("require 'rake/gempackagetask'")
"require 'rubygems/package_task'")
(("include Config") ""))
#t))
(replace 'check
(lambda _
(invoke "ruby" "-Ilib" "test/test.rb"))))))
(synopsis "Library to perform operations with sequence permutations")
(description "This package provides a Ruby library to perform different
operations with permutations of sequences, such as strings and arrays.")
(home-page "https://flori.github.io/permutation")
(license license:gpl2))) ; GPL 2 only
(define-public ruby-shellany
(package
(name "ruby-shellany")
(version "0.0.1")
(source (origin
(method url-fetch)
(uri (rubygems-uri "shellany" version))
(sha256
(base32
"1ryyzrj1kxmnpdzhlv4ys3dnl2r5r3d2rs2jwzbnd1v96a8pl4hf"))))
(build-system ruby-build-system)
(arguments
`(#:test-target "default"
#:phases
(modify-phases %standard-phases
(add-after 'unpack 'fix-version-test
(lambda _
(substitute* "spec/shellany_spec.rb"
(("^RSpec") "require \"shellany\"\nRSpec"))
#t)))))
(native-inputs
`(("ruby-rspec" ,ruby-rspec)
("ruby-nenv" ,ruby-nenv)
("bundler" ,bundler)))
(synopsis "Capture command output")
(description "Shellany is a Ruby library providing functions to capture
the output produced by running shell commands.")
(home-page "https://rubygems.org/gems/shellany")
(license license:expat)))
(define-public ruby-notiffany
(package
(name "ruby-notiffany")
(version "0.1.3")
(source (origin
(method url-fetch)
(uri (rubygems-uri "notiffany" version))
(sha256
(base32
"0f47h3bmg1apr4x51szqfv3rh2vq58z3grh4w02cp3bzbdh6jxnk"))))
(build-system ruby-build-system)
;; Tests are not included in the gem.
(arguments `(#:tests? #f))
(propagated-inputs
`(("ruby-shellany" ,ruby-shellany)
("ruby-nenv" ,ruby-nenv)))
(native-inputs
`(("bundler" ,bundler