Merge pull request #19267 from vbgl/proofgeneral-4.4

ProofGeneral: 4.2 -> 4.4
This commit is contained in:
Graham Christensen 2016-10-08 09:00:11 -04:00 committed by GitHub
commit 034ba88850
3 changed files with 20 additions and 86 deletions

View File

@ -1,54 +0,0 @@
{ stdenv, fetchurl, emacs, texinfo, texLive, perl, which, automake }:
stdenv.mkDerivation (rec {
name = "ProofGeneral-4.2";
src = fetchurl {
url = http://proofgeneral.inf.ed.ac.uk/releases/ProofGeneral-4.2.tgz;
sha256 = "09qb0myq66fw17v4ziz401ilsb5xlxz1nl2wsp69d0vrfy0bcrrm";
};
sourceRoot = name;
buildInputs = [ emacs texinfo texLive perl which ];
prePatch =
'' sed -i "Makefile" \
-e "s|^\(\(DEST_\)\?PREFIX\)=.*$|\1=$out|g ; \
s|/sbin/install-info|install-info|g"
# Workaround for bug #458
# ProofGeneral 4.2 byte-compilation fails with Emacs 24.2.90
# http://proofgeneral.inf.ed.ac.uk/trac/ticket/458
sed -i "Makefile" \
-e "s|(setq byte-compile-error-on-warn t)||g"
sed -i "bin/proofgeneral" -e's/which/type -p/g'
# @image{ProofGeneral} fails, so remove it.
sed -i '94d' doc/PG-adapting.texi
sed -i '101d' doc/ProofGeneral.texi
'';
preBuild = ''
make clean;
'';
installPhase =
# Copy `texinfo.tex' in the right place so that `texi2pdf' works.
'' cp -v "${automake}/share/"automake-*/texinfo.tex doc
make install install-doc
'';
meta = {
description = "Proof General, an Emacs front-end for proof assistants";
longDescription = ''
Proof General is a generic front-end for proof assistants (also known as
interactive theorem provers), based on the customizable text editor Emacs.
'';
homepage = http://proofgeneral.inf.ed.ac.uk;
license = stdenv.lib.licenses.gpl2Plus;
platforms = stdenv.lib.platforms.unix; # arbitrary choice
};
})

View File

@ -1,44 +1,38 @@
{ stdenv, fetchurl, emacs, texinfo, texLive, perl, which, automake, enableDoc ? false }: { stdenv, fetchFromGitHub, emacs, texinfo, texLive, which, automake, enableDoc ? false }:
stdenv.mkDerivation (rec { stdenv.mkDerivation rec {
name = "ProofGeneral-4.3pre150313"; name = "ProofGeneral-${version}";
version = "4.4";
src = fetchurl { src = fetchFromGitHub {
url = "http://proofgeneral.inf.ed.ac.uk/releases/${name}.tgz"; owner = "ProofGeneral";
sha256 = "1jq5ykkk14xr5qcn4kyxmi5ls0fibr0y47gfygzm1mzrfvz9aw3f"; repo = "PG";
rev = "v${version}";
sha256 = "0bdfk91wf71z80mdfnl8hpinripndcjgdkz854zil6521r84nqk8";
}; };
sourceRoot = name; buildInputs = [ emacs which ] ++ stdenv.lib.optionals enableDoc [ texinfo texLive ];
buildInputs = [ emacs texinfo perl which ] ++ stdenv.lib.optional enableDoc texLive;
prePatch = prePatch =
'' sed -i "Makefile" \ '' sed -i "Makefile" \
-e "s|^\(\(DEST_\)\?PREFIX\)=.*$|\1=$out|g ; \ -e "s|^\(\(DEST_\)\?PREFIX\)=.*$|\1=$out|g ; \
s|/sbin/install-info|install-info|g" s|/sbin/install-info|install-info|g"
sed -i "bin/proofgeneral" -e's/which/type -p/g' sed -i "bin/proofgeneral" -e's/which/type -p/g'
# @image{ProofGeneral} fails, so remove it. chmod +x bin/proofgeneral
sed -i '94d' doc/PG-adapting.texi
# @image{ProofGeneral-image} fails, so remove it.
sed -i '91d' doc/PG-adapting.texi
sed -i '96d' doc/ProofGeneral.texi sed -i '96d' doc/ProofGeneral.texi
'' + stdenv.lib.optionalString enableDoc
# Copy `texinfo.tex' in the right place so that `texi2pdf' works.
'' cp -v "${automake}/share/"automake-*/texinfo.tex doc
''; '';
patches = [ ./pg.patch ]; patches = [ ./pg.patch ];
preBuild = '' installTargets = [ "install" ] ++ stdenv.lib.optional enableDoc "install-doc";
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 = { meta = {
description = "Proof General, an Emacs front-end for proof assistants"; description = "Proof General, an Emacs front-end for proof assistants";
@ -50,4 +44,4 @@ stdenv.mkDerivation (rec {
license = stdenv.lib.licenses.gpl2Plus; license = stdenv.lib.licenses.gpl2Plus;
platforms = stdenv.lib.platforms.unix; # arbitrary choice platforms = stdenv.lib.platforms.unix; # arbitrary choice
}; };
}) }

View File

@ -12533,19 +12533,13 @@ in
prologMode = callPackage ../applications/editors/emacs-modes/prolog { }; prologMode = callPackage ../applications/editors/emacs-modes/prolog { };
proofgeneral_4_2 = callPackage ../applications/editors/emacs-modes/proofgeneral/4.2.nix { proofgeneral = callPackage ../applications/editors/emacs-modes/proofgeneral/4.4.nix {
texinfo = texinfo4 ;
texLive = texlive.combine { inherit (texlive) scheme-basic cm-super ec; };
};
proofgeneral_4_3_pre = callPackage ../applications/editors/emacs-modes/proofgeneral/4.3pre.nix {
texinfo = texinfo4 ;
texLive = texlive.combine { inherit (texlive) scheme-basic cm-super ec; }; texLive = texlive.combine { inherit (texlive) scheme-basic cm-super ec; };
}; };
proofgeneral_HEAD = callPackage ../applications/editors/emacs-modes/proofgeneral/HEAD.nix { proofgeneral_HEAD = callPackage ../applications/editors/emacs-modes/proofgeneral/HEAD.nix {
texinfo = texinfo4 ; texinfo = texinfo4 ;
texLive = texlive.combine { inherit (texlive) scheme-basic cm-super ec; }; texLive = texlive.combine { inherit (texlive) scheme-basic cm-super ec; };
}; };
proofgeneral = self.proofgeneral_4_2;
quack = callPackage ../applications/editors/emacs-modes/quack { }; quack = callPackage ../applications/editors/emacs-modes/quack { };