parent
87b886bfb0
commit
911cc18e65
3 changed files with 186 additions and 4 deletions
35
packages/emacs/default.nix
Normal file
35
packages/emacs/default.nix
Normal file
|
@ -0,0 +1,35 @@
|
|||
{
|
||||
lib,
|
||||
inputs,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
pkgs' = pkgs.extend (
|
||||
lib.composeManyExtensions [
|
||||
inputs.emacs-overlay.overlays.package
|
||||
inputs.emacs-overlay.overlays.emacs
|
||||
]
|
||||
);
|
||||
all-grammars = pkgs'.tree-sitter.withPlugins builtins.attrValues;
|
||||
treesitGrammars = pkgs'.runCommand "treesit-grammars" { } ''
|
||||
mkdir $out
|
||||
for f in ${all-grammars}/*
|
||||
do
|
||||
cp $f $out/"libtree-sitter-$(basename $f)"
|
||||
done
|
||||
'';
|
||||
emacsWithoutPackages = pkgs'.emacs-git.override {
|
||||
withSQLite3 = true;
|
||||
withWebP = true;
|
||||
withPgtk = true;
|
||||
};
|
||||
emacs = (pkgs'.emacsPackagesFor emacsWithoutPackages).emacsWithPackages (
|
||||
import ./packages.nix pkgs'
|
||||
);
|
||||
in
|
||||
emacs.overrideAttrs {
|
||||
passthru = {
|
||||
inherit treesitGrammars;
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue