diff --git a/pkgs/applications/version-management/monotone-viz/graphviz.patch b/pkgs/applications/version-management/monotone-viz/graphviz.patch new file mode 100644 index 000000000000..e1f9bfc5f7f1 --- /dev/null +++ b/pkgs/applications/version-management/monotone-viz/graphviz.patch @@ -0,0 +1,34 @@ +# patch "agraph.ml" +# from [8ae6c9bb70bbf9fd80e4e62d9f162ac581619b9e] +# to [05aa88921481ac9bfe238daeb4374fbc9993caaa] +# +============================================================ +--- a/agraph.ml 8ae6c9bb70bbf9fd80e4e62d9f162ac581619b9e ++++ b/agraph.ml 05aa88921481ac9bfe238daeb4374fbc9993caaa +@@ -50,8 +50,9 @@ let dot_format params agraph = + agraph.nodes in + + !+ "digraph \"monotone-viz\"\n{\n" ; +- if params.lr_layout then +- !+ " graph [rankdir=LR] ;\n" ; ++ if params.lr_layout ++ then !+ " graph [rankdir=LR] ;\n" ++ else !+ " graph [rankdir=BT] ;\n" ; + !+ " graph [ranksep=\"0.25\"] ;\n" ; + !+ " node [label=\"\"] ;\n" ; + +@@ -222,11 +223,11 @@ let spawn_dot graph status done_cb = + let dot_prg = graph.layout_params.dot_program in + let cmd = + if Viz_misc.debug "dot" +- then [ "/bin/sh" ; "-c" ; ++ then [ "/bin/sh" ; "-c" ; + Printf.sprintf + "set -o pipefail ; \ +- tee agraph.in.dot | %s -q -y -s%.0f | tee agraph.out.dot" dot_prg ppi ] +- else [ dot_prg ; "-q" ; "-y" ; Printf.sprintf "-s%.0f" ppi ] in ++ tee agraph.in.dot | %s -q -s%.0f | tee agraph.out.dot" dot_prg ppi ] ++ else [ dot_prg ; "-q" ; Printf.sprintf "-s%.0f" ppi ] in + let error fmt = + Printf.kprintf (fun s -> done_cb (`LAYOUT_ERROR s)) fmt in + try diff --git a/pkgs/applications/version-management/monotone-viz/mtn-head.nix b/pkgs/applications/version-management/monotone-viz/mtn-head.nix index 3674aa1e3dcc..9d9eb3a55bc8 100644 --- a/pkgs/applications/version-management/monotone-viz/mtn-head.nix +++ b/pkgs/applications/version-management/monotone-viz/mtn-head.nix @@ -13,12 +13,14 @@ rec { configureFlags = ["--with-lablgtk-dir=${lablgtk}/lib/ocaml/lablgtk2"]; /* doConfigure should be specified separately */ - phaseNames = ["doAutoconf" "doConfigure" "doMakeInstall"]; + phaseNames = ["doAutoconf" "doPatch" "doConfigure" "doMakeInstall"]; doAutoconf = fullDepEntry('' aclocal -I . autoconf -I . '') ["minInit" "addInputs" "doUnpack"]; + + patches = [ ./graphviz.patch ]; name = "monotone-viz-mtn-head"; meta = {