From ea6318b01da3eb5f973f90475fd07687eec8421b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A1szl=C3=B3=20Vask=C3=B3?= Date: Sat, 25 Jan 2020 19:38:24 +0100 Subject: [PATCH] nix-straight.el: make straight-vc-local-repo-dir work --- setup.el | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/setup.el b/setup.el index e34c05b..fc7d5aa 100644 --- a/setup.el +++ b/setup.el @@ -16,8 +16,7 @@ (list))) (advice-add 'straight-use-recipes :override (lambda (&rest r) - (message "straight-use-recipes %s" r) - )) + (message "straight-use-recipes %s" r))) (load init-file nil nil t) (princ (if (null nix-straight--packages) @@ -33,10 +32,11 @@ (advice-add 'straight-recipes-retrieve :override (lambda (pkg &rest r) (message " Crafting recipe %s" pkg) - (if (file-exists-p (straight--repos-dir (format "%s" pkg))) - `(,pkg :local-repo ,(format "%s" pkg)) - (message " --> Repo directory for package not exists, assuming built-in; %s" pkg) - `(,pkg :type built-in)))) + (let ((pkg-name (symbol-name pkg))) + (if (file-exists-p (straight--repos-dir pkg-name)) + (list pkg :local-repo pkg-name :repo pkg-name :type 'git) + (message " --> Repo directory for package not exists, assuming built-in; %s" pkg) + (list pkg :type 'built-in))))) (load init-file nil nil t)) (provide 'setup)