advi: init at 2.0.0 (#214814)
Co-authored-by: Sandro <sandro.jaeckel@gmail.com>
This commit is contained in:
parent
4fbaf6bde9
commit
fdf6e37dc0
2 changed files with 66 additions and 0 deletions
64
pkgs/tools/typesetting/tex/advi/default.nix
Normal file
64
pkgs/tools/typesetting/tex/advi/default.nix
Normal file
|
@ -0,0 +1,64 @@
|
|||
{ fetchurl
|
||||
, lib
|
||||
, makeWrapper
|
||||
, writeShellScriptBin
|
||||
, ghostscriptX
|
||||
, ocamlPackages
|
||||
, texlive
|
||||
, which
|
||||
}:
|
||||
|
||||
let
|
||||
# simplified fake-opam edited from tweag's opam-nix
|
||||
fake-opam = writeShellScriptBin "opam" ''
|
||||
case "$1 $2" in
|
||||
"config var")
|
||||
case "$3" in
|
||||
man) echo "$out/share/man";;
|
||||
etc) echo "$out/etc";;
|
||||
doc) echo "$out/share/doc";;
|
||||
share) echo "$out/share";;
|
||||
prefix) echo "$out";;
|
||||
*) echo "fake-opam does not understand arguments: $@" ; exit 1 ;;
|
||||
esac;;
|
||||
*) echo "fake-opam does not understand arguments: $@" ; exit 1 ;;
|
||||
esac
|
||||
'';
|
||||
|
||||
# texlive currently does not symlink kpsexpand
|
||||
kpsexpand = writeShellScriptBin "kpsexpand" ''
|
||||
exec kpsetool -v
|
||||
'';
|
||||
in
|
||||
ocamlPackages.buildDunePackage rec {
|
||||
pname = "advi";
|
||||
version = "2.0.0";
|
||||
|
||||
useDune2 = true;
|
||||
|
||||
minimalOCamlVersion = "4.11";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://advi.inria.fr/advi-${version}.tar.gz";
|
||||
hash = "sha256-c0DQHlvdekJyXCxmR4+Ut/njtoCzmqX6hNazNv8PpBQ=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ fake-opam kpsexpand makeWrapper texlive.combined.scheme-medium which ];
|
||||
buildInputs = with ocamlPackages; [ camlimages ghostscriptX graphics ];
|
||||
|
||||
# TODO: ghostscript linked from texlive.combine will override ghostscriptX and break advi
|
||||
preInstall = ''
|
||||
make install
|
||||
wrapProgram "$out/bin/advi" --prefix PATH : "${lib.makeBinPath [ ghostscriptX ]}"
|
||||
'';
|
||||
|
||||
# TODO: redirect /share/advi/tex/latex to tex output compatible with texlive.combine
|
||||
# (requires patching check() in advi-latex-files)
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "http://advi.inria.fr/";
|
||||
description = "Active-DVI is a Unix-platform DVI previewer and a programmable presenter for slides written in LaTeX.";
|
||||
license = licenses.lgpl21Only;
|
||||
maintainers = [ maintainers.xworld21 ];
|
||||
};
|
||||
}
|
|
@ -4641,6 +4641,8 @@ with pkgs;
|
|||
|
||||
### TOOLS/TYPESETTING/TEX
|
||||
|
||||
advi = callPackage ../tools/typesetting/tex/advi { };
|
||||
|
||||
auctex = callPackage ../tools/typesetting/tex/auctex { };
|
||||
|
||||
blahtexml = callPackage ../tools/typesetting/tex/blahtexml { };
|
||||
|
|
Loading…
Reference in a new issue