Skip to content

Commit

Permalink
guix: Remove obsolete cache code.
Browse files Browse the repository at this point in the history
  • Loading branch information
Ambrevar committed Nov 13, 2020
1 parent 3dd195a commit c9c1140
Showing 1 changed file with 2 additions and 28 deletions.
30 changes: 2 additions & 28 deletions helm-system-packages-guix.el
Original file line number Diff line number Diff line change
Expand Up @@ -123,43 +123,17 @@ Return the REPL output (including the error output) as a string."
(defvar helm-system-packages-guix-cache-file
(expand-file-name "helm-system-packages-guix" user-emacs-directory)
"Filename of the cache storing all Guix package descriptions.")
(make-obsolete-variable 'helm-system-packages-guix-cache-file nil "1.10.2")

(defvar helm-system-packages-guix-path
(expand-file-name "current" "~/.config/guix")
"Path to the latest guix checkout.")
(make-obsolete-variable 'helm-system-packages-guix-path nil "1.10.2")

(defun helm-system-packages-guix--last-pull-commits ()
"Return the commits of the Guix channels from the last generation."
(with-temp-buffer
(let ((output (current-buffer)))
(with-temp-buffer
(process-file "guix" nil '(t nil) nil "describe" "--format=recutils")
(call-process-region (point-min) (point-max) "recsel" nil output nil "-R" "url,commit")))
(sort-lines nil (point-min) (point-max))
(goto-char (point-min))
(delete-blank-lines)
(delete-blank-lines)
(buffer-string)))

(defun helm-system-packages-guix-file-get (basename suffix)
"Return Guix local file BASENAME, with SUFFIX appended.
If `default-directory' is a remote file (over TRAMP), a different
cache filename is returned with the host name appended to it."
(concat basename
(when (tramp-tramp-file-p default-directory)
(concat "_" (tramp-file-name-host
(tramp-dissect-file-name default-directory))))
suffix))

(defun helm-system-packages-guix-cache-file-get ()
(defun helm-system-packages-guix-cache-file-get () ; TODO: Remove!
"Return Guix local or remote cache."
(helm-system-packages-guix-file-get helm-system-packages-guix-cache-file ".cache"))

(defun helm-system-packages-guix-commit-file-get ()
"Return Guix local or remote cache of commits."
(helm-system-packages-guix-file-get helm-system-packages-guix-cache-file ".commits"))

(defun helm-system-packages-generate-database ()
(helm-system-packages-guix-eval
'(use-modules
Expand Down

0 comments on commit c9c1140

Please sign in to comment.