diff options
author | Shea Levy <shea@shealevy.com> | 2016-10-07 10:31:37 -0400 |
---|---|---|
committer | Shea Levy <shea@shealevy.com> | 2016-10-07 10:31:37 -0400 |
commit | eca0f17ad20e9604a60efa57c7fa717ee2c8f1b7 (patch) | |
tree | 870caa66f96c5b8da71e271b4e6a1bfa893fa38b /pkgs/build-support/cc-wrapper | |
parent | daf4e57577d0e67c9f4e92d172d3cc83b8c6b82d (diff) | |
download | nixlib-eca0f17ad20e9604a60efa57c7fa717ee2c8f1b7.tar nixlib-eca0f17ad20e9604a60efa57c7fa717ee2c8f1b7.tar.gz nixlib-eca0f17ad20e9604a60efa57c7fa717ee2c8f1b7.tar.bz2 nixlib-eca0f17ad20e9604a60efa57c7fa717ee2c8f1b7.tar.lz nixlib-eca0f17ad20e9604a60efa57c7fa717ee2c8f1b7.tar.xz nixlib-eca0f17ad20e9604a60efa57c7fa717ee2c8f1b7.tar.zst nixlib-eca0f17ad20e9604a60efa57c7fa717ee2c8f1b7.zip |
nix-buffer support improvements.
Use inherit-local, add per-package elisp hooks.
Diffstat (limited to 'pkgs/build-support/cc-wrapper')
-rw-r--r-- | pkgs/build-support/cc-wrapper/default.nix | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/pkgs/build-support/cc-wrapper/default.nix b/pkgs/build-support/cc-wrapper/default.nix index 8a746ea016ef..8a9bd3ecb4d5 100644 --- a/pkgs/build-support/cc-wrapper/default.nix +++ b/pkgs/build-support/cc-wrapper/default.nix @@ -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 = '' |