summaryrefslogtreecommitdiff
path: root/gnu/packages/ruby.scm
diff options
context:
space:
mode:
authorMarius Bakke <marius@devup.no>2020-05-27 15:07:11 +0200
committerMarius Bakke <marius@gnu.org>2020-05-27 21:49:56 +0200
commitaf59d4b43d711c1033b16b0a94d7eaef3de770eb (patch)
tree31064b528f0ed24eedd996de0080b9af6a3ea2a2 /gnu/packages/ruby.scm
parentfadd962f4b7aa5a5a26a3efa705a359e29f60fc5 (diff)
gnu: Add ruby-ptools.
* gnu/packages/ruby.scm (ruby-ptools): New public variable.
Diffstat (limited to 'gnu/packages/ruby.scm')
-rw-r--r--gnu/packages/ruby.scm35
1 files changed, 35 insertions, 0 deletions
diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm
index 94b16957e0..cb9495a266 100644
--- a/gnu/packages/ruby.scm
+++ b/gnu/packages/ruby.scm
@@ -1799,6 +1799,41 @@ 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")