                        pin
                      "unpinned")
                    "\n")
+
            (package--print-help-section "Build")
            (let ((default-directory (straight--repos-dir (symbol-name package))))
-             (insert (cdr (doom-call-process "git" "log" "-1" "--format=%D %h %ci"))
-                     "\n" indent))
+             (if
+                 (file-exists-p default-directory)
+                 (insert
+                  (cdr
+                   (doom-call-process "git" "log" "-1" "--format=%D %h %ci")))
+               (insert "n/a")))
+           (insert "\n" indent)
+
            (package--print-help-section "Build location")
            (let ((build-dir (straight--build-dir (symbol-name package))))
              (if (file-exists-p build-dir)
                  (doom--help-insert-button (abbreviate-file-name build-dir))
                (insert "n/a")))
            (insert "\n" indent)
+
            (package--print-help-section "Repo location")
            (let ((repo-dir (straight--repos-dir (symbol-name package))))
              (if (file-exists-p repo-dir)
                  (doom--help-insert-button (abbreviate-file-name repo-dir))
                (insert "n/a"))
              (insert "\n"))
+
            (let ((recipe (doom-package-build-recipe package)))
              (package--print-help-section "Recipe")
-             (insert (format "%s\n" (string-trim (pp-to-string recipe))))
-             (package--print-help-section "Homepage")
-             (doom--help-insert-button (doom--package-url package))))
+             (insert
+              (replace-regexp-in-string "\n" (concat "\n" indent)
+                                        (pp-to-string recipe))))
+
+           (package--print-help-section "Homepage")
+           (doom--help-insert-button (doom--package-url package)))
+
           (`elpa (insert "[M]ELPA ")
                  (doom--help-insert-button (doom--package-url package))
                  (package--print-help-section "Location")
                  (doom--help-insert-button
                   (abbreviate-file-name
-                   (file-name-directory (locate-library (symbol-name package))))))
+                   (file-name-directory
+                    (locate-library (symbol-name package))))))
           (`builtin (insert "Built-in\n")
                     (package--print-help-section "Location")
                     (doom--help-insert-button
                      (abbreviate-file-name
-                      (file-name-directory (locate-library (symbol-name package))))))
+                      (file-name-directory
+                       (locate-library (symbol-name package))))))
           (`other (doom--help-insert-button
                    (abbreviate-file-name
                     (or (symbol-file package)

            (let* ((module-path (pcase (car m)
                                  (:core doom-core-dir)
                                  (:private doom-private-dir)
                                  (category (doom-module-path category (cdr m)))))
                   (readme-path (expand-file-name "README.org" module-path)))
              (insert indent)
              (doom--help-insert-button

            (if (and doom--help-packages-list (null current-prefix-arg))
                doom--help-packages-list
              (message "Generating packages list for the first time...")
              (redisplay)
              (setq doom--help-packages-list
                    (delete-dups
                     (append (mapcar #'car package-alist)
                             (mapcar #'car package--builtins)
                             (mapcar #'intern
                                     (hash-table-keys straight--build-cache))
                             (mapcar #'car (doom-package-list 'all))
                             nil))))))
       (unless (memq guess packages)
         (setq guess nil))
       (list
        (intern
         (completing-read (format "Describe Doom package (%s): "
                                  (concat (when guess
                                            (format "default '%s', " guess))
                                          (format "total %d" (length packages))))
                          packages nil t nil nil
                          (when guess (symbol-name guess))))))))
  ;; TODO Refactor me.
  (require 'core-packages)
  (doom-initialize-packages)
  (help-setup-xref (list #'doom/help-packages package)
                   (called-interactively-p 'interactive))
  (with-help-window (help-buffer)
    (with-current-buffer standard-output
      (when (or (package-desc-p package)
                (and (symbolp package)
                     (or (assq package package-alist)
                         (assq package package--builtins))))
        (describe-package-1 package))
      (let ((indent (make-string 13 ? )))
        (goto-char (point-min))
        (if (re-search-forward "     Status: .*$" nil t)
            (insert "\n")
          (search-forward "\n\n" nil t))

        (package--print-help-section "Package")
