diff mbox series

[bug#56759,20/20] gnu: anystyle: Use GDBM by default.

Message ID 00b611997823e6108278d44565bd0287f4fe7ebb.1658750358.git.philip@philipmcgrath.com
State Accepted
Headers show
Series gnu: Add AnyStyle. | expand

Checks

Context Check Description
cbaines/comparison success View comparision
cbaines/git-branch success View Git branch
cbaines/applying patch success View Laminar job
cbaines/issue success View issue

Commit Message

Philip McGrath July 25, 2022, 12:16 p.m. UTC
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'.
---
 gnu/packages/ruby.scm | 8 ++++++++
 1 file changed, 8 insertions(+)
diff mbox series

Patch

diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm
index 8991eb0927..655f49e725 100644
--- a/gnu/packages/ruby.scm
+++ b/gnu/packages/ruby.scm
@@ -13620,6 +13620,14 @@  (define-public anystyle
               (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