                      nil nil 'interactive))
   ;; If `straight--convert-recipe' returns nil, the package is
   ;; built-in. No need to go any further.
-  (when-let ((recipe (straight--convert-recipe melpa-style-recipe cause)))
+  (when-let ((recipe (straight--convert-recipe
+                      (or
+                       (straight--get-overridden-recipe
+                        (if (listp melpa-style-recipe)
+                            (car melpa-style-recipe)
+                          melpa-style-recipe))
+                       melpa-style-recipe)
+                      cause)))
     (straight--with-plist recipe
         (package no-build)
       (let (;; Check if the package has been successfully built. If

            (puthash package t straight--success-cache)
            t))))))

;;;;; Rebuilding packages

;;;###autoload

              ;; Return the newly normalized recipe.
              plist))))))

(defun straight--get-overridden-recipe (package)
  "Given a PACKAGE symbol, check if it has an overridden recipe.
This means an entry in `straight-recipe-overrides'. If one is
found, return it as a MELPA-style recipe. Otherwise, return
nil."
  (cl-dolist (profile (mapcar #'car straight-profiles))
    (when-let ((recipes (alist-get profile straight-recipe-overrides)))
      (when-let ((recipe (assoc package recipes)))
        (cl-return recipe)))))

;;;;; Recipe registration

(defvar straight--build-keywords
