diff options
author | Brian Leung <leungbk@posteo.net> | 2022-12-03 10:57:51 -0800 |
---|---|---|
committer | Brian Leung <leungbk@posteo.net> | 2022-12-03 10:57:51 -0800 |
commit | 2ce014a48bf6845b9bbeca6eabbff9ba5783c30d (patch) | |
tree | 3d581a577782b3738d1729189237b37814f44f9e | |
parent | 543a3b394f6822ea5d52666ca063c85bec2d1ca0 (diff) | |
download | nixlib-2ce014a48bf6845b9bbeca6eabbff9ba5783c30d.tar nixlib-2ce014a48bf6845b9bbeca6eabbff9ba5783c30d.tar.gz nixlib-2ce014a48bf6845b9bbeca6eabbff9ba5783c30d.tar.bz2 nixlib-2ce014a48bf6845b9bbeca6eabbff9ba5783c30d.tar.lz nixlib-2ce014a48bf6845b9bbeca6eabbff9ba5783c30d.tar.xz nixlib-2ce014a48bf6845b9bbeca6eabbff9ba5783c30d.tar.zst nixlib-2ce014a48bf6845b9bbeca6eabbff9ba5783c30d.zip |
Revert "Remove unnecessary substituteInPlace"
This reverts commit 336402eba8c78f6f36fa995549add0b834be994c.
-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" + '')); } ) ) |