         (setq recipes (nconc recipes (straight-recipes
                                       'list source cause)))))))
 
+(defcustom straight-built-in-pseudo-packages '(emacs nadvice python)
+  "List of built-in packages that aren't real packages.
+If any of these are specified as dependencies, straight.el will
+just skip them instead of looking for a recipe.
+
+Another application of this variable is to correctly handle the
+situation where a package is built-in but Emacs incorrectly
+claims that it's not (see
+<https://github.com/raxod502/straight.el/issues/548>).
+
+Note that straight.el can deal with built-in packages even if
+this variable is set to nil. This just allows you to tell
+straight.el to not even bother cloning recipe repositories to
+look for recipes for these packages."
+  :type '(repeat symbol))
+
+(defun straight-recipe-source (package)
+  "Return recipe respository used to obtain PACKAGE recipe.
+If package is not found in any `straight-recipe-repositories', return nil."
+  (unless (member (intern package)
+                  (append straight-built-in-pseudo-packages '(straight)))
+    (cl-some
+     (lambda (repo)
+       (let ((recipe-repo (gethash repo straight--recipe-lookup-cache)))
+         (and (gethash package recipe-repo) repo)))
+     straight-recipe-repositories)))
+
 ;;;;;; Org
 (defcustom straight-byte-compilation-buffer "*straight-byte-compilation*"
   "Name of the byte compilation log buffer.

  "Name of the bug report subprocess buffer.")

(defvar straight-bug-report--setup
  '((setq straight-repository-branch "develop")
    (setq debug-on-error t))
  "Static setup portion of bug report metaprogram.")

(defun straight-bug-report--format (&rest preamble)

  1)

;;;;; Recipe conversion

(defvar straight--build-keywords '(:build
                                   :files
