dotfiles/nix/overlays/emacs/emacs-base.nix
Magic_RB d3e46e5413
Complete module rework
Signed-off-by: Magic_RB <magic_rb@redalder.org>
2021-08-19 18:24:36 +02:00

27 lines
631 B
Nix

{ jansson, harfbuzz, glib-networking
, lib
, withPgtk ? true
, withNativeComp ? true
, name ? "emacs"
, emacsOverlay
, emacsSrc
}:
with lib;
(emacsOverlay.emacsGit.overrideAttrs
(old: {
src = emacsSrc;
buildInputs =
old.buildInputs ++ [ jansson harfbuzz.dev glib-networking ];
makeFlags = [ "NATIVE_FULL_AOT=1" ];
configureFlags =
(if withPgtk then
(remove "--with-xft" old.configureFlags)
++ singleton "--with-pgtk"
else
old.configureFlags) ++ (optional withNativeComp "--with-native-compilation");
inherit name;
})).override { nativeComp = withNativeComp; }