summary refs log tree commit diff
path: root/gnu/packages/ruby.scm
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/packages/ruby.scm')
-rw-r--r--gnu/packages/ruby.scm64
1 files changed, 10 insertions, 54 deletions
diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm
index 14197e1eab..5a8a7e14bd 100644
--- a/gnu/packages/ruby.scm
+++ b/gnu/packages/ruby.scm
@@ -1,6 +1,6 @@
 ;;; 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, 2016, 2017, 2021 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>
@@ -95,7 +95,7 @@
         license:gpl2+
         license:gpl3+))
 
-(define-public ruby
+(define-public ruby-2.6
   (package
     (name "ruby")
     (version "2.6.5")
@@ -153,7 +153,7 @@ a focus on simplicity and productivity.")
 
 (define-public ruby-2.7
   (package
-    (inherit ruby)
+    (inherit ruby-2.6)
     (version "2.7.2")
     (source
      (origin
@@ -210,7 +210,7 @@ a focus on simplicity and productivity.")
 
 (define-public ruby-2.5
   (package
-    (inherit ruby)
+    (inherit ruby-2.6)
     (version "2.5.8")
     (source
      (origin
@@ -229,7 +229,7 @@ a focus on simplicity and productivity.")
 
 (define-public ruby-2.4
   (package
-    (inherit ruby)
+    (inherit ruby-2.6)
     (version "2.4.10")
     (source
      (origin
@@ -246,6 +246,8 @@ a focus on simplicity and productivity.")
                    (delete-file-recursively "ext/fiddle/libffi-3.2.1")
                    #t))))))
 
+(define-public ruby ruby-2.7)
+
 (define-public mruby
   (package
     (name "mruby")
@@ -1173,8 +1175,7 @@ structure.  Supports custom object formatting via plugins.")
              #t))
          (add-after 'unpack 'patch-pandoc-path
            (lambda* (#:key inputs #:allow-other-keys)
-             (let ((pandoc (string-append (assoc-ref inputs "pandoc")
-                                          "/bin/pandoc")))
+             (let ((pandoc (search-input-file inputs "/bin/pandoc")))
                (substitute* "lib/pandoc-ruby.rb"
                  (("@@pandoc_path = 'pandoc'")
                   (format #f "@@pandoc_path = '~a'" pandoc)))
@@ -1296,14 +1297,6 @@ syntax to the minimum while remaining clear.")
      `(#: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")
@@ -1502,17 +1495,7 @@ loader for the file type associated with a filename extension, and it augments
          "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)))))
+     `(#:test-target "spec"))
     (native-inputs
      `(("ruby-activesupport" ,ruby-activesupport)
        ("ruby-rr" ,ruby-rr)
@@ -1735,15 +1718,6 @@ only what they care about.")
            (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)
@@ -1785,14 +1759,6 @@ to save time in the following ways:
            (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)
@@ -1914,15 +1880,6 @@ web pages.")
                  (("(.*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)
@@ -4892,8 +4849,7 @@ you to merge elements inside a hash together recursively.")
                     (lambda* (#:key inputs outputs #:allow-other-keys)
                       ;; Make the default git binary an absolute path to the
                       ;; store.
-                      (let ((git    (string-append (assoc-ref inputs "git")
-                                                   "/bin/git"))
+                      (let ((git    (search-input-file inputs "/bin/git"))
                             (config (string-append
                                      (assoc-ref outputs "out")
                                      "/lib/ruby/vendor_ruby/gems/git-"