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/applications/science | |
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/applications/science')
-rw-r--r-- | pkgs/applications/science/logic/coq/default.nix | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/pkgs/applications/science/logic/coq/default.nix b/pkgs/applications/science/logic/coq/default.nix index 38ba14e83cf8..6c4211178077 100644 --- a/pkgs/applications/science/logic/coq/default.nix +++ b/pkgs/applications/science/logic/coq/default.nix @@ -14,8 +14,8 @@ let substituteInPlace plugins/micromega/sos.ml --replace "; csdp" "; ${csdp}/bin/csdp" substituteInPlace plugins/micromega/coq_micromega.ml --replace "System.is_in_system_path \"csdp\"" "true" '' else ""; -in +self = stdenv.mkDerivation { name = "coq-${version}"; @@ -62,6 +62,22 @@ stdenv.mkDerivation { envHooks=(''${envHooks[@]} addCoqPath) ''; + passthru = { + emacsBufferSetup = pkgs: '' + ; Propagate coq paths to children + (inherit-local-permanent coq-prog-name "${self}/bin/coqtop") + (inherit-local-permanent coq-dependency-analyzer "${self}/bin/coqdep") + (inherit-local-permanent coq-compiler "${self}/bin/coqc") + ; If the coq-library path was already set, re-set it based on our current coq + (when (fboundp 'get-coq-library-directory) + (inherit-local-permanent coq-library-directory (get-coq-library-directory)) + (coq-prog-args)) + ; Pass proof-general's coq flags to flycheck command (pretty ugly, should probably be part of PG) + (inherit-local-permanent flycheck-command-wrapper-function (lambda (cmd) + (append (funcall (default-value 'flycheck-command-wrapper-function) cmd) (coq-coqtop-prog-args coq-load-path)))) + ''; + }; + meta = with stdenv.lib; { description = "Formal proof management system"; longDescription = '' @@ -76,4 +92,4 @@ stdenv.mkDerivation { maintainers = with maintainers; [ roconnor thoughtpolice vbgl ]; platforms = platforms.unix; }; -} +}; in self |