See the following commit in doom-emacs: > commit 723583e8d737fac93a05fe9dc06a233f3efdc305 > Author: Diego Zamboni <diego@zzamboni.org> > Date: Thu Aug 27 07:15:14 2020 +0200 > > Automatically download reveal.js and use local copy, default to v4 (#3846) > > * Automatically download reveal.js upgrade to v4 > > The +present option now automatically checks out the reveal.js > repository and configures org-re-reveal to use it. It also now uses > reveal.js 4 instead of 3.9.2. > > * Changed :init to :config
113 lines
2.4 KiB
Nix
113 lines
2.4 KiB
Nix
{ lock, dune }:
|
|
|
|
self: super: {
|
|
straightBuild = { pname, ... }@args: self.trivialBuild ({
|
|
ename = pname;
|
|
version = "1";
|
|
src = lock pname;
|
|
buildPhase = ":";
|
|
} // args);
|
|
|
|
evil-escape = super.evil-escape.overrideAttrs (esuper: {
|
|
patches = [ ./evil-escape.patch ];
|
|
});
|
|
|
|
doom-snippets = self.straightBuild {
|
|
pname = "doom-snippets";
|
|
postInstall = ''
|
|
cp -r *-mode $out/share/emacs/site-lisp
|
|
'';
|
|
};
|
|
|
|
explain-pause-mode = self.straightBuild {
|
|
pname = "explain-pause-mode";
|
|
};
|
|
|
|
evil-markdown = self.straightBuild {
|
|
pname = "evil-markdown";
|
|
};
|
|
|
|
evil-org = self.straightBuild {
|
|
pname = "evil-org-mode";
|
|
ename = "evil-org";
|
|
};
|
|
|
|
evil-quick-diff = self.straightBuild {
|
|
pname = "evil-quick-diff";
|
|
};
|
|
|
|
magit = super.magit.overrideAttrs (esuper: {
|
|
preBuild = ''
|
|
make VERSION="${esuper.version}" -C lisp magit-version.el
|
|
'';
|
|
});
|
|
|
|
nose = self.straightBuild {
|
|
pname = "nose";
|
|
};
|
|
|
|
org-mode = self.straightBuild rec {
|
|
pname = "org-mode";
|
|
version = "9.4";
|
|
installPhase = ''
|
|
LISPDIR=$out/share/emacs/site-lisp
|
|
install -d $LISPDIR
|
|
|
|
cp -r * $LISPDIR
|
|
|
|
cat > $LISPDIR/lisp/org-version.el <<EOF
|
|
(fset 'org-release (lambda () "${version}"))
|
|
(fset 'org-git-version #'ignore)
|
|
(provide 'org-version)
|
|
EOF
|
|
'';
|
|
};
|
|
|
|
org-yt = self.straightBuild {
|
|
pname = "org-yt";
|
|
};
|
|
|
|
php-extras = self.straightBuild {
|
|
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";
|
|
};
|
|
|
|
so-long = self.straightBuild {
|
|
pname = "emacs-so-long";
|
|
ename = "so-long";
|
|
};
|
|
|
|
ob-racket = self.straightBuild {
|
|
pname = "ob-racket";
|
|
};
|
|
|
|
# dune has a nontrivial derivation, which does not buildable from the melpa
|
|
# wrapper falling back to the one in nixpkgs
|
|
dune = dune.overrideAttrs (old: {
|
|
# Emacs derivations require an ename attribute
|
|
ename = old.pname;
|
|
|
|
# Need to adjust paths here match what doom expects
|
|
postInstall = ''
|
|
mkdir -p $out/share/emacs/site-lisp/editor-integration
|
|
ln -snf $out/share/emacs/site-lisp $out/share/emacs/site-lisp/editor-integration/emacs
|
|
'';
|
|
});
|
|
}
|