about summary refs log tree commit diff
path: root/pkgs/tools/graphics/asymptote/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/tools/graphics/asymptote/default.nix')
-rw-r--r--pkgs/tools/graphics/asymptote/default.nix20
1 files changed, 10 insertions, 10 deletions
diff --git a/pkgs/tools/graphics/asymptote/default.nix b/pkgs/tools/graphics/asymptote/default.nix
index 30681663a7ce..494f3ad4c460 100644
--- a/pkgs/tools/graphics/asymptote/default.nix
+++ b/pkgs/tools/graphics/asymptote/default.nix
@@ -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
   '';