Skip to content
This repository has been archived by the owner on Oct 27, 2022. It is now read-only.

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
László Vaskó committed Jun 22, 2020
2 parents b0ac803 + ebbe2f0 commit 9e6f7d7
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 19 deletions.
29 changes: 12 additions & 17 deletions setup.el
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,8 @@
(let ((pkg (if (listp recipe)
(car recipe)
recipe)))
(message "straight-use-package %s %s" recipe r)
(message "[nix-straight.el] Collectiong package '%s' from recipe '%s'" pkg recipe)
(add-to-list 'nix-straight--packages pkg))))
(advice-add 'straight-recipes-retrieve
:override (lambda (pkg)
(list)))
(advice-add 'straight-use-recipes
:override (lambda (&rest r)
(message "straight-use-recipes %s" r)))

(load init-file nil nil t)
(princ (if (null nix-straight--packages)
Expand All @@ -26,16 +20,17 @@

(defun nix-straight-build-packages (init-file)
(setq straight-default-files-directive '("*" (:exclude "*.elc")))
(advice-add 'straight-vc-git-clone
:override (lambda (&rest r)))
(advice-add 'straight-recipes-retrieve
:override (lambda (pkg &rest r)
(message " Crafting recipe %s" pkg)
(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)))))
(advice-add 'straight-use-package
:around (lambda (orig-fn &rest r)
(message " [nix-straight.el] Overriding recipe for '%s'" (car r))
(let* ((pkg (car r))
(pkg-name (symbol-name pkg))
(recipe (if (file-exists-p (straight--repos-dir pkg-name))
(list pkg :local-repo pkg-name :repo pkg-name :type 'git)
(list pkg :type 'built-in))))
(message " --> [nix-straight.el] Recipe generated: %s" recipe)
(straight-override-recipe recipe))
(apply orig-fn r)))
(load init-file nil nil t))

(provide 'setup)
Expand Down
4 changes: 2 additions & 2 deletions straight/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ trivialBuild rec {
src = fetchFromGitHub {
owner = "raxod502";
repo = "straight.el";
rev = "388bf37f30f0934c8ef1b52edfd65875e945da21";
sha256 = "1d8kg63yamkanrx6l8mi8ybj2xb8zmkhqc10q5p3xn319gs36jgp";
rev = "59c92dd45085b8f8fc44ea0039c205f4a3c43b62";
sha256 = "00ibxmgqfb5bqd4b9jqj8vdiszkph6vv64m1y3kf9xav15v8sfyx";
};
}

0 comments on commit 9e6f7d7

Please sign in to comment.