about summary refs log tree commit diff
path: root/pkgs/applications/editors
diff options
context:
space:
mode:
authorMateusz Kowalczyk <mk440@bath.ac.uk>2014-09-30 15:04:30 +0100
committerMateusz Kowalczyk <mk440@bath.ac.uk>2014-09-30 15:04:30 +0100
commitce4ae2aa1e49cb550734755dda893fb39bec4a2b (patch)
treed86d786eca549a4c31035068031a28d5bad665ee /pkgs/applications/editors
parent02e29e2eb14c3287f9c3276874295fe7f5a276a7 (diff)
parenta65767a0b42e91f711e655820d6b76bd51265847 (diff)
downloadnixlib-ce4ae2aa1e49cb550734755dda893fb39bec4a2b.tar
nixlib-ce4ae2aa1e49cb550734755dda893fb39bec4a2b.tar.gz
nixlib-ce4ae2aa1e49cb550734755dda893fb39bec4a2b.tar.bz2
nixlib-ce4ae2aa1e49cb550734755dda893fb39bec4a2b.tar.lz
nixlib-ce4ae2aa1e49cb550734755dda893fb39bec4a2b.tar.xz
nixlib-ce4ae2aa1e49cb550734755dda893fb39bec4a2b.tar.zst
nixlib-ce4ae2aa1e49cb550734755dda893fb39bec4a2b.zip
Merge pull request #4305 from vbgl/coq-containers
Working with Coq
Diffstat (limited to 'pkgs/applications/editors')
-rw-r--r--pkgs/applications/editors/emacs-modes/proofgeneral/4.3pre.nix11
-rw-r--r--pkgs/applications/editors/emacs-modes/proofgeneral/pg.patch16
2 files changed, 24 insertions, 3 deletions
diff --git a/pkgs/applications/editors/emacs-modes/proofgeneral/4.3pre.nix b/pkgs/applications/editors/emacs-modes/proofgeneral/4.3pre.nix
index 3a492dc0c7f4..32a036805edc 100644
--- a/pkgs/applications/editors/emacs-modes/proofgeneral/4.3pre.nix
+++ b/pkgs/applications/editors/emacs-modes/proofgeneral/4.3pre.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, emacs, texinfo, texLive, perl, which, automake }:
+{ stdenv, fetchurl, emacs, texinfo, texLive, perl, which, automake, enableDoc ? false }:
 
 stdenv.mkDerivation (rec {
   name = "ProofGeneral-4.3pre131011";
@@ -10,7 +10,7 @@ stdenv.mkDerivation (rec {
 
   sourceRoot = name;
 
-  buildInputs = [ emacs texinfo texLive perl which ];
+  buildInputs = [ emacs texinfo perl which ] ++ stdenv.lib.optional enableDoc texLive;
 
   prePatch =
     '' sed -i "Makefile" \
@@ -25,15 +25,20 @@ stdenv.mkDerivation (rec {
        sed -i '96d' doc/ProofGeneral.texi
     '';
 
+  patches = [ ./pg.patch ];
+
   preBuild = ''
     make clean;
   '';
 
   installPhase =
+    if enableDoc
+    then
     # Copy `texinfo.tex' in the right place so that `texi2pdf' works.
     '' cp -v "${automake}/share/"automake-*/texinfo.tex doc
        make install install-doc
-    '';
+    ''
+    else "make install";
 
   meta = {
     description = "Proof General, an Emacs front-end for proof assistants";
diff --git a/pkgs/applications/editors/emacs-modes/proofgeneral/pg.patch b/pkgs/applications/editors/emacs-modes/proofgeneral/pg.patch
new file mode 100644
index 000000000000..c733911118de
--- /dev/null
+++ b/pkgs/applications/editors/emacs-modes/proofgeneral/pg.patch
@@ -0,0 +1,16 @@
+diff -r c7d8bfff4c0a bin/proofgeneral
+--- a/bin/proofgeneral	Sat Sep 27 02:25:15 2014 +0100
++++ b/bin/proofgeneral	Sat Sep 27 02:28:16 2014 +0100
+@@ -73,11 +73,7 @@
+ 
+ # Try to find Proof General directory
+ if [ -z "$PGHOME" ] || [ ! -d "$PGHOME" ]; then
+-    # default relative to this script, otherwise PGHOMEDEFAULT
+-    MYDIR="`readlink --canonicalize "$0" | sed -ne 's,/bin/proofgeneral$,,p'`"
+-    if [ -d "$MYDIR" ]; then
+-	PGHOME="$MYDIR"
+-    elif [ -d "$PGHOMEDEFAULT" ]; then
++    if [ -d "$PGHOMEDEFAULT" ]; then
+ 	PGHOME="$PGHOMEDEFAULT"
+     else
+ 	echo "Cannot find the Proof General lisp files: Set PGHOME or use --pghome."