File tree 1 file changed +15
-4
lines changed
pkgs/applications/science/logic/coq
1 file changed +15
-4
lines changed Original file line number Diff line number Diff line change 26
26
substituteInPlace plugins/micromega/sos.ml --replace "; csdp" "; ${ csdp } /bin/csdp"
27
27
substituteInPlace plugins/micromega/coq_micromega.ml --replace "System.is_in_system_path \"csdp\"" "true"
28
28
'' else "" ;
29
- in
30
-
31
- stdenv . mkDerivation {
29
+ self = stdenv . mkDerivation {
32
30
name = "coq-${ version } " ;
33
31
34
32
inherit coq-version ;
35
33
inherit camlp5 ;
36
34
inherit ( ocamlPackages ) ocaml ;
37
35
passthru = {
38
36
inherit ( ocamlPackages ) findlib ;
37
+ emacsBufferSetup = pkgs : ''
38
+ ; Propagate coq paths to children
39
+ (inherit-local-permanent coq-prog-name "${ self } /bin/coqtop")
40
+ (inherit-local-permanent coq-dependency-analyzer "${ self } /bin/coqdep")
41
+ (inherit-local-permanent coq-compiler "${ self } /bin/coqc")
42
+ ; If the coq-library path was already set, re-set it based on our current coq
43
+ (when (fboundp 'get-coq-library-directory)
44
+ (inherit-local-permanent coq-library-directory (get-coq-library-directory))
45
+ (coq-prog-args))
46
+ (mapc (lambda (arg)
47
+ (when (file-directory-p (concat arg "/lib/coq/${ coq-version } /user-contrib"))
48
+ (setenv "COQPATH" (concat (getenv "COQPATH") ":" arg "/lib/coq/${ coq-version } /user-contrib")))) '(${ stdenv . lib . concatStringsSep " " ( map ( pkg : "\" ${ pkg } \" " ) pkgs ) } ))
49
+ '' ;
39
50
} ;
40
51
41
52
src = fetchurl {
@@ -93,4 +104,4 @@ stdenv.mkDerivation {
93
104
maintainers = with maintainers ; [ roconnor thoughtpolice vbgl ] ;
94
105
platforms = platforms . unix ;
95
106
} ;
96
- }
107
+ } ; in self
You can’t perform that action at this time.
0 commit comments