asymptote: split outputs

This commit is contained in:
Vincenzo Mantova 2024-03-16 19:17:11 +00:00
parent 7f51e79e66
commit 32d1ed5d24

View file

@ -12,6 +12,8 @@ stdenv.mkDerivation rec {
version = "2.87";
pname = "asymptote";
outputs = [ "out" "man" "info" "doc" "tex" ];
src = fetchFromGitHub {
owner = "vectorgraphics";
repo = pname;
@ -47,27 +49,25 @@ stdenv.mkDerivation rec {
dontWrapQtApps = true;
# Do not build $tex/ls-R which will be generated by texlive.combine
preConfigure = ''
HOME=$TMP
substituteInPlace Makefile.in \
--replace-fail 'install: install-notexhash install-texhash' 'install: install-notexhash install-asy'
prependToVar configureFlags "--with-latex=$tex/tex/latex" "--with-context=$tex/tex/context/third"
'';
configureFlags = [
"--with-latex=$out/share/texmf/tex/latex"
"--with-context=$out/share/texmf/tex/context/third"
];
env.NIX_CFLAGS_COMPILE = "-I${boehmgc.dev}/include/gc";
postInstall = ''
rm "$out"/bin/xasy
makeQtWrapper "$out"/share/asymptote/GUI/xasy.py "$out"/bin/xasy --prefix PATH : "$out"/bin
mv $out/share/info/asymptote/*.info $out/share/info/
sed -i -e 's|(asymptote/asymptote)|(asymptote)|' $out/share/info/asymptote.info
rmdir $out/share/info/asymptote
rm -f $out/share/info/dir
mv "$info"/share/info/asymptote/*.info "$info"/share/info/
sed -i -e 's|(asymptote/asymptote)|(asymptote)|' "$info"/share/info/asymptote.info
rmdir "$info"/share/info/asymptote
rm -f "$info"/share/info/dir
rm -rf $out/share/texmf
install -Dt $out/share/emacs/site-lisp/${pname} $out/share/asymptote/*.el
'';