summary refs log tree commit diff
path: root/gnu/packages/ruby.scm
diff options
context:
space:
mode:
authorPhilip McGrath <philip@philipmcgrath.com>2022-07-25 08:16:35 -0400
committerLudovic Courtès <ludo@gnu.org>2022-08-04 12:05:52 +0200
commitc90c1698e1e256f8c42558caed077850e92c6434 (patch)
tree7195a2ad3713c4022bfc736360765abd0a9748ac /gnu/packages/ruby.scm
parent9c124671ce0eafe50c1d913976ad6bc619475f9a (diff)
downloadguix-c90c1698e1e256f8c42558caed077850e92c6434.tar.gz
gnu: anystyle: Use GDBM by default.
Since we have GDBM available, it offers a smaller memory footprint
and faster start-up.

* gnu/packages/ruby.scm (anystyle)[arguments]<#:phases>: Add phase
'change-default-dictionary-adapter'.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
Diffstat (limited to 'gnu/packages/ruby.scm')
-rw-r--r--gnu/packages/ruby.scm8
1 files changed, 8 insertions, 0 deletions
diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm
index 2dba81c2a1..cc95bd8d6e 100644
--- a/gnu/packages/ruby.scm
+++ b/gnu/packages/ruby.scm
@@ -13622,6 +13622,14 @@ though the later has not yet been packaged for Guix.")
               (substitute* "anystyle-cli.gemspec"
                 (("'bibtex-ruby', '[^']*'")
                  "'bibtex-ruby'"))))
+          (add-before 'build 'change-default-dictionary-adapter
+            (lambda args
+              ;; Since we always have gdbm available, using it will give a
+              ;; faster startup time, which is particularly worth-while for
+              ;; a command-line tool.
+              (substitute* "bin/anystyle"
+                (("default_value: 'ruby',")
+                 "default_value: 'gdbm', # patched for Guix"))))
           (replace 'check
             (lambda* (#:key tests? #:allow-other-keys)
               ;; There are no tests, but let's use this opportunity to do a