mirror of
https://git.sr.ht/~magic_rb/dotfiles
synced 2024-11-29 19:46:17 +01:00
4d031263d6
Signed-off-by: magic_rb <magic_rb@redalder.org>
72 lines
2 KiB
Nix
72 lines
2 KiB
Nix
{
|
|
lib,
|
|
inputs,
|
|
...
|
|
}: {
|
|
flake.overlays.emacs-master-nativecomp = final: prev: {
|
|
emacs-master-nativecomp = let
|
|
emacs-master = import (inputs.nixpkgs + "/pkgs/applications/editors/emacs/make-emacs.nix") {
|
|
version = "30";
|
|
pname = "emacs-nativecomp";
|
|
variant = "nativecomp";
|
|
src = inputs.emacs;
|
|
meta = {};
|
|
};
|
|
emacs-master-package = prev.callPackage emacs-master {
|
|
libXaw = prev.xorg.libXaw;
|
|
gconf = null;
|
|
alsa-lib = prev.alsa-lib;
|
|
acl = prev.acl;
|
|
gpm = null;
|
|
# webkitgtk = prev.webkitgtk;
|
|
|
|
# disable MacOS junk
|
|
AppKit = null;
|
|
Carbon = null;
|
|
Cocoa = null;
|
|
IOKit = null;
|
|
OSAKit = null;
|
|
Quartz = null;
|
|
QuartzCore = null;
|
|
WebKit = null;
|
|
ImageCaptureCore = null;
|
|
GSS = null;
|
|
ImageIO = null;
|
|
sigtool = null;
|
|
Accelerate = null;
|
|
UniformTypeIdentifiers = null;
|
|
};
|
|
in
|
|
(emacs-master-package.override {
|
|
withSQLite3 = true;
|
|
withNativeCompilation = true;
|
|
withWebP = true;
|
|
withGTK3 = true;
|
|
withImageMagick = true;
|
|
withTreeSitter = true;
|
|
withXinput2 = true;
|
|
withXwidgets = false;
|
|
withX = true;
|
|
})
|
|
.overrideAttrs (final': prev': {
|
|
patches = [
|
|
(final.substituteAll {
|
|
src = inputs.self.patches.emacs-native-comp-driver-options;
|
|
backendPath =
|
|
lib.concatStringsSep " "
|
|
(builtins.map (x: ''"-B${x}"'') ([
|
|
# Paths necessary so the JIT compiler finds its libraries:
|
|
"${lib.getLib final.libgccjit}/lib"
|
|
]
|
|
++ [
|
|
# Executable paths necessary for compilation (ld, as):
|
|
"${lib.getBin final.stdenv.cc.cc}/bin"
|
|
"${lib.getBin final.stdenv.cc.bintools}/bin"
|
|
"${lib.getBin final.stdenv.cc.bintools.bintools}/bin"
|
|
]));
|
|
})
|
|
];
|
|
});
|
|
};
|
|
}
|