1 { lib, stdenv, fetchurl, fetchpatch, ocamlPackages, gnome2, pkg-config, makeWrapper, glib
2 , libtool, libpng, bison, expat, fontconfig, gd, pango, libjpeg, libwebp, libX11, libXaw
4 # We need an old version of Graphviz for format compatibility reasons.
5 # This version is vulnerable, but monotone-viz will never feed it bad input.
6 let graphviz_2_0 = import ./graphviz-2.0.nix {
7 inherit lib stdenv fetchurl pkg-config libX11 libpng libjpeg expat libXaw
8 bison libtool fontconfig pango gd libwebp;
10 let inherit (gnome2) libgnomecanvas; in
11 let inherit (ocamlPackages) ocaml lablgtk camlp4; in
12 stdenv.mkDerivation rec {
14 pname = "monotone-viz";
16 nativeBuildInputs = [ pkg-config makeWrapper ocaml camlp4 ];
17 buildInputs = [ lablgtk libgnomecanvas glib graphviz_2_0 ];
19 url = "http://oandrieu.nerim.net/monotone-viz/${pname}-${version}-nolablgtk.tar.gz";
20 sha256 = "1l5x4xqz5g1aaqbc1x80mg0yzkiah9ma9k9mivmn08alkjlakkdk";
23 prePatch="ln -s . a; ln -s . b";
27 url = "https://src.fedoraproject.org/rpms/monotone-viz/raw/c9f4c1bebe01bb471df05d8a37ca4b6d630574ec/f/monotone-viz-1.0.2-dot.patch";
28 hash = "sha256-e348703+IzM4m/3cpe6Z9VebZgTK8+3lRLdaTfXHwSI=";
31 url = "https://src.fedoraproject.org/rpms/monotone-viz/raw/c9f4c1bebe01bb471df05d8a37ca4b6d630574ec/f/monotone-viz-1.0.2-new-stdio.patch";
32 hash = "sha256-9xQzJ+oYz06fDFOe1YOOisEZnwiwShqr2Rt7IXiu6Zo=";
35 url = "https://src.fedoraproject.org/rpms/monotone-viz/raw/c9f4c1bebe01bb471df05d8a37ca4b6d630574ec/f/monotone-viz-1.0.2-typefix.patch";
36 hash = "sha256-52VGXDJKx4ZGvZRO8QCXdTGsWR0m1pqQnEOby7PMQdg=";
41 configureFlags="$configureFlags --with-lablgtk-dir=$(echo ${lablgtk}/lib/ocaml/*/site-lib/lablgtk2)"
45 wrapProgram "$out/bin/monotone-viz" --prefix PATH : "${graphviz_2_0}/bin/"
49 description = "Monotone ancestry visualiser";
50 license = lib.licenses.gpl2Plus ;
51 maintainers = [lib.maintainers.raskin];
52 platforms = lib.platforms.linux;