Skip to content

Commit

Permalink
implement stable melpa fetcher
Browse files Browse the repository at this point in the history
  • Loading branch information
d12frosted committed Jul 14, 2016
1 parent 653da2a commit 183a110
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions core/core-configuration-layer.el
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,8 @@ LAYER has to be installed for this method to work properly."
(defvar configuration-layer--elpa-archives
'(("melpa" . "melpa.org/packages/")
("org" . "orgmode.org/elpa/")
("gnu" . "elpa.gnu.org/packages/"))
("gnu" . "elpa.gnu.org/packages/")
("melpa-stable" . "stable.melpa.org/packages/"))
"List of ELPA archives required by Spacemacs.")

(defvar configuration-layer-no-layer nil
Expand Down Expand Up @@ -493,6 +494,11 @@ If TOGGLEP is nil then `:toggle' parameter is ignored."
(protected (when (listp pkg) (plist-get (cdr pkg) :protected)))
(copyp (not (null obj)))
(obj (if obj obj (cfgl-package name-str :name name-sym))))
(when (and (listp location)
(eq (car location) 'recipe)
(eq (plist-get (cdr location) :fetcher) 'stable))
(configuration-layer/pin-stable-package name-sym)
(setq location nil))
(when location (oset obj :location location))
(when min-version (oset obj :min-version (version-to-list min-version)))
(when step (oset obj :step step))
Expand Down Expand Up @@ -1866,7 +1872,10 @@ FILE-TO-LOAD is an explicit file to load after the installation."
(1+ configuration-layer-error-count))
(setq configuration-layer-error-count 1)))

(defun configuration-layer/pin-stable-package (package)
"Pin PACKAGE to melpa-stable."
(push `(,package . "melpa-stable") package-pinned-packages))

(provide 'core-configuration-layer)

;;; core-configuration-layer.el ends here

0 comments on commit 183a110

Please sign in to comment.