From e7801461e069753461a4ee50863bba72282aa99a Mon Sep 17 00:00:00 2001 From: Symphorien Gibol Date: Fri, 7 Dec 2018 11:46:25 +0100 Subject: [PATCH] giac: don't split in multiple outputs for when gui enabled This breaks the Phys and Turtle menu, among other things. --- pkgs/applications/science/math/giac/default.nix | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/pkgs/applications/science/math/giac/default.nix b/pkgs/applications/science/math/giac/default.nix index 4ad498e59224..ecd55f62e333 100644 --- a/pkgs/applications/science/math/giac/default.nix +++ b/pkgs/applications/science/math/giac/default.nix @@ -47,7 +47,9 @@ stdenv.mkDerivation rec { libGLU_combined fltk xorg.libX11 ]; - outputs = [ "out" "doc" ]; + # xcas Phys and Turtle menus are broken with split outputs + # and interactive use is likely to need docs + outputs = [ "out" ] ++ stdenv.lib.optional (!enableGUI) "doc"; doCheck = true; preCheck = '' @@ -80,9 +82,15 @@ stdenv.mkDerivation rec { # reference cycle rm "$out/share/giac/doc/el/"{casinter,tutoriel}/Makefile - mkdir -p "$doc/share/giac" - mv "$out/share/giac/doc" "$doc/share/giac" - mv "$out/share/giac/examples" "$doc/share/giac" + if [ -n "$doc" ]; then + mkdir -p "$doc/share/giac" + mv "$out/share/giac/doc" "$doc/share/giac" + mv "$out/share/giac/examples" "$doc/share/giac" + fi + '' + stdenv.lib.optionalString (!enableGUI) '' + for i in pixmaps application-registry applications icons; do + rm -r "$out/share/$i"; + done; ''; meta = with stdenv.lib; {