diff options
Diffstat (limited to 'overlays')
-rw-r--r-- | overlays/emacs.nix | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/overlays/emacs.nix b/overlays/emacs.nix index 16ea55dbd7d2..7731175a8bc7 100644 --- a/overlays/emacs.nix +++ b/overlays/emacs.nix @@ -31,7 +31,27 @@ let substituteInPlace lisp/loadup.el \ --replace '(emacs-repository-get-version)' '"${repoMeta.rev}"' \ --replace '(emacs-repository-get-branch)' '"master"' - ''; + '' + + # XXX: remove when https://github.com/NixOS/nixpkgs/pull/193621 is merged + (super.lib.optionalString (old ? NATIVE_FULL_AOT) + (let backendPath = (super.lib.concatStringsSep " " + (builtins.map (x: ''\"-B${x}\"'') [ + # Paths necessary so the JIT compiler finds its libraries: + "${super.lib.getLib self.libgccjit}/lib" + "${super.lib.getLib self.libgccjit}/lib/gcc" + "${super.lib.getLib self.stdenv.cc.libc}/lib" + + # Executable paths necessary for compilation (ld, as): + "${super.lib.getBin self.stdenv.cc.cc}/bin" + "${super.lib.getBin self.stdenv.cc.bintools}/bin" + "${super.lib.getBin self.stdenv.cc.bintools.bintools}/bin" + ])); + in '' + substituteInPlace lisp/emacs-lisp/comp.el --replace \ + "(defcustom comp-libgccjit-reproducer nil" \ + "(setq native-comp-driver-options '(${backendPath})) +(defcustom comp-libgccjit-reproducer nil" + '')); } ) ) |