        (format (concat "\nPackage %s is unavailable. "
                        "Is the package name misspelled?\n")
                pkg-name))
-    (dolist
-        (dep (configuration-layer//get-package-deps-from-archive
-              pkg-name))
-      (if (package-installed-p (car dep))
-          (configuration-layer//activate-package (car dep))
-        (package-install (car dep))))
-    (package-install pkg-name)))
+    (let ((pkg-desc (assq pkg-name package-archive-contents)))
+      (dolist
+          (dep (configuration-layer//get-package-deps-from-archive
+                pkg-name))
+        (if (package-installed-p (car dep))
+            (configuration-layer//activate-package (car dep))
+          (package-install (car dep))))
+      (if pkg-desc
+          (package-install (cadr pkg-desc))
+        (package-install pkg-name)))))
 
 (defun configuration-layer//install-from-recipe (pkg)
   "Install PKG from a recipe."

  ((name :initarg :name
         :type symbol
         :documentation "Name of the package.")
   (owners :initarg :owners
           :initform nil
           :type list

         (copyp (not (null obj)))
         (obj (if obj obj (cfgl-package name-str :name name-sym))))
    (when location (oset obj :location location))
    (when min-version (oset obj :min-version (version-to-list min-version)))
    (when step (oset obj :step step))
    (oset obj :excluded (or excluded (oref obj :excluded)))
    (when toggle (oset obj :toggle toggle))
