nixpkgs/pkgs/tools/typesetting/tex/auctex/default.nix
apfelkuchen06 cec3a44123 auctex: fix build
prior to this change, the build fails because the documentation cannot be
generated due to a missing latex package (probably fallout from a texlive
update):

! LaTeX Error: File `hypdoc.sty' not found.

Type X to quit or <RETURN> to proceed,
or enter new name. (Default extension: sty)

Enter file name:
! Emergency stop.
<read *>

l.29  \begin{document}
                      ^^M
!  ==> Fatal error occurred, no output PDF file produced!
Transcript written on preview.log.
make[1]: *** [Makefile:91: preview.pdf] Error 1
make[1]: Leaving directory '/build/auctex-12.3/latex'
make: *** [Makefile:219: texmf] Error 2
2023-04-13 18:59:07 +02:00

41 lines
1,002 B
Nix

{ lib, stdenv, fetchurl, emacs, texlive, ghostscript }:
let auctex = stdenv.mkDerivation ( rec {
# Make this a valid tex(live-new) package;
# the pkgs attribute is provided with a hack below.
pname = "auctex";
version = "12.3";
tlType = "run";
outputs = [ "out" "tex" ];
src = fetchurl {
url = "mirror://gnu/${pname}/${pname}-${version}.tar.gz";
hash = "sha256-L9T+MLaUV8knf+IE0+g8hHK89QDI/kqBDXREBhdMqd0=";
};
buildInputs = [
emacs
ghostscript
(texlive.combine { inherit (texlive) scheme-basic hypdoc; })
];
preConfigure = ''
mkdir -p "$tex"
'';
configureFlags = [
"--with-lispdir=\${out}/share/emacs/site-lisp"
"--with-texmf-dir=\${tex}"
];
meta = with lib; {
homepage = "https://www.gnu.org/software/auctex";
description = "Extensible package for writing and formatting TeX files in GNU Emacs and XEmacs";
license = licenses.gpl3Plus;
platforms = platforms.unix;
};
});
in auctex // { pkgs = [ auctex.tex ]; }