mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-09-24 22:27:30 +03:00
coq: Add emacs buffer setup
This commit is contained in:
parent
b447f624c3
commit
b21540c4a6
@ -26,9 +26,7 @@ let
|
|||||||
substituteInPlace plugins/micromega/sos.ml --replace "; csdp" "; ${csdp}/bin/csdp"
|
substituteInPlace plugins/micromega/sos.ml --replace "; csdp" "; ${csdp}/bin/csdp"
|
||||||
substituteInPlace plugins/micromega/coq_micromega.ml --replace "System.is_in_system_path \"csdp\"" "true"
|
substituteInPlace plugins/micromega/coq_micromega.ml --replace "System.is_in_system_path \"csdp\"" "true"
|
||||||
'' else "";
|
'' else "";
|
||||||
in
|
self = stdenv.mkDerivation {
|
||||||
|
|
||||||
stdenv.mkDerivation {
|
|
||||||
name = "coq-${version}";
|
name = "coq-${version}";
|
||||||
|
|
||||||
inherit coq-version;
|
inherit coq-version;
|
||||||
@ -36,6 +34,19 @@ stdenv.mkDerivation {
|
|||||||
inherit (ocamlPackages) ocaml;
|
inherit (ocamlPackages) ocaml;
|
||||||
passthru = {
|
passthru = {
|
||||||
inherit (ocamlPackages) findlib;
|
inherit (ocamlPackages) findlib;
|
||||||
|
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))
|
||||||
|
(mapc (lambda (arg)
|
||||||
|
(when (file-directory-p (concat arg "/lib/coq/${coq-version}/user-contrib"))
|
||||||
|
(setenv "COQPATH" (concat (getenv "COQPATH") ":" arg "/lib/coq/${coq-version}/user-contrib")))) '(${stdenv.lib.concatStringsSep " " (map (pkg: "\"${pkg}\"") pkgs)}))
|
||||||
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
@ -93,4 +104,4 @@ stdenv.mkDerivation {
|
|||||||
maintainers = with maintainers; [ roconnor thoughtpolice vbgl ];
|
maintainers = with maintainers; [ roconnor thoughtpolice vbgl ];
|
||||||
platforms = platforms.unix;
|
platforms = platforms.unix;
|
||||||
};
|
};
|
||||||
}
|
}; in self
|
||||||
|
Loading…
Reference in New Issue
Block a user