[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#30884] [PATCH 4/6] gnu: Add emacs-emacsql.
From: |
Ludovic Courtès |
Subject: |
[bug#30884] [PATCH 4/6] gnu: Add emacs-emacsql. |
Date: |
Wed, 04 Apr 2018 14:37:24 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux) |
Oleg Pykhalov <address@hidden> skribis:
> * gnu/packages/emacs.scm (emacs-emacsql): New public variable.
[...]
> + (add-after 'patch-elisp-shell-shebangs 'setenv-emacsloadpath
> + (lambda* (#:key inputs #:allow-other-keys)
> + (define (el-dir store-dir)
> + (match (find-files store-dir "\\.el$")
> + ((f1 f2 ...) (dirname f1))
> + (_ "")))
> + (define emacs-prefix? (cut string-prefix? "emacs-" <>))
> + (let* ((emacs-load-paths
> + (map (match-lambda
> + (((? emacs-prefix? name) . dir)
> + (string-append (el-dir dir) ":"))
> + (_ ""))
> + inputs))
> + (emacs-load-path-value
> + (string-concatenate emacs-load-paths)))
> + (format #t "environment variable `EMACSLOADPATH' set to ~a\n"
> + emacs-load-path-value)
> + (setenv "EMACSLOADPATH" emacs-load-path-value))
Now that there’s a new ‘set-emacs-load-path’, I suspect this phase can
be removed. Can you confirm, Maxim?
> + (add-after 'build-emacsql-sqlite 'install-emacsql-sqlite
> + (lambda* (#:key outputs #:allow-other-keys)
> + (install-file "sqlite/emacsql-sqlite"
> + (string-append (assoc-ref outputs "out")
> + "/bin"))
> + #t))
> + (add-after 'install-emacsql-sqlite 'patch-emacsql-sqlite.el
> + (lambda* (#:key outputs #:allow-other-keys)
> + (let ((file "emacsql-sqlite.el"))
> + (chmod file #o644)
> + (emacs-substitute-sexps file
> + ("(defvar emacsql-sqlite-user-prompted" 't)
> + ("(executable-find" (which "gcc"))
> + ("(defvar emacsql-sqlite-executable"
> + (string-append (assoc-ref outputs "out")
> + "/bin/emacsql-sqlite"))))))
Please add short comments explaining what’s going on in these phases.
> + (home-page "https://github.com/skeeto/emacsql")
> + (synopsis "Emacs high-level SQL database front-end")
> + (description "EmacSQL provides a high-level Emacs Lisp front-end for
> +SQLite (primarily), PostgreSQL, MySQL, and potentially other SQL databases.")
I would add this, taken from their README:
Any readable Lisp value can be stored as a value in EmacSQL, including
numbers, strings, symbols, lists, vectors, and closures. EmacSQL has
no concept of @code{TEXT} values; it's all just Lisp objects. The Lisp
object @code{nil} corresponds 1:1 with @code{NULL} in the database.
Otherwise LGTM, thanks!
Ludo’.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [bug#30884] [PATCH 4/6] gnu: Add emacs-emacsql.,
Ludovic Courtès <=