 does such a good job of discouraging contributions anyway."
   :type 'boolean)
 
+(defcustom straight-recipes-gnu-elpa-ignored-packages
+  '(cl-generic
+    cl-lib
+    nadvice)
+  "Packages from GNU ELPA that we should pretend don't exist.
+Such packages would break things if they were installed. For
+example, the `cl-lib' package from GNU ELPA is not the
+development version but rather an obsolete forwards-compatibility
+package designed for use with Emacs 24.2 and earlier. See
+<https://github.com/raxod502/straight.el/issues/531> for some
+discussion."
+  :type '(list symbol))
+
 ;;;;;;; GNU ELPA mirror
 
 (defun straight-recipes-gnu-elpa-mirror-retrieve (package)

  "Return a list of recipe names available in GNU ELPA, as a list of strings."
  (cl-remove-if
   (lambda (package)
     (straight--package-built-in-p (intern package)))
   (straight--directory-files "packages/")))

(defun straight-recipes-gnu-elpa-version ()

ELPA (and should be retrieved from there, which isn't the case if
the package is built in to Emacs), return a MELPA-style recipe.
Otherwise, return nil."
  (unless (memq package straight-recipes-gnu-elpa-ignored-packages)
    (when (file-exists-p (expand-file-name (symbol-name package) "packages/"))
      ;; All the packages in GNU ELPA are just subdirectories of the
      ;; same repository.
