From 0cf6e55a701a460ac6b28850cd16641b707d3ba8 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Fri, 20 Jun 2014 22:31:55 -0700 Subject: [PATCH] proofgeneral_4_3_pre: Add expression needed for current prooftree --- .../editors/emacs-modes/proofgeneral/4.2.nix | 54 +++++++++++++++++++ .../emacs-modes/proofgeneral/4.3pre.nix | 48 +++++++++++++++++ pkgs/top-level/all-packages.nix | 9 +++- 3 files changed, 110 insertions(+), 1 deletion(-) create mode 100644 pkgs/applications/editors/emacs-modes/proofgeneral/4.2.nix create mode 100644 pkgs/applications/editors/emacs-modes/proofgeneral/4.3pre.nix diff --git a/pkgs/applications/editors/emacs-modes/proofgeneral/4.2.nix b/pkgs/applications/editors/emacs-modes/proofgeneral/4.2.nix new file mode 100644 index 00000000000..0dea1a13977 --- /dev/null +++ b/pkgs/applications/editors/emacs-modes/proofgeneral/4.2.nix @@ -0,0 +1,54 @@ +{ 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 = "GPLv2+"; + platforms = stdenv.lib.platforms.unix; # arbitrary choice + }; +}) diff --git a/pkgs/applications/editors/emacs-modes/proofgeneral/4.3pre.nix b/pkgs/applications/editors/emacs-modes/proofgeneral/4.3pre.nix new file mode 100644 index 00000000000..3a492dc0c7f --- /dev/null +++ b/pkgs/applications/editors/emacs-modes/proofgeneral/4.3pre.nix @@ -0,0 +1,48 @@ +{ stdenv, fetchurl, emacs, texinfo, texLive, perl, which, automake }: + +stdenv.mkDerivation (rec { + name = "ProofGeneral-4.3pre131011"; + + src = fetchurl { + url = http://proofgeneral.inf.ed.ac.uk/releases/ProofGeneral-4.3pre131011.tgz; + sha256 = "0104iy2xik5npkdg9p2ir6zqyrmdc93azrgm3ayvg0z76vmnb816"; + }; + + 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" + + + 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 '96d' 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 = "GPLv2+"; + platforms = stdenv.lib.platforms.unix; # arbitrary choice + }; +}) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 8ede0521df2..e7ade25cbf4 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -8383,12 +8383,19 @@ let prologMode = callPackage ../applications/editors/emacs-modes/prolog { }; - proofgeneral = callPackage ../applications/editors/emacs-modes/proofgeneral { + proofgeneral_4_2 = callPackage ../applications/editors/emacs-modes/proofgeneral/4.2.nix { texinfo = texinfo4 ; texLive = pkgs.texLiveAggregationFun { paths = [ pkgs.texLive pkgs.texLiveCMSuper ]; }; }; + proofgeneral_4_3_pre = callPackage ../applications/editors/emacs-modes/proofgeneral/4.3pre.nix { + texinfo = texinfo4 ; + texLive = pkgs.texLiveAggregationFun { + paths = [ pkgs.texLive pkgs.texLiveCMSuper ]; + }; + }; + proofgeneral = self.proofgeneral_4_2; quack = callPackage ../applications/editors/emacs-modes/quack { };