[bug#78315,17/53] gnu: emacs-emacsql: Improve style.

Message ID 20250508125104.26530-17-ngraves@ngraves.fr
State New
Headers
Series More fixes, and a lot of style improvements. |

Commit Message

Nicolas Graves May 8, 2025, 12:50 p.m. UTC
  * gnu/packages/emacs-xyz.scm (emacs-emacsql):
  [arguments]<phases>: Improve style of 'fix-executable-paths.
---
 gnu/packages/emacs-xyz.scm | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
  

Patch

diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index cfd0a951fa..6af0109b5d 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -25919,12 +25919,12 @@  (define-public emacs-emacsql
       #~(modify-phases %standard-phases
           (add-after 'unpack 'fix-executable-paths
             (lambda* (#:key inputs #:allow-other-keys)
-              (let ((mdb (assoc-ref inputs "mariadb"))
-                    (psql (assoc-ref inputs "postgresql")))
-                (emacs-substitute-variables "emacsql-psql.el"
-                  ("emacsql-psql-executable" (string-append psql "/bin/psql")))
-                (emacs-substitute-variables "emacsql-mysql.el"
-                  ("emacsql-mysql-executable" (string-append mdb "/bin/mysql")))))))))
+              (emacs-substitute-variables "emacsql-psql.el"
+                ("emacsql-psql-executable"
+                 (search-input-file inputs "bin/psql")))
+              (emacs-substitute-variables "emacsql-mysql.el"
+                ("emacsql-mysql-executable"
+                 (search-input-file inputs "/bin/mysql"))))))))
     (inputs (list mariadb postgresql))
     (native-inputs (list emacs-sqlite3-api))
     (home-page "https://github.com/magit/emacsql")