nix-buffer support improvements.
Use inherit-local, add per-package elisp hooks.
This commit is contained in:
@@ -46,7 +46,20 @@ stdenv.mkDerivation {
|
||||
inherit cc shell libc_bin libc_dev libc_lib binutils_bin coreutils_bin;
|
||||
gnugrep_bin = if nativeTools then "" else gnugrep;
|
||||
|
||||
passthru = { inherit libc nativeTools nativeLibc nativePrefix isGNU isClang; };
|
||||
passthru = {
|
||||
inherit libc nativeTools nativeLibc nativePrefix isGNU isClang;
|
||||
|
||||
emacsBufferSetup = pkgs: ''
|
||||
; We should handle propagation here too
|
||||
(mapc (lambda (arg)
|
||||
(when (file-directory-p (concat arg "/include"))
|
||||
(setenv "NIX_CFLAGS_COMPILE" (concat (getenv "NIX_CFLAGS_COMPILE") " -isystem " arg "/include")))
|
||||
(when (file-directory-p (concat arg "/lib"))
|
||||
(setenv "NIX_LDFLAGS" (concat (getenv "NIX_LDFLAGS") " -L" arg "/lib")))
|
||||
(when (file-directory-p (concat arg "/lib64"))
|
||||
(setenv "NIX_LDFLAGS" (concat (getenv "NIX_LDFLAGS") " -L" arg "/lib64")))) '(${concatStringsSep " " (map (pkg: "\"${pkg}\"") pkgs)}))
|
||||
'';
|
||||
};
|
||||
|
||||
buildCommand =
|
||||
''
|
||||
|
||||
Reference in New Issue
Block a user