Remove https from package-archives dynamically
This commit is contained in:
parent
310d81ab4a
commit
f2eedb44dc
1 changed files with 14 additions and 7 deletions
|
@ -92,18 +92,15 @@ and `auto-mode-alist'.")
|
|||
(defvar doom--refreshed-p nil)
|
||||
(defvar generated-autoload-load-name)
|
||||
|
||||
;;
|
||||
(setq autoload-compute-prefixes nil
|
||||
package--init-file-ensured t
|
||||
package-user-dir (expand-file-name "elpa" doom-packages-dir)
|
||||
package-enable-at-startup nil
|
||||
package-archives
|
||||
(if (getenv "INSECURE")
|
||||
'(("gnu" . "http://elpa.gnu.org/packages/")
|
||||
("melpa" . "http://melpa.org/packages/")
|
||||
("org" . "http://orgmode.org/elpa/"))
|
||||
'(("gnu" . "https://elpa.gnu.org/packages/")
|
||||
("melpa" . "https://melpa.org/packages/")
|
||||
("org" . "https://orgmode.org/elpa/")))
|
||||
("org" . "https://orgmode.org/elpa/"))
|
||||
;; I omit Marmalade because its packages are manually submitted rather
|
||||
;; than pulled, so packages are often out of date with upstream.
|
||||
|
||||
|
@ -130,6 +127,16 @@ and `auto-mode-alist'.")
|
|||
byte-compile-verbose doom-debug-mode
|
||||
byte-compile-warnings '(not free-vars unresolved noruntime lexical make-local))
|
||||
|
||||
;; accommodate INSECURE setting
|
||||
(unless gnutls-verify-error
|
||||
(dolist (archive package-archives)
|
||||
(setcdr archive (replace-regexp-in-string "^https://" "http://" (cdr archive) t nil))))
|
||||
|
||||
|
||||
;;
|
||||
;; Startup benchmark
|
||||
;;
|
||||
|
||||
(defun doom-packages--benchmark ()
|
||||
(format "Doom loaded %s packages across %d modules in %.03fs"
|
||||
;; Certainly imprecise, especially where custom additions to
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue