summaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorCayetano Santos <csantosb@inventati.org>2025-11-01 20:41:25 +0100
committerCayetano Santos <csantosb@inventati.org>2025-12-02 08:56:17 +0100
commitf48389ada90a6d175fbae461e299c15d711ddab1 (patch)
treeadc38d59d83181b1eb228364c921b155506eb031 /gnu
parentec4f475b7c693943f8ecb1326513ad1176b7f9cb (diff)
gnu: emacs-gptel: Update to 0.9.9.3.
* gnu/packages/emacs-xyz.scm (emacs-gptel): Update to 0.9.9.3. [arguments]: Add #:test-command. <#:phases>: Add ’unpack-tests, ’rename-pkg, ’rename-pkg-back and updated ’use-appropriate-curl. [native-inputs]: Add emacs-gptel-test-files. Change-Id: I4cbdba248a108d87f9c4b43d36de5ec912fa4d5e
Diffstat (limited to 'gnu')
-rw-r--r--gnu/packages/emacs-xyz.scm40
1 files changed, 36 insertions, 4 deletions
diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index 18989515fb8..ee157e6fd20 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -830,7 +830,7 @@ e.g. emacs-geiser-guile for Guile.")
(define-public emacs-gptel
(package
(name "emacs-gptel")
- (version "0.9.9")
+ (version "0.9.9.3")
(source (origin
(method git-fetch)
(uri (git-reference
@@ -839,18 +839,50 @@ e.g. emacs-geiser-guile for Guile.")
(file-name (git-file-name name version))
(sha256
(base32
- "00f391gaf0pnin6qncpnxl5yj0j089d1rdblwgv5cf3mkid9w8gj"))))
+ "080dk0101imvfkxcqlqhy8wf1wc8p2vqyp3cwdi48wn44y1csqy9"))))
(build-system emacs-build-system)
(arguments
(list
+ #:test-command #~(list "make" "-C" "test" "test")
#:phases
#~(modify-phases %standard-phases
+ (add-after 'unpack 'unpack-tests
+ (lambda _
+ (copy-recursively
+ #$(this-package-native-input "emacs-gptel-test-files")
+ "test")
+ (invoke "chmod" "--recursive" "u+w" "test")))
+ ;; gptel-pkg.el produces an error during the check phase.
+ (add-before 'check 'rename-pkg
+ (lambda _ (rename-file "gptel-pkg.el" "gptel-pkg.el_")))
+ (add-after 'check 'rename-pkg-back
+ (lambda _ (rename-file "gptel-pkg.el_" "gptel-pkg.el")))
(add-after 'unpack 'use-appropriate-curl
(lambda* (#:key inputs #:allow-other-keys)
- (emacs-substitute-variables "gptel.el"
- ("gptel-use-curl" (search-input-file inputs "/bin/curl"))))))))
+ ;; These two alternatives error on the substitution.
+ ;; (emacs-substitute-variables "gptel-openai.el"
+ ;; ("gptel-use-curl"
+ ;; (search-input-file inputs "/bin/curl")))
+ ;; (emacs-substitute-sexps "gptel-openai.el"
+ ;; ("(defvar gptel-use-curl"
+ ;; (search-input-file inputs "/bin/curl")))
+ (substitute* "gptel-openai.el"
+ (("defvar gptel-use-curl")
+ (format #f "defvar gptel-use-curl \"~a\""
+ (search-input-file inputs "/bin/curl")))))))))
(inputs (list curl))
(propagated-inputs (list emacs-compat emacs-transient))
+ (native-inputs
+ (list
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/karthink/gptel-test")
+ (commit "5f5275c32ed240a03f38d9edef26d920d4535a41")))
+ (file-name "emacs-gptel-test-files")
+ (sha256
+ (base32
+ "0sd1y1m5abfqcm5v9x86xmnnx8ab82bfd0m3cgq9ycszxdf7gf3v")))))
(home-page "https://github.com/karthink/gptel")
(synopsis "GPTel is a simple ChatGPT client for Emacs")
(description