guix-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: Philip McGrath
Subject: [bug#56759] [PATCH 20/20] gnu: anystyle: Use GDBM by default.
Date: Mon, 25 Jul 2022 08:16:35 -0400

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 --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
-- 
2.32.0






reply via email to

[Prev in Thread] Current Thread [Next in Thread]