2021-01-19 06:50:56 +00:00
|
|
|
{ lib, stdenv, fetchurl, ocamlPackages, gnome2, pkg-config, makeWrapper, glib
|
2017-02-15 14:08:20 +00:00
|
|
|
, libtool, libpng, yacc, expat, fontconfig, gd, pango, libjpeg, libwebp, xlibsWrapper, libXaw
|
|
|
|
}:
|
|
|
|
# We need an old version of Graphviz for format compatibility reasons.
|
|
|
|
# This version is vulnerable, but monotone-viz will never feed it bad input.
|
|
|
|
let graphviz_2_0 = import ./graphviz-2.0.nix {
|
2021-01-19 06:50:56 +00:00
|
|
|
inherit lib stdenv fetchurl pkg-config xlibsWrapper libpng libjpeg expat libXaw
|
2017-02-15 14:08:20 +00:00
|
|
|
yacc libtool fontconfig pango gd libwebp;
|
|
|
|
}; in
|
2020-04-07 04:50:19 +01:00
|
|
|
let inherit (gnome2) libgnomecanvas; in
|
2019-10-23 16:54:12 +01:00
|
|
|
let inherit (ocamlPackages) ocaml lablgtk camlp4; in
|
2016-02-04 19:13:49 +00:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
version = "1.0.2";
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "monotone-viz";
|
2016-02-04 19:13:49 +00:00
|
|
|
|
2021-02-07 09:17:39 +00:00
|
|
|
nativeBuildInputs = [ pkg-config makeWrapper ];
|
|
|
|
buildInputs = [ocaml lablgtk libgnomecanvas glib graphviz_2_0 camlp4];
|
2016-02-04 19:13:49 +00:00
|
|
|
src = fetchurl {
|
2019-08-15 13:41:18 +01:00
|
|
|
url = "http://oandrieu.nerim.net/monotone-viz/${pname}-${version}-nolablgtk.tar.gz";
|
2016-02-04 19:13:49 +00:00
|
|
|
sha256 = "1l5x4xqz5g1aaqbc1x80mg0yzkiah9ma9k9mivmn08alkjlakkdk";
|
|
|
|
};
|
|
|
|
|
|
|
|
prePatch="ln -s . a; ln -s . b";
|
|
|
|
patchFlags = ["-p0"];
|
|
|
|
patches = [
|
|
|
|
(fetchurl {
|
2018-11-24 22:53:27 +00:00
|
|
|
url = "https://src.fedoraproject.org/cgit/rpms/monotone-viz.git/plain/monotone-viz-1.0.2-dot.patch";
|
2016-02-04 19:13:49 +00:00
|
|
|
sha256 = "0risfy8iqmkr209hmnvpv57ywbd3rvchzzd0jy2lfyqrrrm6zknw";
|
|
|
|
})
|
|
|
|
(fetchurl {
|
2018-11-24 22:53:27 +00:00
|
|
|
url = "https://src.fedoraproject.org/cgit/rpms/monotone-viz.git/plain/monotone-viz-1.0.2-new-stdio.patch";
|
2016-02-04 19:13:49 +00:00
|
|
|
sha256 = "16bj0ppzqd45an154dr7sifjra7lv4m9anxfw3c56y763jq7fafa";
|
|
|
|
})
|
|
|
|
(fetchurl {
|
2018-11-24 22:53:27 +00:00
|
|
|
url = "https://src.fedoraproject.org/cgit/rpms/monotone-viz.git/plain/monotone-viz-1.0.2-typefix.patch";
|
2016-02-04 19:13:49 +00:00
|
|
|
sha256 = "1gfp82rc7pawb5x4hh2wf7xh1l1l54ib75930xgd1y437la4703r";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
|
|
|
preConfigure = ''
|
|
|
|
configureFlags="$configureFlags --with-lablgtk-dir=$(echo ${lablgtk}/lib/ocaml/*/site-lib/lablgtk2)"
|
|
|
|
'';
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
wrapProgram "$out/bin/monotone-viz" --prefix PATH : "${graphviz_2_0}/bin/"
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
inherit version;
|
2021-01-24 09:19:10 +00:00
|
|
|
description = "Monotone ancestry visualiser";
|
2021-01-15 13:21:58 +00:00
|
|
|
license = lib.licenses.gpl2Plus ;
|
|
|
|
maintainers = [lib.maintainers.raskin];
|
|
|
|
platforms = lib.platforms.linux;
|
2016-02-04 19:13:49 +00:00
|
|
|
};
|
|
|
|
}
|