Merge branch 'develop' (early part)

This commit is contained in:
László Vaskó
2020-08-30 19:13:34 +02:00
4 changed files with 50 additions and 3 deletions

View File

@ -7,15 +7,22 @@
;;; have a properly configured user home and environment.
(setq package-check-signature nil)
(defun nix-straight-inhibit-kill-emacs (arg)
(message "[nix-doom-emacs] Inhibiting (kill-emacs)"))
(advice-add 'nix-straight-get-used-packages
:before (lambda (&rest r)
:around (lambda (orig-fn &rest r)
(message "[nix-doom-emacs] Advising doom installer to gather packages to install...")
(advice-add 'doom-autoloads-reload
:override (lambda (&optional file force-p)
(message "[nix-doom-emacs] Skipping generating autoloads...")))
(advice-add 'doom--print
:override (lambda (output)
(message output)))))
(message output)))
(advice-add 'kill-emacs
:override #'nix-straight-inhibit-kill-emacs)
(apply orig-fn r)
(advice-remove 'kill-emacs 'nix-straight-inhibit-kill-emacs)))
(advice-add 'y-or-n-p
:override (lambda (q)

View File

@ -49,6 +49,7 @@
, runCommand
, fetchFromGitHub
, substituteAll
, writeShellScript
, writeShellScriptBin
, writeTextDir }:
@ -171,11 +172,25 @@ let
in (emacsPackages.emacsWithPackages (epkgs: [
load-config-from-site
]));
build-summary = writeShellScript "build-summary" ''
BOLD=\\033[1m
GREEN=\\033[32m
RESET=\\033[0m
printf "\n''${GREEN}Successfully built nix-doom-emacs!''${RESET}\n"
printf "''${BOLD} ==> doom-emacs is installed to ${doom-emacs}''${RESET}\n"
printf "''${BOLD} ==> private configuration is installed to ${doomDir}''${RESET}\n"
printf "''${BOLD} ==> Dependencies are installed to ${doomLocal}''${RESET}\n"
'';
in
emacs.overrideAttrs (esuper:
let cmd = ''
for prog in $out/bin/*; do
wrapProgram $out/bin/$(basename $prog) --set DOOMDIR ${doomDir}
wrapProgram $out/bin/$(basename $prog) \
--set DOOMDIR ${doomDir} \
--set __DEBUG_doom_emacs_DIR ${doom-emacs} \
--set __DEBUG_doomLocal_DIR ${doomLocal}
done
# emacsWithPackages assumes share/emacs/site-lisp/subdirs.el
# exists, but doesn't pass it along. When home-manager calls
@ -184,6 +199,7 @@ emacs.overrideAttrs (esuper:
# https://github.com/NixOS/nixpkgs/issues/66706
rm -rf $out/share
ln -s ${esuper.emacs}/share $out
${build-summary}
'';
in
if esuper ? buildCommand then

View File

@ -167,6 +167,18 @@
"url": "https://github.com/arnested/php-extras/archive/d410c5af663c30c01d461ac476d1cbfbacb49367.tar.gz",
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
},
"reveal.js": {
"branch": "master",
"description": "The HTML Presentation Framework",
"homepage": "https://revealjs.com",
"owner": "hakimel",
"repo": "reveal.js",
"rev": "15815efe05ca69c35ce66cfdbf93316e1db66ecb",
"sha256": "1g3h710rhpyq4vnh6rgyay2dyjpw4rw99p062yhwhgrjkgjyzrc2",
"type": "tarball",
"url": "https://github.com/hakimel/reveal.js/archive/15815efe05ca69c35ce66cfdbf93316e1db66ecb.tar.gz",
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
},
"rotate-text.el": {
"branch": "master",
"description": "Emacs: cycle through words, symbols and patterns",

View File

@ -71,6 +71,18 @@ self: super: {
pname = "php-extras";
};
revealjs = self.straightBuild {
pname = "reveal.js";
ename = "revealjs";
installPhase = ''
LISPDIR=$out/share/emacs/site-lisp
install -d $LISPDIR
cp -r * $LISPDIR
'';
};
rotate-text = self.straightBuild {
pname = "rotate-text.el";
ename = "rotate-text";